123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- <?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.ruoyi.shipping.mapper.TWarehousebillsCntritemsMapper">
-
- <resultMap type="TWarehousebillsCntritems" id="TWarehousebillsCntritemsResult">
- <result property="fId" column="f_id" />
- <result property="fPid" column="f_pid" />
- <result property="fCntrno" column="f_cntrno" />
- <result property="fSealno" column="f_sealno" />
- <result property="fGoodsid" column="f_goodsid" />
- <result property="fPackageid" column="f_packageid" />
- <result property="fCntrid" column="f_cntrid" />
- <result property="fCntrcount" column="f_cntrcount" />
- <result property="fCntrweight" column="f_cntrweight" />
- <result property="fCntrstatus" column="f_cntrstatus" />
- <result property="fSoc" column="f_soc" />
- <result property="fTemperature" column="f_temperature" />
- <result property="fDraught" column="f_Draught" />
- <result property="fHumidity" column="f_Humidity" />
- <result property="fPrecooling" column="f_precooling" />
- <result property="fPlantakecntr" column="f_plantakecntr" />
- <result property="fIfdanger" column="f_IFDANGER" />
- <result property="fManual" column="f_manual" />
- <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="selectTWarehousebillsCntritemsVo">
- select f_id, f_pid, f_cntrno, f_sealno, f_goodsid, f_packageid, f_cntrid, f_cntrcount, f_cntrweight, f_cntrstatus, f_soc, f_temperature, f_Draught, f_Humidity, f_precooling, f_plantakecntr, f_IFDANGER,f_manual, create_by, create_time, update_by, update_time, remark from t_warehousebills_cntritems
- </sql>
- <select id="selectTWarehousebillsCntritemsList" parameterType="TWarehousebillsCntritems" resultMap="TWarehousebillsCntritemsResult">
- SELECT
- tw.f_id,
- tw.f_pid,
- tw.f_cntrno,
- tw.f_sealno,
- tw.f_goodsid,
- tg.f_name goodsName,
- tw.f_packageid,
- sd.dict_label packageName,
- tw.f_cntrid,
- tc.f_no cntrName,
- tw.f_cntrcount,
- tw.f_cntrweight,
- tw.f_cntrstatus,
- tw.f_soc,
- tw.f_temperature,
- tw.f_Draught,
- tw.f_Humidity,
- tw.f_precooling,
- si.dict_label precoolingName,
- tw.f_plantakecntr,
- tw.f_IFDANGER,
- sc.dict_label ifdangerName,
- tw.create_by,
- tw.create_time,
- tw.update_by,
- tw.update_time,
- tw.remark,
- tw.f_manual
- FROM
- t_warehousebills_cntritems tw
- LEFT JOIN t_goods tg ON tg.f_id = tw.f_goodsid
- LEFT JOIN sys_dict_data sd ON sd.dict_value = tw.f_packageid AND sd.dict_type = 'f_packageid'
- LEFT JOIN t_cntr tc ON tc.f_id = tw.f_cntrid
- LEFT JOIN sys_dict_data si ON si.dict_value = tw.f_precooling AND si.dict_type = 'f_precooling'
- LEFT JOIN sys_dict_data sc ON sc.dict_value = tw.f_IFDANGER AND sc.dict_type = 'f_IFDANGER'
- <where>
- <if test="fPid != null "> and tw.f_pid = #{fPid}</if>
- <if test="fCntrno != null and fCntrno != ''"> and tw.f_cntrno = #{fCntrno}</if>
- <if test="fSealno != null and fSealno != ''"> and tw.f_sealno = #{fSealno}</if>
- <if test="fGoodsid != null "> and tw.f_goodsid = #{fGoodsid}</if>
- <if test="fPackageid != null and fPackageid != ''"> and tw.f_packageid = #{fPackageid}</if>
- <if test="fCntrid != null "> and tw.f_cntrid = #{fCntrid}</if>
- <if test="fCntrcount != null "> and tw.f_cntrcount = #{fCntrcount}</if>
- <if test="fCntrweight != null "> and tw.f_cntrweight = #{fCntrweight}</if>
- <if test="fCntrstatus != null and fCntrstatus != ''"> and tw.f_cntrstatus = #{fCntrstatus}</if>
- <if test="fSoc != null and fSoc != ''"> and tw.f_soc = #{fSoc}</if>
- <if test="fTemperature != null and fTemperature != ''"> and tw.f_temperature = #{fTemperature}</if>
- <if test="fDraught != null and fDraught != ''"> and tw.f_Draught = #{fDraught}</if>
- <if test="fHumidity != null and fHumidity != ''"> and tw.f_Humidity = #{fHumidity}</if>
- <if test="fPrecooling != null and fPrecooling != ''"> and tw.f_precooling = #{fPrecooling}</if>
- <if test="fPlantakecntr != null "> and tw.f_plantakecntr = #{fPlantakecntr}</if>
- <if test="fIfdanger != null and fIfdanger != ''"> and tw.f_IFDANGER = #{fIfdanger}</if>
- </where>
- </select>
-
- <select id="selectTWarehousebillsCntritemsById" parameterType="Long" resultMap="TWarehousebillsCntritemsResult">
- <include refid="selectTWarehousebillsCntritemsVo"/>
- where f_id = #{fId}
- </select>
-
- <insert id="insertTWarehousebillsCntritems" parameterType="TWarehousebillsCntritems" useGeneratedKeys="true" keyProperty="fId">
- insert into t_warehousebills_cntritems
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="fPid != null">f_pid,</if>
- <if test="fCntrno != null and fCntrno != ''">f_cntrno,</if>
- <if test="fSealno != null and fSealno != ''">f_sealno,</if>
- <if test="fGoodsid != null">f_goodsid,</if>
- <if test="fPackageid != null and fPackageid != ''">f_packageid,</if>
- <if test="fCntrid != null">f_cntrid,</if>
- <if test="fCntrcount != null">f_cntrcount,</if>
- <if test="fCntrweight != null">f_cntrweight,</if>
- <if test="fCntrstatus != null">f_cntrstatus,</if>
- <if test="fSoc != null">f_soc,</if>
- <if test="fTemperature != null">f_temperature,</if>
- <if test="fDraught != null">f_Draught,</if>
- <if test="fHumidity != null">f_Humidity,</if>
- <if test="fPrecooling != null">f_precooling,</if>
- <if test="fPlantakecntr != null">f_plantakecntr,</if>
- <if test="fIfdanger != null">f_IFDANGER,</if>
- <if test="fManual != null">f_manual,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="fPid != null">#{fPid},</if>
- <if test="fCntrno != null and fCntrno != ''">#{fCntrno},</if>
- <if test="fSealno != null and fSealno != ''">#{fSealno},</if>
- <if test="fGoodsid != null">#{fGoodsid},</if>
- <if test="fPackageid != null and fPackageid != ''">#{fPackageid},</if>
- <if test="fCntrid != null">#{fCntrid},</if>
- <if test="fCntrcount != null">#{fCntrcount},</if>
- <if test="fCntrweight != null">#{fCntrweight},</if>
- <if test="fCntrstatus != null">#{fCntrstatus},</if>
- <if test="fSoc != null">#{fSoc},</if>
- <if test="fTemperature != null">#{fTemperature},</if>
- <if test="fDraught != null">#{fDraught},</if>
- <if test="fHumidity != null">#{fHumidity},</if>
- <if test="fPrecooling != null">#{fPrecooling},</if>
- <if test="fPlantakecntr != null">#{fPlantakecntr},</if>
- <if test="fIfdanger != null">#{fIfdanger},</if>
- <if test="fManual != null">#{fManual},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- </trim>
- </insert>
- <update id="updateTWarehousebillsCntritems" parameterType="TWarehousebillsCntritems">
- update t_warehousebills_cntritems
- <trim prefix="SET" suffixOverrides=",">
- <if test="fPid != null">f_pid = #{fPid},</if>
- <if test="fCntrno != null and fCntrno != ''">f_cntrno = #{fCntrno},</if>
- <if test="fSealno != null and fSealno != ''">f_sealno = #{fSealno},</if>
- <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
- <if test="fPackageid != null and fPackageid != ''">f_packageid = #{fPackageid},</if>
- <if test="fCntrid != null">f_cntrid = #{fCntrid},</if>
- <if test="fCntrcount != null">f_cntrcount = #{fCntrcount},</if>
- <if test="fCntrweight != null">f_cntrweight = #{fCntrweight},</if>
- <if test="fCntrstatus != null">f_cntrstatus = #{fCntrstatus},</if>
- <if test="fSoc != null">f_soc = #{fSoc},</if>
- <if test="fTemperature != null">f_temperature = #{fTemperature},</if>
- <if test="fDraught != null">f_Draught = #{fDraught},</if>
- <if test="fHumidity != null">f_Humidity = #{fHumidity},</if>
- <if test="fPrecooling != null">f_precooling = #{fPrecooling},</if>
- <if test="fPlantakecntr != null">f_plantakecntr = #{fPlantakecntr},</if>
- <if test="fIfdanger != null">f_IFDANGER = #{fIfdanger},</if>
- <if test="fManual != null">f_manual = #{fManual},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- </trim>
- where f_id = #{fId}
- </update>
- <delete id="deleteTWarehousebillsCntritemsById" parameterType="Long">
- delete from t_warehousebills_cntritems where f_id = #{fId}
- </delete>
- <delete id="deleteTWarehousebillsCntritemsByIds" parameterType="String">
- delete from t_warehousebills_cntritems where f_id in
- <foreach item="fId" collection="array" open="(" separator="," close=")">
- #{fId}
- </foreach>
- </delete>
- <delete id="deleteTWarehousebillsCntritemsfPid" parameterType="Long">
- delete from t_warehousebills_cntritems where f_pid = #{fPid}
- </delete>
- <delete id="deleteTWarehousebillsCntritemsfPids" parameterType="String">
- delete from t_warehousebills_cntritems where f_pid in
- <foreach item="fPid" collection="array" open="(" separator="," close=")">
- #{fPid}
- </foreach>
- </delete>
-
- </mapper>
|