| | |
| | | return judge>0&&judge2>0?inspectionMaterialList:null; |
| | | } |
| | | |
| | | //根据样品id删除检验样品 |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean delInspectionMaterialListByInsId(int inspectionMaterialListId) { |
| | | //删除检验样品 |
| | | InspectionMaterialList list = new InspectionMaterialList(); |
| | | list.setState(0); |
| | | list.setId(inspectionMaterialListId); |
| | | int judge1 = inspectionMaterialListMapper.updateById(list); |
| | | //删除样品检验项目 |
| | | UpdateWrapper<InspectionProductList> wrapper = new UpdateWrapper<>(); |
| | | wrapper.eq("inspection_material_list_id", inspectionMaterialListId).set("state", 0); |
| | | int judge2 = inspectionProductListMapper.update(new InspectionProductList(), wrapper); |
| | | return judge1>0&&judge2>0; |
| | | } |
| | | |
| | | //修改样品信息 |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean updateInspectionMaterialList( Integer inspectionMaterialListId,InspectionMaterialList inspectionMaterialList) { |
| | | LambdaUpdateWrapper<InspectionMaterialList> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | //根据样品id查询 |
| | | updateWrapper.eq(InspectionMaterialList::getId,inspectionMaterialListId); |
| | | int judge = inspectionMaterialListMapper.update(inspectionMaterialList, updateWrapper); |
| | | return judge>0; |