|
|
@ -1,6 +1,7 @@
|
|
|
|
package com.engine.organization.service.impl;
|
|
|
|
package com.engine.organization.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.api.browser.bean.BrowserBean;
|
|
|
|
import com.api.browser.bean.BrowserBean;
|
|
|
|
import com.api.browser.bean.SearchConditionGroup;
|
|
|
|
import com.api.browser.bean.SearchConditionGroup;
|
|
|
|
import com.api.browser.bean.SearchConditionItem;
|
|
|
|
import com.api.browser.bean.SearchConditionItem;
|
|
|
@ -16,6 +17,8 @@ import com.engine.organization.entity.comp.param.CompSearchParam;
|
|
|
|
import com.engine.organization.entity.comp.po.CompPO;
|
|
|
|
import com.engine.organization.entity.comp.po.CompPO;
|
|
|
|
import com.engine.organization.entity.extend.bo.ExtendInfoBO;
|
|
|
|
import com.engine.organization.entity.extend.bo.ExtendInfoBO;
|
|
|
|
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
|
|
|
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
|
|
|
|
|
|
|
import com.engine.organization.mapper.comp.CompExtDTMapper;
|
|
|
|
|
|
|
|
import com.engine.organization.mapper.comp.CompExtMapper;
|
|
|
|
import com.engine.organization.mapper.comp.CompMapper;
|
|
|
|
import com.engine.organization.mapper.comp.CompMapper;
|
|
|
|
import com.engine.organization.mapper.extend.ExtendGroupMapper;
|
|
|
|
import com.engine.organization.mapper.extend.ExtendGroupMapper;
|
|
|
|
import com.engine.organization.mapper.extend.ExtendInfoMapper;
|
|
|
|
import com.engine.organization.mapper.extend.ExtendInfoMapper;
|
|
|
@ -30,6 +33,7 @@ import com.engine.organization.util.page.PageUtil;
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
import weaver.crm.Maint.SectorInfoComInfo;
|
|
|
|
import weaver.crm.Maint.SectorInfoComInfo;
|
|
|
|
import weaver.general.StringUtil;
|
|
|
|
import weaver.general.StringUtil;
|
|
|
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
import weaver.hrm.resource.ResourceComInfo;
|
|
|
|
import weaver.hrm.resource.ResourceComInfo;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
@ -54,6 +58,14 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
return MapperProxyFactory.getProxy(ExtendInfoMapper.class);
|
|
|
|
return MapperProxyFactory.getProxy(ExtendInfoMapper.class);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private CompExtDTMapper getCompExtDTMapper() {
|
|
|
|
|
|
|
|
return MapperProxyFactory.getProxy(CompExtDTMapper.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private CompExtMapper getCompExtMapper() {
|
|
|
|
|
|
|
|
return MapperProxyFactory.getProxy(CompExtMapper.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Map<String, Object> listPage(CompSearchParam params) {
|
|
|
|
public Map<String, Object> listPage(CompSearchParam params) {
|
|
|
@ -93,12 +105,50 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
return datas;
|
|
|
|
return datas;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public int saveBaseComp(CompSearchParam params) {
|
|
|
|
|
|
|
|
List<CompPO> list = getCompMapper().listByNo(Util.null2String(params.getCompNo()));
|
|
|
|
|
|
|
|
OrganizationAssert.isEmpty(list, "编号不允许重复");
|
|
|
|
|
|
|
|
CompPO compPO = CompBO.convertParamToPO(params, (long) user.getUID());
|
|
|
|
|
|
|
|
return getCompMapper().insertIgnoreNull(compPO);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int updateForbiddenTagById(CompSearchParam params) {
|
|
|
|
public int updateForbiddenTagById(CompSearchParam params) {
|
|
|
|
CompPO compPO = CompPO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build();
|
|
|
|
CompPO compPO = CompPO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build();
|
|
|
|
return getCompMapper().updateForbiddenTagById(compPO);
|
|
|
|
return getCompMapper().updateForbiddenTagById(compPO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public int updateComp(Map<String, Object> params) {
|
|
|
|
|
|
|
|
System.out.println(params);
|
|
|
|
|
|
|
|
CompSearchParam param = JSONObject.parseObject(JSONObject.toJSONString(params), CompSearchParam.class);
|
|
|
|
|
|
|
|
System.out.println(param);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO 更新主表数据
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取分部明细表的所有拓展列
|
|
|
|
|
|
|
|
String tableName = "JCL_ORG_COMPEXT_DT1";
|
|
|
|
|
|
|
|
List<ExtendInfoPO> infoPOList = getExtendInfoMapper().listFields("1", "", tableName);
|
|
|
|
|
|
|
|
List<String> dtFields = infoPOList.stream().map(ExtendInfoPO::getFieldName).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> insertList = new ArrayList<>();
|
|
|
|
|
|
|
|
System.out.println(dtFields);
|
|
|
|
|
|
|
|
// TODO 删除明细表数据
|
|
|
|
|
|
|
|
// 处理明细表数据
|
|
|
|
|
|
|
|
int rowNum = Util.getIntValue((String) params.get("rownum"));
|
|
|
|
|
|
|
|
for (int i = 0; i < rowNum; i++) {
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
|
|
|
for (String dtField : dtFields) {
|
|
|
|
|
|
|
|
map.put(dtField, params.get(dtField + "_" + i));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
insertList.add(map);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
System.out.println(insertList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int deleteByIds(Collection<Long> ids) {
|
|
|
|
public int deleteByIds(Collection<Long> ids) {
|
|
|
|
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
|
|
|
|
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
|
|
|
@ -186,7 +236,7 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Map<String, Object> getCompBaseForm(Map<String, Object> params) {
|
|
|
|
public Map<String, Object> getCompBaseForm(Map<String, Object> params) {
|
|
|
|
OrganizationAssert.notNull(params.get("operateType"), "请标识操作类型");
|
|
|
|
OrganizationAssert.notNull(params.get("viewAttr"), "请标识操作类型");
|
|
|
|
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
|
|
|
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
|
|
|
// 编号
|
|
|
|
// 编号
|
|
|
|
SearchConditionItem compNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "编号", "compNo");
|
|
|
|
SearchConditionItem compNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "编号", "compNo");
|
|
|
@ -207,7 +257,7 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
// 负责人
|
|
|
|
// 负责人
|
|
|
|
SearchConditionItem compPrincipalItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "负责人", "1", "compPrincipal", "");
|
|
|
|
SearchConditionItem compPrincipalItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "负责人", "1", "compPrincipal", "");
|
|
|
|
// 说明
|
|
|
|
// 说明
|
|
|
|
SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 60, "说明", "description");
|
|
|
|
SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 60, "说明", "description");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
conditionItems.add(compNoItem);
|
|
|
|
conditionItems.add(compNoItem);
|
|
|
@ -219,44 +269,43 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
conditionItems.add(compPrincipalItem);
|
|
|
|
conditionItems.add(compPrincipalItem);
|
|
|
|
conditionItems.add(descriptionItem);
|
|
|
|
conditionItems.add(descriptionItem);
|
|
|
|
|
|
|
|
|
|
|
|
// 0 查看 1新增 2编辑
|
|
|
|
// 2编辑 1查看
|
|
|
|
int operateType = Integer.parseInt((String) params.get("operateType"));
|
|
|
|
int viewAttr = Integer.parseInt((String) params.get("viewAttr"));
|
|
|
|
long id = Long.parseLong((String) params.get("id"));
|
|
|
|
long id = Long.parseLong((String) params.get("id"));
|
|
|
|
// 编辑、查看状态赋值,设置只读状态
|
|
|
|
// 编辑、查看状态赋值,设置只读状态
|
|
|
|
if (1 != operateType) {
|
|
|
|
|
|
|
|
// 赋值
|
|
|
|
|
|
|
|
CompPO compPO = getCompMapper().listById(id);
|
|
|
|
|
|
|
|
OrganizationAssert.notNull(compPO, "数据不存在或数据已删除");
|
|
|
|
|
|
|
|
compNoItem.setValue(compPO.getCompNo());
|
|
|
|
|
|
|
|
compNameItem.setValue(compPO.getCompName());
|
|
|
|
|
|
|
|
compNameShortItem.setValue(compPO.getCompNameShort());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// compBrowserItem
|
|
|
|
|
|
|
|
if (null != compPO.getParentCompany()) {
|
|
|
|
|
|
|
|
BrowserBean compBrowserBean = compBrowserItem.getBrowserConditionParam();
|
|
|
|
|
|
|
|
compBrowserBean.setReplaceDatas(creatReplaceDatas(compPO.getParentCompany(), getCompMapper().listById(compPO.getParentCompany()).getCompName()));
|
|
|
|
|
|
|
|
compBrowserItem.setBrowserConditionParam(compBrowserBean);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
orgCodeItem.setValue(compPO.getOrgCode());
|
|
|
|
|
|
|
|
// industryItem
|
|
|
|
|
|
|
|
BrowserBean industryBean = industryItem.getBrowserConditionParam();
|
|
|
|
|
|
|
|
industryBean.setReplaceDatas(creatReplaceDatas(compPO.getIndustry(), new SectorInfoComInfo().getSectorInfoname(compPO.getIndustry() + "")));
|
|
|
|
|
|
|
|
industryItem.setBrowserConditionParam(industryBean);
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
// compPrincipalItem
|
|
|
|
|
|
|
|
BrowserBean PrincipalBean = compPrincipalItem.getBrowserConditionParam();
|
|
|
|
|
|
|
|
PrincipalBean.setReplaceDatas(creatReplaceDatas(compPO.getCompPrincipal(), new ResourceComInfo().getLastname(compPO.getCompPrincipal() + "")));
|
|
|
|
|
|
|
|
compPrincipalItem.setBrowserConditionParam(PrincipalBean);
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
descriptionItem.setValue(compPO.getDescription());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查看,全部置位只读
|
|
|
|
// 赋值
|
|
|
|
if (0 == operateType) {
|
|
|
|
CompPO compPO = getCompMapper().listById(id);
|
|
|
|
for (SearchConditionItem item : conditionItems) {
|
|
|
|
OrganizationAssert.notNull(compPO, "数据不存在或数据已删除");
|
|
|
|
item.setViewAttr(1);
|
|
|
|
compNoItem.setValue(compPO.getCompNo());
|
|
|
|
}
|
|
|
|
compNameItem.setValue(compPO.getCompName());
|
|
|
|
|
|
|
|
compNameShortItem.setValue(compPO.getCompNameShort());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// compBrowserItem
|
|
|
|
|
|
|
|
if (null != compPO.getParentCompany()) {
|
|
|
|
|
|
|
|
BrowserBean compBrowserBean = compBrowserItem.getBrowserConditionParam();
|
|
|
|
|
|
|
|
compBrowserBean.setReplaceDatas(creatReplaceDatas(compPO.getParentCompany(), getCompMapper().listById(compPO.getParentCompany()).getCompName()));
|
|
|
|
|
|
|
|
compBrowserItem.setBrowserConditionParam(compBrowserBean);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
orgCodeItem.setValue(compPO.getOrgCode());
|
|
|
|
|
|
|
|
// industryItem
|
|
|
|
|
|
|
|
BrowserBean industryBean = industryItem.getBrowserConditionParam();
|
|
|
|
|
|
|
|
industryBean.setReplaceDatas(creatReplaceDatas(compPO.getIndustry(), new SectorInfoComInfo().getSectorInfoname(compPO.getIndustry() + "")));
|
|
|
|
|
|
|
|
industryItem.setBrowserConditionParam(industryBean);
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
// compPrincipalItem
|
|
|
|
|
|
|
|
BrowserBean PrincipalBean = compPrincipalItem.getBrowserConditionParam();
|
|
|
|
|
|
|
|
PrincipalBean.setReplaceDatas(creatReplaceDatas(compPO.getCompPrincipal(), new ResourceComInfo().getLastname(compPO.getCompPrincipal() + "")));
|
|
|
|
|
|
|
|
compPrincipalItem.setBrowserConditionParam(PrincipalBean);
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
descriptionItem.setValue(compPO.getDescription());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查看,全部置位只读
|
|
|
|
|
|
|
|
if (1 == viewAttr) {
|
|
|
|
|
|
|
|
for (SearchConditionItem item : conditionItems) {
|
|
|
|
|
|
|
|
item.setViewAttr(viewAttr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -276,7 +325,7 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
resultMap.put("buttons", buttonsMap);
|
|
|
|
resultMap.put("buttons", buttonsMap);
|
|
|
|
resultMap.put("conditions", conditionsMap);
|
|
|
|
resultMap.put("conditions", conditionsMap);
|
|
|
|
resultMap.put("id", id);
|
|
|
|
resultMap.put("id", id);
|
|
|
|
resultMap.put("tables", getExtendTables(id, operateType, false));
|
|
|
|
resultMap.put("tables", getExtendTables(id, viewAttr, false));
|
|
|
|
Map<String, Object> apiDatas = new HashMap<>();
|
|
|
|
Map<String, Object> apiDatas = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
|
|
apiDatas.put("result", resultMap);
|
|
|
|
apiDatas.put("result", resultMap);
|
|
|
@ -284,6 +333,67 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
return apiDatas;
|
|
|
|
return apiDatas;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public Map<String, Object> getCompExtForm(Map<String, Object> params) {
|
|
|
|
|
|
|
|
Map<String, Object> apiDatas = new HashMap<>();
|
|
|
|
|
|
|
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
|
|
|
|
|
|
|
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
|
|
|
|
|
|
|
// 分组名称
|
|
|
|
|
|
|
|
String groupId = (String) params.get("viewCondition");
|
|
|
|
|
|
|
|
// 2编辑 1查看
|
|
|
|
|
|
|
|
int viewAttr = Integer.parseInt((String) params.get("viewAttr"));
|
|
|
|
|
|
|
|
long id = Long.parseLong((String) params.get("id"));
|
|
|
|
|
|
|
|
OrganizationAssert.notNull(groupId, "请选择对应的拓展页");
|
|
|
|
|
|
|
|
String tableName = "JCL_ORG_COMPEXT";
|
|
|
|
|
|
|
|
List<ExtendInfoPO> infoPOList = getExtendInfoMapper().listFields("1", groupId, tableName);
|
|
|
|
|
|
|
|
String fields = infoPOList.stream().map(ExtendInfoPO::getFieldName).collect(Collectors.joining(","));
|
|
|
|
|
|
|
|
Map<String, Object> compExtMap = getCompExtMapper().listCompExt(tableName, fields, id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 组装拓展页内容
|
|
|
|
|
|
|
|
for (ExtendInfoPO extendInfoPO : infoPOList) {
|
|
|
|
|
|
|
|
SearchConditionItem item = null;
|
|
|
|
|
|
|
|
switch (ExtendInfoBO.getFieldhtmltype(extendInfoPO.getControlType() + "")) {
|
|
|
|
|
|
|
|
case INPUT:
|
|
|
|
|
|
|
|
item = OrganizationFormItemUtil.inputItem(user, 2, 16, 1, 50, extendInfoPO.getFieldNameDesc(), extendInfoPO.getFieldName());
|
|
|
|
|
|
|
|
item.setValue(compExtMap.get(extendInfoPO.getFieldName()));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TEXTAREA:
|
|
|
|
|
|
|
|
item = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 1, 60, extendInfoPO.getFieldNameDesc(), extendInfoPO.getFieldName());
|
|
|
|
|
|
|
|
item.setValue(compExtMap.get(extendInfoPO.getFieldName()));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BROWSER:
|
|
|
|
|
|
|
|
// TODO
|
|
|
|
|
|
|
|
// item=OrganizationFormItemUtil.browserItem()
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CHECKBOX:
|
|
|
|
|
|
|
|
item = OrganizationFormItemUtil.checkboxItem(user, 2, 16, 1, true, extendInfoPO.getFieldNameDesc(), extendInfoPO.getFieldName());
|
|
|
|
|
|
|
|
item.setValue(compExtMap.get(extendInfoPO.getFieldName()));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SELECT:
|
|
|
|
|
|
|
|
// TODO
|
|
|
|
|
|
|
|
// item = OrganizationFormItemUtil.selectItem();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FILEUPLOAD:
|
|
|
|
|
|
|
|
case TEXT:
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (null != item) {
|
|
|
|
|
|
|
|
// 根据viewAttr设置编辑或只读
|
|
|
|
|
|
|
|
item.setViewAttr(viewAttr);
|
|
|
|
|
|
|
|
// 是否必填
|
|
|
|
|
|
|
|
if (1 == extendInfoPO.getIsrequired()) {
|
|
|
|
|
|
|
|
item.setViewAttr(3);
|
|
|
|
|
|
|
|
item.setRules("required|string");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
conditionItems.add(item);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
addGroups.add(new SearchConditionGroup(getExtendGroupMapper().getGroupNameById(groupId), true, conditionItems));
|
|
|
|
|
|
|
|
apiDatas.put("condition", addGroups);
|
|
|
|
|
|
|
|
return apiDatas;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Map<String, Object> getCompSaveForm() {
|
|
|
|
public Map<String, Object> getCompSaveForm() {
|
|
|
|
Map<String, Object> apiDatas = new HashMap<>();
|
|
|
|
Map<String, Object> apiDatas = new HashMap<>();
|
|
|
@ -308,7 +418,7 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
// 负责人
|
|
|
|
// 负责人
|
|
|
|
SearchConditionItem compPrincipalItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "负责人", "1", "compPrincipal", "");
|
|
|
|
SearchConditionItem compPrincipalItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "负责人", "1", "compPrincipal", "");
|
|
|
|
// 说明
|
|
|
|
// 说明
|
|
|
|
SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 60, "说明", "description");
|
|
|
|
SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 60, "说明", "description");
|
|
|
|
|
|
|
|
|
|
|
|
conditionItems.add(compNoItem);
|
|
|
|
conditionItems.add(compNoItem);
|
|
|
|
conditionItems.add(compNameItem);
|
|
|
|
conditionItems.add(compNameItem);
|
|
|
@ -378,7 +488,7 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private List<Map<String, Object>> getExtendTables(long id, int operateType, boolean showLabel) {
|
|
|
|
private List<Map<String, Object>> getExtendTables(long id, int viewAttr, boolean showLabel) {
|
|
|
|
List<Map<String, Object>> tables = new ArrayList<>();
|
|
|
|
List<Map<String, Object>> tables = new ArrayList<>();
|
|
|
|
String tableName = "JCL_ORG_COMPEXT_DT1";
|
|
|
|
String tableName = "JCL_ORG_COMPEXT_DT1";
|
|
|
|
// 查询所有分布模块,拓展明细表信息
|
|
|
|
// 查询所有分布模块,拓展明细表信息
|
|
|
@ -390,11 +500,11 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
tableMap.put("hide", false);
|
|
|
|
tableMap.put("hide", false);
|
|
|
|
tableMap.put("tabname", getExtendGroupMapper().getGroupNameById(entry.getKey() + ""));
|
|
|
|
tableMap.put("tabname", getExtendGroupMapper().getGroupNameById(entry.getKey() + ""));
|
|
|
|
Map<String, Object> tabinfoMap = new HashMap<>();
|
|
|
|
Map<String, Object> tabinfoMap = new HashMap<>();
|
|
|
|
tabinfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(entry.getValue(), operateType, showLabel));
|
|
|
|
tabinfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(entry.getValue(), viewAttr, showLabel));
|
|
|
|
tabinfoMap.put("rownum", "rownum");
|
|
|
|
tabinfoMap.put("rownum", "rownum");
|
|
|
|
|
|
|
|
|
|
|
|
String fields = entry.getValue().stream().map(ExtendInfoPO::getFieldName).collect(Collectors.joining(","));
|
|
|
|
String fields = entry.getValue().stream().map(ExtendInfoPO::getFieldName).collect(Collectors.joining(","));
|
|
|
|
tabinfoMap.put("datas", getCompMapper().listCompExtDT(tableName, id, fields));
|
|
|
|
tabinfoMap.put("datas", getCompExtDTMapper().listCompExtDT(tableName, id, fields));
|
|
|
|
tableMap.put("tabinfo", tabinfoMap);
|
|
|
|
tableMap.put("tabinfo", tabinfoMap);
|
|
|
|
tables.add(tableMap);
|
|
|
|
tables.add(tableMap);
|
|
|
|
}
|
|
|
|
}
|
|
|
|