From 1f27b82b5de1bfb7767c2fc0b8bbc37eb3acfa77 Mon Sep 17 00:00:00 2001 From: ZY <zc857179121@qq.com> Date: 星期二, 13 五月 2025 18:01:19 +0800 Subject: [PATCH] 单据对接 --- src/main/java/com/zy/nc/task/handler/PlanOrderHandler.java | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/zy/nc/task/handler/PlanOrderHandler.java b/src/main/java/com/zy/nc/task/handler/PlanOrderHandler.java index 3f2c0c3..ccca2e0 100644 --- a/src/main/java/com/zy/nc/task/handler/PlanOrderHandler.java +++ b/src/main/java/com/zy/nc/task/handler/PlanOrderHandler.java @@ -2,7 +2,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; -import com.zy.asrs.entity.param.OpenOrderPakinParam; +import com.zy.asrs.entity.param.OpenOrderPakoutParam; import com.zy.asrs.service.OpenService; import com.zy.asrs.task.AbstractHandler; import com.zy.asrs.task.core.ReturnT; @@ -39,8 +39,8 @@ public ReturnT<String> start1() { List<String> Ids = nccSaleXsfhmxWmsService.selectXsfh(); for (String id : Ids) { - List<NccSaleXsfhmxWms> wmsFlag = nccSaleXsfhmxWmsService.selectList(new EntityWrapper<NccSaleXsfhmxWms>().eq("cdeliveryid", id).ne("wms_flag", 1).eq("fstatusflag", 2)); - OpenOrderPakinParam param = new OpenOrderPakinParam(); + List<NccSaleXsfhmxWms> wmsFlag = nccSaleXsfhmxWmsService.selectList(new EntityWrapper<NccSaleXsfhmxWms>().eq("vbillcode", id).ne("wms_flag", 1).eq("fstatusflag", 2)); + OpenOrderPakoutParam param = new OpenOrderPakoutParam(); param.setOrderType("閿�鍞彂璐�"); DetlDto detlDto; List<DetlDto> orderDetails = new ArrayList<>(); @@ -51,14 +51,16 @@ detlDto.setMatnr(nccSaleXsfhmxWms.getWlbm()); detlDto.setAnfme(nccSaleXsfhmxWms.getNastnum()); detlDto.setLineNumber(i); - nccSaleXsfhmxWms.setWmsFlag(1); + detlDto.setRemark(JSONObject.toJSONString(nccSaleXsfhmxWms)); orderDetails.add(detlDto); log.info("NccSaleXsfhmxWms鏁版嵁:{}", JSONObject.toJSON(nccSaleXsfhmxWms)); i++; } + nccSaleXsfhmxWms.setWmsFlag(1); } + param.setOrderNo(id); param.setOrderDetails(orderDetails); - openService.pakinOrderCreate(param); + openService.pakoutOrderCreate(param); nccSaleXsfhmxWmsService.updateBatchById(wmsFlag); } return SUCCESS; @@ -72,12 +74,12 @@ public ReturnT<String> start2() { List<String> strings = nccScZkmxbWmsService.selectZk(); for (String string : strings) { - OpenOrderPakinParam param = new OpenOrderPakinParam(); + OpenOrderPakoutParam param = new OpenOrderPakoutParam(); param.setOrderType("杞簱"); DetlDto detlDto; List<DetlDto> orderDetails = new ArrayList<>(); long i = 1; - List<NccScZkmxbWms> wmsFlag = nccScZkmxbWmsService.selectList(new EntityWrapper<NccScZkmxbWms>().eq("cdeliveryid", string).ne("wms_flag", 1)); + List<NccScZkmxbWms> wmsFlag = nccScZkmxbWmsService.selectList(new EntityWrapper<NccScZkmxbWms>().eq("vbillcode", string).ne("wms_flag", 1)); for (NccScZkmxbWms nccScZkmxbWms : wmsFlag) { log.info("NccScZkmxbWms鏁版嵁:{}", JSONObject.toJSON(nccScZkmxbWms)); if (nccScZkmxbWms.getDjzt() == 2 && nccScZkmxbWms.getBdr() == 0 && nccScZkmxbWms.getDr() == 0) { @@ -86,13 +88,14 @@ detlDto.setAnfme(nccScZkmxbWms.getYingzzsl()); detlDto.setBatch(nccScZkmxbWms.getVbatchcode()); detlDto.setLineNumber(i); - nccScZkmxbWms.setWmsFlag(1); orderDetails.add(detlDto); i++; } + nccScZkmxbWms.setWmsFlag(1); } + param.setOrderNo(string); param.setOrderDetails(orderDetails); - openService.pakinOrderCreate(param); + openService.pakoutOrderCreate(param); nccScZkmxbWmsService.updateBatchById(wmsFlag); } return SUCCESS; -- Gitblit v1.9.1