huangfuli 3 anni fa
parent
commit
fa71fa1587

+ 4 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/PaymentManagementController.java

@@ -191,10 +191,10 @@ public class PaymentManagementController {
                     tmp.setAmountIngPayable(payable/2);
                     tmp.setOddNumbers(number.substring(4) + "1");
                     if(tmp.getGrossWeight() == null){
-                        tmp.setGrossWeight(Float.valueOf(" "));
+                        tmp.setGrossWeight(Float.parseFloat(" "));
                     }
                     if(tmp.getTare() == null){
-                        tmp.setTare(Float.valueOf(" "));
+                        tmp.setTare(Float.parseFloat(" "));
                     }
                     tmp.setRemarkss("车号:" + tmp.getCarNo() + "毛:" + tmp.getGrossWeight() + " 皮:" + tmp.getTare() + " 净:" + tmp.getNetWeight() + " 纯:" + weight + " 应付:" + payable + " 单号:" + m.replaceAll("").trim() + " ,★☆性质:贸易粮 形态:玉米堆(1)"
                     );
@@ -209,10 +209,10 @@ public class PaymentManagementController {
                     tmp1.setAmountIngPayable(payable - tmp.getAmountIngPayable());
                     tmp1.setOddNumbers(number.substring(4) + "2");
                     if(tmp1.getGrossWeight() == null){
-                        tmp1.setGrossWeight(Float.valueOf(" "));
+                        tmp1.setGrossWeight(Float.parseFloat(" "));
                     }
                     if(tmp1.getTare() == null){
-                        tmp1.setTare(Float.valueOf(" "));
+                        tmp1.setTare(Float.parseFloat(" "));
                     }
                     if(tmp1.getGrade() == null){
                         tmp1.setGrade(" ");

+ 6 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WeighingManagementServiceImpl.java

@@ -304,8 +304,13 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
                     .eq("relation_id", weighingManagement.getRelationId())
                     .eq("comp_id", weighingManagement.getCompId()));
             if (paymentManagement==null){
-                //删除质检管理信息
+                //删除关联的质检信息
+                QualityInspectionManagement qualityInspectionManagement = qualityInspectionManagementService.selectOne(new EntityWrapper<QualityInspectionManagement>()
+                        .eq("relation_id", weighingManagement.getRelationId())
+                        .eq("comp_id", weighingManagement.getCompId()));
+                //删除检斤管理信息,质检管理信息
                 this.deleteById(weighingManagement.getId());
+                qualityInspectionManagementService.deleteById(qualityInspectionManagement.getId());
             }
             else{
                 throw new YException(YExceptionEnum.PAYMENT_NOT_DELETED_ERROR);