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

删除user中的level

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