客户历史数据查询修改
This commit is contained in:
parent
5f0c5fbf36
commit
8952a6d523
@ -13,8 +13,8 @@
|
||||
Content: 业务申请主界面
|
||||
Input Param:
|
||||
Output param:
|
||||
History Log:
|
||||
|
||||
History Log:
|
||||
|
||||
*/
|
||||
%>
|
||||
<%/*~END~*/%>
|
||||
@ -34,18 +34,18 @@
|
||||
String sPrdStage = ""; //产品阶段
|
||||
String isPageRead=""; //业务页面是否只读
|
||||
String viewOperatorClass="";//视图处理类
|
||||
|
||||
|
||||
HashMap<String,String>FlowFixedParam=GetFlowAction.getFlowParamByTask(CurPage.getParameter("TaskNo"),CurPage);
|
||||
|
||||
HashMap<String,String>FlowFixedParam=GetFlowAction.getFlowParamByTask(CurPage.getParameter("TaskNo"),CurPage);
|
||||
FlowFixedParam.put("delTabs", CurPage.getParameter("delTabs"));
|
||||
FlowFixedParam.putAll(GetFlowAction.getFlowParamByFlowUnid(FlowFixedParam.get("ObjectNo")));
|
||||
BizObject flowBussinessObject = GetFlowAction.getFlowBussinessObject(FlowFixedParam.get("ObjectNo")); //流程业务对象
|
||||
FlowFixedParam.put("ProductId", flowBussinessObject.getAttribute("productId").getString());
|
||||
BizObject flowModel = GetFlowAction.getFlowModelParams(FlowFixedParam.get("FlowNo"),FlowFixedParam.get("PhaseNo")); //ÈÎÎñÅäÖÃ
|
||||
BizObject flowModel = GetFlowAction.getFlowModelParams(FlowFixedParam.get("FlowNo"),FlowFixedParam.get("PhaseNo")); //ÈÎÎñÅäÖÃ
|
||||
isPageRead=flowModel.getAttribute("ISREADONLY").getString(); //业务页面是否只读
|
||||
FlowFixedParam.put("ProductStage", flowModel.getAttribute("ATTRIBUTE4").getString()); //²úÆ·½×¶Î
|
||||
FlowFixedParam.put("ProductStage", flowModel.getAttribute("ATTRIBUTE4").getString()); //²úÆ·½×¶Î
|
||||
if(null!=isPageRead&&isPageRead.endsWith("Y")){
|
||||
FlowFixedParam.put("RightType", "ReadOnly"); //如果
|
||||
}
|
||||
}
|
||||
JBOTransaction tx=JBOFactory.createJBOTransaction();
|
||||
%>
|
||||
<%/*~END~*/%>
|
||||
@ -72,7 +72,7 @@
|
||||
var node = getCurTVItem();
|
||||
var sValue = node.value;
|
||||
if(!sValue) return;
|
||||
|
||||
|
||||
var navigation = sValue.split("@");
|
||||
var target = "right";
|
||||
var sCurItemname = node.name;
|
||||
@ -82,7 +82,7 @@
|
||||
AsControl.OpenView(navigation[0], navigation[1], target);
|
||||
setTitle(sCurItemname);
|
||||
}
|
||||
|
||||
|
||||
<%/*~[Describe=生成treeview;InputParam=无;OutPutParam=无;]~*/%>
|
||||
function initTreeVeiw(){
|
||||
<%=tviTemp.generateHTMLTreeView()%>
|
||||
@ -91,7 +91,7 @@
|
||||
myleft.width = 200;
|
||||
}
|
||||
initTreeVeiw();
|
||||
</script>
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@
|
||||
function showImage(){
|
||||
window.parent.showImage();
|
||||
}
|
||||
|
||||
|
||||
function editImage(ul){
|
||||
window.parent.editImage(ul);
|
||||
}
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
<%@page import="com.tenwa.httpclient.resources.QuartzPropertiesUtil"%>
|
||||
<%@page import="com.amarsoft.biz.workflow.FlowTask"%>
|
||||
<%@page import="com.amarsoft.dict.als.manage.CodeManager"%>
|
||||
<%@page import="com.amarsoft.app.lc.workflow.action.GetFlowAction"%>
|
||||
<%@page import="com.tenwa.flow.tabviewservice.*"%>
|
||||
<%@page import="com.amarsoft.dict.als.object.Item"%>
|
||||
<%@page import="com.amarsoft.are.jbo.BizObject"%>
|
||||
<%@page import="com.amarsoft.app.lc.taskObject.TaskObjectManager"%>
|
||||
<%@page import="com.tenwa.flow.tabviewservice.FlowTaskViewTab"%>
|
||||
<%@page import="com.tenwa.flow.tabviewservice.FlowTaskViewTabService"%>
|
||||
<%@page import="com.tenwa.httpclient.resources.QuartzPropertiesUtil"%>
|
||||
<%@page import="org.apache.commons.lang3.StringUtils"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/IncludeBegin.jsp"%>
|
||||
<%@include file="/Tenwa/Core/FlowManager/BaseFunction/BaseFlowListFunction.jspf" %>
|
||||
@ -15,6 +12,7 @@
|
||||
String rightType = CurPage.getParameter("RightType");
|
||||
String ViewID = CurPage.getParameter("ViewID");
|
||||
String ReaderId = CurPage.getParameter("ReaderId");
|
||||
String delTabs = CurPage.getParameter("delTabs");
|
||||
String title = CurComp.getParameter("Title");
|
||||
if(title != null && !title.startsWith("传阅")) {
|
||||
ReaderId = "";
|
||||
@ -23,7 +21,7 @@
|
||||
if(ReaderId==null){ReaderId="";}
|
||||
if(rightType==null){rightType="";}
|
||||
if(ViewID==null){ViewID="";}
|
||||
HashMap<String,String>FlowFixedParam=GetFlowAction.getFlowParamByTask(taskNo,CurPage);
|
||||
HashMap<String,String>FlowFixedParam=GetFlowAction.getFlowParamByTask(taskNo,CurPage);
|
||||
String custid=CurUser.getUserName();
|
||||
if(FlowFixedParam.get("AgentFlowUser").length()>0){
|
||||
if(!custid.equals(FlowFixedParam.get("AgentFlowUser"))&&custid.equals(FlowFixedParam.get("CurFlowUser"))){
|
||||
@ -35,7 +33,7 @@
|
||||
taskNo=FlowFixedParam.get("TaskNo");
|
||||
Map<String,String>startMap=GetFlowAction.getFlowParamByFlowUnid(FlowFixedParam.get("ObjectNo"));
|
||||
FlowTaskViewTab viewTab = new FlowTaskViewTab(taskNo,CurUser.getUserName());
|
||||
|
||||
|
||||
//control distributor(temporary)
|
||||
boolean flag = false;
|
||||
List<String> roles = CurUser.getRoleTable();
|
||||
@ -58,16 +56,18 @@
|
||||
<div>
|
||||
<span style="width:70%;display:inline-block; ">
|
||||
<%
|
||||
|
||||
|
||||
//显示按钮
|
||||
if(viewTab.getButtonItemList().size()==0) out.write("<span> </span>");
|
||||
if(rightType.equals("ReadOnly") || !ReaderId.equals("")){
|
||||
if(ReaderId.equals("")){
|
||||
out.write(new Button("关闭流程", "关闭流程", "closePage()", "", "btn_icon_close").getHtmlText());
|
||||
if (StringUtils.isEmpty(delTabs)) {
|
||||
out.write(new Button("关闭流程", "关闭流程", "closePage()", "", "btn_icon_close").getHtmlText());
|
||||
}
|
||||
}else{
|
||||
rightType = "ReadOnly";
|
||||
out.write(new Button("关闭流程", "关闭流程", "closePage()", "", "btn_icon_close").getHtmlText());
|
||||
out.write(new Button("结束传阅", "结束传阅", "closePassed()", "", "btn_icon_add").getHtmlText());
|
||||
out.write(new Button("关闭流程", "关闭流程", "closePage()", "", "btn_icon_close").getHtmlText());
|
||||
out.write(new Button("结束传阅", "结束传阅", "closePassed()", "", "btn_icon_add").getHtmlText());
|
||||
}
|
||||
}else{
|
||||
for(Button bt : viewTab.getButtonItemList()){
|
||||
@ -106,11 +106,12 @@ $(document).ready(function(){
|
||||
argmap.put("RightType",rightType);
|
||||
argmap.put("IsHistory", viewTab.getIsHistory());
|
||||
argmap.put("ViewID",ViewID);
|
||||
if(StringUtils.isNotBlank(delTabs))argmap.put("delTabs",delTabs);
|
||||
String viewTabInfo = FlowTaskViewTabService.showViewObjectTabInfo(viewTab.getViewTabItemList(), argmap, Sqlca);
|
||||
out.println(viewTabInfo);
|
||||
%>
|
||||
//如果使用addDataItem,则必需调用init()函数
|
||||
tabCompent.initTab();
|
||||
tabCompent.initTab();
|
||||
});
|
||||
/*~[Describe=详情打开;InputParam=无;OutPutParam=无;]~*/
|
||||
function openObjectInTab(objectType,objectNo,viewID,position){
|
||||
@ -170,13 +171,13 @@ $(function(){
|
||||
paramJson["carAttributes"]="<%=startMap.get("carAttributes")%>";
|
||||
paramJson["leasehold"]="<%=startMap.get("leasehold")%>";
|
||||
paramJson["modelid"]="<%=startMap.get("modelid")%>";
|
||||
|
||||
|
||||
//paramJson["CurFlowUser"]="<%=FlowFixedParam.get("CurFlowUser")%>";
|
||||
//paramJson["AgentFlowUser"]="<%=FlowFixedParam.get("AgentFlowUser")%>";
|
||||
//paramJson["Assignfinish"]="<%=FlowFixedParam.get("Assignfinish")%>";
|
||||
//paramJson["AssignSubmittype"]="<%=FlowFixedParam.get("AssignSubmittype")%>";
|
||||
//paramJson["EndTime"]="<%=FlowFixedParam.get("EndTime")%>";
|
||||
|
||||
|
||||
var assignInfo = AsControl.RunJavaMethodTrans("com.tenwa.flow.task.FlowAssignUserInfo","getFlowAssignUserInfo","TaskNo="+paramJson["TaskNo"]);
|
||||
var vInfo=assignInfo.split("@");
|
||||
paramJson["CurFlowUser"]=vInfo[0];
|
||||
@ -186,7 +187,7 @@ $(function(){
|
||||
if(vInfo.length>=5){
|
||||
paramJson["EndTime"]=vInfo[4];
|
||||
}
|
||||
|
||||
|
||||
return paramJson;
|
||||
};
|
||||
FlowFunction.successCallBackReload=function(){
|
||||
@ -198,9 +199,9 @@ function closePassed(){
|
||||
}
|
||||
function setConfigFlowToOtherUser(){
|
||||
var param=FlowFunction.loadFlowParam();
|
||||
var tasknos=param["TaskNo"];
|
||||
var userids=param["CurFlowUser"];
|
||||
var agentName=param["AgentFlowUser"];
|
||||
var tasknos=param["TaskNo"];
|
||||
var userids=param["CurFlowUser"];
|
||||
var agentName=param["AgentFlowUser"];
|
||||
var curUser="<%=CurUser.getUserID()%>";
|
||||
if(userids!=curUser){
|
||||
alert("别人委托或指派给你的流程不能指派给其他人");
|
||||
@ -211,13 +212,13 @@ function setConfigFlowToOtherUser(){
|
||||
return false;
|
||||
}
|
||||
FlowFunction.setConfigFlowToOtherUser(curUser,tasknos.split(","),param["ObjectNo"]);
|
||||
|
||||
|
||||
|
||||
}
|
||||
function deleteConfigFlowToOtherUser(){
|
||||
var param=FlowFunction.loadFlowParam();
|
||||
var tasknos=param["TaskNo"];
|
||||
var agentName=param["AgentFlowUser"];
|
||||
var tasknos=param["TaskNo"];
|
||||
var agentName=param["AgentFlowUser"];
|
||||
if (typeof(tasknos)=="undefined" || tasknos.length==0){
|
||||
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
@ -249,8 +250,8 @@ function editImage(ul){
|
||||
viewer = new Viewer(document.getElementById('dowebok'), {
|
||||
url: 'data-original'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script src="<%=sWebRootPath%>/js/viewpicture/js/viewer.min.js"></script>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
<%@page import="com.tenwa.comm.dataRightmanager.DataRightManager"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%@include file="/Tenwa/Core/FlowManager/BaseFunction/BaseFlowListFunction.jspf" %>
|
||||
@ -25,11 +24,29 @@
|
||||
if(userId=="system"){
|
||||
getObj(0,i,"ENDTIME").innerHTML=getObj(0,i,"BEGINTIME").textContent;
|
||||
}
|
||||
getObj(0,i,"ACTION").innerHTML= '<a href=# onclick="javascript:viewHisTab()">ÉêÇëÏêÇé</a> ';
|
||||
getObj(0,i,"ACTION").innerHTML= '<a href=# onclick="javascript:viewHisTabLocal()">申请详情</a> ';
|
||||
|
||||
}
|
||||
setColumnWidth(0,"ACTION",100);
|
||||
}
|
||||
|
||||
function viewHisTabLocal() {
|
||||
var param = FlowFunction.loadFlowParam();
|
||||
if (typeof(param.ObjectNo) == "undefined" || param.ObjectNo.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;
|
||||
}
|
||||
}
|
||||
var param ="TaskNo="+sTaskNo+"&ViewID=001&RightType=ReadOnly&delTabs=扣款卡信息,客户历史信息查询";
|
||||
AsControl.OpenNewWin("/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp",param)
|
||||
}
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
|
||||
@ -25,11 +25,29 @@
|
||||
if(userId=="system"){
|
||||
getObj(0,i,"ENDTIME").innerHTML=getObj(0,i,"BEGINTIME").textContent;
|
||||
}
|
||||
getObj(0,i,"ACTION").innerHTML= '<a href=# onclick="javascript:viewHisTab()">ÉêÇëÏêÇé</a> ';
|
||||
getObj(0,i,"ACTION").innerHTML= '<a href=# onclick="javascript:viewHisTabLocal()">申请详情</a> ';
|
||||
|
||||
}
|
||||
setColumnWidth(0,"ACTION",100);
|
||||
}
|
||||
|
||||
function viewHisTabLocal() {
|
||||
var param = FlowFunction.loadFlowParam();
|
||||
if (typeof(param.ObjectNo) == "undefined" || param.ObjectNo.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;
|
||||
}
|
||||
}
|
||||
var param ="TaskNo="+sTaskNo+"&ViewID=001&RightType=ReadOnly&delTabs=扣款卡信息,客户历史信息查询";
|
||||
AsControl.OpenNewWin("/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp",param)
|
||||
}
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
|
||||
@ -733,6 +733,28 @@ public class FlowAction {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取流程结束关联任务标识
|
||||
* @param tx
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
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();
|
||||
|
||||
}
|
||||
return taskSerialNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据flow_object相关数据获取未完成的flow_task流水号
|
||||
*
|
||||
|
||||
@ -5,6 +5,7 @@ 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;
|
||||
@ -38,6 +39,7 @@ 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 org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class FlowTaskViewTabService {
|
||||
/**
|
||||
@ -70,7 +72,7 @@ public class FlowTaskViewTabService {
|
||||
public static List<BizObject>getFlowTabItemByObject(String ObjectType)throws Exception{
|
||||
List<BizObject> bo = null;
|
||||
BizObjectManager bm = null;
|
||||
BizObjectQuery bq = null;
|
||||
BizObjectQuery bq = null;
|
||||
bm = JBOFactory.getFactory().getManager(OBJECTTYPE_RELA.CLASS_NAME);
|
||||
bq = bm.createQuery("O.objecttype=:objecttype ").setParameter("objecttype",ObjectType);
|
||||
bo=bq.getResultList(true);
|
||||
@ -103,21 +105,21 @@ public class FlowTaskViewTabService {
|
||||
tabTitle =tabItem.getAttribute("displayname").getString();
|
||||
tabAction = getObjectTabAction(tabItem, argmap, Sqlca);
|
||||
viewTabInfo += getTabCompent(tabNo, tabTitle, tabAction);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
viewTabInfo += "tabCompent.setSelectedItem(\""+ defaultOpenTab +"\");"; //默认选中项的编号
|
||||
|
||||
|
||||
return viewTabInfo;
|
||||
}
|
||||
|
||||
|
||||
public static String showViewObjectTabInfoRole(List<BizObject> viewTabList, HashMap<String, String> argmap, Transaction Sqlca, boolean flag) throws Exception{
|
||||
String viewTabInfo = "";//返回结果
|
||||
//tab编号,标题和事件
|
||||
String tabNo = "Blank";
|
||||
String tabTitle = "该流程阶段没有配置功能信息,请确认";
|
||||
String tabAction = getOpenComp(tabTitle,tabNo,"/Blank.jsp","");
|
||||
|
||||
|
||||
//默认打开tab
|
||||
String defaultOpenTab = tabNo;
|
||||
if(viewTabList.size() == 0){
|
||||
@ -138,11 +140,11 @@ public class FlowTaskViewTabService {
|
||||
} else {
|
||||
viewTabInfo += getTabCompent(tabNo, tabTitle, tabAction);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
viewTabInfo += "tabCompent.setSelectedItem(\""+ defaultOpenTab +"\");"; //默认选中项的编号
|
||||
|
||||
|
||||
return viewTabInfo;
|
||||
}
|
||||
/**
|
||||
@ -199,7 +201,7 @@ public class FlowTaskViewTabService {
|
||||
}
|
||||
return tabActionExp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 构造URL参数串
|
||||
@ -224,10 +226,10 @@ public class FlowTaskViewTabService {
|
||||
String sObjectNo = CurPage.getParameter("ObjectNo"); //对象编号
|
||||
String sFlowNo=CurPage.getParameter("FlowNo"); //流程配置编号
|
||||
String sPhaseNo=CurPage.getParameter("PhaseNo"); //阶段编号
|
||||
String sTaskNo=CurPage.getParameter("TaskNo"); //任务编号
|
||||
String sTaskNo=CurPage.getParameter("TaskNo"); //任务编号
|
||||
String sViewID=CurPage.getParameter("ViewID"); //视图编号
|
||||
String sRightType=CurPage.getParameter("RightType"); //显示权限
|
||||
String sApplyType=CurPage.getParameter("ApplyType"); //申请类型
|
||||
String sRightType=CurPage.getParameter("RightType"); //显示权限
|
||||
String sApplyType=CurPage.getParameter("ApplyType"); //申请类型
|
||||
String sishistory=CurPage.getParameter("ishistory"); //是否历史
|
||||
paramMap.put("ObjectType", sObjectType);
|
||||
paramMap.put("ObjectNo", sObjectType);
|
||||
@ -237,11 +239,11 @@ public class FlowTaskViewTabService {
|
||||
paramMap.put("ViewID", sViewID);
|
||||
paramMap.put("RightType", sRightType);
|
||||
paramMap.put("ApplyType", sApplyType);
|
||||
paramMap.put("FlowUnid", sObjectNo);
|
||||
paramMap.put("FlowUnid", sObjectNo);
|
||||
paramMap.put("ishistory", sishistory);
|
||||
return paramMap;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构造tabCompent.addDataItem语句
|
||||
* @param tabNo
|
||||
@ -252,7 +254,7 @@ public class FlowTaskViewTabService {
|
||||
public static String getTabCompent(String tabNo, String tabTitle, String tabAction){
|
||||
return "tabCompent.addDataItem(\""+tabNo+"\",\""+tabTitle+"\",\""+tabAction+"\",true,false);\n";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构造OpenComp语句
|
||||
* @param comp
|
||||
@ -264,9 +266,9 @@ public class FlowTaskViewTabService {
|
||||
String frameName = "TabContentFrame";
|
||||
return "OpenCompWithTitle('"+tabTitle+"','"+comp+"','"+url+"','"+param+"','"+frameName+"')";
|
||||
}
|
||||
|
||||
|
||||
public static List<TreeItemData> getProductTreeView(JBOTransaction tx,HashMap<String,String> FlowFixedParam) throws Exception{
|
||||
List<BizObject> bos = JBOFactory.createBizObjectQuery("jbo.prd.PRD_NODEINFO","SELECT O.NodeID,O.NodeName,O.ItemDescribe FROM O, jbo.prd.PRD_STAGENODE ps where ps.node_id=O.nodeid and ps.prd_id = '"+FlowFixedParam.get("ProductId")+"' and ps.PRD_STAGE ='"+FlowFixedParam.get("ProductStage")+"' order by O.SORTNO ").getResultList(false);
|
||||
List<BizObject> bos = JBOFactory.createBizObjectQuery("jbo.prd.PRD_NODEINFO","SELECT O.NodeID,O.NodeName,O.ItemDescribe FROM O, jbo.prd.PRD_STAGENODE ps where ps.node_id=O.nodeid and ps.prd_id = '"+FlowFixedParam.get("ProductId")+"' and ps.PRD_STAGE ='"+FlowFixedParam.get("ProductStage")+"' order by O.SORTNO ").getResultList(false);
|
||||
List<TreeItemData> treeItems=new ArrayList<TreeItemData>();
|
||||
for(int i=0;i<bos.size();i++){
|
||||
String nodeno=bos.get(i).getAttribute("NodeID").getString();
|
||||
@ -287,7 +289,7 @@ public class FlowTaskViewTabService {
|
||||
if(surl.indexOf(",")>0||surl.indexOf(".jsp")<0){
|
||||
TreeItemData temp=new TreeItemData("root",nodeno,nodename,"",tempParam);
|
||||
treeItems.add(temp);
|
||||
List<BizObject> child = JBOFactory.createBizObjectQuery("jbo.prd.PRD_NODEINFO","SELECT O.NodeID,O.NodeName,O.ItemDescribe FROM O where o.nodeid in("+surl+") order by O.SORTNO ").getResultList(false);
|
||||
List<BizObject> child = JBOFactory.createBizObjectQuery("jbo.prd.PRD_NODEINFO","SELECT O.NodeID,O.NodeName,O.ItemDescribe FROM O where o.nodeid in("+surl+") order by O.SORTNO ").getResultList(false);
|
||||
for(int j=0;j<child.size();j++){
|
||||
String cnodeno=child.get(j).getAttribute("NodeID").getString();
|
||||
String cnodename=child.get(j).getAttribute("NodeName").getString();
|
||||
@ -319,9 +321,18 @@ public class FlowTaskViewTabService {
|
||||
public static void initOHTMLTreeViewProduct(JBOTransaction tx,OHTMLTreeView tviTemp,HashMap<String,String> FlowFixedParam) throws Exception{
|
||||
List<TreeItemData> treeItems=FlowTaskViewTabService.getProductTreeView(tx, FlowFixedParam);
|
||||
BaseInitTreeView baseTreeView=FlowTaskViewTabService.initCustTreeView(tx, treeItems, FlowFixedParam);
|
||||
deleteTreeTab(baseTreeView.getTreeItem(),FlowFixedParam);
|
||||
FlowTaskViewTabService.initOHTMLTreeViewByFlowConfig(tx,tviTemp, baseTreeView.getTreeItem(),FlowFixedParam);
|
||||
FlowTaskViewTabService.initFlowStepNodes(tx, FlowFixedParam, baseTreeView);
|
||||
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 initOHTMLTreeViewProjectContract(JBOTransaction tx,OHTMLTreeView tviTemp,Page curPage) throws Exception{
|
||||
HashMap<String,String>FlowFixedParam=new HashMap<String,String>();
|
||||
FlowFixedParam.put("RightType", curPage.getAttribute("RightType"));
|
||||
@ -330,7 +341,7 @@ public class FlowTaskViewTabService {
|
||||
FlowFixedParam.put("ContractId", curPage.getAttribute("ContractId"));
|
||||
FlowFixedParam.put("ShowType", curPage.getAttribute("ShowType"));
|
||||
//根据项目号获得产品
|
||||
BizObject projectObject = JBOFactory.createBizObjectQuery(LB_PROJECT_INFO.CLASS_NAME,"SELECT O.product_id FROM O WHERE O.id=:id ").setParameter("id",FlowFixedParam.get("ProjectId") ).getSingleResult(false);
|
||||
BizObject projectObject = JBOFactory.createBizObjectQuery(LB_PROJECT_INFO.CLASS_NAME,"SELECT O.product_id FROM O WHERE O.id=:id ").setParameter("id",FlowFixedParam.get("ProjectId") ).getSingleResult(false);
|
||||
FlowFixedParam.put("ProductId",projectObject.getAttribute("product_id").getString());
|
||||
List<TreeItemData> treeItems=FlowTaskViewTabService.getProjectContractTreeView(tx, FlowFixedParam);
|
||||
BaseInitTreeView treeView=new BaseInitTreeView();
|
||||
@ -343,7 +354,7 @@ public class FlowTaskViewTabService {
|
||||
public static List<TreeItemData> getProjectContractTreeView(JBOTransaction tx,HashMap<String,String> FlowFixedParam) throws Exception{
|
||||
String sql="SELECT O.NodeID,O.NodeName,O.ItemDescribe FROM O where O.NodeID in(SELECT cl.itemno FROM "+CODE_LIBRARY.CLASS_NAME+" cl WHERE cl.codeno='"+FlowFixedParam.get("ShowType")+"') order by O.SORTNO ";
|
||||
System.out.println(sql);
|
||||
List<BizObject> bos = JBOFactory.createBizObjectQuery("jbo.prd.PRD_NODEINFO",sql).getResultList(false);
|
||||
List<BizObject> bos = JBOFactory.createBizObjectQuery("jbo.prd.PRD_NODEINFO",sql).getResultList(false);
|
||||
List<TreeItemData> treeItems=new ArrayList<TreeItemData>();
|
||||
sql="select itemattribute from O where codeno='"+FlowFixedParam.get("ShowType")+"' and itemno=:itemno";
|
||||
for(int i=0;i<bos.size();i++){
|
||||
@ -374,7 +385,7 @@ public class FlowTaskViewTabService {
|
||||
if(surl.indexOf(",")>0||surl.indexOf(".jsp")<0){
|
||||
TreeItemData temp=new TreeItemData("root",nodeno,nodename,"",tempParam);
|
||||
treeItems.add(temp);
|
||||
List<BizObject> child = JBOFactory.createBizObjectQuery("jbo.prd.PRD_NODEINFO","SELECT O.NodeID,O.NodeName,O.ItemDescribe FROM O where o.nodeid in("+surl+") order by O.SORTNO ").getResultList(false);
|
||||
List<BizObject> child = JBOFactory.createBizObjectQuery("jbo.prd.PRD_NODEINFO","SELECT O.NodeID,O.NodeName,O.ItemDescribe FROM O where o.nodeid in("+surl+") order by O.SORTNO ").getResultList(false);
|
||||
for(int j=0;j<child.size();j++){
|
||||
String cnodeno=child.get(j).getAttribute("NodeID").getString();
|
||||
String cnodename=child.get(j).getAttribute("NodeName").getString();
|
||||
@ -403,7 +414,7 @@ public class FlowTaskViewTabService {
|
||||
}
|
||||
return treeItems;
|
||||
}
|
||||
|
||||
|
||||
public static List<TreeItemData> getCommTreeView(JBOTransaction tx,HashMap<String,String> FlowFixedParam) throws Exception{
|
||||
List<BizObject> bos = JBOFactory.createBizObjectQuery("jbo.sys.CODE_LIBRARY","SELECT O.ITEMNO,O.ITEMNAME,O.ITEMDESCRIBE,O.Attribute1 from O where O.CodeNo = '"+FlowFixedParam.get("FlowStepPage")+"' and O.IsInUse = '1' ORDER BY O.SORTNO").getResultList(false);
|
||||
List<TreeItemData> treeItems=new ArrayList<TreeItemData>();
|
||||
@ -433,9 +444,9 @@ public class FlowTaskViewTabService {
|
||||
List<TreeItemData> treeItems=FlowTaskViewTabService.getCommTreeView(tx, FlowFixedParam);
|
||||
BaseInitTreeView baseTreeView=FlowTaskViewTabService.initCustTreeView(tx, treeItems, FlowFixedParam);
|
||||
FlowTaskViewTabService.initOHTMLTreeViewByFlowConfig(tx,tviTemp, baseTreeView.getTreeItem(),FlowFixedParam);
|
||||
FlowTaskViewTabService.initFlowStepNodes(tx, FlowFixedParam, baseTreeView);
|
||||
FlowTaskViewTabService.initFlowStepNodes(tx, FlowFixedParam, baseTreeView);
|
||||
}
|
||||
public static void initOHTMLTreeViewByFlowConfig(JBOTransaction tx,OHTMLTreeView tviTemp,List<TreeItemData> TreeData,HashMap<String,String>flowFixedParam) throws Exception{
|
||||
public static void initOHTMLTreeViewByFlowConfig(JBOTransaction tx,OHTMLTreeView tviTemp,List<TreeItemData> TreeData,HashMap<String,String>flowFixedParam) throws Exception{
|
||||
int i=0;
|
||||
Map<String,String> folder=new HashMap<String, String>();
|
||||
for(TreeItemData bo : TreeData){
|
||||
@ -451,19 +462,19 @@ public class FlowTaskViewTabService {
|
||||
}
|
||||
}
|
||||
String sItemDescribe = bo.getItemUrl()+bo.getParamString();
|
||||
|
||||
|
||||
if(bo.getItemUrl().length()>0){
|
||||
if(!parentNo.equals("root")){
|
||||
parentNo=folder.get(parentNo);
|
||||
}
|
||||
String sid=tviTemp.insertPage(parentNo, sNodeName,sItemDescribe, "", i++);
|
||||
String sid=tviTemp.insertPage(parentNo, sNodeName,sItemDescribe, "", i++);
|
||||
}else{
|
||||
String sid=tviTemp.insertFolder(parentNo, sNodeName,"", i++);
|
||||
folder.put(sNodeID, sid);
|
||||
}
|
||||
}
|
||||
}
|
||||
public static BaseInitTreeView initCustTreeView(JBOTransaction tx,List<TreeItemData> TreeData,HashMap<String,String>flowFixedParam) throws Exception{
|
||||
public static BaseInitTreeView initCustTreeView(JBOTransaction tx,List<TreeItemData> TreeData,HashMap<String,String>flowFixedParam) throws Exception{
|
||||
BaseInitTreeView treeView=new BaseInitTreeView();
|
||||
treeView.setTx(tx);
|
||||
treeView.setTreeItem(TreeData);
|
||||
@ -471,26 +482,26 @@ public class FlowTaskViewTabService {
|
||||
FlowViewUtil.updateTreeView(treeView);
|
||||
TreeData=treeView.getTreeItem();
|
||||
String stepViewOperator=FlowTaskViewTabService.getStepViewOperator(flowFixedParam.get("FlowNo"), flowFixedParam.get("PhaseNo"));
|
||||
|
||||
|
||||
|
||||
|
||||
BaseInitTreeView baseTreeView=new BaseInitTreeView();
|
||||
baseTreeView.setTx(tx);
|
||||
baseTreeView.setTreeItem(TreeData);
|
||||
baseTreeView.setFlowFixedParam(flowFixedParam);
|
||||
if(null!=stepViewOperator &&stepViewOperator.length()>0){
|
||||
try {
|
||||
ScriptEngineManager factory = new ScriptEngineManager();
|
||||
//每次生成一个engine实例
|
||||
ScriptEngine engine = factory.getEngineByName("groovy");
|
||||
assert engine != null;
|
||||
//javax.script.Bindings
|
||||
Bindings binding = engine.createBindings();
|
||||
binding.put("TreeView",baseTreeView);
|
||||
ScriptEngineManager factory = new ScriptEngineManager();
|
||||
//每次生成一个engine实例
|
||||
ScriptEngine engine = factory.getEngineByName("groovy");
|
||||
assert engine != null;
|
||||
//javax.script.Bindings
|
||||
Bindings binding = engine.createBindings();
|
||||
binding.put("TreeView",baseTreeView);
|
||||
binding.put("fixedParam", flowFixedParam);
|
||||
//如果script文本来自文件,请首先获取文件内容
|
||||
engine.eval("def modifyFlowPageTreeSet(){"+stepViewOperator+"}",binding);
|
||||
Object time = (Object)((Invocable)engine).invokeFunction("modifyFlowPageTreeSet", null);
|
||||
|
||||
//如果script文本来自文件,请首先获取文件内容
|
||||
engine.eval("def modifyFlowPageTreeSet(){"+stepViewOperator+"}",binding);
|
||||
Object time = (Object)((Invocable)engine).invokeFunction("modifyFlowPageTreeSet", null);
|
||||
|
||||
} catch (NoSuchMethodException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
@ -500,11 +511,11 @@ public class FlowTaskViewTabService {
|
||||
} }
|
||||
return baseTreeView;
|
||||
}
|
||||
|
||||
|
||||
public static String getStepViewOperator(String sFlowNo,String sPhaseNo) throws Exception{
|
||||
BizObject flowModel = GetFlowAction.getFlowModelParams(sFlowNo,sPhaseNo); //任务配置
|
||||
BizObject flowModel = GetFlowAction.getFlowModelParams(sFlowNo,sPhaseNo); //任务配置
|
||||
if(null!=flowModel.getAttribute("FLOWPROCESSCLASS")){
|
||||
String viewOperatorClass=flowModel.getAttribute("FLOWPROCESSCLASS").getString(); //视图处理类
|
||||
String viewOperatorClass=flowModel.getAttribute("FLOWPROCESSCLASS").getString(); //视图处理类
|
||||
return viewOperatorClass;
|
||||
}else{
|
||||
return "";
|
||||
@ -525,7 +536,7 @@ public class FlowTaskViewTabService {
|
||||
bo = bq.getSingleResult(false);
|
||||
return bo.getAttribute("VIEWNODECODE").getString();
|
||||
}
|
||||
|
||||
|
||||
public static void updateFlowStepViewNode(JBOTransaction tx,String taskNo,String nodeview)throws Exception{
|
||||
BizObjectManager table = JBOFactory.getBizObjectManager(FLOW_TASK.CLASS_NAME);
|
||||
tx.join(table);
|
||||
@ -536,7 +547,7 @@ public class FlowTaskViewTabService {
|
||||
table.saveObject(Object);
|
||||
tx.commit();
|
||||
}
|
||||
|
||||
|
||||
public static void initFlowStepNodes(JBOTransaction tx,Map<String,String>fixedParam,BaseInitTreeView baseTreeView)throws Exception{
|
||||
BizObjectManager table = JBOFactory.getBizObjectManager(FLOW_STEP_NODE.CLASS_NAME);
|
||||
tx.join(table);
|
||||
@ -553,15 +564,15 @@ public class FlowTaskViewTabService {
|
||||
oneObject.setAttributeValue("taskno",TaskNo);
|
||||
oneObject.setAttributeValue("nodeno", baseTreeView.getTreeItem().get(i).getItemNo());
|
||||
String tempNO= baseTreeView.getTreeItem().get(i).getItemParam().get("TempletNo");
|
||||
if(tempNO!=null&&tempNO.length()>0){
|
||||
if(tempNO!=null&&tempNO.length()>0){
|
||||
oneObject.setAttributeValue("templetno",tempNO);
|
||||
}
|
||||
oneObject.setAttributeValue("param",FileOperatorUtil.getMapToJsonStr(baseTreeView.getTreeItem().get(i).getItemParam()));
|
||||
table.saveObject(oneObject);
|
||||
|
||||
|
||||
}}
|
||||
}
|
||||
tx.commit();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user