Browse Source

学校修改

lazhaoqian 3 years ago
parent
commit
21658a110e
21 changed files with 1164 additions and 22 deletions
  1. 34 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/dto/SchoolConfigDTO.java
  2. 34 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/dto/SchoolConfigItemDTO.java
  3. 122 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/SchoolConfig.java
  4. 116 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/SchoolConfigItem.java
  5. 16 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/SchoolTeacher.java
  6. 36 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/vo/SchoolConfigItemVO.java
  7. 36 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/vo/SchoolConfigVO.java
  8. 143 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/controller/SchoolConfigController.java
  9. 126 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/controller/SchoolConfigItemController.java
  10. 8 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/controller/SchoolTeacherController.java
  11. 95 5
      blade-service/blade-client/src/main/java/org/springblade/client/school/excel/SchoolTeacherExcel.java
  12. 42 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/mapper/SchoolConfigItemMapper.java
  13. 27 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/mapper/SchoolConfigItemMapper.xml
  14. 42 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/mapper/SchoolConfigMapper.java
  15. 27 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/mapper/SchoolConfigMapper.xml
  16. 41 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/service/ISchoolConfigItemService.java
  17. 54 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/service/ISchoolConfigService.java
  18. 41 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/service/impl/SchoolConfigItemServiceImpl.java
  19. 105 0
      blade-service/blade-client/src/main/java/org/springblade/client/school/service/impl/SchoolConfigServiceImpl.java
  20. 15 9
      blade-service/blade-client/src/main/java/org/springblade/client/school/service/impl/SchoolTeacherServiceImpl.java
  21. 4 8
      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/SchoolConfigDTO.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.SchoolConfig;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 学校拨付标准配置主表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SchoolConfigDTO extends SchoolConfig {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/dto/SchoolConfigItemDTO.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.SchoolConfigItem;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 学校标准配置明细表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SchoolConfigItemDTO extends SchoolConfigItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 122 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/SchoolConfig.java

@@ -0,0 +1,122 @@
+/*
+ *      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.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 学校拨付标准配置主表实体类
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+@Data
+@TableName("basic_school_config")
+@ApiModel(value = "SchoolConfig对象", description = "学校拨付标准配置主表")
+public class SchoolConfig implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 所在部门(字典表 跟基础资料一致 必填)
+	*/
+		@ApiModelProperty(value = "所在部门(字典表 跟基础资料一致 必填)")
+		private String inSection;
+	/**
+	* 教师类别(字典表 跟基础资料一致 必填)
+	*/
+		@ApiModelProperty(value = "教师类别(字典表 跟基础资料一致 必填)")
+		private String salaryWithdrawalStandardName;
+	/**
+	* 标准类别(字典表 工资标准 职称工资拨付标准 必填)
+	*/
+		@ApiModelProperty(value = "标准类别(字典表 工资标准 职称工资拨付标准 必填)")
+		private String normType;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@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是)
+	*/
+		@TableLogic
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+	/**
+	* 计算类别(字典表 校龄 职称 必填)
+	*/
+		@ApiModelProperty(value = "计算类别(字典表 校龄 职称 必填)")
+		private String resultType;
+	/**
+	 * 租户id
+	 */
+	@ApiModelProperty(value = "租户id")
+	private String tenantId;
+	@ApiModelProperty(value = "配置明细")
+	@TableField(exist = false)
+	private List<SchoolConfigItem> schoolConfigItems;
+	@ApiModelProperty(value = "创建人中文名")
+	@TableField(exist = false)
+	private String createUserName;
+
+
+}

+ 116 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/SchoolConfigItem.java

@@ -0,0 +1,116 @@
+/*
+ *      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 java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 学校标准配置明细表实体类
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+@Data
+@TableName("basic_school_config_item")
+@ApiModel(value = "SchoolConfigItem对象", description = "学校标准配置明细表")
+public class SchoolConfigItem implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 校龄或职工类别
+	*/
+		@ApiModelProperty(value = "校龄或职工类别")
+		private String parameter;
+	/**
+	* 工资标准
+	*/
+		@ApiModelProperty(value = "工资标准")
+		private BigDecimal salary;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@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是)
+	*/
+		@TableLogic
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+	/**
+	 * 租户id
+	 */
+	@ApiModelProperty(value = "租户id")
+	private String tenantId;
+
+
+}

+ 16 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/SchoolTeacher.java

@@ -501,6 +501,22 @@ public class SchoolTeacher implements Serializable {
 	 */
 	@ApiModelProperty(value = "教研组长")
 	private String teachingResearchName;
+	/**
+	 * 职工类别
+	 */
+	@ApiModelProperty(value = "职工类别(字典表 教师 非教师)")
+	private String staffType;
+	/**
+	 * 授课类别
+	 */
+	@ApiModelProperty(value = "授课类别(字典表 文化课 非文化课)")
+	private String classType;
+	/**
+	 * 虚拟工作量工资标准
+	 */
+	@ApiModelProperty(value = "虚拟工作量工资标准")
+	private BigDecimal virtualWorkloadSalary;
+
 
 
 

+ 36 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/vo/SchoolConfigItemVO.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.SchoolConfigItem;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 学校标准配置明细表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "SchoolConfigItemVO对象", description = "学校标准配置明细表")
+public class SchoolConfigItemVO extends SchoolConfigItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/vo/SchoolConfigVO.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.SchoolConfig;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 学校拨付标准配置主表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "SchoolConfigVO对象", description = "学校拨付标准配置主表")
+public class SchoolConfigVO extends SchoolConfig {
+	private static final long serialVersionUID = 1L;
+
+}

+ 143 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/controller/SchoolConfigController.java

@@ -0,0 +1,143 @@
+/*
+ *      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 com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+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.ISchoolConfigService;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.client.entity.SchoolConfig;
+import org.springblade.client.vo.SchoolConfigVO;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 学校拨付标准配置主表 控制器
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/schoolconfig")
+@Api(value = "学校拨付标准配置主表", tags = "学校拨付标准配置主表接口")
+public class SchoolConfigController extends BladeController {
+
+	private final ISchoolConfigService schoolConfigService;
+	private final IUserClient userClient;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入schoolConfig")
+	public R<SchoolConfig> detail(SchoolConfig schoolConfig) {
+		schoolConfig.setTenantId(SecureUtil.getTenantId());
+		schoolConfig.setIsDeleted(0);
+		SchoolConfig detail = schoolConfigService.getMessage(schoolConfig);
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 学校拨付标准配置主表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入schoolConfig")
+	public R<IPage<SchoolConfig>> list(SchoolConfig schoolConfig, Query query) {
+		schoolConfig.setTenantId(SecureUtil.getTenantId());
+		schoolConfig.setIsDeleted(0);
+		IPage<SchoolConfig> pages = schoolConfigService.page(Condition.getPage(query), Condition.getQueryWrapper(schoolConfig));
+		if (CollectionUtils.isNotEmpty(pages.getRecords())){
+			pages.getRecords().stream().forEach(item ->{
+				R<User> user = userClient.userInfoById(item.getCreateUser());
+				if (user.isSuccess() && user.getData() != null){
+					item.setCreateUserName(user.getData().getName());
+				}
+			});
+		}
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 学校拨付标准配置主表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入schoolConfig")
+	public R<IPage<SchoolConfigVO>> page(SchoolConfigVO schoolConfig, Query query) {
+		IPage<SchoolConfigVO> pages = schoolConfigService.selectSchoolConfigPage(Condition.getPage(query), schoolConfig);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 学校拨付标准配置主表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入schoolConfig")
+	public R save(@Valid @RequestBody SchoolConfig schoolConfig) {
+		return R.status(schoolConfigService.save(schoolConfig));
+	}
+
+	/**
+	 * 修改 学校拨付标准配置主表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入schoolConfig")
+	public R update(@Valid @RequestBody SchoolConfig schoolConfig) {
+		return R.status(schoolConfigService.updateById(schoolConfig));
+	}
+
+	/**
+	 * 新增或修改 学校拨付标准配置主表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入schoolConfig")
+	public R submit(@Valid @RequestBody SchoolConfig schoolConfig) {
+		return R.data(schoolConfigService.saveOrUpdateMessage(schoolConfig));
+	}
+
+
+	/**
+	 * 删除 学校拨付标准配置主表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(schoolConfigService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 126 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/controller/SchoolConfigItemController.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.ISchoolConfigItemService;
+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.SchoolConfigItem;
+import org.springblade.client.vo.SchoolConfigItemVO;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 学校标准配置明细表 控制器
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/schoolconfigitem")
+@Api(value = "学校标准配置明细表", tags = "学校标准配置明细表接口")
+public class SchoolConfigItemController extends BladeController {
+
+	private final ISchoolConfigItemService schoolConfigItemService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入schoolConfigItem")
+	public R<SchoolConfigItem> detail(SchoolConfigItem schoolConfigItem) {
+		SchoolConfigItem detail = schoolConfigItemService.getOne(Condition.getQueryWrapper(schoolConfigItem));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 学校标准配置明细表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入schoolConfigItem")
+	public R<IPage<SchoolConfigItem>> list(SchoolConfigItem schoolConfigItem, Query query) {
+		IPage<SchoolConfigItem> pages = schoolConfigItemService.page(Condition.getPage(query), Condition.getQueryWrapper(schoolConfigItem));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 学校标准配置明细表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入schoolConfigItem")
+	public R<IPage<SchoolConfigItemVO>> page(SchoolConfigItemVO schoolConfigItem, Query query) {
+		IPage<SchoolConfigItemVO> pages = schoolConfigItemService.selectSchoolConfigItemPage(Condition.getPage(query), schoolConfigItem);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 学校标准配置明细表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入schoolConfigItem")
+	public R save(@Valid @RequestBody SchoolConfigItem schoolConfigItem) {
+		return R.status(schoolConfigItemService.save(schoolConfigItem));
+	}
+
+	/**
+	 * 修改 学校标准配置明细表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入schoolConfigItem")
+	public R update(@Valid @RequestBody SchoolConfigItem schoolConfigItem) {
+		return R.status(schoolConfigItemService.updateById(schoolConfigItem));
+	}
+
+	/**
+	 * 新增或修改 学校标准配置明细表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入schoolConfigItem")
+	public R submit(@Valid @RequestBody SchoolConfigItem schoolConfigItem) {
+		return R.status(schoolConfigItemService.saveOrUpdate(schoolConfigItem));
+	}
+
+
+	/**
+	 * 删除 学校标准配置明细表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(schoolConfigItemService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 8 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/controller/SchoolTeacherController.java

@@ -216,6 +216,14 @@ public class SchoolTeacherController extends BladeController {
 		}
 		ExcelUtil.export(response, "导出信息-教职工资料", "导入数据表", list, SchoolTeacherExcel.class);
 	}
+	/**
+	 * 测试更新教职工校龄
+	 * @return
+	 */
+	@GetMapping("/updateTeacherMessage")
+	R updateTeacherMessage(){
+		return schoolTeacherService.updateTeacherMessage();
+	}
 
 
 }

+ 95 - 5
blade-service/blade-client/src/main/java/org/springblade/client/school/excel/SchoolTeacherExcel.java

@@ -58,6 +58,11 @@ public class SchoolTeacherExcel implements Serializable {
 	@ExcelProperty(value = "校龄开始日期")
 	private BigDecimal schoolAgeSalaryDate;
 	/**
+	 * 校龄
+	 */
+	@ExcelProperty(value = "校龄")
+	private BigDecimal schoolAge;
+	/**
 	 * 所在部门
 	 */
 	@ExcelProperty(value = "所在部门")
@@ -75,77 +80,152 @@ public class SchoolTeacherExcel implements Serializable {
 	/**
 	 * 工资拨付标准
 	 */
+	@ExcelProperty(value = "教师类别")
+	private String salaryWithdrawalStandardName;
+	/**
+	 * 工资拨付标准
+	 */
 	@ExcelProperty(value = "工资拨付标准")
 	private BigDecimal salaryWithdrawalStandard;
 	/**
 	 * 职级拨付标准
 	 */
 	@ExcelProperty(value = "职级拨付标准")
+	private String rankWithdrawalStandardName;
+	/**
+	 * 职级拨付标准
+	 */
+	@ExcelProperty(value = "职级工资")
 	private BigDecimal rankWithdrawalStandard;
 	/**
 	 * 履约奖
 	 */
+	@ExcelProperty(value = "履约奖标准")
+	private String performanceAwardName;
+	/**
+	 * 履约奖
+	 */
 	@ExcelProperty(value = "履约奖")
 	private BigDecimal performanceAward;
 	/**
 	 * 校龄工资
 	 */
+	@ExcelProperty(value = "校龄工资标准")
+	private String schoolAgeSalaryName;
+	/**
+	 * 校龄工资
+	 */
 	@ExcelProperty(value = "校龄工资")
 	private BigDecimal schoolAgeSalary;
 	/**
 	 * 增资
 	 */
-	@ExcelProperty(value = "增资")
+	@ExcelProperty(value = "增资标准")
+	private String capitalIncreaseName;
+	/**
+	 * 增资
+	 */
+	@ExcelProperty(value = "增资工资")
 	private BigDecimal capitalIncrease;
 	/**
 	 * 学历工资
 	 */
+	@ExcelProperty(value = "学历标准")
+	private String educationSalaryName;
+	/**
+	 * 学历工资
+	 */
 	@ExcelProperty(value = "学历工资")
 	private BigDecimal educationSalary;
 	/**
 	 * 职级工资
 	 */
+	@ExcelProperty(value = "职级等级标准")
+	private String rankSalaryName;
+	/**
+	 * 职级工资
+	 */
 	@ExcelProperty(value = "职级工资")
 	private BigDecimal rankSalary;
 	/**
 	 * 工资基数
 	 */
+	@ExcelProperty(value = "工资基数标准")
+	private String salaryBaseName;
+	/**
+	 * 工资基数
+	 */
 	@ExcelProperty(value = "工资基数")
 	private BigDecimal salaryBase;
 	/**
 	 * 工作量工资
 	 */
+	@ExcelProperty(value = "工作量工资标准")
+	private String workloadSalaryName;
+	/**
+	 * 工作量工资
+	 */
 	@ExcelProperty(value = "工作量工资")
 	private BigDecimal workloadSalary;
 	/**
 	 * 日常考核标准
 	 */
 	@ExcelProperty(value = "日常考核标准")
+	private String dailyAssessmentCriteriaName;
+	/**
+	 * 日常考核标准
+	 */
+	@ExcelProperty(value = "日常考核工资")
 	private BigDecimal dailyAssessmentCriteria;
 	/**
 	 * 日常考核工资
 	 */
-	@ExcelProperty(value = "日常考核工资")
+	@ExcelProperty(value = "日常考核等级")
+	private String dailyAssessmentSalaryName;
+	/**
+	 * 日常考核工资
+	 */
+	@ExcelProperty(value = "日常考核等级工资")
 	private BigDecimal dailyAssessmentSalary;
 	/**
 	 * 学期绩效工资
 	 */
+	@ExcelProperty(value = "学期绩效标准")
+	private String termPerformanceSalaryName;
+	/**
+	 * 学期绩效工资
+	 */
 	@ExcelProperty(value = "学期绩效工资")
 	private BigDecimal termPerformanceSalary;
 	/**
 	 * 领导干部补贴
 	 */
-	@ExcelProperty(value = "领导干部补贴")
+	@ExcelProperty(value = "领导干部补贴标准")
+	private String leadingCadreSubsidyName;
+	/**
+	 * 领导干部补贴
+	 */
+	@ExcelProperty(value = "领导干部补贴工资")
 	private BigDecimal leadingCadreSubsidy;
 	/**
 	 * 备课组长
 	 */
-	@ExcelProperty(value = "备课组长")
+	@ExcelProperty(value = "备课组长补贴标准")
+	private String prepareLessonsName;
+	/**
+	 * 备课组长
+	 */
+	@ExcelProperty(value = "备课组长补贴")
 	private BigDecimal prepareLessons;
 	/**
 	 * 教研组长
 	 */
-	@ExcelProperty(value = "教研组长")
+	@ExcelProperty(value = "教研组长补贴标准")
+	private String teachingResearchName;
+	/**
+	 * 教研组长
+	 */
+	@ExcelProperty(value = "教研组长补贴")
 	private BigDecimal teachingResearch;
 
 	/**
@@ -158,4 +238,14 @@ public class SchoolTeacherExcel implements Serializable {
 	 */
 	@ExcelProperty(value = "备注")
 	private String remarks;
+	/**
+	 * 职工类别
+	 */
+	@ExcelProperty(value = "职工类别(教师/非教师)")
+	private String staffType;
+	/**
+	 * 授课类别
+	 */
+	@ExcelProperty(value = "授课类别(文化课/非文化课)")
+	private String classType;
 }

+ 42 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/mapper/SchoolConfigItemMapper.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.SchoolConfigItem;
+import org.springblade.client.vo.SchoolConfigItemVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 学校标准配置明细表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+public interface SchoolConfigItemMapper extends BaseMapper<SchoolConfigItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param schoolConfigItem
+	 * @return
+	 */
+	List<SchoolConfigItemVO> selectSchoolConfigItemPage(IPage page, SchoolConfigItemVO schoolConfigItem);
+
+}

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

@@ -0,0 +1,27 @@
+<?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.SchoolConfigItemMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="schoolConfigItemResultMap" type="org.springblade.client.entity.SchoolConfigItem">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="parameter" property="parameter"/>
+        <result column="salary" property="salary"/>
+        <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="selectSchoolConfigItemPage" resultMap="schoolConfigItemResultMap">
+        select * from basic_school_config_item where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/mapper/SchoolConfigMapper.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.SchoolConfig;
+import org.springblade.client.vo.SchoolConfigVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 学校拨付标准配置主表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+public interface SchoolConfigMapper extends BaseMapper<SchoolConfig> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param schoolConfig
+	 * @return
+	 */
+	List<SchoolConfigVO> selectSchoolConfigPage(IPage page, SchoolConfigVO schoolConfig);
+
+}

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

@@ -0,0 +1,27 @@
+<?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.SchoolConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="schoolConfigResultMap" type="org.springblade.client.entity.SchoolConfig">
+        <id column="id" property="id"/>
+        <result column="in_section" property="inSection"/>
+        <result column="salary_withdrawal_standard_name" property="salaryWithdrawalStandardName"/>
+        <result column="norm_type" property="normType"/>
+        <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"/>
+        <result column="result_type" property="resultType"/>
+    </resultMap>
+
+
+    <select id="selectSchoolConfigPage" resultMap="schoolConfigResultMap">
+        select * from basic_school_config where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/service/ISchoolConfigItemService.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.SchoolConfigItem;
+import org.springblade.client.vo.SchoolConfigItemVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 学校标准配置明细表 服务类
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+public interface ISchoolConfigItemService extends IService<SchoolConfigItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param schoolConfigItem
+	 * @return
+	 */
+	IPage<SchoolConfigItemVO> selectSchoolConfigItemPage(IPage<SchoolConfigItemVO> page, SchoolConfigItemVO schoolConfigItem);
+
+}

+ 54 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/service/ISchoolConfigService.java

@@ -0,0 +1,54 @@
+/*
+ *      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.SchoolConfig;
+import org.springblade.client.vo.SchoolConfigVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 学校拨付标准配置主表 服务类
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+public interface ISchoolConfigService extends IService<SchoolConfig> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param schoolConfig
+	 * @return
+	 */
+	IPage<SchoolConfigVO> selectSchoolConfigPage(IPage<SchoolConfigVO> page, SchoolConfigVO schoolConfig);
+
+	/**
+	 * 保存修改配置信息
+	 * @param schoolConfig
+	 * @return
+	 */
+	SchoolConfig saveOrUpdateMessage(SchoolConfig schoolConfig);
+
+	/**
+	 * 获取详情
+	 * @return
+	 */
+	SchoolConfig getMessage(SchoolConfig schoolConfig);
+
+}

+ 41 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/service/impl/SchoolConfigItemServiceImpl.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 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.client.entity.SchoolConfigItem;
+import org.springblade.client.school.mapper.SchoolConfigItemMapper;
+import org.springblade.client.school.service.ISchoolConfigItemService;
+import org.springblade.client.vo.SchoolConfigItemVO;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 学校标准配置明细表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+@Service
+public class SchoolConfigItemServiceImpl extends ServiceImpl<SchoolConfigItemMapper, SchoolConfigItem> implements ISchoolConfigItemService {
+
+	@Override
+	public IPage<SchoolConfigItemVO> selectSchoolConfigItemPage(IPage<SchoolConfigItemVO> page, SchoolConfigItemVO schoolConfigItem) {
+		return page.setRecords(baseMapper.selectSchoolConfigItemPage(page, schoolConfigItem));
+	}
+
+}

+ 105 - 0
blade-service/blade-client/src/main/java/org/springblade/client/school/service/impl/SchoolConfigServiceImpl.java

@@ -0,0 +1,105 @@
+/*
+ *      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 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.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
+import org.springblade.client.entity.SchoolConfig;
+import org.springblade.client.entity.SchoolConfigItem;
+import org.springblade.client.school.mapper.SchoolConfigItemMapper;
+import org.springblade.client.school.mapper.SchoolConfigMapper;
+import org.springblade.client.school.service.ISchoolConfigService;
+import org.springblade.client.vo.SchoolConfigVO;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.Date;
+
+/**
+ * 学校拨付标准配置主表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-02-21
+ */
+@Service
+@AllArgsConstructor
+public class SchoolConfigServiceImpl extends ServiceImpl<SchoolConfigMapper, SchoolConfig> implements ISchoolConfigService {
+
+	private final SchoolConfigItemMapper schoolConfigItemMapper;
+	private final IUserClient userClient;
+	@Override
+	public IPage<SchoolConfigVO> selectSchoolConfigPage(IPage<SchoolConfigVO> page, SchoolConfigVO schoolConfig) {
+		return page.setRecords(baseMapper.selectSchoolConfigPage(page, schoolConfig));
+	}
+
+	@Override
+	public SchoolConfig saveOrUpdateMessage(SchoolConfig schoolConfig) {
+		if (schoolConfig.getId() == null){
+			schoolConfig.setTenantId(SecureUtil.getTenantId());
+			schoolConfig.setCreateTime(new Date());
+			schoolConfig.setCreateUser(SecureUtil.getUserId());
+			baseMapper.insert(schoolConfig);
+		}else {
+			schoolConfig.setTenantId(SecureUtil.getTenantId());
+			schoolConfig.setUpdateTime(new Date());
+			schoolConfig.setUpdateUser(SecureUtil.getUserId());
+			baseMapper.updateById(schoolConfig);
+		}
+		if (CollectionUtils.isNotEmpty(schoolConfig.getSchoolConfigItems())){
+			schoolConfig.getSchoolConfigItems().stream().forEach(item ->{
+				if (item.getId() == null){
+					item.setPid(schoolConfig.getId());
+					item.setTenantId(SecureUtil.getTenantId());
+					item.setCreateTime(new Date());
+					item.setCreateUser(SecureUtil.getUserId());
+					schoolConfigItemMapper.insert(item);
+				}else {
+					item.setPid(schoolConfig.getId());
+					item.setTenantId(SecureUtil.getTenantId());
+					item.setUpdateTime(new Date());
+					item.setUpdateUser(SecureUtil.getUserId());
+					schoolConfigItemMapper.updateById(item);
+				}
+			});
+		}
+		return schoolConfig;
+	}
+
+	@Override
+	public SchoolConfig getMessage(SchoolConfig schoolConfig) {
+		SchoolConfig config = baseMapper.selectOne(new QueryWrapper<SchoolConfig>().setEntity(schoolConfig));
+		if (config != null){
+			R<User> user = userClient.userInfoById(config.getCreateUser());
+			if (user.isSuccess() && user.getData() != null){
+				config.setCreateUserName(user.getData().getName());
+			}
+			LambdaQueryWrapper<SchoolConfigItem> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+			lambdaQueryWrapper.eq(SchoolConfigItem::getIsDeleted,0);
+			lambdaQueryWrapper.eq(SchoolConfigItem::getPid,config.getId());
+			lambdaQueryWrapper.eq(SchoolConfigItem::getTenantId,SecureUtil.getTenantId());
+			config.setSchoolConfigItems(schoolConfigItemMapper.selectList(lambdaQueryWrapper));
+		}
+		return config;
+	}
+
+}

+ 15 - 9
blade-service/blade-client/src/main/java/org/springblade/client/school/service/impl/SchoolTeacherServiceImpl.java

@@ -64,21 +64,28 @@ public class SchoolTeacherServiceImpl extends ServiceImpl<SchoolTeacherMapper, S
 	}
 
 	@Override
+	@Transactional
 	public SchoolTeacher saveTeacherMessage(SchoolTeacher schoolTeacher) {
 		SchoolTeacher teacher = baseMapper.selectOne(new QueryWrapper<SchoolTeacher>().eq("id_number", schoolTeacher.getIdNumber()).eq("tenant_id", SecureUtil.getTenantId())
 			.eq("is_deleted", 0));
-		if (teacher == null && schoolTeacher.getId() == null){
+		if (schoolTeacher.getSchoolAgeSalaryDate() != null){
+			Calendar start = Calendar.getInstance();
+			Calendar end = Calendar.getInstance();
+			start.setTime(schoolTeacher.getSchoolAgeSalaryDate());
+			end.setTime(new Date());
+			int month = end.get(Calendar.YEAR)-start.get(Calendar.YEAR);
+			schoolTeacher.setSchoolAge(new BigDecimal(month));
+		}
+		if (teacher == null	){
 			schoolTeacher.setId(null);
 			schoolTeacher.setCreateTime(new Date());
 			schoolTeacher.setCreateUser(SecureUtil.getUserId());
 			schoolTeacher.setTenantId(SecureUtil.getTenantId());
 			baseMapper.insert(schoolTeacher);
-		}else if (teacher == null && schoolTeacher.getId() != null){
-			schoolTeacher.setId(schoolTeacher.getId());
-			schoolTeacher.setUpdateTime(new Date());
-			schoolTeacher.setUpdateUser(SecureUtil.getUserId());
-			baseMapper.updateById(schoolTeacher);
-		}else {
+		}else{
+			if (schoolTeacher.getId() != null && teacher.getId().longValue() != schoolTeacher.getId().longValue()){
+				throw  new RuntimeException("身份证号:"+schoolTeacher.getIdNumber()+"已存在");
+			}
 			schoolTeacher.setId(teacher.getId());
 			schoolTeacher.setUpdateTime(new Date());
 			schoolTeacher.setUpdateUser(SecureUtil.getUserId());
@@ -166,9 +173,8 @@ public class SchoolTeacherServiceImpl extends ServiceImpl<SchoolTeacherMapper, S
 				Calendar end = Calendar.getInstance();
 				start.setTime(item.getSchoolAgeSalaryDate());
 				end.setTime(new Date());
-				int result = end.get(Calendar.MONTH)-start.get(Calendar.MONTH);
 				int month = end.get(Calendar.YEAR)-start.get(Calendar.YEAR);
-				item.setSchoolAge(new BigDecimal(Math.abs(month + result)));
+				item.setSchoolAge(new BigDecimal(month));
 				baseMapper.updateById(item);
 			});
 		}

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

@@ -88,20 +88,16 @@ public class SalaryServiceImpl extends ServiceImpl<SalaryMapper, Salary> impleme
 				}
 				SalaryItem item = salaryItemMapper.selectOne(new QueryWrapper<SalaryItem>().eq("pid", salary.getId()).eq("tenant_id", SecureUtil.getTenantId())
 					.eq("id_number", salaryItem.getIdNumber()).eq("is_deleted", 0));
-				if (item == null && salaryItem.getId() == null){
+				if (item == null){
 					salaryItem.setPid(salary.getId());
 					salaryItem.setCreateTime(new Date());
 					salaryItem.setCreateUser(SecureUtil.getUserId());
 					salaryItem.setTenantId(SecureUtil.getTenantId());
 					salaryItemMapper.insert(salaryItem);
-				}else if (item == null && salaryItem.getId() != null){
-					salaryItem.setId(salaryItem.getId());
-					salaryItem.setPid(salary.getId());
-					salaryItem.setUpdateTime(new Date());
-					salaryItem.setUpdateUser(SecureUtil.getUserId());
-					salaryItem.setTenantId(SecureUtil.getTenantId());
-					salaryItemMapper.updateById(salaryItem);
 				}else {
+					if (salaryItem.getId() != null && salaryItem.getId().longValue() != item.getId().longValue()){
+						continue;
+					}
 					salaryItem.setId(item.getId());
 					salaryItem.setPid(salary.getId());
 					salaryItem.setUpdateTime(new Date());