diff --git a/src/com/engine/organization/entity/SelectOptionParam.java b/src/com/engine/organization/entity/SelectOptionParam.java new file mode 100644 index 00000000..7e27c490 --- /dev/null +++ b/src/com/engine/organization/entity/SelectOptionParam.java @@ -0,0 +1,39 @@ +package com.engine.organization.entity; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.api.browser.bean.SearchConditionOption; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/06/13 + * @version: 1.0 + */ +public class SelectOptionParam { + + /** + * 下拉框Json转换 + * + * @param datas + * @return + */ + public static List convertJsonToListOption(String datas) { + List selectOptions = new ArrayList<>(); + if (StringUtils.isNotBlank(datas)) { + JSONArray objectArray = JSON.parseArray(datas); + int size = objectArray.size(); + for (int i = 0; i < size; i++) { + JSONObject jsonObject = (JSONObject) objectArray.get(i); + SearchConditionOption option = new SearchConditionOption(jsonObject.getString("key"), jsonObject.getString("option")); + selectOptions.add(option); + } + } + return selectOptions; + } +} diff --git a/src/com/engine/organization/entity/company/bo/CompBO.java b/src/com/engine/organization/entity/company/bo/CompBO.java index a66cc2bd..a2726072 100644 --- a/src/com/engine/organization/entity/company/bo/CompBO.java +++ b/src/com/engine/organization/entity/company/bo/CompBO.java @@ -26,7 +26,20 @@ public class CompBO { Map poMaps = list.stream().collect(Collectors.toMap(CompPO::getId, item -> item)); - List dtoList = list.stream().map(e -> CompListDTO.builder().id(e.getId()).compNo(e.getCompNo()).compName(e.getCompName()).compNameShort(e.getCompNameShort()).parentCompany(e.getParentCompany()).parentCompName(null == poMaps.get(e.getParentCompany()) ? "" : poMaps.get(e.getParentCompany()).getCompName()).orgCode(e.getOrgCode()).industry(new SectorInfoComInfo().getSectorInfoname(e.getIndustry() + "")).compPrincipal(getUserNameById(e.getCompPrincipal() + "")).forbiddenTag(e.getForbiddenTag()).build()).collect(Collectors.toList()); + List dtoList = list.stream().map(e -> + CompListDTO + .builder() + .id(e.getId()) + .compNo(e.getCompNo()) + .compName(e.getCompName()) + .compNameShort(e.getCompNameShort()) + .parentCompany(e.getParentCompany()) + .parentCompName(null == poMaps.get(e.getParentCompany()) ? "" : poMaps.get(e.getParentCompany()).getCompName()) + .orgCode(e.getOrgCode()) + .industry(new SectorInfoComInfo().getSectorInfoname(e.getIndustry() + "")) + .compPrincipal(getUserNameById(e.getCompPrincipal() + "")) + .forbiddenTag(e.getForbiddenTag()) + .build()).collect(Collectors.toList()); Map> collects = dtoList.stream().filter(item -> null != item.getParentCompany() && 0 != item.getParentCompany()).collect(Collectors.groupingBy(CompListDTO::getParentCompany)); // 处理被引用数据 List usedIds = MapperProxyFactory.getProxy(CompMapper.class).listUsedId(); diff --git a/src/com/engine/organization/entity/extend/ExtendInfoOperateType.java b/src/com/engine/organization/entity/extend/ExtendInfoOperateType.java new file mode 100644 index 00000000..f39633e0 --- /dev/null +++ b/src/com/engine/organization/entity/extend/ExtendInfoOperateType.java @@ -0,0 +1,24 @@ +package com.engine.organization.entity.extend; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/06/13 + * @version: 1.0 + */ +public enum ExtendInfoOperateType { + LIST("list"), + SEARCH("search"), + EDIT("edit"), + ADD("add"); + + private String value; + + ExtendInfoOperateType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} diff --git a/src/com/engine/organization/entity/extend/bo/ExtendInfoBO.java b/src/com/engine/organization/entity/extend/bo/ExtendInfoBO.java index 192c1ae6..89a4a2f6 100644 --- a/src/com/engine/organization/entity/extend/bo/ExtendInfoBO.java +++ b/src/com/engine/organization/entity/extend/bo/ExtendInfoBO.java @@ -3,6 +3,7 @@ package com.engine.organization.entity.extend.bo; import com.api.browser.bean.BrowserBean; import com.api.browser.bean.BrowserValueInfo; import com.api.browser.bean.SearchConditionItem; +import com.api.browser.bean.SearchConditionOption; import com.api.browser.service.BrowserValueInfoService; import com.api.browser.util.BrowserInitUtil; import com.api.browser.util.ConditionFactory; @@ -11,6 +12,7 @@ import com.api.hrm.bean.FieldItem; import com.api.hrm.util.FieldType; import com.api.hrm.util.ServiceUtil; import com.engine.kq.cmd.shiftmanagement.toolkit.ShiftManagementToolKit; +import com.engine.organization.entity.SelectOptionParam; import com.engine.organization.entity.extend.po.ExtendInfoPO; import com.engine.organization.util.OrganizationFormItemUtil; import com.engine.sensitive.biz.SensitiveWordTypeComInfo; @@ -114,7 +116,7 @@ public class ExtendInfoBO { // 浏览按钮特殊处理 if (FieldType.BROWSER.equals(fieldItem.getType())) { - BrowserBean browserConditionParam = OrganizationFormItemUtil.browserItem(user, 2, 16, fieldItem.getViewAttr(), false, extendInfoPO.getFieldNameDesc(), extendInfoPO.getBrowserType(), extendInfoPO.getFieldName(), extendInfoPO.getCustomBrowserId()).getBrowserConditionParam(); + BrowserBean browserConditionParam = OrganizationFormItemUtil.browserItem(user, 2, 16, fieldItem.getViewAttr(), false, extendInfoPO.getFieldNameDesc(), extendInfoPO.getBrowserType(), extendInfoPO.getFieldName(), extendInfoPO.getCustomValue()).getBrowserConditionParam(); fieldItem.setBrowserConditionParam(browserConditionParam); } @@ -163,7 +165,7 @@ public class ExtendInfoBO { String fieldlabel = Util.null2String(extendInfoPO.getFieldNameDesc());//字段显示名 String fieldhtmltype = Util.null2String(extendInfoPO.getControlType());//字段类型 String detailtype = Util.null2String(extendInfoPO.getBrowserType());//字段二级类型(浏览框--单人力) - String dmlurl = Util.null2String(""); + String customValue = Util.null2String(extendInfoPO.getCustomValue()); boolean isQuickSearch = true; boolean isScope = false; @@ -176,7 +178,7 @@ public class ExtendInfoBO { } else if (detailtype.equals("2")) {//数字 searchConditionItem = conditionFactory.createCondition(ConditionType.INPUTNUMBER, fieldlabel, fieldname, isQuickSearch); } else { - searchConditionItem = conditionFactory.createCondition(ConditionType.INPUT, fieldlabel, fieldname, isQuickSearch); + searchConditionItem = conditionFactory.createCondition(ConditionType.INPUT, "25034", fieldname, isQuickSearch); } } else if (fieldhtmltype.equals("2")) {//多行文本框 searchConditionItem = conditionFactory.createCondition(ConditionType.TEXTAREA, fieldlabel, fieldname); @@ -212,25 +214,25 @@ public class ExtendInfoBO { searchConditionItem = conditionFactory.createCondition(ConditionType.TIMERANGEPICKER, fieldlabel, domkey); searchConditionItem.setValue(fieldvalue); } else { - //if (detailtype.equals("161") || detailtype.equals("162") || detailtype.equals("256") || detailtype.equals("257")) { - // BrowserBean browserbean = new BrowserBean(detailtype + ""); - // BrowserInitUtil browserInitUtil = new BrowserInitUtil(); - // String fielddbtype = dmlurl; - // if (!dmlurl.startsWith("browser.")) { - // fielddbtype = "browser." + dmlurl; - // } - // if (detailtype.equals("161") || detailtype.equals("162")) { - // browserInitUtil.initCustomizeBrow(browserbean, fielddbtype, Util.getIntValue(detailtype), user.getUID()); - // } else { - // browserbean.getDataParams().put("cube_treeid", dmlurl); - // browserbean.getDataParams().put("currenttime", System.currentTimeMillis()); - // browserInitUtil.initBrowser(browserbean, user.getLanguage()); - // } - // searchConditionItem = new SearchConditionItem(ConditionType.BROWSER, SystemEnv.getHtmlLabelNames(fieldlabel, user.getLanguage()), new String[]{fieldname}, browserbean); - //} else { - searchConditionItem = conditionFactory.createCondition(ConditionType.BROWSER, fieldlabel, fieldname, detailtype); - //} - // searchConditionItem.getBrowserConditionParam().setHideVirtualOrg(hrmFieldBean.getHideVirtualOrg()); + if (detailtype.equals("161") || detailtype.equals("162") || detailtype.equals("256") || detailtype.equals("257")) { + BrowserBean browserbean = new BrowserBean(detailtype + ""); + BrowserInitUtil browserInitUtil = new BrowserInitUtil(); + String fielddbtype = customValue; + if (!customValue.startsWith("browser.")) { + fielddbtype = "browser." + customValue; + } + if (detailtype.equals("161") || detailtype.equals("162")) { + browserInitUtil.initCustomizeBrow(browserbean, fielddbtype, Util.getIntValue(detailtype), user.getUID()); + } else { + browserbean.getDataParams().put("cube_treeid", customValue); + browserbean.getDataParams().put("currenttime", System.currentTimeMillis()); + browserInitUtil.initBrowser(browserbean, user.getLanguage()); + } + searchConditionItem = new SearchConditionItem(ConditionType.BROWSER, fieldlabel, new String[]{fieldname}, browserbean); + } else { + searchConditionItem = conditionFactory.createCondition(ConditionType.BROWSER, fieldlabel, fieldname, detailtype); + } + //searchConditionItem.getBrowserConditionParam().setHideVirtualOrg(hrmFieldBean.getHideVirtualOrg()); List> replaceDatas = new ArrayList>(); String tmpFieldValue = Util.null2String(fieldvalue); if (detailtype.equals("mkqshift")) { @@ -260,7 +262,9 @@ public class ExtendInfoBO { for (int i = 0; fieldvalues != null && i < fieldvalues.size(); i++) { BrowserValueInfo valueInfo = fieldvalues.get(i); String fieldshowname = valueInfo.getName(); - if (fieldshowname.length() == 0) continue; + if (fieldshowname.length() == 0) { + continue; + } Map replaceData = new HashMap(); replaceData.put("id", valueInfo.getId()); replaceData.put("name", fieldshowname); @@ -268,7 +272,7 @@ public class ExtendInfoBO { } } else { if (tmpFieldValue.length() > 0) { - String fieldshowname = hrmFieldManager.getFieldvalue(user, dmlurl, Util.getIntValue(fieldid), Util.getIntValue(fieldhtmltype), Util.getIntValue(detailtype), tmpFieldValue, 0); + String fieldshowname = hrmFieldManager.getFieldvalue(user, customValue, Util.getIntValue(fieldid), Util.getIntValue(fieldhtmltype), Util.getIntValue(detailtype), tmpFieldValue, 0); String[] fieldvalues = Util.splitString(tmpFieldValue, ","); String[] fieldshownames = Util.splitString(fieldshowname, ","); if (detailtype.equals("257")) { @@ -281,7 +285,9 @@ public class ExtendInfoBO { if (fieldvalues.length != fieldshownames.length) { break; } - if (Util.null2String(fieldshownames[i]).length() == 0) continue; + if (Util.null2String(fieldshownames[i]).length() == 0) { + continue; + } Map replaceData = new HashMap(); replaceData.put("id", fieldvalues[i]); replaceData.put("name", fieldshownames[i]); @@ -298,49 +304,15 @@ public class ExtendInfoBO { } } else if (fieldhtmltype.equals("5")) { //选择框 - // List statusOptions = hrmFieldBean.getSelectOption(); - // if (statusOptions == null) statusOptions = new ArrayList(); - // try { - // if (fieldid.length() > 0) { - // rs = new RecordSet(); - // char flag = Util.getSeparator(); - // if (hrmFieldBean.getIsFormField()) { - // if (Util.null2String(hrmFieldBean.getIssystem()).equals("1")) { - // rs.executeProc("hrm_selectitembyid_new", "" + fieldid + flag + 1); - // } else { - // rs.executeProc("cus_selectitembyid_new", "" + fieldid + flag + 1); - // } - // } else { - // if (fieldname.startsWith("column_")) { - // rs.executeProc("cus_selectitembyid_new", "" + fieldid + flag + 1); - // } else { - // rs.executeProc("hrm_searchselectitembyid", fieldid); - // } - // } - // while (rs.next()) { - // String tmpselectvalue = Util.null2String(rs.getString("selectvalue")); - // String tmpselectname = Util.toScreen(rs.getString("selectname"), user.getLanguage()); - // if (Util.null2String(rs.getString("cancel")).equals("1")) continue; - // boolean isDefault = Util.null2String(rs.getString("isdefault")).equals("y"); - // if (!isDefault) { - // isDefault = Util.null2String(rs.getString("hrm_isdefault")).equals("1"); - // } - // SearchConditionOption searchConditionOption = new SearchConditionOption(tmpselectvalue, tmpselectname, isDefault); - // if (!statusOptions.contains(searchConditionOption)) { - // statusOptions.add(searchConditionOption); - // } - // } - // } - // } catch (Exception e) { - // writeLog(e); - // } - // searchConditionItem = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname, statusOptions); - // if (detailtype.equals("") || detailtype.equals("0")) { - // detailtype = "1"; - // } - // searchConditionItem.setKey(Util.null2String(fieldvalue)); - // searchConditionItem.setValue(fieldvalue); - // searchConditionItem.setDetailtype(Util.getIntValue(detailtype, 3)); + + List searchConditionOptions = SelectOptionParam.convertJsonToListOption(customValue); + searchConditionItem = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname, searchConditionOptions); + if (detailtype.equals("") || detailtype.equals("0")) { + detailtype = "1"; + } + searchConditionItem.setKey(Util.null2String(fieldvalue)); + searchConditionItem.setValue(fieldvalue+""); + searchConditionItem.setDetailtype(Util.getIntValue(detailtype, 3)); } else if (fieldhtmltype.equals("6")) {//附件 if (fieldname.equals("resourceimageid")) { searchConditionItem = conditionFactory.createCondition(ConditionType.RESOURCEIMG, fieldlabel, fieldname, isQuickSearch); diff --git a/src/com/engine/organization/entity/extend/po/ExtendInfoPO.java b/src/com/engine/organization/entity/extend/po/ExtendInfoPO.java index f7b4d707..536e134d 100644 --- a/src/com/engine/organization/entity/extend/po/ExtendInfoPO.java +++ b/src/com/engine/organization/entity/extend/po/ExtendInfoPO.java @@ -100,9 +100,9 @@ public class ExtendInfoPO { private Integer browserShow; /** - * 自定义浏览按钮标识 + * 自定义标识 */ - private String customBrowserId; + private String customValue; /** * 显示顺序 diff --git a/src/com/engine/organization/mapper/extend/ExtendInfoMapper.java b/src/com/engine/organization/mapper/extend/ExtendInfoMapper.java index 287411ce..5eaebf97 100644 --- a/src/com/engine/organization/mapper/extend/ExtendInfoMapper.java +++ b/src/com/engine/organization/mapper/extend/ExtendInfoMapper.java @@ -20,5 +20,5 @@ public interface ExtendInfoMapper { * @param tableName * @return */ - List listFields(@Param("extendType") String extendType, @Param("extendGroupId") String extendGroupId, @Param("tableName") String tableName); + List listFields(@Param("extendType") String extendType, @Param("extendGroupId") String extendGroupId, @Param("tableName") String tableName,@Param("operateType")String operateType); } diff --git a/src/com/engine/organization/mapper/extend/ExtendInfoMapper.xml b/src/com/engine/organization/mapper/extend/ExtendInfoMapper.xml index 5d9855cc..b1d8f92e 100644 --- a/src/com/engine/organization/mapper/extend/ExtendInfoMapper.xml +++ b/src/com/engine/organization/mapper/extend/ExtendInfoMapper.xml @@ -18,6 +18,7 @@ + @@ -45,6 +46,7 @@ , t.edit_show , t.add_show , t.browser_show + , t.custom_value , t.show_order , t.creator , t.delete_type @@ -68,6 +70,10 @@ and table_name = #{tableName} + + and ${operateType}_show = 1 + + order by show_order diff --git a/src/com/engine/organization/service/ExtService.java b/src/com/engine/organization/service/ExtService.java index 38b8ac4e..4bad1a7c 100644 --- a/src/com/engine/organization/service/ExtService.java +++ b/src/com/engine/organization/service/ExtService.java @@ -26,7 +26,7 @@ public interface ExtService { * @param groupId * @return */ - List getExtForm(User user, String extendType, String tableName, int viewAttr, long id, String groupId); + List getExtForm(User user, String extendType, String tableName, int viewAttr, long id, String groupId, String... readOnlyFields); /** * 组装主表新增表单 diff --git a/src/com/engine/organization/service/impl/CompServiceImpl.java b/src/com/engine/organization/service/impl/CompServiceImpl.java index d6fab6c1..07bd4551 100644 --- a/src/com/engine/organization/service/impl/CompServiceImpl.java +++ b/src/com/engine/organization/service/impl/CompServiceImpl.java @@ -249,7 +249,7 @@ public class CompServiceImpl extends Service implements CompService { List extendGroupPOS = getExtendGroupMapper().listGroupByPid(Long.parseLong(groupId)); if (CollectionUtils.isNotEmpty(extendGroupPOS)) { for (ExtendGroupPO extendGroupPO : extendGroupPOS) { - addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_COMPEXT : JCL_ORG_COMP, viewAttr, id, extendGroupPO.getId().toString()))); + addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_COMPEXT : JCL_ORG_COMP, viewAttr, id, extendGroupPO.getId().toString(),"comp_no"))); } } diff --git a/src/com/engine/organization/service/impl/ExtServiceImpl.java b/src/com/engine/organization/service/impl/ExtServiceImpl.java index 06e1fced..eb0a6c3c 100644 --- a/src/com/engine/organization/service/impl/ExtServiceImpl.java +++ b/src/com/engine/organization/service/impl/ExtServiceImpl.java @@ -4,6 +4,7 @@ import com.api.browser.bean.SearchConditionItem; import com.engine.core.impl.Service; import com.engine.organization.entity.TopTab; import com.engine.organization.entity.codesetting.po.CodeRulePO; +import com.engine.organization.entity.extend.ExtendInfoOperateType; import com.engine.organization.entity.extend.bo.ExtendInfoBO; import com.engine.organization.entity.extend.po.ExtendGroupPO; import com.engine.organization.entity.extend.po.ExtendInfoPO; @@ -57,21 +58,26 @@ public class ExtServiceImpl extends Service implements ExtService { @Override - public List getExtForm(User user, String extendType, String tableName, int viewAttr, long id, String groupId) { + public List getExtForm(User user, String extendType, String tableName, int viewAttr, long id, String groupId, String... readOnlyFields) { List conditionItems = new ArrayList<>(); // 2编辑 1查看 OrganizationAssert.notNull(groupId, "请选择对应的拓展页"); - List infoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName); + List infoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName, ExtendInfoOperateType.EDIT.getValue()); String fields = infoPOList.stream().map(ExtendInfoPO::getFieldName).collect(Collectors.joining(",")); Map compExtMap = getExtMapper().listExt(tableName, fields, id); + List readOnlyFieldList = Arrays.asList(readOnlyFields); // 组装拓展页内容 for (ExtendInfoPO extendInfoPO : infoPOList) { SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, null == compExtMap ? null : compExtMap.get(extendInfoPO.getFieldName())); item.setFieldcol(16); - if (2 == viewAttr && 1 == extendInfoPO.getIsrequired()) { - item.setViewAttr(3); - item.setRules("required|string"); + if (2 == viewAttr) { + if (readOnlyFieldList.contains(extendInfoPO.getFieldName())) { + item.setViewAttr(1); + } else if (1 == extendInfoPO.getIsrequired()) { + item.setViewAttr(3); + item.setRules("required|string"); + } } conditionItems.add(item); } @@ -84,7 +90,7 @@ public class ExtServiceImpl extends Service implements ExtService { // 2编辑 1查看 OrganizationAssert.notNull(groupId, "请选择对应的拓展页"); - List infoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName); + List infoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName, ExtendInfoOperateType.ADD.getValue()); // 组装拓展页内容 for (ExtendInfoPO extendInfoPO : infoPOList) { SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, null); @@ -111,7 +117,7 @@ public class ExtServiceImpl extends Service implements ExtService { public List> getExtendTables(User user, String extendType, String tableName, long id, int viewAttr, boolean showLabel) { List> tables = new ArrayList<>(); // 查询所有分布模块,拓展明细表信息 - List infoPOList = getExtendInfoMapper().listFields(extendType, "", tableName); + List infoPOList = getExtendInfoMapper().listFields(extendType, "", tableName, ""); Map> groupMap = infoPOList.stream().collect(Collectors.groupingBy(ExtendInfoPO::getExtendGroupId)); // 遍历Map,组装数据 for (Map.Entry> entry : groupMap.entrySet()) { @@ -147,8 +153,8 @@ public class ExtServiceImpl extends Service implements ExtService { */ public List getTabInfo(String extendType, String tableName) { List topTabs = new ArrayList<>(); - List infoPOList = getExtendInfoMapper().listFields(extendType, "", tableName); - List infoPOList1 = getExtendInfoMapper().listFields(extendType, "", tableName.toLowerCase().replace("ext", "")); + List infoPOList = getExtendInfoMapper().listFields(extendType, "", tableName, ExtendInfoOperateType.EDIT.getValue()); + List infoPOList1 = getExtendInfoMapper().listFields(extendType, "", tableName.toLowerCase().replace("ext", ""), ExtendInfoOperateType.EDIT.getValue()); infoPOList.addAll(infoPOList1); List ids = infoPOList.stream().map(ExtendInfoPO::getExtendGroupId).collect(Collectors.toList()); List extendGroupPOS = getExtendGroupMapper().listGroupByIds(ids); @@ -165,7 +171,7 @@ public class ExtServiceImpl extends Service implements ExtService { @Override public int updateExtForm(User user, String extendType, String tableName, Map params, String groupId, Long id) { int updateBaseComp; - List extInfoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName); + List extInfoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName, ""); List extFields = extInfoPOList.stream().map(ExtendInfoPO::getFieldName).collect(Collectors.toList()); Map map = new HashMap<>(); for (String dtField : extFields) { @@ -189,7 +195,7 @@ public class ExtServiceImpl extends Service implements ExtService { @Override public void updateExtDT(User user, String extendType, String tableName, Map params, Long id) { - List dtInfoPOList = getExtendInfoMapper().listFields(extendType, "", tableName); + List dtInfoPOList = getExtendInfoMapper().listFields(extendType, "", tableName, ""); List groupIds = dtInfoPOList.stream().map(ExtendInfoPO::getExtendGroupId).distinct().collect(Collectors.toList()); Map> poMaps = dtInfoPOList.stream().collect(Collectors.groupingBy(ExtendInfoPO::getExtendGroupId)); // 删除原有明细表数据 @@ -201,7 +207,7 @@ public class ExtServiceImpl extends Service implements ExtService { for (int i = 0; i < rowNum; i++) { Map map = new HashMap<>(); for (ExtendInfoPO extendInfoPO : filterS) { - if (BROWSER_TYPE == extendInfoPO.getControlType()) { + if (BROWSER_TYPE.equals(extendInfoPO.getControlType())) { map.put(extendInfoPO.getFieldName() + "span", params.get(extendInfoPO.getFieldName() + "span_" + i)); } map.put(extendInfoPO.getFieldName(), params.get(extendInfoPO.getFieldName() + "_" + i)); diff --git a/src/com/engine/organization/service/impl/JobServiceImpl.java b/src/com/engine/organization/service/impl/JobServiceImpl.java index 5d43d31c..27f025bc 100644 --- a/src/com/engine/organization/service/impl/JobServiceImpl.java +++ b/src/com/engine/organization/service/impl/JobServiceImpl.java @@ -334,8 +334,8 @@ public class JobServiceImpl extends Service implements JobService { tableMap.put("tabname", "职等职级"); Map tabinfoMap = new HashMap<>(); List infoPOList = new ArrayList<>(); - infoPOList.add(ExtendInfoPO.builder().fieldName("gradeId").fieldNameDesc("职级").controlType(3).isrequired(1).browserType("161").customBrowserId("gradeBrowser").build()); - infoPOList.add(ExtendInfoPO.builder().fieldName("levelId").fieldNameDesc("职等").controlType(3).isrequired(1).browserType("162").customBrowserId("levelBrowser").build()); + infoPOList.add(ExtendInfoPO.builder().fieldName("gradeId").fieldNameDesc("职级").controlType(3).isrequired(1).browserType("161").customValue("gradeBrowser").build()); + infoPOList.add(ExtendInfoPO.builder().fieldName("levelId").fieldNameDesc("职等").controlType(3).isrequired(1).browserType("162").customValue("levelBrowser").build()); tabinfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, infoPOList, viewAttr, false)); tabinfoMap.put("rownum", "rownum"); // 去除null 元素