| | |
| | | package com.qianwen.mdc.service.plant;
|
| | |
|
| | | import java.io.File;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | | import java.util.stream.Collectors;
|
| | |
|
| | | import org.apache.commons.io.FileUtils;
|
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | |
| | | import com.alibaba.fastjson.JSONObject;
|
| | | import com.qianwen.mdc.domain.Machine;
|
| | | import com.qianwen.mdc.domain.plant.Plant;
|
| | | import com.qianwen.mdc.dto.PlantDTO;
|
| | | import com.qianwen.mdc.dto.plant.PlantDTO;
|
| | | import com.qianwen.mdc.mapper.MachineMapper;
|
| | | import com.qianwen.mdc.mapper.PlantMapper;
|
| | |
|
| | |
| | |
|
| | | }
|
| | |
|
| | | List<Integer> parseMachineIdInGrid(String gridSetting){
|
| | | public List<Integer> parseMachineIdInGrid(String gridSetting){
|
| | | List<Integer> macineIds = new ArrayList<>();
|
| | | try {
|
| | |
|
| | |
| | | plantMapper.updateById(p);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 所有厂房列表
|
| | | * @return
|
| | | */
|
| | | @Transactional(readOnly=true)
|
| | | public List<PlantDTO> list() {
|
| | |
|
| | | List<Plant> plist = plantMapper.selectList(null);
|
| | | |
| | | return plist.stream().map(p -> {
|
| | | PlantDTO dto = new PlantDTO();
|
| | | dto.setId(p.getId());
|
| | | dto.setName(p.getName());
|
| | | dto.setGridSetting(p.getGridSetting());
|
| | | return dto;
|
| | | }).collect(Collectors.toList());
|
| | | |
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 删除厂房
|