From 3a6c90069af92a7804ce5dd08d3a868aae940d70 Mon Sep 17 00:00:00 2001 From: zhuyy Date: Thu, 23 Feb 2023 10:12:12 +0800 Subject: [PATCH] update --- .../ydool/staff/dto/PersonnelIndicatorsDto.java | 2 +- .../java/com/ydool/staff/dto/RecruitmentDto.java | 2 +- .../ydool/staff/service/impl/AuditServiceImpl.java | 3 +++ .../impl/DirectorsSupervisorsServiceImpl.java | 4 +--- .../service/impl/OrganizationServiceImpl.java | 14 ++------------ .../impl/PersonnelIndicatorsServiceImpl.java | 3 +-- .../staff/service/impl/RecruitmentServiceImpl.java | 3 +-- 7 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/ydool/staff/dto/PersonnelIndicatorsDto.java b/src/main/java/com/ydool/staff/dto/PersonnelIndicatorsDto.java index 631e3d6..153eae5 100644 --- a/src/main/java/com/ydool/staff/dto/PersonnelIndicatorsDto.java +++ b/src/main/java/com/ydool/staff/dto/PersonnelIndicatorsDto.java @@ -20,7 +20,7 @@ import java.util.List; public class PersonnelIndicatorsDto implements Serializable { @ApiModelProperty(value = "企业信息") - private CompanyName organization; + private Organization organization; @ApiModelProperty(value = "人员指标申报") private List personnelIndicators; diff --git a/src/main/java/com/ydool/staff/dto/RecruitmentDto.java b/src/main/java/com/ydool/staff/dto/RecruitmentDto.java index 30f810c..781c9a4 100644 --- a/src/main/java/com/ydool/staff/dto/RecruitmentDto.java +++ b/src/main/java/com/ydool/staff/dto/RecruitmentDto.java @@ -13,7 +13,7 @@ import java.util.List; public class RecruitmentDto implements Serializable { @ApiModelProperty(value = "企业信息") - private CompanyName organization; + private Organization organization; @ApiModelProperty(value = "人员招聘登记") private List recruitments; diff --git a/src/main/java/com/ydool/staff/service/impl/AuditServiceImpl.java b/src/main/java/com/ydool/staff/service/impl/AuditServiceImpl.java index ffdbe2e..15821c5 100644 --- a/src/main/java/com/ydool/staff/service/impl/AuditServiceImpl.java +++ b/src/main/java/com/ydool/staff/service/impl/AuditServiceImpl.java @@ -285,6 +285,7 @@ public class AuditServiceImpl extends BaseService implements // 领导终审批同意 if (leadership.getParamValue().equals(byId.getLoginName())) { CompanyName companyName = companyNameMapper.selectOne(new LambdaQueryWrapper().eq(CompanyName::getId, organization.getCompanyId())); + // 名额 Long places = recruitmentMapper.selectOne(new MPJQueryWrapper().select(" SUM(places) places ").eq("company_id", organization.getId())).getPlaces(); one.setAuditOrder(ArgsConst.LAST); one.setAuditState(ArgsConst.PASS); @@ -389,6 +390,8 @@ public class AuditServiceImpl extends BaseService implements if (update) { //原核定用工指标人数 companyName.setCheckNumber(addNumber + companyName.getCheckNumber()); + // 指标加了剩余人数也加 + companyName.setResidueNumber(standardNumber + companyName.getResidueNumber()); //本次核准后总指标人数 companyName.setThisApprovalNumber(standardNumber + companyName.getThisApprovalNumber()); companyNameMapper.updateById(companyName); diff --git a/src/main/java/com/ydool/staff/service/impl/DirectorsSupervisorsServiceImpl.java b/src/main/java/com/ydool/staff/service/impl/DirectorsSupervisorsServiceImpl.java index 7f8d209..a8a0eea 100644 --- a/src/main/java/com/ydool/staff/service/impl/DirectorsSupervisorsServiceImpl.java +++ b/src/main/java/com/ydool/staff/service/impl/DirectorsSupervisorsServiceImpl.java @@ -191,9 +191,7 @@ public class DirectorsSupervisorsServiceImpl extends BaseService 0 ? AjaxResult.ok().msg("送审成功!") : AjaxResult.fail().msg("送审失败!"); + return updateById(directorsSupervisors) ? AjaxResult.ok().msg("送审成功!") : AjaxResult.fail().msg("送审失败!"); } } diff --git a/src/main/java/com/ydool/staff/service/impl/OrganizationServiceImpl.java b/src/main/java/com/ydool/staff/service/impl/OrganizationServiceImpl.java index 336d386..f92ce98 100644 --- a/src/main/java/com/ydool/staff/service/impl/OrganizationServiceImpl.java +++ b/src/main/java/com/ydool/staff/service/impl/OrganizationServiceImpl.java @@ -105,14 +105,6 @@ public class OrganizationServiceImpl extends BaseService 0 ? AjaxResult.ok().msg("送审成功!") : AjaxResult.ok().msg("送审失败!"); - } - - private void extracted(Organization organization, String id, String type, String loginId) { for (int i = 0; i <= 2; i++) { Audit audit = new Audit(); audit.setPersonnelId(id); @@ -142,10 +134,8 @@ public class OrganizationServiceImpl extends BaseService 0 ? AjaxResult.ok().msg("送审成功!") : AjaxResult.ok().msg("送审失败!"); + organization.setAuditState(1); + return updateById(organization) ? AjaxResult.ok().msg("送审成功!") : AjaxResult.ok().msg("送审失败!"); } } diff --git a/src/main/java/com/ydool/staff/service/impl/PersonnelIndicatorsServiceImpl.java b/src/main/java/com/ydool/staff/service/impl/PersonnelIndicatorsServiceImpl.java index 595090f..e30565d 100644 --- a/src/main/java/com/ydool/staff/service/impl/PersonnelIndicatorsServiceImpl.java +++ b/src/main/java/com/ydool/staff/service/impl/PersonnelIndicatorsServiceImpl.java @@ -65,10 +65,9 @@ public class PersonnelIndicatorsServiceImpl extends BaseService personnelIndicators = personnelIndicatorsMapper.selectList(new LambdaQueryWrapper().eq(PersonnelIndicators::getOrganizationId, organization.getId())); PersonnelIndicatorsDto recruitmentRequest = new PersonnelIndicatorsDto(); - recruitmentRequest.setOrganization(companyName); + recruitmentRequest.setOrganization(organization); recruitmentRequest.setPersonnelIndicators(personnelIndicators); return AjaxResult.ok().data(recruitmentRequest); } diff --git a/src/main/java/com/ydool/staff/service/impl/RecruitmentServiceImpl.java b/src/main/java/com/ydool/staff/service/impl/RecruitmentServiceImpl.java index c38637a..d8f0a76 100644 --- a/src/main/java/com/ydool/staff/service/impl/RecruitmentServiceImpl.java +++ b/src/main/java/com/ydool/staff/service/impl/RecruitmentServiceImpl.java @@ -82,10 +82,9 @@ public class RecruitmentServiceImpl extends BaseService recruitments = recruitmentMapper.selectList(new LambdaQueryWrapper().eq(Recruitment::getCompanyId, organization.getId())); RecruitmentDto recruitmentRequest = new RecruitmentDto(); - recruitmentRequest.setOrganization(companyName); + recruitmentRequest.setOrganization(organization); recruitmentRequest.setRecruitments(recruitments); return AjaxResult.ok().data(recruitmentRequest); }