| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.ruoyi.basic.dto.StructureTestObjectPartDto; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.ProductPartMapper; |
| | |
| | | if (structureTestObjectPart.getTestObjectId() == null) { |
| | | throw new BaseException("缺少产品对象id"); |
| | | } |
| | | structureTestObjectPart.setReview("待复核"); |
| | | baseMapper.insert(structureTestObjectPart); |
| | | } |
| | | |
| | |
| | | if (structureTestObjectPart.getTestObjectId() == null) { |
| | | throw new BaseException("缺少产品对象id"); |
| | | } |
| | | structureTestObjectPart.setReview("待复核"); |
| | | baseMapper.updateById(structureTestObjectPart); |
| | | } |
| | | |
| | | @Override |
| | | public int testObjectPartReview(StructureTestObjectPartDto structureTestObjectPartDto) { |
| | | StructureTestObjectPart structureTestObjectPart = baseMapper.selectById(structureTestObjectPartDto.getId()); |
| | | this.isPartNoExist(structureTestObjectPart.getPartNo(), structureTestObjectPart.getId()); |
| | | if (structureTestObjectPart.getTestObjectId() == null) { |
| | | throw new BaseException("缺少产品对象id"); |
| | | } |
| | | structureTestObjectPart.setReview("待复核"); |
| | | return baseMapper.updateById(structureTestObjectPart); |
| | | } |
| | | |
| | | // 判断零件号是否存在 |
| | | public void isPartNoExist(String partNo, Integer id) { |
| | | // 零件号唯一 但不必填 |