|  | @@ -291,7 +291,16 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
 | 
	
		
			
				|  |  |                  "FROM " +
 | 
	
		
			
				|  |  |                  "  SalePayVouch sp " +
 | 
	
		
			
				|  |  |                  "  INNER JOIN SalePayVouchs sps ON sp.id = sps.id " +
 | 
	
		
			
				|  |  | -                "  where sp.cSOCode = '"+syCostAllocation.getGarmentContractno()+"'";
 | 
	
		
			
				|  |  | +                "  where sp.cSOCode " +
 | 
	
		
			
				|  |  | +                "in (   " +
 | 
	
		
			
				|  |  | +                "  SELECT s.cSOCode FROM SO_SODetails s  " +
 | 
	
		
			
				|  |  | +                "    JOIN (  " +
 | 
	
		
			
				|  |  | +                "    SELECT od.cInvCode,od.isosid FROM OM_MOMain om  " +
 | 
	
		
			
				|  |  | +                "    LEFT JOIN OM_MODetails od ON om.MOID = od.MOID   " +
 | 
	
		
			
				|  |  | +                "    WHERE om.cState = 1 AND om.cCode LIKE '"+plannum+"%'   " +
 | 
	
		
			
				|  |  | +                "    ) o ON s.isosid = o.isosid AND s.cInvCode = o.cInvCode   " +
 | 
	
		
			
				|  |  | +                "    GROUP BY s.cSOCode  " +
 | 
	
		
			
				|  |  | +                "  )";
 | 
	
		
			
				|  |  |          List<Map<String, Object>> costpayList  = senYuDataSourceOne.queryForList(sqlCostpay);
 | 
	
		
			
				|  |  |          List<JSONObject> costpay = JsonChangeUtils.toJSONObject(costpayList);
 | 
	
		
			
				|  |  |          List<SyCostAllocationCostpay> syCostAllocationCostpays = new ArrayList<>();
 |