|  | @@ -478,58 +478,27 @@ public class AddOrderJob implements Job,ApplicationContextAware {
 | 
	
		
			
				|  |  |              if(!syOrderDataVO.getSupplier().equals("马菲羊")){
 | 
	
		
			
				|  |  |                  return syOrderDataVO;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -//            String sql2 = "SELECT" +
 | 
	
		
			
				|  |  | -//                    " ompoCode,ompoIdItem,ompoId,supplierCode,v.cVenAbbName as supplier,iTaxPrice,dArriveDate,guangpeiGateWidth," +account[2]+" as ompoAccount"+
 | 
	
		
			
				|  |  | -//                    " FROM" +
 | 
	
		
			
				|  |  | -//                    "  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,pd.dArriveDate,"+
 | 
	
		
			
				|  |  | -//                    " pm.cVenCode as supplierCode,pd.iTaxPrice,pd.cInvCode,pd.iorderdid as isosid" +
 | 
	
		
			
				|  |  | -//                    " FROM PO_Pomain pm" +
 | 
	
		
			
				|  |  | -//                    " LEFT JOIN  PO_Podetails pd on pm.POID=pd.POID" +
 | 
	
		
			
				|  |  | -//                    " where pm.iverifystateex = 2 and (pm.cCloser is null or pm.cCloser='asuser')" +
 | 
	
		
			
				|  |  | -//                    " UNION" +
 | 
	
		
			
				|  |  | -//                    " SELECT om.cCode as ompoCode,om.MOID as ompoId,od.MODetailsID as ompoIdItem," +
 | 
	
		
			
				|  |  | -//                    " od.cDefine23  as guangpeiGateWidth,"+
 | 
	
		
			
				|  |  | -//                    " om.cVenCode as supplierCode,od.iTaxPrice,od.cInvCode,od.isosid,od.dArriveDate" +
 | 
	
		
			
				|  |  | -//                    " FROM OM_MOMain om" +
 | 
	
		
			
				|  |  | -//                    " LEFT JOIN  OM_MODetails  od on om.MOID =od.MOID" +
 | 
	
		
			
				|  |  | -//                    " where om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')" +
 | 
	
		
			
				|  |  | -//                    " ) 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() +" and ss.cSOCode='"+syOrderDataVO.getOmpoCode()+"'";
 | 
	
		
			
				|  |  | -            String sql2 = "SELECT  " +
 | 
	
		
			
				|  |  | -                    "    ompoCode,ompoIdItem,ompoId,supplierCode,v.cVenAbbName as supplier,iTaxPrice,dArriveDate,guangpeiGateWidth, " +account[2]+" as ompoAccount"+
 | 
	
		
			
				|  |  | -                    "     FROM  " +
 | 
	
		
			
				|  |  | -                    "     so_somain ss   " +
 | 
	
		
			
				|  |  | -                    "     join SO_SODetails s on s.id=ss.id  " +
 | 
	
		
			
				|  |  | -                    "     left join (  " +
 | 
	
		
			
				|  |  | -                    "     SELECT om.cCode as ompoCode,om.MOID as ompoId,od.MODetailsID as ompoIdItem,  " +
 | 
	
		
			
				|  |  | -                    "     od.cDefine23  as guangpeiGateWidth, " +
 | 
	
		
			
				|  |  | -                    "     om.cVenCode as supplierCode,od.iTaxPrice,od.cInvCode,od.isosid,od.dArriveDate  " +
 | 
	
		
			
				|  |  | -                    "     FROM OM_MOMain om  " +
 | 
	
		
			
				|  |  | -                    "     LEFT JOIN  OM_MODetails  od on om.MOID =od.MOID  " +
 | 
	
		
			
				|  |  | -                    "     where om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')  " +
 | 
	
		
			
				|  |  | -                    "     ) 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() +" and ss.cSOCode='"+syOrderDataVO.getOmpoCode()+"'"+
 | 
	
		
			
				|  |  | -                    "     union all  " +
 | 
	
		
			
				|  |  | -                    "     SELECT  " +
 | 
	
		
			
				|  |  | -                    "    ompoCode,ompoIdItem,ompoId,supplierCode,v.cVenAbbName as supplier,iTaxPrice,dArriveDate,guangpeiGateWidth, " +account[2]+" as ompoAccount"+
 | 
	
		
			
				|  |  | -                    "     FROM  " +
 | 
	
		
			
				|  |  | -                    "     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,pd.dArriveDate, " +
 | 
	
		
			
				|  |  | -                    "     pm.cVenCode as supplierCode,pd.iTaxPrice,pd.cInvCode,pd.iorderdid as isosid  " +
 | 
	
		
			
				|  |  | -                    "     FROM PO_Pomain pm  " +
 | 
	
		
			
				|  |  | -                    "     LEFT JOIN  PO_Podetails pd on pm.POID=pd.POID  " +
 | 
	
		
			
				|  |  | -                    "     where pm.iverifystateex = 2 and (pm.cCloser is null or pm.cCloser='asuser')  " +
 | 
	
		
			
				|  |  | -                    "     ) p on s.isosid  = p.isosid and s.cInvCode = p.cInvCode  " +
 | 
	
		
			
				|  |  | -                    "     left join Vendor v on p.supplierCode=v.cVenCode " +
 | 
	
		
			
				|  |  | +            String sql2 = "SELECT" +
 | 
	
		
			
				|  |  | +                    " ompoCode,ompoIdItem,ompoId,supplierCode,v.cVenAbbName as supplier,iTaxPrice,dArriveDate,guangpeiGateWidth," +account[2]+" as ompoAccount"+
 | 
	
		
			
				|  |  | +                    " FROM" +
 | 
	
		
			
				|  |  | +                    "  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,pd.dArriveDate,"+
 | 
	
		
			
				|  |  | +                    " pm.cVenCode as supplierCode,pd.iTaxPrice,pd.cInvCode,pd.iorderdid as isosid" +
 | 
	
		
			
				|  |  | +                    " FROM PO_Pomain pm" +
 | 
	
		
			
				|  |  | +                    " LEFT JOIN  PO_Podetails pd on pm.POID=pd.POID" +
 | 
	
		
			
				|  |  | +                    " where pm.iverifystateex = 2 and (pm.cCloser is null or pm.cCloser='asuser')" +
 | 
	
		
			
				|  |  | +                    " UNION" +
 | 
	
		
			
				|  |  | +                    " SELECT om.cCode as ompoCode,om.MOID as ompoId,od.MODetailsID as ompoIdItem," +
 | 
	
		
			
				|  |  | +                    " od.cDefine23  as guangpeiGateWidth,od.dArriveDate,"+
 | 
	
		
			
				|  |  | +                    " om.cVenCode as supplierCode,od.iTaxPrice,od.cInvCode,od.isosid" +
 | 
	
		
			
				|  |  | +                    " FROM OM_MOMain om" +
 | 
	
		
			
				|  |  | +                    " LEFT JOIN  OM_MODetails  od on om.MOID =od.MOID" +
 | 
	
		
			
				|  |  | +                    " where om.iVerifyStateNew = 2 and (om.cCloser is null or om.cCloser='asuser')" +
 | 
	
		
			
				|  |  | +                    " ) 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() +" and ss.cSOCode='"+syOrderDataVO.getOmpoCode()+"'";
 | 
	
		
			
				|  |  |              listSon = senYuDataSourceThree.queryForList(sql2);
 | 
	
		
			
				|  |  |              List<JSONObject> jian2 = JsonChangeUtils.toJSONObject(listSon);
 |