*
lsh
2025-05-22 6c679ea7d1acdd67c7c2d4c7302b6420bd3fbcd5
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1173,43 +1173,43 @@
                    taskWrkService.updateById(taskWrk);
                    try {
                        HashMap<String, Object> headParam = new HashMap<>();
                        headParam.put("taskNo",taskWrk.getTaskNo());
                        headParam.put("taskStatus",taskWrk.getStatusWms());
                        headParam.put("ioType",taskWrk.getIoTypeWms());
                        headParam.put("barCode",taskWrk.getBarcode());
                        headParam.put("reportTime", LocalDateTime.now());
                        headParam.put("weight",taskWrk.getScWeight().doubleValue());
                        String response;
                        log.error("wcs完结任务上报wms==》", headParam);
                        response = new HttpHandler.Builder()
                                // .setHeaders(headParam)
                                .setUri(wmsUrl)
                                .setPath(taskStatusFeedbackPath)
                                .setJson(JSON.toJSONString(headParam))
                                .build()
                                .doPost();
                        log.error("wcs完结任务上报wms==》", response);
//                        JSONObject jsonObject = JSON.parseObject(response);
//                        log.error("wcs完结任务上报wms==》", jsonObject);
                        apiLogService.save("wcs派发入库任务上报wms"
                                , wmsUrl + taskStatusFeedbackPath
                                , null
                                , "127.0.0.1"
                                , JSON.toJSONString(headParam)
                                , response
                                , true
                        );
                    } catch (Exception e) {
                        log.error("wcs完结任务上报wms失败", taskWrk);
                        log.error("wcs完结任务上报wms失败,报错信息:", e);
//                        throw new CoolException("wcs派发入库任务上报wms失败");
                    }
//                    try {
//                        HashMap<String, Object> headParam = new HashMap<>();
//                        headParam.put("taskNo",taskWrk.getTaskNo());
//                        headParam.put("taskStatus",taskWrk.getStatusWms());
//                        headParam.put("ioType",taskWrk.getIoTypeWms());
//                        headParam.put("barCode",taskWrk.getBarcode());
//                        headParam.put("reportTime", LocalDateTime.now());
//                        headParam.put("weight",taskWrk.getScWeight().doubleValue());
//
//                        String response;
//                        log.error("wcs完结任务上报wms==》", headParam);
//
//                        response = new HttpHandler.Builder()
//                                // .setHeaders(headParam)
//                                .setUri(wmsUrl)
//                                .setPath(taskStatusFeedbackPath)
//                                .setJson(JSON.toJSONString(headParam))
//                                .build()
//                                .doPost();
//                        log.error("wcs完结任务上报wms==》", response);
//
////                        JSONObject jsonObject = JSON.parseObject(response);
////                        log.error("wcs完结任务上报wms==》", jsonObject);
//
//                        apiLogService.save("wcs派发入库任务上报wms"
//                                , wmsUrl + taskStatusFeedbackPath
//                                , null
//                                , "127.0.0.1"
//                                , JSON.toJSONString(headParam)
//                                , response
//                                , true
//                        );
//                    } catch (Exception e) {
//                        log.error("wcs完结任务上报wms失败", taskWrk);
//                        log.error("wcs完结任务上报wms失败,报错信息:", e);
////                        throw new CoolException("wcs派发入库任务上报wms失败");
//                    }
                }
            }