添加字段分组表

pull/77/MERGE^2
dxfeng 3 years ago
parent 61590c804d
commit 5b0864d503

@ -18,7 +18,7 @@ public interface ExtendTitleMapper {
* @param groupId * @param groupId
* @return * @return
*/ */
List<ExtendTitlePO> getTitlesByGroupID(@Param("groupId") String groupId); List<ExtendTitlePO> getTitlesByGroupID(@Param("groupId") Long groupId);
List<ExtendTitlePO> getTitlesByIds(@Param("ids") Collection<Long> ids); List<ExtendTitlePO> getTitlesByIds(@Param("ids") Collection<Long> ids);
} }

@ -34,7 +34,7 @@
FROM FROM
jcl_field_extendtitle t jcl_field_extendtitle t
WHERE t.delete_type = 0 WHERE t.delete_type = 0
<if test=" groupId != null and groupId != '' "> <if test=" groupId != null ">
and group_id = #{groupId} and group_id = #{groupId}
</if> </if>
order by show_order order by show_order

@ -239,7 +239,7 @@ public class CompServiceImpl extends Service implements CompService {
if ("0".equals(groupId)) { if ("0".equals(groupId)) {
groupId = GROUP_ID.toString(); groupId = GROUP_ID.toString();
} }
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(groupId); List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId));
if (CollectionUtils.isNotEmpty(extendTitles)) { if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) { for (ExtendTitlePO extendTitle : extendTitles) {
@ -268,7 +268,7 @@ public class CompServiceImpl extends Service implements CompService {
HasRightUtil.hasRight(user, RIGHT_NAME, false); HasRightUtil.hasRight(user, RIGHT_NAME, false);
Map<String, Object> apiDatas = new HashMap<>(); Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionGroup> addGroups = new ArrayList<>(); List<SearchConditionGroup> addGroups = new ArrayList<>();
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID + ""); List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
if (CollectionUtils.isNotEmpty(extendTitles)) { if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) { for (ExtendTitlePO extendTitle : extendTitles) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_COMP, 2, extendTitle.getId() + "", "comp_no", RuleCodeType.SUBCOMPANY.getValue()))); addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_COMP, 2, extendTitle.getId() + "", "comp_no", RuleCodeType.SUBCOMPANY.getValue())));

@ -17,7 +17,7 @@ import com.engine.organization.entity.department.dto.DepartmentListDTO;
import com.engine.organization.entity.department.param.*; import com.engine.organization.entity.department.param.*;
import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.department.po.DepartmentPO;
import com.engine.organization.entity.department.vo.SingleDeptTreeVO; import com.engine.organization.entity.department.vo.SingleDeptTreeVO;
import com.engine.organization.entity.extend.po.ExtendGroupPO; import com.engine.organization.entity.extend.po.ExtendTitlePO;
import com.engine.organization.entity.job.bo.JobBO; import com.engine.organization.entity.job.bo.JobBO;
import com.engine.organization.entity.job.po.JobPO; import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.job.vo.SingleJobTreeVO; import com.engine.organization.entity.job.vo.SingleJobTreeVO;
@ -25,7 +25,7 @@ import com.engine.organization.entity.searchtree.SearchTree;
import com.engine.organization.entity.searchtree.SearchTreeParams; import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.mapper.extend.ExtendGroupMapper; import com.engine.organization.mapper.extend.ExtendTitleMapper;
import com.engine.organization.mapper.job.JobMapper; import com.engine.organization.mapper.job.JobMapper;
import com.engine.organization.service.DepartmentService; import com.engine.organization.service.DepartmentService;
import com.engine.organization.service.ExtService; import com.engine.organization.service.ExtService;
@ -91,8 +91,8 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
return MapperProxyFactory.getProxy(CompMapper.class); return MapperProxyFactory.getProxy(CompMapper.class);
} }
private ExtendGroupMapper getExtendGroupMapper() { private ExtendTitleMapper getExtendTitleMapper() {
return MapperProxyFactory.getProxy(ExtendGroupMapper.class); return MapperProxyFactory.getProxy(ExtendTitleMapper.class);
} }
private ExtService getExtService(User user) { private ExtService getExtService(User user) {
@ -293,10 +293,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if ("0".equals(groupId)) { if ("0".equals(groupId)) {
groupId = GROUP_ID.toString(); groupId = GROUP_ID.toString();
} }
List<ExtendGroupPO> extendGroupPOS = getExtendGroupMapper().listGroupByPid(Long.parseLong(groupId)); List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId));
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(extendGroupPOS)) { if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendGroupPO extendGroupPO : extendGroupPOS) { for (ExtendTitlePO extendTitle : extendTitles) {
addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_DEPTEXT : JCL_ORG_DEPT, viewAttr, id, extendGroupPO.getId().toString(), "dept_no"))); addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_DEPTEXT : JCL_ORG_DEPT, viewAttr, id, extendTitle.getId().toString(), "dept_no")));
} }
} }
@ -320,10 +320,11 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
HasRightUtil.hasRight(user, RIGHT_NAME, false); HasRightUtil.hasRight(user, RIGHT_NAME, false);
Map<String, Object> apiDatas = new HashMap<>(); Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionGroup> addGroups = new ArrayList<>(); List<SearchConditionGroup> addGroups = new ArrayList<>();
List<ExtendGroupPO> extendGroupPOS = getExtendGroupMapper().listGroupByPid(GROUP_ID); List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(extendGroupPOS)) {
for (ExtendGroupPO extendGroupPO : extendGroupPOS) { if (CollectionUtils.isNotEmpty(extendTitles)) {
addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_DEPT, 2, extendGroupPO.getId().toString(), "dept_no", RuleCodeType.DEPARTMENT.getValue()))); for (ExtendTitlePO extendTitle : extendTitles) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_DEPT, 2, extendTitle.getId().toString(), "dept_no", RuleCodeType.DEPARTMENT.getValue())));
} }
} }
apiDatas.put("condition", addGroups); apiDatas.put("condition", addGroups);

@ -17,8 +17,8 @@ import com.engine.organization.entity.department.bo.DepartmentBO;
import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.department.po.DepartmentPO;
import com.engine.organization.entity.employee.vo.EmployeeTableVO; import com.engine.organization.entity.employee.vo.EmployeeTableVO;
import com.engine.organization.entity.extend.bo.ExtendInfoBO; import com.engine.organization.entity.extend.bo.ExtendInfoBO;
import com.engine.organization.entity.extend.po.ExtendGroupPO;
import com.engine.organization.entity.extend.po.ExtendInfoPO; import com.engine.organization.entity.extend.po.ExtendInfoPO;
import com.engine.organization.entity.extend.po.ExtendTitlePO;
import com.engine.organization.entity.job.bo.JobBO; import com.engine.organization.entity.job.bo.JobBO;
import com.engine.organization.entity.job.dto.JobListDTO; import com.engine.organization.entity.job.dto.JobListDTO;
import com.engine.organization.entity.job.param.JobSearchParam; import com.engine.organization.entity.job.param.JobSearchParam;
@ -29,13 +29,11 @@ import com.engine.organization.entity.searchtree.SearchTree;
import com.engine.organization.entity.searchtree.SearchTreeParams; import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.mapper.extend.ExtendGroupMapper; import com.engine.organization.mapper.extend.ExtendTitleMapper;
import com.engine.organization.mapper.job.JobDTMapper; import com.engine.organization.mapper.job.JobDTMapper;
import com.engine.organization.mapper.job.JobMapper; import com.engine.organization.mapper.job.JobMapper;
import com.engine.organization.mapper.scheme.GradeMapper; import com.engine.organization.mapper.scheme.GradeMapper;
import com.engine.organization.mapper.scheme.LevelMapper; import com.engine.organization.mapper.scheme.LevelMapper;
import com.engine.organization.mapper.scheme.SchemeMapper;
import com.engine.organization.mapper.sequence.SequenceMapper;
import com.engine.organization.service.ExtService; import com.engine.organization.service.ExtService;
import com.engine.organization.service.JobService; import com.engine.organization.service.JobService;
import com.engine.organization.util.HasRightUtil; import com.engine.organization.util.HasRightUtil;
@ -117,16 +115,8 @@ public class JobServiceImpl extends Service implements JobService {
return MapperProxyFactory.getProxy(DepartmentMapper.class); return MapperProxyFactory.getProxy(DepartmentMapper.class);
} }
private SequenceMapper getSequenceMapper() { private ExtendTitleMapper getExtendTitleMapper() {
return MapperProxyFactory.getProxy(SequenceMapper.class); return MapperProxyFactory.getProxy(ExtendTitleMapper.class);
}
private SchemeMapper getSchemeMapper() {
return MapperProxyFactory.getProxy(SchemeMapper.class);
}
private ExtendGroupMapper getExtendGroupMapper() {
return MapperProxyFactory.getProxy(ExtendGroupMapper.class);
} }
private ExtService getExtService(User user) { private ExtService getExtService(User user) {
@ -261,10 +251,10 @@ public class JobServiceImpl extends Service implements JobService {
HasRightUtil.hasRight(user, RIGHT_NAME, false); HasRightUtil.hasRight(user, RIGHT_NAME, false);
Map<String, Object> apiDatas = new HashMap<>(); Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionGroup> addGroups = new ArrayList<>(); List<SearchConditionGroup> addGroups = new ArrayList<>();
List<ExtendGroupPO> extendGroupPOS = getExtendGroupMapper().listGroupByPid(GROUP_ID); List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(extendGroupPOS)) { if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendGroupPO extendGroupPO : extendGroupPOS) { for (ExtendTitlePO extendTitle : extendTitles) {
addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_JOB, 2, extendGroupPO.getId().toString(), "job_no", RuleCodeType.JOBTITLES.getValue()))); addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_JOB, 2, extendTitle.getId().toString(), "job_no", RuleCodeType.JOBTITLES.getValue())));
} }
} }
apiDatas.put("condition", addGroups); apiDatas.put("condition", addGroups);
@ -288,10 +278,10 @@ public class JobServiceImpl extends Service implements JobService {
if ("0".equals(groupId)) { if ("0".equals(groupId)) {
groupId = GROUP_ID.toString(); groupId = GROUP_ID.toString();
} }
List<ExtendGroupPO> extendGroupPOS = getExtendGroupMapper().listGroupByPid(Long.parseLong(groupId)); List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(extendGroupPOS)) { if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendGroupPO extendGroupPO : extendGroupPOS) { for (ExtendTitlePO extendTitle : extendTitles) {
addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_JOBEXT : JCL_ORG_JOB, viewAttr, id, extendGroupPO.getId().toString(), "job_no"))); addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_JOBEXT : JCL_ORG_JOB, viewAttr, id, extendTitle.getId().toString(), "job_no")));
} }
} }
HashMap<String, Object> resultMap = new HashMap<>(); HashMap<String, Object> resultMap = new HashMap<>();

Loading…
Cancel
Save