协议接口优化
This commit is contained in:
parent
0992fa22d7
commit
da248081bc
|
|
@ -46,6 +46,11 @@ public class BmAgreementInfo extends BaseEntity
|
||||||
@ApiModelProperty(value = "工程标段ID")
|
@ApiModelProperty(value = "工程标段ID")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
|
/** 工程标段名称 */
|
||||||
|
@Excel(name = "工程标段名称")
|
||||||
|
@ApiModelProperty(value = "工程标段名称")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
/** 租赁天数 */
|
/** 租赁天数 */
|
||||||
@Excel(name = "租赁天数")
|
@Excel(name = "租赁天数")
|
||||||
@ApiModelProperty(value = "租赁天数")
|
@ApiModelProperty(value = "租赁天数")
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="signTime" column="sign_time" />
|
<result property="signTime" column="sign_time" />
|
||||||
<result property="unitId" column="unit_id" />
|
<result property="unitId" column="unit_id" />
|
||||||
<result property="projectId" column="project_id" />
|
<result property="projectId" column="project_id" />
|
||||||
|
<result property="projectName" column="project_name" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="leaseDay" column="lease_day" />
|
<result property="leaseDay" column="lease_day" />
|
||||||
<result property="planStartTime" column="plan_start_time" />
|
<result property="planStartTime" column="plan_start_time" />
|
||||||
|
|
@ -27,34 +28,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="isSlt" column="is_slt" />
|
<result property="isSlt" column="is_slt" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectBmAgreementInfoVo">
|
|
||||||
select agreement_id, agreement_code, sign_time, unit_id, project_id, create_by, lease_day, plan_start_time, contract_code, auth_person, phone, create_time, update_by, update_time, remark, company_id, file_name, file_url, status, protocol, is_slt from bm_agreement_info
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectBmAgreementInfoList" parameterType="com.bonus.material.basic.domain.BmAgreementInfo" resultMap="BmAgreementInfoResult">
|
<select id="selectBmAgreementInfoList" parameterType="com.bonus.material.basic.domain.BmAgreementInfo" resultMap="BmAgreementInfoResult">
|
||||||
<include refid="selectBmAgreementInfoVo"/>
|
SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time,
|
||||||
<where>
|
bu.unit_id,bu.unit_name , bp.pro_id as projectId , bp.pro_name as projectName,
|
||||||
<if test="agreementCode != null and agreementCode != ''"> and agreement_code = #{agreementCode}</if>
|
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol
|
||||||
<if test="signTime != null "> and sign_time = #{signTime}</if>
|
FROM bm_agreement_info bai
|
||||||
<if test="unitId != null "> and unit_id = #{unitId}</if>
|
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
LEFT JOIN bm_unit bu ON bu.unit_id = bai.unit_id
|
||||||
<if test="leaseDay != null "> and lease_day = #{leaseDay}</if>
|
where bai.status = '1'
|
||||||
<if test="planStartTime != null "> and plan_start_time = #{planStartTime}</if>
|
<if test="keyWord != null and keyWord != ''">
|
||||||
<if test="contractCode != null and contractCode != ''"> and contract_code = #{contractCode}</if>
|
and (bai.contract_code like concat('%', #{keyWord}, '%') or
|
||||||
<if test="authPerson != null and authPerson != ''"> and auth_person = #{authPerson}</if>
|
auth_person like concat('%', #{keyWord}, '%') or
|
||||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
phone like concat('%', #{keyWord}, '%'))
|
||||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
</if>
|
||||||
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
|
||||||
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
<if test="agreementCode != null and agreementCode != ''">
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
and bai.agreement_code like concat('%', #{agreementCode}, '%')
|
||||||
<if test="protocol != null and protocol != ''"> and protocol = #{protocol}</if>
|
</if>
|
||||||
<if test="isSlt != null "> and is_slt = #{isSlt}</if>
|
<if test="unitId != null and unitId != ''">
|
||||||
</where>
|
and bu.unit_id = #{unitId}
|
||||||
|
</if>
|
||||||
|
<if test="projectId != null and projectId != ''">
|
||||||
|
and bp.pro_id = #{projectId}
|
||||||
|
</if>
|
||||||
|
<if test="dataCondition != null and dataCondition.size()>0">
|
||||||
|
AND bai.agreement_id in
|
||||||
|
<foreach collection="dataCondition" item="agreementId" index="index" open="(" separator="," close=")">
|
||||||
|
#{agreementId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
ORDER BY bai.agreement_id DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBmAgreementInfoByAgreementId" parameterType="Long" resultMap="BmAgreementInfoResult">
|
<select id="selectBmAgreementInfoByAgreementId" parameterType="Long" resultMap="BmAgreementInfoResult">
|
||||||
<include refid="selectBmAgreementInfoVo"/>
|
SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time,
|
||||||
where agreement_id = #{agreementId}
|
bu.unit_id,bu.unit_name , bp.pro_id as projectId , bp.pro_name as projectName,
|
||||||
|
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol
|
||||||
|
FROM bm_agreement_info bai
|
||||||
|
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||||
|
LEFT JOIN bm_unit bu ON bu.unit_id = bai.unit_id
|
||||||
|
where bai.status = '1' and agreement_id = #{agreementId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertBmAgreementInfo" parameterType="com.bonus.material.basic.domain.BmAgreementInfo" useGeneratedKeys="true" keyProperty="agreementId">
|
<insert id="insertBmAgreementInfo" parameterType="com.bonus.material.basic.domain.BmAgreementInfo" useGeneratedKeys="true" keyProperty="agreementId">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue