|
|
@@ -144,7 +144,7 @@ public class AnnualBudgetItemController extends BladeController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 导入聘用模板
|
|
|
+ * 导入模板
|
|
|
*/
|
|
|
@GetMapping("/export/employ")
|
|
|
@ApiOperationSupport(order = 11)
|
|
|
@@ -161,16 +161,6 @@ public class AnnualBudgetItemController extends BladeController {
|
|
|
@ApiOperationSupport(order = 12)
|
|
|
@ApiOperation(value = "年度预算明细导入", notes = "传入excel")
|
|
|
public R importItem(@RequestParam("file") MultipartFile file, @RequestParam("id") Long id) {
|
|
|
- //校验模板
|
|
|
- String excelPattern = null;
|
|
|
- try {
|
|
|
- excelPattern = ExcelCheck.checkExcelPattern(file, new AnnualBudgetItemExcel());
|
|
|
- } catch (Exception e) {
|
|
|
- throw new SecurityException("校验Excel失败");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(excelPattern)){
|
|
|
- throw new SecurityException(excelPattern);
|
|
|
- }
|
|
|
//导入数据
|
|
|
List<AnnualBudgetItemExcel> excelList = ExcelUtil.read(file, AnnualBudgetItemExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|