Merge remote-tracking branch 'origin/master'

master
夜笙歌 2 years ago
commit 718597fb4c

@ -16,7 +16,7 @@ public class RuoYiApplication
{
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
System.out.println("(♥◠‿◠)ノ゙ 启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +

@ -43,7 +43,7 @@ public class AllBroadHTMLController {
return "broad/beforeLibrary";
}
//6 智能工厂二楼终检位置
//6 智能工厂二楼终检位置——成品入库可视化平台
@GetMapping("/finalAssemblyProductionData")
public String finalAssemblyProduction() {
return "broad/finalAssemblyProductionData";

@ -42,6 +42,10 @@ public class FPBroadController {
return JSONArray.toJSONString(service.fp_selectOrderExecution());
}
@PostMapping("/selectOrderExecutionPlan")
@ApiOperation("订单执行")
private String fp_selectOrderExecutionPlan() {
@ -63,32 +67,43 @@ public class FPBroadController {
}
@PostMapping("/selectStationHourInfo")
// 每小时数据 底部列表
@ApiOperation("生产统计数据")
private String fp_selectStationHourInfo() {
return JSONArray.toJSONString(service.fp_selectStationHourInfo());
}
private Map<String,String> map;
@PostMapping("/selectStationHourInfoDay")
@ApiOperation("底部列表白天使用")
private String selectOrderExecutionDay() {
return JSONArray.toJSONString(service.fp_selectStationHourInfoDay());
}
private Map<String, String> map;
{
map=new HashMap<>();
map.put("A1","10.10.60.176");
map.put("A2","10.10.60.177");
map.put("B1","10.10.60.178");
map.put("B2","10.10.60.179");
map = new HashMap<>();
map.put("A1", "10.10.60.176");
map.put("A2", "10.10.60.177");
map.put("B1", "10.10.60.178");
map.put("B2", "10.10.60.179");
}
@PostMapping("/selectDeviceState")
@ApiOperation("设备状态查询")
private String selectDeviceState(){
private String selectDeviceState() {
Set<String> strings = map.keySet();
Map<String,Integer> stateMap = null;
Map<String, Integer> stateMap = null;
try {
stateMap =new HashMap<>();
stateMap = new HashMap<>();
for (String key:strings) {
ProcessBuilder procBuilder = new ProcessBuilder("ping", map.get(key),"-w","2","-n","1");
for (String key : strings) {
ProcessBuilder procBuilder = new ProcessBuilder("ping", map.get(key), "-w", "2", "-n", "1");
Process proc = procBuilder.start();
int exitValue = proc.waitFor();
stateMap.put(key,exitValue);
stateMap.put(key, exitValue);
}
} catch (IOException e) {
System.out.println(e.getMessage());
@ -96,24 +111,24 @@ public class FPBroadController {
} catch (InterruptedException e) {
e.printStackTrace();
}
String json=JSONArray.toJSONString(stateMap);
String json = JSONArray.toJSONString(stateMap);
return json;
}
@PostMapping("/selectFpStock")
@ApiOperation("发泡库存统计")
public String selectFpStock(){
public String selectFpStock() {
return JSONArray.toJSONString(service.selectFpStock());
}
@PostMapping("/selectTeamGroups")
@ApiOperation("班组是早晚")
public String selectTeamGroups(){
Integer state=iBroadDruidService.selectTeamGroups();
Map<String,Integer> map=new HashMap<>();
map.put("班组",state);
public String selectTeamGroups() {
Integer state = iBroadDruidService.selectTeamGroups();
Map<String, Integer> map = new HashMap<>();
map.put("班组", state);
return JSONObject.toJSONString(map);
}
}

@ -37,12 +37,13 @@ public class ZZJXBroadController {
private String selectProductInByTeam(@PathVariable("id") int id) {
if (id == 0) {
int tag = service.zz_countNightProductIn();
if (tag > 0) {
// int tag = service.zz_countNightProductIn();
Integer tag = service.zz_countNightProductInTag();
if (tag!=null&&tag > 0) {
return JSONArray.toJSONString(service.zz_selectProductInByTeamNight());
}
return JSONArray.toJSONString(service.zz_selectProductInByTeam());
//return null;
} else {
return JSONArray.toJSONString(service.zz_selectProductInByDay());
}
@ -57,6 +58,7 @@ public class ZZJXBroadController {
@PostMapping("/selectLossInfo")
@ApiOperation("查询Loss和分布")
private String selectLossInfo() {
// 统计19.30之后还有没有入库的条码
int tag = service.zz_countNightProductIn();
if (tag > 0) {
return JSONArray.toJSONString(service.zz_selectLossInfo(2));

@ -264,7 +264,7 @@ body.FoamerScada {
body.Foamer2 {
height: auto;
width: auto;
background: url(../img/foamer2.jpg) no-repeat center fixed;
background: url(../img/foamer21.jpg) no-repeat center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1000 KiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

@ -70,11 +70,11 @@ $(() => {
$.post("/broad/zz/selectLossInfo", {}, data => {
data = JSON.parse(data)
let LOSSOne = data.find(val => val.name == '1').qty
let LOSSTwo = data.find(val => val.name == '4').qty
LOSSOne = LOSSOne > 0 ? LOSSOne : 0
LOSS(LOSSOne)
verticalBarChart({
xName: ["0-3分钟", "3-10分钟", ">10分钟"],
yData: [data.find(val => val.name == '2').qty, data.find(val => val.name == '3').qty, LOSSTwo],
yData: [data.find(val => val.name == '2').qty, data.find(val => val.name == '3').qty, data.find(val => val.name == '4').qty],
}, document.getElementById("statisticOfAttribute"));
})
// 标准节拍

@ -11,7 +11,7 @@ $(() => {
// 目标
await $.post(url + "/selectProductInTarget", {}, data => {
data = JSON.parse(data)
targetTop.tips = data.find(val => val.name == "进度目标").qty
targetTop.tips = data.find(val => val.name == "进度目标")?.qty
})
// 终检一次不合格率目标
await $.post(url + "/selectOneBadRateMb", {}, data => {
@ -34,7 +34,7 @@ $(() => {
})
// 产量
$.post(url + `/selectProductInByTeam/${yieldType}`, {}, data => {
data = JSON.parse(data)
data = JSON.parse(data || '{}')
// 实际
targetTop.reality = data.map(val => val.qty).reduce((val1, val2) => val1 + val2, 0)
total('#total', data.map(val => val.qty).reduce((val1, val2) => val1 + val2, 0))
@ -52,8 +52,8 @@ $(() => {
arr[0] = arr[0] - (arr.reduce((val1, val2) => val1 + val2, 0) - targetTop.tips)
targetTop.targetArr = arr
let num = 0
arr.forEach((val,index) => {
if(data[index].qty){
arr.forEach((val, index) => {
if (data[index].qty) {
num += arr[index]
}
})
@ -79,7 +79,7 @@ $(() => {
} else {
targetTop.rate = 0
}
targetTop.gap = targetTop.progress - targetTop.reality
targetTop.gap = targetTop.progress - targetTop.reality > 0 ? targetTop.progress - targetTop.reality : targetTop.reality - targetTop.progress
barChartAndLineChartThree({
xName: xName,
yDataOne: data.map(val => val.qty),

@ -946,7 +946,7 @@ const barChartAndLineChartFour = function (data, id) {
}
// 折线图
const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
const lineChart = function (data, id, unit = '', smooth = false, color = '#14bd2d') {
let charts = echarts.init(id);
if (!data) {
data = {
@ -976,13 +976,13 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
},
legend: {
top: '5%',
itemWidth:20,
itemHeight:10,
itemStyle:{
borderWidth:1,
borderHeight:1,
itemWidth: 20,
itemHeight: 10,
itemStyle: {
borderWidth: 1,
borderHeight: 1,
},
formatter:function (val) {
formatter: function (val) {
return `${val} `
},
textStyle: {
@ -1010,7 +1010,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
},
yAxis: [
{
name:'合格率',
name: '合格率',
min: (min - 2 < 0) ? 0 : min - 2,
max: (max + 2 > 100) ? 100 : max + 2,
type: 'value',
@ -1031,7 +1031,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
},
axisLabel: {
show: true,
interval:0,
interval: 0,
textStyle: {
color: '#ffffff',
},
@ -1042,7 +1042,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
{
name: data.yDataName,
type: 'line',
smooth:smooth,
smooth: smooth,
showAllSymbol: true, //显示所有图形。
symbol: 'circle', //标记的图形为实心圆
symbolSize: 4, //标记的大小
@ -1079,7 +1079,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
}
const lineChartTwo = function (data, id, unit = '') {
let charts = echarts.init(id);
let color = ['#3094ea','#2fd032','#6ba72c','#7b6931','#8909E5']
let color = ['#3094ea', '#2fd032', '#6ba72c', '#7b6931', '#8909E5']
if (!data) {
data = {
xName: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
@ -1098,7 +1098,7 @@ const lineChartTwo = function (data, id, unit = '') {
let num = data.yData.map(val => val.data).flat(Infinity)
let min = Math.ceil(Math.min(...num))
let max = Math.ceil(Math.max(...num))
let series = data.yData.map((val,index) => {
let series = data.yData.map((val, index) => {
return {
name: val.name,
type: 'line',
@ -1150,14 +1150,15 @@ const lineChartTwo = function (data, id, unit = '') {
},
legend: {
top: '5%',
itemWidth:20,
itemHeight:10,
formatter:function (val) {
itemWidth: 20,
itemHeight: 10,
formatter: function (val) {
return `${val}`
},
textStyle: {
fontSize: 0.75 * vw,
color: () => {},
color: () => {
},
},
},
xAxis: {
@ -1210,7 +1211,7 @@ const lineChartTwo = function (data, id, unit = '') {
charts.setOption(option);
$(window).resize(charts.resize);
}
const lineChartThree = function (data, id, unit = '',smooth=false) {
const lineChartThree = function (data, id, unit = '', smooth = false) {
let charts = echarts.init(id);
if (!data) {
data = {
@ -1221,8 +1222,8 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
yDataTwoName: "百分比"
}
}
let min = Math.ceil(Math.min(...data.yData,...(data.yDataTwo || [])))
let max = Math.ceil(Math.max(...data.yData,...(data.yDataTwo || [])))
let min = Math.ceil(Math.min(...data.yData, ...(data.yDataTwo || [])))
let max = Math.ceil(Math.max(...data.yData, ...(data.yDataTwo || [])))
let option = {
grid: {
top: '28%',
@ -1242,13 +1243,13 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
},
legend: {
top: '5%',
itemWidth:20,
itemHeight:10,
itemStyle:{
borderWidth:1,
borderHeight:1,
itemWidth: 20,
itemHeight: 10,
itemStyle: {
borderWidth: 1,
borderHeight: 1,
},
formatter:function (val) {
formatter: function (val) {
return `${val} `
},
textStyle: {
@ -1276,7 +1277,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
},
yAxis: [
{
name:'(元/台)',
name: '(元/台)',
min: (min - 2 < 0) ? 0 : min - 2,
max: (max + 2 > 100) ? 100 : max + 2,
type: 'value',
@ -1297,7 +1298,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
},
axisLabel: {
show: true,
interval:0,
interval: 0,
textStyle: {
color: '#ffffff',
},
@ -1308,7 +1309,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
{
name: data.yDataName,
type: 'line',
smooth:smooth,
smooth: smooth,
showAllSymbol: true, //显示所有图形。
symbol: 'circle', //标记的图形为实心圆
symbolSize: 4, //标记的大小
@ -1340,7 +1341,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
{
name: data.yDataTwoName,
type: 'line',
smooth:smooth,
smooth: smooth,
showAllSymbol: true, //显示所有图形。
symbol: 'circle', //标记的图形为实心圆
symbolSize: 4, //标记的大小
@ -1528,11 +1529,11 @@ const pieChartTwo = function (data, id, unit = '次') {
// color: ["rgb(131,249,103)", "#FBFE27", "#FE5050", "#1DB7E5"], //'#FBFE27','rgb(11,228,96)','#FE5050'
data: data,
roseType: "radius",
overflow:'break',
overflow: 'break',
label: {
overflow:'break',
overflow: 'break',
normal: {
overflow:'break',
overflow: 'break',
formatter: `{b|{b}} \n {c|{c}${unit}}`,
rich: {
c: {
@ -1630,7 +1631,7 @@ const verticalBarChart = function (data, id, unit = '次') {
series: [
{
type: "bar",
barWidth: data.yData.length<4? 2*vw:'75%',
barWidth: data.yData.length < 4 ? 2 * vw : '75%',
label: {
show: true,
position: 'top',
@ -1672,6 +1673,283 @@ const verticalBarChart = function (data, id, unit = '次') {
}
// 多个垂直柱状图
const multipleVerticalBarChart1 = function (data, id) {
let charts = echarts.init(id);
let num1 = data.yDataOne.slice(0,4)
let num2 = data.yDataTwo.slice(0,4)
let num3 = data.yDataThree.slice(0,4)
num1 = num1.map(e => {
if (e > 14) {
return 14
} else if (e < 10) {
return 10
} else {
return e
}
})
num2 = num2.map(e => {
if (e > 14) {
return 14
} else if (e < 10) {
return 10
} else {
return e
}
})
num3 = num3.map(e => {
if (e > 14) {
return 14
} else if (e < 10) {
return 10
} else {
return e
}
})
if (!data) {
data = {
xName: [
"7:00",
"8:00",
"9:00",
"10:00",
"11:00",
"12:00",
],
yDataOne: [4.9, 7.3, 9.2, 5.6, 7.7, 5.6],
yDataOneName: "制氢",
yDataTwo: [2.9, 5, 4.4, 2.7, 5.7, 4.6],
yDataTwoName: "发电",
yDataThree: [3.9, 6, 5.4, 3.7, 6.7, 5.6],
yDataThreeName: "充装",
}
}
let option = {
tooltip: {
//提示框组件
tooltip: {
trigger: "axis",
axisPointer: {
lineStyle: {
color: "#57617B",
},
},
},
},
grid: {
left: "1%",
right: "4%",
bottom: "0",
top: 30,
padding: "0 0 10 0",
containLabel: true,
},
legend: {
//图例组件,颜色和名字
right: 10,
top: 0,
itemGap: 16,
itemWidth: vw,
itemHeight: 0.6 * vw,
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
},
},
dataZoom: [],
xAxis: [
{
type: "category",
boundaryGap: true, //坐标轴两边留白
data: ['A1', 'A2', 'A3', 'A4'],
axisLabel: {
show: true,
color: '#fff'
},
axisTick: {
//坐标轴刻度相关设置。
show: false,
},
axisLine: {
//坐标轴轴线相关设置
lineStyle: {
color: "#fff",
opacity: 0.2,
},
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: '#777777',
opacity: 0.3,
},
},
},
],
yAxis: {
type: "value",
splitNumber: 5,
min: 10,
max: 14,
axisLabel: {
show: true,
color: '#fff'
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: '#777777',
opacity: 0.3,
},
},
},
series: [
{
name: data.yDataOneName,
type: "bar",
data: data.yDataOne,
barWidth: 1 * vw,
barGap: 0, //柱间距离
label: {
//图形上的文本标签
normal: {
show: true,
position: "top",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
},
},
},
itemStyle: {
//图形样式
normal: {
barBorderRadius: [5, 5, 0, 0],
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: 'linear',
global: false,
colorStops: [
{
offset: 0,
color: 'rgb(21, 148, 244)',
},
{
offset: 1,
color: 'rgb(13, 48, 243)',
},
],
},
},
},
},
{
name: data.yDataTwoName,
type: "bar",
data: data.yDataTwo,
barWidth: 1 * vw,
barGap: 0.5, //柱间距离
label: {
//图形上的文本标签
normal: {
show: true,
position: "top",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
},
},
},
itemStyle: {
//图形样式
normal: {
barBorderRadius: [5, 5, 0, 0],
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: 'linear',
global: false,
colorStops: [
{
offset: 0,
color: '#0DCEB1',
},
{
offset: 1,
color: '#14A15A',
},
],
},
},
},
},
{
name: data.yDataThreeName,
type: "bar",
data: data.yDataThree,
barWidth: 1 * vw,
barGap: 0.5, //柱间距离
label: {
//图形上的文本标签
normal: {
show: true,
position: "top",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
},
},
},
itemStyle: {
//图形样式
normal: {
barBorderRadius: [5, 5, 0, 0],
color: "rgba(26, 99, 74, 0.7)",
},
},
},
],
};
if (data?.xName?.length >= 4) {
option.dataZoom.push({
show: true,
type: 'slider',
bottom: '0%',
xAxisIndex: 0,
height: 12,
start: 0,
end: 1 / (data.xName.length / 4) * 100,
textStyle: {
fontSize: 0,
color: 'rgba(0,0,0,0)'
}
})
option.grid.bottom = '7%'
}
charts.setOption(option);
$(window).resize(charts.resize);
}
const multipleVerticalBarChart = function (data, id) {
let charts = echarts.init(id);
if (!data) {
@ -1932,7 +2210,7 @@ const multipleVerticalBarChart = function (data, id) {
charts.setOption(option);
$(window).resize(charts.resize);
}
const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',margin=20,isColor=true) {
const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '', margin = 20, isColor = true) {
let charts = echarts.init(id);
if (!data) {
data = {
@ -1947,7 +2225,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
grid: {
top: "20%",
left: "1%",
right: "1%",
right: "5%",
bottom: "1%",
containLabel: true,
},
@ -1958,7 +2236,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
}
},
legend: {
right:'0',
right: '0',
data: [data.yDataOneName, data.yDataTwoName],
textStyle: {
fontSize: 0.75 * vw,
@ -2005,10 +2283,11 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
focus: 'series'
},
barWidth: '30%',
barMaxWidth: '50px',
itemStyle: {
//图形样式
normal: {
color: isColor? '#db8151': "#64BCEC",
color: isColor ? '#db8151' : "#64BCEC",
},
},
label: {
@ -2029,6 +2308,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
focus: 'series'
},
barWidth: '30%',
barMaxWidth: '50px',
barGap: '40%',
label: {
show: true,
@ -2042,7 +2322,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
itemStyle: {
//图形样式
normal: {
color: isColor? '#9ce375': "#4FD3B9",
color: isColor ? '#9ce375' : "#4FD3B9",
},
},
data: data.yDataTwo
@ -2614,6 +2894,273 @@ const singleVerticalBarChartTwo = function (data, id) {
}
// 多个折线面积图(直线)
const multipleBrokenLineAreaDiagram1 = (data, ids) => {
let charts = echarts.init(ids);
function Fun() {
this.randomNum = function () {
let arr = []
for (let i = 0; i < 12; i++) {
arr.push(parseInt(Math.random() * 100))
}
return arr
}
}
if (!data) {
data = {
xData: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
yDataOne: new Fun().randomNum(),
yDataTwo: new Fun().randomNum(),
yDataOneName: '制氢量',
yDataTwoName: '发电量',
}
}
let max = 24
let min = 18
// let max = Math.round(Math.max(...data.yDataOne, ...data.yDataTwo))
// let min = Math.round(Math.min(...data.yDataOne, ...data.yDataTwo))
let option = {
tooltip: {
trigger: "axis",
axisPointer: {
lineStyle: {
color: "#57617B",
},
},
},
legend: {
icon: "rect",
itemWidth: 0.75 * vw,
itemHeight: 0.25 * vw,
itemGap: 0.75 * vw,
data: [data.yDataOneName, data.yDataTwoName, data.yDataThreeName],
right: "4%",
textStyle: {
fontSize: 0.75 * vw,
color: "#F1F1F3",
},
},
grid: {
top: "20%",
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
dataZoom: [],
xAxis: [
{
show: false,
type: "category",
boundaryGap: false,
axisLine: {
lineStyle: {
color: "#57617B",
},
},
axisLabel: {
show: true,
color: '#fff',
interval: 0,
},
data: data.xData,
},
],
yAxis: [
{
type: "value",
axisTick: {
show: false,
},
max: 24,
min: 18,
axisLine: {
lineStyle: {
color: "#57617B",
},
},
axisLabel: {
show: true,
color: '#fff',
interval: 0.5,
},
splitLine: {
show: false,
lineStyle: {
color: "#57617B",
},
},
},
],
series: [
{
name: data.yDataOneName,
type: "line",
smooth: false,
lineStyle: {
normal: {
width: 1,
},
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "rgba(137, 189, 27, 0.6)",
},
{
offset: 0.8,
color: "rgba(137, 189, 27, 0.2)",
},
],
false
),
shadowColor: "rgba(0, 0, 0, 0.1)",
shadowBlur: 10,
},
},
itemStyle: {
normal: {
color: "rgb(137,189,27)",
},
},
label: {
//图形上的文本标签
normal: {
show: true,
position: "top",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
},
},
},
data: data.yDataOne,
},
{
name: data.yDataTwoName,
type: "line",
smooth: false,
lineStyle: {
normal: {
width: 1,
},
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "rgba(0, 136, 212, 0.6)",
},
{
offset: 0.8,
color: "rgba(0, 136, 212, 0.2)",
},
],
false
),
shadowColor: "rgba(0, 0, 0, 0.1)",
shadowBlur: 10,
},
},
itemStyle: {
normal: {
color: "rgb(0,136,212)",
},
},
label: {
//图形上的文本标签
normal: {
show: true,
position: "bottom",
textStyle: {
color: "#a8aab0",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 0.75 * vw,
},
},
},
data: data.yDataTwo,
},
{
name: data.yDataThreeName,
type: "line",
smooth: false,
lineStyle: {
normal: {
width: 1,
},
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "rgba(219, 50, 51, 0.6)",
},
{
offset: 0.8,
color: "rgba(219, 50, 51, 0.2)",
},
],
false
),
shadowColor: "rgba(0, 0, 0, 0.1)",
shadowBlur: 10,
},
},
itemStyle: {
normal: {
color: "rgb(219,50,51)",
},
},
data: data.yDataThree,
},
],
};
if (data?.xData?.length >= 4) {
option.dataZoom.push({
show: true,
type: 'slider',
bottom: '0%',
xAxisIndex: 0,
height: 12,
start: 0,
end: 1 / (data.xData.length / 4) * 100,
textStyle: {
fontSize: 0,
color: 'rgba(0,0,0,0)'
}
})
option.grid.bottom = '7%'
}
charts.setOption(option);
$(window).resize(charts.resize);
}
const multipleBrokenLineAreaDiagram = (data, ids) => {
let charts = echarts.init(ids);

@ -357,9 +357,11 @@
<script src="../../static/js/auto-update.js" th:src="@{/js/auto-update.js}"></script>
<script>
let practical = 0
//夹具生产计划切换
let tableData = []
let classes = 0
let totalNum = 0
let dayClass = ['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '7:30', '8:30', '9:30', '10:30', '11:30', '12:30', '13:30', '14:30', '15:30', '16:30', '17:30', '18:30']
let nightClass = ['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '19:30', '20:30', '21:30', '22:30', '23:30', '0:30', '1:30', '2:30', '3:30', '4:30', '5:30', '6:30']
let tableWidth = ["5%", '10%', "7%", "5%", "5%", "5%", "8%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%"]
@ -461,15 +463,15 @@
}
$(async () => {
let totalNum = 0
area()
// 当班计划/实际产量/当班差异
await autoUpdate('/broad/fp/selectFpOrderInfo', INTERVAL, data => {
// let p = [data[1], data[0][2], data[0][3]]
totalNum = data.find(val => val.name == '当班计划').qty
let now = data.find(val => val.name == '实际产量').qty
// let now = practical
let p = [totalNum, now, totalNum - now]
console.log(p)
for (let i in p) {
updateSplitBlocks(p[i], selectors[i])
}
@ -535,7 +537,13 @@
classes = data[`班组`]
})
// 生产统计数据
autoUpdate('/broad/fp/selectStationHourInfo', INTERVAL, data => {
const isDay = () => {
let nowTime = new Date()
let nowHour = parseFloat(`${parseInt(nowTime.toLocaleTimeString().split(':')[0])}.${parseInt(nowTime.toLocaleTimeString().split(':')[1])}`)
console.log(nowHour < 19.3 && nowHour > 7.3)
return nowHour < 19.3 && nowHour > 7.3
}
autoUpdate(isDay() ? '/broad/fp/selectStationHourInfoDay' : '/broad/fp/selectStationHourInfo', INTERVAL, data => {
tableData = data
let dataOne = []
if (isFirst) {
@ -547,6 +555,11 @@
times++
}
getTable(classes, dataOne)
practical = eval(data.map(val => val.qty).join('+'))
console.log(selectors)
console.log(practical)
// updateSplitBlocks(totalNum - practical, selectors[2])
// updateSplitBlocks(eval(data.map(val => val.qty).join('+')), selectors[1])
total(
Number((data.filter(val => val.status === '生产中').length / 28) * 100).toFixed(2) + '%',
totalNum,
@ -570,19 +583,19 @@
// 右侧压力 + 右侧温度
autoUpdate('/broad/fp/selectDeviceStation', INTERVAL, data => {
// 右侧压力
multipleVerticalBarChart(
multipleVerticalBarChart1(
{
xName: data.map(value => value.station_no),
yDataOne: data.map(value => value.pol_yl),
yDataOne: data.map(value => (value.pol_yl * 1.1).toFixed(1)),
yDataOneName: "POL压力",
yDataTwo: data.map(value => value.so_yl),
yDataTwo: data.map(value => (value.so_yl * 1.3).toFixed(1)),
yDataTwoName: "ISO压力",
}, document.getElementById("top-right"))
// 右侧温度
multipleBrokenLineAreaDiagram(
multipleBrokenLineAreaDiagram1(
{
xData: data.map(value => value.station_no),
yDataOne: data.map(value => value.pol_wd),
yDataOne: data.map(value => value.pol_wd ),
yDataOneName: "POL温度",
yDataTwo: data.map(value => value.so_wd),
yDataTwoName: "ISO温度",

@ -92,7 +92,7 @@ $(() => {
safeTitle('#safeTitle')
}
day()
setCronTak(day, "0 * * * * * *");
setCronTak(day, "0 0/30 * * * * *");
})
</script>
</html>

@ -28,6 +28,15 @@ public class BaseProductQty extends BaseEntity
/** 目标数量 */
@Excel(name = "目标数量")
private Long qty;
private Long qtyB;
public Long getQtyB() {
return qtyB;
}
public void setQtyB(Long qtyB) {
this.qtyB = qtyB;
}
public void setId(Long id)
{

@ -27,6 +27,7 @@ public interface BroadDataMapper {
// 发泡线
///////////////////////////////////////////////////////////////////////////
List<OrderInfo> fp_selectOrderExecution();
List<OrderInfo> fp_selectOrderExecutionPlan();
///////////////////////////////////////////////////////////////////////////
@ -43,6 +44,7 @@ public interface BroadDataMapper {
List<DeviceStation> fp_selectDeviceStation();
List<FPStationHourInfo> fp_selectStationHourInfo();
List<FPStationHourInfo> fp_selectStationHourInfoDay();
List<OrderInfo> xk_selectStockOccupancy();
@ -119,4 +121,6 @@ public interface BroadDataMapper {
void deleteWorkTime();
void deleteBoxOutput();
Integer zz_countNightProductInTag();
}

@ -43,6 +43,7 @@ public interface IBroadDataService {
List<DeviceStation> fp_selectDeviceStation();
List<FPStationHourInfo> fp_selectStationHourInfo();
List<FPStationHourInfo> fp_selectStationHourInfoDay();
List<OrderInfo> xk_selectStockOccupancy();
@ -79,7 +80,7 @@ public interface IBroadDataService {
List<MTKBeen> mtk_sselectQATop3();
Integer zz_countNightProductInTag();
List<BoxOutput> zz_selectLossInfo(int state);
List<BoxOutput> mtk_selectQAZD();
@ -98,4 +99,6 @@ public interface IBroadDataService {
List<BoxOutput> pqk_selectProductInStore();
}

@ -66,6 +66,10 @@ public class BroadDataServiceImpl implements IBroadDataService
public List<OrderInfo> fp_selectOrderExecution(){
return mapper.fp_selectOrderExecution();
}
@Override
public List<OrderInfo> fp_selectOrderExecutionPlan(){
return mapper.fp_selectOrderExecutionPlan();
@ -85,6 +89,10 @@ public class BroadDataServiceImpl implements IBroadDataService
public List<FPStationHourInfo> fp_selectStationHourInfo() {
return mapper.fp_selectStationHourInfo();
}
@Override
public List<FPStationHourInfo> fp_selectStationHourInfoDay() {
return mapper.fp_selectStationHourInfoDay();
}
@Override
public List<BoxOutput> selectFpStock() {
@ -161,6 +169,11 @@ public class BroadDataServiceImpl implements IBroadDataService
return mapper.zz_countNightProductIn();
}
@Override
public Integer zz_countNightProductInTag() {
return mapper.zz_countNightProductInTag();
}
@Override
public List<BoxOutput> zz_selectLossInfo(int state) {
return mapper.zz_selectLossInfo( state);

@ -10,10 +10,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="qty" column="qty" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="qtyB" column="qty_b" />
</resultMap>
<sql id="selectBaseProductQtyVo">
select id, day, qty, create_time, create_by from base_product_qty
select id, day, qty,qty_b, create_time, create_by from base_product_qty
</sql>
<select id="countDay" resultType="integer">
select count(1) from base_product_qty where day=#{day}
@ -41,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">id,</if>
<if test="day != null">day,</if>
<if test="qty != null">qty,</if>
<if test="qtyB != null">qty_b,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
</trim>
@ -48,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">#{id},</if>
<if test="day != null">#{day},</if>
<if test="qty != null">#{qty},</if>
<if test="qtyB != null">#{qtyB},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
</trim>
@ -58,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="day != null">day = #{day},</if>
<if test="qty != null">qty = #{qty},</if>
<if test="qtyB != null">qty_b = #{qtyB},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
</trim>

@ -17,11 +17,18 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">目标数量:</label>
<label class="col-sm-3 control-label">白班目标数量:</label>
<div class="col-sm-8">
<input name="qty" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">夜班目标数量:</label>
<div class="col-sm-8">
<input name="qtyB" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />

@ -72,8 +72,13 @@
},
{
field: 'qty',
title: '目标数量'
title: '白班目标数量'
},
{
field: 'qtyB',
title: '夜班目标数量'
},
{
field: 'createTime',
title: '创建时间'

@ -18,11 +18,18 @@
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">目标数量:</label>
<label class="col-sm-3 control-label">白班目标数量:</label>
<div class="col-sm-8">
<input name="qty" th:field="*{qty}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">夜班目标数量:</label>
<div class="col-sm-8">
<input name="qtyB" th:field="*{qtyB}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />

Loading…
Cancel
Save