229 lines
12 KiB
XML
229 lines
12 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.investigetionManageDetail.repository.mapper.InvestigetionManageDetailMapper">
|
|
|
|
<resultMap type="com.mhd.wms.domain.investigetionManageDetail.repository.po.InvestigetionManageDetailPO" id="InvestigetionManageDetailResult">
|
|
<result property="investigationManageDetailId" column="investigation_manage_detail_id" />
|
|
<result property="organizationId" column="organization_id" />
|
|
<result property="organizationName" column="organization_name" />
|
|
<result property="topOrganizationId" column="top_organization_id" />
|
|
<result property="investigationNumber" column="investigation_number" />
|
|
<result property="investigationStatus" column="investigation_status" />
|
|
<result property="investigationRange" column="investigation_range" />
|
|
<result property="investigationType" column="investigation_type" />
|
|
<result property="investigationMethod" column="investigation_method" />
|
|
<result property="investigationFrequency" column="investigation_frequency" />
|
|
<result property="differentNumber" column="different_number" />
|
|
<result property="investigationQuantity" column="investigation_quantity" />
|
|
<result property="differentQuantity" column="different_quantity" />
|
|
<result property="investigationResult" column="investigation_result" />
|
|
<result property="materialBaseInfoId" column="material_base_info_id" />
|
|
<result property="materialInventoryId" column="material_inventory_id" />
|
|
<result property="materialCode" column="material_code" />
|
|
<result property="materialName" column="material_name" />
|
|
<result property="barCode" column="bar_code" />
|
|
<result property="inventoryQuantity" column="inventory_quantity" />
|
|
<result property="quantity" column="quantity" />
|
|
<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="packId" column="pack_id" />
|
|
<result property="packCode" column="pack_code" />
|
|
<result property="packName" column="pack_name" />
|
|
<result property="packDetailId" column="pack_detail_id" />
|
|
<result property="unitCode" column="unit_code" />
|
|
<result property="unitName" column="unit_name" />
|
|
<result property="unitNumber" column="unit_number" />
|
|
<result property="materialWarehouseControlId" column="material_warehouse_control_id" />
|
|
<result property="serialNumberManage" column="serial_number_manage" />
|
|
<result property="containerId" column="container_id" />
|
|
<result property="containerCode" column="container_code" />
|
|
<result property="containerType" column="container_type" />
|
|
<result property="containerTypeName" column="container_type_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" />
|
|
<result property="materialStatusCode" column="material_status_code" />
|
|
<result property="materialStatusName" column="material_status_name" />
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectInvestigetionManageDetailPo">
|
|
select investigation_manage_detail_id, organization_id, organization_name, top_organization_id, investigation_number, investigation_status, investigation_range, investigation_type, investigation_method, investigation_frequency, different_number, investigation_quantity, different_quantity, material_inventory_id,investigation_result, material_base_info_id, material_code, material_name, bar_code, inventory_quantity, quantity, warehouse_id, warehouse_code, warehouse_name, storage_section_id, storage_code, storage_name, storage_location_id, storage_location_code, storage_location_name, pack_id, pack_code, pack_name, pack_detail_id, unit_code, unit_name, unit_number, material_warehouse_control_id, serial_number_manage, container_id, container_code, container_type, container_type_name, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag,
|
|
material_status_code , material_status_name from investigetion_manage_detail
|
|
</sql>
|
|
|
|
<sql id="selectInvestigetionManageDetailPo1">
|
|
<where>
|
|
and del_flag = 1
|
|
<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="investigationNumber != null and investigationNumber != ''">
|
|
and investigation_number = #{investigationNumber}
|
|
</if>
|
|
<if test="investigationStatus != null ">
|
|
and investigation_status = #{investigationStatus}
|
|
</if>
|
|
<if test="investigationRange != null and investigationRange != ''">
|
|
and investigation_range = #{investigationRange}
|
|
</if>
|
|
<if test="investigationType != null ">
|
|
and investigation_type = #{investigationType}
|
|
</if>
|
|
<if test="investigationMethod != null ">
|
|
and investigation_method = #{investigationMethod}
|
|
</if>
|
|
<if test="investigationFrequency != null ">
|
|
and investigation_frequency = #{investigationFrequency}
|
|
</if>
|
|
<if test="differentNumber != null and differentNumber != ''">
|
|
and different_number = #{differentNumber}
|
|
</if>
|
|
<if test="investigationQuantity != null ">
|
|
and investigation_quantity = #{investigationQuantity}
|
|
</if>
|
|
<if test="differentQuantity != null ">
|
|
and different_quantity = #{differentQuantity}
|
|
</if>
|
|
<if test="investigationResult != null ">
|
|
and investigation_result = #{investigationResult}
|
|
</if>
|
|
<if test="materialBaseInfoId != null ">
|
|
and material_base_info_id = #{materialBaseInfoId}
|
|
</if>
|
|
<if test="materialCode != null and materialCode != ''">
|
|
and material_code = #{materialCode}
|
|
</if>
|
|
<if test="materialName != null and materialName != ''">
|
|
and material_name like concat('%', #{materialName}, '%')
|
|
</if>
|
|
<if test="barCode != null and barCode != ''">
|
|
and bar_code = #{barCode}
|
|
</if>
|
|
<if test="inventoryQuantity != null ">
|
|
and inventory_quantity = #{inventoryQuantity}
|
|
</if>
|
|
<if test="quantity != null ">
|
|
and quantity = #{quantity}
|
|
</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="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="packDetailId != null ">
|
|
and pack_detail_id = #{packDetailId}
|
|
</if>
|
|
<if test="unitCode != null and unitCode != ''">
|
|
and unit_code = #{unitCode}
|
|
</if>
|
|
<if test="unitName != null and unitName != ''">
|
|
and unit_name like concat('%', #{unitName}, '%')
|
|
</if>
|
|
<if test="unitNumber != null ">
|
|
and unit_number = #{unitNumber}
|
|
</if>
|
|
<if test="materialWarehouseControlId != null ">
|
|
and material_warehouse_control_id = #{materialWarehouseControlId}
|
|
</if>
|
|
<if test="serialNumberManage != null ">
|
|
and serial_number_manage = #{serialNumberManage}
|
|
</if>
|
|
<if test="containerId != null ">
|
|
and container_id = #{containerId}
|
|
</if>
|
|
<if test="containerCode != null and containerCode != ''">
|
|
and container_code = #{containerCode}
|
|
</if>
|
|
<if test="containerType != null and containerType != ''">
|
|
and container_type = #{containerType}
|
|
</if>
|
|
<if test="containerTypeName != null and containerTypeName != ''">
|
|
and container_type_name like concat('%', #{containerTypeName}, '%')
|
|
</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>
|
|
<if test="remark != null and remark != ''">
|
|
and remark like concat('%',#{remark},'%')
|
|
</if>
|
|
<if test="materialStatusCode != null and materialStatusCode != ''">
|
|
and material_status_code = #{materialStatusCode}
|
|
</if>
|
|
<if test="materialStatusName != null and materialStatusName != ''">
|
|
and material_status_name like concat('%', #{materialStatusName}, '%')
|
|
</if>
|
|
<choose>
|
|
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
|
<otherwise> and del_flag = 1 </otherwise>
|
|
</choose>
|
|
</where>
|
|
</sql>
|
|
<update id="updateCheck">
|
|
update investigation_manage set investigation_status = 2,audit_status = #{auditStatus}
|
|
where investigation_number = #{investigationNumber}
|
|
</update>
|
|
<update id="updateCheckDetail">
|
|
update investigetion_manage_detail set investigation_status = 2
|
|
where investigation_number = #{investigationNumber}
|
|
</update>
|
|
|
|
<select id="queryList" parameterType="com.mhd.wms.domain.investigetionManageDetail.repository.todo.InvestigetionManageDetailDO" resultMap="InvestigetionManageDetailResult">
|
|
<include refid="selectInvestigetionManageDetailPo"/>
|
|
<include refid="selectInvestigetionManageDetailPo1"/>
|
|
</select>
|
|
</mapper> |