| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.dto.PageTestObjectDto; |
| | | import com.ruoyi.basic.dto.TestItemDto; |
| | | import com.ruoyi.basic.mapper.*; |
| | | import com.ruoyi.basic.pojo.*; |
| | | import com.ruoyi.basic.service.CapacityScopeService; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StructureItemParameterService; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | private StructureTestObjectMapper structureTestObjectMapper; |
| | | |
| | | private ProductMapper productMapper; |
| | | |
| | | private StructureTestObjectPartMapper structureTestObjectPartMapper; |
| | | |
| | | private ProductPartMapper productPartMapper; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | |
| | | |
| | | @Override |
| | | public IPage<PageTestObjectDto> selectTestObjectList(Page page, PageTestObjectDto pageTestObjectDto) { |
| | | String partNo = pageTestObjectDto.getPartNo(); |
| | | pageTestObjectDto.setPartNo(null); |
| | | return structureTestObjectMapper.selectTestObjectList(page, QueryWrappers.queryWrappers(pageTestObjectDto),partNo); |
| | | return structureTestObjectMapper.selectTestObjectList(page, QueryWrappers.queryWrappers(pageTestObjectDto)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public int delTestObject(Integer id) { |
| | | // 产出检验对象产品维护 |
| | | structureTestObjectPartMapper.delete(Wrappers.<StructureTestObjectPart>lambdaQuery() |
| | | .eq(StructureTestObjectPart::getTestObjectId, id)); |
| | | |
| | | // 删除产品维护的零件绑定 |
| | | List<Product> products = productMapper.selectList(Wrappers.<Product>lambdaQuery() |
| | | .eq(Product::getObjectId, id)); |
| | | List<Integer> productIds = products.stream().map(Product::getId).collect(Collectors.toList()); |
| | | productPartMapper.delete(Wrappers.<ProductPart>lambdaQuery() |
| | | .in(ProductPart::getProductId, productIds)); |
| | | |
| | | // 删除产品维护 |
| | | productMapper.delete(Wrappers.<Product>lambdaQuery() |
| | | .in(Product::getId, productIds)); |