!114 组织人事测试、优化

Merge pull request !114 from dxfeng/feature/dxf
pull/115/MERGE
dxfeng 3 years ago committed by Gitee
commit a0fa5282a7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -105,6 +105,7 @@ CREATE TABLE JCL_ORG_COMP (
comp_principal int null,
description text NULL,
forbidden_tag int NULL,
show_order int NULL,
is_used int null,
creator int null,
delete_type int null,
@ -294,6 +295,64 @@ CREATE TABLE JCL_ORG_JOBEXT_DT1 (
CONSTRAINT JCL_ORG_JOBEXT_DT1_PK PRIMARY KEY (id)
);
-- JCL_ORG_HRMRESOURCE
CREATE TABLE JCL_ORG_HRMRESOURCE (
id int auto_increment NOT NULL,
work_code varchar(60) null,
login_id varchar(60) null,
last_name varchar(60) null,
sex int null,
account_type int null,
belong_to int null,
company_id int null,
department_id int null,
job_activity int null,
job_title int null,
job_call int null,
job_level int null,
job_group_id int null,
job_activity_desc varchar(200) null,
status int null,
system_language int null,
resource_image_id varchar(1000) null,
messager_url varchar(1000) null,
location_id int null,
manager_id int null,
assistant_id int null,
mobile varchar(60) null,
telephone varchar(60) null,
mobile_call varchar(60) null,
fax varchar(60) null,
email varchar(60) null,
workroom varchar(60) null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_HRMRESOURCE_PK PRIMARY KEY (id)
);
-- JCL_ORG_HRMRESOURCEEXT
CREATE TABLE JCL_ORG_HRMRESOURCEEXT (
id int NOT NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_HRMRESOURCEEXT_PK PRIMARY KEY (id)
);
-- JCL_ORG_HRMRESOURCEEXT_DT1
CREATE TABLE JCL_ORG_HRMRESOURCEEXT_DT1 (
id int auto_increment NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_HRMRESOURCEEXT_DT1_PK PRIMARY KEY (id)
);
-- JCL_ORG_STAFFPLAN
CREATE TABLE JCL_ORG_STAFFPLAN (

@ -107,6 +107,7 @@ CREATE TABLE JCL_ORG_COMP (
COMP_PRINCIPAL NUMBER NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
SHOW_ORDER NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,

@ -105,6 +105,7 @@ CREATE TABLE JCL_ORG_COMP (
comp_principal int null,
description text COLLATE Chinese_PRC_CI_AS NULL,
forbidden_tag int NULL,
show_order int null,
is_used int null,
creator int null,
delete_type int null,

@ -11,4 +11,6 @@ public @interface TableTitle {
String dataIndex();
String key();
boolean display() default true;
String width() default "";
boolean sorter() default false;
}

@ -38,6 +38,7 @@ public class CompBO {
.orgCode(e.getOrgCode())
.industry(new SectorInfoComInfo().getSectorInfoname(e.getIndustry() + ""))
.compPrincipal(getUserNameById(e.getCompPrincipal() + ""))
.showOrder(e.getShowOrder())
.forbiddenTag(e.getForbiddenTag())
.build()).collect(Collectors.toList());
Map<Long, List<CompListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentCompany() && 0 != item.getParentCompany()).collect(Collectors.groupingBy(CompListDTO::getParentCompany));

@ -1,7 +1,6 @@
package com.engine.organization.entity.company.dto;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableOperate;
import com.engine.organization.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -20,12 +19,7 @@ import java.util.List;
@Builder
@NoArgsConstructor
@AllArgsConstructor
@OrganizationTable(pageId = "2c66b3a4-d4f8-11ec-9774-00ffcbed7508",
operates = {
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除"),
@OrganizationTableOperate(index = "2", text = "查看部门")
})
@OrganizationTable(pageId = "2c66b3a4-d4f8-11ec-9774-00ffcbed7508")
public class CompListDTO {
/**
* id
@ -44,7 +38,7 @@ public class CompListDTO {
/**
*
*/
@TableTitle(title = "编号", dataIndex = "compNo", key = "compNo")
@TableTitle(title = "编号", dataIndex = "compNo", key = "compNo",sorter = true)
private String compNo;
/**
@ -56,7 +50,7 @@ public class CompListDTO {
/**
*
*/
@TableTitle(title = "上级公司", dataIndex = "parentCompName", key = "parentCompName")
@TableTitle(title = "上级分部", dataIndex = "parentCompName", key = "parentCompName")
private String parentCompName;
private Long parentCompany;
@ -79,6 +73,9 @@ public class CompListDTO {
@TableTitle(title = "负责人", dataIndex = "compPrincipal", key = "compPrincipal")
private String compPrincipal;
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder")
private Integer showOrder;
/**
*
*/

@ -69,6 +69,11 @@ public class CompPO {
*/
private Integer forbiddenTag;
/**
*
*/
private Integer showOrder;
private Long creator;
private int deleteType;
private Date createTime;

@ -2,7 +2,6 @@ package com.engine.organization.entity.department.dto;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableOperate;
import com.engine.organization.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -22,15 +21,7 @@ import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
@OrganizationTable(pageId = "96f2bb0d-da73-11ec-a0da-00ffcbed7508",
tableType = WeaTableType.NONE,
operates = {
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除"),
@OrganizationTableOperate(index = "2", text = "合并"),
@OrganizationTableOperate(index = "3", text = "转移"),
@OrganizationTableOperate(index = "4", text = "联查岗位"),
@OrganizationTableOperate(index = "4", text = "联查人员")
})
tableType = WeaTableType.NONE)
public class DepartmentListDTO {
private Long id;
@ -38,11 +29,6 @@ public class DepartmentListDTO {
*
*/
private Integer isUsed;
/**
*
*/
@TableTitle(title = "编号", dataIndex = "deptNo", key = "deptNo")
private String deptNo;
/**
*
@ -50,6 +36,12 @@ public class DepartmentListDTO {
@TableTitle(title = "名称", dataIndex = "deptName", key = "deptName")
private String deptName;
/**
*
*/
@TableTitle(title = "编号", dataIndex = "deptNo", key = "deptNo")
private String deptNo;
/**
*
*/

@ -29,7 +29,8 @@ import lombok.NoArgsConstructor;
" t.description," +
" t.forbidden_tag",
fromSql = " from jcl_org_post_info t inner join jcl_org_post a on t.post_id = a.id ",
orderby = "id desc",
orderby = "post_info_no",
sortway = "asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", text = "编辑"),
@ -45,7 +46,7 @@ public class PostInfoTableVO {
/**
*
*/
@OrganizationTableColumn(text = "编号", width = "20%", column = "post_info_no")
@OrganizationTableColumn(text = "编号", width = "20%", column = "post_info_no", orderkey = "post_info_no")
private String postInfoNo;
/**
*

@ -133,4 +133,10 @@ public interface CompMapper {
* @param ids
*/
int deleteByIds(@Param("ids") Collection<Long> ids);
/**
*
* @return
*/
int getMaxShowOrder();
}

@ -12,6 +12,7 @@
<result column="comp_principal" property="compPrincipal"/>
<result column="description" property="description"/>
<result column="forbidden_tag" property="forbiddenTag"/>
<result column="show_order" property="showOrder"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="create_time" property="createTime"/>
@ -32,6 +33,7 @@
, t.comp_principal
, t.description
, t.forbidden_tag
, t.show_order
, t.creator
, t.delete_type
, t.create_time
@ -91,6 +93,9 @@
description,
</if>
forbidden_tag,
<if test="showOrder != null ">
show_order,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="creator != null">
@ -130,6 +135,7 @@
#{description},
</if>
0,
#{showOrder},
</trim>
</insert>
@ -138,7 +144,7 @@
<include refid="baseColumns"/>
FROM
jcl_org_comp t
WHERE t.delete_type = 0
WHERE t.delete_type = 0 order by show_order
</select>
<select id="listParent" resultMap="BaseResultMap">
@ -251,6 +257,10 @@
from JCL_ORG_STAFF
where delete_type = 0
</select>
<select id="getMaxShowOrder" resultType="java.lang.Integer">
select max(show_order)
from jcl_org_comp
</select>
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.sequence.po.SequencePO">
update jcl_org_comp
@ -282,6 +292,7 @@
industry=#{industry},
comp_principal=#{compPrincipal},
description=#{description},
show_order=#{showOrder},
</set>
WHERE id = #{id} AND delete_type = 0
</update>

@ -103,7 +103,7 @@
SELECT
<include refid="baseColumns"/>
FROM jcl_org_dept t
WHERE t.delete_type = 0
WHERE t.delete_type = 0 order by show_order
</select>
<select id="listByNo" resultType="com.engine.organization.entity.department.po.DepartmentPO">
select

@ -11,11 +11,13 @@ import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.hrm.entity.RuleCodeType;
import com.engine.organization.component.OrganizationWeaTable;
import com.engine.organization.entity.codesetting.po.CodeRulePO;
import com.engine.organization.entity.company.bo.CompBO;
import com.engine.organization.entity.company.dto.CompListDTO;
import com.engine.organization.entity.company.param.CompSearchParam;
import com.engine.organization.entity.company.po.CompPO;
import com.engine.organization.entity.extend.po.ExtendTitlePO;
import com.engine.organization.mapper.codesetting.CodeRuleMapper;
import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.extend.ExtendTitleMapper;
import com.engine.organization.service.CompService;
@ -30,6 +32,7 @@ import com.engine.organization.util.page.Column;
import com.engine.organization.util.page.PageInfo;
import com.engine.organization.util.page.PageUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import weaver.general.StringUtil;
import weaver.general.Util;
import weaver.hrm.User;
@ -135,11 +138,13 @@ public class CompServiceImpl extends Service implements CompService {
public int saveBaseComp(Map<String, Object> params) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
String compNo = (String) params.get("comp_no");
compNo = CodeRuleUtil.generateCode(RuleCodeType.SUBCOMPANY, compNo);
List<CompPO> list = getCompMapper().listByNo(Util.null2String(compNo));
OrganizationAssert.isEmpty(list, "编号不允许重复");
// 判断是否开启自动编号
compNo = repeatDetermine(compNo);
params.put("comp_no", compNo);
if (StringUtils.isBlank((String) params.get("show_order"))) {
int maxShowOrder = getCompMapper().getMaxShowOrder();
params.put("show_order", maxShowOrder + 1);
}
return getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_COMP, params, "", null);
}
@ -158,6 +163,12 @@ public class CompServiceImpl extends Service implements CompService {
if ("0".equals(groupId)) {
groupId = GROUP_ID.toString();
}
String oldCompNo = getCompMapper().listById(searchParam.getId()).getCompNo();
String compNo = searchParam.getCompNo();
if (!oldCompNo.equals(compNo)) {
compNo = repeatDetermine(compNo);
params.put("comp_no", compNo);
}
int updateCount = 0;
// 更新主表数据
updateCount += getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_COMP, params, "", searchParam.getId());
@ -243,7 +254,10 @@ public class CompServiceImpl extends Service implements CompService {
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_COMP : JCL_ORG_COMPEXT, viewAttr, id, extendTitle.getId() + "", "comp_no")));
List<SearchConditionItem> items = getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_COMP : JCL_ORG_COMPEXT, viewAttr, id, extendTitle.getId() + "", "");
if (CollectionUtils.isNotEmpty(items)) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, items));
}
}
}
@ -271,7 +285,10 @@ public class CompServiceImpl extends Service implements CompService {
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
if (CollectionUtils.isNotEmpty(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())));
List<SearchConditionItem> items = getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_COMP, 2, extendTitle.getId() + "", "comp_no", RuleCodeType.SUBCOMPANY.getValue());
if (CollectionUtils.isNotEmpty(items)) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, items));
}
}
}
apiDatas.put("condition", addGroups);
@ -297,4 +314,38 @@ public class CompServiceImpl extends Service implements CompService {
&& null == compPO.getForbiddenTag());
}
/**
*
*
* @return
*/
private String repeatDetermine(String compNo) {
CodeRulePO codeRuleByType = MapperProxyFactory.getProxy(CodeRuleMapper.class).getCodeRuleByType(RuleCodeType.SUBCOMPANY.getValue());
if (StringUtils.isNotBlank(compNo)) {
compNo = CodeRuleUtil.generateCode(RuleCodeType.SUBCOMPANY, compNo);
List<CompPO> list = getCompMapper().listByNo(Util.null2String(compNo));
OrganizationAssert.isEmpty(list, "编号不允许重复");
} else {
if (null != codeRuleByType && "1".equals(codeRuleByType.getSerialEnable())) {
compNo = autoCreateCompanyNo();
}
}
return compNo;
}
/**
*
*
* @return
*/
private String autoCreateCompanyNo() {
String generateCode = CodeRuleUtil.generateCode(RuleCodeType.SUBCOMPANY, "");
List<CompPO> list = getCompMapper().listByNo(Util.null2String(generateCode));
if (CollectionUtils.isNotEmpty(list)) {
generateCode = autoCreateCompanyNo();
}
return generateCode;
}
}

@ -10,6 +10,7 @@ import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.hrm.entity.RuleCodeType;
import com.engine.organization.component.OrganizationWeaTable;
import com.engine.organization.entity.codesetting.po.CodeRulePO;
import com.engine.organization.entity.company.bo.CompBO;
import com.engine.organization.entity.company.po.CompPO;
import com.engine.organization.entity.department.bo.DepartmentBO;
@ -23,6 +24,7 @@ import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.job.vo.SingleJobTreeVO;
import com.engine.organization.entity.searchtree.SearchTree;
import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.mapper.codesetting.CodeRuleMapper;
import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.mapper.extend.ExtendTitleMapper;
@ -40,6 +42,7 @@ import com.engine.organization.util.page.PageInfo;
import com.engine.organization.util.page.PageUtil;
import com.engine.organization.util.tree.SearchTreeUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import weaver.general.StringUtil;
import weaver.general.Util;
import weaver.hrm.User;
@ -188,10 +191,13 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
public int saveBaseForm(Map<String, Object> params) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
String deptNo = (String) params.get("dept_no");
deptNo = CodeRuleUtil.generateCode(RuleCodeType.DEPARTMENT, deptNo);
List<DepartmentPO> list = getDepartmentMapper().listByNo(Util.null2String(deptNo));
OrganizationAssert.isEmpty(list, "编号不允许重复");
// 判断是否开启自动编号
deptNo = repeatDetermine(deptNo);
params.put("dept_no", deptNo);
if (StringUtils.isBlank((String) params.get("show_order"))) {
int maxShowOrder = getCompMapper().getMaxShowOrder();
params.put("show_order", maxShowOrder + 1);
}
return getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_DEPT, params, "", null);
}
@ -211,6 +217,13 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if ("0".equals(groupId)) {
groupId = GROUP_ID.toString();
}
String oldDeptNo = getDepartmentMapper().getDeptById(searchParam.getId()).getDeptNo();
String deptNo = searchParam.getDeptNo();
if (!oldDeptNo.equals(deptNo)) {
deptNo = repeatDetermine(deptNo);
params.put("dept_no", deptNo);
}
int updateCount = 0;
// 更新主表数据
updateCount += getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_DEPT, params, "", searchParam.getId());
@ -296,7 +309,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId));
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_DEPT : JCL_ORG_DEPTEXT, viewAttr, id, extendTitle.getId().toString(), "dept_no")));
List<SearchConditionItem> items = getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_DEPT : JCL_ORG_DEPTEXT, viewAttr, id, extendTitle.getId().toString(), "dept_no");
if (CollectionUtils.isNotEmpty(items)) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, items));
}
}
}
@ -324,7 +340,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if (CollectionUtils.isNotEmpty(extendTitles)) {
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())));
List<SearchConditionItem> items = getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_DEPT, 2, extendTitle.getId().toString(), "dept_no", RuleCodeType.DEPARTMENT.getValue());
if (CollectionUtils.isNotEmpty(items)) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, items));
}
}
}
apiDatas.put("condition", addGroups);
@ -430,12 +449,12 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
public List<SearchConditionGroup> getMoveForm() {
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> condition = new ArrayList<>();
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择公司/分部", "161", "company", "compBrowser");
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择部门", "161", "department", "deptBrowser");
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择分部", "161", "company", "compBrowser");
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择部门", "161", "department", "deptBrowser");
List<SearchConditionOption> selectOptions = new ArrayList<>();
SearchConditionOption compOption = new SearchConditionOption("0", "公司/分部");
SearchConditionOption compOption = new SearchConditionOption("0", "分部");
SearchConditionOption deptOption = new SearchConditionOption("1", "部门");
selectOptions.add(compOption);
selectOptions.add(deptOption);
@ -458,7 +477,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
// 0公司/分部 1部门
if ("0".equals(moveParam.getMoveType())) {
Long company = moveParam.getCompany();
OrganizationAssert.notNull(company, "请选择要转移到的公司/分部");
OrganizationAssert.notNull(company, "请选择要转移到的分部");
deptById.setParentComp(company);
deptById.setParentDept(null);
} else if ("1".equals(moveParam.getMoveType())) {
@ -535,4 +554,37 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
}
}
/**
*
*
* @return
*/
private String repeatDetermine(String deptNo) {
CodeRulePO codeRuleByType = MapperProxyFactory.getProxy(CodeRuleMapper.class).getCodeRuleByType(RuleCodeType.SUBCOMPANY.getValue());
if (StringUtils.isNotBlank(deptNo)) {
deptNo = CodeRuleUtil.generateCode(RuleCodeType.DEPARTMENT, deptNo);
List<DepartmentPO> list = getDepartmentMapper().listByNo(Util.null2String(deptNo));
OrganizationAssert.isEmpty(list, "编号不允许重复");
} else {
if (null != codeRuleByType && "1".equals(codeRuleByType.getSerialEnable())) {
deptNo = autoCreateCompanyNo();
}
}
return deptNo;
}
/**
*
*
* @return
*/
private String autoCreateCompanyNo() {
String generateCode = CodeRuleUtil.generateCode(RuleCodeType.DEPARTMENT, "");
List<DepartmentPO> list = getDepartmentMapper().listByNo(Util.null2String(generateCode));
if (CollectionUtils.isNotEmpty(list)) {
generateCode = autoCreateCompanyNo();
}
return generateCode;
}
}

@ -254,7 +254,10 @@ public class JobServiceImpl extends Service implements JobService {
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
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())));
List<SearchConditionItem> items = getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_JOB, 2, extendTitle.getId().toString(), "job_no", RuleCodeType.JOBTITLES.getValue());
if (CollectionUtils.isNotEmpty(items)) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, items));
}
}
}
apiDatas.put("condition", addGroups);
@ -281,7 +284,10 @@ public class JobServiceImpl extends Service implements JobService {
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_JOB : JCL_ORG_JOBEXT, viewAttr, id, extendTitle.getId().toString(), "job_no")));
List<SearchConditionItem> items = getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_JOB : JCL_ORG_JOBEXT, viewAttr, id, extendTitle.getId().toString(), "job_no");
if (CollectionUtils.isNotEmpty(items)) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, items));
}
}
}
HashMap<String, Object> resultMap = new HashMap<>();
@ -291,7 +297,7 @@ public class JobServiceImpl extends Service implements JobService {
// 拓展页面分组
resultMap.put("tabInfo", getExtService(user).getTabInfo(EXTEND_TYPE, JCL_ORG_JOBEXT));
// 处理明细表
List<Map<String, Object>> extendTables = getExtService(user).getExtendTables(user, EXTEND_TYPE, Long.parseLong(groupId),JCL_ORG_JOBEXT_DT1, id, viewAttr, false);
List<Map<String, Object>> extendTables = getExtService(user).getExtendTables(user, EXTEND_TYPE, Long.parseLong(groupId), JCL_ORG_JOBEXT_DT1, id, viewAttr, false);
Map<String, Object> tableMap = new HashMap<>();
tableMap.put("hide", false);
@ -334,7 +340,7 @@ public class JobServiceImpl extends Service implements JobService {
params.put("job_no", jobPO.getJobNo());
params.put("is_key", jobPO.getIsKey());
DepartmentPO departmentPO = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(jobPO.getParentDept());
params.put("parent_comp",departmentPO.getParentComp());
params.put("parent_comp", departmentPO.getParentComp());
getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOB, params, "", jobPO.getId());
if (null != jobPO.getSchemeId()) {
@ -363,7 +369,7 @@ public class JobServiceImpl extends Service implements JobService {
// 更新主表数据
params.put("is_key", searchParam.getIsKey());
DepartmentPO departmentPO = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(searchParam.getParentDept());
params.put("parent_comp",departmentPO.getParentComp());
params.put("parent_comp", departmentPO.getParentComp());
updateCount += getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOB, params, "", searchParam.getId());
// 更新主表拓展表

@ -78,6 +78,11 @@ public class PostInfoServiceImpl extends Service implements PostInfoService {
public int updatePostInfo(PostInfoSearchParam param) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
PostInfoPO postInfoPO = PostInfoDTO.convertParamToPO(param, (long) user.getUID());
String oldPostInfoNo = getPostInfoMapper().getPostInfoByID(postInfoPO.getId()).getPostInfoNo();
if (!oldPostInfoNo.equals(postInfoPO.getPostInfoNo())) {
List<PostInfoPO> list = getPostInfoMapper().listByNo(Util.null2String(postInfoPO.getPostInfoNo()));
OrganizationAssert.isEmpty(list, "编号不允许重复");
}
return getPostInfoMapper().updatePostInfo(postInfoPO);
}
@ -155,7 +160,7 @@ public class PostInfoServiceImpl extends Service implements PostInfoService {
browserBean.setReplaceDatas(maps);
postIdBrowser.setBrowserConditionParam(browserBean);
// 编辑状态下,编号只读
noItem.setViewAttr(1);
// noItem.setViewAttr(1);
}
selectItems.add(noItem);

@ -14,10 +14,13 @@ public class Column {
String dataIndex;
String key;
boolean display;
String width;
boolean sorter;
public Column(String title, String dataIndex, String key) {
public Column(String title, String dataIndex, String key, String width) {
this.title = title;
this.dataIndex = dataIndex;
this.key = key;
this.width = width;
}
}

@ -40,7 +40,7 @@ public class PageInfo<T> extends com.github.pagehelper.PageInfo<T> {
public List<Column> buildColumns() {
if(clazz==null){
if (clazz == null) {
return this.columns;
}
Field[] fields = clazz.getDeclaredFields();
@ -52,7 +52,9 @@ public class PageInfo<T> extends com.github.pagehelper.PageInfo<T> {
String dataIndex = annotation.dataIndex();
String key = annotation.key();
boolean display = annotation.display();
Column column = Column.builder().title(title).dataIndex(dataIndex).key(key).display(display).build();
String width = annotation.width();
boolean sorter = annotation.sorter();
Column column = Column.builder().sorter(sorter).width(width).title(title).dataIndex(dataIndex).key(key).display(display).build();
columns.add(column);
}
}

Loading…
Cancel
Save