3.如果经销商提交的业务申请中没有共申人、担保人,则在信审流程中不显示共申人、担保人页签
This commit is contained in:
parent
04e7e91ef8
commit
39d26a3df8
@ -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,11 +318,36 @@ public class FlowTaskViewTabService {
|
||||
FlowTaskViewTabService.initFlowStepNodes(tx, FlowFixedParam, baseTreeView);
|
||||
}
|
||||
|
||||
public static void deleteTreeTab(List<TreeItemData> treeItemDataList,HashMap<String,String> FlowFixedParam ){
|
||||
if(StringUtils.isNotBlank(FlowFixedParam.get("delTabs"))){
|
||||
List<TreeItemData> delTabs = treeItemDataList.stream().filter(item -> FlowFixedParam.get("delTabs").indexOf(item.getItemName()) > -1).collect(Collectors.toList());
|
||||
treeItemDataList.removeAll(delTabs);
|
||||
public static void deleteTreeTab(List<TreeItemData> treeItemDataList, HashMap<String, String> FlowFixedParam) {
|
||||
List<TreeItemData> delTabs = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(FlowFixedParam.get("delTabs"))) {
|
||||
delTabs = treeItemDataList.stream().filter(item -> FlowFixedParam.get("delTabs").indexOf(item.getItemName()) > -1).collect(Collectors.toList());
|
||||
}
|
||||
// 业务申请流程(非草稿阶段)删除无数据担保人及共申人页签
|
||||
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) {
|
||||
delTabs = treeItemDataList.stream().filter(item -> sb.toString().indexOf(item.getItemName()) > -1).collect(Collectors.toList());
|
||||
}
|
||||
Sqlca.commit();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
try {
|
||||
Sqlca.rollback();
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (delTabs.size() > 0) treeItemDataList.removeAll(delTabs);
|
||||
}
|
||||
|
||||
public static void initOHTMLTreeViewProjectContract(JBOTransaction tx,OHTMLTreeView tviTemp,Page curPage) throws Exception{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user