自动卡扣添加多主体
This commit is contained in:
parent
c4cfbf0b98
commit
b7c7f4521c
@ -82,15 +82,26 @@
|
||||
|
||||
//批量代收
|
||||
function batchCollect(){
|
||||
//校验所选数据是否是一个主体
|
||||
var subjectids = getItemValueArray(0,"SUBJECTID");
|
||||
var oneSubjectId = "";
|
||||
for(var i = 0;i < subjectids.length; i++){
|
||||
if(i == 0){
|
||||
oneSubjectId = subjectids[i];
|
||||
}else{
|
||||
if(oneSubjectId != subjectids[i]){
|
||||
alert("所选数据不能有多个主体,请重新选择!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(confirm('确实要执行代收操作吗?')){
|
||||
var sParm = getItemValueArray(0,"id");
|
||||
var fileSavePath = "<%=CurConfig.getConfigure("InterfaceFileSavePath")%>";
|
||||
if(typeof(sParm) == "undefined" || sParm.length == 0 )
|
||||
{
|
||||
if(typeof(sParm) == "undefined" || sParm.length == 0 ){
|
||||
alert("请至少选择一条记录!");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
var fileSavePath = "<%=CurConfig.getConfigure("InterfaceFileSavePath")%>";
|
||||
var ids = "";
|
||||
for(var i = 0;i < sParm.length; i++){
|
||||
if(ids.length == 0){
|
||||
@ -108,14 +119,37 @@
|
||||
}
|
||||
|
||||
var parm = "id="+ids+",fileSavePath="+fileSavePath+",inputuserid="+"<%=CurUser.getUserID()%>"+",inputorgid="+"<%=CurUser.getOrgID()%>";
|
||||
var res = RunJavaMethodTrans("com.tenwa.collectaudit.cache.CollectAuditInfoCache", "batchCollectManage", parm);
|
||||
alert(res);
|
||||
//进行拆分调用天津接口或者深圳
|
||||
if("aa740e4111c111eaaa0000163e0e11e6"==oneSubjectId){
|
||||
var res = RunJavaMethodTrans("com.tenwa.collectaudit.cache.CollectAuditInfoCache", "batchCollectManage", parm);
|
||||
alert(res);
|
||||
}else if("d989246c11c111eaaa0000163e0e11e6"==oneSubjectId){
|
||||
var res = RunJavaMethodTrans("com.tenwa.collectaudit.cache.CollectAuditInfoCacheTj", "batchCollectManage", parm);
|
||||
alert(res);
|
||||
}else{
|
||||
alert("为查询到对应的主体方法!");
|
||||
}
|
||||
|
||||
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
function queryBatchCollect(){
|
||||
if(confirm('确实要执行代收操作吗?')){
|
||||
//校验所选数据是否是一个主体
|
||||
var subjectids = getItemValueArray(0,"SUBJECTID");
|
||||
var oneSubjectId = "";
|
||||
for(var i = 0;i < subjectids.length; i++){
|
||||
if(i == 0){
|
||||
oneSubjectId = subjectids[i];
|
||||
}else{
|
||||
if(oneSubjectId != subjectids[i]){
|
||||
alert("所选数据不能有多个主体,请重新选择!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(confirm('确实要执行手动刷新操作吗?')){
|
||||
var sParm = getItemValueArray(0, "id");
|
||||
var fileSavePath = "<%=CurConfig.getConfigure("InterfaceFileSavePath")%>";
|
||||
if(typeof(sParm) == "undefined" || sParm.length == 0 )
|
||||
@ -133,8 +167,17 @@
|
||||
}
|
||||
}
|
||||
var parm = "id="+ids+",fileSavePath="+fileSavePath+",inputuserid="+"<%=CurUser.getUserID()%>"+",inputorgid="+"<%=CurUser.getOrgID()%>";
|
||||
var res = RunJavaMethodTrans("com.tenwa.collectaudit.cache.CollectAuditInfoCache", "queryBatchCollectStatus",parm);
|
||||
console.log(res);
|
||||
|
||||
//进行拆分调用天津接口或者深圳
|
||||
if("aa740e4111c111eaaa0000163e0e11e6"==oneSubjectId){
|
||||
var res = RunJavaMethodTrans("com.tenwa.collectaudit.cache.CollectAuditInfoCache", "queryBatchCollectStatus",parm);
|
||||
console.log(res);
|
||||
}else if("d989246c11c111eaaa0000163e0e11e6"==oneSubjectId){
|
||||
var res = RunJavaMethodTrans("com.tenwa.collectaudit.cache.CollectAuditInfoCacheTj", "queryBatchCollectStatus",parm);
|
||||
console.log(res);
|
||||
}else{
|
||||
alert("为查询到对应的主体方法!");
|
||||
}
|
||||
// reloadSelf();
|
||||
location.reload();
|
||||
}
|
||||
@ -198,6 +241,5 @@
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -2406,6 +2406,7 @@
|
||||
<attribute name="FAILURE_TIME" label="失败时间" type="STRING"/>
|
||||
<attribute name="FAILURE_REASON" label="失败原因" type="STRING"/>
|
||||
<attribute name="SUBJECTID" label="主体id" type="STRING"/>
|
||||
<attribute name="SUBJECTNAME" label="主体名称" type="STRING"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
|
||||
@ -63,6 +63,41 @@ xmlns:p="http://www.springframework.org/schema/p"
|
||||
<property name="publicKeyUrl" value="#{collectProperties['com.tenwa.yangdm.publicKeyUrl']}"></property>
|
||||
<property name="privateKeyUrl" value="#{collectProperties['com.tenwa.yangdm.privateKeyUrl']}"></property>
|
||||
|
||||
</bean>
|
||||
|
||||
<!-- 增加天津扣款参数 -->
|
||||
<util:properties id="collectPropertiesTj" location="classpath:collect_config_tj.properties" />
|
||||
<bean id="collectConfigTj" class="com.amarsoft.app.awe.config.CollectPropertiesTj">
|
||||
<!-- 代收付系统 测试接口地址 -->
|
||||
<property name="c_serverUrl" value="#{collectPropertiesTj['com.tenwa.yangdm.collect.serverUrl']}"></property>
|
||||
<!-- 清算文件下载请求 地址 -->
|
||||
<property name="b_serverUrl" value="#{collectPropertiesTj['com.tenwa.yangdm.bank.serverUrl']}"></property>
|
||||
<!-- 银行卡、签约 接口 地址 -->
|
||||
<property name="clearRequestUrl" value="#{collectPropertiesTj['com.tenwa.yangdm.bank.clearRequestUrl']}"></property>
|
||||
<!-- 商户号 -->
|
||||
<property name="merchantId" value="#{collectPropertiesTj['com.tenwa.yangdm.merchantId']}"></property>
|
||||
<!-- 收付标志 ,S 代表 代收 -->
|
||||
<property name="flag" value="#{collectPropertiesTj['com.tenwa.yangdm.collect.flag']}"></property>
|
||||
<!-- 测试用户 -->
|
||||
<property name="userName" value="#{collectPropertiesTj['com.tenwa.yangdm.collect.userName']}"></property>
|
||||
<property name="userPass" value="#{collectPropertiesTj['com.tenwa.yangdm.collect.userPass']}"></property>
|
||||
<property name="businessCode" value="#{collectPropertiesTj['com.tenwa.yangdm.collect.businessCode']}"></property>
|
||||
<!-- 批量代收,其他参数同实时 -->
|
||||
<property name="batch_trxCode" value="#{collectPropertiesTj['com.tenwa.yangdm.batch.trxCode']}"></property>
|
||||
<!-- 实时代收 -->
|
||||
<property name="c_dataType" value="#{collectPropertiesTj['com.tenwa.yangdm.collect.dataType']}"></property>
|
||||
<property name="c_level" value="#{collectPropertiesTj['com.tenwa.yangdm.collect.level']}"></property>
|
||||
<property name="c_trxCode" value="#{collectPropertiesTj['com.tenwa.yangdm.collect.trxCode']}"></property>
|
||||
<property name="c_version" value="#{collectPropertiesTj['com.tenwa.yangdm.collect.version']}"></property>
|
||||
<!-- 银行卡四要素验证 -->
|
||||
<property name="b_trxCode" value="#{collectPropertiesTj['com.tenwa.yangdm.bank.trxCode']}"></property>
|
||||
<property name="b_version" value="#{collectPropertiesTj['com.tenwa.yangdm.bank.version']}"></property>
|
||||
<property name="b_dataType" value="#{collectPropertiesTj['com.tenwa.yangdm.bank.dataType']}"></property>
|
||||
<property name="b_level" value="#{collectPropertiesTj['com.tenwa.yangdm.bank.level']}"></property>
|
||||
<!-- 公钥、私钥地址 -->
|
||||
<property name="publicKeyUrl" value="#{collectPropertiesTj['com.tenwa.yangdm.publicKeyUrl']}"></property>
|
||||
<property name="privateKeyUrl" value="#{collectPropertiesTj['com.tenwa.yangdm.privateKeyUrl']}"></property>
|
||||
|
||||
</bean>
|
||||
|
||||
<util:properties id="secondHandCarProperties" location="classpath:second_handCar.properties" />
|
||||
|
||||
46
config/collect_config_tj.properties
Normal file
46
config/collect_config_tj.properties
Normal file
@ -0,0 +1,46 @@
|
||||
#sheng chan huan jing url
|
||||
#com.tenwa.yangdm.collect.serverUrl=http://cps.gnete.com/ProcessServlet
|
||||
#com.tenwa.yangdm.bank.serverUrl=http://cps.gnete.com:8191/gzdsf/ProcessServlet
|
||||
|
||||
#ce shi huan jing url dai shou collect si yao su bank feiyasuo
|
||||
com.tenwa.yangdm.collect.serverUrl=http://59.41.103.98:333/gzdsf/ProcessServlet
|
||||
com.tenwa.yangdm.bank.serverUrl=http://59.41.103.98:9110/gzdsf/ProcessServlet
|
||||
#---------------------------------------------------------------------------------------------
|
||||
|
||||
#clearFile downUrl
|
||||
com.tenwa.yangdm.bank.clearRequestUrl=http://59.41.103.98:9110/gzdsf/GetSettFile.do
|
||||
#com.tenwa.yangdm.merchantId=000191400207649
|
||||
#test shang hu dai ma
|
||||
com.tenwa.yangdm.merchantId=001053110000013
|
||||
|
||||
#---------------------------------------------------------------------------------------------
|
||||
#daishoupeizhi ( 'S' dai biao dai shou,batch.trxCode dai biao piliangdaishou,collect.trxCode dai biao shishidaishou,version banbenhao)
|
||||
com.tenwa.yangdm.collect.flag=S
|
||||
com.tenwa.yangdm.batch.trxCode=100001
|
||||
#com.tenwa.yangdm.collect.trxCode=100001
|
||||
com.tenwa.yangdm.collect.trxCode=100004
|
||||
com.tenwa.yangdm.collect.version=05
|
||||
|
||||
#ye wu dui ying yin hang dai ma bian hao(10702 wei zu ling)
|
||||
com.tenwa.yangdm.collect.dataType=2
|
||||
com.tenwa.yangdm.collect.level=5
|
||||
#yi xia shi yao yong de yong hu ming he mi ma(zheng shi tou chan hou xiu gai)
|
||||
#com.tenwa.yangdm.collect.userName=00019140020764901
|
||||
#com.tenwa.yangdm.collect.userPass=TPSHauto123.
|
||||
com.tenwa.yangdm.collect.businessCode=10702
|
||||
|
||||
#test (ce shi huan jing zheng shi tou chan hou zhu shi diao)
|
||||
com.tenwa.yangdm.collect.userName=operator13
|
||||
com.tenwa.yangdm.collect.userPass=ora_123456
|
||||
com.tenwa.yangdm.collect.businessCode=10600
|
||||
|
||||
#yin hang ka si yao su yan zheng
|
||||
com.tenwa.yangdm.bank.trxCode=100039
|
||||
com.tenwa.yangdm.bank.version=03
|
||||
com.tenwa.yangdm.bank.dataType=2
|
||||
com.tenwa.yangdm.bank.level=5
|
||||
|
||||
#an quan zheng shu xiang guan (si yao he gong yao de cun fang wei zhi)
|
||||
com.tenwa.yangdm.publicKeyUrl=D:\\BaiduNetdisk\\Download\\SecutyKey\\gzdsf.cer
|
||||
com.tenwa.yangdm.privateKeyUrl=D:\\BaiduNetdisk\\Download\\SecutyKey\\ORA@TEST1.p12
|
||||
#com.tenwa.yangdm.privateKeyUrl=D:\\BaiduNetdisk\\Download\\SecutyKey\\cps@00019140020764901.p12
|
||||
@ -22,10 +22,7 @@ public class CollectProperties{
|
||||
private String privateKeyUrl;
|
||||
private String clearRequestUrl;
|
||||
private String batch_trxCode;//ÅúÁ¿½»Ò×´úÂë
|
||||
private String tianJinmerchantId;
|
||||
private String tianJinuserName;
|
||||
private String tianJinuserPass;
|
||||
|
||||
|
||||
public String getBatch_trxCode() {
|
||||
return batch_trxCode;
|
||||
}
|
||||
@ -140,24 +137,4 @@ public class CollectProperties{
|
||||
public void setB_level(String b_level) {
|
||||
this.b_level = b_level;
|
||||
}
|
||||
public String getTianJinmerchantId() {
|
||||
return tianJinmerchantId;
|
||||
}
|
||||
public void setTianJinmerchantId(String tianJinmerchantId) {
|
||||
this.tianJinmerchantId = tianJinmerchantId;
|
||||
}
|
||||
public String getTianJinuserName() {
|
||||
return tianJinuserName;
|
||||
}
|
||||
public void setTianJinuserName(String tianJinuserName) {
|
||||
this.tianJinuserName = tianJinuserName;
|
||||
}
|
||||
public String getTianJinuserPass() {
|
||||
return tianJinuserPass;
|
||||
}
|
||||
public void setTianJinuserPass(String tianJinuserPass) {
|
||||
this.tianJinuserPass = tianJinuserPass;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
140
src/com/amarsoft/app/awe/config/CollectPropertiesTj.java
Normal file
140
src/com/amarsoft/app/awe/config/CollectPropertiesTj.java
Normal file
@ -0,0 +1,140 @@
|
||||
package com.amarsoft.app.awe.config;
|
||||
|
||||
|
||||
public class CollectPropertiesTj{
|
||||
|
||||
private String c_serverUrl;
|
||||
private String b_serverUrl;
|
||||
private String merchantId;
|
||||
private String flag;
|
||||
private String userName;
|
||||
private String userPass;
|
||||
private String businessCode;
|
||||
private String c_dataType;
|
||||
private String c_level;
|
||||
private String c_trxCode;
|
||||
private String c_version;
|
||||
private String b_trxCode;
|
||||
private String b_version;
|
||||
private String b_dataType;
|
||||
private String b_level;
|
||||
private String publicKeyUrl;
|
||||
private String privateKeyUrl;
|
||||
private String clearRequestUrl;
|
||||
private String batch_trxCode;//ÅúÁ¿½»Ò×´úÂë
|
||||
|
||||
public String getBatch_trxCode() {
|
||||
return batch_trxCode;
|
||||
}
|
||||
public void setBatch_trxCode(String batch_trxCode) {
|
||||
this.batch_trxCode = batch_trxCode;
|
||||
}
|
||||
public String getPublicKeyUrl() {
|
||||
return publicKeyUrl;
|
||||
}
|
||||
public void setPublicKeyUrl(String publicKeyUrl) {
|
||||
this.publicKeyUrl = publicKeyUrl;
|
||||
}
|
||||
public String getPrivateKeyUrl() {
|
||||
return privateKeyUrl;
|
||||
}
|
||||
public void setPrivateKeyUrl(String privateKeyUrl) {
|
||||
this.privateKeyUrl = privateKeyUrl;
|
||||
}
|
||||
public String getClearRequestUrl() {
|
||||
return clearRequestUrl;
|
||||
}
|
||||
public void setClearRequestUrl(String clearRequestUrl) {
|
||||
this.clearRequestUrl = clearRequestUrl;
|
||||
}
|
||||
public String getC_serverUrl() {
|
||||
return c_serverUrl;
|
||||
}
|
||||
public void setC_serverUrl(String c_serverUrl) {
|
||||
this.c_serverUrl = c_serverUrl;
|
||||
}
|
||||
public String getB_serverUrl() {
|
||||
return b_serverUrl;
|
||||
}
|
||||
public void setB_serverUrl(String b_serverUrl) {
|
||||
this.b_serverUrl = b_serverUrl;
|
||||
}
|
||||
public String getMerchantId() {
|
||||
return merchantId;
|
||||
}
|
||||
public void setMerchantId(String merchantId) {
|
||||
this.merchantId = merchantId;
|
||||
}
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
}
|
||||
public void setFlag(String flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
public String getUserPass() {
|
||||
return userPass;
|
||||
}
|
||||
public void setUserPass(String userPass) {
|
||||
this.userPass = userPass;
|
||||
}
|
||||
public String getBusinessCode() {
|
||||
return businessCode;
|
||||
}
|
||||
public void setBusinessCode(String businessCode) {
|
||||
this.businessCode = businessCode;
|
||||
}
|
||||
public String getC_dataType() {
|
||||
return c_dataType;
|
||||
}
|
||||
public void setC_dataType(String c_dataType) {
|
||||
this.c_dataType = c_dataType;
|
||||
}
|
||||
public String getC_level() {
|
||||
return c_level;
|
||||
}
|
||||
public void setC_level(String c_level) {
|
||||
this.c_level = c_level;
|
||||
}
|
||||
public String getC_trxCode() {
|
||||
return c_trxCode;
|
||||
}
|
||||
public void setC_trxCode(String c_trxCode) {
|
||||
this.c_trxCode = c_trxCode;
|
||||
}
|
||||
public String getC_version() {
|
||||
return c_version;
|
||||
}
|
||||
public void setC_version(String c_version) {
|
||||
this.c_version = c_version;
|
||||
}
|
||||
public String getB_trxCode() {
|
||||
return b_trxCode;
|
||||
}
|
||||
public void setB_trxCode(String b_trxCode) {
|
||||
this.b_trxCode = b_trxCode;
|
||||
}
|
||||
public String getB_version() {
|
||||
return b_version;
|
||||
}
|
||||
public void setB_version(String b_version) {
|
||||
this.b_version = b_version;
|
||||
}
|
||||
public String getB_dataType() {
|
||||
return b_dataType;
|
||||
}
|
||||
public void setB_dataType(String b_dataType) {
|
||||
this.b_dataType = b_dataType;
|
||||
}
|
||||
public String getB_level() {
|
||||
return b_level;
|
||||
}
|
||||
public void setB_level(String b_level) {
|
||||
this.b_level = b_level;
|
||||
}
|
||||
}
|
||||
@ -35,16 +35,6 @@ public class InitCollectConfig extends HttpServlet{
|
||||
public static final String PUBLICKEYURL;
|
||||
public static final String PRIVATEKEYURL;
|
||||
public static final String CLEARREQUESTURL;
|
||||
/**
|
||||
* 新增天津子商户号
|
||||
* 子商户商户号:001053110000013
|
||||
子商户商户名称:接口测试子商户
|
||||
子商户用户名:operator13
|
||||
子商户密码:ora_123456
|
||||
*/
|
||||
public static final String TIANJIN_MERCHANTID;
|
||||
public static final String TIANJIN_USERNAME;
|
||||
public static final String TIANJIN_USERPASS;
|
||||
|
||||
|
||||
static{
|
||||
@ -69,8 +59,5 @@ public class InitCollectConfig extends HttpServlet{
|
||||
PUBLICKEYURL=collectproperties.getPublicKeyUrl();
|
||||
PRIVATEKEYURL=collectproperties.getPrivateKeyUrl();
|
||||
CLEARREQUESTURL=collectproperties.getClearRequestUrl();
|
||||
TIANJIN_MERCHANTID=collectproperties.getTianJinmerchantId();
|
||||
TIANJIN_USERNAME=collectproperties.getTianJinuserName();
|
||||
TIANJIN_USERPASS=collectproperties.getTianJinuserPass();
|
||||
}
|
||||
}
|
||||
|
||||
62
src/com/amarsoft/app/awe/config/InitCollectConfigTj.java
Normal file
62
src/com/amarsoft/app/awe/config/InitCollectConfigTj.java
Normal file
@ -0,0 +1,62 @@
|
||||
package com.amarsoft.app.awe.config;
|
||||
|
||||
import javax.servlet.http.HttpServlet;
|
||||
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
|
||||
|
||||
/**
|
||||
* 全局增加 接口配置信息
|
||||
* @author yangdm
|
||||
*/
|
||||
public class InitCollectConfigTj extends HttpServlet{
|
||||
private static final long serialVersionUID = 1L;
|
||||
public static final String C_SERVERURL;
|
||||
public static final String B_SERVERURL;
|
||||
public static final String MERCHANTID;
|
||||
public static final String FLAG;
|
||||
public static final String USERNAME;
|
||||
public static final String USERPASS;
|
||||
public static final String BUSSINESSCODE;
|
||||
public static final String C_DATATYPE;
|
||||
public static final String C_LEVEL;
|
||||
public static final String C_TRXCODE;
|
||||
public static final String C_VERSION;
|
||||
/**
|
||||
* 批量交易代码,其他参数同实时
|
||||
*/
|
||||
public static final String BATCH_TRXCODE;
|
||||
public static final String B_TRXCODE;
|
||||
public static final String B_VERSION;
|
||||
public static final String B_DATATYPE;
|
||||
public static final String B_LEVEL;
|
||||
public static final String PUBLICKEYURL;
|
||||
public static final String PRIVATEKEYURL;
|
||||
public static final String CLEARREQUESTURL;
|
||||
|
||||
|
||||
static{
|
||||
WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();
|
||||
CollectPropertiesTj collectpropertiesTj = wac.getBean("collectConfigTj", CollectPropertiesTj.class);
|
||||
C_SERVERURL = collectpropertiesTj.getC_serverUrl();
|
||||
B_SERVERURL = collectpropertiesTj.getB_serverUrl();
|
||||
MERCHANTID = collectpropertiesTj.getMerchantId();
|
||||
FLAG = collectpropertiesTj.getFlag();
|
||||
USERNAME = collectpropertiesTj.getUserName();
|
||||
USERPASS = collectpropertiesTj.getUserPass();
|
||||
BUSSINESSCODE = collectpropertiesTj.getBusinessCode();
|
||||
C_DATATYPE = collectpropertiesTj.getC_dataType();
|
||||
C_LEVEL = collectpropertiesTj.getC_level();
|
||||
C_TRXCODE = collectpropertiesTj.getC_trxCode();
|
||||
C_VERSION = collectpropertiesTj.getC_version();
|
||||
BATCH_TRXCODE = collectpropertiesTj.getBatch_trxCode();
|
||||
B_TRXCODE = collectpropertiesTj.getB_trxCode();
|
||||
B_VERSION = collectpropertiesTj.getB_version();
|
||||
B_DATATYPE = collectpropertiesTj.getB_dataType();
|
||||
B_LEVEL = collectpropertiesTj.getB_level();
|
||||
PUBLICKEYURL=collectpropertiesTj.getPublicKeyUrl();
|
||||
PRIVATEKEYURL=collectpropertiesTj.getPrivateKeyUrl();
|
||||
CLEARREQUESTURL=collectpropertiesTj.getClearRequestUrl();
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.xhtmlrenderer.css.style.derived.StringValue;
|
||||
|
||||
import jbo.app.tenwa.customer.LB_CAR_CREDIT_PERSONAL_INFO_TEMP;
|
||||
import jbo.app.tenwa.customer.LB_CAR_CREDIT_RISKITEM_TEMP;
|
||||
import jbo.app.tenwa.customer.VI_LB_CAR_CREDIT_INVESTIGATION;
|
||||
@ -191,8 +193,9 @@ public class CreditBodyGuardAction {
|
||||
personObject.setAttributeValue("CERTID",failedpersonList.get(m).getAttribute("certId").getString());
|
||||
personObject.setAttributeValue("MOBILE",failedpersonList.get(m).getAttribute("phoneNumber").getString());
|
||||
personObject.setAttributeValue("RELATION",failedpersonList.get(m).getAttribute("relation").getString());
|
||||
personObject.setAttributeValue("CERTLOCATION", object2.get("id_card_address").toString());
|
||||
personObject.setAttributeValue("PHONELOCATION",object2.get("mobile_address").toString());
|
||||
personObject.setAttributeValue("CERTLOCATION", object2.get("id_card_address")+"");
|
||||
personObject.setAttributeValue("PHONELOCATION",object2.get("mobile_address")+"");
|
||||
|
||||
//最终决定
|
||||
String decision = "";
|
||||
if("REJECT".equals(resultobject.get("final_decision").toString())){
|
||||
@ -203,7 +206,7 @@ public class CreditBodyGuardAction {
|
||||
decision = "复审";
|
||||
}
|
||||
personObject.setAttributeValue("FINAL_DECISION",decision);
|
||||
personObject.setAttributeValue("FINAL_SCORE",resultobject.get("final_score").toString());
|
||||
personObject.setAttributeValue("FINAL_SCORE",String.valueOf(resultobject.get("final_score")));
|
||||
//保存风险详情到风险项目表
|
||||
@SuppressWarnings("rawtypes")
|
||||
List<HashMap> riskItemList = JSON.parseArray(JSON.toJSONString(resultobject.get("risk_items")),HashMap.class);
|
||||
|
||||
@ -133,4 +133,8 @@ public interface VI_LC_AUDIT_RENT_PLAN{
|
||||
* Ö÷Ìåid STRING(20)<br>
|
||||
*/
|
||||
public static final String SUBJECTID = "SUBJECTID";
|
||||
/**
|
||||
* Ö÷ÌåÃû³Æ STRING(20)<br>
|
||||
*/
|
||||
public static final String SUBJECTNAME = "SUBJECTNAME";
|
||||
}
|
||||
@ -1127,7 +1127,7 @@ public class CollectAuditInfoCache {
|
||||
strbuff.append("<QUERY_DETAILS>");
|
||||
strbuff.append("<QUERY_DETAIL>");
|
||||
strbuff.append("<QUERY_DETAIL_SN>");
|
||||
strbuff.append(sn);//½»Ò×Ã÷ϸºÅ
|
||||
//strbuff.append(sn);//½»Ò×Ã÷ϸºÅ
|
||||
strbuff.append("</QUERY_DETAIL_SN>");
|
||||
strbuff.append("</QUERY_DETAIL>");
|
||||
strbuff.append("</QUERY_DETAILS>");
|
||||
|
||||
1788
src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java
vendored
Normal file
1788
src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCacheTj.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
219
src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcessTj.java
vendored
Normal file
219
src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcessTj.java
vendored
Normal file
@ -0,0 +1,219 @@
|
||||
package com.tenwa.collectaudit.cache;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.commons.httpclient.HttpClient;
|
||||
import org.apache.commons.httpclient.HttpException;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.commons.httpclient.params.HttpMethodParams;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
|
||||
import com.amarsoft.app.awe.config.InitCollectConfigTj;
|
||||
import com.gnete.security.crypt.Crypt;
|
||||
import com.gnete.security.crypt.CryptException;
|
||||
|
||||
|
||||
/**
|
||||
* 新签名包测试用例(依赖新签名包gnete-bc-139.jar与gnete-security.jar)
|
||||
*/
|
||||
public class CollectAuditProcessTj {
|
||||
|
||||
private static Log log = LogFactory.getLog(CollectAuditProcessTj.class);
|
||||
|
||||
/**
|
||||
*代收付代收、代付交易测试URL
|
||||
*/
|
||||
//private static final String SERVER_URL = "http://59.41.103.98:333/gzdsf/ProcessServlet";
|
||||
|
||||
//代收付签约、银行卡验证交易测试URL
|
||||
//private static final String SERVER_URL = "http://59.41.103.98:9110/gzdsf/ProcessServlet";
|
||||
|
||||
|
||||
/* public static void main(String[] args) throws CryptException {
|
||||
CollectAuditProcess tp = new CollectAuditProcess( );
|
||||
tp.CollectAuditPayReq();
|
||||
}
|
||||
*/
|
||||
/**
|
||||
* 验证签名信息
|
||||
* @throws CryptException
|
||||
*/
|
||||
private boolean verifySign(String strXML) throws CryptException {
|
||||
//签名(代收付系统JDK环境使用GBK编码,商户使用签名包时需传送GBK编码集)
|
||||
Crypt crypt = new Crypt("gbk" );
|
||||
String pathCer = InitCollectConfigTj.PUBLICKEYURL;
|
||||
//"D:\\BaiduNetdisk\\Download\\代收付系统接口文档和JAVA版测试demo及测试相关参数\\JAVA版测试DEMO及测试参数_20170825\\测试商户证书\\gzdsf.cer";
|
||||
int iStart = strXML.indexOf("<SIGNED_MSG>");
|
||||
if (iStart != -1) {
|
||||
int end = strXML.indexOf("</SIGNED_MSG>");
|
||||
String signedMsg = strXML.substring(iStart+12, end);
|
||||
log.info(signedMsg);
|
||||
String strMsg = strXML.substring(0, iStart) + strXML.substring(end+13);
|
||||
//调用签名包验签接口(原文,签名,公钥路径)
|
||||
if (crypt.verify(strMsg,signedMsg, pathCer)){
|
||||
log.info("verify ok");
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
log.error("verify error");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据签名
|
||||
* comment here
|
||||
* @param strData
|
||||
* @return
|
||||
* @throws CryptException
|
||||
* @since gnete-ora 0.0.0.1
|
||||
*/
|
||||
private String signMsg(String strData) throws CryptException {
|
||||
String strRnt = "";
|
||||
//签名(代收付系统JDK环境使用GBK编码,商户使用签名包时需传送GBK编码集)
|
||||
Crypt crypt = new Crypt("gbk");
|
||||
String pathPfx = InitCollectConfigTj.PRIVATEKEYURL;
|
||||
//"D:\\BaiduNetdisk\\Download\\代收付系统接口文档和JAVA版测试demo及测试相关参数\\JAVA版测试DEMO及测试参数_20170825\\测试商户证书\\cps@00019140020764901.p12";
|
||||
//"D:\\BaiduNetdisk\\Download\\代收付系统接口文档和JAVA版测试demo及测试相关参数\\JAVA版测试DEMO及测试参数_20170825\\测试商户证书\\ORA@TEST1.p12";
|
||||
String strMsg = strData.replaceAll("<SIGNED_MSG></SIGNED_MSG>", "");
|
||||
//调用签名包签名接口(原文,私钥路径,密码)
|
||||
String signedMsg = crypt.sign(strMsg, pathPfx, "123456");
|
||||
return strData.replaceAll("<SIGNED_MSG></SIGNED_MSG>", "<SIGNED_MSG>"+signedMsg+"</SIGNED_MSG>");
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试请求
|
||||
* comment here
|
||||
* @throws CryptException
|
||||
* @since gnete-ora 0.0.0.1
|
||||
*/
|
||||
protected String CollectAuditPayReq(StringBuffer sendXml,String fileSavePath,String fileName) throws CryptException {
|
||||
String strSendData = sendXml.toString();
|
||||
HttpClient httpClient = new HttpClient( );
|
||||
PostMethod postMethod =
|
||||
new PostMethod(InitCollectConfigTj.C_SERVERURL);
|
||||
//设置编码
|
||||
httpClient.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET,"GBK");
|
||||
|
||||
//新加入代码
|
||||
ProtocolSocketFactory fcty = new MySecureProtocolSocketFactory();
|
||||
//加入相关的https请求方式
|
||||
Protocol.registerProtocol("https", new Protocol("https", fcty, 443));
|
||||
|
||||
strSendData = this.signMsg(strSendData);
|
||||
log.info(strSendData);
|
||||
System.out.println("发送报文:"+strSendData);
|
||||
InterFaceFileCreate.sendDiscFileCreate(strSendData, fileSavePath, fileName);
|
||||
postMethod.setRequestBody(strSendData);
|
||||
try {
|
||||
long start = System.currentTimeMillis();
|
||||
//执行getMethod
|
||||
int statusCode = httpClient.executeMethod(postMethod);
|
||||
System.out.println("cost:"+(System.currentTimeMillis()-start));
|
||||
//失败
|
||||
if (statusCode != HttpStatus.SC_OK) {
|
||||
log.error(
|
||||
"Method failed: " + postMethod.getStatusLine());
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
//处理内容
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.error(strResp);
|
||||
return strResp;
|
||||
}
|
||||
else {
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.info("服务器返回:" + strResp);
|
||||
InterFaceFileCreate.replyDiscFileCreate(strResp, fileSavePath, fileName);
|
||||
System.out.println("服务器返回:" + strResp);
|
||||
//验签
|
||||
if (this.verifySign(strResp)) {
|
||||
log.info("验签正确,处理服务器返回的报文");
|
||||
}
|
||||
return strResp;
|
||||
}
|
||||
} catch (HttpException e) {
|
||||
//发生致命的异常,可能是协议不对或者返回的内容有问题
|
||||
log.error("Please check your provided http address!", e);
|
||||
e.printStackTrace( );
|
||||
} catch (IOException e) {
|
||||
//发生网络异常
|
||||
log.error(e);
|
||||
} catch (Exception e) {
|
||||
log.error(null, e);
|
||||
} finally {
|
||||
//释放连接
|
||||
postMethod.releaseConnection();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/**
|
||||
* 测试验证银行卡二、三、四要素请求
|
||||
* comment here
|
||||
* @throws CryptException
|
||||
* @since gnete-ora 0.0.0.1
|
||||
*/
|
||||
protected String CollectAuditVerifyReq(StringBuffer sendXml) throws CryptException {
|
||||
String strSendData = sendXml.toString();
|
||||
HttpClient httpClient = new HttpClient();
|
||||
PostMethod postMethod =
|
||||
new PostMethod(InitCollectConfigTj.B_SERVERURL);
|
||||
//设置编码
|
||||
httpClient.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET,"GBK");
|
||||
strSendData = this.signMsg(strSendData);
|
||||
log.info(strSendData);
|
||||
System.out.println("发送报文:"+strSendData);
|
||||
postMethod.setRequestBody(strSendData);
|
||||
try {
|
||||
long start = System.currentTimeMillis();
|
||||
//执行getMethod
|
||||
int statusCode = httpClient.executeMethod(postMethod);
|
||||
System.out.println("cost:"+(System.currentTimeMillis()-start));
|
||||
//失败
|
||||
if (statusCode != HttpStatus.SC_OK) {
|
||||
log.error(
|
||||
"Method failed: " + postMethod.getStatusLine());
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
//处理内容
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.error(strResp);
|
||||
return strResp;
|
||||
}
|
||||
else {
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.info("服务器返回:" + strResp);
|
||||
System.out.println("服务器返回:" + strResp);
|
||||
//验签
|
||||
if (this.verifySign(strResp)) {
|
||||
log.info("验签正确,处理服务器返回的报文");
|
||||
}
|
||||
return strResp;
|
||||
}
|
||||
} catch (HttpException e) {
|
||||
//发生致命的异常,可能是协议不对或者返回的内容有问题
|
||||
log.error("Please check your provided http address!", e);
|
||||
e.printStackTrace( );
|
||||
} catch (IOException e) {
|
||||
//发生网络异常
|
||||
log.error(e);
|
||||
} catch (Exception e) {
|
||||
log.error(null, e);
|
||||
} finally {
|
||||
//释放连接
|
||||
postMethod.releaseConnection();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -17,6 +17,7 @@ import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.Configure;
|
||||
import com.base.util.QuartzUtil;
|
||||
import com.tenwa.collectaudit.cache.CollectAuditInfoCache;
|
||||
import com.tenwa.collectaudit.cache.CollectAuditInfoCacheTj;
|
||||
import com.tenwa.comm.util.date.DateAssistant;
|
||||
|
||||
public class AutoBuckle implements Job {
|
||||
@ -33,8 +34,7 @@ public class AutoBuckle implements Job {
|
||||
//
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
//and (O.rent<>'' or O.rent<>'0' or O.rent<>'0.0')
|
||||
List<BizObject> bos = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN", tx).createQuery("O.COLLECT_STATUS IN ('未收款', '部分收款','代偿') and O.PLAN_DATE <= '" + plan_date + "' and ( O.BATCH_STATUS<>'process' or O.BATCH_STATUS IS NULL ) and (O.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y')) ").getResultList(true);
|
||||
|
||||
List<BizObject> bosSz = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN", tx).createQuery("O.COLLECT_STATUS IN ('未收款', '部分收款','代偿') and O.SUBJECTID='aa740e4111c111eaaa0000163e0e11e6' and O.PLAN_DATE <= '" + plan_date + "' and ( O.BATCH_STATUS<>'process' or O.BATCH_STATUS IS NULL ) and (O.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y')) ").getResultList(true);
|
||||
List<BizObject> bol = JBOFactory.createBizObjectQuery(LC_OCCUPY_RENT_LIST.CLASS_NAME,"FLOW_NAME in ('网银收款','微信银联收款','微信支付收款')").getResultList(false);
|
||||
//获取租金占用表里的数据有哪些是网银收款占用的
|
||||
List<String> planIDs = new ArrayList<String>();
|
||||
@ -58,8 +58,8 @@ public class AutoBuckle implements Job {
|
||||
}
|
||||
|
||||
StringBuffer ids = new StringBuffer();
|
||||
if(bos.size()>0){
|
||||
a:for(BizObject bo : bos){
|
||||
if(bosSz!=null&&bosSz.size()>0){
|
||||
a:for(BizObject bo : bosSz){
|
||||
String pid = bo.getAttribute("id").getString();
|
||||
if(planIDs.size()>0){
|
||||
for(int i=0;i<planIDs.size();i++){
|
||||
@ -79,6 +79,32 @@ public class AutoBuckle implements Job {
|
||||
ca.batchCollectManage(tx);
|
||||
ca.queryBatchCollectStatus(tx);
|
||||
}
|
||||
|
||||
//天津自动扣款
|
||||
CollectAuditInfoCacheTj caTj = new CollectAuditInfoCacheTj();
|
||||
List<BizObject> bosTj = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN", tx).createQuery(" O.COLLECT_STATUS IN ('未收款', '部分收款','代偿') and O.SUBJECTID='d989246c11c111eaaa0000163e0e11e6' and O.PLAN_DATE <= '" + plan_date + "' and ( O.BATCH_STATUS<>'process' or O.BATCH_STATUS IS NULL ) and (O.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y')) ").getResultList(true);
|
||||
StringBuffer idsTj = new StringBuffer();
|
||||
if(bosTj!=null && bosTj.size()>0){
|
||||
a:for(BizObject bo : bosTj){
|
||||
String pid = bo.getAttribute("id").getString();
|
||||
if(planIDs.size()>0){
|
||||
for(int i=0;i<planIDs.size();i++){
|
||||
if(pid.equals(planIDs.get(i))){
|
||||
continue a;
|
||||
}
|
||||
}
|
||||
}
|
||||
idsTj.append(pid+"@");
|
||||
}
|
||||
System.out.println("本次扣款的plan_id:"+idsTj.toString());
|
||||
caTj.setId(idsTj.toString().substring(0, idsTj.toString().length()-1));
|
||||
Configure CurConfig = Configure.getInstance();
|
||||
caTj.setFileSavePath(CurConfig.getConfigure("InterfaceFileSavePath"));
|
||||
caTj.setInputuserid(jboName.getUserId(arg0, tx));
|
||||
caTj.setInputorgid("system");
|
||||
caTj.batchCollectManage(tx);
|
||||
caTj.queryBatchCollectStatus(tx);
|
||||
}
|
||||
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "success", "成功", curUserId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@ -15,6 +15,7 @@ import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.Configure;
|
||||
import com.base.util.QuartzUtil;
|
||||
import com.tenwa.collectaudit.cache.CollectAuditInfoCache;
|
||||
import com.tenwa.collectaudit.cache.CollectAuditInfoCacheTj;
|
||||
import com.tenwa.comm.util.date.DateAssistant;
|
||||
|
||||
public class AutoRefresh implements Job{
|
||||
@ -28,9 +29,9 @@ public class AutoRefresh implements Job{
|
||||
String curUserId = userId == null? "system" : userId.toString();
|
||||
try {
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
List<BizObject> bos = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('未收款', '部分收款','代偿') and O.BATCH_STATUS='process' and O.PLAN_DATE <= '"+plan_date+"'").getResultList(true);
|
||||
List<BizObject> bos = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('未收款', '部分收款','代偿') and O.SUBJECTID='aa740e4111c111eaaa0000163e0e11e6' and O.BATCH_STATUS='process' and O.PLAN_DATE <= '"+plan_date+"'").getResultList(true);
|
||||
StringBuffer ids = new StringBuffer();
|
||||
if(bos.size()>0){
|
||||
if(bos!=null && bos.size()>0){
|
||||
for (BizObject bo : bos) {
|
||||
ids.append(bo.getAttribute("id").getString()+"@");
|
||||
}
|
||||
@ -41,6 +42,21 @@ public class AutoRefresh implements Job{
|
||||
ca.setInputorgid("system");
|
||||
ca.queryBatchCollectStatus(tx);
|
||||
}
|
||||
//天津自动回盘
|
||||
CollectAuditInfoCacheTj caTj = new CollectAuditInfoCacheTj();
|
||||
List<BizObject> bosTj = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('未收款', '部分收款','代偿') and O.SUBJECTID='d989246c11c111eaaa0000163e0e11e6' and O.BATCH_STATUS='process' and O.PLAN_DATE <= '"+plan_date+"'").getResultList(true);
|
||||
StringBuffer idsTj = new StringBuffer();
|
||||
if(bosTj!=null && bosTj.size()>0){
|
||||
for (BizObject bo : bosTj) {
|
||||
idsTj.append(bo.getAttribute("id").getString()+"@");
|
||||
}
|
||||
caTj.setId(idsTj.toString().substring(0, idsTj.toString().length()-1));
|
||||
Configure CurConfig = Configure.getInstance();
|
||||
caTj.setFileSavePath(CurConfig.getConfigure("InterfaceFileSavePath"));
|
||||
caTj.setInputuserid("system");
|
||||
caTj.setInputorgid("system");
|
||||
caTj.queryBatchCollectStatus(tx);
|
||||
}
|
||||
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoRefresh", "success", "³É¹¦",curUserId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user