diff --git a/.idea/workspace.xml b/.idea/workspace.xml index dadc0939..8715e8b2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,57 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - @@ -63,7 +114,7 @@ - + @@ -127,8 +178,8 @@ - + @@ -147,7 +198,7 @@ - + @@ -176,14 +227,34 @@ diff --git a/src/main/java/com/lz/modules/app/Dto/DepartmentsDto.java b/src/main/java/com/lz/modules/app/Dto/DepartmentsDto.java new file mode 100644 index 00000000..6ee4bc36 --- /dev/null +++ b/src/main/java/com/lz/modules/app/Dto/DepartmentsDto.java @@ -0,0 +1,36 @@ +package com.lz.modules.app.Dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 部门表 + * + * @author fumeiai + * @email fumeiai@linzikg.com + * @date 2020-04-30 16:59:50 + */ +@Data +public class DepartmentsDto implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 飞书部门id + */ + private String departmentId; + /** + * 飞书上级部门id + */ + private String departmentParentId; + /** + * 飞书显示部门人数 + */ + private Integer memberCount; + /** + * 组织架构名称/部门名称 + */ + private String departmentName; + + +} diff --git a/src/main/java/com/lz/modules/app/Dto/StaffBaseInfoDto.java b/src/main/java/com/lz/modules/app/Dto/StaffBaseInfoDto.java new file mode 100644 index 00000000..9f56a55c --- /dev/null +++ b/src/main/java/com/lz/modules/app/Dto/StaffBaseInfoDto.java @@ -0,0 +1,25 @@ +package com.lz.modules.app.Dto; + +import lombok.Data; + +@Data +public class StaffBaseInfoDto { + + //姓名 + private String staffName; + //性别 + private Integer gender; + //生日 + private String birthday; + //婚姻状况 + private Integer maritalStatus; + //民族 + private String national; + //政治面貌 + private String politicalLandscape; + //联系电话 + private String mobile; + //现住址 + private String currentAddress; + +} diff --git a/src/main/java/com/lz/modules/app/Dto/StaffDto.java b/src/main/java/com/lz/modules/app/Dto/StaffDto.java new file mode 100644 index 00000000..ae710f30 --- /dev/null +++ b/src/main/java/com/lz/modules/app/Dto/StaffDto.java @@ -0,0 +1,44 @@ +package com.lz.modules.app.Dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 员工基本信息 + * + * @author fumeiai + * @email fumeiai@linzikg.com + * @date 2020-04-29 20:59:20 + */ +@Data +public class StaffDto implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 员工Id + */ + private Long staffId; + + /** + * 员工工号 + */ + private String staffNo; + /** + * 员工姓名 + */ + private String name; + /** + * 职位 + */ + private String position; + /** + * 人员状态【1:离职;0:在职】 + */ + private Integer staffStatus; + /** + * 是否是部门负责人 + */ + private Integer departmentLeader; + +} diff --git a/src/main/java/com/lz/modules/app/Dto/StaffEducationInfoDto.java b/src/main/java/com/lz/modules/app/Dto/StaffEducationInfoDto.java new file mode 100644 index 00000000..b975f09b --- /dev/null +++ b/src/main/java/com/lz/modules/app/Dto/StaffEducationInfoDto.java @@ -0,0 +1,17 @@ +package com.lz.modules.app.Dto; + +import lombok.Data; + +@Data +public class StaffEducationInfoDto { + + //学历 (初中/高中/大专/本科/硕士及以上) + private String education; + //毕业院校 + private String graduatedSchool; + //专业 + private String specialty; + //毕业日期 + private String graduationTime; + +} diff --git a/src/main/java/com/lz/modules/app/Dto/StaffOccupationInfoDto.java b/src/main/java/com/lz/modules/app/Dto/StaffOccupationInfoDto.java new file mode 100644 index 00000000..9974741f --- /dev/null +++ b/src/main/java/com/lz/modules/app/Dto/StaffOccupationInfoDto.java @@ -0,0 +1,79 @@ +package com.lz.modules.app.Dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 员工职业信息 + * + * @author fumeiai + * @email fumeiai@linzikg.com + * @date 2020-04-29 20:59:20 + */ +@Data +public class StaffOccupationInfoDto implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 员工工号 + */ + private String staffNo; + + /** + * 职位 + */ + private String position; + + /** + * 入职时间 + */ + private String entryTime; + + /** + * 人员状态【1:离职;0:在职】 + */ + private String staffStatus; + + /** + * 离职时间 + */ + private String resignationTime; + + /** + * 离职原因 + */ + private String resignationReasons; + + /** + * 劳动合同签订公司 + */ + private String signingCompany; + + /** + * 岗位最初从业时间 + */ + private String jobBeginTime; + + /** + * 工作经历 + */ + private String workExperience; + + /** + * 简历附件url + */ + private String resumeUrl; + + /** + * 项目经历 + */ + private List projectExperiences; + + /** + * 工作调转记录 + */ + private List workTransfers; + +} diff --git a/src/main/java/com/lz/modules/app/Dto/StaffProjectExperienceDto.java b/src/main/java/com/lz/modules/app/Dto/StaffProjectExperienceDto.java new file mode 100644 index 00000000..f673d0d8 --- /dev/null +++ b/src/main/java/com/lz/modules/app/Dto/StaffProjectExperienceDto.java @@ -0,0 +1,18 @@ +package com.lz.modules.app.Dto; + +import lombok.Data; + +@Data +public class StaffProjectExperienceDto { + + //项目名称 + private String projectName; + //项目时间起 + private String projectBeginTime; + //项目时间止 + private String projectEndTime; + //工作内容 + private String projectContent; + + +} diff --git a/src/main/java/com/lz/modules/app/Dto/StaffWorkTransferDto.java b/src/main/java/com/lz/modules/app/Dto/StaffWorkTransferDto.java new file mode 100644 index 00000000..bdec2396 --- /dev/null +++ b/src/main/java/com/lz/modules/app/Dto/StaffWorkTransferDto.java @@ -0,0 +1,15 @@ +package com.lz.modules.app.Dto; + +import lombok.Data; + +@Data +public class StaffWorkTransferDto { + + //时间 + private String transferTime; + //调转记录 + private String transferRecord; + //调转类型[平调/升职/降职] + private String transferType; + +} diff --git a/src/main/java/com/lz/modules/app/controller/DepartmentsController.java b/src/main/java/com/lz/modules/app/controller/DepartmentsController.java index bc64d32d..1908e7fd 100644 --- a/src/main/java/com/lz/modules/app/controller/DepartmentsController.java +++ b/src/main/java/com/lz/modules/app/controller/DepartmentsController.java @@ -1,8 +1,11 @@ package com.lz.modules.app.controller; import java.util.Arrays; +import java.util.List; import java.util.Map; +import com.lz.modules.app.Dto.DepartmentsDto; +import com.lz.modules.app.utils.BeanConversionUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; @@ -17,7 +20,6 @@ import com.lz.common.utils.PageUtils; import com.lz.common.utils.R; - /** * 部门表 * @@ -26,7 +28,7 @@ import com.lz.common.utils.R; * @date 2020-04-30 16:59:50 */ @RestController -@RequestMapping("generator/departments") +@RequestMapping("staff/structure") public class DepartmentsController { @Autowired private DepartmentsService departmentsService; @@ -35,11 +37,11 @@ public class DepartmentsController { * 列表 */ @RequestMapping("/list") - @RequiresPermissions("generator:departments:list") - public R list(@RequestParam Map params){ - PageUtils page = departmentsService.queryPage(params); +// @RequiresPermissions("staff:structure:list") + public List list() { + List departmentList = BeanConversionUtils.listCopyToAnotherList(DepartmentsDto.class, departmentsService.list()); - return R.ok().put("page", page); + return departmentList; } @@ -47,10 +49,9 @@ public class DepartmentsController { * 信息 */ @RequestMapping("/info/{id}") - @RequiresPermissions("generator:departments:info") - public R info(@PathVariable("id") Long id){ - DepartmentsEntity departments = departmentsService.getById(id); - +// @RequiresPermissions("staff:structure::info") + public R info(@PathVariable("id") Long id) { + DepartmentsEntity departments = departmentsService.getById(id); return R.ok().put("departments", departments); } @@ -58,9 +59,9 @@ public class DepartmentsController { * 保存 */ @RequestMapping("/save") - @RequiresPermissions("generator:departments:save") - public R save(@RequestBody DepartmentsEntity departments){ - departmentsService.save(departments); + @RequiresPermissions("staff:structure:save") + public R save(@RequestBody DepartmentsEntity departments) { + departmentsService.save(departments); return R.ok(); } @@ -69,9 +70,9 @@ public class DepartmentsController { * 修改 */ @RequestMapping("/update") - @RequiresPermissions("generator:departments:update") - public R update(@RequestBody DepartmentsEntity departments){ - departmentsService.updateById(departments); + @RequiresPermissions("staff:structure:update") + public R update(@RequestBody DepartmentsEntity departments) { + departmentsService.updateById(departments); return R.ok(); } @@ -80,9 +81,9 @@ public class DepartmentsController { * 删除 */ @RequestMapping("/delete") - @RequiresPermissions("generator:departments:delete") - public R delete(@RequestBody Long[] ids){ - departmentsService.removeByIds(Arrays.asList(ids)); + @RequiresPermissions("staff:structure:delete") + public R delete(@RequestBody Long[] ids) { + departmentsService.removeByIds(Arrays.asList(ids)); return R.ok(); } diff --git a/src/main/java/com/lz/modules/app/controller/StaffController.java b/src/main/java/com/lz/modules/app/controller/StaffController.java index 972ecb3e..e7b7c36c 100644 --- a/src/main/java/com/lz/modules/app/controller/StaffController.java +++ b/src/main/java/com/lz/modules/app/controller/StaffController.java @@ -1,8 +1,13 @@ package com.lz.modules.app.controller; import java.util.Arrays; +import java.util.HashMap; +import java.util.List; import java.util.Map; +import com.alibaba.fastjson.JSON; +import com.lz.modules.app.Dto.*; +import com.lz.modules.app.service.*; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; @@ -12,12 +17,9 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.lz.modules.app.entity.StaffEntity; -import com.lz.modules.app.service.StaffService; import com.lz.common.utils.PageUtils; import com.lz.common.utils.R; - - /** * 员工基本信息表 * @@ -26,41 +28,102 @@ import com.lz.common.utils.R; * @date 2020-04-29 20:59:20 */ @RestController -@RequestMapping("generator/staff") +@RequestMapping("staff/info") public class StaffController { + @Autowired private StaffService staffService; + @Autowired + private StaffEducationService staffEducationService; + + @Autowired + private StaffOccupationService staffOccupationService; + + @Autowired + private StaffProjectExperienceService staffProjectExperienceService; + + @Autowired + private StaffWorkTransferRecordService staffWorkTransferRecordService; + /** * 列表 */ @RequestMapping("/list") - @RequiresPermissions("generator:staff:list") - public R list(@RequestParam Map params){ - PageUtils page = staffService.queryPage(params); +// @RequiresPermissions("staff:info:list") + public R list(@RequestParam String jsonString) { + //当前页 + int currentPage = 0; + //默认每页返回数量 + int limit = 10; + //部门Id + String departmentId = ""; + //员工姓名 + String name = ""; + //人员状态【1:离职;0:在职】 + Integer staffStatus = 0; - return R.ok().put("page", page); + Map params = JSON.parseObject(jsonString, Map.class); + + if (params.containsKey("page")) { + currentPage = Integer.parseInt(params.get("page").toString()); + } + + if (params.containsKey("limit")) { + limit = Integer.parseInt(params.get("limit").toString()); + } + + if (params.containsKey("departmentId")) { + departmentId = params.get("departmentId").toString(); + } + + if (params.containsKey("name")) { + name = params.get("name").toString(); + } + + if (params.containsKey("staffStatus")) { + staffStatus = Integer.parseInt(params.get("staffStatus").toString()); + } + List staffInfos = staffService.getStaffInfos(currentPage, limit, departmentId, name, staffStatus); + //总页码 + int maxCount = staffService.getStaffInfoCount(departmentId, name, staffStatus); + + R ret = R.ok(); + PageUtils pageInfo = new PageUtils(staffInfos, maxCount, limit, currentPage); + ret.put("page", pageInfo); + return ret; } /** * 信息 */ - @RequestMapping("/info/{id}") - @RequiresPermissions("generator:staff:info") - public R info(@PathVariable("id") Long id){ - StaffEntity staff = staffService.getById(id); - - return R.ok().put("staff", staff); + @RequestMapping("/query/{staffId}") + @RequiresPermissions("staff:info:query") + public R info(@PathVariable("staffId") Long id) { + StaffEntity staff = staffService.getById(id); + Map data = new HashMap(); + data.put("staffId", id); + StaffBaseInfoDto staffBaseInfoDto = staffService.getBaseInfo(id); + StaffEducationInfoDto staffEducationInfoDto = staffEducationService.getInfoByStaffId(id); + StaffOccupationInfoDto staffOccupationInfoDto = staffOccupationService.getOccupationByStaffId(id); + List staffProjectExperiences = staffProjectExperienceService.getProjectInfoByStaffId(id); + List staffWorkTransfers = staffWorkTransferRecordService.getWorkInfoByStaffId(id); + staffOccupationInfoDto.setProjectExperiences(staffProjectExperiences); + staffOccupationInfoDto.setWorkTransfers(staffWorkTransfers); + data.put("baseInfo", staffBaseInfoDto); + data.put("educationInfo", staffEducationInfoDto); + data.put("occupationInfo", staffOccupationInfoDto); + return R.ok().put("data", data); } /** * 保存 */ @RequestMapping("/save") - @RequiresPermissions("generator:staff:save") - public R save(@RequestBody StaffEntity staff){ - staffService.save(staff); + @RequiresPermissions("staff:info:save") + public R save(@RequestBody StaffEntity staff) { + staffService.save(staff); return R.ok(); } @@ -69,9 +132,9 @@ public class StaffController { * 修改 */ @RequestMapping("/update") - @RequiresPermissions("generator:staff:update") - public R update(@RequestBody StaffEntity staff){ - staffService.updateById(staff); + @RequiresPermissions("staff:info:update") + public R update(@RequestBody StaffEntity staff) { + staffService.updateById(staff); return R.ok(); } @@ -80,9 +143,9 @@ public class StaffController { * 删除 */ @RequestMapping("/delete") - @RequiresPermissions("generator:staff:delete") - public R delete(@RequestBody Long[] ids){ - staffService.removeByIds(Arrays.asList(ids)); + @RequiresPermissions("staff:info:delete") + public R delete(@RequestBody Long[] ids) { + staffService.removeByIds(Arrays.asList(ids)); return R.ok(); } diff --git a/src/main/java/com/lz/modules/app/dao/StaffDao.java b/src/main/java/com/lz/modules/app/dao/StaffDao.java index 01e12a68..9760f2a0 100644 --- a/src/main/java/com/lz/modules/app/dao/StaffDao.java +++ b/src/main/java/com/lz/modules/app/dao/StaffDao.java @@ -1,5 +1,7 @@ package com.lz.modules.app.dao; +import com.lz.modules.app.Dto.StaffBaseInfoDto; +import com.lz.modules.app.Dto.StaffDto; import com.lz.modules.app.entity.StaffEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; @@ -23,4 +25,13 @@ public interface StaffDao extends BaseMapper { int addStaffBatch(@Param("staffs") List staffs); + StaffEntity getByName(@Param("name") String name); + + List getStaffInfos(@Param("departmentId") String departmentId, @Param("name") String name, @Param("staffStatus") Integer staffStatus, @Param("pageLimit") int pageLimit, @Param("startIndex") int startIndex); + + int getStaffInfoCount(@Param("departmentId") String departmentId, @Param("name") String name, @Param("staffStatus") Integer staffStatus); + + StaffBaseInfoDto getBaseInfo(@Param("staffId") Long staffId); + + } diff --git a/src/main/java/com/lz/modules/app/dao/StaffEducationDao.java b/src/main/java/com/lz/modules/app/dao/StaffEducationDao.java index 4ff3bb38..4a3ed0b7 100644 --- a/src/main/java/com/lz/modules/app/dao/StaffEducationDao.java +++ b/src/main/java/com/lz/modules/app/dao/StaffEducationDao.java @@ -1,5 +1,6 @@ package com.lz.modules.app.dao; +import com.lz.modules.app.Dto.StaffEducationInfoDto; import com.lz.modules.app.entity.StaffEducationEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; @@ -14,4 +15,6 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface StaffEducationDao extends BaseMapper { + StaffEducationInfoDto getInfoByStaffId(Long staffId); + } diff --git a/src/main/java/com/lz/modules/app/dao/StaffOccupationDao.java b/src/main/java/com/lz/modules/app/dao/StaffOccupationDao.java index 32550740..c4bd1a70 100644 --- a/src/main/java/com/lz/modules/app/dao/StaffOccupationDao.java +++ b/src/main/java/com/lz/modules/app/dao/StaffOccupationDao.java @@ -1,5 +1,6 @@ package com.lz.modules.app.dao; +import com.lz.modules.app.Dto.StaffOccupationInfoDto; import com.lz.modules.app.entity.StaffOccupationEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; @@ -24,5 +25,7 @@ public interface StaffOccupationDao extends BaseMapper { int addStaffOccupationBatch(@Param("staffOccupations") List staffOccupations); + StaffOccupationInfoDto getOccupationByStaffId(@Param("staffId") Long staffId); + } diff --git a/src/main/java/com/lz/modules/app/dao/StaffProjectExperienceDao.java b/src/main/java/com/lz/modules/app/dao/StaffProjectExperienceDao.java index e732ccb7..9ff98dca 100644 --- a/src/main/java/com/lz/modules/app/dao/StaffProjectExperienceDao.java +++ b/src/main/java/com/lz/modules/app/dao/StaffProjectExperienceDao.java @@ -1,9 +1,12 @@ package com.lz.modules.app.dao; +import com.lz.modules.app.Dto.StaffProjectExperienceDto; import com.lz.modules.app.entity.StaffProjectExperienceEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 员工项目经历表 * @@ -14,4 +17,6 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface StaffProjectExperienceDao extends BaseMapper { + List getProjectInfoByStaffId(Long id); + } diff --git a/src/main/java/com/lz/modules/app/dao/StaffWorkTransferRecordDao.java b/src/main/java/com/lz/modules/app/dao/StaffWorkTransferRecordDao.java index bd469e61..cd2503c2 100644 --- a/src/main/java/com/lz/modules/app/dao/StaffWorkTransferRecordDao.java +++ b/src/main/java/com/lz/modules/app/dao/StaffWorkTransferRecordDao.java @@ -1,8 +1,12 @@ package com.lz.modules.app.dao; +import com.lz.modules.app.Dto.StaffWorkTransferDto; import com.lz.modules.app.entity.StaffWorkTransferRecordEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 员工工作调转记录表 @@ -14,4 +18,6 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface StaffWorkTransferRecordDao extends BaseMapper { + List getWorkInfoByStaffId(@Param("staffId") Long staffId); + } diff --git a/src/main/java/com/lz/modules/app/enums/GenderEnum.java b/src/main/java/com/lz/modules/app/enums/GenderEnum.java new file mode 100644 index 00000000..f9daf1b0 --- /dev/null +++ b/src/main/java/com/lz/modules/app/enums/GenderEnum.java @@ -0,0 +1,44 @@ +package com.lz.modules.app.enums; + + +public enum GenderEnum { + + male("男", 1), + female("女", 2), + unknow("未知", 3); + + private String name; + private Integer code; + + GenderEnum(String name, Integer code) { + this.name = name; + this.code = code; + } + + public static Integer findCodeByName(String name) { + for (GenderEnum gender : GenderEnum.values()) { + if (gender.getName().equals(name)) { + return gender.getCode(); + } + } + return null; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + +} diff --git a/src/main/java/com/lz/modules/app/enums/MaritalStatusEnum.java b/src/main/java/com/lz/modules/app/enums/MaritalStatusEnum.java new file mode 100644 index 00000000..01d4230b --- /dev/null +++ b/src/main/java/com/lz/modules/app/enums/MaritalStatusEnum.java @@ -0,0 +1,43 @@ +package com.lz.modules.app.enums; + + +public enum MaritalStatusEnum { + + unmarried("未婚", 0), + married("已婚", 1); + + private String name; + private Integer code; + + MaritalStatusEnum(String name, Integer code) { + this.name = name; + this.code = code; + } + + public static Integer findCodeByName(String name) { + for (MaritalStatusEnum gender : MaritalStatusEnum.values()) { + if (gender.getName().equals(name)) { + return gender.getCode(); + } + } + return null; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + +} diff --git a/src/main/java/com/lz/modules/app/service/StaffEducationService.java b/src/main/java/com/lz/modules/app/service/StaffEducationService.java index 37a04d97..7a7ae0df 100644 --- a/src/main/java/com/lz/modules/app/service/StaffEducationService.java +++ b/src/main/java/com/lz/modules/app/service/StaffEducationService.java @@ -2,6 +2,7 @@ package com.lz.modules.app.service; import com.baomidou.mybatisplus.extension.service.IService; import com.lz.common.utils.PageUtils; +import com.lz.modules.app.Dto.StaffEducationInfoDto; import com.lz.modules.app.entity.StaffEducationEntity; import java.util.Map; @@ -16,5 +17,10 @@ import java.util.Map; public interface StaffEducationService extends IService { PageUtils queryPage(Map params); + + StaffEducationInfoDto getInfoByStaffId(Long staffId); + + + } diff --git a/src/main/java/com/lz/modules/app/service/StaffOccupationService.java b/src/main/java/com/lz/modules/app/service/StaffOccupationService.java index c263209a..61082eca 100644 --- a/src/main/java/com/lz/modules/app/service/StaffOccupationService.java +++ b/src/main/java/com/lz/modules/app/service/StaffOccupationService.java @@ -2,6 +2,7 @@ package com.lz.modules.app.service; import com.baomidou.mybatisplus.extension.service.IService; import com.lz.common.utils.PageUtils; +import com.lz.modules.app.Dto.StaffOccupationInfoDto; import com.lz.modules.app.entity.StaffOccupationEntity; import java.util.List; @@ -24,5 +25,6 @@ public interface StaffOccupationService extends IService int addStaffOccupationBatch(List staffs); + StaffOccupationInfoDto getOccupationByStaffId(Long id); } diff --git a/src/main/java/com/lz/modules/app/service/StaffProjectExperienceService.java b/src/main/java/com/lz/modules/app/service/StaffProjectExperienceService.java index 0bda36c7..6ef6fd17 100644 --- a/src/main/java/com/lz/modules/app/service/StaffProjectExperienceService.java +++ b/src/main/java/com/lz/modules/app/service/StaffProjectExperienceService.java @@ -2,8 +2,10 @@ package com.lz.modules.app.service; import com.baomidou.mybatisplus.extension.service.IService; import com.lz.common.utils.PageUtils; +import com.lz.modules.app.Dto.StaffProjectExperienceDto; import com.lz.modules.app.entity.StaffProjectExperienceEntity; +import java.util.List; import java.util.Map; /** @@ -16,5 +18,7 @@ import java.util.Map; public interface StaffProjectExperienceService extends IService { PageUtils queryPage(Map params); + + List getProjectInfoByStaffId(Long id); } diff --git a/src/main/java/com/lz/modules/app/service/StaffService.java b/src/main/java/com/lz/modules/app/service/StaffService.java index 81fe7952..f0d98636 100644 --- a/src/main/java/com/lz/modules/app/service/StaffService.java +++ b/src/main/java/com/lz/modules/app/service/StaffService.java @@ -2,6 +2,8 @@ package com.lz.modules.app.service; import com.baomidou.mybatisplus.extension.service.IService; import com.lz.common.utils.PageUtils; +import com.lz.modules.app.Dto.StaffBaseInfoDto; +import com.lz.modules.app.Dto.StaffDto; import com.lz.modules.app.entity.StaffEntity; import com.lz.modules.job.model.responseBo.DepartmentStaffBo; @@ -23,5 +25,13 @@ public interface StaffService extends IService { StaffEntity getStaffInfoByOpenId(String openId); + StaffEntity getByName(String name); + + List getStaffInfos(int currentPage, int limit, String departmentId, String name, Integer staffStatus); + + int getStaffInfoCount(String departmentId, String name, Integer staffStatus); + + StaffBaseInfoDto getBaseInfo(Long staffId); + } diff --git a/src/main/java/com/lz/modules/app/service/StaffWorkTransferRecordService.java b/src/main/java/com/lz/modules/app/service/StaffWorkTransferRecordService.java index 35074f69..049f70e8 100644 --- a/src/main/java/com/lz/modules/app/service/StaffWorkTransferRecordService.java +++ b/src/main/java/com/lz/modules/app/service/StaffWorkTransferRecordService.java @@ -2,8 +2,10 @@ package com.lz.modules.app.service; import com.baomidou.mybatisplus.extension.service.IService; import com.lz.common.utils.PageUtils; +import com.lz.modules.app.Dto.StaffWorkTransferDto; import com.lz.modules.app.entity.StaffWorkTransferRecordEntity; +import java.util.List; import java.util.Map; /** @@ -16,5 +18,7 @@ import java.util.Map; public interface StaffWorkTransferRecordService extends IService { PageUtils queryPage(Map params); + + List getWorkInfoByStaffId(Long staffId); } diff --git a/src/main/java/com/lz/modules/app/service/impl/DepartmentsServiceImpl.java b/src/main/java/com/lz/modules/app/service/impl/DepartmentsServiceImpl.java index f64fc998..7f7decfc 100644 --- a/src/main/java/com/lz/modules/app/service/impl/DepartmentsServiceImpl.java +++ b/src/main/java/com/lz/modules/app/service/impl/DepartmentsServiceImpl.java @@ -9,7 +9,6 @@ import com.lz.common.utils.Query; import com.lz.modules.app.dao.DepartmentsDao; import com.lz.modules.app.entity.DepartmentsEntity; import com.lz.modules.app.service.DepartmentsService; -import com.lz.modules.job.business.FeishuBusiness; import com.lz.modules.job.model.responseBo.DepartmentInfosBo; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/lz/modules/app/service/impl/StaffEducationServiceImpl.java b/src/main/java/com/lz/modules/app/service/impl/StaffEducationServiceImpl.java index 08329e3f..babbf248 100644 --- a/src/main/java/com/lz/modules/app/service/impl/StaffEducationServiceImpl.java +++ b/src/main/java/com/lz/modules/app/service/impl/StaffEducationServiceImpl.java @@ -1,5 +1,6 @@ package com.lz.modules.app.service.impl; +import com.lz.modules.app.Dto.StaffEducationInfoDto; import org.springframework.stereotype.Service; import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -12,10 +13,15 @@ import com.lz.modules.app.dao.StaffEducationDao; import com.lz.modules.app.entity.StaffEducationEntity; import com.lz.modules.app.service.StaffEducationService; +import javax.annotation.Resource; + @Service("staffEducationService") public class StaffEducationServiceImpl extends ServiceImpl implements StaffEducationService { + @Resource + StaffEducationDao staffEducationDao; + @Override public PageUtils queryPage(Map params) { IPage page = this.page( @@ -26,4 +32,9 @@ public class StaffEducationServiceImpl extends ServiceImpl implements StaffProjectExperienceService { + @Resource + StaffProjectExperienceDao staffProjectExperienceDao; + @Override public PageUtils queryPage(Map params) { IPage page = this.page( new Query().getPage(params), new QueryWrapper() ); - return new PageUtils(page); } + @Override + public List getProjectInfoByStaffId(Long staffId) { + return staffProjectExperienceDao.getProjectInfoByStaffId(staffId); + } + } diff --git a/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java b/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java index 5ca67614..403fbec7 100644 --- a/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java +++ b/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.google.common.collect.Lists; import com.lz.common.utils.PageUtils; import com.lz.common.utils.Query; +import com.lz.modules.app.Dto.StaffBaseInfoDto; +import com.lz.modules.app.Dto.StaffDto; import com.lz.modules.app.dao.StaffDao; import com.lz.modules.app.entity.StaffEntity; import com.lz.modules.app.service.StaffService; @@ -68,6 +70,36 @@ public class StaffServiceImpl extends ServiceImpl impleme return staffDao.getStaffInfoByOpenId(openId); } + @Override + public StaffEntity getByName(String name) { + return staffDao.getByName(name); + } + + @Override + public List getStaffInfos(int currentPage, int limit, String departmentId, String name, Integer intoStaffStatus) { + Integer staffStatus = 0; + if (intoStaffStatus == 1) { + staffStatus = intoStaffStatus; + } + List staffInfos = staffDao.getStaffInfos(departmentId, name, staffStatus, limit, currentPage * limit); + + return staffInfos; + } + + @Override + public int getStaffInfoCount(String departmentId, String name, Integer intoStaffStatus) { + Integer staffStatus = 0; + if (intoStaffStatus == 1) { + staffStatus = intoStaffStatus; + } + return staffDao.getStaffInfoCount(departmentId, name, staffStatus); + } + + @Override + public StaffBaseInfoDto getBaseInfo(Long staffId) { + return staffDao.getBaseInfo(staffId); + } + private StaffEntity convertStaffEntity(DepartmentStaffBo staffBo) { StaffEntity staffEntity = new StaffEntity(); staffEntity.setName(staffBo.getName());//员工姓名 diff --git a/src/main/java/com/lz/modules/app/service/impl/StaffWorkTransferRecordServiceImpl.java b/src/main/java/com/lz/modules/app/service/impl/StaffWorkTransferRecordServiceImpl.java index 2770b359..a1886537 100644 --- a/src/main/java/com/lz/modules/app/service/impl/StaffWorkTransferRecordServiceImpl.java +++ b/src/main/java/com/lz/modules/app/service/impl/StaffWorkTransferRecordServiceImpl.java @@ -1,7 +1,12 @@ package com.lz.modules.app.service.impl; +import com.lz.modules.app.Dto.StaffWorkTransferDto; +import com.lz.modules.app.dao.StaffProjectExperienceDao; import org.springframework.stereotype.Service; + +import java.util.List; import java.util.Map; + import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -12,18 +17,27 @@ import com.lz.modules.app.dao.StaffWorkTransferRecordDao; import com.lz.modules.app.entity.StaffWorkTransferRecordEntity; import com.lz.modules.app.service.StaffWorkTransferRecordService; +import javax.annotation.Resource; + @Service("staffWorkTransferRecordService") public class StaffWorkTransferRecordServiceImpl extends ServiceImpl implements StaffWorkTransferRecordService { + @Resource + StaffWorkTransferRecordDao staffWorkTransferRecordDao; + @Override public PageUtils queryPage(Map params) { IPage page = this.page( new Query().getPage(params), new QueryWrapper() ); - return new PageUtils(page); } + @Override + public List getWorkInfoByStaffId(Long staffId) { + return staffWorkTransferRecordDao.getWorkInfoByStaffId(staffId); + } + } diff --git a/src/main/java/com/lz/modules/app/utils/BeanConversionUtils.java b/src/main/java/com/lz/modules/app/utils/BeanConversionUtils.java new file mode 100644 index 00000000..b50af5bd --- /dev/null +++ b/src/main/java/com/lz/modules/app/utils/BeanConversionUtils.java @@ -0,0 +1,32 @@ +package com.lz.modules.app.utils; + +import org.apache.shiro.util.CollectionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.BeanUtils; + +import java.util.ArrayList; +import java.util.List; + +public class BeanConversionUtils { + private static Logger logger = LoggerFactory.getLogger(BeanConversionUtils.class); + + public static List listCopyToAnotherList(Class target, List soueceList) { + if (!CollectionUtils.isEmpty(soueceList)) { + List targetList = new ArrayList(); + for (T t : soueceList) { + try { + F f = target.newInstance(); + BeanUtils.copyProperties(t, f); + targetList.add(f); + } catch (Exception e) { + logger.error(e.getMessage()); + } + } + return targetList; + } else { + return null; + } + } + +} diff --git a/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java b/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java index c36dadc1..9522ae20 100644 --- a/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java +++ b/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java @@ -56,19 +56,19 @@ public class OAuth2Filter extends AuthenticatingFilter { protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { //获取请求token,如果token不存在,直接返回401 String token = getRequestToken((HttpServletRequest) request); - if(StringUtils.isBlank(token)){ - HttpServletResponse httpResponse = (HttpServletResponse) response; - httpResponse.setHeader("Access-Control-Allow-Credentials", "true"); - httpResponse.setHeader("Access-Control-Allow-Origin", HttpContextUtils.getOrigin()); - - String json = new Gson().toJson(R.error(HttpStatus.SC_UNAUTHORIZED, "invalid token")); - - httpResponse.getWriter().print(json); - - return false; - } - - return executeLogin(request, response); +// if(StringUtils.isBlank(token)){ +// HttpServletResponse httpResponse = (HttpServletResponse) response; +// httpResponse.setHeader("Access-Control-Allow-Credentials", "true"); +// httpResponse.setHeader("Access-Control-Allow-Origin", HttpContextUtils.getOrigin()); +// +// String json = new Gson().toJson(R.error(HttpStatus.SC_UNAUTHORIZED, "invalid token")); +// +// httpResponse.getWriter().print(json); +// +// return false; +// } + return true; +// return executeLogin(request, response); } @Override diff --git a/src/main/resources/mapper/generator/StaffDao.xml b/src/main/resources/mapper/generator/StaffDao.xml index d3696a56..db3b1550 100644 --- a/src/main/resources/mapper/generator/StaffDao.xml +++ b/src/main/resources/mapper/generator/StaffDao.xml @@ -3,7 +3,7 @@ - + @@ -92,5 +92,43 @@ + + + + + + + + + diff --git a/src/main/resources/mapper/generator/StaffEducationDao.xml b/src/main/resources/mapper/generator/StaffEducationDao.xml index c3f145e2..5ac21b47 100644 --- a/src/main/resources/mapper/generator/StaffEducationDao.xml +++ b/src/main/resources/mapper/generator/StaffEducationDao.xml @@ -16,5 +16,9 @@ + + diff --git a/src/main/resources/mapper/generator/StaffOccupationDao.xml b/src/main/resources/mapper/generator/StaffOccupationDao.xml index 2ebfa2b6..3b5ff56c 100644 --- a/src/main/resources/mapper/generator/StaffOccupationDao.xml +++ b/src/main/resources/mapper/generator/StaffOccupationDao.xml @@ -3,7 +3,7 @@ - + @@ -31,6 +31,10 @@ + update lz_staff_occupation set status=#{status} where is_delete=0 and staff_id = #{staffId} diff --git a/src/main/resources/mapper/generator/StaffProjectExperienceDao.xml b/src/main/resources/mapper/generator/StaffProjectExperienceDao.xml index 3ca5b209..2c30021c 100644 --- a/src/main/resources/mapper/generator/StaffProjectExperienceDao.xml +++ b/src/main/resources/mapper/generator/StaffProjectExperienceDao.xml @@ -16,5 +16,9 @@ + + diff --git a/src/main/resources/mapper/generator/StaffWorkTransferRecordDao.xml b/src/main/resources/mapper/generator/StaffWorkTransferRecordDao.xml index 59f32d9a..f5dccb94 100644 --- a/src/main/resources/mapper/generator/StaffWorkTransferRecordDao.xml +++ b/src/main/resources/mapper/generator/StaffWorkTransferRecordDao.xml @@ -14,6 +14,9 @@ + diff --git a/src/main/resources/static/swagger/index.yaml b/src/main/resources/static/swagger/index.yaml index b5751db0..54f2c4a0 100644 --- a/src/main/resources/static/swagger/index.yaml +++ b/src/main/resources/static/swagger/index.yaml @@ -1,8 +1,8 @@ swagger: '2.0' info: - description: lz_management是一个轻量级的Java快速开发平台,能快速开发项目并交付【接私活利器】 + description: 霖梓控股用于对员工进行数字化管理的平台 version: 1.0.0 - title: 人人快速开发平台 + title: 企业员工数字化管理平台 basePath: /lz_management diff --git a/src/test/java/com/lz/FumeiaiTest.java b/src/test/java/com/lz/FumeiaiTest.java index c1590973..784562a8 100644 --- a/src/test/java/com/lz/FumeiaiTest.java +++ b/src/test/java/com/lz/FumeiaiTest.java @@ -1,11 +1,18 @@ package com.lz; import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.google.common.collect.Lists; import com.lz.common.utils.DateUtils; +import com.lz.common.utils.StringUtil; import com.lz.modules.app.entity.*; import com.lz.modules.app.enums.ExcelStaffHeardEnum; +import com.lz.modules.app.enums.GenderEnum; +import com.lz.modules.app.enums.MaritalStatusEnum; +import com.lz.modules.app.service.*; import com.lz.modules.job.business.FeishuBusiness; +import com.lz.modules.sys.entity.SysCaptchaEntity; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.ss.usermodel.*; import org.junit.Test; @@ -14,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; +import javax.annotation.Resource; import java.io.File; import java.io.IOException; import java.text.DecimalFormat; @@ -30,7 +38,7 @@ public class FumeiaiTest { @Test public void contextLoads() throws IOException, InvalidFormatException { -// feishuBusiness.getFeishuDepartmentsIntoData(); + feishuBusiness.getFeishuDepartmentsIntoData(); File xlsFile = new File("/Users/fumeiai/tmp/员工档案字段表-0427.xlsx"); // 获得工作簿 @@ -64,14 +72,21 @@ public class FumeiaiTest { if (row == 0) { headList.add(cellValue); } else { + if (StringUtil.equals(GenderEnum.female.getName(), cellValue) || StringUtil.equals(GenderEnum.male.getName(), cellValue)) { + cellValue = GenderEnum.findCodeByName(cellValue).toString(); + } else if (StringUtil.equals(MaritalStatusEnum.unmarried.getName(), cellValue) || StringUtil.equals(MaritalStatusEnum.married.getName(), cellValue)) { + cellValue = MaritalStatusEnum.findCodeByName(cellValue).toString(); + } dataMap.put(ExcelStaffHeardEnum.findFieldByName(headList.get(col)), cellValue); } } + if (dataMap.size() > 0) { + if (i == 1) { + dataMap.put("staffStatus", "1"); + } switch (i) { case 0: - sheet12List.add(dataMap); - break; case 1: sheet12List.add(dataMap); break; @@ -90,6 +105,17 @@ public class FumeiaiTest { enterDatabase(sheet12List, sheet3List, sheet4List); } + @Resource + StaffService staffService; + @Resource + StaffOccupationService staffOccupationService; + @Resource + StaffEducationService staffEducationService; + @Resource + StaffProjectExperienceService staffProjectExperienceService; + @Resource + StaffWorkTransferRecordService staffWorkTransferRecordService; + public void enterDatabase(List> sheet12List, List> sheet3List, List> sheet4List) { List staffs = Lists.newArrayList(); List staffOccupations = Lists.newArrayList(); @@ -98,30 +124,94 @@ public class FumeiaiTest { List staffWorkTransferRecords = Lists.newArrayList(); for (Map map : sheet12List) { - staffs.add(JSON.parseObject(JSON.toJSONString(map), StaffEntity.class)); - staffOccupations.add(JSON.parseObject(JSON.toJSONString(map), StaffOccupationEntity.class)); - staffEducations.add(JSON.parseObject(JSON.toJSONString(map), StaffEducationEntity.class)); + StaffEntity staffEntity = JSON.parseObject(JSON.toJSONString(map), StaffEntity.class); + StaffOccupationEntity occupationEntity = JSON.parseObject(JSON.toJSONString(map), StaffOccupationEntity.class); + StaffEducationEntity educationEntity = JSON.parseObject(JSON.toJSONString(map), StaffEducationEntity.class); +// staffs.add(JSON.parseObject(JSON.toJSONString(map), StaffEntity.class)); +// staffOccupations.add(JSON.parseObject(JSON.toJSONString(map), StaffOccupationEntity.class)); +// staffEducations.add(JSON.parseObject(JSON.toJSONString(map), StaffEducationEntity.class)); // for (Map.Entry element : map.entrySet()) { // System.out.print(element.getKey() + "=" + element.getValue() + " "); // } - System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffEntity.class).toString()); - System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffOccupationEntity.class).toString()); - System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffEducationEntity.class).toString()); + StaffEntity Staff = staffService.getByName(staffEntity.getName()); + if (Staff == null) { + staffService.save(staffEntity); + } else { + staffEntity.setId(Staff.getId()); + staffService.updateById(staffEntity); + } + StaffOccupationEntity occupation = staffOccupationService.getOne(new QueryWrapper().eq("staff_id", staffEntity.getId())); + if (occupation == null) { + occupationEntity.setStaffId(staffEntity.getId()); + staffOccupationService.save(occupationEntity); + } else { + occupationEntity.setId(occupation.getId()); + staffOccupationService.updateById(occupationEntity); + } + + StaffEducationEntity education = staffEducationService.getOne(new QueryWrapper().eq("staff_id", staffEntity.getId())); + if (education == null) { + educationEntity.setStaffId(staffEntity.getId()); + staffEducationService.save(educationEntity); + } else { + educationEntity.setId(education.getId()); + staffEducationService.updateById(educationEntity); + } +// +// +// System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffEntity.class).toString()); +// System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffOccupationEntity.class).toString()); +// System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffEducationEntity.class).toString()); } for (Map map : sheet3List) { - staffProjectExperiences.add(JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class)); + StaffProjectExperienceEntity staffProjectExperienceEntity = JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class); + StaffEntity Staff = staffService.getByName(map.get("name")); + if (Staff == null) { + continue; + } else { + staffProjectExperienceService.update(new UpdateWrapper().set("is_delete", 1).eq("staff_id", Staff.getId())); + StaffProjectExperienceEntity projectExperienceEntity = staffProjectExperienceService.getOne(new QueryWrapper().eq("staff_id", Staff.getId()).eq("project_name", staffProjectExperienceEntity.getProjectName())); + if (projectExperienceEntity == null) { + staffProjectExperienceEntity.setStaffId(Staff.getId()); + staffProjectExperienceService.save(staffProjectExperienceEntity); + } else { + staffProjectExperienceEntity.setId(projectExperienceEntity.getId()); + staffProjectExperienceEntity.setIsDelete(0); + staffProjectExperienceService.updateById(staffProjectExperienceEntity); + } + } + +// staffProjectExperiences.add(JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class)); // for (Map.Entry element : map.entrySet()) { // System.out.print(element.getKey() + "=" + element.getValue() + " "); // } - System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class).toString()); +// System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class).toString()); } for (Map map : sheet4List) { - staffWorkTransferRecords.add(JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class)); + StaffWorkTransferRecordEntity staffWorkTransferRecordEntity = JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class); + StaffEntity Staff = staffService.getByName(map.get("name")); + if (Staff == null) { + continue; + } else { + staffWorkTransferRecordService.update(new UpdateWrapper().set("is_delete", 1).eq("staff_id", Staff.getId())); + StaffWorkTransferRecordEntity workTransferRecordEntity = staffWorkTransferRecordService.getOne(new QueryWrapper().eq("staff_id", Staff.getId()).eq("transfer_time", staffWorkTransferRecordEntity.getTransferTime())); + if (workTransferRecordEntity == null) { + staffWorkTransferRecordEntity.setStaffId(Staff.getId()); + staffWorkTransferRecordService.save(staffWorkTransferRecordEntity); + } else { + staffWorkTransferRecordEntity.setId(workTransferRecordEntity.getId()); + staffWorkTransferRecordEntity.setIsDelete(0); + staffWorkTransferRecordService.updateById(staffWorkTransferRecordEntity); + } + } + + +// staffWorkTransferRecords.add(JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class)); // for (Map.Entry element : map.entrySet()) { // System.out.print(element.getKey() + "=" + element.getValue() + " "); // } - System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class).toString()); +// System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class).toString()); } } diff --git a/target/classes/com/lz/modules/app/Dto/DepartmentsDto.class b/target/classes/com/lz/modules/app/Dto/DepartmentsDto.class new file mode 100644 index 00000000..e974d967 Binary files /dev/null and b/target/classes/com/lz/modules/app/Dto/DepartmentsDto.class differ diff --git a/target/classes/com/lz/modules/app/Dto/StaffBaseInfoDto.class b/target/classes/com/lz/modules/app/Dto/StaffBaseInfoDto.class new file mode 100644 index 00000000..6b33d4a9 Binary files /dev/null and b/target/classes/com/lz/modules/app/Dto/StaffBaseInfoDto.class differ diff --git a/target/classes/com/lz/modules/app/Dto/StaffDto.class b/target/classes/com/lz/modules/app/Dto/StaffDto.class new file mode 100644 index 00000000..52539975 Binary files /dev/null and b/target/classes/com/lz/modules/app/Dto/StaffDto.class differ diff --git a/target/classes/com/lz/modules/app/Dto/StaffEducationInfoDto.class b/target/classes/com/lz/modules/app/Dto/StaffEducationInfoDto.class new file mode 100644 index 00000000..65ea8c5f Binary files /dev/null and b/target/classes/com/lz/modules/app/Dto/StaffEducationInfoDto.class differ diff --git a/target/classes/com/lz/modules/app/Dto/StaffOccupationInfoDto.class b/target/classes/com/lz/modules/app/Dto/StaffOccupationInfoDto.class new file mode 100644 index 00000000..796bf7a7 Binary files /dev/null and b/target/classes/com/lz/modules/app/Dto/StaffOccupationInfoDto.class differ diff --git a/target/classes/com/lz/modules/app/Dto/StaffProjectExperienceDto.class b/target/classes/com/lz/modules/app/Dto/StaffProjectExperienceDto.class new file mode 100644 index 00000000..799889e5 Binary files /dev/null and b/target/classes/com/lz/modules/app/Dto/StaffProjectExperienceDto.class differ diff --git a/target/classes/com/lz/modules/app/Dto/StaffWorkTransferDto.class b/target/classes/com/lz/modules/app/Dto/StaffWorkTransferDto.class new file mode 100644 index 00000000..c2ea6e2c Binary files /dev/null and b/target/classes/com/lz/modules/app/Dto/StaffWorkTransferDto.class differ diff --git a/target/classes/com/lz/modules/app/controller/DepartmentsController.class b/target/classes/com/lz/modules/app/controller/DepartmentsController.class index 9529918c..acdc117f 100644 Binary files a/target/classes/com/lz/modules/app/controller/DepartmentsController.class and b/target/classes/com/lz/modules/app/controller/DepartmentsController.class differ diff --git a/target/classes/com/lz/modules/app/controller/StaffController.class b/target/classes/com/lz/modules/app/controller/StaffController.class index 0f28e209..299ed590 100644 Binary files a/target/classes/com/lz/modules/app/controller/StaffController.class and b/target/classes/com/lz/modules/app/controller/StaffController.class differ diff --git a/target/classes/com/lz/modules/app/dao/StaffDao.class b/target/classes/com/lz/modules/app/dao/StaffDao.class index 615ac7e3..06e87d38 100644 Binary files a/target/classes/com/lz/modules/app/dao/StaffDao.class and b/target/classes/com/lz/modules/app/dao/StaffDao.class differ diff --git a/target/classes/com/lz/modules/app/dao/StaffEducationDao.class b/target/classes/com/lz/modules/app/dao/StaffEducationDao.class index 110033a7..f2837161 100644 Binary files a/target/classes/com/lz/modules/app/dao/StaffEducationDao.class and b/target/classes/com/lz/modules/app/dao/StaffEducationDao.class differ diff --git a/target/classes/com/lz/modules/app/dao/StaffOccupationDao.class b/target/classes/com/lz/modules/app/dao/StaffOccupationDao.class index 399c8646..2efd6981 100644 Binary files a/target/classes/com/lz/modules/app/dao/StaffOccupationDao.class and b/target/classes/com/lz/modules/app/dao/StaffOccupationDao.class differ diff --git a/target/classes/com/lz/modules/app/dao/StaffProjectExperienceDao.class b/target/classes/com/lz/modules/app/dao/StaffProjectExperienceDao.class index c6b08bb0..c60128aa 100644 Binary files a/target/classes/com/lz/modules/app/dao/StaffProjectExperienceDao.class and b/target/classes/com/lz/modules/app/dao/StaffProjectExperienceDao.class differ diff --git a/target/classes/com/lz/modules/app/dao/StaffWorkTransferRecordDao.class b/target/classes/com/lz/modules/app/dao/StaffWorkTransferRecordDao.class index 9b450afe..b49e5ec0 100644 Binary files a/target/classes/com/lz/modules/app/dao/StaffWorkTransferRecordDao.class and b/target/classes/com/lz/modules/app/dao/StaffWorkTransferRecordDao.class differ diff --git a/target/classes/com/lz/modules/app/enums/GenderEnum.class b/target/classes/com/lz/modules/app/enums/GenderEnum.class new file mode 100644 index 00000000..b6fb0104 Binary files /dev/null and b/target/classes/com/lz/modules/app/enums/GenderEnum.class differ diff --git a/target/classes/com/lz/modules/app/enums/MaritalStatusEnum.class b/target/classes/com/lz/modules/app/enums/MaritalStatusEnum.class new file mode 100644 index 00000000..ea7c1434 Binary files /dev/null and b/target/classes/com/lz/modules/app/enums/MaritalStatusEnum.class differ diff --git a/target/classes/com/lz/modules/app/service/StaffEducationService.class b/target/classes/com/lz/modules/app/service/StaffEducationService.class index 77b7ef68..dd5cfe60 100644 Binary files a/target/classes/com/lz/modules/app/service/StaffEducationService.class and b/target/classes/com/lz/modules/app/service/StaffEducationService.class differ diff --git a/target/classes/com/lz/modules/app/service/StaffOccupationService.class b/target/classes/com/lz/modules/app/service/StaffOccupationService.class index 9f810182..49721262 100644 Binary files a/target/classes/com/lz/modules/app/service/StaffOccupationService.class and b/target/classes/com/lz/modules/app/service/StaffOccupationService.class differ diff --git a/target/classes/com/lz/modules/app/service/StaffProjectExperienceService.class b/target/classes/com/lz/modules/app/service/StaffProjectExperienceService.class index 22e9bc67..77770da0 100644 Binary files a/target/classes/com/lz/modules/app/service/StaffProjectExperienceService.class and b/target/classes/com/lz/modules/app/service/StaffProjectExperienceService.class differ diff --git a/target/classes/com/lz/modules/app/service/StaffService.class b/target/classes/com/lz/modules/app/service/StaffService.class index c3d5b3ac..04d1de4d 100644 Binary files a/target/classes/com/lz/modules/app/service/StaffService.class and b/target/classes/com/lz/modules/app/service/StaffService.class differ diff --git a/target/classes/com/lz/modules/app/service/StaffWorkTransferRecordService.class b/target/classes/com/lz/modules/app/service/StaffWorkTransferRecordService.class index 0a76b7c9..58a3276e 100644 Binary files a/target/classes/com/lz/modules/app/service/StaffWorkTransferRecordService.class and b/target/classes/com/lz/modules/app/service/StaffWorkTransferRecordService.class differ diff --git a/target/classes/com/lz/modules/app/service/impl/DepartmentsServiceImpl.class b/target/classes/com/lz/modules/app/service/impl/DepartmentsServiceImpl.class index 7c8b1f44..10751adf 100644 Binary files a/target/classes/com/lz/modules/app/service/impl/DepartmentsServiceImpl.class and b/target/classes/com/lz/modules/app/service/impl/DepartmentsServiceImpl.class differ diff --git a/target/classes/com/lz/modules/app/service/impl/StaffEducationServiceImpl.class b/target/classes/com/lz/modules/app/service/impl/StaffEducationServiceImpl.class index 697b23a8..2a5b9a91 100644 Binary files a/target/classes/com/lz/modules/app/service/impl/StaffEducationServiceImpl.class and b/target/classes/com/lz/modules/app/service/impl/StaffEducationServiceImpl.class differ diff --git a/target/classes/com/lz/modules/app/service/impl/StaffOccupationServiceImpl.class b/target/classes/com/lz/modules/app/service/impl/StaffOccupationServiceImpl.class index b0d81e93..b62b6344 100644 Binary files a/target/classes/com/lz/modules/app/service/impl/StaffOccupationServiceImpl.class and b/target/classes/com/lz/modules/app/service/impl/StaffOccupationServiceImpl.class differ diff --git a/target/classes/com/lz/modules/app/service/impl/StaffProjectExperienceServiceImpl.class b/target/classes/com/lz/modules/app/service/impl/StaffProjectExperienceServiceImpl.class index 875e6c21..01f75cca 100644 Binary files a/target/classes/com/lz/modules/app/service/impl/StaffProjectExperienceServiceImpl.class and b/target/classes/com/lz/modules/app/service/impl/StaffProjectExperienceServiceImpl.class differ diff --git a/target/classes/com/lz/modules/app/service/impl/StaffServiceImpl.class b/target/classes/com/lz/modules/app/service/impl/StaffServiceImpl.class index a662c8d0..4b45aeae 100644 Binary files a/target/classes/com/lz/modules/app/service/impl/StaffServiceImpl.class and b/target/classes/com/lz/modules/app/service/impl/StaffServiceImpl.class differ diff --git a/target/classes/com/lz/modules/app/service/impl/StaffWorkTransferRecordServiceImpl.class b/target/classes/com/lz/modules/app/service/impl/StaffWorkTransferRecordServiceImpl.class index 82436aa2..0da63d3a 100644 Binary files a/target/classes/com/lz/modules/app/service/impl/StaffWorkTransferRecordServiceImpl.class and b/target/classes/com/lz/modules/app/service/impl/StaffWorkTransferRecordServiceImpl.class differ diff --git a/target/classes/com/lz/modules/app/utils/BeanConversionUtils.class b/target/classes/com/lz/modules/app/utils/BeanConversionUtils.class new file mode 100644 index 00000000..fe9bf349 Binary files /dev/null and b/target/classes/com/lz/modules/app/utils/BeanConversionUtils.class differ diff --git a/target/classes/com/lz/modules/sys/oauth2/OAuth2Filter.class b/target/classes/com/lz/modules/sys/oauth2/OAuth2Filter.class index 94e5604e..5c5c781b 100644 Binary files a/target/classes/com/lz/modules/sys/oauth2/OAuth2Filter.class and b/target/classes/com/lz/modules/sys/oauth2/OAuth2Filter.class differ diff --git a/target/classes/mapper/generator/StaffDao.xml b/target/classes/mapper/generator/StaffDao.xml index d3696a56..db3b1550 100644 --- a/target/classes/mapper/generator/StaffDao.xml +++ b/target/classes/mapper/generator/StaffDao.xml @@ -3,7 +3,7 @@ - + @@ -92,5 +92,43 @@ + + + + + + + + + diff --git a/target/classes/mapper/generator/StaffEducationDao.xml b/target/classes/mapper/generator/StaffEducationDao.xml index c3f145e2..5ac21b47 100644 --- a/target/classes/mapper/generator/StaffEducationDao.xml +++ b/target/classes/mapper/generator/StaffEducationDao.xml @@ -16,5 +16,9 @@ + + diff --git a/target/classes/mapper/generator/StaffOccupationDao.xml b/target/classes/mapper/generator/StaffOccupationDao.xml index 2ebfa2b6..3b5ff56c 100644 --- a/target/classes/mapper/generator/StaffOccupationDao.xml +++ b/target/classes/mapper/generator/StaffOccupationDao.xml @@ -3,7 +3,7 @@ - + @@ -31,6 +31,10 @@ + update lz_staff_occupation set status=#{status} where is_delete=0 and staff_id = #{staffId} diff --git a/target/classes/mapper/generator/StaffProjectExperienceDao.xml b/target/classes/mapper/generator/StaffProjectExperienceDao.xml index 3ca5b209..2c30021c 100644 --- a/target/classes/mapper/generator/StaffProjectExperienceDao.xml +++ b/target/classes/mapper/generator/StaffProjectExperienceDao.xml @@ -16,5 +16,9 @@ + + diff --git a/target/classes/mapper/generator/StaffWorkTransferRecordDao.xml b/target/classes/mapper/generator/StaffWorkTransferRecordDao.xml index 59f32d9a..f5dccb94 100644 --- a/target/classes/mapper/generator/StaffWorkTransferRecordDao.xml +++ b/target/classes/mapper/generator/StaffWorkTransferRecordDao.xml @@ -14,6 +14,9 @@ + diff --git a/target/classes/static/swagger/index.yaml b/target/classes/static/swagger/index.yaml index b5751db0..54f2c4a0 100644 --- a/target/classes/static/swagger/index.yaml +++ b/target/classes/static/swagger/index.yaml @@ -1,8 +1,8 @@ swagger: '2.0' info: - description: lz_management是一个轻量级的Java快速开发平台,能快速开发项目并交付【接私活利器】 + description: 霖梓控股用于对员工进行数字化管理的平台 version: 1.0.0 - title: 人人快速开发平台 + title: 企业员工数字化管理平台 basePath: /lz_management diff --git a/target/test-classes/com/lz/FumeiaiTest$1.class b/target/test-classes/com/lz/FumeiaiTest$1.class index 3eeed2ff..22c712e8 100644 Binary files a/target/test-classes/com/lz/FumeiaiTest$1.class and b/target/test-classes/com/lz/FumeiaiTest$1.class differ diff --git a/target/test-classes/com/lz/FumeiaiTest.class b/target/test-classes/com/lz/FumeiaiTest.class index e648273b..743a1309 100644 Binary files a/target/test-classes/com/lz/FumeiaiTest.class and b/target/test-classes/com/lz/FumeiaiTest.class differ