|
|
@ -3,7 +3,9 @@ package com.productionboard.controller;
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.productionboard.entity.AluminumDevice.AluminumLossStatistics;
|
|
|
|
import com.productionboard.entity.AluminumDevice.AluminumLossStatistics;
|
|
|
|
|
|
|
|
import com.productionboard.entity.MesProduction.DeviceFault;
|
|
|
|
import com.productionboard.entity.TankShellDevice.TankShellLossStatistics;
|
|
|
|
import com.productionboard.entity.TankShellDevice.TankShellLossStatistics;
|
|
|
|
|
|
|
|
import com.productionboard.service.IMesProductionDataService;
|
|
|
|
import com.productionboard.service.ITankShellDeviceInfoService;
|
|
|
|
import com.productionboard.service.ITankShellDeviceInfoService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
@ -16,13 +18,15 @@ import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 箱壳自动成型线设备看板
|
|
|
|
* 箱壳自动成型线设备看板
|
|
|
|
|
|
|
|
*
|
|
|
|
* @author WenJY
|
|
|
|
* @author WenJY
|
|
|
|
* @date 2022年06月06日 10:41
|
|
|
|
* @date 2022年06月06日 10:41
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Controller
|
|
|
|
@Controller
|
|
|
|
@RequestMapping("/tankShellDevice")
|
|
|
|
@RequestMapping("/tankShellDevice")
|
|
|
|
public class TankShellDeviceController {
|
|
|
|
public class TankShellDeviceController {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private IMesProductionDataService iMesProductionDataService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private ITankShellDeviceInfoService iTankShellDeviceInfoService;
|
|
|
|
private ITankShellDeviceInfoService iTankShellDeviceInfoService;
|
|
|
|
|
|
|
|
|
|
|
@ -35,27 +39,28 @@ public class TankShellDeviceController {
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getDataInformation")
|
|
|
|
@GetMapping("/getDataInformation")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public String getDataInformation(){
|
|
|
|
public String getDataInformation() {
|
|
|
|
return iTankShellDeviceInfoService.getDataInformationJson();
|
|
|
|
return iTankShellDeviceInfoService.getDataInformationJson();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* loss统计
|
|
|
|
* loss统计
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return java.lang.String
|
|
|
|
* @author WenJY
|
|
|
|
* @author WenJY
|
|
|
|
* @date 2022-06-10 11:28
|
|
|
|
* @date 2022-06-10 11:28
|
|
|
|
* @return java.lang.String
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@GetMapping("/getLossStatistics")
|
|
|
|
@GetMapping("/getLossStatistics")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public String lossStatistics(){
|
|
|
|
public String lossStatistics() {
|
|
|
|
List<TankShellLossStatistics> lossStatisticsList = iTankShellDeviceInfoService.getLossStatisticsList();
|
|
|
|
List<TankShellLossStatistics> lossStatisticsList = iTankShellDeviceInfoService.getLossStatisticsList();
|
|
|
|
|
|
|
|
|
|
|
|
List<JSONObject> jsonObjectList = new ArrayList<>();
|
|
|
|
List<JSONObject> jsonObjectList = new ArrayList<>();
|
|
|
|
if(lossStatisticsList.size() > 0){
|
|
|
|
if (lossStatisticsList.size() > 0) {
|
|
|
|
lossStatisticsList.forEach(x->{
|
|
|
|
lossStatisticsList.forEach(x -> {
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
jsonObject.put("name",x.getXValue());
|
|
|
|
jsonObject.put("name", x.getXValue());
|
|
|
|
jsonObject.put("value",x.getYValue());
|
|
|
|
jsonObject.put("value", x.getYValue());
|
|
|
|
jsonObjectList.add(jsonObject);
|
|
|
|
jsonObjectList.add(jsonObject);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -65,51 +70,66 @@ public class TankShellDeviceController {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 设备产量能耗对比
|
|
|
|
* 设备产量能耗对比
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return java.lang.String
|
|
|
|
* @author WenJY
|
|
|
|
* @author WenJY
|
|
|
|
* @date 2022-06-08 18:01
|
|
|
|
* @date 2022-06-08 18:01
|
|
|
|
* @return java.lang.String
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@GetMapping("/getEnergyConsumption")
|
|
|
|
@GetMapping("/getEnergyConsumption")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public String getEnergyConsumption(){
|
|
|
|
public String getEnergyConsumption() {
|
|
|
|
String energyConsumptionJson = iTankShellDeviceInfoService.getEnergyConsumptionJson();
|
|
|
|
String energyConsumptionJson = iTankShellDeviceInfoService.getEnergyConsumptionJson();
|
|
|
|
return energyConsumptionJson;
|
|
|
|
return energyConsumptionJson;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取运行参数,整合产量能耗、运行参数、loss、标准节拍参数
|
|
|
|
* 获取运行参数,整合产量能耗、运行参数、loss、标准节拍参数
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return java.lang.String
|
|
|
|
* @author WenJY
|
|
|
|
* @author WenJY
|
|
|
|
* @date 2022-06-08 15:53
|
|
|
|
* @date 2022-06-08 15:53
|
|
|
|
* @return java.lang.String
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@GetMapping("/getRunParameters")
|
|
|
|
@GetMapping("/getRunParameters")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public String getRunParameters(){
|
|
|
|
public String getRunParameters() {
|
|
|
|
return iTankShellDeviceInfoService.getRunParameters();
|
|
|
|
return iTankShellDeviceInfoService.getRunParameters();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取设备参数值
|
|
|
|
* 获取设备参数值
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return java.lang.String
|
|
|
|
* @author WenJY
|
|
|
|
* @author WenJY
|
|
|
|
* @date 2022-06-09 10:52
|
|
|
|
* @date 2022-06-09 10:52
|
|
|
|
* @return java.lang.String
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@GetMapping("/getDeviceParameterValue")
|
|
|
|
@GetMapping("/getDeviceParameterValue")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public String getDeviceParameterValue(){
|
|
|
|
public String getDeviceParameterValue() {
|
|
|
|
return iTankShellDeviceInfoService.getDeviceParameterValue();
|
|
|
|
return iTankShellDeviceInfoService.getDeviceParameterValue();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取OEE统计数据
|
|
|
|
* 获取OEE统计数据
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return java.lang.String
|
|
|
|
* @author WenJY
|
|
|
|
* @author WenJY
|
|
|
|
* @date 2022-06-08 18:23
|
|
|
|
* @date 2022-06-08 18:23
|
|
|
|
* @return java.lang.String
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@GetMapping("/getOeeStatistics")
|
|
|
|
@GetMapping("/getOeeStatistics")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public String getOeeStatisticsJson(){
|
|
|
|
public String getOeeStatisticsJson() {
|
|
|
|
String oeeStatisticsJson = iTankShellDeviceInfoService.getOeeStatisticsJson();
|
|
|
|
String oeeStatisticsJson = iTankShellDeviceInfoService.getOeeStatisticsJson();
|
|
|
|
return oeeStatisticsJson;
|
|
|
|
return oeeStatisticsJson;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 设备故障排名
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@GetMapping("/getStatisticalOutputByModel")
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
public String getStatisticalOutputByModel() {
|
|
|
|
|
|
|
|
List<DeviceFault> list = iMesProductionDataService.selectDeviceFaultByType("箱壳自动成型线");
|
|
|
|
|
|
|
|
return JSONArray.toJSONString(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|