|
@@ -202,6 +202,7 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
|
|
|
listSon = senYuDataSourceThree.queryForList(sql);
|
|
|
}
|
|
|
List<JSONObject> jianSon = JsonChangeUtils.toJSONObject(listSon);
|
|
|
+ int size = 0;
|
|
|
for (JSONObject Object:jianSon) {
|
|
|
SyOrderDataItem sy2 = JSONObject.toJavaObject(Object, SyOrderDataItem.class);
|
|
|
sy2.setId(sy.getAccount()+sy2.getId());
|
|
@@ -217,8 +218,11 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
|
|
|
sy2.setSupplier(ordervo.getSupplier());
|
|
|
sy2.setSupplierCode(ordervo.getSupplierCode());
|
|
|
}
|
|
|
- if(sy2.getSupplier()!=null && sy.getAccount()!=null){
|
|
|
- List<String> rsup = queryRSupplier(sy.getId(),sy.getAccount());
|
|
|
+ if(sy2.getOmpoIdItem()==null || sy2.getOmpoIdItem().equals("")){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if(sy2.getOmpoIdItem()!=null && sy.getAccount()!=null){
|
|
|
+ List<String> rsup = queryRSupplier(sy2.getOmpoIdItem(),sy.getAccount());
|
|
|
if(rsup.size()>0){
|
|
|
sy2.setRSupplierCode(rsup.get(0));
|
|
|
sy2.setRSupplier(rsup.get(1));
|
|
@@ -226,6 +230,10 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
|
|
|
}
|
|
|
|
|
|
syOrderDataItemService.save(sy2);
|
|
|
+ size++;
|
|
|
+ }
|
|
|
+ if(size<=0){
|
|
|
+ continue;
|
|
|
}
|
|
|
//添加主表数据进入数据库
|
|
|
String syId = sy.getId();
|