|
@@ -206,6 +206,8 @@ public class AddOrderJob implements Job,ApplicationContextAware {
|
|
|
sy2.setGarmentFactory(sy.getGarmentFactory());
|
|
|
}
|
|
|
sy2.setSupplierCode(ordervo.getSupplierCode());
|
|
|
+ }else {
|
|
|
+ continue;
|
|
|
}
|
|
|
if(sy2.getOmpoIdItem()==null || sy2.getOmpoIdItem().equals("")){
|
|
|
continue;
|
|
@@ -420,7 +422,7 @@ public class AddOrderJob implements Job,ApplicationContextAware {
|
|
|
|
|
|
}else if(account[1].equals(syOrderDataVO.getAccount())){
|
|
|
String sql = "SELECT" +
|
|
|
- " ompoCode,ompoIdItem,ompoId,supplierCode,v.cVenAbbName as supplier,iTaxPrice,guangpeiGateWidth," +account[1]+" as ompoAccount"+
|
|
|
+ " ompoCode,ompoIdItem,ompoId,supplierCode,v.cVenAbbName as supplier,iTaxPrice,guangpeiGateWidth,s.iRowNo as poIrowno," +account[1]+" as ompoAccount"+
|
|
|
" FROM" +
|
|
|
" SO_SODetails s" +
|
|
|
" left join (" +
|
|
@@ -436,18 +438,19 @@ public class AddOrderJob implements Job,ApplicationContextAware {
|
|
|
List<Map<String, Object>> list = senYuDataSourceTwo.queryForList(sql);
|
|
|
List<JSONObject> jian = JsonChangeUtils.toJSONObject(list);
|
|
|
for (JSONObject jsonObject:jian) {
|
|
|
- result = JSONObject.toJavaObject(jsonObject, SyOrderDataVO.class);
|
|
|
+ syOrderDataVO = JSONObject.toJavaObject(jsonObject, SyOrderDataVO.class);
|
|
|
}
|
|
|
if(result.getSupplier()==null){
|
|
|
- return result;
|
|
|
+ return syOrderDataVO;
|
|
|
}
|
|
|
if(!result.getSupplier().equals("马菲羊")){
|
|
|
- return result;
|
|
|
+ return syOrderDataVO;
|
|
|
}
|
|
|
String sql2 = "SELECT" +
|
|
|
" ompoCode,ompoIdItem,ompoId,supplierCode,v.cVenAbbName as supplier,iTaxPrice,guangpeiGateWidth," +account[2]+" as ompoAccount"+
|
|
|
" FROM" +
|
|
|
- " SO_SODetails s" +
|
|
|
+ " so_somain ss " +
|
|
|
+ " join SO_SODetails s on s.id=ss.id" +
|
|
|
" left join (" +
|
|
|
" SELECT pm.cPOID as ompoCode,pm.POID as ompoId,pd.id as ompoIdItem," +
|
|
|
" pd.cDefine23 as guangpeiGateWidth,"+
|
|
@@ -464,7 +467,7 @@ public class AddOrderJob implements Job,ApplicationContextAware {
|
|
|
" where om.cState = 1" +
|
|
|
" ) p on s.isosid = p.isosid and s.cInvCode = p.cInvCode" +
|
|
|
" left join Vendor v on p.supplierCode=v.cVenCode"+
|
|
|
- " where s.iRowNo ="+syOrderDataVO.getPoIrowno();
|
|
|
+ " where s.iRowNo ="+syOrderDataVO.getPoIrowno() +" and ss.cSOCode="+syOrderDataVO.getOmpoCode();
|
|
|
listSon = senYuDataSourceThree.queryForList(sql2);
|
|
|
List<JSONObject> jian2 = JsonChangeUtils.toJSONObject(listSon);
|
|
|
for (JSONObject jsonObject:jian2) {
|