bug
jiangping
2023-11-07 64b432916af9c9218ab3f3eca614e26c542142ae
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());