فهرست منبع

订单同步bug修改

24282 1 سال پیش
والد
کامیت
ab2f1e20f0

+ 6 - 6
sd-framework/src/main/java/com/sd/framework/controller/SdDictController.java

@@ -3,14 +3,14 @@ package com.sd.framework.controller;
 import com.fjhx.tenant.entity.dict.po.DictCommonData;
 import com.fjhx.tenant.service.dict.DictCommonDataService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
 import java.util.Map;
-import java.util.function.Function;
 import java.util.stream.Collectors;
 
-@Controller
+@RestController
 public class SdDictController {
 
     @Autowired
@@ -20,9 +20,9 @@ public class SdDictController {
      * 申购单分页
      */
     @PostMapping("/allDictMap")
-    public Map<String, DictCommonData> allDictMap() {
-        return dictCommonDataService.list(q -> q.orderByAsc(DictCommonData::getSort)).stream()
-                .collect(Collectors.toMap(DictCommonData::getDictCode, Function.identity()));
+    public Map<String, List<DictCommonData>> allDictMap() {
+        return dictCommonDataService.list(q -> q.orderByAsc(DictCommonData::getSort))
+                .stream().collect(Collectors.groupingBy(DictCommonData::getDictCode));
     }
 
 }

+ 5 - 1
sd-wln/src/main/java/com/sd/wln/service/impl/WlnOrderServiceImpl.java

@@ -359,7 +359,10 @@ public class WlnOrderServiceImpl implements WlnOrderService {
         }
 
         // 部门id、加工计费标准id map
-        Map<Long, Long> departmentIdPriceBillingStandardIdMap = departmentMap.values().stream()
+        Map<Long, Long> departmentIdPriceBillingStandardIdMap = departmentMap.values()
+                .stream()
+                .filter(ObjectUtil::isNotNull)
+                .filter(item -> ObjectUtil.isNotNull(item.getPriceBillingStandardId()))
                 .collect(Collectors.toMap(BaseIdPo::getId, Department::getPriceBillingStandardId));
 
         // 加工计费标准id 报价规则列表 map
@@ -375,6 +378,7 @@ public class WlnOrderServiceImpl implements WlnOrderService {
 
         for (OrderInfo orderInfo : orderList) {
 
+            orderInfo.setTotalAmount(BigDecimal.ZERO);
             orderInfo.setProductTotalAmount(BigDecimal.ZERO);
             orderInfo.setCustomProcessingFee(BigDecimal.ZERO);
             orderInfo.setLssueFee(BigDecimal.ZERO);