Merge remote-tracking branch 'origin/master'

master
夜笙歌 2 years ago
commit 4077eb91f5

@ -90,7 +90,10 @@ public class TankShellController {
@GetMapping("/getMaterialStoreJson")
@ResponseBody
public String getMesMaterialStoreStatisticsJson(){
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1002");
List<String> list=new ArrayList<String>(2);
list.add("L001");
list.add("U001");
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList= iMesProductionDataService.getMesMaterialStoreStatisticsListByList(list);
return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
}

@ -3,7 +3,9 @@ package com.productionboard.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.productionboard.entity.AluminumDevice.AluminumLossStatistics;
import com.productionboard.entity.MesProduction.DeviceFault;
import com.productionboard.entity.TankShellDevice.TankShellLossStatistics;
import com.productionboard.service.IMesProductionDataService;
import com.productionboard.service.ITankShellDeviceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -16,13 +18,15 @@ import java.util.List;
/**
* 线
*
* @author WenJY
* @date 20220606 10:41
*/
@Controller
@RequestMapping("/tankShellDevice")
public class TankShellDeviceController {
@Autowired
private IMesProductionDataService iMesProductionDataService;
@Autowired
private ITankShellDeviceInfoService iTankShellDeviceInfoService;
@ -35,27 +39,28 @@ public class TankShellDeviceController {
@GetMapping("/getDataInformation")
@ResponseBody
public String getDataInformation(){
public String getDataInformation() {
return iTankShellDeviceInfoService.getDataInformationJson();
}
/**
* loss
*
* @return java.lang.String
* @author WenJY
* @date 2022-06-10 11:28
* @return java.lang.String
*/
@GetMapping("/getLossStatistics")
@ResponseBody
public String lossStatistics(){
public String lossStatistics() {
List<TankShellLossStatistics> lossStatisticsList = iTankShellDeviceInfoService.getLossStatisticsList();
List<JSONObject> jsonObjectList = new ArrayList<>();
if(lossStatisticsList.size() > 0){
lossStatisticsList.forEach(x->{
if (lossStatisticsList.size() > 0) {
lossStatisticsList.forEach(x -> {
JSONObject jsonObject = new JSONObject();
jsonObject.put("name",x.getXValue());
jsonObject.put("value",x.getYValue());
jsonObject.put("name", x.getXValue());
jsonObject.put("value", x.getYValue());
jsonObjectList.add(jsonObject);
});
}
@ -65,51 +70,66 @@ public class TankShellDeviceController {
/**
*
*
* @return java.lang.String
* @author WenJY
* @date 2022-06-08 18:01
* @return java.lang.String
*/
@GetMapping("/getEnergyConsumption")
@ResponseBody
public String getEnergyConsumption(){
public String getEnergyConsumption() {
String energyConsumptionJson = iTankShellDeviceInfoService.getEnergyConsumptionJson();
return energyConsumptionJson;
}
/**
* ,loss
*
* @return java.lang.String
* @author WenJY
* @date 2022-06-08 15:53
* @return java.lang.String
*/
@GetMapping("/getRunParameters")
@ResponseBody
public String getRunParameters(){
public String getRunParameters() {
return iTankShellDeviceInfoService.getRunParameters();
}
/**
*
*
* @return java.lang.String
* @author WenJY
* @date 2022-06-09 10:52
* @return java.lang.String
*/
@GetMapping("/getDeviceParameterValue")
@ResponseBody
public String getDeviceParameterValue(){
public String getDeviceParameterValue() {
return iTankShellDeviceInfoService.getDeviceParameterValue();
}
/**
* OEE
*
* @return java.lang.String
* @author WenJY
* @date 2022-06-08 18:23
* @return java.lang.String
*/
@GetMapping("/getOeeStatistics")
@ResponseBody
public String getOeeStatisticsJson(){
public String getOeeStatisticsJson() {
String oeeStatisticsJson = iTankShellDeviceInfoService.getOeeStatisticsJson();
return oeeStatisticsJson;
}
/**
*
* @return
*/
@GetMapping("/getStatisticalOutputByModel")
@ResponseBody
public String getStatisticalOutputByModel() {
List<DeviceFault> list = iMesProductionDataService.selectDeviceFaultByType("箱壳自动成型线");
return JSONArray.toJSONString(list);
}
}

@ -9,7 +9,7 @@ $(() => {
}, 1000);
//设备故障排名
$.getJSON('/tankShell/getStatisticalOutputByModel', function (result) {
$.getJSON('/tankShellDevice/getStatisticalOutputByModel', function (result) {
equipmentFailure(result, document.getElementById("equipmentFailure"));
});

@ -9,7 +9,7 @@ $(() => {
}, 1000);
//设备故障排名
$.getJSON('/tankShell/getStatisticalOutputByModel', function (result) {
$.getJSON('/tankShellDevice/getStatisticalOutputByModel', function (result) {
equipmentFailure(result, document.getElementById("equipmentFailure"));
});

Loading…
Cancel
Save