diff --git a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/SysOrganizationRequest.java b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/HrOrganizationRequest.java similarity index 97% rename from kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/SysOrganizationRequest.java rename to kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/HrOrganizationRequest.java index 159bcaeee..22e656f0c 100644 --- a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/SysOrganizationRequest.java +++ b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/HrOrganizationRequest.java @@ -18,7 +18,7 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper = true) -public class SysOrganizationRequest extends BaseRequest { +public class HrOrganizationRequest extends BaseRequest { /** * 主键 diff --git a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/SysPositionRequest.java b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/HrPositionRequest.java similarity index 96% rename from kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/SysPositionRequest.java rename to kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/HrPositionRequest.java index b82ff103e..ad340ab04 100644 --- a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/SysPositionRequest.java +++ b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/pojo/organization/HrPositionRequest.java @@ -18,7 +18,7 @@ import java.math.BigDecimal; */ @Data @EqualsAndHashCode(callSuper = true) -public class SysPositionRequest extends BaseRequest { +public class HrPositionRequest extends BaseRequest { /** * 主键 diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/SysOrganizationController.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrganizationController.java similarity index 50% rename from kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/SysOrganizationController.java rename to kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrganizationController.java index 093001be1..fd2460ba5 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/SysOrganizationController.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrganizationController.java @@ -5,8 +5,8 @@ import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource; import cn.stylefeng.roses.kernel.resource.api.annotation.PostResource; import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData; import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData; -import cn.stylefeng.roses.kernel.system.modular.organization.service.SysOrganizationService; -import cn.stylefeng.roses.kernel.system.pojo.organization.SysOrganizationRequest; +import cn.stylefeng.roses.kernel.system.modular.organization.service.HrOrganizationService; +import cn.stylefeng.roses.kernel.system.pojo.organization.HrOrganizationRequest; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -21,10 +21,10 @@ import javax.annotation.Resource; */ @RestController @ApiResource(name = "系统组织机构管理") -public class SysOrganizationController { +public class HrOrganizationController { @Resource - private SysOrganizationService sysorganizationService; + private HrOrganizationService hrOrganizationService; /** * 添加系统组织机构 @@ -32,9 +32,9 @@ public class SysOrganizationController { * @author fengshuonan * @date 2020/11/04 11:05 */ - @PostResource(name = "添加系统组织机构", path = "/sysOrganization/add") - public ResponseData add(@RequestBody @Validated(SysOrganizationRequest.add.class) SysOrganizationRequest sysOrganizationRequest) { - sysorganizationService.add(sysOrganizationRequest); + @PostResource(name = "添加系统组织机构", path = "/hrOrganization/add") + public ResponseData add(@RequestBody @Validated(HrOrganizationRequest.add.class) HrOrganizationRequest hrOrganizationRequest) { + hrOrganizationService.add(hrOrganizationRequest); return new SuccessResponseData(); } @@ -44,9 +44,9 @@ public class SysOrganizationController { * @author fengshuonan * @date 2020/11/04 11:05 */ - @PostResource(name = "编辑系统组织机构", path = "/sysOrganization/edit") - public ResponseData edit(@RequestBody @Validated(SysOrganizationRequest.edit.class) SysOrganizationRequest sysOrganizationRequest) { - sysorganizationService.edit(sysOrganizationRequest); + @PostResource(name = "编辑系统组织机构", path = "/hrOrganization/edit") + public ResponseData edit(@RequestBody @Validated(HrOrganizationRequest.edit.class) HrOrganizationRequest hrOrganizationRequest) { + hrOrganizationService.edit(hrOrganizationRequest); return new SuccessResponseData(); } @@ -56,9 +56,9 @@ public class SysOrganizationController { * @author fengshuonan * @date 2020/11/04 11:05 */ - @PostResource(name = "删除系统组织机构", path = "/sysOrganization/delete") - public ResponseData delete(@RequestBody @Validated(SysOrganizationRequest.delete.class) SysOrganizationRequest sysOrganizationRequest) { - sysorganizationService.delete(sysOrganizationRequest); + @PostResource(name = "删除系统组织机构", path = "/hrOrganization/delete") + public ResponseData delete(@RequestBody @Validated(HrOrganizationRequest.delete.class) HrOrganizationRequest hrOrganizationRequest) { + hrOrganizationService.delete(hrOrganizationRequest); return new SuccessResponseData(); } @@ -68,9 +68,9 @@ public class SysOrganizationController { * @author fengshuonan * @date 2020/11/04 11:05 */ - @PostResource(name = "修改组织机构状态", path = "/sysOrganization/updateStatus") - public ResponseData updateStatus(@RequestBody @Validated(SysOrganizationRequest.updateStatus.class) SysOrganizationRequest sysOrganizationRequest) { - sysorganizationService.updateStatus(sysOrganizationRequest); + @PostResource(name = "修改组织机构状态", path = "/hrOrganization/updateStatus") + public ResponseData updateStatus(@RequestBody @Validated(HrOrganizationRequest.updateStatus.class) HrOrganizationRequest hrOrganizationRequest) { + hrOrganizationService.updateStatus(hrOrganizationRequest); return new SuccessResponseData(); } @@ -80,9 +80,9 @@ public class SysOrganizationController { * @author fengshuonan * @date 2020/11/04 11:05 */ - @GetResource(name = "查看详情系统组织机构", path = "/sysOrganization/detail") - public ResponseData detail(@Validated(SysOrganizationRequest.detail.class) SysOrganizationRequest sysOrganizationRequest) { - return new SuccessResponseData(sysorganizationService.detail(sysOrganizationRequest)); + @GetResource(name = "查看详情系统组织机构", path = "/hrOrganization/detail") + public ResponseData detail(@Validated(HrOrganizationRequest.detail.class) HrOrganizationRequest hrOrganizationRequest) { + return new SuccessResponseData(hrOrganizationService.detail(hrOrganizationRequest)); } /** @@ -91,9 +91,9 @@ public class SysOrganizationController { * @author fengshuonan * @date 2020/11/04 11:05 */ - @GetResource(name = "分页查询系统组织机构", path = "/sysOrganization/page") - public ResponseData page(SysOrganizationRequest sysOrganizationRequest) { - return new SuccessResponseData(sysorganizationService.page(sysOrganizationRequest)); + @GetResource(name = "分页查询系统组织机构", path = "/hrOrganization/page") + public ResponseData page(HrOrganizationRequest hrOrganizationRequest) { + return new SuccessResponseData(hrOrganizationService.page(hrOrganizationRequest)); } /** @@ -102,9 +102,9 @@ public class SysOrganizationController { * @author fengshuonan * @date 2020/11/04 11:05 */ - @GetResource(name = "获取全部系统组织机构", path = "/sysOrganization/list") - public ResponseData list(SysOrganizationRequest sysOrganizationRequest) { - return new SuccessResponseData(sysorganizationService.list(sysOrganizationRequest)); + @GetResource(name = "获取全部系统组织机构", path = "/hrOrganization/list") + public ResponseData list(HrOrganizationRequest hrOrganizationRequest) { + return new SuccessResponseData(hrOrganizationService.list(hrOrganizationRequest)); } diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/SysPositionController.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java similarity index 66% rename from kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/SysPositionController.java rename to kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java index 81fb73827..937cb8e11 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/SysPositionController.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java @@ -6,8 +6,8 @@ import cn.stylefeng.roses.kernel.resource.api.annotation.PostResource; import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest; import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData; import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData; -import cn.stylefeng.roses.kernel.system.modular.organization.service.SysPositionService; -import cn.stylefeng.roses.kernel.system.pojo.organization.SysPositionRequest; +import cn.stylefeng.roses.kernel.system.modular.organization.service.HrPositionService; +import cn.stylefeng.roses.kernel.system.pojo.organization.HrPositionRequest; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -22,10 +22,10 @@ import javax.annotation.Resource; */ @RestController @ApiResource(name = "系统职位管理") -public class SysPositionController { +public class HrPositionController { @Resource - private SysPositionService syspositionService; + private HrPositionService syspositionService; /** * 添加系统职位 @@ -34,8 +34,8 @@ public class SysPositionController { * @date 2020/11/04 11:07 */ @PostResource(name = "添加系统职位", path = "/sysPosition/add") - public ResponseData add(@RequestBody @Validated(SysPositionRequest.add.class) SysPositionRequest sysPositionRequest) { - syspositionService.add(sysPositionRequest); + public ResponseData add(@RequestBody @Validated(HrPositionRequest.add.class) HrPositionRequest hrPositionRequest) { + syspositionService.add(hrPositionRequest); return new SuccessResponseData(); } @@ -46,8 +46,8 @@ public class SysPositionController { * @date 2020/11/04 11:07 */ @PostResource(name = "编辑系统职位", path = "/sysPosition/edit") - public ResponseData edit(@RequestBody @Validated(SysPositionRequest.edit.class) SysPositionRequest sysPositionRequest) { - syspositionService.edit(sysPositionRequest); + public ResponseData edit(@RequestBody @Validated(HrPositionRequest.edit.class) HrPositionRequest hrPositionRequest) { + syspositionService.edit(hrPositionRequest); return new SuccessResponseData(); } @@ -58,8 +58,8 @@ public class SysPositionController { * @date 2020/11/04 11:07 */ @PostResource(name = "删除系统职位", path = "/sysPosition/delete") - public ResponseData delete(@RequestBody @Validated(SysPositionRequest.delete.class) SysPositionRequest sysPositionRequest) { - syspositionService.delete(sysPositionRequest); + public ResponseData delete(@RequestBody @Validated(HrPositionRequest.delete.class) HrPositionRequest hrPositionRequest) { + syspositionService.delete(hrPositionRequest); return new SuccessResponseData(); } @@ -70,8 +70,8 @@ public class SysPositionController { * @date 2020/11/04 11:07 */ @PostResource(name = "更新职位状态", path = "/sysPosition/updateStatus") - public ResponseData updateStatus(@RequestBody @Validated(BaseRequest.updateStatus.class) SysPositionRequest sysPositionRequest) { - syspositionService.updateStatus(sysPositionRequest); + public ResponseData updateStatus(@RequestBody @Validated(BaseRequest.updateStatus.class) HrPositionRequest hrPositionRequest) { + syspositionService.updateStatus(hrPositionRequest); return new SuccessResponseData(); } @@ -82,8 +82,8 @@ public class SysPositionController { * @date 2020/11/04 11:07 */ @GetResource(name = "查看详情系统职位", path = "/sysPosition/detail") - public ResponseData detail(@Validated(SysPositionRequest.detail.class) SysPositionRequest sysPositionRequest) { - return new SuccessResponseData(syspositionService.detail(sysPositionRequest)); + public ResponseData detail(@Validated(HrPositionRequest.detail.class) HrPositionRequest hrPositionRequest) { + return new SuccessResponseData(syspositionService.detail(hrPositionRequest)); } /** @@ -93,8 +93,8 @@ public class SysPositionController { * @date 2020/11/04 11:07 */ @GetResource(name = "分页查询系统职位", path = "/sysPosition/page") - public ResponseData page(SysPositionRequest sysPositionRequest) { - return new SuccessResponseData(syspositionService.page(sysPositionRequest)); + public ResponseData page(HrPositionRequest hrPositionRequest) { + return new SuccessResponseData(syspositionService.page(hrPositionRequest)); } /** @@ -104,8 +104,8 @@ public class SysPositionController { * @date 2020/11/04 11:07 */ @GetResource(name = "获取全部系统职位", path = "/sysPosition/list") - public ResponseData list(SysPositionRequest sysPositionRequest) { - return new SuccessResponseData(syspositionService.list(sysPositionRequest)); + public ResponseData list(HrPositionRequest hrPositionRequest) { + return new SuccessResponseData(syspositionService.list(hrPositionRequest)); } } diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/SysOrganizationMapper.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/HrOrganizationMapper.java similarity index 80% rename from kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/SysOrganizationMapper.java rename to kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/HrOrganizationMapper.java index 26a86b316..9e45a91b0 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/SysOrganizationMapper.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/HrOrganizationMapper.java @@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @author fengshuonan * @date 2020/11/04 11:05 */ -public interface SysOrganizationMapper extends BaseMapper { +public interface HrOrganizationMapper extends BaseMapper { } \ No newline at end of file diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/SysPositionMapper.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/HrPositionMapper.java similarity index 81% rename from kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/SysPositionMapper.java rename to kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/HrPositionMapper.java index f6007da2e..c6dbacded 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/SysPositionMapper.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/HrPositionMapper.java @@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @author fengshuonan * @date 2020/11/04 11:07 */ -public interface SysPositionMapper extends BaseMapper { +public interface HrPositionMapper extends BaseMapper { } \ No newline at end of file diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/SysOrganizationMapper.xml b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/HrOrganizationMapper.xml similarity index 81% rename from kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/SysOrganizationMapper.xml rename to kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/HrOrganizationMapper.xml index 72238e89a..32654e820 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/SysOrganizationMapper.xml +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/HrOrganizationMapper.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/SysPositionMapper.xml b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/HrPositionMapper.xml similarity index 82% rename from kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/SysPositionMapper.xml rename to kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/HrPositionMapper.xml index 6df6599bf..13fe38705 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/SysPositionMapper.xml +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/mapper/mapping/HrPositionMapper.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/SysOrganizationService.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrOrganizationService.java similarity index 61% rename from kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/SysOrganizationService.java rename to kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrOrganizationService.java index d5e092c9e..d7aa3ba34 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/SysOrganizationService.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrOrganizationService.java @@ -3,7 +3,7 @@ package cn.stylefeng.roses.kernel.system.modular.organization.service; import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult; import cn.stylefeng.roses.kernel.rule.pojo.tree.DefaultTreeNode; import cn.stylefeng.roses.kernel.system.modular.organization.entity.HrOrganization; -import cn.stylefeng.roses.kernel.system.pojo.organization.SysOrganizationRequest; +import cn.stylefeng.roses.kernel.system.pojo.organization.HrOrganizationRequest; import com.baomidou.mybatisplus.extension.service.IService; import java.util.List; @@ -15,83 +15,83 @@ import java.util.Set; * @author fengshuonan * @date 2020/11/04 11:05 */ -public interface SysOrganizationService extends IService { +public interface HrOrganizationService extends IService { /** * 添加系统组织机构 * - * @param sysOrganizationRequest 组织机构请求参数 + * @param hrOrganizationRequest 组织机构请求参数 * @author fengshuonan * @date 2020/11/04 11:05 */ - void add(SysOrganizationRequest sysOrganizationRequest); + void add(HrOrganizationRequest hrOrganizationRequest); /** * 编辑系统组织机构 * - * @param sysOrganizationRequest 组织机构请求参数 + * @param hrOrganizationRequest 组织机构请求参数 * @author fengshuonan * @date 2020/11/04 11:05 */ - void edit(SysOrganizationRequest sysOrganizationRequest); + void edit(HrOrganizationRequest hrOrganizationRequest); /** * 删除系统组织机构 * - * @param sysOrganizationRequest 组织机构请求参数 + * @param hrOrganizationRequest 组织机构请求参数 * @author fengshuonan * @date 2020/11/04 11:05 */ - void delete(SysOrganizationRequest sysOrganizationRequest); + void delete(HrOrganizationRequest hrOrganizationRequest); /** * 修改组织机构状态 * - * @param sysOrganizationRequest 请求参数 + * @param hrOrganizationRequest 请求参数 * @author fengshuonan * @date 2020/11/18 22:38 */ - void updateStatus(SysOrganizationRequest sysOrganizationRequest); + void updateStatus(HrOrganizationRequest hrOrganizationRequest); /** * 查看详情系统组织机构 * - * @param sysOrganizationRequest 组织机构请求参数 + * @param hrOrganizationRequest 组织机构请求参数 * @return 组织机构详情 * @author fengshuonan * @date 2020/11/04 11:05 */ - HrOrganization detail(SysOrganizationRequest sysOrganizationRequest); + HrOrganization detail(HrOrganizationRequest hrOrganizationRequest); /** * 分页查询系统组织机构 * - * @param sysOrganizationRequest 组织机构请求参数 + * @param hrOrganizationRequest 组织机构请求参数 * @return 组织机构详情分页列表 * @author fengshuonan * @date 2020/11/04 11:05 */ - PageResult page(SysOrganizationRequest sysOrganizationRequest); + PageResult page(HrOrganizationRequest hrOrganizationRequest); /** * 查询所有系统组织机构 * - * @param sysOrganizationRequest 组织机构请求参数 + * @param hrOrganizationRequest 组织机构请求参数 * @return 组织机构详情列表 * @author fengshuonan * @date 2020/11/04 11:05 */ - List list(SysOrganizationRequest sysOrganizationRequest); + List list(HrOrganizationRequest hrOrganizationRequest); /** * 获取组织架构树 * - * @param sysOrganizationRequest 查询参数 + * @param hrOrganizationRequest 查询参数 * @return 系统组织机构树 * @author fengshuonan * @date 2020/11/6 13:41 */ - List tree(SysOrganizationRequest sysOrganizationRequest); + List tree(HrOrganizationRequest hrOrganizationRequest); /** * 查询所有参数组织架构id集合的所有层级的父id,包含父级的父级等 diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/SysPositionService.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java similarity index 62% rename from kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/SysPositionService.java rename to kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java index 414516cd1..1d2624a04 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/SysPositionService.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java @@ -2,7 +2,7 @@ package cn.stylefeng.roses.kernel.system.modular.organization.service; import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult; import cn.stylefeng.roses.kernel.system.modular.organization.entity.HrPosition; -import cn.stylefeng.roses.kernel.system.pojo.organization.SysPositionRequest; +import cn.stylefeng.roses.kernel.system.pojo.organization.HrPositionRequest; import com.baomidou.mybatisplus.extension.service.IService; import java.util.List; @@ -13,73 +13,73 @@ import java.util.List; * @author fengshuonan * @date 2020/11/04 11:07 */ -public interface SysPositionService extends IService { +public interface HrPositionService extends IService { /** * 添加职位 * - * @param sysPositionRequest 请求参数 + * @param hrPositionRequest 请求参数 * @author fengshuonan * @date 2020/11/04 11:07 */ - void add(SysPositionRequest sysPositionRequest); + void add(HrPositionRequest hrPositionRequest); /** * 编辑职位 * - * @param sysPositionRequest 请求参数 + * @param hrPositionRequest 请求参数 * @author fengshuonan * @date 2020/11/04 11:07 */ - void edit(SysPositionRequest sysPositionRequest); + void edit(HrPositionRequest hrPositionRequest); /** * 删除职位 * - * @param sysPositionRequest 请求参数 + * @param hrPositionRequest 请求参数 * @author fengshuonan * @date 2020/11/04 11:07 */ - void delete(SysPositionRequest sysPositionRequest); + void delete(HrPositionRequest hrPositionRequest); /** * 更新装填 * - * @param sysPositionRequest 请求参数 + * @param hrPositionRequest 请求参数 * @author fengshuonan * @date 2020/11/18 23:00 */ - void updateStatus(SysPositionRequest sysPositionRequest); + void updateStatus(HrPositionRequest hrPositionRequest); /** * 查看详情职位 * - * @param sysPositionRequest 请求参数 + * @param hrPositionRequest 请求参数 * @return 职位详情 * @author fengshuonan * @date 2020/11/04 11:07 */ - HrPosition detail(SysPositionRequest sysPositionRequest); + HrPosition detail(HrPositionRequest hrPositionRequest); /** * 分页查询职位 * - * @param sysPositionRequest 请求参数 + * @param hrPositionRequest 请求参数 * @return 职位详情分页列表 * @author fengshuonan * @date 2020/11/04 11:07 */ - PageResult page(SysPositionRequest sysPositionRequest); + PageResult page(HrPositionRequest hrPositionRequest); /** * 查询所有职位 * - * @param sysPositionRequest 请求参数 + * @param hrPositionRequest 请求参数 * @return 职位详情列表 * @author fengshuonan * @date 2020/11/04 11:07 */ - List list(SysPositionRequest sysPositionRequest); + List list(HrPositionRequest hrPositionRequest); /** * 通过职位id列表,获取对应的名称列表 diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/SysOrganizationServiceImpl.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java similarity index 70% rename from kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/SysOrganizationServiceImpl.java rename to kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java index 476536746..c10d05d6a 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/SysOrganizationServiceImpl.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java @@ -23,9 +23,9 @@ import cn.stylefeng.roses.kernel.system.exception.SystemModularException; import cn.stylefeng.roses.kernel.system.exception.enums.DataScopeExceptionEnum; import cn.stylefeng.roses.kernel.system.exception.enums.OrganizationExceptionEnum; import cn.stylefeng.roses.kernel.system.modular.organization.entity.HrOrganization; -import cn.stylefeng.roses.kernel.system.modular.organization.mapper.SysOrganizationMapper; -import cn.stylefeng.roses.kernel.system.modular.organization.service.SysOrganizationService; -import cn.stylefeng.roses.kernel.system.pojo.organization.SysOrganizationRequest; +import cn.stylefeng.roses.kernel.system.modular.organization.mapper.HrOrganizationMapper; +import cn.stylefeng.roses.kernel.system.modular.organization.service.HrOrganizationService; +import cn.stylefeng.roses.kernel.system.pojo.organization.HrOrganizationRequest; import cn.stylefeng.roses.kernel.system.util.DataScopeUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; @@ -46,7 +46,7 @@ import java.util.Set; * @date 2020/11/04 11:05 */ @Service -public class SysOrganizationServiceImpl extends ServiceImpl implements SysOrganizationService { +public class HrOrganizationServiceImpl extends ServiceImpl implements HrOrganizationService { @Resource private UserOrgServiceApi userOrgServiceApi; @@ -58,10 +58,10 @@ public class SysOrganizationServiceImpl extends ServiceImpl updateWrapper = new LambdaUpdateWrapper<>(); - updateWrapper.eq(HrOrganization::getOrgId, sysOrganizationRequest.getOrgId()); - updateWrapper.set(HrOrganization::getStatusFlag, sysOrganizationRequest.getStatusFlag()); + updateWrapper.eq(HrOrganization::getOrgId, hrOrganizationRequest.getOrgId()); + updateWrapper.set(HrOrganization::getStatusFlag, hrOrganizationRequest.getStatusFlag()); this.update(updateWrapper); } @Override - public HrOrganization detail(SysOrganizationRequest sysOrganizationRequest) { - return this.querySysOrganization(sysOrganizationRequest); + public HrOrganization detail(HrOrganizationRequest hrOrganizationRequest) { + return this.queryOrganization(hrOrganizationRequest); } @Override - public PageResult page(SysOrganizationRequest sysOrganizationRequest) { + public PageResult page(HrOrganizationRequest hrOrganizationRequest) { // 构造条件 - LambdaQueryWrapper wrapper = createWrapper(sysOrganizationRequest); + LambdaQueryWrapper wrapper = createWrapper(hrOrganizationRequest); // 获取分页参数 Page page = PageFactory.defaultPage(); @@ -168,16 +168,16 @@ public class SysOrganizationServiceImpl extends ServiceImpl list(SysOrganizationRequest sysOrganizationRequest) { + public List list(HrOrganizationRequest hrOrganizationRequest) { // 构造条件 - LambdaQueryWrapper wrapper = createWrapper(sysOrganizationRequest); + LambdaQueryWrapper wrapper = createWrapper(hrOrganizationRequest); return this.list(wrapper); } @Override - public List tree(SysOrganizationRequest sysOrganizationRequest) { + public List tree(HrOrganizationRequest hrOrganizationRequest) { // 定义返回结果 List treeNodeList = CollectionUtil.newArrayList(); @@ -217,12 +217,12 @@ public class SysOrganizationServiceImpl extends ServiceImpl list = this.list(queryWrapper); - for (HrOrganization sysOrganization : list) { + for (HrOrganization hrOrganization : list) { DefaultTreeNode orgTreeNode = new DefaultTreeNode(); - orgTreeNode.setId(String.valueOf(sysOrganization.getOrgId())); - orgTreeNode.setPId(String.valueOf(sysOrganization.getOrgParentId())); - orgTreeNode.setName(sysOrganization.getOrgName()); - orgTreeNode.setSort(sysOrganization.getOrgSort()); + orgTreeNode.setId(String.valueOf(hrOrganization.getOrgId())); + orgTreeNode.setPId(String.valueOf(hrOrganization.getOrgParentId())); + orgTreeNode.setName(hrOrganization.getOrgName()); + orgTreeNode.setSort(hrOrganization.getOrgSort()); treeNodeList.add(orgTreeNode); } @@ -247,10 +247,10 @@ public class SysOrganizationServiceImpl extends ServiceImpl createWrapper(SysOrganizationRequest sysOrganizationRequest) { + private LambdaQueryWrapper createWrapper(HrOrganizationRequest hrOrganizationRequest) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - if (ObjectUtil.isNotNull(sysOrganizationRequest)) { + if (ObjectUtil.isNotNull(hrOrganizationRequest)) { // 拼接机构名称查询条件 - if (ObjectUtil.isNotEmpty(sysOrganizationRequest.getOrgName())) { - queryWrapper.like(HrOrganization::getOrgName, sysOrganizationRequest.getOrgName()); + if (ObjectUtil.isNotEmpty(hrOrganizationRequest.getOrgName())) { + queryWrapper.like(HrOrganization::getOrgName, hrOrganizationRequest.getOrgName()); } // 拼接机构id查询条件 - if (ObjectUtil.isNotEmpty(sysOrganizationRequest.getOrgId())) { - queryWrapper.eq(HrOrganization::getOrgId, sysOrganizationRequest.getOrgId()); + if (ObjectUtil.isNotEmpty(hrOrganizationRequest.getOrgId())) { + queryWrapper.eq(HrOrganization::getOrgId, hrOrganizationRequest.getOrgId()); } // 拼接父机构id查询条件 - if (ObjectUtil.isNotEmpty(sysOrganizationRequest.getOrgParentId())) { + if (ObjectUtil.isNotEmpty(hrOrganizationRequest.getOrgParentId())) { queryWrapper - .eq(HrOrganization::getOrgId, sysOrganizationRequest.getOrgParentId()) + .eq(HrOrganization::getOrgId, hrOrganizationRequest.getOrgParentId()) .or() - .like(HrOrganization::getOrgPids, sysOrganizationRequest.getOrgParentId()); + .like(HrOrganization::getOrgPids, hrOrganizationRequest.getOrgParentId()); } } @@ -315,12 +315,12 @@ public class SysOrganizationServiceImpl extends ServiceImpl implements SysPositionService { +public class HrPositionServiceImpl extends ServiceImpl implements HrPositionService { @Resource private UserOrgServiceApi userOrgServiceApi; @Override - public void add(SysPositionRequest sysPositionRequest) { + public void add(HrPositionRequest hrPositionRequest) { HrPosition sysPosition = new HrPosition(); - BeanUtil.copyProperties(sysPositionRequest, sysPosition); + BeanUtil.copyProperties(hrPositionRequest, sysPosition); // 设置状态为启用 sysPosition.setStatusFlag(StatusEnum.ENABLE.getCode()); @@ -50,10 +50,10 @@ public class SysPositionServiceImpl extends ServiceImpl updateWrapper = new LambdaUpdateWrapper<>(); - updateWrapper.eq(HrPosition::getPositionId, sysPositionRequest.getPositionId()); - updateWrapper.set(HrPosition::getStatusFlag, sysPositionRequest.getStatusFlag()); + updateWrapper.eq(HrPosition::getPositionId, hrPositionRequest.getPositionId()); + updateWrapper.set(HrPosition::getStatusFlag, hrPositionRequest.getStatusFlag()); this.update(updateWrapper); } @Override - public HrPosition detail(SysPositionRequest sysPositionRequest) { - return this.querySysPosition(sysPositionRequest); + public HrPosition detail(HrPositionRequest hrPositionRequest) { + return this.querySysPosition(hrPositionRequest); } @Override - public PageResult page(SysPositionRequest sysPositionRequest) { - LambdaQueryWrapper wrapper = createWrapper(sysPositionRequest); + public PageResult page(HrPositionRequest hrPositionRequest) { + LambdaQueryWrapper wrapper = createWrapper(hrPositionRequest); Page page = this.page(PageFactory.defaultPage(), wrapper); return PageResultFactory.createPageResult(page); } @Override - public List list(SysPositionRequest sysPositionRequest) { - LambdaQueryWrapper wrapper = createWrapper(sysPositionRequest); + public List list(HrPositionRequest hrPositionRequest) { + LambdaQueryWrapper wrapper = createWrapper(hrPositionRequest); return this.list(wrapper); } @@ -129,18 +129,18 @@ public class SysPositionServiceImpl extends ServiceImpl createWrapper(SysPositionRequest sysPositionRequest) { + private LambdaQueryWrapper createWrapper(HrPositionRequest hrPositionRequest) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - if (ObjectUtil.isNotNull(sysPositionRequest)) { + if (ObjectUtil.isNotNull(hrPositionRequest)) { // 拼接职位名称条件 - if (ObjectUtil.isNotEmpty(sysPositionRequest.getPositionName())) { - queryWrapper.like(HrPosition::getPositionName, sysPositionRequest.getPositionName()); + if (ObjectUtil.isNotEmpty(hrPositionRequest.getPositionName())) { + queryWrapper.like(HrPosition::getPositionName, hrPositionRequest.getPositionName()); } // 拼接职位编码条件 - if (ObjectUtil.isNotEmpty(sysPositionRequest.getPositionCode())) { - queryWrapper.eq(HrPosition::getPositionCode, sysPositionRequest.getPositionCode()); + if (ObjectUtil.isNotEmpty(hrPositionRequest.getPositionCode())) { + queryWrapper.eq(HrPosition::getPositionCode, hrPositionRequest.getPositionCode()); } } @@ -159,8 +159,8 @@ public class SysPositionServiceImpl extends ServiceImpl