|
|
@@ -1,9 +1,12 @@
|
|
|
package com.ktg.mes.idx.controller;
|
|
|
|
|
|
+import com.ktg.common.constant.UserConstants;
|
|
|
import com.ktg.common.core.controller.BaseController;
|
|
|
import com.ktg.common.core.domain.AjaxResult;
|
|
|
import com.ktg.common.core.domain.entity.ItemType;
|
|
|
import com.ktg.common.utils.DateUtils;
|
|
|
+import com.ktg.mes.dv.domain.DvMachinery;
|
|
|
+import com.ktg.mes.dv.service.IDvMachineryService;
|
|
|
import com.ktg.mes.idx.domain.IndexResult;
|
|
|
import com.ktg.mes.md.domain.MdItem;
|
|
|
import com.ktg.mes.md.domain.RmsTaskInstock;
|
|
|
@@ -62,6 +65,8 @@ public class IndexController extends BaseController {
|
|
|
private IMdItemService mdItemService;
|
|
|
@Autowired
|
|
|
private IWmStatisticsParamService wmStatisticsParamService;
|
|
|
+ @Autowired
|
|
|
+ private IDvMachineryService machineryService;
|
|
|
|
|
|
/**
|
|
|
* 获取统计数据
|
|
|
@@ -113,6 +118,8 @@ public class IndexController extends BaseController {
|
|
|
WmStorageArea wmStorageArea = new WmStorageArea();
|
|
|
wmStorageArea.setStatus("0");
|
|
|
wmStorageAreaEmptyList = wmStorageAreaService.selectWmStorageAreaList(wmStorageArea);
|
|
|
+
|
|
|
+ int machineryCount = machineryService.selectDvMachineryList(new DvMachinery()).size();
|
|
|
/*RmsLift rmsLiftGdc = new RmsLift();
|
|
|
rmsLiftGdc.setDeviceType("1");
|
|
|
List<RmsLift> rmsLiftsGdc = rmsLiftService.selectRmsLiftList(rmsLiftGdc);
|
|
|
@@ -190,6 +197,7 @@ public class IndexController extends BaseController {
|
|
|
indexResult.setLiftAgvAvgTime(liftAgvAvgTime);
|
|
|
indexResult.setLiftXcAvgTime(liftXcAvgTime);*/
|
|
|
indexResult.setTaskWaitNum(taskWaitNum);
|
|
|
+ indexResult.setMachineryNum(machineryCount);
|
|
|
|
|
|
return AjaxResult.success(indexResult);
|
|
|
}
|
|
|
@@ -204,6 +212,27 @@ public class IndexController extends BaseController {
|
|
|
return AjaxResult.success(statisticsParam);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取设备统计数据
|
|
|
+ */
|
|
|
+ @GetMapping("/indexMachinery")
|
|
|
+ public AjaxResult indexGetMachinery()
|
|
|
+ {
|
|
|
+ DvMachinery dvMachinery = new DvMachinery();
|
|
|
+ dvMachinery.setStatus(UserConstants.MACHINERY_CODE_STOP);
|
|
|
+ int stopM = machineryService.selectDvMachineryList(dvMachinery).size();
|
|
|
+ dvMachinery.setStatus(UserConstants.MACHINERY_CODE_STOP);
|
|
|
+ int workM = machineryService.selectDvMachineryList(dvMachinery).size();
|
|
|
+ dvMachinery.setStatus(UserConstants.MACHINERY_CODE_STOP);
|
|
|
+ int reparidM = machineryService.selectDvMachineryList(dvMachinery).size();
|
|
|
+ Map<String, Integer> machineryList = new HashMap<>();
|
|
|
+
|
|
|
+ machineryList.put("stopNum", stopM);
|
|
|
+ machineryList.put("workNum", workM);
|
|
|
+ machineryList.put("reparidNum", reparidM);
|
|
|
+ return AjaxResult.success(machineryList);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@GetMapping("/getMonthInstockCount2")
|
|
|
public AjaxResult getMonthInstockCount()
|