From b0e278f6d0150914acb4923f4c8738a22b068002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=83=E6=B0=94=E6=BB=A1=E6=BB=A1=28jgy=29?= Date: Fri, 20 Dec 2024 11:26:46 +0800 Subject: [PATCH] =?UTF-8?q?2024-12-20=20=E8=AE=BE=E5=A4=87=E6=A8=A1?= =?UTF-8?q?=E5=9D=97-=E7=BB=B4=E4=BF=AE=E5=AE=A1=E6=A0=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/EquRepairWorkOrderServiceImpl.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquRepairWorkOrderServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquRepairWorkOrderServiceImpl.java index 073b2205..5070ac32 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquRepairWorkOrderServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquRepairWorkOrderServiceImpl.java @@ -473,7 +473,7 @@ public class EquRepairWorkOrderServiceImpl implements IEquRepairWorkOrderService //发企业微信--------------------结束 } - return success("提交成功,维修完成!"); + return success("提交成功!"); } //更新运行表 + 设备表 @@ -564,10 +564,15 @@ public class EquRepairWorkOrderServiceImpl implements IEquRepairWorkOrderService throw new NotLoginException("设备表中,此设备状态为空!"); } - if (equOperation.getEquStatusDes() == null || equOperation.getEquStatusDes().equals("")) { - equOperation.setEquStatusDes(formattedDate + ":" + equStatus); - } else { - equOperation.setEquStatusDes(equOperation.getEquStatusDes() + formattedDate + equStatus);//设备状态描述 + if(equOperation == null){ + System.out.println(equRepairWorkOrder.getEquipmentCode()+":运行记录为空"); + }else{ + if (StringUtils.isBlank(equOperation.getEquStatusDes())) { + equOperation.setEquStatusDes(formattedDate + ":" + equStatus); + } else { + equOperation.setEquStatusDes(equOperation.getEquStatusDes() + formattedDate + equStatus);//设备状态描述 + } + equOperationMapper.updateEquOperation(equOperation); } if(equ.getEquipmentStatus().equals("0") || equ.getEquipmentStatus().equals("2")|| equ.getEquipmentStatus().equals("1")){ @@ -576,7 +581,6 @@ public class EquRepairWorkOrderServiceImpl implements IEquRepairWorkOrderService equEquipment.setEquipmentStatus("3"); } equRepairWorkOrderMapper.updateEquipmentStatus(equEquipment); - equOperationMapper.updateEquOperation(equOperation); return msg; }