Merge remote-tracking branch 'origin/master'

This commit is contained in:
LJW 2024-11-15 17:05:34 +08:00
commit c4b20c8af8
2 changed files with 61 additions and 1 deletions

View File

@ -2,7 +2,6 @@ package com.ktg.mes.md.mapper;
import com.ktg.mes.md.domain.BaseKnife;
import com.ktg.mes.md.domain.MdItem;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -22,6 +21,8 @@ public interface BaseKnifeMapper {
*/
BaseKnife selectBaseKnifeByBaseKnifeId(Long baseKnifeId);
BaseKnife selectBaseKnifeByRfid(@Param("rfId") String rfId);
/**
* 查询工具台账列表
*

View File

@ -264,6 +264,65 @@
where a.BASE_KNIFE_ID = #{baseKnifeId}
</select>
<select id="selectBaseKnifeByRfid" parameterType="Long" resultMap="BaseKnifeMdItemResult">
select a.BASE_KNIFE_ID
, a.MBB_BD_MRL_ID
, a.RFID
, a.KNIFE_CODE
, a.KNIFE_NAME
, a.KNIFE_UNIT
, a.KNIFE_TYPE
, a.SAFE_STOCK
, a.STANDARD_QUANTITY
, a.AREA_CODE
, a.KNIFE_LIFE
, a.KNIFE_FINE_STATE
, a.RESET_COUNT
, a.ITEM_OR_PRODUCT
, a.PLAN_SHEET
, a.REMARK
, a.ATTR1
, a.ATTR2
, a.ATTR3
, a.ATTR4
, a.CREATE_BY
, a.CREATE_TIME
, a.UPDATE_BY
, a.UPDATE_TIME
, a.IS_LOCKED
, a.LOCKED_START_TIME
, a.LOCKED_END_TIME
, b.ITEM_ID as sub_ITEM_ID
, b.ITEM_CODE as sub_ITEM_CODE
, b.ITEM_NAME as sub_ITEM_NAME
, b.SPECIFICATION as sub_SPECIFICATION
, b.UNIT_OF_MEASURE as sub_UNIT_OF_MEASURE
, b.ITEM_OR_PRODUCT as sub_ITEM_OR_PRODUCT
, b.ITEM_TYPE_ID as sub_ITEM_TYPE_ID
, b.ITEM_TYPE_CODE as sub_ITEM_TYPE_CODE
, b.ITEM_TYPE_NAME as sub_ITEM_TYPE_NAME
, b.ENABLE_FLAG as sub_ENABLE_FLAG
, b.SAFE_STOCK_FLAG as sub_SAFE_STOCK_FLAG
, b.MIN_STOCK as sub_MIN_STOCK
, b.MAX_STOCK as sub_MAX_STOCK
, b.REMARK as sub_REMARK
, b.ATTR1 as sub_ATTR1
, b.ATTR2 as sub_ATTR2
, b.ATTR3 as sub_ATTR3
, b.ATTR4 as sub_ATTR4
, b.CREATE_BY as sub_CREATE_BY
, b.CREATE_TIME as sub_CREATE_TIME
, b.UPDATE_BY as sub_UPDATE_BY
, b.UPDATE_TIME as sub_UPDATE_TIME
, b.HIGH_VALUE as sub_HIGH_VALUE
, b.UNIT_NAME as sub_UNIT_NAME
, b.MODEL_NUMBER as sub_MODEL_NUMBER
, b.STANDARD_NUMBER as sub_STANDARD_NUMBER
from BASE_KNIFE a
left join MD_ITEM b on b.ITEM_ID = a.BASE_KNIFE_ID
where a.RFID = #{rfId} limit 1
</select>
<insert id="insertBaseKnife" parameterType="BaseKnife" useGeneratedKeys="true" keyProperty="baseKnifeId">
insert into BASE_KNIFE
<trim prefix="(" suffix=")" suffixOverrides=",">