修改 铝内胆设备看板

master
wangh 2 years ago
parent 05508723b0
commit bf1e971272

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

@ -49,6 +49,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</body> </body>
<script src="../../../js/foamBox/index.js"></script> <script src="../../../js/foamBox/index.js"></script>
<script> <script>
@ -61,7 +62,7 @@
disableOnInteraction: false, disableOnInteraction: false,
}, },
}); });
const ids = [[${positionId}]]; const ids = [[${positionId}]];
// let info = ` // 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> // <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); // $(".foamingLineRunStatus table tr").append(info);
</script> </script>
</html> </html>

@ -79,7 +79,7 @@ const horizontalBarChart = (res, ids) => {
}, },
grid: { grid: {
top: "9%", top: "9%",
left: "-30%", left: "0%",
right: "4%", right: "4%",
bottom: "3%", bottom: "3%",
containLabel: true, containLabel: true,
@ -137,24 +137,24 @@ const horizontalBarChart = (res, ids) => {
data: dataFormat(yValue), data: dataFormat(yValue),
}, },
{ // {
type: "category", // type: "category",
inverse: true, // inverse: true,
offset: -10, // offset: -10,
position: "left", // position: "left",
axisTick: "none", // axisTick: "none",
axisLine: "none", // axisLine: "none",
show: true, // show: true,
axisLabel: { // axisLabel: {
interval: 0, // interval: 0,
color: ["#A8A6AB"], // color: ["#A8A6AB"],
align: "left", // align: "left",
verticalAlign: "bottom", // verticalAlign: "bottom",
lineHeight: 32, // lineHeight: 32,
fontSize: 12, // fontSize: 12,
}, // },
data: dataFormat(xValue), // data: dataFormat(xValue),
}, // },
], ],
series: [ series: [
{ {
@ -170,11 +170,16 @@ const horizontalBarChart = (res, ids) => {
}, },
}, },
label: { label: {
show: false, show: true,
fontSize: 12, fontSize: 12,
color: "#A8A6AB", color: "#A8A6AB",
textBorderWidth: 2, 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>
</div> </div>
</div>
</body> </body>
<script src="../../../js/foamBox/index.js"></script> <script src="../../../js/foamBox/index.js"></script>
<script> <script>
@ -61,7 +62,7 @@
disableOnInteraction: false, disableOnInteraction: false,
}, },
}); });
const ids = [[${positionId}]]; const ids = [[${positionId}]];
// let info = ` // 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> // <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); // $(".foamingLineRunStatus table tr").append(info);
</script> </script>
</html> </html>
Loading…
Cancel
Save