emis-service/emis-biz/src/main/resources/mapper/EmisWaybillProblemInfoMapper.xml
2024-03-01 17:13:00 +08:00

206 lines
16 KiB
XML

<?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.xdadan.erp.emis.mapper.EmisWaybillProblemInfoMapper">
<resultMap type="EmisWaybillProblemInfo" id="EmisWaybillProblemInfoResult">
<result property="id" column="id" />
<result property="billCode" column="bill_code" />
<result property="problemType" column="problem_type" />
<result property="problemTitle" column="problem_title" />
<result property="problemCause" column="problem_cause" />
<result property="sendSite" column="send_site" />
<result property="sendSiteCode" column="send_site_code" />
<result property="registerManCode" column="register_man_code" />
<result property="registerManDept" column="register_man_dept" />
<result property="registerSiteCode" column="register_site_code" />
<result property="registerDate" column="register_date" />
<result property="registerSaveDate" column="register_save_date" />
<result property="dataFrom" column="data_from" />
<result property="status" column="status" />
<result property="isSendSiteRegister" column="is_send_site_register" />
<result property="blReversion" column="bl_reversion" />
<result property="reversionStr" column="reversion_str" />
<result property="reversionMan" column="reversion_man" />
<result property="reversionManCode" column="reversion_man_code" />
<result property="reversionDate" column="reversion_date" />
<result property="blCheckok" column="bl_checkok" />
<result property="blSee" column="bl_see" />
<result property="filePath" column="file_path" />
<result property="createSiteCode" column="create_site_code" />
<result property="modifySiteCode" column="modify_site_code" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectEmisWaybillProblemInfoVo">
select id, bill_code, problem_type, problem_title, problem_cause, send_site, send_site_code, register_man_code, register_man_dept, register_site_code, register_date, register_save_date, data_from, status, is_send_site_register, bl_reversion, reversion_str, reversion_man, reversion_man_code, reversion_date, bl_checkok, bl_see, file_path, create_site_code, modify_site_code, del_flag, create_by, create_time, update_by, update_time, remark from emis_waybill_problem_info
</sql>
<select id="selectEmisWaybillProblemInfoList" parameterType="EmisWaybillProblemInfo" resultMap="EmisWaybillProblemInfoResult">
<include refid="selectEmisWaybillProblemInfoVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="billCode != null and billCode != ''"> and bill_code like concat('%', #{billCode}, '%')</if>
<if test="problemType != null and problemType != ''"> and problem_type like concat('%', #{problemType}, '%')</if>
<if test="problemTitle != null and problemTitle != ''"> and problem_title like concat('%', #{problemTitle}, '%')</if>
<if test="problemCause != null and problemCause != ''"> and problem_cause like concat('%', #{problemCause}, '%')</if>
<if test="sendSite != null and sendSite != ''"> and send_site like concat('%', #{sendSite}, '%')</if>
<if test="sendSiteCode != null and sendSiteCode != ''"> and send_site_code like concat('%', #{sendSiteCode}, '%')</if>
<if test="registerManCode != null and registerManCode != ''"> and register_man_code like concat('%', #{registerManCode}, '%')</if>
<if test="registerManDept != null and registerManDept != ''"> and register_man_dept like concat('%', #{registerManDept}, '%')</if>
<if test="registerSiteCode != null and registerSiteCode != ''"> and register_site_code like concat('%', #{registerSiteCode}, '%')</if>
<if test="registerDate != null "> and register_date = #{registerDate}</if>
<if test="registerSaveDate != null and registerSaveDate != ''"> and register_save_date like concat('%', #{registerSaveDate}, '%')</if>
<if test="dataFrom != null and dataFrom != ''"> and data_from like concat('%', #{dataFrom}, '%')</if>
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
<if test="isSendSiteRegister != null and isSendSiteRegister != ''"> and is_send_site_register like concat('%', #{isSendSiteRegister}, '%')</if>
<if test="blReversion != null and blReversion != ''"> and bl_reversion like concat('%', #{blReversion}, '%')</if>
<if test="reversionStr != null and reversionStr != ''"> and reversion_str like concat('%', #{reversionStr}, '%')</if>
<if test="reversionMan != null and reversionMan != ''"> and reversion_man like concat('%', #{reversionMan}, '%')</if>
<if test="reversionManCode != null and reversionManCode != ''"> and reversion_man_code like concat('%', #{reversionManCode}, '%')</if>
<if test="reversionDate != null and reversionDate != ''"> and reversion_date like concat('%', #{reversionDate}, '%')</if>
<if test="blCheckok != null and blCheckok != ''"> and bl_checkok like concat('%', #{blCheckok}, '%')</if>
<if test="blSee != null and blSee != ''"> and bl_see like concat('%', #{blSee}, '%')</if>
<if test="filePath != null and filePath != ''"> and file_path like concat('%', #{filePath}, '%')</if>
<if test="createSiteCode != null and createSiteCode != ''"> and create_site_code like concat('%', #{createSiteCode}, '%')</if>
<if test="modifySiteCode != null and modifySiteCode != ''"> and modify_site_code like concat('%', #{modifySiteCode}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
</where>
order by create_time desc
</select>
<select id="selectEmisWaybillProblemInfoById" parameterType="Long" resultMap="EmisWaybillProblemInfoResult">
select id, bill_code, problem_type, problem_title, problem_cause, send_site, send_site_code, register_man_code, register_man_dept, register_site_code, register_date, register_save_date, data_from, status, is_send_site_register, bl_reversion, reversion_str, reversion_man, reversion_man_code, reversion_date, bl_checkok, bl_see, file_path, create_site_code, modify_site_code, del_flag, create_by, create_time, update_by, update_time, remark
from emis_waybill_problem_info a
where a.id = #{id}
</select>
<insert id="insertEmisWaybillProblemInfo" parameterType="EmisWaybillProblemInfo">
insert into emis_waybill_problem_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="billCode != null and billCode != ''">bill_code,</if>
<if test="problemType != null and problemType != ''">problem_type,</if>
<if test="problemTitle != null and problemTitle != ''">problem_title,</if>
<if test="problemCause != null and problemCause != ''">problem_cause,</if>
<if test="sendSite != null and sendSite != ''">send_site,</if>
<if test="sendSiteCode != null and sendSiteCode != ''">send_site_code,</if>
<if test="registerManCode != null and registerManCode != ''">register_man_code,</if>
<if test="registerManDept != null and registerManDept != ''">register_man_dept,</if>
<if test="registerSiteCode != null and registerSiteCode != ''">register_site_code,</if>
<if test="registerDate != null">register_date,</if>
<if test="registerSaveDate != null and registerSaveDate != ''">register_save_date,</if>
<if test="dataFrom != null and dataFrom != ''">data_from,</if>
<if test="status != null and status != ''">status,</if>
<if test="isSendSiteRegister != null and isSendSiteRegister != ''">is_send_site_register,</if>
<if test="blReversion != null and blReversion != ''">bl_reversion,</if>
<if test="reversionStr != null and reversionStr != ''">reversion_str,</if>
<if test="reversionMan != null and reversionMan != ''">reversion_man,</if>
<if test="reversionManCode != null and reversionManCode != ''">reversion_man_code,</if>
<if test="reversionDate != null and reversionDate != ''">reversion_date,</if>
<if test="blCheckok != null and blCheckok != ''">bl_checkok,</if>
<if test="blSee != null and blSee != ''">bl_see,</if>
<if test="filePath != null and filePath != ''">file_path,</if>
<if test="createSiteCode != null and createSiteCode != ''">create_site_code,</if>
<if test="modifySiteCode != null and modifySiteCode != ''">modify_site_code,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null and remark != ''">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="billCode != null and billCode != ''">#{billCode},</if>
<if test="problemType != null and problemType != ''">#{problemType},</if>
<if test="problemTitle != null and problemTitle != ''">#{problemTitle},</if>
<if test="problemCause != null and problemCause != ''">#{problemCause},</if>
<if test="sendSite != null and sendSite != ''">#{sendSite},</if>
<if test="sendSiteCode != null and sendSiteCode != ''">#{sendSiteCode},</if>
<if test="registerManCode != null and registerManCode != ''">#{registerManCode},</if>
<if test="registerManDept != null and registerManDept != ''">#{registerManDept},</if>
<if test="registerSiteCode != null and registerSiteCode != ''">#{registerSiteCode},</if>
<if test="registerDate != null">#{registerDate},</if>
<if test="registerSaveDate != null and registerSaveDate != ''">#{registerSaveDate},</if>
<if test="dataFrom != null and dataFrom != ''">#{dataFrom},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="isSendSiteRegister != null and isSendSiteRegister != ''">#{isSendSiteRegister},</if>
<if test="blReversion != null and blReversion != ''">#{blReversion},</if>
<if test="reversionStr != null and reversionStr != ''">#{reversionStr},</if>
<if test="reversionMan != null and reversionMan != ''">#{reversionMan},</if>
<if test="reversionManCode != null and reversionManCode != ''">#{reversionManCode},</if>
<if test="reversionDate != null and reversionDate != ''">#{reversionDate},</if>
<if test="blCheckok != null and blCheckok != ''">#{blCheckok},</if>
<if test="blSee != null and blSee != ''">#{blSee},</if>
<if test="filePath != null and filePath != ''">#{filePath},</if>
<if test="createSiteCode != null and createSiteCode != ''">#{createSiteCode},</if>
<if test="modifySiteCode != null and modifySiteCode != ''">#{modifySiteCode},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null and remark != ''">#{remark},</if>
</trim>
</insert>
<update id="updateEmisWaybillProblemInfo" parameterType="EmisWaybillProblemInfo">
update emis_waybill_problem_info
<trim prefix="SET" suffixOverrides=",">
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
<if test="problemType != null and problemType != ''">problem_type = #{problemType},</if>
<if test="problemTitle != null and problemTitle != ''">problem_title = #{problemTitle},</if>
<if test="problemCause != null and problemCause != ''">problem_cause = #{problemCause},</if>
<if test="sendSite != null and sendSite != ''">send_site = #{sendSite},</if>
<if test="sendSiteCode != null and sendSiteCode != ''">send_site_code = #{sendSiteCode},</if>
<if test="registerManCode != null and registerManCode != ''">register_man_code = #{registerManCode},</if>
<if test="registerManDept != null and registerManDept != ''">register_man_dept = #{registerManDept},</if>
<if test="registerSiteCode != null and registerSiteCode != ''">register_site_code = #{registerSiteCode},</if>
<if test="registerDate != null">register_date = #{registerDate},</if>
<if test="registerSaveDate != null and registerSaveDate != ''">register_save_date = #{registerSaveDate},</if>
<if test="dataFrom != null and dataFrom != ''">data_from = #{dataFrom},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="isSendSiteRegister != null and isSendSiteRegister != ''">is_send_site_register = #{isSendSiteRegister},</if>
<if test="blReversion != null and blReversion != ''">bl_reversion = #{blReversion},</if>
<if test="reversionStr != null and reversionStr != ''">reversion_str = #{reversionStr},</if>
<if test="reversionMan != null and reversionMan != ''">reversion_man = #{reversionMan},</if>
<if test="reversionManCode != null and reversionManCode != ''">reversion_man_code = #{reversionManCode},</if>
<if test="reversionDate != null and reversionDate != ''">reversion_date = #{reversionDate},</if>
<if test="blCheckok != null and blCheckok != ''">bl_checkok = #{blCheckok},</if>
<if test="blSee != null and blSee != ''">bl_see = #{blSee},</if>
<if test="filePath != null and filePath != ''">file_path = #{filePath},</if>
<if test="createSiteCode != null and createSiteCode != ''">create_site_code = #{createSiteCode},</if>
<if test="modifySiteCode != null and modifySiteCode != ''">modify_site_code = #{modifySiteCode},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisWaybillProblemInfoById" parameterType="Long">
delete from emis_waybill_problem_info where id = #{id}
</delete>
<delete id="deleteEmisWaybillProblemInfoByIds" parameterType="String">
delete from emis_waybill_problem_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>