|
@@ -20,6 +20,7 @@ import com.github.zuihou.tenant.dto.ProductDto;
|
|
|
import com.github.zuihou.tenant.dto.ProductInfoDto;
|
|
|
import com.github.zuihou.tenant.dto.ProductionStatisticalDto;
|
|
|
import com.github.zuihou.tenant.vo.DeviceResourceDetailVo;
|
|
|
+import com.github.zuihou.tenant.vo.DeviceResourceStatisticsVo;
|
|
|
import com.github.zuihou.tenant.vo.DeviceResourceSumVo;
|
|
|
import com.github.zuihou.tenant.vo.ProductVo;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -59,17 +60,17 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
LbqWrapper<TaskNode> wrapper = wrap.lambda();
|
|
|
String statisticalBeginDate;
|
|
|
String statisticalEndDate;
|
|
|
- if(null == data.getStatisticalDate()){
|
|
|
+ if (null == data.getStatisticalDate()) {
|
|
|
Calendar now = Calendar.getInstance();
|
|
|
- now.add(Calendar.MONTH,-3);
|
|
|
+ now.add(Calendar.MONTH, -3);
|
|
|
statisticalBeginDate = com.github.zuihou.common.util.DateUtil.beginMonthTime(now.getTime());
|
|
|
statisticalEndDate = com.github.zuihou.common.util.DateUtil.endMonthTime(new Date());
|
|
|
- }else{
|
|
|
- Date SearchDate = com.github.zuihou.common.util.DateUtil.stringToDate0(data.getStatisticalDate(),"yyyy-MM");
|
|
|
+ } else {
|
|
|
+ Date SearchDate = com.github.zuihou.common.util.DateUtil.stringToDate0(data.getStatisticalDate(), "yyyy-MM");
|
|
|
statisticalBeginDate = com.github.zuihou.common.util.DateUtil.beginMonthTime(SearchDate);
|
|
|
statisticalEndDate = com.github.zuihou.common.util.DateUtil.endMonthTime(SearchDate);
|
|
|
}
|
|
|
- wrapper.between(TaskNode::getStartTime,DateUtil.stringToDate7(statisticalBeginDate),DateUtil.stringToDate7(statisticalEndDate)).between(TaskNode::getEndTime,DateUtil.stringToDate7(statisticalBeginDate),DateUtil.stringToDate7(statisticalEndDate));
|
|
|
+ wrapper.between(TaskNode::getStartTime, DateUtil.stringToDate7(statisticalBeginDate), DateUtil.stringToDate7(statisticalEndDate)).between(TaskNode::getEndTime, DateUtil.stringToDate7(statisticalBeginDate), DateUtil.stringToDate7(statisticalEndDate));
|
|
|
page.orders().remove(0);
|
|
|
baseService.pageList(page, wrapper);
|
|
|
}
|
|
@@ -88,11 +89,11 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
|
|
|
@ApiOperation(value = "查询产线月设备OEE", notes = "查询产线月份人员日工时管理")
|
|
|
@PostMapping("/queryProductionLineOee")
|
|
|
- public R<Map<String,List>> queryProductionLineOee(@RequestBody(required = true) TaskNode params) {
|
|
|
+ public R<Map<String, List>> queryProductionLineOee(@RequestBody(required = true) TaskNode params) {
|
|
|
List<TaskNode> datas = baseService.queryProductionLineOee(params);
|
|
|
- Map<String,List> oee = new HashMap<String,List>();
|
|
|
- List xData= new ArrayList();
|
|
|
- List yData= new ArrayList();
|
|
|
+ Map<String, List> oee = new HashMap<String, List>();
|
|
|
+ List xData = new ArrayList();
|
|
|
+ List yData = new ArrayList();
|
|
|
xData = datas.stream().map((map) -> {
|
|
|
return map.getResourceName();
|
|
|
}).collect(Collectors.toList());
|
|
@@ -100,8 +101,8 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
yData = datas.stream().map((map) -> {
|
|
|
return map.getResourceOee();
|
|
|
}).collect(Collectors.toList());
|
|
|
- oee.put("xData",xData);
|
|
|
- oee.put("yData",yData);
|
|
|
+ oee.put("xData", xData);
|
|
|
+ oee.put("yData", yData);
|
|
|
return success(oee);
|
|
|
}
|
|
|
|
|
@@ -109,9 +110,9 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
@PostMapping("/getProductStatistics/{page}/{limit}")
|
|
|
@SysLog("产品流转详汇总")
|
|
|
public R<IPage<ProductDto>> getProductStatistics(@PathVariable long page,
|
|
|
- @PathVariable long limit,
|
|
|
- @RequestBody(required = false)ProductVo vo) {
|
|
|
- return success(baseService.getProductStatistics(page,limit,vo));
|
|
|
+ @PathVariable long limit,
|
|
|
+ @RequestBody(required = false) ProductVo vo) {
|
|
|
+ return success(baseService.getProductStatistics(page, limit, vo));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "产品流转详情", notes = "产品流转详情")
|
|
@@ -119,8 +120,8 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
@SysLog("产品流转详情")
|
|
|
public R<IPage<ProductInfoDto>> getProductInfoStatistics(@PathVariable long page,
|
|
|
@PathVariable long limit,
|
|
|
- @RequestBody(required = false)ProductVo vo) {
|
|
|
- return success(baseService.getProductInfoStatistics(page,limit,vo));
|
|
|
+ @RequestBody(required = false) ProductVo vo) {
|
|
|
+ return success(baseService.getProductInfoStatistics(page, limit, vo));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "产品流转详情excle导出", notes = "产品流转详情excle导出")
|
|
@@ -134,11 +135,12 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
@GetMapping("/expectProduct")
|
|
|
@SysLog("产品流转详汇总导出")
|
|
|
public void expectProduct(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
|
|
- baseService.expectProduct(request,response);
|
|
|
+ baseService.expectProduct(request, response);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设备工时统计
|
|
|
+ *
|
|
|
* @param page
|
|
|
* @param limit
|
|
|
* @return
|
|
@@ -147,35 +149,35 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
@PostMapping("/queryProcedure/{page}/{limit}")
|
|
|
public R<IPage<ProductionStatisticalDto>> queryProcedure(@PathVariable Long page,
|
|
|
@PathVariable Long limit,
|
|
|
- @RequestBody(required = false)ProductVo vo) {
|
|
|
- return success(baseService.queryProcedure(page,limit,vo));
|
|
|
+ @RequestBody(required = false) ProductVo vo) {
|
|
|
+ return success(baseService.queryProcedure(page, limit, vo));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "设备工时导出", notes = "设备工时导出管理")
|
|
|
@GetMapping("/expectProcedure")
|
|
|
@SysLog("设备工时导出")
|
|
|
public void expectProcedure(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
|
|
- baseService.expectProcedure(request,response);
|
|
|
+ baseService.expectProcedure(request, response);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "产品加工汇总", notes = "产品加工汇总")
|
|
|
@PostMapping("/procedureSum/{page}/{limit}")
|
|
|
public R<IPage<ProcedureSumDto>> procedureSum(@PathVariable Long page,
|
|
|
@PathVariable Long limit,
|
|
|
- @RequestBody(required = false)ProductVo vo) {
|
|
|
- return success(baseService.procedureSum(page,limit,vo));
|
|
|
+ @RequestBody(required = false) ProductVo vo) {
|
|
|
+ return success(baseService.procedureSum(page, limit, vo));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "产品加工汇总导出", notes = "产品加工汇总导出管理")
|
|
|
@GetMapping("/expectprocedureSum")
|
|
|
@SysLog("产品加工汇总导出")
|
|
|
public void expectprocedureSum(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
|
|
- baseService.expectprocedureSum(request,response);
|
|
|
+ baseService.expectprocedureSum(request, response);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "产品加工详情", notes = "产品加工详情")
|
|
|
@PostMapping("/procedureInfo")
|
|
|
- public R<Map<String,Object>> procedureInfo(@RequestBody(required = true) TaskNode params) {
|
|
|
+ public R<Map<String, Object>> procedureInfo(@RequestBody(required = true) TaskNode params) {
|
|
|
return success(baseService.procedureInfo(params));
|
|
|
}
|
|
|
|
|
@@ -184,9 +186,20 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
@SysLog("产品流转详汇总")
|
|
|
public R<IPage<DeviceResourceSumVo>> deviceResourceSum(@PathVariable Long page,
|
|
|
@PathVariable Long limit,
|
|
|
- @RequestBody Map<String,Object> params) {
|
|
|
- Page pageInfo = new Page<>(page,limit);
|
|
|
- return success(baseService.deviceResourceSum(pageInfo,params));
|
|
|
+ @RequestBody Map<String, Object> params) {
|
|
|
+ Page pageInfo = new Page<>(page, limit);
|
|
|
+ return success(baseService.deviceResourceSum(pageInfo, params));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "设备资源统计", notes = "设备资源统计")
|
|
|
+ @PostMapping("/DeviceResourceStatistics/{page}/{limit}")
|
|
|
+ @SysLog("设备资源统计")
|
|
|
+ public R<IPage<DeviceResourceSumVo>> DeviceResourceStatistics(@PathVariable Long page,
|
|
|
+ @PathVariable Long limit,
|
|
|
+ @RequestBody Map<String, Object> params) {
|
|
|
+ Page pageInfo = new Page<>(page, limit);
|
|
|
+ return success(baseService.deviceResourceSum(pageInfo, params));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -195,22 +208,40 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
@SysLog("设备资源生产明细")
|
|
|
public R<IPage<DeviceResourceDetailVo>> deviceResourceDetail(@PathVariable Long page,
|
|
|
@PathVariable Long limit,
|
|
|
- @RequestBody Map<String,Object> params) {
|
|
|
- Page pageInfo = new Page<>(page,limit);
|
|
|
- return success(baseService.deviceResourceDetail(pageInfo,params));
|
|
|
+ @RequestBody Map<String, Object> params) {
|
|
|
+ Page pageInfo = new Page<>(page, limit);
|
|
|
+ return success(baseService.deviceResourceDetail(pageInfo, params));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "统计报表", notes = "统计报表")
|
|
|
+ @PostMapping("/DeviceResourceStatistics1/{page}/{limit}")
|
|
|
+ @SysLog("统计报表")
|
|
|
+ public R<IPage<DeviceResourceStatisticsVo>> DeviceResourceStatistics1(@PathVariable Long page,
|
|
|
+ @PathVariable Long limit, @RequestBody Map<String, Object> params) {
|
|
|
+ Page<Object> objectPage = new Page<>(page, limit);
|
|
|
+ return success(baseService.DeviceResourceStatistics1(objectPage,params));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "统计报表导出", notes = "统计报表导出")
|
|
|
+ @PostMapping("/exportDeviceResourceStatistics1")
|
|
|
+ @SysLog("统计报表导出")
|
|
|
+ public void exportDeviceResourceStatistics1(@RequestBody Map<String, Object> params, HttpServletResponse response) throws IOException {
|
|
|
+ baseService.exportDeviceResourceStatistics1(params, response);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "任务资源汇总", notes = "任务资源汇总")
|
|
|
@PostMapping("/taskResourceSum")
|
|
|
@SysLog("任务资源汇总")
|
|
|
- public R<List<Map<String, Object>>> taskResourceSum(@RequestBody Map<String,Object> params) {
|
|
|
+ public R<List<Map<String, Object>>> taskResourceSum(@RequestBody Map<String, Object> params) {
|
|
|
return success(baseService.taskResourceSum(params));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "任务资源汇总导出", notes = "任务资源汇总导出")
|
|
|
@PostMapping("/exportTaskResourceSum")
|
|
|
@SysLog("任务资源汇总")
|
|
|
- public void exportTaskResourceSum(@RequestBody Map<String,Object> params, HttpServletResponse response) throws IOException{
|
|
|
+ public void exportTaskResourceSum(@RequestBody Map<String, Object> params, HttpServletResponse response) throws IOException {
|
|
|
//Map params = request.getParameterMap();
|
|
|
baseService.exportTaskResource(params, response);
|
|
|
}
|
|
@@ -219,16 +250,16 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
@PostMapping("/taskResourceDetail/{page}/{limit}")
|
|
|
@SysLog("任务资源详情")
|
|
|
public R<IPage<TTask>> taskResourceDetail(@PathVariable Long page,
|
|
|
- @PathVariable Long limit,
|
|
|
- @RequestBody Map<String,Object> params) {
|
|
|
- Page pageInfo = new Page<>(page,limit);
|
|
|
- return success(baseService.taskResourceDetail(pageInfo,params));
|
|
|
+ @PathVariable Long limit,
|
|
|
+ @RequestBody Map<String, Object> params) {
|
|
|
+ Page pageInfo = new Page<>(page, limit);
|
|
|
+ return success(baseService.taskResourceDetail(pageInfo, params));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "设备资源主轴利用率", notes = "设备资源主轴利用率")
|
|
|
@PostMapping("/resourceRate")
|
|
|
@SysLog("设备资源生产明细")
|
|
|
- public R<Map<String,List<String>>> resourceRate(@RequestBody Map<String,Object> params) {
|
|
|
+ public R<Map<String, List<String>>> resourceRate(@RequestBody Map<String, Object> params) {
|
|
|
Map<String, List<String>> map = baseService.resourceRate(params);
|
|
|
return success(map);
|
|
|
}
|
|
@@ -237,65 +268,65 @@ public class ProductLinePerformanceController extends SuperController<ProductLin
|
|
|
@PostMapping("/workHourReport/{page}/{limit}")
|
|
|
@SysLog("工时定额报表")
|
|
|
public R<IPage<DeviceResourceDetailVo>> workHourReport(@PathVariable Long page,
|
|
|
- @PathVariable Long limit,
|
|
|
- @RequestBody Map<String,Object> params) {
|
|
|
- Page pageInfo = new Page<>(page,limit);
|
|
|
- return success(baseService.workHourReport(pageInfo,params));
|
|
|
+ @PathVariable Long limit,
|
|
|
+ @RequestBody Map<String, Object> params) {
|
|
|
+ Page pageInfo = new Page<>(page, limit);
|
|
|
+ return success(baseService.workHourReport(pageInfo, params));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "其他工时报表", notes = "其他工时报表")
|
|
|
@PostMapping("/otherHourReport/{page}/{limit}")
|
|
|
@SysLog("其他工时报表")
|
|
|
public R<IPage<DeviceResourceDetailVo>> otherHourReport(@PathVariable Long page,
|
|
|
- @PathVariable Long limit,
|
|
|
- @RequestBody Map<String,Object> params) {
|
|
|
- Page pageInfo = new Page<>(page,limit);
|
|
|
- return success(baseService.otherHourReport(pageInfo,params));
|
|
|
+ @PathVariable Long limit,
|
|
|
+ @RequestBody Map<String, Object> params) {
|
|
|
+ Page pageInfo = new Page<>(page, limit);
|
|
|
+ return success(baseService.otherHourReport(pageInfo, params));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "搬运设备统计", notes = "搬运设备统计")
|
|
|
@PostMapping("/robotTaskSum/{page}/{limit}")
|
|
|
@SysLog("搬运设备统计")
|
|
|
public R<IPage<DeviceResourceSumVo>> robotTaskSum(@PathVariable Long page,
|
|
|
- @PathVariable Long limit,
|
|
|
- @RequestBody Map<String,Object> params) {
|
|
|
- Page pageInfo = new Page<>(page,limit);
|
|
|
- return success(baseService.robotTaskSum(pageInfo,params));
|
|
|
+ @PathVariable Long limit,
|
|
|
+ @RequestBody Map<String, Object> params) {
|
|
|
+ Page pageInfo = new Page<>(page, limit);
|
|
|
+ return success(baseService.robotTaskSum(pageInfo, params));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "超时任务统计", notes = "超时任务统计")
|
|
|
@PostMapping("/overTimeTaskSum/{page}/{limit}")
|
|
|
@SysLog("超时任务统计")
|
|
|
public R<IPage<DeviceResourceSumVo>> overTimeTaskSum(@PathVariable Long page,
|
|
|
- @PathVariable Long limit,
|
|
|
- @RequestBody Map<String,Object> params) {
|
|
|
- Page pageInfo = new Page<>(page,limit);
|
|
|
- return success(baseService.overTimeTaskSum(pageInfo,params));
|
|
|
+ @PathVariable Long limit,
|
|
|
+ @RequestBody Map<String, Object> params) {
|
|
|
+ Page pageInfo = new Page<>(page, limit);
|
|
|
+ return success(baseService.overTimeTaskSum(pageInfo, params));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "完成任务统计", notes = "完成任务统计")
|
|
|
@PostMapping("/taskStatusSum")
|
|
|
@SysLog("完成任务统计")
|
|
|
- public R<Map<String,List<String>>> taskStatusSum(@RequestBody Map<String,Object> params) {
|
|
|
- return success(baseService.taskStatusSum(params));
|
|
|
+ public R<Map<String, List<String>>> taskStatusSum(@RequestBody Map<String, Object> params) {
|
|
|
+ return success(baseService.taskStatusSum(params));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "AGV任务统计", notes = "AGV任务统计")
|
|
|
@PostMapping("/taskAGVSum")
|
|
|
@SysLog("AGV任务统计")
|
|
|
- public R<Map<String,List<String>>> taskAGVSum(@RequestBody Map<String,Object> params) {
|
|
|
+ public R<Map<String, List<String>>> taskAGVSum(@RequestBody Map<String, Object> params) {
|
|
|
return success(baseService.taskAGVSum(params));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "未完成业务统计详情", notes = "未完成业务统计详情")
|
|
|
@PostMapping("/unFinishedBiz")
|
|
|
@SysLog("未完成业务统计详情")
|
|
|
- public R unFinishedBiz(@RequestBody Map<String,Object> params) {
|
|
|
+ public R unFinishedBiz(@RequestBody Map<String, Object> params) {
|
|
|
//String taskType = params.containsKey("taskType")? params.get("taskType").toString() : null;
|
|
|
- String type = params.containsKey("type")? params.get("type").toString() : null;
|
|
|
- Page page = new Page<>(1,1000);
|
|
|
- if(StringUtils.isEmpty(type)) return success(baseService.unFinishedTask(page, params));
|
|
|
- if(type.equals("agv")) return success(baseService.unFinishedAGV(page, params));
|
|
|
+ String type = params.containsKey("type") ? params.get("type").toString() : null;
|
|
|
+ Page page = new Page<>(1, 1000);
|
|
|
+ if (StringUtils.isEmpty(type)) return success(baseService.unFinishedTask(page, params));
|
|
|
+ if (type.equals("agv")) return success(baseService.unFinishedAGV(page, params));
|
|
|
return success(baseService.unFinishedTask(page, params));
|
|
|
}
|
|
|
|