Browse Source

fiex:人员抽检补充非空校验

master
pengwei 1 month ago
parent
commit
6c34b1958a
  1. 2
      src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java
  2. 12
      src/main/resources/mapper/RpcApplyMapper.xml

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

@ -23,6 +23,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@ -150,6 +151,7 @@ public class RpcApplySuperviseService extends ServiceImpl<RpcApplySuperviseMappe
rpcApply.setApplicantEmpName(s.getEmpName());
rpcApply.setApplicantEmpNo(s.getEmpNo());
rpcApply.setRpcId(IdUtil.fastSimpleUUID());
rpcApply.setApplyDate(LocalDate.now());
s.setRpcId(rpcApply.getRpcId());
rpcApplyPersonService.upRpcApplyPersonSupervise(s);
rpcApplyService.saveOrUpdate(rpcApply);

12
src/main/resources/mapper/RpcApplyMapper.xml

@ -5,15 +5,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.biutag.supervision.mapper.RpcApplyMapper">
<select id="queryPage" resultType="com.biutag.supervision.pojo.vo.RpcApplyVo">
SELECT
a.*, p.*, ap.injury_severity, ap.injury_severity_name,
CASE WHEN d.level = 3 THEN CONCAT(d1.short_name, d.short_name) ELSE d.short_name END depart_full_name
FROM
rpc_apply 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_depart d ON a.depart_id = d.id
LEFT JOIN sup_depart d1 ON d.pid = d1.id
SELECT rpc_id as rpcId, applicant_emp_name as applicantEmpName,applicant_emp_no as applicantEmpNo,
happen_time as happenTime,depart_name as departName,number as caseNumber,fact_reason as factReason,
rpc_status as rpcStatus
${ew.getCustomSqlSegment}
</select>

Loading…
Cancel
Save