| 
					
				 | 
			
			
				@@ -96,6 +96,8 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 /* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 SO_SOMain 销售订单数据 单据时间没有详细时间 只有日期 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 SO_SODetails SO_SOMain 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //销售订单审核字段问题: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                select istatus,iverifystate,cSOCode  from so_somain where istatus=1 and iverifystate!=2 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 String sql = "SELECT " + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -426,7 +428,7 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     " 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.cState = 1" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    " 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.autoid ="+syOrderDataVO.getId(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -448,7 +450,7 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     " 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.cState = 1" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    " 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"+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     " where s.autoid ="+syOrderDataVO.getId(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -473,14 +475,14 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     " 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.cState = 1" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    " 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" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     " FROM OM_MOMain om" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     " LEFT JOIN  OM_MODetails  od on om.MOID =od.MOID" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    " where om.cState = 1" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    " 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(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -502,14 +504,14 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     " 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.cState = 1" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    " 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" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     " FROM OM_MOMain om" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     " LEFT JOIN  OM_MODetails  od on om.MOID =od.MOID" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    " where om.cState = 1" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    " 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.autoid ="+syOrderDataVO.getId(); 
			 |