devicesmgt/sgzb-modules/sgzb-material/src/main/resources/mapper/material/WorkSiteDirectManageMapper.xml

103 lines
3.4 KiB
XML
Raw Normal View History

2024-03-05 16:53:10 +08:00
<?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.bonus.sgzb.material.mapper.WorkSiteDirectManageMapper">
<insert id="saveDirectApplyInfo" parameterType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
insert into direct_apply_info
(
<if test="code != null and code != ''">
code,
</if>
<if test="backAgreementId != null">
back_agreement_id,
</if>
<if test="backMan != null and backMan != ''">
back_man,
</if>
<if test="backPhone != null and backPhone != ''">
back_phone,
</if>
<if test="backRemark != null and backRemark != ''">
back_remark,
</if>
<if test="leaseAgreementId != null">
lease_agreement_id,
</if>
<if test="leaseMan != null and leaseMan != ''">
lease_man,
</if>
<if test="leasePhone != null and leasePhone != ''">
lease_phone,
</if>
<if test="dirUrl != null and dirUrl != ''">
dir_url,
</if>
<if test="status != null and status != ''">
status,
</if>
<if test="auditor != null and auditor != ''">
auditor,
</if>
<if test="auditTime != null and auditTime != ''">
audit_time,
</if>
<if test="auditRemark != null and auditRemark != ''">
audit_remark,
</if>
create_time
) values (
<if test="code != null and code != ''">
#{code},
</if>
<if test="backAgreementId != null">
#{backAgreementId},
</if>
<if test="backMan != null and backMan != ''">
#{backMan},
</if>
<if test="backPhone != null and backPhone != ''">
#{backPhone},
</if>
<if test="backRemark != null and backRemark != ''">
#{backRemark},
</if>
<if test="leaseAgreementId != null">
#{leaseAgreementId},
</if>
<if test="leaseMan != null and leaseMan != ''">
#{leaseMan},
</if>
<if test="leasePhone != null and leasePhone != ''">
#{leasePhone},
</if>
<if test="dirUrl != null and dirUrl != ''">
#{dirUrl},
</if>
<if test="status != null and status != ''">
#{status},
</if>
<if test="auditor != null and auditor != ''">
#{auditor},
</if>
<if test="auditTime != null and auditTime != ''">
#{auditTime},
</if>
<if test="auditRemark != null and auditRemark != ''">
#{auditRemark},
</if>
NOW()
)
</insert>
<insert id="saveDirectApplyDetails" parameterType="com.bonus.sgzb.base.api.domain.DirectApplyDetails">
insert into direct_apply_info(direct_id,type_id,ma_id,direct_num)
values (#{directId},#{typeId},#{maId}, #{directNum})
</insert>
<update id="refuseDirectApplyInfo">
update direct_apply_info set status = #{status} where id = #{id}
</update>
<select id="getUseringData" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
select * from slt_agreement_info where agreement_id = #{agreementId} and status = '0';
</select>
</mapper>