From 9abb22370e09a10502a8373a072256f594d4750c Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Wed, 28 Jan 2026 09:16:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E8=89=B2=E7=81=AF=E5=81=9C=E6=9C=BA?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xujie/modbus/mapper/ThreeColorLampMapper.java | 2 ++ .../xujie/modbus/service/impl/ModbusCollectServiceImpl.java | 5 +++-- .../src/main/resources/dao/ThreeColorLampMapper.xml | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/threecolor-modbus-collector/src/main/java/com/xujie/modbus/mapper/ThreeColorLampMapper.java b/threecolor-modbus-collector/src/main/java/com/xujie/modbus/mapper/ThreeColorLampMapper.java index 65bb6a7..1b9f1a8 100644 --- a/threecolor-modbus-collector/src/main/java/com/xujie/modbus/mapper/ThreeColorLampMapper.java +++ b/threecolor-modbus-collector/src/main/java/com/xujie/modbus/mapper/ThreeColorLampMapper.java @@ -17,4 +17,6 @@ public interface ThreeColorLampMapper extends BaseMapper { SoscheduledroutingVo getSoscheduled(@Param("seqno") String seqno); ThreeColorLamp selectThreeColorLastByResourceId(@Param("site") String site,@Param("equipmentNo") String equipmentNo); + + int selectHistSeqno(@Param("site") String site,@Param("seqNo") String seqNo); } diff --git a/threecolor-modbus-collector/src/main/java/com/xujie/modbus/service/impl/ModbusCollectServiceImpl.java b/threecolor-modbus-collector/src/main/java/com/xujie/modbus/service/impl/ModbusCollectServiceImpl.java index 19fa345..c275642 100644 --- a/threecolor-modbus-collector/src/main/java/com/xujie/modbus/service/impl/ModbusCollectServiceImpl.java +++ b/threecolor-modbus-collector/src/main/java/com/xujie/modbus/service/impl/ModbusCollectServiceImpl.java @@ -270,14 +270,15 @@ public class ModbusCollectServiceImpl } if (red){ - if(!"X".equals(resourceScheduled.getStatus())){ + if(!"X".equals(resourceScheduled.getIssend())){ SoscheduledroutingVo soscheduled = threeColorLampMapper.getSoscheduled(resourceScheduled.getSeqNo()); + int histSeqno = threeColorLampMapper.selectHistSeqno(folderLocation.getSite(), resourceScheduled.getSeqNo()); SfdcTimeHist sfdcTimeHist = new SfdcTimeHist(); sfdcTimeHist.setSite(folderLocation.getSite()); sfdcTimeHist.setOrderNo(soscheduled.getOrderno()); sfdcTimeHist.setItemNo(Double.valueOf(soscheduled.getItemno())); sfdcTimeHist.setSeqNo(soscheduled.getSeqno()); - sfdcTimeHist.setHistSeqno(null); + sfdcTimeHist.setHistSeqno(histSeqno+1); sfdcTimeHist.setEventTime(new Date()); sfdcTimeHist.setEnteredBy(null); sfdcTimeHist.setEventDesc(null); diff --git a/threecolor-modbus-collector/src/main/resources/dao/ThreeColorLampMapper.xml b/threecolor-modbus-collector/src/main/resources/dao/ThreeColorLampMapper.xml index da3f3cd..be3ab0f 100644 --- a/threecolor-modbus-collector/src/main/resources/dao/ThreeColorLampMapper.xml +++ b/threecolor-modbus-collector/src/main/resources/dao/ThreeColorLampMapper.xml @@ -52,4 +52,8 @@ site = #{site} and equipment_no = #{equipmentNo} ORDER BY create_date DESC + \ No newline at end of file