|
@@ -1,6 +1,7 @@
|
|
|
package org.jeecg.modules.billetActual.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
@@ -566,6 +567,34 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
sendFurnaceChangeToMqtt(finalData);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void receiveStrandNoSize(JSONObject jsonObject) {
|
|
|
+
|
|
|
+ if (jsonObject == null) {
|
|
|
+ throw new JeecgBootException("参数不能为空!");
|
|
|
+ }
|
|
|
+
|
|
|
+ String ccmNo = jsonObject.getString("ccmNo");
|
|
|
+ if (oConvertUtils.isEmpty(ccmNo)) {
|
|
|
+ throw new JeecgBootException("铸机号不能为空!");
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONArray strandNoSizeArray = jsonObject.getJSONArray("strandNoSizeList");
|
|
|
+ if (strandNoSizeArray == null || strandNoSizeArray.isEmpty()) {
|
|
|
+ throw new JeecgBootException("流号定尺集合不能为空!");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 构造 Redis key
|
|
|
+ String redisKey = String.format("ccmno:length:stream:%s", ccmNo);
|
|
|
+
|
|
|
+ // 序列化成 JSON 字符串(保留原始格式存储)
|
|
|
+ String jsonValue = strandNoSizeArray.toJSONString();
|
|
|
+
|
|
|
+ // 存入 Redis
|
|
|
+ redisTemplate.opsForValue().set(redisKey, jsonValue);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
public void sendFurnaceChangeToMqtt(FurnaceChangeData data) {
|
|
|
try {
|
|
|
Map<String, Object> mapSendInfo = new HashMap<>();
|