|
@@ -204,8 +204,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
List<Report> allFileProcReportList = reportMapper.selectList(new QueryWrapper<Report>().eq("plan_id", report.getPlanId()).eq("prod_procedure_id", report.getProdProcedureId()));
|
|
|
final LocalDate fDate = targetDate;
|
|
|
double allFileProcNum = allFileProcReportList.stream().filter(item->!(item.getCreatorId().equals(token) && item.getCreateDate().isEqual(fDate))).mapToDouble(Report::getFinishNum).sum();
|
|
|
- if (allFileProcNum + report.getFinishNum() > plan.getNum()) {
|
|
|
- httpRespMsg.setError("填报的件数超过了剩余可填报件数:"+(plan.getNum() - allFileProcNum)+", 请联系班组长协调解决");
|
|
|
+ double leftNum = new BigDecimal(plan.getNum() - allFileProcNum).setScale(2, RoundingMode.HALF_UP).doubleValue();
|
|
|
+ if (report.getFinishNum() > leftNum) {
|
|
|
+ httpRespMsg.setError("填报的件数超过了剩余可填报件数:"+leftNum+", 请联系班组长协调解决");
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
//检查钢印号是否已经被同工序里面的其他人报过了
|