待办中心-认证参数-查询优化,添加待办标记
This commit is contained in:
+3
@@ -31,4 +31,7 @@ public interface ParamsManifestEOMapper extends BaseMapper<ParamsManifestEO> {
|
||||
ParamsManifestVO getProjectById(@Param("projectId") String projectId);
|
||||
|
||||
List<Map<String, String>> labelListForProjectDetails(@Param("projectId") String projectId);
|
||||
|
||||
List<String> listInfoHomo(@Param("userId") String userId, @Param("state") String state);
|
||||
|
||||
}
|
||||
|
||||
+12
@@ -174,4 +174,16 @@
|
||||
where project_id = #{projectId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="listInfoHomo" resultType="java.lang.String">
|
||||
SELECT pm.id
|
||||
FROM params_manifest pm
|
||||
JOIN ( SELECT id FROM
|
||||
( SELECT id,substring_index( substring_index( a.certification_engineer, ',', b.help_topic_id + 1 ), ',',- 1 ) user_id
|
||||
FROM
|
||||
project_library_base a
|
||||
JOIN mysql.help_topic b ON b.help_topic_id < ( length( a.certification_engineer ) - length( REPLACE ( a.certification_engineer, ',', '' ) ) + 1 )) temp
|
||||
WHERE user_id = #{userId}) a ON pm.project_id = a.id
|
||||
where pm.state = #{state}
|
||||
</select>
|
||||
</mapper>
|
||||
+41
-18
@@ -58,6 +58,7 @@ public class ParamsManifestTodoCenterServiceImpl implements IParamsManifestTodoC
|
||||
return page;
|
||||
}
|
||||
|
||||
List<String> manifestIdListHomo = paramsManifestEOMapper.listInfoHomo(loginUser.getId(), ManifestStateEnum.COLLECTING.getValue());// 获取当前登录人 拥有认证工程师角色的清单
|
||||
for(ParamsManifestTodoCenterEO paramsManifestEO : paramsManifestEOListAll) {
|
||||
// 查询清单的所有参数项
|
||||
List<ParamsCollectManifestEO> pcmList = pcmListAll.stream().filter(e->paramsManifestEO.getId().equals(e.getParamsManifestId())).collect(Collectors.toList());
|
||||
@@ -68,26 +69,48 @@ public class ParamsManifestTodoCenterServiceImpl implements IParamsManifestTodoC
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
// 统计待发起数量 包括状态:待发起收集,变更,工程接口人退回
|
||||
count = (int) pcmList.stream().filter(e-> CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.SDT_BACK.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.CHANGE.getValue().equals(e.getState())).count();
|
||||
if (count > 0) {
|
||||
paramsManifestEO.setWaitCollectNum(count);
|
||||
}
|
||||
// 统计待分配数量 包括状态:待工程接口人处理,填写人退回
|
||||
count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.DRE_BACK.getValue().equals(e.getState()))).count();
|
||||
if (count > 0) {
|
||||
paramsManifestEO.setWaitSdtNum(count);
|
||||
}
|
||||
// 统计待填写数量 包括状态:待填写,认证工程师退回
|
||||
count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.CERT_BACK.getValue().equals(e.getState()))).count();
|
||||
if (count > 0) {
|
||||
paramsManifestEO.setWaitFillNum(count);
|
||||
|
||||
if(CollectionUtil.isNotEmpty(manifestIdListHomo) && manifestIdListHomo.contains(paramsManifestEO.getId())) { // 认证工程师 可以看到三种数量
|
||||
// 统计待发起数量 包括状态:待发起收集,变更,工程接口人退回
|
||||
count = (int) pcmList.stream().filter(e -> CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.SDT_BACK.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.CHANGE.getValue().equals(e.getState())).count();
|
||||
if (count > 0) {
|
||||
paramsManifestEO.setWaitCollectNum(count);
|
||||
}
|
||||
|
||||
// 统计待分配数量 包括状态:待工程接口人处理,填写人退回
|
||||
count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.DRE_BACK.getValue().equals(e.getState()))).count();
|
||||
if (count > 0) {
|
||||
paramsManifestEO.setWaitSdtNum(count);
|
||||
}
|
||||
|
||||
// 统计待填写数量 包括状态:待填写,认证工程师退回
|
||||
count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.CERT_BACK.getValue().equals(e.getState()))).count();
|
||||
if (count > 0) {
|
||||
paramsManifestEO.setWaitFillNum(count);
|
||||
}
|
||||
} else { // 工程接口人和填写人 只能看到 工程接口人是自己 或 填写人是自己 的数量
|
||||
// 统计待分配数量 包括状态:待工程接口人处理,填写人退回
|
||||
count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.DRE_BACK.getValue().equals(e.getState()))
|
||||
&& loginUser.getUsername().equals(e.getSdt())).count();
|
||||
if (count > 0) {
|
||||
paramsManifestEO.setWaitSdtNum(count);
|
||||
}
|
||||
|
||||
// 统计待填写数量 包括状态:待填写,认证工程师退回
|
||||
count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.CERT_BACK.getValue().equals(e.getState()))
|
||||
&& loginUser.getUsername().equals(e.getDre())).count();
|
||||
if (count > 0) {
|
||||
paramsManifestEO.setWaitFillNum(count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 分页
|
||||
|
||||
Reference in New Issue
Block a user