wangliang 1 سال پیش
والد
کامیت
dfc3f7d9cf

+ 2 - 2
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDeviceDeliveryServiceImpl.java

@@ -504,7 +504,7 @@ public class TBDeviceDeliveryServiceImpl extends ServiceImpl<TBDeviceDeliveryMap
         for (FlowFormWidgetResult t : flowFormWidgetResultList) {
             if (t.getFormId().contains(SystemConstant.DEVICE_OUT_TABLE)) {
                 JSONObject jsonObject = JSONObject.parseObject(t.getValue());
-                if (Objects.nonNull(jsonObject)) {
+                if (Objects.nonNull(jsonObject) && !Objects.equals(jsonObject, "null")) {
                     JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
                     for (int i = 0; i < jsonArray.size(); i++) {
                         DeviceInOutForm deviceInOutForm = GsonUtil.fromJson(GsonUtil.toJson(jsonArray.getJSONObject(i)),
@@ -539,7 +539,7 @@ public class TBDeviceDeliveryServiceImpl extends ServiceImpl<TBDeviceDeliveryMap
         for (FlowFormWidgetResult t : flowFormWidgetResultList) {
             if (t.getFormId().contains(SystemConstant.DEVICE_OUT_TABLE)) {
                 JSONObject jsonObject = JSONObject.parseObject(t.getValue());
-                if (Objects.nonNull(jsonObject)) {
+                if (Objects.nonNull(jsonObject) && !Objects.equals(jsonObject, "null")) {
                     JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
                     for (int i = 0; i < jsonArray.size(); i++) {
                         DeviceInOutForm deviceInOutForm = GsonUtil.fromJson(GsonUtil.toJson(jsonArray.getJSONObject(i)),

+ 4 - 4
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -1129,8 +1129,8 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
             Long deviceInOutTime = null;
             for (FlowFormWidgetResult f : flowFormWidgetResultList) {
                 if ((f.getFormId().contains(SystemConstant.DEVICE_OUT_TIME) || f.getFormId()
-                        .contains(SystemConstant.DEVICE_IN_TIME)) && Objects.nonNull(f.getValue()) && !f.getValue()
-                        .contains("null")) {
+                        .contains(SystemConstant.DEVICE_IN_TIME)) && Objects.nonNull(f.getValue()) && !Objects.equals(
+                        f.getValue(), "null")) {
                     JSONObject jsonObject = JSONObject.parseObject(f.getValue());
                     String value = jsonObject.getString(SystemConstant.VALUE);
                     deviceInOutTime = Long.parseLong(value);
@@ -1138,8 +1138,8 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                             InOutTypeEnum.OUT :
                             InOutTypeEnum.IN;
                 } else if ((f.getFormId().contains(SystemConstant.DEVICE_OUT_TABLE) || f.getFormId()
-                        .contains(SystemConstant.DEVICE_IN_TABLE)) && Objects.nonNull(f.getValue()) && !f.getValue()
-                        .contains("null")) {
+                        .contains(SystemConstant.DEVICE_IN_TABLE)) && Objects.nonNull(f.getValue()) && !Objects.equals(
+                        f.getValue(), "null")) {
                     if (Objects.isNull(type)) {
                         type = f.getFormId().contains(SystemConstant.DEVICE_OUT_TABLE) ?
                                 InOutTypeEnum.OUT :