huangfuli hace 3 años
padre
commit
89f77bd9dd

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

@@ -190,8 +190,17 @@ public class PaymentManagementController {
                     tmp.setPureWeight(weight/2);
                     tmp.setAmountIngPayable(payable/2);
                     tmp.setOddNumbers(number.substring(4) + "1");
+                    if(tmp.getGrossWeight() == null){
+                        tmp.setGrossWeight(Float.valueOf(" "));
+                    }
+                    if(tmp.getTare() == null){
+                        tmp.setTare(Float.valueOf(" "));
+                    }
                     tmp.setRemarkss("车号:" + tmp.getCarNo() + "毛:" + tmp.getGrossWeight() + " 皮:" + tmp.getTare() + " 净:" + tmp.getNetWeight() + " 纯:" + weight + " 应付:" + payable + " 单号:" + m.replaceAll("").trim() + " ,★☆性质:贸易粮 形态:玉米堆(1)"
                     );
+                    if(tmp.getGrade() == null){
+                        tmp.setGrade(" ");
+                    }
                     list1.add(tmp);
                     //第二张发票
                     PaymentManagement tmp1 = new PaymentManagement();
@@ -199,6 +208,15 @@ public class PaymentManagementController {
                     tmp1.setPureWeight(weight - tmp.getPureWeight());
                     tmp1.setAmountIngPayable(payable - tmp.getAmountIngPayable());
                     tmp1.setOddNumbers(number.substring(4) + "2");
+                    if(tmp1.getGrossWeight() == null){
+                        tmp1.setGrossWeight(Float.valueOf(" "));
+                    }
+                    if(tmp1.getTare() == null){
+                        tmp1.setTare(Float.valueOf(" "));
+                    }
+                    if(tmp1.getGrade() == null){
+                        tmp1.setGrade(" ");
+                    }
                     tmp1.setRemarkss("车号:" + tmp1.getCarNo() + "毛:" + tmp1.getGrossWeight() + " 皮:" + tmp1.getTare() + " 净:" + tmp1.getNetWeight() + " 纯:" + weight + " 应付:" + payable + " 单号:" + m.replaceAll("").trim() + " ,★☆性质:贸易粮 形态:玉米堆(2)"
                     );
                     list1.add(tmp1);