- 删除了 IsSampleInventoryMapper.xml 中的 operatorId 和 lastUpdate 字段 - 移除了与这些字段相关的查询条件 - 优化了查询性能,减少了不必要的数据传输
67 lines
2.5 KiB
XML
67 lines
2.5 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.klp.mes.is.mapper.IsSampleInventoryMapper">
|
|
|
|
<resultMap type="com.klp.mes.is.domain.IsSampleInventory" id="IsSampleInventoryResult">
|
|
<result property="sampleId" column="sample_id"/>
|
|
<result property="commissionId" column="commission_id"/>
|
|
<result property="location" column="location"/>
|
|
<result property="currentQuantity" column="current_quantity"/>
|
|
<result property="storageTime" column="storage_time"/>
|
|
<result property="expirationDate" column="expiration_date"/>
|
|
<result property="status" column="status"/>
|
|
<result property="delFlag" column="del_flag"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="remark" column="remark"/>
|
|
</resultMap>
|
|
|
|
<select id="selectVoPagePlus" resultType="com.klp.mes.is.domain.vo.IsSampleInventoryVo">
|
|
SELECT
|
|
s.sample_id,
|
|
s.commission_id,
|
|
c.commission_no,
|
|
s.location,
|
|
s.current_quantity,
|
|
s.storage_time,
|
|
s.expiration_date,
|
|
s.status,
|
|
s.operator_id,
|
|
s.last_update,
|
|
s.del_flag,
|
|
s.create_time,
|
|
s.create_by,
|
|
s.update_time,
|
|
s.update_by,
|
|
s.remark
|
|
FROM is_sample_inventory s
|
|
LEFT JOIN is_inspection_commission c ON s.commission_id = c.commission_id AND c.del_flag = 0
|
|
<where>
|
|
s.del_flag = 0
|
|
<if test="bo.commissionId != null">
|
|
AND s.commission_id = #{bo.commissionId}
|
|
</if>
|
|
<if test="bo.location != null and bo.location != ''">
|
|
AND s.location = #{bo.location}
|
|
</if>
|
|
<if test="bo.currentQuantity != null">
|
|
AND s.current_quantity = #{bo.currentQuantity}
|
|
</if>
|
|
<if test="bo.storageTime != null">
|
|
AND s.storage_time = #{bo.storageTime}
|
|
</if>
|
|
<if test="bo.expirationDate != null">
|
|
AND s.expiration_date = #{bo.expirationDate}
|
|
</if>
|
|
<if test="bo.status != null and bo.status != ''">
|
|
AND s.status = #{bo.status}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
</mapper>
|