|
@@ -0,0 +1,118 @@
|
|
|
|
+package nccloud.web.cmp.billmanagement.paybills.action;
|
|
|
|
+
|
|
|
|
+import nc.bs.framework.common.NCLocator;
|
|
|
|
+import nc.impl.pubapp.pattern.data.vo.VOQuery;
|
|
|
|
+import nc.itf.uap.IVOPersistence;
|
|
|
|
+import nc.vo.cmp.bill.BillAggVO;
|
|
|
|
+import nc.vo.cmp.bill.BillDetailVO;
|
|
|
|
+import nc.vo.cmp.bill.BillVO;
|
|
|
|
+import nc.vo.cmp.informer.InformerVO;
|
|
|
|
+import nc.vo.ifm.redeem.InvestRedeemVO;
|
|
|
|
+import nc.vo.pub.BusinessException;
|
|
|
|
+import nc.vo.pub.lang.UFDouble;
|
|
|
|
+import nccloud.framework.core.exception.ExceptionUtils;
|
|
|
|
+import nccloud.framework.web.container.IRequest;
|
|
|
|
+import nccloud.framework.web.ui.pattern.billcard.BillCard;
|
|
|
|
+import nccloud.web.cmp.billmanagement.paybills.common.EnumFlowOperation;
|
|
|
|
+import nccloud.web.cmp.billmanagement.paybills.common.NCCClientInfo;
|
|
|
|
+import nccloud.web.cmp.billmanagement.paybills.common.PaybillsCommonAction;
|
|
|
|
+import nccloud.web.cmp.billmanagement.paybills.common.PaybillsUtil;
|
|
|
|
+import nccloud.web.tmpub.pub.ms.util.SagasBizUtil;
|
|
|
|
+
|
|
|
|
+public class PaybillsInsertAction extends PaybillsCommonAction {
|
|
|
|
+ public Object doAction(IRequest request) {
|
|
|
|
+ plog.start("save+paybill-zhuanhuancard");
|
|
|
|
+ BillCard card = super.getCard(request);
|
|
|
|
+ plog.end("paybill-canshuzhuanhuan");
|
|
|
|
+ String pagecode = card.getPageid();
|
|
|
|
+ plog.start("paybillzhuanhuan-vo");
|
|
|
|
+ BillAggVO vo = super.aggVOConvert(request);
|
|
|
|
+ plog.end("paybill-zhuanhuanvo");
|
|
|
|
+ if (null != vo.getParentVO()) {
|
|
|
|
+ ((BillVO) vo.getParentVO()).setBill_status(-10);
|
|
|
|
+ ((BillVO) vo.getParentVO()).setBill_type("F5");
|
|
|
|
+ BillDetailVO[] detailvos = (BillDetailVO[]) vo.getChildrenVO();
|
|
|
|
+ for (BillDetailVO detailvo: detailvos) {
|
|
|
|
+ detailvo.setBill_type("F5");
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+// if(null == ((BillVO)vo.getParentVO()).getCustomerName()) {
|
|
|
|
+// NCCClientInfo clientInfo = new NCCClientInfo();
|
|
|
|
+// String user = clientInfo.getClientInfo().getUserid();
|
|
|
|
+//// ((BillVO) vo.getParentVO()).setCustomerName(user);
|
|
|
|
+// ((BillVO) vo.getParentVO()).setPk_customer(user);
|
|
|
|
+// BillDetailVO[] detailvos = (BillDetailVO[]) vo.getChildrenVO();
|
|
|
|
+// for (BillDetailVO detailvo: detailvos) {
|
|
|
|
+// detailvo.setCustomerName(user);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+ plog.start("paybill-chulijibenxinxi");
|
|
|
|
+ PaybillsUtil.Paybills2BusiAgg(vo);
|
|
|
|
+ plog.end("paybill-chulijibenxinxi");
|
|
|
|
+ BillAggVO[] result = null;
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+ plog.start("paybillsaga-caozuoxinxi");
|
|
|
|
+ SagasBizUtil.setOperInfo("36070PBR_D5_card", "save");
|
|
|
|
+ plog.end("paybillsagacaozuoxinxi");
|
|
|
|
+ plog.start("paybill-zhixingdongzuojiaoben");
|
|
|
|
+ result = super.cloudPFlowEvent(new BillAggVO[]{super.deleteRow(vo)}, EnumFlowOperation.SAVEBASE.getCode());
|
|
|
|
+ plog.end("paybill-zhixingdongzuojiaoben");
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ * 到账通知发布生成的付款结算
|
|
|
|
+ * 回写信息到到账通知发布
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+ for(BillAggVO aggvo:result) {
|
|
|
|
+ BillVO headvo=(BillVO) aggvo.getParentVO();
|
|
|
|
+ if (null != headvo.getDef11()) {
|
|
|
|
+ VOQuery<InformerVO> querysordr = new VOQuery<InformerVO>(InformerVO.class);
|
|
|
|
+ //到账通知发布主表
|
|
|
|
+ String [] pks=new String[] {headvo.getDef11()};
|
|
|
|
+ InformerVO[] informerVO = querysordr.query(pks);
|
|
|
|
+// if(headvo.getRedeemmoney().compareTo(informerVO[0].getMoneyy())!=0) {
|
|
|
|
+// ExceptionUtils.wrapBusinessException("理财赎回表头【赎回金额】要等于 到账通知的【金额】! ");
|
|
|
|
+// }
|
|
|
|
+ if(!headvo.getDef12().equals("")) {
|
|
|
|
+ UFDouble srcmoney = new UFDouble(headvo.getDef12());
|
|
|
|
+ if(!srcmoney.equals(headvo.getPrimal_money())) {
|
|
|
|
+ ExceptionUtils.wrapBusinessException("付款金额和到账通知的金额不等,请检验。 ");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ informerVO[0].setGenerateflag("hasgenerate");//已生成
|
|
|
|
+ informerVO[0].setUsemoney(headvo.getPrimal_money());//赎回金额--付款原币金额(付款结算)
|
|
|
|
+ informerVO[0].setPk_claimer(headvo.getBillmaker());//认证人
|
|
|
|
+ informerVO[0].setClaimdate(headvo.getBill_date());//认证日期
|
|
|
|
+ informerVO[0].setPk_lower(headvo.getPk_paybill());//主键
|
|
|
|
+ informerVO[0].setLowerbilltype("F5");
|
|
|
|
+ informerVO[0].setDr(0);
|
|
|
|
+
|
|
|
|
+ IVOPersistence ivopce=(IVOPersistence) NCLocator.getInstance().lookup(IVOPersistence.class.getName());
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+ ivopce.updateVO(informerVO[0]);
|
|
|
|
+ } catch (BusinessException e) {
|
|
|
|
+ // TODO Auto-generated catch block
|
|
|
|
+ ExceptionUtils.wrapBusinessException(e.getMessage());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /***************************************************************************/
|
|
|
|
+
|
|
|
|
+ return super.cardAfterHandler(pagecode, result[0], card);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ } catch (BusinessException var7) {
|
|
|
|
+ ExceptionUtils.wrapBusinessException(var7.getMessage());
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|