修改铝内胆成型线

master
夜笙歌 2 years ago
parent ee16671a9a
commit 5cbb324c4d

@ -53,12 +53,6 @@ public class FoamBoxController {
case 1: case 1:
mmap.put("positionId",1); mmap.put("positionId",1);
break; break;
case 2:
mmap.put("positionId",2);
break;
case 3:
mmap.put("positionId",3);
break;
default: default:
break; break;
} }

@ -0,0 +1,239 @@
package com.productionboard.controller;
import com.alibaba.fastjson.JSONArray;
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.service.IFoamBoxDeviceInfoService;
import com.productionboard.service.IMesProductionDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author WenJY
* @date 20220420 11:03
*/
@Controller
@RequestMapping("/foamBox2")
public class FoamBoxController2 {
@Autowired
private IMesProductionDataService iMesProductionDataService;
@Autowired
private IFoamBoxDeviceInfoService ifamBoxDeviceInfoService;
private String prefix = "foamBox/index2";
/**
* id:0-线1-线
* @author WenJY
* @date 2022-06-10 13:57
* @param id
* @param mmap
* @return java.lang.String
*/
@GetMapping()
public String index(@RequestParam("id") int id,ModelMap mmap)
{
switch (id) {
case 0:
mmap.put("positionId",0);
break;
case 1:
mmap.put("positionId",1);
break;
default:
break;
}
return prefix;
}
/**
*
* @author WenJY
* @date 2022-06-09 16:38
* @return java.lang.String
*/
@GetMapping("/getTeamStatisticsJson")
@ResponseBody
public String getTeamStatisticsJson(String ids){
String type=(ids.equals("0"))?"1029":"1012";
// List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList(type);
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1010");
if(mesTeamStatisticsList.size()>0){
return JSONArray.toJSONString(mesTeamStatisticsList.get(0));
}
return JSONArray.toJSONString(new MesTeamStatistics());
}
/**
* 线
* @author WenJY
* @date 2022-06-10 14:57
* @param ids
* @return java.lang.String
*/
@GetMapping("/getRunStatusJson")
@ResponseBody
public String getRunStatusJson(String ids){
System.out.println("发泡机状态"+ids);
String runStatus = ifamBoxDeviceInfoService.getRunStatus(ids);
return runStatus;
}
/**
* ISOPOL
* @author WenJY
* @date 2022-06-10 14:58
* @param ids
* @return java.lang.String
*/
@GetMapping("/getParamTemperature")
@ResponseBody
public String getParamTemperature(String ids){
String s = ifamBoxDeviceInfoService.getParamTemperature(ids);
return s;
}
/**
*
* @author WenJY
* @date 2022-06-10 17:08
* @param ids
* @return java.lang.String
*/
@GetMapping("/getMouldTemperature")
@ResponseBody
public String getMouldTemperature(String ids){
String s = ifamBoxDeviceInfoService.getMouldTemperature(ids,0);
return s;
}
@GetMapping("/getMouldTemperature2")
@ResponseBody
public String getMouldTemperature2(String ids){
String s = ifamBoxDeviceInfoService.getMouldTemperature(ids,1);
return s;
}
/**
* MES
* @author WenJY
* @date 2022-06-09 16:54
* @return java.lang.String
* Proce_Code =1029 线
* Proce_Code =1012 线
*/
@GetMapping("/getHourProdutionJson")
@ResponseBody
public String getHourProdutionStatisticsJson(String ids){
System.out.println("通过工位号获取MES小时产量:"+ids);
String type=(ids.equals("0"))?"1029":"1012";
List<MesHourProdutionStatistics> mesHourProdutionStatisticsList =
iMesProductionDataService.getMesHourProdutionStatisticsListType("1010",type);
if(mesHourProdutionStatisticsList.size()>0){
return JSONArray.toJSONString(mesHourProdutionStatisticsList);
}
return JSONArray.toJSONString(new ArrayList<MesHourProdutionStatistics>());
}
/**
* MES
* @author WenJY
* @date 2022-06-09 17:06
* @return java.lang.String
*/
@GetMapping("/getMaterialProdutionJson")
@ResponseBody
public String getMaterialProdutionStatisticsJson(String ids){
String type=(ids.equals("0"))?"1029":"1012";
List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList =
iMesProductionDataService.getMesMaterialProductionStatisticsListType("1010",type);
return JSONArray.toJSONString(mesMaterialProductionStatisticsList);
}
/**
* MES
* @author WenJY
* @date 2022-06-09 17:18
* @return java.lang.String
*/
@GetMapping("/getMaterialStoreJson")
@ResponseBody
public String getMesMaterialStoreStatisticsJson(){
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList =
iMesProductionDataService.getMesMaterialStoreStatisticsList("1010");
return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
}
// /**
// * 根据型号统计产量
// *
// * @author WenJY
// * @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;
// }
// /**
// * 库存 统计
// *
// * @author WenJY
// * @date 2022/4/20 10:16
// * @return java.lang.String
// */
// @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;
// }
}

@ -140,15 +140,3 @@ const deviceStatus = (statusArray) => {
$(".foamingLineRunStatus table tr").append(info); $(".foamingLineRunStatus table tr").append(info);
} }
const deviceStatus2 = (statusArray) => {
let info = `
<img src="../../img/foamBox/${statusArray[0] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:34%;width: 2vw;"/>
<img src="../../img/foamBox/${statusArray[1] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:45%;width: 2vw;"/>
<img src="../../img/foamBox/${statusArray[4] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:60%;width: 2vw;"/>
<img src="../../img/foamBox/${statusArray[5] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:68%;width: 2vw;"/>
`;
$(".foamingLineRunStatus table tr").append(info);
}

@ -3,12 +3,13 @@ $(() => {
let fun = () => { let fun = () => {
//班组计划统计 //班组计划统计
$.getJSON(`/foamBox/getTeamStatisticsJson?ids=${ids}`, function (result) { $.getJSON(`/foamBox/getTeamStatisticsJson?ids=${ids}`, function (result) {
console.log(result)
onDutyPlan(result.planAmount, result.actualAmount, result.planAmount - result.actualAmount) onDutyPlan(result.planAmount, result.actualAmount, result.planAmount - result.actualAmount)
}); });
//设备运行状态 //设备运行状态
$.getJSON(`/foamBox/getRunStatusJson?ids=${ids}`, function (result) { $.getJSON(`/foamBox/getRunStatusJson?ids=${ids}`, function (result) {
deviceStatus(result); deviceStatus(result);
}); });
// deviceStatus([1,1,1,1,1,1]); // deviceStatus([1,1,1,1,1,1]);
@ -122,12 +123,11 @@ const temperature = (res, ids) => {
mycharts.setOption(option); mycharts.setOption(option);
$(window).resize(mycharts.resize); $(window).resize(mycharts.resize);
} }
const deviceStatus = (statusArray) => { const deviceStatus = (statusArray) => {
let info = ` let info = `
<img src="../../img/foamBox/${statusArray[0] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:34%;width: 2vw;"/> <img src="../../img/foamBox/${statusArray[0] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:34%;width: 2vw;"/>
<img src="../../img/foamBox/${statusArray[1] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:40%;width: 2vw;"/> <img src="../../img/foamBox/${statusArray[1] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:45%;width: 2vw;"/>
<img src="../../img/foamBox/${statusArray[2] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:45%;width: 2vw;"/>
<img src="../../img/foamBox/${statusArray[3] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:51%;width: 2vw;"/>
<img src="../../img/foamBox/${statusArray[4] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:60%;width: 2vw;"/> <img src="../../img/foamBox/${statusArray[4] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:60%;width: 2vw;"/>
<img src="../../img/foamBox/${statusArray[5] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:68%;width: 2vw;"/> <img src="../../img/foamBox/${statusArray[5] == 1 ? "deviceopen.png" : "deviceclose.png"}" style="position: absolute;transform: translate(-50%,-50%);top:30%;left:68%;width: 2vw;"/>
`; `;
@ -135,4 +135,3 @@ const deviceStatus = (statusArray) => {
$(".foamingLineRunStatus table tr").append(info); $(".foamingLineRunStatus table tr").append(info);
} }

@ -64,18 +64,6 @@
}); });
const ids = [[${positionId}]]; const ids = [[${positionId}]];
if (ids === 2 || ids === 3) {
console.log($('body'))
$('body').css(
{
backgroundColor: 'aquamarine',
background: 'url(../../img/foamBox/foamBoxbackground2.jpg)',
backgroundPosition: 'center center',
backgroundRepeat: 'no-repeat',
backgroundAttachment: 'fixed',
backgroundSize: '100% 100%',
})
}
// let info = ` // let info = `
// <td style="border:0px solid red;text-align:center;"><img src="${true ? '../../img/foamBox/deviceopen.png' :'../../img/foamBox/deviceopen.png'}" style="width: 30px;height: 30px;"/></td> // <td style="border:0px solid red;text-align:center;"><img src="${true ? '../../img/foamBox/deviceopen.png' :'../../img/foamBox/deviceopen.png'}" style="width: 30px;height: 30px;"/></td>

@ -1,12 +1,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>发泡和发泡线数据展示平台</title> <title>发泡和发泡线数据展示平台</title>
<link rel="stylesheet" href="../../../css/common/ondutyplan.css"> <link href="../../../css/common/ondutyplan.css" rel="stylesheet">
<link rel="stylesheet" href="../../../css/foamBox/style.css"> <link href="../../../css/foamBox/style.css" rel="stylesheet">
<link rel="stylesheet" href="../../../css/common/swiper-bundle.min.css"> <link href="../../../css/common/swiper-bundle.min.css" rel="stylesheet">
<script src="../../../js/common/swiper-bundle.min.js"></script> <script src="../../../js/common/swiper-bundle.min.js"></script>
<script src="../../../js/common/jquery.min.js"></script> <script src="../../../js/common/jquery.min.js"></script>
<script src="../../../js/common/echarts.min.js"></script> <script src="../../../js/common/echarts.min.js"></script>
@ -64,6 +64,15 @@
}); });
const ids = [[${positionId}]]; const ids = [[${positionId}]];
$('body').css(
{
backgroundColor: 'aquamarine',
background: 'url(../../img/foamBox/foamBoxbackground2.jpg)',
backgroundPosition: 'center center',
backgroundRepeat: 'no-repeat',
backgroundAttachment: 'fixed',
backgroundSize: '100% 100%',
})
// let info = ` // let info = `
// <td style="border:0px solid red;text-align:center;"><img src="${true ? '../../img/foamBox/deviceopen.png' :'../../img/foamBox/deviceopen.png'}" style="width: 30px;height: 30px;"/></td> // <td style="border:0px solid red;text-align:center;"><img src="${true ? '../../img/foamBox/deviceopen.png' :'../../img/foamBox/deviceopen.png'}" style="width: 30px;height: 30px;"/></td>
Loading…
Cancel
Save