增加限制

This commit is contained in:
刘名喜 2024-12-17 10:15:19 +08:00
parent 2e81d77dee
commit 2e2ff79029

View File

@ -82,7 +82,7 @@
BK.SAFE_STOCK,
BK.STANDARD_QUANTITY,
BK.AREA_CODE,
WSA.AREA_NAME AREA_NAME,
WSA.AREA_NAME AREA_NAME,
BK.KNIFE_LIFE,
BK.KNIFE_FINE_STATE,
BK.IS_LOCKED,
@ -192,21 +192,21 @@
order by create_time desc
</select>
<!-- IS_VALID = 1 出粗则添加该指令 -->
<select id="selectBaseKnifeNotValidList" parameterType="BaseKnife" resultMap="BaseKnifeResult">
<include refid="selectBaseKnifeVo"/>
<where>
<if test="rfid != null and rfid != ''">
and RFID = #{rfid}
</if>
<if test="mbbBdMrlId != null and mbbBdMrlId != ''">
and MBB_BD_MRL_ID = #{mbbBdMrlId}
</if>
<if test="zdTaskId != null and zdTaskId != ''">
and BK.zd_task_id = #{zdTaskId}
</if>
</where>
</select>
<!-- IS_VALID = 1 出粗则添加该指令 -->
<select id="selectBaseKnifeNotValidList" parameterType="BaseKnife" resultMap="BaseKnifeResult">
<include refid="selectBaseKnifeVo"/>
<where>
<if test="rfid != null and rfid != ''">
and RFID = #{rfid}
</if>
<if test="mbbBdMrlId != null and mbbBdMrlId != ''">
and MBB_BD_MRL_ID = #{mbbBdMrlId}
</if>
<if test="zdTaskId != null and zdTaskId != ''">
and BK.zd_task_id = #{zdTaskId}
</if>
</where>
</select>
<select id="selectBaseKnifeByBaseKnifeId" parameterType="Long" resultMap="BaseKnifeResult">
<include refid="selectBaseKnifeVo"/>
@ -525,15 +525,15 @@
<insert id="batchMdItem">
insert into MD_ITEM(ITEM_ID, ITEM_CODE, ITEM_NAME, SPECIFICATION, UNIT_OF_MEASURE, ITEM_OR_PRODUCT,
ITEM_TYPE_ID, ITEM_TYPE_CODE, ITEM_TYPE_NAME, ENABLE_FLAG, SAFE_STOCK_FLAG, MIN_STOCK,
MAX_STOCK, REMARK, ATTR1, ATTR2, ATTR3, ATTR4, CREATE_BY, CREATE_TIME, UPDATE_BY,
UPDATE_TIME, HIGH_VALUE, UNIT_NAME, MODEL_NUMBER, STANDARD_NUMBER) values
ITEM_TYPE_ID, ITEM_TYPE_CODE, ITEM_TYPE_NAME, ENABLE_FLAG, SAFE_STOCK_FLAG, MIN_STOCK,
MAX_STOCK, REMARK, ATTR1, ATTR2, ATTR3, ATTR4, CREATE_BY, CREATE_TIME, UPDATE_BY,
UPDATE_TIME, HIGH_VALUE, UNIT_NAME, MODEL_NUMBER, STANDARD_NUMBER) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.itemId}, #{item.itemCode}, #{item.itemName}, #{item.specification}, #{item.unitOfMeasure},
#{item.itemOrProduct}, #{item.itemTypeId}, #{item.itemTypeCode}, #{item.itemTypeName}, #{item.enableFlag},
#{item.safeStockFlag}, #{item.minStock}, #{item.maxStock}, #{item.remark}, #{item.attr1}, #{item.attr2},
#{item.attr3}, #{item.attr4}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime},
#{item.highValue}, #{item.unitName}, #{item.modelNumber}, #{item.standardNumber})
#{item.itemOrProduct}, #{item.itemTypeId}, #{item.itemTypeCode}, #{item.itemTypeName}, #{item.enableFlag},
#{item.safeStockFlag}, #{item.minStock}, #{item.maxStock}, #{item.remark}, #{item.attr1}, #{item.attr2},
#{item.attr3}, #{item.attr4}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime},
#{item.highValue}, #{item.unitName}, #{item.modelNumber}, #{item.standardNumber})
</foreach>
</insert>
@ -592,7 +592,7 @@
FROM BASE_KNIFE BK
WHERE MBB_BD_MRL_ID = #{mbbBdMrlId}
AND (KNIFE_FINE_STATE = 0 OR KNIFE_FINE_STATE = 1)
AND IS_VALID = 0
AND IS_VALID = 0
</select>
<select id="selectScrapList" resultMap="BaseKnifeResult">
@ -616,6 +616,7 @@
<select id="selectAreaCodeList" resultType="java.lang.String">
SELECT AREA_CODE
FROM BASE_KNIFE
WHERE KNIFE_FINE_STATE == 1
GROUP BY AREA_CODE
</select>
</mapper>