|
|
@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
@@ -37,6 +38,7 @@ import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.school.entity.Salary;
|
|
|
import org.springblade.school.excel.*;
|
|
|
+import org.springblade.school.util.ExcelCheck;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import org.springblade.school.entity.SalaryItem;
|
|
|
@@ -161,6 +163,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-工资表导入", notes = "传入excel")
|
|
|
public R importSupplierDesc(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new SalaryItemExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<SalaryItemExcel> excelList = ExcelUtil.read(file, SalaryItemExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -204,6 +217,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-聘用导入", notes = "传入excel")
|
|
|
public R importEmploy(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new EmployExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<EmployExcel> excelList = ExcelUtil.read(file, EmployExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -230,6 +254,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-职级导入", notes = "传入excel")
|
|
|
public R importPosition(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new PositionExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<PositionExcel> excelList = ExcelUtil.read(file, PositionExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -256,6 +291,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-学习强国扣费导入", notes = "传入excel")
|
|
|
public R importPower(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new LearningPower());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<LearningPower> excelList = ExcelUtil.read(file, LearningPower.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -282,6 +328,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-微信金额导入", notes = "传入excel")
|
|
|
public R importWeChat(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new WeChatExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<WeChatExcel> excelList = ExcelUtil.read(file, WeChatExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -308,6 +365,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-班主任补贴导入", notes = "传入excel")
|
|
|
public R importTeacherSubsidy(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new TeacherSubsidy());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<TeacherSubsidy> excelList = ExcelUtil.read(file, TeacherSubsidy.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -334,6 +402,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-周末加班导入", notes = "传入excel")
|
|
|
public R importOvertime(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new OvertimeExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<OvertimeExcel> excelList = ExcelUtil.read(file, OvertimeExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -360,6 +439,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-电话费、罚款导入", notes = "传入excel")
|
|
|
public R importPhoneFine(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new PhoneFineExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<PhoneFineExcel> excelList = ExcelUtil.read(file, PhoneFineExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -386,6 +476,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-卫生费导入", notes = "传入excel")
|
|
|
public R importSanitationFee(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new SanitationFee());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<SanitationFee> excelList = ExcelUtil.read(file, SanitationFee.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -412,6 +513,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-出勤导入", notes = "传入excel")
|
|
|
public R importAttendanceExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new AttendanceExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<AttendanceExcel> excelList = ExcelUtil.read(file, AttendanceExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -438,6 +550,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-保险个人导入", notes = "传入excel")
|
|
|
public R importPersonalInsurance(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new PersonalInsurance());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<PersonalInsurance> excelList = ExcelUtil.read(file, PersonalInsurance.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -464,6 +587,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-公积金导入", notes = "传入excel")
|
|
|
public R importReservedFunds(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new ReservedFunds());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<ReservedFunds> excelList = ExcelUtil.read(file, ReservedFunds.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -490,6 +624,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-个税导入", notes = "传入excel")
|
|
|
public R importPayTaxes(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new PayTaxes());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<PayTaxes> excelList = ExcelUtil.read(file, PayTaxes.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -516,6 +661,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-新岗岗前培训导入", notes = "传入excel")
|
|
|
public R importPostTrainExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new PostTrainExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<PostTrainExcel> excelList = ExcelUtil.read(file, PostTrainExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -542,6 +698,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-奖励导入", notes = "传入excel")
|
|
|
public R importAwardExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new AwardExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<AwardExcel> excelList = ExcelUtil.read(file, AwardExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -568,6 +735,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-假期加班导入", notes = "传入excel")
|
|
|
public R importVacationExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new VacationExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<VacationExcel> excelList = ExcelUtil.read(file, VacationExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -594,6 +772,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-岗位补贴导入", notes = "传入excel")
|
|
|
public R importPostAllowance(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new PostAllowance());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<PostAllowance> excelList = ExcelUtil.read(file, PostAllowance.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -620,6 +809,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-绩效、教学成绩奖导入", notes = "传入excel")
|
|
|
public R importPerformanceExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new PerformanceExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<PerformanceExcel> excelList = ExcelUtil.read(file, PerformanceExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -646,6 +846,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-工作量导入", notes = "传入excel")
|
|
|
public R importWorkloadExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new WorkloadExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<WorkloadExcel> excelList = ExcelUtil.read(file, WorkloadExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -672,6 +883,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-查评导入", notes = "传入excel")
|
|
|
public R importZhaPingExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new ZhaPingExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<ZhaPingExcel> excelList = ExcelUtil.read(file, ZhaPingExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -698,6 +920,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-保险导入", notes = "传入excel")
|
|
|
public R importInsuranceExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new InsuranceExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<InsuranceExcel> excelList = ExcelUtil.read(file, InsuranceExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -724,6 +957,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-月底人数导入", notes = "传入excel")
|
|
|
public R importEomNumberExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new EomNumberExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<EomNumberExcel> excelList = ExcelUtil.read(file, EomNumberExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -750,6 +994,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-教研组长导入", notes = "传入excel")
|
|
|
public R importTeamLeaderExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new TeamLeaderExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<TeamLeaderExcel> excelList = ExcelUtil.read(file, TeamLeaderExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -776,6 +1031,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-备课组长导入", notes = "传入excel")
|
|
|
public R importPrepareLessonsExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new PrepareLessonsExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<PrepareLessonsExcel> excelList = ExcelUtil.read(file, PrepareLessonsExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -802,6 +1068,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-领导干部导入", notes = "传入excel")
|
|
|
public R importLeadExcel(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new LeadExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<LeadExcel> excelList = ExcelUtil.read(file, LeadExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|
|
|
@@ -828,6 +1105,17 @@ public class SalaryItemController extends BladeController {
|
|
|
@ApiOperation(value = "导入-工资管理-小学部-下学期绩效导入", notes = "传入excel")
|
|
|
public R importTeachingExcell(@RequestParam("file") MultipartFile file,@RequestParam("id") Long id)
|
|
|
{
|
|
|
+ //校验模板
|
|
|
+ String excelPattern = null;
|
|
|
+ try {
|
|
|
+ excelPattern = ExcelCheck.checkExcelPattern(file, new TeachingExcel());
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new SecurityException("校验Excel失败");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(excelPattern)){
|
|
|
+ throw new SecurityException(excelPattern);
|
|
|
+ }
|
|
|
+ //导入数据
|
|
|
List<TeachingExcel> excelList = ExcelUtil.read(file, TeachingExcel.class);
|
|
|
if(CollectionUtils.isEmpty(excelList))
|
|
|
{
|