Commit c72126bf authored by wangxl's avatar wangxl

1

parent 77be5e26
...@@ -83,6 +83,18 @@ public class ComTalentApplyController extends BaseController<ComTalentApplyServi ...@@ -83,6 +83,18 @@ public class ComTalentApplyController extends BaseController<ComTalentApplyServi
return ResponseDataModel.ok(comTalentApplyService.getTalentApplyById(id)); return ResponseDataModel.ok(comTalentApplyService.getTalentApplyById(id));
} }
/**
* 查询申报人是否当前年度是否上报
*
* @param
*/
@ApiOperation(value = "根据id获取人才申报信息", httpMethod = "GET", notes = "根据id获取人才申报信息")
@GetMapping
@RequestMapping("/isTalentExist")
public ResponseDataModel<Boolean> isTalentExist() {
return ResponseDataModel.ok(comTalentApplyService.isTalentExist());
}
/** /**
* 创建基础人才申报信息 * 创建基础人才申报信息
*/ */
......
...@@ -25,6 +25,8 @@ public interface ComTalentApplyService extends BaseService<ComTalentApplyQueryVO ...@@ -25,6 +25,8 @@ public interface ComTalentApplyService extends BaseService<ComTalentApplyQueryVO
ComTalentApplyDTO getTalentApplyById(String id); ComTalentApplyDTO getTalentApplyById(String id);
Boolean isTalentExist();
/** /**
* 删除人才申报信息 * 删除人才申报信息
* *
......
...@@ -221,7 +221,7 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD ...@@ -221,7 +221,7 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
return page; return page;
} }
public void report(Integer reportYear, String auditObjectId, Integer auditType,Integer auditMethod, String auditUnitId, String treeCode) { public void report(Integer reportYear, String auditObjectId, Integer auditType, Integer auditMethod, String auditUnitId, String treeCode) {
if (null == auditMethod) if (null == auditMethod)
auditMethod = CommonEnum.auditMethod.audit.getCode(); auditMethod = CommonEnum.auditMethod.audit.getCode();
int maxIndex = this.getMaxAuditIndex(auditObjectId); int maxIndex = this.getMaxAuditIndex(auditObjectId);
...@@ -260,19 +260,21 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD ...@@ -260,19 +260,21 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
// 审核通过 // 审核通过
if (model.getAuditResult().equals(CommonEnum.auditResult.pass.getCode())) { if (model.getAuditResult().equals(CommonEnum.auditResult.pass.getCode())) {
if (unitLevel.equals(1)) { if (unitLevel.equals(1)) {
if (auditMethod.equals(CommonEnum.auditMethod.audit.getCode()) && auditType.equals(1)) { if (auditMethod.equals(CommonEnum.auditMethod.audit.getCode())) {
// 查询上级单位上报记录 if (model.getAuditType().equals(CommonEnum.auditType.project.getCode())) {
ComProjectAudit auditNote = this.getAudit(auditObjectId, auditUnitId, auditType, CommonEnum.auditMethod.last.getCode(), null); // 查询上级单位上报记录
if (null != auditNote) { ComProjectAudit auditNote = this.getAudit(auditObjectId, auditUnitId, auditType, CommonEnum.auditMethod.last.getCode(), null);
// 更新上级单位上报记录 if (null != auditNote) {
this.updateAudit(auditNote.getId(), CommonEnum.auditResult.waitAudit.getCode(), "", index + 1, SecurityUserHolder.getPersonId(), new Date(), null, null, null, null); // 更新上级单位上报记录
} else { this.updateAudit(auditNote.getId(), CommonEnum.auditResult.waitAudit.getCode(), "", index + 1, SecurityUserHolder.getPersonId(), new Date(), null, null, null, null);
//插入上报表 } else {
this.insertAudit(reportYear, auditType, auditObjectId, CommonEnum.auditMethod.last.getCode(), auditUnitId, null, CommonEnum.auditResult.waitAudit.getCode(), null, unitLevel, index + 1, SecurityUserHolder.getPersonId()); //插入上报表
this.insertAudit(reportYear, auditType, auditObjectId, CommonEnum.auditMethod.last.getCode(), auditUnitId, null, CommonEnum.auditResult.waitAudit.getCode(), null, unitLevel, index + 1, SecurityUserHolder.getPersonId());
}
// 插入审核记录表
comProjectAuditNoteService.insertAuditNote(reportYear, auditType, auditObjectId, CommonEnum.auditMethod.last.getCode(), auditUnitId, null, CommonEnum.auditResult.waitAudit.getCode(), null, unitLevel, index + 1, SecurityUserHolder.getPersonId());
unitId = auditUnitId;
} }
// 插入审核记录表
comProjectAuditNoteService.insertAuditNote(reportYear, auditType, auditObjectId, CommonEnum.auditMethod.last.getCode(), auditUnitId, null, CommonEnum.auditResult.waitAudit.getCode(), null, unitLevel, index + 1, SecurityUserHolder.getPersonId());
unitId = auditUnitId;
} }
} else { } else {
// 获取上级单位 // 获取上级单位
......
...@@ -27,6 +27,7 @@ import java.util.stream.Collectors; ...@@ -27,6 +27,7 @@ import java.util.stream.Collectors;
/** /**
* 人才申请表 Service 实现类 * 人才申请表 Service 实现类
*
* @author xujun * @author xujun
* @version 2025-03-12 * @version 2025-03-12
*/ */
...@@ -100,8 +101,8 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO ...@@ -100,8 +101,8 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
CommonEnum.talentState.toAudit.getCode(), CommonEnum.talentState.toAudit.getCode(),
CommonEnum.talentState.failed.getCode(), CommonEnum.talentState.failed.getCode(),
CommonEnum.talentState.pass.getCode()); CommonEnum.talentState.pass.getCode());
//CommonEnum.talentState.report.getCode(), //CommonEnum.talentState.report.getCode(),
//CommonEnum.talentState.conclusion.getCode()); //CommonEnum.talentState.conclusion.getCode());
break; break;
case 4: case 4:
break; break;
...@@ -225,9 +226,35 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO ...@@ -225,9 +226,35 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
dto.setAppPersonId(SecurityUserHolder.getPersonId()); dto.setAppPersonId(SecurityUserHolder.getPersonId());
dto.setAppUnitId(SecurityUserHolder.getUnitId()); dto.setAppUnitId(SecurityUserHolder.getUnitId());
ComPersonDTO comPersonDTO = comPersonService.getPersonById(SecurityUserHolder.getPersonId());
dto.setPersonId(comPersonDTO.getId());
dto.setCertId(comPersonDTO.getCertId());
dto.setPersonName(comPersonDTO.getPersonName());
dto.setSex(comPersonDTO.getSex());
dto.setNation(comPersonDTO.getNation());
dto.setBirthday(comPersonDTO.getBirthday());
dto.setDegree(comPersonDTO.getDegree());
dto.setDegreeTime(comPersonDTO.getDegreeTime());
dto.setDegreeUnit(comPersonDTO.getDegreeUnit());
dto.setGraduateTeacher(comPersonDTO.getGraduateTeacher());
dto.setTitle(comPersonDTO.getTitle());
dto.setSpec(comPersonDTO.getSpec());
dto.setMobile(comPersonDTO.getMobile());
dto.setEmail(comPersonDTO.getEmail());
dto.setFax(comPersonDTO.getFax());
return dto; return dto;
} }
public Boolean isTalentExist() {
ComTalentApply talent = new ComTalentApply();
talent.setReportYear(comBatchService.getReportYear(null, CommonEnum.timeType.talentApply.getCode()));
talent.setPersonId(SecurityUserHolder.getPersonId());
talent = this.getEntity(talent);
return talent == null ? false : true;
}
public ComTalentApplyDTO getTalentApplyById(String id) { public ComTalentApplyDTO getTalentApplyById(String id) {
ComTalentApplyDTO dto = comTalentApplyDAO.getById(id); ComTalentApplyDTO dto = comTalentApplyDAO.getById(id);
if (null == dto) if (null == dto)
...@@ -456,8 +483,8 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO ...@@ -456,8 +483,8 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
if (null == comTalentApply) if (null == comTalentApply)
throw new BusinessException("人才申报记录不存在或已删除!"); throw new BusinessException("人才申报记录不存在或已删除!");
if (!comTalentApply.getTalentState().equals(CommonEnum.talentState.waitSubmit.getCode()) && !comTalentApply.getTalentState().equals(CommonEnum.talentState.returnModify.getCode())) if (!comTalentApply.getTalentState().equals(CommonEnum.talentState.waitSubmit.getCode()) && !comTalentApply.getTalentState().equals(CommonEnum.talentState.returnModify.getCode()))
throw new BusinessException("项目已上报!"); throw new BusinessException("人才申报记录已上报!");
comProjectAuditService.report(comTalentApply.getReportYear(), model.getAuditObjectId(), model.getAuditType(),null ,unitId, treeCode); comProjectAuditService.report(comTalentApply.getReportYear(), model.getAuditObjectId(), model.getAuditType(), null, unitId, treeCode);
// 更新人才申报记录状态 // 更新人才申报记录状态
comTalentApply.setTalentState(CommonEnum.projState.toAudit.getCode()); comTalentApply.setTalentState(CommonEnum.projState.toAudit.getCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment