领退料审核流逻辑优化
This commit is contained in:
parent
fb174749d9
commit
b345cb8e52
|
|
@ -32,7 +32,7 @@ public interface TmTaskAuditLogMapper {
|
|||
* @param tmTaskAuditLog 任务
|
||||
* @return 任务集合
|
||||
*/
|
||||
public List<String> selectTmTaskAuditRoleKeyList(TmTaskAuditLog tmTaskAuditLog);
|
||||
public List<String> selectTmTaskAuditRoleList(TmTaskAuditLog tmTaskAuditLog);
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public interface ITmTaskAuditLogService {
|
|||
* @param tmTaskAuditLog 任务
|
||||
* @return 任务集合
|
||||
*/
|
||||
public List<String> selectTmTaskAuditRoleKeyList(TmTaskAuditLog tmTaskAuditLog);
|
||||
public List<String> selectTmTaskAuditRoleList(TmTaskAuditLog tmTaskAuditLog);
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ public class TmTaskAuditLogServiceImpl implements ITmTaskAuditLogService {
|
|||
* @param tmTaskAuditLog 任务
|
||||
* @return 任务集合
|
||||
*/
|
||||
public List<String> selectTmTaskAuditRoleKeyList(TmTaskAuditLog tmTaskAuditLog) {
|
||||
return tmTaskAuditLogsMapper.selectTmTaskAuditRoleKeyList(tmTaskAuditLog);
|
||||
public List<String> selectTmTaskAuditRoleList(TmTaskAuditLog tmTaskAuditLog) {
|
||||
return tmTaskAuditLogsMapper.selectTmTaskAuditRoleList(tmTaskAuditLog);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -126,7 +126,7 @@ public class TmTaskAuditLogServiceImpl implements ITmTaskAuditLogService {
|
|||
if (CollectionUtils.isEmpty(needRoles)) {
|
||||
return new TmTaskAuditResult(true);
|
||||
} else {
|
||||
List<String> auditRoleIds = selectTmTaskAuditRoleKeyList(tmTaskAuditLog);
|
||||
List<String> auditRoleIds = selectTmTaskAuditRoleList(tmTaskAuditLog);
|
||||
String nextRole = needRoles.get(0);
|
||||
boolean finished = false;
|
||||
for (int i = 0; i < needRoles.size(); i++) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="id" column="id" />
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="taskType" column="task_type" />
|
||||
<result property="roleKey" column="role_key" />
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
|
@ -16,7 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectTmTaskAuditLogVo">
|
||||
select id, task_id, task_type, role_key, create_by, create_time, update_by, update_time, remark from tm_task_audit_log
|
||||
select id, task_id, task_type, role_id, create_by, create_time, update_by, update_time, remark from tm_task_audit_log
|
||||
</sql>
|
||||
|
||||
<select id="selectTmTaskAuditLogList" parameterType="com.bonus.material.task.domain.TmTaskAuditLog" resultMap="TmTaskAuditLogResult">
|
||||
|
|
@ -24,11 +24,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<where>
|
||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||
<if test="taskType != null "> and task_type = #{taskType}</if>
|
||||
<if test="roleKey != null and roleKey != ''"> and role_key = #{roleKey}</if>
|
||||
<if test="roleId != null and roleId != ''"> and role_id = #{roleId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTmTaskAuditRoleKeyList" parameterType="com.bonus.material.task.domain.TmTaskAuditLog" resultType="java.lang.String">
|
||||
<select id="selectTmTaskAuditRoleList" parameterType="com.bonus.material.task.domain.TmTaskAuditLog" resultType="java.lang.String">
|
||||
select role_id
|
||||
from tm_task_audit_log
|
||||
<where>
|
||||
|
|
@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskId != null">task_id,</if>
|
||||
<if test="taskType != null">task_type,</if>
|
||||
<if test="roleKey != null">role_key,</if>
|
||||
<if test="roleId != null">role_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
|
|
@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="taskType != null">#{taskType},</if>
|
||||
<if test="roleKey != null">#{roleKey},</if>
|
||||
<if test="roleId != null">#{roleId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
|
|
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="taskType != null">task_type = #{taskType},</if>
|
||||
<if test="roleKey != null">role_key = #{roleKey},</if>
|
||||
<if test="roleId != null">role_id = #{roleId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue