Commit 7297488f authored by 赵啸非's avatar 赵啸非

修改职位信息

parent b8c7d98c
......@@ -93,12 +93,6 @@ public class ArtemisPostTest {
return ArtemisHttpUtil.doPostStringArtemis(config,path, body, null, null, "application/json");
}
public static String callPostApiGetDeptList() throws Exception {
/**
* https://ip:port/artemis/api/resource/v1/org/orgList
......
......@@ -4,7 +4,6 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.base.framework.config.JsonUtils;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.busiz.hik.ArtemisPostTest;
import com.mortals.xhx.busiz.rsp.DeptHikData;
import com.mortals.xhx.busiz.rsp.ListDept;
......
......@@ -7,11 +7,11 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.job.model.vo.JobVo;
/**
* 职位信息实体对象
*
* @author zxfei
* @date 2023-04-07
*/
* 职位信息实体对象
*
* @author zxfei
* @date 2023-04-11
*/
public class JobEntity extends JobVo {
private static final long serialVersionUID = 1L;
......@@ -36,6 +36,10 @@ public class JobEntity extends JobVo {
* 备注
*/
private String remark;
/**
* 节点类型(1.分组,2.职位)
*/
private Integer type;
......@@ -110,6 +114,20 @@ public class JobEntity extends JobVo {
public void setRemark(String remark){
this.remark = remark;
}
/**
* 获取 节点类型(1.分组,2.职位)
* @return Integer
*/
public Integer getType(){
return type;
}
/**
* 设置 节点类型(1.分组,2.职位)
* @param type
*/
public void setType(Integer type){
this.type = type;
}
......@@ -137,6 +155,7 @@ public class JobEntity extends JobVo {
sb.append(",jobCode:").append(getJobCode());
sb.append(",jobName:").append(getJobName());
sb.append(",remark:").append(getRemark());
sb.append(",type:").append(getType());
return sb.toString();
}
......@@ -151,5 +170,7 @@ public class JobEntity extends JobVo {
this.jobName = "";
this.remark = "";
this.type = 1;
}
}
\ No newline at end of file
......@@ -3,11 +3,11 @@ package com.mortals.xhx.module.job.model;
import java.util.List;
import com.mortals.xhx.module.job.model.JobEntity;
/**
* 职位信息查询对象
*
* @author zxfei
* @date 2023-04-07
*/
* 职位信息查询对象
*
* @author zxfei
* @date 2023-04-11
*/
public class JobQuery extends JobEntity {
/** 开始 主键,自增长 */
private Long idStart;
......@@ -101,6 +101,21 @@ public class JobQuery extends JobEntity {
/** 结束 修改时间 */
private String updateTimeEnd;
/** 开始 节点类型(1.分组,2.职位) */
private Integer typeStart;
/** 结束 节点类型(1.分组,2.职位) */
private Integer typeEnd;
/** 增加 节点类型(1.分组,2.职位) */
private Integer typeIncrement;
/** 节点类型(1.分组,2.职位)列表 */
private List <Integer> typeList;
/** 节点类型(1.分组,2.职位)排除列表 */
private List <Integer> typeNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<JobQuery> orConditionList;
......@@ -625,6 +640,87 @@ public class JobQuery extends JobEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 开始 节点类型(1.分组,2.职位)
* @return typeStart
*/
public Integer getTypeStart(){
return this.typeStart;
}
/**
* 设置 开始 节点类型(1.分组,2.职位)
* @param typeStart
*/
public void setTypeStart(Integer typeStart){
this.typeStart = typeStart;
}
/**
* 获取 结束 节点类型(1.分组,2.职位)
* @return $typeEnd
*/
public Integer getTypeEnd(){
return this.typeEnd;
}
/**
* 设置 结束 节点类型(1.分组,2.职位)
* @param typeEnd
*/
public void setTypeEnd(Integer typeEnd){
this.typeEnd = typeEnd;
}
/**
* 获取 增加 节点类型(1.分组,2.职位)
* @return typeIncrement
*/
public Integer getTypeIncrement(){
return this.typeIncrement;
}
/**
* 设置 增加 节点类型(1.分组,2.职位)
* @param typeIncrement
*/
public void setTypeIncrement(Integer typeIncrement){
this.typeIncrement = typeIncrement;
}
/**
* 获取 节点类型(1.分组,2.职位)
* @return typeList
*/
public List<Integer> getTypeList(){
return this.typeList;
}
/**
* 设置 节点类型(1.分组,2.职位)
* @param typeList
*/
public void setTypeList(List<Integer> typeList){
this.typeList = typeList;
}
/**
* 获取 节点类型(1.分组,2.职位)
* @return typeNotList
*/
public List<Integer> getTypeNotList(){
return this.typeNotList;
}
/**
* 设置 节点类型(1.分组,2.职位)
* @param typeNotList
*/
public void setTypeNotList(List<Integer> typeNotList){
this.typeNotList = typeNotList;
}
/**
* 设置 主键,自增长
* @param id
......@@ -919,6 +1015,60 @@ public class JobQuery extends JobEntity {
}
/**
* 设置 节点类型(1.分组,2.职位)
* @param type
*/
public JobQuery type(Integer type){
setType(type);
return this;
}
/**
* 设置 开始 节点类型(1.分组,2.职位)
* @param typeStart
*/
public JobQuery typeStart(Integer typeStart){
this.typeStart = typeStart;
return this;
}
/**
* 设置 结束 节点类型(1.分组,2.职位)
* @param typeEnd
*/
public JobQuery typeEnd(Integer typeEnd){
this.typeEnd = typeEnd;
return this;
}
/**
* 设置 增加 节点类型(1.分组,2.职位)
* @param typeIncrement
*/
public JobQuery typeIncrement(Integer typeIncrement){
this.typeIncrement = typeIncrement;
return this;
}
/**
* 设置 节点类型(1.分组,2.职位)
* @param typeList
*/
public JobQuery typeList(List<Integer> typeList){
this.typeList = typeList;
return this;
}
/**
* 设置 节点类型(1.分组,2.职位)
* @param typeNotList
*/
public JobQuery typeNotList(List<Integer> typeNotList){
this.typeNotList = typeNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.job.dao.ibatis.JobDaoImpl">
<!-- 字段和属性映射 -->
......@@ -15,6 +15,7 @@
<result property="createUserId" column="createUserId" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<result property="type" column="type" />
</resultMap>
......@@ -52,23 +53,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('type') or colPickMode == 1 and data.containsKey('type')))">
a.type,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="JobEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_job
(groupId,groupName,jobCode,jobName,remark,createTime,createUserId,updateUserId,updateTime)
(groupId,groupName,jobCode,jobName,remark,createTime,createUserId,updateUserId,updateTime,type)
VALUES
(#{groupId},#{groupName},#{jobCode},#{jobName},#{remark},#{createTime},#{createUserId},#{updateUserId},#{updateTime})
(#{groupId},#{groupName},#{jobCode},#{jobName},#{remark},#{createTime},#{createUserId},#{updateUserId},#{updateTime},#{type})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_job
(groupId,groupName,jobCode,jobName,remark,createTime,createUserId,updateUserId,updateTime)
(groupId,groupName,jobCode,jobName,remark,createTime,createUserId,updateUserId,updateTime,type)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.groupId},#{item.groupName},#{item.jobCode},#{item.jobName},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime})
(#{item.groupId},#{item.groupName},#{item.jobCode},#{item.jobName},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime},#{item.type})
</foreach>
</insert>
......@@ -114,6 +118,12 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
<if test="(colPickMode==0 and data.containsKey('type')) or (colPickMode==1 and !data.containsKey('type'))">
a.type=#{data.type},
</if>
<if test="(colPickMode==0 and data.containsKey('typeIncrement')) or (colPickMode==1 and !data.containsKey('typeIncrement'))">
a.type=ifnull(a.type,0) + #{data.typeIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -204,6 +214,18 @@
</if>
</foreach>
</trim>
<trim prefix="type=(case" suffix="ELSE type end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('type')) or (colPickMode==1 and !item.containsKey('type'))">
when a.id=#{item.id} then #{item.type}
</when>
<when test="(colPickMode==0 and item.containsKey('typeIncrement')) or (colPickMode==1 and !item.containsKey('typeIncrement'))">
when a.id=#{item.id} then ifnull(a.type,0) + #{item.typeIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -328,13 +350,13 @@
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList')">
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idNotList')">
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -355,13 +377,13 @@
${_conditionType_} a.groupId is null
</if>
</if>
<if test="conditionParamRef.containsKey('groupIdList')">
<if test="conditionParamRef.containsKey('groupIdList') and conditionParamRef.groupIdList.size() > 0">
${_conditionType_} a.groupId in
<foreach collection="conditionParamRef.groupIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('groupIdNotList')">
<if test="conditionParamRef.containsKey('groupIdNotList') and conditionParamRef.groupIdNotList.size() > 0">
${_conditionType_} a.groupId not in
<foreach collection="conditionParamRef.groupIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -383,13 +405,13 @@
${_conditionType_} a.groupName is null
</if>
</if>
<if test="conditionParamRef.containsKey('groupNameList')">
<if test="conditionParamRef.containsKey('groupNameList') and conditionParamRef.groupNameList.size() > 0">
${_conditionType_} a.groupName in
<foreach collection="conditionParamRef.groupNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('groupNameNotList')">
<if test="conditionParamRef.containsKey('groupNameNotList') and conditionParamRef.groupNameNotList.size() > 0">
${_conditionType_} a.groupName not in
<foreach collection="conditionParamRef.groupNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -404,13 +426,13 @@
${_conditionType_} a.jobCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('jobCodeList')">
<if test="conditionParamRef.containsKey('jobCodeList') and conditionParamRef.jobCodeList.size() > 0">
${_conditionType_} a.jobCode in
<foreach collection="conditionParamRef.jobCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('jobCodeNotList')">
<if test="conditionParamRef.containsKey('jobCodeNotList') and conditionParamRef.jobCodeNotList.size() > 0">
${_conditionType_} a.jobCode not in
<foreach collection="conditionParamRef.jobCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -425,13 +447,13 @@
${_conditionType_} a.jobName is null
</if>
</if>
<if test="conditionParamRef.containsKey('jobNameList')">
<if test="conditionParamRef.containsKey('jobNameList') and conditionParamRef.jobNameList.size() > 0">
${_conditionType_} a.jobName in
<foreach collection="conditionParamRef.jobNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('jobNameNotList')">
<if test="conditionParamRef.containsKey('jobNameNotList') and conditionParamRef.jobNameNotList.size() > 0">
${_conditionType_} a.jobName not in
<foreach collection="conditionParamRef.jobNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -446,13 +468,13 @@
${_conditionType_} a.remark is null
</if>
</if>
<if test="conditionParamRef.containsKey('remarkList')">
<if test="conditionParamRef.containsKey('remarkList') and conditionParamRef.remarkList.size() > 0">
${_conditionType_} a.remark in
<foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remarkNotList')">
<if test="conditionParamRef.containsKey('remarkNotList') and conditionParamRef.remarkNotList.size() > 0">
${_conditionType_} a.remark not in
<foreach collection="conditionParamRef.remarkNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -481,13 +503,13 @@
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList')">
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList')">
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -508,13 +530,13 @@
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList')">
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList')">
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -542,6 +564,33 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('type')">
<if test="conditionParamRef.type != null ">
${_conditionType_} a.type = #{${_conditionParam_}.type}
</if>
<if test="conditionParamRef.type == null">
${_conditionType_} a.type is null
</if>
</if>
<if test="conditionParamRef.containsKey('typeList') and conditionParamRef.typeList.size() > 0">
${_conditionType_} a.type in
<foreach collection="conditionParamRef.typeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('typeNotList') and conditionParamRef.typeNotList.size() > 0">
${_conditionType_} a.type not in
<foreach collection="conditionParamRef.typeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('typeStart') and conditionParamRef.typeStart != null">
${_conditionType_} a.type <![CDATA[ >= ]]> #{${_conditionParam_}.typeStart}
</if>
<if test="conditionParamRef.containsKey('typeEnd') and conditionParamRef.typeEnd != null">
${_conditionType_} a.type <![CDATA[ <= ]]> #{${_conditionParam_}.typeEnd}
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -605,6 +654,11 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('type')">
a.type
<if test='orderCol.type != null and "DESC".equalsIgnoreCase(orderCol.type)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
......
......@@ -113,9 +113,14 @@ CREATE TABLE mortals_xhx_job(
`createUserId` bigint(20) COMMENT '创建用户',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`)
`type` tinyint(2) DEFAULT '1' COMMENT '节点类型(1.分组,2.职位)',
PRIMARY KEY (`id`)
,KEY `groupName` (`groupName`) USING BTREE
,KEY `jobCode` (`jobCode`) USING BTREE
,KEY `jobName` (`jobName`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='职位信息';
-- ----------------------------
-- 员工黑名单信息表
-- ----------------------------
......
......@@ -3098,9 +3098,9 @@ jobName|String|否|职位名称,字段前后添加%%模糊查询
**请求样例:**
```
{
"groupName":"221sgc",
"jobCode":"buzhdj",
"jobName":"vduagu",
"groupName":"w4y1au",
"jobCode":"p48hfz",
"jobName":"tvhi3v",
"page":1,
"size":10
}
......@@ -3128,7 +3128,9 @@ data|object|数据对象
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|修改时间
&emsp;&emsp;type|Integer|节点类型(1.分组,2.职位)
dict|object|字典对象
&emsp;type|object|字典属性对象,详见附录
**响应消息样例:**
```
......@@ -3176,23 +3178,26 @@ data|object|数据对象
&emsp;createUserId|Long|创建用户
&emsp;updateUserId|Long|更新用户
&emsp;updateTime|Date|修改时间
&emsp;type|Integer|节点类型(1.分组,2.职位)
dict|object|字典对象
&emsp;type|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":3224,
"groupId":5192,
"groupName":"y8zckh",
"jobCode":"djdvg1",
"jobName":"k2657g",
"remark":"ajxdd3",
"createTime":"2023-04-07",
"createUserId":4686,
"updateUserId":8121,
"updateTime":"2023-04-07"
"id":6214,
"groupId":6910,
"groupName":"h3qmbp",
"jobCode":"ybsxab",
"jobName":"mwfwda",
"remark":"j454du",
"createTime":"2023-04-11",
"createUserId":3094,
"updateUserId":1149,
"updateTime":"2023-04-11",
"type":4950
}
}
```
......@@ -3216,15 +3221,17 @@ groupName|String|否|分组名称
jobCode|String|否|职位编码
jobName|String|否|职位名称
remark|String|否|备注
type|Integer|否|节点类型(1.分组,2.职位)
**请求样例:**
```
{
"groupId":3140,
"groupName":"q8jukx",
"jobCode":"38mrsx",
"jobName":"fxtzka",
"remark":"owe9bs",
"groupId":4323,
"groupName":"0rvnhk",
"jobCode":"qlhfq6",
"jobName":"aw1orv",
"remark":"b3g5ig",
"type":5729
}
```
......@@ -3247,6 +3254,7 @@ data|object|数据对象
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|修改时间
&emsp;&emsp;type|Integer|节点类型(1.分组,2.职位)
**响应消息样例:**
```
......
......@@ -22,7 +22,6 @@
<common-lib.version>0.0.1-SNAPSHOT</common-lib.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment