|  | @@ -93,7 +93,7 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
 | 
	
		
			
				|  |  |                  SO_SODetails SO_SOMain
 | 
	
		
			
				|  |  |                   */
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                String sql = "SELECT " +
 | 
	
		
			
				|  |  | +                /*String sql = "SELECT " +
 | 
	
		
			
				|  |  |                          "s.ID AS id," +
 | 
	
		
			
				|  |  |                          "s.cSOCode AS orderNumber," +
 | 
	
		
			
				|  |  |                          "s.dDate AS orderDate," +
 | 
	
	
		
			
				|  | @@ -121,7 +121,47 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
 | 
	
		
			
				|  |  |                          " left join SO_SOMain_extradefine f on s.ID = f.ID" +
 | 
	
		
			
				|  |  |                          " left join SaleType t on s.cSTCode = t.cSTCode" +
 | 
	
		
			
				|  |  |                          " left join foreigncurrency y on s.cexch_name = y.cexch_name" +
 | 
	
		
			
				|  |  | -                        " left join PayCondition p on s.cPayCode = p.cPayCode where s.dDate > '"+lastTimeSf+"'";
 | 
	
		
			
				|  |  | +                        " left join PayCondition p on s.cPayCode = p.cPayCode where s.dDate > '"+lastTimeSf+"'";*/
 | 
	
		
			
				|  |  | +                
 | 
	
		
			
				|  |  | +                String sql = "SELECT " +
 | 
	
		
			
				|  |  | +                        "s.ID AS id," +
 | 
	
		
			
				|  |  | +                        "s.cSOCode AS orderNumber," +
 | 
	
		
			
				|  |  | +                        "s.dDate AS orderDate," +
 | 
	
		
			
				|  |  | +                        "s.cBusType AS businessTypeValue," +
 | 
	
		
			
				|  |  | +                        "s.cSTCode AS salesTypeValue," +
 | 
	
		
			
				|  |  | +                        "t.cSTName AS salesTypeText," +
 | 
	
		
			
				|  |  | +                        "cc.cCusAbbName AS customerAbbreviation," +
 | 
	
		
			
				|  |  | +                        "cc.cCusName AS customerName," +
 | 
	
		
			
				|  |  | +                        "s.iExchRate AS exchangeRate," +
 | 
	
		
			
				|  |  | +                        "de.cDepName AS salesDepartment," +
 | 
	
		
			
				|  |  | +                        "s.cCrmpersonName AS salesman," +
 | 
	
		
			
				|  |  | +                        "s.cexch_name AS currencyText," +
 | 
	
		
			
				|  |  | +                        "s.cdefine2 as brandSide," +
 | 
	
		
			
				|  |  | +                        "s.cdefine1 as thirdParty," +
 | 
	
		
			
				|  |  | +                        "s.cdefine3 as customerOrderNumber," +
 | 
	
		
			
				|  |  | +                        "s.cdefine11 as endCustomer," +
 | 
	
		
			
				|  |  | +                        "v.cVenAbbName as supplier," +
 | 
	
		
			
				|  |  | +                        "s.fbookratio AS depositRatio," +
 | 
	
		
			
				|  |  | +                        "s.iMoney AS deposit," +
 | 
	
		
			
				|  |  | +                        "s.cMemo AS orderRemarks," +
 | 
	
		
			
				|  |  | +                        "s.cDefine14 AS orderChangeDescription," +
 | 
	
		
			
				|  |  | +                        "s.cDefine12 AS garmentFactory," +
 | 
	
		
			
				|  |  | +                        "s.cDefine5 as garmentNmb," +
 | 
	
		
			
				|  |  | +                        "s.cMemo AS memo," +
 | 
	
		
			
				|  |  | +                        "f.chdefine4 AS priceRemarks," +
 | 
	
		
			
				|  |  | +                        "f.chdefine1 AS collaborativeRoute," +
 | 
	
		
			
				|  |  | +                        "y.cexch_code AS currencyValue," +
 | 
	
		
			
				|  |  | +                        "p.cPayName AS termOfPayment," +
 | 
	
		
			
				|  |  | +                        "903 AS account " +
 | 
	
		
			
				|  |  | +                        " FROM" +
 | 
	
		
			
				|  |  | +                        " SO_SOMain s" +
 | 
	
		
			
				|  |  | +                        " LEFT JOIN SO_SOMain_extradefine f ON s.ID = f.ID" +
 | 
	
		
			
				|  |  | +                        " LEFT JOIN SaleType t ON s.cSTCode = t.cSTCode" +
 | 
	
		
			
				|  |  | +                        " LEFT JOIN foreigncurrency y ON s.cexch_name = y.cexch_name" +
 | 
	
		
			
				|  |  | +                        " LEFT JOIN PayCondition p ON s.cPayCode = p.cPayCode" +
 | 
	
		
			
				|  |  | +                        " LEFT JOIN Department de ON s.cDepCode = de.cDepCode" +
 | 
	
		
			
				|  |  | +                        " LEFT JOIN Customer cc ON s.cCusCode = cc.cCusCode" +
 | 
	
		
			
				|  |  | +                        " left join Vendor v on s.cCusCode=v.cVenCode";
 | 
	
		
			
				|  |  |                  List<Map<String, Object>> list = new ArrayList<>();
 | 
	
		
			
				|  |  |                  if(pkorgValue[0].equals("one")){
 | 
	
		
			
				|  |  |                      list = senYuDataSourceOne.queryForList(sql);
 | 
	
	
		
			
				|  | @@ -138,15 +178,44 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
 | 
	
		
			
				|  |  |              for (JSONObject jsonObject:jian) {
 | 
	
		
			
				|  |  |                  SyOrderData sy = JSONObject.toJavaObject(jsonObject,SyOrderData.class);
 | 
	
		
			
				|  |  |                  String ID = sy.getId();
 | 
	
		
			
				|  |  | +//                String sql = "SELECT " +
 | 
	
		
			
				|  |  | +//                        "AutoID as id,ID as syOrderDataId,cDefine22 as itemNumber,dPreDate as preDeliveryDate," +
 | 
	
		
			
				|  |  | +//                        "dPreMoDate as preCompletionDate,cDefine32 as packId,cDefine28 as smallPo,cDefine29 as distributionPoint," +
 | 
	
		
			
				|  |  | +//                        "cInvCode as inventoryCode,cInvName as inventoryName,cFree1 as colour,cFree2 as size,cFree3 as codingRules," +
 | 
	
		
			
				|  |  | +//                        "cFree4 as guangpeiGateWidth,cDefine35 as boxNumber,iQuantity as quantity,iQuantity as surplusNum," +
 | 
	
		
			
				|  |  | +//                        "iTaxUnitPrice as unitPriceIncludingTax,iSum as totalPriceAndTax,iTaxRate as taxRate," +
 | 
	
		
			
				|  |  | +//                        "cMemo as remarks" +
 | 
	
		
			
				|  |  | +//                        " FROM SO_SODetails where ID = "+ID;
 | 
	
		
			
				|  |  |                  String sql = "SELECT " +
 | 
	
		
			
				|  |  | -                        "AutoID as id,ID as syOrderDataId,cDefine22 as itemNumber,dPreDate as preDeliveryDate," +
 | 
	
		
			
				|  |  | -                        "dPreMoDate as preCompletionDate,cDefine32 as packId,cDefine28 as smallPo,cDefine29 as distributionPoint," +
 | 
	
		
			
				|  |  | -                        "cInvCode as inventoryCode,cInvName as inventoryName,cFree1 as colour,cFree2 as size,cFree3 as codingRules," +
 | 
	
		
			
				|  |  | -                        "cFree4 as guangpeiGateWidth,cDefine35 as boxNumber,iQuantity as quantity,iQuantity as surplusNum," +
 | 
	
		
			
				|  |  | -                        "iTaxUnitPrice as unitPriceIncludingTax,iSum as totalPriceAndTax,iTaxRate as taxRate," +
 | 
	
		
			
				|  |  | -                        "cMemo as remarks" +
 | 
	
		
			
				|  |  | -                        " FROM SO_SODetails where ID = "+ID;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +                        "s.AutoID AS id," +
 | 
	
		
			
				|  |  | +                        "s.ID AS syOrderDataId," +
 | 
	
		
			
				|  |  | +                        "s.cDefine22 AS itemNumber," +
 | 
	
		
			
				|  |  | +                        "s.dPreDate AS preDeliveryDate," +
 | 
	
		
			
				|  |  | +                        "s.dPreMoDate AS preCompletionDate," +
 | 
	
		
			
				|  |  | +                        "s.cDefine32 AS packId," +
 | 
	
		
			
				|  |  | +                        "s.cDefine28 AS smallPo," +
 | 
	
		
			
				|  |  | +                        "s.cDefine29 AS distributionPoint," +
 | 
	
		
			
				|  |  | +                        "s.cInvCode AS inventoryCode," +
 | 
	
		
			
				|  |  | +                        "s.cInvName AS inventoryName," +
 | 
	
		
			
				|  |  | +                        "s.cFree1 AS colour," +
 | 
	
		
			
				|  |  | +                        "s.cFree2 AS size," +
 | 
	
		
			
				|  |  | +                        "s.cFree3 AS codingRules," +
 | 
	
		
			
				|  |  | +                        "s.cFree4 AS guangpeiGateWidth," +
 | 
	
		
			
				|  |  | +                        "s.cDefine35 AS boxNumber," +
 | 
	
		
			
				|  |  | +                        "s.iQuantity AS quantity," +
 | 
	
		
			
				|  |  | +                        "s.iQuantity AS surplusNum," +
 | 
	
		
			
				|  |  | +                        "s.iTaxUnitPrice AS unitPriceIncludingTax," +
 | 
	
		
			
				|  |  | +                        "s.iSum AS totalPriceAndTax," +
 | 
	
		
			
				|  |  | +                        "s.iTaxRate AS taxRate," +
 | 
	
		
			
				|  |  | +                        "s.cMemo AS remarks ," +
 | 
	
		
			
				|  |  | +                        "d.cComUnitName as masterMetering," +
 | 
	
		
			
				|  |  | +                        "c.cInvStd as specificationAndModel," +
 | 
	
		
			
				|  |  | +                        "s.cSCloser as bankClosedBy" +
 | 
	
		
			
				|  |  | +                        " FROM" +
 | 
	
		
			
				|  |  | +                        " SO_SODetails s" +
 | 
	
		
			
				|  |  | +                        " left join Inventory c on c.cInvCode=s.cInvCode" +
 | 
	
		
			
				|  |  | +                        " left join ComputationUnit d on d.cComunitCode=c.cComUnitCode"+
 | 
	
		
			
				|  |  | +                        " where s.ID = "+ID;
 | 
	
		
			
				|  |  |                  List<Map<String, Object>> listSon = new ArrayList<>();
 | 
	
		
			
				|  |  |                  if(sy.getAccount().equals("903")){
 | 
	
		
			
				|  |  |                      listSon = senYuDataSourceOne.queryForList(sql);
 |