|
|
|
|
@ -12,6 +12,7 @@ import org.springblade.desk.jobTransfer.mapper.CultivateDetailMapper; |
|
|
|
|
import org.springblade.desk.jobTransfer.service.ICultivateDetailService; |
|
|
|
|
import org.springblade.desk.jobTransfer.service.IPostHandleService; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
@ -32,9 +33,14 @@ import java.util.stream.Collectors; |
|
|
|
|
@Service |
|
|
|
|
public class CultivateDetailServiceImpl extends BaseServiceImpl<CultivateDetailMapper, CultivateDetailEntity> implements ICultivateDetailService { |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private IPostHandleService postHandleService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
@Lazy |
|
|
|
|
public void setPostHandleService(IPostHandleService postHandleService) { |
|
|
|
|
this.postHandleService = postHandleService; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<CultivateDetailVO> selectCultivateDetailPage(IPage<CultivateDetailVO> page, CultivateDetailQuery cultivateDetailQuery) { |
|
|
|
|
return page.setRecords(baseMapper.selectCultivateDetailPage(page, cultivateDetailQuery)); |
|
|
|
|
@ -60,19 +66,25 @@ public class CultivateDetailServiceImpl extends BaseServiceImpl<CultivateDetailM |
|
|
|
|
} |
|
|
|
|
//2.批量修改人员岗位表数据
|
|
|
|
|
Set<Long> phIds = cultivateDetails.stream().map(CultivateDetailEntity::getPhId).collect(Collectors.toSet()); |
|
|
|
|
boolean updateSuccess = postHandleService.lambdaUpdate() |
|
|
|
|
boolean update1 = postHandleService.lambdaUpdate() |
|
|
|
|
.in(PostHandleEntity::getId, phIds) |
|
|
|
|
// 根据不同的原始状态设置不同的目标状态
|
|
|
|
|
.eq(PostHandleEntity::getPhStatus, PostHandleStatusEnum.JOB_TRANSFER.getCode()) |
|
|
|
|
.set(PostHandleEntity::getPhStatus, PostHandleStatusEnum.JOB_TRANSFER_TRAINED.getCode()) |
|
|
|
|
.set(PostHandleEntity::getUpdateTime, new Date()) |
|
|
|
|
.update(); |
|
|
|
|
boolean update2 = postHandleService.lambdaUpdate() |
|
|
|
|
.in(PostHandleEntity::getId, phIds) |
|
|
|
|
.eq(PostHandleEntity::getPhStatus, PostHandleStatusEnum.LAID_OFF.getCode()) |
|
|
|
|
.set(PostHandleEntity::getPhStatus, PostHandleStatusEnum.LAID_OFF_TRAINED.getCode()) |
|
|
|
|
.set(PostHandleEntity::getUpdateTime, new Date()) |
|
|
|
|
.update(); |
|
|
|
|
boolean update3 = postHandleService.lambdaUpdate() |
|
|
|
|
.in(PostHandleEntity::getId, phIds) |
|
|
|
|
.eq(PostHandleEntity::getPhStatus, PostHandleStatusEnum.IN_PRACTICE.getCode()) |
|
|
|
|
.set(PostHandleEntity::getPhStatus, PostHandleStatusEnum.IN_PRACTICE_TRAINED.getCode()) |
|
|
|
|
// 统一设置更新时间
|
|
|
|
|
.set(PostHandleEntity::getUpdateTime, new Date()) |
|
|
|
|
.update(); |
|
|
|
|
return R.status(updateSuccess); |
|
|
|
|
return R.status(saved); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|