Browse Source

fix:维权督办后端接口v2 + 屏蔽维权信息抓取定时任务

master
pengwei 8 months ago
parent
commit
eabc5d55da
  1. 29
      src/main/java/com/biutag/supervision/controller/rightsComfort/SuperviseController.java
  2. 232
      src/main/java/com/biutag/supervision/job/Job.java
  3. 9
      src/main/java/com/biutag/supervision/mapper/RpcApplyPersonMapper.java
  4. 18
      src/main/java/com/biutag/supervision/mapper/RpcApplySuperviseMapper.java
  5. 14
      src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java
  6. 9
      src/main/java/com/biutag/supervision/pojo/entity/RpcApplySupervise.java
  7. 6
      src/main/java/com/biutag/supervision/pojo/entity/RpcInfringerResult.java
  8. 2
      src/main/java/com/biutag/supervision/pojo/param/RpcApplySupervisionQueryParam.java
  9. 8
      src/main/java/com/biutag/supervision/pojo/vo/RpcApplyVo.java
  10. 23
      src/main/java/com/biutag/supervision/pojo/vo/RpcSuperviseVo.java
  11. 50
      src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java
  12. 5
      src/main/resources/mapper/RpcApplySuperviseMapper.xml

29
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<Page<RpcApplyVo>> list(RpcApplySupervisionQueryParam queryParam){
return Result.success(rpcApplySuperviseService.page(queryParam));
return Result.success(rpcApplySuperviseService.pageList(queryParam));
}
/**
* 获取维权督办详情
* @param id 维权事件id
* */
@GetMapping("/{id}")
public Result<RpcSuperviseVo> getDetail(@PathVariable String id){
RpcSuperviseVo superviseVo = rpcApplySuperviseService.getDetail(id);
if(ObjectUtil.isNotEmpty(superviseVo)){
return Result.success(superviseVo);
}else{
return Result.failed("没有找到相关的数据");
}
}
/**
* 不属实
* */
@PutMapping
public Result<Void> upData(RpcApplySupervise rpcApplySupervise){
public Result<Void> upData(@RequestBody RpcApplySupervise rpcApplySupervise){
if(rpcApplySuperviseService.updateById(rpcApplySupervise)){
return Result.success();
}else{

232
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<DwdAsjZfbaShrxx2> 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<SupDepart>().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<SupDepart>().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<DwdAsjZfbaWfrwfxx> wfrwfxxes = dwdAsjZfbaWfrwfxxMapper.selectList(new LambdaQueryWrapper<DwdAsjZfbaWfrwfxx>().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<DwdAsjZfbaShrxx2> 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<SupDepart>().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<SupDepart>().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<DwdAsjZfbaWfrwfxx> wfrwfxxes = dwdAsjZfbaWfrwfxxMapper.selectList(new LambdaQueryWrapper<DwdAsjZfbaWfrwfxx>().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);
// });
// }
//
// });
// }
}

9
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<RpcApplyPerson> {
Page<RpcApplyVo> queryPage(@Param("page") Page<RpcApplySupervise> page, @Param(Constants.WRAPPER) QueryWrapper<RpcApplySupervise> 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<RpcApplyPerson> selectPerson(String id);
}

18
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<RpcApplySupervise> {
Page<RpcApplyVo> queryPage(@Param("page") Page<RpcApplySupervise> page, @Param(Constants.WRAPPER) QueryWrapper<RpcApplySupervise> 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);
}

14
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;

9
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;
}

6
src/main/java/com/biutag/supervision/pojo/entity/RpcInfringerResult.java

@ -31,5 +31,11 @@ public class RpcInfringerResult {
// 处理方式-名称
@TableField("defend_handle_way_name")
private String defendHandleWayName;
//性别
@TableField("gender")
private String gender;
//身份证
@TableField("id_code")
private String idCode;
}

2
src/main/java/com/biutag/supervision/pojo/param/RpcApplySupervisionQueryParam.java

@ -21,7 +21,7 @@ public class RpcApplySupervisionQueryParam extends Page {
private List<Date> happenTime;
//案件名称
private String applicantEmpName;
private String caseName;
//案件管辖单位
private String departId;
//侵权形式

8
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;
}

23
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<RpcInfringerResult> rpcInfringerResults;
//受害人信息
private List<RpcApplyPerson> rpcApplyPeoples;
}

50
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<RpcApplySuperviseMapper, RpcApplySupervise> {
private final RpcRightPersonService rpcRightPersonService;
private final SupDepartService departService;
private final RpcInfringerResultService rpcInfringerResultService;
private final RpcApplyPersonMapper rpcApplyPersonMapper;
//分页查询
public Page<RpcApplyVo> page(RpcApplySupervisionQueryParam queryParam, String type) {
public Page<RpcApplyVo> pageList(RpcApplySupervisionQueryParam queryParam) {
System.out.println(queryParam.getDepartId());
UserAuth user = UserContextHolder.getCurrentUser();
QueryWrapper<RpcApplySupervise> queryWrapper = new QueryWrapper<>();
if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType())) {
@ -48,9 +57,9 @@ public class RpcApplySuperviseService extends ServiceImpl<RpcApplySuperviseMappe
queryWrapper.in("a.handle_depart_id", childrenIds);
}
}
queryWrapper.like(StrUtil.isNotBlank(queryParam.getApplicantEmpName()), "a.applicant_emp_name", queryParam.getApplicantEmpName())
queryWrapper.like(StrUtil.isNotBlank(queryParam.getCaseName()), "a.case_name", queryParam.getCaseName())
.eq(StrUtil.isNotBlank(queryParam.getDepartId()), "a.depart_id", queryParam.getDepartId())
.eq("a.type", type)
.eq("a.type", "1")
.eq(StrUtil.isNotBlank(queryParam.getInfringerHandle()), "a.infringer_handle", queryParam.getInfringerHandle())
.eq(StrUtil.isNotBlank(queryParam.getVerified()),"a.verified",queryParam.getVerified())
.eq(StrUtil.isNotBlank(queryParam.getCaseNumber()),"a.case_number",queryParam.getCaseNumber())
@ -64,4 +73,31 @@ public class RpcApplySuperviseService extends ServiceImpl<RpcApplySuperviseMappe
return baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper);
}
//获取详情信息
public RpcSuperviseVo getDetail(String id){
RpcSuperviseVo superviseVo=new RpcSuperviseVo();
//根据id获取数据
RpcApplyVo rpcApplyVo = baseMapper.selectDataById(id);
if(ObjectUtil.isNotEmpty(rpcApplyVo)){
//获取数据
superviseVo.setRpcApplyVo(rpcApplyVo);
//获取侵权人信息
List<RpcInfringerResult> rpcInfringerResults = rpcInfringerResultService.list(new LambdaQueryWrapper<RpcInfringerResult>().eq(RpcInfringerResult::getRpcId,id));
if (ArrayUtil.isNotEmpty(rpcInfringerResults)){
superviseVo.setRpcInfringerResults(rpcInfringerResults);
}
//获取被害人信息
List<RpcApplyPerson> rpcApplyPersonList =rpcApplyPersonMapper.selectPerson(id);
if(ArrayUtil.isNotEmpty(rpcApplyPersonList)){
superviseVo.setRpcApplyPeoples(rpcApplyPersonList);
}
return superviseVo;
}else{
return null;
}
}
}

5
src/main/resources/mapper/RpcApplySuperviseMapper.xml

@ -2,15 +2,16 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.biutag.supervision.mapper.RpcApplyMapper">
<mapper namespace="com.biutag.supervision.mapper.RpcApplySuperviseMapper">
<select id="queryPage" resultType="com.biutag.supervision.pojo.vo.RpcApplyVo">
SELECT
a.*, p.*, ap.injury_severity, ap.injury_severity_name
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
${ew.getCustomSqlSegment}
</select>

Loading…
Cancel
Save