| | |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.PageTestObjectDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.StructureItemParameterMapper; |
| | | import com.yuanchu.mom.mapper.StructureTestObjectMapper; |
| | | import com.yuanchu.mom.pojo.StructureItemParameter; |
| | |
| | | |
| | | @Override |
| | | public int addTestObject(StructureTestObject testObject) { |
| | | System.out.println(testObject); |
| | | Long count = structureTestObjectMapper.selectCount(Wrappers.<StructureTestObject>lambdaQuery().eq(StructureTestObject::getSpecimenName, testObject.getSpecimenName())); |
| | | if(count.compareTo(0L) > 0){ |
| | | throw new ErrorException("检验对象不能重复"); |
| | | } |
| | | return structureTestObjectMapper.insert(testObject); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<StructureTestObject> selectTestObjectByName() { |
| | | return structureTestObjectMapper.selectList(Wrappers.<StructureTestObject>lambdaQuery().select(StructureTestObject::getSpecimenName)); |
| | | return structureTestObjectMapper.selectList(Wrappers.<StructureTestObject>lambdaQuery().select(StructureTestObject::getSpecimenName,StructureTestObject::getId)); |
| | | } |
| | | } |
| | | |