| | |
| | | |
| | | List<WorkflowLink> getReceivedList(int type, UserInf user); |
| | | |
| | | //查询自己需要处理或者审批的 |
| | | List<WorkflowLink> searchTmp(int uId, int uRole, int type, int status); |
| | | /**二次核容和隐患故障的统计*/ |
| | | List<WorkflowLink> getReceivedList2(int type, UserInf user); |
| | | |
| | | //查询自己需要处理或者审批的 |
| | | |
| | | List<WorkflowLink> searchTmp(int uId, int uRole, int type, int status); |
| | | //查询自己申请的工单(去除放电计划) |
| | | |
| | | List<WorkflowMain> getFlowMainByUid(int userId, int type, int status); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 二次核容和隐患故障的统计 |
| | | * |
| | | * 增加了全部 0 |
| | | * 0:全部 |
| | | * 1:审批中 |
| | |
| | | statistics.put(1,0); |
| | | statistics.put(2,0); |
| | | statistics.put(3,0); |
| | | List<WorkflowLink> links = mapper.getReceivedList(type,user); |
| | | List<WorkflowLink> links = mapper.getReceivedList2(type,user); |
| | | Map<Integer, List<WorkflowLink>> receivedListMap = links.stream().collect(Collectors.groupingBy(WorkflowLink::getStatus)); |
| | | Set<Integer> statusSet = receivedListMap.keySet(); |
| | | int sum = 0; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 二次核容和故障隐患的统计 |
| | | * |
| | | * 增加了全部 key=0 |
| | | * @param userId |
| | | * @param type |
| | | * @param type ={0,2,3} 0代表二次核容和故障隐患一起 |
| | | * @see com.whyc.constant.WorkflowEnum |
| | | * |
| | | * @return |
| | |
| | | statistics.put(2,0); |
| | | statistics.put(3,0); |
| | | QueryWrapper<WorkflowMain> query = Wrappers.query(); |
| | | query.eq("create_user_id",userId).eq("type",type); |
| | | query.eq("create_user_id", userId); |
| | | if(type == 0){ |
| | | query.in("type",2,3); |
| | | }else { |
| | | query.eq("type", type); |
| | | } |
| | | List<WorkflowMain> mains = mapper.selectList(query); |
| | | Map<Integer, List<WorkflowMain>> statusListMap = mains.stream().collect(Collectors.groupingBy(WorkflowMain::getStatus)); |
| | | Set<Integer> statusSet = statusListMap.keySet(); |
| | |
| | | and l.deal_user_id is null |
| | | ) |
| | | </select> |
| | | |
| | | <select id="getReceivedList2" resultType="com.whyc.pojo.WorkflowLink"> |
| | | ( |
| | | SELECT l.* |
| | | FROM web_site.tb_workflow_main m, |
| | | web_site.tb_workflow_link l |
| | | where m.id = l.main_id |
| | | <choose> |
| | | <when test="type == 0"> |
| | | and m.type in (2,3) |
| | | </when> |
| | | <otherwise> |
| | | and m.type = #{type} |
| | | </otherwise> |
| | | </choose> |
| | | and l.deal_user_id = #{user.uId} |
| | | ) |
| | | union all |
| | | ( |
| | | SELECT l.* |
| | | FROM web_site.tb_workflow_main m, |
| | | web_site.tb_workflow_link l |
| | | where m.id = l.main_id |
| | | and m.type = #{type} |
| | | and l.deal_role_id = #{user.uRole} |
| | | and l.deal_user_id is null |
| | | ) |
| | | </select> |
| | | |
| | | <select id="searchTmp" resultMap="linkMain"> |
| | | ( |
| | | SELECT parent_id |