修改 铝内胆设备看板

master
wangh 2 years ago
parent 05508723b0
commit bf1e971272

@ -67,8 +67,9 @@ public class FoamBoxController {
*/
@GetMapping("/getTeamStatisticsJson")
@ResponseBody
public String getTeamStatisticsJson(){
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002");
public String getTeamStatisticsJson(String ids){
String type=(ids.equals("0"))?"1029":"1012";
List<MesTeamStatistics> mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList(type);
if(mesTeamStatisticsList.size()>0){
return JSONArray.toJSONString(mesTeamStatisticsList.get(0));
}
@ -85,6 +86,7 @@ public class FoamBoxController {
@GetMapping("/getRunStatusJson")
@ResponseBody
public String getRunStatusJson(String ids){
System.out.println("发泡机状态"+ids);
String runStatus = ifamBoxDeviceInfoService.getRunStatus(ids);
return runStatus;
@ -133,11 +135,16 @@ public class FoamBoxController {
* @author WenJY
* @date 2022-06-09 16:54
* @return java.lang.String
* Proce_Code =1029 线
* Proce_Code =1012 线
*/
@GetMapping("/getHourProdutionJson")
@ResponseBody
public String getHourProdutionStatisticsJson(){
List<MesHourProdutionStatistics> mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002");
public String getHourProdutionStatisticsJson(String ids){
System.out.println("通过工位号获取MES小时产量:"+ids);
String type=(ids.equals("0"))?"1029":"1012";
List<MesHourProdutionStatistics> mesHourProdutionStatisticsList =
iMesProductionDataService.getMesHourProdutionStatisticsList(type);
if(mesHourProdutionStatisticsList.size()>0){
return JSONArray.toJSONString(mesHourProdutionStatisticsList);
}
@ -152,9 +159,10 @@ public class FoamBoxController {
*/
@GetMapping("/getMaterialProdutionJson")
@ResponseBody
public String getMaterialProdutionStatisticsJson(){
List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002");
public String getMaterialProdutionStatisticsJson(String ids){
String type=(ids.equals("0"))?"1029":"1012";
List<MesMaterialProductionStatistics> mesMaterialProductionStatisticsList =
iMesProductionDataService.getMesMaterialProductionStatisticsList(type);
return JSONArray.toJSONString(mesMaterialProductionStatisticsList);
}
@ -168,7 +176,9 @@ public class FoamBoxController {
@GetMapping("/getMaterialStoreJson")
@ResponseBody
public String getMesMaterialStoreStatisticsJson(){
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1002");
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList =
iMesProductionDataService.getMesMaterialStoreStatisticsList("B001");
return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
}

@ -1,7 +1,7 @@
$(() => {
//班组计划统计
$.getJSON('/foamBox/getTeamStatisticsJson', function (result) {
$.getJSON(`/foamBox/getTeamStatisticsJson?ids=${ids}`, function (result) {
onDutyPlan(result.planAmount, result.actualAmount, result.differenceAmount,)
});
@ -18,12 +18,12 @@ $(() => {
});
//按型号统计产量
$.getJSON('/foamBox/getMaterialProdutionJson', function (result) {
$.getJSON(`/foamBox/getMaterialProdutionJson?ids=${ids}`, function (result) {
horizontalBarChart(result, document.getElementById("statisticalOutputByModel"));
});
//小时产量
$.getJSON('/foamBox/getHourProdutionJson', function (result) {
$.getJSON(`/foamBox/getHourProdutionJson?ids=${ids}`, function (result) {
brokenLineAreaDiagram(result, document.getElementById("hourlyOutputStatistics"));
});

@ -49,6 +49,7 @@
</div>
</div>
</div>
</div>
</body>
<script src="../../../js/foamBox/index.js"></script>
<script>
@ -61,7 +62,7 @@
disableOnInteraction: false,
},
});
const ids = [[${positionId}]];
// let info = `
@ -73,6 +74,7 @@
// <td style="border:0px solid red;text-align:right;"><img src="${true ? '../../img/foamBox/deviceopen.png' :'../../img/foamBox/deviceopen.png'}" style="width: 30px;height: 30px;"/></td>
// `;
// $(".foamingLineRunStatus table tr").append(info);
</script>
</html>

@ -79,7 +79,7 @@ const horizontalBarChart = (res, ids) => {
},
grid: {
top: "9%",
left: "-30%",
left: "0%",
right: "4%",
bottom: "3%",
containLabel: true,
@ -137,24 +137,24 @@ const horizontalBarChart = (res, ids) => {
data: dataFormat(yValue),
},
{
type: "category",
inverse: true,
offset: -10,
position: "left",
axisTick: "none",
axisLine: "none",
show: true,
axisLabel: {
interval: 0,
color: ["#A8A6AB"],
align: "left",
verticalAlign: "bottom",
lineHeight: 32,
fontSize: 12,
},
data: dataFormat(xValue),
},
// {
// type: "category",
// inverse: true,
// offset: -10,
// position: "left",
// axisTick: "none",
// axisLine: "none",
// show: true,
// axisLabel: {
// interval: 0,
// color: ["#A8A6AB"],
// align: "left",
// verticalAlign: "bottom",
// lineHeight: 32,
// fontSize: 12,
// },
// data: dataFormat(xValue),
// },
],
series: [
{
@ -170,11 +170,16 @@ const horizontalBarChart = (res, ids) => {
},
},
label: {
show: false,
show: true,
fontSize: 12,
color: "#A8A6AB",
textBorderWidth: 2,
padding: [2, 0, 0, 0],
position:'insideTopLeft',
padding: [-20, 0, 0, 0],
formatter:function (params) {
console.log(dataFormat(xValue)[params[`dataIndex`]])
return dataFormat(xValue)[params[`dataIndex`]].value
}
},
},
{

@ -49,6 +49,7 @@
</div>
</div>
</div>
</div>
</body>
<script src="../../../js/foamBox/index.js"></script>
<script>
@ -61,7 +62,7 @@
disableOnInteraction: false,
},
});
const ids = [[${positionId}]];
// let info = `
@ -73,6 +74,7 @@
// <td style="border:0px solid red;text-align:right;"><img src="${true ? '../../img/foamBox/deviceopen.png' :'../../img/foamBox/deviceopen.png'}" style="width: 30px;height: 30px;"/></td>
// `;
// $(".foamingLineRunStatus table tr").append(info);
</script>
</html>
Loading…
Cancel
Save