feat: 添加静置时间判断日志
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ public enum TagNameEnum {
|
||||
* 物料同步
|
||||
*/
|
||||
MATERIAL_SYNCHRONIZATION("物料同步"),
|
||||
/**
|
||||
* 静置校验
|
||||
*/
|
||||
STANDING_CHECK("静置校验"),
|
||||
/**
|
||||
* 标记符号
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user