|
|
package com.synthesize_energy.item.web.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.synthesize_energy.item.dto.ComputeArg2Dto;
|
|
|
import com.synthesize_energy.item.dto.ComputeArgDto;
|
|
|
import com.synthesize_energy.item.entity.ComputeArg;
|
|
|
import com.synthesize_energy.item.entity.Synthesize_no_2_6;
|
|
|
import com.synthesize_energy.item.mapper.ComputeArgMapper;
|
|
|
import com.synthesize_energy.item.mapper.Synthesize_no_2_6Mapper;
|
|
|
import com.synthesize_energy.item.web.service.Synthesize_no_2_6Service;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @author kgy
|
|
|
* @version 1.0
|
|
|
* @date 2020/5/23 11:56
|
|
|
*/
|
|
|
@Transactional
|
|
|
@Service
|
|
|
public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6Mapper, Synthesize_no_2_6> implements Synthesize_no_2_6Service {
|
|
|
|
|
|
@Autowired
|
|
|
private ComputeArgMapper computeArgMapper;
|
|
|
@Autowired
|
|
|
private Synthesize_no_2_6Service synthesize_no_2_6Service;
|
|
|
@Override
|
|
|
public List<ComputeArg> no2_6getType(String id) {
|
|
|
QueryWrapper<ComputeArg> objectQueryWrapper = new QueryWrapper<>();
|
|
|
objectQueryWrapper.lambda().eq(ComputeArg::getPid, 0);
|
|
|
List<ComputeArg> computeArgs = computeArgMapper.selectList(objectQueryWrapper);
|
|
|
Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(id);
|
|
|
Map<String, ComputeArg2Dto> map = null;
|
|
|
ComputeArg2Dto computeArg2Dto = null;
|
|
|
List<ComputeArg2Dto> computeArg2DtoList = null;
|
|
|
for (ComputeArg computeArg : computeArgs) {
|
|
|
QueryWrapper<ComputeArg> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.lambda().eq(ComputeArg::getPid, computeArg.getId());
|
|
|
List<ComputeArg> computeArgs1 = computeArgMapper.selectList(queryWrapper);
|
|
|
computeArg2DtoList = new ArrayList<>();
|
|
|
for (ComputeArg arg : computeArgs1) {
|
|
|
List<ComputeArgDto> computeArgDtos = new ArrayList<>();
|
|
|
|
|
|
QueryWrapper<ComputeArg> queryWrapper1 = new QueryWrapper<>();
|
|
|
queryWrapper1.lambda().eq(ComputeArg::getPid, arg.getId());
|
|
|
List<ComputeArg> computeArgs2 = computeArgMapper.selectList(queryWrapper1);
|
|
|
|
|
|
for (ComputeArg computeArg1 : computeArgs2) {
|
|
|
|
|
|
ComputeArgDto computeArgDto = new ComputeArgDto();
|
|
|
computeArgDto.setNamType(computeArg1.getName());
|
|
|
switch (computeArg1.getId()) {
|
|
|
case 16:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo16());
|
|
|
computeArgDto.setName("W/m2");
|
|
|
break;
|
|
|
case 17:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo17());
|
|
|
computeArgDto.setName("元/W");
|
|
|
break;
|
|
|
case 18:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo18());
|
|
|
computeArgDto.setName("元/W");
|
|
|
break;
|
|
|
case 19:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo19());
|
|
|
computeArgDto.setName("元/Wh");
|
|
|
break;
|
|
|
case 20:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo20());
|
|
|
computeArgDto.setName("元/Wh");
|
|
|
break;
|
|
|
case 21:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo21());
|
|
|
computeArgDto.setName("元/W");
|
|
|
break;
|
|
|
case 22:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo22());
|
|
|
computeArgDto.setName("元/W");
|
|
|
break;
|
|
|
case 23:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo23());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 24:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo24());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 25:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo25());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 26:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo26());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 27:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo27());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 28:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo28());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 29:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo29());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 30:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo30());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 31:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo31());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 32:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo32());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 33:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo33());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 34:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo34());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 35:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo35());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 36:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo36());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 37:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo37());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 38:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo38());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 39:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo39());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 40:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo40());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 41:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo41());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 42:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo42());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 43:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo43());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 44:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo44());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 45:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo45());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 46:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo46());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 47:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo47());
|
|
|
computeArgDto.setName("℃");
|
|
|
break;
|
|
|
case 48:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo48());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 49:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo49());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 50:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo50());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 51:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo51());
|
|
|
computeArgDto.setName("");
|
|
|
break;
|
|
|
case 52:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo52());
|
|
|
computeArgDto.setName("h");
|
|
|
break;
|
|
|
case 53:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo53());
|
|
|
computeArgDto.setName("元/吨");
|
|
|
break;
|
|
|
case 54:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo54());
|
|
|
computeArgDto.setName("元/吨");
|
|
|
break;
|
|
|
case 55:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo55());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 56:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo56());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 57:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo57());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 58:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo58());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 59:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo59());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
case 60:
|
|
|
computeArgDto.setId(computeArg1.getId());
|
|
|
computeArgDto.setModelType(synthesize_no_2_6.getNo60());
|
|
|
computeArgDto.setName("元/kW");
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
computeArgDtos.add(computeArgDto);
|
|
|
}
|
|
|
computeArg2Dto = new ComputeArg2Dto();
|
|
|
computeArg2Dto.setName(arg.getName());
|
|
|
computeArg2Dto.setList(computeArgDtos);
|
|
|
|
|
|
computeArg2DtoList.add(computeArg2Dto);
|
|
|
}
|
|
|
computeArg.setMap(computeArg2DtoList);
|
|
|
}
|
|
|
return computeArgs;
|
|
|
}
|
|
|
} |
...
|
...
|
|