修改 铝内胆设备看板

master
wangh 2 years ago
parent 22423cd4e1
commit 25a7564a85

@ -78,7 +78,8 @@ public class AdsorptionTankController {
@ResponseBody @ResponseBody
public String getMaterialProdutionStatisticsJson(){ public String getMaterialProdutionStatisticsJson(){
List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1001"); List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList =
iMesProductionDataService.getMesMaterialProductionStatisticsList("1001");
return JSONArray.toJSONString(mesMaterialProductionStatisticsList); return JSONArray.toJSONString(mesMaterialProductionStatisticsList);
} }
@ -92,7 +93,7 @@ public class AdsorptionTankController {
@GetMapping("/getMaterialStoreJson") @GetMapping("/getMaterialStoreJson")
@ResponseBody @ResponseBody
public String getMesMaterialStoreStatisticsJson(){ public String getMesMaterialStoreStatisticsJson(){
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1001"); List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("L001");
return JSONArray.toJSONString(mesMaterialStoreStatisticsList); return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
} }

@ -5,7 +5,12 @@ import com.alibaba.fastjson.JSONObject;
import com.productionboard.entity.AluminumDevice.AluminumDeviceDataInformation; import com.productionboard.entity.AluminumDevice.AluminumDeviceDataInformation;
import com.productionboard.entity.AluminumDevice.AluminumLossStatistics; import com.productionboard.entity.AluminumDevice.AluminumLossStatistics;
import com.productionboard.entity.AluminumDevice.AluminumOeeStatistics; import com.productionboard.entity.AluminumDevice.AluminumOeeStatistics;
import com.productionboard.entity.MesProduction.DeviceFault;
import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics;
import com.productionboard.entity.MesProduction.PlanInfo;
import com.productionboard.mapper.PlanInfoMapper;
import com.productionboard.service.IAluminumDeviceInfoService; import com.productionboard.service.IAluminumDeviceInfoService;
import com.productionboard.service.IMesProductionDataService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -26,10 +31,12 @@ import java.util.List;
public class AluminumLinerkController { public class AluminumLinerkController {
private String prefix = "aluminumLiner/index"; private String prefix = "aluminumLiner/index";
@Autowired
private IMesProductionDataService iMesProductionDataService;
@Autowired @Autowired
private IAluminumDeviceInfoService aluminumDeviceInfoService; private IAluminumDeviceInfoService aluminumDeviceInfoService;
private SimpleDateFormat hourFormat = new SimpleDateFormat("HH"); private SimpleDateFormat hourFormat = new SimpleDateFormat("HH");
@GetMapping() @GetMapping()
@ -124,18 +131,8 @@ public class AluminumLinerkController {
@GetMapping("/getStatisticalOutputByModel") @GetMapping("/getStatisticalOutputByModel")
@ResponseBody @ResponseBody
public String getStatisticalOutputByModel() { public String getStatisticalOutputByModel() {
String info = List<DeviceFault> list=iMesProductionDataService.selectDeviceFaultByType("铝内胆");
"{\n" return JSONArray.toJSONString(list);
+ "\t\"datas\":[\n"
+ " {\"ranking\": 1,\"station\":\"SC227\",\"value\": 199999},\n"
+ " {\"ranking\": 2,\"station\":\"SC228\",\"value\": 104970},\n"
+ " {\"ranking\": 3,\"station\":\"SC229\",\"value\": 29034},\n"
+ " {\"ranking\": 4,\"station\":\"SC223\",\"value\": 23489},\n"
+ " {\"ranking\": 5,\"station\":\"SC224\",\"value\": 18203}\n"
+ " ],\n"
+ "\t\"plan\":[290000, 290000, 290000, 290000, 290000, 290000]\n"
+ "}";
return info;
} }
/** /**
@ -148,24 +145,16 @@ public class AluminumLinerkController {
@GetMapping("/getInventoryStatistics") @GetMapping("/getInventoryStatistics")
@ResponseBody @ResponseBody
public String getInventoryStatistics() { public String getInventoryStatistics() {
String info = List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("L001");
"{\n" return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
+ "\t\"datas\":[\n"
+ " {\n" }
+ " \"name\": \"SC528\",\n" @GetMapping("/getProductionPlan")
+ " \"value\": 175.17\n" @ResponseBody
+ " },\n" public String getProductionPlan() {
+ " {\n" List<PlanInfo> PlanInfos = iMesProductionDataService.getProductionPlan();
+ " \"name\": \"SC529\",\n" return JSONArray.toJSONString(PlanInfos);
+ " \"value\": 148.35\n"
+ " },\n"
+ " {\n"
+ " \"name\": \"SC327\",\n"
+ " \"value\": 95.36\n"
+ " }\n"
+ " ]\n"
+ "}";
return info;
} }
} }

@ -44,7 +44,7 @@ public class AluminumTtankController {
@GetMapping("/getTeamStatisticsJson") @GetMapping("/getTeamStatisticsJson")
@ResponseBody @ResponseBody
public String getTeamStatisticsJson(){ public String getTeamStatisticsJson(){
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("铝内胆");
if(mesTeamStatisticsList.size()>0){ if(mesTeamStatisticsList.size()>0){
return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); return JSONArray.toJSONString(mesTeamStatisticsList.get(0));
} }
@ -60,7 +60,8 @@ public class AluminumTtankController {
@GetMapping("/getHourProdutionJson") @GetMapping("/getHourProdutionJson")
@ResponseBody @ResponseBody
public String getHourProdutionStatisticsJson(){ public String getHourProdutionStatisticsJson(){
List<MesHourProdutionStatistics> mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002"); List<MesHourProdutionStatistics> mesHourProdutionStatisticsList =
iMesProductionDataService.getMesHourProdutionStatisticsList("铝内胆");
if(mesHourProdutionStatisticsList.size()>0){ if(mesHourProdutionStatisticsList.size()>0){
return JSONArray.toJSONString(mesHourProdutionStatisticsList); return JSONArray.toJSONString(mesHourProdutionStatisticsList);
} }
@ -77,7 +78,8 @@ public class AluminumTtankController {
@ResponseBody @ResponseBody
public String getMaterialProdutionStatisticsJson(){ public String getMaterialProdutionStatisticsJson(){
List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList =
iMesProductionDataService.getMesMaterialProductionStatisticsList("1006");
return JSONArray.toJSONString(mesMaterialProductionStatisticsList); return JSONArray.toJSONString(mesMaterialProductionStatisticsList);
} }
@ -87,11 +89,15 @@ public class AluminumTtankController {
* @author WenJY * @author WenJY
* @date 2022-06-09 17:18 * @date 2022-06-09 17:18
* @return java.lang.String * @return java.lang.String
* L001
* U001
*/ */
@GetMapping("/getMaterialStoreJson") @GetMapping("/getMaterialStoreJson")
@ResponseBody @ResponseBody
public String getMesMaterialStoreStatisticsJson(){ public String getMesMaterialStoreStatisticsJson(){
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1002"); List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList =
iMesProductionDataService.getMesMaterialStoreStatisticsList("L001");
return JSONArray.toJSONString(mesMaterialStoreStatisticsList); return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
} }

@ -44,7 +44,7 @@ public class PreassembleController {
@GetMapping("/getTeamStatisticsJson") @GetMapping("/getTeamStatisticsJson")
@ResponseBody @ResponseBody
public String getTeamStatisticsJson(){ public String getTeamStatisticsJson(){
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1001");
if(mesTeamStatisticsList.size()>0){ if(mesTeamStatisticsList.size()>0){
return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); return JSONArray.toJSONString(mesTeamStatisticsList.get(0));
} }
@ -77,7 +77,7 @@ public class PreassembleController {
@ResponseBody @ResponseBody
public String getMaterialProdutionStatisticsJson(){ public String getMaterialProdutionStatisticsJson(){
List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1001");
return JSONArray.toJSONString(mesMaterialProductionStatisticsList); return JSONArray.toJSONString(mesMaterialProductionStatisticsList);
} }

@ -2,10 +2,7 @@ package com.productionboard.controller;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.productionboard.entity.BasicScadaDeviceinfo; import com.productionboard.entity.BasicScadaDeviceinfo;
import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; import com.productionboard.entity.MesProduction.*;
import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics;
import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics;
import com.productionboard.entity.MesProduction.MesTeamStatistics;
import com.productionboard.service.IMesProductionDataService; import com.productionboard.service.IMesProductionDataService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -45,7 +42,7 @@ public class TankShellController {
@GetMapping("/getTeamStatisticsJson") @GetMapping("/getTeamStatisticsJson")
@ResponseBody @ResponseBody
public String getTeamStatisticsJson(){ public String getTeamStatisticsJson(){
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); 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));
} }
@ -61,7 +58,7 @@ public class TankShellController {
@GetMapping("/getHourProdutionJson") @GetMapping("/getHourProdutionJson")
@ResponseBody @ResponseBody
public String getHourProdutionStatisticsJson(){ public String getHourProdutionStatisticsJson(){
List<MesHourProdutionStatistics> mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002"); List<MesHourProdutionStatistics> mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("箱壳");
if(mesHourProdutionStatisticsList.size()>0){ if(mesHourProdutionStatisticsList.size()>0){
return JSONArray.toJSONString(mesHourProdutionStatisticsList); return JSONArray.toJSONString(mesHourProdutionStatisticsList);
} }
@ -69,7 +66,7 @@ public class TankShellController {
} }
/** /**
* MES * MES
* @author WenJY * @author WenJY
* @date 2022-06-09 17:06 * @date 2022-06-09 17:06
* @return java.lang.String * @return java.lang.String
@ -78,7 +75,8 @@ public class TankShellController {
@ResponseBody @ResponseBody
public String getMaterialProdutionStatisticsJson(){ public String getMaterialProdutionStatisticsJson(){
List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList =
iMesProductionDataService.getMesMaterialProductionStatisticsList("1006");
return JSONArray.toJSONString(mesMaterialProductionStatisticsList); return JSONArray.toJSONString(mesMaterialProductionStatisticsList);
} }
@ -103,22 +101,12 @@ public class TankShellController {
* @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 = // List<DeviceFault> list=iMesProductionDataService.selectDeviceFaultByType("铝内胆");
"{\n" // return JSONArray.toJSONString(list);
+ "\t\"datas\":[\n" // }
+ " {\"ranking\": 1,\"station\":\"SC227\",\"value\": 199999},\n"
+ " {\"ranking\": 2,\"station\":\"SC228\",\"value\": 104970},\n"
+ " {\"ranking\": 3,\"station\":\"SC229\",\"value\": 29034},\n"
+ " {\"ranking\": 4,\"station\":\"SC223\",\"value\": 23489},\n"
+ " {\"ranking\": 5,\"station\":\"SC224\",\"value\": 18203}\n"
+ " ],\n"
+ "\t\"plan\":[290000, 290000, 290000, 290000, 290000, 290000]\n"
+ "}";
return info;
}
/** /**
* *

@ -0,0 +1,19 @@
package com.productionboard.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* @author wanghao
* @date 2022/9/29 11:48
*/
@Controller()
@RequestMapping("/index")
public class test {
@GetMapping()
private String index(){
return "/index";
}
}

@ -0,0 +1,35 @@
package com.productionboard.entity.MesProduction;
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;
/**
*
* @author WenJY
* @date 20220609 17:10
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SCADA_DEVICE_FAULT")
public class DeviceFault implements Serializable {
/** 名称 */
@TableField("STATION")
private String station;
/** 数量 */
@TableField("VALUE")
private String value;
/** 类型 */
@TableField("TYPE")
private String hullStoreAmount;
}

@ -0,0 +1,42 @@
package com.productionboard.entity.MesProduction;
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;
/**
*
* @author WenJY
* @date 20220609 17:10
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SCADA_PLAN_INFO")
public class PlanInfo implements Serializable {
/** 物料名称 */
@TableField("SPE")
private String spe;
/** 内胆库库存 */
@TableField("OQ")
private String oq;
/** 箱壳库库存 */
@TableField("AQ")
private String aq;
/** 工位编号 */
@TableField("ROUND")
private String round;
@TableField("CHA")
private String cha;
}

@ -0,0 +1,17 @@
package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.MesProduction.DeviceFault;
import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* MES
* @author WenJY
* @date 20220609 17:14
*/
@Mapper
@Repository
public interface DeviceFaultMapper extends BaseMapper<DeviceFault>{
}

@ -0,0 +1,17 @@
package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.MesProduction.DeviceFault;
import com.productionboard.entity.MesProduction.PlanInfo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* MES
* @author WenJY
* @date 20220609 17:14
*/
@Mapper
@Repository
public interface PlanInfoMapper extends BaseMapper<PlanInfo>{
}

@ -1,9 +1,6 @@
package com.productionboard.service; package com.productionboard.service;
import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; import com.productionboard.entity.MesProduction.*;
import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics;
import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics;
import com.productionboard.entity.MesProduction.MesTeamStatistics;
import com.productionboard.mapper.MesHourProdutionStatisticsMapper; import com.productionboard.mapper.MesHourProdutionStatisticsMapper;
import java.util.List; import java.util.List;
@ -50,4 +47,8 @@ public interface IMesProductionDataService {
* @return java.util.List<com.productionboard.entity.MesProduction.MesMaterialStoreStatistics> * @return java.util.List<com.productionboard.entity.MesProduction.MesMaterialStoreStatistics>
*/ */
List<MesMaterialStoreStatistics> getMesMaterialStoreStatisticsList(String locationNumber); List<MesMaterialStoreStatistics> getMesMaterialStoreStatisticsList(String locationNumber);
List<DeviceFault> selectDeviceFaultByType(String type);
List<PlanInfo> getProductionPlan();
} }

@ -1,14 +1,8 @@
package com.productionboard.service.impl; package com.productionboard.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; import com.productionboard.entity.MesProduction.*;
import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; import com.productionboard.mapper.*;
import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics;
import com.productionboard.entity.MesProduction.MesTeamStatistics;
import com.productionboard.mapper.MesHourProdutionStatisticsMapper;
import com.productionboard.mapper.MesMaterialProductionStatisticsMapper;
import com.productionboard.mapper.MesMaterialStoreStatisticsMapper;
import com.productionboard.mapper.MesTeamStatisticsMapper;
import com.productionboard.service.IMesProductionDataService; import com.productionboard.service.IMesProductionDataService;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -34,6 +28,10 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
@Autowired @Autowired
private MesMaterialStoreStatisticsMapper materialStoreStatisticsMapper; private MesMaterialStoreStatisticsMapper materialStoreStatisticsMapper;
@Autowired
private DeviceFaultMapper deviceFaultMapper;
@Autowired
private PlanInfoMapper planInfoMapper;
/** /**
* *
* @author WenJY * @author WenJY
@ -60,7 +58,7 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
@Select("") @Select("")
public List<MesHourProdutionStatistics> getMesHourProdutionStatisticsList(String locationNumber) { public List<MesHourProdutionStatistics> getMesHourProdutionStatisticsList(String locationNumber) {
QueryWrapper<MesHourProdutionStatistics> wrapper = new QueryWrapper<MesHourProdutionStatistics>(); QueryWrapper<MesHourProdutionStatistics> wrapper = new QueryWrapper<MesHourProdutionStatistics>();
// wrapper.eq("POSIONID",locationNumber); wrapper.eq("POSIONID",locationNumber);
List<MesHourProdutionStatistics> mesHourProdutionStatistics = hourProdutionStatisticsMapper.selectList(wrapper); List<MesHourProdutionStatistics> mesHourProdutionStatistics = hourProdutionStatisticsMapper.selectList(wrapper);
return mesHourProdutionStatistics; return mesHourProdutionStatistics;
} }
@ -90,8 +88,21 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
@Override @Override
public List<MesMaterialStoreStatistics> getMesMaterialStoreStatisticsList(String locationNumber) { public List<MesMaterialStoreStatistics> getMesMaterialStoreStatisticsList(String locationNumber) {
QueryWrapper<MesMaterialStoreStatistics> wrapper = new QueryWrapper<>(); QueryWrapper<MesMaterialStoreStatistics> wrapper = new QueryWrapper<>();
// wrapper.eq("POSIONID",locationNumber); wrapper.eq("POSIONID",locationNumber);
List<MesMaterialStoreStatistics> mesMaterialStoreStatistics = materialStoreStatisticsMapper.selectList(wrapper); List<MesMaterialStoreStatistics> mesMaterialStoreStatistics = materialStoreStatisticsMapper.selectList(wrapper);
return mesMaterialStoreStatistics; return mesMaterialStoreStatistics;
} }
@Override
public List<DeviceFault> selectDeviceFaultByType(String type) {
QueryWrapper<DeviceFault> wrapper = new QueryWrapper<>();
wrapper.eq("TYPE",type);
return deviceFaultMapper.selectList(wrapper);
}
@Override
public List<PlanInfo> getProductionPlan() {
QueryWrapper<PlanInfo> wrapper = new QueryWrapper<>();
return planInfoMapper.selectList(wrapper);
}
} }

@ -27,19 +27,20 @@ $(() => {
}); });
//库存情况 //库存情况
$.getJSON('/tankShell/getInventoryStatistics', function (result) { $.getJSON('/aluminumLiner/getInventoryStatistics', function (result) {
inventory(result, document.getElementById("inventory")); inventory(result, document.getElementById("inventory"));
}); });
//生产计划 //生产计划
$.ajax({ $.ajax({
url: '/storage/getProductionPlan', url: '/aluminumLiner/getProductionPlan',
type: 'GET', type: 'get',
dataType: 'JSON', dataType: 'JSON',
success: function (res) { success: function (res) {
let Res = res let Res = res
Res.data.forEach(val => { console.log("生产计划"+res)
res.data.forEach(val => {
val[0] = 'sc-228NE' val[0] = 'sc-228NE'
val[1] = '431' val[1] = '431'
val[2] = '0' val[2] = '0'
@ -71,7 +72,8 @@ $(() => {
//设备故障排名 //设备故障排名
$.getJSON('/tankShell/getStatisticalOutputByModel', function (result) { $.getJSON('/aluminumLiner/getStatisticalOutputByModel', function (result) {
equipmentFailure(result, document.getElementById("equipmentFailure")); equipmentFailure(result, document.getElementById("equipmentFailure"));
}); });

@ -1702,45 +1702,20 @@ const OEEStatistics = (res, ids) => {
const inventory = (res, ids) => { const inventory = (res, ids) => {
let mycharts = echarts.init(ids); let mycharts = echarts.init(ids);
let xAxisData = [];
let seriesData1 = [];
let sum = 0; let sum = 0;
let barTopColor = ["#02c3f1"]; let barTopColor = ["#02c3f1"];
let barBottomColor = [ let barBottomColor = [
"rgba(2,195,241,0.1)", "rgba(2,195,241,0.1)",
]; ];
let Res = const xAxisData = res.map(val => val.materialName)
{ const seriesData1 = res.map(val => val.lineStoreAmount)
datas: [ // Res.forEach((item) => {
{ // xAxisData.push(item.name);
name: 'SC-279', // seriesData1.push(item.value);
value: 2 // sum += item.value;
}, // });
{
name: 'SC-606',
value: 6
},
{
name: 'SC-387NE',
value: 31
},
{
name: 'SC-329',
value: 2
},
{
name: 'SC-279',
value: 9
},
]
}
Res.datas.forEach((item) => {
xAxisData.push(item.name);
seriesData1.push(item.value);
sum += item.value;
});
let option = { let option = {
grid: { grid: {
@ -2157,12 +2132,12 @@ const loss = (res, ids) => {
//设备故障排名 //设备故障排名
const equipmentFailure = (res, ids) => { const equipmentFailure = (res, ids) => {
let mycharts = echarts.init(ids); let mycharts = echarts.init(ids);
// console.log("设备故障排名1"+res)
let stationData = []; let stationData = [];
let values = []; let values = [];
res.datas.forEach(function (it, index) { res.forEach(function (it, index) {
stationData.push(it.station); stationData.push(it.station);
values.push(it.value); values.push(it.value);
}); });

@ -27,18 +27,19 @@ $(() => {
}); });
//库存情况 //库存情况
$.getJSON('/tankShell/getInventoryStatistics', function (result) { $.getJSON('/aluminumLiner/getInventoryStatistics', function (result) {
inventory(result, document.getElementById("inventory")); inventory(result, document.getElementById("inventory"));
}); });
//生产计划 //生产计划
$.ajax({ $.ajax({
url: '/storage/getProductionPlan', url: '/aluminumLiner/getProductionPlan',
type: 'GET', type: 'get',
dataType: 'JSON', dataType: 'JSON',
success: function (res) { success: function (res) {
let Res = res let Res = res
console.log("生产计划"+res)
Res.data.forEach(val => { Res.data.forEach(val => {
val[0] = 'sc-228NE' val[0] = 'sc-228NE'
val[1] = '431' val[1] = '431'
@ -71,7 +72,8 @@ $(() => {
//设备故障排名 //设备故障排名
$.getJSON('/tankShell/getStatisticalOutputByModel', function (result) { $.getJSON('/aluminumLiner/getStatisticalOutputByModel', function (result) {
equipmentFailure(result, document.getElementById("equipmentFailure")); equipmentFailure(result, document.getElementById("equipmentFailure"));
}); });

@ -1702,45 +1702,20 @@ const OEEStatistics = (res, ids) => {
const inventory = (res, ids) => { const inventory = (res, ids) => {
let mycharts = echarts.init(ids); let mycharts = echarts.init(ids);
let xAxisData = [];
let seriesData1 = [];
let sum = 0; let sum = 0;
let barTopColor = ["#02c3f1"]; let barTopColor = ["#02c3f1"];
let barBottomColor = [ let barBottomColor = [
"rgba(2,195,241,0.1)", "rgba(2,195,241,0.1)",
]; ];
let Res = const xAxisData = res.map(val => val.materialName)
{ const seriesData1 = res.map(val => val.lineStoreAmount)
datas: [ // Res.forEach((item) => {
{ // xAxisData.push(item.name);
name: 'SC-279', // seriesData1.push(item.value);
value: 2 // sum += item.value;
}, // });
{
name: 'SC-606',
value: 6
},
{
name: 'SC-387NE',
value: 31
},
{
name: 'SC-329',
value: 2
},
{
name: 'SC-279',
value: 9
},
]
}
Res.datas.forEach((item) => {
xAxisData.push(item.name);
seriesData1.push(item.value);
sum += item.value;
});
let option = { let option = {
grid: { grid: {
@ -2157,12 +2132,12 @@ const loss = (res, ids) => {
//设备故障排名 //设备故障排名
const equipmentFailure = (res, ids) => { const equipmentFailure = (res, ids) => {
let mycharts = echarts.init(ids); let mycharts = echarts.init(ids);
// console.log("设备故障排名1"+res)
let stationData = []; let stationData = [];
let values = []; let values = [];
res.datas.forEach(function (it, index) { res.forEach(function (it, index) {
stationData.push(it.station); stationData.push(it.station);
values.push(it.value); values.push(it.value);
}); });

Loading…
Cancel
Save