feat(台账): 查询rfid是否唯一

This commit is contained in:
LJW 2024-11-15 14:04:18 +08:00
parent f82a1fb830
commit bb93abcee8
5 changed files with 41 additions and 0 deletions

View File

@ -877,6 +877,15 @@ public class BaseKnifeController extends BaseController {
return AjaxResult.success(baseKnifeService.selectBaseKnifeByBaseKnifeId(baseKnifeId));
}
/**
* 查询台账RFID是否重复
*/
@PreAuthorize("@ss.hasPermi('md:baseKnife:query')")
@GetMapping(value = "/isDuplicateRfid/{rfid}")
public AjaxResult isDuplicateRfid(@PathVariable("rfid") String rfid) {
return AjaxResult.success(baseKnifeService.isDuplicateRfid(rfid));
}
/**
* 新增工具台账
*/

View File

@ -2,6 +2,7 @@ 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;
@ -103,5 +104,13 @@ public interface BaseKnifeMapper {
long countBaseKnife(@Param("mbbBdMrlId") Long mbbBdMrlId);
/**
* 查询台账RFID是否重复
*
* @param rfid 物料产品列表
* @return 结果
*/
public Boolean isDuplicateRfid(String rfid);
List<BaseKnife> selectBaseKnifeNotValidList(BaseKnife baseKnifeWrapper);
}

View File

@ -60,4 +60,12 @@ public interface IBaseKnifeService
public int deleteBaseKnifeByBaseKnifeId(Long baseKnifeId);
public int resetBaseKnifeByBaseKnifeId(Long baseKnifeId);
/**
* 查询台账RFID是否重复
*
* @param rfid rfid
* @return 结果
*/
public Boolean isDuplicateRfid(String rfid);
}

View File

@ -182,4 +182,13 @@ public class BaseKnifeServiceImpl implements IBaseKnifeService {
return baseKnifeMapper.resetBaseKnife(baseKnifeId);
}
/**
* 查询台账RFID是否重复
*
* @param rfid rfid
* @return 结果
*/
public Boolean isDuplicateRfid(String rfid){
return baseKnifeMapper.isDuplicateRfid(rfid);
}
}

View File

@ -636,4 +636,10 @@
and (KNIFE_FINE_STATE = 0 OR KNIFE_FINE_STATE = 1)
</where>
</select>
<select id="isDuplicateRfid" parameterType="String" resultType="boolean">
SELECT COUNT(1)
FROM BASE_KNIFE
WHERE RFID = #{value}
</select>
</mapper>