修改 铝内胆设备看板

master
wangh 2 years ago
parent 22423cd4e1
commit 25a7564a85

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

@ -5,7 +5,12 @@ import com.alibaba.fastjson.JSONObject;
import com.productionboard.entity.AluminumDevice.AluminumDeviceDataInformation;
import com.productionboard.entity.AluminumDevice.AluminumLossStatistics;
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.IMesProductionDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@ -26,10 +31,12 @@ import java.util.List;
public class AluminumLinerkController {
private String prefix = "aluminumLiner/index";
@Autowired
private IMesProductionDataService iMesProductionDataService;
@Autowired
private IAluminumDeviceInfoService aluminumDeviceInfoService;
private SimpleDateFormat hourFormat = new SimpleDateFormat("HH");
@GetMapping()
@ -124,18 +131,8 @@ public class AluminumLinerkController {
@GetMapping("/getStatisticalOutputByModel")
@ResponseBody
public String getStatisticalOutputByModel() {
String info =
"{\n"
+ "\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;
List<DeviceFault> list=iMesProductionDataService.selectDeviceFaultByType("铝内胆");
return JSONArray.toJSONString(list);
}
/**
@ -148,24 +145,16 @@ public class AluminumLinerkController {
@GetMapping("/getInventoryStatistics")
@ResponseBody
public String getInventoryStatistics() {
String info =
"{\n"
+ "\t\"datas\":[\n"
+ " {\n"
+ " \"name\": \"SC528\",\n"
+ " \"value\": 175.17\n"
+ " },\n"
+ " {\n"
+ " \"name\": \"SC529\",\n"
+ " \"value\": 148.35\n"
+ " },\n"
+ " {\n"
+ " \"name\": \"SC327\",\n"
+ " \"value\": 95.36\n"
+ " }\n"
+ " ]\n"
+ "}";
return info;
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("L001");
return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
}
@GetMapping("/getProductionPlan")
@ResponseBody
public String getProductionPlan() {
List<PlanInfo> PlanInfos = iMesProductionDataService.getProductionPlan();
return JSONArray.toJSONString(PlanInfos);
}
}

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

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

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

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

@ -1,14 +1,8 @@
package com.productionboard.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.productionboard.entity.MesProduction.MesHourProdutionStatistics;
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.MesMaterialProductionStatisticsMapper;
import com.productionboard.mapper.MesMaterialStoreStatisticsMapper;
import com.productionboard.mapper.MesTeamStatisticsMapper;
import com.productionboard.entity.MesProduction.*;
import com.productionboard.mapper.*;
import com.productionboard.service.IMesProductionDataService;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
@ -34,6 +28,10 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
@Autowired
private MesMaterialStoreStatisticsMapper materialStoreStatisticsMapper;
@Autowired
private DeviceFaultMapper deviceFaultMapper;
@Autowired
private PlanInfoMapper planInfoMapper;
/**
*
* @author WenJY
@ -60,7 +58,7 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
@Select("")
public List<MesHourProdutionStatistics> getMesHourProdutionStatisticsList(String locationNumber) {
QueryWrapper<MesHourProdutionStatistics> wrapper = new QueryWrapper<MesHourProdutionStatistics>();
// wrapper.eq("POSIONID",locationNumber);
wrapper.eq("POSIONID",locationNumber);
List<MesHourProdutionStatistics> mesHourProdutionStatistics = hourProdutionStatisticsMapper.selectList(wrapper);
return mesHourProdutionStatistics;
}
@ -90,8 +88,21 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
@Override
public List<MesMaterialStoreStatistics> getMesMaterialStoreStatisticsList(String locationNumber) {
QueryWrapper<MesMaterialStoreStatistics> wrapper = new QueryWrapper<>();
// wrapper.eq("POSIONID",locationNumber);
wrapper.eq("POSIONID",locationNumber);
List<MesMaterialStoreStatistics> mesMaterialStoreStatistics = materialStoreStatisticsMapper.selectList(wrapper);
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"));
});
//生产计划
$.ajax({
url: '/storage/getProductionPlan',
type: 'GET',
url: '/aluminumLiner/getProductionPlan',
type: 'get',
dataType: 'JSON',
success: function (res) {
let Res = res
Res.data.forEach(val => {
console.log("生产计划"+res)
res.data.forEach(val => {
val[0] = 'sc-228NE'
val[1] = '431'
val[2] = '0'
@ -71,7 +72,8 @@ $(() => {
//设备故障排名
$.getJSON('/tankShell/getStatisticalOutputByModel', function (result) {
$.getJSON('/aluminumLiner/getStatisticalOutputByModel', function (result) {
equipmentFailure(result, document.getElementById("equipmentFailure"));
});

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

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

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

Loading…
Cancel
Save