Browse Source

fiex:优化定时任务 与 二级大屏

master
pengwei 1 month ago
parent
commit
cd7858026e
  1. 5
      src/main/java/com/biutag/supervision/mapper/RpcInfringerResultMapper.java
  2. 2
      src/main/java/com/biutag/supervision/pojo/entity/RpcApplySupervise.java
  3. 3
      src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java
  4. 7
      src/main/java/com/biutag/supervision/service/RpcInfringerResultService.java
  5. 9
      src/main/resources/mapper/RpcApplySuperviseMapper.xml

5
src/main/java/com/biutag/supervision/mapper/RpcInfringerResultMapper.java

@ -16,6 +16,11 @@ public interface RpcInfringerResultMapper extends BaseMapper<RpcInfringerResult>
List<String> selectNamesByTime(Date beginTime, Date endTime);
@Select("select distinct id_code , id, rpc_id,tort_name,defend_handle_way,defend_handle_way_name,gender from rpc_infringer_result " +
" WHERE rpc_id = #{id} ")
List<RpcInfringerResult> selectDistinctId(String id);
@Select(" SELECT rir.* from rpc_infringer_result rir LEFT JOIN rpc_apply as rpa" +
" on rpa.rpc_id = rir.rpc_id" +
" WHERE rpa.crt_time between #{beginTime} and #{endTime} " +

2
src/main/java/com/biutag/supervision/pojo/entity/RpcApplySupervise.java

@ -63,8 +63,10 @@ public class RpcApplySupervise {
private String factReason;
// 案发环节
@TableField("incident_link")
private String incidentLink;
@TableField("incident_link_name")
private String incidentLinkName;
//录入人警号
private String inputEmpNo;

3
src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java

@ -106,7 +106,8 @@ public class RpcApplySuperviseService extends ServiceImpl<RpcApplySuperviseMappe
//获取数据
superviseVo.setRpcApplyVo(rpcApplyVo);
//获取侵权人信息
List<RpcInfringerResult> rpcInfringerResults = rpcInfringerResultService.list(new LambdaQueryWrapper<RpcInfringerResult>().select(RpcInfringerResult::getIdCode).eq(RpcInfringerResult::getRpcId,id));
List<RpcInfringerResult> rpcInfringerResults =
rpcInfringerResultService.selectDistinctId(id);
if (ArrayUtil.isNotEmpty(rpcInfringerResults)){
superviseVo.setRpcInfringerResults(rpcInfringerResults);
}

7
src/main/java/com/biutag/supervision/service/RpcInfringerResultService.java

@ -5,7 +5,14 @@ import com.biutag.supervision.mapper.RpcInfringerResultMapper;
import com.biutag.supervision.pojo.entity.RpcInfringerResult;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class RpcInfringerResultService extends ServiceImpl<RpcInfringerResultMapper, RpcInfringerResult> {
public List<RpcInfringerResult> selectDistinctId(String id){
return baseMapper.selectDistinctId(id);
}
}

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

@ -7,12 +7,15 @@
<select id="queryPage" resultType="com.biutag.supervision.pojo.vo.RpcApplyVo">
SELECT
distinct a.rpc_id,
a.number,a.apply_date,a.happen_time,a.applicant_emp_name,a.applicant_emp_no,p.id, p.emp_no, p.name, p.sex, p.birthday, p.level_education, p.politic_countenance, p.id_code, p.mobile, p.depart_id, p.depart_name, p.job, p.police_types, p.police_rank, p.bank_card, p.bank_branch, p.bank_card_account, ap.injury_severity as injuryServerity, ap.injury_severity_name as injuryServerityName, sup.job as policeJob
a.number,
a.happen_time as happenTime,
a.case_category as caseCategory,
a.fact_reason as factReason,
a.infringer_handle as infringerHandle,
p.depart_name as departName
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