fengjin
2022-11-16 25151016a50308ec3ca8d40414ab3c683e8d5d99
Merge branch 'zigonggao_dev' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into zigonggao_dev
12个文件已修改
110 ■■■■ 已修改文件
flower_city/src/main/resources/mapper/GuideEvolveMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/sanshuo/IndexDateDTO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventConciliationVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComEvent.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/GuideEvolveMapper.xml
@@ -65,10 +65,10 @@
            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,
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/sanshuo/IndexDateDTO.java
@@ -14,4 +14,5 @@
    private Long id;
    @ApiModelProperty(hidden = true)
    private Integer level;
    private String appId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventConciliationVO.java
@@ -40,4 +40,6 @@
    private List<ComEventRequestImageVO> images;
    @ApiModelProperty("处理人")
    private String solver;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java
@@ -127,7 +127,7 @@
     * */
    @GetMapping("/expertShow")
    public R expertShow(){
        return comSanShuoExpertService.expertShow();
        return comSanShuoExpertService.expertShow(this.getLoginUserInfo().getAppId());
    }
@@ -146,7 +146,7 @@
    @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());
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java
@@ -111,4 +111,16 @@
    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();
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java
@@ -34,7 +34,7 @@
    /**
     * 专家风采列表
     * */
    List<ExpertShowVO> expertShow();
    List<ExpertShowVO> expertShow(String appId);
    /**
     * 行业分中心分组专家
@@ -50,7 +50,7 @@
    /**
     * 社区分组专家
     * */
    List<ExpertShowVO> selectExpertCommunity();
    List<ExpertShowVO> selectExpertCommunity(String appId);
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComEvent.java
@@ -225,5 +225,6 @@
    private Integer level;
    @TableField(exist = false)
    private Long searchId;
    private Integer isEnd;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java
@@ -29,7 +29,7 @@
     * 专家风采列表
     * @return 出列记过
     * */
    R expertShow();
    R expertShow(String appId);
    /**
     * 专家级别与单位范围
@@ -44,7 +44,7 @@
    /**
     * 专家风采列表
     * */
    R expertShowList(Integer level, Long id);
    R expertShowList(Integer level, Long id,String appId);
    /**
     * Excel添加专家
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -303,7 +303,7 @@
                    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);
@@ -326,8 +326,11 @@
                    //关闭所有权限
                    comEvent.setDistribution(0);
                    comEvent.setSolve(0);
                    comEvent.setArchive(0);
                    //comEvent.setArchive(0);
                    comEvent.setChangeExpert(0);
                    comEvent.setConciliation(0);
                }
            }
            else{
                //已上报到街道或三说会堂,社区没有分配和受理权限权限
@@ -369,7 +372,8 @@
                    //调解中,可以查看,调解,更换专家,删除
                    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);
@@ -378,12 +382,12 @@
                    //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)){
                //根据事件状态决定权限
@@ -425,11 +429,12 @@
            }
            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){
            //街道权限,操作街道下属社区的所有事件
@@ -467,7 +472,7 @@
                    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);
@@ -535,7 +540,7 @@
                    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);
@@ -818,6 +823,11 @@
            }else {
                //已是最高上报级别,无法上报
            }
        }
        //是否为已完成并且不上报
        if (!comEventConciliationVO.getReportSuperior() && comEventConciliationVO.getEventSucceed().equals(2)){
            comEvent.setIsEnd(1);
        }
        int flag = baseMapper.updateById(comEvent);
        comEventTransferRecord.setEventId(comEvent.getId());
@@ -1103,9 +1113,19 @@
        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));
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java
@@ -217,8 +217,8 @@
     * 专家风采
     * */
    @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()) {
@@ -234,7 +234,7 @@
                    expertShowVO.setChildList(expertShowVOS1);
                }else {
                    expertShowVO.setName("村/社区调解站调解专家");
                    List<ExpertShowVO> expertShowVOS1 = comSanshuoExpertDao.selectExpertCommunity();
                    List<ExpertShowVO> expertShowVOS1 = comSanshuoExpertDao.selectExpertCommunity(appId);
                    expertShowVO.setChildList(expertShowVOS1);
                }
            }
@@ -349,9 +349,10 @@
     * 专家风采列表
     * */
    @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)){
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml
@@ -49,7 +49,7 @@
    </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">
@@ -270,7 +270,7 @@
        </if>
        ) as accept,
        (SELECT count(id) FROM com_sanshuo_event_info
        where event_process_status = 5
        where is_end &lt;> 1
        AND user_event_status not in(3,4)
        AND app_id='wx0cef797390444b75'
        <if test="dto.type == 2">
@@ -296,6 +296,7 @@
        </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">
@@ -374,6 +375,7 @@
        </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">
@@ -481,6 +483,7 @@
        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
@@ -509,7 +512,7 @@
        where event_process_status not in(7,8,9)
        AND app_id='wx0cef797390444b75'
        group by current_process_type
        having current_process_type &lt;>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'
@@ -529,6 +532,22 @@
    <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
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml
@@ -37,7 +37,7 @@
        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,
@@ -106,7 +106,7 @@
    <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">