修改状态
This commit is contained in:
parent
91b9659645
commit
50bd5ec3b5
|
@ -47,6 +47,12 @@ public class OrganizationController extends BaseController {
|
|||
return organizationService.deleteOrganization(id);
|
||||
}
|
||||
|
||||
@GetMapping("/personnel")
|
||||
@ApiOperation(value = "人员")
|
||||
public AjaxResult personnel(){
|
||||
return organizationService.personnel();
|
||||
}
|
||||
|
||||
@GetMapping(value = "/approval")
|
||||
@ApiOperation(value = "招聘单号")
|
||||
@ApiImplicitParams({@ApiImplicitParam(value = "企业id", name = "id", required = true)})
|
||||
|
|
|
@ -97,6 +97,10 @@ public class Organization extends BaseEntity{
|
|||
@TableField(exist = false)
|
||||
private Integer retiree = 0;
|
||||
|
||||
@ApiModelProperty(value = "离职人员")
|
||||
@TableField(exist = false)
|
||||
private Integer quit = 0;
|
||||
|
||||
@ApiModelProperty(value = "剩余招聘")
|
||||
@TableField(exist = false)
|
||||
private Integer surplus = 0;
|
||||
|
|
|
@ -24,5 +24,7 @@ public interface IOrganizationService {
|
|||
AjaxResult submitRecruitment(String id, String type);
|
||||
|
||||
AjaxResult approval(String id);
|
||||
|
||||
AjaxResult personnel();
|
||||
}
|
||||
|
||||
|
|
|
@ -109,6 +109,8 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
|
|||
record.setSurplus(Math.toIntExact(places.getSum() - totalPersonnelCount));
|
||||
int retireeCount = personnelService.count(eq.eq(Personnel::getIsInfo, Boolean.TRUE));
|
||||
record.setRetiree(retireeCount);
|
||||
int whetherIsQuit = personnelService.count(eq.eq(Personnel::getWhetherIsQuit, Boolean.TRUE));
|
||||
record.setQuit(whetherIsQuit);
|
||||
}
|
||||
}
|
||||
return AjaxResult.ok().data(selectPage);
|
||||
|
@ -223,5 +225,14 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
|
|||
}
|
||||
return AjaxResult.ok().data(dtoList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult personnel() {
|
||||
CompanyName companyName = companyNameMapper.selectOne(Wrappers.lambdaQuery(CompanyName.class).eq(CompanyName::getCompanyName, "象山县粮食收储有限公司"));
|
||||
if (companyName == null) {
|
||||
return AjaxResult.ok().data(0);
|
||||
}
|
||||
return AjaxResult.ok().data(companyName.getResidualNumber());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -943,12 +943,13 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
@Override
|
||||
public AjaxResult updatePersonnelRetire(String id) {
|
||||
Personnel personnel = getById(id);
|
||||
if (!"退休".equals(personnel.getWorkState())) {
|
||||
return AjaxResult.fail("该人员未办理退休变更,请先办理退休变更!");
|
||||
}
|
||||
// if (!"退休".equals(personnel.getWorkState())) {
|
||||
// return AjaxResult.fail("该人员未办理退休变更,请先办理退休变更!");
|
||||
// }
|
||||
if (BooleanUtil.isTrue(personnel.getIsInfo())) {
|
||||
return AjaxResult.fail("请勿重复办理!");
|
||||
}
|
||||
personnel.setWorkState("退休");
|
||||
personnel.setIsInfo(true);
|
||||
boolean b = updateById(personnel);
|
||||
CompanyName companyName = companyNameMapper.selectById(personnel.getCompanyName());
|
||||
|
@ -960,12 +961,13 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
@Override
|
||||
public AjaxResult handlingResignationEvents(String id) {
|
||||
Personnel personnel = getById(id);
|
||||
if (!"离职".equals(personnel.getWorkState())) {
|
||||
return AjaxResult.fail("该人员未办理离职变更,请先办理离职变更!");
|
||||
}
|
||||
// if (!"离职".equals(personnel.getWorkState())) {
|
||||
// return AjaxResult.fail("该人员未办理离职变更,请先办理离职变更!");
|
||||
// }
|
||||
if (BooleanUtil.isTrue(personnel.getWhetherIsQuit())) {
|
||||
return AjaxResult.fail("请勿重复办理!");
|
||||
}
|
||||
personnel.setWorkState("离职");
|
||||
personnel.setWhetherIsQuit(true);
|
||||
personnel.setPersonnelType("指标外");
|
||||
personnel.setResignationTime(LocalDate.now());
|
||||
|
|
Loading…
Reference in New Issue