add - 箱壳设备看板产量能耗对比接口
parent
f994c24e30
commit
c4e6253589
@ -0,0 +1,33 @@
|
||||
package com.productionboard.entity.TankShellDevice;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author WenJY
|
||||
* @date 2022年06月08日 18:02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("SCADA_UK_DEVICEINFO_1")
|
||||
public class TankShellEnergyConsumption implements Serializable {
|
||||
|
||||
@TableField("production")
|
||||
private String production;
|
||||
|
||||
@TableField("hourenergy")
|
||||
private String energy;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String xValue;
|
||||
|
||||
@TableField("createtime")
|
||||
private Date createTime;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.productionboard.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.productionboard.entity.TankShellDevice.TankShellEnergyConsumption;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author WenJY
|
||||
* @date 2022年06月08日 18:05
|
||||
*/
|
||||
@Mapper
|
||||
public interface TankShellEnergyConsumptionMapper extends BaseMapper<TankShellEnergyConsumption> {
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.productionboard.service;
|
||||
|
||||
/**
|
||||
* 箱壳设备数据
|
||||
* @author WenJY
|
||||
* @date 2022年06月08日 18:05
|
||||
*/
|
||||
public interface ITankShellDeviceInfoService {
|
||||
|
||||
/**
|
||||
* 获取能耗产量对比JSON
|
||||
* @author WenJY
|
||||
* @date 2022-06-08 18:06
|
||||
* @return java.lang.String
|
||||
*/
|
||||
public String getEnergyConsumptionJson();
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.productionboard.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.productionboard.entity.TankShellDevice.TankShellEnergyConsumption;
|
||||
import com.productionboard.mapper.TankShellEnergyConsumptionMapper;
|
||||
import com.productionboard.service.ITankShellDeviceInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author WenJY
|
||||
* @date 2022年06月08日 18:06
|
||||
*/
|
||||
@Service
|
||||
public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoService {
|
||||
|
||||
@Autowired
|
||||
private TankShellEnergyConsumptionMapper tankShellEnergyConsumptionMapper;
|
||||
|
||||
private SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd");
|
||||
|
||||
@Override
|
||||
public String getEnergyConsumptionJson() {
|
||||
List<TankShellEnergyConsumption> tankShellEnergyConsumptions = tankShellEnergyConsumptionMapper.selectList(null);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
if(tankShellEnergyConsumptions.size() > 0){
|
||||
String[] productionArray = new String[tankShellEnergyConsumptions.size()];
|
||||
String[] energyArray = new String[tankShellEnergyConsumptions.size()];
|
||||
String[] xValueArray = new String[tankShellEnergyConsumptions.size()];
|
||||
|
||||
for (int i = 0;i< tankShellEnergyConsumptions.size();i++){
|
||||
productionArray[i] = tankShellEnergyConsumptions.get(i).getEnergy();
|
||||
energyArray[i] = tankShellEnergyConsumptions.get(i).getEnergy();
|
||||
xValueArray[i] = dateFormat.format(tankShellEnergyConsumptions.get(i).getCreateTime());
|
||||
}
|
||||
jsonObject.put("productionArray",productionArray);
|
||||
jsonObject.put("energyArray",energyArray);
|
||||
jsonObject.put("xValueArray",xValueArray);
|
||||
}
|
||||
return JSONArray.toJSONString(jsonObject);
|
||||
}
|
||||
}
|
Binary file not shown.
@ -1,27 +1,27 @@
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\AdsorptionTankController.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\mapper\AluminumThisMonthEnergyMapper.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\TankShellDeviceController.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\mapper\AluminumLossStatisticsMapper.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumThisMonthEnergy.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\FoamBoxController.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\AluminumLinerkController.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\ProductionBoardApplication.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\PreassembleController.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumOeeStatistics.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\mapper\AluminumDeviceDataInformationMapper.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\service\IAluminumDeviceInfoService.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\entity\BasicScadaDeviceinfo.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\mapper\AluminumYesterdayEnergyMapper.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\TankShellController.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\AluminumTtankController.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumYesterdayEnergy.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\service\impl\AluminumDeviceInfoServiceImpl.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\controller\StorageController.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\mapper\AluminumOeeStatisticsMapper.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumLossStatistics.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\mapper\BasicScadaDeviceinfoMapper.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\service\BasicScadaDeviceinfoService.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\common\CodeGenerator.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\service\impl\BasicScadaDeviceinfoServiceImpl.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\config\MybatisPlusConfig.java
|
||||
C:\Users\ADMIN\Desktop\visualboard\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumDeviceDataInformation.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumOeeStatistics.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\AluminumLinerkController.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\entity\BasicScadaDeviceinfo.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\FoamBoxController.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\common\CodeGenerator.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\mapper\AluminumYesterdayEnergyMapper.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\ProductionBoardApplication.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\AdsorptionTankController.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\config\MybatisPlusConfig.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\mapper\AluminumOeeStatisticsMapper.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\mapper\BasicScadaDeviceinfoMapper.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\mapper\AluminumDeviceDataInformationMapper.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumThisMonthEnergy.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\TankShellDeviceController.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\service\IAluminumDeviceInfoService.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\mapper\AluminumThisMonthEnergyMapper.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\service\impl\BasicScadaDeviceinfoServiceImpl.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\AluminumTtankController.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumLossStatistics.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\service\impl\AluminumDeviceInfoServiceImpl.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\TankShellController.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumYesterdayEnergy.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\StorageController.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\controller\PreassembleController.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\mapper\AluminumLossStatisticsMapper.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\entity\AluminumDevice\AluminumDeviceDataInformation.java
|
||||
E:\桌面\scada-visual-board\productionboard\src\main\java\com\productionboard\service\BasicScadaDeviceinfoService.java
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue