|
@@ -16,6 +16,7 @@ import org.jeecg.modules.actualControl.billetActual.billetActual.utils.MqttClien
|
|
|
import org.jeecg.modules.actualControl.billetActual.billetActual.utils.TopicType;
|
|
|
import org.jeecg.modules.actualControl.heatsActuals.entity.HeatsActuals;
|
|
|
import org.jeecg.modules.actualControl.heatsActuals.service.IHeatsActualsService;
|
|
|
+import org.jeecg.modules.billet.billetHotsend.dto.StrandNoSizeDTO;
|
|
|
import org.jeecg.modules.billet.billetHotsend.entity.*;
|
|
|
import org.jeecg.modules.billet.billetHotsend.mapper.BilletHotsendBaseMapper;
|
|
|
import org.jeecg.modules.billet.billetHotsend.service.IBilletHotsendBaseService;
|
|
@@ -774,6 +775,36 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
sendFurnaceChangeToMqtt(finalData);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void pushStrandNoSize(StrandNoSizeDTO dto) {
|
|
|
+
|
|
|
+ if (oConvertUtils.listIsEmpty(dto.getStrandNoSizeList())) {
|
|
|
+ throw new JeecgBootException("流号以及定尺集合不能为空!");
|
|
|
+ }
|
|
|
+
|
|
|
+ for (StrandNoSizeDTO.StrandNoSize strandNoSize : dto.getStrandNoSizeList()) {
|
|
|
+ sendStrandNoSizeToMqtt(strandNoSize);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public void sendStrandNoSizeToMqtt(StrandNoSizeDTO.StrandNoSize strandNoSize) {
|
|
|
+
|
|
|
+ try {
|
|
|
+ Map<String, Object> mapSendInfo = new HashMap<>();
|
|
|
+ mapSendInfo.put("strandNo", strandNoSize.getStrandNo());
|
|
|
+ mapSendInfo.put("length", strandNoSize.getLength());
|
|
|
+
|
|
|
+ // 执行MQTT推送,设置合理的超时时间
|
|
|
+ MqttClientUtil mqttClientUtilBe = new MqttClientUtil();
|
|
|
+ mqttClientUtilBe.pushCData(configMqttMapper, mapSendInfo, TopicType.SYN_BILLET_PUSHSTRANDNOLENGTH.getTopicValue());
|
|
|
+ log.info("B端传递流号定尺参数,发送MQTT成功: {}", mapSendInfo);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("B端传递流号定尺参数,发送MQTT异常!", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public void sendFurnaceChangeToMqtt(FurnaceChangeData data) {
|
|
|
try {
|
|
|
Map<String, Object> mapSendInfo = new HashMap<>();
|