zxz 1 سال پیش
والد
کامیت
ba7eff97cc

+ 21 - 19
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehousingOrderServiceImpl.java

@@ -2747,25 +2747,27 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
 //                        dryWeight =dryWeight+((paymentManagementList.stream().mapToDouble(PaymentManagement::getPureWeight).sum())/ 1000) ;
                         //todo
                         for(PaymentManagement paymentManagement : paymentManagementList){
-                            List<QualityInspectionManagement> qualityInspectionManagementList=qualityInspectionManagementService.selectList
-                                    (new EntityWrapper<QualityInspectionManagement>().eq("quality_no",paymentManagement.getPaymentNo()));
-                            if (!CollectionUtils.isEmpty(qualityInspectionManagementList)){
-                                for (QualityInspectionManagement qualityInspectionManagement1 : qualityInspectionManagementList){
-                                    Double num = 0d;
-                                    if(Double.valueOf(qualityInspectionManagement1.getWaterContent()) >= 30){
-                                        num = (100-(Double.valueOf(qualityInspectionManagement1.getWaterContent()) - 14) * 1.3) / 100;
-                                    }
-                                    else if(Double.valueOf(qualityInspectionManagement1.getWaterContent())<= 15){
-                                        num = (100-(Double.valueOf(qualityInspectionManagement1.getWaterContent()) - 14) * 1.15) / 100;
-                                    }
-                                    else{
-                                        num = (100-(Double.valueOf(qualityInspectionManagement1.getWaterContent()) - 14) *
-                                                (1.3 - (30 - Double.valueOf(qualityInspectionManagement1.getWaterContent()))*0.01)) /100;
-                                    }
-                                    DecimalFormat df = new DecimalFormat(".000");
-                                    dryWeight = Double.valueOf(df.format(dryWeight + (num * warehousingOrder1.getSurplusWeight())));
-                                }
-                            }
+//                            List<QualityInspectionManagement> qualityInspectionManagementList=qualityInspectionManagementService.selectList
+//                                    (new EntityWrapper<QualityInspectionManagement>().eq("relation_id",paymentManagement.getRelationId()));
+//                            if (!CollectionUtils.isEmpty(qualityInspectionManagementList)){
+//                                for (QualityInspectionManagement qualityInspectionManagement1 : qualityInspectionManagementList){
+//                                    Double num = 0d;
+//                                    if(Double.valueOf(qualityInspectionManagement1.getWaterContent()) >= 30){
+//                                        num = (100-(Double.valueOf(qualityInspectionManagement1.getWaterContent()) - 14) * 1.3) / 100;
+//                                    }
+//                                    else if(Double.valueOf(qualityInspectionManagement1.getWaterContent())<= 15){
+//                                        num = (100-(Double.valueOf(qualityInspectionManagement1.getWaterContent()) - 14) * 1.15) / 100;
+//                                    }
+//                                    else{
+//                                        num = (100-(Double.valueOf(qualityInspectionManagement1.getWaterContent()) - 14) *
+//                                                (1.3 - (30 - Double.valueOf(qualityInspectionManagement1.getWaterContent()))*0.01)) /100;
+//                                    }
+//                                    DecimalFormat df = new DecimalFormat(".000");
+//                                    dryWeight = Double.valueOf(df.format(dryWeight + (num * warehousingOrder1.getSurplusWeight())));
+//                                }
+                                DecimalFormat df = new DecimalFormat(".000");
+                                dryWeight = Double.valueOf(df.format(dryWeight + paymentManagement.getPureWeight()/1000));
+//                            }
                         }
                     }
                 }