2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								package   nccloud.api.mmbd.dchangemanage.dchangemaster ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   java.lang.reflect.Field ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   javax.ws.rs.Consumes ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   javax.ws.rs.POST ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   javax.ws.rs.Path ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   javax.ws.rs.Produces ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   java.lang.StringBuilder ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   java.math.BigDecimal ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   java.util.* ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   java.util.Map.Entry ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.bs.dao.BaseDAO ; 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.bs.dao.DAOException ; 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.bs.trade.business.HYPubBO ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.bs.uapbd.util.MyHelper ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.itf.mmbd.dchange.dchangemaster.IDchangeMasterVOService ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.itf.mmpac.pickm.IPickmQueryService ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.jdbc.framework.processor.MapListProcessor ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.jdbc.framework.processor.MapProcessor ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.uif.pub.exception.UifException ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.util.mmf.framework.base.MMValueCheck ; 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.dchange.dchange.* ; 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.mmpac.pickm.entity.AggPickmVO ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.mmpps.mps0202.AggregatedPoVO ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nccloud.framework.service.ServiceLocator ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nccloud.pubift.commen.itf.utils.IHttpPostOtherSys ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   org.json.JSONString ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   com.alibaba.fastjson.JSON ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   com.alibaba.fastjson.JSONArray ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   com.alibaba.fastjson.JSONObject ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nccloud.ws.rest.resource.AbstractNCCRestResource ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nccloud.api.rest.utils.ResultMessageUtil ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nccloud.commons.lang.ArrayUtils ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nccloud.commons.lang.StringUtils ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.bs.framework.common.NCLocator ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.JavaType ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.IAttributeMeta ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.BusinessException ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.SuperVO ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.VOStatus ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.lang.UFBoolean ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.lang.UFDate ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.lang.UFDateTime ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.lang.UFDouble ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.lang.UFLiteralDate ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								import   nc.vo.pub.lang.UFTime ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								@Path ( " mmbd/dchangemanage/dchangeMaster " ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								public   class  DchangeMasterManageResources   extends   AbstractNCCRestResource   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   Map < String ,   String >   fieldsNameAndType   =   new   HashMap < > ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   Map < String ,   Map < String ,   String > >   bodyFieldsNameAndTypes   =   new   HashMap < > ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Override 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 public   String   getModule ( )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   " mmbd " ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @POST 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Path ( " /adddchangeMasterVO " ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Consumes ( {   " application/json "   } ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Produces ( {   " application/json "   } ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 public   JSONString   adddchangeMasterVO ( JSONString   json )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   dealJson ( json ,   " adddchangeMasterVO " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @POST 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Path ( " /deletedchangeMasterVO " ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Consumes ( {   " application/json "   } ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Produces ( {   " application/json "   } ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 public   JSONString   deletedchangeMasterVO ( JSONString   json )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   dealJson ( json ,   " deletedchangeMasterVO " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @POST 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Path ( " /updatedchangeMasterVO " ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Consumes ( {   " application/json "   } ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Produces ( {   " application/json "   } ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 public   JSONString   updatedchangeMasterVO ( JSONString   json )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   dealJson ( json ,   " updatedchangeMasterVO " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @POST 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Path ( " /querydchangeMasterVO " ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Consumes ( {   " application/json "   } ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Produces ( {   " application/json "   } ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 public   JSONString   querydchangeMasterVO ( JSONString   json )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   dealJson ( json ,   " querydchangeMasterVO " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @POST 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Path ( " /insert " ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Consumes ( {   " application/json "   } ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 @Produces ( {   " application/json "   } ) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 public   JSONString   insert ( JSONString   json )   throws   BusinessException   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 JSONObject   obj   =   JSON . parseObject ( json . toJSONString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
										 // <20> <> <EFBFBD> ýӿ<C3BD> <D3BF> <EFBFBD> <EFBFBD> <EFBFBD>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 DchangeMasterVO   vo   =   buildVO1 ( obj ,   true ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 DchangeMasterVO [ ]   result   =   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 try { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 result   =   getService ( ) . saveDchangeMasterVO ( vo ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 }   catch ( BusinessException   e )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 return   ResultMessageUtil . exceptionToJSON ( e ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 JSONObject   returnJson   =   new   JSONObject ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 returnJson . put ( " result " ,   result ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   ResultMessageUtil . toJSON ( returnJson ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   JSONString   dealJson ( JSONString   json ,   String   methodName )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 if ( json   = =   null )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
											 return   ResultMessageUtil . exceptionToJSON ( new   NullPointerException ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ<EFBFBD> գ <EFBFBD> " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 JSONObject   obj   =   JSON . parseObject ( json . toJSONString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 if ( methodName . indexOf ( " add " )   > =   0 )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 StringBuilder   builder   =   requiredFieldsValidate ( obj ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 if ( builder . length ( )   >   0 )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
												 String   addError   =   " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʱ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ڿ<EFBFBD> ֵ<EFBFBD> <EFBFBD> Ϊ<EFBFBD> յı <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> У <EFBFBD> "   +   builder . deleteCharAt ( builder . length ( )   -   1 ) . toString ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   ResultMessageUtil . exceptionToJSON ( new   NullPointerException ( addError ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 }   else   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
												 // <20> <> <EFBFBD> ýӿ<C3BD> <D3BF> <EFBFBD> <EFBFBD> <EFBFBD>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 DchangeMasterVO   vo   =   buildVO ( obj ,   true ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 DchangeMasterVO [ ]   result   =   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 try { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													 result   =   getService ( ) . saveDchangeMasterVO ( vo ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 }   catch ( BusinessException   e )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													 return   ResultMessageUtil . exceptionToJSON ( e ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 JSONObject   returnJson   =   new   JSONObject ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 returnJson . put ( " result " ,   result ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   ResultMessageUtil . toJSON ( returnJson ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 				 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 }   else   if ( methodName . indexOf ( " delete " )   > =   0 )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 String   entityPk   =   obj . getString ( " pk_dchangemaster " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 if ( StringUtils . isEmpty ( entityPk ) )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
												 return   ResultMessageUtil . exceptionToJSON ( new   NullPointerException ( " ɾ<EFBFBD> <EFBFBD> ʱ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ<EFBFBD> գ <EFBFBD>  " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
											 // ɾ<> <C9BE> <EFBFBD> <EFBFBD> Ҫ<EFBFBD> <D2AA> <EFBFBD> <EFBFBD> ȫ<EFBFBD> ֡<EFBFBD> <D6A1> <EFBFBD> <EFBFBD> ź<EFBFBD> ҵ<EFBFBD> <D2B5> <EFBFBD> <EFBFBD> Ԫ 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 String   pk_org   =   obj . getString ( " pk_org " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
											 // <20> <> <EFBFBD> <EFBFBD> û<EFBFBD> д<EFBFBD> pk_org, Ĭ<> <C4AC> <EFBFBD> <EFBFBD> ȫ<EFBFBD> <C8AB>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 if ( StringUtils . isEmpty ( pk_org ) )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 pk_org   =   " GLOBLE00000000000000 " ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
											 // <20> <> <EFBFBD> ýӿ<C3BD> ɾ<EFBFBD> <C9BE>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 JSONObject   returnJson   =   new   JSONObject ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 Map < String ,   String >   tsMap   =   new   HashMap < > ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 DchangeMasterVO [ ]   vos   =   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 try   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 vos   =   getService ( ) . listDchangeMasterVOByPk ( " pk_dchangemaster = ' "   +   entityPk   +   " ' " ,   false ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 }   catch   ( BusinessException   e )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 ResultMessageUtil . exceptionToJSON ( e ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 if ( ArrayUtils . isNotEmpty ( vos ) )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 tsMap . put ( vos [ 0 ] . getAttributeValue ( " pk_dchangemaster " ) . toString ( ) ,   vos [ 0 ] . getTs ( ) . toString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 DchangeMasterVO [ ]   result   =   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 try   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 result   =   getService ( ) . deleteDchangeMasterVOs ( tsMap ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 }   catch   ( BusinessException   e )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 ResultMessageUtil . exceptionToJSON ( e ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 returnJson . put ( " result " ,   result ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 return   ResultMessageUtil . toJSON ( returnJson ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 }   else   if ( methodName . indexOf ( " update " )   > =   0 )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 JSONObject   object   =   ( JSONObject ) obj . get ( " dchangeMaster " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 String   entityPk   =   object . getString ( " pk_dchangemaster " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 if ( StringUtils . isEmpty ( entityPk ) )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
												 return   ResultMessageUtil . exceptionToJSON ( new   NullPointerException ( " <EFBFBD> <EFBFBD> ʱ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϊ<EFBFBD> գ <EFBFBD> " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 StringBuilder   builder   =   requiredFieldsValidate ( obj ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 if ( builder . length ( )   >   0 )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
												 String   updateError   =   " <EFBFBD> <EFBFBD> ʱ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ڿ<EFBFBD> ֵ<EFBFBD> <EFBFBD> Ϊ<EFBFBD> յı <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> У <EFBFBD> "   +   builder . deleteCharAt ( builder . length ( )   -   1 ) . toString ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   ResultMessageUtil . exceptionToJSON ( new   NullPointerException ( updateError ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 }   else   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
												 // <20> <> <EFBFBD> ýӿ<C3BD> <D3BF> <EFBFBD>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 DchangeMasterVO   vo   =   buildVO ( obj ,   false ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 DchangeMasterVO [ ]   result   =   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 JSONObject   returnJson   =   new   JSONObject ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 try { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													 result   =   getService ( ) . saveDchangeMasterVO ( vo ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 }   catch ( BusinessException   e )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													 return   ResultMessageUtil . exceptionToJSON ( e ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 returnJson . put ( " result " ,   result ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   ResultMessageUtil . toJSON ( returnJson ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 		 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 }   else   if ( methodName . indexOf ( " query " )   > =   0 )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
											 // <20> <> ѯʱ<D1AF> <CAB1> Ҫ<EFBFBD> <D2AA> <EFBFBD> <EFBFBD> ҵ<EFBFBD> <D2B5> <EFBFBD> <EFBFBD> Ԫ<EFBFBD> <D4AA> Ϊ<EFBFBD> <CEAA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 StringBuilder   sqlBuilder   =   new   StringBuilder ( "  isnull(dr, 0) = 0 " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 Set < Entry < String ,   Object > >   entrySet   =   obj . entrySet ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 Iterator < Entry < String ,   Object > >   iterator   =   entrySet . iterator ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 while ( iterator . hasNext ( ) )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 Entry < String ,   Object >   entry   =   iterator . next ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 if ( entry . getValue ( )   ! =   null )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													 sqlBuilder . append ( "  and  "   +   entry . getKey ( )   +   " =' "   +   entry . getValue ( )   +   " ' " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 DchangeMasterVO [ ]   results   =   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 try   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 String [ ]   pks   =   getService ( ) . listDchangeMasterVOPkByCond ( sqlBuilder . toString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 results   =   getService ( ) . listDchangeMasterVOByPk ( pks ,   false ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 }   catch   ( BusinessException   e )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   ResultMessageUtil . exceptionToJSON ( e ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 JSONObject   returnJson   =   new   JSONObject ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 returnJson . put ( " result " ,   results ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 return   ResultMessageUtil . toJSON ( returnJson ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   StringBuilder   requiredFieldsValidate ( JSONObject   obj )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 StringBuilder   builder   =   new   StringBuilder ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < String >   notNullFields   =   getRequiredFields ( obj ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 JSONObject   object   =   ( JSONObject ) obj . get ( " dchangeMaster " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 for ( String   notNullField   :   notNullFields )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 Object   val   =   object . get ( notNullField ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 if ( val   = =   null ) { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 builder . append ( notNullField   +   " , " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   builder ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   DchangeMasterVO   buildVO ( JSONObject   json ,   boolean   isAdd )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 if ( json . get ( " dchangeMaster " )   = =   null )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
											 throw   new   NullPointerException ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> в<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʵ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ݣ<EFBFBD> " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 int   voStatus   =   isAdd   ?   VOStatus . NEW   :   VOStatus . UPDATED ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
										 // <20> <> ʵ<EFBFBD> <CAB5>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 JSONObject   headJson   =   ( JSONObject )   json . get ( " dchangeMaster " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 DchangeMasterVO   headVO   =   new   DchangeMasterVO ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 IAttributeMeta [ ]   headAttrs   =   headVO . getMetaData ( ) . getAttributes ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 for   ( IAttributeMeta   attribute   :   headAttrs )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 Object   value   =   getValueByAttr ( headJson ,   attribute ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 headVO . setAttributeValue ( attribute . getName ( ) ,   value ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 headVO . setStatus ( voStatus ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   headVO ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   DchangeMasterVO   buildVO1 ( JSONObject   json ,   boolean   isAdd )   throws   BusinessException   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 if ( json . get ( " dchangeMaster " )   = =   null )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
											 throw   new   NullPointerException ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> в<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʵ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ݣ<EFBFBD> " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 HYPubBO   hy   =   new   HYPubBO ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 int   voStatus   =   isAdd   ?   VOStatus . NEW   :   VOStatus . UPDATED ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
										 // <20> <> ʵ<EFBFBD> <CAB5>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 JSONObject   headJson   =   ( JSONObject )   json . get ( " dchangeMaster " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								//		BOM<4F> 汾<EFBFBD> <E6B1BE> -<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> -<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> -<2D> <> <EFBFBD> <EFBFBD> ǰ<EFBFBD> <C7B0> <EFBFBD> <EFBFBD> -<2D> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								         String   bomVersion   =   headJson . getString ( " bomVersion " ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								   /*bom<6F> 汾<EFBFBD> ŵ<EFBFBD> <C5B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ۶<EFBFBD> <DBB6> <EFBFBD> <EFBFBD> ż<EFBFBD> <C5BC> к<EFBFBD> */ 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 String [ ]   s = bomVersion . split ( " \\ + " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 if ( s . length ! = 2 ) { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
											 throw   new   NullPointerException ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> BOM<EFBFBD> 汾<EFBFBD> Ÿ<EFBFBD> ʽ <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 String   so_saleorder = s [ 0 ] ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 String   vrow = s [ 1 ] ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 // Object pk_material = hy.findColValue("bd_material", "pk_material", "code  = '"+pcode+"' and nvl(dr,0)=0  "); 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 String   pcode = headJson . getString ( " pcode " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 String   ccode = headJson . getString ( " ccode " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 UFDouble   beforenum = new   UFDouble ( headJson . getString ( " beforenum " ) )   ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 UFDouble   afternum = new   UFDouble ( headJson . getString ( " afternum " ) )   ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								//		<09> ȸ<EFBFBD> <C8B8> <EFBFBD> bom<6F> 汾<EFBFBD> ź<C5BA> <CDB8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 루<EFBFBD> <EBA3A8> Ʒ <EFBFBD> <C6B7> <EFBFBD> 룩<EFBFBD> <EBA3A9> ѯ<EFBFBD> <D1AF> <EFBFBD> ϼƻ<CFBC>  <20> Ȳ<EFBFBD> ѯ<EFBFBD> <D1AF> <EFBFBD> <EFBFBD> id<69> <64> <EFBFBD> ڲ<EFBFBD> ѯbom<6F> 汾 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 Object   pk_material   =   hy . findColValue ( " bd_material " ,   " pk_material " ,   " code  = ' " + pcode + " ' and nvl(dr,0)=0   " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 Object   cmrl   =   hy . findColValue ( " bd_material " ,   " pk_material " ,   " code  = ' " + ccode + " ' and nvl(dr,0)=0   " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
										 
							
							
										 Object   pmoid   =   hy . findColValue ( " cpickmid " ,   " mm_pickm " ,   " vfirstmocode  = ' " + so_saleorder + " ' and vfirstmorowcode=<3D> <>  " + vrow + " <EFBFBD> <EFBFBD>  and nvl(dr,0)=0  " ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										 Object   cbomid   =   hy . findColValue ( " vbomversion " ,   " mm_pickm " ,   " cpickmid  = ' " + pmoid + " '   and nvl(dr,0)=0   " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 if ( null   = = cbomid ) { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 return   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
										 Object   cpickmid = hy . findColValue ( " mm_pickm " ,   " cpickmid " ,   " cmaterialvid  = ' " + pk_material + " ' and vbomversion=<3D> <>  " + cbomid + " <EFBFBD> <EFBFBD>  and nvl(dr,0)=0  " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 AggPickmVO   aggVOs   =   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 IPickmQueryService   service   = NCLocator . getInstance ( ) . lookup ( IPickmQueryService . class ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								         aggVOs   = service . querySingleBillByPk ( ( String )   cpickmid ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 DchangeMasterVO   dchangeMasterVO   =   new   DchangeMasterVO ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 dchangeMasterVO . setBom_v ( ( String )   cbomid ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 dchangeMasterVO . setPcode ( pcode ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//		DchangeSlave0VO[] dchangeSlave0VOS=null; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								//	<09> <> ѯ<EFBFBD> ı <EFBFBD> <C4B1> <EFBFBD> <EFBFBD> ӱ<EFBFBD> <D3B1> <EFBFBD> <EFBFBD> <EFBFBD> 	<09> <> <EFBFBD> ϱ <EFBFBD> <CFB1> <EFBFBD> <EFBFBD> <EFBFBD> ϸ 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < DchangeSlave0VO >   list   =   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < String >   code   = new   ArrayList < > ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 if   ( aggVOs   ! =   null )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 code . add ( aggVOs . getParentVO ( ) . getVbillcode ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 for   ( int   j = 0 ; j < aggVOs . getChildrenVO ( ) . length ; j + + )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 Map < String , Object >   map   =   new   HashMap < > ( ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												 if ( aggVOs . getChildrenVO ( ) [ j ] . getAttributeValue ( " cbmaterialvid " ) . equals ( cmrl ) ) { 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													 DchangeSlave0VO   slave0VO = new   DchangeSlave0VO ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													 slave0VO . setAfternum ( afternum ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													 slave0VO . setCbmaterialvid ( ( String )   cmrl ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													 slave0VO . setBeforenum ( beforenum ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													 list . add ( slave0VO ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												 } 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 dchangeMasterVO . setDchangeslave0_dchangeslave0 ( list . toArray ( new   DchangeSlave0VO [ 0 ] ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								//	  <20> <> ѯ<EFBFBD> <D1AF> <EFBFBD> <EFBFBD> ʱmrp<72> ƻ<EFBFBD> <C6BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ƻ<EFBFBD>  <20> <> 	<09> <> <EFBFBD> ƻ<EFBFBD>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//		AggregatedPoVO aggregatedPoVO = 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//		SELECT 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//	cmaterialvid, 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//	nassaccponum, 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//	nassaccpraynum 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//FROM 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//	mm_plo 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//WHERE 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//	fpotype = '1' 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//	AND vsrccode IN ('55A32025031500426880') 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//		OrgVO orgvo = (OrgVO)hy.queryByPrimaryKey(OrgVO.class, ); 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < Map < String , Object > >   mrpPlan = getMRPPlan ( code ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < DchangeSlave1VO >   list1 = new   ArrayList < > ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 for   ( Map < String , Object >   map   :   mrpPlan )   { 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											 if ( ! map . get ( " cmaterialvid " ) . equals ( cmrl ) ) { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 continue ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 DchangeSlave1VO   slave1VO = new   DchangeSlave1VO ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 slave1VO . setPlannum ( ( UFDouble )   map . get ( " nassaccpraynum " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 slave1VO . setCbmaterialvid ( ( String )   map . get ( " cmaterialvid " ) ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											 slave1VO . setMrpbillcode ( ( String )   map . get ( " vbillcode " ) ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 list1 . add ( slave1VO ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 dchangeMasterVO . setDchangeslave1_dchangeslave1 ( list1 . toArray ( new   DchangeSlave1VO [ 0 ] ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < DchangeSlave2VO >   list2 = new   ArrayList < > ( ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										 List < String >   mrpbillcode = new   ArrayList < > ( ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 for   ( Map < String , Object >   map   :   mrpPlan )   { 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											 if ( ! map . get ( " cmaterialvid " ) . equals ( cmrl ) ) { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 continue ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 DchangeSlave2VO   slave1VO = new   DchangeSlave2VO ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 slave1VO . setPlannum ( ( UFDouble )   map . get ( " nassaccpraynum " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 slave1VO . setCbmaterialvid ( ( String )   map . get ( " cmaterialvid " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 slave1VO . setMrpbillcode ( ( String )   map . get ( " mrpbillcode " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 list2 . add ( slave1VO ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											 mrpbillcode . add ( ( String )   map . get ( " mrpbillcode " ) ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 dchangeMasterVO . setDchangeslave2_dchangeslave2 ( list2 . toArray ( new   DchangeSlave2VO [ 0 ] ) ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
										 
							
							
								//<2F> <> <EFBFBD> ݼƻ<DDBC> <C6BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ѯ<EFBFBD> ɹ<EFBFBD> <C9B9> <EFBFBD> <EFBFBD> <EFBFBD>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < Map < String , Object > >   buyingreq = getbuyingreq ( mrpbillcode ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < DchangeSlave3VO >   list3 = new   ArrayList < > ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 for   ( Map < String , Object >   map   :   buyingreq )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 if ( ! map . get ( " cmaterialvid " ) . equals ( cmrl ) ) { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 continue ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 DchangeSlave3VO   slave1VO = new   DchangeSlave3VO ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//			slave1VO.setNewnum(new UFDouble((Double) map.get("nastnum")).add()); 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 slave1VO . setNewnum ( afternum ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 slave1VO . setPk_material ( ( String )   map . get ( " cmaterialvid " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 slave1VO . setParybillcode ( ( String )   map . get ( " mrpbillcode " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 list3 . add ( slave1VO ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								//			mrpbillcode.add((String) map.get("mrpbillcode")); 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 dchangeMasterVO . setDchangeslave3_dchangeslave3 ( list3 . toArray ( new   DchangeSlave3VO [ 0 ] ) ) ; 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 Object   pk_org   =   hy . findColValue ( " org_orgs " ,   " pk_org " ,   " code  = ' " + headJson . get ( " pk_org " ) + " ' and nvl(dr,0)=0 and isbusinessunit='Y'  " ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 headJson . put ( " pk_org " ,   pk_org ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 DchangeMasterVO   headVO   =   new   DchangeMasterVO ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 IAttributeMeta [ ]   headAttrs   =   headVO . getMetaData ( ) . getAttributes ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 for   ( IAttributeMeta   attribute   :   headAttrs )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 Object   value   =   getValueByAttr ( headJson ,   attribute ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 headVO . setAttributeValue ( attribute . getName ( ) ,   value ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 headVO . setStatus ( voStatus ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   headVO ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   List < Map < String ,   Object > >   getbuyingreq ( List < String >   code )   throws   DAOException   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 String   placeholders   =   String . join ( " , " ,   Collections . nCopies ( code . size ( ) ,   " ? " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 String   sql   =   "   SELECT * from  po_praybill_b WHERE vsourcecode IN ( "   +   placeholders   +   " ) " ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < Map < String , Object > >   remain   =   ( List < Map < String ,   Object > > )   new   BaseDAO ( ) . executeQuery ( sql ,   new   MapListProcessor ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   remain ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
									 //	<09> <> ȡmrp<72> ƻ<EFBFBD> <C6BB> <EFBFBD> <EFBFBD> <EFBFBD>  
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   List < Map < String , Object > >   getMRPPlan ( List < String >   codes )   throws   BusinessException   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
										 // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> codes<65> <73> <EFBFBD> <EFBFBD> ƥ<EFBFBD> <C6A5> <EFBFBD> <EFBFBD> ռ <D5BC> <CEBB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : ?, ?, ?<3F> <>  
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 String   placeholders   =   String . join ( " , " ,   Collections . nCopies ( codes . size ( ) ,   " ? " ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 String   sql   =   "   \ t \ tSELECT \ n "   + 
  
						 
					
						
							
								
									
										
										
										
											2025-10-14 19:34:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												 " \ tcmaterialvid, "   + 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 "   vbillcode, \ n "   + 
  
						 
					
						
							
								
									
										
										
										
											2025-09-26 09:18:39 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 " \ tnassaccponum, \ n "   + 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 " \ tnassaccpraynum \ n "   + 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 " FROM \ n "   + 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 " \ tmm_plo \ n "   + 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 " WHERE \ n "   + 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 " \ tfpotype = '1' \ n "   + 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 "   AND vsrccode IN ( "   +   placeholders   +   " ) " ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < Map < String , Object > >   remain   =   ( List < Map < String ,   Object > > )   new   BaseDAO ( ) . executeQuery ( sql ,   new   MapListProcessor ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   remain ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   Object   getValueByAttr ( JSONObject   json ,   IAttributeMeta   attribute )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 Object   value   =   json . get ( attribute . getName ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 if   ( value   = =   null   | |   StringUtils . isEmpty ( value . toString ( ) ) )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 return   null ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 JavaType   javaType   =   attribute . getJavaType ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 switch   ( javaType )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   String : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   UFStringEnum : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   value . toString ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   BigDecimal : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   new   BigDecimal ( value . toString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   Integer : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   UFFlag : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   Integer . valueOf ( value . toString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   UFDouble : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   new   UFDouble ( value . toString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   UFBoolean : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   new   UFBoolean ( value . toString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   UFDate : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   new   UFDate ( value . toString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   UFDateTime : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   new   UFDateTime ( value . toString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   UFTime : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   new   UFTime ( value . toString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 case   UFLiteralDate : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   new   UFLiteralDate ( value . toString ( ) ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											 default : 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												 return   value ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   List < String >   getRequiredFields ( JSONObject   obj )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 List < String >   notNullFields   =   new   ArrayList < String > ( ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   notNullFields ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 private   IDchangeMasterVOService   getService ( )   { 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										 return   NCLocator . getInstance ( ) . lookup ( IDchangeMasterVOService . class ) ; 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 } 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}