增加 泡前库 pqk

master
wangh 4 years ago
parent 969c408024
commit 9174695dae

@ -80,33 +80,8 @@ public class BoxBroadController {
@PostMapping("/getProductPlanInfo")
@ResponseBody
public String getProductPlanInfo() {
List<List<Object>> planInfoList = new ArrayList<List<Object>>();
List<OrderInfo> planInfo = service.getUHullPlanInfo();
planInfo.forEach(x -> {
planInfoList.add(
new ArrayList<Object>() {
{
this.add(x.getOrderType());
this.add(x.getPlannedProduction());
this.add(x.getActualProduction());
this.add(x.getPlannedProduction() - x.getActualProduction());
if (x.getPlannedProduction() == 0 || x.getActualProduction() == 0) {
this.add("0%");
} else {
this.add(((double) x.getActualProduction() / (double) x.getPlannedProduction() * 100) + "%");
}
if (x.getEndTime() != null) {
this.add(dateFormat.format(x.getEndTime()));
} else {
this.add("-");
}
}
});
});
String jsonInfo = JSONArray.toJSONString(planInfoList);
List<OrderInfo> planInfo = service.getUHullPlanInfo("1002");
String jsonInfo = JSONArray.toJSONString(planInfo);
System.out.println("MES生产计划信息查询" + jsonInfo);
return jsonInfo;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

@ -0,0 +1,960 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width,initial-scale=1.0">
<title>发泡SCADA数据平台</title>
<meta name="description" content="U壳钣金SCADA数据平台">
<link href="../../static/css/main-style.css" th:href="@{/css/main-style.css}" rel="stylesheet"/>
<!-- <link href="../../static/css/materialdesignicons.min.css" th:href="@{/css/materialdesignicons.min.css}" rel="stylesheet"/>-->
<!-- 360浏览器急速模式 -->
<meta name="renderer" content="webkit">
<!-- 避免IE使用兼容模式 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="../../static/css/autoscroll-table.css" th:href="@{/css/autoscroll-table.css}">
</head>
<style>
#top-left {
border: 0px solid red;
position: absolute;
width: 23.5%;
height: 20%;
top: 14.85%;
left: 3.4%;
/*font-size: 12%;*/
/*padding-left: 1%;
padding-top: 0.7%;*/
}
#mid-left {
position: absolute;
border: 0px solid red;
width: 23.5%;
height: 16%;
top: 42.5%;
left: 3.4%;
}
/*#bottom-left {
position: absolute;
border: 1px solid red;
width: 68%;
height: 29.6%;
top: 66.4%;
left: 3.5%;
}*/
#top-mid {
position: absolute;
border: 0px solid red;
width: 40%;
height: 19.8%;
top: 14%;
left: 30%;
}
.top-mid-Text{
height: 26.5%;
width:5%;
border:0px solid black;
font-size: 16%;
display: flex;
align-items: center;
justify-content: center;
text-align: justify;
}
#top-right {
position: absolute;
border: 0px solid red;
width: 23.5%;
height: 20%;
top: 14.85%;
left: 73%;
}
#mid-right {
position: absolute;
border: 0px solid red;
width: 23.5%;
height: 16%;
top: 42.5%;
left: 73%;
}
#bottom-right {
outline: #00a65a 0px solid;
border: 0px solid red;
position: absolute;
width: 23.5%;
height: 29.6%;
top: 66.4%;
left: 73%;
}
#bottom-mid {
position: absolute;
width: 43.3%;
height: 21%;
top: 74%;
left: 28.2%;
}
#oee {
position: absolute;
top: 14%;
left: 32.8%;
font-size: 22%;
color: #56B2F5;
text-shadow: 0 0 2px #56B2F5;
letter-spacing: 3px;
}
#production {
position: absolute;
top: 14%;
left: 54%;
font-size: 22%;
color: #57F4AD;
text-shadow: 0 0 2px #57F4AD;
letter-spacing: 3px;
}
#expected-pace {
position: absolute;
top: 26.6%;
left: 32.8%;
font-size: 22%;
color: #CCF456;
text-shadow: 0 0 2px #CCF456;
letter-spacing: 3px;
}
#actual-pace {
position: absolute;
top: 26.6%;
left: 54%;
font-size: 22%;
color: #F58756;
text-shadow: 0 0 2px #F58756;
letter-spacing: 3px;
}
.status-table * {
}
.status-table td {
padding: 1.6% 0;
}
.status-table_item {
color: #0E72BE;
letter-spacing: 2px;
}
.status-table_content {
color: #8DA9C1;
letter-spacing: 1px;
}
#energy-chart {
width: 100%;
height: 100%;
}
#relay-chart {
width: 100%;
height: 100%;
}
#power-chart {
width: 100%;
height: 100%;
}
#contactor-chart {
width: 100%;
height: 100%;
}
#bottom-left .autoscroll-table td {
padding-top: 0.3%;
padding-bottom: 0.3%;
}
#bottom-left-2 .autoscroll-table td {
padding-top: 0.3%;
padding-bottom: 0.3%;
}
.my-transition {
position: absolute;
border: 0px solid red;
width: 68%;
height: 29.6%;
top: 66.4%;
left: 3.5%;
transform: scale(0.5, 0.5);
opacity: 0;
transition: transform 0.5s linear, opacity 0.5s linear;
}
.my-transition2 {
position: absolute;
border: 0px solid red;
width: 68%;
height: 29.6%;
top: 66.4%;
left: 3.5%;
transform: scale(0.5, 0.5);
opacity: 0;
transition: transform 0.5s linear, opacity 0.5s linear;
}
.my-click-transiton {
opacity: 1;
transform: scale(1, 1);
}
</style>
<body class="Foamer2" style="display:flex;">
<!--界面跳转-->
<!--
<div style="border: 0px solid red;width: 24%;height: 0.2rem;top: 0%;margin-left:38%;cursor: pointer;" onclick="window.location.href = 'http://10.100.71.101:8012/system/Foamer?id=0';return false"></div>
-->
<!--订单执行-->
<div id="top-left">
</div>
<!--型号汇总统计-->
<div id="mid-left">
</div>
<!--生产统计数据-->
<div class="my-transition">
<div id="bottom-left" ></div>
</div>
<div class="my-transition2">
<div id="bottom-left-2" ></div>
</div>
<!--中间数据-->
<div id="top-mid">
<!--当时计划-->
<div class="top-mid-Text" style="position: absolute;top:2%;color: #6fd4ff;">
<span >-</span>
</div>
<div class="top-mid-Text" style="position: absolute;top:2%;left:7.7%;color: #6fd4ff;">
<span >-</span>
</div>
<div class="top-mid-Text" style="position: absolute;top:2%;left:14.9%;color: #6fd4ff;">
<span >-</span>
</div>
<div class="top-mid-Text" style="position: absolute;top:2%;left:22.3%;color: #6fd4ff;">
<span >-</span>
</div>
<!--当前计划-->
<div class="top-mid-Text" style="position: absolute;top:2%;left:36.5%; color: #6fff85;">
<span >-</span>
</div>
<div class="top-mid-Text" style="position: absolute;top:2%;left:43.8%; color: #6fff85;">
<span >-</span>
</div>
<div class="top-mid-Text" style="position: absolute;top:2%;left:51.1%; color: #6fff85;">
<span >-</span>
</div>
<div class="top-mid-Text" style="position: absolute;top:2%;left:58.4%; color: #6fff85;">
<span >-</span>
</div>
<!--实际产量-->
<div class="top-mid-Text" style="position: absolute;top:2%;left:72.3%; color: #ffff6d;">
<span >-</span>
</div>
<div class="top-mid-Text" style="position: absolute;top:2%;left:79.9%; color: #ffff6d;">
<span >-</span>
</div>
<div class="top-mid-Text" style="position: absolute;top:2%;left:87.3%; color: #ffff6d;">
<span >-</span>
</div>
<div class="top-mid-Text" style="position: absolute;top:2%;left:94.6%; color: #ffff6d;">
<span >-</span>
</div>
<!--当日计划-->
<div class="top-mid-Text" style="position: absolute;top:73%;left: 7%;">
<img alt="运行状态" id="status-a" src="../../static/img/runImg.png" th:src="@{/img/runImg.png}"/>
</div>
<!--当前计划-->
<div class="top-mid-Text" style="position: absolute;top:73%;left:23%">
<img alt="运行状态" id="status-b" src="../../static/img/runImg.png" th:src="@{/img/runImg.png}"/>
</div>
<div class="top-mid-Text" style="position: absolute;top:73%;left:39%">
<img alt="运行状态" id="status-c" src="../../static/img/runImg.png" th:src="@{/img/runImg.png}"/>
</div>
<div class="top-mid-Text" style="position: absolute;top:73%;left:55%">
<img alt="运行状态" id="status-d" src="../../static/img/runImg.png" th:src="@{/img/runImg.png}"/>
</div>
<!--运行状态-->
<div class="top-mid-Text" style="position: absolute;top:73%;left:77%">
<img alt="运行状态" id="status-sys1" src="../../static/img/runImg.png" th:src="@{/img/runImg.png}"/>
<!--<img alt="运行状态" src="../../static/img/stopImg.png" th:src="@{/img/stopImg.png}"/>-->
</div>
<div class="top-mid-Text" style="position: absolute;top:73%;left:95%">
<img alt="运行状态" id="status-sys2" src="../../static/img/runImg.png" th:src="@{/img/runImg.png}"/>
<!--<img alt="运行状态" src="../../static/img/stopImg.png" th:src="@{/img/stopImg.png}"/>-->
</div>
</div>
<!--发泡参数-->
<div id="top-right">
</div>
<!--工程不良-->
<div id="mid-right">
<div id="mid-right-left" style="border:none; width:33%;height:100%; float:left;"></div>
<div id="mid-right-right" style="position: absolute;left:33%;border:none;width:66%;height:100%; float:right;"></div>
</div>
<!--库存-->
<div id="bottom-right">
</div>
</body>
<script src="../../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
<script src="../../static/js/update-split-blocks.js" th:src="@{/js/update-split-blocks.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: echarts-js" />
<script src="../../static/js/date-time-common.js" th:src="@{/js/date-time-common.js}"></script>
<script src="../../static/js/autoscroll-table.js" th:src="@{/js/autoscroll-table.js}"></script>
<script src="../../static/js/auto-update.js" th:src="@{/js/auto-update.js}"></script>
<script>
//夹具生产计划切换
showalert();
window.setInterval(showalert, 1000*30);
function showalert()
{
var myTransition = $('.my-transition');
var myTransition2 = $('.my-transition2');
if (myTransition.hasClass('my-click-transiton')) {
myTransition.removeClass('my-click-transiton');
$('.my-transition2').addClass('my-click-transiton');
} else {
myTransition2.removeClass('my-click-transiton');
$('.my-transition').addClass('my-click-transiton');
}
}
const orderInfColumns = [
"型号",
"计划数",
"完成数",
"差异数",
"执行进度"
];
const orderInf = new AutoScrollTable(document.getElementById("top-left"), orderInfColumns, {
width: ['30%', '14.5%', '14.5%', '14.5%', '14.5%']
})
let selectors = []
let tmp = []
for (let i = 0; i < 12; i++) {
tmp.push(`#top-mid .top-mid-Text:nth-child(${i + 1}) span`)
if (tmp.length >= 4) {
selectors.push(tmp)
tmp = []
}
}
const planInfo = new AutoScrollTable(document.getElementById("bottom-left"), [], {
width: ["5%", null, "7%", "5%", "5%", "5%", "8%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%"],
})
const planInfo2 = new AutoScrollTable(document.getElementById("bottom-left-2"), [], {
width: ["5%", null, "7%", "5%", "5%", "5%", "8%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%", "4.2%"],
})
function updateStatus(id, status) {
const el = document.getElementById(id)
switch (status) {
case 0:
el.setAttribute("src", el.getAttribute("src").replace("runImg", "stopImg"))
break
case 1:
el.setAttribute("src", el.getAttribute("src").replace("stopImg", "runImg"))
break
}
}
$(() => {
autoUpdate('/system/FoamerMes/getOrderInfo2', INTERVAL, data => {
// orderInf.loadData(data, Object.keys(orderInfColumns))
orderInf.loadData(data.map(value => [getSC(value.orderType), value.plannedProduction, value.actualProduction, value.plannedProduction - value.actualProduction, `${orderAgv(value.plannedProduction,value.actualProduction)}%`]), Object.keys(orderInfColumns))
})
const orderAgv = function (plannedProduction,actualProduction) {
if(plannedProduction == 0){
return 0;
}
if(actualProduction == 0){
return 0;
}
return (actualProduction / plannedProduction * 100).toFixed(1)
}
autoUpdate('/system/FoamerMes/getHeader', INTERVAL, data => {
// let p = [data[1], data[0][2], data[0][3]]
let p = [data.plannedProduction, data.actualProduction, data.plannedProduction - data.actualProduction]
for (let i in p) {
updateSplitBlocks(p[i], selectors[i])
}
})
autoUpdate('/system/FoamerMes/getPlanHourInfo', INTERVAL, data => {
// orderInf.loadData(data, Object.keys(orderInfColumns))
let consolidatedRow = ["", "合计", ""]
for (let i = 3; i < 19; i++) {
if (i === 6) {
consolidatedRow.push(`${(consolidatedRow[5] / consolidatedRow[4] * 100).toFixed(1)}%`)
continue
}
let sum = 0
for (let j = 1; j < data.length; j++) {
let d = data[j][i]
if (!d || d === '') {
continue
}
if (typeof d === 'string') {
d = parseInt(d)
}
sum += d
}
consolidatedRow.push(sum.toString())
}
data.push(consolidatedRow)
planInfo.loadData(data, 19, {
includeHead: true,
})
//data.map(value => [value.orderType, value.plannedProduction, value.actualProduction, value.plannedProduction - value.actualProduction, `${(value.actualProduction / value.plannedProduction * 100).toFixed(2)}%`]
})
autoUpdate('/system/FoamerMes/getPlanHourInfo2', INTERVAL, data => {
// orderInf.loadData(data, Object.keys(orderInfColumns))
let consolidatedRow = ["", "合计", ""]
for (let i = 3; i < 19; i++) {
if (i === 6) {
consolidatedRow.push(`${(consolidatedRow[5] / consolidatedRow[4] * 100).toFixed(1)}%`)
continue
}
let sum = 0
for (let j = 1; j < data.length; j++) {
let d = data[j][i]
if (!d || d === '') {
continue
}
if (typeof d === 'string') {
d = parseInt(d)
}
sum += d
}
consolidatedRow.push(sum.toString())
}
data.push(consolidatedRow)
planInfo2.loadData(data, 19, {
includeHead: true,
})
})
autoUpdate('/system/FoamerMes/getProductPlanInfo', INTERVAL, data => {
modelChart.setOption({
xAxis: {
data: data['xAxisInfo'].map(value => getSC(value)),
},
series: [
{
name: '数量',
data: data['seriesInfo'],
},
// {
// name: '数量_',
// data: data['seriesInfo'],
// }
]
})
})
autoUpdate('/system/FoamerMes/getInventoryInfo', INTERVAL, data => {
repertoryChart.setOption({
xAxis: {
data: data['xAxisInfo'].map(value => value.split(",").find(value => /^[Ss][Cc]/.test(value)) ?? value),
axisLabel: {
rotate: -30,
},
},
series: [
{
name: '数量',
data: data['seriesInfo'],
},
]
})
})
autoUpdate('/system/FoamerMes/getDeviceInfo', INTERVAL, data => {
console.log(data)
updateStatus("status-a", data.status)
updateStatus("status-b", data.status2)
updateStatus("status-c", data.status3)
updateStatus("status-d", data.status4)
})
autoUpdate('/system/FoamerMes/getFoamDeviceInfo?deviceId='+"HF202009858", INTERVAL, data => {
updateStatus("status-sys1", data.status)
updateStatus("status-sys2", data.status2)
})
autoUpdate('/system/FoamerMes/getFoamTemp', INTERVAL, res => {
myEcharts(res,document.getElementById("top-right"));
})
autoUpdate("/system/FoamerMes/flawRate", INTERVAL, data => {
const total = data[0]
const flaw = data[1]
const rate = flaw / total
rejectRatioChart.setOption({
series: [
{
name: '不良率',
data: [
{value: 22, name: `3%`},
{value: 78, name: ''},
],
}
]
})
})
autoUpdate("/system/FoamerMes/flawInfo", INTERVAL, data => {
let d = {}
for (let entry of data) {
if (!d[entry.itemName]) {
d[entry.itemName] = 0
}
d[entry.itemName] += parseFloat(entry.count)
}
data = []
for (let entry of Object.entries(d)) {
data.push({
name: entry[0],
value: entry[1],
})
}
pieChart.setOption({
series: [
{
name: '数量',
data: data,
label:{
normal:{
show: true,
position: 'top',
color: '#02FEA9'
}
}
}
]
})
})
})
const modelChart = echarts.init(document.getElementById("mid-left"))
modelChart.setOption({
color: ['#4499CE'],
xAxis: {
type: 'category',
axisLabel: {
color: '#ffffff',
fontSize:'10',
rotate: -30,
},
},
yAxis: {
type: 'value',
axisLabel: {
color: '#ffffff'
},
splitLine: {
show: false,
},
interval:90,
},
series : [
{
name:'数量',
type:'bar',
barWidth: 16,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{offset: 0, color: '#0F8EEF'},
{offset: 1, color: '#0E35EF'}
]
)
},
emphasis: {
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{offset: 0, color: '#0F8EEF'},
{offset: 1, color: '#0E35EF'}
]
)
}
},
label:{
normal:{
show: true,
position: 'top',
color: '#0F8EEF'
}
}
}],
grid: {
left: 10,
top: 20,
right: 10,
bottom: 2,
containLabel: true,
},
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
},
},
})
const repertoryChart = echarts.init(document.getElementById("bottom-right"))
repertoryChart.setOption({
color: ['#4499CE'],
xAxis: {
type: 'category',
axisLabel: {
fontSize:'10px',
color: '#ffffff'
}
},
yAxis: {
type: 'value',
axisLabel: {
color: '#ffffff'
},
splitLine: {
show: false,
},
interval:15,
},
series : [
{
name:'数量',
type:'bar',
barWidth: 16,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{offset: 0, color: '#2FDE80'},
{offset: 1, color: '#2FDECA'}
]
)
},
emphasis: {
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{offset: 0, color: '#2FDECA'},
{offset: 1, color: '#2FDE80'}
]
)
}
},
label:{
normal:{
show: true,
position: 'top',
color: '#02FEA9'
}
}
}],
grid: {
left: 10,
top: 20,
right: 15,
bottom: 2,
containLabel: true,
},
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
},
},
})
const rejectRatioChart = echarts.init(document.getElementById("mid-right-left"))
rejectRatioChart.setOption({
title: {
text: '不良率',
left: 'center',
bottom: "-1%",
textStyle: {
color: '#ccc',
fontSize: "10%",
}
},
color: [
"#00EAFF",
"#063E63"
],
series: [
{
name: '不良率',
type: 'pie',
radius: ['55%', '70%'],
avoidLabelOverlap: false,
label: {
show: true,
position: 'center',
fontSize: "13%",
color: '#00EAFF',
},
labelLine: {
show: false
},
}
]
})
const pieChart = echarts.init(document.getElementById("mid-right-right"))
pieChart.setOption({
tooltip: {
trigger: 'item'
},
color: [
"#FF5C5D",
"#1FD8F4",
"#5cff2d",
"#d858ff",
"#ffd326",
"#5698ff",
],
series: [
{
name: '数量',
type: 'pie',
radius: ['55%', '70%'],
label: {
show: true,
formatter: '{b}\n{d}%',
textStyle: {
fontSize: '10px',
},
color: '#ddd'
},
labelLine: {
show: true,
length: 2,
length2: 0,
maxSurfaceAngle: 90,
},
labelLayout(params) {
const isLeft = params.labelRect.x < myChart.getWidth() / 2;
const points = params.labelLinePoints;
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
},
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
})
function resize() {
orderInf.resize()
planInfo.resize()
planInfo2.resize()
modelChart.resize()
repertoryChart.resize()
rejectRatioChart.resize()
pieChart.resize()
}
window.onresize = resize
$(() => {
resize()
})
</script>
<script type="text/javascript">
const myEcharts = (res,ids) =>{
let charts = echarts.init(ids);
let option = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
textStyle: {
color: "#fff",
},
},
},
grid: {
left: "2%",
right: "5%",
bottom: "3%",
containLabel: true,
},
legend: {
icon: "rect",
itemWidth: 14,
itemHeight: 5,
itemGap: 13,
data: res.legend,
right: "4%",
textStyle: {
fontSize: 12,
color: "#F1F1F3",
},
},
calculable: true,
xAxis: [
{
type: "category",
axisLine: {
lineStyle: {
color: "#90979c",
},
},
splitLine: {
show: false,
},
axisLabel:{
show: true,
},
axisTick: {
show: true,
},
data: res.xAxis,
},
],
yAxis: [
{
type: "value",
name:"℃",
nameTextStyle:{
color:'rgba(219,225,255,1)'
},
axisLabel: {
textStyle: {
color: "rgba(219,225,255,1)",
margin: 15
},
},
axisTick: {
show: false,
},
axisLine: {
show: true,
lineStyle: {
color: "rgba(219,225,255,1)",
width: 1,
type: "solid"
},
},
splitLine: {//分割线配置
show:false,
lineStyle: {
color: "rgba(219,225,255,1)",
}
},
interval:20,
},
],
series: res.series,
};
charts.setOption(option);
$(window).resize(charts.resize);
}
</script>
</html>

@ -1,76 +1,60 @@
package com.ruoyi.system.domain;
import java.util.Date;
public class OrderInfo {
private String orderType;
private String plan_code;
private String name;
private int plan_number;
private int actual_number;
private double rate;
private String day;
private String materialType;
private long plannedProduction;
private long actualProduction;
private long recordTime;
private Date endTime;
private String planDate;
public String getOrderType() {
return orderType;
public String getName() {
return name;
}
public void setOrderType(String orderType) {
this.orderType = orderType;
public void setName(String name) {
this.name = name;
}
public String getMaterialType() {
return materialType;
public double getRate() {
return rate;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
public void setRate(double rate) {
this.rate = rate;
}
public long getPlannedProduction() {
return plannedProduction;
public String getPlan_code() {
return plan_code;
}
public void setPlannedProduction(long plannedProduction) {
this.plannedProduction = plannedProduction;
public void setPlan_code(String plan_code) {
this.plan_code = plan_code;
}
public long getActualProduction() {
return actualProduction;
public int getPlan_number() {
return plan_number;
}
public void setActualProduction(long actualProduction) {
this.actualProduction = actualProduction;
public void setPlan_number(int plan_number) {
this.plan_number = plan_number;
}
public long getRecordTime() {
return recordTime;
public int getActual_number() {
return actual_number;
}
public void setRecordTime(long recordTime) {
this.recordTime = recordTime;
public void setActual_number(int actual_number) {
this.actual_number = actual_number;
}
public Date getEndTime() {
return endTime;
public String getDay() {
return day;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getPlanDate() {
return planDate;
}
public void setPlanDate(String planDate) {
this.planDate = planDate;
public void setDay(String day) {
this.day = day;
}
}

@ -20,7 +20,21 @@ public interface BroadDataMapper {
List<BoxOutput> selectOutputByType();
List<OrderInfo> getUHullPlanInfo();
List<OrderInfo> getUHullPlanInfo(String id);
List<BoxOutput> selectOutputByTime();
///////////////////////////////////////////////////////////////////////////
// 发泡线
///////////////////////////////////////////////////////////////////////////
List<OrderInfo> fp_selectOrderInfo();
///////////////////////////////////////////////////////////////////////////
// 泡前库
///////////////////////////////////////////////////////////////////////////
// 成品入库
List<BoxOutput> pqk_selectProductInStore();
List<OrderInfo> pqk_selectOrderInfo();
}

@ -17,7 +17,20 @@ public interface IBroadDataService {
List<BoxOutput> selectOutputByType();
List<OrderInfo> getUHullPlanInfo();
List<OrderInfo> getUHullPlanInfo(String id);
List<BoxOutput> selectOutputByTime();
List<OrderInfo> fp_selectOrderInfo();
// 泡前库 成品入库
List<BoxOutput> pqk_selectProductInStore();
//泡前库 订单完成率
List<OrderInfo> pqk_selectOrderInfo();
}

@ -39,12 +39,39 @@ public class BroadDataServiceImpl implements IBroadDataService
}
@Override
public List<OrderInfo> getUHullPlanInfo() {
return mapper.getUHullPlanInfo();
public List<OrderInfo> getUHullPlanInfo(String id) {
return mapper.getUHullPlanInfo(id);
}
@Override
public List<BoxOutput> selectOutputByTime() {
return mapper.selectOutputByTime();
}
///////////////////////////////////////////////////////////////////////////
// 发泡线
///////////////////////////////////////////////////////////////////////////
@Override
public List<OrderInfo> fp_selectOrderInfo(){
return mapper.fp_selectOrderInfo();
}
///////////////////////////////////////////////////////////////////////////
// 泡前库
///////////////////////////////////////////////////////////////////////////
// 成品入库
@Override
public List<BoxOutput> pqk_selectProductInStore(){
return mapper.pqk_selectProductInStore();
}
@Override
public List<OrderInfo> pqk_selectOrderInfo() {
return mapper.pqk_selectOrderInfo();
}
}

@ -71,39 +71,93 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and PROCESS_CODE = 1002
group by MATERIAL_NAME
</select>
<resultMap type="com.ruoyi.system.domain.OrderInfo" id="OrderInfoResult">
<result property="orderType" column="order_type" />
<result property="materialType" column="material_type" />
<result property="plannedProduction" column="planned_production" />
<result property="actualProduction" column="actual_production" />
<result property="recordTime" column="record_Time" />
<result property="endTime" column="end_time" />
<result property="planDate" column="plan_date"/>
</resultMap>
<select id="getUHullPlanInfo" resultMap="OrderInfoResult">
select sysdate as end_Time,
case when instr(Material_Name, ',',instr(Material_Name, 'SC', 1, 1), 1)=0
then substr(Material_Name, instr(Material_Name, 'SC', 1, 1))
else substr(Material_Name, instr(Material_Name, 'SC', 1, 1),
instr(Material_Name, ',',instr(Material_Name, 'SC', 1, 1), 1)-instr(Material_Name, 'SC', 1, 1)) end as material_type,
PLAN_NO as order_type,
SUM(PLAN_QTY) as planned_production,
SUM(ACTUAL_QTY) as actual_production
<select id="getUHullPlanInfo" resultType="com.ruoyi.system.domain.OrderInfo">
select PLAN_NO as plan_code,
SUM(PLAN_QTY) as plan_number,
SUM(ACTUAL_QTY) as actual_number,
to_char(sysdate , 'yyyy-MM-dd') as day
from IMOS_PR_PLAN t
where process_code = '1002'
and detial_type_code = '1002'
where process_code = #{id}
and delete_flag = '0'
and to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
group by PLAN_NO, MATERIAL_NAME
group by PLAN_NO
order by PLAN_NO desc
</select>
<select id="selectOutputByTime" resultType="com.ruoyi.system.domain.BoxOutput">
select TO_CHAR(CREATION_DATE, 'hh24') as name ,Count(TASK_ID) as qty
from IMOS_LO_TASK_HISTORY
where detial_type_code = '1002' and TASK_TYPE='I'
where detial_type_code = '1002' and TASK_TYPE !='O'
and TO_CHAR(CREATION_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD')
group by TO_CHAR(CREATION_DATE, 'hh24')
order by TO_CHAR(CREATION_DATE, 'hh24')
</select>
<select id="fp_selectOrderInfo" resultType="com.ruoyi.system.domain.OrderInfo">
select substr(MATERIAL_NAME,
case
when instr(MATERIAL_NAME, '/', 1, 1) = 0 then instr(MATERIAL_NAME, ',', 1, 1) + 1
else instr(MATERIAL_NAME, '/', 1, 1) + 1
end,
case
when instr(MATERIAL_NAME, ',', 1, 2) = 0 then Length(MATERIAL_NAME) + 1
else instr(MATERIAL_NAME, ',', 1, 2)
end
-
case
when instr(MATERIAL_NAME, '/', 1, 1) = 0 then instr(MATERIAL_NAME, ',', 1, 1) + 1
else instr(MATERIAL_NAME, '/', 1, 1) + 1
end) as name,
sum(PLAN_QTY) as plan_number,
SUM(ACTUAL_QTY) as actual_number
from IMOS_PR_PLAN
where to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
and DETIAL_TYPE_CODE = '1001'
and delete_flag = '0'
-- and PLAN_STATE !=8
group by MATERIAL_NAME
</select>
<select id="pqk_selectProductInStore" resultType="com.ruoyi.system.domain.BoxOutput">
select MATERIAL_NAME as name ,
IN_QTY as qty
from IMOS_PR_PRODUCT_IN
where TO_CHAR(CREATION_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD')
</select>
<select id="pqk_selectOrderInfo" resultType="com.ruoyi.system.domain.OrderInfo">
select plan_code,
plan_number,
actual_number,
day,
round(actual_number/ plan_number * 100, 2) as rate
from (
select ORDER_NO as plan_code,
sum(PLAN_QTY) as plan_number,
SUM(ACTUAL_QTY) as actual_number,
to_char(sysdate, 'yyyy-MM-dd') as day
from IMOS_PR_PLAN
where DETIAL_TYPE_CODE = 1004
and TO_CHAR(CREATION_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD')
group by ORDER_NO
)
order by rate desc
</select>
<!-- 通过入库查订单 select ORDER_NO as name,
round(SUM(ACTUAL_QTY) / sum(PLAN_QTY) * 100, 2) as qty
from IMOS_PR_PLAN
where ORDER_NO in (
select IMOS_PR_PRODUCT_IN.ORDER_NO
from IMOS_PR_PRODUCT_IN
where TO_CHAR(CREATION_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD')
)
group by ORDER_NO
order by plan_number desc-->
</mapper>
Loading…
Cancel
Save