优化按年导入周期
This commit is contained in:
parent
3715915fc9
commit
8fd120c7a8
@ -38,7 +38,7 @@
|
||||
|
||||
const data = ref<Record<string, any>>({
|
||||
updateSupport: false,
|
||||
importMonth: dayjs().subtract(1, 'month').startOf('month').valueOf()
|
||||
importMonth: dayjs().subtract(1, 'year').startOf('year').valueOf()
|
||||
|
||||
});
|
||||
|
||||
@ -166,7 +166,7 @@
|
||||
<NDivider vertical />
|
||||
<NDatePicker
|
||||
v-model:value="data.importMonth"
|
||||
type="month"
|
||||
type="year"
|
||||
:placeholder="$t('common.selectImportMonth')"
|
||||
disabled
|
||||
/>
|
||||
|
||||
@ -84,8 +84,8 @@ public class OriginalMobileBankInactiveYearController extends BaseController {
|
||||
@SaCheckPermission("original:mobileBankInactiveYear:import")
|
||||
@PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<Void> importData(@RequestPart("file") MultipartFile file, boolean updateSupport,
|
||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM") Date importMonth) throws Exception {
|
||||
String importTime = DateUtils.parseDateToStr(FormatsType.YYYY_MM,importMonth);
|
||||
@RequestParam @DateTimeFormat(pattern = "yyyy") Date importMonth) throws Exception {
|
||||
String importTime = DateUtils.parseDateToStr(FormatsType.YYYY,importMonth);
|
||||
originalMobileBankInactiveYearService.deleteDataByMonth(importTime);
|
||||
ExcelResult<OriginalMobileBankInactiveYearImportVo> result = ExcelUtil.importExcel(file.getInputStream(), OriginalMobileBankInactiveYearImportVo.class, new OriginalMobileBankInactiveYearImportListener(updateSupport,importTime));
|
||||
return R.ok(result.getAnalysis());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user