diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index 036e556..2694191 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -689,6 +689,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { one.setMove_way(one.getMove_way() + " -> " + basePoint.getPoint_code()); } one.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue()); + TaskUtils.setGroupUpdateByAcs(one); + vehiclematerialgroupService.updateById(one); // 记录泥料 MesMudConsumptionDto mesMudConsumptionDto = new MesMudConsumptionDto(); mesMudConsumptionDto.setMSGID(IdUtil.getSnowflake(1, 1).nextIdStr()); @@ -726,8 +728,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { taskResponse.setMessage(CommonUtils.remainStandingFinishTime(one.getInstorage_time(), one.getStanding_time())); } - TaskUtils.setGroupUpdateByAcs(one); - vehiclematerialgroupService.updateById(one); return taskResponse; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/enums/TagNameEnum.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/enums/TagNameEnum.java index b151ffd..b9ed32b 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/enums/TagNameEnum.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/enums/TagNameEnum.java @@ -19,6 +19,10 @@ public enum TagNameEnum { * 物料同步 */ MATERIAL_SYNCHRONIZATION("物料同步"), + /** + * 静置校验 + */ + STANDING_CHECK("静置校验"), /** * 标记符号 */ diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/CommonUtils.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/CommonUtils.java index b205487..2a6ce6f 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/CommonUtils.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/util/CommonUtils.java @@ -1,8 +1,11 @@ package org.nl.wms.util; import com.alibaba.fastjson.JSONObject; +import lombok.extern.slf4j.Slf4j; import org.nl.wms.ext.acs.service.dto.SignalData; import org.nl.wms.ext.acs.service.dto.to.acs.PutActionRequest; +import org.nl.wms.sch.task_manage.enums.TagNameEnum; +import org.slf4j.MDC; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -17,6 +20,7 @@ import java.util.*; * @Description: 通用工具 * @Date: 2023/7/17 */ +@Slf4j public class CommonUtils { /** * @param inStorageTime 入库时间 @@ -24,11 +28,14 @@ public class CommonUtils { * @return */ public static boolean isStandingFinish(String inStorageTime, Integer standingTime) { + MDC.put("tag_name", TagNameEnum.STANDING_CHECK.getTag()); + log.info("判断静置时间->入库时间{},静置时间{}", inStorageTime, standingTime); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); LocalDateTime inStorageDateTime = LocalDateTime.parse(inStorageTime, formatter); Duration standingDuration = Duration.ofMinutes(standingTime); LocalDateTime currentTime = LocalDateTime.now(); LocalDateTime expiryTime = inStorageDateTime.plus(standingDuration); + log.info("时间转换:当前时间{}-期望时间{}", currentTime, expiryTime); return currentTime.isAfter(expiryTime); }