Commit 5bbe872d authored by EDY's avatar EDY

优化

parent d41f5f4b
......@@ -30,6 +30,9 @@ public class BaseContractInfo extends BaseEntity
/** 主体id */
private Long subjectId;
/** 主体名称 */
private Long subjectName;
/** 合同编号 */
@Excel(name = "合同编号")
private String htbh;
......
......@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="BaseContractInfo" id="BaseContractInfoResult">
<result property="id" column="id" />
<result property="subjectId" column="subject_id" />
<result property="subjectName" column="subject_name" />
<result property="htbh" column="htbh" />
<result property="bmId" column="bm_id" />
<result property="ssbm" column="ssbm" />
......@@ -53,13 +54,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectBaseContractInfoVo">
select id,subject_id,htbh, bm_id, ssbm, ywy_id, ywy, kh_id, khmc, htmc, cplb, j_gsmc, j_txdz, j_yb, j_dzyj, j_hkr, j_khyh, j_yhzh, j_swdjh, j_lxr, j_lxdh, htnr, qysj, htzt, fkfs, htsxsj, htzzsj, qs, htze,hkje, fkbl, fd_flag, fdje, dqjd, ztdw, htfj,shr_id,shr,shzt, bz, delete_flag, create_time, create_by, update_time, update_by from base_contract_info
select id,subject_id,subject_name,htbh, bm_id, ssbm, ywy_id, ywy, kh_id, khmc, htmc, cplb, j_gsmc, j_txdz, j_yb, j_dzyj, j_hkr, j_khyh, j_yhzh, j_swdjh, j_lxr, j_lxdh, htnr, qysj, htzt, fkfs, htsxsj, htzzsj, qs, htze,hkje, fkbl, fd_flag, fdje, dqjd, ztdw, htfj,shr_id,shr,shzt, bz, delete_flag, create_time, create_by, update_time, update_by from base_contract_info
</sql>
<select id="selectBaseContractInfoList" parameterType="BaseContractInfo" resultMap="BaseContractInfoResult">
<include refid="selectBaseContractInfoVo"/>
<where>
<if test="subjectId != null and subjectId != ''"> and subject_id = #{subjectId}</if>
<if test="subjectName != null and subjectName != ''"> and subject_name = #{subjectName}</if>
<if test="htbh != null and htbh != ''"> and htbh = #{htbh}</if>
<if test="bmId != null "> and bm_id = #{bmId}</if>
<if test="ssbm != null and ssbm != ''"> and ssbm = #{ssbm}</if>
......@@ -131,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into base_contract_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="subjectId != null">subject_id,</if>
<if test="subjectName != null">subject_name,</if>
<if test="htbh != null">htbh,</if>
<if test="bmId != null">bm_id,</if>
<if test="ssbm != null">ssbm,</if>
......@@ -176,6 +179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="subjectId != null">#{subjectId},</if>
<if test="subjectName != null">#{subjectName},</if>
<if test="htbh != null">#{htbh},</if>
<if test="bmId != null">#{bmId},</if>
<if test="ssbm != null">#{ssbm},</if>
......@@ -225,6 +229,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update base_contract_info
<trim prefix="SET" suffixOverrides=",">
<if test="subjectId != null">subject_id = #{subjectId},</if>
<if test="subjectName != null">subject_name = #{subjectName},</if>
<if test="htbh != null">htbh = #{htbh},</if>
<if test="bmId != null">bm_id = #{bmId},</if>
<if test="ssbm != null">ssbm = #{ssbm},</if>
......
......@@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="khgs != null and khgs != ''"> and khgs = #{khgs}</if>
<if test="khly != null "> and khly = #{khly}</if>
<if test="cplb != null "> and cplb = #{cplb}</if>
<if test="sjh != null and sjh != ''"> and sjh = #{sjh}</if>
<if test="sjh != null and sjh != ''"> and sjh like concat('%', #{sjh}, '%')</if>
<if test="wx != null and wx != ''"> and wx = #{wx}</if>
<if test="khdz != null and khdz != ''"> and khdz = #{khdz}</if>
<if test="khxq != null and khxq != ''"> and khxq like concat('%', #{khxq}, '%')</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment