修改 铝内胆设备看板

master
wangh 2 years ago
parent ba6e137884
commit 6a00d85f81

@ -53,7 +53,7 @@ public class AdsorptionTankController {
mesTeamStatistics.setClassName("白班"); mesTeamStatistics.setClassName("白班");
int planAmount = Integer.parseInt(mesTeamStatistics.getPlanAmount() == null ? "0" : mesTeamStatistics.getPlanAmount()); int planAmount = Integer.parseInt(mesTeamStatistics.getPlanAmount() == null ? "0" : mesTeamStatistics.getPlanAmount());
int actualAmount= Integer.parseInt(mesTeamStatistics.getActualAmount() == null ? "0" : mesTeamStatistics.getActualAmount()); int actualAmount= Integer.parseInt(mesTeamStatistics.getActualAmount() == null ? "0" : mesTeamStatistics.getActualAmount());
mesTeamStatistics.setDifferenceAmount((planAmount - actualAmount)+""); mesTeamStatistics.setDifferenceAmount(Math.abs(planAmount - actualAmount)+"");
return JSONArray.toJSONString(mesTeamStatistics); return JSONArray.toJSONString(mesTeamStatistics);
} }
return JSONArray.toJSONString(new MesTeamStatistics()); return JSONArray.toJSONString(new MesTeamStatistics());
@ -109,51 +109,51 @@ public class AdsorptionTankController {
* @date 2022/4/20 10:15 * @date 2022/4/20 10:15
* @return java.lang.String * @return java.lang.String
*/ */
@GetMapping("/getStatisticalOutputByModel") // @GetMapping("/getStatisticalOutputByModel")
@ResponseBody // @ResponseBody
public String getStatisticalOutputByModel() { // public String getStatisticalOutputByModel() {
String info = // String info =
"{\n" // "{\n"
+ "\t\"datas\":[\n" // + "\t\"datas\":[\n"
+ " {\"ranking\": 1,\"station\":\"SC227\",\"value\": 199999},\n" // + " {\"ranking\": 1,\"station\":\"SC227\",\"value\": 199999},\n"
+ " {\"ranking\": 2,\"station\":\"SC228\",\"value\": 104970},\n" // + " {\"ranking\": 2,\"station\":\"SC228\",\"value\": 104970},\n"
+ " {\"ranking\": 3,\"station\":\"SC229\",\"value\": 29034},\n" // + " {\"ranking\": 3,\"station\":\"SC229\",\"value\": 29034},\n"
+ " {\"ranking\": 4,\"station\":\"SC223\",\"value\": 23489},\n" // + " {\"ranking\": 4,\"station\":\"SC223\",\"value\": 23489},\n"
+ " {\"ranking\": 5,\"station\":\"SC224\",\"value\": 18203}\n" // + " {\"ranking\": 5,\"station\":\"SC224\",\"value\": 18203}\n"
+ " ],\n" // + " ],\n"
+ "\t\"plan\":[290000, 290000, 290000, 290000, 290000, 290000]\n" // + "\t\"plan\":[290000, 290000, 290000, 290000, 290000, 290000]\n"
+ "}"; // + "}";
return info; // return info;
} // }
//
/** // /**
* // * 库存 统计
* // *
* @author WenJY // * @author WenJY
* @date 2022/4/20 10:16 // * @date 2022/4/20 10:16
* @return java.lang.String // * @return java.lang.String
*/ // */
@GetMapping("/getInventoryStatistics") // @GetMapping("/getInventoryStatistics")
@ResponseBody // @ResponseBody
public String getInventoryStatistics() { // public String getInventoryStatistics() {
String info = // String info =
"{\n" // "{\n"
+ "\t\"datas\":[\n" // + "\t\"datas\":[\n"
+ " {\n" // + " {\n"
+ " \"name\": \"SC528\",\n" // + " \"name\": \"SC528\",\n"
+ " \"value\": 175.17\n" // + " \"value\": 175.17\n"
+ " },\n" // + " },\n"
+ " {\n" // + " {\n"
+ " \"name\": \"SC529\",\n" // + " \"name\": \"SC529\",\n"
+ " \"value\": 148.35\n" // + " \"value\": 148.35\n"
+ " },\n" // + " },\n"
+ " {\n" // + " {\n"
+ " \"name\": \"SC327\",\n" // + " \"name\": \"SC327\",\n"
+ " \"value\": 95.36\n" // + " \"value\": 95.36\n"
+ " }\n" // + " }\n"
+ " ]\n" // + " ]\n"
+ "}"; // + "}";
return info; // return info;
} // }
} }

@ -17,6 +17,7 @@ import java.util.List;
/** /**
* *
*
* @author WenJY * @author WenJY
* @date 20220420 14:40 * @date 20220420 14:40
*/ */
@ -30,22 +31,22 @@ public class AluminumTtankController {
private String prefix = "aluminumTank/index"; private String prefix = "aluminumTank/index";
@GetMapping() @GetMapping()
public String index() public String index() {
{
return prefix; return prefix;
} }
/** /**
* *
*
* @return java.lang.String
* @author WenJY * @author WenJY
* @date 2022-06-09 16:38 * @date 2022-06-09 16:38
* @return java.lang.String
*/ */
@GetMapping("/getTeamStatisticsJson") @GetMapping("/getTeamStatisticsJson")
@ResponseBody @ResponseBody
public String getTeamStatisticsJson(){ public String getTeamStatisticsJson() {
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1006"); List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1006");
if(mesTeamStatisticsList.size()>0){ if (mesTeamStatisticsList.size() > 0) {
return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); return JSONArray.toJSONString(mesTeamStatisticsList.get(0));
} }
return JSONArray.toJSONString(new MesTeamStatistics()); return JSONArray.toJSONString(new MesTeamStatistics());
@ -53,16 +54,17 @@ public class AluminumTtankController {
/** /**
* MES * MES
*
* @return java.lang.String
* @author WenJY * @author WenJY
* @date 2022-06-09 16:54 * @date 2022-06-09 16:54
* @return java.lang.String
*/ */
@GetMapping("/getHourProdutionJson") @GetMapping("/getHourProdutionJson")
@ResponseBody @ResponseBody
public String getHourProdutionStatisticsJson(){ public String getHourProdutionStatisticsJson() {
List<MesHourProdutionStatistics> mesHourProdutionStatisticsList = List<MesHourProdutionStatistics> mesHourProdutionStatisticsList =
iMesProductionDataService.getMesHourProdutionStatisticsList("1006"); iMesProductionDataService.getMesHourProdutionStatisticsList("1006");
if(mesHourProdutionStatisticsList.size()>0){ if (mesHourProdutionStatisticsList.size() > 0) {
return JSONArray.toJSONString(mesHourProdutionStatisticsList); return JSONArray.toJSONString(mesHourProdutionStatisticsList);
} }
return JSONArray.toJSONString(new ArrayList<MesHourProdutionStatistics>()); return JSONArray.toJSONString(new ArrayList<MesHourProdutionStatistics>());
@ -70,13 +72,14 @@ public class AluminumTtankController {
/** /**
* MES * MES
*
* @return java.lang.String
* @author WenJY * @author WenJY
* @date 2022-06-09 17:06 * @date 2022-06-09 17:06
* @return java.lang.String
*/ */
@GetMapping("/getMaterialProdutionJson") @GetMapping("/getMaterialProdutionJson")
@ResponseBody @ResponseBody
public String getMaterialProdutionStatisticsJson(){ public String getMaterialProdutionStatisticsJson() {
List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList = List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList =
iMesProductionDataService.getMesMaterialProductionStatisticsList("1006"); iMesProductionDataService.getMesMaterialProductionStatisticsList("1006");
@ -86,34 +89,28 @@ public class AluminumTtankController {
/** /**
* MES * MES
* @author WenJY *
* @date 2022-06-09 17:18
* @return java.lang.String * @return java.lang.String
* L001 * L001
* U001 * U001
* @author WenJY
* @date 2022-06-09 17:18
*/ */
@GetMapping("/getMaterialStoreJson") @GetMapping("/getMaterialStoreJson")
@ResponseBody @ResponseBody
public String getMesMaterialStoreStatisticsJson(){ public String getMesMaterialStoreStatisticsJson() {
List<String> list=new ArrayList<String>(2);
list.add("L001");
list.add("U001");
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList
=new ArrayList<>(); = iMesProductionDataService.getMesMaterialStoreStatisticsList("1006");
mesMaterialStoreStatisticsList.addAll( iMesProductionDataService.getMesMaterialStoreStatisticsList("1006"));
// mesMaterialStoreStatisticsList.addAll( iMesProductionDataService.getMesMaterialStoreStatisticsList("U001"));
// = iMesProductionDataService.getMesMaterialStoreStatisticsListByList(list);
return JSONArray.toJSONString(mesMaterialStoreStatisticsList); return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
} }
/** /**
* *
* *
* @return java.lang.String
* @author WenJY * @author WenJY
* @date 2022/4/20 10:15 * @date 2022/4/20 10:15
* @return java.lang.String
*/ */
@GetMapping("/getStatisticalOutputByModel") @GetMapping("/getStatisticalOutputByModel")
@ResponseBody @ResponseBody
@ -135,9 +132,9 @@ public class AluminumTtankController {
/** /**
* *
* *
* @return java.lang.String
* @author WenJY * @author WenJY
* @date 2022/4/20 10:16 * @date 2022/4/20 10:16
* @return java.lang.String
*/ */
@GetMapping("/getInventoryStatistics") @GetMapping("/getInventoryStatistics")
@ResponseBody @ResponseBody

@ -1,7 +1,8 @@
$(()=>{ $(()=>{
//班组统计 //班组统计
$.getJSON('/aluminumTank/getTeamStatisticsJson', function (result) { $.getJSON('/aluminumTank/getTeamStatisticsJson', function (result) {
storageStatistics(result.className, result.planAmount, result.actualAmount, result.differenceAmount,) console.log(result.planAmount+' 数据'+ result.actualAmount, result.differenceAmount)
storageStatistics('白班', result.planAmount, result.actualAmount, result.differenceAmount,)
}); });
//按型号统计产量 //按型号统计产量

@ -39,13 +39,11 @@ $(() => {
dataType: 'JSON', dataType: 'JSON',
success: function (res) { success: function (res) {
let Res = {} let Res = {}
console.log(res)
Res.data=res.map(val => { Res.data=res.map(val => {
return [val.spe,val.oq,val.aq,val.cha,val.round,] return [val.spe,val.oq,val.aq,val.cha,val.round,]
}) })
Res.header = ['型号', '计划数', '完成数', '差异数', '执行进度'] Res.header = ['型号', '计划数', '完成数', '差异数', '执行进度']
console.log(Res)
dynamicTable({ dynamicTable({
el: '#productionPlan', el: '#productionPlan',
rowNum: 5, rowNum: 5,
@ -62,7 +60,6 @@ $(() => {
}); });
}, },
error: function (e) { error: function (e) {
console.log(e)
} }
}); });
tableAnimation('#productionPlan') tableAnimation('#productionPlan')

@ -1,7 +1,8 @@
$(()=>{ $(()=>{
//班组统计 //班组统计
$.getJSON('/aluminumTank/getTeamStatisticsJson', function (result) { $.getJSON('/aluminumTank/getTeamStatisticsJson', function (result) {
storageStatistics(result.className, result.planAmount, result.actualAmount, result.differenceAmount,) console.log(result.planAmount+' 数据'+ result.actualAmount, result.differenceAmount)
storageStatistics('白班', result.planAmount, result.actualAmount, result.differenceAmount,)
}); });
//按型号统计产量 //按型号统计产量
@ -16,6 +17,7 @@ $(()=>{
//库存统计 //库存统计
$.getJSON('/aluminumTank/getMaterialStoreJson', function (result) { $.getJSON('/aluminumTank/getMaterialStoreJson', function (result) {
console.log(result)
multipleThreeDimensionalCylindrical(result,document.getElementById("inventoryStatistics")); multipleThreeDimensionalCylindrical(result,document.getElementById("inventoryStatistics"));
}); });
}) })

@ -55,7 +55,6 @@ const horizontalBarChart = (res, ids) => {
let values = []; let values = [];
function dataFormat(data) { function dataFormat(data) {
let arr = []; let arr = [];
data.forEach(function (item, i) { data.forEach(function (item, i) {
@ -174,10 +173,9 @@ const horizontalBarChart = (res, ids) => {
fontSize: 12, fontSize: 12,
color: "#A8A6AB", color: "#A8A6AB",
textBorderWidth: 2, textBorderWidth: 2,
position:'insideTopLeft', position: 'insideTopLeft',
padding: [-20, 0, 0, 0], padding: [-20, 0, 0, 0],
formatter:function (params) { formatter: function (params) {
console.log(dataFormat(xValue)[params[`dataIndex`]])
return dataFormat(xValue)[params[`dataIndex`]].value return dataFormat(xValue)[params[`dataIndex`]].value
} }
}, },
@ -566,7 +564,6 @@ const threeDimensionalCylindrical = (res, ids) => {
//多个折线面积图 //多个折线面积图
const multipleBrokenLineAreaDiagram = (res, ids) => { const multipleBrokenLineAreaDiagram = (res, ids) => {
let mycharts = echarts.init(ids); let mycharts = echarts.init(ids);
console.log(res);
let option = { let option = {
tooltip: { tooltip: {
@ -1172,15 +1169,15 @@ const bluePolygonHistogram = (res, ids) => {
//多个立体柱状图 //多个立体柱状图
const multipleThreeDimensionalCylindrical = (res, ids) => { const multipleThreeDimensionalCylindrical = (res, ids) => {
let mycharts = echarts.init(ids); let mycharts = echarts.init(ids);
const xValue = res.map(val => val.materialName) const xValue = res.map(val => val.materialName?.split(',')[0] || ' ')
const lineStoreAmount = res.map(val => val.lineStoreAmount) const lineStoreAmount = res.map(val => val.lineStoreAmount) || []
const hullStoreAmount = res.map(val => val.hullStoreAmount) const hullStoreAmount = res.map(val => val.hullStoreAmount || '0')
let lineColor = "#406A92"; let lineColor = "#406A92";
let labelColor = "#fff"; let labelColor = "#fff";
let fontSize = "12"; let fontSize = "12";
let lineWidth = 1; let lineWidth = 1;
let isDataZoom = xValue.length > 3 let isDataZoom = xValue.length > 3
let stepSize = 20 let stepSize = 1 / (xValue.length / 3) * 100
// hullStoreAmount.forEach((val, index) => { // hullStoreAmount.forEach((val, index) => {
// if (val == 0) { // if (val == 0) {
// hullStoreAmount[index] = 0 // hullStoreAmount[index] = 0
@ -1228,6 +1225,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
lineHeight: 20, lineHeight: 20,
}, },
axisLabel: { axisLabel: {
interval:0,
color: labelColor, color: labelColor,
fontSize: fontSize, fontSize: fontSize,
margin: 30, margin: 30,
@ -1519,7 +1517,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
}; };
if (isDataZoom) { if (isDataZoom) {
option.dataZoom.push({ option.dataZoom.push({
show:false, show: false,
type: 'slider', type: 'slider',
start: 0, start: 0,
end: stepSize, end: stepSize,
@ -1710,8 +1708,9 @@ const inventory = (res, ids) => {
let barBottomColor = [ let barBottomColor = [
"rgba(2,195,241,0.1)", "rgba(2,195,241,0.1)",
]; ];
const xAxisData = res.map(val => val.materialName) const xAxisData = res.map(val => val.materialName?.split(',')[0] )
const seriesData1 = res.map(val => val.lineStoreAmount) const seriesData1 = res.map(val => val.lineStoreAmount)
console.log(xAxisData,seriesData1)
// Res.forEach((item) => { // Res.forEach((item) => {
// xAxisData.push(item.name); // xAxisData.push(item.name);
// seriesData1.push(item.value); // seriesData1.push(item.value);
@ -2378,8 +2377,8 @@ const energyConsumption = (res, ids) => {
return value + ' °C'; return value + ' °C';
} }
}, },
lineStyle:{ lineStyle: {
color:'#45b685' color: '#45b685'
}, },
data: yAxisDataTwo, data: yAxisDataTwo,
}, },

@ -213,7 +213,6 @@ let dynamicTable = resource => {
} else { } else {
for (let i = 0; i < colWidth.length; i++) { for (let i = 0; i < colWidth.length; i++) {
let emptyUnitColWidth = emptyUnit(colWidth[i]); let emptyUnitColWidth = emptyUnit(colWidth[i]);
console.log(emptyUnitColWidth)
$(`${ele}>.table>.thead>.tr>.th:nth-child(${i+1})`).width(`${emptyUnitColWidth}%`); $(`${ele}>.table>.thead>.tr>.th:nth-child(${i+1})`).width(`${emptyUnitColWidth}%`);
$(`${ele}>.table>.tbody>.tr>.td:nth-child(${i+1})`).width(`${emptyUnitColWidth}%`); $(`${ele}>.table>.tbody>.tr>.td:nth-child(${i+1})`).width(`${emptyUnitColWidth}%`);
} }

@ -13,7 +13,6 @@ const dataInformationFunction = (statusArray) => {
$("#dataInformation").append(info); $("#dataInformation").append(info);
} }
const synthetic = (statusArray,param={a:0,b:0}) => { const synthetic = (statusArray,param={a:0,b:0}) => {
console.log(statusArray);
let info = `<table style="position: absolute;top: 9%;left: 30%;width: 40%;height:7%;"> let info = `<table style="position: absolute;top: 9%;left: 30%;width: 40%;height:7%;">
<tr style="width: 100%; height: 50%;"> <tr style="width: 100%; height: 50%;">
<td style="border:0px solid red;font-size:175%;text-align:center;width: 23%;color: #59B2F6;">${statusArray[0] || 0}</td> <td style="border:0px solid red;font-size:175%;text-align:center;width: 23%;color: #59B2F6;">${statusArray[0] || 0}</td>

Loading…
Cancel
Save