Browse Source

完善代码

yuansh 3 tháng trước cách đây
mục cha
commit
3e12dcd9ce

+ 9 - 1
srm-module-code/src/main/java/org/jeecg/modules/purCode/controller/PurInquiryFormController.java

@@ -271,15 +271,23 @@ public class PurInquiryFormController {
                 }
 
             }
+
+            Map<String,String> supplierMap = new HashMap<>();
             for (PurInquiryForm o : list) {
 
+                String supplier = o.getInquirySuppiler();
                 List<PurInquiryFormProduct> productList = purInquiryFormProductService.selectByMainId(o.getId());
 
                 for (PurInquiryFormProduct p : productList) {
                     String proId = p.getProductId();
-                    if (map.containsKey(proId)) {
+
+                    String mapStr = supplierMap.get(proId);
+
+                    if (map.containsKey(proId) && !mapStr.equals(supplier)) {
                         continue;
                     }
+                    supplierMap.put(proId,supplier);
+
                     map.put(proId, proId);
                     p.setHeadCode(o.getBillCode());
                     p.setHeadCodes(headCodes);