From bf1e9712726bc3214bbcd5a753c7ff6d442e7b6e Mon Sep 17 00:00:00 2001 From: wangh <123456> Date: Fri, 30 Sep 2022 16:52:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=93=9D=E5=86=85?= =?UTF-8?q?=E8=83=86=E8=AE=BE=E5=A4=87=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FoamBoxController.java | 26 +++++++--- .../main/resources/static/js/foamBox/index.js | 6 +-- .../resources/templates/foamBox/index.html | 4 +- .../controller/FoamBoxController.class | Bin 5457 -> 6128 bytes .../static/js/common/echarts.common.js | 47 ++++++++++-------- .../classes/templates/foamBox/index.html | 4 +- 6 files changed, 53 insertions(+), 34 deletions(-) diff --git a/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java b/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java index 536d357..c96b4c3 100644 --- a/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java +++ b/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java @@ -67,8 +67,9 @@ public class FoamBoxController { */ @GetMapping("/getTeamStatisticsJson") @ResponseBody - public String getTeamStatisticsJson(){ - List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); + public String getTeamStatisticsJson(String ids){ + String type=(ids.equals("0"))?"1029":"1012"; + List 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 mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002"); + public String getHourProdutionStatisticsJson(String ids){ + System.out.println("通过工位号获取MES小时产量:"+ids); + String type=(ids.equals("0"))?"1029":"1012"; + List 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 mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); + public String getMaterialProdutionStatisticsJson(String ids){ + String type=(ids.equals("0"))?"1029":"1012"; + List mesMaterialProductionStatisticsList = + iMesProductionDataService.getMesMaterialProductionStatisticsList(type); return JSONArray.toJSONString(mesMaterialProductionStatisticsList); } @@ -168,7 +176,9 @@ public class FoamBoxController { @GetMapping("/getMaterialStoreJson") @ResponseBody public String getMesMaterialStoreStatisticsJson(){ - List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1002"); + + List mesMaterialStoreStatisticsList = + iMesProductionDataService.getMesMaterialStoreStatisticsList("B001"); return JSONArray.toJSONString(mesMaterialStoreStatisticsList); } diff --git a/productionboard/src/main/resources/static/js/foamBox/index.js b/productionboard/src/main/resources/static/js/foamBox/index.js index 18b021c..534791c 100644 --- a/productionboard/src/main/resources/static/js/foamBox/index.js +++ b/productionboard/src/main/resources/static/js/foamBox/index.js @@ -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")); }); diff --git a/productionboard/src/main/resources/templates/foamBox/index.html b/productionboard/src/main/resources/templates/foamBox/index.html index e40df48..044cd87 100644 --- a/productionboard/src/main/resources/templates/foamBox/index.html +++ b/productionboard/src/main/resources/templates/foamBox/index.html @@ -49,6 +49,7 @@ + \ No newline at end of file diff --git a/productionboard/target/classes/com/productionboard/controller/FoamBoxController.class b/productionboard/target/classes/com/productionboard/controller/FoamBoxController.class index ca996e9fe7b16069197c18c2859678af031fd3f5..df193fd53c2ba925630ba3152b104f5bea74a50e 100644 GIT binary patch literal 6128 zcmb_g>vt688UIZ-VK9>C9$A0Nop?XgLgtn)@cV;rXvzZO?=$^AP`(B>s z`906`K9_g@_P<*n0cgix!dQ<~2v3!w4n_#+Fid2^IEhmsoDO3WXF@m|!neixxiWkQ z-z~#=JS`s2gz-ImKZqZMQHfM3euxV}{3wj2g5i(F`&se$NfnlXqL$3QWNmH9p4`^v^B%y9kCUsL0{L>OT`*mYH zmQER3a(v8CCe%~9aUwRND#>(gOc^zGV=|_=1hMTIQ$M8{YMg8z(8iRBUj6h=RRHWu zj_HfVx=Z&bB-14+LmksjONjIzS57LigpwSO4VwaJZYIM;KJsU|t4Y&%B1C&K0EIU1W6&3m8vR7Opk78_x#lS(2( zFDxHd&Hbt}K{ZS*ZEBqHyUDaIeOP*v@vzWQt z7#H^oI^UJ>FwgF&x=Rzqqf+rG-njePt$#f`efRv+GOpu>jA@JnF(cz9W@R*CV-UAw+{R8B`^4jM z{8_@f&(2@@^y3S6X5Rkf!{_cy&3yX&%$=!M1|A*0b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Gh+`uw})haB*Z}CBSABf2?1XSVn8J^1HlIh#Mi_C4nhVqAqG)8 zQSlKTg3W8AZrni?TCvndh`~5sSb#&dx3q?`phgvFr~0)Uv4ayIW(HzpXnYM$sNw-i=!InF{N<< zQ`2467l!+XzT}Q9Tz=-a2KO)fdz!y&YNWV81cnenVL4|v@ZHR}AqmTTtc`1$ewNO$ z&AnLDlwLuf#U0=|QLfw;!~hB0j&{xz(&*q?oBLDER<*)iS=;PLR132M>w_q-=a)!|$@nOwwiMsMX4c(&c{(5dhMx+#eu_j6suv5CBp zq%{V%bO@8-G5LD$pu)R67GFs_RMN&qek;Xw1Dj|Wo_sMyw=bQOqVGDug8=|Ls|rAE zC4jw5kpEABhbsU$l(iIKa{$m20&F9QD3J6N;3rB&Do8L!na4{AlA#32KmyG?vscI+ws22Xo{e#f?oL{h)TQf!&mvf|lV+Omyd%g$l#4_LQ_tOEgS?JR4Zum)U_ zlCJ%bi9dEqfNH}l6vLzQc*OGII- zU`I%>o^kTMVyT8~dj4&lVLN{}n^g3V1$E0Wc&B$=%d6ZKt0R d(N%K!pZ0PXc!nDcJR55L9OuuoBL5$i`v?5?+Wr6l diff --git a/productionboard/target/classes/static/js/common/echarts.common.js b/productionboard/target/classes/static/js/common/echarts.common.js index 8cf5959..b67df25 100644 --- a/productionboard/target/classes/static/js/common/echarts.common.js +++ b/productionboard/target/classes/static/js/common/echarts.common.js @@ -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 + } }, }, { diff --git a/productionboard/target/classes/templates/foamBox/index.html b/productionboard/target/classes/templates/foamBox/index.html index e40df48..044cd87 100644 --- a/productionboard/target/classes/templates/foamBox/index.html +++ b/productionboard/target/classes/templates/foamBox/index.html @@ -49,6 +49,7 @@ + \ No newline at end of file