修改app制作合同盖章报错
This commit is contained in:
parent
52012c9048
commit
2f829d3cfd
@ -163,7 +163,7 @@ public class ContractMakeServiceImpl implements ContractMakeService{
|
||||
modc.pdfAndMark(outPdfFile, path, contractId,flowParms.get("leasform"), sqlca);
|
||||
// //判断是否自动盖章sealType signType
|
||||
if(("01".equals(flowParms.get("customertype"))&&"Auto".equals(flowParms.get("sealType")) )||("Auto".equals(flowParms.get("sealType")) && "Hand".equals(flowParms.get("signType")) )){
|
||||
modc.compnySignIng(contractId, sqlca);
|
||||
modc.compnySignIng(contractId,flowParms.get("SubjectId"), sqlca);
|
||||
}
|
||||
body.put("status", "00");
|
||||
body.put("message", "");
|
||||
|
||||
@ -3,8 +3,6 @@ package com.tenwa.makeContract.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME;
|
||||
@ -16,6 +14,7 @@ import jbo.com.tenwa.lease.comm.LB_CONTRACT_STATUS;
|
||||
import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR;
|
||||
import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP;
|
||||
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
|
||||
import jbo.prd.PRD_SPECIFIC_LIBRARY;
|
||||
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -131,6 +130,7 @@ public class McontractServiceImpl implements McontractService{
|
||||
BqLogs.commit();
|
||||
return rMage;
|
||||
}
|
||||
String subjectId = lpi.getAttribute("product_id")==null? "" :this.getSubjectId(lpi.getAttribute("product_id").getString());
|
||||
//校验项目是否在业务变更和业务撤销流程中
|
||||
BizObjectManager fwfManage = JBOFactory.getBizObjectManager(FLOW_WORK_FLAG.CLASS_NAME,tx);
|
||||
BizObject fwf = fwfManage.createQuery("select fc.flowname from O left join jbo.sys.FLOW_CATALOG fc on O.flow_name=fc.flowno where O.mutex_key=:projectId ").setParameter("projectId", lpi.getAttribute("ID").getString()).getSingleResult(false);
|
||||
@ -238,7 +238,7 @@ public class McontractServiceImpl implements McontractService{
|
||||
// JBOTransaction wordtx =JBOFactory.createJBOTransaction();
|
||||
String wordTopdf = modc.wordTopdf(projectId, contractId, tx);
|
||||
//合同盖章
|
||||
String compnySignIng = modc.compnySignIng(contractId, tx);
|
||||
String compnySignIng = modc.compnySignIng(contractId,subjectId, tx);
|
||||
//将一维码添加到pdf中
|
||||
// wordtx.commit();
|
||||
// JBOTransaction pdftx =JBOFactory.createJBOTransaction();
|
||||
@ -331,6 +331,7 @@ public class McontractServiceImpl implements McontractService{
|
||||
BqLogs.commit();
|
||||
return rMage;
|
||||
}
|
||||
String subjectId = lpi.getAttribute("product_id")==null? "" :this.getSubjectId(lpi.getAttribute("product_id").getString());
|
||||
String projectId = lpi.getAttribute("ID").getString();
|
||||
BizObject lci = lciManage.createQuery("PROJECT_ID=:projectId").setParameter("projectId", lpi.getAttribute("ID").getString()).getSingleResult(false);
|
||||
if(lci==null){
|
||||
@ -441,7 +442,7 @@ public class McontractServiceImpl implements McontractService{
|
||||
//将word转pdf,并返回生成的路径
|
||||
String wordTopdf = modc.wordTopdf(projectId, contractId, tx);
|
||||
//合同盖章
|
||||
String compnySignIng = modc.compnySignIng(contractId, tx);
|
||||
String compnySignIng = modc.compnySignIng(contractId,subjectId ,tx);
|
||||
//将一维码添加到pdf中
|
||||
String outPdfFile = CurConfig.getConfigure("BQcontract");
|
||||
String newPath = modc.pdfAndMark(outPdfFile, "", contractId,lpi.getAttribute("LEAS_FORM").toString(), tx);
|
||||
@ -505,6 +506,17 @@ public class McontractServiceImpl implements McontractService{
|
||||
}
|
||||
return BASE64.encodeImgageToBase64(file);
|
||||
}
|
||||
|
||||
//根据产品编号查询对应的主体信息
|
||||
public String getSubjectId(String productId)throws Exception{
|
||||
BizObjectManager pslManage = JBOFactory.getBizObjectManager(PRD_SPECIFIC_LIBRARY.CLASS_NAME);
|
||||
BizObject psl = pslManage.createQuery(" PRODUCTID=:productid ").setParameter("productid", productId).getSingleResult(false);
|
||||
if(psl == null){
|
||||
return "";
|
||||
}else{
|
||||
return psl.getAttribute("ManySubject") == null ? "" : psl.getAttribute("ManySubject").getString();
|
||||
}
|
||||
}
|
||||
/*public String filePath(String contractId) throws Exception{
|
||||
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME);
|
||||
BizObject cont = contBom.createQuery(" contract_id=:contractid").setParameter("contractid", contractId).getSingleResult(false);
|
||||
|
||||
@ -48,6 +48,7 @@ import com.tenwa.doc.util.BASE64;
|
||||
import com.tenwa.lease.app.service.HttpRequestAppService;
|
||||
import com.tenwa.officetempalte.util.FileOperatorUtil;
|
||||
import com.tenwa.reckon.util.UUIDUtil;
|
||||
import com.tenwa.util.MultiSubjectUtil;
|
||||
|
||||
import jbo.app.tenwa.customer.CUSTOMER_INFO;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON;
|
||||
@ -316,8 +317,15 @@ public class MakeOneCodeAndContractModel {
|
||||
}
|
||||
|
||||
//¹«Ë¾¸ÇÕÂ
|
||||
public String compnySignIng(String contract_Id,JBOTransaction tx) throws Exception {
|
||||
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
|
||||
public String compnySignIng(String contract_Id,String SubjectId,JBOTransaction tx) throws Exception {
|
||||
if(MultiSubjectUtil.TJSUBJECTID.equals(SubjectId)){
|
||||
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
|
||||
}else if(MultiSubjectUtil.SZSUBJECTID.equals(SubjectId)){
|
||||
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
|
||||
}else{
|
||||
return "δÕÒµ½¶ÔÓ¦µÄÖ÷Ì壡";
|
||||
}
|
||||
//requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
|
||||
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
|
||||
Map<String, ContractSignInfo> map = new HashMap<String, ContractSignInfo>();
|
||||
ContractSignInfo con = null;
|
||||
@ -478,6 +486,10 @@ public class MakeOneCodeAndContractModel {
|
||||
public static String getConfigRequestUrl() throws Exception{
|
||||
return Configure.getInstance().getConfigure("RequestHessionUrl");
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
public static String getConfigRequestUrlTj() throws Exception{
|
||||
return Configure.getInstance().getConfigure("RequestHessionUrlTj");
|
||||
}
|
||||
|
||||
public Map fileBase(String contractId){
|
||||
Map<String,String> fileNameBase = new HashMap<String, String>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user