Merge branch 'zigonggao_dev' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into zigonggao_dev
| | |
| | | id, |
| | | departmental_id, |
| | | IFNULL( |
| | | (select concat(substring(user_name,1,1),'老师') from automessage_sys_user where a.to_user_id=user_id and user_type in (1,2) or is_division_head=1), |
| | | (select concat(substring(user_name,1,1),'老师') from automessage_sys_user where a.to_user_id=user_id and (user_type in (1,2) or is_division_head=1)), |
| | | (select user_name from automessage_sys_user where a.to_user_id=user_id))toUserName, |
| | | IFNULL( |
| | | (select concat(substring(user_name,1,1),'老师') from automessage_sys_user where a.from_user_id=user_id and user_type in (1,2) or is_division_head=1), |
| | | (select concat(substring(user_name,1,1),'老师') from automessage_sys_user where a.from_user_id=user_id and (user_type in (1,2) or is_division_head=1)), |
| | | (select user_name from automessage_sys_user where a.from_user_id=user_id))fromUserName, |
| | | to_user_id, |
| | | from_user_id, |
| | |
| | | private Long id; |
| | | @ApiModelProperty(hidden = true) |
| | | private Integer level; |
| | | private String appId; |
| | | } |
| | |
| | | private List<ComEventRequestImageVO> images; |
| | | @ApiModelProperty("处理人") |
| | | private String solver; |
| | | |
| | | |
| | | } |
| | |
| | | * */ |
| | | @GetMapping("/expertShow") |
| | | public R expertShow(){ |
| | | return comSanShuoExpertService.expertShow(); |
| | | return comSanShuoExpertService.expertShow(this.getLoginUserInfo().getAppId()); |
| | | } |
| | | |
| | | |
| | |
| | | @GetMapping("/expertShowList") |
| | | public R expertShowList(@RequestParam(value = "level",required = false)Integer level, |
| | | @RequestParam(value = "id",required = false)Long id){ |
| | | return comSanShuoExpertService.expertShowList(level,id); |
| | | return comSanShuoExpertService.expertShowList(level,id,this.getLoginUserInfo().getAppId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | void insertEventAndExpertRecord(@Param("eventId") Long eventId, @Param("expertId") Long experId,@Param("status")Integer status); |
| | | |
| | | void updateLog(@Param("eventId") Long id, @Param("expertId") Long specialistId); |
| | | |
| | | /** |
| | | * 社区专家受理数量 |
| | | * */ |
| | | int expertSolveCountCommunity(); |
| | | |
| | | /** |
| | | * 行业分中心专家受理数量 |
| | | * */ |
| | | int expertSolveCountCenter(); |
| | | |
| | | |
| | | } |
| | |
| | | /** |
| | | * 专家风采列表 |
| | | * */ |
| | | List<ExpertShowVO> expertShow(); |
| | | List<ExpertShowVO> expertShow(String appId); |
| | | |
| | | /** |
| | | * 行业分中心分组专家 |
| | |
| | | /** |
| | | * 社区分组专家 |
| | | * */ |
| | | List<ExpertShowVO> selectExpertCommunity(); |
| | | List<ExpertShowVO> selectExpertCommunity(String appId); |
| | | |
| | | |
| | | /** |
| | |
| | | private Integer level; |
| | | @TableField(exist = false) |
| | | private Long searchId; |
| | | private Integer isEnd; |
| | | |
| | | } |
| | |
| | | * 专家风采列表 |
| | | * @return 出列记过 |
| | | * */ |
| | | R expertShow(); |
| | | R expertShow(String appId); |
| | | |
| | | /** |
| | | * 专家级别与单位范围 |
| | |
| | | /** |
| | | * 专家风采列表 |
| | | * */ |
| | | R expertShowList(Integer level, Long id); |
| | | R expertShowList(Integer level, Long id,String appId); |
| | | |
| | | /** |
| | | * Excel添加专家 |
| | |
| | | comEvent.setSolve(0); |
| | | comEvent.setArchive(0); |
| | | comEvent.setDistribution(0); |
| | | } else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(1)){ |
| | | } else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(1) && !comEvent.getIsEnd().equals(1)){ |
| | | //上报并且调解失败,此时事件的状态为6,事件结果为调解失败 |
| | | //comEvent.setDistribution(0); |
| | | comEvent.setEventResult(null); |
| | |
| | | //关闭所有权限 |
| | | comEvent.setDistribution(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setArchive(0); |
| | | //comEvent.setArchive(0); |
| | | comEvent.setChangeExpert(0); |
| | | comEvent.setConciliation(0); |
| | | } |
| | | |
| | | } |
| | | else{ |
| | | //已上报到街道或三说会堂,社区没有分配和受理权限权限 |
| | |
| | | //调解中,可以查看,调解,更换专家,删除 |
| | | comEvent.setDistribution(0); |
| | | comEvent.setArchive(0); |
| | | } else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(1)){ |
| | | comEvent.setSolve(0); |
| | | }else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(1) && !comEvent.getIsEnd().equals(1)){ |
| | | //调解完成,可以归档,查看 |
| | | comEvent.setEventResult(null); |
| | | comEvent.setEventProcessStatus(2); |
| | |
| | | //comEvent.setChangeExpert(0); |
| | | //comEvent.setArchive(0); |
| | | comEvent.setConciliation(0); |
| | | } |
| | | else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventSucceed().equals(2)){ |
| | | }else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventSucceed().equals(2)){ |
| | | //调解完成,可以归档,查看 |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | comEvent.setChangeExpert(0); |
| | | comEvent.setConciliation(0); |
| | | } |
| | | }else if (comEvent.getCurrentProcessType().equals(5)){ |
| | | //根据事件状态决定权限 |
| | |
| | | } |
| | | else{ |
| | | //未上上报到行业分中心,或者已上报到区三说会堂,仅查看 |
| | | comEvent.setArchive(0); |
| | | //comEvent.setArchive(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | comEvent.setChangeExpert(0); |
| | | //comEvent.setConciliation(0); |
| | | comEvent.setConciliation(0); |
| | | |
| | | } |
| | | }else if (userType.equals(5) || isStreet){ |
| | | //街道权限,操作街道下属社区的所有事件 |
| | |
| | | comEvent.setEventResult(null); |
| | | comEvent.setEventProcessStatus(1); |
| | | } |
| | | else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(1)){ |
| | | else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(1) && !comEvent.getIsEnd().equals(1)){ |
| | | //设置为待受理 |
| | | comEvent.setEventResult(null); |
| | | comEvent.setEventProcessStatus(2); |
| | |
| | | comEvent.setDistribution(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setArchive(0); |
| | | } else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(1)){ |
| | | } else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(1) && !comEvent.getIsEnd().equals(1)){ |
| | | //失败后转交三说会堂 |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | |
| | | }else { |
| | | //已是最高上报级别,无法上报 |
| | | } |
| | | } |
| | | |
| | | //是否为已完成并且不上报 |
| | | if (!comEventConciliationVO.getReportSuperior() && comEventConciliationVO.getEventSucceed().equals(2)){ |
| | | comEvent.setIsEnd(1); |
| | | } |
| | | int flag = baseMapper.updateById(comEvent); |
| | | comEventTransferRecord.setEventId(comEvent.getId()); |
| | |
| | | if (type.equals(1)){ |
| | | //受理级别占比 |
| | | List<EventRateVO> eventRateVOS = comEventMapper.eventRate(); |
| | | //获取专家受理的数量 |
| | | Integer expertCount=comEventMapper.expertSolveCountCommunity(); |
| | | //获取行业分中心受理数量 |
| | | Integer centerCount=comEventMapper.expertSolveCountCenter(); |
| | | for (EventRateVO eventRateVO : eventRateVOS) { |
| | | if (nonNull(eventRateVO)){ |
| | | eventRateVO.setName(typeToName(eventRateVO.getCurrentProcessType())); |
| | | if (eventRateVO.getCurrentProcessType().equals(2)){ |
| | | eventRateVO.setCount(eventRateVO.getCount()+expertCount); |
| | | } |
| | | if (eventRateVO.getCurrentProcessType().equals(1)){ |
| | | eventRateVO.setCount(eventRateVO.getCount()+centerCount); |
| | | } |
| | | if (nonNull(eventCount) && !eventCount.equals(0)){ |
| | | //计算占比 |
| | | eventRateVO.setRate(NumberUtil.div(eventRateVO.getCount(),eventCount,2)); |
| | |
| | | * 专家风采 |
| | | * */ |
| | | @Override |
| | | public R expertShow() { |
| | | List<ExpertShowVO> expertShowVOS = comSanshuoExpertDao.expertShow(); |
| | | public R expertShow(String appId) { |
| | | List<ExpertShowVO> expertShowVOS = comSanshuoExpertDao.expertShow(appId); |
| | | for (ExpertShowVO expertShowVO : expertShowVOS) { |
| | | if (nonNull(expertShowVO.getLevel())){ |
| | | if (1==expertShowVO.getLevel()) { |
| | |
| | | expertShowVO.setChildList(expertShowVOS1); |
| | | }else { |
| | | expertShowVO.setName("村/社区调解站调解专家"); |
| | | List<ExpertShowVO> expertShowVOS1 = comSanshuoExpertDao.selectExpertCommunity(); |
| | | List<ExpertShowVO> expertShowVOS1 = comSanshuoExpertDao.selectExpertCommunity(appId); |
| | | expertShowVO.setChildList(expertShowVOS1); |
| | | } |
| | | } |
| | |
| | | * 专家风采列表 |
| | | * */ |
| | | @Override |
| | | public R expertShowList(Integer level, Long id) { |
| | | public R expertShowList(Integer level, Long id,String appId) { |
| | | QueryWrapper<ComSanshuoExpert> wrapper=new QueryWrapper<>(); |
| | | wrapper.eq("level",level ); |
| | | wrapper.eq("level",level); |
| | | wrapper.eq("app_id",appId); |
| | | if (level.equals(2)){ |
| | | wrapper.eq("industry_center_id", id); |
| | | }else if (level.equals(3)){ |
| | |
| | | |
| | | </resultMap> |
| | | <sql id="columns"> |
| | | id,order_sn,request_user_id,user_event_status,request_user_event_des,event_succeed,current_event_process_result,request_user_name,request_user_tel,event_category,type,submit_date,appointment_time,request_user_community,center_id,center_tel,specialist_org,specialist_level,specialist_id,specialist_name,specialist_tel,specialist_accept_time,revoke_type,event_process_status,current_process_type,current_org_id,current_org_name,current_process_user_id,current_process_user_name,revoke_des,event_result,report_superior,result,result_date,urgent,difficult,urgent_dell,invalid,major,request_user_response,create_by,create_at,update_by,update_at,report_level,report_community,report_street,report_center,report_hall |
| | | id,order_sn,request_user_id,user_event_status,request_user_event_des,event_succeed,current_event_process_result,request_user_name,request_user_tel,event_category,type,submit_date,appointment_time,request_user_community,center_id,center_tel,specialist_org,specialist_level,specialist_id,specialist_name,specialist_tel,specialist_accept_time,revoke_type,event_process_status,current_process_type,current_org_id,current_org_name,current_process_user_id,current_process_user_name,revoke_des,event_result,report_superior,result,result_date,urgent,difficult,urgent_dell,invalid,major,request_user_response,create_by,create_at,update_by,update_at,report_level,report_community,report_street,report_center,report_hall,is_end |
| | | </sql> |
| | | |
| | | <select id="pageByComEvent" resultType="com.panzhihua.service_community.entity.ComEvent"> |
| | |
| | | </if> |
| | | ) as accept, |
| | | (SELECT count(id) FROM com_sanshuo_event_info |
| | | where event_process_status = 5 |
| | | where is_end <> 1 |
| | | AND user_event_status not in(3,4) |
| | | AND app_id='wx0cef797390444b75' |
| | | <if test="dto.type == 2"> |
| | |
| | | </if>) as accepting, |
| | | (SELECT count(id) FROM com_sanshuo_event_info |
| | | where event_process_status = 6 |
| | | AND is_end=1 |
| | | AND user_event_status not in(3) |
| | | AND app_id='wx0cef797390444b75' |
| | | <if test="dto.type == 2"> |
| | |
| | | </if>) as success, |
| | | (select count(id) FROM com_sanshuo_event_info |
| | | where event_result=1 |
| | | AND is_end=1 |
| | | AND user_event_status not in(3,4) |
| | | AND app_id='wx0cef797390444b75' |
| | | <if test="dto.type == 2"> |
| | |
| | | SELECT COUNT(id) FROM com_sanshuo_event_info |
| | | WHERE create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59') |
| | | AND event_process_status=6 |
| | | AND is_end=1 |
| | | AND app_id='wx0cef797390444b75' |
| | | <if test="dto.type == 2"> |
| | | AND current_process_type=1 |
| | |
| | | where event_process_status not in(7,8,9) |
| | | AND app_id='wx0cef797390444b75' |
| | | group by current_process_type |
| | | having current_process_type <>5 |
| | | having current_process_type not in (5) |
| | | </select> |
| | | <select id="expertRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO"> |
| | | select count(id) as count,level as type from com_sanshuo_expert where app_id='wx0cef797390444b75' |
| | |
| | | <select id="insertEventAndExpertRecord"> |
| | | insert into com_sanshuo_expert_event values(#{eventId},#{expertId},#{status}) |
| | | </select> |
| | | <select id="expertSolveCountCommunity" resultType="java.lang.Integer"> |
| | | select count(t.id) from com_sanshuo_event_info t |
| | | left join com_sanshuo_expert t1 on t.specialist_id=t1.id |
| | | where t.event_process_status not in (9) |
| | | AND t.current_process_type=5 |
| | | and t1.level=4 |
| | | AND t.app_id='wx0cef797390444b75' |
| | | </select> |
| | | <select id="expertSolveCountCenter" resultType="java.lang.Integer"> |
| | | select count(t.id) from com_sanshuo_event_info t |
| | | left join com_sanshuo_expert t1 on t.specialist_id=t1.id |
| | | where t.event_process_status not in (9) |
| | | and t1.level=2 |
| | | AND t.current_process_type=5 |
| | | AND t.app_id='wx0cef797390444b75' |
| | | </select> |
| | | <update id="updateLog"> |
| | | update com_sanshuo_expert_event set status = 2 |
| | | where event_id=#{eventId} and expert_id=#{expertId} and status=0 |
| | |
| | | unit_id,unit from com_sanshuo_expert |
| | | </sql> |
| | | <select id="expertShow" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO"> |
| | | select count(id) as 'count',level from com_sanshuo_expert where status=1 and del_flag=1 group by level |
| | | select count(id) as 'count',level from com_sanshuo_expert where status=1 and del_flag=1 and app_id=#{appId} group by level |
| | | </select> |
| | | <select id="expertPage" resultType="com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO"> |
| | | select id,level,community_id, |
| | |
| | | <select id="selectExpertCommunity" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO"> |
| | | select count(t.id) as 'count',t1.name,t1.community_id as id,t.level from com_sanshuo_expert t |
| | | left join com_act t1 on t.community_id=t1.community_id |
| | | where t.level=4 and t.status=1 and t.del_flag=1 |
| | | where t.level=4 and t.status=1 and t.del_flag=1 and t.app_id=#{appId} |
| | | group by t1.name |
| | | </select> |
| | | <select id="selectExpertList" resultType="com.panzhihua.service_community.entity.ComSanshuoExpert"> |