#
Junjie
2025-04-29 5f1280f3724da083732e858dec95bd7f3d14c8f9
#
1个文件已修改
35 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/OpenController.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -95,18 +95,24 @@
                          @RequestBody TaskCreateParam param,
                          HttpServletRequest request) {
        auth(appkey, param, request);
        R result = null;
        try{
            if (Cools.isEmpty(param)) {
                return R.parse(BaseRes.PARAM);
                result = R.parse(BaseRes.PARAM);
                return result;
            }
            if (Cools.isEmpty(param.getTaskNo())) {
                return R.error("任务号[taskNo]不能为空");
                result = R.error("任务号[taskNo]不能为空");
                return result;
            }
            if (Cools.isEmpty(param.getIoType())) {
                return R.error("任务类型[ioType]不能为空");
                result = R.error("任务类型[ioType]不能为空");
                return result;
            }
            if (Cools.isEmpty(param.getBarcode())) {
                return R.error("条码[barcode]不能为空");
                result = R.error("条码[barcode]不能为空");
                return result;
            }
            String locNo=null;
            if (param.getIoType() == 1) {
@@ -119,24 +125,37 @@
                        .eq("loc_no", locNo).ne("loc_sts", "X"));
                if (Cools.isEmpty(locMast)) {
                    log.error("库位号不存在" + locNo);
                    return R.error("库位号不存在" + locNo).add("库位号不存在" + locNo);
                    result = R.error("库位号不存在" + locNo).add("库位号不存在" + locNo);
                    return result;
                }
            } catch (Exception e) {
                log.error("库位号检测程序异常==》异常信息" + e);
                return R.error("库位号检测程序异常").add("库位号检测程序异常==》异常信息" + e);
                result = R.error("库位号检测程序异常").add("库位号检测程序异常==》异常信息" + e);
                return result;
            }
            LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>()
                    .eq("loc_sts", "F")
                    .eq("loc_no", locNo)
                    .eq("barcode", param.getBarcode()));
            if(Cools.isEmpty(locMast)){
                return R.error("该库位不满足出库条件"+param.getTargetPoint());
                result = R.error("该库位不满足出库条件" + param.getTargetPoint());
                return result;
            }
            return openService.taskCreate(param);
            result = openService.taskCreate(param);
            return result;
        }catch (Exception e){
            log.error("任务下发异常" + e);
            return R.error();
        }finally {
            apiLogService.save("wms任务下发接口"
                    ,request.getRemoteAddr()+request.getRequestURI()
                    ,""
                    ,request.getRemoteAddr()
                    ,JSON.toJSONString(param)
                    ,JSON.toJSONString(result)
                    ,true
            );
        }
    }