|
@@ -64,12 +64,28 @@ public class ProductLinePerformanceServiceImpl extends SuperCacheServiceImpl<Pro
|
|
|
@Override
|
|
|
@InjectionResult
|
|
|
public IPage<TaskNode> pageList(IPage page, LbqWrapper<TaskNode> wrapper) {
|
|
|
- return baseMapper.pageList(page, wrapper, new DataScope());
|
|
|
+ IPage<TaskNode> taskNodeIPage = baseMapper.pageList(page, wrapper, new DataScope());
|
|
|
+ List<TaskNode> records = taskNodeIPage.getRecords();
|
|
|
+ records.forEach(item->{
|
|
|
+ if (item.getEndTime() != null && item.getStartTime() != null){
|
|
|
+ String datePoor = DateUtil.getDatePoor(item.getEndTime(), item.getStartTime());
|
|
|
+ item.setStatisticalHours(datePoor);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ taskNodeIPage.setRecords(records);
|
|
|
+ return taskNodeIPage;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<TaskNode> queryOperatorDetailPerformance(TaskNode taskNode){
|
|
|
- return baseMapper.queryOperatorDetailPerformance(taskNode);
|
|
|
+ List<TaskNode> taskNodes = baseMapper.queryOperatorDetailPerformance(taskNode);
|
|
|
+ taskNodes.forEach(item->{
|
|
|
+ if (item.getEndTime() != null && item.getStartTime() != null){
|
|
|
+ String datePoor = DateUtil.getDatePoor(item.getEndTime(), item.getStartTime());
|
|
|
+ item.setStatisticalHours(datePoor);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return taskNodes;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -100,6 +116,12 @@ public class ProductLinePerformanceServiceImpl extends SuperCacheServiceImpl<Pro
|
|
|
public IPage<ProductDto> getProductStatistics(Long page, Long limit, ProductVo vo){
|
|
|
List<ProductDto> statistics = workpieceMapper.getProductStatistics(vo);
|
|
|
if (!CollectionUtil.isEmpty(statistics)) {
|
|
|
+ statistics.stream().forEach(item->{
|
|
|
+ if (item.getEndTime() != null && item.getStartTime() != null){
|
|
|
+ String datePoor = DateUtil.getDatePoor(item.getEndTime(), item.getStartTime());
|
|
|
+ item.setHour(datePoor);
|
|
|
+ }
|
|
|
+ });
|
|
|
Page pages = IPageUtils.getPages(page, limit, statistics);
|
|
|
return pages;
|
|
|
}
|
|
@@ -202,6 +224,12 @@ public class ProductLinePerformanceServiceImpl extends SuperCacheServiceImpl<Pro
|
|
|
public IPage<ProductionStatisticalDto> queryProcedure(Long page, Long limit, ProductVo vo) {
|
|
|
List<ProductionStatisticalDto> list = baseMapper.queryProcedure(vo);
|
|
|
if (!CollectionUtil.isEmpty(list)){
|
|
|
+ list.stream().forEach(item->{
|
|
|
+ if (item.getEndTime() != null && item.getStartTime() != null){
|
|
|
+ String datePoor = DateUtil.getDatePoor(item.getEndTime(), item.getStartTime());
|
|
|
+ item.setHour(datePoor);
|
|
|
+ }
|
|
|
+ });
|
|
|
Page pages = IPageUtils.getPages(page, limit, list);
|
|
|
return pages;
|
|
|
}
|