diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java index 5cc4cee81..5590986e1 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java @@ -71,7 +71,7 @@ public class HrPositionController { */ @PostResource(name = "更新职位状态", path = "/hrPosition/updateStatus") public ResponseData updateStatus(@RequestBody @Validated(BaseRequest.updateStatus.class) HrPositionRequest hrPositionRequest) { - hrPositionService.updateStatus(hrPositionRequest); + hrPositionService.changeStatus(hrPositionRequest); return new SuccessResponseData(); } diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/entity/HrOrganization.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/entity/HrOrganization.java index 99977adce..77acfd8e8 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/entity/HrOrganization.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/entity/HrOrganization.java @@ -61,7 +61,7 @@ public class HrOrganization extends BaseEntity { /** * 状态:1-启用,2-禁用 */ - @TableField("status_flag") + @TableField(value = "status_flag",fill = FieldFill.INSERT) private Integer statusFlag; /** diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java index b0c8e47cd..a587b9327 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java @@ -43,13 +43,13 @@ public interface HrPositionService extends IService { void edit(HrPositionRequest hrPositionRequest); /** - * 更新装填 + * 更新状态 * * @param hrPositionRequest 请求参数 * @author chenjinlong * @date 2020/11/18 23:00 */ - void updateStatus(HrPositionRequest hrPositionRequest); + void changeStatus(HrPositionRequest hrPositionRequest); /** * 查看详情 diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java index b33c309f2..0264a649b 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java @@ -149,7 +149,7 @@ public class HrOrganizationServiceImpl extends ServiceImpl findList(HrPositionRequest hrPositionRequest) { - LambdaQueryWrapper wrapper = this.createWrapper(hrPositionRequest); - return this.list(wrapper); + return this.list(this.createWrapper(hrPositionRequest)); } @Override @@ -119,16 +118,6 @@ public class HrPositionServiceImpl extends ServiceImpl createWrapper(HrPositionRequest hrPositionRequest) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - // 查询未删除状态的 - queryWrapper.eq(HrPosition::getDelFlag, YesOrNotEnum.N.getCode()); - - // 根据排序升序排列,序号越小越在前 - queryWrapper.orderByAsc(HrPosition::getPositionSort); - - if (ObjectUtil.isEmpty(hrPositionRequest)) { - return queryWrapper; - } - Long positionId = hrPositionRequest.getPositionId(); String positionName = hrPositionRequest.getPositionName(); String positionCode = hrPositionRequest.getPositionCode(); @@ -138,6 +127,11 @@ public class HrPositionServiceImpl extends ServiceImpl