diff --git a/WebContent/Tenwa/Apzl/productCar/LmProductToCompanyInfo.jsp b/WebContent/Tenwa/Apzl/productCar/LmProductToCompanyInfo.jsp index bd5270f32..8331fc5de 100644 --- a/WebContent/Tenwa/Apzl/productCar/LmProductToCompanyInfo.jsp +++ b/WebContent/Tenwa/Apzl/productCar/LmProductToCompanyInfo.jsp @@ -77,6 +77,7 @@ function saveRecord(){ as_save("myiframe0","parent.AsDialog.ClosePage()"); } + var province=""; // 选择省份 function selectProvinceCode(){ diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/companyLoan.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/CompanyLoan.jsp similarity index 68% rename from WebContent/Tenwa/Lease/Flow/CollectionAudit/companyLoan.jsp rename to WebContent/Tenwa/Lease/Flow/CollectionAudit/CompanyLoan.jsp index 923f08590..9a3cbb67e 100644 --- a/WebContent/Tenwa/Lease/Flow/CollectionAudit/companyLoan.jsp +++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/CompanyLoan.jsp @@ -2,48 +2,48 @@ <%@ include file="/Frame/resources/include/include_begin_list.jspf"%> <% + String flag = "false"; + String flagReadOnly = "1"; + if(CurUser.hasRole("800R00000034")){ + flag = "true"; + flagReadOnly = "0"; + } ASObjectModel doTemp = new ASObjectModel("CompanyLoanList"); ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + ASDataObject ado = dwTemp.getDataObject(); dwTemp.Style="1"; //--设置为Grid风格-- dwTemp.MultiSelect = true; //多选 - dwTemp.ReadOnly = "0"; //只读模式 + dwTemp.ReadOnly = flagReadOnly; //只读模式 // dwTemp.ShowSummary = "1"; //显示小计 dwTemp.setPageSize(10); dwTemp.genHTMLObjectWindow(""); //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 String sButtons[][] = { - {"true","All","Button","保存","保存批次号","as_save(0)","","","","",""}, - {"true","All","Button","上传","上传","upload('')","","","","","btn_icon_up"}, + {flag,"All","Button","保存","保存批次号","as_save(0)","","","","",""}, + {flag,"All","Button","批量修改","批量修改","batch_edit()","","","","",""}, + {"true","All","Button","批量上传","批量上传","upload('')","","","","",""}, + }; %><%@include file="/Frame/resources/include/ui/include_list.jspf"%> <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/CompanyLoanBactchEdit.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/CompanyLoanBactchEdit.jsp new file mode 100644 index 000000000..90844d55a --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/CompanyLoanBactchEdit.jsp @@ -0,0 +1,41 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><% + /* + Author: undefined 2020-08-16 + Content: 示例详情页面 + History Log: + */ + String sPrevUrl = CurPage.getParameter("PrevUrl"); + if(sPrevUrl == null) sPrevUrl = ""; + + String sTempletNo = "CompanyLoanBatchInfo";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + doTemp.setColTips("", "测试"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + //dwTemp.ReadOnly = "-2";//只读模式 + dwTemp.genHTMLObjectWindow(CurPage.getParameter("SerialNo")); + + String sButtons[][] = { + {"true","All","Button","保存","保存所有修改","save()","","","",""}, + {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} + }; + sButtonPosition = "south"; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index f3618bdb1..6620e1c5a 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -1640,6 +1640,7 @@ + @@ -1710,6 +1711,7 @@ + diff --git a/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java b/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java index 79ce8a9c7..70b0b1ebe 100644 --- a/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java +++ b/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java @@ -1,571 +1,589 @@ -package com.tenwa.sdk.controller; - -import java.math.BigDecimal; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.BizObjectQuery; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; -import com.amarsoft.awe.Configure; -import com.tenwa.comm.util.jboutil.DataOperatorUtil; -import com.tenwa.flow.action.comm.BaseFlowStartAction; -import com.tenwa.sdk.VO.SDKDcPayReqxVO; -import com.tenwa.sdk.VO.SDKInfoVO; -import com.tenwa.sdk.VO.SDKPayCallBackVO; -import com.tenwa.sdk.VO.SDKPayCallDetail; -import com.tenwa.sdk.VO.SDKPayRqxVO; -import com.tenwa.sdk.VO.SDKToPayVO; -import com.tenwa.sdk.utils.HttpRequest; -import com.tenwa.sdk.utils.XMLStream; -import com.thoughtworks.xstream.XStream; - -import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; -import jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT; -import jbo.com.tenwa.lease.comm.LC_FUND_INCOME_CALLBACK_DETAIL_TEMP; -import jbo.com.tenwa.lease.comm.LC_FUND_INCOME_CALLBACK_INFO_TEMP; -import jbo.com.tenwa.lease.comm.LC_FUND_INCOME_PAY_DETAIL_TEMP; -import jbo.com.tenwa.lease.comm.LC_FUND_INCOME_PAY_INFO_TEMP; -import jbo.sys.CODE_LIBRARY; -import net.sf.json.JSONObject; - -public class CmbToPayController extends BaseFlowStartAction { - private String distributor_ids; //获取选择的 经销商ID - private String contract_ids; //获取选择的合同ID - private String FLOWUNID ; //流程号、 - - - public String getContract_ids() { - return contract_ids; - } - - public void setContract_ids(String contract_ids) { - this.contract_ids = contract_ids; - } - - public String getFLOWUNID() { - return FLOWUNID; - } - - public void setFLOWUNID(String fLOWUNID) { - FLOWUNID = fLOWUNID; - } - - public String getDistributor_ids() { - return distributor_ids; - } - - public void setDistributor_ids(String distributor_ids) { - this.distributor_ids = distributor_ids; - } - - @SuppressWarnings({ "unchecked", "unused" }) - public synchronized String action(JBOTransaction tx) throws Exception { - /* - * 定义返回参数 - */ - Map map = new HashMap(); - map.put("code", "0") ; - map.put("msg", "") ; - - /* - * 基本参数检查######开始 - */ - if(FLOWUNID==null || "".equals(FLOWUNID)) { - map.put("code", "1") ; - map.put("msg", "流程编号不能为空,请检查") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - //按经销商改为按合同 - /*List distributor_id_list = java.util.Arrays.asList(distributor_ids.split("@")); - if(distributor_id_list==null || distributor_id_list.size()<=0) { - map.put("code", "1") ; - map.put("msg", "尚未选择经销商,请检查") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - }*/ - List contract_id_list = java.util.Arrays.asList(contract_ids.split("@")); - if(contract_id_list==null || contract_id_list.size()<=0) { - map.put("code", "1") ; - map.put("msg", "尚未选择合同,请检查") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - //校验本次发起付款是否为同一个主体 - String contractIds = contract_ids.replaceAll("@", "','"); - String subjectSql = "SELECT subjectId AS subjectuid FROM lb_contract_info WHERE id IN ('"+contractIds+"') GROUP BY subjectId "; - List> lciList = DataOperatorUtil.getDataBySql(subjectSql); - if(lciList.size()>1){ - map.put("code", "1") ; - map.put("msg", "放款合同中有多个主体,请检查!!!") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - String subjectId = lciList.get(0).get("subjectuid"); - /* - * 基本参数检查######开始 - */ - - /* - * 本方放款账户获取######开始 - */ - BizObjectManager accountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); - List accountBoList = null; - if("aa740e4111c111eaaa0000163e0e11e6".equals(subjectId)){ - accountBoList = accountManager.createQuery("select o.id,o.acc_number,o.acc_bank,o.acc_name,o.branch_code,oi.OWN_NAME from o left join jbo.com.tenwa.entity.comm.own.OWN_INFO oi on o.own_id = oi.OWN_NUMBER where o.money_type='01' and o.state_='0010' and o.acc_type='0010' and o.FbSdk='Y' and (o.account_type='out_account' or o.account_type='inAndOut_account') and oi.OWN_NAME='安鹏国际融资租赁(深圳)有限公司'").getResultList(false); - }else if("d989246c11c111eaaa0000163e0e11e6".equals(subjectId)){ - accountBoList = accountManager.createQuery("select o.id,o.acc_number,o.acc_bank,o.acc_name,o.branch_code,oi.OWN_NAME from o left join jbo.com.tenwa.entity.comm.own.OWN_INFO oi on o.own_id = oi.OWN_NUMBER where o.money_type='01' and o.state_='0010' and o.acc_type='0010' and o.FbSdk='Y' and (o.account_type='out_account' or o.account_type='inAndOut_account') and oi.OWN_NAME='安鹏融资租赁(天津)有限公司'").getResultList(false); - } - if( accountBoList==null ||accountBoList.size()==0) { - map.put("code", "1") ; - map.put("msg", "没有匹配的本方账户,请在本方账户中检查!") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - if( accountBoList!=null && accountBoList.size()>1 ) { - map.put("code", "1") ; - map.put("msg", "启用的汽车类放款账户只能同时存在一个,请在本方账户中检查!") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - BizObject accountBo = accountBoList.get(0); - /* - * 本方放款账户获取######结束 - */ - - - /* - * 付款申请基础信息定义######开始 - */ - - //安鹏要求改为从配置文件中读取。 - //String LGNNAM = accountBo.getAttribute("OWN_NAME").toString(); - // String LGNNAM = "安鹏经办"; - // String LGNNAM = "银企直连测试用户113"; - Configure config = Configure.getInstance(); - String LGNNAM = config.getConfigure("LGNNAM"); - String FUNNAM = "DCPAYREQ"; - int DATTYP = 2; - String BUSMOD = "00001"; //默认参数 请按照实际情况谨慎修改 - String BUSCOD = "N02030"; //默认参数 请按照实际情况谨慎修改 - String DBTBBK = accountBo.getAttribute("branch_code").toString(); - String DBTACC = accountBo.getAttribute("acc_number").toString(); - String STLCHN = "F"; //默认参数 - String CCYNBR = "10"; //默认参数 - String TRSTYP = "100001"; //默认参数 - String RCVCHK = "1"; //默认参数 - /* - * 付款申请基础信息定义######结束 - */ - - - /* - * 获取常用代码并将codeno存为主键 方便下面代码调用######开始 - */ - BizObjectManager code_library = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME); - List bank_code_list = code_library.createQuery("select codeno,itemno,itemname from o where codeno in ('bank_reqsts','bank_rtnflg','FeeType')").getResultList(false); - Map bank_reqsts = new HashMap(); //业务请求状态 - Map bank_rtnflg = new HashMap(); //业务处理结果 - Map fee_type = new HashMap(); //费用类型 - - for(BizObject code_bo:bank_code_list) { - String itemno = code_bo.getAttribute("itemno").toString(); - String itemname = code_bo.getAttribute("itemname").toString(); - String codeno = code_bo.getAttribute("codeno").toString(); - if("bank_reqsts".equals(codeno)) { - bank_reqsts.put(itemno, itemname); - }else if("bank_rtnflg".equals(codeno)) { - bank_rtnflg.put(itemno, itemname); - }else { - fee_type.put(itemno, itemname); - } - } - String[] bank_reqsts_array = {"AUT","NTE","WCF","BNK","FIN","ACK","APD","OPR"}; - String[] bank_rtnflg_array = {"S","F","B","R","D","C","M","V","U","T"}; - List bank_reqsts_list = Arrays.asList(bank_reqsts_array); - List bank_rtnflg_list = Arrays.asList(bank_rtnflg_array); - /* - * 获取常用代码并将codeno存为主键 方便下面代码调用######结束 - */ - - - /* - * - */ - SDKToPayVO sDKToPayVO = new SDKToPayVO(); - SDKInfoVO sDKInfoVO = new SDKInfoVO(); - SDKPayRqxVO sDKPayRqxVO = new SDKPayRqxVO(); - List sDKDcPayReqxVOList = new ArrayList(); - - sDKInfoVO.setLGNNAM(LGNNAM); - sDKInfoVO.setFUNNAM(FUNNAM); - sDKInfoVO.setDATTYP(DATTYP); - - sDKPayRqxVO.setBUSCOD(BUSCOD); - sDKPayRqxVO.setBUSMOD(BUSMOD); - - BizObjectManager pay_info_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_PAY_INFO_TEMP.CLASS_NAME); - BizObject pay_info_bo = pay_info_bom.newObject(); - - String CMB_PAY_NO = UUID.randomUUID().toString().replaceAll("-", "") ; // 付款流水号 - pay_info_bo.setAttributeValue("ID", UUID.randomUUID().toString().replaceAll("-", "")); - pay_info_bo.setAttributeValue("FLOWUNID", FLOWUNID); - pay_info_bo.setAttributeValue("INFO_FUNNAM", FUNNAM); - pay_info_bo.setAttributeValue("INFO_DATTYP", DATTYP); - pay_info_bo.setAttributeValue("INFO_LGNNAM", LGNNAM); - pay_info_bo.setAttributeValue("SDKPAYRQX_BUSCOD", BUSCOD); - pay_info_bo.setAttributeValue("SDKPAYRQX_BUSMOD", BUSMOD); - this.initTabeUserInfo(pay_info_bo); - - - List pay_detail_list = null;// 声明 付款发起详情list - BizObjectManager bankBo = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); - BizObject infoOne = null ; - SDKDcPayReqxVO pay_detail = null ; - SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss"); - BizObjectManager pay_detail_bom = null ; - String error_msg_tips = ""; //定义错误信息 是否存在 - String error_null_tips = ""; //定义错误信息 是否为空 - - - if(contract_id_list.size() > 30){ //招行文档规定 单次批量申请不能超过30条 - map.put("code", "1") ; - map.put("msg", "单次处理不能超过30条,请检查") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - - pay_detail_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_PAY_DETAIL_TEMP.CLASS_NAME); - BizObject pay_detail_bo = null; - - BizObjectManager call_back_detail_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_CALLBACK_DETAIL_TEMP.CLASS_NAME); - BizObject call_back_detail_bo = null ; - - tx.join(call_back_detail_bom); - - pay_detail_list = new ArrayList(); - - String temp_str = UUID.randomUUID().toString().replaceAll("-", "").substring(0, 14) ; - String date = df.format(new Date()); - BigDecimal all_money = new BigDecimal("0"); - - List income_all_list = bankBo.createQuery("select o.CMB_PAY_NO,o.FACT_MONEY,o.FLOWUNID,contract_info.ID,contract_info.CONTRACT_NO,distributor.distributor_id,distributor.acc_number,distributor.open_bank,distributor.account,distributor.district,distributor.provinceInfo from o join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO contract_info on o.CONTRACT_ID = contract_info.id join jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT distributor on contract_info.distributor_id = distributor.distributor_id and distributor.is_main='Y' where FLOWUNID=:FLOWUNID and o.PAY_TYPE = 'pay_type_out' ").setParameter("FLOWUNID", FLOWUNID).getResultList(false); - if(income_all_list==null) { - map.put("code", "1") ; - map.put("msg", "资金收付数据不存在,请检查") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - int index = 1 ; - for (String contract_id : contract_id_list) { - infoOne = null ; - BigDecimal contract_all_money = new BigDecimal("0"); - for(BizObject income_one : income_all_list) { - String income_one_contract_id = income_one.getAttribute("ID").toString(); - if(contract_id.equals(income_one_contract_id)) { - BigDecimal income_one_fact_money = new BigDecimal(income_one.getAttribute("FACT_MONEY").toString()); - contract_all_money = contract_all_money.add(income_one_fact_money); - infoOne = income_one ; - } - } - all_money=all_money.add(contract_all_money); - if(infoOne==null) { - map.put("code", "1") ; - map.put("msg", "第["+index+"]笔数据不存在,请检查") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - - String FLOWUNID = this.FLOWUNID ; - String DISTRIBUTOR_ID = infoOne.getAttribute("distributor_id").toString(); - String CONTRACT_ID = infoOne.getAttribute("ID").toString(); - String CRTACC = infoOne.getAttribute("acc_number").toString(); - String BANK_NAME = infoOne.getAttribute("open_bank").toString(); - String CRTNAM = infoOne.getAttribute("account").toString(); - String CRTPVC = infoOne.getAttribute("provinceInfo").toString(); - String CRTCTY = infoOne.getAttribute("district").toString(); - String NUSAGE = infoOne.getAttribute("memo").toString(); - String CMB_PAY_NO_ONE = infoOne.getAttribute("CMB_PAY_NO").toString(); - - /* - * 检查当前付款信息是否存在######开始 - */ - if(CMB_PAY_NO_ONE!=null && CMB_PAY_NO_ONE!="" && !"".equals(CMB_PAY_NO_ONE)) { - String temp_sql = "select * from o where FLOWUNID=:FLOWUNID and CMB_PAY_NO=:CMB_PAY_NO_ONE " ; - BizObjectQuery call_back_detail_boo= call_back_detail_bom.createQuery(temp_sql); - call_back_detail_boo.setParameter("FLOWUNID",FLOWUNID) ; - call_back_detail_boo.setParameter("CMB_PAY_NO_ONE",CMB_PAY_NO_ONE) ; - call_back_detail_bo = call_back_detail_boo.getSingleResult(false) ; - if(call_back_detail_bo!=null) { - String CALL_BACK_DETAIL_REQSTS = call_back_detail_bo.getAttribute("REQSTS").toString(); - String CALL_BACK_DETAIL_RTNFLG = call_back_detail_bo.getAttribute("RTNFLG").toString(); - if(bank_reqsts_list.contains(CALL_BACK_DETAIL_REQSTS)) { - error_msg_tips = error_msg_tips + "第["+index+"]笔付款申请已存在[请求状态:"+bank_reqsts.get(CALL_BACK_DETAIL_REQSTS)+"]" ; - if(CALL_BACK_DETAIL_RTNFLG!="" && CALL_BACK_DETAIL_RTNFLG!=null && !"".equals(CALL_BACK_DETAIL_RTNFLG)) { - error_msg_tips = error_msg_tips+"[处理结果:"+bank_rtnflg.get(CALL_BACK_DETAIL_RTNFLG)+"]"; - } - error_msg_tips = error_msg_tips+",请检查\n"; - } - } - } - /* - * 检查当前付款信息是否存在######结束 - */ - - int check=contract_all_money.compareTo(BigDecimal.ZERO); - - if( CONTRACT_ID==null || "".equals( CONTRACT_ID ) - || CRTACC==null || "".equals( CRTACC ) - || BANK_NAME==null || "".equals( BANK_NAME ) - || CRTNAM==null || "".equals( CRTNAM ) - || CRTPVC==null || "".equals( CRTPVC ) - || CRTCTY==null || "".equals( CRTCTY ) - || CRTPVC==null || "".equals( CRTPVC ) - || check==-1 - || CRTPVC==null || "".equals( CRTPVC ) - ){ - error_null_tips = error_null_tips+ "第["+index+"]笔相关数据不存在,请检查\n" ; - } - - if(CRTPVC!=null && !"".equals(CRTPVC)) { - if(CRTCTY.indexOf(CRTPVC)!=-1) { - CRTCTY = CRTCTY.substring(CRTPVC.length()); - } - } - if("6225885910000108".equals(CRTACC)) { - CRTPVC="福建"; - CRTCTY="福州"; - } - if("6225880230001175".equals(CRTACC)) { - CRTPVC="重庆"; - CRTCTY="重庆"; - } - - String YURREF_INDEX = index+"" ; - if(index<10) { - YURREF_INDEX = String.format("%02d", index); - } - - String TRSAMT = contract_all_money.toPlainString(); - String YURREF = YURREF_INDEX + date+ temp_str; - String BNKFLG = checkCMB(BANK_NAME); - NUSAGE = "客户["+CRTACC+"]发起申请"; - String BUSNAR = "[实际付款][客户:"+CRTACC+"][支付金额:"+TRSAMT+"]"; - - pay_detail = new SDKDcPayReqxVO(); - pay_detail.setYURREF(YURREF); - pay_detail.setDBTACC(DBTACC); - pay_detail.setDBTBBK(DBTBBK); - pay_detail.setTRSAMT(TRSAMT); - pay_detail.setCCYNBR(CCYNBR); - pay_detail.setSTLCHN(STLCHN); - pay_detail.setNUSAGE(NUSAGE); - pay_detail.setBUSNAR(BUSNAR); - pay_detail.setCRTACC(CRTACC); - pay_detail.setCRTNAM(CRTNAM); - pay_detail.setCRTBNK(BANK_NAME); - pay_detail.setBNKFLG(BNKFLG); - pay_detail.setTRSTYP(TRSTYP); - pay_detail.setRCVCHK(RCVCHK); - pay_detail.setCRTPVC(CRTPVC); - pay_detail.setCRTCTY(CRTCTY); - - sDKDcPayReqxVOList.add(pay_detail); - - pay_detail_bo = pay_detail_bom.newObject(); - - pay_detail_bo.setAttributeValue("ID", UUID.randomUUID().toString().replaceAll("-", "")); - pay_detail_bo.setAttributeValue("CMB_PAY_NO", CMB_PAY_NO); - pay_detail_bo.setAttributeValue("DISTRIBUTOR_ID", DISTRIBUTOR_ID); - pay_detail_bo.setAttributeValue("CONTRACT_ID", CONTRACT_ID); - pay_detail_bo.setAttributeValue("FLOWUNID", FLOWUNID); - pay_detail_bo.setAttributeValue("YURREF", YURREF); - pay_detail_bo.setAttributeValue("DBTACC", DBTACC); - pay_detail_bo.setAttributeValue("DBTBBK", DBTBBK); - pay_detail_bo.setAttributeValue("TRSAMT", TRSAMT); - pay_detail_bo.setAttributeValue("CCYNBR", CCYNBR); - pay_detail_bo.setAttributeValue("STLCHN", STLCHN); - pay_detail_bo.setAttributeValue("NUSAGE", NUSAGE); - pay_detail_bo.setAttributeValue("BUSNAR", BUSNAR); - pay_detail_bo.setAttributeValue("CRTACC", CRTACC); - pay_detail_bo.setAttributeValue("CRTNAM", CRTNAM); - pay_detail_bo.setAttributeValue("CRTBNK", BANK_NAME); - pay_detail_bo.setAttributeValue("BNKFLG", BNKFLG); - pay_detail_bo.setAttributeValue("TRSTYP", TRSTYP); - pay_detail_bo.setAttributeValue("RCVCHK", RCVCHK); - pay_detail_bo.setAttributeValue("CRTPVC", CRTPVC); - pay_detail_bo.setAttributeValue("CRTCTY", CRTCTY); - this.initTabeUserInfo(pay_detail_bo); - pay_detail_list.add(pay_detail_bo); - ++index; - } - - - if(!"".equals(error_msg_tips)) { - map.put("code", "1") ; - map.put("msg", error_msg_tips) ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - - if(!"".equals(error_null_tips)) { - map.put("code", "1") ; - map.put("msg", error_null_tips) ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - - sDKToPayVO.setINFO(sDKInfoVO); - sDKToPayVO.setSDKPAYRQX(sDKPayRqxVO); - if(sDKDcPayReqxVOList!=null && sDKDcPayReqxVOList.size()>0) { - sDKToPayVO.setDcPayReqxList(sDKDcPayReqxVOList); - } - - XStream xStream = new XMLStream(); - xStream.alias("DCPAYREQX", SDKDcPayReqxVO.class); - xStream.alias("CMBSDKPGK", SDKToPayVO.class); - String xmlStr = xStream.toXML(sDKToPayVO); - xmlStr = xmlStr.replace("", "").replace("", "").replace("", ""); - try { - System.out.println(xmlStr); //控制台打印请求的XML数据 - //HttpRequest request = new HttpRequest("http://172.16.20.242:65188"); - //HttpRequest request = new HttpRequest("http://192.168.13.162:65188"); - //request.setTimeout(3000); - HttpRequest request = new HttpRequest(); - String data = xmlStr; - SDKPayCallBackVO result = request.sendPayRequest(data); - if(result==null) { - map.put("code", "1") ; - map.put("msg", "请求出错") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - - if(result.getInfo().getSTATUS()==1) { - if("0".equals( result.getInfo().getRETCOD() )) { - pay_info_bo.setAttributeValue("FACT_MONEY",all_money.toPlainString()); - pay_info_bo.setAttributeValue("CMB_PAY_NO",CMB_PAY_NO) ; - pay_info_bo.setAttributeValue("BANK_ID",accountBo.getAttribute("id").toString()) ; - tx.join(pay_info_bom);// 插入支付信息表 - pay_info_bom.saveObject(pay_info_bo); - if(pay_detail_bom!=null) { - BizObjectManager income_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); - tx.join(pay_detail_bom); - tx.join(income_bom); - - if(pay_detail_list!=null && pay_detail_list.size()>0) - for (BizObject pay_detail_one : pay_detail_list) { - BizObjectQuery income_boo= income_bom.createQuery("update o join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lcf on o.contract_id = lcf.id set o.CMB_PAY_NO=:CMB_PAY_NO where o.PAY_TYPE = 'pay_type_out' and o.FLOWUNID=:FLOWUNID and lcf.ID=:CONTRACT_ID"); - income_boo.setParameter("CMB_PAY_NO",CMB_PAY_NO) ; - income_boo.setParameter("FLOWUNID",pay_detail_one.getAttribute("FLOWUNID").toString()) ; - income_boo.setParameter("CONTRACT_ID",pay_detail_one.getAttribute("CONTRACT_ID").toString()) ; - income_boo.setParameter("DISTRIBUTOR_ID",pay_detail_one.getAttribute("DISTRIBUTOR_ID").toString()) ; - income_boo.executeUpdate();//更新资金收付表 - pay_detail_bom.saveObject(pay_detail_one); //插入支付详情表 - } - } - - BizObjectManager callback_info_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_CALLBACK_INFO_TEMP.CLASS_NAME) ; - BizObjectManager callback_detail_bom = null; - - BizObject callback_info_bo = callback_info_bom.newObject(); - BizObject callback_detail_bo = null; - - tx.join(callback_info_bom); - callback_info_bo.setAttributeValue("ID", UUID.randomUUID().toString().replaceAll("-", "")); - callback_info_bo.setAttributeValue("CMB_PAY_NO",CMB_PAY_NO); - callback_info_bo.setAttributeValue("FLOWUNID",FLOWUNID); - callback_info_bo.setAttributeValue("INFO_FUNNAM",FUNNAM); - callback_info_bo.setAttributeValue("INFO_DATTYP",DATTYP); - callback_info_bo.setAttributeValue("INFO_RETCOD",result.getInfo().getRETCOD()); - callback_info_bo.setAttributeValue("INFO_ERRMSG",result.getInfo().getERRMSG()); - this.initTabeUserInfo(callback_info_bo); - callback_info_bom.saveObject(callback_info_bo); //插入支付回调信息表 - - List details = result.getDetails() ; - String error_info = ""; - if(details!=null && details.size()>0) { - callback_detail_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_CALLBACK_DETAIL_TEMP.CLASS_NAME) ; - tx.join(callback_detail_bom); - int call_index = 1 ; - for (SDKPayCallDetail detail : details) { - if (detail.getREQSTS().equals("FIN") && detail.getRTNFLG().equals("F")) { - error_info= error_info+"\n"+ "第["+call_index+"]笔数据 "+detail.getERRTXT() ; - } - callback_detail_bo = callback_detail_bom.newObject(); - String DETAIL_YURREF = detail.getYURREF() ; - callback_detail_bo.setAttributeValue("ID", UUID.randomUUID().toString().replaceAll("-", "")); - callback_detail_bo.setAttributeValue("CMB_PAY_NO",CMB_PAY_NO); - callback_detail_bo.setAttributeValue("YURREF",DETAIL_YURREF); - callback_detail_bo.setAttributeValue("FLOWUNID",FLOWUNID); - callback_detail_bo.setAttributeValue("SQRNBR",detail.getSQRNBR()); - callback_detail_bo.setAttributeValue("REQNBR",detail.getREQNBR()); - callback_detail_bo.setAttributeValue("REQSTS",detail.getREQSTS()); - callback_detail_bo.setAttributeValue("RTNFLG",detail.getRTNFLG()); - callback_detail_bo.setAttributeValue("OPRSQN",detail.getOPRSQN()); - callback_detail_bo.setAttributeValue("OPRALS",detail.getOPRALS()); - callback_detail_bo.setAttributeValue("ERRCOD",detail.getERRCOD()); - callback_detail_bo.setAttributeValue("ERRTXT",detail.getERRTXT()); - - if(pay_detail_list!=null && pay_detail_list.size()>0) { - for (BizObject pay_detail_one : pay_detail_list) { - if(DETAIL_YURREF.equals( pay_detail_one.getAttribute("YURREF").toString() )) { - callback_detail_bo.setAttributeValue("CONTRACT_ID",pay_detail_one.getAttribute("CONTRACT_ID").toString()); - callback_detail_bo.setAttributeValue("DISTRIBUTOR_ID",pay_detail_one.getAttribute("DISTRIBUTOR_ID").toString()); - } - } - } - - this.initTabeUserInfo(callback_detail_bo); - callback_detail_bom.saveObject(callback_detail_bo);//插入支付回调详情表 - ++call_index; - } - } - if(error_info==""){ - map.put("code", "0") ; - map.put("msg", "受理成功,请耐心等待审核") ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - }else { - map.put("code", "2") ; - map.put("msg", "部分发起申请失败,请检查"+error_info) ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - }else { - map.put("code", "1") ; - map.put("msg", result.getInfo().getERRMSG()) ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - }else { - map.put("code", "1") ; - map.put("msg", result.getInfo().getERRMSG()) ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - } catch (Exception e) { - map.put("code", "1") ; - map.put("msg", e.getMessage()) ; - JSONObject jsonObj = JSONObject.fromObject(map); - return jsonObj.toString(); - } - } - - private String checkCMB(String str) { - if (str.indexOf("招行") != -1 || str.indexOf("招商银行") != -1) { - return "Y"; - } else { - return "N"; - } - } -} +package com.tenwa.sdk.controller; + +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.BizObjectQuery; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.Configure; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.flow.action.comm.BaseFlowStartAction; +import com.tenwa.sdk.VO.SDKDcPayReqxVO; +import com.tenwa.sdk.VO.SDKInfoVO; +import com.tenwa.sdk.VO.SDKPayCallBackVO; +import com.tenwa.sdk.VO.SDKPayCallDetail; +import com.tenwa.sdk.VO.SDKPayRqxVO; +import com.tenwa.sdk.VO.SDKToPayVO; +import com.tenwa.sdk.utils.HttpRequest; +import com.tenwa.sdk.utils.XMLStream; +import com.thoughtworks.xstream.XStream; + +import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; +import jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; +import jbo.com.tenwa.lease.comm.LC_FUND_INCOME_CALLBACK_DETAIL_TEMP; +import jbo.com.tenwa.lease.comm.LC_FUND_INCOME_CALLBACK_INFO_TEMP; +import jbo.com.tenwa.lease.comm.LC_FUND_INCOME_PAY_DETAIL_TEMP; +import jbo.com.tenwa.lease.comm.LC_FUND_INCOME_PAY_INFO_TEMP; +import jbo.prd.LB_PRODUCTTOCOMPANY_INFO; +import jbo.sys.CODE_LIBRARY; +import net.sf.json.JSONObject; + +public class CmbToPayController extends BaseFlowStartAction { + private String distributor_ids; //获取选择的 经销商ID + private String contract_ids; //获取选择的合同ID + private String FLOWUNID ; //流程号、 + + + public String getContract_ids() { + return contract_ids; + } + + public void setContract_ids(String contract_ids) { + this.contract_ids = contract_ids; + } + + public String getFLOWUNID() { + return FLOWUNID; + } + + public void setFLOWUNID(String fLOWUNID) { + FLOWUNID = fLOWUNID; + } + + public String getDistributor_ids() { + return distributor_ids; + } + + public void setDistributor_ids(String distributor_ids) { + this.distributor_ids = distributor_ids; + } + + @SuppressWarnings({ "unchecked", "unused" }) + public synchronized String action(JBOTransaction tx) throws Exception { + /* + * 定义返回参数 + */ + Map map = new HashMap(); + map.put("code", "0") ; + map.put("msg", "") ; + + /* + * 基本参数检查######开始 + */ + if(FLOWUNID==null || "".equals(FLOWUNID)) { + map.put("code", "1") ; + map.put("msg", "流程编号不能为空,请检查") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + //按经销商改为按合同 + /*List distributor_id_list = java.util.Arrays.asList(distributor_ids.split("@")); + if(distributor_id_list==null || distributor_id_list.size()<=0) { + map.put("code", "1") ; + map.put("msg", "尚未选择经销商,请检查") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + }*/ + List contract_id_list = java.util.Arrays.asList(contract_ids.split("@")); + if(contract_id_list==null || contract_id_list.size()<=0) { + map.put("code", "1") ; + map.put("msg", "尚未选择合同,请检查") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + //校验本次发起付款是否为同一个主体 + String contractIds = contract_ids.replaceAll("@", "','"); + String subjectSql = "SELECT subjectId AS subjectuid FROM lb_contract_info WHERE id IN ('"+contractIds+"') GROUP BY subjectId "; + List> lciList = DataOperatorUtil.getDataBySql(subjectSql); + if(lciList.size()>1){ + map.put("code", "1") ; + map.put("msg", "放款合同中有多个主体,请检查!!!") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + String subjectId = lciList.get(0).get("subjectuid"); + /* + * 基本参数检查######开始 + */ + + /* + * 本方放款账户获取######开始 + */ + BizObjectManager accountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); + List accountBoList = null; + if("aa740e4111c111eaaa0000163e0e11e6".equals(subjectId)){ + accountBoList = accountManager.createQuery("select o.id,o.acc_number,o.acc_bank,o.acc_name,o.branch_code,oi.OWN_NAME from o left join jbo.com.tenwa.entity.comm.own.OWN_INFO oi on o.own_id = oi.OWN_NUMBER where o.money_type='01' and o.state_='0010' and o.acc_type='0010' and o.FbSdk='Y' and (o.account_type='out_account' or o.account_type='inAndOut_account') and oi.OWN_NAME='安鹏国际融资租赁(深圳)有限公司'").getResultList(false); + }else if("d989246c11c111eaaa0000163e0e11e6".equals(subjectId)){ + accountBoList = accountManager.createQuery("select o.id,o.acc_number,o.acc_bank,o.acc_name,o.branch_code,oi.OWN_NAME from o left join jbo.com.tenwa.entity.comm.own.OWN_INFO oi on o.own_id = oi.OWN_NUMBER where o.money_type='01' and o.state_='0010' and o.acc_type='0010' and o.FbSdk='Y' and (o.account_type='out_account' or o.account_type='inAndOut_account') and oi.OWN_NAME='安鹏融资租赁(天津)有限公司'").getResultList(false); + } + if( accountBoList==null ||accountBoList.size()==0) { + map.put("code", "1") ; + map.put("msg", "没有匹配的本方账户,请在本方账户中检查!") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + if( accountBoList!=null && accountBoList.size()>1 ) { + map.put("code", "1") ; + map.put("msg", "启用的汽车类放款账户只能同时存在一个,请在本方账户中检查!") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + BizObject accountBo = accountBoList.get(0); + /* + * 本方放款账户获取######结束 + */ + + + /* + * 付款申请基础信息定义######开始 + */ + + //安鹏要求改为从配置文件中读取。 + //String LGNNAM = accountBo.getAttribute("OWN_NAME").toString(); + // String LGNNAM = "安鹏经办"; + // String LGNNAM = "银企直连测试用户113"; + Configure config = Configure.getInstance(); + String LGNNAM = config.getConfigure("LGNNAM"); + String FUNNAM = "DCPAYREQ"; + int DATTYP = 2; + String BUSMOD = "00001"; //默认参数 请按照实际情况谨慎修改 + String BUSCOD = "N02030"; //默认参数 请按照实际情况谨慎修改 + String DBTBBK = accountBo.getAttribute("branch_code").toString(); + String DBTACC = accountBo.getAttribute("acc_number").toString(); + String STLCHN = "F"; //默认参数 + String CCYNBR = "10"; //默认参数 + String TRSTYP = "100001"; //默认参数 + String RCVCHK = "1"; //默认参数 + /* + * 付款申请基础信息定义######结束 + */ + + + /* + * 获取常用代码并将codeno存为主键 方便下面代码调用######开始 + */ + BizObjectManager code_library = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME); + List bank_code_list = code_library.createQuery("select codeno,itemno,itemname from o where codeno in ('bank_reqsts','bank_rtnflg','FeeType')").getResultList(false); + Map bank_reqsts = new HashMap(); //业务请求状态 + Map bank_rtnflg = new HashMap(); //业务处理结果 + Map fee_type = new HashMap(); //费用类型 + + for(BizObject code_bo:bank_code_list) { + String itemno = code_bo.getAttribute("itemno").toString(); + String itemname = code_bo.getAttribute("itemname").toString(); + String codeno = code_bo.getAttribute("codeno").toString(); + if("bank_reqsts".equals(codeno)) { + bank_reqsts.put(itemno, itemname); + }else if("bank_rtnflg".equals(codeno)) { + bank_rtnflg.put(itemno, itemname); + }else { + fee_type.put(itemno, itemname); + } + } + String[] bank_reqsts_array = {"AUT","NTE","WCF","BNK","FIN","ACK","APD","OPR"}; + String[] bank_rtnflg_array = {"S","F","B","R","D","C","M","V","U","T"}; + List bank_reqsts_list = Arrays.asList(bank_reqsts_array); + List bank_rtnflg_list = Arrays.asList(bank_rtnflg_array); + /* + * 获取常用代码并将codeno存为主键 方便下面代码调用######结束 + */ + + + /* + * + */ + SDKToPayVO sDKToPayVO = new SDKToPayVO(); + SDKInfoVO sDKInfoVO = new SDKInfoVO(); + SDKPayRqxVO sDKPayRqxVO = new SDKPayRqxVO(); + List sDKDcPayReqxVOList = new ArrayList(); + + sDKInfoVO.setLGNNAM(LGNNAM); + sDKInfoVO.setFUNNAM(FUNNAM); + sDKInfoVO.setDATTYP(DATTYP); + + sDKPayRqxVO.setBUSCOD(BUSCOD); + sDKPayRqxVO.setBUSMOD(BUSMOD); + + BizObjectManager pay_info_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_PAY_INFO_TEMP.CLASS_NAME); + BizObject pay_info_bo = pay_info_bom.newObject(); + + String CMB_PAY_NO = UUID.randomUUID().toString().replaceAll("-", "") ; // 付款流水号 + pay_info_bo.setAttributeValue("ID", UUID.randomUUID().toString().replaceAll("-", "")); + pay_info_bo.setAttributeValue("FLOWUNID", FLOWUNID); + pay_info_bo.setAttributeValue("INFO_FUNNAM", FUNNAM); + pay_info_bo.setAttributeValue("INFO_DATTYP", DATTYP); + pay_info_bo.setAttributeValue("INFO_LGNNAM", LGNNAM); + pay_info_bo.setAttributeValue("SDKPAYRQX_BUSCOD", BUSCOD); + pay_info_bo.setAttributeValue("SDKPAYRQX_BUSMOD", BUSMOD); + this.initTabeUserInfo(pay_info_bo); + + + List pay_detail_list = null;// 声明 付款发起详情list + BizObjectManager bankBo = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); + BizObject infoOne = null ; + SDKDcPayReqxVO pay_detail = null ; + SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss"); + BizObjectManager pay_detail_bom = null ; + String error_msg_tips = ""; //定义错误信息 是否存在 + String error_null_tips = ""; //定义错误信息 是否为空 + + + if(contract_id_list.size() > 30){ //招行文档规定 单次批量申请不能超过30条 + map.put("code", "1") ; + map.put("msg", "单次处理不能超过30条,请检查") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + + pay_detail_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_PAY_DETAIL_TEMP.CLASS_NAME); + BizObject pay_detail_bo = null; + + BizObjectManager call_back_detail_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_CALLBACK_DETAIL_TEMP.CLASS_NAME); + BizObject call_back_detail_bo = null ; + + tx.join(call_back_detail_bom); + + pay_detail_list = new ArrayList(); + + String temp_str = UUID.randomUUID().toString().replaceAll("-", "").substring(0, 14) ; + String date = df.format(new Date()); + BigDecimal all_money = new BigDecimal("0"); + + List income_all_list = bankBo.createQuery("select o.CMB_PAY_NO,o.FACT_MONEY,o.FLOWUNID,contract_info.ID,contract_info.CONTRACT_NO,distributor.distributor_id,distributor.acc_number,distributor.open_bank,distributor.account,distributor.district,distributor.provinceInfo from o join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO contract_info on o.CONTRACT_ID = contract_info.id join jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT distributor on contract_info.distributor_id = distributor.distributor_id and distributor.is_main='Y' where FLOWUNID=:FLOWUNID and o.PAY_TYPE = 'pay_type_out' ").setParameter("FLOWUNID", FLOWUNID).getResultList(false); + if(income_all_list==null) { + map.put("code", "1") ; + map.put("msg", "资金收付数据不存在,请检查") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + int index = 1 ; + for (String contract_id : contract_id_list) { + + infoOne = null ; + BigDecimal contract_all_money = new BigDecimal("0"); + for(BizObject income_one : income_all_list) { + String income_one_contract_id = income_one.getAttribute("ID").toString(); + if(contract_id.equals(income_one_contract_id)) { + BigDecimal income_one_fact_money = new BigDecimal(income_one.getAttribute("FACT_MONEY").toString()); + contract_all_money = contract_all_money.add(income_one_fact_money); + infoOne = income_one ; + } + } + all_money=all_money.add(contract_all_money); + if(infoOne==null) { + map.put("code", "1") ; + map.put("msg", "第["+index+"]笔数据不存在,请检查") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + String acc_number = infoOne.getAttribute("acc_number").toString(); + String open_bank = infoOne.getAttribute("open_bank").toString(); + String account = infoOne.getAttribute("account").toString(); + String province = infoOne.getAttribute("provinceInfo").toString(); + String city = infoOne.getAttribute("district").toString(); + BizObject bo_lci = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME).createQuery("id=:id").getSingleResult(false); + String productId = bo_lci.getAttribute("product_id").toString(); + BizObject bo_lpi = JBOFactory.getBizObjectManager(LB_PRODUCTTOCOMPANY_INFO.CLASS_NAME).createQuery("product_id=:product_id").setParameter("product_id", productId).getSingleResult(false); + if(bo_lpi!=null&&bo_lpi.getAttribute("product_id")!=null){ + acc_number = bo_lpi.getAttribute("acc_number").toString(); + open_bank = bo_lpi.getAttribute("bank_name").toString(); + account = bo_lpi.getAttribute("account").toString(); + province = bo_lpi.getAttribute("province").toString(); + city = bo_lpi.getAttribute("city").toString(); + } + + String FLOWUNID = this.FLOWUNID ; + String DISTRIBUTOR_ID = infoOne.getAttribute("distributor_id").toString(); + String CONTRACT_ID = infoOne.getAttribute("ID").toString(); + String CRTACC = acc_number; + String BANK_NAME = open_bank; + String CRTNAM = account; + String CRTPVC = province; + String CRTCTY = city; + String NUSAGE = infoOne.getAttribute("memo").toString(); + String CMB_PAY_NO_ONE = infoOne.getAttribute("CMB_PAY_NO").toString(); + + /* + * 检查当前付款信息是否存在######开始 + */ + if(CMB_PAY_NO_ONE!=null && CMB_PAY_NO_ONE!="" && !"".equals(CMB_PAY_NO_ONE)) { + String temp_sql = "select * from o where FLOWUNID=:FLOWUNID and CMB_PAY_NO=:CMB_PAY_NO_ONE " ; + BizObjectQuery call_back_detail_boo= call_back_detail_bom.createQuery(temp_sql); + call_back_detail_boo.setParameter("FLOWUNID",FLOWUNID) ; + call_back_detail_boo.setParameter("CMB_PAY_NO_ONE",CMB_PAY_NO_ONE) ; + call_back_detail_bo = call_back_detail_boo.getSingleResult(false) ; + if(call_back_detail_bo!=null) { + String CALL_BACK_DETAIL_REQSTS = call_back_detail_bo.getAttribute("REQSTS").toString(); + String CALL_BACK_DETAIL_RTNFLG = call_back_detail_bo.getAttribute("RTNFLG").toString(); + if(bank_reqsts_list.contains(CALL_BACK_DETAIL_REQSTS)) { + error_msg_tips = error_msg_tips + "第["+index+"]笔付款申请已存在[请求状态:"+bank_reqsts.get(CALL_BACK_DETAIL_REQSTS)+"]" ; + if(CALL_BACK_DETAIL_RTNFLG!="" && CALL_BACK_DETAIL_RTNFLG!=null && !"".equals(CALL_BACK_DETAIL_RTNFLG)) { + error_msg_tips = error_msg_tips+"[处理结果:"+bank_rtnflg.get(CALL_BACK_DETAIL_RTNFLG)+"]"; + } + error_msg_tips = error_msg_tips+",请检查\n"; + } + } + } + /* + * 检查当前付款信息是否存在######结束 + */ + + int check=contract_all_money.compareTo(BigDecimal.ZERO); + + if( CONTRACT_ID==null || "".equals( CONTRACT_ID ) + || CRTACC==null || "".equals( CRTACC ) + || BANK_NAME==null || "".equals( BANK_NAME ) + || CRTNAM==null || "".equals( CRTNAM ) + || CRTPVC==null || "".equals( CRTPVC ) + || CRTCTY==null || "".equals( CRTCTY ) + || CRTPVC==null || "".equals( CRTPVC ) + || check==-1 + || CRTPVC==null || "".equals( CRTPVC ) + ){ + error_null_tips = error_null_tips+ "第["+index+"]笔相关数据不存在,请检查\n" ; + } + + if(CRTPVC!=null && !"".equals(CRTPVC)) { + if(CRTCTY.indexOf(CRTPVC)!=-1) { + CRTCTY = CRTCTY.substring(CRTPVC.length()); + } + } + if("6225885910000108".equals(CRTACC)) { + CRTPVC="福建"; + CRTCTY="福州"; + } + if("6225880230001175".equals(CRTACC)) { + CRTPVC="重庆"; + CRTCTY="重庆"; + } + + String YURREF_INDEX = index+"" ; + if(index<10) { + YURREF_INDEX = String.format("%02d", index); + } + + String TRSAMT = contract_all_money.toPlainString(); + String YURREF = YURREF_INDEX + date+ temp_str; + String BNKFLG = checkCMB(BANK_NAME); + NUSAGE = "客户["+CRTACC+"]发起申请"; + String BUSNAR = "[实际付款][客户:"+CRTACC+"][支付金额:"+TRSAMT+"]"; + + pay_detail = new SDKDcPayReqxVO(); + pay_detail.setYURREF(YURREF); + pay_detail.setDBTACC(DBTACC); + pay_detail.setDBTBBK(DBTBBK); + pay_detail.setTRSAMT(TRSAMT); + pay_detail.setCCYNBR(CCYNBR); + pay_detail.setSTLCHN(STLCHN); + pay_detail.setNUSAGE(NUSAGE); + pay_detail.setBUSNAR(BUSNAR); + pay_detail.setCRTACC(CRTACC); + pay_detail.setCRTNAM(CRTNAM); + pay_detail.setCRTBNK(BANK_NAME); + pay_detail.setBNKFLG(BNKFLG); + pay_detail.setTRSTYP(TRSTYP); + pay_detail.setRCVCHK(RCVCHK); + pay_detail.setCRTPVC(CRTPVC); + pay_detail.setCRTCTY(CRTCTY); + + sDKDcPayReqxVOList.add(pay_detail); + + pay_detail_bo = pay_detail_bom.newObject(); + + pay_detail_bo.setAttributeValue("ID", UUID.randomUUID().toString().replaceAll("-", "")); + pay_detail_bo.setAttributeValue("CMB_PAY_NO", CMB_PAY_NO); + pay_detail_bo.setAttributeValue("DISTRIBUTOR_ID", DISTRIBUTOR_ID); + pay_detail_bo.setAttributeValue("CONTRACT_ID", CONTRACT_ID); + pay_detail_bo.setAttributeValue("FLOWUNID", FLOWUNID); + pay_detail_bo.setAttributeValue("YURREF", YURREF); + pay_detail_bo.setAttributeValue("DBTACC", DBTACC); + pay_detail_bo.setAttributeValue("DBTBBK", DBTBBK); + pay_detail_bo.setAttributeValue("TRSAMT", TRSAMT); + pay_detail_bo.setAttributeValue("CCYNBR", CCYNBR); + pay_detail_bo.setAttributeValue("STLCHN", STLCHN); + pay_detail_bo.setAttributeValue("NUSAGE", NUSAGE); + pay_detail_bo.setAttributeValue("BUSNAR", BUSNAR); + pay_detail_bo.setAttributeValue("CRTACC", CRTACC); + pay_detail_bo.setAttributeValue("CRTNAM", CRTNAM); + pay_detail_bo.setAttributeValue("CRTBNK", BANK_NAME); + pay_detail_bo.setAttributeValue("BNKFLG", BNKFLG); + pay_detail_bo.setAttributeValue("TRSTYP", TRSTYP); + pay_detail_bo.setAttributeValue("RCVCHK", RCVCHK); + pay_detail_bo.setAttributeValue("CRTPVC", CRTPVC); + pay_detail_bo.setAttributeValue("CRTCTY", CRTCTY); + this.initTabeUserInfo(pay_detail_bo); + pay_detail_list.add(pay_detail_bo); + ++index; + } + + + if(!"".equals(error_msg_tips)) { + map.put("code", "1") ; + map.put("msg", error_msg_tips) ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + + if(!"".equals(error_null_tips)) { + map.put("code", "1") ; + map.put("msg", error_null_tips) ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + + sDKToPayVO.setINFO(sDKInfoVO); + sDKToPayVO.setSDKPAYRQX(sDKPayRqxVO); + if(sDKDcPayReqxVOList!=null && sDKDcPayReqxVOList.size()>0) { + sDKToPayVO.setDcPayReqxList(sDKDcPayReqxVOList); + } + + XStream xStream = new XMLStream(); + xStream.alias("DCPAYREQX", SDKDcPayReqxVO.class); + xStream.alias("CMBSDKPGK", SDKToPayVO.class); + String xmlStr = xStream.toXML(sDKToPayVO); + xmlStr = xmlStr.replace("", "").replace("", "").replace("", ""); + try { + System.out.println(xmlStr); //控制台打印请求的XML数据 + //HttpRequest request = new HttpRequest("http://172.16.20.242:65188"); + //HttpRequest request = new HttpRequest("http://192.168.13.162:65188"); + //request.setTimeout(3000); + HttpRequest request = new HttpRequest(); + String data = xmlStr; + SDKPayCallBackVO result = request.sendPayRequest(data); + if(result==null) { + map.put("code", "1") ; + map.put("msg", "请求出错") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + + if(result.getInfo().getSTATUS()==1) { + if("0".equals( result.getInfo().getRETCOD() )) { + pay_info_bo.setAttributeValue("FACT_MONEY",all_money.toPlainString()); + pay_info_bo.setAttributeValue("CMB_PAY_NO",CMB_PAY_NO) ; + pay_info_bo.setAttributeValue("BANK_ID",accountBo.getAttribute("id").toString()) ; + tx.join(pay_info_bom);// 插入支付信息表 + pay_info_bom.saveObject(pay_info_bo); + if(pay_detail_bom!=null) { + BizObjectManager income_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); + tx.join(pay_detail_bom); + tx.join(income_bom); + + if(pay_detail_list!=null && pay_detail_list.size()>0) + for (BizObject pay_detail_one : pay_detail_list) { + BizObjectQuery income_boo= income_bom.createQuery("update o join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lcf on o.contract_id = lcf.id set o.CMB_PAY_NO=:CMB_PAY_NO where o.PAY_TYPE = 'pay_type_out' and o.FLOWUNID=:FLOWUNID and lcf.ID=:CONTRACT_ID"); + income_boo.setParameter("CMB_PAY_NO",CMB_PAY_NO) ; + income_boo.setParameter("FLOWUNID",pay_detail_one.getAttribute("FLOWUNID").toString()) ; + income_boo.setParameter("CONTRACT_ID",pay_detail_one.getAttribute("CONTRACT_ID").toString()) ; + income_boo.setParameter("DISTRIBUTOR_ID",pay_detail_one.getAttribute("DISTRIBUTOR_ID").toString()) ; + income_boo.executeUpdate();//更新资金收付表 + pay_detail_bom.saveObject(pay_detail_one); //插入支付详情表 + } + } + + BizObjectManager callback_info_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_CALLBACK_INFO_TEMP.CLASS_NAME) ; + BizObjectManager callback_detail_bom = null; + + BizObject callback_info_bo = callback_info_bom.newObject(); + BizObject callback_detail_bo = null; + + tx.join(callback_info_bom); + callback_info_bo.setAttributeValue("ID", UUID.randomUUID().toString().replaceAll("-", "")); + callback_info_bo.setAttributeValue("CMB_PAY_NO",CMB_PAY_NO); + callback_info_bo.setAttributeValue("FLOWUNID",FLOWUNID); + callback_info_bo.setAttributeValue("INFO_FUNNAM",FUNNAM); + callback_info_bo.setAttributeValue("INFO_DATTYP",DATTYP); + callback_info_bo.setAttributeValue("INFO_RETCOD",result.getInfo().getRETCOD()); + callback_info_bo.setAttributeValue("INFO_ERRMSG",result.getInfo().getERRMSG()); + this.initTabeUserInfo(callback_info_bo); + callback_info_bom.saveObject(callback_info_bo); //插入支付回调信息表 + + List details = result.getDetails() ; + String error_info = ""; + if(details!=null && details.size()>0) { + callback_detail_bom = JBOFactory.getBizObjectManager(LC_FUND_INCOME_CALLBACK_DETAIL_TEMP.CLASS_NAME) ; + tx.join(callback_detail_bom); + int call_index = 1 ; + for (SDKPayCallDetail detail : details) { + if (detail.getREQSTS().equals("FIN") && detail.getRTNFLG().equals("F")) { + error_info= error_info+"\n"+ "第["+call_index+"]笔数据 "+detail.getERRTXT() ; + } + callback_detail_bo = callback_detail_bom.newObject(); + String DETAIL_YURREF = detail.getYURREF() ; + callback_detail_bo.setAttributeValue("ID", UUID.randomUUID().toString().replaceAll("-", "")); + callback_detail_bo.setAttributeValue("CMB_PAY_NO",CMB_PAY_NO); + callback_detail_bo.setAttributeValue("YURREF",DETAIL_YURREF); + callback_detail_bo.setAttributeValue("FLOWUNID",FLOWUNID); + callback_detail_bo.setAttributeValue("SQRNBR",detail.getSQRNBR()); + callback_detail_bo.setAttributeValue("REQNBR",detail.getREQNBR()); + callback_detail_bo.setAttributeValue("REQSTS",detail.getREQSTS()); + callback_detail_bo.setAttributeValue("RTNFLG",detail.getRTNFLG()); + callback_detail_bo.setAttributeValue("OPRSQN",detail.getOPRSQN()); + callback_detail_bo.setAttributeValue("OPRALS",detail.getOPRALS()); + callback_detail_bo.setAttributeValue("ERRCOD",detail.getERRCOD()); + callback_detail_bo.setAttributeValue("ERRTXT",detail.getERRTXT()); + + if(pay_detail_list!=null && pay_detail_list.size()>0) { + for (BizObject pay_detail_one : pay_detail_list) { + if(DETAIL_YURREF.equals( pay_detail_one.getAttribute("YURREF").toString() )) { + callback_detail_bo.setAttributeValue("CONTRACT_ID",pay_detail_one.getAttribute("CONTRACT_ID").toString()); + callback_detail_bo.setAttributeValue("DISTRIBUTOR_ID",pay_detail_one.getAttribute("DISTRIBUTOR_ID").toString()); + } + } + } + + this.initTabeUserInfo(callback_detail_bo); + callback_detail_bom.saveObject(callback_detail_bo);//插入支付回调详情表 + ++call_index; + } + } + if(error_info==""){ + map.put("code", "0") ; + map.put("msg", "受理成功,请耐心等待审核") ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + }else { + map.put("code", "2") ; + map.put("msg", "部分发起申请失败,请检查"+error_info) ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + }else { + map.put("code", "1") ; + map.put("msg", result.getInfo().getERRMSG()) ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + }else { + map.put("code", "1") ; + map.put("msg", result.getInfo().getERRMSG()) ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + } catch (Exception e) { + map.put("code", "1") ; + map.put("msg", e.getMessage()) ; + JSONObject jsonObj = JSONObject.fromObject(map); + return jsonObj.toString(); + } + } + + private String checkCMB(String str) { + if (str.indexOf("招行") != -1 || str.indexOf("招商银行") != -1) { + return "Y"; + } else { + return "N"; + } + } +} diff --git a/src_jbo/jbo/app/tenwa/calc/LC_COMPANY_LOAN_INFO.java b/src_jbo/jbo/app/tenwa/calc/LC_COMPANY_LOAN_INFO.java new file mode 100644 index 000000000..3020d9d43 --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LC_COMPANY_LOAN_INFO.java @@ -0,0 +1,56 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO命名常量类

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LC_COMPANY_LOAN_INFO{ + /** + *

+ * 代表本类映射的BizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_COMPANY_LOAN_INFO"; + /** + * id STRING(20)
+ */ + public static final String id = "id"; + /** + * 合同id STRING(20)
+ */ + public static final String contract_id = "contract_id"; + /** + * 计划id STRING(20)
+ */ + public static final String product_id = "product_id"; + /** + * 资金计划表 STRING(20)
+ */ + public static final String f_plan_id = "f_plan_id"; + /** + * 资金实收表 STRING(20)
+ */ + public static final String f_income_id = "f_income_id"; + /** + * 车款是否已支付 STRING(20)
+ */ + public static final String car_money_had = "car_money_had"; + /** + * 手续费是否已支付 STRING(20)
+ */ + public static final String handling_charge_money_had = "handling_charge_money_had"; + /** + * 购置税是否已支付 STRING(20)
+ */ + public static final String purchase_tax_had = "purchase_tax_had"; + /** + * 保险费是否已支付 STRING(20)
+ */ + public static final String insurance_premium_had = "insurance_premium_had"; + /** + * 杂费是否已支付 STRING(20)
+ */ + public static final String incidental_had = "incidental_had"; +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_FUND_INCOME.java b/src_jbo/jbo/app/tenwa/calc/LC_FUND_INCOME.java index e95c911f4..d9ceaf735 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_FUND_INCOME.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_FUND_INCOME.java @@ -237,4 +237,8 @@ public interface LC_FUND_INCOME{ * 发票号码 STRING(10)
*/ public static final String FPHM = "FPHM"; + /** + * 是否关联公司 STRING(2)
+ */ + public static final String isCompany = "isCompany"; } \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LC_FUND_INCOME_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LC_FUND_INCOME_TEMP.java index 56852fa28..515269412 100644 --- a/src_jbo/jbo/app/tenwa/calc/LC_FUND_INCOME_TEMP.java +++ b/src_jbo/jbo/app/tenwa/calc/LC_FUND_INCOME_TEMP.java @@ -249,4 +249,8 @@ public interface LC_FUND_INCOME_TEMP{ * 发票号码 STRING(10)
*/ public static final String FPHM = "FPHM"; + /** + * 是否关联公司 STRING(2)
+ */ + public static final String isCompany = "isCompany"; } \ No newline at end of file diff --git a/src_sql/鎶曚骇SQL/v20200915/zhangbb0915.sql b/src_sql/鎶曚骇SQL/v20200915/zhangbb0915.sql index 52db9a8f4..7d9b2a9c8 100644 --- a/src_sql/鎶曚骇SQL/v20200915/zhangbb0915.sql +++ b/src_sql/鎶曚骇SQL/v20200915/zhangbb0915.sql @@ -54,12 +54,125 @@ Insert Into Code_Library (codeno,itemno,itemname,bankno,sortno,isinuse,itemdescr Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('LCFundPaymentTempInfo','0230','0055','1','','''''','FIRST_PAYMENT','String','','抵扣首付款','','1','Text','2','1','','','',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/10 11:17:19','SYS_Designer','2020/08/10 15:37:44','','','1','','','',''); -- 实际付款明细excel模板 -insert into BF_TEMPLATE (`ID`, `SERIALNO`, `SORTNUMBER`, `TEMPLATENAME`, `TEMPLATESHOWNAME`, `TEMPLATEPATH`, `TEMPLATETYPE`, `OPERATETYPE`, `CALLBACK`, `CREATEMETHOD`, `DOCTYPE`, `ONECLASSIFY`, `TWOCLASSIFY`, `THREECLASSIFY`, `FOURCLASSIFY`, `TEMPLATEVERSION`, `STATUS`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `INPUTTIME`, `UPDATEUSERID`, `UPDATEORGID`, `UPDATETIME`, `CREATECONDITION`, `CREATESHEETCONDITION`) values('c6e0c939424545b0a3bf458ce22d9814',NULL,'','实际付款明细导出','实际付款明细.xlsx','实际付款明细.xlsx','excel','create','',NULL,'','','','','','1','','','administrator','8009001','2020/08/11 14:50:02','administrator','8009001','2020/08/11 17:43:46','',''); +insert into BF_TEMPLATE (ID, SERIALNO, SORTNUMBER, TEMPLATENAME, TEMPLATESHOWNAME, TEMPLATEPATH, TEMPLATETYPE, OPERATETYPE, CALLBACK, CREATEMETHOD, DOCTYPE, ONECLASSIFY, TWOCLASSIFY, THREECLASSIFY, FOURCLASSIFY, TEMPLATEVERSION, STATUS, REMARK, INPUTUSERID, INPUTORGID, INPUTTIME, UPDATEUSERID, UPDATEORGID, UPDATETIME, CREATECONDITION, CREATESHEETCONDITION) values('c6e0c939424545b0a3bf458ce22d9814',NULL,'','实际付款明细导出','实际付款明细.xlsx','实际付款明细.xlsx','excel','create','',NULL,'','','','','','1','','','administrator','8009001','2020/08/11 14:50:02','administrator','8009001','2020/08/11 17:43:46','',''); -- 实际付款明细excel标签 -insert into `BF_LABLECONFIG` (`ID`, `TAGNUMBER`, `TAGNAME`, `TITLE`, `TAGTYPE`, `VALUETYPE`, `VALUEFIELD`, `VALUEMETHOD`, `THOUSANDSFIELD`, `ISSHOEINDEX`, `REMARK`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`, `OPERATORCLASS`) values('e3237a3c6a38470983499c3a8e813c76','95','factManyOut','实际付款明细导出','tag_type3','value_type3','contract_no,customer_name,FACT_OBJECT,fact_money,fact_date,CLEAN_LEASE_MONEY,HANDLING_CHARGE_MONEY,CAUTION_MONEY,GPS_FEE,PURCHASE_TAX,INSURANCE_PREMIUM,INCIDENTAL','SELECT \r\n lci.contract_no,\r\n lul.customer_name,\r\n O.FACT_OBJECT,\r\n O.fact_money,\r\n O.fact_date,\r\n lcc.CLEAN_LEASE_MONEY,\r\n lcc.HANDLING_CHARGE_MONEY,\r\n lcc.CAUTION_MONEY,\r\n lcc.GPS_FEE,\r\n lcc.PURCHASE_TAX,\r\n lcc.INSURANCE_PREMIUM,\r\n lcc.INCIDENTAL\r\nFROM\r\n lc_fund_income_temp O \r\n LEFT JOIN LB_UNION_LESSEE lul \r\n ON lul.contract_id = O.contract_id \r\n LEFT JOIN LC_CALC_CONDITION lcc \r\n ON lcc.contract_id = O.contract_id \r\n LEFT JOIN LB_CONTRACT_INFO lci \r\n ON lci.id = O.contract_id \r\n LEFT JOIN DISTRIBUTOR_INFO di \r\n ON lci.distributor_id = di.distributor_no \r\n LEFT JOIN DISTRIBUTOR_ACCOUNT da \r\n ON da.distributor_id = di.distributor_no \r\n LEFT JOIN LC_FUND_INCOME_CALLBACK_DETAIL_TEMP ld \r\n ON (\r\n O.FLOWUNID = ld.flowunid \r\n AND lci.id = ld.contract_id\r\n )\r\n WHERE \r\n O.FLOWUNID=:{FLOW_UNID} AND\r\n O.pay_type=\'pay_type_out\' AND da.is_main=\'Y\'','','N','','','','','','','',''); +insert into BF_LABLECONFIG (ID, TAGNUMBER, TAGNAME, TITLE, TAGTYPE, VALUETYPE, VALUEFIELD, VALUEMETHOD, THOUSANDSFIELD, ISSHOEINDEX, REMARK, INPUTUSERID, INPUTORGID, UPDATEUSERID, UPDATEORGID, INPUTTIME, UPDATETIME, OPERATORCLASS) values('e3237a3c6a38470983499c3a8e813c76','95','factManyOut','实际付款明细导出','tag_type3','value_type3','contract_no,customer_name,FACT_OBJECT,fact_money,fact_date,CLEAN_LEASE_MONEY,HANDLING_CHARGE_MONEY,CAUTION_MONEY,GPS_FEE,PURCHASE_TAX,INSURANCE_PREMIUM,INCIDENTAL','SELECT \r\n lci.contract_no,\r\n lul.customer_name,\r\n O.FACT_OBJECT,\r\n O.fact_money,\r\n O.fact_date,\r\n lcc.CLEAN_LEASE_MONEY,\r\n lcc.HANDLING_CHARGE_MONEY,\r\n lcc.CAUTION_MONEY,\r\n lcc.GPS_FEE,\r\n lcc.PURCHASE_TAX,\r\n lcc.INSURANCE_PREMIUM,\r\n lcc.INCIDENTAL\r\nFROM\r\n lc_fund_income_temp O \r\n LEFT JOIN LB_UNION_LESSEE lul \r\n ON lul.contract_id = O.contract_id \r\n LEFT JOIN LC_CALC_CONDITION lcc \r\n ON lcc.contract_id = O.contract_id \r\n LEFT JOIN LB_CONTRACT_INFO lci \r\n ON lci.id = O.contract_id \r\n LEFT JOIN DISTRIBUTOR_INFO di \r\n ON lci.distributor_id = di.distributor_no \r\n LEFT JOIN DISTRIBUTOR_ACCOUNT da \r\n ON da.distributor_id = di.distributor_no \r\n LEFT JOIN LC_FUND_INCOME_CALLBACK_DETAIL_TEMP ld \r\n ON (\r\n O.FLOWUNID = ld.flowunid \r\n AND lci.id = ld.contract_id\r\n )\r\n WHERE \r\n O.FLOWUNID=:{FLOW_UNID} AND\r\n O.pay_type=\'pay_type_out\' AND da.is_main=\'Y\'','','N','','','','','','','',''); -- 实际付款明细excel关联 -insert into `bf_templatelable` (`ID`, `LABLEID`, `TEMPLATEID`, `INPUTUSERID`, `INPUTORGID`, `UPDATEUSERID`, `UPDATEORGID`, `INPUTTIME`, `UPDATETIME`) values('697046c6df78483b80921743a22894c8','e3237a3c6a38470983499c3a8e813c76','c6e0c939424545b0a3bf458ce22d9814',NULL,NULL,NULL,NULL,NULL,NULL); +insert into bf_templatelable (ID, LABLEID, TEMPLATEID, INPUTUSERID, INPUTORGID, UPDATEUSERID, UPDATEORGID, INPUTTIME, UPDATETIME) values('697046c6df78483b80921743a22894c8','e3237a3c6a38470983499c3a8e813c76','c6e0c939424545b0a3bf458ce22d9814',NULL,NULL,NULL,NULL,NULL,NULL); +-- 关联公司建表 +create table lb_producttocompany_info ( + id varchar (32), + product_id varchar (32), + company_name varchar (20), + account varchar (20), + acc_number varchar (30), + bank_name varchar (30), + province varchar (20), + city varchar (20) +); +create table `lc_company_loan_info` ( + `id` varchar (32), + `contract_id` varchar (32), + `product_id` varchar (32), + `f_plan_id` varchar (32), + `f_income_id` varchar (32), + `car_money_had` varchar (10), + `handling_charge_money_had` varchar (10), + `PURCHASE_TAX_had` varchar (10), + `INSURANCE_PREMIUM_had` varchar (10), + `INCIDENTAL_had` varchar (10) +); + +-- 关联公司 模板 +-- CompanyLoanList模板 +Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('CompanyLoanList','关联公司放款信息',null,'30',null,'1','1','default','jbo.app.tenwa.calc.LC_COMPANY_LOAN_INFO','O left join jbo.app.tenwa.calc.LC_FUND_INCOME lfi on lfi.id=O.f_income_id left join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lci on lci.id=O.contract_id left join jbo.app.tenwa.customer.DISTRIBUTOR_INFO di on lci.distributor_id=di.distributor_no','','','','',null,'SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/13 14:16:22','','1',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0010','0010','1','lfi','fact_object','fact_object','String','','关联公司','','1','Text','1','1','','','',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/13 14:16:22','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0020','0020','1','lfi','fact_date','fact_date','String','','放款日期','','1','Text','1','1','','','',null,'1','1','0','1','1',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/13 14:33:08','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0030','0030','1','di','distributor_name','distributor_name','String','','渠道商','','1','Text','1','1','','','',null,'1','1','0','1','1',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/13 14:33:08','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0040','0040','1','lci','contract_no','contract_no','String','','合同号码','','1','Text','1','1','','','',null,'1','1','0','1','1',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/13 14:33:08','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0050','0050','1','O','car_money_had','car_money_had','String','','车款是否已付','','1','Select','1','1','Code','YesOrNo','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/13 14:38:12','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0060','0060','1','','''''','car_money','String','','操作','','1','Text','1','1','','','',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/16 14:11:01','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0065','0065','1','','com.tenwa.doc.cache.DocListCache.getCarMoney(ID)','car_money_file','String','','车款支付凭证','','1','Text','1','1','','','style={width:300px}',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/14 17:42:19','SYS_Designer','2020/08/16 15:48:45','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0070','0070','1','O','handling_charge_money_had','handling_charge_money_had','String','','手续费是否已付','','1','Select','1','1','Code','YesOrNo','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/13 14:38:12','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0080','0080','1','','''''','handling_charge_money','String','','操作','','1','Text','1','1','','','',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/16 14:11:01','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0085','0085','1','','com.tenwa.doc.cache.DocListCache.getHandlingChargeMoney(ID)','handling_charge_money_file','String','','手续费支付凭证','','1','Text','1','1','','','style={width:300px}',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/16 13:44:29','SYS_Designer','2020/08/16 15:49:13','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0090','0090','1','O','purchase_tax_had','purchase_tax_had','String','','购置税是否已付','','1','Select','1','1','Code','YesOrNo','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/13 14:38:12','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0100','0100','1','','''''','purchase_tax','String','','操作','','1','Text','1','1','','','',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/16 14:11:01','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0105','0105','1','','com.tenwa.doc.cache.DocListCache.getPurchaseTax(ID)','purchase_tax_file','String','','购置税支付凭','','1','Text','1','1','','','style={width:200px}',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/16 13:48:12','SYS_Designer','2020/08/16 14:11:21','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0110','0110','1','O','insurance_premium_had','insurance_premium_had','String','','保险费是否已付','','1','Select','1','1','Code','YesOrNo','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/13 14:38:12','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0120','0001','1','O','ID','ID','String','','ID','','1','Text','1','1','','','',null,'0','0','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:08','SYS_Designer','2020/08/13 14:16:22','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0130','0130','1','','''''','insurance_premium','String','','操作','','1','Text','1','1','','','',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:09','SYS_Designer','2020/08/16 14:11:01','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0135','0135','1','','com.tenwa.doc.cache.DocListCache.getInsurancePremium(ID)','insurance_premium_file','String','','保险费支付凭证','','1','Text','1','1','','','style={width:200px}',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/16 13:51:09','SYS_Designer','2020/08/16 14:11:21','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0140','0140','1','O','incidental_had','incidental_had','String','','杂费是否已付','','1','Select','1','1','Code','YesOrNo','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:09','SYS_Designer','2020/08/13 14:38:12','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0150','0150','1','','''''','incidental','String','','操作','','1','Text','1','1','','','',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/13 11:54:09','SYS_Designer','2020/08/16 14:11:01','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanList','0160','0160','1','','com.tenwa.doc.cache.DocListCache.getIncidental(ID)','incidental_file','String','','杂费支付凭证','','1','Text','1','1','','','style={width:200px}',null,'1','1','0','1','0',0,'','','','SYS_Designer','2020/08/16 13:52:59','SYS_Designer','2020/08/16 14:11:21','0','','1','','','',''); + +-- CompanyLoanBatchInfo模板 +Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('CompanyLoanBatchInfo','关联公司放款信息批量修改',null,'30',null,'1','1','default','jbo.app.tenwa.calc.LC_COMPANY_LOAN_INFO','O left join jbo.app.tenwa.calc.LC_FUND_INCOME lfi on lfi.id=O.f_income_id left join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lci on lci.id=O.contract_id left join jbo.app.tenwa.customer.DISTRIBUTOR_INFO di on lci.distributor_id=di.distributor_no','','','','',null,'SYS_Designer','2020/08/17 09:19:19','SYS_Designer','2020/08/17 09:19:19','','1',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0010','0010','1','lfi','fact_object','fact_object','String','','关联公司','','1','Text','1','1','','','',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:19','SYS_Designer','2020/08/17 09:19:19','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0020','0020','1','lfi','fact_date','fact_date','String','','放款日期','','1','Text','1','1','','','',null,'0','1','0','1','1',0,'','','','SYS_Designer','2020/08/17 09:19:19','SYS_Designer','2020/08/17 09:19:19','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0030','0030','1','di','distributor_name','distributor_name','String','','渠道商','','1','Text','1','1','','','',null,'0','1','0','1','1',0,'','','','SYS_Designer','2020/08/17 09:19:19','SYS_Designer','2020/08/17 09:19:19','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0040','0040','1','lci','contract_no','contract_no','String','','合同号码','','1','Text','1','1','','','',null,'0','1','0','1','1',0,'','','','SYS_Designer','2020/08/17 09:19:19','SYS_Designer','2020/08/17 09:19:19','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0050','0050','1','O','car_money_had','car_money_had','String','','车款是否已付','','1','Select','1','1','Code','YesOrNo','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0060','0060','1','','''''','car_money','String','','操作','','1','Text','1','1','','','',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0065','0065','1','','com.tenwa.doc.cache.DocListCache.getCarMoney(ID)','car_money_file','String','','车款支付凭证','','1','Text','1','1','','','style={width:300px}',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0070','0070','1','O','handling_charge_money_had','handling_charge_money_had','String','','手续费是否已付','','1','Select','1','1','Code','YesOrNo','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0080','0080','1','','''''','handling_charge_money','String','','操作','','1','Text','1','1','','','',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0085','0085','1','','com.tenwa.doc.cache.DocListCache.getHandlingChargeMoney(ID)','handling_charge_money_file','String','','手续费支付凭证','','1','Text','1','1','','','style={width:300px}',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0090','0090','1','O','purchase_tax_had','purchase_tax_had','String','','购置税是否已付','','1','Select','1','1','Code','YesOrNo','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0100','0100','1','','''''','purchase_tax','String','','操作','','1','Text','1','1','','','',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0105','0105','1','','com.tenwa.doc.cache.DocListCache.getPurchaseTax(ID)','purchase_tax_file','String','','购置税支付凭','','1','Text','1','1','','','style={width:200px}',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0110','0110','1','O','insurance_premium_had','insurance_premium_had','String','','保险费是否已付','','1','Select','1','1','Code','YesOrNo','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0120','0001','1','O','ID','ID','String','','ID','','1','Text','1','1','','','',null,'0','0','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:19','SYS_Designer','2020/08/17 09:19:19','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0130','0130','1','','''''','insurance_premium','String','','操作','','1','Text','1','1','','','',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0135','0135','1','','com.tenwa.doc.cache.DocListCache.getInsurancePremium(ID)','insurance_premium_file','String','','保险费支付凭证','','1','Text','1','1','','','style={width:200px}',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0140','0140','1','O','incidental_had','incidental_had','String','','杂费是否已付','','1','Select','1','1','Code','YesOrNo','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0150','0150','1','','''''','incidental','String','','操作','','1','Text','1','1','','','',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('CompanyLoanBatchInfo','0160','0160','1','','com.tenwa.doc.cache.DocListCache.getIncidental(ID)','incidental_file','String','','杂费支付凭证','','1','Text','1','1','','','style={width:200px}',null,'0','1','0','1','0',0,'','','','SYS_Designer','2020/08/17 09:19:20','SYS_Designer','2020/08/17 09:19:20','0','','1','','','',''); + +-- productToCompanyList模板 +Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('productToCompanyList','产品关联公司',null,'30',null,'1','1','default','jbo.prd.LB_PRODUCTTOCOMPANY_INFO','O','','','','',null,'SYS_Designer','2020/08/07 13:59:50','SYS_Designer','2020/08/07 15:09:40','','0',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyList','0010','0010','1','O','id','id','String','','id','','1','Text','1','1','','','',null,'0','0','0','1','0',0,'','','','SYS_Designer','2020/08/07 13:59:50','SYS_Designer','2020/08/07 15:09:40','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyList','0020','0020','1','O','product_id','product_id','String','','产品id','','1','Text','1','1','','','',null,'0','0','0','1','0',0,'','','','SYS_Designer','2020/08/07 13:59:50','SYS_Designer','2020/08/08 18:55:09','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyList','0030','0030','1','O','company_name','company_name','String','','公司名称','','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/07 13:59:50','SYS_Designer','2020/08/08 18:55:09','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyList','0040','0040','1','O','acc_number','acc_number','String','','银行卡号','','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/07 13:59:50','SYS_Designer','2020/08/08 18:55:09','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyList','0050','0050','1','O','bank_name','bank_name','String','','开户行','','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/07 13:59:50','SYS_Designer','2020/08/08 18:55:09','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyList','0060','0045','1','O','account','account','String','','银行账户','','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/07 13:59:50','SYS_Designer','2020/08/08 18:55:09','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyList','0070','0025','1','','com.amarsoft.app.base.util.SYSNameManager.getProductNameByProductID(product_id)','product_name','String','','产品名称','','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/07 13:59:50','SYS_Designer','2020/08/07 16:19:03','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyList','0080','0080','1','O','province','province','String','','开户省份','','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/08 18:52:57','SYS_Designer','2020/08/08 18:55:09','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyList','0090','0110','1','O','city','city','String','','开户区域','','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/08 18:52:57','SYS_Designer','2020/08/08 18:55:09','','','1','','','',''); + +-- productToCompanyInfo模板 +Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('productToCompanyInfo','产品关联公司',null,'30',null,'1','1','default','jbo.prd.LB_PRODUCTTOCOMPANY_INFO','O','id=:id','','','',null,'SYS_Designer','2020/08/07 15:09:40','SYS_Designer','2020/08/07 15:10:22','','0',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyInfo','0010','0010','1','O','id','id','String','','id','','1','Text','1','1','','','',null,'0','0','0','1','0',0,'','','','SYS_Designer','2020/08/07 15:09:40','SYS_Designer','2020/08/07 15:10:22','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyInfo','0020','0020','1','O','product_id','product_id','String','','产品id','','1','Text','1','1','','','',null,'0','0','1','1','0',0,'','','','SYS_Designer','2020/08/07 15:09:40','SYS_Designer','2020/08/08 18:55:16','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyInfo','0030','0030','1','O','company_name','company_name','String','','公司名称','','1','Text','1','1','','','',null,'1','0','1','1','0',0,'','','','SYS_Designer','2020/08/07 15:09:40','SYS_Designer','2020/08/08 18:55:16','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyInfo','0040','0040','1','O','acc_number','acc_number','String','','银行卡号','','1','Text','1','1','','','',null,'1','0','1','1','0',0,'','','','SYS_Designer','2020/08/07 15:09:40','SYS_Designer','2020/08/08 18:55:16','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyInfo','0050','0050','1','O','bank_name','bank_name','String','','开户行','','1','Text','1','1','','','',null,'1','0','1','1','0',0,'','','','SYS_Designer','2020/08/07 15:09:40','SYS_Designer','2020/08/08 18:55:16','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyInfo','0060','0045','1','O','account','account','String','','银行账户','','1','Text','1','1','','','',null,'1','0','1','1','0',0,'','','','SYS_Designer','2020/08/07 15:09:40','SYS_Designer','2020/08/08 18:55:16','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyInfo','0070','0025','1','','com.amarsoft.app.base.util.SYSNameManager.getProductNameByProductID(product_id)','product_name','String','','产品名称','','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/08/07 15:09:40','SYS_Designer','2020/08/07 16:59:05','0','','1','','','selectProduct()',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyInfo','0080','0080','1','O','province','province','String','','开户省份','','1','Text','1','1','','','',null,'1','0','1','1','0',0,'','','','SYS_Designer','2020/08/08 18:50:10','SYS_Designer','2020/08/08 18:55:16','','','1','','','selectProvinceCode()',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('productToCompanyInfo','0090','0090','1','O','city','city','String','','开户地区','','1','Text','1','1','','','',null,'1','0','1','1','0',0,'','','','SYS_Designer','2020/08/08 18:50:10','SYS_Designer','2020/08/08 18:55:16','','','1','','','selectCityCode()',''); + +-- 产品关联公司菜单 +Insert Into AWE_MENU_INFO (menuid,menuname,displayname,sortno,url,urlparam,target,style,isinuse,remark,inputorgid,inputuserid,inputtime,updateorgid,updateuserid,updatetime,accesstype,icon,appicon) Values ('980170','产品关联公司','产品关联公司','980170','/Tenwa/Apzl/productCar/LmProductToCompanyList.jsp','',null,null,'1','','','','','','','','10','',''); +Insert Into AWE_Role_Menu (roleid,menuid) Values ('099','980170'); +Insert Into AWE_Role_Menu (roleid,menuid) Values ('299','980170'); +Insert Into AWE_Role_Menu (roleid,menuid) Values ('399','980170'); + +-- 产品关联公司付款信息菜单 +Insert Into AWE_MENU_INFO (menuid,menuname,displayname,sortno,url,urlparam,target,style,isinuse,remark,inputorgid,inputuserid,inputtime,updateorgid,updateuserid,updatetime,accesstype,icon,appicon) Values ('3000100181','关联公司付款信息','关联公司付款信息','3000100181','/Tenwa/Lease/Flow/CollectionAudit/CompanyLoan.jsp','',null,null,'1','','','','','','','','10','',''); +Insert Into AWE_Role_Menu (roleid,menuid) Values ('099','3000100181'); +Insert Into AWE_Role_Menu (roleid,menuid) Values ('299','3000100181'); +Insert Into AWE_Role_Menu (roleid,menuid) Values ('399','3000100181'); +Insert Into AWE_Role_Menu (roleid,menuid) Values ('401','3000100181'); + +-- 资金计划表新增字段 +ALTER TABLE LC_FUND_INCOME_TEMP ADD isCompany VARCHAR(2) COMMENT '是否关联公司'; +ALTER TABLE LC_FUND_INCOME ADD isCompany VARCHAR(2) COMMENT '是否关联公司'; + +-- \ No newline at end of file diff --git a/src_tenwa/com/tenwa/flow/fund/actualpayment/CopyFundIncomeTempToFormalCar.java b/src_tenwa/com/tenwa/flow/fund/actualpayment/CopyFundIncomeTempToFormalCar.java index 1c81dd050..1511de762 100644 --- a/src_tenwa/com/tenwa/flow/fund/actualpayment/CopyFundIncomeTempToFormalCar.java +++ b/src_tenwa/com/tenwa/flow/fund/actualpayment/CopyFundIncomeTempToFormalCar.java @@ -6,6 +6,7 @@ import java.util.Map; import jbo.app.tenwa.calc.LB_ACTUAL_PAYMENT_INFO; import jbo.app.tenwa.calc.LB_ACTUAL_PAYMENT_INFO_TEMP; +import jbo.app.tenwa.calc.LC_COMPANY_LOAN_INFO; import jbo.app.tenwa.calc.LC_FUND_INCOME; import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; import jbo.com.tenwa.lease.carbrand.BUSINESS_STATUS; @@ -35,6 +36,7 @@ public class CopyFundIncomeTempToFormalCar extends BaseBussiness{ bomLFIT.createQuery("update O set is_flowing='1' where flowunid=:FLOWUNID").setParameter("FLOWUNID", sFlowUnid).executeUpdate(); List bos = bomLFIT.createQuery("flowunid=:flowunid and pay_status<>'apply_return' and ebank_status='05' ").setParameter("flowunid", sFlowUnid).getResultList(false); BizObjectManager bsbom = JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME, Sqlca); + BizObjectManager lclibom = JBOFactory.getBizObjectManager(LC_COMPANY_LOAN_INFO.CLASS_NAME, Sqlca); if(bos.size() > 0){ for(BizObject bo:bos){ Map fromCondition = new HashMap(); @@ -60,6 +62,15 @@ public class CopyFundIncomeTempToFormalCar extends BaseBussiness{ bsbo.setAttributeValue(BUSINESS_STATUS.inputorgid, user.getOrgID()); bsbo.setAttributeValue(BUSINESS_STATUS.inputtime, StringFunction.getTodayNow()); bsbom.saveObject(bsbo); + //判断是否为关联公司的放款 + if(bo.getAttribute("isCompany")!=null&&"Y".equals(bo.getAttribute("isCompany").toString())){ + BizObject lclibo = lclibom.newObject(); + lclibo.setAttributeValue(LC_COMPANY_LOAN_INFO.contract_id,bo.getAttribute("CONTRACT_ID").toString()); + lclibo.setAttributeValue(LC_COMPANY_LOAN_INFO.f_plan_id,bo.getAttribute("PLAN_ID").toString()); + lclibo.setAttributeValue(LC_COMPANY_LOAN_INFO.f_income_id,bo.getAttribute("INCOME_ID").getString()); + lclibom.saveObject(lclibo); + } + } Map condition = new HashMap(); condition.put("FLOWUNID", sFlowUnid); diff --git a/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPaymentCar.java b/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPaymentCar.java index e173ee04f..57421e6df 100644 --- a/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPaymentCar.java +++ b/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPaymentCar.java @@ -14,6 +14,7 @@ import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT; import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; import jbo.com.tenwa.lease.comm.LC_PAY_CONDTION; import jbo.com.tenwa.lease.comm.LC_PAY_CONDTION_TEMP; +import jbo.prd.LB_PRODUCTTOCOMPANY_INFO; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; @@ -140,7 +141,21 @@ public class FundPaymentCar { // BizObject boCA = JBOFactory.createBizObjectQuery(CUSTOMER_ACCOUNT.CLASS_NAME, "contract_id=:contract_id").setParameter("contract_id", contractId).getSingleResult(false); BizObject boLCI = JBOFactory.createBizObjectQuery(LB_CONTRACT_INFO.CLASS_NAME, "ID=:ID").setParameter("ID", contractId).getSingleResult(false); String distributorId = boLCI.getAttribute("distributor_id").getString(); + String productId = boLCI.getAttribute("product_id").getString(); + BizObject boLPI = JBOFactory.createBizObjectQuery(LB_PRODUCTTOCOMPANY_INFO.CLASS_NAME, "product_id=:product_id").setParameter("product_id", productId).getSingleResult(false); BizObject boDA = JBOFactory.createBizObjectQuery(DISTRIBUTOR_ACCOUNT.CLASS_NAME, "distributor_id=:distributor_id and IS_MAIN='Y'").setParameter("distributor_id", distributorId).getSingleResult(false); + String factObject = boDA.getAttribute("ACCOUNT").getString(); + String clientAccount = boDA.getAttribute("ACCOUNT").getString(); + String clientAccNumber = boDA.getAttribute("ACC_NUMBER").getString(); + String clientBank = boDA.getAttribute("OPEN_BANK").getString(); + String isCompany = "N"; + if(boLPI!=null&&boLPI.getAttribute("product_id")!=null){ + factObject = boLPI.getAttribute("company_name").toString(); + clientAccount = boLPI.getAttribute("account").toString(); + clientAccNumber = boLPI.getAttribute("acc_number").toString(); + clientBank = boLPI.getAttribute("bank_name").toString(); + isCompany = "Y"; + } BizObjectManager bomLFIT = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); String incomeID = UUIDUtil.getUUID(); BigDecimal outOverMoney = new BigDecimal(boLFPAMT.getAttribute("PLAN_MONEY").getString()); @@ -193,10 +208,10 @@ public class FundPaymentCar { boLFITOut.setAttributeValue("CLIENT_BANK", boCA.getAttribute("BANK_NAME").getString()); boLFITOut.setAttributeValue("CLIENT_ACCOUNT", boCA.getAttribute("ACCOUNT").getString()); boLFITOut.setAttributeValue("CLIENT_ACCNUMBER", boCA.getAttribute("ACC_NUMBER").getString());*/ - boLFITOut.setAttributeValue("FACT_OBJECT", boDA.getAttribute("ACCOUNT").getString()); - boLFITOut.setAttributeValue("CLIENT_BANK", boDA.getAttribute("OPEN_BANK").getString()); - boLFITOut.setAttributeValue("CLIENT_ACCOUNT", boDA.getAttribute("ACCOUNT").getString()); - boLFITOut.setAttributeValue("CLIENT_ACCNUMBER", boDA.getAttribute("ACC_NUMBER").getString()); + boLFITOut.setAttributeValue("FACT_OBJECT", factObject); + boLFITOut.setAttributeValue("CLIENT_BANK", clientBank); + boLFITOut.setAttributeValue("CLIENT_ACCOUNT", clientAccount); + boLFITOut.setAttributeValue("CLIENT_ACCNUMBER", clientAccNumber); boLFITOut.setAttributeValue("APPLYPAY_DATE", boLFP.getAttribute("PLAN_DATE").getString()); boLFITOut.setAttributeValue("APPLY_PERSON", userId); boLFITOut.setAttributeValue("APPLY_DEPT", orgId); @@ -250,11 +265,11 @@ public class FundPaymentCar { boEquipAmt.setAttributeValue("CLIENT_BANK", boCA.getAttribute("BANK_NAME").getString()); boEquipAmt.setAttributeValue("CLIENT_ACCOUNT", boCA.getAttribute("ACCOUNT").getString()); boEquipAmt.setAttributeValue("CLIENT_ACCNUMBER", boCA.getAttribute("ACC_NUMBER").getString());*/ - boEquipAmt.setAttributeValue("FACT_OBJECT", boDA.getAttribute("ACCOUNT").getString()); - boEquipAmt.setAttributeValue("CLIENT_BANK", boDA.getAttribute("OPEN_BANK").getString()); - boEquipAmt.setAttributeValue("CLIENT_ACCOUNT", boDA.getAttribute("ACCOUNT").getString()); - boEquipAmt.setAttributeValue("CLIENT_ACCNUMBER", boDA.getAttribute("ACC_NUMBER").getString()); - + boEquipAmt.setAttributeValue("FACT_OBJECT",factObject); + boEquipAmt.setAttributeValue("CLIENT_BANK",clientBank); + boEquipAmt.setAttributeValue("CLIENT_ACCOUNT", clientAccount); + boEquipAmt.setAttributeValue("CLIENT_ACCNUMBER", clientAccNumber); + boEquipAmt.setAttributeValue("isCompany", isCompany); boEquipAmt.setAttributeValue("APPLYPAY_DATE", boLFPAMT.getAttribute("PLAN_DATE").getString()); boEquipAmt.setAttributeValue("APPLY_PERSON", userId); boEquipAmt.setAttributeValue("APPLY_DEPT", orgId);