| 
					
				 | 
			
			
				@@ -97,36 +97,6 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 SO_SODetails SO_SOMain 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                /*String sql = "SELECT " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.ID AS id," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cSOCode AS orderNumber," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.dDate AS orderDate," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cBusType AS businessTypeValue," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cSTCode AS salesTypeValue," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cCusCode AS customerAbbreviation," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cCusName AS customerName," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.iExchRate AS exchangeRate," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cDepCode AS salesDepartment," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cCrmpersonName AS salesman," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cexch_name AS currencyText," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.fbookratio AS depositRatio," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.iMoney AS deposit," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cMemo AS orderRemarks," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cDefine14 AS orderChangeDescription," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cDefine12 AS garmentFactory," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cMemo AS memo," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "f.chdefine4 as priceRemarks," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "f.chdefine1 as collaborativeRoute," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "t.cSTName as salesTypeText," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "y.cexch_code as currencyValue," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "p.cPayName as termOfPayment," +account+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        " 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 where s.dDate > '"+lastTimeSf+"'";*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 String sql = "SELECT " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "s.ID AS id," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "s.cSOCode AS orderNumber," + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -186,14 +156,6 @@ 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 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "s.AutoID AS id," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "s.ID AS syOrderDataId," + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -218,11 +180,29 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "s.cMemo AS remarks ," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "d.cComUnitName as masterMetering," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "c.cInvStd as specificationAndModel," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cSCloser as bankClosedBy" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        "s.cSCloser as bankClosedBy," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        "p.OMPO_Id as ompoId," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        "p.cVenCode as supplierCode," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        "v.cVenAbbName as supplier,"+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        "p.iTaxPrice as iTaxPrice," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        "p.cbdefine2 as ymoney"+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " FROM" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " SO_SODetails s" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " left join Inventory c on c.cInvCode=s.cInvCode" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " left join ComputationUnit d on d.cComunitCode=c.cComUnitCode"+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        " left join (" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            " SELECT pm.cPOID as OMPO_Id,cVenCode,pd.iTaxPrice,pd.iorderdid,pe.cbdefine2,pd.cInvCode" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            " FROM PO_Pomain pm " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            " LEFT JOIN  PO_Podetails pd on pm.POID=pd.POID" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            " LEFT JOIN  PO_Podetails_extradefine pe on pd.id=pe.id" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            " where pm.cState = 1" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            " UNION" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            " SELECT om.cCode as OMPO_Id,om.cVenCode,od.iTaxPrice,od.isosid as iorderdid,oe.cbdefine2,od.cInvCode" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            " FROM OM_MOMain om " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            " LEFT JOIN  OM_MODetails  od on om.MOID =od.MOID" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            " LEFT JOIN  OM_MODetails_extradefine oe on od.MODetailsID=oe.MODetailsID" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        " ) p " +"on s.isosid  = p.iorderdid and s.cInvCode = p.cInvCode"+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        " left join Vendor v on p.cVenCode=v.cVenCode"+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " where s.ID = "+ID; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<Map<String, Object>> listSon = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(sy.getAccount().equals("901")){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -242,6 +222,7 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             dxpDataPlanService.updateLastTime(day,"senYu_syOrder"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             log.error(e.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return result; 
			 |