Files
nanguangszwlback/mhd_wms/src/main/resources/mapper/lineManagement/LineManagementMapper.xml
T
rcx 000092952f feat(oms,wms):出库/运输单据增加线路车次字段,线路管理支持车次清单维护
1. OMS四张表(business_document_order/execute_order/
   reservation_stock_out_order/execution_stock_out_order)加
   LINE_CODE/LINE_NAME/SHUTTLE_NO三列,entity/DO/DTO/PO同步加字段,
   出库两链路Mapper XML补列与resultMap。
   线路编码/名称冗余存line_management的route_code/route_name
   (两库不互通无法join);SHUTTLE_NO为字符串(如4或31-4),
   前端拼"编码-车次"显示(31-4车次);不复用route(存tms_route.id)
   和train_no(入库链路占用)。
   下发链路(预约单->执行单,业务单->执行单)同名拷贝自动透传。
2. WMS line_management加SHUTTLE_JSON列(车次序号JSON数组),
   四层加字段+XML;DTO加反序列化器兼容前端传数组,
   PO加序列化器返回原样输出数组。
3. LineManagementImpl.update组织/仓库名称空串兜底,
   修复编辑线路后组织名称被刷成空串、列表查不到的问题。
4. 新增建表脚本sql/20260820_oms_outbound_transport_add_line_shuttle.sql(达梦语法)。
2026-08-21 15:28:50 +08:00

112 lines
4.7 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.mhd.wms.domain.lineManagement.repository.mapper.LineManagementMapper">
<resultMap type="com.mhd.wms.domain.lineManagement.repository.po.LineManagementPO" id="LineManagementResult">
<!-- 租赁相关字段 -->
<result property="id" column="id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="topOrganizationId" column="top_organization_id" />
<result property="warehouseId" column="warehouse_id" />
<result property="warehouseName" column="warehouse_name" />
<result property="routeCode" column="route_code" />
<result property="routeName" column="route_name" />
<result property="customerJson" column="customer_json" />
<result property="shuttleJson" column="shuttle_json" />
<result property="register" column="register" />
<!-- 继承自BaseVOEntity的字段 -->
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="createByName" column="create_by_name" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="updateByName" column="update_by_name" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectLineManagementPo">
select
a.id,
a.organization_id,
a.organization_name,
a.top_organization_id,
a.warehouse_id,
a.warehouse_name,
a.route_code,
a.route_name,
a.customer_json,
a.shuttle_json,
a.create_by,
a.create_by_name,
a.create_time,
a.update_by,
a.update_by_name,
a.update_time,
a.del_flag,
a.register
from line_management a
</sql>
<sql id="selectLineManagementPo1">
<where>
<!-- ID查询 -->
<if test="id != null">
and a.id = #{id}
</if>
<!-- 组织相关查询 -->
<if test="organizationId != null">
and a.organization_id = #{organizationId}
</if>
<if test="topOrganizationId != null">
and a.top_organization_id = #{topOrganizationId}
</if>
<if test="organizationName != null and organizationName != ''">
and a.organization_name like concat('%', #{organizationName}, '%')
</if>
<!-- 仓库相关查询 -->
<if test="warehouseId != null">
and a.warehouse_id = #{warehouseId}
</if>
<if test="warehouseName != null and warehouseName != ''">
and a.warehouse_name like concat('%', #{warehouseName}, '%')
</if>
<!-- 线路管理字段查询 -->
<if test="routeCode != null and routeCode != ''">
and a.route_code like concat('%', #{routeCode}, '%')
</if>
<if test="routeName != null and routeName != ''">
and a.route_name like concat('%', #{routeName}, '%')
</if>
<if test="customerJson != null and customerJson != ''">
and a.customer_json like concat('%', #{customerJson}, '%')
</if>
<!-- 创建和更新相关条件 -->
<if test="createByName != null and createByName != ''">
and a.create_by_name like concat('%', #{createByName}, '%')
</if>
<if test="updateByName != null and updateByName != ''">
and a.update_by_name like concat('%', #{updateByName}, '%')
</if>
<!-- 删除标记 -->
<choose>
<when test="delFlag != null">
and a.del_flag = #{delFlag}
</when>
<otherwise>
and a.del_flag = 1
</otherwise>
</choose>
</where>
</sql>
<!-- 查询列表 -->
<select id="queryList" parameterType="com.mhd.wms.domain.lineManagement.repository.po.LineManagementPO" resultMap="LineManagementResult">
<include refid="selectLineManagementPo"/>
<include refid="selectLineManagementPo1"/>
ORDER BY a.create_time DESC
</select>
</mapper>