From 49a7c402e85ace0c91a5a3f53b1da9cc13c4cc98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A3=8A?= <寮犵@LAPTOP-O3DO03BA> Date: Mon, 25 Jun 2018 19:03:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E8=AF=81=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E4=BB=A3=E7=A0=81=E7=AE=80=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/license.properties | 2 +- .../validate/IdentityVerification.java | 19 ++------- .../validate/ValidatePropertiesUtil.java | 40 +++++++++++++++++++ 3 files changed, 45 insertions(+), 16 deletions(-) create mode 100644 src_tenwa/com/tenwa/lease/flow/project/validate/ValidatePropertiesUtil.java diff --git a/config/license.properties b/config/license.properties index 151da6f9c..8a4e832ba 100644 --- a/config/license.properties +++ b/config/license.properties @@ -1 +1 @@ -key=JTNGdiUzRnpVJTNEJTVDWCU1Q1olM0YlNUIlNUM5ZHgrJTI0JTVDJTIwMyUyM0IlM0RLNCUzRmMlM0ZvJTNGZyUzRmslM0ZoJTNGb2JTN19SS0gwY2Q3JTI5MSUyNUQ5RyU1RCUzRmMlM0ZvYjRLL1J0ZEUlM0Z6JTNGeCUyNi0lM0Z2JTVDakAvUmthM0piJTYwVkR4JTNGeCUzRnZNciU1Q2glNUJwR3FVaSU1QnFFdkBoJTNGeCUzRnYlNUR3Tm1PbU0vL2slM0ZnKnklM0ZkJTNBcyUzRnM2ZyUzRnYlMjYvJTVCaiU1QiUzQkdnQm0lM0Z4JTNGdk93Tm1JekpnJTNGeDViKnklM0ZkJTNGZiUzRmQyYSUzRnYyb1h4RWZPbU9zJTNGeCUzRnZKal9lTWJjNiUzRnhVQiUzQVVBNSU1QlhGLSU1RCUyMFQlNjAvQS9yJTNGZCUzRC4lM0ZnJTNEZjluMm9VaFRpYjBacCUyNnIlM0Z2TnAlN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/validate/IdentityVerification.java b/src_tenwa/com/tenwa/lease/flow/project/validate/IdentityVerification.java index cafa628f7..baf326271 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/validate/IdentityVerification.java +++ b/src_tenwa/com/tenwa/lease/flow/project/validate/IdentityVerification.java @@ -1,13 +1,10 @@ package com.tenwa.lease.flow.project.validate; -import java.io.InputStream; -import java.net.URLDecoder; import java.util.List; -import java.util.Properties; -import org.apache.commons.codec.binary.Base64; import org.dom4j.Document; import org.dom4j.DocumentHelper; import org.dom4j.Element; +import sun.misc.BASE64Decoder; import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; @@ -30,17 +27,9 @@ public class IdentityVerification { try { BizObjectManager bom1 = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME,tx); BizObject identityObject = bom1.createQuery("ID=:id").setParameter("id", id).getSingleResult(false); - //读取授权文件,因为其他方法都读取不到,只能通过此方法 - Properties prop = new Properties(); - InputStream in= IdentityVerification.class.getClassLoader().getResourceAsStream("license.properties"); - prop.load(in); - String property = prop.getProperty("key"); - Base64 base64 = new Base64(); - String msg = new String(base64.decode(property.getBytes("utf-8")),"utf-8"); - String decode = URLDecoder.decode(msg,"utf-8"); - char[] charArray = decode.toCharArray(); - charArray[16]='+'; - decode = new String(charArray); + //读取授权文件 + String license =ValidatePropertiesUtil.get("key"); + String decode = new String(new BASE64Decoder().decodeBuffer(license)); String inConditions = SoapRequest.XMLConfiguration(identityObject.getAttribute("CERTID").getString(),identityObject.getAttribute("FULLNAME").getString()); String result = NciicClient.executeClient("NciicServices",decode,inConditions); Document document = DocumentHelper.parseText(result); diff --git a/src_tenwa/com/tenwa/lease/flow/project/validate/ValidatePropertiesUtil.java b/src_tenwa/com/tenwa/lease/flow/project/validate/ValidatePropertiesUtil.java new file mode 100644 index 000000000..57affecf0 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/validate/ValidatePropertiesUtil.java @@ -0,0 +1,40 @@ +package com.tenwa.lease.flow.project.validate; + +import java.io.IOException; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Properties; +import java.util.concurrent.ConcurrentHashMap; + +import com.amarsoft.are.ARE; + +/** + * 信贷校验配置文件读取类 + * @author 张磊 + * 2018年6月25日 下午5:15:34 + */ +public class ValidatePropertiesUtil { + private static final Map attributes ; + + static{ + attributes = new ConcurrentHashMap(); + Properties prop = new Properties(); + try { + prop.load(ValidatePropertiesUtil.class.getResourceAsStream("/license.properties")); + for(Entry entry : prop.entrySet()){ + if(entry.getKey()==null || entry.getValue() == null){ + continue; + } + attributes.put(entry.getKey().toString(),entry.getValue().toString()); + } + } catch (IOException e) { + e.printStackTrace(); + ARE.getLog().error("init ValidatePropertiesUtil info failed"); + } + ARE.getLog().info("init ValidatePropertiesUtil info success"); + } + + public static String get(String propName){ + return attributes.get(propName); + } +} From 12231ff7f4b38fca7dea1335d7eecbb290a3122e Mon Sep 17 00:00:00 2001 From: hexiaomou Date: Mon, 25 Jun 2018 20:03:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=20=E4=B8=9A=E5=8A=A1=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E5=90=91=E5=AE=A2=E6=88=B7=E8=A1=A8=E6=8F=92?= =?UTF-8?q?=E7=BB=8F=E9=94=80=E5=95=86=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/etc/jbo/jbo_customer.xml | 2 ++ WebContent/WEB-INF/etc/jbo/jbo_lease.xml | 1 + .../sdk/controller/CmbToCallbackController.java | 2 +- .../tenwa/sdk/controller/CmbToPayController.java | 8 ++++++-- .../LBCustomerTempToFormalBusiness.java | 15 +++++++++++++++ 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml index 9a116a398..ca79d88d5 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml @@ -133,6 +133,8 @@ + + diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml index f69bd9e81..75a7f291c 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml @@ -919,6 +919,7 @@ + diff --git a/src_cmb/com/tenwa/sdk/controller/CmbToCallbackController.java b/src_cmb/com/tenwa/sdk/controller/CmbToCallbackController.java index 90e101a42..fe8d04c89 100644 --- a/src_cmb/com/tenwa/sdk/controller/CmbToCallbackController.java +++ b/src_cmb/com/tenwa/sdk/controller/CmbToCallbackController.java @@ -89,7 +89,7 @@ public class CmbToCallbackController extends BaseFlowStartAction { SDKNtstLinFxVo ntstLinFxOne = null ; for(BizObject check_list_one : check_list_bo) { ntstLinFxOne = new SDKNtstLinFxVo(); - String ONE_REQNBR = check_list_one.getAttribute("BANK_REQNBR").toString(); + String ONE_REQNBR = check_list_one.getAttribute("REQNBR").toString(); ntstLinFxOne.setREQNBR(ONE_REQNBR); ntstLinFxList.add(ntstLinFxOne); } diff --git a/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java b/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java index 8dd5762c0..a6ec74739 100644 --- a/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java +++ b/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java @@ -88,7 +88,7 @@ public class CmbToPayController extends BaseFlowStartAction { * 本方放款账户获取######开始 */ BizObjectManager accountManager = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME); - List accountBoList = accountManager.createQuery("select o.acc_number,o.acc_bank,o.acc_name,o.branch_code,oi.OWN_NAME from o 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 acc_type='0010' and account_type='out_account' ").getResultList(false); + List accountBoList = accountManager.createQuery("select o.id,o.acc_number,o.acc_bank,o.acc_name,o.branch_code,oi.OWN_NAME from o 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 acc_type='0010' and account_type='out_account' ").getResultList(false); if( accountBoList==null ) { map.put("code", "1") ; map.put("msg", "本方账户不存在,请检查") ; @@ -352,6 +352,7 @@ public class CmbToPayController extends BaseFlowStartAction { 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("BNKFLG", BNKFLG); @@ -392,7 +393,7 @@ public class CmbToPayController extends BaseFlowStartAction { xmlStr = xmlStr.replace("", "").replace("", "").replace("", ""); try { System.out.println(xmlStr); //控制台打印请求的XML数据 - HttpRequest request = new HttpRequest("http://192.168.7.85:65188"); + HttpRequest request = new HttpRequest("http://172.16.20.242:65188"); request.setTimeout(3000); //HttpRequest request = new HttpRequest(); String data = xmlStr; @@ -408,6 +409,8 @@ public class CmbToPayController extends BaseFlowStartAction { 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) { @@ -458,6 +461,7 @@ public class CmbToPayController extends BaseFlowStartAction { 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()); diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerTempToFormalBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerTempToFormalBusiness.java index bdf847888..b936ff558 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerTempToFormalBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerTempToFormalBusiness.java @@ -18,6 +18,7 @@ import jbo.app.tenwa.customer.CUSTOMER_INFO_HIS; import jbo.app.tenwa.customer.CUSTOMER_PERSON; import jbo.app.tenwa.customer.CUSTOMER_PERSON_HIS; import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP; +import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT; import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP; import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE; @@ -94,6 +95,13 @@ public class LBCustomerTempToFormalBusiness extends BaseBussiness { cust.setAttributeValue("certtype",cert.getAttribute("certtype").getString()); cust.setAttributeValue("certid",cert.getAttribute("certid").getString()); } + String inputorgid = bo.getAttribute("inputorgid").toString(); + if(inputorgid.startsWith("8006")) { + BizObject distributor_bo=JBOFactory.createBizObjectQuery(DISTRIBUTOR_INFO.CLASS_NAME,"orgid=:orgid").setParameter("orgid",inputorgid).getSingleResult(false); + if(distributor_bo!=null) { + cust.setAttributeValue("distributor_id",distributor_bo.getAttribute("distributor_no")); + } + } cust.setAttributeValue("inputuserid",bo.getAttribute("inputuserid")); cust.setAttributeValue("inputorgid",bo.getAttribute("inputorgid")); cust.setAttributeValue("inputtime",bo.getAttribute("inputtime")); @@ -155,6 +163,13 @@ public class LBCustomerTempToFormalBusiness extends BaseBussiness { cust.setAttributeValue("certtype",cert.getAttribute("certtype").getString()); cust.setAttributeValue("certid",cert.getAttribute("certid").getString()); } + String inputorgid = bo.getAttribute("inputorgid").toString(); + if(inputorgid.startsWith("8006")) { + BizObject distributor_bo=JBOFactory.createBizObjectQuery(DISTRIBUTOR_INFO.CLASS_NAME,"orgid=:orgid").setParameter("orgid",inputorgid).getSingleResult(false); + if(distributor_bo!=null) { + cust.setAttributeValue("distributor_id",distributor_bo.getAttribute("distributor_no")); + } + } cust.setAttributeValue("inputuserid",bo.getAttribute("inputuserid")); cust.setAttributeValue("inputorgid",bo.getAttribute("inputorgid")); cust.setAttributeValue("inputtime",bo.getAttribute("inputtime"));