Browse Source

修复采购验收单未关联采购单导致的报错问题

chenw 7 years ago
parent
commit
5d69b927e4

+ 4 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseInResTask.java

@@ -89,7 +89,10 @@ public class SendPurchaseInResTask extends Executable {
             PurchaseProdInOutDetail b2bPurchaseProdInOutDetail = b2bPurchaseProdInOutDetailList.get(i);
             b2bPurchaseProdInOutDetail.setPd_id(prodIODetailDTO.getId());
             b2bPurchaseProdInOutDetail.setPd_detno(new BigDecimal(prodIODetailDTO.getPd_pdno()).shortValue());
-            b2bPurchaseProdInOutDetail.setPd_orderdetno(new BigDecimal(prodIODetailDTO.getPd_orderdetno()).shortValue());
+            Integer orderDetno = prodIODetailDTO.getPd_orderdetno();
+            if (orderDetno != null) {
+                b2bPurchaseProdInOutDetail.setPd_orderdetno(new BigDecimal(orderDetno).shortValue());
+            }
         }
     }
 

+ 4 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseInTask.java

@@ -97,7 +97,10 @@ public class SendPurchaseInTask extends Executable{
             PurchaseProdInOutDetail b2bPurchaseProdInOutDetail = b2bPurchaseProdInOutDetailList.get(i);
             b2bPurchaseProdInOutDetail.setPd_id(prodIODetailDTO.getId());
             b2bPurchaseProdInOutDetail.setPd_detno(new BigDecimal(prodIODetailDTO.getPd_pdno()).shortValue());
-            b2bPurchaseProdInOutDetail.setPd_orderdetno(new BigDecimal(prodIODetailDTO.getPd_orderdetno()).shortValue());
+            Integer orderDetno = prodIODetailDTO.getPd_orderdetno();
+            if (orderDetno != null) {
+                b2bPurchaseProdInOutDetail.setPd_orderdetno(new BigDecimal(orderDetno).shortValue());
+            }
         }
     }
 

+ 4 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseOutResTask.java

@@ -89,7 +89,10 @@ public class SendPurchaseOutResTask extends Executable {
             PurchaseProdInOutDetail b2bPurchaseProdInOutDetail = b2bPurchaseProdInOutDetailList.get(i);
             b2bPurchaseProdInOutDetail.setPd_id(prodIODetailDTO.getId());
             b2bPurchaseProdInOutDetail.setPd_detno(new BigDecimal(prodIODetailDTO.getPd_pdno()).shortValue());
-            b2bPurchaseProdInOutDetail.setPd_orderdetno(new BigDecimal(prodIODetailDTO.getPd_orderdetno()).shortValue());
+            Integer orderDetno = prodIODetailDTO.getPd_orderdetno();
+            if (orderDetno != null) {
+                b2bPurchaseProdInOutDetail.setPd_orderdetno(new BigDecimal(orderDetno).shortValue());
+            }
         }
     }
 }

+ 4 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseOutTask.java

@@ -93,7 +93,10 @@ public class SendPurchaseOutTask extends Executable{
             PurchaseProdInOutDetail b2bPurchaseProdInOutDetail = b2bPurchaseProdInOutDetailList.get(i);
             b2bPurchaseProdInOutDetail.setPd_id(prodIODetailDTO.getId());
             b2bPurchaseProdInOutDetail.setPd_detno(new BigDecimal(prodIODetailDTO.getPd_pdno()).shortValue());
-            b2bPurchaseProdInOutDetail.setPd_orderdetno(new BigDecimal(prodIODetailDTO.getPd_orderdetno()).shortValue());
+            Integer orderDetno = prodIODetailDTO.getPd_orderdetno();
+            if (orderDetno != null) {
+                b2bPurchaseProdInOutDetail.setPd_orderdetno(new BigDecimal(orderDetno).shortValue());
+            }
         }
     }
 }