123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <?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.platform.dao.mapper.store.SparePickFormMapper">
- <sql id="Base_Column_List">
- sparepickform.id,
- sparepickform.pick_no,
- sparepickform.type,
- sparepickform.store_id,
- sparepickform.repair_id,
- sparepickform.repair_no,
- sparepickform.total_price,
- sparepickform.reason,
- sparepickform.remark,
- sparepickform.status,
- sparepickform.pick_user_id,
- sparepickform.pick_user_name,
- sparepickform.created_user_id,
- sparepickform.created_user_name,
- sparepickform.update_user_id,
- sparepickform.update_user_name,
- sparepickform.created_time,
- sparepickform.update_time
- </sql>
- <sql id="Ref_Column_List">
- sparepickform.pick_no,
- sparepickform.type,
- sparepickform.total_price,
- sparepickform.store_id,
- sparepickform.repair_id,
- sparepickform.pick_user_id,
- sparepickform.pick_user_name,
- sparepickform.repair_no,
- sparepickform.reason,
- sparepickform.remark,
- sparepickform.status,
- </sql>
- <sql id="List_Condition">
- <if test="id != null and id != ''">
- and sparepickform.id = #{id}
- </if>
- <if test="storeId != null and storeId != ''">
- and sparepickform.store_id = #{storeId}
- </if>
- <if test="pickNo != null and pickNo != ''">
- and sparepickform.pick_no = #{pickNo}
- </if>
- <if test="type != null">
- and sparepickform.type = #{type}
- </if>
- <if test="repairId != null and repairId != ''">
- and sparepickform.repair_id = #{repairId}
- </if>
- <if test="repairNo != null and repairNo != ''">
- and sparepickform.repair_no = #{repairNo}
- </if>
- <if test="reason != null and reason != ''">
- and sparepickform.reason = #{reason}
- </if>
- <if test="remark != null and remark != ''">
- and sparepickform.remark = #{remark}
- </if>
- <if test="status != null">
- and sparepickform.status = #{status}
- </if>
- <if test="pickUserId != null and pickUserId != ''">
- and sparepickform.pick_user_id = #{pickUserId}
- </if>
- <if test="pickUserName != null and pickUserName != ''">
- and sparepickform.pick_user_name = #{pickUserName}
- </if>
- <if test="createdUserId != null and createdUserId != ''">
- and sparepickform.created_user_id = #{createdUserId}
- </if>
- <if test="createdUserName != null and createdUserName != ''">
- and sparepickform.created_user_name = #{createdUserName}
- </if>
- <if test="updateUserId != null and updateUserId != ''">
- and sparepickform.update_user_id = #{updateUserId}
- </if>
- <if test="updateUserName != null and updateUserName != ''">
- and sparepickform.update_user_name = #{updateUserName}
- </if>
- <if test="createdTimeStart != null">
- and sparepickform.created_time <![CDATA[>=]]>; #{createdTimeStart}
- </if>
- <if test="createdTimeEnd != null">
- and sparepickform.created_time <![CDATA[<=]]> #{createdTimeEnd}
- </if>
- <if test="createdTime != null">
- and sparepickform.created_time = #{createdTime}
- </if>
- <if test="updateTimeStart != null">
- and sparepickform.update_time <![CDATA[>=]]>; #{updateTimeStart}
- </if>
- <if test="updateTimeEnd != null">
- and sparepickform.update_time <![CDATA[<=]]> #{updateTimeEnd}
- </if>
- <if test="updateTime != null">
- and sparepickform.update_time = #{updateTime}
- </if>
- <if test="keyword != null and keyword != ''">
- and sparepickform.no like concat('%',#{keyword},'%')
- </if>
- </sql>
- <select id="selectList" parameterType="com.platform.dao.dto.store.SparePickFormDTO"
- resultType="com.platform.dao.vo.query.store.SparePickFormVO">
- select sparepickform.*, store.name storeName
- from t_spare_pick_form as sparepickform
- left join t_store store on store.id = sparepickform.store_id
- <where>
- <include refid="List_Condition"/>
- </where>
- </select>
- <select id="selectDetailList" parameterType="com.platform.dao.dto.store.SparePickFormDTO"
- resultType="com.platform.dao.vo.query.store.SparePickDetailVO">
- select detail.*, store.name storeName,sparestore.num as storeNum,
- spareinfo.name spareName,
- spareinfo.ggxh ggxh,
- spareinfo.no,
- spareinfo.init_no initNo
- from t_spare_pick_detail detail
- left join t_spare_pick_form form on form.id = detail.pick_id
- left join t_store store on store.id = detail.store_id
- left join t_spare_part_info spareinfo on spareinfo.id = detail.spare_id
- left join t_spare_store sparestore on sparestore.spare_id = detail.spare_id and sparestore.store_id = detail.store_id
- where form.id = #{id}
- </select>
- </mapper>
|