单据校验源码
This commit is contained in:
		
							parent
							
								
									608b42b487
								
							
						
					
					
						commit
						fa30baf3aa
					
				|  | @ -0,0 +1,73 @@ | |||
| // | ||||
| // Source code recreated from a .class file by IntelliJ IDEA | ||||
| // (powered by FernFlower decompiler) | ||||
| // | ||||
| 
 | ||||
| package nccloud.web.pu.arrival.action; | ||||
| 
 | ||||
| import java.util.HashMap; | ||||
| import java.util.Map; | ||||
| import nc.pubitf.pu.m23.pubquery.IArrivePubQuery; | ||||
| import nc.vo.ml.NCLangRes4VoTransl; | ||||
| import nc.vo.pu.m23.entity.ArriveItemVO; | ||||
| import nc.vo.pu.m23.entity.ArriveVO; | ||||
| import nc.vo.pub.lang.UFDateTime; | ||||
| import nccloud.dto.pu.arrival.entity.ExeInfo; | ||||
| import nccloud.dto.pu.arrival.entity.PkTsParamsVO; | ||||
| import nccloud.framework.core.exception.ExceptionUtils; | ||||
| import nccloud.framework.core.json.IJson; | ||||
| import nccloud.framework.service.ServiceLocator; | ||||
| import nccloud.framework.web.action.itf.ICommonAction; | ||||
| import nccloud.framework.web.container.IRequest; | ||||
| import nccloud.framework.web.json.JsonFactory; | ||||
| import nccloud.framework.web.ui.pattern.billcard.BillCard; | ||||
| import nccloud.framework.web.ui.pattern.billcard.BillCardOperator; | ||||
| import nccloud.pubitf.pu.arrival.service.IArrivalExeService; | ||||
| import nccloud.web.pu.arrival.utis.ArrivalScalaSetter; | ||||
| 
 | ||||
| public class QCAction implements ICommonAction { | ||||
|     public QCAction() { | ||||
|     } | ||||
| 
 | ||||
|     public Object doAction(IRequest request) { | ||||
|         BillCard card = null; | ||||
| 
 | ||||
|         try { | ||||
|             String read = request.read(); | ||||
|             IJson json = JsonFactory.create(); | ||||
|             ExeInfo info = (ExeInfo)json.fromJson(read, ExeInfo.class); | ||||
|             Map<String, UFDateTime> idTsMap = new HashMap(); | ||||
|             if (info.getPkTsParams() != null && info.getPkTsParams().length > 0) { | ||||
|                 for(PkTsParamsVO param : info.getPkTsParams()) { | ||||
|                     idTsMap.put(param.getPk(), new UFDateTime(param.getTs())); | ||||
|                 } | ||||
| 
 | ||||
|                 if (idTsMap.size() > 0) { | ||||
|                     IArrivePubQuery query = (IArrivePubQuery)ServiceLocator.find(IArrivePubQuery.class); | ||||
|                     ArriveVO[] vos = query.queryAggVOByBids((String[])idTsMap.keySet().toArray(new String[idTsMap.keySet().size()])); | ||||
|                     if (vos != null && vos.length > 0) { | ||||
|                         for(ArriveItemVO item : vos[0].getBVO()) { | ||||
|                             item.setTs((UFDateTime)idTsMap.get(item.getPk_arriveorder_b())); | ||||
|                         } | ||||
| 
 | ||||
|                         IArrivalExeService service = (IArrivalExeService)ServiceLocator.find(IArrivalExeService.class); | ||||
|                         ArriveVO[] retVOs = service.qualityCheck(vos); | ||||
|                         BillCardOperator operator = new BillCardOperator(info.getPageid()); | ||||
|                         card = operator.toCard(retVOs[0]); | ||||
|                         if (card != null) { | ||||
|                             ArrivalScalaSetter.setArrivalScalaBillCard(card); | ||||
|                         } | ||||
| 
 | ||||
|                         return card; | ||||
|                     } | ||||
| 
 | ||||
|                     ExceptionUtils.wrapBusinessException(NCLangRes4VoTransl.getNCLangRes().getStrByID("4004100_0", "04004100-0003")); | ||||
|                 } | ||||
|             } | ||||
|         } catch (Exception e) { | ||||
|             ExceptionUtils.wrapException(e); | ||||
|         } | ||||
| 
 | ||||
|         return null; | ||||
|     } | ||||
| } | ||||
		Loading…
	
		Reference in New Issue