张天森
2022-10-08 3e63a023f91a1cefbfb72f778bf410b06b021cb9
Merge branch 'sanshuohuitang_dev' into huacheng_test
12个文件已修改
98 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventDetailVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityConvenientApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComEvent.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/IComEventService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventDetailVO.java
@@ -1,5 +1,6 @@
package com.panzhihua.common.model.vos.sanshuo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -76,6 +77,7 @@
    private String specialistTel;
    /**专家受理时间*/
    @ApiModelProperty(name = "specialistAcceptTime", value = "专家受理时间")
    @JsonFormat(pattern = "yyy-MM-dd HH:mm:ss")
    private Date specialistAcceptTime;
    /**撤销类型 1 用户 2 社区3、街道4、行业分中心*/
    @ApiModelProperty(name = "revokeType", value = "撤销类型 1 用户 2 社区3、街道4、行业分中心")
@@ -114,13 +116,18 @@
    @ApiModelProperty(name = "result", value = "归档结案报告")
    private String result;
    /**已归档处理完毕时间*/
    @JsonFormat(pattern = "yyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "resultDate", value = "已归档处理完毕时间")
    private Date resultDate;
    /**创建时间*/
    @JsonFormat(pattern = "yyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "createAt", value = "创建时间")
    private Date createAt;
    /**调解上传图片地址列表,逗号进行分割*/
    @ApiModelProperty(name = "images", value = "调解上传图片地址列表,逗号进行分割")
    private List<ComEventRequestImageVO> images;
    @ApiModelProperty("时间类型名称")
    private String categoryName;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventVO.java
@@ -151,4 +151,6 @@
    private Long pageNo;
    private Long pageSize;
    private String keyword;
    @ApiModelProperty(value = "查看类型1用户查看自己的调解事件申请2专家查看自己受理的调解事件")
    private Integer userType;
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityConvenientApi.java
@@ -229,9 +229,13 @@
        String name = UUID.randomUUID().toString().replaceAll("-", "")+".jpg";
        try {
            SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
            log.info("创建sftp");
            sftp.login();
            log.info("sftp登陆成功");
            InputStream is = BaseUtils.base64StrToInputStream(file.getFile().replace("data:image/png;base64,","").replace("data:image/jpg;base64,","").replace("data:image/jpeg;base64,",""));
            log.info("解析图片转换成功");
            sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is);
            log.info("上传成功");
            sftp.logout();
            return R.ok(url + "/idcard/" + name);
        } catch (Exception e) {
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java
@@ -131,7 +131,7 @@
    @PostMapping("/list")
    public R<List<ComEventVO>> listByComEvent(@RequestBody ComEventVO comEventVO) {
        ComEvent comEvent = CopyUtil.copyProperties(comEventVO, ComEvent.class);
        return R.ok(CopyUtil.beanCopyList(comEventService.listByComEvent(comEvent), ComEventVO.class));
        return R.ok(CopyUtil.beanCopyList(comEventService.listByComEvent(comEvent,this.getLoginUserInfo()), ComEventVO.class));
    }
    /**
@@ -154,7 +154,7 @@
    public R page(@RequestBody ComEventVO comEventVO, Long pageNo, Long pageSize) {
        Page pagination = new Page(pageNo, pageSize);
        ComEvent comEvent = CopyUtil.copyProperties(comEventVO, ComEvent.class);
        return comEventService.pageByComEvent(comEvent, pagination);
        return comEventService.pageByComEvent(comEvent, pagination,this.getLoginUserInfo());
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java
@@ -58,9 +58,8 @@
     * 小程序获取可选择专家
     * */
    @GetMapping("/appletsList")
    public R appList(){
        comSanShuoExpertService.selectExpertList();
        return R.ok(comSanShuoExpertService.list(new QueryWrapper<ComSanshuoExpert>().eq("status",1).eq("del_flag",1)));
    public R appList(@RequestParam ("type")Integer type,@RequestParam("id")Long id){
        return comSanShuoExpertService.selectExpertList(type, id,this.getLoginUserInfo().getCommunityId());
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java
@@ -42,7 +42,7 @@
       * @author manailin
       * @date   2022-09-07 11:23:51
       */
   List<ComEvent> listByComEvent(@Param("comEvent") ComEvent comEvent);
   List<ComEvent> listByComEvent(@Param("comEvent") ComEvent comEvent,@Param("requestUserId") Long requestUserId);
    List<ComEventCalculateVO> calculate();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComEvent.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.panzhihua.common.model.vos.sanshuo.ComEventRequestImageVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -52,9 +53,11 @@
    private String type;
    /**上报提交时间*/
    @ApiModelProperty(name = "submitDate", value = "上报提交时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date submitDate;
    /**选择预约调解时间*/
    @ApiModelProperty(name = "appointmentTime", value = "选择预约调解时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date appointmentTime;
    /**申请人选择的社区ID*/
    @ApiModelProperty(name = "requestUserCommunity", value = "申请人选择的社区ID")
@@ -82,6 +85,7 @@
    private String specialistTel;
    /**专家受理时间*/
    @ApiModelProperty(name = "specialistAcceptTime", value = "专家受理时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date specialistAcceptTime;
    /**撤销类型 1 用户 2 社区3、街道4、行业分中心*/
    @ApiModelProperty(name = "revokeType", value = "撤销类型 1 用户 2 社区3、街道4、行业分中心")
@@ -124,6 +128,7 @@
    private String result;
    /**已归档处理完毕时间*/
    @ApiModelProperty(name = "resultDate", value = "已归档处理完毕时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date resultDate;
    /**是否紧急*/
    @ApiModelProperty(name = "urgent", value = "是否紧急")
@@ -148,6 +153,7 @@
    private Long createBy;
    /**创建时间*/
    @ApiModelProperty(name = "createAt", value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createAt;
    /**修改人*/
    @ApiModelProperty(name = "updateBy", value = "修改人")
@@ -166,4 +172,6 @@
    private String eventCategoryName;
    @TableField(exist = false)
    private String keyword;
    @TableField(exist = false)
    private String userType;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java
@@ -39,7 +39,7 @@
    /**
     * 小程序获取专家列表
     * */
    R selectExpertList();
    R selectExpertList(Integer type,Long id,Long cid);
    /**
     * 专家风采列表
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/IComEventService.java
@@ -50,7 +50,7 @@
     * @author manailin
     * @date 2022-09-07 11:23:51
     */
    R<List<ComEvent>> pageByComEvent(ComEvent comEvent, Page pagination);
    R<List<ComEvent>> pageByComEvent(ComEvent comEvent, Page pagination,LoginUserInfoVO loginUserInfoVO);
    /**
     * description 三说会堂事件表列表数据
@@ -60,7 +60,7 @@
     * @author manailin
     * @date 2022-09-07 11:23:51
     */
    List<ComEvent> listByComEvent(ComEvent comEvent);
    List<ComEvent> listByComEvent(ComEvent comEvent,LoginUserInfoVO loginUserInfoVO);
    /**
     * description 修改三说会堂事件表状态
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -73,8 +73,14 @@
    @Resource
    private CommediateTypeService commediateTypeService;
    @Override
    public R pageByComEvent(ComEvent comEvent, Page pagination) {
    public R pageByComEvent(ComEvent comEvent, Page pagination,LoginUserInfoVO loginUserInfoVO) {
        if (comEvent.getUserType().equals(1)){
            comEvent.setRequestUserId(loginUserInfoVO.getUserId());
        }else if (comEvent.getUserType().equals(2)){
            comEvent.setSpecialistId(loginUserInfoVO.getUserId());
        }
        IPage<ComEvent> list = baseMapper.pageByComEvent(comEvent, pagination);
        if (list.getRecords().size() < 1) {
            return R.ok(Collections.emptyList());
@@ -94,8 +100,8 @@
    @Override
    public List<ComEvent> listByComEvent(ComEvent comEvent) {
        List<ComEvent> list = baseMapper.listByComEvent(comEvent);
    public List<ComEvent> listByComEvent(ComEvent comEvent,LoginUserInfoVO loginUserInfoVO) {
        List<ComEvent> list = baseMapper.listByComEvent(comEvent,null);
        if (list.size() < 1) {
            return Collections.emptyList();
        }
@@ -257,6 +263,7 @@
        ComEvent comEvent = baseMapper.selectById(id);
        ComSanshuoExpert specter = comSanShuoExpertService.getById(comEvent.getSpecialistId());
        CopyUtil.copyProperties(comEvent, comEventDetailVO);
        comEventDetailVO.setCategoryName(commediateTypeService.getById(comEventDetailVO.getEventCategory()).getName());
        List<ComEventResource> resourceList = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, id)
                .eq(ComEventResource::getStatus,1));
        List<ComEventRequestImageVO> comEventRequestImageVO = CopyUtil.deepCopyListObject(resourceList, ComEventRequestImageVO.class);
@@ -265,7 +272,7 @@
        map.put("eventDetail", comEventDetailVO);
        List<ComEventTransferRecord> transferRecord = comEventTransferRecordService.list(new QueryWrapper<ComEventTransferRecord>().lambda().eq(ComEventTransferRecord::getEventId, id));
        transferRecord.forEach(comEventTransferRecord -> {
            List<ComEventResource> list = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getTransferId, comEventTransferRecord.getId()));
            List<ComEventResource> list = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, comEvent.getId()));
            List<ComEventRequestImageVO> ImageVO = CopyUtil.deepCopyListObject(list, ComEventRequestImageVO.class);
            comEventTransferRecord.setImages(ImageVO);
        });
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java
@@ -255,28 +255,28 @@
     * 小程序获取专家列表
     * */
    @Override
    public R selectExpertList() {
        List<ComSanshuoExpert> comSanshuoExperts = comSanshuoExpertDao.selectList(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getStatus, 1).eq(ComSanshuoExpert::getDelFlag, 1));
        //设置成功率
        for (ComSanshuoExpert comSanshuoExpert : comSanshuoExperts) {
            //查询成功率
            Integer count = comEventMapper.selectCount(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, comSanshuoExpert.getId()).eq(ComEvent::getEventProcessStatus, 6));
            Integer successCount = comEventMapper.selectCount(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, comSanshuoExpert.getId()).eq(ComEvent::getEventProcessStatus, 6).eq(ComEvent::getEventResult, 2));
            comSanshuoExpert.setCount(count);
            if (nonNull(count) && !count.equals(0)){
                comSanshuoExpert.setCount(count);
                if (nonNull(successCount) && !count.equals(successCount)){
                    //计算成功率
                    comSanshuoExpert.setRate(NumberUtil.div(successCount, count,2));
    public R selectExpertList(Integer type,Long id,Long cid) {
        List<ComSanshuoExpert> list=new ArrayList<>();
        if (type.equals(1)){
            //行业分中心下属专家
            list=comSanshuoExpertDao.selectList(new QueryWrapper<ComSanshuoExpert>().lambda().
                    eq(ComSanshuoExpert::getStatus, 1).
                    eq(ComSanshuoExpert::getDelFlag,1 ).
                    eq(ComSanshuoExpert::getIndustryCenterId, id));
                }else {
                    comSanshuoExpert.setRate(new BigDecimal(0));
                }
            if (nonNull(id)){
                list=comSanshuoExpertDao.selectList(new QueryWrapper<ComSanshuoExpert>().lambda().
                        eq(ComSanshuoExpert::getStatus, 1).
                        eq(ComSanshuoExpert::getDelFlag,1 ).
                        eq(ComSanshuoExpert::getCommunityId, id));
            }else {
                comSanshuoExpert.setCount(0);
                list=comSanshuoExpertDao.selectList(new QueryWrapper<ComSanshuoExpert>().lambda().
                        eq(ComSanshuoExpert::getStatus, 1).
                        eq(ComSanshuoExpert::getDelFlag,1 ).
                        eq(ComSanshuoExpert::getCommunityId,cid ));
            }
        }
        return R.ok(comSanshuoExperts);
        return R.ok(list);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml
@@ -78,6 +78,12 @@
            <if test="comEvent.currentOrgName != null">
                AND current_org_name = #{comEvent.currentOrgName}
            </if>
            <if test="comEvent.userType == 1">
                AND request_user_id=#{comEvent.requestUserId}
            </if>
            <if test="comEvent.userType == 2">
                AND specialist_id=#{comEvent.specialistId}
            </if>
        </where>
        order by create_at desc
    </select>
@@ -85,6 +91,9 @@
    <select id="listByComEvent" resultType="com.panzhihua.service_community.entity.ComEvent">
        SELECT <include refid="columns" />
        FROM com_sanshuo_event_info
        <if test="requestUserId != null and requestUserId != ''">
            where request_user_id=#{requestUserId}
        </if>
    </select>
    <select id="calculate" resultType="com.panzhihua.common.model.vos.sanshuo.ComEventCalculateVO">