Browse Source

代码整合

yaoyu 3 years ago
parent
commit
741e33a846

+ 1 - 1
zjcmp_cd/.classpath

@@ -21,6 +21,6 @@
 	<classpathentry kind="con" path="com.yonyou.studio.udt.core.container/Module_Lang_Library"/>
 	<classpathentry kind="con" path="com.yonyou.studio.udt.core.container/Generated_EJB"/>
 	<classpathentry kind="con" path="com.yonyou.studio.udt.core.container/NCCloud_Library"/>
-	<classpathentry kind="lib" path="C:/Users/Administrator/Desktop/icdmc_icdmc.jar"/>
+	<classpathentry kind="lib" path="D:/YY/zhenong/hdgit/icdmc_icdmc.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

+ 1 - 0
zjcmp_cd/zjcmp_cd/classes/.gitignore

@@ -1 +1,2 @@
 /nccloud/
+/RepayPrcplQueryCardAction.class

+ 13 - 15
zjcmp_cd/zjcmp_cd/src/client/nccloud/web/cdmc/cdm/repayprcpl/action/RepayPrcplCommitAction.java

@@ -64,23 +64,21 @@ public class RepayPrcplCommitAction extends CommonCommitAction<AggRepayPrcplVO>
 					sagaService.checkFrozen(adapterFinancePay, parentVO.getPk_financepay());
 				}
 			}
-
+			Object obj = super.doCommitProcess(operaVOs, userobj, new TMSagasBizInfoAdapter[]{adapter});
 			
-			try {
-				IUAPQueryBS iuap = NCLocator.getInstance().lookup(IUAPQueryBS.class);
-				//给银行对账-单位日记账标识码赋值
-				String sql ="update cmp_bankaccdetail "
-						+ "set bankrelated_code = '"+operaVOs[0].getParent().getAttributeValue("vdef5").toString()+"'   "
-								+ "where vbillno = '"+operaVOs[0].getParent().getAttributeValue("vbillno").toString()+"' and nvl(dr,0)=0";
-				iuap.executeQuery(sql, null);
-			} catch (Exception e) {
-				
+			IUAPQueryBS iuap = NCLocator.getInstance().lookup(IUAPQueryBS.class);
+			for (int var9 = 0; var9 < var7; ++var9) {
+				try {
+					//给银行对账-单位日记账标识码赋值
+					String sql ="update cmp_bankaccdetail "
+							+ "set bankrelated_code = '"+operaVOs[var9].getParent().getAttributeValue("vdef5").toString()+"'   "
+									+ "where vbillno = '"+operaVOs[var9].getParent().getAttributeValue("vbillno").toString()+"' and nvl(dr,0)=0";
+					iuap.executeQuery(sql, null);
+				} catch (Exception e) {
+					
+				}
 			}
-			
-			
-			
-			
-			return super.doCommitProcess(operaVOs, userobj, new TMSagasBizInfoAdapter[]{adapter});
+			return obj;
 		} catch (BusinessException var12) {
 			ExceptionUtils
 					.wrapException(NCLangRes4VoTransl.getNCLangRes().getStrByID("cdmc_ncc003_0", "0cdmc_ncc003-0039")

+ 19 - 18
zjcmp_cd/zjcmp_cd/src/client/nccloud/web/cdmc/cdm/repayprcpl/action/RepayPrcplSaveAction.java

@@ -37,6 +37,24 @@ public class RepayPrcplSaveAction extends CommonSaveAction<AggRepayPrcplVO> {
 			children[i].setAttributeValue("pk_repprcpl_plan", (Object) null);
 			children[i].setStatus(2);
 		}
+		 InformerVO[] informerVO =new InformerVO[1];
+		  RepayPrcplVO headvo=operaVO.getParentVO();
+		  if (null != headvo.getVdef4()) {
+			  VOQuery<InformerVO> querysordr = new VOQuery<InformerVO>(InformerVO.class);
+		         //到账通知发布主表
+		    	 String [] pks=new String[] {headvo.getVdef4()};
+		   	     informerVO = querysordr.query(pks);
+			  
+				if(headvo.getRepaymny().compareTo(informerVO[0].getMoneyy())!=0) {
+					ExceptionUtils.wrapBusinessException("贷款还本表头[还本金额]不等于到账通知的[金额]!");
+				}
+				 informerVO[0].setGenerateflag("hasgenerate");//已生成
+		    	 informerVO[0].setUsemoney(headvo.getRepaymny());//赎回金额
+		    	 informerVO[0].setPk_claimer(headvo.getBillmaker());//认证人
+		    	 informerVO[0].setClaimdate(headvo.getBillmakedate());//认证日期
+		    	 informerVO[0].setLowerbilltype("36Z4");
+		    	 informerVO[0].setDr(0);
+			}
 
 		Object result = super.callActionScript(CdmcPubConst.CONST_ACTION_SAVEBASE,
 				CdmcPubConst.CONST_BILLTYPE_REPAYPRCPL, new AggRepayPrcplVO[]{operaVO});
@@ -46,26 +64,9 @@ public class RepayPrcplSaveAction extends CommonSaveAction<AggRepayPrcplVO> {
 						RepayPrcplUtil.getBodyPrecisionFields4VO(), false, true));
 		
 		
-		/*******保存回写数据到到账发布****************/
-		
-		  RepayPrcplVO headvo=operaVO.getParentVO();
 			if (null != headvo.getVdef4()) {
-	    	 VOQuery<InformerVO> querysordr = new VOQuery<InformerVO>(InformerVO.class);
-	         //到账通知发布主表
-	    	 String [] pks=new String[] {headvo.getVdef4()};
-	   	    InformerVO[] informerVO = querysordr.query(pks);
-	   	    
-	    	 informerVO[0].setGenerateflag("hasgenerate");//已生成
-//	    	 informerVO[0].setUsemoney(headvo.getRedeemmoney());//赎回金额
-	    	 informerVO[0].setPk_claimer(headvo.getBillmaker());//认证人
-	    	 informerVO[0].setClaimdate(headvo.getBillmakedate());//认证日期
-	    	 informerVO[0].setPk_lower(headvo.getPk_repayprcpl());//主键
-	    	 informerVO[0].setLowerbilltype("36CX");
-	    	 informerVO[0].setDr(0);
-	    //	 informerVO[0].setSubfamily("3642");
-	    	 
+	    	 informerVO[0].setPk_lower(saveVOs[0].getParent().getAttributeValue("pk_repayprcpl").toString());//贷款还本主键
 	    	 IVOPersistence ivopce=(IVOPersistence) NCLocator.getInstance().lookup(IVOPersistence.class.getName());
-	    	 
 	    	 try {
 				ivopce.updateVO(informerVO[0]);
 			} catch (BusinessException e) {

+ 11 - 8
zjcmp_cd/zjcmp_cd/src/client/nccloud/web/ifm/investapply/action/ApplyCommitAction.java

@@ -42,15 +42,18 @@ public class ApplyCommitAction extends CommonCommitAction<AggInvestApplyVO> {
 		InvestApplySagaInfoAdapter adapter =
 				new InvestApplySagaInfoAdapter();
 		Object result = super.doCommitProcess(operaVOs, userobj,adapter);
-		try {
-			//给银行对账-单位日记账标识码赋值
-			String sql ="update cmp_bankaccdetail "
-					+ "set bankrelated_code = '"+operaVOs[0].getParent().getAttributeValue("vdef6").toString()+"'   "
-							+ "where vbillno = '"+operaVOs[0].getParent().getAttributeValue("vbillno").toString()+"' and nvl(dr,0)=0";
-			iuap.executeQuery(sql, null);
-		} catch (Exception e) {
-			// TODO: handle exception
+		for (int i = 0; i < operaVOs.length; i++) {
+			try {
+				//给银行对账-单位日记账标识码赋值
+				String sql ="update cmp_bankaccdetail "
+						+ "set bankrelated_code = '"+operaVOs[i].getParent().getAttributeValue("vdef6").toString()+"'   "
+								+ "where vbillno = '"+operaVOs[i].getParent().getAttributeValue("vbillno").toString()+"' and nvl(dr,0)=0";
+				iuap.executeQuery(sql, null);
+			} catch (Exception e) {
+				// TODO: handle exception
+			}
 		}
+		
 		return result;
 	}
 

+ 145 - 0
zjcmp_cd/zjcmp_cd/src/client/nccloud/web/ifm/investapply/action/ApplySaveAction.java

@@ -0,0 +1,145 @@
+package nccloud.web.ifm.investapply.action;
+
+import java.util.List;
+import java.util.Map;
+
+import nc.bs.framework.common.NCLocator;
+import nc.impl.pubapp.pattern.data.vo.VOQuery;
+import nc.itf.fi.rateconfig.IRateconfigQueryService;
+import nc.itf.uap.IUAPQueryBS;
+import nc.itf.uap.IVOPersistence;
+import nc.ui.bm.bmfile.view.dialog.SetClassInfoWizardStep;
+import nc.vo.cmp.informer.InformerVO;
+import nc.vo.ifm.apply.AggInvestApplyVO;
+import nc.vo.ifm.apply.InvestApplyVO;
+import nc.vo.ifm.constants.TMIFMConst;
+import nc.vo.imf.constants.TMIMFConst;
+import nc.vo.jcom.lang.StringUtil;
+import nc.vo.pub.BusinessException;
+import nc.vo.pub.lang.UFDate;
+import nccloud.framework.core.exception.ExceptionUtils;
+import nccloud.framework.service.ServiceLocator;
+import nccloud.framework.web.container.SessionContext;
+import nccloud.framework.web.convert.translate.Translator;
+import nccloud.framework.web.processor.template.ExtBillCardConvertProcessor;
+import nccloud.framework.web.ui.pattern.extbillcard.ExtBillCard;
+import nccloud.vo.tmpub.precison.PrecisionField;
+import nccloud.web.ifm.common.action.CommonSaveAction;
+import nccloud.web.ifm.investapply.util.ApplyPubUtil;
+import nccloud.web.tmpub.util.NCCFrontPrecisionUtil;
+
+public class ApplySaveAction extends CommonSaveAction<AggInvestApplyVO> {
+	protected AggInvestApplyVO doBusinessSave(AggInvestApplyVO operaVO) {
+		try {
+			InvestApplyVO headVO = (InvestApplyVO) operaVO.getParent();
+			InformerVO[] informerVO = new InformerVO[1];
+			//到账通知发布主键
+			String pk_informer  = headVO.getVdef5();
+			if(pk_informer !=null) {
+				String[] pks = new String[] {pk_informer};
+				//到账通知发布主表
+				VOQuery<InformerVO> querysordr = new VOQuery<InformerVO>(InformerVO.class);
+				informerVO = querysordr.query(pks);
+				if(headVO.getMoney().compareTo(informerVO[0].getMoneyy())!=0) {
+					ExceptionUtils.wrapBusinessException("理财申购表头[理财金额]不等于到账通知的[金额]!");
+				}
+				//生成状态
+				informerVO[0].setGenerateflag("hasgenerate");
+				//领用金额
+				informerVO[0].setUsemoney(headVO.getMoney());
+				//认领人
+				informerVO[0].setPk_claimer(headVO.getBillmaker());
+				//认领日期
+				informerVO[0].setClaimdate(headVO.getBillmakedate());
+				
+				informerVO[0].setLowerbilltype("3641");
+				informerVO[0].setDr(0);
+				
+				
+			}
+			this.doBefore(operaVO);
+			AggInvestApplyVO[] result = (AggInvestApplyVO[]) ((AggInvestApplyVO[]) this.callActionScript(
+					TMIMFConst.CONST_ACTION_SAVEBASE, TMIMFConst.CONST_BILLTYPE_APPLY,
+					new AggInvestApplyVO[]{operaVO}));
+			if (result == null || result.length == 0) {
+				return null;
+			}
+			if(pk_informer != null) {
+				//下游单据主键
+				informerVO[0].setPk_lower(result[0].getParent().getAttributeValue("pk_apply").toString());
+				IVOPersistence ivop = (IVOPersistence) NCLocator.getInstance().lookup(IVOPersistence.class.getName());
+				ivop.updateVO(informerVO[0]);
+			}
+			
+			operaVO = result[0];
+			
+		} catch (BusinessException var3) {
+			ExceptionUtils.wrapException(var3);
+		}
+
+		return operaVO;
+	}
+
+	protected ExtBillCard buildFontResult(AggInvestApplyVO resultVO) {
+		ExtBillCard billCard = new ExtBillCard();
+		if (resultVO == null) {
+			return billCard;
+		} else {
+			int ratedigit = this.getRateDigit();
+			InvestApplyVO parentVO = resultVO.getParentVO();
+			parentVO.setAttributeValue("expectedrate", parentVO.getExpectedrate().setScale(ratedigit, 4));
+			ExtBillCardConvertProcessor processor = new ExtBillCardConvertProcessor();
+			billCard = processor.convert(this.getPageCode(), resultVO);
+			Translator translator = new Translator();
+			translator.translate(billCard);
+
+			try {
+				NCCFrontPrecisionUtil.processExtBillCardPrecision(billCard, this.getHeadPrecisionFields(), (Map) null);
+			} catch (BusinessException var8) {
+				ExceptionUtils.wrapException(var8);
+			}
+
+			return billCard;
+		}
+	}
+
+	private int getRateDigit() {
+		IRateconfigQueryService service = (IRateconfigQueryService) ServiceLocator.find(IRateconfigQueryService.class);
+		int digits = 0;
+
+		try {
+			digits = service.queryRateSysParaInt();
+		} catch (BusinessException var4) {
+			ExceptionUtils.wrapException(var4);
+		}
+
+		return digits;
+	}
+
+	protected String getPageCode() {
+		return TMIMFConst.CONST_PAGECODE_ADJUST_CARD;
+	}
+
+	private void doBefore(AggInvestApplyVO operaVO) throws BusinessException {
+		InvestApplyVO headVO = operaVO.getParentVO();
+		if (StringUtil.isEmptyWithTrim(headVO.getPrimaryKey())) {
+			headVO.setAttributeValue("creator", SessionContext.getInstance().getClientInfo().getUserid());
+			headVO.setAttributeValue("creationtime",
+					new UFDate(SessionContext.getInstance().getClientInfo().getBizDateTime()));
+			headVO.setAttributeValue("billmaker", SessionContext.getInstance().getClientInfo().getUserid());
+			headVO.setAttributeValue("billmakedate",
+					new UFDate(SessionContext.getInstance().getClientInfo().getBizDateTime()));
+			headVO.setPk_billtypecode(TMIFMConst.CONST_BILLTYPE_APPLY);
+			headVO.setAttributeValue("versiontime",
+					new UFDate(SessionContext.getInstance().getClientInfo().getBizDateTime()));
+			headVO.setAttributeValue("pk_billtypecode", TMIMFConst.CONST_BILLTYPE_APPLY);
+			headVO.setAttributeValue("redeemstatus", 1);
+		}
+
+		headVO.setAttributeValue("holdmoney", headVO.getMoney());
+	}
+
+	protected List<PrecisionField> getHeadPrecisionFields() {
+		return ApplyPubUtil.getHeadPrecisionFields();
+	}
+}