抵押合同带出一维码,北汽接口合同制作流程互斥
This commit is contained in:
parent
2fe1415295
commit
367cf0cdfc
@ -336,7 +336,7 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
var OwmMessage = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","SystemMakeOneDimensionalCode","ProjectId=<%=projectId%>,contract_id=<%=sContractId%>,contractNo=<%=contractNo%>");
|
||||
var OwmMessage = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","SystemMakeOneDimensionalCode","ProjectId=<%=projectId%>,contract_id=<%=sContractId%>,contractNo=<%=contractNo%>,leasform=<%=leasform%>");
|
||||
if("error"==OwmMessage){
|
||||
RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","companyUpdateDocContractStatus","FlowUnid=<%=flowunid%>"+",ProjectId=<%=projectId%>");
|
||||
alert("生成失败!!!");
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -80,6 +80,7 @@ public class ContractSignAction{
|
||||
public String PLAN_LIST;
|
||||
public String Ttype;
|
||||
public String contractNo;
|
||||
public String leasform;
|
||||
private static Logger logger=Logger.getLogger(ContractSignAction.class);
|
||||
@SuppressWarnings("deprecation")
|
||||
public static String getConfigRequestUrl() throws Exception{
|
||||
@ -216,6 +217,12 @@ public class ContractSignAction{
|
||||
public void setContractNo(String contractNo) {
|
||||
this.contractNo = contractNo;
|
||||
}
|
||||
public String getLeasform() {
|
||||
return leasform;
|
||||
}
|
||||
public void setLeasform(String leasform) {
|
||||
this.leasform = leasform;
|
||||
}
|
||||
/**
|
||||
* ×ÔÈ»È˵ç×ÓǩԼ
|
||||
*
|
||||
@ -2579,7 +2586,7 @@ public String claimSign(JBOTransaction tx) throws Exception {
|
||||
mocacm.MOneDimensionalCode(contractNo, contract_id, ProjectId, diskPath, tx);
|
||||
}
|
||||
String outPdfFile = CurConfig.getConfigure("BQcontract");
|
||||
mocacm.pdfAndMark(outPdfFile, "", contract_id, tx);
|
||||
mocacm.pdfAndMark(outPdfFile, "", contract_id,leasform, tx);
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "error";
|
||||
|
||||
@ -108,7 +108,7 @@ public class McontractServiceImpl implements McontractService{
|
||||
BizObjectManager lpiManage = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME,tx);
|
||||
BizObjectManager caManage = JBOFactory.getBizObjectManager(CUSTOMER_ACCOUNT.CLASS_NAME,tx);
|
||||
BizObjectManager lciManage = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME,tx);
|
||||
BizObject lpi = lpiManage.createQuery("PROJECT_NO=:projectNo ").setParameter("projectNo", projectNo).getSingleResult(false);
|
||||
BizObject lpi = lpiManage.createQuery("PROJECT_NO=:projectNo and project_status='13' ").setParameter("projectNo", projectNo).getSingleResult(false);
|
||||
//保存日志信息
|
||||
bilManage = JBOFactory.getBizObjectManager(BC_INTERFACE_LOGS.CLASS_NAME,BqLogs);
|
||||
bil = bilManage.newObject();
|
||||
@ -127,6 +127,18 @@ public class McontractServiceImpl implements McontractService{
|
||||
BqLogs.commit();
|
||||
return rMage;
|
||||
}
|
||||
//校验项目是否在业务变更和业务撤销流程中
|
||||
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);
|
||||
if(fwf!=null){
|
||||
rMage.setContractStatus("error");
|
||||
rMage.setMale("该申请编号在"+fwf.getAttribute("flowname")+"中,不能合同制作!!!");
|
||||
bil.setAttributeValue("contractStatus", "error");
|
||||
bil.setAttributeValue("male", "该申请编号在"+fwf.getAttribute("flowname")+"中,不能合同制作!!!");
|
||||
bilManage.saveObject(bil);
|
||||
BqLogs.commit();
|
||||
return rMage;
|
||||
}
|
||||
BizObject ca = caManage.createQuery("PROJECT_ID=:projectId").setParameter("projectId", lpi.getAttribute("ID").getString()).getSingleResult(false);
|
||||
if(ca==null){
|
||||
rMage.setContractStatus("error");
|
||||
@ -214,7 +226,7 @@ public class McontractServiceImpl implements McontractService{
|
||||
// wordtx.commit();
|
||||
// JBOTransaction pdftx =JBOFactory.createJBOTransaction();
|
||||
String outPdfFile = CurConfig.getConfigure("BQcontract");
|
||||
String newPath = modc.pdfAndMark(outPdfFile, path, contractId, tx);
|
||||
String newPath = modc.pdfAndMark(outPdfFile, path, contractId,lpi.getAttribute("LEAS_FORM").toString(), tx);
|
||||
// pdftx.commit();
|
||||
|
||||
String massage = outputFile(newPath);
|
||||
@ -402,7 +414,7 @@ public class McontractServiceImpl implements McontractService{
|
||||
String compnySignIng = modc.compnySignIng(contractId, tx);
|
||||
//将一维码添加到pdf中
|
||||
String outPdfFile = CurConfig.getConfigure("BQcontract");
|
||||
String newPath = modc.pdfAndMark(outPdfFile, "", contractId, tx);
|
||||
String newPath = modc.pdfAndMark(outPdfFile, "", contractId,lpi.getAttribute("LEAS_FORM").toString(), tx);
|
||||
|
||||
rMage.setContractStatus("success");
|
||||
|
||||
|
||||
@ -263,7 +263,7 @@ public class MakeOneCodeAndContractModel {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public String pdfAndMark(String outPdfFile, String markImagePath,String contractId,JBOTransaction tx) throws Exception{
|
||||
public String pdfAndMark(String outPdfFile, String markImagePath,String contractId,String leasform,JBOTransaction tx) throws Exception{
|
||||
|
||||
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
|
||||
BizObjectManager attrBom = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME, tx);
|
||||
@ -290,6 +290,7 @@ public class MakeOneCodeAndContractModel {
|
||||
return "error";
|
||||
}
|
||||
PdfReader reader = new PdfReader(InPdfFile, "PDF".getBytes());
|
||||
int pages = reader.getNumberOfPages();//获取pdf的总页数
|
||||
PdfStamper stamp = new PdfStamper(reader, new FileOutputStream(newPath));
|
||||
Image img = Image.getInstance(markImagePath);//插入水印
|
||||
//设置图片宽度和高度
|
||||
@ -299,6 +300,10 @@ public class MakeOneCodeAndContractModel {
|
||||
|
||||
PdfContentByte under = stamp.getUnderContent(1);
|
||||
under.addImage(img);
|
||||
if(pages>2&&"02".equals(leasform)){
|
||||
PdfContentByte under2 = stamp.getUnderContent(3);
|
||||
under2.addImage(img);
|
||||
}
|
||||
|
||||
|
||||
stamp.close();// 关闭
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user