能源消耗
This commit is contained in:
parent
b2f279d9a6
commit
ee05bbf7bb
@ -49,6 +49,12 @@ public class KilnInfoParam extends BaseParam {
|
|||||||
@ApiModelProperty(value = "缩写(别名)", example = "1")
|
@ApiModelProperty(value = "缩写(别名)", example = "1")
|
||||||
@NotNull(message = "别名不能为空")
|
@NotNull(message = "别名不能为空")
|
||||||
private String kilnAlias;
|
private String kilnAlias;
|
||||||
|
/**
|
||||||
|
* 设备类型,存储数据字典编码,修改为1:加工炉,2:回火炉,3:氮化炉,4:清洗炉
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "设备类型,存储数据字典编码,修改为1:加工炉,2:回火炉,3:氮化炉,4:清洗炉", example = "1")
|
||||||
|
@NotNull(message = "设备类型不能为空")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,6 +32,12 @@ public class KilnInfoVo extends BaseVo implements PageVo.ConvertVo {
|
|||||||
@ApiModelProperty(value = "编码", example = "1")
|
@ApiModelProperty(value = "编码", example = "1")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型,存储数据字典编码,修改为1:加工炉,2:回火炉,3:氮化炉,4:清洗炉
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "类型,存储数据字典编码,修改为1:加工炉,2:回火炉,3:氮化炉,4:清洗炉", example = "1")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 名称
|
* 名称
|
||||||
*/
|
*/
|
||||||
|
@ -19,7 +19,7 @@ import lombok.experimental.Accessors;
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author mt
|
* @author mt
|
||||||
* @since 2022-03-03
|
* @since 2022-03-04
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ -46,7 +46,7 @@ public class AutoExeTask extends Model<AutoExeTask> {
|
|||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态,0:新增,1:执行中,2完成
|
* 状态,0:新增,1:执行中,2完成,3 终止
|
||||||
*/
|
*/
|
||||||
@TableField("status")
|
@TableField("status")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author mt
|
* @author mt
|
||||||
* @since 2022-03-03
|
* @since 2022-03-04
|
||||||
*/
|
*/
|
||||||
public interface AutoExeTaskMapper extends BaseMapper<AutoExeTask> {
|
public interface AutoExeTaskMapper extends BaseMapper<AutoExeTask> {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author mt
|
* @author mt
|
||||||
* @since 2022-03-03
|
* @since 2022-03-04
|
||||||
*/
|
*/
|
||||||
public interface AutoExeTaskServiceBiz extends IService<AutoExeTask> {
|
public interface AutoExeTaskServiceBiz extends IService<AutoExeTask> {
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author mt
|
* @author mt
|
||||||
* @since 2022-03-03
|
* @since 2022-03-04
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class AutoExeTaskServiceBizImpl extends ServiceImpl<AutoExeTaskMapper, AutoExeTask> implements AutoExeTaskServiceBiz {
|
public class AutoExeTaskServiceBizImpl extends ServiceImpl<AutoExeTaskMapper, AutoExeTask> implements AutoExeTaskServiceBiz {
|
||||||
|
@ -48,6 +48,8 @@ public class AutoTaskController extends BaseController {
|
|||||||
return autoTaskService.page(autoTaskQueryParam);
|
return autoTaskService.page(autoTaskQueryParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "stop")
|
||||||
|
@ApiOperation(value = "终止自动任务")
|
||||||
private R<IdVo> stop(@Validated @RequestBody IdParam idParam){
|
private R<IdVo> stop(@Validated @RequestBody IdParam idParam){
|
||||||
return autoTaskService.stop(idParam);
|
return autoTaskService.stop(idParam);
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ public class CurrTaskController extends BaseController {
|
|||||||
@PostMapping(value = "createAutoTask")
|
@PostMapping(value = "createAutoTask")
|
||||||
@ApiOperation(value = "订单加工-创建多个个分步骤加工任务至任务队列")
|
@ApiOperation(value = "订单加工-创建多个个分步骤加工任务至任务队列")
|
||||||
public R<String> createAutoTask(@Validated @RequestBody AutoCurrTaskParam autoCurrTaskParam){
|
public R<String> createAutoTask(@Validated @RequestBody AutoCurrTaskParam autoCurrTaskParam){
|
||||||
List<TaskCreateParam> detParams = autoCurrTaskParam.getDetParams();
|
List<TaskCreateParam> detParams = autoCurrTaskParam.getTaskCreateParamList();
|
||||||
//自动任务循环添加多条currTask
|
//自动任务循环添加多条currTask
|
||||||
AutoExeTask autoExeTask=new AutoExeTask();
|
AutoExeTask autoExeTask=new AutoExeTask();
|
||||||
for (TaskCreateParam param:detParams
|
for (TaskCreateParam param:detParams
|
||||||
|
@ -5,16 +5,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.mt.wms.core.base.BaseController;
|
import com.mt.wms.core.base.BaseController;
|
||||||
import com.mt.wms.core.constants.CommonConstant;
|
import com.mt.wms.core.constants.CommonConstant;
|
||||||
import com.mt.wms.core.dal.entity.ParEleValue;
|
import com.mt.wms.core.dal.entity.*;
|
||||||
import com.mt.wms.core.dal.entity.ParGasValue;
|
import com.mt.wms.core.dal.service.*;
|
||||||
import com.mt.wms.core.dal.entity.ParRotSpeedValue;
|
|
||||||
import com.mt.wms.core.dal.entity.ParTemValue;
|
|
||||||
import com.mt.wms.core.dal.service.ParEleValueServiceBiz;
|
|
||||||
import com.mt.wms.core.dal.service.ParGasValueServiceBiz;
|
|
||||||
import com.mt.wms.core.dal.service.ParRotSpeedValueServiceBiz;
|
|
||||||
import com.mt.wms.core.dal.service.ParTemValueServiceBiz;
|
|
||||||
import com.mt.wms.core.vo.R;
|
import com.mt.wms.core.vo.R;
|
||||||
import com.mt.wms.empty.params.ElectricQueryParam;
|
import com.mt.wms.empty.params.ElectricQueryParam;
|
||||||
|
import com.mt.wms.empty.vo.ConsumeDataVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -27,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.validation.groups.Default;
|
import javax.validation.groups.Default;
|
||||||
import java.time.DayOfWeek;
|
import java.time.DayOfWeek;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@ -34,9 +30,7 @@ import java.time.LocalDateTime;
|
|||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.time.temporal.TemporalAdjusters;
|
import java.time.temporal.TemporalAdjusters;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liguanghao
|
* @Author: liguanghao
|
||||||
@ -81,6 +75,8 @@ public class EnergyController extends BaseController {
|
|||||||
private ParRotSpeedValueServiceBiz parRotSpeedValueServiceBiz;
|
private ParRotSpeedValueServiceBiz parRotSpeedValueServiceBiz;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ParTemValueServiceBiz parTemValueServiceBiz;
|
private ParTemValueServiceBiz parTemValueServiceBiz;
|
||||||
|
@Autowired
|
||||||
|
private KilnInfoServiceBiz kilnInfoServiceBiz;
|
||||||
|
|
||||||
@PostMapping(value = "eletric")
|
@PostMapping(value = "eletric")
|
||||||
@ApiOperation(value = "根据窑炉id获取消耗情况")
|
@ApiOperation(value = "根据窑炉id获取消耗情况")
|
||||||
@ -217,28 +213,246 @@ public class EnergyController extends BaseController {
|
|||||||
@PostMapping(value = "energyList")
|
@PostMapping(value = "energyList")
|
||||||
@ApiOperation(value = "根据加工炉id获取能源消耗情况")
|
@ApiOperation(value = "根据加工炉id获取能源消耗情况")
|
||||||
public R<String> energyList(@Validated({Default.class}) @RequestBody ElectricQueryParam electricQueryParam){
|
public R<String> energyList(@Validated({Default.class}) @RequestBody ElectricQueryParam electricQueryParam){
|
||||||
|
KilnInfo kilnInfo = kilnInfoServiceBiz.getById(electricQueryParam.getKilnId());
|
||||||
|
Integer kilnType = kilnInfo.getType();
|
||||||
//传入任务号,窑炉号,查询消耗数据,返回json字符串
|
//传入任务号,窑炉号,查询消耗数据,返回json字符串
|
||||||
|
JSONObject jsonObject=new JSONObject();
|
||||||
|
ConsumeDataVo consumeDataVo=ConsumeDataVo.builder().build();
|
||||||
//电能消耗
|
//电能消耗
|
||||||
List<ParEleValue> parEleValueList = parEleValueServiceBiz.list(new QueryWrapper<ParEleValue>()
|
List<ParEleValue> parEleValueList = parEleValueServiceBiz.list(new QueryWrapper<ParEleValue>()
|
||||||
.eq(ParEleValue.KILN_ID, electricQueryParam.getKilnId())
|
.eq(ParEleValue.KILN_ID, electricQueryParam.getKilnId())
|
||||||
.eq(ParEleValue.TASK_ID, electricQueryParam.getTaskId()));
|
.eq(ParEleValue.TASK_ID, electricQueryParam.getTaskId()));
|
||||||
|
if (parEleValueList.size()>0){
|
||||||
|
List eleList=new ArrayList();
|
||||||
|
//电能消耗
|
||||||
|
List<ConsumeDataVo> eleConsume=new ArrayList<>();
|
||||||
|
//A向电压
|
||||||
|
List<ConsumeDataVo> aVolConsume=new ArrayList<>();
|
||||||
|
//B向电压
|
||||||
|
List<ConsumeDataVo> bVolConsume=new ArrayList<>();
|
||||||
|
//C向电压
|
||||||
|
List<ConsumeDataVo> cVolConsume=new ArrayList<>();
|
||||||
|
for (ParEleValue parEleValue:parEleValueList
|
||||||
|
) {
|
||||||
|
consumeDataVo.setCreateTime(parEleValue.getCreateTime());
|
||||||
|
consumeDataVo.setValue(parEleValue.getTotalBat());
|
||||||
|
consumeDataVo.setName("耗电量");
|
||||||
|
consumeDataVo.setUnit("KW");
|
||||||
|
eleConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setValue(parEleValue.getAVoltagevValue());
|
||||||
|
consumeDataVo.setName("A向电压");
|
||||||
|
consumeDataVo.setUnit("V");
|
||||||
|
aVolConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setValue(parEleValue.getBVoltagevValue());
|
||||||
|
consumeDataVo.setName("B向电压");
|
||||||
|
consumeDataVo.setUnit("V");
|
||||||
|
bVolConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setValue(parEleValue.getCVoltagevValue());
|
||||||
|
consumeDataVo.setName("C向电压");
|
||||||
|
consumeDataVo.setUnit("V");
|
||||||
|
cVolConsume.add(consumeDataVo);
|
||||||
|
}
|
||||||
|
eleList.add(eleConsume);
|
||||||
|
eleList.add(aVolConsume);
|
||||||
|
eleList.add(bVolConsume);
|
||||||
|
eleList.add(cVolConsume);
|
||||||
|
jsonObject.put("ele",eleList);
|
||||||
|
}
|
||||||
//氮气、甲醇、丙烷、氨气消耗量
|
//氮气、甲醇、丙烷、氨气消耗量
|
||||||
List<ParGasValue> parGasValueList = parGasValueServiceBiz.list(new QueryWrapper<ParGasValue>()
|
List<ParGasValue> parGasValueList = parGasValueServiceBiz.list(new QueryWrapper<ParGasValue>()
|
||||||
.eq(ParEleValue.KILN_ID, electricQueryParam.getKilnId())
|
.eq(ParEleValue.KILN_ID, electricQueryParam.getKilnId())
|
||||||
.eq(ParEleValue.TASK_ID, electricQueryParam.getTaskId()));
|
.eq(ParEleValue.TASK_ID, electricQueryParam.getTaskId()));
|
||||||
|
if (parGasValueList.size()>0){
|
||||||
|
if (kilnType==1){
|
||||||
|
List gasList=new ArrayList();
|
||||||
|
//氮气
|
||||||
|
List<ConsumeDataVo> nitConsume=new ArrayList<>();
|
||||||
|
//甲醇
|
||||||
|
List<ConsumeDataVo> metConsume=new ArrayList<>();
|
||||||
|
//丙烷
|
||||||
|
List<ConsumeDataVo> propaneConsume=new ArrayList<>();
|
||||||
|
//氨气
|
||||||
|
List<ConsumeDataVo> ammoniaConsume=new ArrayList<>();
|
||||||
|
for (ParGasValue parGasValue:parGasValueList
|
||||||
|
) {
|
||||||
|
consumeDataVo.setCreateTime(parGasValue.getCreateTime());
|
||||||
|
consumeDataVo.setValue(parGasValue.getNitFlowValue());
|
||||||
|
consumeDataVo.setName("氮气");
|
||||||
|
consumeDataVo.setUnit("m³");
|
||||||
|
nitConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setValue(parGasValue.getMethanolFlow());
|
||||||
|
consumeDataVo.setName("甲醇");
|
||||||
|
consumeDataVo.setUnit("m³");
|
||||||
|
metConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setValue(parGasValue.getPropaneFlow());
|
||||||
|
consumeDataVo.setName("丙烷");
|
||||||
|
consumeDataVo.setUnit("m³");
|
||||||
|
propaneConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setValue(parGasValue.getAmmoniaFlowValue());
|
||||||
|
consumeDataVo.setName("氨气");
|
||||||
|
consumeDataVo.setUnit("m³");
|
||||||
|
ammoniaConsume.add(consumeDataVo);
|
||||||
|
}
|
||||||
|
gasList.add(nitConsume);
|
||||||
|
gasList.add(metConsume);
|
||||||
|
gasList.add(propaneConsume);
|
||||||
|
gasList.add(ammoniaConsume);
|
||||||
|
jsonObject.put("gas",gasList);
|
||||||
|
}
|
||||||
|
if (kilnType==3){
|
||||||
|
List gasList=new ArrayList();
|
||||||
|
//氮气
|
||||||
|
List<ConsumeDataVo> nitConsume=new ArrayList<>();
|
||||||
|
//二氧化碳
|
||||||
|
List<ConsumeDataVo> carbonConsume=new ArrayList<>();
|
||||||
|
//氨气
|
||||||
|
List<ConsumeDataVo> ammoniaConsume=new ArrayList<>();
|
||||||
|
for (ParGasValue parGasValue:parGasValueList
|
||||||
|
) {
|
||||||
|
consumeDataVo.setCreateTime(parGasValue.getCreateTime());
|
||||||
|
consumeDataVo.setValue(parGasValue.getNitFlowValue());
|
||||||
|
consumeDataVo.setName("氮气");
|
||||||
|
consumeDataVo.setUnit("m³");
|
||||||
|
nitConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setValue(parGasValue.getCarDioxideFlowValue());
|
||||||
|
consumeDataVo.setName("二氧化碳");
|
||||||
|
consumeDataVo.setUnit("m³");
|
||||||
|
carbonConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setValue(parGasValue.getAmmoniaFlowValue());
|
||||||
|
consumeDataVo.setName("氨气");
|
||||||
|
consumeDataVo.setUnit("m³");
|
||||||
|
ammoniaConsume.add(consumeDataVo);
|
||||||
|
}
|
||||||
|
gasList.add(nitConsume);
|
||||||
|
gasList.add(carbonConsume);
|
||||||
|
gasList.add(ammoniaConsume);
|
||||||
|
jsonObject.put("gas",gasList);
|
||||||
|
}
|
||||||
|
}
|
||||||
//油搅拌转速趋势
|
//油搅拌转速趋势
|
||||||
List<ParRotSpeedValue> parRotSpeedValueList = parRotSpeedValueServiceBiz.list(new QueryWrapper<ParRotSpeedValue>()
|
List<ParRotSpeedValue> parRotSpeedValueList = parRotSpeedValueServiceBiz.list(new QueryWrapper<ParRotSpeedValue>()
|
||||||
.eq(ParEleValue.KILN_ID, electricQueryParam.getKilnId())
|
.eq(ParEleValue.KILN_ID, electricQueryParam.getKilnId())
|
||||||
.eq(ParEleValue.TASK_ID, electricQueryParam.getTaskId()));
|
.eq(ParEleValue.TASK_ID, electricQueryParam.getTaskId()));
|
||||||
|
if (parRotSpeedValueList.size()>0){
|
||||||
|
if (kilnType==1){
|
||||||
|
List rotList=new ArrayList();
|
||||||
|
List<ConsumeDataVo> rot1Consume=new ArrayList<>();
|
||||||
|
List<ConsumeDataVo> rot2Consume=new ArrayList<>();
|
||||||
|
for (ParRotSpeedValue parRotSpeedValue:parRotSpeedValueList
|
||||||
|
) {
|
||||||
|
consumeDataVo.setCreateTime(parRotSpeedValue.getCreateTime());
|
||||||
|
consumeDataVo.setValue(parRotSpeedValue.getOilStiSpeedAValue());
|
||||||
|
consumeDataVo.setName("1号油搅拌转速");
|
||||||
|
consumeDataVo.setUnit("转/min");
|
||||||
|
rot1Consume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setValue(parRotSpeedValue.getOilStiSpeedBValue());
|
||||||
|
consumeDataVo.setName("2号油搅拌转速");
|
||||||
|
consumeDataVo.setUnit("转/min");
|
||||||
|
rot2Consume.add(consumeDataVo);
|
||||||
|
}
|
||||||
|
rotList.add(rot1Consume);
|
||||||
|
rotList.add(rot2Consume);
|
||||||
|
jsonObject.put("rot",rotList);
|
||||||
|
}
|
||||||
|
}
|
||||||
//温度趋势(实际温度、设定温度)
|
//温度趋势(实际温度、设定温度)
|
||||||
List<ParTemValue> parTemValueList = parTemValueServiceBiz.list(new QueryWrapper<ParTemValue>()
|
List<ParTemValue> parTemValueList = parTemValueServiceBiz.list(new QueryWrapper<ParTemValue>()
|
||||||
.eq(ParEleValue.KILN_ID, electricQueryParam.getKilnId())
|
.eq(ParEleValue.KILN_ID, electricQueryParam.getKilnId())
|
||||||
.eq(ParEleValue.TASK_ID, electricQueryParam.getTaskId()));
|
.eq(ParEleValue.TASK_ID, electricQueryParam.getTaskId()));
|
||||||
JSONObject jsonObject=new JSONObject();
|
if (parTemValueList.size()>0){
|
||||||
jsonObject.put("ele",parEleValueList);
|
if (kilnType==1){
|
||||||
jsonObject.put("gas",parGasValueList);
|
List tempList=new ArrayList();
|
||||||
jsonObject.put("rot",parRotSpeedValueList);
|
List<ConsumeDataVo> actualTempConsume=new ArrayList<>();
|
||||||
jsonObject.put("tem",parTemValueList);
|
List<ConsumeDataVo> setupTempConsume=new ArrayList<>();
|
||||||
|
List<ConsumeDataVo> actualOilTempConsume=new ArrayList<>();
|
||||||
|
List<ConsumeDataVo> setupOilTempConsume=new ArrayList<>();
|
||||||
|
for (ParTemValue parTemValue:parTemValueList
|
||||||
|
) {
|
||||||
|
consumeDataVo.setCreateTime(parTemValue.getCreateTime());
|
||||||
|
consumeDataVo.setName("实际温度");
|
||||||
|
consumeDataVo.setValue(parTemValue.getActTemValue());
|
||||||
|
consumeDataVo.setUnit("℃");
|
||||||
|
actualTempConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setCreateTime(parTemValue.getCreateTime());
|
||||||
|
consumeDataVo.setName("设定温度");
|
||||||
|
consumeDataVo.setValue(parTemValue.getSetTemValue());
|
||||||
|
consumeDataVo.setUnit("℃");
|
||||||
|
setupTempConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setCreateTime(parTemValue.getCreateTime());
|
||||||
|
consumeDataVo.setName("油槽实际温度");
|
||||||
|
consumeDataVo.setValue(parTemValue.getOilTankActTemValue());
|
||||||
|
consumeDataVo.setUnit("℃");
|
||||||
|
actualOilTempConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setCreateTime(parTemValue.getCreateTime());
|
||||||
|
consumeDataVo.setName("油槽设定温度");
|
||||||
|
consumeDataVo.setValue(parTemValue.getOilTankSetTemValue());
|
||||||
|
consumeDataVo.setUnit("℃");
|
||||||
|
setupOilTempConsume.add(consumeDataVo);
|
||||||
|
}
|
||||||
|
tempList.add(actualTempConsume);
|
||||||
|
tempList.add(setupTempConsume);
|
||||||
|
tempList.add(actualOilTempConsume);
|
||||||
|
tempList.add(setupOilTempConsume);
|
||||||
|
jsonObject.put("temp",tempList);
|
||||||
|
}
|
||||||
|
if (kilnType==2){
|
||||||
|
List tempList=new ArrayList();
|
||||||
|
List<ConsumeDataVo> actualTempConsume=new ArrayList<>();
|
||||||
|
List<ConsumeDataVo> setupTempConsume=new ArrayList<>();
|
||||||
|
for (ParTemValue parTemValue:parTemValueList
|
||||||
|
) {
|
||||||
|
consumeDataVo.setCreateTime(parTemValue.getCreateTime());
|
||||||
|
consumeDataVo.setName("实际温度");
|
||||||
|
consumeDataVo.setValue(parTemValue.getActTemValue());
|
||||||
|
consumeDataVo.setUnit("℃");
|
||||||
|
actualTempConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setCreateTime(parTemValue.getCreateTime());
|
||||||
|
consumeDataVo.setName("设定温度");
|
||||||
|
consumeDataVo.setValue(parTemValue.getSetTemValue());
|
||||||
|
consumeDataVo.setUnit("℃");
|
||||||
|
setupTempConsume.add(consumeDataVo);
|
||||||
|
}
|
||||||
|
tempList.add(actualTempConsume);
|
||||||
|
tempList.add(setupTempConsume);
|
||||||
|
jsonObject.put("temp",tempList);
|
||||||
|
}
|
||||||
|
if (kilnType==3){
|
||||||
|
|
||||||
|
List tempList=new ArrayList();
|
||||||
|
List<ConsumeDataVo> actualTempConsume=new ArrayList<>();
|
||||||
|
List<ConsumeDataVo> setupTempConsume=new ArrayList<>();
|
||||||
|
List<ConsumeDataVo> outerZone1TempConsume=new ArrayList<>();
|
||||||
|
List<ConsumeDataVo> outerZone2TempConsume=new ArrayList<>();
|
||||||
|
for (ParTemValue parTemValue:parTemValueList
|
||||||
|
) {
|
||||||
|
consumeDataVo.setCreateTime(parTemValue.getCreateTime());
|
||||||
|
consumeDataVo.setName("实际温度");
|
||||||
|
consumeDataVo.setValue(parTemValue.getActTemValue());
|
||||||
|
consumeDataVo.setUnit("℃");
|
||||||
|
actualTempConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setCreateTime(parTemValue.getCreateTime());
|
||||||
|
consumeDataVo.setName("设定温度");
|
||||||
|
consumeDataVo.setValue(parTemValue.getSetTemValue());
|
||||||
|
consumeDataVo.setUnit("℃");
|
||||||
|
setupTempConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setCreateTime(parTemValue.getCreateTime());
|
||||||
|
consumeDataVo.setName("外一区温度");
|
||||||
|
consumeDataVo.setValue(parTemValue.getOuterZone1Temp());
|
||||||
|
consumeDataVo.setUnit("℃");
|
||||||
|
outerZone1TempConsume.add(consumeDataVo);
|
||||||
|
consumeDataVo.setCreateTime(parTemValue.getCreateTime());
|
||||||
|
consumeDataVo.setName("外二区温度");
|
||||||
|
consumeDataVo.setValue(parTemValue.getOuterZone2Temp());
|
||||||
|
consumeDataVo.setUnit("℃");
|
||||||
|
outerZone2TempConsume.add(consumeDataVo);
|
||||||
|
}
|
||||||
|
tempList.add(actualTempConsume);
|
||||||
|
tempList.add(setupTempConsume);
|
||||||
|
tempList.add(outerZone1TempConsume);
|
||||||
|
tempList.add(outerZone2TempConsume);
|
||||||
|
jsonObject.put("temp",tempList);
|
||||||
|
}
|
||||||
|
}
|
||||||
return R.ok(jsonObject.toJSONString());
|
return R.ok(jsonObject.toJSONString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,5 +20,5 @@ import java.util.List;
|
|||||||
@ApiModel(value = "自动currTask参数", description = "自动currTask参数")
|
@ApiModel(value = "自动currTask参数", description = "自动currTask参数")
|
||||||
public class AutoCurrTaskParam extends BaseParam {
|
public class AutoCurrTaskParam extends BaseParam {
|
||||||
@ApiModelProperty(value = "详细信息", required = true)
|
@ApiModelProperty(value = "详细信息", required = true)
|
||||||
private List<TaskCreateParam> detParams;
|
private List<TaskCreateParam> taskCreateParamList;
|
||||||
}
|
}
|
||||||
|
@ -29,9 +29,9 @@ public class ElectricQueryParam extends BaseParam {
|
|||||||
private Long taskId;
|
private Long taskId;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "时间节点", required = true)
|
@ApiModelProperty(value = "时间节点", required = false)
|
||||||
private LocalDateTime time;
|
private LocalDateTime time;
|
||||||
|
|
||||||
@ApiModelProperty(value = "时间类型:1 天,2 周,3 月,4 年", required = true)
|
@ApiModelProperty(value = "时间类型:1 天,2 周,3 月,4 年", required = false)
|
||||||
private Integer dateType;
|
private Integer dateType;
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,11 @@ public class AlarmInfoVo extends BaseVo implements PageVo.ConvertVo{
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "设备名称",example = "0")
|
@ApiModelProperty(value = "设备名称",example = "0")
|
||||||
private String equipmentName;
|
private String equipmentName;
|
||||||
|
/**
|
||||||
|
* currtask任务code
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "currtask任务code",example = "0")
|
||||||
|
private String taskCode;
|
||||||
/**
|
/**
|
||||||
* 报警类型
|
* 报警类型
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.mt.wms.empty.vo;
|
||||||
|
|
||||||
|
import com.mt.wms.core.base.BaseVo;
|
||||||
|
import com.mt.wms.core.vo.PageVo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liguanghao
|
||||||
|
* @Date: 2022/3/4 10:47
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
@ApiModel(value = "消耗数据视图对象", description = "用于查询消耗数据")
|
||||||
|
public class ConsumeDataVo extends BaseVo implements PageVo.ConvertVo{
|
||||||
|
/**
|
||||||
|
* 时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "时间", example = "0")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
/**
|
||||||
|
* 消耗值
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "消耗值",example = "0.0")
|
||||||
|
private Float value;
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "单位",example = "0.0")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "名称",example = "0.0")
|
||||||
|
private String name;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user