#
Junjie
2025-05-23 ce691e5335eb5c427f68d37e98bb29c6566804cc
#
1个文件已修改
47 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -695,37 +695,24 @@
                    if (taskWrkMapper.updateById(taskWrk) == 0) {
                        log.error("修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,工作号={}", taskWrk.getWrkNo());
                    }
                    String response = "";
                    Boolean bool=false;
                    HashMap<String, Object> headParam = new HashMap<>();
                    headParam.put("TaskNo", taskWrk.getTaskNo());
                    try {
                        response = new HttpHandler.Builder()
                                // .setHeaders(headParam)
                                .setUri(wmsUrl)
                                .setPath(taskExecCallback)
                                .setJson(JSON.toJSONString(headParam))
                                .build()
                                .doPost();
                        JSONObject jsonObject = JSON.parseObject(response);
                        if(jsonObject.get("ReturnStatus").equals(0)){
                            bool = true;
                            taskWrk.setStatus(2);
                            taskWrkMapper.updateById(taskWrk);
                        }
                    } catch (Exception e) {
                        log.error("wcs派发移库库任务上报wms失败", taskWrk);
//                        throw new CoolException("wcs派发移库库任务上报wms失败");
                    }finally {
                        apiLogService.save("wcs派发移库任务上报wms"
                                , wmsUrl + taskExecCallback
                                , null
                                , "127.0.0.1"
                                , JSON.toJSONString(headParam)
                                , response
                                , bool
                        );
                    //上报-移库任务开始时,WCS回调WMS
                    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:ss:mm");
                    HashMap<String, Object> hashMap = new HashMap<>();
                    hashMap.put("taskNo", taskWrk.getTaskNo());
                    hashMap.put("status", TaskStatusType.DISTRIBUTE.id);
                    hashMap.put("ioType", 3);
                    hashMap.put("barcode", taskWrk.getBarcode());
                    hashMap.put("reportTime", format.format(new Date()));
                    NotifyCustomDataDto customDataDto = new NotifyCustomDataDto();
                    customDataDto.setUri(wmsUrl);
                    customDataDto.setPath(taskExecCallback);
                    customDataDto.setData(JSON.toJSONString(hashMap));
                    boolean notifyResult = notifyUtils.notify("task", 1, String.valueOf(taskWrk.getWrkNo()), taskWrk.getTaskNo(), NotifyMsgType.TASK_START, JSON.toJSONString(taskWrk), true, customDataDto);
                    if(notifyResult) {
                        taskWrk.setStatus(2);
                        taskWrkService.updateById(taskWrk);
                    }
                }