入库相关功能

This commit is contained in:
2026-01-21 19:21:07 +08:00
parent 820df3e20a
commit a1be0e4abd
20 changed files with 1051 additions and 362 deletions

View File

@@ -5,10 +5,13 @@
<mapper namespace="com.zg.project.wisdom.mapper.MoveRecordMapper">
<!-- 实体字段映射 -->
<!-- ===================== resultMap ===================== -->
<resultMap type="com.zg.project.wisdom.domain.MoveRecord" id="MoveRecordResult">
<result property="id" column="id"/>
<result property="rkId" column="rk_id"/>
<!-- 关键字段rk_info_id -->
<result property="rkInfoId" column="rk_info_id"/>
<result property="entityId" column="entity_id"/>
<result property="fromCangku" column="from_cangku"/>
<result property="fromPcode" column="from_pcode"/>
@@ -25,25 +28,46 @@
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="isDelete" column="is_delete"/>
<!-- 扩展展示字段 -->
<result property="fromCangkuName" column="from_cangku_name"/>
<result property="toCangkuName" column="to_cangku_name"/>
<result property="xmNo" column="xm_no"/>
<result property="xmMs" column="xm_ms"/>
<result property="wlMs" column="wl_ms"/>
<result property="gysMc" column="gys_mc"/>
</resultMap>
<!-- ===================== 基础查询字段 ===================== -->
<sql id="selectMoveRecordVo">
SELECT id, rk_id, entity_id, from_cangku, from_pcode, from_tray_code,
to_cangku, to_pcode, to_tray_code, move_reason, moved_by, moved_at,
create_by, create_time, update_by, update_time, is_delete
SELECT
id,
rk_info_id,
entity_id,
from_cangku,
from_pcode,
from_tray_code,
to_cangku,
to_pcode,
to_tray_code,
move_reason,
moved_by,
moved_at,
create_by,
create_time,
update_by,
update_time,
is_delete
FROM move_record
</sql>
<insert id="insertMoveRecord" parameterType="com.zg.project.wisdom.domain.MoveRecord" useGeneratedKeys="true" keyProperty="id">
<!-- ===================== 新增 ===================== -->
<insert id="insertMoveRecord"
parameterType="com.zg.project.wisdom.domain.MoveRecord"
useGeneratedKeys="true"
keyProperty="id">
INSERT INTO move_record (
rk_id,
rk_info_id,
entity_id,
from_cangku,
from_pcode,
@@ -60,7 +84,7 @@
update_time,
is_delete
) VALUES (
#{rkId},
#{rkInfoId},
#{entityId},
#{fromCangku},
#{fromPcode},
@@ -79,20 +103,20 @@
)
</insert>
<!-- 分页列表 -->
<!-- ===================== 分页列表 ===================== -->
<select id="selectMoveRecordList" resultMap="MoveRecordResult">
SELECT
mr.*,
su.user_name AS moved_by_name,
rk.xm_no,
rk.xm_ms,
rk.wl_ms,
rk.gys_mc,
ri.xm_no,
ri.xm_ms,
ri.wl_ms,
ri.gys_mc,
wi1.warehouse_name AS from_cangku_name,
wi2.warehouse_name AS to_cangku_name
FROM move_record mr
LEFT JOIN sys_user su ON mr.moved_by = su.user_id
LEFT JOIN rk_info rk ON mr.rk_id = rk.id
LEFT JOIN rk_info ri ON mr.rk_info_id = ri.id
LEFT JOIN warehouse_info wi1 ON mr.from_cangku = wi1.warehouse_code
LEFT JOIN warehouse_info wi2 ON mr.to_cangku = wi2.warehouse_code
<where>
@@ -106,7 +130,7 @@
AND mr.from_cangku = #{fromCangku}
</if>
<if test="xmNo != null and xmNo != ''">
AND rk.xm_no = #{xmNo}
AND ri.xm_no = #{xmNo}
</if>
<if test="moveReason != null and moveReason != ''">
AND mr.move_reason LIKE concat('%', #{moveReason}, '%')
@@ -115,17 +139,20 @@
ORDER BY mr.create_time DESC
</select>
<!-- 查询详情 -->
<select id="selectMoveRecordById" parameterType="Long" resultMap="MoveRecordResult">
<!-- ===================== 查询详情 ===================== -->
<select id="selectMoveRecordById"
parameterType="Long"
resultMap="MoveRecordResult">
<include refid="selectMoveRecordVo"/>
WHERE id = #{id}
</select>
<!-- 修改 -->
<update id="updateMoveRecord" parameterType="MoveRecord">
<!-- ===================== 修改 ===================== -->
<update id="updateMoveRecord"
parameterType="com.zg.project.wisdom.domain.MoveRecord">
UPDATE move_record
<set>
<if test="rkId != null">rk_id = #{rkId},</if>
<if test="rkInfoId != null">rk_info_id = #{rkInfoId},</if>
<if test="entityId != null">entity_id = #{entityId},</if>
<if test="fromCangku != null">from_cangku = #{fromCangku},</if>
<if test="fromPcode != null">from_pcode = #{fromPcode},</if>
@@ -143,12 +170,11 @@
WHERE id = #{id}
</update>
<!-- 删除单个 -->
<!-- ===================== 删除 ===================== -->
<delete id="deleteMoveRecordById" parameterType="Long">
DELETE FROM move_record WHERE id = #{id}
</delete>
<!-- 批量删除 -->
<delete id="deleteMoveRecordByIds" parameterType="Long">
DELETE FROM move_record
WHERE id IN

View File

@@ -6,30 +6,30 @@
<!-- ==================== ResultMap ==================== -->
<resultMap type="RkBill" id="RkBillResult">
<result property="id" column="id"/>
<result property="wlType" column="wl_type"/>
<result property="wlTypeName" column="wl_type_name"/>
<result property="id" column="id"/>
<result property="wlType" column="wl_type"/>
<result property="wlTypeName" column="wl_type_name"/>
<result property="cangku" column="cangku"/>
<result property="warehouseName" column="warehouse_name"/>
<result property="parentWarehouseName" column="parent_warehouse_name"/>
<result property="cangku" column="cangku"/>
<result property="warehouseName" column="warehouse_name"/>
<result property="parentWarehouseName" column="parent_warehouse_name"/>
<result property="billNo" column="bill_no"/>
<result property="billNo" column="bill_no"/>
<result property="operationType" column="operation_type"/>
<result property="operationTypeName" column="operation_type_name"/>
<result property="operationType" column="operation_type"/>
<result property="operationTypeName" column="operation_type_name"/>
<result property="bizType" column="biz_type"/>
<result property="operationTime" column="operation_time"/>
<result property="execStatus" column="exec_status"/>
<result property="bizType" column="biz_type"/>
<result property="operationTime" column="operation_time"/>
<result property="execStatus" column="exec_status"/>
<result property="operator" column="operator"/>
<result property="operatorName" column="operator_name"/>
<result property="operator" column="operator"/>
<result property="operatorName" column="operator_name"/>
<result property="teamCode" column="team_code"/>
<result property="remark" column="remark"/>
<result property="isDelivery" column="is_delivery"/>
<result property="isDelete" column="is_delete"/>
<result property="teamCode" column="team_code"/>
<result property="remark" column="remark"/>
<result property="isDelivery" column="is_delivery"/>
<result property="isDelete" column="is_delete"/>
</resultMap>
<!-- ==================== Base Select ==================== -->
@@ -49,44 +49,25 @@
rb.is_delivery,
rb.is_delete,
-- 物资类型
mt.type_name AS wl_type_name,
-- 出 / 入库类型名称
COALESCE(sit.type_name, sot.type_name) AS operation_type_name,
-- 操作人
su.nick_name AS operator_name,
-- 小仓
wh.warehouse_name AS warehouse_name,
-- 大仓(冗余字段)
wh.parent_warehouse_name AS parent_warehouse_name
FROM rk_bill rb
-- 仓库(小仓)
LEFT JOIN warehouse_info wh
ON rb.cangku = wh.warehouse_code
AND wh.status = 1
-- 物资类型
LEFT JOIN material_type mt
ON rb.wl_type = mt.type_code
AND mt.status = 1
-- 入库类型
LEFT JOIN stock_in_type sit
ON rb.operation_type = sit.type_code
AND sit.status = 1
-- 出库类型
LEFT JOIN stock_out_type sot
ON rb.operation_type = sot.type_code
AND (sot.is_delete = '0' OR sot.is_delete IS NULL)
-- 操作人
LEFT JOIN sys_user su
ON rb.operator = su.user_id
</sql>
@@ -95,24 +76,67 @@
<select id="selectRkBillList" parameterType="RkBill" resultMap="RkBillResult">
<include refid="selectRkBillVo"/>
<where>
<if test="wlType != null">AND rb.wl_type = #{wlType}</if>
<if test="cangku != null and cangku != ''">AND rb.cangku = #{cangku}</if>
<if test="billNo != null and billNo != ''">AND rb.bill_no = #{billNo}</if>
<if test="operationType != null">AND rb.operation_type = #{operationType}</if>
<if test="bizType != null">AND rb.biz_type = #{bizType}</if>
<if test="operationTime != null">AND rb.operation_time = #{operationTime}</if>
<!-- 时间区间(新增) -->
<if test="wlType != null and wlType != ''">
AND rb.wl_type = #{wlType}
</if>
<if test="cangku != null and cangku != ''">
AND rb.cangku = #{cangku}
</if>
<if test="billNo != null and billNo != ''">
AND rb.bill_no = #{billNo}
</if>
<if test="operationType != null and operationType != ''">
AND rb.operation_type = #{operationType}
</if>
<!-- 多 bizType -->
<if test="bizTypeList != null and bizTypeList.size > 0">
AND rb.biz_type IN
<foreach collection="bizTypeList"
item="bt"
open="("
separator=","
close=")">
#{bt}
</foreach>
</if>
<if test="operationTime != null">
AND rb.operation_time = #{operationTime}
</if>
<if test="startDate != null">
AND rb.operation_time &gt;= #{startDate}
</if>
<if test="endDate != null">
AND rb.operation_time &lt;= #{endDate}
</if>
<if test="execStatus != null">AND rb.exec_status = #{execStatus}</if>
<if test="operator != null">AND rb.operator = #{operator}</if>
<if test="teamCode != null and teamCode != ''">AND rb.team_code = #{teamCode}</if>
<if test="isDelivery != null">AND rb.is_delivery = #{isDelivery}</if>
<if test="isDelete != null">AND rb.is_delete = #{isDelete}</if>
<if test="execStatus != null and execStatus != ''">
AND rb.exec_status = #{execStatus}
</if>
<if test="operator != null">
AND rb.operator = #{operator}
</if>
<if test="teamCode != null and teamCode != ''">
AND rb.team_code = #{teamCode}
</if>
<if test="isDelivery != null and isDelivery != ''">
AND rb.is_delivery = #{isDelivery}
</if>
<if test="isDelete != null and isDelete != ''">
AND rb.is_delete = #{isDelete}
</if>
</where>
ORDER BY rb.exec_status ASC, rb.operation_time DESC
</select>
@@ -150,7 +174,6 @@
LIMIT 1
</select>
<!-- ==================== Insert ==================== -->
<insert id="insertRkBill"
parameterType="com.zg.project.wisdom.domain.RkBill"
@@ -191,22 +214,28 @@
<update id="updateRkBill" parameterType="RkBill">
UPDATE rk_bill
<trim prefix="SET" suffixOverrides=",">
<if test="wlType != null">wl_type = #{wlType},</if>
<if test="cangku != null">cangku = #{cangku},</if>
<if test="wlType != null and wlType != ''">wl_type = #{wlType},</if>
<if test="cangku != null and cangku != ''">cangku = #{cangku},</if>
<if test="billNo != null and billNo != ''">bill_no = #{billNo},</if>
<if test="operationType != null">operation_type = #{operationType},</if>
<if test="bizType != null">biz_type = #{bizType},</if>
<if test="operationType != null and operationType != ''">operation_type = #{operationType},</if>
<if test="bizType != null and bizType != ''">biz_type = #{bizType},</if>
<if test="operationTime != null">operation_time = #{operationTime},</if>
<if test="execStatus != null">exec_status = #{execStatus},</if>
<if test="execStatus != null and execStatus != ''">exec_status = #{execStatus},</if>
<if test="operator != null">operator = #{operator},</if>
<if test="teamCode != null">team_code = #{teamCode},</if>
<if test="teamCode != null and teamCode != ''">team_code = #{teamCode},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isDelivery != null">is_delivery = #{isDelivery},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="isDelivery != null and isDelivery != ''">is_delivery = #{isDelivery},</if>
<if test="isDelete != null and isDelete != ''">is_delete = #{isDelete},</if>
</trim>
WHERE id = #{id}
</update>
<update id="updateExecStatusByBillNo">
UPDATE rk_bill
SET exec_status = #{execStatus}
WHERE bill_no = #{billNo}
</update>
<!-- ==================== Delete ==================== -->
<delete id="deleteRkBillById" parameterType="Long">
DELETE FROM rk_bill WHERE id = #{id}

View File

@@ -2,17 +2,25 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zg.project.wisdom.mapper.RkInfoMapper">
<!-- ========================= resultMap ========================= -->
<resultMap type="RkInfo" id="RkInfoResult">
<result property="id" column="id"/>
<result property="operationType" column="operation_type"/>
<result property="operationTypeName" column="operation_type_name"/>
<result property="bizType" column="biz_type"/>
<result property="wlType" column="wl_type"/>
<result property="wlTypeName" column="wl_type_name"/>
<result property="cangku" column="cangku"/>
<result property="warehouseName" column="warehouse_name"/>
<result property="parentWarehouseCode" column="parent_warehouse_code"/>
<result property="parentWarehouseName" column="parent_warehouse_name"/>
<result property="operationTime" column="operation_time"/>
<result property="stockAge" column="stock_age"/>
<result property="operator" column="operator"/>
<result property="operatorName" column="operator_name"/>
<result property="isChuku" column="is_chuku"/>
<result property="status" column="status"/>
<result property="execStatus" column="exec_status"/>
@@ -59,116 +67,114 @@
<result property="isUpdate" column="is_update"/>
</resultMap>
<!-- ========================= 公共查询字段 ========================= -->
<!-- ========================= 公共查询 SQL联表完整版 ========================= -->
<sql id="selectRkInfoVo">
select
id,
operation_type,
biz_type,
wl_type,
cangku,
operation_time,
operator,
is_chuku,
status,
exec_status,
remark,
bill_no,
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,
team_code,
borrow_time,
return_time,
has_moved,
is_borrowed,
create_by,
create_time,
update_by,
update_time,
is_delete,
gys_jh_id,
rdid,
rdid_ck,
sid,
is_delivery,
fycde_1,
fycde_2,
is_update,
/* 新增库龄计算 */
DATEDIFF(CURRENT_DATE, operation_time) AS stock_age -- 库龄(天)
from rk_info
SELECT
ri.*,
/* 出入库类型名称 */
COALESCE(sit.type_name, sot.type_name) AS operation_type_name,
/* 物资类型名称 */
mt.type_name AS wl_type_name,
/* 仓库信息 */
wh.warehouse_name,
wh.parent_warehouse_code,
wh.parent_warehouse_name,
/* 理货员 */
su.nick_name AS operator_name,
/* 库龄 */
DATEDIFF(CURRENT_DATE, ri.operation_time) AS stock_age
FROM rk_info ri
LEFT JOIN stock_in_type sit ON ri.operation_type = sit.type_code
LEFT JOIN stock_out_type sot ON ri.operation_type = sot.type_code
LEFT JOIN material_type mt ON ri.wl_type = mt.type_code
LEFT JOIN warehouse_info wh ON ri.cangku = wh.warehouse_code
LEFT JOIN sys_user su ON ri.operator = su.user_id
</sql>
<!-- ========================= 删除 ========================= -->
<delete id="deleteRkInfoById" parameterType="Long">
delete from rk_info where id = #{id}
</delete>
<delete id="deleteRkInfoByIds" parameterType="java.util.List">
delete from rk_info
where id in
<foreach item="item" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 查询列表:根据库龄进行过滤 -->
<!-- ========================= 查询列表 ========================= -->
<select id="selectRkInfoList" parameterType="RkInfo" resultMap="RkInfoResult">
<include refid="selectRkInfoVo"/>
<where>
ri.exec_status = 1
<if test="operationType != null and operationType != ''">
and operation_type = #{operationType}
AND ri.operation_type LIKE CONCAT('%', #{operationType}, '%')
</if>
<if test="sapNo != null and sapNo != ''">
AND ri.sap_no LIKE CONCAT('%', #{sapNo}, '%')
</if>
<if test="xmNo != null and xmNo != ''">
AND ri.xm_no LIKE CONCAT('%', #{xmNo}, '%')
</if>
<if test="xmMs != null and xmMs != ''">
AND ri.xm_ms LIKE CONCAT('%', #{xmMs}, '%')
</if>
<if test="wlNo != null and wlNo != ''">
AND ri.wl_no LIKE CONCAT('%', #{wlNo}, '%')
</if>
<if test="wlMs != null and wlMs != ''">
AND ri.wl_ms LIKE CONCAT('%', #{wlMs}, '%')
</if>
<if test="gysMc != null and gysMc != ''">
AND ri.gys_mc LIKE CONCAT('%', #{gysMc}, '%')
</if>
<if test="pcode != null and pcode != ''">
AND ri.pcode LIKE CONCAT('%', #{pcode}, '%')
</if>
<if test="bizType != null and bizType != ''">
and biz_type = #{bizType}
AND ri.biz_type LIKE CONCAT('%', #{bizType}, '%')
</if>
<if test="wlType != null and wlType != ''">
and wl_type = #{wlType}
AND ri.wl_type LIKE CONCAT('%', #{wlType}, '%')
</if>
<if test="cangku != null and cangku != ''">
and cangku = #{cangku}
</if>
<if test="execStatus != null and execStatus != ''">
and exec_status = #{execStatus}
AND ri.cangku LIKE CONCAT('%', #{cangku}, '%')
</if>
<if test="billNo != null and billNo != ''">
and bill_no = #{billNo}
AND ri.bill_no LIKE CONCAT('%', #{billNo}, '%')
</if>
<if test="isDelete != null and isDelete != ''">
and is_delete = #{isDelete}
AND ri.is_delete = #{isDelete}
</if>
<!-- 出入库时间范围 -->
<if test="startDate != null">
AND ri.operation_time &gt;= #{startDate}
</if>
<if test="endDate != null">
AND ri.operation_time &lt;= #{endDate}
</if>
</where>
ORDER BY ri.operation_time DESC
</select>
<!-- ========================= 按 ID 查询 ========================= -->
<select id="selectRkInfoById" parameterType="Long" resultMap="RkInfoResult">
<include refid="selectRkInfoVo"/>
where id = #{id}
WHERE ri.id = #{id}
</select>
<!-- ========================= 删除 ========================= -->
<delete id="deleteRkInfoById" parameterType="Long">
DELETE FROM rk_info WHERE id = #{id}
</delete>
<!-- 插入 rk_info -->
<delete id="deleteRkInfoByIds" parameterType="java.util.List">
DELETE FROM rk_info
WHERE id IN
<foreach item="item" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- ========================= 插入 ========================= -->
<insert id="insertRkInfo" parameterType="RkInfo" useGeneratedKeys="true" keyProperty="id">
insert into rk_info (
INSERT INTO rk_info (
operation_type, biz_type, wl_type, cangku, operation_time, operator,
is_chuku, status, exec_status, remark, bill_no,
xj, xm_no, xm_ms, xm_no_ck, xm_ms_ck,
@@ -186,7 +192,7 @@
is_update,
create_by, create_time, is_delete
)
values (
VALUES (
#{operationType}, #{bizType}, #{wlType}, #{cangku}, #{operationTime}, #{operator},
#{isChuku}, #{status}, #{execStatus}, #{remark}, #{billNo},
#{xj}, #{xmNo}, #{xmMs}, #{xmNoCk}, #{xmMsCk},
@@ -206,19 +212,69 @@
)
</insert>
<!-- 更新 rk_info -->
<!-- ========================= 更新 ========================= -->
<update id="updateRkInfo" parameterType="RkInfo">
update rk_info
UPDATE rk_info
<trim prefix="SET" suffixOverrides=",">
<if test="operationType != null">operation_type = #{operationType},</if>
<if test="bizType != null">biz_type = #{bizType},</if>
<if test="wlType != null">wl_type = #{wlType},</if>
<if test="cangku != null">cangku = #{cangku},</if>
<if test="operationTime != null">operation_time = #{operationTime},</if>
<if test="operator != null">operator = #{operator},</if>
<if test="isChuku != null">is_chuku = #{isChuku},</if>
<if test="status != null">status = #{status},</if>
<if test="execStatus != null">exec_status = #{execStatus},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="billNo != null">bill_no = #{billNo},</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="teamCode != null">team_code = #{teamCode},</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="gysJhId != null">gys_jh_id = #{gysJhId},</if>
<if test="rdid != null">rdid = #{rdid},</if>
<if test="rdidCk != null">rdid_ck = #{rdidCk},</if>
<if test="sid != null">sid = #{sid},</if>
<if test="isDelivery != null">is_delivery = #{isDelivery},</if>
<if test="fycde1 != null">fycde_1 = #{fycde1},</if>
<if test="fycde2 != null">fycde_2 = #{fycde2},</if>
<if test="isUpdate != null">is_update = #{isUpdate},</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>
</trim>
where id = #{id}
WHERE id = #{id}
</update>
<update id="updateExecStatusByIds">
UPDATE rk_info
SET exec_status = #{execStatus}
WHERE id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@@ -194,7 +194,6 @@
<if test="startDate != null">
AND rr.operation_time &gt;= #{startDate}
</if>
<if test="endDate != null">
AND rr.operation_time &lt;= #{endDate}
</if>
@@ -216,6 +215,15 @@
ORDER BY rr.operation_time ASC
</select>
<select id="selectRkRecordByIds" resultMap="RkRecordResult">
SELECT *
FROM rk_record
WHERE id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<!-- ===================== 新增 ===================== -->
<insert id="insertRkRecord"
parameterType="RkRecord"
@@ -428,6 +436,42 @@
WHERE id = #{id}
</update>
<update id="updateExecStatusByIds">
UPDATE rk_record
SET exec_status = #{execStatus}
WHERE id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="updateByRkInfo" parameterType="com.zg.project.wisdom.domain.RkInfo">
UPDATE rk_record
<trim prefix="SET" suffixOverrides=",">
<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="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="cangku != null">cangku = #{cangku},</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="teamCode != null">team_code = #{teamCode},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
update_time = NOW()
</trim>
WHERE rk_info_id = #{id}
</update>
<!-- ===================== 删除 ===================== -->
<delete id="deleteRkRecordById" parameterType="Long">
DELETE FROM rk_record WHERE id = #{id}