九江征信授权出版1026

This commit is contained in:
zhanglei 2021-10-26 15:11:10 +08:00
parent 399749c065
commit f690a237ee
5 changed files with 209 additions and 57 deletions

View File

@ -10,6 +10,8 @@
String userId = CurUser.getUserID();
String projectNo = Sqlca.getString("select PROJECT_NO from lb_project_info_temp where FLOWUNID='"+sFlowUnid+"'");
System.out.println("征信授权书 projectNo=" + projectNo);
String corpusSource = Sqlca.getString("select CORPUS_SOURCE from lb_project_info_temp where FLOWUNID='"+sFlowUnid+"'");
System.out.println("征信授权书 corpusSource=" + corpusSource);
String flowno = Sqlca.getString("select flowno from flow_object where objectno='"+sFlowUnid+"'");
System.out.println("征信授权书 flowno=" + flowno);
@ -184,49 +186,115 @@
征信授权书_邮储 99002
借款服务确认书_邮储99003
*/
if("申请人" == relation){
//目前征信授权算上邮储一共3个模板
var relationApplyCount = 3;
for(var i=0; i < relationApplyCount; i++ ){
if(i == 1){
//征信授权书_邮储 99002
objectType="99002";
tempId = "65bd277ad98611eb970e00163e0ad612";//申请人的情况下征信授权书_邮储
param["templateNo"] = tempId;
tempParam["OBJECTTYPE"] = objectType;
}else if(i == 2){
//借款服务确认书_邮储 99003
objectType="99003";
tempId = "134f3d88e2f811eb970e00163e0ad612";//申请人的情况下借款服务确认书_邮储
param["templateNo"] = tempId;
tempParam["OBJECTTYPE"] = objectType;
}
param["templateParam"] = JSON.stringify(tempParam).replace(/,/g, "@");//生成模板的参数据
for (var key in param) {
if (sparam.length > 0) {
sparam += ",";
}
sparam += key + "=" + param[key];
}
var deleteresult = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
var result = RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction", "createOfficeByTemplate", sparam);
// word转pdf
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthSignAction", "wordToPdfCreditAuth",
"projectNo=" + projectNo + ",operationType=" + objectType
+ ",fullName=" + fullName + ",certId=" + certId + ",phone=" + phone + ",flowUnid=" + flowunid);
if (typeof (id) == "undefined" || id.length <= 0 || id == "") {
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
alert("征信授权文件生成失败!!!");
return;
}
if(i == 0){
if (typeof (id) == "undefined" || id.length <= 0 || id == "") {
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
}else {
number++;
}
}
}
if("申请人" == relation) {
var corpusSource = "<%=corpusSource%>";
if ("PSBC" == corpusSource) {
//邮储助贷 目前征信授权算上邮储一共3个模板
var relationApplyCount = 3;
for (var i = 0; i < relationApplyCount; i++) {
if (i == 1) {
//征信授权书_邮储 99002
objectType = "99002";
tempId = "65bd277ad98611eb970e00163e0ad612";//申请人的情况下征信授权书_邮储
param["templateNo"] = tempId;
tempParam["OBJECTTYPE"] = objectType;
} else if (i == 2) {
//借款服务确认书_邮储 99003
objectType = "99003";
tempId = "134f3d88e2f811eb970e00163e0ad612";//申请人的情况下借款服务确认书_邮储
param["templateNo"] = tempId;
tempParam["OBJECTTYPE"] = objectType;
}
param["templateParam"] = JSON.stringify(tempParam).replace(/,/g, "@");//生成模板的参数据
for (var key in param) {
if (sparam.length > 0) {
sparam += ",";
}
sparam += key + "=" + param[key];
}
var deleteresult = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
var result = RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction", "createOfficeByTemplate", sparam);
// word转pdf
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthSignAction", "wordToPdfCreditAuth",
"projectNo=" + projectNo + ",operationType=" + objectType
+ ",fullName=" + fullName + ",certId=" + certId + ",phone=" + phone + ",flowUnid=" + flowunid);
if (typeof (id) == "undefined" || id.length <= 0 || id == "") {
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
alert("征信授权文件生成失败!!!");
return;
}
if (i == 0) {
if (typeof (id) == "undefined" || id.length <= 0 || id == "") {
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
} else {
number++;
}
}
}
}else if("JJCCB" == corpusSource){
//九江银行 目前征信授权算上九江银行一共2个模板
var relationApplyCount = 2;
for (var i = 0; i < relationApplyCount; i++) {
if (i == 1) {
//征信授权书_九江 99004
objectType = "99004";
tempId = "cc05a07c361011eca13700163e0ad612";//申请人的情况下征信授权书_九江
param["templateNo"] = tempId;
tempParam["OBJECTTYPE"] = objectType;
}
param["templateParam"] = JSON.stringify(tempParam).replace(/,/g, "@");//生成模板的参数据
for (var key in param) {
if (sparam.length > 0) {
sparam += ",";
}
sparam += key + "=" + param[key];
}
var deleteresult = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
var result = RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction", "createOfficeByTemplate", sparam);
// word转pdf
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthSignAction", "wordToPdfCreditAuth",
"projectNo=" + projectNo + ",operationType=" + objectType
+ ",fullName=" + fullName + ",certId=" + certId + ",phone=" + phone + ",flowUnid=" + flowunid);
if (typeof (id) == "undefined" || id.length <= 0 || id == "") {
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
alert("征信授权文件生成失败!!!");
return;
}
if (i == 0) {
if (typeof (id) == "undefined" || id.length <= 0 || id == "") {
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
} else {
number++;
}
}
}
}else if("AP" == corpusSource){
param["templateParam"] = JSON.stringify(tempParam).replace(/,/g, "@");//生成模板的参数据
for (var key in param) {
if (sparam.length > 0) {
sparam += ",";
}
sparam += key + "=" + param[key];
}
var deleteresult = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
var result = RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction", "createOfficeByTemplate", sparam);
// word转pdf
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthSignAction", "wordToPdfCreditAuth",
"projectNo=" + projectNo + ",operationType=" + objectType
+ ",fullName=" + fullName + ",certId=" + certId + ",phone=" + phone + ",flowUnid=" + flowunid);
if (typeof (id) == "undefined" || id.length <= 0 || id == "") {
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
alert("征信授权文件生成失败!!!");
return;
}
if (i == 0) {
if (typeof (id) == "undefined" || id.length <= 0 || id == "") {
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
} else {
number++;
}
}
}
}else {
param["templateParam"] = JSON.stringify(tempParam).replace(/,/g, "@");//生成模板的参数据
for (var key in param) {
@ -261,7 +329,33 @@
reloadSelf();
}
function commonCreatePDF(param, tempParam, sparam, certId, projectNo, objectType, fullName, certId, phone, flowunid, number, i) {
param["templateParam"] = JSON.stringify(tempParam).replace(/,/g, "@");//生成模板的参数据
for (var key in param) {
if (sparam.length > 0) {
sparam += ",";
}
sparam += key + "=" + param[key];
}
var deleteresult = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
var result = RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction", "createOfficeByTemplate", sparam);
// word转pdf
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthSignAction", "wordToPdfCreditAuth",
"projectNo=" + projectNo + ",operationType=" + objectType
+ ",fullName=" + fullName + ",certId=" + certId + ",phone=" + phone + ",flowUnid=" + flowunid);
if (typeof (id) == "undefined" || id.length <= 0 || id == "") {
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
alert("征信授权文件生成失败!!!");
return;
}
if (i == 0) {
if (typeof (id) == "undefined" || id.length <= 0 || id == "") {
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.CreditAuthDeleteAction", "deleteCreditAuth", "certId=" + certId + ",projectNo=" + projectNo + ",objectType=" + objectType);
} else {
number++;
}
}
}
/**
* 发起电子签约
*/

View File

@ -61,23 +61,28 @@ public class CreditAuthActionNewUtils {
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
BizObject bo = null;
try {
BizObject pbo = pbm.createQuery("FLOWUNID=:flowUnid")
.setParameter("flowUnid", flowUnid).getSingleResult(true);
if(pbo == null) {
throw new RuntimeException("请检查合同文件是否生成!");
}
Map<String, String> docAttrIdMap = new HashMap<String, String>();
if("申请人".equals(relation)){
// TODO: 2021/7/12 申请人安鹏征信授权邮储征信授权邮储借款告知书一起签
// TODO: 2021/7/12 判断所有证书是不是生成完毕
String msg = checkPerson(docAttrIdMap);
String corpusSource = pbo.getAttribute("CORPUS_SOURCE").getString();//资方信息
// : 2021/7/12 如果是邮储申请人安鹏征信授权邮储征信授权邮储借款告知书一起签
// : 2021/7/12 判断所有证书是不是生成完毕
// TODO : 2021/7/12 如果是九江申请人安鹏征信授权九江征信授权一起签
String msg = checkPerson(docAttrIdMap, corpusSource);
if(null != msg){
logger.info("申请人添加合同文件失败 msg=" + msg);
return "flase@" + msg;
}
}
BizObject pbo = pbm.createQuery("FLOWUNID=:flowUnid")
.setParameter("flowUnid", flowUnid).getSingleResult(true);
// 查询lb_doc_contract_list表
bo = contBom.createQuery("attribute_id=:attributeId and file_flag='yes' and sendprocess='0' ")
.setParameter("attributeId", attributeId).getSingleResult(true);
if(pbo == null || bo == null ){
if(bo == null ){
throw new RuntimeException("请检查合同文件是否生成!");
} else {
String subjectId = pbo.getAttribute("subjectid").getString();
@ -181,12 +186,18 @@ public class CreditAuthActionNewUtils {
}
}
private String checkPerson(Map<String, String> docAttrIdMap) throws JBOException {
//安鹏征信授权邮储征信授权邮储借款告知书
private String checkPerson(Map<String, String> docAttrIdMap, String corpusSource) throws JBOException {
// AP("AP", "安鹏自有资金"),
// JJCCB("JJCCB", "九江银行"),
// PSBC("PSBC", "邮储助贷");
Map<String, String> creditAuthMap = new HashMap<>();
creditAuthMap.put("99001", "安鹏征信授权");
creditAuthMap.put("99002", "邮储征信授权");
creditAuthMap.put("99003", "邮储借款告知书");
if("PSBC".equals(corpusSource.toUpperCase())){
creditAuthMap = CreditAuthTypesMap.initApplicant();
}else if("JJCCB".equals(corpusSource.toUpperCase())){
creditAuthMap = CreditAuthTypesMap.initJJApplicant();
}else {
creditAuthMap = CreditAuthTypesMap.initOther();
}
for(String creditAuth : creditAuthMap.keySet()){
BizObjectManager bom = JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME);
BizObject lbDocBiz = bom.createQuery("OBJECTTYPE=:objectType and CUST_ID=:certId and PROJ_ID=:projectNo ")
@ -246,7 +257,8 @@ public class CreditAuthActionNewUtils {
if("申请人".equals(relation)){
logger.info("contractSignStatus20210712 申请人下载,所有授权信息。");
Map<String, String> docAttrIdMap = new HashMap<String, String>();
String msg = checkPerson(docAttrIdMap);
String corpusSource = pbo.getAttribute("CORPUS_SOURCE").getString();//资方信息
String msg = checkPerson(docAttrIdMap, corpusSource);
if(null != msg){
logger.info("申请人添加合同文件失败 msg=" + msg);
return "false@" + msg;

View File

@ -324,6 +324,30 @@ public class CreditAuthActionTwoUtil {
personalStamperTime2.setOffsetX(-0.55);
personalStamperTime2.setOffsetY(-0.0025);
stampers.add(personalStamperTime2);
}else if("99004".equals(createType)){
// TODO: 2021/7/12 九江征信授权书
//申请人添加第二个签字位置
Stamper personalStamper2 = new Stamper();
personalStamper2.setPage(0);
personalStamper2.setType("PERSONAL");
personalStamper2.setSignatoryId(personalSignatoryId);
personalStamper2.setDocumentId(documentId);
personalStamper2.setKeyword("授权人姓名:");
personalStamper2.setOffsetX(-0.03);
personalStamper2.setOffsetY(-0.02);
stampers.add(personalStamper2);
//添加二个签署时间
Stamper personalStamperTime2 = new Stamper();
personalStamperTime2.setPage(0);
personalStamperTime2.setType("TIMESTAMP");
personalStamperTime2.setSignatoryId(personalSignatoryId);
personalStamperTime2.setDocumentId(documentId);
personalStamperTime2.setKeyword("授权日期:");
// TODO: 2021/7/13 太靠右了
personalStamperTime2.setOffsetX(0.025);
personalStamperTime2.setOffsetY(-0.0025);
stampers.add(personalStamperTime2);
}
}
}

View File

@ -7,6 +7,7 @@ public class CreditAuthTypesMap {
/**
* 资方是邮储
* 如果是申请人的话则需要签3份 99001 99002 99003
* @return
*/
@ -18,6 +19,18 @@ public class CreditAuthTypesMap {
return creditAuthMap;
}
/**
* 资方是九江
* 如果是申请人的话则需要签3份 99001 99002 99003
* @return
*/
public static Map<String, String> initJJApplicant(){
Map<String, String> creditAuthMap = new HashMap<>();
creditAuthMap.put("99001", "安鹏征信授权");
creditAuthMap.put("99004", "九江征信授权");
return creditAuthMap;
}
public static Map<String, String> initOther(){
Map<String, String> creditAuthMap = new HashMap<>();
creditAuthMap.put("99001", "安鹏征信授权");

View File

@ -29,19 +29,28 @@ public class DocListCreditAuth {
public static String findFileListByUser(String certId, String relation, String flowunid) throws Exception {
// : 2021/7/19 ²éѯÎļþÐÅÏ¢
String projectNo = null;
String corpusSource = null;
if(flowunid.startsWith("FBO")){
BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME);
BizObject pbo = pbm.createQuery("FLOWUNID=:flowUnid").setParameter("flowUnid", flowunid).getSingleResult(true);
projectNo = pbo.getAttribute("PROJECT_NO").toString();
corpusSource = pbo.getAttribute("CORPUS_SOURCE").getString();//资方信息
}else {
BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME);
BizObject pbo = pbm.createQuery("ID=:ID").setParameter("ID", flowunid).getSingleResult(true);
projectNo = pbo.getAttribute("PROJECT_NO").toString();
corpusSource = pbo.getAttribute("CORPUS_SOURCE").getString();//资方信息
}
Map<String, String> creditAuthTypesMap = CreditAuthTypesMap.initOther();
if("ÉêÇëÈË".equals(relation)){
creditAuthTypesMap = CreditAuthTypesMap.initApplicant();
if("PSBC".equals(corpusSource.toUpperCase())){
creditAuthTypesMap = CreditAuthTypesMap.initApplicant();
}else if("JJCCB".equals(corpusSource.toUpperCase())){
creditAuthTypesMap = CreditAuthTypesMap.initJJApplicant();
}else {
creditAuthTypesMap = CreditAuthTypesMap.initOther();
}
}
List<JSONObject> boJsonList = new ArrayList<JSONObject>();
for(String objectType : creditAuthTypesMap.keySet()){