作者 钟来

模块整理

... ... @@ -28,7 +28,7 @@ public class OperatingData {
Object object = field.get(value);
if(null != object)
{
if(object.getClass().isPrimitive())
if(isWrapperType(object))
{
operatingDataType.setValue(field,object);
ifOperatingDataValueIsNotNull.exeValue(field.getName(),object);
... ... @@ -80,4 +80,10 @@ public class OperatingData {
}
return null;
}
public static boolean isWrapperType(Object object) {
return object instanceof Integer || object instanceof Byte || object instanceof Short ||
object instanceof Long || object instanceof Float || object instanceof Double ||
object instanceof Character || object instanceof Boolean || object.getClass().isPrimitive();
}
}
... ...
... ... @@ -49,6 +49,10 @@ public class DateListenService {
if(null != data && data.size() != 0)
{
Condata condata = BeanUtil.mapToBean(data, Condata.class,false,null);
if(condata.getRunstate()==0)
{
condata.setRunstate(3);
}
Info info = BeanUtil.mapToBean(data, Info.class,false,null);
if(ObjectUtil.notEqual(OperatingData.feederConfig.getCondata(),condata))
{
... ...
... ... @@ -6,6 +6,9 @@ import com.zhonglai.luhui.smart.feeder.service.device.SerialPortService;
import com.zhonglai.luhui.smart.feeder.service.device.handle.CameraRtspHandle;
import com.zhonglai.luhui.smart.feeder.service.netty.NettyClient;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class InitService {
public static SerialPortService serialPortService;
... ... @@ -63,6 +66,7 @@ public class InitService {
//数据上报
mqttService = new MqttService();
mqttService.start();
}
}
}
... ...