1166 lines
63 KiB
Java
1166 lines
63 KiB
Java
|
|
package com.engine.organization.service.impl;
|
|||
|
|
|
|||
|
|
import com.alibaba.fastjson.JSONArray;
|
|||
|
|
import com.alibaba.fastjson.JSONObject;
|
|||
|
|
import com.cloudstore.dev.api.util.TextUtil;
|
|||
|
|
import com.engine.core.impl.Service;
|
|||
|
|
import com.engine.organization.entity.search.QuickSearchSetting;
|
|||
|
|
import com.engine.organization.mapper.condition.QuickSearchMapper;
|
|||
|
|
import com.engine.organization.mapper.post.PostMapper;
|
|||
|
|
import com.engine.organization.service.QuickSearchService;
|
|||
|
|
import com.engine.organization.util.db.MapperProxyFactory;
|
|||
|
|
import org.apache.commons.lang.StringUtils;
|
|||
|
|
import weaver.conn.RecordSet;
|
|||
|
|
import weaver.conn.RecordSetTrans;
|
|||
|
|
import weaver.formmode.exttools.impexp.common.DateUtils;
|
|||
|
|
import weaver.general.BaseBean;
|
|||
|
|
import weaver.general.Util;
|
|||
|
|
import weaver.hrm.User;
|
|||
|
|
import weaver.hrm.resource.ResourceComInfo;
|
|||
|
|
import weaver.systeminfo.SystemEnv;
|
|||
|
|
|
|||
|
|
import java.util.ArrayList;
|
|||
|
|
import java.util.HashMap;
|
|||
|
|
import java.util.List;
|
|||
|
|
import java.util.Map;
|
|||
|
|
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @author:dxfeng
|
|||
|
|
* @createTime: 2023/08/08
|
|||
|
|
* @version: 1.0
|
|||
|
|
*/
|
|||
|
|
public class QuickSearchServiceImpl extends Service implements QuickSearchService {
|
|||
|
|
private QuickSearchMapper getQuickSearchMapper() {
|
|||
|
|
return MapperProxyFactory.getProxy(QuickSearchMapper.class);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
@Override
|
|||
|
|
public Map<String, Object> saveQuickSearchCondition(Map<String, Object> params) {
|
|||
|
|
return null;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@Override
|
|||
|
|
public Map<String, Object> getQuickSearchInfo(Map<String, Object> params) {
|
|||
|
|
Map<String, Object> apiDatas = new HashMap<>(16);
|
|||
|
|
RecordSet rs = new RecordSet();
|
|||
|
|
//开关查询
|
|||
|
|
String sql = "select id,isquicksearch,isshowtype,ishidename from jcl_quicksearch_setting where belongto=?";
|
|||
|
|
rs.executeQuery(sql, user.getUID());
|
|||
|
|
JSONObject json = new JSONObject();
|
|||
|
|
if (rs.next()) {
|
|||
|
|
json.put("isquicksearch", Util.null2String(rs.getString("isquicksearch")));
|
|||
|
|
json.put("isshowtype", Util.null2s(rs.getString("isshowtype"), "1"));
|
|||
|
|
json.put("ishidename", Util.null2o(rs.getString("ishidename")));
|
|||
|
|
json.put("id", Util.null2String(rs.getString("id")));
|
|||
|
|
} else {
|
|||
|
|
json.put("isquicksearch", "0");
|
|||
|
|
json.put("isshowtype", "0");
|
|||
|
|
json.put("ishidename", "0");
|
|||
|
|
json.put("id", "0");
|
|||
|
|
}
|
|||
|
|
apiDatas.put("setting", json);
|
|||
|
|
|
|||
|
|
//条件字段查询
|
|||
|
|
sql = " select c.id, fieldid, c.customname, c.type typeTemp, c.orderid, c.showmodel from jcl_quicksearch_condition c where belongto = ? order by c.orderid asc, c.id asc";
|
|||
|
|
rs.executeQuery(sql, user.getUID());
|
|||
|
|
JSONArray datas = new JSONArray();
|
|||
|
|
while (rs.next()) {
|
|||
|
|
JSONObject obj = new JSONObject();
|
|||
|
|
String id = Util.null2String(rs.getString("id"));
|
|||
|
|
String fieldid = Util.null2String(rs.getString("fieldid"));
|
|||
|
|
String customname = Util.null2String(rs.getString("customname"));
|
|||
|
|
String type = Util.null2String(rs.getString("typeTemp"));
|
|||
|
|
String orderid = Util.null2String(rs.getString("orderid"));
|
|||
|
|
String showmodel = Util.null2o(rs.getString("showmodel"));
|
|||
|
|
obj.put("cid", id);
|
|||
|
|
obj.put("key", id);
|
|||
|
|
obj.put("fieldid", fieldid);
|
|||
|
|
obj.put("orifieldid", fieldid);
|
|||
|
|
obj.put("customname", TextUtil.toBase64ForMultilang(customname));
|
|||
|
|
obj.put("type", type);
|
|||
|
|
obj.put("orderid", orderid);
|
|||
|
|
obj.put("groupid", "");
|
|||
|
|
obj.put("showmodel", showmodel);
|
|||
|
|
datas.add(obj);
|
|||
|
|
}
|
|||
|
|
apiDatas.put("datas", datas);
|
|||
|
|
|
|||
|
|
//字段下拉框查询
|
|||
|
|
sql = "select b.fieldid,b.fieldlabel,b.fieldname,fieldhtmltype,b.type typeTemp from hrm_formfield b inner join hrm_fieldgroup c on c.id=b.GROUPID and c.GROUPTYPE in(-1,1,3)";
|
|||
|
|
rs.executeQuery(sql);
|
|||
|
|
JSONArray options = new JSONArray();
|
|||
|
|
while (rs.next()) {
|
|||
|
|
JSONObject obj = new JSONObject();
|
|||
|
|
String fieldhtmltype = Util.null2String(rs.getString("fieldhtmltype"));
|
|||
|
|
String fieldid = Util.null2String(rs.getString("fieldid"));
|
|||
|
|
String fieldname = Util.null2String(rs.getString("fieldname"));
|
|||
|
|
|
|||
|
|
|
|||
|
|
String type = Util.null2String(rs.getString("typeTemp"));
|
|||
|
|
int fieldlabel = Util.getIntValue(rs.getString("fieldlabel"), 0);
|
|||
|
|
String labelname = SystemEnv.getHtmlLabelName(Util.getIntValue(rs.getString("fieldlabel")), user.getLanguage());
|
|||
|
|
String fieldtype = "2";
|
|||
|
|
boolean isShowModel = false;
|
|||
|
|
if ("1".equals(fieldhtmltype)) {
|
|||
|
|
if ("1".equals(type)) {
|
|||
|
|
//单行文本
|
|||
|
|
fieldtype = "5";
|
|||
|
|
} else {
|
|||
|
|
//整数或浮点数
|
|||
|
|
fieldtype = "1";
|
|||
|
|
isShowModel = true;
|
|||
|
|
}
|
|||
|
|
} else if ("2".equals(fieldhtmltype) && "1".equals(type)) {
|
|||
|
|
//多行文本
|
|||
|
|
fieldtype = "5";
|
|||
|
|
} else if ("2".equals(fieldhtmltype) && "2".equals(type)) {
|
|||
|
|
//多行文本html
|
|||
|
|
fieldtype = "5";
|
|||
|
|
} else if ("5".equals(fieldhtmltype) && "3".equals(type)) {
|
|||
|
|
//选择框单选框
|
|||
|
|
fieldtype = "5";
|
|||
|
|
isShowModel = true;
|
|||
|
|
} else if ("5".equals(fieldhtmltype) && "2".equals(type)) {
|
|||
|
|
//选择框多选框
|
|||
|
|
fieldtype = "5";
|
|||
|
|
isShowModel = true;
|
|||
|
|
} else if ("5".equals(fieldhtmltype) && "1".equals(type)) {
|
|||
|
|
//选择框
|
|||
|
|
fieldtype = "5";
|
|||
|
|
isShowModel = true;
|
|||
|
|
} else if ("4".equals(fieldhtmltype) && "1".equals(type)) {
|
|||
|
|
//check框
|
|||
|
|
fieldtype = "5";
|
|||
|
|
isShowModel = true;
|
|||
|
|
} else if ("3".equals(fieldhtmltype)) {
|
|||
|
|
if ("2".equals(type)) {
|
|||
|
|
//日期
|
|||
|
|
fieldtype = "3";
|
|||
|
|
} else if ("1".equals(type)) {
|
|||
|
|
//人力资源 1已被占用,重新换一个
|
|||
|
|
fieldtype = "-1";
|
|||
|
|
} else if ("3".equals(type)) {
|
|||
|
|
//会议室联系单 3已被占用,重新换一个
|
|||
|
|
fieldtype = "-3";
|
|||
|
|
} else if ("5".equals(type)) {
|
|||
|
|
//仓库5已被占用,重新换一个
|
|||
|
|
fieldtype = "-5";
|
|||
|
|
} else {
|
|||
|
|
fieldtype = type;
|
|||
|
|
}
|
|||
|
|
} else {
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if ("".equals(labelname)) {
|
|||
|
|
labelname = SystemEnv.getHtmlLabelName(fieldlabel, user.getLanguage());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
obj.put("key", fieldid);
|
|||
|
|
obj.put("fieldid", fieldid);
|
|||
|
|
obj.put("showname", labelname);
|
|||
|
|
obj.put("isdetailtable", "0");
|
|||
|
|
obj.put("type", fieldtype);
|
|||
|
|
obj.put("isShowModel", isShowModel);
|
|||
|
|
options.add(obj);
|
|||
|
|
}
|
|||
|
|
apiDatas.put("options", options);
|
|||
|
|
JSONArray groupidOptions = new JSONArray();
|
|||
|
|
apiDatas.put("groupidOptions", groupidOptions);
|
|||
|
|
return apiDatas;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@Override
|
|||
|
|
public Map<String, Object> saveQuickSearchInfo(Map<String, Object> params) {
|
|||
|
|
Map<String, Object> apidatas = new HashMap<>();
|
|||
|
|
RecordSet rs = new RecordSet();
|
|||
|
|
String isquicksearch = Util.null2String(params.get("isquicksearch"));
|
|||
|
|
String isshowtype = Util.null2String(params.get("isshowtype"));
|
|||
|
|
String ishidename = Util.null2String(params.get("ishidename"));
|
|||
|
|
String _id = Util.null2String(params.get("id"));
|
|||
|
|
String _data = Util.null2String(params.get("data"));
|
|||
|
|
JSONArray datas = JSONArray.parseArray(_data);
|
|||
|
|
String sql = "";
|
|||
|
|
//配置信息更新
|
|||
|
|
if ("0".equals(_id) || "".equals(_id)) {
|
|||
|
|
//第一次修改配置
|
|||
|
|
sql = "insert into jcl_quicksearch_setting(belongto,isquicksearch,isshowtype,ishidename,updatetor,updatedate,updatetime) values(?,?,?,?,?,?,?)";
|
|||
|
|
rs.executeUpdate(sql, user.getUID(), isquicksearch, isshowtype, ishidename, user.getUID(), DateUtils.getCurrentDate(), DateUtils.getCurrentTime());
|
|||
|
|
} else {
|
|||
|
|
sql = "update jcl_quicksearch_setting set isquicksearch=?,isshowtype=?,ishidename=? where id=?";
|
|||
|
|
rs.executeUpdate(sql, isquicksearch, isshowtype, ishidename, _id);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
sql = "select id from jcl_quicksearch_condition where belongto=? ";
|
|||
|
|
rs.executeQuery(sql, user.getUID());
|
|||
|
|
List<String> list = new ArrayList<>();
|
|||
|
|
while (rs.next()) {
|
|||
|
|
list.add(rs.getString("id"));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
for (int i = 0; i < datas.size(); i++) {
|
|||
|
|
JSONObject obj = (JSONObject) datas.get(i);
|
|||
|
|
String fieldid = obj.getString("fieldid");
|
|||
|
|
String orifieldid = obj.getString("orifieldid");
|
|||
|
|
int cid = Util.getIntValue(obj.getString("cid"));
|
|||
|
|
String customname = obj.getString("customname");
|
|||
|
|
String type = obj.getString("type");
|
|||
|
|
String orderid = obj.getString("orderid");
|
|||
|
|
String showmodel = obj.getString("showmodel");
|
|||
|
|
String id = "";
|
|||
|
|
if (cid > 0) {
|
|||
|
|
list.remove(cid + "");
|
|||
|
|
sql = "update jcl_quicksearch_condition set belongto=?,fieldid=?,customname=?,type=?,orderid=?,showmodel=? where id=" + cid;
|
|||
|
|
rs.executeUpdate(sql, user.getUID(), fieldid, customname, type, orderid, showmodel);
|
|||
|
|
id = cid + "";
|
|||
|
|
if (!fieldid.equals(orifieldid)) {
|
|||
|
|
//改变了字段,将原先字段的明细删除
|
|||
|
|
sql = "delete from jcl_quicksearch_detail where cid=?";
|
|||
|
|
rs.executeUpdate(sql, id);
|
|||
|
|
}
|
|||
|
|
} else {
|
|||
|
|
sql = "insert into jcl_quicksearch_condition(belongto,fieldid,customname,type,orderid,showmodel) values(?,?,?,?,?,?)";
|
|||
|
|
rs.executeUpdate(sql, user.getUID(), fieldid, customname, type, orderid, showmodel);
|
|||
|
|
sql = "select max(id) id from jcl_quicksearch_condition where belongto=?";
|
|||
|
|
rs.executeQuery(sql, user.getUID());
|
|||
|
|
if (rs.next()) {
|
|||
|
|
id = Util.null2String(rs.getString("id"));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (list.size() > 0) {
|
|||
|
|
String ids = StringUtils.join(list.toArray(), ",");
|
|||
|
|
rs.executeUpdate("delete from jcl_quicksearch_condition where id in (" + ids + ")");
|
|||
|
|
sql = "delete from jcl_quicksearch_detail where cid in (" + ids + ")";
|
|||
|
|
rs.executeUpdate(sql);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
return apidatas;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@Override
|
|||
|
|
public Map<String, Object> getQuickSearchDetailInfo(Map<String, Object> params) {
|
|||
|
|
Map<String, Object> apidatas = new HashMap<>(16);
|
|||
|
|
String cid = weaver.formmode.exttools.impexp.common.StringUtils.null2String(params.get("cid"));
|
|||
|
|
RecordSet rs = new RecordSet();
|
|||
|
|
//开关查询
|
|||
|
|
String sql = "select id,customname,minnum,maxnum,type typeTemp,orderid,fieldid,belongto from jcl_quicksearch_detail where cid=? order by orderid asc,id asc";
|
|||
|
|
rs.executeQuery(sql, cid);
|
|||
|
|
JSONArray datas = new JSONArray();
|
|||
|
|
while (rs.next()) {
|
|||
|
|
JSONObject obj = new JSONObject();
|
|||
|
|
String id = Util.null2String(rs.getString("id"));
|
|||
|
|
String customname = Util.null2String(rs.getString("customname"));
|
|||
|
|
String minnum = Util.null2String(rs.getString("minnum"));
|
|||
|
|
minnum = minnum.startsWith("0E") ? "0" : minnum;
|
|||
|
|
String maxnum = Util.null2String(rs.getString("maxnum"));
|
|||
|
|
maxnum = maxnum.startsWith("0E") ? "0" : maxnum;
|
|||
|
|
String type = Util.null2String(rs.getString("typeTemp"));
|
|||
|
|
String orderid = Util.null2String(rs.getString("orderid"));
|
|||
|
|
String fieldid = Util.null2String(rs.getString("fieldid"));
|
|||
|
|
String belongto = Util.null2String(rs.getString("belongto"));
|
|||
|
|
obj.put("id", id);
|
|||
|
|
obj.put("cid", cid);
|
|||
|
|
obj.put("key", id);
|
|||
|
|
obj.put("customname", customname);
|
|||
|
|
obj.put("minnum", minnum);
|
|||
|
|
obj.put("maxnum", maxnum);
|
|||
|
|
obj.put("type", type);
|
|||
|
|
obj.put("fieldid", fieldid);
|
|||
|
|
obj.put("belongto", belongto);
|
|||
|
|
obj.put("orderid", orderid);
|
|||
|
|
datas.add(obj);
|
|||
|
|
}
|
|||
|
|
sql = "select b.fieldhtmltype,b.type typeTemp,b.fielddbtype from jcl_quicksearch_condition c left join hrm_formfield b on b.fieldid =c.fieldid where c.id= ? ";
|
|||
|
|
rs.executeQuery(sql, cid);
|
|||
|
|
int precision = 0;
|
|||
|
|
while (rs.next()) {
|
|||
|
|
String fieldhtmltype = rs.getString("fieldhtmltype");
|
|||
|
|
String type = rs.getString("typeTemp");
|
|||
|
|
String dbtype = rs.getString("fielddbtype");
|
|||
|
|
if ("1".equals(fieldhtmltype) && !"1".equals(type)) {
|
|||
|
|
int digitsIndex = dbtype.indexOf(",");
|
|||
|
|
precision = Util.getIntValue(dbtype.substring(digitsIndex + 1, dbtype.length() - 1), 0);
|
|||
|
|
}
|
|||
|
|
if ("1".equals(fieldhtmltype) && "5".equals(type)) {
|
|||
|
|
//precision = Util.getIntValue(rs.getString("qfws"),2);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
apidatas.put("datas", datas);
|
|||
|
|
apidatas.put("precision", precision);
|
|||
|
|
return apidatas;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@Override
|
|||
|
|
public Map<String, Object> saveQuickSearchDetailInfo(Map<String, Object> params) {
|
|||
|
|
Map<String, Object> apidatas = new HashMap<>(16);
|
|||
|
|
RecordSet rs = new RecordSet();
|
|||
|
|
String cid = Util.null2String(params.get("cid"));
|
|||
|
|
String _data = Util.null2String(params.get("data"));
|
|||
|
|
JSONArray datas = JSONArray.parseArray(_data);
|
|||
|
|
String sql = "";
|
|||
|
|
//条件字段更新
|
|||
|
|
RecordSetTrans rst = new RecordSetTrans();
|
|||
|
|
sql = "select id from jcl_quicksearch_detail where cid=? ";
|
|||
|
|
rs.executeQuery(sql, cid);
|
|||
|
|
List<String> list = new ArrayList<>();
|
|||
|
|
while (rs.next()) {
|
|||
|
|
list.add(rs.getString("id"));
|
|||
|
|
}
|
|||
|
|
try {
|
|||
|
|
for (Object object : datas) {
|
|||
|
|
JSONObject obj = (JSONObject) object;
|
|||
|
|
String customname = obj.getString("customname");
|
|||
|
|
String fieldid = obj.getString("fieldid");
|
|||
|
|
String minnum = obj.getString("minnum");
|
|||
|
|
minnum = "".equals(minnum) ? null : minnum;
|
|||
|
|
String maxnum = obj.getString("maxnum");
|
|||
|
|
maxnum = "".equals(maxnum) ? null : maxnum;
|
|||
|
|
String type = obj.getString("type");
|
|||
|
|
String orderid = obj.getString("orderid");
|
|||
|
|
int id = Util.getIntValue(obj.getString("id"));
|
|||
|
|
if (id > 0) {
|
|||
|
|
list.remove(id + "");
|
|||
|
|
sql = "update jcl_quicksearch_detail set cid=?,customname=?,minnum=?,maxnum=?,type=?,orderid=?,fieldid=?,belongto=? where id=?";
|
|||
|
|
rst.executeUpdate(sql, cid, customname, minnum, maxnum, type, orderid, fieldid, user.getUID(), id);
|
|||
|
|
} else {
|
|||
|
|
sql = "insert into jcl_quicksearch_detail(cid,customname,minnum,maxnum,type,orderid,fieldid,belongto) values(?,?,?,?,?,?,?,?)";
|
|||
|
|
rst.executeUpdate(sql, cid, customname, minnum, maxnum, type, orderid, fieldid, user.getUID());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
rst.commit();
|
|||
|
|
if (list.size() > 0) {
|
|||
|
|
String ids = StringUtils.join(list.toArray(), ",");
|
|||
|
|
rs.executeUpdate("delete from jcl_quicksearch_detail where id in (" + ids + ")");
|
|||
|
|
}
|
|||
|
|
} catch (Exception e) {
|
|||
|
|
rst.rollback();
|
|||
|
|
new BaseBean().writeLog(e);
|
|||
|
|
e.printStackTrace();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return apidatas;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
// public JSONArray GetQuickSearchInfo(String customid, User user, HttpServletRequest request) {
|
|||
|
|
// JSONArray datas = new JSONArray();
|
|||
|
|
// RecordSet rs = new RecordSet();
|
|||
|
|
// RecordSet rs1 = new RecordSet();
|
|||
|
|
// String ss = request.getQueryString();
|
|||
|
|
// CustomSearchComInfo customSearchComInfo = new CustomSearchComInfo();
|
|||
|
|
// String defSql = Util.toScreenToEdit(customSearchComInfo.getDefaultSql(customid), user.getLanguage()) ;
|
|||
|
|
//
|
|||
|
|
// Map<String, List<JSONObject>> groupMap=new HashMap<String,List<JSONObject>>();
|
|||
|
|
//
|
|||
|
|
// // 表单字段
|
|||
|
|
// String sql = "SELECT ID,fieldid,customname,fieldhtmltype,typeTemp,fielddbtype,fieldname,orderid,groupid,showmodel FROM (";
|
|||
|
|
// sql += "select quick.ID,bill.id fieldid,quick.customname,bill.fieldhtmltype,bill.type typeTemp,bill.fielddbtype,fieldname,orderid,groupid,showmodel from mode_quicksearch_condition quick left join workflow_billfield bill on bill.id=quick.fieldid where customid=? AND quick.fieldid NOT IN(-1,-2) ";
|
|||
|
|
//
|
|||
|
|
// List args = new ArrayList();
|
|||
|
|
// args.add(customid);
|
|||
|
|
// ModeFormComInfo modeFormComInfo = new ModeFormComInfo();
|
|||
|
|
// String formId = customSearchComInfo.getFormId(customid);
|
|||
|
|
// boolean isVirtualForm = "1".equals(modeFormComInfo.getIsVirtualForm(formId));
|
|||
|
|
// if(!isVirtualForm) {
|
|||
|
|
// // 加入创建日期
|
|||
|
|
// sql += "UNION ALL ";
|
|||
|
|
// sql += "SELECT id,1 fieldid,customname,'3' fieldhtmltype,2 typeTemp, 'char(10)' fielddbtype,'modedatacreatedate' fieldname,orderid,groupid,showmodel ";
|
|||
|
|
// sql += "FROM mode_quicksearch_condition WHERE customid=? AND fieldid =-1 ";
|
|||
|
|
//
|
|||
|
|
// // 加入创建人
|
|||
|
|
// sql += "UNION ALL ";
|
|||
|
|
// //sql += "SELECT id,2 fieldid,customname,'3' fieldhtmltype,1 TYPE, 'int' fielddbtype,'modedatacreater' fieldname,orderid ";
|
|||
|
|
// sql += "SELECT id,2 fieldid,customname,'3' fieldhtmltype,1 typeTemp, 'int' fielddbtype,'modedatacreater' fieldname,orderid,groupid,showmodel ";
|
|||
|
|
// sql += "FROM mode_quicksearch_condition WHERE customid=? AND fieldid =-2 ";
|
|||
|
|
//
|
|||
|
|
// //添加最后修改人
|
|||
|
|
// sql += "UNION ALL ";
|
|||
|
|
// sql += "SELECT id,7 fieldid,customname,'3' fieldhtmltype,1 typeTemp, 'int' fielddbtype,'modedatacreater' fieldname,orderid,groupid,showmodel ";
|
|||
|
|
// sql += "FROM mode_quicksearch_condition WHERE customid=? AND fieldid =-7 ";
|
|||
|
|
//
|
|||
|
|
// //添加最后修改日期时间
|
|||
|
|
// sql += "UNION ALL ";
|
|||
|
|
// sql += "SELECT id,8 fieldid,customname,'3' fieldhtmltype,290 typeTemp, 'char(10)' fielddbtype,'modedatacreatedate' fieldname,orderid,groupid,showmodel ";
|
|||
|
|
// sql += "FROM mode_quicksearch_condition WHERE customid=? AND fieldid =-8 ";
|
|||
|
|
//
|
|||
|
|
// //添加密级字段int
|
|||
|
|
// sql += "UNION ALL ";
|
|||
|
|
// sql += "SELECT id,9 fieldid,customname,'5' fieldhtmltype,2 typeTemp, 'int' fielddbtype,'seclevel' fieldname,orderid,groupid,showmodel ";
|
|||
|
|
// sql += "FROM mode_quicksearch_condition WHERE customid=? AND fieldid =-9 ";
|
|||
|
|
//
|
|||
|
|
// args.add(customid);
|
|||
|
|
// args.add(customid);
|
|||
|
|
// args.add(customid);
|
|||
|
|
// args.add(customid);
|
|||
|
|
// args.add(customid);
|
|||
|
|
// }
|
|||
|
|
//
|
|||
|
|
// // 按照字段排序
|
|||
|
|
// sql += ") a order by groupid asc,orderid asc,id asc";
|
|||
|
|
//
|
|||
|
|
// rs.executeQuery(sql, args);
|
|||
|
|
// while (rs.next()) {
|
|||
|
|
// int viewAttr = 2;
|
|||
|
|
// JSONObject json = new JSONObject();
|
|||
|
|
// String fieldhtmltype = Util.null2String(rs.getString("fieldhtmltype"));
|
|||
|
|
// String fieldtype = Util.null2String(rs.getString("typeTemp"));
|
|||
|
|
// String id = Util.null2String(rs.getString("id"));
|
|||
|
|
// String fieldnames = Util.null2String(rs.getString("fieldname"));
|
|||
|
|
// String fieldid = Util.null2String(rs.getString("fieldid"));
|
|||
|
|
// String groupid = Util.null2String(rs.getString("groupid"));
|
|||
|
|
// float orderid = Util.getFloatValue(Util.null2String(rs.getString("orderid")),0);
|
|||
|
|
// String showmodel = Util.null2String(rs.getString("showmodel"));
|
|||
|
|
// String querysql = "select t.* from mode_CustomDspField t where t.customid=? and t.fieldid=?";
|
|||
|
|
// String conditiontransition = "";
|
|||
|
|
// String searchparavalue = "";
|
|||
|
|
// String searchparavalue1 = "";
|
|||
|
|
// String conditionValue = "";
|
|||
|
|
// String conditionValue1 = "";
|
|||
|
|
// String conditionValue2 = "";
|
|||
|
|
// String fieldname_seclevel = Util.null2String(rs.getString("fieldname"));//用于验证是否是密级字段;
|
|||
|
|
// String showtype = Util.null2o(rs.getString("showtype"));//显示模式主要 针对浏览框 0:浏览框模式 1:下拉拉框模式
|
|||
|
|
// rs1.executeQuery(querysql, customid, "1".equals(fieldid)?"-1":"2".equals(fieldid)?"-2":"7".equals(fieldid)?"-7":"8".equals(fieldid)?"-8":fieldid);
|
|||
|
|
// int count = 0;
|
|||
|
|
// String requiredCon = "";
|
|||
|
|
// if(rs1.next()){
|
|||
|
|
// count ++;
|
|||
|
|
// conditiontransition = Util.null2String(rs1.getString("conditiontransition"));
|
|||
|
|
// requiredCon = Util.null2String(rs1.getString("requiredCon"));
|
|||
|
|
// if("1".equals(requiredCon)){
|
|||
|
|
// viewAttr = 3;
|
|||
|
|
// }
|
|||
|
|
// conditionValue = Util.null2String(rs1.getString("conditionValue"));
|
|||
|
|
// conditionValue1 = Util.null2String(rs1.getString("conditionValue1"));
|
|||
|
|
// conditionValue2 = Util.null2String(rs1.getString("conditionValue2"));
|
|||
|
|
// String searchparaname = Util.null2String(rs1.getString("searchparaname"));
|
|||
|
|
// String searchparaname1 = Util.null2String(rs1.getString("searchparaname1"));
|
|||
|
|
// if(!StringHelper.isEmpty(searchparaname)) {
|
|||
|
|
// searchparavalue = replaceParams(Util.null2String(request.getParameter(searchparaname)), user);
|
|||
|
|
// }
|
|||
|
|
//
|
|||
|
|
// if(!StringHelper.isEmpty(searchparaname1)) {
|
|||
|
|
// searchparavalue1 = replaceParams(Util.null2String(request.getParameter(searchparaname1)), user);
|
|||
|
|
// }
|
|||
|
|
// if("".equals(searchparavalue)){
|
|||
|
|
// if("3".equals(fieldhtmltype)&&"1".equals(fieldtype)){ //人力资源
|
|||
|
|
// if(!"".equals(conditionValue1)&&!"null".equals(conditionValue1)){
|
|||
|
|
// searchparavalue = conditionValue1;
|
|||
|
|
// }else if(conditiontransition.equalsIgnoreCase("1") && "".equals(conditionValue1)&&!"-5".equals(conditionValue)){
|
|||
|
|
// searchparavalue = conditionValue;
|
|||
|
|
// }else{
|
|||
|
|
// searchparavalue = conditionValue;
|
|||
|
|
// }
|
|||
|
|
// }else if ("3".equals(fieldhtmltype)&&("2".equals(fieldtype)||"19".equals(fieldtype)||"290".equals(fieldtype))){
|
|||
|
|
// if("3".equals(fieldhtmltype)&&"19".equals(fieldtype)){ //时间
|
|||
|
|
// if("".equals(conditionValue)&&"".equals(conditionValue1)){
|
|||
|
|
// searchparavalue = searchparavalue;
|
|||
|
|
// }else{
|
|||
|
|
// searchparavalue = conditionValue+","+conditionValue1;
|
|||
|
|
// }
|
|||
|
|
// }else if("3".equals(fieldhtmltype)&&"2".equals(fieldtype)){ //日期
|
|||
|
|
// if("".equals(conditionValue)&&"".equals(conditionValue1)){
|
|||
|
|
// searchparavalue = searchparavalue;
|
|||
|
|
// }else{
|
|||
|
|
// searchparavalue = conditionValue+","+conditionValue1;
|
|||
|
|
// }
|
|||
|
|
// }else if(!"".equals(conditionValue1)&&!"null".equals(conditionValue1)){
|
|||
|
|
// if(!"".equals(conditionValue1)&&!"null".equals(conditionValue1)){
|
|||
|
|
// searchparavalue = conditionValue1+","+conditionValue2; //处理时间,日期回显
|
|||
|
|
//// searchparavalue1 = conditionValue1;
|
|||
|
|
// }else{
|
|||
|
|
// searchparavalue = conditionValue;
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// }else{
|
|||
|
|
// String acValue = conditionValue;
|
|||
|
|
// if(!"".equals(conditionValue1)&&!"null".equals(conditionValue1)){
|
|||
|
|
// if(!"".equals(conditionValue2)&&!"null".equals(conditionValue2)){
|
|||
|
|
// conditionValue = conditionValue+","+conditionValue1+","+conditionValue2;
|
|||
|
|
// }else{
|
|||
|
|
// conditionValue = conditionValue+","+conditionValue1;
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// if(!"".equals(conditionValue)){
|
|||
|
|
// searchparavalue = conditionValue;
|
|||
|
|
// }
|
|||
|
|
// if("1".equals(fieldhtmltype)&&!"1".equals(fieldtype)){
|
|||
|
|
// searchparavalue = acValue;
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// if(conditiontransition.equalsIgnoreCase("1") && fieldhtmltype.equals("3")){
|
|||
|
|
// fieldtype = convertSingleBrowserTypeToMulti_All(fieldtype);
|
|||
|
|
// }
|
|||
|
|
// String fielddbtype = Util.null2String(rs.getString("fielddbtype"));
|
|||
|
|
// if ("".equals(fieldid)) {
|
|||
|
|
// continue;
|
|||
|
|
// }
|
|||
|
|
//
|
|||
|
|
// String fieldname = "con_"+ (Util.getIntValue(fieldid) > 0 ? fieldid : "_"+(-Util.getIntValue(fieldid)));
|
|||
|
|
// if(StringHelper.isEmpty(searchparavalue)&&StringHelper.isEmpty(searchparavalue1)){//con_fielid格式作为查询条件,解析到查询条件上
|
|||
|
|
// searchparavalue=Util.null2String(request.getParameter(fieldname));
|
|||
|
|
// }
|
|||
|
|
//
|
|||
|
|
//
|
|||
|
|
// String customname = Util.null2String(rs.getString("customname"));
|
|||
|
|
// customname=Util.formatMultiLang(customname, user.getLanguage()+"");
|
|||
|
|
// if ("1".equals(fieldhtmltype)) {
|
|||
|
|
// if ("1".equals(fieldtype)) {//单行文本
|
|||
|
|
// if(!searchparavalue.isEmpty()) {
|
|||
|
|
// json.put("value", searchparavalue);
|
|||
|
|
// }
|
|||
|
|
// }else {//整数或浮点数
|
|||
|
|
// sql ="select id,customname,minnum,maxnum from mode_quicksearch_detail where cid=? order by orderid asc,id asc";
|
|||
|
|
// rs1.executeQuery(sql, id);
|
|||
|
|
// JSONArray arr = new JSONArray();
|
|||
|
|
// JSONObject obj1 = new JSONObject();
|
|||
|
|
// if("1".equals(requiredCon)){
|
|||
|
|
// obj1.put("key", "");
|
|||
|
|
// }else{
|
|||
|
|
// obj1.put("key", "-1");
|
|||
|
|
// }
|
|||
|
|
// obj1.put("showname", "");
|
|||
|
|
// arr.add(obj1);
|
|||
|
|
// boolean flg = false;
|
|||
|
|
// Map<String,String> map = new HashMap<String,String>();
|
|||
|
|
// while (rs1.next()) {
|
|||
|
|
// String minnum = Util.null2String(rs1.getString("minnum"));
|
|||
|
|
// String maxnum = Util.null2String(rs1.getString("maxnum"));
|
|||
|
|
// String fieldValue = minnum+","+maxnum;
|
|||
|
|
// map.put(rs1.getString("id"),fieldValue);
|
|||
|
|
// boolean flgs = false;
|
|||
|
|
// if (!"".equals(minnum) && !searchparavalue.isEmpty()) {
|
|||
|
|
// float num = Util.getFloatValue(minnum);
|
|||
|
|
// float num2 = Util.getFloatValue(maxnum);
|
|||
|
|
// if(Util.getFloatValue(searchparavalue)==Util.getFloatValue("0")){
|
|||
|
|
// if(num<=Util.getFloatValue(searchparavalue) && num2>=Util.getFloatValue(searchparavalue) && !flg){
|
|||
|
|
// flg = true;
|
|||
|
|
// flgs = true;
|
|||
|
|
// //json.put("value", rs1.getString("id"));
|
|||
|
|
// }
|
|||
|
|
// }else{
|
|||
|
|
// if(num<=Util.getFloatValue(searchparavalue) && num2>=Util.getFloatValue(searchparavalue) && !flg){
|
|||
|
|
// flg = true;
|
|||
|
|
// flgs = true;
|
|||
|
|
// //json.put("value", rs1.getString("id"));
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// JSONObject obj2 = new JSONObject();
|
|||
|
|
// obj2.put("key",rs1.getString("id"));
|
|||
|
|
// obj2.put("selected",flgs);
|
|||
|
|
// obj2.put("showname", Util.formatMultiLang(rs1.getString("customname"), user.getLanguage()+""));
|
|||
|
|
// arr.add(obj2);
|
|||
|
|
// }
|
|||
|
|
// json.put("floatValue",map);
|
|||
|
|
// json.put("options", arr);
|
|||
|
|
// }
|
|||
|
|
// } else if ("2".equals(fieldhtmltype)) {//多文本
|
|||
|
|
// if(!searchparavalue.isEmpty()) {
|
|||
|
|
// json.put("value", searchparavalue);
|
|||
|
|
// }
|
|||
|
|
// }else if ("5".equals(fieldhtmltype) && "1".equals(fieldtype)) {//选择框
|
|||
|
|
// RecordSet record = new RecordSet();
|
|||
|
|
// StringBuffer sql1 = new StringBuffer();
|
|||
|
|
// Integer fieldlabel = 0;
|
|||
|
|
// String parentDomkey = "";
|
|||
|
|
// Integer pubchilchoiceId = 0;
|
|||
|
|
//
|
|||
|
|
// sql1.append(" select a.id, b.fieldlabel, b.pubchilchoiceId ");
|
|||
|
|
// sql1.append(" from mode_customdspfield a, workflow_billfield b ");
|
|||
|
|
// sql1.append(" where a.fieldid = b.id and b.id=? ");
|
|||
|
|
// sql1.append(" and a.customId = ? ");
|
|||
|
|
// record.executeQuery(sql1.toString(),fieldid,customId);
|
|||
|
|
// while(record.next()){
|
|||
|
|
// fieldlabel = record.getInt("fieldlabel");
|
|||
|
|
// pubchilchoiceId = record.getInt("pubchilchoiceId");
|
|||
|
|
// }
|
|||
|
|
// if(pubchilchoiceId > 0){
|
|||
|
|
// parentDomkey = "con_"+pubchilchoiceId;
|
|||
|
|
// }else{//#866910
|
|||
|
|
// String dlxzksql = "select t.id from workflow_billfield t where t.childfieldid=?";
|
|||
|
|
// rs1.executeQuery(dlxzksql,fieldid);
|
|||
|
|
// if(rs1.next()){
|
|||
|
|
// String parentfieldid = Util.null2String(rs1.getString(1));
|
|||
|
|
// if(!parentfieldid.isEmpty()){
|
|||
|
|
// parentDomkey = "con_"+parentfieldid;
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// ConditionFactory conditionFactory = new ConditionFactory(user);
|
|||
|
|
// CubeFieldService cfs = new CubeFieldService();
|
|||
|
|
// List<SearchConditionOption> options = new ArrayList<SearchConditionOption>();
|
|||
|
|
// SearchConditionItem conditionJson = new SearchConditionItem();
|
|||
|
|
// if(!"seclevel".equals(fieldname_seclevel)){
|
|||
|
|
// conditionJson = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname+","+parentDomkey, cfs.getWorkflowSelectItems(""+fieldid, user.getLanguage(),true));
|
|||
|
|
// //options = cfs.getWorkflowSelectItems(""+fieldid, user.getLanguage(),true);
|
|||
|
|
// options = conditionJson.getOptions();
|
|||
|
|
// if("1".equals(conditiontransition) && options.size()>0&&"".equals(options.get(0).getKey())){//选择框多选时去除空选项
|
|||
|
|
// options.remove(0);
|
|||
|
|
// }
|
|||
|
|
// }else{
|
|||
|
|
// //密级修改为从人力资源那么获取
|
|||
|
|
// Map<String,Object> otherParam = new HashMap<>();
|
|||
|
|
// AddSeclevelUtil addSeclevelUtil = new AddSeclevelUtil();
|
|||
|
|
// otherParam.put("fieldlabel",fieldlabel);
|
|||
|
|
// otherParam.put("fieldname",fieldname);
|
|||
|
|
// otherParam.put("parentDomkey",parentDomkey);
|
|||
|
|
// conditionJson = addSeclevelUtil.getSecLevelOptions(conditionFactory,user,otherParam);
|
|||
|
|
//
|
|||
|
|
//// HrmClassifiedProtectionBiz hrmClassifiedProtectionBiz = new HrmClassifiedProtectionBiz();
|
|||
|
|
//// SearchConditionOption searchConditionOption = new SearchConditionOption();
|
|||
|
|
//// searchConditionOption.setKey("");
|
|||
|
|
//// searchConditionOption.setShowname("");
|
|||
|
|
//// searchConditionOption.setChilditemid(Util.splitString("", ","));
|
|||
|
|
//// options.add(searchConditionOption);
|
|||
|
|
//// //密级调用人力资源的 资源密级下拉选项
|
|||
|
|
//// List<SearchConditionOption> comOptions = hrmClassifiedProtectionBiz.getResourceOptionListByUser(user);
|
|||
|
|
//// if (null != comOptions && comOptions.size() > 0) {
|
|||
|
|
//// for (SearchConditionOption searchConditionOptioninner : comOptions) {
|
|||
|
|
//// SearchConditionOption searchConditionOption_inner = new SearchConditionOption();
|
|||
|
|
//// String selectvalue = searchConditionOptioninner.getKey();
|
|||
|
|
//// String selectname = searchConditionOptioninner.getShowname();
|
|||
|
|
//// searchConditionOption_inner.setKey(selectvalue);
|
|||
|
|
//// searchConditionOption_inner.setShowname(selectname);
|
|||
|
|
//// searchConditionOption_inner.setChilditemid(Util.splitString("", ","));
|
|||
|
|
//// options.add(searchConditionOption_inner);
|
|||
|
|
////
|
|||
|
|
//// }
|
|||
|
|
//// conditionJson = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname + "," + parentDomkey, options);
|
|||
|
|
//// }
|
|||
|
|
// options = conditionJson.getOptions();
|
|||
|
|
// if("1".equals(conditiontransition) && options.size()>0&&"".equals(options.get(0).getKey())){//选择框多选时去除空选项
|
|||
|
|
// options.remove(0);
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
//
|
|||
|
|
//
|
|||
|
|
//
|
|||
|
|
// json.put("options", options);
|
|||
|
|
// json.put("parentDomkey",conditionJson.getParentDomkey());
|
|||
|
|
// json.put("domkey",conditionJson.getDomkey());
|
|||
|
|
// if(!searchparavalue.isEmpty()) {
|
|||
|
|
// json.put("value", searchparavalue);
|
|||
|
|
// }
|
|||
|
|
// if(conditiontransition.equalsIgnoreCase("1")){
|
|||
|
|
// json.put("detailtype","2");
|
|||
|
|
// json.put("multiple",true);
|
|||
|
|
// }else{
|
|||
|
|
// json.put("detailtype","");
|
|||
|
|
// }
|
|||
|
|
// json.put("fieldid", fieldid);
|
|||
|
|
// json.put("customname", customname);
|
|||
|
|
// }else if ("5".equals(fieldhtmltype) && "2".equals(fieldtype)) {//多选
|
|||
|
|
// RecordSet record = new RecordSet();
|
|||
|
|
// StringBuffer sql1 = new StringBuffer();
|
|||
|
|
// Integer fieldlabel = 0;
|
|||
|
|
// String parentDomkey = "";
|
|||
|
|
// Integer pubchilchoiceId = 0;
|
|||
|
|
//
|
|||
|
|
// sql1.append(" select a.id, b.fieldlabel,b.pubchilchoiceId ");
|
|||
|
|
// sql1.append(" from mode_customdspfield a, workflow_billfield b ");
|
|||
|
|
// sql1.append(" where a.fieldid = b.id and b.id=? ");
|
|||
|
|
// sql1.append(" and a.customId = ? ");
|
|||
|
|
// record.executeQuery(sql1.toString(),fieldid,customId);
|
|||
|
|
// while(record.next()){
|
|||
|
|
// fieldlabel = record.getInt("fieldlabel");
|
|||
|
|
// pubchilchoiceId = record.getInt("pubchilchoiceId");
|
|||
|
|
// }
|
|||
|
|
// if(pubchilchoiceId > 0){
|
|||
|
|
// parentDomkey = "con_"+pubchilchoiceId;
|
|||
|
|
// }else{//#866910
|
|||
|
|
// String dlxzksql = "select t.id from workflow_billfield t where t.childfieldid=?";
|
|||
|
|
// rs1.executeQuery(dlxzksql,fieldid);
|
|||
|
|
// if(rs1.next()){
|
|||
|
|
// String parentfieldid = Util.null2String(rs1.getString(1));
|
|||
|
|
// if(!parentfieldid.isEmpty()){
|
|||
|
|
// parentDomkey = "con_"+parentfieldid;
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// ConditionFactory conditionFactory = new ConditionFactory(user);
|
|||
|
|
// CubeFieldService cfs = new CubeFieldService();
|
|||
|
|
// SearchConditionItem conditionJson = new SearchConditionItem();
|
|||
|
|
// if(!"seclevel".equals(fieldname_seclevel)){
|
|||
|
|
// conditionJson = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname+","+parentDomkey,cfs.getWorkflowSelectItems(""+fieldid, user.getLanguage(),true));
|
|||
|
|
// }else{
|
|||
|
|
// //密级修改为从人力资源那么获取
|
|||
|
|
// Map<String,Object> otherParam = new HashMap<>();
|
|||
|
|
// AddSeclevelUtil addSeclevelUtil = new AddSeclevelUtil();
|
|||
|
|
// otherParam.put("fieldlabel",fieldlabel);
|
|||
|
|
// otherParam.put("fieldname",fieldname);
|
|||
|
|
// otherParam.put("parentDomkey",parentDomkey);
|
|||
|
|
// conditionJson = addSeclevelUtil.getSecLevelOptions(conditionFactory,user,otherParam);
|
|||
|
|
//
|
|||
|
|
// }
|
|||
|
|
// List<SearchConditionOption> options = new ArrayList<SearchConditionOption>();
|
|||
|
|
// options = conditionJson.getOptions();
|
|||
|
|
// if(!searchparavalue.isEmpty()) {
|
|||
|
|
// json.put("value", searchparavalue);
|
|||
|
|
// }
|
|||
|
|
// json.put("options", options);
|
|||
|
|
// json.put("parentDomkey",conditionJson.getParentDomkey());
|
|||
|
|
// json.put("domkey",conditionJson.getDomkey());
|
|||
|
|
// json.put("viewAttr", viewAttr);
|
|||
|
|
// json.put("detailtype","2");
|
|||
|
|
// json.put("customname", customname);
|
|||
|
|
// }else if ("5".equals(fieldhtmltype) && "3".equals(fieldtype)) {//单选
|
|||
|
|
// RecordSet record = new RecordSet();
|
|||
|
|
// StringBuffer sql1 = new StringBuffer();
|
|||
|
|
// Integer fieldlabel = 0;
|
|||
|
|
// String parentDomkey = "";
|
|||
|
|
// Integer pubchilchoiceId = 0;
|
|||
|
|
//
|
|||
|
|
// sql1.append(" select a.id, b.fieldlabel, b.pubchilchoiceId ");
|
|||
|
|
// sql1.append(" from mode_customdspfield a, workflow_billfield b ");
|
|||
|
|
// sql1.append(" where a.fieldid = b.id and b.id=? ");
|
|||
|
|
// sql1.append(" and a.customId = ? ");
|
|||
|
|
// record.executeQuery(sql1.toString(),fieldid,customId);
|
|||
|
|
// while(record.next()){
|
|||
|
|
// fieldlabel = record.getInt("fieldlabel");
|
|||
|
|
// pubchilchoiceId = record.getInt("pubchilchoiceId");
|
|||
|
|
// }
|
|||
|
|
// if(pubchilchoiceId > 0){
|
|||
|
|
// parentDomkey = "con_"+pubchilchoiceId;
|
|||
|
|
// }else{//#866910
|
|||
|
|
// String dlxzksql = "select t.id from workflow_billfield t where t.childfieldid=?";
|
|||
|
|
// rs1.executeQuery(dlxzksql,fieldid);
|
|||
|
|
// if(rs1.next()){
|
|||
|
|
// String parentfieldid = Util.null2String(rs1.getString(1));
|
|||
|
|
// if(!parentfieldid.isEmpty()){
|
|||
|
|
// parentDomkey = "con_"+parentfieldid;
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// ConditionFactory conditionFactory = new ConditionFactory(user);
|
|||
|
|
// CubeFieldService cfs = new CubeFieldService();
|
|||
|
|
// SearchConditionItem conditionJson = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname+","+parentDomkey,cfs.getWorkflowSelectItems(""+fieldid, user.getLanguage(),true));
|
|||
|
|
// List<SearchConditionOption> options = new ArrayList<SearchConditionOption>();
|
|||
|
|
// options = conditionJson.getOptions();
|
|||
|
|
// if("1".equals(conditiontransition) && options.size()>0&&"".equals(options.get(0).getKey())){//选择框多选时去除空选项
|
|||
|
|
// options.remove(0);
|
|||
|
|
// }
|
|||
|
|
// json.put("options", options);
|
|||
|
|
// if(!searchparavalue.isEmpty()) {
|
|||
|
|
// json.put("value", searchparavalue);
|
|||
|
|
// }
|
|||
|
|
// json.put("detailtype","3");
|
|||
|
|
// json.put("parentDomkey",conditionJson.getParentDomkey());
|
|||
|
|
// json.put("domkey",conditionJson.getDomkey());
|
|||
|
|
// json.put("supportCancel", true);
|
|||
|
|
// json.put("fieldid", fieldid);
|
|||
|
|
// json.put("customname", customname);
|
|||
|
|
// }else if ("4".equals(fieldhtmltype) && "1".equals(fieldtype)) {//勾选框
|
|||
|
|
// RecordSet record = new RecordSet();
|
|||
|
|
// StringBuffer sql1 = new StringBuffer();
|
|||
|
|
// Integer fieldlabel = 0;
|
|||
|
|
//
|
|||
|
|
// sql1.append(" select a.id, b.fieldlabel ");
|
|||
|
|
// sql1.append(" from mode_customdspfield a, workflow_billfield b ");
|
|||
|
|
// sql1.append(" where a.fieldid = b.id and b.id=? ");
|
|||
|
|
// sql1.append(" and a.customId = ? ");
|
|||
|
|
// record.executeQuery(sql1.toString(),fieldid,customId);
|
|||
|
|
// while(record.next()){
|
|||
|
|
// fieldlabel = record.getInt("fieldlabel");
|
|||
|
|
// }
|
|||
|
|
// ConditionFactory conditionFactory = new ConditionFactory(user);
|
|||
|
|
// CubeFieldService cfs = new CubeFieldService();
|
|||
|
|
// SearchConditionItem conditionJson = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname,this.getCheckOptions(user.getLanguage()));
|
|||
|
|
// List<SearchConditionOption> options = new ArrayList<SearchConditionOption>();
|
|||
|
|
// options = conditionJson.getOptions();
|
|||
|
|
//
|
|||
|
|
// json.put("options", options);
|
|||
|
|
// json.put("domkey",conditionJson.getDomkey());
|
|||
|
|
// json.put("viewAttr", viewAttr);
|
|||
|
|
// json.put("detailtype","3");
|
|||
|
|
// json.put("customname", customname);
|
|||
|
|
// }else if ("3".equals(fieldhtmltype)) {//日期
|
|||
|
|
// BrowserBean browserProps = null;
|
|||
|
|
// if ("2".equals(fieldtype)||"19".equals(fieldtype)||"290".equals(fieldtype)) {//日期 时间 日期时间
|
|||
|
|
// if(searchparavalue.indexOf(",")>-1){
|
|||
|
|
// String[] vals = searchparavalue.split(",");
|
|||
|
|
// if(vals.length>0){
|
|||
|
|
// searchparavalue = vals[0];
|
|||
|
|
// if(vals.length>1){
|
|||
|
|
// searchparavalue1 = vals[1];
|
|||
|
|
// if(vals.length>2){
|
|||
|
|
// searchparavalue1 = vals[1]+vals[2];
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// if("2".equals(fieldtype) && searchparavalue.isEmpty()){
|
|||
|
|
// searchparavalue = "0"; // 全部
|
|||
|
|
// }
|
|||
|
|
// if("2".equals(fieldtype) && !searchparavalue.isEmpty()) {
|
|||
|
|
// if(-1!=Util.getIntValue(searchparavalue)){
|
|||
|
|
// json.put("value", new String[]{searchparavalue,"",""});
|
|||
|
|
// }else{
|
|||
|
|
// json.put("value", new String[]{"6",searchparavalue,searchparavalue1});
|
|||
|
|
// }
|
|||
|
|
// }else{
|
|||
|
|
// ArrayList<String> dataValue = new ArrayList<String>();
|
|||
|
|
// if("".equals(searchparavalue)&&"".equals(searchparavalue1)){
|
|||
|
|
// json.put("value", dataValue);
|
|||
|
|
// }else{
|
|||
|
|
// dataValue.add(searchparavalue);
|
|||
|
|
// dataValue.add(searchparavalue1);
|
|||
|
|
// json.put("value", dataValue);
|
|||
|
|
// }
|
|||
|
|
//// json.put("value", searchparavalue);
|
|||
|
|
// }
|
|||
|
|
// }else if("402".equals(fieldtype) || "403".equals(fieldtype)){//年、年月
|
|||
|
|
// if(!searchparavalue.isEmpty()) {
|
|||
|
|
// json.put("value", searchparavalue);
|
|||
|
|
// }
|
|||
|
|
// }else if("161".equals(fieldtype) || "162".equals(fieldtype)) {
|
|||
|
|
// browserProps = new BrowserBean(fieldtype);
|
|||
|
|
// BrowserValueInfoService browserValueInfoService = new BrowserValueInfoService();
|
|||
|
|
// List <Object> valueObj = null;
|
|||
|
|
// List<Map<String,Object>> replaceDatas = new ArrayList<Map<String,Object>>();
|
|||
|
|
// try {
|
|||
|
|
// valueObj = browserValueInfoService.getBrowserValueInfo(Util.getIntValue(fieldtype), fielddbtype, 0, searchparavalue, user.getLanguage(), -1);
|
|||
|
|
// for(int i=0;i<valueObj.size();i++){
|
|||
|
|
// Map<String,Object> map = new HashMap<String,Object>();
|
|||
|
|
// BrowserValueInfo m=(BrowserValueInfo)valueObj.get(i);
|
|||
|
|
// map.put("id",m.getId());
|
|||
|
|
// map.put("name",m.getName());
|
|||
|
|
// map.put("count",m.getCount());
|
|||
|
|
// replaceDatas.add(map);
|
|||
|
|
// }
|
|||
|
|
// json.put("replaceDatas",replaceDatas);
|
|||
|
|
// browserProps.setReplaceDatas(replaceDatas);
|
|||
|
|
//
|
|||
|
|
// } catch (Exception e) {
|
|||
|
|
// }
|
|||
|
|
// new BrowserInitUtil().initCustomizeBrow(browserProps,fielddbtype, Util.getIntValue(fieldtype) , user.getUID());
|
|||
|
|
// browserProps.getDataParams().put("formmodefieldid",fieldid);
|
|||
|
|
// browserProps.getConditionDataParams().put("formmodefieldid", fieldid);
|
|||
|
|
// browserProps.getCompleteParams().put("formmodefieldid", fieldid);
|
|||
|
|
// } else if("256".equals(fieldtype) || "257".equals(fieldtype)) {
|
|||
|
|
// browserProps = new BrowserBean(fieldtype);
|
|||
|
|
// browserProps.getDataParams().put("cube_treeid", fielddbtype);
|
|||
|
|
// browserProps.getCompleteParams().put("cube_treeid", fielddbtype);
|
|||
|
|
// BrowserValueInfoService browserValueInfoService = new BrowserValueInfoService();
|
|||
|
|
// List <Object> valueObj = null;
|
|||
|
|
// List<Map<String,Object>> replaceDatas = new ArrayList<Map<String,Object>>();
|
|||
|
|
// try {
|
|||
|
|
// valueObj = browserValueInfoService.getBrowserValueInfo(Util.getIntValue(fieldtype), fielddbtype, 0, searchparavalue, user.getLanguage(), -1);
|
|||
|
|
// for(int i=0;i<valueObj.size();i++){
|
|||
|
|
// Map<String,Object> map = new HashMap<String,Object>();
|
|||
|
|
// BrowserValueInfo m=(BrowserValueInfo)valueObj.get(i);
|
|||
|
|
// map.put("id",m.getId());
|
|||
|
|
// map.put("name",m.getName());
|
|||
|
|
// map.put("count",m.getCount());
|
|||
|
|
// replaceDatas.add(map);
|
|||
|
|
// }
|
|||
|
|
// json.put("replaceDatas",replaceDatas);
|
|||
|
|
// browserProps.setReplaceDatas(replaceDatas);
|
|||
|
|
//
|
|||
|
|
// } catch (Exception e) {
|
|||
|
|
// }
|
|||
|
|
// new BrowserInitUtil().initBrowser(browserProps,user.getLanguage());
|
|||
|
|
// }else if("1".equals(fieldtype)||("1".equals(conditiontransition)&&"17".equals(fieldtype))){ //人力资源
|
|||
|
|
// if("1".equals(conditiontransition)&&"1".equals(fieldtype)){
|
|||
|
|
// browserProps = new BrowserBean(fieldtype);
|
|||
|
|
// browserProps.setViewAttr(viewAttr);
|
|||
|
|
// List<Object> objs = null;
|
|||
|
|
// if(!searchparavalue.isEmpty()){
|
|||
|
|
// if (Util.getIntValue(searchparavalue) == 0||"-1".equals(searchparavalue)||Util.getIntValue(searchparavalue) == -2
|
|||
|
|
// ||Util.getIntValue(searchparavalue) == -3||Util.getIntValue(searchparavalue) == -4||Util.getIntValue(searchparavalue) == -5
|
|||
|
|
// ||Util.getIntValue(searchparavalue) == -6||Util.getIntValue(searchparavalue) == -7||Util.getIntValue(searchparavalue) == -8){
|
|||
|
|
// json.put("value",new String[]{searchparavalue,"",""});
|
|||
|
|
// } else {
|
|||
|
|
// try {
|
|||
|
|
// objs = new BrowserValueInfoService().getBrowserValueInfo(1,null,0,searchparavalue,user.getLanguage(),-1);
|
|||
|
|
// } catch (Exception e) {
|
|||
|
|
// }
|
|||
|
|
// String valueSpan = "";
|
|||
|
|
// if(objs!=null) {
|
|||
|
|
// for(Object obj : objs) {
|
|||
|
|
// valueSpan+=((BrowserValueInfo) obj).getName()+",";
|
|||
|
|
// }
|
|||
|
|
// valueSpan = valueSpan.substring(0,valueSpan.length()-1);
|
|||
|
|
// }
|
|||
|
|
// json.put("value", new Object[]{"-5",new Object[]{searchparavalue,valueSpan, objs}});
|
|||
|
|
// }
|
|||
|
|
// }else{
|
|||
|
|
// json.put("value", new Object[]{"-5","",""});
|
|||
|
|
// }
|
|||
|
|
// new BrowserInitUtil().initBrowser(browserProps,user.getLanguage());
|
|||
|
|
// }else{
|
|||
|
|
// browserProps = new BrowserBean(fieldtype);
|
|||
|
|
// browserProps.setViewAttr(viewAttr);
|
|||
|
|
// List<Object> objs = null;
|
|||
|
|
// if(!searchparavalue.isEmpty()){
|
|||
|
|
// if (Util.getIntValue(searchparavalue) <= 0){
|
|||
|
|
// json.put("value",new String[]{searchparavalue,""});
|
|||
|
|
// } else {
|
|||
|
|
// try {
|
|||
|
|
// objs = new BrowserValueInfoService().getBrowserValueInfo(1,null,0,searchparavalue,user.getLanguage(),-1);
|
|||
|
|
// } catch (Exception e) {
|
|||
|
|
// }
|
|||
|
|
// String valueSpan = "";
|
|||
|
|
// if(objs!=null) {
|
|||
|
|
// for(Object obj : objs) {
|
|||
|
|
// valueSpan+=((BrowserValueInfo) obj).getName()+",";
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// json.put("value", new Object[]{"-5",new Object[]{searchparavalue,valueSpan, objs}});
|
|||
|
|
// }
|
|||
|
|
// }else{
|
|||
|
|
// json.put("value", new Object[]{"-5","",""});
|
|||
|
|
// }
|
|||
|
|
// new BrowserInitUtil().initBrowser(browserProps,user.getLanguage());
|
|||
|
|
// }
|
|||
|
|
// }else if("4".equals(fieldtype) || "57".equals(fieldtype)){
|
|||
|
|
// browserProps = new BrowserBean(fieldtype);
|
|||
|
|
// if(!searchparavalue.isEmpty()){
|
|||
|
|
// BrowserValueInfoService browserValueInfoService = new BrowserValueInfoService();
|
|||
|
|
// List <BrowserValueInfo> valueObj = null;
|
|||
|
|
// List<Map<String,Object>> replaceDatas = new ArrayList<Map<String,Object>>();
|
|||
|
|
// try {
|
|||
|
|
// valueObj = browserValueInfoService.getBrowserValueInfo(fieldtype, String.valueOf(fielddbtype), 0, searchparavalue, user.getLanguage(), "","");
|
|||
|
|
// for(int i=0;i<valueObj.size();i++){
|
|||
|
|
// Map<String,Object> map = new HashMap<String,Object>();
|
|||
|
|
// BrowserValueInfo m=(BrowserValueInfo)valueObj.get(i);
|
|||
|
|
// map.put("id",m.getId());
|
|||
|
|
// map.put("name",m.getName());
|
|||
|
|
// map.put("count",m.getCount());
|
|||
|
|
// replaceDatas.add(map);
|
|||
|
|
// }
|
|||
|
|
// json.put("replaceDatas",replaceDatas);
|
|||
|
|
// browserProps.setReplaceDatas(replaceDatas);
|
|||
|
|
// } catch (Exception e) {
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// browserProps.setViewAttr(viewAttr);
|
|||
|
|
// Map<String,Object> map = new HashMap<String,Object>();
|
|||
|
|
// Map<String,Object> map1 = new HashMap<String,Object>();
|
|||
|
|
// Map<String,Object> map2 = new HashMap<String,Object>();
|
|||
|
|
// map.put("fromModule","model");
|
|||
|
|
// map1.put("fromModule","model");
|
|||
|
|
// map2.put("fromModule","model");
|
|||
|
|
// browserProps.setDataParams(map1);
|
|||
|
|
// browserProps.setDestDataParams(map2);
|
|||
|
|
// browserProps.setCompleteParams(map);
|
|||
|
|
// new BrowserInitUtil().initBrowser(browserProps,user.getLanguage());
|
|||
|
|
// } else if("164".equals(fieldtype)||"194".equals(fieldtype)){
|
|||
|
|
// browserProps = new BrowserBean(fieldtype);
|
|||
|
|
// if(!searchparavalue.isEmpty()){
|
|||
|
|
// BrowserValueInfoService browserValueInfoService = new BrowserValueInfoService();
|
|||
|
|
// List <BrowserValueInfo> valueObj = null;
|
|||
|
|
// List<Map<String,Object>> replaceDatas = new ArrayList<Map<String,Object>>();
|
|||
|
|
// try {
|
|||
|
|
// valueObj = browserValueInfoService.getBrowserValueInfo(fieldtype, String.valueOf(fielddbtype), 0, searchparavalue, user.getLanguage(), "","");
|
|||
|
|
// for(int i=0;i<valueObj.size();i++){
|
|||
|
|
// Map<String,Object> map = new HashMap<String,Object>();
|
|||
|
|
// BrowserValueInfo m=(BrowserValueInfo)valueObj.get(i);
|
|||
|
|
// map.put("id",m.getId());
|
|||
|
|
// map.put("name",m.getName());
|
|||
|
|
// map.put("count",m.getCount());
|
|||
|
|
// replaceDatas.add(map);
|
|||
|
|
// }
|
|||
|
|
// json.put("replaceDatas",replaceDatas);
|
|||
|
|
// browserProps.setReplaceDatas(replaceDatas);
|
|||
|
|
// } catch (Exception e) {
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// browserProps.setViewAttr(viewAttr);
|
|||
|
|
// Map<String,Object> map = new HashMap<String,Object>();
|
|||
|
|
// Map<String,Object> map1 = new HashMap<String,Object>();
|
|||
|
|
// Map<String,Object> map2 = new HashMap<String,Object>();
|
|||
|
|
// map.put("fromModule","model");
|
|||
|
|
// map1.put("fromModule","model");
|
|||
|
|
// map2.put("fromModule","model");
|
|||
|
|
// browserProps.setDataParams(map1);
|
|||
|
|
// browserProps.setDestDataParams(map2);
|
|||
|
|
// browserProps.setCompleteParams(map);
|
|||
|
|
// new BrowserInitUtil().initBrowser(browserProps,user.getLanguage());
|
|||
|
|
// } else {
|
|||
|
|
// browserProps = new BrowserBean(fieldtype);
|
|||
|
|
// if(!searchparavalue.isEmpty()){
|
|||
|
|
// BrowserValueInfoService browserValueInfoService = new BrowserValueInfoService();
|
|||
|
|
// List <Object> valueObj = null;
|
|||
|
|
// List<Map<String,Object>> replaceDatas = new ArrayList<Map<String,Object>>();
|
|||
|
|
// try {
|
|||
|
|
// valueObj = browserValueInfoService.getBrowserValueInfo(Util.getIntValue(fieldtype), fielddbtype, 0, searchparavalue, user.getLanguage(), -1);
|
|||
|
|
// for(int i=0;i<valueObj.size();i++){
|
|||
|
|
// Map<String,Object> map = new HashMap<String,Object>();
|
|||
|
|
// if("141".equals(fieldtype)){
|
|||
|
|
// map = (Map<String,Object>)valueObj.get(i);
|
|||
|
|
// }else {
|
|||
|
|
// BrowserValueInfo m=(BrowserValueInfo)valueObj.get(i);
|
|||
|
|
// map.put("id", m.getId());
|
|||
|
|
// map.put("name", m.getName());
|
|||
|
|
// map.put("count", m.getCount());
|
|||
|
|
// }
|
|||
|
|
// replaceDatas.add(map);
|
|||
|
|
// }
|
|||
|
|
// json.put("replaceDatas",replaceDatas);
|
|||
|
|
// browserProps.setReplaceDatas(replaceDatas);
|
|||
|
|
//
|
|||
|
|
// } catch (Exception e) {
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
// //Map<String,Object> map = new HashMap<>();
|
|||
|
|
// //map.put("fromModule","model");
|
|||
|
|
// //browserProps.setDataParams(map);
|
|||
|
|
// //browserProps.setDestDataParams(map);
|
|||
|
|
// //browserProps.setCompleteParams(map);
|
|||
|
|
// browserProps.setViewAttr(viewAttr);
|
|||
|
|
// new BrowserInitUtil().initBrowser(browserProps,user.getLanguage());
|
|||
|
|
// }
|
|||
|
|
// if(conditiontransition.equalsIgnoreCase("1")){
|
|||
|
|
// // browserProps.setIsMultCheckbox(true);
|
|||
|
|
// browserProps.setType(fieldtype);
|
|||
|
|
// }
|
|||
|
|
//
|
|||
|
|
// json.put("browserProps", browserProps);
|
|||
|
|
// }
|
|||
|
|
// json.put("conditiontransition",conditiontransition);
|
|||
|
|
// json.put("fieldid", fieldid);
|
|||
|
|
// json.put("customname", customname);
|
|||
|
|
// json.put("fieldtype", fieldtype);
|
|||
|
|
// json.put("viewAttr",viewAttr);
|
|||
|
|
// json.put("requiredCon",requiredCon);
|
|||
|
|
// json.put("fieldhtmltype", fieldhtmltype);
|
|||
|
|
// json.put("showtype",showtype );//显示模式主要 针对浏览框 0:浏览框模式 1:下拉拉框模式
|
|||
|
|
// json.put("groupid",groupid );
|
|||
|
|
// json.put("showmodel",showmodel );
|
|||
|
|
// json.put("orderid",orderid );
|
|||
|
|
// if(!"".equals(groupid) && !"0".equals(groupid)){
|
|||
|
|
// List<JSONObject> list=groupMap.get(groupid);
|
|||
|
|
// if(null==list){
|
|||
|
|
// list=new ArrayList<JSONObject>();
|
|||
|
|
// }
|
|||
|
|
// list.add(json);
|
|||
|
|
// groupMap.put(groupid,list);
|
|||
|
|
// }else{
|
|||
|
|
// datas.add(json);
|
|||
|
|
// }
|
|||
|
|
// }
|
|||
|
|
//
|
|||
|
|
// rs.executeQuery("select * from mode_customsearchgroup where customid=?",customid);
|
|||
|
|
// Map<String,String> group=new HashMap<String,String>();
|
|||
|
|
// while(rs.next()){
|
|||
|
|
// float minOrder = 10000000;
|
|||
|
|
// JSONObject json = new JSONObject();
|
|||
|
|
// String id=Util.null2String(rs.getString("id"));
|
|||
|
|
// String groupname=Util.null2String(rs.getString("groupname"));
|
|||
|
|
// List<JSONObject> list=groupMap.get(id);//当前分组下的所有快捷搜索
|
|||
|
|
// if(null==list) {
|
|||
|
|
// continue;
|
|||
|
|
// }
|
|||
|
|
//
|
|||
|
|
// json.put("groupid",id);
|
|||
|
|
// json.put("groupname",groupname);
|
|||
|
|
// JSONArray chrild = new JSONArray();
|
|||
|
|
// for(int i=0;i<list.size();i++){
|
|||
|
|
// float childorderid = Util.getFloatValue(Util.null2String(list.get(i).get("orderid")),0);
|
|||
|
|
// //取分组里orderid最小的一个分组的orderid
|
|||
|
|
// if(childorderid<minOrder){
|
|||
|
|
// minOrder = childorderid;
|
|||
|
|
// }
|
|||
|
|
// chrild.add(list.get(i));
|
|||
|
|
// }
|
|||
|
|
// json.put("orderid",minOrder);
|
|||
|
|
// json.put("searchGroup",chrild);
|
|||
|
|
// datas.add(json);
|
|||
|
|
// }
|
|||
|
|
//
|
|||
|
|
// return datas;
|
|||
|
|
// }
|
|||
|
|
|
|||
|
|
private String replaceParams(String value, User user) {
|
|||
|
|
if ("$date$".equalsIgnoreCase(value)) {
|
|||
|
|
return "1";
|
|||
|
|
} else if ("$ThisWeek$".equalsIgnoreCase(value)) {
|
|||
|
|
return "2";
|
|||
|
|
} else if ("$ThisMonth$".equalsIgnoreCase(value)) {
|
|||
|
|
return "3";
|
|||
|
|
} else if ("$ThisSeason$".equalsIgnoreCase(value)) {
|
|||
|
|
return "4";
|
|||
|
|
} else if ("$ThisYear$".equalsIgnoreCase(value)) {
|
|||
|
|
return "5";
|
|||
|
|
} else if ("$LastMonth$".equalsIgnoreCase(value)) {
|
|||
|
|
return "7";
|
|||
|
|
} else if ("$LastYear$".equalsIgnoreCase(value)) {
|
|||
|
|
return "8";
|
|||
|
|
} else if ("$UserId$".equalsIgnoreCase(value)) {
|
|||
|
|
return "" + user.getUID();
|
|||
|
|
} else if ("$DepartmentId$".equalsIgnoreCase(value)) {
|
|||
|
|
try {
|
|||
|
|
ResourceComInfo resourceComInfo = new ResourceComInfo();
|
|||
|
|
return resourceComInfo.getDepartmentID("" + user.getUID());
|
|||
|
|
} catch (Exception e) {
|
|||
|
|
}
|
|||
|
|
} else if ("$SubcompanyId$".equalsIgnoreCase(value)) {
|
|||
|
|
try {
|
|||
|
|
ResourceComInfo resourceComInfo = new ResourceComInfo();
|
|||
|
|
return resourceComInfo.getSubCompanyID("" + user.getUID());
|
|||
|
|
} catch (Exception e) {
|
|||
|
|
}
|
|||
|
|
} else if ("$yesterday$".equalsIgnoreCase(value)) {
|
|||
|
|
return "9";
|
|||
|
|
} else if ("$tomorrow$".equalsIgnoreCase(value)) {
|
|||
|
|
return "10";
|
|||
|
|
} else if ("$lastWeek$".equalsIgnoreCase(value)) {
|
|||
|
|
return "11";
|
|||
|
|
} else if ("$nextWeek$".equalsIgnoreCase(value)) {
|
|||
|
|
return "12";
|
|||
|
|
}
|
|||
|
|
return value;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static String convertSingleBrowserTypeToMulti_All(String fieldtype) {
|
|||
|
|
switch (fieldtype) {
|
|||
|
|
// case "1":return "17";//人力资源
|
|||
|
|
case "7":
|
|||
|
|
return "18";//多客户
|
|||
|
|
case "9":
|
|||
|
|
return "37";//多文档
|
|||
|
|
// case "4":return "57";//多部门
|
|||
|
|
case "267":
|
|||
|
|
return "65";//多角色
|
|||
|
|
case "8":
|
|||
|
|
return "135";//多项目
|
|||
|
|
case "16":
|
|||
|
|
return "152";//多流程
|
|||
|
|
case "161":
|
|||
|
|
return "162";//自定义多选
|
|||
|
|
case "165":
|
|||
|
|
return "166";//分权多人力资源
|
|||
|
|
case "167":
|
|||
|
|
return "168";//分权多部门
|
|||
|
|
case "169":
|
|||
|
|
return "170";//分权多分部
|
|||
|
|
// case "164":return "194";//多分部
|
|||
|
|
case "256":
|
|||
|
|
return "257";//自定义树形多选
|
|||
|
|
case "24":
|
|||
|
|
return "278";//多岗位
|
|||
|
|
case "292":
|
|||
|
|
return "293";//多发票
|
|||
|
|
case "87":
|
|||
|
|
return "184";//会议室
|
|||
|
|
case "23":
|
|||
|
|
return "315";//多资产
|
|||
|
|
case "25":
|
|||
|
|
return "317";//多资产组
|
|||
|
|
case "179":
|
|||
|
|
return "314";//多资产资料
|
|||
|
|
default:
|
|||
|
|
return fieldtype;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|