|
@@ -2,7 +2,9 @@ package org.jeecg.modules.push.utils;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import net.sf.ezmorph.object.DateMorpher;
|
|
|
import net.sf.json.JSONObject;
|
|
|
+import net.sf.json.util.JSONUtils;
|
|
|
import org.eclipse.paho.client.mqttv3.*;
|
|
|
import org.jeecg.common.util.SpringContextHolder;
|
|
|
import org.jeecg.modules.billetActual.entity.BilletBasicInfo;
|
|
@@ -101,12 +103,14 @@ public class MqttClientCallback implements MqttCallback, MqttCallbackExtended{
|
|
|
JSONObject jsonObject = JSONObject.fromObject(message.toString());
|
|
|
// 炉次实绩
|
|
|
if(topic.contains("trace/performance/converter/add")){
|
|
|
+ JSONUtils.getMorpherRegistry().registerMorpher(new DateMorpher(new String[] {"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss"}));
|
|
|
HeatsActuals heatsActuals = (HeatsActuals)JSONObject.toBean(jsonObject, HeatsActuals.class);
|
|
|
heatsActualsService.addC(heatsActuals);
|
|
|
return;
|
|
|
}
|
|
|
// 铸坯实绩
|
|
|
if(topic.contains("trace/performance/billet/add")){
|
|
|
+ JSONUtils.getMorpherRegistry().registerMorpher(new DateMorpher(new String[] {"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss"}));
|
|
|
BilletBasicInfo billetBasicInfo = (BilletBasicInfo) JSONObject.toBean(jsonObject, BilletBasicInfo.class);
|
|
|
billetBasicInfoService.addC(billetBasicInfo);
|
|
|
return;
|