Jelajahi Sumber

Merge branch '20210223' of http://114.135.61.188:53000/UIMS/Code into 20210223

lihui007 3 tahun lalu
induk
melakukan
c962adab7f

+ 4 - 4
sms_water/src/main/java/com/huaxu/dto/SetupMethod.java

@@ -14,10 +14,10 @@ public class SetupMethod {
 //            "receiveTime":"2021-05-19 09:50:15",
 //            "method":"WriteValve",
 //            "params":{"electronicNo":"AAAAAAAAAAAAAA","valveStatus":"1"}}
-    private String deviceId;
-    //private String deviceMode;
-    //private String deviceType;
-    //private String manufacturer;
+    //private String deviceId;
+    private String deviceMode;
+    private String deviceType;
+    private String manufacturer;
     private String method;
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     private Date receiveTime;

+ 5 - 5
sms_water/src/main/java/com/huaxu/service/DeviceSetupMethodService.java

@@ -134,16 +134,16 @@ public class DeviceSetupMethodService extends ServiceImpl<DeviceSetupMethodMappe
         //查询到操作方法后执行操作
         if (deviceSetupMethodEntities.size() > 0) {
             //查询设备型号
-            //DeviceTypeEntity deviceTypeEntity = deviceTypeService.findDeviceTypeById(Long.valueOf(deviceEntity.getDeviceTypeId()));
+            DeviceTypeEntity deviceTypeEntity = deviceTypeService.findDeviceTypeById(Long.valueOf(deviceEntity.getDeviceTypeId()));
             String method = deviceSetupMethodEntities.get(0).getMethod();
             methodParms = deviceSetupMethodEntities.get(0).getParams();
             SetupMethod setupMethod = new SetupMethod();
             setupMethod.setMethod(method);
-            setupMethod.setDeviceId("912cf9e7-8557-4792-a2f9-27ba72bbcb89");
+            //setupMethod.setDeviceId("912cf9e7-8557-4792-a2f9-27ba72bbcb89");
             setupMethod.setUnitIdentifier(deviceEntity.getDeviceCode());
-            //setupMethod.setDeviceMode(deviceTypeEntity.getDeviceMode());
-            //setupMethod.setDeviceType(deviceTypeEntity.getDeviceType());
-            //setupMethod.setManufacturer(deviceTypeEntity.getManufacturerId());
+            setupMethod.setDeviceMode(deviceTypeEntity.getDeviceMode());
+            setupMethod.setDeviceType(deviceTypeEntity.getDeviceType());
+            setupMethod.setManufacturer(deviceTypeEntity.getManufacturerId());
             setupMethod.setReceiveTime(new Date());
             //封装指令
             String[] parm = parms.split(",");