Merge branch 'sanshuohuitang_dev' into huacheng_test
| | |
| | | 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; |
| | |
| | | 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、行业分中心") |
| | |
| | | @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; |
| | | } |
| | |
| | | private Long pageNo; |
| | | private Long pageSize; |
| | | private String keyword; |
| | | @ApiModelProperty(value = "查看类型1用户查看自己的调解事件申请2专家查看自己受理的调解事件") |
| | | private Integer userType; |
| | | } |
| | |
| | | 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) { |
| | |
| | | @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)); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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()); |
| | | } |
| | | |
| | | |
| | |
| | | * 小程序获取可选择专家 |
| | | * */ |
| | | @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()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @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(); |
| | | |
| | |
| | | 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; |
| | |
| | | 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") |
| | |
| | | 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、行业分中心") |
| | |
| | | private String result; |
| | | /**已归档处理完毕时间*/ |
| | | @ApiModelProperty(name = "resultDate", value = "已归档处理完毕时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date resultDate; |
| | | /**是否紧急*/ |
| | | @ApiModelProperty(name = "urgent", value = "是否紧急") |
| | |
| | | private Long createBy; |
| | | /**创建时间*/ |
| | | @ApiModelProperty(name = "createAt", value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createAt; |
| | | /**修改人*/ |
| | | @ApiModelProperty(name = "updateBy", value = "修改人") |
| | |
| | | private String eventCategoryName; |
| | | @TableField(exist = false) |
| | | private String keyword; |
| | | @TableField(exist = false) |
| | | private String userType; |
| | | } |
| | |
| | | /** |
| | | * 小程序获取专家列表 |
| | | * */ |
| | | R selectExpertList(); |
| | | R selectExpertList(Integer type,Long id,Long cid); |
| | | |
| | | /** |
| | | * 专家风采列表 |
| | |
| | | * @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 三说会堂事件表列表数据 |
| | |
| | | * @author manailin |
| | | * @date 2022-09-07 11:23:51 |
| | | */ |
| | | List<ComEvent> listByComEvent(ComEvent comEvent); |
| | | List<ComEvent> listByComEvent(ComEvent comEvent,LoginUserInfoVO loginUserInfoVO); |
| | | |
| | | /** |
| | | * description 修改三说会堂事件表状态 |
| | |
| | | @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()); |
| | |
| | | |
| | | |
| | | @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(); |
| | | } |
| | |
| | | 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); |
| | |
| | | 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); |
| | | }); |
| | |
| | | * 小程序获取专家列表 |
| | | * */ |
| | | @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)); |
| | | }else { |
| | | comSanshuoExpert.setRate(new BigDecimal(0)); |
| | | } |
| | | 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 { |
| | | 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); |
| | | } |
| | | |
| | | |
| | |
| | | <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> |
| | |
| | | <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"> |