5 changed files with 158 additions and 6 deletions
@ -0,0 +1,58 @@ |
|||||
|
package com.kms.yxgh.df.dto; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.kms.yxgh.common.dto.OperatorDto; |
||||
|
import com.kms.yxgh.common.dto.SupplementDto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 堤防维修养护记录 |
||||
|
* |
||||
|
* @author sy |
||||
|
* @date 2023-11-20 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel("堤防维修养护记录验收列表") |
||||
|
public class DfYhRecordApprovalDto { |
||||
|
|
||||
|
@ApiModelProperty("养护记录id") |
||||
|
private String id; |
||||
|
|
||||
|
@ApiModelProperty("堤防代码") |
||||
|
private String dikeCode; |
||||
|
|
||||
|
@ApiModelProperty("堤防名称") |
||||
|
private String dikeName; |
||||
|
|
||||
|
@ApiModelProperty("堤防类型") |
||||
|
private Integer dikeType; |
||||
|
|
||||
|
@ApiModelProperty("维修养护类型") |
||||
|
private String type; |
||||
|
|
||||
|
@ApiModelProperty("计划代码") |
||||
|
private String planId; |
||||
|
|
||||
|
@ApiModelProperty("计划名称") |
||||
|
private String planName; |
||||
|
|
||||
|
@ApiModelProperty("资金") |
||||
|
private List<SupplementDto> supplements; |
||||
|
|
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@ApiModelProperty("完成时间") |
||||
|
private Date finishedTime; |
||||
|
|
||||
|
@ApiModelProperty("维修养护负责人") |
||||
|
private OperatorDto responsiblePerson; |
||||
|
|
||||
|
@ApiModelProperty("工程单位") |
||||
|
private String engineeringUnit; |
||||
|
|
||||
|
} |
@ -0,0 +1,73 @@ |
|||||
|
<?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.DfYhRecordMapper"> |
||||
|
|
||||
|
<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.ListDocHandler"/> |
||||
|
<association property="detail" javaType="com.kms.yxgh.df.dto.DfYhRecordApprovalDto"> |
||||
|
<id property="id" column="jl_id"/> |
||||
|
<result property="dikeCode" column="dike_code"/> |
||||
|
<result property="dikeName" column="dike_name"/> |
||||
|
<result property="dikeType" column="dike_type"/> |
||||
|
<result property="planName" column="plan_name"/> |
||||
|
<result property="planId" column="plan_id"/> |
||||
|
<result property="finishedTime" column="start_date"/> |
||||
|
<result property="supplements" column="supplement" |
||||
|
typeHandler="com.kms.yxgh.common.mapper.handler.ListSupplementHandler"/> |
||||
|
<result property="engineeringUnit" column="engineering_unit"/> |
||||
|
<result property="responsiblePerson" column="responsible_person" |
||||
|
typeHandler="com.kms.yxgh.common.mapper.handler.OperatorHandler"/> |
||||
|
<result property="type" column="type"/> |
||||
|
</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_id, jl.create_time finished_time, |
||||
|
yh.id plan_id,yh.dike_code dike_code, yh.dike_name dike_name, yh.name plan_name, yh.start_date start_date, |
||||
|
yh.end_date |
||||
|
end_date, |
||||
|
yh.supplement supplement, yh.doc doc, yh.engineering_unit engineering_unit, yh.responsible_person |
||||
|
responsible_person, |
||||
|
yh.type type |
||||
|
FROM bs_sgc_sp_task ts |
||||
|
LEFT JOIN bs_sgc_sp_operator op ON ts.id = op.task_id and op.uid = #{dto.userId} |
||||
|
LEFT JOIN bs_sgc_df_yhjl jl ON jl.id = ts.form_id |
||||
|
LEFT JOIN bs_sgc_df_yhjh yh ON yh.id = jl.plan_id |
||||
|
LEFT JOIN att_dike_base jb ON yh.dike_code = jb.dike_code and jb.expr_date is null |
||||
|
WHERE ts.business_type = #{dto.businessType} |
||||
|
<if test='dto.status != null and dto.status != ""'> |
||||
|
AND ts.status = #{dto.status} |
||||
|
</if> |
||||
|
<if test='dto.condition.dikeCode != null and dto.condition.dikeCode != ""'> |
||||
|
AND yh.dike_code = #{dto.condition.dikeCode} |
||||
|
</if> |
||||
|
<if test='dto.condition.name != null'> |
||||
|
AND yh.name LIKE CONCAT('%',#{dto.condition.name},'%') |
||||
|
</if> |
||||
|
<if test='dto.condition.adcd != null and dto.condition.adcd != ""'> |
||||
|
AND jb.adcd LIKE CONCAT(#{dto.condition.adcd},'%') |
||||
|
</if> |
||||
|
<if test='dto.condition.dikeName != null and dto.condition.dikeName != ""'> |
||||
|
AND yh.dike_name LIKE CONCAT('%',#{dto.condition.dikeName},'%') |
||||
|
</if> |
||||
|
<if test='dto.condition.startDate != null'> |
||||
|
AND yh.start_date >= #{dto.condition.startDate} |
||||
|
</if> |
||||
|
<if test='dto.condition.endDate != null'> |
||||
|
AND yh.end_date <= #{dto.condition.endDate} |
||||
|
</if> |
||||
|
ORDER BY yh.create_time DESC |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue