Browse Source

学校修改

lazhaoqian 4 years ago
parent
commit
b3fba18f14
20 changed files with 701 additions and 166 deletions
  1. 34 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/dto/SchoolTeacherCauseDTO.java
  2. 66 10
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/SchoolTeacher.java
  3. 109 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/SchoolTeacherCause.java
  4. 25 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/feign/ISchoolTeacherClient.java
  5. 36 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/vo/SchoolTeacherCauseVO.java
  6. 5 0
      blade-service-api/blade-school-api/src/main/java/org/springblade/school/entity/Salary.java
  7. 5 0
      blade-service-api/blade-school-api/src/main/java/org/springblade/school/entity/SalaryItem.java
  8. 126 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/controller/SchoolTeacherCauseController.java
  9. 28 2
      blade-service/blade-client/src/main/java/org/springblade/client/school/controller/SchoolTeacherController.java
  10. 21 150
      blade-service/blade-client/src/main/java/org/springblade/client/school/excel/SchoolTeacherExcel.java
  11. 24 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/feign/SchoolTeacherClient.java
  12. 42 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/mapper/SchoolTeacherCauseMapper.java
  13. 26 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/mapper/SchoolTeacherCauseMapper.xml
  14. 41 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/service/ISchoolTeacherCauseService.java
  15. 6 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/service/ISchoolTeacherService.java
  16. 41 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/service/impl/SchoolTeacherCauseServiceImpl.java
  17. 45 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/service/impl/SchoolTeacherServiceImpl.java
  18. 5 0
      blade-service/blade-school/src/main/java/org/springblade/school/excel/SalaryItemExcel.java
  19. 12 1
      blade-service/blade-school/src/main/java/org/springblade/school/service/impl/SalaryItemServiceImpl.java
  20. 4 3
      blade-service/blade-school/src/main/java/org/springblade/school/service/impl/SalaryServiceImpl.java

+ 34 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/dto/SchoolTeacherCauseDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.dto;
+
+import org.springblade.client.entity.SchoolTeacherCause;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 学校教师事业编开始记录数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-01-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SchoolTeacherCauseDTO extends SchoolTeacherCause {
+	private static final long serialVersionUID = 1L;
+
+}

+ 66 - 10
blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/SchoolTeacher.java

@@ -16,10 +16,13 @@
  */
 package org.springblade.client.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
@@ -47,7 +50,7 @@ public class SchoolTeacher implements Serializable {
 	/**
 	* 工号
 	*/
-		@ApiModelProperty(value = "工号")
+		@ApiModelProperty(value = "学历")
 		private String code;
 	/**
 	* 姓名
@@ -80,9 +83,9 @@ public class SchoolTeacher implements Serializable {
 		@ApiModelProperty(value = "身份证号")
 		private String idNumber;
 	/**
-	* 出生日期
+	* 转正日期
 	*/
-		@ApiModelProperty(value = "出生日期")
+		@ApiModelProperty(value = "转正日期")
 		@JsonFormat(pattern = "yyyy-MM-dd")
 		private Date birthdate;
 	/**
@@ -96,12 +99,23 @@ public class SchoolTeacher implements Serializable {
 		@ApiModelProperty(value = "政治面貌")
 		private String politicsStatus;
 	/**
-	* 入日期
+	* 入日期
 	*/
-		@ApiModelProperty(value = "入日期")
+		@ApiModelProperty(value = "入日期")
 		@JsonFormat(pattern = "yyyy-MM-dd")
 		private Date joiningDate;
 	/**
+	 * 校龄开始日期
+	 */
+		@ApiModelProperty(value = "校龄开始日期")
+		@JsonFormat(pattern = "yyyy-MM-dd")
+		private Date schoolAgeSalaryDate;
+	/**
+	 * 校龄
+	 */
+		@ApiModelProperty(value = "校龄")
+		private BigDecimal schoolAge;
+	/**
 	* 健康状况
 	*/
 		@ApiModelProperty(value = "健康状况")
@@ -167,9 +181,9 @@ public class SchoolTeacher implements Serializable {
 		@ApiModelProperty(value = "港澳台桥")
 		private String indentation;
 	/**
-	* 编制类别
+	* 职务
 	*/
-		@ApiModelProperty(value = "编制类别")
+		@ApiModelProperty(value = "职务")
 		private String compileCategory;
 	/**
 	* 身份类别
@@ -217,9 +231,9 @@ public class SchoolTeacher implements Serializable {
 		@ApiModelProperty(value = "专业特长")
 		private String professionalExpertise;
 	/**
-	* 是否双师
+	* 是否班主任
 	*/
-		@ApiModelProperty(value = "是否双师")
+		@ApiModelProperty(value = "是否班主任")
 		private String doubleTeachers;
 	/**
 	* 是否专业带头人
@@ -285,8 +299,50 @@ public class SchoolTeacher implements Serializable {
 	/**
 	 * 头像
 	 */
-	@ApiModelProperty(value = "头像")
+		@ApiModelProperty(value = "头像")
 		private String headPortrait;
+	/**
+	 * 事业编考试记录
+	 */
+		@ApiModelProperty(value = "事业编考试记录")
+		@TableField(exist = false)
+		private List<SchoolTeacherCause> causeList;
+	/**
+	 * 转正日期开始
+	 */
+		@ApiModelProperty(value = "转正日期开始")
+		@TableField(exist = false)
+		private String dateValidityStart;
+	/**
+	 * 转正日期结束
+	 */
+		@ApiModelProperty(value = "转正日期结束")
+		@TableField(exist = false)
+		private String dateValidityEnd;
+	/**
+	 * 入职日期开始
+	 */
+		@ApiModelProperty(value = "入职日期开始")
+		@TableField(exist = false)
+		private String createTimeStart;
+	/**
+	 * 入职日期结束
+	 */
+		@ApiModelProperty(value = "入职日期结束")
+		@TableField(exist = false)
+		private String createTimeEnd;
+	/**
+	 * 校龄开始日期起始时间
+	 */
+		@ApiModelProperty(value = "校龄开始日期起始时间")
+		@TableField(exist = false)
+		private String schoolAgeSalaryDateStart;
+	/**
+	 * 校龄开始日期结束时间
+	 */
+		@ApiModelProperty(value = "校龄开始日期结束时间")
+		@TableField(exist = false)
+		private String schoolAgeSalaryDateEnd;
 
 
 }

+ 109 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/SchoolTeacherCause.java

@@ -0,0 +1,109 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 学校教师事业编开始记录实体类
+ *
+ * @author BladeX
+ * @since 2022-01-21
+ */
+@Data
+@TableName("basic_school_teacher_cause")
+@ApiModel(value = "SchoolTeacherCause对象", description = "学校教师事业编开始记录")
+public class SchoolTeacherCause implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 考试日期
+	*/
+		@ApiModelProperty(value = "考试日期")
+		@JsonFormat(pattern = "yyyy-MM-dd")
+		private Date birthdate;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private Date createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private Date updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+
+
+}

+ 25 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/feign/ISchoolTeacherClient.java

@@ -0,0 +1,25 @@
+package org.springblade.client.feign;
+
+import org.springblade.common.constant.LauncherConstant;
+import org.springblade.core.tool.api.R;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@FeignClient(
+	value = LauncherConstant.APPLICATION_CLIENT_NAME
+)
+/**
+ * 教师基础资料对外访问接口
+ */
+public interface ISchoolTeacherClient {
+	String API_PREFIX = "/client";
+	String UPDATE_TEACHER_MESSAGE = API_PREFIX + "/updateTeacherMessage";
+
+
+	/**
+	 * 更新教职工校龄
+	 * @return
+	 */
+	@GetMapping(UPDATE_TEACHER_MESSAGE)
+	R updateTeacherMessage();
+}

+ 36 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/vo/SchoolTeacherCauseVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.vo;
+
+import org.springblade.client.entity.SchoolTeacherCause;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 学校教师事业编开始记录视图实体类
+ *
+ * @author BladeX
+ * @since 2022-01-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "SchoolTeacherCauseVO对象", description = "学校教师事业编开始记录")
+public class SchoolTeacherCauseVO extends SchoolTeacherCause {
+	private static final long serialVersionUID = 1L;
+
+}

+ 5 - 0
blade-service-api/blade-school-api/src/main/java/org/springblade/school/entity/Salary.java

@@ -107,6 +107,11 @@ public class Salary implements Serializable {
 		@ApiModelProperty(value = "是否已删除(0 否 1是)")
 		private Integer isDeleted;
 	/**
+	 * 人数
+	 */
+		@ApiModelProperty(value = "人数")
+		private String personNumber;
+	/**
 	 * 租户id
 	 */
 		@ApiModelProperty(value = "租户id")

+ 5 - 0
blade-service-api/blade-school-api/src/main/java/org/springblade/school/entity/SalaryItem.java

@@ -114,6 +114,11 @@ public class SalaryItem implements Serializable {
 		@ApiModelProperty(value = "学历工资")
 		private BigDecimal educationSalary;
 	/**
+	 * 职级类别
+	 */
+		@ApiModelProperty(value = "职级类别")
+		private BigDecimal rankCategory;
+	/**
 	* 职级标准
 	*/
 		@ApiModelProperty(value = "职级标准")

+ 126 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/controller/SchoolTeacherCauseController.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.school.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.client.school.service.ISchoolTeacherCauseService;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.client.entity.SchoolTeacherCause;
+import org.springblade.client.vo.SchoolTeacherCauseVO;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 学校教师事业编开始记录 控制器
+ *
+ * @author BladeX
+ * @since 2022-01-21
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/schoolteachercause")
+@Api(value = "学校教师事业编开始记录", tags = "学校教师事业编开始记录接口")
+public class SchoolTeacherCauseController extends BladeController {
+
+	private final ISchoolTeacherCauseService schoolTeacherCauseService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入schoolTeacherCause")
+	public R<SchoolTeacherCause> detail(SchoolTeacherCause schoolTeacherCause) {
+		SchoolTeacherCause detail = schoolTeacherCauseService.getOne(Condition.getQueryWrapper(schoolTeacherCause));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 学校教师事业编开始记录
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入schoolTeacherCause")
+	public R<IPage<SchoolTeacherCause>> list(SchoolTeacherCause schoolTeacherCause, Query query) {
+		IPage<SchoolTeacherCause> pages = schoolTeacherCauseService.page(Condition.getPage(query), Condition.getQueryWrapper(schoolTeacherCause));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 学校教师事业编开始记录
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入schoolTeacherCause")
+	public R<IPage<SchoolTeacherCauseVO>> page(SchoolTeacherCauseVO schoolTeacherCause, Query query) {
+		IPage<SchoolTeacherCauseVO> pages = schoolTeacherCauseService.selectSchoolTeacherCausePage(Condition.getPage(query), schoolTeacherCause);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 学校教师事业编开始记录
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入schoolTeacherCause")
+	public R save(@Valid @RequestBody SchoolTeacherCause schoolTeacherCause) {
+		return R.status(schoolTeacherCauseService.save(schoolTeacherCause));
+	}
+
+	/**
+	 * 修改 学校教师事业编开始记录
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入schoolTeacherCause")
+	public R update(@Valid @RequestBody SchoolTeacherCause schoolTeacherCause) {
+		return R.status(schoolTeacherCauseService.updateById(schoolTeacherCause));
+	}
+
+	/**
+	 * 新增或修改 学校教师事业编开始记录
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入schoolTeacherCause")
+	public R submit(@Valid @RequestBody SchoolTeacherCause schoolTeacherCause) {
+		return R.status(schoolTeacherCauseService.saveOrUpdate(schoolTeacherCause));
+	}
+
+
+	/**
+	 * 删除 学校教师事业编开始记录
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(schoolTeacherCauseService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 28 - 2
blade-service/blade-client/src/main/java/org/springblade/client/school/controller/SchoolTeacherController.java

@@ -17,6 +17,7 @@
 package org.springblade.client.school.controller;
 
 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;
@@ -31,7 +32,9 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 
 import org.springblade.client.corps.excel.CorpsSupplierExcel;
+import org.springblade.client.entity.SchoolTeacherCause;
 import org.springblade.client.school.excel.SchoolTeacherExcel;
+import org.springblade.client.school.service.ISchoolTeacherCauseService;
 import org.springblade.client.school.service.ISchoolTeacherService;
 import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
@@ -40,6 +43,7 @@ import org.springblade.core.secure.utils.SecureUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.purchase.sales.entity.Order;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.client.entity.SchoolTeacher;
@@ -47,6 +51,7 @@ import org.springblade.client.vo.SchoolTeacherVO;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.awt.image.FilteredImageSource;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -63,6 +68,7 @@ import java.util.List;
 public class SchoolTeacherController extends BladeController {
 
 	private final ISchoolTeacherService schoolTeacherService;
+	private final ISchoolTeacherCauseService schoolTeacherCauseService;
 
 	/**
 	 * 详情
@@ -73,6 +79,9 @@ public class SchoolTeacherController extends BladeController {
 	public R<SchoolTeacher> detail(SchoolTeacher schoolTeacher) {
 		schoolTeacher.setTenantId(SecureUtil.getTenantId());
 		SchoolTeacher detail = schoolTeacherService.getOne(Condition.getQueryWrapper(schoolTeacher));
+		if (detail != null){
+			detail.setCauseList(schoolTeacherCauseService.list(new QueryWrapper<SchoolTeacherCause>().eq("pid",detail.getId()).eq("is_deleted",0).eq("tenant_id",detail.getTenantId())));
+		}
 		return R.data(detail);
 	}
 
@@ -83,8 +92,25 @@ public class SchoolTeacherController extends BladeController {
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入schoolTeacher")
 	public R<IPage<SchoolTeacher>> list(SchoolTeacher schoolTeacher, Query query) {
-		schoolTeacher.setTenantId(SecureUtil.getTenantId());
-		IPage<SchoolTeacher> pages = schoolTeacherService.page(Condition.getPage(query), Condition.getQueryWrapper(schoolTeacher));
+		LambdaQueryWrapper<SchoolTeacher> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(SchoolTeacher::getIsDeleted,0);
+		lambdaQueryWrapper.eq(SchoolTeacher::getTenantId,SecureUtil.getTenantId());
+		lambdaQueryWrapper.eq(Func.isNotEmpty(schoolTeacher.getGender()),SchoolTeacher::getGender,schoolTeacher.getGender());
+		lambdaQueryWrapper.eq(Func.isNotEmpty(schoolTeacher.getDoubleTeachers()),SchoolTeacher::getDoubleTeachers,schoolTeacher.getDoubleTeachers());
+		lambdaQueryWrapper.like(Func.isNotEmpty(schoolTeacher.getCname()),SchoolTeacher::getCname,schoolTeacher.getCname());
+		lambdaQueryWrapper.like(Func.isNotEmpty(schoolTeacher.getIdNumber()),SchoolTeacher::getIdNumber,schoolTeacher.getIdNumber());
+		lambdaQueryWrapper.like(Func.isNotEmpty(schoolTeacher.getPhone()),SchoolTeacher::getPhone,schoolTeacher.getPhone());
+		lambdaQueryWrapper.like(Func.isNotEmpty(schoolTeacher.getCode()),SchoolTeacher::getCode,schoolTeacher.getCode());
+		lambdaQueryWrapper.like(Func.isNotEmpty(schoolTeacher.getInSection()),SchoolTeacher::getInSection,schoolTeacher.getInSection());
+		lambdaQueryWrapper.like(Func.isNotEmpty(schoolTeacher.getCompileCategory()),SchoolTeacher::getCompileCategory,schoolTeacher.getCompileCategory());
+		lambdaQueryWrapper.like(Func.isNotEmpty(schoolTeacher.getRemarks()),SchoolTeacher::getRemarks,schoolTeacher.getRemarks());
+		lambdaQueryWrapper.ge(Func.isNotEmpty(schoolTeacher.getCreateTimeStart()), SchoolTeacher::getJoiningDate,schoolTeacher.getCreateTimeStart());
+		lambdaQueryWrapper.le(Func.isNotEmpty(schoolTeacher.getCreateTimeEnd()),SchoolTeacher::getJoiningDate,schoolTeacher.getCreateTimeEnd());
+		lambdaQueryWrapper.ge(Func.isNotEmpty(schoolTeacher.getDateValidityStart()),SchoolTeacher::getBirthdate,schoolTeacher.getDateValidityStart());
+		lambdaQueryWrapper.le(Func.isNotEmpty(schoolTeacher.getDateValidityEnd()),SchoolTeacher::getBirthdate,schoolTeacher.getDateValidityEnd());
+		lambdaQueryWrapper.ge(Func.isNotEmpty(schoolTeacher.getSchoolAgeSalaryDateStart()),SchoolTeacher::getSchoolAgeSalaryDate,schoolTeacher.getSchoolAgeSalaryDateStart());
+		lambdaQueryWrapper.le(Func.isNotEmpty(schoolTeacher.getSchoolAgeSalaryDateEnd()),SchoolTeacher::getSchoolAgeSalaryDate,schoolTeacher.getSchoolAgeSalaryDateEnd());
+		IPage<SchoolTeacher> pages = schoolTeacherService.page(Condition.getPage(query), lambdaQueryWrapper);
 		return R.data(pages);
 	}
 

+ 21 - 150
blade-service/blade-client/src/main/java/org/springblade/client/school/excel/SchoolTeacherExcel.java

@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.Date;
 
 @Data
@@ -17,190 +18,60 @@ import java.util.Date;
 public class SchoolTeacherExcel implements Serializable {
 	private static final long serialVersionUID = 1L;
 	/**
-	 * 身份证号
-	 */
-	@ExcelProperty(value = "身份证号(必填)")
-	private String idNumber;
-	/**
-	 * 工号
-	 */
-	@ExcelProperty(value = "工号(必填)")
-	private String code;
-	/**
 	 * 姓名
 	 */
 	@ExcelProperty(value = "姓名(必填)")
 	private String cname;
 	/**
-	 * 曾用名
+	 * 身份证号
 	 */
-	@ExcelProperty(value = "曾用名")
-	private String usedName;
+	@ExcelProperty(value = "身份证号(必填)")
+	private String idNumber;
 	/**
 	 * 性别
 	 */
 	@ExcelProperty(value = "性别")
 	private String gender;
 	/**
-	 * 籍贯
-	 */
-	@ExcelProperty(value = "籍贯")
-	private String nativePlace;
-	/**
-	 * 民族
-	 */
-	@ExcelProperty(value = "民族")
-	private String nation;
-	/**
-	 * 出生日期
-	 */
-	@ExcelProperty(value = "出生日期")
-	private Date birthdate;
-	/**
-	 * 婚姻状况
-	 */
-	@ExcelProperty(value = "婚姻状况")
-	private String maritalStatus;
-	/**
-	 * 政治面貌
-	 */
-	@ExcelProperty(value = "政治面貌")
-	private String politicsStatus;
-	/**
-	 * 加入日期
-	 */
-	@ExcelProperty(value = "加入日期")
-	private Date joiningDate;
-	/**
-	 * 健康状况
-	 */
-	@ExcelProperty(value = "健康状况")
-	private String healthCondition;
-	/**
-	 * 血型
-	 */
-	@ExcelProperty(value = "血型")
-	private String bloodType;
-	/**
-	 * 家庭住址
-	 */
-	@ExcelProperty(value = "家庭住址")
-	private String familyAddress;
-	/**
-	 * 邮政编码
-	 */
-	@ExcelProperty(value = "邮政编码")
-	private String postalCode;
-	/**
-	 * 户口性质
-	 */
-	@ExcelProperty(value = "户口性质")
-	private String category;
-	/**
-	 * 户口所在地
-	 */
-	@ExcelProperty(value = "户口所在地")
-	private String residentCity;
-	/**
 	 * 联系电话
 	 */
 	@ExcelProperty(value = "联系电话")
 	private String phone;
 	/**
-	 * 电子邮箱
+	 * 学历
 	 */
-	@ExcelProperty(value = "电子邮箱")
-	private String emailAddress;
-	/**
-	 * 宗教信仰
-	 */
-	@ExcelProperty(value = "宗教信仰")
-	private String faith;
-	/**
-	 * 紧急联系人
-	 */
-	@ExcelProperty(value = "紧急联系人")
-	private String contacts;
-	/**
-	 * 紧急联系人电话
-	 */
-	@ExcelProperty(value = "紧急联系人电话")
-	private String contactNumber;
-	/**
-	 * 国别
-	 */
-	@ExcelProperty(value = "国别")
-	private String nationnality;
-	/**
-	 * 港澳台桥
-	 */
-	@ExcelProperty(value = "港澳台桥")
-	private String indentation;
-	/**
-	 * 编制类别
-	 */
-	@ExcelProperty(value = "编制类别")
-	private String compileCategory;
-	/**
-	 * 身份类别
-	 */
-	@ExcelProperty(value = "身份类别")
-	private String identityCategory;
-	/**
-	 * 教师类别
-	 */
-	@ExcelProperty(value = "教师类别")
-	private String teacherCategory;
-	/**
-	 * 工作状态
-	 */
-	@ExcelProperty(value = "工作状态")
-	private String workingCondition;
-	/**
-	 * 现工作单位
-	 */
-	@ExcelProperty(value = "现工作单位")
-	private String currentEmployer;
+	@ExcelProperty(value = "学历")
+	private String code;
 	/**
-	 * 所在校区
+	 * 入职日期
 	 */
-	@ExcelProperty(value = "所在校区")
-	private String inCampus;
+	@ExcelProperty(value = "入职日期")
+	private Date joiningDate;
 	/**
-	 * 所在院系
+	 * 转正日期
 	 */
-	@ExcelProperty(value = "所在院系")
-	private String department;
+	@ExcelProperty(value = "转正日期")
+	private Date birthdate;
 	/**
-	 * 所在教研室
+	 * 校龄开始日期
 	 */
-	@ExcelProperty(value = "所在教研室")
-	private String inStaffRoom;
+	@ExcelProperty(value = "校龄开始日期")
+	private BigDecimal schoolAgeSalaryDate;
 	/**
 	 * 所在部门
 	 */
 	@ExcelProperty(value = "所在部门")
 	private String inSection;
 	/**
-	 * 专业特长
-	 */
-	@ExcelProperty(value = "专业特长")
-	private String professionalExpertise;
-	/**
-	 * 是否双师
+	 * 是否班主任
 	 */
-	@ExcelProperty(value = "是否双师(是/否)")
+	@ApiModelProperty(value = "是否班主任")
 	private String doubleTeachers;
 	/**
-	 * 是否专业带头人
-	 */
-	@ExcelProperty(value = "是否专业带头人(是/否)")
-	private String professionalLeader;
-	/**
-	 * 是否骨干教师
+	 * 职务
 	 */
-	@ExcelProperty(value = "是否骨干教师(是/否)")
-	private String coreTeacher;
+	@ApiModelProperty(value = "职务")
+	private String compileCategory;
 	/**
 	 * 备注
 	 */

+ 24 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/feign/SchoolTeacherClient.java

@@ -0,0 +1,24 @@
+package org.springblade.client.school.feign;
+
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.client.feign.ISchoolTeacherClient;
+import org.springblade.client.school.service.ISchoolTeacherService;
+import org.springblade.core.tenant.annotation.NonDS;
+import org.springblade.core.tool.api.R;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
+
+@Slf4j
+@NonDS
+@ApiIgnore()
+@RestController
+@AllArgsConstructor
+public class SchoolTeacherClient implements ISchoolTeacherClient {
+	private final ISchoolTeacherService schoolTeacherService;
+
+	@Override
+	public R updateTeacherMessage() {
+		return schoolTeacherService.updateTeacherMessage();
+	}
+}

+ 42 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/mapper/SchoolTeacherCauseMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.school.mapper;
+
+import org.springblade.client.entity.SchoolTeacherCause;
+import org.springblade.client.vo.SchoolTeacherCauseVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 学校教师事业编开始记录 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-01-21
+ */
+public interface SchoolTeacherCauseMapper extends BaseMapper<SchoolTeacherCause> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param schoolTeacherCause
+	 * @return
+	 */
+	List<SchoolTeacherCauseVO> selectSchoolTeacherCausePage(IPage page, SchoolTeacherCauseVO schoolTeacherCause);
+
+}

+ 26 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/mapper/SchoolTeacherCauseMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.client.school.mapper.SchoolTeacherCauseMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="schoolTeacherCauseResultMap" type="org.springblade.client.entity.SchoolTeacherCause">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="birthdate" property="birthdate"/>
+        <result column="remarks" property="remarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectSchoolTeacherCausePage" resultMap="schoolTeacherCauseResultMap">
+        select * from basic_school_teacher_cause where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/service/ISchoolTeacherCauseService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.school.service;
+
+import org.springblade.client.entity.SchoolTeacherCause;
+import org.springblade.client.vo.SchoolTeacherCauseVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 学校教师事业编开始记录 服务类
+ *
+ * @author BladeX
+ * @since 2022-01-21
+ */
+public interface ISchoolTeacherCauseService extends IService<SchoolTeacherCause> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param schoolTeacherCause
+	 * @return
+	 */
+	IPage<SchoolTeacherCauseVO> selectSchoolTeacherCausePage(IPage<SchoolTeacherCauseVO> page, SchoolTeacherCauseVO schoolTeacherCause);
+
+}

+ 6 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/service/ISchoolTeacherService.java

@@ -57,4 +57,10 @@ public interface ISchoolTeacherService extends IService<SchoolTeacher> {
 	 */
 	R importSupplierDesc(List<SchoolTeacherExcel> data, Boolean isCovered);
 
+	/**
+	 * 更新教职工校龄
+	 * @return
+	 */
+	R updateTeacherMessage();
+
 }

+ 41 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/service/impl/SchoolTeacherCauseServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.client.school.service.impl;
+
+import org.springblade.client.entity.SchoolTeacherCause;
+import org.springblade.client.school.mapper.SchoolTeacherCauseMapper;
+import org.springblade.client.school.service.ISchoolTeacherCauseService;
+import org.springblade.client.vo.SchoolTeacherCauseVO;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 学校教师事业编开始记录 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-01-21
+ */
+@Service
+public class SchoolTeacherCauseServiceImpl extends ServiceImpl<SchoolTeacherCauseMapper, SchoolTeacherCause> implements ISchoolTeacherCauseService {
+
+	@Override
+	public IPage<SchoolTeacherCauseVO> selectSchoolTeacherCausePage(IPage<SchoolTeacherCauseVO> page, SchoolTeacherCauseVO schoolTeacherCause) {
+		return page.setRecords(baseMapper.selectSchoolTeacherCausePage(page, schoolTeacherCause));
+	}
+
+}

+ 45 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/service/impl/SchoolTeacherServiceImpl.java

@@ -16,13 +16,17 @@
  */
 package org.springblade.client.school.service.impl;
 
+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 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
 import org.springblade.client.entity.GoodsType;
 import org.springblade.client.entity.SchoolTeacher;
 import org.springblade.client.goods.excel.GoodsExcel;
 import org.springblade.client.school.excel.SchoolTeacherExcel;
+import org.springblade.client.school.mapper.SchoolTeacherCauseMapper;
 import org.springblade.client.school.mapper.SchoolTeacherMapper;
 import org.springblade.client.school.service.ISchoolTeacherService;
 import org.springblade.client.vo.SchoolTeacherVO;
@@ -35,6 +39,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.Period;
+import java.time.ZoneId;
 import java.util.Date;
 import java.util.List;
 
@@ -45,8 +53,10 @@ import java.util.List;
  * @since 2022-01-10
  */
 @Service
+@AllArgsConstructor
 public class SchoolTeacherServiceImpl extends ServiceImpl<SchoolTeacherMapper, SchoolTeacher> implements ISchoolTeacherService {
 
+	private final SchoolTeacherCauseMapper schoolTeacherCauseMapper;
 	@Override
 	public IPage<SchoolTeacherVO> selectSchoolTeacherPage(IPage<SchoolTeacherVO> page, SchoolTeacherVO schoolTeacher) {
 		return page.setRecords(baseMapper.selectSchoolTeacherPage(page, schoolTeacher));
@@ -67,6 +77,23 @@ public class SchoolTeacherServiceImpl extends ServiceImpl<SchoolTeacherMapper, S
 			schoolTeacher.setUpdateUser(SecureUtil.getUserId());
 			baseMapper.updateById(schoolTeacher);
 		}
+		if (CollectionUtils.isNotEmpty(schoolTeacher.getCauseList())){
+			schoolTeacher.getCauseList().stream().forEach(item ->{
+				if (item.getId() == null){
+					item.setPid(schoolTeacher.getId());
+					item.setCreateTime(new Date());
+					item.setCreateUser(SecureUtil.getUserId());
+					item.setTenantId(SecureUtil.getTenantId());
+					schoolTeacherCauseMapper.insert(item);
+				}else {
+					item.setPid(schoolTeacher.getId());
+					item.setUpdateTime(new Date());
+					item.setUpdateUser(SecureUtil.getUserId());
+					item.setTenantId(SecureUtil.getTenantId());
+					schoolTeacherCauseMapper.updateById(item);
+				}
+			});
+		}
 		return schoolTeacher;
 	}
 
@@ -118,4 +145,22 @@ public class SchoolTeacherServiceImpl extends ServiceImpl<SchoolTeacherMapper, S
 		return R.success("导入成功");
 	}
 
+	@Override
+	public R updateTeacherMessage() {
+		//获取校龄开始时间不为空的计算校龄
+		LambdaQueryWrapper<SchoolTeacher> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(SchoolTeacher::getIsDeleted,0);
+		lambdaQueryWrapper.ne(SchoolTeacher::getSchoolAge,0);
+		List<SchoolTeacher> schoolTeacherList = baseMapper.selectList(lambdaQueryWrapper);
+		//有数据执行更新校龄操作
+		if (CollectionUtils.isNotEmpty(schoolTeacherList)){
+			schoolTeacherList.stream().forEach(item ->{
+				int years = Period.between(item.getSchoolAgeSalaryDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()).getYears();
+				item.setSchoolAge(new BigDecimal(years));
+				baseMapper.updateById(item);
+			});
+		}
+		return R.success("操作成功");
+	}
+
 }

+ 5 - 0
blade-service/blade-school/src/main/java/org/springblade/school/excel/SalaryItemExcel.java

@@ -55,6 +55,11 @@ public class SalaryItemExcel implements Serializable {
 	@ExcelProperty(value = "工资拔付标准")
 	private BigDecimal salaryWithdrawalStandard;
 	/**
+	 * 职级类别
+	 */
+	@ExcelProperty(value = "职级类别")
+	private BigDecimal rankCategory;
+	/**
 	 * 职级拨付标准
 	 */
 	@ExcelProperty(value = "职级拨付标准")

+ 12 - 1
blade-service/blade-school/src/main/java/org/springblade/school/service/impl/SalaryItemServiceImpl.java

@@ -18,11 +18,14 @@ package org.springblade.school.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.SecureUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.school.entity.Salary;
 import org.springblade.school.entity.SalaryItem;
 import org.springblade.school.excel.*;
+import org.springblade.school.mapper.SalaryMapper;
 import org.springblade.school.vo.SalaryItemVO;
 import org.springblade.school.mapper.SalaryItemMapper;
 import org.springblade.school.service.ISalaryItemService;
@@ -41,8 +44,9 @@ import java.util.List;
  * @since 2022-01-11
  */
 @Service
+@AllArgsConstructor
 public class SalaryItemServiceImpl extends ServiceImpl<SalaryItemMapper, SalaryItem> implements ISalaryItemService {
-
+	private final SalaryMapper salaryMapper;
 	@Override
 	public IPage<SalaryItemVO> selectSalaryItemPage(IPage<SalaryItemVO> page, SalaryItemVO salaryItem) {
 		return page.setRecords(baseMapper.selectSalaryItemPage(page, salaryItem));
@@ -62,10 +66,12 @@ public class SalaryItemServiceImpl extends ServiceImpl<SalaryItemMapper, SalaryI
 			SalaryItemExcel salaryItemExcel = data.get(i);
 			if (StringUtils.isBlank(salaryItemExcel.getIdNumber())){
 				errMsg.append("第"+(i+2)+"行,身份证号码为空,");
+				data.remove(i);
 				continue;
 			}
 			if (StringUtils.isBlank(salaryItemExcel.getCname())){
 				errMsg.append("第"+(i+2)+"行,姓名为空,");
+				data.remove(i);
 				continue;
 			}
 			/*if (StringUtils.isBlank(salaryItemExcel.getRankStandard())){
@@ -95,6 +101,11 @@ public class SalaryItemServiceImpl extends ServiceImpl<SalaryItemMapper, SalaryI
 			//更新计算工资
 			this.countSalary(salaryItem);
 		}
+		//更新主表人数字段
+		Salary salary = new Salary();
+		salary.setId(id);
+		salary.setPersonNumber(String.valueOf(data.size()));
+		salaryMapper.updateById(salary);
 		if (success == 0){
 			return R.success("导入失败");
 		}else if (success >0 && success == data.size()){

+ 4 - 3
blade-service/blade-school/src/main/java/org/springblade/school/service/impl/SalaryServiceImpl.java

@@ -75,9 +75,6 @@ public class SalaryServiceImpl extends ServiceImpl<SalaryMapper, Salary> impleme
 				if (StringUtils.isBlank(salaryItem.getIdNumber())){
 					throw new RuntimeException("第"+i+"行身份证号不能为空");
 				}
-				if (StringUtils.isBlank(salaryItem.getRankStandard())){
-					throw new RuntimeException("第"+i+"职级标准不能为空");
-				}
 				if (StringUtils.isBlank(salaryItem.getIdNumber())){
 					throw new RuntimeException("第"+i+"身份证号不能为空");
 				}
@@ -101,6 +98,10 @@ public class SalaryServiceImpl extends ServiceImpl<SalaryMapper, Salary> impleme
 				salaryItemService.countSalary(salaryItem);
 			}
 		}
+		//获取明细
+		List<SalaryItem> salaryItems = salaryItemMapper.selectList(new QueryWrapper<SalaryItem>().eq("pid", salary.getId()).eq("tenant_id", SecureUtil.getTenantId()).eq("is_deleted", 0));
+		salary.setPersonNumber(String.valueOf(salaryItems.size()));
+		baseMapper.updateById(salary);
 		return salary;
 	}