diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcHoldLogServiceImpl.java b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcHoldLogServiceImpl.java index aa18f993..5941aee8 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcHoldLogServiceImpl.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcHoldLogServiceImpl.java @@ -100,6 +100,7 @@ public class SfcHoldLogServiceImpl extends ServiceImpl ueryWrapper=new QueryWrapper<>(); ueryWrapper.eq(SfcHoldLog.STEP_ID,stepId); ueryWrapper.eq(SfcHoldLog.SFC,sfc); + ueryWrapper.orderByDesc(SfcHoldLog.CREATED_DATE_TIME); List list = list(ueryWrapper); LocalDateTime holdTime = list.get(0).getCreatedDateTime(); long workHourSeconds = Duration.between(holdTime, now).getSeconds();