|
|
|
|
@ -43,7 +43,8 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
@Override
|
|
|
|
|
public TableDataInfo<PlanCompletionRateReportVo> planCompletionRateReportVoList(Map hashMap, PageQuery pageQuery) {
|
|
|
|
|
String tableName = getPlanInfoTableNameByProcessId(Long.parseLong(String.valueOf(hashMap.get("processId"))));
|
|
|
|
|
Page<PlanCompletionRateReportVo> page = prodReportMapper.planCompletionRateReportVoList(hashMap, pageQuery.build(), tableName);
|
|
|
|
|
Page<PlanCompletionRateReportVo> page = prodReportMapper.planCompletionRateReportVoList(hashMap,
|
|
|
|
|
pageQuery.build(), tableName);
|
|
|
|
|
return TableDataInfo.build(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -91,7 +92,7 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
if (StringUtils.isNull(processId)) {
|
|
|
|
|
// 默认返回半制品表
|
|
|
|
|
tableName = DatabaseConstants.TABLE_NAME_PROD_PRODUCT_PLAN_DETAIL_PREFIX + "_2";
|
|
|
|
|
}else if (processId == 17L) {
|
|
|
|
|
} else if (processId == 17L) {
|
|
|
|
|
tableName = DatabaseConstants.TABLE_NAME_PROD_PRODUCT_PLAN_DETAIL_PREFIX + "_3";
|
|
|
|
|
} else if (processId == 18L) {
|
|
|
|
|
tableName = DatabaseConstants.TABLE_NAME_PROD_PRODUCT_PLAN_DETAIL_PREFIX + "_4";
|
|
|
|
|
@ -108,9 +109,11 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public TableDataInfo<PlanCompletionContrastReportVo> planCompletionContrastReportVoList(Map hashMap, PageQuery pageQuery) {
|
|
|
|
|
public TableDataInfo<PlanCompletionContrastReportVo> planCompletionContrastReportVoList(Map hashMap,
|
|
|
|
|
PageQuery pageQuery) {
|
|
|
|
|
String tableName = getPlanInfoTableNameByProcessId(Long.parseLong(String.valueOf(hashMap.get("processId"))));
|
|
|
|
|
Page<PlanCompletionContrastReportVo> page = prodReportMapper.planCompletionContrastReportVoList(hashMap, pageQuery.build(), tableName);
|
|
|
|
|
Page<PlanCompletionContrastReportVo> page = prodReportMapper.planCompletionContrastReportVoList(hashMap,
|
|
|
|
|
pageQuery.build(), tableName);
|
|
|
|
|
return TableDataInfo.build(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -157,7 +160,8 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
Long processId = parseProcessId(String.valueOf(hashMap.get("processId")));
|
|
|
|
|
String detailTable = getPlanDetailTableNameByProcessId(processId);
|
|
|
|
|
String planTable = getPlanInfoTableNameByProcessId(processId);
|
|
|
|
|
Page<WorkHourReportVo> page = prodReportMapper.workHourReportList(hashMap, pageQuery.build(), detailTable, planTable);
|
|
|
|
|
Page<WorkHourReportVo> page = prodReportMapper.workHourReportList(hashMap, pageQuery.build(), detailTable,
|
|
|
|
|
planTable);
|
|
|
|
|
return TableDataInfo.build(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -188,7 +192,8 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
Long processId = parseProcessId(String.valueOf(hashMap.get("processId")));
|
|
|
|
|
String detailTable = getPlanDetailTableNameByProcessId(processId);
|
|
|
|
|
String planTable = getPlanInfoTableNameByProcessId(processId);
|
|
|
|
|
Page<TeamWorkReportVo> page = prodReportMapper.teamWorkReportList(hashMap, pageQuery.build(), detailTable, planTable);
|
|
|
|
|
Page<TeamWorkReportVo> page = prodReportMapper.teamWorkReportList(hashMap, pageQuery.build(), detailTable,
|
|
|
|
|
planTable);
|
|
|
|
|
return TableDataInfo.build(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -202,7 +207,7 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 在制品跟踪报表(分页)- 高性能优化版本
|
|
|
|
|
* @param hashMap 查询参数
|
|
|
|
|
* @param hashMap 查询参数
|
|
|
|
|
* @param pageQuery 分页参数
|
|
|
|
|
* @return 表格数据
|
|
|
|
|
*/
|
|
|
|
|
@ -313,10 +318,11 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量查询工序进度信息
|
|
|
|
|
* @param orderIds 订单ID列表
|
|
|
|
|
* @param orderIds 订单ID列表
|
|
|
|
|
* @param orderProcessMap 结果映射
|
|
|
|
|
*/
|
|
|
|
|
private void batchQueryProcessProgress(List<String> planCodes, Map<String, List<ProcessProgressVo>> planProcessMap) {
|
|
|
|
|
private void batchQueryProcessProgress(List<String> planCodes,
|
|
|
|
|
Map<String, List<ProcessProgressVo>> planProcessMap) {
|
|
|
|
|
// 查询半制品工序进度(prod_plan_info_2)
|
|
|
|
|
queryProcessProgressByTable(planCodes, "prod_plan_info_2", planProcessMap);
|
|
|
|
|
|
|
|
|
|
@ -327,27 +333,29 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
queryProcessProgressByTable(planCodes, "prod_plan_info_4", planProcessMap);
|
|
|
|
|
|
|
|
|
|
// 对每个计划的工序进度进行排序
|
|
|
|
|
planProcessMap.values().forEach(processList ->
|
|
|
|
|
processList.sort((a, b) -> {
|
|
|
|
|
if (a.getProcessOrder() == null) return 1;
|
|
|
|
|
if (b.getProcessOrder() == null) return -1;
|
|
|
|
|
return a.getProcessOrder().compareTo(b.getProcessOrder());
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
planProcessMap.values().forEach(processList -> processList.sort((a, b) -> {
|
|
|
|
|
if (a.getProcessOrder() == null)
|
|
|
|
|
return 1;
|
|
|
|
|
if (b.getProcessOrder() == null)
|
|
|
|
|
return -1;
|
|
|
|
|
return a.getProcessOrder().compareTo(b.getProcessOrder());
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据表名查询工序进度信息
|
|
|
|
|
* @param orderIds 订单ID列表
|
|
|
|
|
* @param tableName 表名
|
|
|
|
|
* @param orderIds 订单ID列表
|
|
|
|
|
* @param tableName 表名
|
|
|
|
|
* @param orderProcessMap 结果映射
|
|
|
|
|
*/
|
|
|
|
|
private void queryProcessProgressByTable(List<String> planCodes, String tableName, Map<String, List<ProcessProgressVo>> planProcessMap) {
|
|
|
|
|
private void queryProcessProgressByTable(List<String> planCodes, String tableName,
|
|
|
|
|
Map<String, List<ProcessProgressVo>> planProcessMap) {
|
|
|
|
|
try {
|
|
|
|
|
// 使用批量查询避免 N+1:一次性查询该工序表下所有计划的工序进度
|
|
|
|
|
// 返回结果中包含 planCode 字段,便于在此处进行分组
|
|
|
|
|
String tenantId = LoginHelper.getTenantId();
|
|
|
|
|
List<ProcessProgressVo> batchResults = prodReportMapper.getPlansProcessProgressBatch(planCodes, tableName, tenantId);
|
|
|
|
|
List<ProcessProgressVo> batchResults = prodReportMapper.getPlansProcessProgressBatch(planCodes, tableName,
|
|
|
|
|
tenantId);
|
|
|
|
|
if (batchResults != null && !batchResults.isEmpty()) {
|
|
|
|
|
for (ProcessProgressVo progress : batchResults) {
|
|
|
|
|
String planCode = progress.getPlanCode();
|
|
|
|
|
@ -364,7 +372,7 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 基于实际工序进度微调计算结果
|
|
|
|
|
* @param vo 在制品跟踪报表VO
|
|
|
|
|
* @param vo 在制品跟踪报表VO
|
|
|
|
|
* @param processProgress 工序进度列表
|
|
|
|
|
*/
|
|
|
|
|
private void adjustProgressCalculation(WipTrackingReportVo vo, List<ProcessProgressVo> processProgress) {
|
|
|
|
|
@ -374,35 +382,35 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
// 统计工序状态
|
|
|
|
|
long completedCount = processProgress.stream()
|
|
|
|
|
.mapToLong(p -> p.getIsCompleted() != null && p.getIsCompleted() == 1 ? 1 : 0)
|
|
|
|
|
.sum();
|
|
|
|
|
long inProgressCount = processProgress.stream()
|
|
|
|
|
.mapToLong(p -> p.getIsInProgress() != null && p.getIsInProgress() == 1 ? 1 : 0)
|
|
|
|
|
.sum();
|
|
|
|
|
long totalCount = processProgress.size();
|
|
|
|
|
long completedCount = processProgress.stream()
|
|
|
|
|
.mapToLong(p -> p.getIsCompleted() != null && p.getIsCompleted() == 1 ? 1 : 0)
|
|
|
|
|
.sum();
|
|
|
|
|
long inProgressCount = processProgress.stream()
|
|
|
|
|
.mapToLong(p -> p.getIsInProgress() != null && p.getIsInProgress() == 1 ? 1 : 0)
|
|
|
|
|
.sum();
|
|
|
|
|
long totalCount = processProgress.size();
|
|
|
|
|
|
|
|
|
|
// 更新工序统计信息
|
|
|
|
|
vo.setTotalProcessCount(totalCount + "道");
|
|
|
|
|
vo.setTotalProcessCountNum((int) totalCount);
|
|
|
|
|
// 更新工序统计信息
|
|
|
|
|
vo.setTotalProcessCount(totalCount + "道");
|
|
|
|
|
vo.setTotalProcessCountNum((int) totalCount);
|
|
|
|
|
|
|
|
|
|
// 构建在制工序名称(进行中的工序)
|
|
|
|
|
String wipProcesses = processProgress.stream()
|
|
|
|
|
.filter(p -> p.getIsInProgress() != null && p.getIsInProgress() == 1)
|
|
|
|
|
.map(ProcessProgressVo::getProcessName)
|
|
|
|
|
.filter(Objects::nonNull)
|
|
|
|
|
.collect(Collectors.joining(","));
|
|
|
|
|
// 构建在制工序名称(进行中的工序)
|
|
|
|
|
String wipProcesses = processProgress.stream()
|
|
|
|
|
.filter(p -> p.getIsInProgress() != null && p.getIsInProgress() == 1)
|
|
|
|
|
.map(ProcessProgressVo::getProcessName)
|
|
|
|
|
.filter(Objects::nonNull)
|
|
|
|
|
.collect(Collectors.joining(","));
|
|
|
|
|
|
|
|
|
|
// 构建剩余工序名称(未派工和已派工但未开始的工序)
|
|
|
|
|
String remainingProcesses = processProgress.stream()
|
|
|
|
|
.filter(p -> (p.getIsCompleted() == null || p.getIsCompleted() == 0) &&
|
|
|
|
|
(p.getIsInProgress() == null || p.getIsInProgress() == 0))
|
|
|
|
|
.map(ProcessProgressVo::getProcessName)
|
|
|
|
|
.filter(Objects::nonNull)
|
|
|
|
|
.collect(Collectors.joining(","));
|
|
|
|
|
// 构建剩余工序名称(未派工和已派工但未开始的工序)
|
|
|
|
|
String remainingProcesses = processProgress.stream()
|
|
|
|
|
.filter(p -> (p.getIsCompleted() == null || p.getIsCompleted() == 0) &&
|
|
|
|
|
(p.getIsInProgress() == null || p.getIsInProgress() == 0))
|
|
|
|
|
.map(ProcessProgressVo::getProcessName)
|
|
|
|
|
.filter(Objects::nonNull)
|
|
|
|
|
.collect(Collectors.joining(","));
|
|
|
|
|
|
|
|
|
|
vo.setWipProcesses(wipProcesses);
|
|
|
|
|
vo.setRemainingProcesses(remainingProcesses);
|
|
|
|
|
vo.setWipProcesses(wipProcesses);
|
|
|
|
|
vo.setRemainingProcesses(remainingProcesses);
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
System.out.println("微调进度计算失败,计划编码: " + vo.getPlanCode() + ", 错误: " + e.getMessage());
|
|
|
|
|
@ -452,27 +460,31 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
try {
|
|
|
|
|
// 不依赖 prod_order_info,直接查询三个计划表
|
|
|
|
|
String[] planTables = {
|
|
|
|
|
DatabaseConstants.TABLE_NAME_PROD_PLAN_INFO_PREFIX + "_2",
|
|
|
|
|
DatabaseConstants.TABLE_NAME_PROD_PLAN_INFO_PREFIX + "_3",
|
|
|
|
|
DatabaseConstants.TABLE_NAME_PROD_PLAN_INFO_PREFIX + "_4"
|
|
|
|
|
DatabaseConstants.TABLE_NAME_PROD_PLAN_INFO_PREFIX + "_2",
|
|
|
|
|
DatabaseConstants.TABLE_NAME_PROD_PLAN_INFO_PREFIX + "_3",
|
|
|
|
|
DatabaseConstants.TABLE_NAME_PROD_PLAN_INFO_PREFIX + "_4"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
for (String planTableName : planTables) {
|
|
|
|
|
try {
|
|
|
|
|
List<ProcessProgressVo> processProgress = prodReportMapper.getPlanProcessProgress(planCode, planTableName);
|
|
|
|
|
List<ProcessProgressVo> processProgress = prodReportMapper.getPlanProcessProgress(planCode,
|
|
|
|
|
planTableName);
|
|
|
|
|
if (processProgress != null && !processProgress.isEmpty()) {
|
|
|
|
|
allProcessProgress.addAll(processProgress);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// 记录日志但不中断处理
|
|
|
|
|
System.out.println("查询工序进度失败,计划编码: " + planCode + ", 表: " + planTableName + ", 错误: " + e.getMessage());
|
|
|
|
|
System.out.println(
|
|
|
|
|
"查询工序进度失败,计划编码: " + planCode + ", 表: " + planTableName + ", 错误: " + e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 按工序顺序排序
|
|
|
|
|
allProcessProgress.sort((a, b) -> {
|
|
|
|
|
if (a.getProcessOrder() == null) return 1;
|
|
|
|
|
if (b.getProcessOrder() == null) return -1;
|
|
|
|
|
if (a.getProcessOrder() == null)
|
|
|
|
|
return 1;
|
|
|
|
|
if (b.getProcessOrder() == null)
|
|
|
|
|
return -1;
|
|
|
|
|
return a.getProcessOrder().compareTo(b.getProcessOrder());
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -516,10 +528,12 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
|
|
|
|
|
// 时间字段转换
|
|
|
|
|
if (vo.getPlanBeginTime() != null) {
|
|
|
|
|
exportVo.setPlanBeginTime(vo.getPlanBeginTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
|
|
|
|
exportVo.setPlanBeginTime(
|
|
|
|
|
vo.getPlanBeginTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
|
|
|
|
}
|
|
|
|
|
if (vo.getRealBeginTime() != null) {
|
|
|
|
|
exportVo.setRealBeginTime(vo.getRealBeginTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
|
|
|
|
exportVo.setRealBeginTime(
|
|
|
|
|
vo.getRealBeginTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
|
|
|
|
}
|
|
|
|
|
if (vo.getPlanEndTime() != null) {
|
|
|
|
|
exportVo.setPlanEndTime(vo.getPlanEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
|
|
|
|
@ -543,12 +557,13 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
processDetail.append("; ");
|
|
|
|
|
}
|
|
|
|
|
processDetail.append(process.getProcessName())
|
|
|
|
|
.append("(")
|
|
|
|
|
.append(process.getStatusDesc())
|
|
|
|
|
.append(")");
|
|
|
|
|
.append("(")
|
|
|
|
|
.append(process.getStatusDesc())
|
|
|
|
|
.append(")");
|
|
|
|
|
|
|
|
|
|
// 如果有进度百分比,添加进度信息
|
|
|
|
|
if (process.getProcessProgress() != null && process.getProcessProgress().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
|
|
if (process.getProcessProgress() != null
|
|
|
|
|
&& process.getProcessProgress().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
|
|
processDetail.append(" ").append(process.getProcessProgress()).append("%");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -558,8 +573,6 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
return exportVo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据订单信息确定需要查询的工序ID列表
|
|
|
|
|
* @param orderInfo 订单信息
|
|
|
|
|
@ -575,7 +588,8 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
|
|
|
|
|
if ("2".equals(dispatchType)) {
|
|
|
|
|
// 工艺路线派工,通过工艺路线ID获取工序列表
|
|
|
|
|
Long routeId = dispatchIdObj instanceof Integer ? ((Integer) dispatchIdObj).longValue() : (Long) dispatchIdObj;
|
|
|
|
|
Long routeId = dispatchIdObj instanceof Integer ? ((Integer) dispatchIdObj).longValue()
|
|
|
|
|
: (Long) dispatchIdObj;
|
|
|
|
|
ProdBaseRouteProcessBo bo = new ProdBaseRouteProcessBo();
|
|
|
|
|
bo.setRouteId(routeId);
|
|
|
|
|
List<ProdBaseRouteProcessVo> routeProcessList = prodBaseRouteProcessService.queryList(bo);
|
|
|
|
|
@ -588,7 +602,8 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
} else if ("3".equals(dispatchType)) {
|
|
|
|
|
// 单工序派工,直接使用dispatchId作为工序ID
|
|
|
|
|
if (dispatchIdObj != null) {
|
|
|
|
|
Long processId = dispatchIdObj instanceof Integer ? ((Integer) dispatchIdObj).longValue() : (Long) dispatchIdObj;
|
|
|
|
|
Long processId = dispatchIdObj instanceof Integer ? ((Integer) dispatchIdObj).longValue()
|
|
|
|
|
: (Long) dispatchIdObj;
|
|
|
|
|
processIds.add(processId);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
@ -605,7 +620,6 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
return processIds;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 小时产量统计(按结束时间小时分桶)
|
|
|
|
|
* @param hashMap 查询条件
|
|
|
|
|
@ -618,7 +632,6 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
return prodReportMapper.hourlyOutputByHour(hashMap, detailTable, planTable);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 工序工单统计(按工序聚合):完成数量、未完成数量与完成率
|
|
|
|
|
* 兼容传入的 processId,用于选择对应的计划表
|
|
|
|
|
@ -630,7 +643,8 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
if (tenantId != null && !tenantId.isEmpty()) {
|
|
|
|
|
hashMap.put("tenantId", tenantId);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception ignore) {}
|
|
|
|
|
} catch (Exception ignore) {
|
|
|
|
|
}
|
|
|
|
|
Long processId = parseProcessId(hashMap.get("processId"));
|
|
|
|
|
String planTable = getPlanInfoTableNameByProcessId(processId);
|
|
|
|
|
return prodReportMapper.processWorkOrderStats(hashMap, planTable);
|
|
|
|
|
@ -646,7 +660,8 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
if (tenantId != null && !tenantId.isEmpty()) {
|
|
|
|
|
hashMap.put("tenantId", tenantId);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception ignore) {}
|
|
|
|
|
} catch (Exception ignore) {
|
|
|
|
|
}
|
|
|
|
|
Long processId = parseProcessId(hashMap.get("processId"));
|
|
|
|
|
String planTable = getPlanInfoTableNameByProcessId(processId);
|
|
|
|
|
Page<HashMap<String, Object>> mpPage = pageQuery.build();
|
|
|
|
|
@ -686,12 +701,23 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Long asLong(Object o) {
|
|
|
|
|
if (o == null) return null;
|
|
|
|
|
try { return Long.parseLong(String.valueOf(o)); } catch (Exception e) { return null; }
|
|
|
|
|
if (o == null)
|
|
|
|
|
return null;
|
|
|
|
|
try {
|
|
|
|
|
return Long.parseLong(String.valueOf(o));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private BigDecimal asBigDecimal(Object o) {
|
|
|
|
|
if (o == null) return BigDecimal.ZERO;
|
|
|
|
|
try { return new BigDecimal(String.valueOf(o)); } catch (Exception e) { return BigDecimal.ZERO; }
|
|
|
|
|
if (o == null)
|
|
|
|
|
return BigDecimal.ZERO;
|
|
|
|
|
try {
|
|
|
|
|
return new BigDecimal(String.valueOf(o));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return BigDecimal.ZERO;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -753,7 +779,7 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
x1.add("SC_224NE");
|
|
|
|
|
x1.add("SC_225NE");
|
|
|
|
|
x1.add("SC_226NE");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Integer> y1 = new ArrayList<>();
|
|
|
|
|
y1.add(5);
|
|
|
|
|
y1.add(12);
|
|
|
|
|
@ -763,7 +789,7 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
y1.add(6);
|
|
|
|
|
y1.add(5);
|
|
|
|
|
y1.add(6);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.put("x1", x1);
|
|
|
|
|
result.put("y1", y1);
|
|
|
|
|
return result;
|
|
|
|
|
@ -782,14 +808,14 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
x1.add("13:01:00");
|
|
|
|
|
x1.add("13:02:00");
|
|
|
|
|
x1.add("13:03:00");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Integer> y1 = new ArrayList<>();
|
|
|
|
|
y1.add(3);
|
|
|
|
|
y1.add(4);
|
|
|
|
|
y1.add(2);
|
|
|
|
|
y1.add(5);
|
|
|
|
|
y1.add(6);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.put("x1", x1);
|
|
|
|
|
result.put("y1", y1);
|
|
|
|
|
return result;
|
|
|
|
|
@ -809,21 +835,71 @@ public class ProdReportServiceImpl implements IProdReportService {
|
|
|
|
|
item1.put("value3", 100);
|
|
|
|
|
item1.put("value4", "10次");
|
|
|
|
|
result.add(item1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HashMap<String, Object> item2 = new HashMap<>();
|
|
|
|
|
item2.put("value1", "2");
|
|
|
|
|
item2.put("value2", "SC-228NE");
|
|
|
|
|
item2.put("value3", 70);
|
|
|
|
|
item2.put("value4", "7次");
|
|
|
|
|
result.add(item2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HashMap<String, Object> item3 = new HashMap<>();
|
|
|
|
|
item3.put("value1", "3");
|
|
|
|
|
item3.put("value2", "SC-228NE");
|
|
|
|
|
item3.put("value3", 60);
|
|
|
|
|
item3.put("value4", "6次");
|
|
|
|
|
result.add(item3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 看板接口5:返回合格数/不合格数统计数据
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public HashMap<String, Object> getDashboardData5(Map hashMap) {
|
|
|
|
|
HashMap<String, Object> result = new HashMap<>();
|
|
|
|
|
// TODO: 根据实际业务逻辑查询数据
|
|
|
|
|
// 示例数据结构
|
|
|
|
|
List<String> x1 = new ArrayList<>();
|
|
|
|
|
x1.add("合格数");
|
|
|
|
|
x1.add("不合格数");
|
|
|
|
|
|
|
|
|
|
List<String> y1 = new ArrayList<>();
|
|
|
|
|
y1.add("8");
|
|
|
|
|
y1.add("1");
|
|
|
|
|
|
|
|
|
|
result.put("x1", x1);
|
|
|
|
|
result.put("y1", y1);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 看板接口6:返回产品良率统计数据
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public HashMap<String, Object> getDashboardData6(Map hashMap) {
|
|
|
|
|
HashMap<String, Object> result = new HashMap<>();
|
|
|
|
|
// TODO: 根据实际业务逻辑查询数据
|
|
|
|
|
// 示例数据结构
|
|
|
|
|
List<String> x1 = new ArrayList<>();
|
|
|
|
|
x1.add("产品1");
|
|
|
|
|
x1.add("产品2");
|
|
|
|
|
x1.add("产品3");
|
|
|
|
|
x1.add("产品4");
|
|
|
|
|
x1.add("产品5");
|
|
|
|
|
x1.add("产品6");
|
|
|
|
|
|
|
|
|
|
List<Integer> y1 = new ArrayList<>();
|
|
|
|
|
y1.add(98);
|
|
|
|
|
y1.add(95);
|
|
|
|
|
y1.add(93);
|
|
|
|
|
y1.add(95);
|
|
|
|
|
y1.add(93);
|
|
|
|
|
y1.add(97);
|
|
|
|
|
|
|
|
|
|
result.put("x1", x1);
|
|
|
|
|
result.put("y1", y1);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|