集成wms服务模块

This commit is contained in:
hjx
2026-01-19 18:55:23 +08:00
parent aab59723f9
commit 1655d57057
835 changed files with 96160 additions and 0 deletions
@@ -0,0 +1,224 @@
<?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.qualityInspection.repository.mapper.QualityInspectionMapper">
<resultMap type="com.mhd.wms.domain.qualityInspection.repository.po.QualityInspectionPO" id="QualityInspectionResult">
<result property="qualityInspectionId" column="quality_inspection_id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="topOrganizationId" column="top_organization_id" />
<result property="qualityInspectionNumber" column="quality_inspection_number" />
<result property="inOrderNumber" column="in_order_number" />
<result property="materialDetailId" column="material_detail_id" />
<result property="inspectionQuantity" column="inspection_quantity" />
<result property="abnormalQuantity" column="abnormal_quantity" />
<result property="qualityInspectionResults" column="quality_inspection_results" />
<result property="abnormalReason" column="abnormal_reason" />
<result property="qualityInspectionBy" column="quality_inspection_by" />
<result property="qualityInspectionName" column="quality_inspection_name" />
<result property="qualityInspectionTime" column="quality_inspection_time" />
<result property="qualityInspectionUrl" column="quality_inspection_url" />
<result property="handleStatus" column="handle_status" />
<result property="handleOpinion" column="handle_opinion" />
<result property="handleBy" column="handle_by" />
<result property="handleByName" column="handle_by_name" />
<result property="handleTime" column="handle_time" />
<result property="materialStatusCode" column="material_status_code" />
<result property="materialStatusName" column="material_status_name" />
<result property="abnormalMaterialStatusCode" column="abnormal_material_status_code" />
<result property="abnormalMaterialStatusName" column="abnormal_material_status_name" />
<result property="warehousing" column="warehousing" />
<result property="abnormalHandleUrl" column="abnormal_handle_url" />
<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="selectQualityInspectionPo">
a.quality_inspection_id, a.organization_id, a.organization_name, a.top_organization_id, a.quality_inspection_number, a.in_order_number, a.material_detail_id,
a.inspection_quantity, a.abnormal_quantity, a.quality_inspection_results, a.abnormal_reason, a.quality_inspection_by, a.quality_inspection_name,
a.quality_inspection_time, a.quality_inspection_url, a.handle_status, a.handle_opinion, a.handle_by, a.handle_by_name, a.handle_time, a.material_status_code,
a.material_status_name, a.abnormal_material_status_code, a.abnormal_material_status_name, a.warehousing, a.abnormal_handle_url, a.remark, a.create_time,
a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag
</sql>
<sql id="selectQualityInspectionPo1">
<if test="organizationId != null ">
and a.organization_id = #{organizationId}
</if>
<if test="organizationName != null and organizationName != ''">
and a.organization_name like concat('%', #{organizationName}, '%')
</if>
<if test="topOrganizationId != null ">
and a.top_organization_id = #{topOrganizationId}
</if>
<if test="qualityInspectionNumber != null and qualityInspectionNumber != ''">
and a.quality_inspection_number = #{qualityInspectionNumber}
</if>
<if test="materialDetailId != null ">
and a.material_detail_id = #{materialDetailId}
</if>
<if test="inspectionQuantity != null ">
and a.inspection_quantity = #{inspectionQuantity}
</if>
<if test="abnormalQuantity != null ">
and a.abnormal_quantity = #{abnormalQuantity}
</if>
<if test="qualityInspectionResults != null ">
and a.quality_inspection_results = #{qualityInspectionResults}
</if>
<if test="abnormalReason != null and abnormalReason != ''">
and a.abnormal_reason = #{abnormalReason}
</if>
<if test="qualityInspectionBy != null ">
and a.quality_inspection_by = #{qualityInspectionBy}
</if>
<if test="qualityInspectionName != null and qualityInspectionName != ''">
and a.quality_inspection_name like concat('%', #{qualityInspectionName}, '%')
</if>
<if test="qualityInspectionTime != null ">
and a.quality_inspection_time = #{qualityInspectionTime}
</if>
<if test="qualityInspectionUrl != null and qualityInspectionUrl != ''">
and a.quality_inspection_url = #{qualityInspectionUrl}
</if>
<if test="handleStatus != null ">
and a.handle_status = #{handleStatus}
</if>
<if test="handleOpinion != null and handleOpinion != ''">
and a.handle_opinion = #{handleOpinion}
</if>
<if test="handleBy != null ">
and a.handle_by = #{handleBy}
</if>
<if test="handleByName != null and handleByName != ''">
and a.handle_by_name like concat('%', #{handleByName}, '%')
</if>
<if test="handleTime != null ">
and a.handle_time = #{handleTime}
</if>
<if test="materialStatusCode != null and materialStatusCode != ''">
and a.material_status_code = #{materialStatusCode}
</if>
<if test="materialStatusName != null and materialStatusName != ''">
and a.material_status_name like concat('%', #{materialStatusName}, '%')
</if>
<if test="abnormalMaterialStatusCode != null and abnormalMaterialStatusCode != ''">
and a.abnormal_material_status_code = #{abnormalMaterialStatusCode}
</if>
<if test="abnormalMaterialStatusName != null and abnormalMaterialStatusName != ''">
and a.abnormal_material_status_name like concat('%', #{abnormalMaterialStatusName}, '%')
</if>
<if test="warehousing != null ">
and a.warehousing = #{warehousing}
</if>
<if test="abnormalHandleUrl != null and abnormalHandleUrl != ''">
and a.abnormal_handle_url = #{abnormalHandleUrl}
</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>
</sql>
<sql id="joinStockInOrderPo">
,b.in_order_number, b.warehouse_id, b.warehouse_code, b.warehouse_name, b.shipper_id, b.shipper_name
</sql>
<sql id="joinStockInOrderPoWhere">
<if test="inOrderNumber != null and inOrderNumber != ''">
and b.in_order_number = #{inOrderNumber}
</if>
<if test="warehouseId != null ">
and b.warehouse_id = #{warehouseId}
</if>
<if test="warehouseCode != null and warehouseCode != ''">
and b.warehouse_code = #{warehouseCode}
</if>
<if test="warehouseName != null and warehouseName != ''">
and b.warehouse_name like concat('%', #{warehouseName}, '%')
</if>
<if test="shipperId != null ">
and b.shipper_id = #{shipperId}
</if>
<if test="shipperName != null and shipperName != ''">
and b.shipper_name like concat('%', #{shipperName}, '%')
</if>
</sql>
<sql id="joinMaterialDetailPo">
, c.material_base_info_id, c.material_code, c.material_name, c.quantity, c.receipt_quantity, c.quality_inspection_manage,
c.quality_inspection_stage, c.quality_inspection_rule, c.quality_inspection_ratio, c.quality_inspection_term
</sql>
<sql id="joinSelectMaterialDetailPoWhere">
<if test="orderNumber != null and orderNumber != '' ">
and c.order_number = #{orderNumber}
</if>
<if test="materialBaseInfoId != null ">
and c.material_base_info_id = #{materialBaseInfoId}
</if>
<if test="materialCode != null and materialCode != ''">
and c.material_code = #{materialCode}
</if>
<if test="materialName != null and materialName != ''">
and c.material_name like concat('%', #{materialName}, '%')
</if>
<if test="quantity != null ">
and c.quantity = #{quantity}
</if>
<if test="receiptQuantity != null ">
and c.receipt_quantity = #{receiptQuantity}
</if>
<if test="shelvesQuantity != null ">
and c.shelves_quantity = #{shelvesQuantity}
</if>
<if test="qualityInspectionManage != null ">
and c.quality_inspection_manage = #{qualityInspectionManage}
</if>
<if test="qualityInspectionStage != null ">
and c.quality_inspection_stage = #{qualityInspectionStage}
</if>
<if test="qualityInspectionRule != null ">
and c.quality_inspection_rule = #{qualityInspectionRule}
</if>
<if test="qualityInspectionTerm != null ">
and c.quality_inspection_term = #{qualityInspectionTerm}
</if>
<if test="qualityInspectionRatio != null ">
and c.quality_inspection_ratio = #{qualityInspectionRatio}
</if>
<if test="qualityInspectionResults != null ">
and c.quality_inspection_results = #{qualityInspectionResults}
</if>
</sql>
<select id="queryList" parameterType="com.mhd.wms.domain.qualityInspection.repository.todo.QualityInspectionDO" resultMap="QualityInspectionResult">
select
<include refid="selectQualityInspectionPo"/>
<include refid="joinStockInOrderPo"/>
<include refid="joinMaterialDetailPo"/>
from quality_inspection a
LEFT JOIN stock_in_order b ON a.in_order_number = b.in_order_number
LEFT JOIN receipt_material_detail c ON a.material_detail_id = c.material_detail_id
<where>
<include refid="selectQualityInspectionPo1"/>
<include refid="joinStockInOrderPoWhere"/>
<include refid="joinStockInOrderPoWhere"/>
</where>
</select>
</mapper>