Browse Source

fix: 修复审批列表

release-sy-tdsql
hxh 1 month ago
parent
commit
021f210cde
  1. 49
      shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfYhV2Mapper.java
  2. 67
      shuili-system/src/main/resources/mapper/yxgh/DfYhV2Mapper.xml

49
shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfYhV2Mapper.java

@ -4,14 +4,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yxgh.common.dto.*;
import com.kms.yxgh.common.mapper.handler.DocHandler;
import com.kms.yxgh.common.mapper.handler.OperatorHandler;
import com.kms.yxgh.df.domain.DfYhV2;
import com.kms.yxgh.df.dto.v2.DfRecordSearchV2Dto;
import com.kms.yxgh.df.dto.v2.DfYhApproveDto;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
@ -26,51 +22,6 @@ import java.util.List;
@Repository
public interface DfYhV2Mapper extends BaseMapper<DfYhV2> {
@Select("<script> " +
" SELECT ts.id id, ts.form_id formId, ts.create_time submit_time, ts.approval_time approval_time, ts.status " +
" status, " +
" ts.operator operator, ts.comment comment, ts.doc ts_doc, " +
" jl.id , jl.name ,jl.dike_code dikeCode, jl.dike_name dikeName, jl.type type, jl.category category, " +
" jl.issue_level issueLevel, jl.duty_holder_id dutyHolderId, jl.duty_holder_name dutyHolderName " +
" FROM bs_sgc_sp_task ts " +
" LEFT JOIN bs_sgc_df_xcyj jl ON jl.id = ts.form_id " +
" WHERE ts.business_type = #{dto.businessType} " +
" <if test='dto.status != null and dto.status != \"\"'> " +
" AND ts.status = #{dto.status} " +
" </if> " +
" <if test='dto.condition!= null and dto.condition.name != null'> " +
" AND jl.name LIKE CONCAT('%',#{dto.condition.name},'%') " +
" </if> " +
" <if test='dto.condition!= null and dto.condition.type != null and dto.condition.type != \"\"'> " +
" AND jl.type = #{dto.condition.type} " +
" </if> " +
" <if test='dto.condition!= null and dto.condition.category != null and dto.condition.category != \"\"'> " +
" AND jl.category = #{dto.condition.category} " +
" </if> " +
" <if test='dto.condition!= null and dto.condition.problemLevel != null and dto.condition.problemLevel != \"\"'> " +
" AND jl.issue_level = #{dto.condition.problemLevel} " +
" </if> " +
" <if test='dto.condition!= null and dto.condition.status != null and dto.condition.status != \"\"'> " +
" AND jl.status = #{dto.condition.status} " +
" </if> " +
" <if test='dto.condition!= null and dto.condition.startDate != null and dto.condition.startDate != \"\"'> " +
" AND jl.start_date &gt;= #{dto.condition.startDate} " +
" </if> " +
" <if test='dto.condition!= null and dto.condition.endDate != null and dto.condition.endDate != \"\"'> " +
" AND jl.end_date &lt;= #{dto.condition.endDate} " +
" </if> " +
" <if test='dto.condition!= null and dto.condition.dutyHolder != null and dto.condition.dutyHolder != \"\"'> " +
" AND jl.duty_holder_id = #{dto.condition.dutyHolder} " +
" </if> " +
" ORDER BY jl.update_time DESC </script>")
@Results(id = "approvalSearchPage", value = {
@Result(column = "operator", property = "operator", typeHandler = OperatorHandler.class),
@Result(column = "ts_doc", property = "doc", typeHandler = DocHandler.class),
@Result(column = "id", property = "formId"),
@Result(column = "form_id", property = "formId"),
@Result(column = "create_time", property = "submitTime"),
@Result(column = "approval_time", property = "approvalTime"),
})
IPage<ApprovalDetailDto<DfYhApproveDto>> approvalSearchPage(Page<DfRecordSearchV2Dto> page, @Param("dto") ApprovalSearchDto<DfRecordSearchV2Dto> data);

67
shuili-system/src/main/resources/mapper/yxgh/DfYhV2Mapper.xml

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.kms.yxgh.df.mapper.DfYhV2Mapper">
<resultMap id="approvalMap" type="com.kms.yxgh.common.dto.ApprovalDetailDto">
<id property="id" column="id"/>
<result property="formId" column="formId"/>
<result property="submitTime" column="submit_time"/>
<result property="approvalTime" column="approval_time"/>
<result property="status" column="status"/>
<result property="comment" column="comment"/>
<result property="operator" column="operator" typeHandler="com.kms.yxgh.common.mapper.handler.OperatorHandler"/>
<result property="doc" column="ts_doc" typeHandler="com.kms.yxgh.common.mapper.handler.DocHandler"/>
<association property="detail" javaType="com.kms.yxgh.df.dto.v2.DfYhApproveDto">
<id property="id" column="jl_id"/>
<result property="name" column="name"/>
<result property="dikeCode" column="dike_code"/>
<result property="dikeName" column="dike_name"/>
<result property="type" column="type"/>
<result property="category" column="category"/>
<result property="problemLevel" column="problem_level"/>
<result property="dutyHolderId" column="duty_holder_id"/>
<result property="dutyHolderName" column="duty_holder_name"/>
</association>
</resultMap>
<select id="approvalSearchPage" resultMap="approvalMap">
SELECT ts.id id, ts.form_id formId, ts.create_time submit_time, ts.approval_time approval_time, ts.status status,
ts.operator operator, ts.comment comment, ts.doc ts_doc,
jl.id , jl.name ,jl.dike_code , jl.dike_name , jl.type type, jl.category ,
jl.problem_level , jl.duty_holder_id , jl.duty_holder_name
FROM bs_sgc_sp_task ts
LEFT JOIN bs_sgc_df_xcyj jl ON jl.id = ts.form_id
WHERE
ts.business_type = #{dto.businessType}
<if test="dto.status != null and dto.status != ''">
AND ts.status = #{dto.status}
</if>
<if test="dto.condition!= null and dto.condition.name != null">
AND jl.name LIKE CONCAT('%',#{dto.condition.name},'%')
</if>
<if test="dto.condition!= null and dto.condition.type != null and dto.condition.type != ''">
AND jl.type = #{dto.condition.type}
</if>
<if test="dto.condition!= null and dto.condition.category != null and dto.condition.category != ''">
AND jl.category = #{dto.condition.category}
</if>
<if test="dto.condition!= null and dto.condition.problemLevel != null and dto.condition.problemLevel != ''">
AND jl.issue_level = #{dto.condition.problemLevel}
</if>
<if test="dto.condition!= null and dto.condition.status != null and dto.condition.status != ''">
AND jl.status = #{dto.condition.status}
</if>
<if test="dto.condition!= null and dto.condition.startDate != null and dto.condition.startDate != ''">
AND jl.start_date &gt;= #{dto.condition.startDate}
</if>
<if test="dto.condition!= null and dto.condition.endDate != null and dto.condition.endDate != ''">
AND jl.end_date &lt;= #{dto.condition.endDate}
</if>
<if test="dto.condition!= null and dto.condition.dutyHolder != null and dto.condition.dutyHolder != ''">
AND jl.duty_holder_id = #{dto.condition.dutyHolder}
</if>
ORDER BY jl.update_time DESC
</select>
</mapper>
Loading…
Cancel
Save