|
@@ -40,6 +40,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Collections;
|
|
|
import java.util.HashMap;
|
|
@@ -324,6 +325,17 @@ public class WmPayOffController {
|
|
|
@PostMapping("/settleIssueBySubType")
|
|
|
public R<?> settleIssueBySubType(@RequestBody WmScorePackageSettleInput input) {
|
|
|
|
|
|
+ // 获取当日所在月份
|
|
|
+ LocalDateTime today = LocalDateTime.now();
|
|
|
+ int monthValue = today.getMonthValue();
|
|
|
+
|
|
|
+ Optional<WmScorePackageSettleNote> any = input.getNotes().stream().filter(note -> note.getSubTime() == null || note.getSubTime().getMonthValue() != monthValue).findAny();
|
|
|
+
|
|
|
+ if (any.isPresent()){
|
|
|
+ return R.failed("不支持结算非当月提交记录,请回退并重新提交后重试");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if (StrUtil.isBlank(input.getId()) || StrUtil.isBlank(input.getScorePackageName()) || input.getSubjectLocation() == null || CollUtil.isEmpty(input.getNotes()) || null == input.getInvoiceCategory()) {
|
|
|
return R.failed("数据异常");
|
|
|
}
|