Fixiaobai
2023-09-25 d5e3e8e67e817f0146df30d92ff8a16db674bea8
base-server/src/main/java/com/yuanchu/mom/service/impl/TechnicalModelServiceImpl.java
@@ -7,8 +7,10 @@
import com.yuanchu.mom.service.TechnicalModelService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@@ -24,9 +26,10 @@
    @Resource
    TechnicalModelMapper technicalModelMapper;
    //查询技术指标维护列表-->左边二级展示工序和工艺
    @Override
    public List<Map<String, Object>> selectAllTechTem(Integer type, String message) {
    public List<Map<String, Object>> selectAllTechTem(String type, String message) {
        return technicalModelMapper.selectAllTechTem(type, message);
    }
@@ -38,7 +41,7 @@
    //新增技术指标维护-->选择工序和工艺
    @Override
    public List<Map<String, Object>> chooseTechFath(Integer type) {
    public List<Map<String, Object>> chooseTechFath(String type) {
        return technicalModelMapper.chooseTechFath(type);
    }
@@ -51,10 +54,13 @@
    //新增技术指标维护
    @Override
    public void addTechMode(Integer id, TechnicalModelDto technicalModelDto) {
        TechnicalModel technicalModel = new TechnicalModel();
        BeanUtils.copyProperties(technicalModelDto, technicalModel);
        technicalModel.setTechTemId(id);
    public void addTechMode(TechnicalModelDto technicalModelDto) {
        TechnicalModel technicalModel = TechnicalModel.builder()
                .techTemId(technicalModelDto.getTechTemId())
                .father(technicalModelDto.getFather())
                .name(technicalModelDto.getName())
                .unit(technicalModelDto.getUnit())
                .build();
        technicalModelMapper.insert(technicalModel);
    }
@@ -66,7 +72,7 @@
    //编辑
    @Override
    public void writeTechById(Integer id, TechnicalModelDto technicalModelDto) {
    public void writeTechById(Integer id,TechnicalModelDto technicalModelDto) {
        TechnicalModel technicalModel = new TechnicalModel();
        BeanUtils.copyProperties(technicalModelDto, technicalModel);
        technicalModel.setId(id);
@@ -75,7 +81,9 @@
    //删除
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void delTechById(Integer id) {
        //删除技术指标
        TechnicalModel technicalModel = new TechnicalModel();
        technicalModel.setState(0);
        technicalModel.setId(id);
@@ -84,8 +92,19 @@
    //批量删除
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void delAllTech(String ids) {
        technicalModelMapper.delAllTech(ids);
    }
    /**
     * 导出
     * @param response
     * @param type
     */
    @Override
    public void downloadDataValueExcel(HttpServletResponse response, String type) {
    }
}