This commit is contained in:
2025-11-21 10:53:04 +08:00
parent e24d6ef0b4
commit 24ca9148dd
61 changed files with 4918 additions and 582 deletions

View File

@@ -1,124 +1,147 @@
<?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">
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" />
<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"/>
<!-- 新增:来自 mtd 的两列 -->
<result property="weightKg" column="weight_kg"/>
<result property="volumeM3" column="volume_m3"/>
</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
<!-- 统一的字段清单(带 ri. 别名) -->
<sql id="rkInfoColumns">
ri.id, ri.rk_type, ri.wl_type, ri.cangku, ri.rk_time, ri.lihuo_y, ri.is_chuku, ri.status, ri.remark,
ri.bill_no, ri.is_delivery, ri.xj, ri.xm_no, ri.xm_ms, ri.xm_no_ck, ri.xm_ms_ck, ri.wl_no, ri.wl_ms,
ri.gys_no, ri.gys_mc, ri.jh_amt, ri.ht_dj, ri.sap_no, ri.xh, ri.jh_qty, ri.ht_qty, ri.dw, ri.real_qty,
ri.pcode, ri.pcode_id, ri.tray_code, ri.entity_id, ri.ck_lihuo_y, ri.team_code, ri.ck_type, ri.ck_remark,
ri.ly_time, ri.bill_no_ck, ri.borrow_time, ri.return_time, ri.has_moved, ri.is_borrowed,
ri.create_by, ri.create_time, ri.update_by, ri.update_time, ri.is_delete, ri.gys_jh_id
</sql>
<!-- 统一的 FROM + JOIN 片段 -->
<sql id="rkInfoFromJoinMtd">
FROM rk_info ri
LEFT JOIN delivery_mtd m
ON m.wl_no = ri.wl_no
AND (m.is_delete = '0' OR m.is_delete = 0 OR m.is_delete IS NULL)
</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>
SELECT
<include refid="rkInfoColumns"/>,
m.weight_kg,
m.volume_m3
<include refid="rkInfoFromJoinMtd"/>
<where>
(ri.is_delete = '0' OR ri.is_delete = 0 OR ri.is_delete IS NULL)
<if test="rkType != null and rkType != ''"> and ri.rk_type = #{rkType}</if>
<if test="wlType != null and wlType != ''"> and ri.wl_type = #{wlType}</if>
<if test="cangku != null and cangku != ''"> and ri.cangku = #{cangku}</if>
<if test="rkTime != null "> and ri.rk_time = #{rkTime}</if>
<if test="lihuoY != null and lihuoY != ''"> and ri.lihuo_y = #{lihuoY}</if>
<if test="isChuku != null and isChuku != ''"> and ri.is_chuku = #{isChuku}</if>
<if test="status != null and status != ''"> and ri.status = #{status}</if>
<if test="billNo != null and billNo != ''"> and ri.bill_no = #{billNo}</if>
<if test="isDelivery != null and isDelivery != ''"> and ri.is_delivery = #{isDelivery}</if>
<if test="xj != null and xj != ''"> and ri.xj = #{xj}</if>
<if test="xmNo != null and xmNo != ''"> and ri.xm_no = #{xmNo}</if>
<if test="xmMs != null and xmMs != ''"> and ri.xm_ms = #{xmMs}</if>
<if test="xmNoCk != null and xmNoCk != ''"> and ri.xm_no_ck = #{xmNoCk}</if>
<if test="xmMsCk != null and xmMsCk != ''"> and ri.xm_ms_ck = #{xmMsCk}</if>
<if test="wlNo != null and wlNo != ''"> and ri.wl_no = #{wlNo}</if>
<if test="wlMs != null and wlMs != ''"> and ri.wl_ms = #{wlMs}</if>
<if test="gysNo != null and gysNo != ''"> and ri.gys_no = #{gysNo}</if>
<if test="gysMc != null and gysMc != ''"> and ri.gys_mc = #{gysMc}</if>
<if test="jhAmt != null "> and ri.jh_amt = #{jhAmt}</if>
<if test="htDj != null "> and ri.ht_dj = #{htDj}</if>
<if test="sapNo != null and sapNo != ''"> and ri.sap_no = #{sapNo}</if>
<if test="xh != null and xh != ''"> and ri.xh = #{xh}</if>
<if test="jhQty != null "> and ri.jh_qty = #{jhQty}</if>
<if test="htQty != null "> and ri.ht_qty = #{htQty}</if>
<if test="dw != null and dw != ''"> and ri.dw = #{dw}</if>
<if test="realQty != null "> and ri.real_qty = #{realQty}</if>
<if test="pcode != null and pcode != ''"> and ri.pcode = #{pcode}</if>
<if test="pcodeId != null and pcodeId != ''"> and ri.pcode_id = #{pcodeId}</if>
<if test="trayCode != null and trayCode != ''"> and ri.tray_code = #{trayCode}</if>
<if test="entityId != null and entityId != ''"> and ri.entity_id = #{entityId}</if>
<if test="ckLihuoY != null and ckLihuoY != ''"> and ri.ck_lihuo_y = #{ckLihuoY}</if>
<if test="teamCode != null and teamCode != ''"> and ri.team_code = #{teamCode}</if>
<if test="ckType != null and ckType != ''"> and ri.ck_type = #{ckType}</if>
<if test="ckRemark != null and ckRemark != ''"> and ri.ck_remark = #{ckRemark}</if>
<if test="lyTime != null "> and ri.ly_time = #{lyTime}</if>
<if test="billNoCk != null and billNoCk != ''"> and ri.bill_no_ck = #{billNoCk}</if>
<if test="borrowTime != null "> and ri.borrow_time = #{borrowTime}</if>
<if test="returnTime != null "> and ri.return_time = #{returnTime}</if>
<if test="hasMoved != null and hasMoved != ''"> and ri.has_moved = #{hasMoved}</if>
<if test="isBorrowed != null and isBorrowed != ''"> and ri.is_borrowed = #{isBorrowed}</if>
<if test="isDelete != null and isDelete != ''"> and ri.is_delete = #{isDelete}</if>
<if test="gysJhId != null "> and ri.gys_jh_id = #{gysJhId}</if>
</where>
</select>
<!-- 按 ID 查询 -->
<select id="selectRkInfoById" parameterType="Long" resultMap="RkInfoResult">
<include refid="selectRkInfoVo"/>
where id = #{id}
SELECT
<include refid="rkInfoColumns"/>,
m.weight_kg,
m.volume_m3
<include refid="rkInfoFromJoinMtd"/>
WHERE ri.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 -->
<!-- 按单据分组bill_no列表复用同一个 SELECT 作为子查询,再做聚合 -->
<select id="selectGroupedByBill" resultMap="RkInfoResult">
SELECT
a.id,
@@ -171,110 +194,100 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
MAX(t.ly_time) AS ly_time,
MIN(t.ck_lihuo_y) AS ck_lihuo_y
FROM (
<include refid="selectRkInfoVo"/>
) t
SELECT
<include refid="rkInfoColumns"/>,
m.weight_kg,
m.volume_m3
<include refid="rkInfoFromJoinMtd"/>
<where>
<!-- 仅用 RkInfo 里真实存在的字段做筛选 -->
<!-- is_chuku单值 -->
(ri.is_delete = '0' OR ri.is_delete = 0 OR ri.is_delete IS NULL)
<!-- 这里参数名按你的 Service 传入保持:假设是 q -->
<if test="q.isChuku != null and q.isChuku != ''">
AND t.is_chuku = #{q.isChuku}
and ri.is_chuku = #{q.isChuku}
</if>
<!-- 维度筛选 -->
<if test="q.rkType != null and q.rkType != ''">
AND t.rk_type LIKE concat('%', #{q.rkType}, '%')
and ri.rk_type LIKE concat('%', #{q.rkType}, '%')
</if>
<if test="q.wlType != null and q.wlType != ''">
AND t.wl_type LIKE concat('%', #{q.wlType}, '%')
and ri.wl_type LIKE concat('%', #{q.wlType}, '%')
</if>
<if test="q.cangku != null and q.cangku != ''">
AND t.cangku LIKE concat('%', #{q.cangku}, '%')
and ri.cangku LIKE concat('%', #{q.cangku}, '%')
</if>
<!-- 其它等值/模糊 -->
<if test="q.lihuoY != null and q.lihuoY != ''">
AND t.lihuo_y LIKE concat('%', #{q.lihuoY}, '%')
and ri.lihuo_y LIKE concat('%', #{q.lihuoY}, '%')
</if>
<if test="q.xj != null and q.xj != ''">
AND t.xj LIKE concat('%', #{q.xj}, '%')
and ri.xj LIKE concat('%', #{q.xj}, '%')
</if>
<if test="q.billNo != null and q.billNo != ''">
AND t.bill_no LIKE concat('%', #{q.billNo}, '%')
and ri.bill_no LIKE concat('%', #{q.billNo}, '%')
</if>
<if test="q.billNoCk != null and q.billNoCk != ''">
AND t.bill_no_ck LIKE concat('%', #{q.billNoCk}, '%')
and ri.bill_no_ck LIKE concat('%', #{q.billNoCk}, '%')
</if>
<if test="q.xmNo != null and q.xmNo != ''">
AND t.xm_no LIKE concat('%', #{q.xmNo}, '%')
and ri.xm_no LIKE concat('%', #{q.xmNo}, '%')
</if>
<if test="q.xmMs != null and q.xmMs != ''">
AND t.xm_ms LIKE concat('%', #{q.xmMs}, '%')
and ri.xm_ms LIKE concat('%', #{q.xmMs}, '%')
</if>
<if test="q.wlNo != null and q.wlNo != ''">
AND t.wl_no LIKE concat('%', #{q.wlNo}, '%')
and ri.wl_no LIKE concat('%', #{q.wlNo}, '%')
</if>
<if test="q.wlMs != null and q.wlMs != ''">
AND t.wl_ms LIKE concat('%', #{q.wlMs}, '%')
and ri.wl_ms LIKE concat('%', #{q.wlMs}, '%')
</if>
<if test="q.gysNo != null and q.gysNo != ''">
AND t.gys_no LIKE concat('%', #{q.gysNo}, '%')
and ri.gys_no LIKE concat('%', #{q.gysNo}, '%')
</if>
<if test="q.gysMc != null and q.gysMc != ''">
AND t.gys_mc LIKE concat('%', #{q.gysMc}, '%')
and ri.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.jhAmt != null"> and ri.jh_amt = #{q.jhAmt} </if>
<if test="q.htDj != null"> and ri.ht_dj = #{q.htDj} </if>
<if test="q.sapNo != null and q.sapNo != ''">
AND t.sap_no LIKE concat('%', #{q.sapNo}, '%')
and ri.sap_no LIKE concat('%', #{q.sapNo}, '%')
</if>
<if test="q.xh != null and q.xh != ''">
AND t.xh LIKE concat('%', #{q.xh}, '%')
and ri.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.jhQty != null"> and ri.jh_qty = #{q.jhQty} </if>
<if test="q.htQty != null"> and ri.ht_qty = #{q.htQty} </if>
<if test="q.dw != null and q.dw != ''">
AND t.dw LIKE concat('%', #{q.dw}, '%')
and ri.dw LIKE concat('%', #{q.dw}, '%')
</if>
<if test="q.realQty != null"> AND t.real_qty = #{q.realQty} </if>
<if test="q.realQty != null"> and ri.real_qty = #{q.realQty} </if>
<if test="q.pcode != null and q.pcode != ''">
AND t.pcode LIKE concat('%', #{q.pcode}, '%')
and ri.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.lyTime != null"> and ri.ly_time = #{q.lyTime} </if>
<if test="q.returnTime != null"> and ri.return_time = #{q.returnTime} </if>
<if test="q.trayCode != null and q.trayCode != ''">
AND t.tray_code LIKE concat('%', #{q.trayCode}, '%')
and ri.tray_code LIKE concat('%', #{q.trayCode}, '%')
</if>
<if test="q.entityId != null and q.entityId != ''">
AND t.entity_id LIKE concat('%', #{q.entityId}, '%')
and ri.entity_id LIKE concat('%', #{q.entityId}, '%')
</if>
<if test="q.ckType != null and q.ckType != ''">
AND t.ck_type LIKE concat('%', #{q.ckType}, '%')
and ri.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}
and ri.is_delete = #{q.isDelete}
</when>
<otherwise>
AND t.is_delete = 0
and (ri.is_delete = '0' OR ri.is_delete = 0 OR ri.is_delete IS NULL)
</otherwise>
</choose>
<!-- 只查需要配送 -->
<if test="q.isDelivery != null and q.isDelivery != ''">
AND t.is_delivery = #{q.isDelivery}
and ri.is_delivery = #{q.isDelivery}
</if>
<if test="q.isChuku != null and q.isChuku == '1'">
and ri.bill_no_ck IS NOT NULL
</if>
</where>
) t
GROUP BY t.bill_no
) a
LEFT JOIN stock_in_type si ON a.rk_type = si.type_code
@@ -283,7 +296,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY a.rk_time DESC
</select>
<!-- 插入 -->
<insert id="insertRkInfo" parameterType="RkInfo" useGeneratedKeys="true" keyProperty="id">
insert into rk_info
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -334,7 +347,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="isDelete != null">is_delete,</if>
<if test="gysJhId != null">gys_jh_id,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="rkType != null">#{rkType},</if>
<if test="wlType != null">#{wlType},</if>
@@ -383,9 +396,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="gysJhId != null">#{gysJhId},</if>
</trim>
</trim>
</insert>
<!-- 更新:照旧,不涉及 mtd -->
<update id="updateRkInfo" parameterType="RkInfo">
update rk_info
<trim prefix="SET" suffixOverrides=",">
@@ -427,7 +441,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="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>
@@ -445,9 +459,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteRkInfoByIds" parameterType="String">
delete from rk_info where id in
delete from rk_info
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>