根据不同的主体显示不同的合同模板并调用不同盖章接口

This commit is contained in:
tangfutang 2019-12-07 19:59:15 +08:00
parent 886694b4fc
commit b531bbf033
6 changed files with 212 additions and 60 deletions

View File

@ -13,6 +13,8 @@
String productId = CurPage.getParameter("ProductId");
String flowunid = CurPage.getParameter("FlowUnid");
String action = CurPage.getParameter("action");
String SubjectId=CurPage.getParameter("SubjectId");//»ñÈ¡Ö÷ÌåID
ASObjectModel doTemp = new ASObjectModel("LBContractPrintList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
@ -121,7 +123,7 @@
}
//自然人电子签约
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","signIng","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>,FlowUnid=<%=flowunid%>");
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","signIng","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>,FlowUnid=<%=flowunid%>,,SubjectId=<%=SubjectId%>");
var sReturns = sReturn.split("@");
if("success"==sReturns[0]){
AsDebug.showMessage("提示","电子签约发起成功!","","",true,"","","",function(){
@ -165,7 +167,7 @@
AsDebug.showMessage("提示","没有发起电子签约,无法获取签约状态!","","",true);
return;
}
var sParams="ProjectId=<%=projectId%>,customerType=<%=custtype%>,FlowUnid=<%=flowunid%>,CurUserID=<%=CurUser.getUserID()%>";
var sParams="ProjectId=<%=projectId%>,customerType=<%=custtype%>,FlowUnid=<%=flowunid%>,CurUserID=<%=CurUser.getUserID()%>,SubjectId=<%=SubjectId%>";
var sReturn=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","contractSignStatus",sParams);
AsDebug.showMessage("提示",sReturn,"","",true,'','','',function(){
<%-- var sReturns = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","downloadDoc","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>"); --%>
@ -299,7 +301,7 @@
//重新发送短信
function sendMessageAgain(){
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>");
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>,FlowUnid=<%=flowunid%>");
var result=results.split("@");
if(eval(result[0])<3){
AsDebug.showMessage("提示","请先制作合同!","","",true);
@ -313,7 +315,7 @@
AsDebug.showMessage("提示","没有发起电子签约,无法发送短信!","","",true);
return;
}
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sendMessageAgain","ProjectId=<%=projectId%>");
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sendMessageAgain","ProjectId=<%=projectId%>,SubjectId=<%=SubjectId%>");
if("success"==sReturn){
AsDebug.showMessage("提示","短信发送成功!","","",true);
}else{

View File

@ -26,6 +26,8 @@
String flowName=CurPage.getParameter("FlowName");//获取合同名称
String contractid=CurPage.getParameter("ContractId");//获取合同id
String isnetcar=CurPage.getParameter("isNetCar");//获取是否是网约车
String SubjectId=CurPage.getParameter("SubjectId");//»ñÈ¡Ö÷ÌåID
if(null==contractNo ||"null".equals(contractNo) ){
contractNo=FlowKey;
}
@ -172,7 +174,7 @@
$('#A_Group_0010').css('display','none');
$('#A_Group_0020').css('display','none');
}
var sReturn = RunJavaMethodSqlca("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","getContractClass","leasform="+"<%=leasform%>"+",isNetCar="+"<%=CurPage.getParameter("isNetCar")%>"+",operationType="+operationType);
var sReturn = RunJavaMethodSqlca("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","getContractClass","leasform="+"<%=leasform%>"+",isNetCar="+"<%=CurPage.getParameter("isNetCar")%>"+",operationType="+operationType+",SubjectId=<%=SubjectId%>");
var jsonData=eval("("+sReturn+")");
initFileTemplate(eval("("+jsonData[0].fileTemplate+")"));
// initOneClass();
@ -351,7 +353,7 @@
return;
}
if(("01"=="<%=customertype%>"&&"Auto" == "<%=sealType%>" )||("Auto" == "<%=sealType%>" && "Hand" == "<%=signType%>" )){
var falg = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","compnySignIng","FlowUnid=<%=flowunid%>,flagType=word,ProjectId=<%=projectId%>");
var falg = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","compnySignIng","FlowUnid=<%=flowunid%>,flagType=word,ProjectId=<%=projectId%>,SubjectId=<%=SubjectId%>");
if("success"!= falg ){
RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","companyUpdateDocContractStatus","FlowUnid=<%=flowunid%>"+",ProjectId=<%=projectId%>");
alert("生成失败!!!");

View File

@ -42,6 +42,7 @@ public class FileTemplateUtil {
public String contractNo;
public String isNetCar;//用于判断是否是网约车
public String operationType;//用于判断是否是北汽产品
public String SubjectId;
public String getTemplateCalss() {return templateCalss;}
public void setTemplateCalss(String templateCalss) {this.templateCalss = templateCalss;}
@ -99,6 +100,12 @@ public class FileTemplateUtil {
public void setOperationType(String operationType) {
this.operationType = operationType;
}
public String getSubjectId() {
return SubjectId;
}
public void setSubjectId(String subjectId) {
SubjectId = subjectId;
}
public String getTemplateClass(Transaction Sqlca) throws Exception{
String fileClass=templateCalss.replaceAll("@", ",");
@ -137,29 +144,57 @@ public class FileTemplateUtil {
}
public String getContractClass(Transaction Sqlca){
if("BAIC_MOTOR".equals(operationType)){//北汽财务
if("01".equals(leasform)){
return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'b20b919c6144480b9466e4ea9b0da142'}]"+"\"}]";
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){//天津合同模板
if("BAIC_MOTOR".equals(operationType)){//北汽财务
if("01".equals(leasform)){
return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'22244a8b74c54ed5b9f09de7e0ef1aad'}]"+"\"}]";
}else{
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'99ddc65b2cfc493eb19d30778d012165'}]"+"\"}]";
}
}else if ("DYCD".equals(operationType)){//第一车贷
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'12ef786b7e2c45d892e7b8588972b4f1'}]"+"\"}]";
}else if ("ZYC".equals(operationType)){//专用车产品
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'5433d6bb0ead4f3abc3dbad6aefa1d90'}]"+"\"}]";
}else if ("KJZL".equals(operationType)){//凯捷租赁
return "[{'fileTemplate':\""+"[{'text':'合同售后回租_凯捷','value':'3a95f3e7e1c54e53b203bfb04d35ff32'}]"+"\"}]";
}else if ("BZZL".equals(operationType)){//保值租赁
return "[{'fileTemplate':\""+"[{'text':'保值租赁','value':'32b77942767c410c922a429ea5d8902e'}]"+"\"}]";
}else if ("WYC".equals(operationType)){//网约车
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)和抵押合同','value':'1e225320f6214bb08c87c88a3653b542'}]"+"\"}]";
}else if ("DT".equals(operationType)){//大通
return "[{'fileTemplate':\""+"[{'text':'大通售后回租模板','value':'25b9e9440c574f89bccfdf148b12128d'}]"+"\"}]";
}else{
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'115905186577406ea5414dd14e592e7d'}]"+"\"}]";
if("01".equals(leasform)){
return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'333cd5b36cd846938e618516ba9c8cbb'}]"+"\"}]";
}else{
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'5c494617683548a49cfc050f60067ea2'}]"+"\"}]";
}
}
}else if ("DYCD".equals(operationType)){//第一车贷
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'8d4232a5423e491ca905e77c54105a85'}]"+"\"}]";
}else if ("ZYC".equals(operationType)){//专用车产品
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'35aab6dbac5f4ba292cd67a0914eae2e'}]"+"\"}]";
}else if ("KJZL".equals(operationType)){//凯捷租赁
return "[{'fileTemplate':\""+"[{'text':'合同售后回租_凯捷','value':'a4fcbd2990d1479a9ba8ce440155f2f0'}]"+"\"}]";
}else if ("BZZL".equals(operationType)){//保值租赁
return "[{'fileTemplate':\""+"[{'text':'保值租赁','value':'91c7718aa925428ca312e343d1f5149f'}]"+"\"}]";
}else if ("WYC".equals(operationType)){//网约车
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)和抵押合同','value':'c8d5b729a0954482877c26a1293b766b'}]"+"\"}]";
}else if ("DT".equals(operationType)){//大通
return "[{'fileTemplate':\""+"[{'text':'大通售后回租模板','value':'51a5f03ebe3b45cc8ae2b32fdaeceeae'}]"+"\"}]";
}else{
if("01".equals(leasform)){
return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'24aba365e2794a018814ae81341486bf'}]"+"\"}]";
if("BAIC_MOTOR".equals(operationType)){//北汽财务
if("01".equals(leasform)){
return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'b20b919c6144480b9466e4ea9b0da142'}]"+"\"}]";
}else{
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'115905186577406ea5414dd14e592e7d'}]"+"\"}]";
}
}else if ("DYCD".equals(operationType)){//第一车贷
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'8d4232a5423e491ca905e77c54105a85'}]"+"\"}]";
}else if ("ZYC".equals(operationType)){//专用车产品
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'35aab6dbac5f4ba292cd67a0914eae2e'}]"+"\"}]";
}else if ("KJZL".equals(operationType)){//凯捷租赁
return "[{'fileTemplate':\""+"[{'text':'合同售后回租_凯捷','value':'a4fcbd2990d1479a9ba8ce440155f2f0'}]"+"\"}]";
}else if ("BZZL".equals(operationType)){//保值租赁
return "[{'fileTemplate':\""+"[{'text':'保值租赁','value':'91c7718aa925428ca312e343d1f5149f'}]"+"\"}]";
}else if ("WYC".equals(operationType)){//网约车
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)和抵押合同','value':'c8d5b729a0954482877c26a1293b766b'}]"+"\"}]";
}else if ("DT".equals(operationType)){//大通
return "[{'fileTemplate':\""+"[{'text':'大通售后回租模板','value':'51a5f03ebe3b45cc8ae2b32fdaeceeae'}]"+"\"}]";
}else{
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'641c55a1168f4a488a5028ee68870156'}]"+"\"}]";
if("01".equals(leasform)){
return "[{'fileTemplate':\""+"[{'text':'合同(直租)','value':'24aba365e2794a018814ae81341486bf'}]"+"\"}]";
}else{
return "[{'fileTemplate':\""+"[{'text':'合同(售后回租)','value':'641c55a1168f4a488a5028ee68870156'}]"+"\"}]";
}
}
}
}

View File

@ -79,11 +79,18 @@ public class ContractSignAction{
public String Ttype;
public String contractNo;
public String leasform;
public String SubjectId;
private static Logger logger=Logger.getLogger(ContractSignAction.class);
@SuppressWarnings("deprecation")
public static String getConfigRequestUrl() throws Exception{
return Configure.getInstance().getConfigure("RequestHessionUrl");
}
@SuppressWarnings("deprecation")
public static String getConfigRequestUrlTj() throws Exception{
return Configure.getInstance().getConfigure("RequestHessionUrlTj");
}
@SuppressWarnings("deprecation")
public static String getFileSavePath() throws Exception{
return Configure.getInstance().getConfigure("FileSavePath");
@ -221,6 +228,12 @@ public class ContractSignAction{
public void setLeasform(String leasform) {
this.leasform = leasform;
}
public String getSubjectId() {
return SubjectId;
}
public void setSubjectId(String subjectId) {
SubjectId = subjectId;
}
/**
* 自然人电子签约
*
@ -231,7 +244,11 @@ public class ContractSignAction{
*/
@SuppressWarnings("unchecked")
public String signIng(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
//BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx);
BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME, tx);
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
@ -270,6 +287,7 @@ public class ContractSignAction{
con.setInputfile(BASE64.encodeImgageToBase64(file));
list.add(con);
}
Map<String,String> fromCondtion = new HashMap<String, String>();
Map<String,String> otherProperty = new HashMap<String, String>();
Map<String, String> resultMap = requestService.createContractSign(map);
@ -371,7 +389,11 @@ public class ContractSignAction{
@SuppressWarnings("unchecked")
public String compnySignIng(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
//BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx);
BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME, tx);
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
@ -520,7 +542,11 @@ public class ContractSignAction{
*/
@SuppressWarnings("unchecked")
public String companySignIng(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx);
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
Map<String, List<ContractSignInfo>> map = new HashMap<String, List<ContractSignInfo>>();
@ -654,7 +680,11 @@ public class ContractSignAction{
* @throws Exception
*/
public String PersonDeductSignIng(JBOTransaction tx) throws Exception{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
Map<String, List<ContractSignInfo>> map = new HashMap<String, List<ContractSignInfo>>();
ContractSignInfo con = null;
@ -783,8 +813,12 @@ public class ContractSignAction{
* @throws Exception
*/
public String AdjustFordSignIng(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
Map<String, List<ContractSignInfo>> map = new HashMap<String, List<ContractSignInfo>>();
ContractSignInfo con = null;
List<BizObject> bo = null;
@ -900,8 +934,12 @@ public class ContractSignAction{
* @throws Exception
*/
public String getAdjustFordSignStatus(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
BizObjectManager ldclBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager ldclBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx);
List<BizObject> ldclBoList = ldclBom.createQuery("flow_unid='" + FlowUnid + "' and file_flag='yes' and "
+ "sendprocess='1'").getResultList(true);
@ -953,8 +991,11 @@ public class ContractSignAction{
* @throws Exception
*/
public String contractSignStatusForContract(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
BizObjectManager ldclBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
} BizObjectManager ldclBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx);
List<BizObject> ldclBoList = ldclBom.createQuery("flow_unid='" + FlowUnid + "' and file_flag='yes' and "
+ "sendprocess='1'").getResultList(true);
@ -1006,8 +1047,11 @@ public class ContractSignAction{
* @throws Exception
*/
public String contractSignStatus(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
//BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx);
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
} //BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx);
BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME, tx);
BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx);
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
@ -1114,8 +1158,12 @@ public class ContractSignAction{
* @throws Exception
*/
public String changeCarSignStatus(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx);
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx);
BizObjectManager ldlMange = JBOFactory.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME, tx);
BizObjectManager ldMange = JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME, tx);
BizObjectManager lulMange = JBOFactory.getBizObjectManager(LB_UNION_LESSEE.CLASS_NAME, tx);
@ -1195,8 +1243,12 @@ public class ContractSignAction{
* @throws Exception
*/
public String contractSignStatusList(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx);
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx);
BizObjectManager clBom = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME, tx);
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
BizObjectManager ldBom = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME, tx);
@ -1233,7 +1285,11 @@ public class ContractSignAction{
* @throws Exception
*/
public String sign(JBOTransaction tx) throws MalformedURLException, Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
@SuppressWarnings("unchecked")
List<BizObject> bo = contBom.createQuery("project_id=:projectId and file_flag='yes'")
@ -1248,6 +1304,7 @@ public class ContractSignAction{
list.add(keys.getAttribute("DOCUMENT_ID").toString()+"@"+keys.getAttribute("doc_name").toString());
map.put(keys.getAttribute("singcontract_id").toString(), list);
}
Map<String, String> resultMap = requestService.Sign(map);
String statu = resultMap.get("error");
if (statu == null) {
@ -1267,7 +1324,11 @@ public class ContractSignAction{
* @throws MalformedURLException
*/
public String downloadDoc(JBOTransaction tx) throws MalformedURLException, Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
String sql = "";
if ("01".equals(customerType)) {
@ -1327,8 +1388,12 @@ public class ContractSignAction{
* @throws MalformedURLException
*/
public String changedownloadDoc(JBOTransaction tx) throws MalformedURLException, Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
BizObjectManager ldMange = JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME, tx);
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager ldMange = JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME, tx);
String sql = "OBJECTTYPE='ChangeCar' and FLOW_UNID=:flowunid and CONTRACT_ID=:contractid ";
@SuppressWarnings("unchecked")
BizObject ldb = ldMange.createQuery(sql).setParameter("flowunid",FlowUnid).setParameter("contractid",contract_id).getSingleResult(true);
@ -1376,7 +1441,11 @@ public class ContractSignAction{
//扣款卡变更下载合同
public String downloadDocContract(JBOTransaction tx) throws MalformedURLException, Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
String sql = "";
sql = "flow_unid=:flow_unid and file_flag='yes'";
@ -1436,8 +1505,11 @@ public class ContractSignAction{
* @throws MalformedURLException
*/
public String downloadZipContract(JBOTransaction tx) throws MalformedURLException, Exception{
requestService = (HttpRequestAppService) factory.create(
HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager contBom=JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
try{
String path=null;
@ -1475,8 +1547,11 @@ public String downloadZipContract(JBOTransaction tx) throws MalformedURLExceptio
* @throws MalformedURLException
*/
public String download(JBOTransaction tx) throws MalformedURLException, Exception{
requestService = (HttpRequestAppService) factory.create(
HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager contBom=JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
try{
String path=null;
@ -1852,7 +1927,11 @@ public String AccountAccreditSign(JBOTransaction tx){
}
}
public String accountSign(JBOTransaction tx,String flowunid,String orgid) throws Exception{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager ldclBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME,tx);
BizObjectManager attrBom = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME,tx);
Map<String,ContractSignInfo> map=new HashMap<String,ContractSignInfo>();
@ -1958,7 +2037,11 @@ public String getFlowUnid(JBOTransaction tx) throws JBOException{
* */
public String sendMessageAgain(JBOTransaction tx) {
try{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
List<BizObject> bo = null;
String file = new String();
@ -2002,7 +2085,11 @@ public String sendMessageAgain(JBOTransaction tx) {
* */
public String ChangesendMessageAgain(JBOTransaction tx) {
try{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
List<BizObject> bo = null;
String file = new String();
Map<String,String> contractmap = new HashMap<String,String>();
@ -2059,7 +2146,11 @@ public String getProcess(JBOTransaction tx){
}
public String claimSign(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
ContractSignInfo con = null;
BizObject bo = null;
@ -2151,7 +2242,11 @@ public String claimSign(JBOTransaction tx) throws Exception {
* @throws Exception
*/
public String claimSignA(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
String libraryid="";
PLAN_LIST=PLAN_LIST.split("\\.")[0];
BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME);
@ -2264,7 +2359,11 @@ public String claimSign(JBOTransaction tx) throws Exception {
* @throws Exception
*/
public String changeCarSignA(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
String libraryid="";
BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME,tx);
BizObjectManager bom1=null;
@ -2349,7 +2448,11 @@ public String claimSign(JBOTransaction tx) throws Exception {
* @throws Exception
*/
public String collectionSignA(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
String libraryid="";
BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME);
BizObject DOCRELATIVE = null;
@ -2498,7 +2601,11 @@ public String claimSign(JBOTransaction tx) throws Exception {
*/
public String TcollectionSignA(JBOTransaction tx) throws Exception {
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
if("d989246c11c111eaaa0000163e0e11e6".equals(SubjectId)){
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrlTj());
}else{
requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
}
String libraryid="";
BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME);
BizObject DOCRELATIVE = null;

View File

@ -167,7 +167,7 @@ public class SerialNumberUtil {
int year = Integer.parseInt(currentYear);
int month = Integer.parseInt(currentMonth);
int day = Integer.parseInt(currentDay);
return SerialNumberUtil.getSerialNumberByDay("BQAP("+dept+"){year}{month}{day}{maxOrderNumber}",4,null, "ºÏͬ±àºÅ", year,month,day, tx);
return SerialNumberUtil.getSerialNumberByDay(dept+"{year}{month}{day}{maxOrderNumber}",4,null, "ºÏͬ±àºÅ", year,month,day, tx);
}
/*public static String getContractSerialNaumber(String sSerialType,JBOTransaction tx) throws Exception {

View File

@ -34,8 +34,9 @@ public class ContractApprovalStartAction extends BaseFlowStartAction{
String productid=bo.getAttribute("PRODUCT_ID").getString();
String deptid=bo.getAttribute("PROJECT_DEPT").getString();
String area_code=bo.getAttribute("AREA_CODE").getString();
String subjectid=bo.getAttribute("subjectid").getString();
String contractno="";
String dept="";
String dept="BQAP(";
/*
if(deptid.equals("8000900020001")){//cx
dept+="cx";
@ -63,6 +64,11 @@ public class ContractApprovalStartAction extends BaseFlowStartAction{
}else{//ťŘ×â
dept+="H";
}
if("d989246c11c111eaaa0000163e0e11e6".equals(subjectid)){
dept+=")TJ";
}else{
dept+=")SZ";
}
contractno=SerialNumberUtil.getContractSerialNaumber(dept,area_code, tx);
// }
this.FlowParam.put("ContractNo", contractno);