自动化立体仓库 - WCS系统
野心家
2024-04-09 d3691a8120a37d91892981133e23901b1c209e79
src/main/java/com/zy/asrs/controller/TaskWrkController.java
@@ -212,6 +212,7 @@
            locMast.setBarcode(taskWrk.getBarcode());
        }
        String response="";
        try{
            HashMap<String, Object> headParam = new HashMap<>();
            headParam.put("taskNo",taskWrk.getTaskNo());
@@ -219,7 +220,7 @@
            headParam.put("ioType",taskWrk.getIoType());
            headParam.put("barcode",taskWrk.getBarcode());
//            headParam.put("reportTime",new Date());
            String response;
            log.info("wcs手动完成任务上报wms={}", taskWrk);
            response = new HttpHandler.Builder()
                    // .setHeaders(headParam)
                    .setUri(wmsUrl)
@@ -227,7 +228,7 @@
                    .setJson(JSON.toJSONString(headParam))
                    .build()
                    .doPost();
            log.info("wcs手动完成任务上报wms", taskWrk);
            JSONObject jsonObject = JSON.parseObject(response);
            apiLogService.save("wcs手动完成任务上报wms"
                    ,wmsUrl+taskStatusFeedbackPath
@@ -238,8 +239,8 @@
                    ,true
            );
        }catch (Exception e){
            log.error("wcs手动完成任务上报wms失败", taskWrk);
            throw new CoolException("wcs派发入库任务上报wms失败");
            log.error("wcs手动完成任务上报wms失{},返回值={}", taskWrk,response);
            throw new CoolException(e);
        }
        locMastService.updateById(locMast);
        taskWrk.setStatus(7);//手动完成任务
@@ -266,6 +267,7 @@
        }catch (Exception e){
            taskWrk.setModiUser(9999L);//操作员
        }
        String response="";
        try{
            HashMap<String, Object> headParam = new HashMap<>();
            headParam.put("taskNo",taskWrk.getTaskNo());
@@ -273,7 +275,8 @@
            headParam.put("ioType",taskWrk.getIoType());
            headParam.put("barcode",taskWrk.getBarcode());
//            headParam.put("reportTime",new Date());
            String response;
            log.info("wcs手动取消任务上报wm={}", taskWrk);
            response = new HttpHandler.Builder()
                    // .setHeaders(headParam)
                    .setUri(wmsUrl)
@@ -281,7 +284,6 @@
                    .setJson(JSON.toJSONString(headParam))
                    .build()
                    .doPost();
            log.info("wcs手动取消任务上报wms", taskWrk);
            JSONObject jsonObject = JSON.parseObject(response);
            apiLogService.save("wcs手动取消任务上报wms"
                    ,wmsUrl+taskStatusFeedbackPath
@@ -292,8 +294,8 @@
                    ,true
            );
        }catch (Exception e){
            log.error("wcs手动取消任务上报wms失败", taskWrk);
            throw new CoolException("wcs派发入库任务上报wms失败");
            log.error("wcs手动取消任务上报wms失败={},返回值={}", taskWrk,response);
            throw new CoolException(e);
        }
        taskWrk.setCompleteTime(now);//完结时间
        taskWrkService.updateById(taskWrk);