Merge branch 'master' of http://121.37.179.211:3000/yonyou/ic
This commit is contained in:
		
						commit
						766ea47576
					
				|  | @ -1,74 +0,0 @@ | ||||||
| package nc.impl.pu.dhjyd.dhjydmaster; |  | ||||||
| 
 |  | ||||||
| import java.util.ArrayList; |  | ||||||
| import java.util.Map; |  | ||||||
| 
 |  | ||||||
| import nc.bs.framework.common.NCLocator; |  | ||||||
| import nc.bs.pub.pf.PfUtilTools; |  | ||||||
| import nc.itf.pu.dhjyd.dhjydmaster.IArriveToDhjyd; |  | ||||||
| import nc.itf.pu.dhjyd.dhjydmaster.IDhjydMasterVOService; |  | ||||||
| import nc.vo.pu.dhjyd.AggDhjydMasterVO; |  | ||||||
| import nc.vo.pu.dhjyd.DhjydMasterVO; |  | ||||||
| import nc.vo.pu.dhjyd.DhjydSlave0VO; |  | ||||||
| import nc.vo.pu.m23.entity.ArriveHeaderVO; |  | ||||||
| import nc.vo.pu.m23.entity.ArriveItemVO; |  | ||||||
| import nc.vo.pu.m23.entity.ArriveVO; |  | ||||||
| import nc.vo.pub.BusinessException; |  | ||||||
| import nc.vo.pub.lang.UFDate; |  | ||||||
| 
 |  | ||||||
| public class ArriveToDhjydImpl implements IArriveToDhjyd { |  | ||||||
| 
 |  | ||||||
| 	/*** |  | ||||||
| 	   * 到货单生成到货检验单 |  | ||||||
| 	  * @param ArriveVO |  | ||||||
| 	  * @return |  | ||||||
| 	  */ |  | ||||||
| 	@Override |  | ||||||
| 	public Map<String, String> createDhjyd_RequiresNew(ArriveVO arriveVO) throws BusinessException { |  | ||||||
| 		 |  | ||||||
| 		try { |  | ||||||
| 			 |  | ||||||
| 			ArriveHeaderVO arriveHeadVo = arriveVO.getHVO();//获取到货单表头信息 |  | ||||||
| 			ArriveItemVO[] arriveItems = arriveVO.getBVO();//获取到货单表体信息 |  | ||||||
| 			 |  | ||||||
| 			//到货单集合获取 |  | ||||||
| 			ArrayList<ArriveVO> arrayList = new ArrayList<ArriveVO>(); |  | ||||||
| 			arrayList.add(arriveVO); |  | ||||||
| 			 |  | ||||||
| 			// 单据转换 到货单-->到货检验单 |  | ||||||
| 			AggDhjydMasterVO[] vos = (AggDhjydMasterVO[]) PfUtilTools.runChangeDataAry("23", "DHJY", |  | ||||||
| 					arrayList.toArray(new ArriveVO[0])); |  | ||||||
| 			 |  | ||||||
| 			DhjydMasterVO masterVO = vos[0].getParentVO();//检验单表头信息获取 |  | ||||||
| 			masterVO.setStatus(2);//新增(0:初始  1:更新  2:新增  3:删除) |  | ||||||
| 			masterVO.setBilltype("DHJY");//单据类型 |  | ||||||
| 			masterVO.setSrcbillid(arriveHeadVo.getPk_arriveorder());//来源单id |  | ||||||
| 			masterVO.setVsourcecode(arriveHeadVo.getVbillcode());//来源单据号 |  | ||||||
| 			masterVO.setSrcbilltype(arriveHeadVo.getCtrantypeid());//来源单据号 |  | ||||||
| 			masterVO.setDapplydate(new UFDate());//报检日期 |  | ||||||
| 			masterVO.setApprovestatus(-1);//单据审批状态-1自由态 |  | ||||||
| 			masterVO.setDef1(arriveItems[0].getPk_arriveorder_b());//来源子表主键id |  | ||||||
| 			 |  | ||||||
| 			DhjydSlave0VO[] itemVOs = (DhjydSlave0VO[])vos[0].getChildrenVO();//检验单表体信息 |  | ||||||
| 			if(itemVOs != null && itemVOs.length > 0) { |  | ||||||
| 				for (int i = 0; i < itemVOs.length; i++) { |  | ||||||
| 					itemVOs[0].setStatus(2);//新增(0:初始  1:更新  2:新增  3:删除) |  | ||||||
| 				} |  | ||||||
| 			} |  | ||||||
| 			 |  | ||||||
| 			// 到货检验单保存-生成保存态 |  | ||||||
| 			IDhjydMasterVOService dhjydMasterVO = NCLocator.getInstance().lookup(IDhjydMasterVOService.class); |  | ||||||
| 			dhjydMasterVO.saveAggDhjydMasterVO(vos); |  | ||||||
| 		} catch (Exception e) { |  | ||||||
| 			String errMsg = e.toString(); |  | ||||||
| 			if (e.getCause() != null) { |  | ||||||
| 				errMsg = e.getCause().toString(); |  | ||||||
| 			} |  | ||||||
| 			throw new BusinessException(errMsg); |  | ||||||
| 		} |  | ||||||
| 		 |  | ||||||
| 		// TODO Auto-generated method stub |  | ||||||
| 		return null; |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
|  | @ -14,6 +14,7 @@ import nc.vo.pub.CircularlyAccessibleValueObject; | ||||||
| import nccloud.commons.lang.StringUtils; | import nccloud.commons.lang.StringUtils; | ||||||
| import nc.codeplatform.framework.service.AbstractPfScriptAction; | import nc.codeplatform.framework.service.AbstractPfScriptAction; | ||||||
| import nc.vo.pu.dhjyd.AggDhjydMasterVO; | import nc.vo.pu.dhjyd.AggDhjydMasterVO; | ||||||
|  | import nc.itf.pu.dhjyd.dhjydmaster.IArriveToDhjyd; | ||||||
| import nc.itf.pu.dhjyd.dhjydmaster.IDhjydMasterVOService; | import nc.itf.pu.dhjyd.dhjydmaster.IDhjydMasterVOService; | ||||||
| 
 | 
 | ||||||
| public class N_DHJY_APPROVE extends AbstractPfScriptAction<AggDhjydMasterVO>{ | public class N_DHJY_APPROVE extends AbstractPfScriptAction<AggDhjydMasterVO>{ | ||||||
|  | @ -48,4 +49,12 @@ public class N_DHJY_APPROVE extends AbstractPfScriptAction<AggDhjydMasterVO>{ | ||||||
| 			throw new BusinessException("当前单据未执行保存动作脚本,如果配置了业务流程定义,请检查动作驱动配置!"); | 			throw new BusinessException("当前单据未执行保存动作脚本,如果配置了业务流程定义,请检查动作驱动配置!"); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 	 | ||||||
|  | 	protected void after(PfParameterVO paraVO) throws BusinessException { | ||||||
|  | 		AggDhjydMasterVO[] vos = (AggDhjydMasterVO[])this.getVos(); | ||||||
|  | 		IArriveToDhjyd service = NCLocator.getInstance().lookup(IArriveToDhjyd.class); | ||||||
|  | 		for(int i = 0; i < vos.length; i++) { | ||||||
|  | 			service.writeBackQc(vos[i]); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  | @ -14,6 +14,7 @@ import nc.vo.pub.CircularlyAccessibleValueObject; | ||||||
| import nccloud.commons.lang.StringUtils; | import nccloud.commons.lang.StringUtils; | ||||||
| import nc.codeplatform.framework.service.AbstractPfScriptAction; | import nc.codeplatform.framework.service.AbstractPfScriptAction; | ||||||
| import nc.vo.pu.dhjyd.AggDhjydMasterVO; | import nc.vo.pu.dhjyd.AggDhjydMasterVO; | ||||||
|  | import nc.itf.pu.dhjyd.dhjydmaster.IArriveToDhjyd; | ||||||
| import nc.itf.pu.dhjyd.dhjydmaster.IDhjydMasterVOService; | import nc.itf.pu.dhjyd.dhjydmaster.IDhjydMasterVOService; | ||||||
| 
 | 
 | ||||||
| public class N_DHJY_UNAPPROVE extends AbstractPfScriptAction<AggDhjydMasterVO>{ | public class N_DHJY_UNAPPROVE extends AbstractPfScriptAction<AggDhjydMasterVO>{ | ||||||
|  | @ -48,4 +49,12 @@ public class N_DHJY_UNAPPROVE extends AbstractPfScriptAction<AggDhjydMasterVO>{ | ||||||
| 			throw new BusinessException("当前单据未执行保存动作脚本,如果配置了业务流程定义,请检查动作驱动配置!"); | 			throw new BusinessException("当前单据未执行保存动作脚本,如果配置了业务流程定义,请检查动作驱动配置!"); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 	 | ||||||
|  | 	protected void after(PfParameterVO paraVO) throws BusinessException { | ||||||
|  | 		AggDhjydMasterVO[] vos = (AggDhjydMasterVO[])this.getVos(); | ||||||
|  | 		IArriveToDhjyd service = NCLocator.getInstance().lookup(IArriveToDhjyd.class); | ||||||
|  | 		for(int i = 0; i < vos.length; i++) { | ||||||
|  | 			service.deleteQc(vos[i]); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  | @ -2,6 +2,7 @@ package nc.itf.pu.dhjyd.dhjydmaster; | ||||||
| 
 | 
 | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
| 
 | 
 | ||||||
|  | import nc.vo.pu.dhjyd.AggDhjydMasterVO; | ||||||
| import nc.vo.pu.m23.entity.ArriveVO; | import nc.vo.pu.m23.entity.ArriveVO; | ||||||
| import nc.vo.pub.BusinessException; | import nc.vo.pub.BusinessException; | ||||||
| 
 | 
 | ||||||
|  | @ -17,5 +18,19 @@ public interface IArriveToDhjyd { | ||||||
| 	  * @return | 	  * @return | ||||||
| 	  */ | 	  */ | ||||||
| 	 public Map<String,String> createDhjyd_RequiresNew(ArriveVO arriveVO) throws BusinessException; | 	 public Map<String,String> createDhjyd_RequiresNew(ArriveVO arriveVO) throws BusinessException; | ||||||
|  | 	  | ||||||
|  | 	 /*** | ||||||
|  | 	   *到货检验单审批完成回写到货单的质检明细 | ||||||
|  | 	  * @param AggDhjydMasterVO | ||||||
|  | 	  * @return | ||||||
|  | 	  */ | ||||||
|  | 	 public Map<String,String> writeBackQc(AggDhjydMasterVO aggDhjydMasterVO) throws BusinessException; | ||||||
|  | 	  | ||||||
|  | 	 /*** | ||||||
|  | 	   *到货检验审批收回时删除对应质量信息 | ||||||
|  | 	  * @param AggDhjydMasterVO | ||||||
|  | 	  * @return | ||||||
|  | 	  */ | ||||||
|  | 	 public Map<String,String> deleteQc(AggDhjydMasterVO aggDhjydMasterVO) throws BusinessException; | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue