From 1f4e7d0f73a73e7350cf5a1df279d5f30904c5d5 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期三, 06 十二月 2023 08:41:32 +0800 Subject: [PATCH] bug --- server/src/main/java/doumeemes/service/business/impl/WTransferServiceImpl.java | 28 +++++++++++++++++++++------- 1 files changed, 21 insertions(+), 7 deletions(-) diff --git a/server/src/main/java/doumeemes/service/business/impl/WTransferServiceImpl.java b/server/src/main/java/doumeemes/service/business/impl/WTransferServiceImpl.java index 7c6e23d..51661fd 100644 --- a/server/src/main/java/doumeemes/service/business/impl/WTransferServiceImpl.java +++ b/server/src/main/java/doumeemes/service/business/impl/WTransferServiceImpl.java @@ -323,9 +323,9 @@ if(!Objects.isNull(i.getInWarehouseId())){ sub.append(i.getInWarehouseId()); } -// if(!Objects.isNull(i.getOutLocationId())){ -// sub.append(i.getOutLocationId()); -// } + if(!Objects.isNull(i.getOutLocationId())){ + sub.append(i.getOutLocationId()); + } // if(!Objects.isNull(i.getInLocationId())){ // sub.append(i.getInLocationId()); // } @@ -416,6 +416,7 @@ wTransferDetail.setTransferId(wTransfer.getId()); wTransferDetail.setOutDepartId(wTransfer.getOutDepartId()); wTransferDetail.setOutWarehouseId(wTransfer.getOutWarehouseId()); + wTransferDetail.setOutLocationId(w.getOutLocationId()); wTransferDetail.setInDepartId(wTransfer.getInDepartId()); wTransferDetail.setInWarehouseId(wTransfer.getInWarehouseId()); wTransferDetail.setInLcoationId(w.getInLocationId()); @@ -469,6 +470,7 @@ throw new BusinessException(ResponseStatus.OBJECT_EMP.getCode(), "鏈煡璇㈠埌杞簱鍗曠被鍨嬩俊鎭��"+wTransfer.getType()+"銆�"); } + sendOutNotice(companyUser.getId(),wTransfer.getId(),wTransfer.getCode(),notices_type_transfer,Constants.getNoticeUrl(loginUserInfo.getCompany(),Constants.DINGDING_NOTICE_URL.out)); //璁板綍鎿嶄綔璁板綍 @@ -480,6 +482,7 @@ public void sendOutNotice(Integer userId ,Integer billId , String billCode ,Constants.Notices_Type_Transfer notices_type_transfer,String url){ + //鍙戦�侀�氱煡 Notices notices = new Notices(); notices.setCompanyUserId(userId); @@ -487,10 +490,13 @@ notices.setContent("銆�"+billCode+"銆�"+ notices_type_transfer.getContent().replace("{optType}","鍑哄簱")); notices.setTitle(notices_type_transfer.getTitle()); notices.setObjId(billId); - notices.setUrl(url.replace("{id}",billId.toString())); + if(!Objects.isNull(url)){ + notices.setUrl(url.replace("{id}",billId.toString())); + } noticesExtService.sendNotice(notices); } public void sendOutNotice(LoginUserInfo user,Integer userId ,Integer billId , String billCode ,Constants.Notices_Type_Transfer notices_type_transfer,String url){ + //鍙戦�侀�氱煡 Notices notices = new Notices(); notices.setCompanyUserId(userId); @@ -498,11 +504,14 @@ notices.setContent("銆�"+billCode+"銆�"+ notices_type_transfer.getContent().replace("{optType}","鍑哄簱")); notices.setTitle(notices_type_transfer.getTitle()); notices.setObjId(billId); - notices.setUrl(url.replace("{id}",billId.toString())); + if(!Objects.isNull(url)){ + notices.setUrl(url.replace("{id}",billId.toString())); + } noticesExtService.sendNoticeNologin(notices,user); } public void sendInNotice(Integer userId ,Integer billId , String billCode ,Constants.Notices_Type_Transfer notices_type_transfer,String url){ + //鍙戦�侀�氱煡 Notices notices = new Notices(); notices.setCompanyUserId(userId); @@ -510,7 +519,9 @@ notices.setContent("銆�"+billCode+"銆�"+ notices_type_transfer.getContent().replace("{optType}","鍏ュ簱")); notices.setTitle(notices_type_transfer.getTitle()); notices.setObjId(billId); - notices.setUrl(url.replace("{id}",billId.toString())); + if(!Objects.isNull(url)){ + notices.setUrl(url.replace("{id}",billId.toString())); + } noticesExtService.sendNotice(notices); } @@ -883,6 +894,9 @@ queryWStockDto.setQualityType(wTransferDetail.getQualityType()); if(!Objects.isNull(wTransferDetail.getProcedureId())){ queryWStockDto.setProcedureId(wTransferDetail.getProcedureId()); + } + if(!Objects.isNull(wTransferDetail.getOutLocationId())){ + queryWStockDto.setLocationId(wTransferDetail.getOutLocationId()); } //鑾峰彇浠撳簱淇℃伅 鏍规嵁 Warehouse warehouse = warehouseMapper.selectById(wTransferDetail.getOutWarehouseId()); @@ -2290,7 +2304,7 @@ wOutboundDetail.setOutboundId(wOutbound.getId()); wOutboundDetail.setMaterialId(wTransferDetail.getMaterialId()); wOutboundDetail.setUnitId(wTransferDetail.getUnitId()); - wOutboundDetail.setBatch(wTransferDetail.getBatch()); + wOutboundDetail.setBatch(wStock.getBatch()); wOutboundDetail.setWarehouseId(wOutbound.getWarehouseId()); wOutboundDetail.setLocationId(wStock.getLocationId()); wOutboundDetail.setNum(wTransferDetail.getOutActnum()); -- Gitblit v1.9.3