Crunchy
2024-05-22 08cad817f057c4a10e1ea59e362fbb492f3381df
cnas-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodServiceImpl.java
@@ -5,11 +5,9 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.common.GetLook;
import com.yuanchu.mom.common.PrintChina;
import com.yuanchu.mom.pojo.StandardMethod;
import com.yuanchu.mom.pojo.StructureItemParameter;
import com.yuanchu.mom.service.StandardMethodService;
import com.yuanchu.mom.mapper.StandardMethodMapper;
import com.yuanchu.mom.service.StandardTreeService;
import com.yuanchu.mom.pojo.StandardMethod;
import com.yuanchu.mom.service.StandardMethodService;
import com.yuanchu.mom.utils.QueryWrappers;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
@@ -32,8 +30,6 @@
    private StandardMethodMapper standardMethodMapper;
    private StandardTreeService standardTreeService;
    @Override
    public Map<String, Object> selectStandardMethodList(Page page, StandardMethod standardMethod) {
        Map<String, Object> map = new HashMap<>();
@@ -46,19 +42,17 @@
    @Override
    public List<StandardMethod> selectStandardMethods() {
        return standardMethodMapper.selectList(Wrappers.<StandardMethod>lambdaQuery().select(StandardMethod::getId,StandardMethod::getCode,StandardMethod::getName));
        return standardMethodMapper.selectList(Wrappers.<StandardMethod>lambdaQuery().select(StandardMethod::getId,StandardMethod::getCode,StandardMethod::getName).ne(StandardMethod::getId, 0));
    }
    @Override
    public int addStandardMethod(StandardMethod standardMethod) {
        int insert = standardMethodMapper.insert(standardMethod);
        standardTreeService.reTreeBySampleType(standardMethod.getSampleType());
        return insert;
    }
    @Override
    public int delStandardMethod(Integer id) {
        standardTreeService.reTreeBySampleType(standardMethodMapper.selectById(id).getSampleType());
        int i = standardMethodMapper.deleteById(id);
        return i;
    }
@@ -66,7 +60,6 @@
    @Override
    public int upStandardMethod(StandardMethod standardMethod) {
        int i = standardMethodMapper.updateById(standardMethod);
        standardTreeService.reTreeBySampleType(standardMethodMapper.selectStandMethodById(standardMethod.getId()).getSampleType());
        return i;
    }
}