소스 검색

订单认领表缺失客户经理ID修复

wucl 1 개월 전
부모
커밋
4c6f32191f

+ 1 - 0
dao/src/main/resources/mapper/PaymentCollectionMapper.xml

@@ -188,6 +188,7 @@
     <sql id="itemPaymentList">
         SELECT
         i.id,
+        i.belong_to,
         i.business_no,
         i.oa_no,
         i.NAME,

+ 1 - 1
service/src/main/java/com/dayou/service/impl/FinanceClaimServiceImpl.java

@@ -322,7 +322,7 @@ public class FinanceClaimServiceImpl extends ServiceImpl<FinanceClaimMapper, Fin
                     .eq(BaseEntity::getDeleted, Boolean.FALSE)
                     .eq(OrderFund::getBusinessType,PERSONAL_BUSINESS.name()));
             if (orderFund==null){
-                Personal personal = personalService.getOne(new LambdaQueryWrapper<Personal>().select(BaseEntity::getId, Personal::getLocation).eq(Personal::getOrderId, x.getOrderId()).eq(BaseEntity::getDeleted, Boolean.FALSE));
+                Personal personal = personalService.getOne(new LambdaQueryWrapper<Personal>().select(BaseEntity::getId, Personal::getLocation,Personal::getClientManagerId).eq(Personal::getOrderId, x.getOrderId()).eq(BaseEntity::getDeleted, Boolean.FALSE));
                 if (personal!=null){
                     orderFund = new OrderFund();
                     orderFund.setOrderId(x.getOrderId());

+ 4 - 1
service/src/main/java/com/dayou/service/impl/FinanceInvoiceServiceImpl.java

@@ -123,11 +123,14 @@ public class FinanceInvoiceServiceImpl extends ServiceImpl<FinanceInvoiceMapper,
             orderFund.setOrderName(item.getName());
             String oaNo = item.getOaNo();
             if (StrUtil.isBlank(oaNo)){
-                ErrorCode.throwBusinessException(ErrorCode.CUSTOM_ERROR,"项目编号(大友OA编号不能为空)");
+                //ErrorCode.throwBusinessException(ErrorCode.CUSTOM_ERROR,"项目编号(大友OA编号不能为空)");
+                //如果没有大友OA流水号就用事业部流水号
+                oaNo = item.getBusinessNo();
             }
             orderFund.setOrderId(oaNo);
             orderFund.setBusinessId(item.getId());
             orderFund.setBusinessType(ITEM_BUSINESS.name());
+            orderFund.setClientManagerId(item.getUserId());
             orderFundService.add(orderFund);
             dto.setOrderFundId(orderFund.getId());
         }

+ 1 - 0
service/src/main/java/com/dayou/service/impl/ItemServiceImpl.java

@@ -103,6 +103,7 @@ public class ItemServiceImpl extends ServiceImpl<ItemMapper, Item> implements II
         orderFund.setOrderId(itemDTO.getOaNo());
         orderFund.setBusinessId(itemDTO.getId());
         orderFund.setBusinessType(ITEM_BUSINESS.name());
+        orderFund.setClientManagerId(itemDTO.getUserId());
         orderFundService.add(orderFund);
         Set<Long> userIds = itemDTO.getUserIds();
         if (CollectionUtils.isNotEmpty(userIds)){

+ 1 - 1
service/src/main/java/com/dayou/service/impl/PaymentCollectionServiceImpl.java

@@ -118,7 +118,7 @@ public class PaymentCollectionServiceImpl extends ServiceImpl<PaymentCollectionM
             OrderFund orderFund = new OrderFund();
             orderFund.setShouldAmount(item.getAmount());
             orderFund.setOrderName(item.getName());
-            orderFund.setOrderId(item.getOaNo());
+            orderFund.setOrderId(item.getOaNo()==null?item.getBusinessNo():item.getOaNo());
             orderFund.setBusinessId(item.getId());
             orderFund.setBusinessType(ITEM_BUSINESS.name());
             orderFundService.add(orderFund);

+ 1 - 1
service/src/main/java/com/dayou/service/impl/ProductionOutWarehouseServiceImpl.java

@@ -98,7 +98,7 @@ public class ProductionOutWarehouseServiceImpl extends ServiceImpl<ProductionOut
             Long businessId = productionOutWarehouse.getBusinessId();
             BigDecimal shouldAmount = productionOutWarehouse.getShouldAmount();
             OrderFund xOrderFund = orderFundService.getOne(new LambdaQueryWrapper<OrderFund>().eq(OrderFund::getBusinessType, PERSONAL_BUSINESS.name()).eq(OrderFund::getBusinessId, businessId).eq(BaseEntity::getDeleted, Boolean.FALSE));
-            Personal personal = personalService.getOne(new LambdaQueryWrapper<Personal>().select(Personal::getOrderId, Personal::getLocation).eq(BaseEntity::getId, businessId).eq(BaseEntity::getDeleted, Boolean.FALSE));
+            Personal personal = personalService.getOne(new LambdaQueryWrapper<Personal>().select(Personal::getOrderId, Personal::getLocation,Personal::getClientManagerId).eq(BaseEntity::getId, businessId).eq(BaseEntity::getDeleted, Boolean.FALSE));
             if (xOrderFund==null){
                 OrderFund orderFund = new OrderFund();
                 orderFund.setBusinessType(PERSONAL_BUSINESS.name());