Commit 45511f79 authored by nie'hong's avatar nie'hong

删除user中的level

parent bda2c538
......@@ -25,4 +25,6 @@ public interface WorkDeptMapper extends BaseMapper<WorkDept> {
int updateManagerIdISNullById(Integer id);
List<WorkDept> getDeptByManagerId(Integer userId);
}
......@@ -3,9 +3,11 @@ package cn.wisenergy.mapper;
import cn.wisenergy.model.app.WorkTypeManager;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
public interface WorkTypeManagerMapper extends BaseMapper<WorkTypeManager> {
public interface WorkTypeManagerMapper extends BaseMapper<WorkTypeManager> {
List<WorkTypeManager> getListByManagerId(Integer userId);
}
......@@ -76,4 +76,10 @@ ORDER BY c.id,d.id
</select>
<select id="getDeptByManagerId" resultType="cn.wisenergy.model.app.WorkDept">
select <include refid="cols_all"/>
from <include refid="table"/>
where manager_id = #{userId}
</select>
</mapper>
......@@ -106,7 +106,7 @@
AND statistics_start >= #{firstDayOfMonth}
</if>
GROUP BY type, <if test="centreId == null"> dept_name,</if> <if test="centreId != null"> dept_name,p.dept_id,</if>p.id,project_name
<if test="centreId != null"> ORDER BY </if>
<if test="centreId != null"> ORDER BY p.dept_id</if>
</select>
......
......@@ -221,9 +221,15 @@
<foreach collection="statusArray" item="workStatus" open="(" close=")" separator=",">#{workStatus}
</foreach>
</if>
<if test="typeArray != null">
<if test="typeList != null">
AND `type` IN
<foreach collection="typeArray" item="type" open="(" close=")" separator=",">
<foreach collection="typeList" item="type" open="(" close=")" separator=",">
#{type}
</foreach>
</if>
<if test="deptIdList != null">
AND `type` IN
<foreach collection="deptIdList" item="dept" open="(" close=")" separator=",">
#{type}
</foreach>
</if>
......
......@@ -3,5 +3,9 @@
<mapper namespace="cn.wisenergy.mapper.WorkTypeManagerMapper">
<select id="getListByManagerId" resultType="cn.wisenergy.model.app.WorkTypeManager">
select id, name,dept_id,manager_id,type
from work_type_manager
where manager_id = #{userId}
</select>
</mapper>
\ No newline at end of file
......@@ -16,7 +16,6 @@
<result column="type" property="type" />
<result column="status" property="status" />
<result column="wx_id" property="wxId" />
<result column="level" property="level" />
<result column="create_time" property="createTime" />
<result column="modify_time" property="modifyTime" />
</resultMap>
......@@ -33,11 +32,11 @@
</sql>
<sql id="cols_exclude_id">
name, oa_user_id, login_name, phone, dept_id, email, role ,type,status,wx_id,level,create_time,modify_time
name, oa_user_id, login_name, phone, dept_id, email, role ,type,status,wx_id,create_time,modify_time
</sql>
<sql id="values">
#{name},#{oaUserId},#{loginName},#{phone},#{deptId},#{email},#{role},#{type},#{status},#{wxId},#{level},now(),now()
#{name},#{oaUserId},#{loginName},#{phone},#{deptId},#{email},#{role},#{type},#{status},#{wxId},now(),now()
</sql>
<sql id="updateCondition">
......@@ -52,7 +51,6 @@
<if test="type != null">type =#{type},</if>
<if test="status != null">status = #{status},</if>
<if test="wxId != null">wx_id =#{wxId},</if>
<if test="level != null">level = #{level},</if>
modify_time =now()
</sql>
......@@ -69,7 +67,6 @@
<if test="type != null">and type =#{type}</if>
<if test="status != null">and status = #{status}</if>
<if test="wxId != null">and wx_id =#{wxId},</if>
<if test="level != null">and level = #{level}</if>
<if test="createTime != null">and create_time &gt;= #{createTime}</if>
<if test="modifyTime != null">and #{modifyTime} &gt;= modify_time</if>
</sql>
......
......@@ -62,9 +62,6 @@ public class WorkUser implements Serializable {
@ApiModelProperty(name = "wxId",value = "微信id")
private String wxId;
@ApiModelProperty(name = "level",value = "权限级别:普通用户:0,项目/商机级别:1,部门级别:2,中心级别:3,系统管理员:4")
private Integer level;
@ApiModelProperty(name = "createTime",value = "创建时间")
private Date createTime;
......
......@@ -10,8 +10,7 @@ public enum LevelEnum {
PROJECT_MANAGER( "项目/商机管理"),
TIMEEXPORT("工时导出"),
SYSTEMSETTINGS("系统设置"),
ACCOUNTMANAGEMENT("账号管理"),
ACCOUNTMANAGEMENT("账号管理")
;
......
......@@ -480,10 +480,6 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.INPUT_PARAM_IS_NULL);
}
isManager(reviewerId);
Integer level = workUserService.getById(reviewerId).getLevel();
if (level == 0) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.THE_USER_NOT_MANAGER_PLASE_MANAGER_LOGIN);
}
int i = workTimeOrderMapper.updateStatusById(reviewerId, id, reason);
if (i == 0) {
......
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