|
@@ -1502,7 +1502,7 @@ public class ApsReportRecordsServiceImpl extends ServiceImpl<ApsReportRecordsDao
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public R checkMergeProcess2(ApsReportRecordsDo req) {
|
|
|
+ public R checkMergeProcess2(CheckReportRecordVo req) {
|
|
|
//作业明细的ID
|
|
|
String processequid = req.getProcessequid();
|
|
|
//当前报工的作业明细的详情
|
|
@@ -1552,6 +1552,24 @@ public class ApsReportRecordsServiceImpl extends ServiceImpl<ApsReportRecordsDao
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //如果实测单卷重/输出单卷重大于1.5或小于0.5,
|
|
|
+ // 则添加警告确认信息:输出物料{输出物料描述}实测卷重超出工艺要求单卷重50%
|
|
|
+ List<ApsReportOutputDo> apsReportOutputDoList = req.getApsReportOutputDoList();
|
|
|
+ List<ApsProcessOperationOutMaterDo> list = apsProcessOperationOutMaterService.list(new LambdaQueryWrapper<ApsProcessOperationOutMaterDo>().eq(ApsProcessOperationOutMaterDo::getMainid, apsProcessOperationDo.getId()));
|
|
|
+ for (ApsReportOutputDo apsReportOutputDo : apsReportOutputDoList) {
|
|
|
+ ApsProcessOperationOutMaterDo apsProcessOperationOutMaterDo = list.stream().filter(item -> item.getId().equals(apsReportOutputDo.getOutputid())).findFirst().orElse(null);
|
|
|
+ if (apsProcessOperationOutMaterDo != null) {
|
|
|
+ BigDecimal singlerollweight = apsProcessOperationOutMaterDo.getSinglerollweight();
|
|
|
+ BigDecimal weight = apsReportOutputDo.getWeight();
|
|
|
+ BigDecimal weightDivide = weight.divide(singlerollweight, 2, RoundingMode.HALF_UP);
|
|
|
+ if (weightDivide.compareTo(new BigDecimal("1.5")) > 0
|
|
|
+ || weightDivide.compareTo(new BigDecimal("0.5")) < 0) {
|
|
|
+ needWarning = true;
|
|
|
+ warningMessage += ("<b>输出物料" + apsReportOutputDo.getOutputmaterial() + "实测卷重超出/低于工艺要求单卷重50%;</b><br>");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
CheckMergeProcessResopnse res = new CheckMergeProcessResopnse();
|
|
|
res.setNeedWarning(needWarning);
|