集成wms服务模块
This commit is contained in:
+134
@@ -0,0 +1,134 @@
|
||||
<?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.materialInventoryWarning.repository.mapper.MaterialInventoryWarningMapper">
|
||||
|
||||
<resultMap type="com.mhd.wms.domain.materialInventoryWarning.repository.po.MaterialInventoryWarningPO" id="MaterialInventoryWarningResult">
|
||||
<result property="materialInventoryWarningId" column="material_inventory_warning_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="materialBaseInfoId" column="material_base_info_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseCode" column="warehouse_code" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="storageSectionId" column="storage_section_id" />
|
||||
<result property="storageCode" column="storage_code" />
|
||||
<result property="storageName" column="storage_name" />
|
||||
<result property="storageLocationId" column="storage_location_id" />
|
||||
<result property="storageLocationCode" column="storage_location_code" />
|
||||
<result property="storageLocationName" column="storage_location_name" />
|
||||
<result property="minTemperature" column="min_temperature" />
|
||||
<result property="maxTemperature" column="max_temperature" />
|
||||
<result property="packId" column="pack_id" />
|
||||
<result property="packCode" column="pack_code" />
|
||||
<result property="packName" column="pack_name" />
|
||||
<result property="remark" column="remark" />
|
||||
<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="selectMaterialInventoryWarningPo">
|
||||
select material_inventory_warning_id, organization_id, organization_name, top_organization_id, material_base_info_id, warehouse_id, warehouse_code, warehouse_name, storage_section_id, storage_code, storage_name, storage_location_id, storage_location_code, storage_location_name, min_temperature, max_temperature, pack_id, pack_code, pack_name, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from material_inventory_warning
|
||||
</sql>
|
||||
|
||||
<sql id="selectMaterialInventoryWarningPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="materialBaseInfoId != null ">
|
||||
and material_base_info_id = #{materialBaseInfoId}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
</if>
|
||||
<if test="storageSectionId != null ">
|
||||
and storage_section_id = #{storageSectionId}
|
||||
</if>
|
||||
<if test="storageCode != null and storageCode != ''">
|
||||
and storage_code = #{storageCode}
|
||||
</if>
|
||||
<if test="storageName != null and storageName != ''">
|
||||
and storage_name like concat('%', #{storageName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationId != null ">
|
||||
and storage_location_id = #{storageLocationId}
|
||||
</if>
|
||||
<if test="storageLocationCode != null and storageLocationCode != ''">
|
||||
and storage_location_code = #{storageLocationCode}
|
||||
</if>
|
||||
<if test="storageLocationName != null and storageLocationName != ''">
|
||||
and storage_location_name like concat('%', #{storageLocationName}, '%')
|
||||
</if>
|
||||
<if test="minTemperature != null ">
|
||||
and min_temperature = #{minTemperature}
|
||||
</if>
|
||||
<if test="maxTemperature != null ">
|
||||
and max_temperature = #{maxTemperature}
|
||||
</if>
|
||||
<if test="packId != null ">
|
||||
and pack_id = #{packId}
|
||||
</if>
|
||||
<if test="packCode != null and packCode != ''">
|
||||
and pack_code = #{packCode}
|
||||
</if>
|
||||
<if test="packName != null and packName != ''">
|
||||
and pack_name like concat('%', #{packName}, '%')
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.wms.domain.materialInventoryWarning.repository.todo.MaterialInventoryWarningDO" resultMap="MaterialInventoryWarningResult">
|
||||
<include refid="selectMaterialInventoryWarningPo"/>
|
||||
<include refid="selectMaterialInventoryWarningPo1"/>
|
||||
</select>
|
||||
|
||||
<select id="queryAllList" resultMap="MaterialInventoryWarningResult">
|
||||
<!--这里使用join,物料删除后也不会产生对应的预警信息-->
|
||||
SELECT
|
||||
a.material_inventory_warning_id,
|
||||
a.material_base_info_id,
|
||||
a.warehouse_id,
|
||||
a.storage_section_id,
|
||||
a.storage_location_id,
|
||||
a.min_temperature,
|
||||
a.max_temperature,
|
||||
a.pack_detail_id,
|
||||
a.unit_code,
|
||||
a.`name`,
|
||||
a.top_organization_id,
|
||||
b.shipper_id
|
||||
FROM
|
||||
material_inventory_warning a
|
||||
JOIN material_base_info b ON a.material_base_info_id = b.material_base_info_id
|
||||
AND b.del_flag = 1
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user