| | |
| | | public Response getCompareProduct(){ |
| | | return service.getCompareProduct(); |
| | | } |
| | | |
| | | @ApiOperation(value = "验证母料编码是否存在产品中") |
| | | @GetMapping("judgeParentCode") |
| | | public Response judgeParentCode(@RequestParam String parentCode){ |
| | | return service.judgeParentCode(parentCode); |
| | | } |
| | | } |
| | |
| | | import com.whyc.pojo.AttachLock; |
| | | import com.whyc.pojo.Material; |
| | | import com.whyc.pojo.Product; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | List<AttachLock> selectListProduct(int productId); |
| | | //查询产品是否存在物料时钣金件的产品 |
| | | List<Material> selectMaterial_0120(String parentCode, String customCode); |
| | | //验证母料编码是否存在产品中 |
| | | int judgeParentCode(@Param("parentCode") String parentCode); |
| | | } |
| | |
| | | Map<Object, Boolean> seen = new ConcurrentHashMap<>(); |
| | | return object -> seen.putIfAbsent(keyExtractor.apply(object), Boolean.TRUE) == null; |
| | | } |
| | | |
| | | //验证母料编码是否存在产品中 |
| | | public Response judgeParentCode(String parentCode) { |
| | | int count = mapper.judgeParentCode(parentCode); |
| | | return new Response().set(1,count>0,"验证母料编码是否存在产品中"); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="judgeParentCode" resultType="java.lang.Integer"> |
| | | select count(*) from tb_product where parent_code like '%${parentCode}%' |
| | | </select> |
| | | </mapper> |