Commit 54d89912 by zhiwj

修改审批员取值

parent e421ee8e
......@@ -67,5 +67,5 @@ public interface TabAuditorProjectItemRelMapper {
@MapKey("auditorId")
Map<Integer, Map<Integer,Long>> getCountByAuditorIds(@Param("ids") List<Integer> auditorIdList);
List<Integer> listAuditorIdByProjectId(@Param("enterpriseId") Integer enterpriseId, @Param("projectId") Integer projectId);
List<Integer> listAuditorIdByProjectItemId(@Param("enterpriseId") Integer enterpriseId, @Param("projectItemId") Integer projectItemId);
}
\ No newline at end of file
......@@ -20,5 +20,5 @@ public interface AuditorProjectItemRelService {
Map<Integer,Integer> getCountByAuditorIds(List<Integer> auditorIdList);
List<Integer> listAuditorIdByProjectId(Integer enterpriseId, Integer projectId);
List<Integer> listAuditorIdByProjectItemId(Integer enterpriseId, Integer projectItemId);
}
......@@ -66,7 +66,7 @@ public class AuditorProjectItemRelServiceImpl implements AuditorProjectItemRelSe
}
@Override
public List<Integer> listAuditorIdByProjectId(Integer enterpriseId, Integer projectId) {
return tabAuditorProjectItemRelMapper.listAuditorIdByProjectId(enterpriseId, projectId);
public List<Integer> listAuditorIdByProjectItemId(Integer enterpriseId, Integer projectItemId) {
return tabAuditorProjectItemRelMapper.listAuditorIdByProjectItemId(enterpriseId, projectItemId);
}
}
......@@ -222,10 +222,8 @@ public class AuditorApiServiceImpl implements AuditorApiService {
public ServiceResponse<List<AuditorDTO>> listAuditorByProject(Integer projectItemId, Integer userId, Integer enterpriseId) {
ServiceResponse<ProjectItemDTO> projectItemResponse = projectItemApiService.getById(projectItemId);
if (projectItemResponse.isSuccess()) {
ProjectItemDTO projectItemDTO = projectItemResponse.getResult();
Integer projectId = projectItemDTO.getProjectId();
// 找到审批项对应的审核员
List<Integer> projectAuditorIds = auditorProjectItemRelService.listAuditorIdByProjectId(enterpriseId, projectId);
List<Integer> projectAuditorIds = auditorProjectItemRelService.listAuditorIdByProjectItemId(enterpriseId, projectItemId);
if (CollectionUtils.isNotEmpty(projectAuditorIds)) {
// 找到管理员所在的受审组
List<Integer> auditedGroupIds = auditedGroupUserRelService.listAuditedGroupByUserId(enterpriseId, userId);
......
......@@ -183,7 +183,7 @@
</if>
group by auditor_id
</select>
<select id="listAuditorIdByProjectId" resultType="java.lang.Integer">
<select id="listAuditorIdByProjectItemId" resultType="java.lang.Integer">
select
auditor_id
from tab_auditor_project_item_rel
......@@ -191,8 +191,8 @@
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="projectId != null ">
and project_id = #{projectId}
<if test="projectItemId != null ">
and project_item_id = #{projectItemId}
</if>
</select>
</mapper>
\ No newline at end of file
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