自动化立体仓库 - WMS系统
src/main/java/com/zy/api/service/impl/WcsApiServiceImpl.java
@@ -96,8 +96,13 @@
        String response;
        R r = R.ok();
        WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", params.getTaskNo()));
        if (!Objects.isNull(wrkMast) && "out".equalsIgnoreCase(params.getType()) && "Y".equalsIgnoreCase(wrkMast.getPauseMk())) {
        if (!Objects.isNull(wrkMast) && "out".equalsIgnoreCase(params.getType())) {
            if ("Y".equalsIgnoreCase(wrkMast.getPauseMk())) {
            return R.error("task paused");
            }
            if (requiresOutboundErpConfirm(wrkMast) && !"Y".equalsIgnoreCase(wrkMast.getPdcType())) {
                return R.error("task not confirmed by erp");
            }
        }
        try {
            log.info("下发搬运任务给wcs="+JSON.toJSONString(params));
@@ -179,8 +184,8 @@
            } else if (params.getMsgType().equals("task_cancel")) {
                if (mast.getIoType() != null && mast.getIoType() > 100 && mast.getWrkSts() < 14) {
                    mast.setPauseMk("Y");
                    mast.setUpdMk("WCS_CANCELLED");
                    mast.setManuType("WCS_CANCELLED");
//                    mast.setUpdMk("WCS_CANCELLED");
//                    mast.setManuType("WCS_CANCELLED");
                    mast.setModiTime(new Date());
                    if (!wrkMastService.updateById(mast)) {
                        throw new CoolException("task cancel update fail");
@@ -206,6 +211,11 @@
        }
        return R.ok();
    }
    private boolean requiresOutboundErpConfirm(WrkMast wrkMast) {
        Integer ioType = wrkMast == null ? null : wrkMast.getIoType();
        return ioType != null && (ioType == 101 || ioType == 103 || ioType == 104 || ioType == 107 || ioType == 110);
    }
    @Override
    public R pauseOutTasks(StopOutTaskParams params) {
        if (params == null || params.getTasks() == null || params.getTasks().isEmpty()) {