|
@@ -11,12 +11,14 @@ import org.jeecg.common.util.DateUtils;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecg.modules.actualControl.billetActual.billetActual.entity.BilletBasicInfo;
|
|
|
import org.jeecg.modules.actualControl.billetActual.billetActual.service.IBilletBasicInfoService;
|
|
|
+import org.jeecg.modules.actualControl.billetActual.billetActual.utils.MqttClientUtil;
|
|
|
import org.jeecg.modules.billet.billetHotsendChangeShift.entity.BilletHotsendChangeShift;
|
|
|
import org.jeecg.modules.billet.billetHotsendChangeShift.mapper.BilletHotsendChangeShiftMapper;
|
|
|
import org.jeecg.modules.billet.billetHotsendChangeShift.service.IBilletHotsendChangeShiftService;
|
|
|
import org.jeecg.modules.billet.operateLog.service.IOperateLogService;
|
|
|
import org.jeecg.modules.billet.shiftConfiguration.entity.ShiftConfiguration;
|
|
|
import org.jeecg.modules.billet.shiftConfiguration.service.IShiftConfigurationService;
|
|
|
+import org.jeecg.modules.connConfig.mapper.ConfigMqttMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -47,6 +49,9 @@ public class BilletHotsendChangeShiftServiceImpl extends ServiceImpl<BilletHotse
|
|
|
@Autowired
|
|
|
private IShiftConfigurationService shiftConfigurationService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ConfigMqttMapper configMqttMapper;
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public JSONObject billetHotsendChangeShiftHandle(BilletHotsendChangeShift billetHotsendChangeShiftVo) {
|
|
@@ -296,6 +301,35 @@ public class BilletHotsendChangeShiftServiceImpl extends ServiceImpl<BilletHotse
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void fiveChangeShiftHandle(BilletHotsendChangeShift billetHotsendChangeShiftVo) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> mapSendInfo = new HashMap<>();
|
|
|
+ mapSendInfo.put("ccmNo", billetHotsendChangeShiftVo.getCcmNo());// 铸机号
|
|
|
+ mapSendInfo.put("changeShiftTime", DateUtils.date2Str(new Date(), DateUtils.datetimeFormat.get()));
|
|
|
+ MqttClientUtil mqttClientUtilBe = new MqttClientUtil();
|
|
|
+ mqttClientUtilBe.pushChangeShiftData(configMqttMapper, mapSendInfo, "syn/billet/changeShift");
|
|
|
+ log.info("5号机手动交班发送MQTT成功: {}", mapSendInfo);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("5号机手动交班发送MQTT成功异常!", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void sixChangeShiftHandle(BilletHotsendChangeShift billetHotsendChangeShiftVo) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> mapSendInfo = new HashMap<>();
|
|
|
+ mapSendInfo.put("ccmNo", billetHotsendChangeShiftVo.getCcmNo());
|
|
|
+ mapSendInfo.put("changeShiftTime", DateUtils.date2Str(new Date(), DateUtils.datetimeFormat.get()));
|
|
|
+ MqttClientUtil mqttClientUtilBe = new MqttClientUtil();
|
|
|
+ mqttClientUtilBe.pushChangeShiftData(configMqttMapper, mapSendInfo, "syn/billet/changeSixShift");
|
|
|
+ log.info("6号机手动交班发送MQTT成功: {}", mapSendInfo);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("6号机手动交班发送MQTT成功异常!", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 计算余数并提取相应元素
|
|
|
* @param billetBasicInfoList
|