pjb
2025-06-18 68157f39e1d56ce2a44f80620bf33b7510cbb327
Merge branch 'ycds-wms-dev' of http://47.97.1.152:5880/r/zy-asrs-master into ycds-wms-dev
2个文件已修改
16 ■■■■■ 已修改文件
zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/DateUtils.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WorkServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/DateUtils.java
@@ -86,6 +86,13 @@
        return daysPoint1;
    }
    public static String format(Date date, String pattern){
        if (date == null){
            return "";
        }
       return new SimpleDateFormat(pattern).format(date);
    }
    /**
     * 入参date距离现在的秒数
     */
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WorkServiceImpl.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.zy.asrs.framework.common.Cools;
import com.zy.asrs.framework.common.DateUtils;
import com.zy.asrs.framework.exception.CoolException;
import com.zy.asrs.wms.asrs.entity.*;
import com.zy.asrs.wms.asrs.entity.enums.*;
@@ -15,6 +16,8 @@
import com.zy.asrs.wms.utils.LocUtils;
import com.zy.asrs.wms.utils.OrderUtils;
import com.zy.asrs.wms.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -23,6 +26,8 @@
@Service("workService")
public class WorkServiceImpl implements WorkService {
    public static final Logger logger = LoggerFactory.getLogger(WorkServiceImpl.class);
    @Autowired
    private TaskService taskService;
@@ -77,9 +82,11 @@
    @Override
    public String generateTaskNo(Long taskType) {
        String format = DateUtils.format(new Date(), "MMddHHmm");
        Random random = new Random();
        int nextInt = random.nextInt(99999);
        return "R" + nextInt;
        logger.info("R" + format + nextInt);
        return "R" + format + nextInt;
    }
    @Override