diff --git a/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp b/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp
index 5d307285a..72f6a47a7 100644
--- a/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp
+++ b/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp
@@ -63,6 +63,8 @@
if(ReaderId.equals("")){
if (StringUtils.isEmpty(delTabs)) {
out.write(new Button("关闭流程", "关闭流程", "closePage()", "", "btn_icon_close").getHtmlText());
+ }else{
+ flag = true;
}
}else{
rightType = "ReadOnly";
diff --git a/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistoryInformation.jsp b/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistoryInformation.jsp
index bdce6ea14..b4136216a 100644
--- a/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistoryInformation.jsp
+++ b/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistoryInformation.jsp
@@ -9,7 +9,7 @@
String RightType=CurPage.getParameter("RightType");
String productId=CurPage.getParameter("ProductId");
String projectId=CurPage.getParameter("ProjectId");
- String khcertid = Sqlca.getString("select ci.certid from lb_union_lessee_temp lul left join customer_info ci on ci.customerid = lul.CUSTOMER_ID where lul.IS_MAIN = 'Y' and lul.flowunid='"+flowunid+"'");
+ String khcertid = Sqlca.getString("select cpt.certid from lb_union_lessee_temp lul left join customer_person_temp cpt on cpt.FLOWUNID = lul.FLOWUNID where lul.IS_MAIN = 'Y' and lul.flowunid='"+flowunid+"'");
String gtcertid = Sqlca.getString("select cf.certid from customer_family_temp cf where cf.Partner_ = 'Y' and cf.flowunid='"+flowunid+"'");
String dbcertid = Sqlca.getString("select CERTID from lb_guarantee_unit_temp where flowunid='"+flowunid+"' order by CERTID asc limit 1");
String dbcertid2 = Sqlca.getString("select CERTID from lb_guarantee_unit_temp where flowunid='"+flowunid+"' order by CERTID desc limit 1");
diff --git a/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp b/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp
index 94f9c8a48..60f6a3b69 100644
--- a/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp
+++ b/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp
@@ -27,8 +27,8 @@
String compClientID = request.getParameter("CompClientID");
- dwTemp.replaceColumn("loaned", "", CurPage.getObjectWindowOutput());
- dwTemp.replaceColumn("outstand", "", CurPage.getObjectWindowOutput());
+ dwTemp.replaceColumn("loaned", "", CurPage.getObjectWindowOutput());
+ dwTemp.replaceColumn("outstand", "", CurPage.getObjectWindowOutput());
String sButtons[][] = {
diff --git a/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/LoanedInfo.jsp b/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/LoanedInfo.jsp
index 20f239a6a..6af9d6130 100644
--- a/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/LoanedInfo.jsp
+++ b/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/LoanedInfo.jsp
@@ -4,13 +4,17 @@
<%
String certId = CurPage.getParameter("certId");
-
- ASObjectModel doTemp = new ASObjectModel("LoanedList");
- doTemp.appendJboWhere(" and O.CONTRACT_STATUS >= 31 and O.CONTRACT_STATUS <> '104' and O.CONTRACT_STATUS <> '101' ");
+ String flowunId = CurPage.getParameter("flowunId");
+ CurPage.setAttribute("flowRowCount", "20");
+ CurPage.setAttribute("pageIdentify", "loan");
+ ASObjectModel doTemp = new ASObjectModel("LoanedListNew");
+ doTemp.setDataQueryClass("com.amarsoft.awe.dw.ui.list.FlowMonitorListHtmlGenerator");
+ doTemp.appendJboWhere(" and o.CONTRACT_STATUS in ('31','100','105')");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1";//--设置为Grid风格--
dwTemp.ReadOnly = "1";//只读模式
- dwTemp.setPageSize(10);
+ dwTemp.setPageSize(20);
+ doTemp.setVisible("PROJECT_ID,FLOWUNID,CERTID_WITH_ROLE,CONTRACT_STATUS,business_status",false);
dwTemp.genHTMLObjectWindow(certId);
String sButtons[][] = {
@@ -31,18 +35,16 @@
}
function viewHisTabLocal() {
- var param = FlowFunction.loadFlowParam();
- if (typeof(param.ObjectNo) == "undefined" || param.ObjectNo.length == 0) {
+ var flowunid = getItemValue(0,getRow(),"FLOWUNID");
+ var projectId = getItemValue(0,getRow(),"PROJECT_ID");
+ if (flowunid.length == 0 && projectId.length == 0) {
alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
- let sTaskNo = param["TaskNo"]
- if(sTaskNo==""){
- sTaskNo = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","getFlowEndRelativeTaskNo", "ObjectNo="+param["sObjectNo"]+",PhaseNo="+ param["sPhaseNo"]);
- if(typeof(sTaskNo)=="undefined" || sTaskNo.length==0) {
- alert("流程未结束,无法查看!");
- return;
- }
+ let sTaskNo = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","getFlowEndRelativeTaskNo", "ObjectNo="+flowunid+",projectId="+projectId);
+ if(typeof(sTaskNo)=="undefined" || sTaskNo.length==0) {
+ alert("流程未结束,无法查看!");
+ return;
}
var param ="TaskNo="+sTaskNo+"&ViewID=001&RightType=ReadOnly&delTabs=扣款卡信息,客户历史信息查询";
AsControl.OpenNewWin("/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp",param)
diff --git a/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/OutstandInfo.jsp b/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/OutstandInfo.jsp
index 50df292a2..8cd8c4a49 100644
--- a/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/OutstandInfo.jsp
+++ b/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/OutstandInfo.jsp
@@ -6,18 +6,19 @@
String certId = CurPage.getParameter("certId");
String flowunId = CurPage.getParameter("flowunId");
-
- ASObjectModel doTemp = new ASObjectModel("LoanedList");
- doTemp.appendJboWhere(" and (O.CONTRACT_STATUS < 31 or O.CONTRACT_STATUS = '104' or O.CONTRACT_STATUS = '101') and O.FLOWUNID <> '"+flowunId+"'");
+ CurPage.setAttribute("flowRowCount", "20");
+ ASObjectModel doTemp = new ASObjectModel("LoanedListNew");
+ doTemp.setDataQueryClass("com.amarsoft.awe.dw.ui.list.FlowMonitorListHtmlGenerator");
+ doTemp.appendJboWhere(" and o.CONTRACT_STATUS not in ('100','105','31') and (flowunid not in ('"+flowunId+"') or v.isnull(flowunid))");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1";//--设置为Grid风格--
dwTemp.ReadOnly = "1";//只读模式
- dwTemp.setPageSize(10);
+ dwTemp.setPageSize(20);
+ doTemp.setVisible("PROJECT_ID,FLOWUNID,CERTID_WITH_ROLE,CONTRACT_STATUS,COUPUS_OVER,IS_OVERDUE",false);
dwTemp.genHTMLObjectWindow(certId);
- String sButtons[][] = {
-
- };
-%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+ String sButtons[][] = {};
+%>
+<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
-<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp
index c4352bf44..cc7b3d500 100644
--- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp
@@ -281,10 +281,10 @@
// $("#FULLNAME").css("color","red");
// }
- if("0030"=="<%=sPhaseNo%>" ||"0040"=="<%=sPhaseNo%>"||"0050"=="<%=sPhaseNo%>"||"0060"=="<%=sPhaseNo%>"|| ("0070"=="<%=sPhaseNo%>" && "false"=="<%=IsHistory%>")){//经销商阶段看不见标红,初审、复审、信审可以标红
+ if("0030"=="<%=sPhaseNo%>" ||"0040"=="<%=sPhaseNo%>"||/5/.test("<%=sPhaseNo%>")||"0060"=="<%=sPhaseNo%>"|| ("0070"=="<%=sPhaseNo%>" && "false"=="<%=IsHistory%>")){//经销商阶段看不见标红,初审、复审、信审可以标红
var certResult = checkCertIdAll();
- if(certResult=="4"){
+ if(certResult=='true'){
//$("#FULLNAME").attr("style","color:red;");
$("#CERTID").css("color","red");
}
@@ -989,7 +989,7 @@
function checkCertIdAll(){//校验证件号
var certId = getItemValue(0,getRow(),"CERTID");
var sParams = "certId="+certId+",flowunid="+"<%=flowunid%>";
- var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkCertIdAll",sParams);
+ var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkExistsByCertid",sParams);
return sReturnInfo;
}
function getIdentity(){
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
index 237d895f3..b7751e166 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
@@ -5241,6 +5241,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/com/amarsoft/app/flow/FlowAction.java b/src/com/amarsoft/app/flow/FlowAction.java
index 2e72b4fa7..9f529cca3 100644
--- a/src/com/amarsoft/app/flow/FlowAction.java
+++ b/src/com/amarsoft/app/flow/FlowAction.java
@@ -68,6 +68,7 @@ public class FlowAction {
private String AssignmentId;// 指派人员ID
private String AssignSumbitType;// 指派处理方式
private String nextNodeType;
+ private String projectId; //项目id
private FlowService flowService;
@@ -227,6 +228,14 @@ public class FlowAction {
this.flowService = flowService;
}
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
//处理重复提交数据重复,只适用单体服务
private static Set taskSet = new HashSet<>();
@@ -738,16 +747,16 @@ public class FlowAction {
*/
public String getFlowEndRelativeTaskNo(JBOTransaction tx) throws Exception {
String taskSerialNo = "";
- if (phaseNo.equals("1000") || phaseNo.equals("8000")) {
- BizObject bo = JBOFactory
- .getBizObjectManager("jbo.sys.FLOW_TASK", tx)
- .createQuery("select RELATIVESERIALNO from O where ObjectNo =:ObjectNo and PhaseNo =:PhaseNo ")
- .setParameter("ObjectNo", objectNo)
- .setParameter("PhaseNo", phaseNo)
- .getSingleResult(false);
- if (bo != null)
- taskSerialNo = bo.getAttribute("RELATIVESERIALNO").getString();
-
+ String sql = "select ft.RELATIVESERIALNO from flow_bussiness_object fbo join flow_task ft on fbo.flow_unid = ft.objectno where fbo.flow_name = '业务申请流程' and ft.phaseno = '1000'";
+ if (StringUtils.isNotBlank(objectNo)) {
+ sql += " and fbo.flow_unid = '" + objectNo + "'";
+ } else {
+ sql += " and fbo.proj_id = '" + projectId + "'";
+ }
+ Transaction Sqlca = Transaction.createTransaction(tx);
+ ASResultSet asResultSet = Sqlca.getASResultSet(new SqlObject(sql));
+ if (asResultSet.next()) {
+ taskSerialNo = asResultSet.getString("RELATIVESERIALNO");
}
return taskSerialNo;
}
diff --git a/src_core/com/tenwa/flow/tabviewservice/FlowTaskViewTabService.java b/src_core/com/tenwa/flow/tabviewservice/FlowTaskViewTabService.java
index 70fc990b9..b57e15126 100644
--- a/src_core/com/tenwa/flow/tabviewservice/FlowTaskViewTabService.java
+++ b/src_core/com/tenwa/flow/tabviewservice/FlowTaskViewTabService.java
@@ -1,36 +1,16 @@
package com.tenwa.flow.tabviewservice;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-import javax.script.Bindings;
-import javax.script.Invocable;
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
-import javax.script.ScriptException;
-
-import jbo.com.tenwa.entity.comm.flow.FLOW_STEP_NODE;
-import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
-import jbo.sys.CODE_LIBRARY;
-import jbo.sys.FLOW_TASK;
-import jbo.sys.OBJECTTYPE_RELA;
-
import com.amarsoft.amarscript.Any;
import com.amarsoft.amarscript.Expression;
import com.amarsoft.app.lc.workflow.action.GetFlowAction;
-import com.amarsoft.are.jbo.BizObject;
-import com.amarsoft.are.jbo.BizObjectManager;
-import com.amarsoft.are.jbo.BizObjectQuery;
-import com.amarsoft.are.jbo.JBOFactory;
-import com.amarsoft.are.jbo.JBOTransaction;
+import com.amarsoft.are.jbo.*;
import com.amarsoft.are.lang.StringX;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.control.model.Page;
import com.amarsoft.awe.ui.widget.Button;
+import com.amarsoft.awe.util.ASResultSet;
+import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.dict.als.manage.CodeManager;
import com.amarsoft.dict.als.object.Item;
@@ -39,8 +19,20 @@ import com.tenwa.flow.treeview.action.BaseInitTreeView;
import com.tenwa.flow.treeview.action.TreeItemData;
import com.tenwa.lease.util.FlowViewUtil;
import com.tenwa.officetempalte.util.FileOperatorUtil;
+import jbo.com.tenwa.entity.comm.flow.FLOW_STEP_NODE;
+import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
+import jbo.sys.CODE_LIBRARY;
+import jbo.sys.FLOW_TASK;
+import jbo.sys.OBJECTTYPE_RELA;
import org.apache.commons.lang3.StringUtils;
+import javax.script.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
public class FlowTaskViewTabService {
/**
* 根据按钮组及配置的按钮集合,返回按钮属性列表
@@ -326,10 +318,35 @@ public class FlowTaskViewTabService {
FlowTaskViewTabService.initFlowStepNodes(tx, FlowFixedParam, baseTreeView);
}
- public static void deleteTreeTab(List treeItemDataList,HashMap FlowFixedParam ){
- if(StringUtils.isNotBlank(FlowFixedParam.get("delTabs"))){
+ public static void deleteTreeTab(List treeItemDataList, HashMap FlowFixedParam) {
+ if (StringUtils.isNotBlank(FlowFixedParam.get("delTabs"))) {
List delTabs = treeItemDataList.stream().filter(item -> FlowFixedParam.get("delTabs").indexOf(item.getItemName()) > -1).collect(Collectors.toList());
- treeItemDataList.removeAll(delTabs);
+ if (delTabs.size() > 0) treeItemDataList.removeAll(delTabs);
+ }
+ // 业务申请流程(非草稿阶段)删除无数据担保人及共申人页签
+ String flowUnid = FlowFixedParam.get("FlowUnid");
+ if ("BusinessApplyFlow".equals(FlowFixedParam.get("FlowNo")) && !"0010".equals(FlowFixedParam.get("PhaseNo")) && StringUtils.isNotBlank(flowUnid)) {
+ Transaction Sqlca = null;
+ try {
+ Sqlca = Transaction.createTransaction("als");
+ ASResultSet asResultSet = Sqlca.getASResultSet(new SqlObject("select count(cft.id) as cftNum,count(lgu.id) as lguNum from lb_project_info_temp lpit left join customer_family_temp cft on lpit.flowunid = cft.flowunid and cft.Partner_ = 'Y' left join lb_guarantee_unit_temp lgu on lpit.FLOWUNID = lgu.FLOWUNID where lpit.FLOWUNID = '" + flowUnid + "'"));
+ asResultSet.next();
+ StringBuilder sb = new StringBuilder();
+ if (asResultSet.getInt("cftNum") == 0) sb.append("共同申请人");
+ if (asResultSet.getInt("lguNum") == 0) sb.append(",担保人信息");
+ if (sb.length() > 0) {
+ List delTabs = treeItemDataList.stream().filter(item -> sb.toString().indexOf(item.getItemName()) > -1).collect(Collectors.toList());
+ if (delTabs.size() > 0) treeItemDataList.removeAll(delTabs);
+ }
+ Sqlca.commit();
+ } catch (Exception e) {
+ e.printStackTrace();
+ try {
+ Sqlca.rollback();
+ } catch (JBOException e1) {
+ e1.printStackTrace();
+ }
+ }
}
}
diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertCustomerHistoryInfo.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertCustomerHistoryInfo.java
index 3f112f2d2..99b6811f0 100644
--- a/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertCustomerHistoryInfo.java
+++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertCustomerHistoryInfo.java
@@ -12,9 +12,12 @@ import com.tenwa.reckon.util.Conn;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import static com.ctc.wstx.shaded.msv_core.datatype.xsd.WhiteSpaceProcessor.replace;
+
public class InsertCustomerHistoryInfo {
private String flowunid;
@@ -35,13 +38,13 @@ public class InsertCustomerHistoryInfo {
Conn conn = new Conn(tx);
String flowunid = this.flowunid;
//获取客户基本信息
- String sql = "select ci.customerid,ci.customername,ci.certtype,ci.certid,'主承租人' as customertype,ci.customer_num,lul.FLOWUNID,lul.project_id from customer_info ci left join lb_union_lessee_temp lul on lul.customer_id = ci.customerid where lul.IS_MAIN = 'Y' and lul.FLOWUNID = '" + flowunid + "' \n" +
+ String sql = "select cpt.customerid,cpt.FULLNAME as customername,cpt.certtype,cpt.certid,'主承租人' as customertype,'' as customer_num,lul.FLOWUNID,lul.project_id from customer_person_temp cpt left join lb_union_lessee_temp lul on cpt.FLOWUNID = lul.FLOWUNID where lul.IS_MAIN = 'Y' and lul.FLOWUNID = '"+flowunid+"' \n" +
"union \n" +
- "select lgu.ASSUROR as customerid,lgu.FULLNAME as customername,lgu.CERTTYPE,lgu.certid,'担保人' as customertype,'' as customer_num,lgu.FLOWUNID,lgu.project_id from lb_guarantee_unit_temp lgu where lgu.FLOWUNID = '" + flowunid + "'\n" +
+ "select lgu.ASSUROR as customerid,lgu.FULLNAME as customername,lgu.CERTTYPE,lgu.certid,'担保人' as customertype,'' as customer_num,lgu.FLOWUNID,lgu.project_id from lb_guarantee_unit_temp lgu where lgu.FLOWUNID = '"+flowunid+"'\n" +
"union \n" +
- "select '' as customerid,cf.name as customername,cf.CERTTYPE,cf.certid,'共同承租人' as customertype,'' as customer_num,cf.FLOWUNID,cf.PROJECT_ID from customer_family_temp cf where cf.FLOWUNID = '" + flowunid + "'\n";
+ "select '' as customerid,cf.name as customername,cf.CERTTYPE,cf.certid,'共同承租人' as customertype,'' as customer_num,cf.FLOWUNID,cf.PROJECT_ID from customer_family_temp cf where cf.FLOWUNID = '"+flowunid+"'";
+
List