企业注册和新增用户岗位处理
This commit is contained in:
parent
82cb76554e
commit
13b01c53cf
|
|
@ -1,5 +1,7 @@
|
|||
package com.rzyc.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* @author dong
|
||||
* @date 2023-07-19 15:32
|
||||
|
|
@ -13,6 +15,8 @@ public enum AuditStatusEnum {
|
|||
|
||||
private Integer state;
|
||||
|
||||
JsonFormat
|
||||
|
||||
AuditStatusEnum(Integer state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
package com.rzyc.enums;
|
||||
|
||||
/**
|
||||
* 岗位类型 1、部门 2、岗位
|
||||
* @author dong
|
||||
* @date 2023-07-20 9:25
|
||||
* @Version V1.0
|
||||
*/
|
||||
public enum PositionTypeEnum {
|
||||
|
||||
UNIT(1),
|
||||
POST(2);
|
||||
|
||||
private Integer type;
|
||||
|
||||
PositionTypeEnum(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
|
@ -64,6 +64,9 @@ public interface ListPerformMapper extends BaseMapper<SysEnterprise> {
|
|||
/*部门岗位*/
|
||||
List<ListPerform> unitPost(@Param("listPerformId") String listPerformId);
|
||||
|
||||
/*下级岗位数量*/
|
||||
Integer countPost(@Param("listPerformId") String listPerformId);
|
||||
|
||||
/*用户履职信息*/
|
||||
UserDepart userPerform(@Param("listPerformId") String listPerformId);
|
||||
|
||||
|
|
@ -135,4 +138,8 @@ public interface ListPerformMapper extends BaseMapper<SysEnterprise> {
|
|||
/*上级岗位*/
|
||||
List<ListPerform> topListperformList(@Param("listperformId") String listperformId);
|
||||
|
||||
/*修改岗位类型*/
|
||||
Integer changePositionType(@Param("listPerformId") String listPerformId,
|
||||
@Param("positionType") Integer positionType);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -826,8 +826,9 @@
|
|||
|
||||
|
||||
<select id="selectPCList" resultMap="BaseResultMap">
|
||||
select sys.*
|
||||
select sys.*,bc.IndustryClassName
|
||||
from SysEnterprise sys
|
||||
left join baseinclass bc on sys.work_class_id = bc.BaseInClassId
|
||||
where 1=1
|
||||
<if test="2 == isAdmin">
|
||||
AND sys.State='启用'
|
||||
|
|
|
|||
|
|
@ -556,6 +556,12 @@
|
|||
ORDER BY lp.`SortId` ASC
|
||||
</select>
|
||||
|
||||
<!--部门岗位-->
|
||||
<select id="countPost" resultType="java.lang.Integer">
|
||||
SELECT count(*) FROM ListPerform lp
|
||||
WHERE lp.`SupClassId` = #{listPerformId}
|
||||
</select>
|
||||
|
||||
<!--用户履职信息-->
|
||||
<select id="userPerform" resultMap="UserDepartResultMap">
|
||||
|
||||
|
|
@ -601,7 +607,8 @@
|
|||
|
||||
<!--岗位列表-->
|
||||
<select id="findAll" resultMap="BaseResultMap">
|
||||
SELECT lp.* FROM ListPerform lp
|
||||
SELECT lp.*
|
||||
FROM ListPerform lp
|
||||
where 1 = 1
|
||||
<if test="null != superPerformId and '' != superPerformId">
|
||||
and FIND_IN_SET(#{superPerformId},lp.parent_path)
|
||||
|
|
@ -893,4 +900,11 @@
|
|||
WHERE FIND_IN_SET(#{listperformId},lf.`ViewJurisdiction`);
|
||||
</select>
|
||||
|
||||
<!--修改岗位类型-->
|
||||
<update id="changePositionType">
|
||||
update listperform
|
||||
set position_type = #{positionType}
|
||||
where ListPerformId = #{listPerformId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
spring:
|
||||
profiles:
|
||||
active: test #设定打包配置文件
|
||||
active: yun #设定打包配置文件
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1710,6 +1710,13 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
ListPerform perform = listPerformMapper.selectByPrimaryKey(listPerform.getListperformid());
|
||||
if(null != perform){
|
||||
getPerformPath(listPerform.getSupclassid(),listPerform);
|
||||
|
||||
Integer postNum = listPerformMapper.countPost(listPerform.getListperformid());
|
||||
if(postNum > 0){
|
||||
listPerform.setPositionType(PositionTypeEnum.UNIT.getType());
|
||||
}
|
||||
|
||||
|
||||
//修改
|
||||
listPerformMapper.changeListPerform(listPerform);
|
||||
}else{
|
||||
|
|
@ -1721,9 +1728,14 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
performClassCode = GetSysOrganCode(perform);//生成
|
||||
}
|
||||
listPerform.setPerformclasscode(performClassCode);
|
||||
listPerform.setPositionType(PositionTypeEnum.POST.getType());
|
||||
getPerformPath(listPerform.getSupclassid(),listPerform);
|
||||
|
||||
//新增
|
||||
listPerformMapper.insert(listPerform);
|
||||
|
||||
//修改上级部门的部门类型
|
||||
listPerformMapper.changePositionType(listPerform.getSupclassid(),PositionTypeEnum.UNIT.getType());
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user