453 lines
22 KiB
XML
453 lines
22 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.delivery.project.document.mapper.RkInfoMapper">
|
|||
|
|
|
|||
|
|
<resultMap type="RkInfo" id="RkInfoResult">
|
|||
|
|
<result property="id" column="id" />
|
|||
|
|
<result property="rkType" column="rk_type" />
|
|||
|
|
<result property="wlType" column="wl_type" />
|
|||
|
|
<result property="cangku" column="cangku" />
|
|||
|
|
<result property="rkTime" column="rk_time" />
|
|||
|
|
<result property="lihuoY" column="lihuo_y" />
|
|||
|
|
<result property="isChuku" column="is_chuku" />
|
|||
|
|
<result property="status" column="status" />
|
|||
|
|
<result property="remark" column="remark" />
|
|||
|
|
<result property="billNo" column="bill_no" />
|
|||
|
|
<result property="isDelivery" column="is_delivery" />
|
|||
|
|
<result property="xj" column="xj" />
|
|||
|
|
<result property="xmNo" column="xm_no" />
|
|||
|
|
<result property="xmMs" column="xm_ms" />
|
|||
|
|
<result property="xmNoCk" column="xm_no_ck" />
|
|||
|
|
<result property="xmMsCk" column="xm_ms_ck" />
|
|||
|
|
<result property="wlNo" column="wl_no" />
|
|||
|
|
<result property="wlMs" column="wl_ms" />
|
|||
|
|
<result property="gysNo" column="gys_no" />
|
|||
|
|
<result property="gysMc" column="gys_mc" />
|
|||
|
|
<result property="jhAmt" column="jh_amt" />
|
|||
|
|
<result property="htDj" column="ht_dj" />
|
|||
|
|
<result property="sapNo" column="sap_no" />
|
|||
|
|
<result property="xh" column="xh" />
|
|||
|
|
<result property="jhQty" column="jh_qty" />
|
|||
|
|
<result property="htQty" column="ht_qty" />
|
|||
|
|
<result property="dw" column="dw" />
|
|||
|
|
<result property="realQty" column="real_qty" />
|
|||
|
|
<result property="pcode" column="pcode" />
|
|||
|
|
<result property="pcodeId" column="pcode_id" />
|
|||
|
|
<result property="trayCode" column="tray_code" />
|
|||
|
|
<result property="entityId" column="entity_id" />
|
|||
|
|
<result property="ckLihuoY" column="ck_lihuo_y" />
|
|||
|
|
<result property="teamCode" column="team_code" />
|
|||
|
|
<result property="ckType" column="ck_type" />
|
|||
|
|
<result property="ckRemark" column="ck_remark" />
|
|||
|
|
<result property="lyTime" column="ly_time" />
|
|||
|
|
<result property="billNoCk" column="bill_no_ck" />
|
|||
|
|
<result property="borrowTime" column="borrow_time" />
|
|||
|
|
<result property="returnTime" column="return_time" />
|
|||
|
|
<result property="hasMoved" column="has_moved" />
|
|||
|
|
<result property="isBorrowed" column="is_borrowed" />
|
|||
|
|
<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="isDelete" column="is_delete" />
|
|||
|
|
<result property="gysJhId" column="gys_jh_id" />
|
|||
|
|
</resultMap>
|
|||
|
|
|
|||
|
|
<sql id="selectRkInfoVo">
|
|||
|
|
select id, rk_type, wl_type, cangku, rk_time, lihuo_y, is_chuku, status, remark, bill_no, is_delivery, xj, xm_no, xm_ms, xm_no_ck, xm_ms_ck, wl_no, wl_ms, gys_no, gys_mc, jh_amt, ht_dj, sap_no, xh, jh_qty, ht_qty, dw, real_qty, pcode, pcode_id, tray_code, entity_id, ck_lihuo_y, team_code, ck_type, ck_remark, ly_time, bill_no_ck, borrow_time, return_time, has_moved, is_borrowed, create_by, create_time, update_by, update_time, is_delete, gys_jh_id from rk_info
|
|||
|
|
</sql>
|
|||
|
|
|
|||
|
|
<select id="selectRkInfoList" parameterType="RkInfo" resultMap="RkInfoResult">
|
|||
|
|
<include refid="selectRkInfoVo"/>
|
|||
|
|
<where>
|
|||
|
|
<if test="rkType != null and rkType != ''"> and rk_type = #{rkType}</if>
|
|||
|
|
<if test="wlType != null and wlType != ''"> and wl_type = #{wlType}</if>
|
|||
|
|
<if test="cangku != null and cangku != ''"> and cangku = #{cangku}</if>
|
|||
|
|
<if test="rkTime != null "> and rk_time = #{rkTime}</if>
|
|||
|
|
<if test="lihuoY != null and lihuoY != ''"> and lihuo_y = #{lihuoY}</if>
|
|||
|
|
<if test="isChuku != null and isChuku != ''"> and is_chuku = #{isChuku}</if>
|
|||
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|||
|
|
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
|
|||
|
|
<if test="isDelivery != null and isDelivery != ''"> and is_delivery = #{isDelivery}</if>
|
|||
|
|
<if test="xj != null and xj != ''"> and xj = #{xj}</if>
|
|||
|
|
<if test="xmNo != null and xmNo != ''"> and xm_no = #{xmNo}</if>
|
|||
|
|
<if test="xmMs != null and xmMs != ''"> and xm_ms = #{xmMs}</if>
|
|||
|
|
<if test="xmNoCk != null and xmNoCk != ''"> and xm_no_ck = #{xmNoCk}</if>
|
|||
|
|
<if test="xmMsCk != null and xmMsCk != ''"> and xm_ms_ck = #{xmMsCk}</if>
|
|||
|
|
<if test="wlNo != null and wlNo != ''"> and wl_no = #{wlNo}</if>
|
|||
|
|
<if test="wlMs != null and wlMs != ''"> and wl_ms = #{wlMs}</if>
|
|||
|
|
<if test="gysNo != null and gysNo != ''"> and gys_no = #{gysNo}</if>
|
|||
|
|
<if test="gysMc != null and gysMc != ''"> and gys_mc = #{gysMc}</if>
|
|||
|
|
<if test="jhAmt != null "> and jh_amt = #{jhAmt}</if>
|
|||
|
|
<if test="htDj != null "> and ht_dj = #{htDj}</if>
|
|||
|
|
<if test="sapNo != null and sapNo != ''"> and sap_no = #{sapNo}</if>
|
|||
|
|
<if test="xh != null and xh != ''"> and xh = #{xh}</if>
|
|||
|
|
<if test="jhQty != null "> and jh_qty = #{jhQty}</if>
|
|||
|
|
<if test="htQty != null "> and ht_qty = #{htQty}</if>
|
|||
|
|
<if test="dw != null and dw != ''"> and dw = #{dw}</if>
|
|||
|
|
<if test="realQty != null "> and real_qty = #{realQty}</if>
|
|||
|
|
<if test="pcode != null and pcode != ''"> and pcode = #{pcode}</if>
|
|||
|
|
<if test="pcodeId != null and pcodeId != ''"> and pcode_id = #{pcodeId}</if>
|
|||
|
|
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
|||
|
|
<if test="entityId != null and entityId != ''"> and entity_id = #{entityId}</if>
|
|||
|
|
<if test="ckLihuoY != null and ckLihuoY != ''"> and ck_lihuo_y = #{ckLihuoY}</if>
|
|||
|
|
<if test="teamCode != null and teamCode != ''"> and team_code = #{teamCode}</if>
|
|||
|
|
<if test="ckType != null and ckType != ''"> and ck_type = #{ckType}</if>
|
|||
|
|
<if test="ckRemark != null and ckRemark != ''"> and ck_remark = #{ckRemark}</if>
|
|||
|
|
<if test="lyTime != null "> and ly_time = #{lyTime}</if>
|
|||
|
|
<if test="billNoCk != null and billNoCk != ''"> and bill_no_ck = #{billNoCk}</if>
|
|||
|
|
<if test="borrowTime != null "> and borrow_time = #{borrowTime}</if>
|
|||
|
|
<if test="returnTime != null "> and return_time = #{returnTime}</if>
|
|||
|
|
<if test="hasMoved != null and hasMoved != ''"> and has_moved = #{hasMoved}</if>
|
|||
|
|
<if test="isBorrowed != null and isBorrowed != ''"> and is_borrowed = #{isBorrowed}</if>
|
|||
|
|
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
|
|||
|
|
<if test="gysJhId != null "> and gys_jh_id = #{gysJhId}</if>
|
|||
|
|
</where>
|
|||
|
|
</select>
|
|||
|
|
|
|||
|
|
<select id="selectRkInfoById" parameterType="Long" resultMap="RkInfoResult">
|
|||
|
|
<include refid="selectRkInfoVo"/>
|
|||
|
|
where id = #{id}
|
|||
|
|
</select>
|
|||
|
|
|
|||
|
|
<!--
|
|||
|
|
按单据分组(bill_no)列表
|
|||
|
|
复用 <sql id="selectRkInfoVo"> 作为子查询,外层分组聚合
|
|||
|
|
返回字段:bill_no、bill_no_ck + 你指定的通用字段(rk_type、wl_type、cangku、rk_time、lihuo_y、is_chuku、xj、
|
|||
|
|
xm_no、xm_ms、xm_no_ck、xm_ms_ck、wl_no、wl_ms、gys_no、sap_no)
|
|||
|
|
-->
|
|||
|
|
<!-- RkInfoMapper.xml -->
|
|||
|
|
<select id="selectGroupedByBill" resultMap="RkInfoResult">
|
|||
|
|
SELECT
|
|||
|
|
a.id,
|
|||
|
|
a.bill_no,
|
|||
|
|
a.bill_no_ck,
|
|||
|
|
a.rk_type,
|
|||
|
|
si.type_name AS rk_type_name,
|
|||
|
|
a.wl_type,
|
|||
|
|
a.cangku,
|
|||
|
|
a.rk_time,
|
|||
|
|
a.lihuo_y,
|
|||
|
|
a.is_chuku,
|
|||
|
|
a.xj,
|
|||
|
|
a.xm_no,
|
|||
|
|
a.xm_ms,
|
|||
|
|
a.xm_no_ck,
|
|||
|
|
a.xm_ms_ck,
|
|||
|
|
a.gys_mc,
|
|||
|
|
a.wl_no,
|
|||
|
|
a.wl_ms,
|
|||
|
|
a.gys_no,
|
|||
|
|
a.sap_no,
|
|||
|
|
a.ck_type,
|
|||
|
|
so.type_name AS ck_type_name,
|
|||
|
|
a.ly_time,
|
|||
|
|
a.ck_lihuo_y,
|
|||
|
|
u.user_name AS ck_lihuo_y_name
|
|||
|
|
FROM (
|
|||
|
|
SELECT
|
|||
|
|
MIN(t.id) AS id,
|
|||
|
|
t.bill_no AS bill_no,
|
|||
|
|
MIN(t.bill_no_ck) AS bill_no_ck,
|
|||
|
|
MIN(t.rk_type) AS rk_type,
|
|||
|
|
MIN(t.wl_type) AS wl_type,
|
|||
|
|
MIN(t.cangku) AS cangku,
|
|||
|
|
MIN(t.rk_time) AS rk_time,
|
|||
|
|
MIN(t.lihuo_y) AS lihuo_y,
|
|||
|
|
MAX(t.is_chuku) AS is_chuku,
|
|||
|
|
MIN(t.xj) AS xj,
|
|||
|
|
MIN(t.xm_no) AS xm_no,
|
|||
|
|
MIN(t.xm_ms) AS xm_ms,
|
|||
|
|
MIN(t.xm_no_ck) AS xm_no_ck,
|
|||
|
|
MIN(t.xm_ms_ck) AS xm_ms_ck,
|
|||
|
|
MIN(t.gys_mc) AS gys_mc,
|
|||
|
|
MIN(t.wl_no) AS wl_no,
|
|||
|
|
MIN(t.wl_ms) AS wl_ms,
|
|||
|
|
MIN(t.gys_no) AS gys_no,
|
|||
|
|
MIN(t.sap_no) AS sap_no,
|
|||
|
|
MIN(t.ck_type) AS ck_type,
|
|||
|
|
MAX(t.ly_time) AS ly_time,
|
|||
|
|
MIN(t.ck_lihuo_y) AS ck_lihuo_y
|
|||
|
|
FROM (
|
|||
|
|
<include refid="selectRkInfoVo"/>
|
|||
|
|
) t
|
|||
|
|
<where>
|
|||
|
|
<!-- 仅用 RkInfo 里真实存在的字段做筛选 -->
|
|||
|
|
|
|||
|
|
<!-- is_chuku:单值 -->
|
|||
|
|
<if test="q.isChuku != null and q.isChuku != ''">
|
|||
|
|
AND t.is_chuku = #{q.isChuku}
|
|||
|
|
</if>
|
|||
|
|
|
|||
|
|
<!-- 维度筛选 -->
|
|||
|
|
<if test="q.rkType != null and q.rkType != ''">
|
|||
|
|
AND t.rk_type LIKE concat('%', #{q.rkType}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.wlType != null and q.wlType != ''">
|
|||
|
|
AND t.wl_type LIKE concat('%', #{q.wlType}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.cangku != null and q.cangku != ''">
|
|||
|
|
AND t.cangku LIKE concat('%', #{q.cangku}, '%')
|
|||
|
|
</if>
|
|||
|
|
|
|||
|
|
<!-- 其它等值/模糊 -->
|
|||
|
|
<if test="q.lihuoY != null and q.lihuoY != ''">
|
|||
|
|
AND t.lihuo_y LIKE concat('%', #{q.lihuoY}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.xj != null and q.xj != ''">
|
|||
|
|
AND t.xj LIKE concat('%', #{q.xj}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.billNo != null and q.billNo != ''">
|
|||
|
|
AND t.bill_no LIKE concat('%', #{q.billNo}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.billNoCk != null and q.billNoCk != ''">
|
|||
|
|
AND t.bill_no_ck LIKE concat('%', #{q.billNoCk}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.xmNo != null and q.xmNo != ''">
|
|||
|
|
AND t.xm_no LIKE concat('%', #{q.xmNo}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.xmMs != null and q.xmMs != ''">
|
|||
|
|
AND t.xm_ms LIKE concat('%', #{q.xmMs}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.wlNo != null and q.wlNo != ''">
|
|||
|
|
AND t.wl_no LIKE concat('%', #{q.wlNo}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.wlMs != null and q.wlMs != ''">
|
|||
|
|
AND t.wl_ms LIKE concat('%', #{q.wlMs}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.gysNo != null and q.gysNo != ''">
|
|||
|
|
AND t.gys_no LIKE concat('%', #{q.gysNo}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.gysMc != null and q.gysMc != ''">
|
|||
|
|
AND t.gys_mc LIKE concat('%', #{q.gysMc}, '%')
|
|||
|
|
</if>
|
|||
|
|
|
|||
|
|
<if test="q.jhAmt != null"> AND t.jh_amt = #{q.jhAmt} </if>
|
|||
|
|
<if test="q.htDj != null"> AND t.ht_dj = #{q.htDj} </if>
|
|||
|
|
|
|||
|
|
<if test="q.sapNo != null and q.sapNo != ''">
|
|||
|
|
AND t.sap_no LIKE concat('%', #{q.sapNo}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.xh != null and q.xh != ''">
|
|||
|
|
AND t.xh LIKE concat('%', #{q.xh}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.jhQty != null"> AND t.jh_qty = #{q.jhQty} </if>
|
|||
|
|
<if test="q.htQty != null"> AND t.ht_qty = #{q.htQty} </if>
|
|||
|
|
<if test="q.dw != null and q.dw != ''">
|
|||
|
|
AND t.dw LIKE concat('%', #{q.dw}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.realQty != null"> AND t.real_qty = #{q.realQty} </if>
|
|||
|
|
|
|||
|
|
<if test="q.pcode != null and q.pcode != ''">
|
|||
|
|
AND t.pcode LIKE concat('%', #{q.pcode}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.lyTime != null"> AND t.ly_time = #{q.lyTime} </if>
|
|||
|
|
<if test="q.returnTime != null"> AND t.return_time = #{q.returnTime} </if>
|
|||
|
|
<if test="q.trayCode != null and q.trayCode != ''">
|
|||
|
|
AND t.tray_code LIKE concat('%', #{q.trayCode}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.entityId != null and q.entityId != ''">
|
|||
|
|
AND t.entity_id LIKE concat('%', #{q.entityId}, '%')
|
|||
|
|
</if>
|
|||
|
|
<if test="q.ckType != null and q.ckType != ''">
|
|||
|
|
AND t.ck_type LIKE concat('%', #{q.ckType}, '%')
|
|||
|
|
</if>
|
|||
|
|
|
|||
|
|
<!-- 若查询“已出库”,则要求已有出库单号 -->
|
|||
|
|
<if test="q.isChuku != null and q.isChuku == '1'">
|
|||
|
|
AND t.bill_no_ck IS NOT NULL
|
|||
|
|
</if>
|
|||
|
|
|
|||
|
|
<!-- 删除标记,默认为 0 -->
|
|||
|
|
<choose>
|
|||
|
|
<when test="q.isDelete != null and q.isDelete != ''">
|
|||
|
|
AND t.is_delete = #{q.isDelete}
|
|||
|
|
</when>
|
|||
|
|
<otherwise>
|
|||
|
|
AND t.is_delete = 0
|
|||
|
|
</otherwise>
|
|||
|
|
</choose>
|
|||
|
|
|
|||
|
|
<!-- 只查需要配送 -->
|
|||
|
|
<if test="q.isDelivery != null and q.isDelivery != ''">
|
|||
|
|
AND t.is_delivery = #{q.isDelivery}
|
|||
|
|
</if>
|
|||
|
|
</where>
|
|||
|
|
GROUP BY t.bill_no
|
|||
|
|
) a
|
|||
|
|
LEFT JOIN stock_in_type si ON a.rk_type = si.type_code
|
|||
|
|
LEFT JOIN stock_out_type so ON a.ck_type = so.type_code
|
|||
|
|
LEFT JOIN sys_user u ON a.ck_lihuo_y = u.user_id
|
|||
|
|
ORDER BY a.rk_time DESC
|
|||
|
|
</select>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<insert id="insertRkInfo" parameterType="RkInfo" useGeneratedKeys="true" keyProperty="id">
|
|||
|
|
insert into rk_info
|
|||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|||
|
|
<if test="rkType != null">rk_type,</if>
|
|||
|
|
<if test="wlType != null">wl_type,</if>
|
|||
|
|
<if test="cangku != null">cangku,</if>
|
|||
|
|
<if test="rkTime != null">rk_time,</if>
|
|||
|
|
<if test="lihuoY != null">lihuo_y,</if>
|
|||
|
|
<if test="isChuku != null">is_chuku,</if>
|
|||
|
|
<if test="status != null">status,</if>
|
|||
|
|
<if test="remark != null">remark,</if>
|
|||
|
|
<if test="billNo != null">bill_no,</if>
|
|||
|
|
<if test="isDelivery != null">is_delivery,</if>
|
|||
|
|
<if test="xj != null">xj,</if>
|
|||
|
|
<if test="xmNo != null">xm_no,</if>
|
|||
|
|
<if test="xmMs != null">xm_ms,</if>
|
|||
|
|
<if test="xmNoCk != null">xm_no_ck,</if>
|
|||
|
|
<if test="xmMsCk != null">xm_ms_ck,</if>
|
|||
|
|
<if test="wlNo != null">wl_no,</if>
|
|||
|
|
<if test="wlMs != null">wl_ms,</if>
|
|||
|
|
<if test="gysNo != null">gys_no,</if>
|
|||
|
|
<if test="gysMc != null">gys_mc,</if>
|
|||
|
|
<if test="jhAmt != null">jh_amt,</if>
|
|||
|
|
<if test="htDj != null">ht_dj,</if>
|
|||
|
|
<if test="sapNo != null">sap_no,</if>
|
|||
|
|
<if test="xh != null">xh,</if>
|
|||
|
|
<if test="jhQty != null">jh_qty,</if>
|
|||
|
|
<if test="htQty != null">ht_qty,</if>
|
|||
|
|
<if test="dw != null">dw,</if>
|
|||
|
|
<if test="realQty != null">real_qty,</if>
|
|||
|
|
<if test="pcode != null">pcode,</if>
|
|||
|
|
<if test="pcodeId != null">pcode_id,</if>
|
|||
|
|
<if test="trayCode != null">tray_code,</if>
|
|||
|
|
<if test="entityId != null">entity_id,</if>
|
|||
|
|
<if test="ckLihuoY != null">ck_lihuo_y,</if>
|
|||
|
|
<if test="teamCode != null">team_code,</if>
|
|||
|
|
<if test="ckType != null">ck_type,</if>
|
|||
|
|
<if test="ckRemark != null">ck_remark,</if>
|
|||
|
|
<if test="lyTime != null">ly_time,</if>
|
|||
|
|
<if test="billNoCk != null">bill_no_ck,</if>
|
|||
|
|
<if test="borrowTime != null">borrow_time,</if>
|
|||
|
|
<if test="returnTime != null">return_time,</if>
|
|||
|
|
<if test="hasMoved != null">has_moved,</if>
|
|||
|
|
<if test="isBorrowed != null">is_borrowed,</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="isDelete != null">is_delete,</if>
|
|||
|
|
<if test="gysJhId != null">gys_jh_id,</if>
|
|||
|
|
</trim>
|
|||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|||
|
|
<if test="rkType != null">#{rkType},</if>
|
|||
|
|
<if test="wlType != null">#{wlType},</if>
|
|||
|
|
<if test="cangku != null">#{cangku},</if>
|
|||
|
|
<if test="rkTime != null">#{rkTime},</if>
|
|||
|
|
<if test="lihuoY != null">#{lihuoY},</if>
|
|||
|
|
<if test="isChuku != null">#{isChuku},</if>
|
|||
|
|
<if test="status != null">#{status},</if>
|
|||
|
|
<if test="remark != null">#{remark},</if>
|
|||
|
|
<if test="billNo != null">#{billNo},</if>
|
|||
|
|
<if test="isDelivery != null">#{isDelivery},</if>
|
|||
|
|
<if test="xj != null">#{xj},</if>
|
|||
|
|
<if test="xmNo != null">#{xmNo},</if>
|
|||
|
|
<if test="xmMs != null">#{xmMs},</if>
|
|||
|
|
<if test="xmNoCk != null">#{xmNoCk},</if>
|
|||
|
|
<if test="xmMsCk != null">#{xmMsCk},</if>
|
|||
|
|
<if test="wlNo != null">#{wlNo},</if>
|
|||
|
|
<if test="wlMs != null">#{wlMs},</if>
|
|||
|
|
<if test="gysNo != null">#{gysNo},</if>
|
|||
|
|
<if test="gysMc != null">#{gysMc},</if>
|
|||
|
|
<if test="jhAmt != null">#{jhAmt},</if>
|
|||
|
|
<if test="htDj != null">#{htDj},</if>
|
|||
|
|
<if test="sapNo != null">#{sapNo},</if>
|
|||
|
|
<if test="xh != null">#{xh},</if>
|
|||
|
|
<if test="jhQty != null">#{jhQty},</if>
|
|||
|
|
<if test="htQty != null">#{htQty},</if>
|
|||
|
|
<if test="dw != null">#{dw},</if>
|
|||
|
|
<if test="realQty != null">#{realQty},</if>
|
|||
|
|
<if test="pcode != null">#{pcode},</if>
|
|||
|
|
<if test="pcodeId != null">#{pcodeId},</if>
|
|||
|
|
<if test="trayCode != null">#{trayCode},</if>
|
|||
|
|
<if test="entityId != null">#{entityId},</if>
|
|||
|
|
<if test="ckLihuoY != null">#{ckLihuoY},</if>
|
|||
|
|
<if test="teamCode != null">#{teamCode},</if>
|
|||
|
|
<if test="ckType != null">#{ckType},</if>
|
|||
|
|
<if test="ckRemark != null">#{ckRemark},</if>
|
|||
|
|
<if test="lyTime != null">#{lyTime},</if>
|
|||
|
|
<if test="billNoCk != null">#{billNoCk},</if>
|
|||
|
|
<if test="borrowTime != null">#{borrowTime},</if>
|
|||
|
|
<if test="returnTime != null">#{returnTime},</if>
|
|||
|
|
<if test="hasMoved != null">#{hasMoved},</if>
|
|||
|
|
<if test="isBorrowed != null">#{isBorrowed},</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="isDelete != null">#{isDelete},</if>
|
|||
|
|
<if test="gysJhId != null">#{gysJhId},</if>
|
|||
|
|
</trim>
|
|||
|
|
</insert>
|
|||
|
|
|
|||
|
|
<update id="updateRkInfo" parameterType="RkInfo">
|
|||
|
|
update rk_info
|
|||
|
|
<trim prefix="SET" suffixOverrides=",">
|
|||
|
|
<if test="rkType != null">rk_type = #{rkType},</if>
|
|||
|
|
<if test="wlType != null">wl_type = #{wlType},</if>
|
|||
|
|
<if test="cangku != null">cangku = #{cangku},</if>
|
|||
|
|
<if test="rkTime != null">rk_time = #{rkTime},</if>
|
|||
|
|
<if test="lihuoY != null">lihuo_y = #{lihuoY},</if>
|
|||
|
|
<if test="isChuku != null">is_chuku = #{isChuku},</if>
|
|||
|
|
<if test="status != null">status = #{status},</if>
|
|||
|
|
<if test="remark != null">remark = #{remark},</if>
|
|||
|
|
<if test="billNo != null">bill_no = #{billNo},</if>
|
|||
|
|
<if test="isDelivery != null">is_delivery = #{isDelivery},</if>
|
|||
|
|
<if test="xj != null">xj = #{xj},</if>
|
|||
|
|
<if test="xmNo != null">xm_no = #{xmNo},</if>
|
|||
|
|
<if test="xmMs != null">xm_ms = #{xmMs},</if>
|
|||
|
|
<if test="xmNoCk != null">xm_no_ck = #{xmNoCk},</if>
|
|||
|
|
<if test="xmMsCk != null">xm_ms_ck = #{xmMsCk},</if>
|
|||
|
|
<if test="wlNo != null">wl_no = #{wlNo},</if>
|
|||
|
|
<if test="wlMs != null">wl_ms = #{wlMs},</if>
|
|||
|
|
<if test="gysNo != null">gys_no = #{gysNo},</if>
|
|||
|
|
<if test="gysMc != null">gys_mc = #{gysMc},</if>
|
|||
|
|
<if test="jhAmt != null">jh_amt = #{jhAmt},</if>
|
|||
|
|
<if test="htDj != null">ht_dj = #{htDj},</if>
|
|||
|
|
<if test="sapNo != null">sap_no = #{sapNo},</if>
|
|||
|
|
<if test="xh != null">xh = #{xh},</if>
|
|||
|
|
<if test="jhQty != null">jh_qty = #{jhQty},</if>
|
|||
|
|
<if test="htQty != null">ht_qty = #{htQty},</if>
|
|||
|
|
<if test="dw != null">dw = #{dw},</if>
|
|||
|
|
<if test="realQty != null">real_qty = #{realQty},</if>
|
|||
|
|
<if test="pcode != null">pcode = #{pcode},</if>
|
|||
|
|
<if test="pcodeId != null">pcode_id = #{pcodeId},</if>
|
|||
|
|
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
|||
|
|
<if test="entityId != null">entity_id = #{entityId},</if>
|
|||
|
|
<if test="ckLihuoY != null">ck_lihuo_y = #{ckLihuoY},</if>
|
|||
|
|
<if test="teamCode != null">team_code = #{teamCode},</if>
|
|||
|
|
<if test="ckType != null">ck_type = #{ckType},</if>
|
|||
|
|
<if test="ckRemark != null">ck_remark = #{ckRemark},</if>
|
|||
|
|
<if test="lyTime != null">ly_time = #{lyTime},</if>
|
|||
|
|
<if test="billNoCk != null">bill_no_ck = #{billNoCk},</if>
|
|||
|
|
<if test="borrowTime != null">borrow_time = #{borrowTime},</if>
|
|||
|
|
<if test="returnTime != null">return_time = #{returnTime},</if>
|
|||
|
|
<if test="hasMoved != null">has_moved = #{hasMoved},</if>
|
|||
|
|
<if test="isBorrowed != null">is_borrowed = #{isBorrowed},</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="isDelete != null">is_delete = #{isDelete},</if>
|
|||
|
|
<if test="gysJhId != null">gys_jh_id = #{gysJhId},</if>
|
|||
|
|
</trim>
|
|||
|
|
where id = #{id}
|
|||
|
|
</update>
|
|||
|
|
|
|||
|
|
<delete id="deleteRkInfoById" parameterType="Long">
|
|||
|
|
delete from rk_info where id = #{id}
|
|||
|
|
</delete>
|
|||
|
|
|
|||
|
|
<delete id="deleteRkInfoByIds" parameterType="String">
|
|||
|
|
delete from rk_info where id in
|
|||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|||
|
|
#{id}
|
|||
|
|
</foreach>
|
|||
|
|
</delete>
|
|||
|
|
</mapper>
|