| | |
| | | |
| | | //填写标准值与内控值,鼠标移开保存 |
| | | @Override |
| | | public Integer write(Integer id, String required, String internal) { |
| | | public String write(Integer id, String required, String internal) { |
| | | //校验标准值,内控值格式 |
| | | char inter = internal.charAt(0); |
| | | char requ = required.charAt(0); |
| | | if (inter != '>' && inter != '<' && inter != '=') { |
| | | return "内控值输入格式有问题!"; |
| | | } |
| | | if (requ != '>' && requ != '<' && requ != '=') { |
| | | return "标准值输入格式有问题!"; |
| | | } |
| | | |
| | | Product product = new Product(); |
| | | product.setId(id); |
| | | product.setRequired(required); |
| | | product.setInternal(internal); |
| | | return productMapper.updateById(product); |
| | | } |
| | | |
| | | //添加同一个型号技术指标的版本 |
| | | @Override |
| | | public Integer addVersion(Integer specificationsId,Integer version) { |
| | | List<Product> productList = productMapper.selAllBySpeId(specificationsId,version); |
| | | for (Product product : productList) { |
| | | product.setId(null); |
| | | //最新版本+1 |
| | | product.setVersion(productMapper.selectVerByPro(specificationsId).get(0)+1); |
| | | } |
| | | saveBatch(productList); |
| | | return productList.get(0).getVersion(); |
| | | productMapper.updateById(product); |
| | | return "保存成功!"; |
| | | } |
| | | |
| | | //删除 |
| | |
| | | |
| | | //查询标准BOM技术指标中该型号工艺下最新版本的检验项目 |
| | | @Override |
| | | public List<Product> selProByVerSpe(Integer technologyId, Integer ver) { |
| | | return productMapper.selProByVerSpe(technologyId,ver); |
| | | public List<Product> selProByVerSpe(Integer technologyId) { |
| | | return productMapper.selProByVerSpe(technologyId); |
| | | } |
| | | } |
| | | |