Merge branch 'sanshuohuitang_dev' into huacheng_test
| | |
| | | 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) { |
| | |
| | | * 小程序获取可选择专家 |
| | | * */ |
| | | @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()); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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 = "修改人") |
| | |
| | | /** |
| | | * 小程序获取专家列表 |
| | | * */ |
| | | R selectExpertList(); |
| | | R selectExpertList(Integer type,Long id,Long cid); |
| | | |
| | | /** |
| | | * 专家风采列表 |
| | |
| | | * 小程序获取专家列表 |
| | | * */ |
| | | @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); |
| | | } |
| | | |
| | | |