PDA任务转接只显示仓库绑定的用户,盘点详情显示物料批次属性
This commit is contained in:
+40
-35
@@ -38,111 +38,116 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="totalInventoryQuantity" column="total_inventory_quantity" />
|
||||
<result property="investigatedInventoryQuantity" column="investigated_inventory_quantity" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectInvestigationManagePo">
|
||||
select investigation_manage_id, organization_id, organization_name, top_organization_id, investigation_number, old_investigation_number,investigation_status, investigation_range, investigation_type, investigation_method, investigation_frequency, different_number, warehouse_id, warehouse_code, warehouse_name, audit_status, audit_remark, audit_by, audit_by_name, audit_time, task_distribution, task_distribution_time, operators_by, operators_name, nullify, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from investigation_manage
|
||||
select m.investigation_manage_id, m.organization_id, m.organization_name, m.top_organization_id, m.investigation_number, m.old_investigation_number, m.investigation_status, m.investigation_range, m.investigation_type, m.investigation_method, m.investigation_frequency, m.different_number, m.warehouse_id, m.warehouse_code, m.warehouse_name, m.audit_status, m.audit_remark, m.audit_by, m.audit_by_name, m.audit_time, m.task_distribution, m.task_distribution_time, m.operators_by, m.operators_name, m.nullify, m.remark, m.create_time, m.create_by, m.create_by_name, m.update_time, m.update_by, m.update_by_name, m.del_flag,
|
||||
(SELECT IFNULL(SUM(d.inventory_quantity), 0) FROM investigetion_manage_detail d WHERE d.investigation_number = m.investigation_number AND d.del_flag = 1) as total_inventory_quantity,
|
||||
(SELECT IFNULL(SUM(d.inventory_quantity), 0) FROM investigetion_manage_detail d WHERE d.investigation_number = m.investigation_number AND d.del_flag = 1 AND d.investigation_status = 4) as investigated_inventory_quantity
|
||||
from investigation_manage m
|
||||
</sql>
|
||||
|
||||
<sql id="selectInvestigationManagePo1">
|
||||
<where>
|
||||
and del_flag = 1
|
||||
and m.del_flag = 1
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
and m.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
and m.organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
and m.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="investigationNumber != null and investigationNumber != ''">
|
||||
and investigation_number like concat('%',#{investigationNumber},'%')
|
||||
and m.investigation_number like concat('%',#{investigationNumber},'%')
|
||||
</if><if test="oldInvestigationNumber != null and oldInvestigationNumber != ''">
|
||||
and old_investigation_number = concat('%',#{oldInvestigationNumber},'%')
|
||||
and m.old_investigation_number = concat('%',#{oldInvestigationNumber},'%')
|
||||
</if>
|
||||
<if test="investigationStatus != null ">
|
||||
and investigation_status = #{investigationStatus}
|
||||
and m.investigation_status = #{investigationStatus}
|
||||
</if>
|
||||
<if test="investigationRange != null and investigationRange != ''">
|
||||
and investigation_range = #{investigationRange}
|
||||
and m.investigation_range = #{investigationRange}
|
||||
</if>
|
||||
<if test="investigationType != null ">
|
||||
and investigation_type = #{investigationType}
|
||||
and m.investigation_type = #{investigationType}
|
||||
</if>
|
||||
<if test="investigationMethod != null ">
|
||||
and investigation_method = #{investigationMethod}
|
||||
and m.investigation_method = #{investigationMethod}
|
||||
</if>
|
||||
<if test="investigationFrequency != null ">
|
||||
and investigation_frequency = #{investigationFrequency}
|
||||
and m.investigation_frequency = #{investigationFrequency}
|
||||
</if>
|
||||
<if test="differentNumber != null and differentNumber != ''">
|
||||
and different_number = #{differentNumber}
|
||||
and m.different_number = #{differentNumber}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
and m.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
and m.warehouse_code = #{warehouseCode}
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
and m.warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
</if>
|
||||
<if test="auditStatus != null ">
|
||||
and audit_status = #{auditStatus}
|
||||
and m.audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="auditRemark != null and auditRemark != ''">
|
||||
and audit_remark = #{auditRemark}
|
||||
and m.audit_remark = #{auditRemark}
|
||||
</if>
|
||||
<if test="auditBy != null ">
|
||||
and audit_by = #{auditBy}
|
||||
and m.audit_by = #{auditBy}
|
||||
</if>
|
||||
<if test="auditByName != null and auditByName != ''">
|
||||
and audit_by_name like concat('%', #{auditByName}, '%')
|
||||
and m.audit_by_name like concat('%', #{auditByName}, '%')
|
||||
</if>
|
||||
<if test="auditTime != null ">
|
||||
and audit_time = #{auditTime}
|
||||
and m.audit_time = #{auditTime}
|
||||
</if>
|
||||
<if test="taskDistribution != null ">
|
||||
and task_distribution = #{taskDistribution}
|
||||
and m.task_distribution = #{taskDistribution}
|
||||
</if>
|
||||
<if test="taskDistributionTime != null ">
|
||||
and task_distribution_time = #{taskDistributionTime}
|
||||
and m.task_distribution_time = #{taskDistributionTime}
|
||||
</if>
|
||||
<if test="operatorsBy != null ">
|
||||
and operators_by = #{operatorsBy}
|
||||
and m.operators_by = #{operatorsBy}
|
||||
</if>
|
||||
<if test="operatorsName != null and operatorsName != ''">
|
||||
and operators_name like concat('%', #{operatorsName}, '%')
|
||||
and m.operators_name like concat('%', #{operatorsName}, '%')
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
and m.nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
and m.create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
and m.update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="createStartTime != null">
|
||||
and date_format(create_time,'%Y-%m-%d %H:%i:%s') <![CDATA[>=]]> #{createStartTime}
|
||||
and date_format(m.create_time,'%Y-%m-%d %H:%i:%s') <![CDATA[>=]]> #{createStartTime}
|
||||
</if>
|
||||
<if test="createEndTime != null">
|
||||
and date_format(create_time,'%Y-%m-%d %H:%i:%s') <![CDATA[<=]]> #{createEndTime}
|
||||
and date_format(m.create_time,'%Y-%m-%d %H:%i:%s') <![CDATA[<=]]> #{createEndTime}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%',#{remark},'%')
|
||||
and m.remark like concat('%',#{remark},'%')
|
||||
</if>
|
||||
<if test="investigationManageIds != null and investigationManageIds.size > 0 ">
|
||||
and investigation_manage_id in
|
||||
and m.investigation_manage_id in
|
||||
<foreach collection="investigationManageIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
<when test="delFlag != null"> and m.del_flag = #{delFlag} </when>
|
||||
<otherwise> and m.del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
@@ -150,6 +155,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="queryList" parameterType="com.mhd.wms.domain.investigationManage.repository.todo.InvestigationManageDO" resultMap="InvestigationManageResult">
|
||||
<include refid="selectInvestigationManagePo"/>
|
||||
<include refid="selectInvestigationManagePo1"/>
|
||||
order by create_time desc
|
||||
order by m.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user