From eabc5d55da907c60542d2c85185c5eefcb3f013b Mon Sep 17 00:00:00 2001 From: pengwei Date: Tue, 10 Jun 2025 11:20:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=BB=B4=E6=9D=83=E7=9D=A3=E5=8A=9E?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3v2=20+=20=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E7=BB=B4=E6=9D=83=E4=BF=A1=E6=81=AF=E6=8A=93=E5=8F=96=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rightsComfort/SuperviseController.java | 29 ++- .../java/com/biutag/supervision/job/Job.java | 232 +++++++++--------- .../mapper/RpcApplyPersonMapper.java | 9 + .../mapper/RpcApplySuperviseMapper.java | 18 ++ .../pojo/entity/RpcApplyPerson.java | 14 ++ .../pojo/entity/RpcApplySupervise.java | 9 + .../pojo/entity/RpcInfringerResult.java | 14 +- .../param/RpcApplySupervisionQueryParam.java | 2 +- .../supervision/pojo/vo/RpcApplyVo.java | 8 + .../supervision/pojo/vo/RpcSuperviseVo.java | 23 ++ .../service/RpcApplySuperviseService.java | 50 +++- .../mapper/RpcApplySuperviseMapper.xml | 5 +- 12 files changed, 275 insertions(+), 138 deletions(-) create mode 100644 src/main/java/com/biutag/supervision/pojo/vo/RpcSuperviseVo.java diff --git a/src/main/java/com/biutag/supervision/controller/rightsComfort/SuperviseController.java b/src/main/java/com/biutag/supervision/controller/rightsComfort/SuperviseController.java index afe4198..95d52f7 100644 --- a/src/main/java/com/biutag/supervision/controller/rightsComfort/SuperviseController.java +++ b/src/main/java/com/biutag/supervision/controller/rightsComfort/SuperviseController.java @@ -1,20 +1,19 @@ package com.biutag.supervision.controller.rightsComfort; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.entity.RpcApplySupervise; import com.biutag.supervision.pojo.param.RpcApplyQueryParam; import com.biutag.supervision.pojo.param.RpcApplySupervisionQueryParam; import com.biutag.supervision.pojo.vo.RpcApplyVo; +import com.biutag.supervision.pojo.vo.RpcSuperviseVo; import com.biutag.supervision.service.RpcApplyService; import com.biutag.supervision.service.RpcApplySuperviseService; import lombok.RequiredArgsConstructor; import lombok.extern.log4j.Log4j; import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/rights/supervise") @@ -26,15 +25,29 @@ public class SuperviseController { private final RpcApplySuperviseService rpcApplySuperviseService; /** * 获取各单位的维权督办列表 - * todo 获取各单位的维权督办列表 * */ @GetMapping public Result> list(RpcApplySupervisionQueryParam queryParam){ - return Result.success(rpcApplySuperviseService.page(queryParam)); + return Result.success(rpcApplySuperviseService.pageList(queryParam)); } - + /** + * 获取维权督办详情 + * @param id 维权事件id + * */ + @GetMapping("/{id}") + public Result getDetail(@PathVariable String id){ + RpcSuperviseVo superviseVo = rpcApplySuperviseService.getDetail(id); + if(ObjectUtil.isNotEmpty(superviseVo)){ + return Result.success(superviseVo); + }else{ + return Result.failed("没有找到相关的数据"); + } + } + /** + * 不属实 + * */ @PutMapping - public Result upData(RpcApplySupervise rpcApplySupervise){ + public Result upData(@RequestBody RpcApplySupervise rpcApplySupervise){ if(rpcApplySuperviseService.updateById(rpcApplySupervise)){ return Result.success(); }else{ diff --git a/src/main/java/com/biutag/supervision/job/Job.java b/src/main/java/com/biutag/supervision/job/Job.java index 604cfd0..48e66f9 100644 --- a/src/main/java/com/biutag/supervision/job/Job.java +++ b/src/main/java/com/biutag/supervision/job/Job.java @@ -105,121 +105,121 @@ public class Job { private final RpcApplySuperviseService rpcApplySuperviseService; // 每天一次 23:30:00 //todo 维权信息 - @Scheduled(cron = "0 30 23 * * ?") - public void rights() { - log.info("rights--------------------"); - log.info("维权信息抓取中---------------------"); - // 维权 - List shrxxList = dwdAsjZfbaShrxx2Service.listAll(); - log.info("数据:{}条", shrxxList.size()); - shrxxList.forEach(item -> { - RpcApplySupervise rpcApply = new RpcApplySupervise(); - rpcApply.setRpcId(item.getZj()); - rpcApply.setCrtTime(LocalDateTime.now()); - rpcApply.setUptTime(LocalDateTime.now()); - // 姓名 - rpcApply.setApplicantEmpName(item.getXm()); - // 受害日期 - if (Objects.nonNull(item.getShrq())) { - rpcApply.setHappenTime(item.getShrq().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); - } - - // 案件编号 - rpcApply.setCaseNumber(item.getAjbh()); - // 受害人警号 - SupPolice police = policeService.getByIdCode(item.getGmsfhm()); - - - if (Objects.nonNull(police)) { - // 警号 - rpcApply.setApplicantEmpNo(police.getEmpNo()); - -// SupDepart depart = departService.getById(police.getOrgId()); -// rpcApply.setDepartId(depart.getId()); -// rpcApply.setDepartId(depart.getName()); - } - if (StrUtil.isNotBlank(item.getAjbh())) { - DwdAsjZfbaAjjbxx ajjbxx = dwdAsjZfbaAjjbxxMapper.selectByAjbh(item.getAjbh()); - //获取办案人id - if(StrUtil.isNotEmpty(ajjbxx.getBar1id())){ - DwdRyZfbaBaryxx dwdRyZfbaBaryxx = dwdRyZfbaBaryxxService.getById(ajjbxx.getBar1id()); - if(ObjectUtil.isNotEmpty(dwdRyZfbaBaryxx)){ - SupPolice policeData = policeService.getByIdCode(dwdRyZfbaBaryxx.getZjhm()); - rpcApply.setInputEmpNo(policeData.getEmpNo()); - } - - } - - //获取单位进行处理 - if(StrUtil.isNotEmpty(ajjbxx.getBadwidmc())){ - - SupDepart supDepart=supDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupDepart::getName,ajjbxx.getBadwidmc())); - rpcApply.setDepartId(supDepart.getId()); - rpcApply.setDepartName(supDepart.getShortName()); - - //获取二级单位的信息 - String[] depts = ajjbxx.getBadwidmc().split("局"); - String StatisticsGroupName = null; - if(depts.length >= 2){ - StatisticsGroupName = depts[0]+"局"+depts[1]+"局"; - }else{ - StatisticsGroupName = depts[0]+"局"; - } - - SupDepart groupDept= supDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupDepart::getName,StatisticsGroupName)); - rpcApply.setSecondDepartId(groupDept.getId()); - } - // 案件信息 - rpcApply.setFactReason(ajjbxx.getJyaq()); - if ("刑事".equals(ajjbxx.getAjbzmc())) { - rpcApply.setInfringerHandle("刑事追究"); - rpcApply.setCaseType("1"); - } - if ("行政".equals(ajjbxx.getAjbzmc())) { - rpcApply.setInfringerHandle("行政处罚"); - rpcApply.setCaseType("2"); - } - rpcApply.setCaseCategory(ajjbxx.getAjlbmc()); - } - // 申请类型 - rpcApply.setType(RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()); - // 已办结 - rpcApply.setRpcStatus(ComfortStatus.completed.name()); - // 数据来源 - rpcApply.setSource("gbase"); - rpcApplySuperviseService.save(rpcApply); - - //受害人列表 - RpcApplyPerson rpcApplyPerson= new RpcApplyPerson(); - rpcApplyPerson.setType(RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()); - rpcApplyPerson.setInjurySeverity(item.getShcdmc()); - rpcApplyPerson.setCreatTime(LocalDateTime.now()); - rpcApplyPerson.setUdpTime(LocalDateTime.now()); - rpcApplyPerson.setId(IdUtil.fastSimpleUUID()); - if(Objects.nonNull(police)){ - rpcApply.setApplicantEmpNo(police.getEmpNo()); - } - rpcApplyPerson.setRpcId(item.getZj()); - //存储受害人信息 - rpcApplyPersonService.save(rpcApplyPerson); - - - //存储犯人信息 - List wfrwfxxes = dwdAsjZfbaWfrwfxxMapper.selectList(new LambdaQueryWrapper().eq(DwdAsjZfbaWfrwfxx::getAjbh,item.getAjbh())); - log.info("违法人员信息数据:{}条", wfrwfxxes.size()); - if (ArrayUtil.isNotEmpty(wfrwfxxes)){ - wfrwfxxes.forEach(x->{ - RpcInfringerResult rpcInfringerResult =new RpcInfringerResult(); - rpcInfringerResult.setId(IdUtil.fastSimpleUUID()); - rpcInfringerResult.setRpcId(item.getZj()); - rpcInfringerResult.setTortName(x.getXm()); - rpcInfringerResult.setDefendHandleWayName(x.getClfs()); - //保存犯人信息 - rpcInfringerResultService.save(rpcInfringerResult); - }); - } - - }); - } +// @Scheduled(cron = "0 30 23 * * ?") +// public void rights() { +// log.info("rights--------------------"); +// log.info("维权信息抓取中---------------------"); +// // 维权 +// List shrxxList = dwdAsjZfbaShrxx2Service.listAll(); +// log.info("数据:{}条", shrxxList.size()); +// shrxxList.forEach(item -> { +// RpcApplySupervise rpcApply = new RpcApplySupervise(); +// rpcApply.setRpcId(item.getZj()); +// rpcApply.setCrtTime(LocalDateTime.now()); +// rpcApply.setUptTime(LocalDateTime.now()); +// // 姓名 +// rpcApply.setApplicantEmpName(item.getXm()); +// // 受害日期 +// if (Objects.nonNull(item.getShrq())) { +// rpcApply.setHappenTime(item.getShrq().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); +// } +// +// // 案件编号 +// rpcApply.setCaseNumber(item.getAjbh()); +// // 受害人警号 +// SupPolice police = policeService.getByIdCode(item.getGmsfhm()); +// +// +// if (Objects.nonNull(police)) { +// // 警号 +// rpcApply.setApplicantEmpNo(police.getEmpNo()); +// +//// SupDepart depart = departService.getById(police.getOrgId()); +//// rpcApply.setDepartId(depart.getId()); +//// rpcApply.setDepartId(depart.getName()); +// } +// if (StrUtil.isNotBlank(item.getAjbh())) { +// DwdAsjZfbaAjjbxx ajjbxx = dwdAsjZfbaAjjbxxMapper.selectByAjbh(item.getAjbh()); +// //获取办案人id +// if(StrUtil.isNotEmpty(ajjbxx.getBar1id())){ +// DwdRyZfbaBaryxx dwdRyZfbaBaryxx = dwdRyZfbaBaryxxService.getById(ajjbxx.getBar1id()); +// if(ObjectUtil.isNotEmpty(dwdRyZfbaBaryxx)){ +// SupPolice policeData = policeService.getByIdCode(dwdRyZfbaBaryxx.getZjhm()); +// rpcApply.setInputEmpNo(policeData.getEmpNo()); +// } +// +// } +// +// //获取单位进行处理 +// if(StrUtil.isNotEmpty(ajjbxx.getBadwidmc())){ +// +// SupDepart supDepart=supDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupDepart::getName,ajjbxx.getBadwidmc())); +// rpcApply.setDepartId(supDepart.getId()); +// rpcApply.setDepartName(supDepart.getShortName()); +// +// //获取二级单位的信息 +// String[] depts = ajjbxx.getBadwidmc().split("局"); +// String StatisticsGroupName = null; +// if(depts.length >= 2){ +// StatisticsGroupName = depts[0]+"局"+depts[1]+"局"; +// }else{ +// StatisticsGroupName = depts[0]+"局"; +// } +// +// SupDepart groupDept= supDepartMapper.selectOne(new LambdaQueryWrapper().eq(SupDepart::getName,StatisticsGroupName)); +// rpcApply.setSecondDepartId(groupDept.getId()); +// } +// // 案件信息 +// rpcApply.setFactReason(ajjbxx.getJyaq()); +// if ("刑事".equals(ajjbxx.getAjbzmc())) { +// rpcApply.setInfringerHandle("刑事追究"); +// rpcApply.setCaseType("1"); +// } +// if ("行政".equals(ajjbxx.getAjbzmc())) { +// rpcApply.setInfringerHandle("行政处罚"); +// rpcApply.setCaseType("2"); +// } +// rpcApply.setCaseCategory(ajjbxx.getAjlbmc()); +// } +// // 申请类型 +// rpcApply.setType(RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()); +// // 已办结 +// rpcApply.setRpcStatus(ComfortStatus.completed.name()); +// // 数据来源 +// rpcApply.setSource("gbase"); +// rpcApplySuperviseService.save(rpcApply); +// +// //受害人列表 +// RpcApplyPerson rpcApplyPerson= new RpcApplyPerson(); +// rpcApplyPerson.setType(RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()); +// rpcApplyPerson.setInjurySeverity(item.getShcdmc()); +// rpcApplyPerson.setCreatTime(LocalDateTime.now()); +// rpcApplyPerson.setUdpTime(LocalDateTime.now()); +// rpcApplyPerson.setId(IdUtil.fastSimpleUUID()); +// if(Objects.nonNull(police)){ +// rpcApply.setApplicantEmpNo(police.getEmpNo()); +// } +// rpcApplyPerson.setRpcId(item.getZj()); +// //存储受害人信息 +// rpcApplyPersonService.save(rpcApplyPerson); +// +// +// //存储犯人信息 +// List wfrwfxxes = dwdAsjZfbaWfrwfxxMapper.selectList(new LambdaQueryWrapper().eq(DwdAsjZfbaWfrwfxx::getAjbh,item.getAjbh())); +// log.info("违法人员信息数据:{}条", wfrwfxxes.size()); +// if (ArrayUtil.isNotEmpty(wfrwfxxes)){ +// wfrwfxxes.forEach(x->{ +// RpcInfringerResult rpcInfringerResult =new RpcInfringerResult(); +// rpcInfringerResult.setId(IdUtil.fastSimpleUUID()); +// rpcInfringerResult.setRpcId(item.getZj()); +// rpcInfringerResult.setTortName(x.getXm()); +// rpcInfringerResult.setDefendHandleWayName(x.getClfs()); +// //保存犯人信息 +// rpcInfringerResultService.save(rpcInfringerResult); +// }); +// } +// +// }); +// } } diff --git a/src/main/java/com/biutag/supervision/mapper/RpcApplyPersonMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcApplyPersonMapper.java index fa819c1..d542e45 100644 --- a/src/main/java/com/biutag/supervision/mapper/RpcApplyPersonMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/RpcApplyPersonMapper.java @@ -9,9 +9,18 @@ import com.biutag.supervision.pojo.entity.RpcApplyPerson; import com.biutag.supervision.pojo.entity.RpcApplySupervise; import com.biutag.supervision.pojo.vo.RpcApplyVo; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; public interface RpcApplyPersonMapper extends BaseMapper { Page queryPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + + + @Select(" SELECT a.*,sup.job as empType,sup.name as empName from rpc_apply_person as a " + + " left join sup_police as sup " + + " on a.emp_no = sup.emp_no where a.rpc_id = #{id} " ) + List selectPerson(String id); } diff --git a/src/main/java/com/biutag/supervision/mapper/RpcApplySuperviseMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcApplySuperviseMapper.java index 2cbba07..712d09d 100644 --- a/src/main/java/com/biutag/supervision/mapper/RpcApplySuperviseMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/RpcApplySuperviseMapper.java @@ -9,10 +9,28 @@ import com.biutag.supervision.pojo.entity.RpcApplySupervise; import com.biutag.supervision.pojo.vo.RpcApplyVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; @Mapper public interface RpcApplySuperviseMapper extends BaseMapper { Page queryPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + + @Select("SELECT" + + " a.*, " + + " p.*, " + + " ap.injury_severity AS injuryServerity, " + + " ap.injury_severity_name as injuryServerityName, " + + " sup.job AS policeJob " + + " FROM " + + " rpc_apply_supervise a " + + " LEFT JOIN rpc_person p ON a.rpc_id = p.rpc_id " + + " LEFT JOIN rpc_apply_person ap ON a.rpc_id = ap.rpc_id " + + " LEFT JOIN sup_police sup ON a.input_emp_no = sup.emp_no " + + " WHERE a.rpc_id = #{id} " + ) + RpcApplyVo selectDataById(String id); + + } diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java b/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java index f8eb038..10d3a08 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java @@ -30,8 +30,22 @@ public class RpcApplyPerson { // 受伤程度 private String injurySeverity; + private String injurySeverityName; + //办理结果 + @TableField("handle_result") + private String handleResult; + + //身份证号 + @TableField("id_code") + private String idCode; + + + //警员身份 + private String empType; + //警员姓名 + private String empName; // 类型,1维权,2,抚慰,3容错 private String type; diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RpcApplySupervise.java b/src/main/java/com/biutag/supervision/pojo/entity/RpcApplySupervise.java index 2adb36e..bf59dd5 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/RpcApplySupervise.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/RpcApplySupervise.java @@ -118,5 +118,14 @@ public class RpcApplySupervise { //是否属实 @TableField("verified") private String verified; + //案件名称 + @TableField("case_name") + private String caseName; + //强制变更措施 + @TableField("change_mandate") + private String changeMandate; + //案件报送情况 + @TableField("case_submission") + private String caseSubmission; } diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RpcInfringerResult.java b/src/main/java/com/biutag/supervision/pojo/entity/RpcInfringerResult.java index b1cc1d8..dc863f3 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/RpcInfringerResult.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/RpcInfringerResult.java @@ -12,11 +12,11 @@ import java.time.LocalDateTime; @Getter public class RpcInfringerResult { - // + // @TableId(value = "id") private String id; - // + // @TableField("rpc_id") private String rpcId; @@ -31,5 +31,11 @@ public class RpcInfringerResult { // 处理方式-名称 @TableField("defend_handle_way_name") private String defendHandleWayName; - -} \ No newline at end of file + //性别 + @TableField("gender") + private String gender; + //身份证 + @TableField("id_code") + private String idCode; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/param/RpcApplySupervisionQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/RpcApplySupervisionQueryParam.java index 5438911..de47057 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/RpcApplySupervisionQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/RpcApplySupervisionQueryParam.java @@ -21,7 +21,7 @@ public class RpcApplySupervisionQueryParam extends Page { private List happenTime; //案件名称 - private String applicantEmpName; + private String caseName; //案件管辖单位 private String departId; //侵权形式 diff --git a/src/main/java/com/biutag/supervision/pojo/vo/RpcApplyVo.java b/src/main/java/com/biutag/supervision/pojo/vo/RpcApplyVo.java index f13e719..7ae0c54 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/RpcApplyVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/RpcApplyVo.java @@ -89,7 +89,15 @@ public class RpcApplyVo { //侵权人处理方式 private String infringerHandle; + //受伤程度编码 + private String injuryServerity; + //受伤程度 + private String injuryServerityName; //案件类别 private String caseCategory; + //案件名称 + private String caseName; + //警种 + private String policeJob; } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/RpcSuperviseVo.java b/src/main/java/com/biutag/supervision/pojo/vo/RpcSuperviseVo.java new file mode 100644 index 0000000..919f95a --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/RpcSuperviseVo.java @@ -0,0 +1,23 @@ +package com.biutag.supervision.pojo.vo; + +import com.biutag.supervision.pojo.entity.RpcApplyPerson; +import com.biutag.supervision.pojo.entity.RpcApplySupervise; +import com.biutag.supervision.pojo.entity.RpcInfringerResult; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Getter +@Setter +public class RpcSuperviseVo { + + //维权案件详情 + private RpcApplyVo rpcApplyVo; + + //侵权人信息 + private List rpcInfringerResults; + + //受害人信息 + private List rpcApplyPeoples; +} diff --git a/src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java b/src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java index d14aa4c..c0a8611 100644 --- a/src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java +++ b/src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java @@ -1,21 +1,25 @@ package com.biutag.supervision.service; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.constants.AppConstants; +import com.biutag.supervision.mapper.RpcApplyPersonMapper; import com.biutag.supervision.mapper.RpcApplySuperviseMapper; -import com.biutag.supervision.pojo.entity.DepartScore; -import com.biutag.supervision.pojo.entity.RpcApply; -import com.biutag.supervision.pojo.entity.RpcApplySupervise; -import com.biutag.supervision.pojo.entity.RpcRightPerson; +import com.biutag.supervision.mapper.RpcInfringerResultMapper; +import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.param.RpcApplyQueryParam; import com.biutag.supervision.pojo.param.RpcApplySupervisionQueryParam; import com.biutag.supervision.pojo.vo.RpcApplyVo; +import com.biutag.supervision.pojo.vo.RpcSuperviseVo; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -25,15 +29,20 @@ import java.util.stream.Collectors; @RequiredArgsConstructor @Service +@Slf4j public class RpcApplySuperviseService extends ServiceImpl { private final RpcRightPersonService rpcRightPersonService; private final SupDepartService departService; + private final RpcInfringerResultService rpcInfringerResultService; + + private final RpcApplyPersonMapper rpcApplyPersonMapper; //分页查询 - public Page page(RpcApplySupervisionQueryParam queryParam, String type) { + public Page pageList(RpcApplySupervisionQueryParam queryParam) { + System.out.println(queryParam.getDepartId()); UserAuth user = UserContextHolder.getCurrentUser(); QueryWrapper queryWrapper = new QueryWrapper<>(); if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType())) { @@ -48,9 +57,9 @@ public class RpcApplySuperviseService extends ServiceImpl rpcInfringerResults = rpcInfringerResultService.list(new LambdaQueryWrapper().eq(RpcInfringerResult::getRpcId,id)); + if (ArrayUtil.isNotEmpty(rpcInfringerResults)){ + superviseVo.setRpcInfringerResults(rpcInfringerResults); + } + //获取被害人信息 + List rpcApplyPersonList =rpcApplyPersonMapper.selectPerson(id); + if(ArrayUtil.isNotEmpty(rpcApplyPersonList)){ + superviseVo.setRpcApplyPeoples(rpcApplyPersonList); + } + + return superviseVo; + }else{ + return null; + } + } } diff --git a/src/main/resources/mapper/RpcApplySuperviseMapper.xml b/src/main/resources/mapper/RpcApplySuperviseMapper.xml index a087ed2..3564850 100644 --- a/src/main/resources/mapper/RpcApplySuperviseMapper.xml +++ b/src/main/resources/mapper/RpcApplySuperviseMapper.xml @@ -2,15 +2,16 @@ - +