|
@@ -653,12 +653,21 @@ public class WmPayOffController {
|
|
|
|
|
|
List<Map<String, String>> msgList = new ArrayList<>();
|
|
|
|
|
|
+ // 获取当日所在月份
|
|
|
+ LocalDateTime today = LocalDateTime.now();
|
|
|
+ int monthValue = today.getMonthValue();
|
|
|
+
|
|
|
for (WmScorePackageSettleInput input : inputList) {
|
|
|
|
|
|
if (StringUtils.isEmpty(input.getId()) || null == input.getSubjectLocation() || null == input.getInvoiceCategory() || StringUtils.isEmpty(input.getScorePackageName())) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|
|
|
|
|
|
+ Optional<WmScorePackageSettleNote> checkMonthOpt = input.getNotes().stream().filter(note -> note.getSubTime() == null || note.getSubTime().getMonthValue() != monthValue).findAny();
|
|
|
+ if (checkMonthOpt.isPresent()) {
|
|
|
+ return R.failed("不支持结算非当月提交记录,请回退并重新提交后重试");
|
|
|
+ }
|
|
|
+
|
|
|
// 查询结算详情(用于拼接notes数据)
|
|
|
R<?> queryR = wmPayOffService.settleById(input.getId());
|
|
|
|