|
@@ -7,7 +7,6 @@ import com.ruoyi.ahrs.recruitplan.domian.RecruitPlanMain;
|
|
import com.ruoyi.ahrs.recruitplan.mapper.RecruitPlanChildMapper;
|
|
import com.ruoyi.ahrs.recruitplan.mapper.RecruitPlanChildMapper;
|
|
import com.ruoyi.ahrs.recruitplan.mapper.RecruitPlanMainMapper;
|
|
import com.ruoyi.ahrs.recruitplan.mapper.RecruitPlanMainMapper;
|
|
import com.ruoyi.ahrs.recruitplan.service.IRecruitPlanMainService;
|
|
import com.ruoyi.ahrs.recruitplan.service.IRecruitPlanMainService;
|
|
-import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.core.text.Convert;
|
|
import com.ruoyi.common.core.text.Convert;
|
|
import com.ruoyi.common.enums.UserEnums;
|
|
import com.ruoyi.common.enums.UserEnums;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
@@ -37,7 +36,6 @@ public class RecruitPlanMainServiceImpl implements IRecruitPlanMainService {
|
|
private RecruitPlanChildMapper recruitPlanChildMapper;
|
|
private RecruitPlanChildMapper recruitPlanChildMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private RecruitPersonnelMapper recruitPersonnelMapper;
|
|
private RecruitPersonnelMapper recruitPersonnelMapper;
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ISysDictDataService sysDictDataService;
|
|
private ISysDictDataService sysDictDataService;
|
|
|
|
|
|
@@ -153,7 +151,7 @@ public class RecruitPlanMainServiceImpl implements IRecruitPlanMainService {
|
|
//给所有子计划版本赋值
|
|
//给所有子计划版本赋值
|
|
for (int i=0;i<recruitPlanChildList.size();i++){
|
|
for (int i=0;i<recruitPlanChildList.size();i++){
|
|
recruitPlanChildList.get(i).setVersion(1L);
|
|
recruitPlanChildList.get(i).setVersion(1L);
|
|
- recruitPlanChildList.get(i).setCreateBy(ShiroUtils.getSysUser().getCreateBy());
|
|
|
|
|
|
+ recruitPlanChildList.get(i).setCreateBy(ShiroUtils.getSysUser().getUserName());
|
|
recruitPlanChildList.get(i).setCreateTime(DateUtils.getNowDate());
|
|
recruitPlanChildList.get(i).setCreateTime(DateUtils.getNowDate());
|
|
}
|
|
}
|
|
//转换age
|
|
//转换age
|
|
@@ -195,7 +193,6 @@ public class RecruitPlanMainServiceImpl implements IRecruitPlanMainService {
|
|
boolean isChange = true;
|
|
boolean isChange = true;
|
|
//修改界面传过来的对象
|
|
//修改界面传过来的对象
|
|
List<RecruitPlanChild> recruitPlanChildList = recruitPM.getColumns();
|
|
List<RecruitPlanChild> recruitPlanChildList = recruitPM.getColumns();
|
|
- int beanLongNum = recruitPlanChildList.size();
|
|
|
|
|
|
|
|
//给修改招聘计划中的子计划delFlag赋值为"0''--并且进行转换age
|
|
//给修改招聘计划中的子计划delFlag赋值为"0''--并且进行转换age
|
|
recruitPlanChildList.forEach(recruitPlanChild -> {
|
|
recruitPlanChildList.forEach(recruitPlanChild -> {
|
|
@@ -246,8 +243,7 @@ public class RecruitPlanMainServiceImpl implements IRecruitPlanMainService {
|
|
recruitPlanChildList.get(i).setRecruitPlanMainId(recruitPM.getRecruitPlanMainId());
|
|
recruitPlanChildList.get(i).setRecruitPlanMainId(recruitPM.getRecruitPlanMainId());
|
|
recruitPlanChildList.get(i).setCreateBy(recruitPlanChild.getCreateBy());
|
|
recruitPlanChildList.get(i).setCreateBy(recruitPlanChild.getCreateBy());
|
|
recruitPlanChildList.get(i).setCreateTime(recruitPlanChild.getCreateTime());
|
|
recruitPlanChildList.get(i).setCreateTime(recruitPlanChild.getCreateTime());
|
|
- recruitPlanChildList.get(i).setUpdateBy(ShiroUtils.getSysUser().getUserName());
|
|
|
|
- recruitPlanChildList.get(i).setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
//第三步,将删除的子计划版本加一且逻辑删除
|
|
//第三步,将删除的子计划版本加一且逻辑删除
|
|
@@ -269,10 +265,8 @@ public class RecruitPlanMainServiceImpl implements IRecruitPlanMainService {
|
|
recruitPM.setRecruitPlanMainId(null);
|
|
recruitPM.setRecruitPlanMainId(null);
|
|
recruitPM.setVersion(recruitPMT.getVersion() + 1);
|
|
recruitPM.setVersion(recruitPMT.getVersion() + 1);
|
|
recruitPM.setDeptId(recruitPMT.getDeptId());
|
|
recruitPM.setDeptId(recruitPMT.getDeptId());
|
|
- recruitPM.setCreateBy(recruitPMT.getCreateBy());
|
|
|
|
- recruitPM.setCreateTime(recruitPMT.getCreateTime());
|
|
|
|
- recruitPM.setUpdateBy(ShiroUtils.getSysUser().getUserName());
|
|
|
|
- recruitPM.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
|
+ recruitPM.setCreateBy(ShiroUtils.getSysUser().getUserName());
|
|
|
|
+ recruitPM.setCreateTime(DateUtils.getNowDate());
|
|
recruitPM.setDelFlag("0");
|
|
recruitPM.setDelFlag("0");
|
|
recruitPM.setAhrsRecruitPlanChildList(recruitPlanChildList);
|
|
recruitPM.setAhrsRecruitPlanChildList(recruitPlanChildList);
|
|
}
|
|
}
|
|
@@ -281,8 +275,6 @@ public class RecruitPlanMainServiceImpl implements IRecruitPlanMainService {
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 删除 逻辑删除
|
|
* 删除 逻辑删除
|
|
* @param recruitPlanMain recruitplan
|
|
* @param recruitPlanMain recruitplan
|
|
@@ -292,13 +284,19 @@ public class RecruitPlanMainServiceImpl implements IRecruitPlanMainService {
|
|
public int insertRecruitPlanMainForUpdate(RecruitPlanMain recruitPlanMain)
|
|
public int insertRecruitPlanMainForUpdate(RecruitPlanMain recruitPlanMain)
|
|
{
|
|
{
|
|
recruitPlanMain.setCreateTime(DateUtils.getNowDate());
|
|
recruitPlanMain.setCreateTime(DateUtils.getNowDate());
|
|
|
|
+ List<RecruitPlanChild> recruitPlanChildList = recruitPlanMain.getAhrsRecruitPlanChildList();
|
|
|
|
+ recruitPlanChildList.forEach(recruitPlanChild -> {
|
|
|
|
+ recruitPlanChild.setVersion(recruitPlanChild.getVersion()+1);
|
|
|
|
+ recruitPlanChild.setDelFlag("2");
|
|
|
|
+ recruitPlanChild.setRecruitPlanChildId(null);
|
|
|
|
+ recruitPlanChild.setRecruitPlanMainId(null);
|
|
|
|
+ });
|
|
|
|
+ recruitPlanMain.setAhrsRecruitPlanChildList(recruitPlanChildList);
|
|
int rows = recruitPlanMainMapper.insertRecruitPlanMain(recruitPlanMain);
|
|
int rows = recruitPlanMainMapper.insertRecruitPlanMain(recruitPlanMain);
|
|
|
|
+ insertAhrsRecruitPlanChild(recruitPlanMain);
|
|
return rows;
|
|
return rows;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public int insertRecruitPlanMainApproval(RecruitPlanMain recruitPlanMain) {
|
|
public int insertRecruitPlanMainApproval(RecruitPlanMain recruitPlanMain) {
|
|
recruitPlanMain.setCreateTime(new Date());
|
|
recruitPlanMain.setCreateTime(new Date());
|
|
@@ -356,6 +354,9 @@ public class RecruitPlanMainServiceImpl implements IRecruitPlanMainService {
|
|
return recruitPlanMainMapper.selectRecruitPlanMainIdByDeptid(deptId);
|
|
return recruitPlanMainMapper.selectRecruitPlanMainIdByDeptid(deptId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /*校验同单位今年和明年是否已有招聘计划
|
|
|
|
+ 该年若有计划,yearList删除该年份,若yearList.size()=0,则无法新增,
|
|
|
|
+ * */
|
|
@Override
|
|
@Override
|
|
public List<Integer> selectRecruitPlanMainIdByDeptidForMain(Long deptId, List<Integer> yearsList) {
|
|
public List<Integer> selectRecruitPlanMainIdByDeptidForMain(Long deptId, List<Integer> yearsList) {
|
|
//校验同单位今年和明年是否已有招聘计划
|
|
//校验同单位今年和明年是否已有招聘计划
|