From 8b1a8d886a7b740e2477fcc23a94d3cb9a2b383f Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Fri, 22 Nov 2024 17:18:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thrsys/impl/ThrInvOrderServiceImpl.java | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java b/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java index 9cc423d63..7e74c8aad 100644 --- a/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java @@ -20,6 +20,7 @@ import com.glxp.api.dao.basic.UdiRelevanceDao; import com.glxp.api.dao.inout.IoCodeTempDao; import com.glxp.api.dao.thrsys.ThrInvOrderDetailMapper; import com.glxp.api.dao.thrsys.ThrInvOrderMapper; +import com.glxp.api.entity.auth.InvWarehouseEntity; import com.glxp.api.entity.auth.WarehouseUserEntity; import com.glxp.api.entity.basic.*; import com.glxp.api.entity.inout.IoCodeTempEntity; @@ -40,6 +41,7 @@ import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.res.inv.ThrInvResultResponse; import com.glxp.api.res.thrsys.ThrInvOrderResponse; import com.glxp.api.service.auth.CustomerService; +import com.glxp.api.service.auth.InvWarehouseService; import com.glxp.api.service.auth.WarehouseUserService; import com.glxp.api.service.basic.IBasicBussinessTypeService; import com.glxp.api.service.basic.UdiRelevanceService; @@ -422,6 +424,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { @Resource WarehouseUserService warehouseUserService; + @Resource + InvWarehouseService warehouseService; /** * 普耗收费出入库明细单据生成 @@ -472,6 +476,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { ioOrderEntity.setFromCorp(fromCorp); ioOrderEntity.setInvCode(thrInvOrder.getInvCode()); ioOrderEntity.setDeptCode(thrInvOrder.getDeptCode()); + ioOrderEntity.setFromInvCode(thrInvOrder.getInvCode()); + ioOrderEntity.setFromDeptCode(thrInvOrder.getDeptCode()); ioOrderEntity.setAction(generateOrderRequest.getAction()); ioOrderEntity.setFromType(ConstantStatus.FROM_WEBNEW);//网页新增 ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);//草稿 @@ -1234,6 +1240,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { ioOrderEntity.setFromCorp(thrInvOrder.getFromCorp()); ioOrderEntity.setInvCode(thrInvOrder.getInvCode()); ioOrderEntity.setDeptCode(thrInvOrder.getDeptCode()); + ioOrderEntity.setFromInvCode(thrInvOrder.getInvCode()); + ioOrderEntity.setFromDeptCode(thrInvOrder.getDeptCode()); ioOrderEntity.setAction(thrInvOrder.getBillType()); ioOrderEntity.setFromType(ConstantStatus.FROM_WEBNEW);//网页新增 @@ -1551,8 +1559,19 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { thrInvOrder.setChargeTime(DateUtil.formatDate(DateUtil.parse(thrInvResultResponse.getChargeTime(), "yyyyMMdd"))); thrInvOrder.setChargeUser(thrInvResultResponse.getChargeUser()); - ThrSystemBusApiEntity thrSystemBusApiEntity = thrSystemBusApiService.getOne(new QueryWrapper().eq("code", thrInvOrder.getBillType()).last("limit 1")); - if (thrSystemBusApiEntity != null) thrInvOrder.setFromCorp(thrSystemBusApiEntity.getFromCorp()); +// ThrSystemBusApiEntity thrSystemBusApiEntity = thrSystemBusApiService.getOne(new QueryWrapper().eq("code", thrInvOrder.getBillType()).last("limit 1")); +// if (thrSystemBusApiEntity != null) thrInvOrder.setFromCorp(thrSystemBusApiEntity.getFromCorp()); + + String fromCorp1 = thrInvResultResponse.getInvCode(); + List list = warehouseService.list(new LambdaQueryWrapper().eq(InvWarehouseEntity::getThirdId, fromCorp1)); + if (CollUtil.isNotEmpty(list)) { + String code = list.get(0).getCode(); + String parentId = list.get(0).getParentId(); + thrInvOrder.setFromCorp(code); + thrInvOrder.setInvCode(code); + thrInvOrder.setDeptCode(parentId); + } + thrInvOrder.setCreateUser("外部系统下载"); }