|
|
|
@ -0,0 +1,975 @@
|
|
|
|
|
package com.api.browser.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.api.browser.bean.SearchConditionItem;
|
|
|
|
|
import com.api.browser.bean.SearchConditionOption;
|
|
|
|
|
import com.api.browser.bean.SplitTableBean;
|
|
|
|
|
import com.api.browser.bean.SplitTableColBean;
|
|
|
|
|
import com.api.browser.service.BrowserService;
|
|
|
|
|
import com.api.browser.util.*;
|
|
|
|
|
import com.api.workflow.util.ServiceUtil;
|
|
|
|
|
import com.cloudstore.dev.api.bean.SplitMobileDataBean;
|
|
|
|
|
import com.engine.hrm.biz.HrmClassifiedProtectionBiz;
|
|
|
|
|
import com.engine.workflow.biz.RequestQuickSearchBiz;
|
|
|
|
|
import com.engine.workflow.biz.requestForm.RequestSecLevelBiz;
|
|
|
|
|
import weaver.conn.RecordSet;
|
|
|
|
|
import weaver.crm.Maint.CustomerInfoComInfo;
|
|
|
|
|
import weaver.fna.budget.FnaTableNameEnum;
|
|
|
|
|
import weaver.fna.general.FnaCommon;
|
|
|
|
|
import weaver.fna.maintenance.FnaSplitTableByYearComInfo;
|
|
|
|
|
import weaver.fullsearch.util.SearchBrowserUtils;
|
|
|
|
|
import weaver.general.BaseBean;
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
import weaver.hrm.User;
|
|
|
|
|
import weaver.hrm.resource.ResourceComInfo;
|
|
|
|
|
import weaver.systeminfo.SystemEnv;
|
|
|
|
|
import weaver.systeminfo.setting.HrmUserSettingComInfo;
|
|
|
|
|
import weaver.workflow.request.RequestBaseUtil;
|
|
|
|
|
import weaver.workflow.workflow.WorkflowAllComInfo;
|
|
|
|
|
import weaver.workflow.workflow.WorkflowComInfo;
|
|
|
|
|
import weaver.workflow.workflow.WorkflowVersion;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 流程
|
|
|
|
|
*
|
|
|
|
|
* @author jhy Mar 29, 2017
|
|
|
|
|
*/
|
|
|
|
|
public class RequestBrowserService extends BrowserService {
|
|
|
|
|
|
|
|
|
|
public static final Pattern COLLECTION_REQUEST_ID_PATTERN = Pattern.compile("requestid=(\\d+)");
|
|
|
|
|
|
|
|
|
|
public static final String SEC_LEVEL = "secretLevel";
|
|
|
|
|
|
|
|
|
|
public static final String JSON_CONFIG = "[" +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"configs\": [" +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"configs\": [" +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"key\": \"requestname\"" +
|
|
|
|
|
" }" +
|
|
|
|
|
" ]," +
|
|
|
|
|
" \"key\": \"col1_row1\"" +
|
|
|
|
|
" }," +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"configs\": [" +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"key\": \"createdate\"" +
|
|
|
|
|
" }," +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"style\": {" +
|
|
|
|
|
" \"float\": \"right\"" +
|
|
|
|
|
" }," +
|
|
|
|
|
" \"key\": \"creater\"" +
|
|
|
|
|
" }" +
|
|
|
|
|
" ]," +
|
|
|
|
|
" \"key\": \"col1_row2\"" +
|
|
|
|
|
" }" +
|
|
|
|
|
" ]," +
|
|
|
|
|
" \"key\": \"col1\"" +
|
|
|
|
|
" }" +
|
|
|
|
|
"]";
|
|
|
|
|
|
|
|
|
|
public static final String JSON_CONFIG_2 = "[" +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"configs\": [" +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"configs\": [" +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"key\": \"requestnamenew\"" +
|
|
|
|
|
" }" +
|
|
|
|
|
" ]," +
|
|
|
|
|
" \"key\": \"col1_row1\"" +
|
|
|
|
|
" }," +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"configs\": [" +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"key\": \"createdate\"" +
|
|
|
|
|
" }," +
|
|
|
|
|
" {" +
|
|
|
|
|
" \"style\": {" +
|
|
|
|
|
" \"float\": \"right\"" +
|
|
|
|
|
" }," +
|
|
|
|
|
" \"key\": \"creater\"" +
|
|
|
|
|
" }" +
|
|
|
|
|
" ]," +
|
|
|
|
|
" \"key\": \"col1_row2\"" +
|
|
|
|
|
" }" +
|
|
|
|
|
" ]," +
|
|
|
|
|
" \"key\": \"col1\"" +
|
|
|
|
|
" }" +
|
|
|
|
|
"]";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map <String, Object> getBrowserData(Map <String, Object> params) throws Exception {
|
|
|
|
|
//判断是否走微搜接口
|
|
|
|
|
String fnaSqlWhere = fnaUtils(params);
|
|
|
|
|
boolean isQuickSearch = validQuickSearch(params);
|
|
|
|
|
if (isQuickSearch && "".equals(fnaSqlWhere)) {
|
|
|
|
|
//数据处理
|
|
|
|
|
if ("171".equals(browserType)) params.put("currentnodetype", 3);
|
|
|
|
|
eSearchParamsTrans(params);//处理传入微搜的参数
|
|
|
|
|
return new RequestQuickSearchBiz().getRequestList(params, user);
|
|
|
|
|
}
|
|
|
|
|
Map <String, Object> apidatas = new HashMap <String, Object>();
|
|
|
|
|
String backfields = " t.* ";
|
|
|
|
|
String orderby = "createdate , createtime ";
|
|
|
|
|
String importWfBrow = Util.null2String(params.get("importWfBrow"));
|
|
|
|
|
String fromsql = getFromSql(params,fnaSqlWhere);
|
|
|
|
|
int isFormEMShare = Util.getIntValue(Util.null2String(params.get("isFormEMShare")), -1);
|
|
|
|
|
if (isFormEMShare == 1){
|
|
|
|
|
getTableString4EMShare(apidatas, user, backfields, fromsql, orderby);
|
|
|
|
|
} else {
|
|
|
|
|
getTableString(apidatas, user, backfields, fromsql, orderby, importWfBrow, Util.getIntValue(Util.null2String(params.get("ismobile"))));
|
|
|
|
|
}
|
|
|
|
|
return apidatas;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 费控相关 只做了方法抽取
|
|
|
|
|
*
|
|
|
|
|
* @param params
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
private String fnaUtils(Map <String, Object> params) {
|
|
|
|
|
/* begin:处理还款流程请求浏览按钮过滤逻辑代码 */
|
|
|
|
|
String currworkflowid = Util.null2String(params.get("currworkflowid"));
|
|
|
|
|
if ("".equals(currworkflowid)) {
|
|
|
|
|
currworkflowid = Util.null2String(params.get("workflowid"));
|
|
|
|
|
}
|
|
|
|
|
String sqlwhere = "";
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
String fieldid = Util.null2String(params.get("fieldid"));
|
|
|
|
|
if (!"".equals(fieldid)) {
|
|
|
|
|
String newwfs[] = fieldid.split("_");
|
|
|
|
|
fieldid = newwfs[0];
|
|
|
|
|
}
|
|
|
|
|
int _bdf_wfid = Util.getIntValue(Util.null2String(params.get("wfid")));
|
|
|
|
|
int _bdf_fieldid = Util.getIntValue(Util.null2String(params.get("fieldid")));
|
|
|
|
|
int __requestid = Util.getIntValue(Util.null2String(params.get("__requestid")));
|
|
|
|
|
int _fna_wfid = Util.getIntValue(Util.null2String(params.get("fna_wfid")));
|
|
|
|
|
int _fna_fieldid = Util.getIntValue(Util.null2String(params.get("fna_fieldid")));
|
|
|
|
|
if (_bdf_wfid > 0 && _fna_wfid <= 0) {
|
|
|
|
|
_fna_wfid = _bdf_wfid;
|
|
|
|
|
}
|
|
|
|
|
if (Util.getIntValue(currworkflowid) > 0 && _fna_wfid <= 0) {
|
|
|
|
|
_fna_wfid = Util.getIntValue(currworkflowid);
|
|
|
|
|
}
|
|
|
|
|
if (_bdf_fieldid > 0 && _fna_fieldid <= 0) {
|
|
|
|
|
_fna_fieldid = _bdf_fieldid;
|
|
|
|
|
}
|
|
|
|
|
if (Util.getIntValue(fieldid) > 0 && _fna_fieldid <= 0) {
|
|
|
|
|
_fna_fieldid = Util.getIntValue(fieldid);
|
|
|
|
|
}
|
|
|
|
|
boolean _isEnableFnaWf = false;// 是否是启用的Ecology8费控流程
|
|
|
|
|
HashMap <String, String> _isEnableFnaWfHm = FnaCommon.getIsEnableFnaWfHm(_fna_wfid);
|
|
|
|
|
_isEnableFnaWf = "true".equals(_isEnableFnaWfHm.get("isEnableFnaWfE8"));
|
|
|
|
|
|
|
|
|
|
int _formId = Util.getIntValue(_isEnableFnaWfHm.get("formId"), 0);
|
|
|
|
|
int _isbill = Util.getIntValue(_isEnableFnaWfHm.get("isbill"), -1);
|
|
|
|
|
if (!_isEnableFnaWf) {
|
|
|
|
|
HashMap <String, String> _isEnableFnaRepaymentWfHm = FnaCommon.getIsEnableFnaRepaymentWfHm(_fna_wfid);
|
|
|
|
|
_isEnableFnaWf = "true".equals(_isEnableFnaRepaymentWfHm.get("isEnableFnaRepaymentWf"));
|
|
|
|
|
_formId = Util.getIntValue(_isEnableFnaRepaymentWfHm.get("formId"), 0);
|
|
|
|
|
_isbill = Util.getIntValue(_isEnableFnaRepaymentWfHm.get("isbill"), -1);
|
|
|
|
|
}
|
|
|
|
|
boolean isFnaWfFysqlcReq = false;// 是否是报销流程的费用申请流程
|
|
|
|
|
boolean isFnaWfRepaymentBorrowReq = false;// 是否是还款流程的冲销明细的借款流程浏览按钮
|
|
|
|
|
boolean isFnaWfAdvanceRepaymentAdvanceReq = false;// 是否是还款流程的冲销预付款明细的预付款流程浏览按钮
|
|
|
|
|
if (_isEnableFnaWf) {
|
|
|
|
|
isFnaWfFysqlcReq = FnaCommon.checkFnaWfFieldFnaType(_fna_wfid, _fna_fieldid, 2, 0, "fnaFeeWf");
|
|
|
|
|
isFnaWfRepaymentBorrowReq = (FnaCommon.checkFnaWfFieldFnaType(_fna_wfid, _fna_fieldid, 1, 2, "repayment") || FnaCommon.checkFnaWfFieldFnaType(_fna_wfid, _fna_fieldid, 1, 2, "fnaFeeWf"));
|
|
|
|
|
isFnaWfAdvanceRepaymentAdvanceReq = FnaCommon.checkFnaWfFieldFnaType(_fna_wfid, _fna_fieldid, 1, 4, "fnaFeeWf");
|
|
|
|
|
}
|
|
|
|
|
int borrowType = Util.getIntValue(Util.null2String(params.get("borrowType")), -1);
|
|
|
|
|
int ___main_fieldIdSqr_controlBorrowingWf = 0;
|
|
|
|
|
int ___main_fieldIdSqr_val = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isFnaWfFysqlcReq) {
|
|
|
|
|
//财务报销流程相关的workflowid
|
|
|
|
|
String workflowidStr = "";
|
|
|
|
|
rs.executeQuery(" select workflowid from fnaFeeWfInfo where enable = 1 and fnaWfType = 'fnaFeeWf' ");
|
|
|
|
|
while(rs.next()){
|
|
|
|
|
String fnaworkflowId = Util.null2String(rs.getString("workflowid"));
|
|
|
|
|
if(!"".equals(workflowidStr)){
|
|
|
|
|
workflowidStr += ",";
|
|
|
|
|
}
|
|
|
|
|
workflowidStr += fnaworkflowId;
|
|
|
|
|
}
|
|
|
|
|
String fnaWfId = WorkflowVersion.getAllVersionStringByWFIDs(workflowidStr);
|
|
|
|
|
if("".equals(fnaWfId)){
|
|
|
|
|
fnaWfId = "-1";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String sqlIsNull = "ISNULL";
|
|
|
|
|
String sqlSubString = "SUBSTRING";
|
|
|
|
|
if ("oracle".equals(rs.getDBType())) {
|
|
|
|
|
sqlIsNull = "NVL";
|
|
|
|
|
sqlSubString = "SUBSTR";
|
|
|
|
|
}
|
|
|
|
|
else if ("mysql".equals(rs.getDBType())) {
|
|
|
|
|
sqlIsNull = "IFNULL";
|
|
|
|
|
}else if ("postgresql".equals(rs.getDBType())) {
|
|
|
|
|
sqlIsNull = "isnull";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//拼接多张费用表 start
|
|
|
|
|
sqlwhere += " and ( ";
|
|
|
|
|
//定位 数据库表名, 日期范围可能跨年
|
|
|
|
|
List<String> list_out_FnaExpenseInfo = new ArrayList<String>();
|
|
|
|
|
FnaSplitTableByYearComInfo.getFnaTableNameList(FnaTableNameEnum.FnaExpenseInfo, "1000-01-01", "9999-12-31", list_out_FnaExpenseInfo);
|
|
|
|
|
for (int aaaaaaaa = 0; aaaaaaaa < list_out_FnaExpenseInfo.size(); aaaaaaaa++) {
|
|
|
|
|
String tableName_FnaExpenseInfo = list_out_FnaExpenseInfo.get(aaaaaaaa);
|
|
|
|
|
|
|
|
|
|
if(aaaaaaaa > 0){
|
|
|
|
|
sqlwhere += " or ";//多张表使用 or
|
|
|
|
|
}
|
|
|
|
|
sqlwhere += " exists ( " + " select 1 " + " from "+tableName_FnaExpenseInfo+" fei " + " where fei.budgetperiodslist is not null " + " and fei.sourceRequestid <> " + __requestid + " "
|
|
|
|
|
+ " and fei.status = 0 " + " and fei.requestid = workflow_requestbase.requestid "
|
|
|
|
|
+ " GROUP BY fei.organizationid, fei.organizationtype, fei.subject, fei.budgetperiods, fei.budgetperiodslist " + " HAVING SUM(" + sqlIsNull + "(fei.amount, 0.00)) > 0.00 "
|
|
|
|
|
+ " ) ";
|
|
|
|
|
}//for end
|
|
|
|
|
sqlwhere += " ) ";
|
|
|
|
|
//拼接多张费用表 end
|
|
|
|
|
sqlwhere += " and workflow_requestbase.currentnodetype = 3 ";
|
|
|
|
|
sqlwhere += " and workflow_requestbase.workflowid in ("+fnaWfId+") ";
|
|
|
|
|
|
|
|
|
|
} else if (isFnaWfRepaymentBorrowReq) {
|
|
|
|
|
|
|
|
|
|
//需要控制只能选择自己的个人借款流程和自己发起的公务借款流程进行冲账,不能冲销其他个人借款的流程,公务借款流程可以给有权限的人员、或者自己提交的公务借款进行选择冲销。
|
|
|
|
|
int controlBorrowingWf_userId = user.getUID();
|
|
|
|
|
___main_fieldIdSqr_controlBorrowingWf = Util.getIntValue(Util.null2String(params.get("main_fieldIdSqr_controlBorrowingWf")), -1);
|
|
|
|
|
if (___main_fieldIdSqr_controlBorrowingWf == 1) {
|
|
|
|
|
___main_fieldIdSqr_val = Util.getIntValue(Util.null2String(params.get("main_fieldIdSqr_val")), -1);
|
|
|
|
|
controlBorrowingWf_userId = ___main_fieldIdSqr_val;
|
|
|
|
|
}
|
|
|
|
|
String _condBorrowType = "";
|
|
|
|
|
if (borrowType == -1 || borrowType == 0) {
|
|
|
|
|
_condBorrowType += " (fbi1.borrowType0 = 0 and fbi1.applicantid = " + controlBorrowingWf_userId + ") \n";
|
|
|
|
|
}
|
|
|
|
|
if (borrowType == -1) {
|
|
|
|
|
_condBorrowType += " or \n";
|
|
|
|
|
}
|
|
|
|
|
if (borrowType == -1 || borrowType == 1) {
|
|
|
|
|
_condBorrowType += " (fbi1.borrowType1 = 1) \n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sqlwhere += " and exists ( \n" +
|
|
|
|
|
" select 1 from ( \n" +
|
|
|
|
|
" select fbi.borrowRequestId, fbi.borrowRequestIdDtlId, \n" +
|
|
|
|
|
" SUM(fbi.amountBorrow * fbi.borrowDirection) sum_amountBorrow, \n" +
|
|
|
|
|
" MAX(CASE WHEN fbi.recordType = 'borrow' THEN fbi.applicantid ELSE 0 END) applicantid, \n" +
|
|
|
|
|
" MAX(CASE WHEN fbi.recordType = 'borrow' THEN fbi.departmentid ELSE 0 END) departmentid, \n" +
|
|
|
|
|
" MAX(CASE WHEN fbi.recordType = 'borrow' THEN fbi.subcompanyid1 ELSE 0 END) subcompanyid1, \n" +
|
|
|
|
|
" MAX(CASE WHEN (fbi.borrowType is null or fbi.borrowType <> 1) THEN 0 ELSE -99999 END) borrowType0, \n" +
|
|
|
|
|
" MAX(CASE WHEN fbi.borrowType = 1 THEN 1 ELSE -99999 END) borrowType1 \n" +
|
|
|
|
|
" from FnaBorrowInfo fbi \n" +
|
|
|
|
|
" where fbi.requestid <> " + __requestid + " \n" +
|
|
|
|
|
" GROUP BY fbi.borrowRequestId, fbi.borrowRequestIdDtlId \n" +
|
|
|
|
|
" ) fbi1 \n" +
|
|
|
|
|
" where fbi1.sum_amountBorrow > 0 \n" +
|
|
|
|
|
" and fbi1.borrowRequestId = workflow_requestbase.requestId \n" +
|
|
|
|
|
" and (" + _condBorrowType + ") \n" +
|
|
|
|
|
" ) \n";
|
|
|
|
|
} else if (isFnaWfAdvanceRepaymentAdvanceReq) {
|
|
|
|
|
// 需要控制只能选择自己的个人借款流程和自己发起的公务借款流程进行冲账,不能冲销其他个人借款的流程,公务借款流程可以给有权限的人员、或者自己提交的公务借款进行选择冲销。
|
|
|
|
|
sqlwhere += " and exists ( \n" + " select 1 from ( \n" + " select fbi.advanceRequestId, fbi.advanceRequestIdDtlId, \n"
|
|
|
|
|
+ " SUM(fbi.amountAdvance * fbi.advanceDirection) sum_amountAdvance \n" + " from FnaAdvanceInfo fbi \n" + " where fbi.requestid <> " + __requestid + " \n"
|
|
|
|
|
+ " GROUP BY fbi.advanceRequestId, fbi.advanceRequestIdDtlId \n" + " ) fbi1 \n" + " where fbi1.sum_amountAdvance > 0 \n"
|
|
|
|
|
+ " and fbi1.advanceRequestId = workflow_requestbase.requestId \n" + " ) \n";
|
|
|
|
|
}
|
|
|
|
|
/* end:处理还款流程请求浏览按钮过滤逻辑代码 */
|
|
|
|
|
return sqlwhere;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* EM端流程分享
|
|
|
|
|
* @param apidatas
|
|
|
|
|
* @param user
|
|
|
|
|
* @param backfields
|
|
|
|
|
* @param formsql
|
|
|
|
|
* @param orderby
|
|
|
|
|
*/
|
|
|
|
|
private void getTableString4EMShare(Map <String, Object> apidatas, User user, String backfields, String formsql, String orderby) {
|
|
|
|
|
List <SplitTableColBean> cols = new ArrayList <SplitTableColBean>();
|
|
|
|
|
cols.add(new SplitTableColBean("true", "id").setBelong(BelongAttr.PCMOBILE));
|
|
|
|
|
cols.add(new SplitTableColBean("50%",
|
|
|
|
|
SystemEnv.getHtmlLabelName(26876, user.getLanguage()),
|
|
|
|
|
"requestnamenew", "requestnamenew", "com.api.browser.service.impl.RequestBrowserService.getRequestNameWithOutHtml","column:id+" + user.getLanguage()+"+column:requestname",1).setIsInputCol(BoolAttr.TRUE).setBelong(BelongAttr.PCMOBILE));
|
|
|
|
|
cols.add(new SplitTableColBean("25%",
|
|
|
|
|
SystemEnv.getHtmlLabelName(882, user.getLanguage()),
|
|
|
|
|
"creater", "creater",
|
|
|
|
|
"weaver.workflow.request.RequestBrowser.getWfCreaterName",
|
|
|
|
|
"column:creatertype+" + user.getLanguage()).setBelong(BelongAttr.PCMOBILE).setMobileviewtype(MobileViewTypeAttr.DETAIL));
|
|
|
|
|
cols.add(new SplitTableColBean("25%",
|
|
|
|
|
SystemEnv.getHtmlLabelName(1339, user.getLanguage()),
|
|
|
|
|
"createdate", "createdate",
|
|
|
|
|
"com.api.browser.service.impl.RequestBrowserService.getCreateTime",
|
|
|
|
|
"column:createtime").setBelong(BelongAttr.PCMOBILE).setMobileviewtype(MobileViewTypeAttr.DETAIL));
|
|
|
|
|
SplitTableBean tableBean = new SplitTableBean(backfields, formsql, "", orderby, "id", cols);
|
|
|
|
|
tableBean.setSqlisdistinct("true");
|
|
|
|
|
|
|
|
|
|
//移动端多列
|
|
|
|
|
tableBean.setMobileshowtype(MobileShowTypeAttr.ListView);
|
|
|
|
|
try {
|
|
|
|
|
tableBean.createMobileTemplate(JSON.parseArray(JSON_CONFIG_2, SplitMobileDataBean.class));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
apidatas.putAll(SplitTableUtil.makeListDataResult(tableBean));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void getTableString(Map <String, Object> apidatas, User user, String backfields, String formsql, String orderby, String importWfBrow, int ismobile) {
|
|
|
|
|
List <SplitTableColBean> cols = new ArrayList <SplitTableColBean>();
|
|
|
|
|
cols.add(new SplitTableColBean("true", "id").setBelong(BelongAttr.PCMOBILE));
|
|
|
|
|
cols.add(new SplitTableColBean("true", "requestname").setIsInputCol(BoolAttr.TRUE).setBelong(BelongAttr.PCMOBILE));
|
|
|
|
|
if ("1".equals(importWfBrow)) {
|
|
|
|
|
cols.add(new SplitTableColBean("50%",
|
|
|
|
|
SystemEnv.getHtmlLabelName(26876, user.getLanguage()), "requestname", "requestname",
|
|
|
|
|
"com.api.browser.service.impl.RequestBrowserService.getRequestnameWithLink", "column:id+" + user.getLanguage() + "+column:requestname", 1));
|
|
|
|
|
cols.add(new SplitTableColBean("25%",
|
|
|
|
|
SystemEnv.getHtmlLabelName(882, user.getLanguage()),
|
|
|
|
|
"creater", "creater",
|
|
|
|
|
"weaver.general.WorkFlowTransMethod.getWFSearchResultName", "column:creatertype"));
|
|
|
|
|
} else {
|
|
|
|
|
cols.add(new SplitTableColBean("50%",
|
|
|
|
|
SystemEnv.getHtmlLabelName(26876, user.getLanguage()),
|
|
|
|
|
"requestnamenew", "requestnamenew",
|
|
|
|
|
"com.api.browser.service.impl.RequestBrowserService.getRequestname",
|
|
|
|
|
"column:id+" + user.getLanguage() + "+column:requestname", 1).setBelong(BelongAttr.PCMOBILE));
|
|
|
|
|
cols.add(new SplitTableColBean("25%",
|
|
|
|
|
SystemEnv.getHtmlLabelName(882, user.getLanguage()),
|
|
|
|
|
"creater", "creater",
|
|
|
|
|
"weaver.workflow.request.RequestBrowser.getWfCreaterName",
|
|
|
|
|
"column:creatertype+" + user.getLanguage()).setBelong(BelongAttr.PCMOBILE).setMobileviewtype(MobileViewTypeAttr.DETAIL));
|
|
|
|
|
}
|
|
|
|
|
//cols.add(new SplitTableColBean("60%",SystemEnv.getHtmlLabelName(648, user.getLanguage()),"requestnamenew","requestnamenew",1));
|
|
|
|
|
cols.add(new SplitTableColBean("25%",
|
|
|
|
|
SystemEnv.getHtmlLabelName(1339, user.getLanguage()),
|
|
|
|
|
"createdate", "createdate",
|
|
|
|
|
"com.api.browser.service.impl.RequestBrowserService.getCreateTime",
|
|
|
|
|
"column:createtime").setBelong(BelongAttr.PCMOBILE).setMobileviewtype(MobileViewTypeAttr.DETAIL));
|
|
|
|
|
SplitTableBean tableBean = new SplitTableBean(backfields, formsql, "", orderby, "id", cols);
|
|
|
|
|
tableBean.setSqlisdistinct("true");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//移动端多列
|
|
|
|
|
tableBean.setMobileshowtype(MobileShowTypeAttr.ListView);
|
|
|
|
|
try {
|
|
|
|
|
if ("1".equals(importWfBrow)) {
|
|
|
|
|
tableBean.createMobileTemplate(JSON.parseArray(JSON_CONFIG, SplitMobileDataBean.class));
|
|
|
|
|
}else{
|
|
|
|
|
tableBean.createMobileTemplate(JSON.parseArray(JSON_CONFIG_2, SplitMobileDataBean.class));
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
apidatas.putAll(SplitTableUtil.makeListDataResult(tableBean));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map <String, Object> getMultBrowserDestData(Map <String, Object> params) throws Exception {
|
|
|
|
|
Map <String, Object> apidatas = new HashMap <String, Object>();
|
|
|
|
|
String resourceids = Util.null2String(params.get(BrowserConstant.BROWSER_MULT_DEST_SELECTIDS));
|
|
|
|
|
if ("".equals(resourceids)) return apidatas;
|
|
|
|
|
String sql = "select requestid,creatertype,requestname, requestnamenew,creater,createdate,createtime from workflow_requestbase where requestid in (" + resourceids + ")";
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
rs.executeSql(sql);
|
|
|
|
|
ResourceComInfo resComInfo = new ResourceComInfo();
|
|
|
|
|
CustomerInfoComInfo crmComInfo = new CustomerInfoComInfo();
|
|
|
|
|
List <Map <String, Object>> datas = new ArrayList <Map <String, Object>>();
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
String request_id = Util.null2String(rs.getString("requestid"));
|
|
|
|
|
String creater_name = Util.null2String(rs.getString("creater"));
|
|
|
|
|
String create_date = Util.null2String(rs.getString("createdate"));
|
|
|
|
|
String create_time = Util.null2String(rs.getString("createtime"));
|
|
|
|
|
String request_name = Util.null2String(rs.getString("requestname"));
|
|
|
|
|
String request_name_new = getRequestname("", request_id + "+" + user.getLanguage() + "+" + request_name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String createtype = Util.null2String(rs.getString("createtype"));
|
|
|
|
|
if ("1".equals(createtype)) {
|
|
|
|
|
creater_name = crmComInfo.getCustomerInfoname(creater_name);
|
|
|
|
|
} else {
|
|
|
|
|
creater_name = resComInfo.getResourcename(creater_name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map <String, Object> item = new HashMap <String, Object>();
|
|
|
|
|
item.put("id", request_id);
|
|
|
|
|
item.put("requestname", request_name);
|
|
|
|
|
item.put("requestnamespan", request_name);
|
|
|
|
|
item.put("requestnamenew", request_name_new);
|
|
|
|
|
item.put("creater", creater_name);
|
|
|
|
|
item.put("createdate", create_date + " " + create_time);
|
|
|
|
|
datas.add(item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// apidatas.put(BrowserConstant.BROWSER_RESULT_COLUMN, tableHeadColumns);
|
|
|
|
|
apidatas.put(BrowserConstant.BROWSER_RESULT_DATA, BrowserBaseUtil.sortDatas(datas, resourceids, "id"));
|
|
|
|
|
apidatas.put(BrowserConstant.BROWSER_RESULT_TYPE, BrowserDataType.LIST_ALL_DATA.getTypeid());
|
|
|
|
|
return apidatas;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map <String, Object> getBrowserConditionInfo(Map <String, Object> params) throws Exception {
|
|
|
|
|
Map <String, Object> apidatas = new HashMap <String, Object>();
|
|
|
|
|
List <SearchConditionItem> conditions = new ArrayList <SearchConditionItem>();
|
|
|
|
|
apidatas.put(BrowserConstant.BROWSER_RESULT_CONDITIONS, conditions);
|
|
|
|
|
ConditionFactory conditionFactory = new ConditionFactory(user, !"16".equals(browserType));
|
|
|
|
|
//流程导入浏览框条件
|
|
|
|
|
String importWfBrow = Util.null2String(params.get("importWfBrow"));
|
|
|
|
|
if ("1".equals(importWfBrow)) {
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.INPUT, 26876, "requestname", true)); //请求标题
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.INPUT, 714, "requestmark")); //流程编号
|
|
|
|
|
//移动端新建流程导入
|
|
|
|
|
boolean isFromMobileNewReq = "1".equals(Util.null2String(params.get("ismobile"))) && "1".equals(Util.null2String(params.get("newReq")));
|
|
|
|
|
if (!isFromMobileNewReq) {
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.BROWSER, 882, "creater", "17")); //创建人
|
|
|
|
|
}
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.BROWSER, 19225, "department", "57")); //创建人部门
|
|
|
|
|
|
|
|
|
|
String[] domKey = {"createdatetype", "createdatestart", "createdateend"};
|
|
|
|
|
SearchConditionItem conditonItem = conditionFactory.createCondition(ConditionType.DATE, 722, domKey);
|
|
|
|
|
conditonItem.setColSpan(1);
|
|
|
|
|
List <SearchConditionOption> dateOptions = BrowserBaseUtil.getDateSelectOption(user.getLanguage(), true, true);
|
|
|
|
|
// //设置默认选中区间
|
|
|
|
|
// for(SearchConditionOption option:dateOptions){
|
|
|
|
|
// option.setSelected(WfAdvanceSearchUtil.PERIOD.equals(option.getKey()));
|
|
|
|
|
// }
|
|
|
|
|
conditonItem.setLabelcol(3);
|
|
|
|
|
conditonItem.setFieldcol(21);
|
|
|
|
|
conditonItem.setOptions(dateOptions);
|
|
|
|
|
conditions.add(conditonItem);
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.BROWSER, 782, "prjids", "135"));
|
|
|
|
|
|
|
|
|
|
WorkflowAllComInfo wfComInfo = new WorkflowAllComInfo();
|
|
|
|
|
SearchConditionItem wfItem = conditionFactory.createCondition(ConditionType.BROWSER, 259, "workflowid", "-99991", 32770);
|
|
|
|
|
String workflowid = Util.null2String(params.get("workflowid"));
|
|
|
|
|
List <Map <String, Object>> replaceDatas = wfItem.getBrowserConditionParam().getReplaceDatas();
|
|
|
|
|
if (replaceDatas == null) replaceDatas = new ArrayList <Map <String, Object>>();
|
|
|
|
|
Map <String, Object> defaultWf = new HashMap <String, Object>();
|
|
|
|
|
defaultWf.put("id", workflowid);
|
|
|
|
|
defaultWf.put("name", wfComInfo.getWorkflowname(workflowid));
|
|
|
|
|
replaceDatas.add(defaultWf);
|
|
|
|
|
wfItem.getBrowserConditionParam().setReplaceDatas(replaceDatas);
|
|
|
|
|
conditions.add(wfItem); //流程树
|
|
|
|
|
|
|
|
|
|
Map <String, Object> dataParams = wfItem.getBrowserConditionParam().getDataParams();
|
|
|
|
|
dataParams.put("formid", wfComInfo.getFormId(workflowid));
|
|
|
|
|
dataParams.put("isbill", wfComInfo.getIsBill(workflowid));
|
|
|
|
|
|
|
|
|
|
Map <String, Object> completeParams = wfItem.getBrowserConditionParam().getCompleteParams();
|
|
|
|
|
completeParams.putAll(dataParams);
|
|
|
|
|
|
|
|
|
|
//相关项目
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.BROWSER, 783, "crmids", "18")); //相关客户
|
|
|
|
|
//流程状态
|
|
|
|
|
List <SearchConditionOption> statuOptions = new ArrayList <SearchConditionOption>();
|
|
|
|
|
statuOptions.add(new SearchConditionOption("0", SystemEnv.getHtmlLabelName(332, user.getLanguage()), isFromMobileNewReq));
|
|
|
|
|
statuOptions.add(new SearchConditionOption("2", SystemEnv.getHtmlLabelName(18800, user.getLanguage()), !isFromMobileNewReq));
|
|
|
|
|
statuOptions.add(new SearchConditionOption("1", SystemEnv.getHtmlLabelName(17999, user.getLanguage())));
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.SELECT, 15112, "status", statuOptions));
|
|
|
|
|
return apidatas;
|
|
|
|
|
}
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.INPUT, 26876, "requestname", true)); //请求标题
|
|
|
|
|
SearchConditionItem wfCondition = conditionFactory.createCondition(ConditionType.BROWSER, 33806, "workflowid", "-99991", 32770);
|
|
|
|
|
wfCondition.getBrowserConditionParam().setIsSingle(false);
|
|
|
|
|
conditions.add(wfCondition); //流程树
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.INPUT, 714, "requestmark")); //流程编号
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.BROWSER, 882, "creater", "17")); //创建人
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.BROWSER, 19225, "department", "57")); //创建人部门
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.BROWSER, 22788, "subid", "194")); //分部多选
|
|
|
|
|
|
|
|
|
|
String[] domKey = {"createdatetype", "createdatestart", "createdateend"};
|
|
|
|
|
SearchConditionItem conditonItem = conditionFactory.createCondition(ConditionType.DATE, 722, domKey);
|
|
|
|
|
conditonItem.setColSpan(1);
|
|
|
|
|
conditonItem.setLabelcol("16".equals(browserType) ? 3 : 8);
|
|
|
|
|
conditonItem.setFieldcol("16".equals(browserType) ? 21 : 16);
|
|
|
|
|
conditonItem.setOptions(BrowserBaseUtil.getDateSelectOption(user.getLanguage(), true, true));
|
|
|
|
|
conditions.add(conditonItem);
|
|
|
|
|
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.BROWSER, 782, "prjids", "135")); //相关项目
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.BROWSER, 783, "crmids", "18")); //相关客户
|
|
|
|
|
|
|
|
|
|
//流程状态
|
|
|
|
|
if (!"171".equals(browserType)) {
|
|
|
|
|
List <SearchConditionOption> statuOptions = new ArrayList <SearchConditionOption>();
|
|
|
|
|
statuOptions.add(new SearchConditionOption("", ""));
|
|
|
|
|
statuOptions.add(new SearchConditionOption("1", SystemEnv.getHtmlLabelName(17999, user.getLanguage())));
|
|
|
|
|
statuOptions.add(new SearchConditionOption("2", SystemEnv.getHtmlLabelName(18800, user.getLanguage())));
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.SELECT, 15112, "status", statuOptions));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//接收期间
|
|
|
|
|
String date2durings = Util.null2String(new BaseBean().getPropValue("wfdateduring", "wfdateduring"));
|
|
|
|
|
String[] date2duringTokens = Util.TokenizerString2(date2durings, ",");
|
|
|
|
|
List <SearchConditionOption> dataOptions = new ArrayList <SearchConditionOption>();
|
|
|
|
|
//判断微搜接口是否可用
|
|
|
|
|
SearchBrowserUtils searchBrowserUtils = new SearchBrowserUtils();
|
|
|
|
|
boolean wfSearch = searchBrowserUtils.quickSearchValidate("WFSEARCH", user.getLanguage() + "");
|
|
|
|
|
if(wfSearch) wfSearch = validQuickSearch(params);
|
|
|
|
|
boolean date2duringDefaultSelected = !wfSearch;
|
|
|
|
|
for (String _date2during : date2duringTokens) {
|
|
|
|
|
if ("".equals(Util.null2String(_date2during))) continue;
|
|
|
|
|
dataOptions.add(new SearchConditionOption(_date2during, SystemEnv.getHtmlLabelName(24515, user.getLanguage()) + _date2during + SystemEnv.getHtmlLabelName(26301, user.getLanguage()), date2duringDefaultSelected));
|
|
|
|
|
if (date2duringDefaultSelected) date2duringDefaultSelected = false;
|
|
|
|
|
}
|
|
|
|
|
dataOptions.add(new SearchConditionOption("38", SystemEnv.getHtmlLabelName(332, user.getLanguage()), wfSearch));
|
|
|
|
|
|
|
|
|
|
conditions.add(conditionFactory.createCondition(ConditionType.SELECT, 31787, "date2during", dataOptions));
|
|
|
|
|
return apidatas;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getRequestnameWithLink(String requestnamenew, String para){
|
|
|
|
|
int requestid = Util.getIntValue(para.substring(0, para.indexOf("+")));
|
|
|
|
|
String result = getRequestname(requestnamenew, para);
|
|
|
|
|
result = "<a style = \"text-decoration: none\" href=\"javaScript:openFullWindowHaveBar(\'/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid + "\')\">" + result + "</a>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getRequestname(String requestnamenew, String para) {
|
|
|
|
|
//String[] paraarr = para.split("\\+");
|
|
|
|
|
int requestid = Util.getIntValue(para.substring(0, para.indexOf("+")));
|
|
|
|
|
para = para.substring(para.indexOf("+") + 1);
|
|
|
|
|
int languageid = Util.getIntValue(para.substring(0, para.indexOf("+")));
|
|
|
|
|
String requestname = para.substring(para.indexOf("+") + 1);
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
rs.executeQuery("select id,formid,isbill from workflow_base t1 where exists (select 1 from workflow_requestbase t2 where t2.workflowid = t1.id and t2.requestid = ? )", requestid);
|
|
|
|
|
int workflowid = 0;
|
|
|
|
|
int formid = 0;
|
|
|
|
|
int isbill = 0;
|
|
|
|
|
if (rs.next()) {
|
|
|
|
|
workflowid = rs.getInt(1);
|
|
|
|
|
formid = rs.getInt(2);
|
|
|
|
|
isbill = rs.getInt(3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RequestBaseUtil rbu = new RequestBaseUtil();
|
|
|
|
|
requestname = rbu.formatRequestname(requestname, workflowid+"", requestid+"",isbill,formid,languageid);
|
|
|
|
|
|
|
|
|
|
return requestname;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 实时计算流程标题并去掉html标签
|
|
|
|
|
* @param requestnamenew
|
|
|
|
|
* @param para
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public String getRequestNameWithOutHtml(String requestnamenew, String para) {
|
|
|
|
|
String requestName = this.getRequestname(requestnamenew,para);
|
|
|
|
|
return Util.delHtmlWithSpace(requestName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getWfOnlyViewLink(String requestname, String requestid) {
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
rs.executeQuery("select id,formid,isbill from workflow_base t1 where exists (select 1 from workflow_requestbase t2 where t2.workflowid = t1.id and t2.requestid = ? )", requestid);
|
|
|
|
|
int workflowid = 0;
|
|
|
|
|
int formid = 0;
|
|
|
|
|
int isbill = 0;
|
|
|
|
|
if (rs.next()) {
|
|
|
|
|
workflowid = rs.getInt(1);
|
|
|
|
|
formid = rs.getInt(2);
|
|
|
|
|
isbill = rs.getInt(3);
|
|
|
|
|
}
|
|
|
|
|
int languageid = null==user?7:user.getLanguage();
|
|
|
|
|
RequestBaseUtil rbu = new RequestBaseUtil();
|
|
|
|
|
requestname = rbu.formatRequestname(requestname, workflowid+"", requestid+"",isbill,formid,languageid);
|
|
|
|
|
return "<a href=javaScript:openFullWindowHaveBar(\'/workflow/request/ViewRequestForwardSPA.jsp?isonlyview=1&requestid=" + requestid + "\')>" + requestname + "</a>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getCreateTime(String createdate, String createtime) {
|
|
|
|
|
return createdate + " " + createtime;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 判断查询条件中参数是否有微搜不支持的参数
|
|
|
|
|
*
|
|
|
|
|
* @param params
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
private boolean validQuickSearch(Map <String, Object> params) {
|
|
|
|
|
List <String> paramKey = new ArrayList <String>();
|
|
|
|
|
paramKey.add("formid");
|
|
|
|
|
paramKey.add("importWfBrow");
|
|
|
|
|
paramKey.add("collReq");
|
|
|
|
|
paramKey.add(BrowserConstant.SPELL_SQL_WHERE);
|
|
|
|
|
Iterator <String> it = params.keySet().iterator();
|
|
|
|
|
while (it.hasNext()) {
|
|
|
|
|
String key = it.next();
|
|
|
|
|
if (paramKey.contains(key)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (!"fieldid".equalsIgnoreCase(key) && key.indexOf("field") > -1) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if ("date2during".equals(key)) {
|
|
|
|
|
String date2during = Util.null2String(params.get("date2during"));
|
|
|
|
|
if (!("38".equals(date2during) || "".equals(date2during))) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(SEC_LEVEL.equals(key) && HrmClassifiedProtectionBiz.isOpenClassification() && !SearchBrowserUtils.isSupportSecretLevel()) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//判断微搜接口是否可用
|
|
|
|
|
SearchBrowserUtils searchBrowserUtils = new SearchBrowserUtils();
|
|
|
|
|
return searchBrowserUtils.quickSearchValidate("WFSEARCH", user.getLanguage() + "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map <String, Object> browserAutoComplete(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
|
|
Map<String, Object> apidatas = new HashMap<String, Object>();
|
|
|
|
|
String fnaSqlWhere = fnaUtils(dataDefinitionParams);
|
|
|
|
|
boolean isQuickSearch = validQuickSearch(dataDefinitionParams);
|
|
|
|
|
List<Object> datas = new ArrayList<Object>();
|
|
|
|
|
String q = Util.null2String(request.getParameter("q"));
|
|
|
|
|
dataDefinitionParams.put("requestname",q);
|
|
|
|
|
if (isQuickSearch && "".equals(fnaSqlWhere)) {
|
|
|
|
|
//数据处理
|
|
|
|
|
if ("171".equals(browserType)) dataDefinitionParams.put("currentnodetype", 3);
|
|
|
|
|
Map<String,Object> newDataDefinitionParams = this.reSetDataDefinitionParams(); // 重新设置微搜参数,无值参数不放入 dataDefinitionParams中
|
|
|
|
|
List<Object> tempDatas = new RequestQuickSearchBiz().getRequestData(user,newDataDefinitionParams,PAGENUM);
|
|
|
|
|
if(tempDatas != null && tempDatas.size() > 0) {
|
|
|
|
|
for(Object rowItem : tempDatas) {
|
|
|
|
|
Map<String,String> row = (Map<String,String>) rowItem;
|
|
|
|
|
Map<String,Object> item = new HashMap<String,Object>();
|
|
|
|
|
item.put(BrowserConstant.BROWSER_AUTO_COMPLETE_PRIMARY_KEY,row.get("id"));
|
|
|
|
|
item.put(BrowserConstant.BROWSER_AUTO_COMPLETE_SHOW_NAME,row.get("requestname"));
|
|
|
|
|
datas.add(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
String backfields = "t.id,t.requestname,t.createdate,t.createtime";
|
|
|
|
|
String orderby = " createdate desc, createtime desc";
|
|
|
|
|
String fromsql = getFromSql(dataDefinitionParams,fnaSqlWhere);
|
|
|
|
|
String sql = SqlUtils.getPageSql(backfields,fromsql,orderby,0,PAGENUM);
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
rs.executeQuery(sql);
|
|
|
|
|
while(rs.next()){
|
|
|
|
|
Map<String,Object> item = new HashMap<String,Object>();
|
|
|
|
|
item.put(BrowserConstant.BROWSER_AUTO_COMPLETE_PRIMARY_KEY, rs.getString("id"));
|
|
|
|
|
item.put(BrowserConstant.BROWSER_AUTO_COMPLETE_SHOW_NAME, rs.getString("requestname"));
|
|
|
|
|
datas.add(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
apidatas.put(BrowserConstant.BROWSER_RESULT_DATA, datas);
|
|
|
|
|
return apidatas;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 重新 设置 dataDefinitionParams ,无值参数不传给微搜
|
|
|
|
|
*/
|
|
|
|
|
private Map<String,Object> reSetDataDefinitionParams() {
|
|
|
|
|
Map<String,Object> newDefinitionParams = new HashMap<String,Object>();
|
|
|
|
|
for(Map.Entry<String,Object> entry : dataDefinitionParams.entrySet()){
|
|
|
|
|
if(!"".equals(Util.null2String(entry.getValue()))){
|
|
|
|
|
newDefinitionParams.put(entry.getKey(), entry.getValue());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return newDefinitionParams;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String getFromSql(Map <String, Object> params, String fnaSqlWhere) {
|
|
|
|
|
StringBuilder sqlwhere = new StringBuilder();
|
|
|
|
|
sqlwhere.append(" where 1=1 ").append(Util.null2String(params.get(BrowserConstant.SPELL_SQL_WHERE)));
|
|
|
|
|
|
|
|
|
|
String importWfBrow = Util.null2String(params.get("importWfBrow"));
|
|
|
|
|
String userID = String.valueOf(user.getUID());
|
|
|
|
|
int userid = user.getUID();
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
HrmUserSettingComInfo settingComInfo = new HrmUserSettingComInfo();
|
|
|
|
|
String belongtoshow = settingComInfo.getBelongtoshow(userID+"");
|
|
|
|
|
String usertype = "0";
|
|
|
|
|
if ("2".equals(user.getLogintype())) usertype = "1";
|
|
|
|
|
int formid = Util.getIntValue(Util.null2String(params.get("formid")), 0);
|
|
|
|
|
int isbill = Util.getIntValue(Util.null2String(params.get("isbill")), -1);
|
|
|
|
|
if (formid != 0 && isbill != -1) {
|
|
|
|
|
sqlwhere.append(" and workflow_base.formid = ").append(formid).append(" and workflow_base.isbill = ").append(isbill);
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append(fnaSqlWhere);
|
|
|
|
|
String requestname = Util.null2String(params.get("requestname"));
|
|
|
|
|
String secLevel = Util.null2String(params.get(SEC_LEVEL));
|
|
|
|
|
String creater = Util.null2String(params.get("creater"));
|
|
|
|
|
String requestmark = Util.null2String(params.get("requestmark"));
|
|
|
|
|
String prjids = Util.null2String(params.get("prjids"));
|
|
|
|
|
String crmids = Util.null2String(params.get("crmids"));
|
|
|
|
|
String workflowid = Util.null2String(params.get("workflowid"));
|
|
|
|
|
String department = Util.null2String(params.get("department"));
|
|
|
|
|
String status = Util.null2String(params.get("status"));
|
|
|
|
|
String subid = Util.null2String(params.get("subid"));
|
|
|
|
|
int olddate2during = 0;
|
|
|
|
|
String date2durings = Util.null2String(rs.getPropValue("wfdateduring", "wfdateduring"));
|
|
|
|
|
String[] date2duringTokens = Util.TokenizerString2(date2durings, ",");
|
|
|
|
|
if (date2duringTokens.length > 0) {
|
|
|
|
|
olddate2during = Util.getIntValue(date2duringTokens[0], 0);
|
|
|
|
|
}
|
|
|
|
|
if (olddate2during < 0 || olddate2during > 36) {
|
|
|
|
|
olddate2during = 0;
|
|
|
|
|
}
|
|
|
|
|
int date2during = Util.getIntValue(Util.null2String(params.get("date2during")), olddate2during);
|
|
|
|
|
if (!"".equals(requestname)) {
|
|
|
|
|
String findStr = Util.fromScreen2(requestname, user.getLanguage());
|
|
|
|
|
findStr = findStr.replace("/", "//");
|
|
|
|
|
|
|
|
|
|
if(!"oracle".equals(rs.getDBType())) {
|
|
|
|
|
findStr = findStr.replace("[", "/[");
|
|
|
|
|
findStr = findStr.replace("]", "/]");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
findStr = findStr.replace("_", "/_");
|
|
|
|
|
findStr = findStr.replace("%", "/%");
|
|
|
|
|
|
|
|
|
|
if(Util.isEnableMultiLang()) {
|
|
|
|
|
if ("sqlserver".equals(rs.getDBType())) {
|
|
|
|
|
sqlwhere.append(" and dbo.convToMultiLang(requestnamenew," + user.getLanguage() + ") like '%").append(findStr).append("%'");
|
|
|
|
|
} else {
|
|
|
|
|
sqlwhere.append(" and convToMultiLang(requestnamenew," + user.getLanguage() + ") like '%").append(findStr).append("%'");
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
sqlwhere.append(" and requestnamenew like '%").append(findStr).append("%'");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sqlwhere.append(" escape '/' ");
|
|
|
|
|
}
|
|
|
|
|
if (!"".equals(workflowid) && !"0".equals(workflowid)) {
|
|
|
|
|
sqlwhere.append(" and workflow_requestbase.workflowid in (").append(WorkflowVersion.getAllVersionStringByWFIDs(workflowid)).append(")");
|
|
|
|
|
}
|
|
|
|
|
if (!"".equals(secLevel) && HrmClassifiedProtectionBiz.isOpenClassification()) {//开启涉密系统,拼接密级条件
|
|
|
|
|
sqlwhere.append(" and workflow_requestbase.seclevel >= " + secLevel + " ");
|
|
|
|
|
}
|
|
|
|
|
if (!"".equals(requestmark)) {
|
|
|
|
|
sqlwhere.append(" and requestmark like '%").append(requestmark).append("%'");
|
|
|
|
|
}
|
|
|
|
|
if ("1".equals(importWfBrow)) {
|
|
|
|
|
String importWfOnlyYouCreateWfids = Util.null2String(rs.getPropValue("workflowbase", "importWfOnlyYouCreateWfids"));
|
|
|
|
|
//判断流程表单是否相同
|
|
|
|
|
boolean flag = false;
|
|
|
|
|
if (!"".equals(importWfOnlyYouCreateWfids)) {
|
|
|
|
|
String wfids = WorkflowVersion.getAllVersionStringByWFIDs(importWfOnlyYouCreateWfids);
|
|
|
|
|
WorkflowAllComInfo wfComInfo = new WorkflowAllComInfo();
|
|
|
|
|
List <String> wfidArr = Util.splitString2List(wfids, ",");
|
|
|
|
|
for (String wfid : wfidArr) {
|
|
|
|
|
if (Util.getIntValue(wfComInfo.getFormId(wfid)) == formid && Util.getIntValue(wfComInfo.getIsBill(wfid)) == isbill) {
|
|
|
|
|
flag = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (flag) {
|
|
|
|
|
sqlwhere.append(" and creater = ").append(user.getUID()).append(" and usertype=0 ");
|
|
|
|
|
} else {
|
|
|
|
|
sqlwhere.append(" and workflow_currentoperator.userid = ").append(user.getUID()).append(" and creatertype="+usertype+" ");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!"".equals(creater)) {
|
|
|
|
|
//流程导入不可以导入非自己创建的流程ID
|
|
|
|
|
sqlwhere.append(" and creater in (").append(creater).append(") and creatertype="+usertype+" ");
|
|
|
|
|
}
|
|
|
|
|
if (!"".equals(department) && !"0".equals(department)) {
|
|
|
|
|
sqlwhere.append(" and workflow_requestbase.creater in (select id from hrmresource where departmentid in (").append(department).append("))");
|
|
|
|
|
}
|
|
|
|
|
if (!"".equals(subid) && !"0".equals(subid)) {
|
|
|
|
|
sqlwhere.append(" and workflow_requestbase.creater in (select id from hrmresource where subcompanyid1 in (").append(subid).append("))");
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
sqlwhere.append(AdvanceSerarchUtil.handDateCondition("createdatetype", "createdatestart", "createdateend", "createdate", params));
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
if (!"".equals(prjids) && !"0".equals(prjids)) {
|
|
|
|
|
String[] prjidAry = prjids.split(",");
|
|
|
|
|
if (prjidAry.length > 0) {
|
|
|
|
|
sqlwhere.append(" AND (");
|
|
|
|
|
if ("oracle".equals(rs.getDBType())) {
|
|
|
|
|
for (int i = 0; i < prjidAry.length; i++) {
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
sqlwhere.append(" OR ");
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append("(concat(concat(',' , To_char(workflow_requestbase.prjids)) , ',') LIKE '%," + prjidAry[i] + ",%')");
|
|
|
|
|
}
|
|
|
|
|
} else if ("mysql".equals(rs.getDBType())) {
|
|
|
|
|
for (int i = 0; i < prjidAry.length; i++) {
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
sqlwhere.append(" OR ");
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append("(concat(',' , workflow_requestbase.prjids , ',') LIKE '%," + prjidAry[i] + ",%')");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if ("postgresql".equals(rs.getDBType())) {
|
|
|
|
|
for (int i = 0; i < prjidAry.length; i++) {
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
sqlwhere.append(" OR ");
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append("(concat(concat(',' , To_char(workflow_requestbase.prjids)) , ',') LIKE '%," + prjidAry[i] + ",%')");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
for (int i = 0; i < prjidAry.length; i++) {
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
sqlwhere.append(" OR ");
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append("(',' + CONVERT(varchar,workflow_requestbase.prjids) + ',' LIKE '%," + prjidAry[i] + ",%')");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append(") ");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!"".equals(crmids) && !"0".equals(crmids)) {
|
|
|
|
|
String[] crmidAry = crmids.split(",");
|
|
|
|
|
if (crmidAry.length > 0) {
|
|
|
|
|
sqlwhere.append(" AND (");
|
|
|
|
|
if ("oracle".equals(rs.getDBType())) {
|
|
|
|
|
for (int i = 0; i < crmidAry.length; i++) {
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
sqlwhere.append(" OR ");
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append("(concat(concat(',' , To_char(workflow_requestbase.crmids)) , ',') LIKE '%," + crmidAry[i] + ",%')");
|
|
|
|
|
}
|
|
|
|
|
} else if ("mysql".equals(rs.getDBType())) {
|
|
|
|
|
for (int i = 0; i < crmidAry.length; i++) {
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
sqlwhere.append(" OR ");
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append("(concat(',' , workflow_requestbase.crmids , ',') LIKE '%," + crmidAry[i] + ",%')");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if ("postgresql".equals(rs.getDBType())) {
|
|
|
|
|
for (int i = 0; i < crmidAry.length; i++) {
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
sqlwhere.append(" OR ");
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append("(concat(concat(',' , To_char(workflow_requestbase.crmids)) , ',') LIKE '%," + crmidAry[i] + ",%')");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
for (int i = 0; i < crmidAry.length; i++) {
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
sqlwhere.append(" OR ");
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append("(',' + CONVERT(varchar,workflow_requestbase.crmids) + ',' LIKE '%," + crmidAry[i] + ",%')");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
sqlwhere.append(") ");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ("1".equals(status)) {
|
|
|
|
|
sqlwhere.append(" and currentnodetype < 3 ");
|
|
|
|
|
} else if ("2".equals(status)) {
|
|
|
|
|
sqlwhere.append(" and currentnodetype = 3 ");
|
|
|
|
|
}
|
|
|
|
|
WorkflowComInfo wci = new WorkflowComInfo();
|
|
|
|
|
if (!"1".equals(importWfBrow)) {
|
|
|
|
|
sqlwhere.append(wci.getDateDuringSql(date2during));
|
|
|
|
|
}
|
|
|
|
|
if (" where 1=1 ".equals(sqlwhere)) {
|
|
|
|
|
sqlwhere.append(" and workflow_requestbase.requestid <> 0");
|
|
|
|
|
}
|
|
|
|
|
if ("oracle".equals(rs.getDBType())) {
|
|
|
|
|
sqlwhere.append(" and (nvl(workflow_requestbase.currentstatus,-1) = -1 or (nvl(workflow_requestbase.currentstatus,-1)=0 and workflow_requestbase.creater=" + user.getUID() + "))");
|
|
|
|
|
} else if ("mysql".equals(rs.getDBType())) {
|
|
|
|
|
sqlwhere.append(" and (ifnull(workflow_requestbase.currentstatus,-1) = -1 or (ifnull(workflow_requestbase.currentstatus,-1)=0 and workflow_requestbase.creater=" + user.getUID() + "))");
|
|
|
|
|
} else {
|
|
|
|
|
sqlwhere.append(" and (isnull(workflow_requestbase.currentstatus,-1) = -1 or (isnull(workflow_requestbase.currentstatus,-1)=0 and workflow_requestbase.creater=" + user.getUID() + "))");
|
|
|
|
|
}
|
|
|
|
|
//我的收藏
|
|
|
|
|
boolean collReq = "1".equals(Util.null2String(params.get("collReq")));
|
|
|
|
|
if (collReq) {
|
|
|
|
|
sqlwhere.append(" and exists (select 1 from SysFavourite t1 where t1.favouriteobjid = workflow_requestbase.requestid and t1.favouritetype = 2 and t1.resourceid = " + user.getUID() + ") ");
|
|
|
|
|
}
|
|
|
|
|
//EM分享排查必须加密分享流程
|
|
|
|
|
int isFormEMShare = Util.getIntValue(Util.null2String(params.get("isFormEMShare")), -1);
|
|
|
|
|
if(isFormEMShare == 1){
|
|
|
|
|
String str1 = ServiceUtil.getDBJudgeNullFun(rs.getDBType())+"(workflow_base.isencryptshare, '0')";
|
|
|
|
|
String str2 = ServiceUtil.getDBJudgeNullFun(rs.getDBType())+"(workflow_base.encryptrange, '0')";
|
|
|
|
|
sqlwhere.append(" and (workflow_base.isencryptshare = '' or "+str1+"='0' or ("+str1+"='1' and "+str2+"='1'))");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String fromsql = "";
|
|
|
|
|
if ("1".equals(belongtoshow)) {
|
|
|
|
|
if (rs.getDBType().equals("oracle") || rs.getDBType().equals("db2")) {
|
|
|
|
|
fromsql = " from ("
|
|
|
|
|
+ " select distinct workflow_requestbase.requestid as id,requestnamenew,requestname,creater,creatertype,createdate,createtime from workflow_requestbase , workflow_currentoperator , workflow_base"
|
|
|
|
|
+ sqlwhere.toString() + " and workflow_currentoperator.requestid = workflow_requestbase.requestid and workflow_currentoperator.userid in (" + userid
|
|
|
|
|
+ ") and workflow_currentoperator.usertype=" + usertype
|
|
|
|
|
+ " and workflow_requestbase.workflowid = workflow_base.id and (workflow_base.isvalid='1' or workflow_base.isvalid='3') " + " ) t ";
|
|
|
|
|
} else if (rs.getDBType().equals("mysql")) {
|
|
|
|
|
fromsql = " from ("
|
|
|
|
|
+ " select distinct workflow_requestbase.requestid as id,requestnamenew,requestname,creater,creatertype,createdate,createtime from workflow_requestbase , workflow_currentoperator , workflow_base"
|
|
|
|
|
+ sqlwhere.toString() + " and workflow_currentoperator.requestid = workflow_requestbase.requestid and workflow_currentoperator.userid in (" + userid
|
|
|
|
|
+ ") and workflow_currentoperator.usertype=" + usertype
|
|
|
|
|
+ " and workflow_requestbase.workflowid = workflow_base.id and (workflow_base.isvalid='1' or workflow_base.isvalid='3') " + " ) t ";
|
|
|
|
|
}
|
|
|
|
|
else if (rs.getDBType().equals("postgresql")) {
|
|
|
|
|
fromsql = " from ("
|
|
|
|
|
+ " select distinct workflow_requestbase.requestid as id,requestnamenew,requestname,creater,creatertype,createdate,createtime from workflow_requestbase , workflow_currentoperator , workflow_base"
|
|
|
|
|
+ sqlwhere.toString() + " and workflow_currentoperator.requestid = workflow_requestbase.requestid and workflow_currentoperator.userid in (" + userid
|
|
|
|
|
+ ") and workflow_currentoperator.usertype=" + usertype
|
|
|
|
|
+ " and workflow_requestbase.workflowid = workflow_base.id and (workflow_base.isvalid='1' or workflow_base.isvalid='3') " + " ) t ";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
fromsql = " from ("
|
|
|
|
|
+ " select distinct workflow_requestbase.requestid as id,requestnamenew,requestname,creater,creatertype,createdate,createtime from workflow_requestbase , workflow_currentoperator , workflow_base"
|
|
|
|
|
+ sqlwhere.toString() + " and workflow_currentoperator.requestid = workflow_requestbase.requestid and workflow_currentoperator.userid in (" + userid
|
|
|
|
|
+ ") and workflow_currentoperator.usertype=" + usertype
|
|
|
|
|
+ " and workflow_requestbase.workflowid = workflow_base.id and (workflow_base.isvalid='1' or workflow_base.isvalid='3') " + " ) t ";
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (rs.getDBType().equals("oracle") || rs.getDBType().equals("db2")) {
|
|
|
|
|
fromsql = " from ("
|
|
|
|
|
+ " select distinct workflow_requestbase.requestid as id,requestnamenew,requestname,creater,creatertype,createdate,createtime from workflow_requestbase , workflow_currentoperator , workflow_base"
|
|
|
|
|
+ sqlwhere.toString() + " and workflow_currentoperator.requestid = workflow_requestbase.requestid and workflow_currentoperator.userid=" + userid
|
|
|
|
|
+ " and workflow_currentoperator.usertype=" + usertype
|
|
|
|
|
+ " and workflow_requestbase.workflowid = workflow_base.id and (workflow_base.isvalid='1' or workflow_base.isvalid='3') " + " ) t ";
|
|
|
|
|
} else if (rs.getDBType().equals("mysql")) {
|
|
|
|
|
fromsql = " from ("
|
|
|
|
|
+ " select distinct workflow_requestbase.requestid as id,requestnamenew,requestname,creater,creatertype,createdate,createtime from workflow_requestbase , workflow_currentoperator , workflow_base"
|
|
|
|
|
+ sqlwhere.toString() + " and workflow_currentoperator.requestid = workflow_requestbase.requestid and workflow_currentoperator.userid=" + userid
|
|
|
|
|
+ " and workflow_currentoperator.usertype=" + usertype
|
|
|
|
|
+ " and workflow_requestbase.workflowid = workflow_base.id and (workflow_base.isvalid='1' or workflow_base.isvalid='3') " + " ) t ";
|
|
|
|
|
}
|
|
|
|
|
else if (rs.getDBType().equals("postgresql")) {
|
|
|
|
|
fromsql = " from ("
|
|
|
|
|
+ " select distinct workflow_requestbase.requestid as id,requestnamenew,requestname,creater,creatertype,createdate,createtime from workflow_requestbase , workflow_currentoperator , workflow_base"
|
|
|
|
|
+ sqlwhere.toString() + " and workflow_currentoperator.requestid = workflow_requestbase.requestid and workflow_currentoperator.userid=" + userid
|
|
|
|
|
+ " and workflow_currentoperator.usertype=" + usertype
|
|
|
|
|
+ " and workflow_requestbase.workflowid = workflow_base.id and (workflow_base.isvalid='1' or workflow_base.isvalid='3') " + " ) t ";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
fromsql = " from ("
|
|
|
|
|
+ " select distinct workflow_requestbase.requestid as id,requestnamenew,requestname,creater,creatertype,createdate,createtime from workflow_requestbase , workflow_currentoperator , workflow_base"
|
|
|
|
|
+ sqlwhere.toString() + " and workflow_currentoperator.requestid = workflow_requestbase.requestid and workflow_currentoperator.userid=" + userid
|
|
|
|
|
+ " and workflow_currentoperator.usertype=" + usertype
|
|
|
|
|
+ " and workflow_requestbase.workflowid = workflow_base.id and (workflow_base.isvalid='1' or workflow_base.isvalid='3') " + " ) t ";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return fromsql;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void eSearchParamsTrans(Map<String, Object> params) {
|
|
|
|
|
/*String userID = String.valueOf(user.getUID());
|
|
|
|
|
HrmUserSettingComInfo settingComInfo = new HrmUserSettingComInfo();
|
|
|
|
|
String belongtoshow = settingComInfo.getBelongtoshow(userID+"");
|
|
|
|
|
|
|
|
|
|
if ("1".equals(belongtoshow)) {//开启主次账号显示,微搜也加上主次账号搜索的参数
|
|
|
|
|
params.put("belongtoShow","1");
|
|
|
|
|
}*/
|
|
|
|
|
//浏览按钮不处理主次账号统一显示,会导致两条没有操作者交集的流程关联在一起,出现无权限
|
|
|
|
|
|
|
|
|
|
if(params.containsKey(SEC_LEVEL)) {
|
|
|
|
|
String value = Util.null2String(params.get(SEC_LEVEL));
|
|
|
|
|
params.put(SEC_LEVEL, new RequestSecLevelBiz().getFullSecLevel(Util.getIntValue(value)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|