From 6bc52fcf2676a297e65ea547707954a2e8a28a32 Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Wed, 24 Dec 2025 10:26:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=80=80=E8=B4=A7=E5=8D=95-?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=9C=8D=E5=8A=A1=E6=96=B9=E6=B3=95=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thd/service/impl/ThdServiceImpl.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/thd/service/impl/ThdServiceImpl.java b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/thd/service/impl/ThdServiceImpl.java index 1e9e0db7..e2f481d7 100644 --- a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/thd/service/impl/ThdServiceImpl.java +++ b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/thd/service/impl/ThdServiceImpl.java @@ -31,6 +31,7 @@ import com.nu.modules.warehouseMaterialInfo.entity.BlWarehouseMaterialInfo; import com.nu.modules.warehouseMaterialInfo.service.IBlWarehouseMaterialInfoService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.compress.utils.Lists; +import org.apache.commons.lang.StringUtils; import org.apache.shiro.SecurityUtils; import org.jeecg.common.system.api.ISysBaseAPI; import org.jeecg.common.system.vo.LoginUser; @@ -138,7 +139,7 @@ public class ThdServiceImpl implements ITuiHuoApi { LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity(); orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明 - orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号) + orderEntity.setId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号) orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id invoicingOrdersApi.beginDyThOrder(orderEntity); @@ -539,15 +540,25 @@ public class ThdServiceImpl implements ITuiHuoApi { @Override @Transactional(rollbackFor = Exception.class) public boolean finishDirectiveServe(InvoicingThdMainEntity dto) { + InvoicingOrdersEntity p_ = new InvoicingOrdersEntity(); + p_.setId(dto.getId()); + InvoicingOrdersEntity v_ = invoicingOrdersApi.getDyThOrderInfo(p_); + if(v_ == null || StringUtils.isBlank(v_.getPoolId())){ + return false; + } + + String mainId = v_.getPoolId();//退货单id //查询当前状态 QueryWrapper qw = new QueryWrapper<>(); - qw.eq("id", dto.getId()); + qw.eq("id", mainId); NuInvoicingThdMain main = thdMainMapper.selectOne(qw); LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); +// if(main == null || "") + InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity(); orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明 - orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号) + orderEntity.setId(dto.getId());//退货指令的id orderEntity.setBizId(main.getThdNo()); orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id invoicingOrdersApi.finishDyThOrder(orderEntity);