This commit is contained in:
zhuyy 2023-02-23 10:12:12 +08:00
parent 59f90ca9a0
commit 3a6c90069a
7 changed files with 10 additions and 21 deletions

View File

@ -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> personnelIndicators;

View File

@ -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<Recruitment> recruitments;

View File

@ -285,6 +285,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
// 领导终审批同意
if (leadership.getParamValue().equals(byId.getLoginName())) {
CompanyName companyName = companyNameMapper.selectOne(new LambdaQueryWrapper<CompanyName>().eq(CompanyName::getId, organization.getCompanyId()));
// 名额
Long places = recruitmentMapper.selectOne(new MPJQueryWrapper<Recruitment>().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<AuditMapper, Audit> implements
if (update) {
//原核定用工指标人数
companyName.setCheckNumber(addNumber + companyName.getCheckNumber());
// 指标加了剩余人数也加
companyName.setResidueNumber(standardNumber + companyName.getResidueNumber());
//本次核准后总指标人数
companyName.setThisApprovalNumber(standardNumber + companyName.getThisApprovalNumber());
companyNameMapper.updateById(companyName);

View File

@ -191,9 +191,7 @@ public class DirectorsSupervisorsServiceImpl extends BaseService<DirectorsSuperv
auditMapper.insert(audit);
}
directorsSupervisors.setAuditState(1);
updateById(directorsSupervisors);
Integer a = auditService.saveAuditLog(id, loginId, type,"送审","");
return a > 0 ? AjaxResult.ok().msg("送审成功!") : AjaxResult.fail().msg("送审失败!");
return updateById(directorsSupervisors) ? AjaxResult.ok().msg("送审成功!") : AjaxResult.fail().msg("送审失败!");
}
}

View File

@ -105,14 +105,6 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
if (1 == organization.getAuditState()) {
return AjaxResult.fail().msg("该数据已送审,请勿重复操作!");
}
extracted(organization, id, type, loginId);
organization.setAuditState(1);
updateById(organization);
Integer i = auditService.saveAuditLog(id, loginId, type,"送审","");
return i > 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<OrganizationMapper, Org
}
auditMapper.insert(audit);
}
// organization.setAuditState(1);
// updateById(organization);
// Integer i = auditService.saveAuditLog(id, loginId, "送审","送审","");
// return i > 0 ? AjaxResult.ok().msg("送审成功!") : AjaxResult.ok().msg("送审失败!");
organization.setAuditState(1);
return updateById(organization) ? AjaxResult.ok().msg("送审成功!") : AjaxResult.ok().msg("送审失败!");
}
}

View File

@ -65,10 +65,9 @@ public class PersonnelIndicatorsServiceImpl extends BaseService<PersonnelIndicat
if (ObjectUtil.isNull(organization)) {
return AjaxResult.fail().msg("未找到相关信息!");
}
CompanyName companyName = companyNameMapper.selectById(organization.getCompanyId());
List<PersonnelIndicators> personnelIndicators = personnelIndicatorsMapper.selectList(new LambdaQueryWrapper<PersonnelIndicators>().eq(PersonnelIndicators::getOrganizationId, organization.getId()));
PersonnelIndicatorsDto recruitmentRequest = new PersonnelIndicatorsDto();
recruitmentRequest.setOrganization(companyName);
recruitmentRequest.setOrganization(organization);
recruitmentRequest.setPersonnelIndicators(personnelIndicators);
return AjaxResult.ok().data(recruitmentRequest);
}

View File

@ -82,10 +82,9 @@ public class RecruitmentServiceImpl extends BaseService<RecruitmentMapper, Recru
if (ObjectUtil.isNull(organization)) {
return AjaxResult.fail().msg("未找到相关信息!");
}
CompanyName companyName = companyNameMapper.selectById(organization.getCompanyId());
List<Recruitment> recruitments = recruitmentMapper.selectList(new LambdaQueryWrapper<Recruitment>().eq(Recruitment::getCompanyId, organization.getId()));
RecruitmentDto recruitmentRequest = new RecruitmentDto();
recruitmentRequest.setOrganization(companyName);
recruitmentRequest.setOrganization(organization);
recruitmentRequest.setRecruitments(recruitments);
return AjaxResult.ok().data(recruitmentRequest);
}