Commit 456d64f9 authored by wangxl's avatar wangxl

Merge remote-tracking branch 'origin/master'

parents 400aa146 01ab93f3
......@@ -39,5 +39,8 @@ public class ComFile extends BaseEntity {
/** 必须上传的附件 */
@ApiModelProperty(value = "必须上传的附件", position = 8)
private Boolean isRequired;
/** 是否为标题 */
@ApiModelProperty(value = "是否为标题", position = 8)
private Boolean isTitle;
}
\ No newline at end of file
......@@ -23,7 +23,7 @@ public class ComProjectAudit extends BaseEntity {
/** 年度 */
@ApiModelProperty(value = "年度", position = 1 )
private Integer reportYear;
/** 审核类型 1 项目 2 任务书 3中期考核 4结题 5 论文*/
/** 审核类型 1项目 2任务书 3中期考核 4结题 5论文 6人才申报 */
@ApiModelProperty(value = "审核类型", position = 2 )
private Integer auditType;
/** 审核对象Id */
......
......@@ -48,6 +48,10 @@ public class ComTalentBudget extends BaseEntity {
/** 第五年预算 */
@ApiModelProperty(value = "第五年预算", position = 7)
private BigDecimal yearValue5;
/** 合计 */
@ApiModelProperty(value = "合计", position = 7)
private BigDecimal amountFee;
/** 预算科目名称 */
@ApiModelProperty(value = "预算科目名称", position = 8)
......@@ -57,4 +61,8 @@ public class ComTalentBudget extends BaseEntity {
/** 排序 */
@ApiModelProperty(value = "排序", position = 9)
private Integer showIndex;
/** 是否为必填项 */
@ApiModelProperty(value = "是否为必填项", position = 10)
private Boolean isRequired;
}
\ No newline at end of file
......@@ -45,10 +45,10 @@ public class ComTalentMembers extends BaseEntity {
@Length(max=200, message = "专业特长不能大于200")
private String spec;
/** 职 */
@ApiModelProperty(value = "职", position = 6)
@Length(max=50, message = "职不能大于50")
private String duty;
/** 职 */
@ApiModelProperty(value = "职", position = 6)
@Length(max=50, message = "职不能大于50")
private String title;
/** 工作单位 */
@ApiModelProperty(value = "工作单位", position = 7)
......
......@@ -372,6 +372,43 @@ public class CommonEnum {
return projState.draft;//For values out of enum scope
}
}
public enum talentState implements INumberEnum {
draft(-10, "起草"),
waitSubmit(10, "待提交"),
toAudit(20, "评审中"),
returnModify(30, "返回修改"),
failed(40, "未批准立项"),
pass(50, "批准立项"),
report(55, "结题上报"),
conclusion(60, "已结题");
talentState(int number, String description) {
this.code = number;
this.description = description;
}
private Integer code;
private String description;
@Override
public Integer getCode() {
return code;
}
@Override
public String getDescription() {
return description;
}
public static talentState getEnum(Integer value) {
for (talentState e : talentState.values()) {
if (e.getCode().equals(value))
return e;
}
return talentState.draft;//For values out of enum scope
}
}
/**
* 论文上传状态
*/
......@@ -598,7 +635,8 @@ public class CommonEnum {
task(2, "任务书审核"),
check(3, "中期考核审核"),
conclusion(4, "结题审核"),
thesis(5, "论文审核");
thesis(5, "论文审核"),
talent(6, "人才申报审核");
auditType(int number, String description) {
this.code = number;
......@@ -695,7 +733,12 @@ public class CommonEnum {
auditRecordDelete("auditRecordSave", "删除评审记录"),
auditRecordSave("auditRecordSave", "修改/添加评审记录"),
talentApply("talentApply", "人才申报保存");
talentApplySave("talentApply", "人才申报保存"),
talentApplyComplete("talentApplyComplete", "人才申报完成填写"),
talentApplyReport("talentApplyReport", "人才申报信息上报"),
talentApplyAudit("talentApplyAudit", "人才申报信息审核"),
talentApplyDelete("talentApplyDelete", "人才申报信息删除");
logType(String key, String description) {
this.key = key;
......
......@@ -44,4 +44,7 @@ public class ComFileDTO extends BaseDTO {
/** 必须上传的附件 */
@ApiModelProperty(value = "必须上传的附件", position = 8)
private Boolean isRequired;
/** 是否为标题 */
@ApiModelProperty(value = "是否为标题", position = 8)
private Boolean isTitle;
}
\ No newline at end of file
......@@ -42,6 +42,10 @@ public class ComTalentApplyDTO extends BaseDTO {
/** 人才类别 */
@ApiModelProperty(value = "人才类别")
private String talentCategory;
/** 人才类别名称 */
@ApiModelProperty(value = "人才类别名称")
private String talentCategoryName;
@ApiModelProperty(value = "人才类型")
private String talentType;
......@@ -108,6 +112,9 @@ public class ComTalentApplyDTO extends BaseDTO {
/** 人才申报状态 -10 起草,10 待提交, 20 已提交至依托单位,25 依托单位审核通过,请打印申请书,30 返回修改,40 未批准,50 批准 */
@ApiModelProperty(value = "人才申报状态 -10 起草,10 待提交, 20 已提交至依托单位,25 依托单位审核通过,请打印申请书,30 返回修改,40 未批准,50 批准", position = 7 )
private Integer talentState;
/** 人才申报完成状态 */
@ApiModelProperty(value = "人才申报完成状态")
private String talentStateName;
/** 项目完成状态 */
@ApiModelProperty(value = "项目完成状态")
......@@ -135,6 +142,9 @@ public class ComTalentApplyDTO extends BaseDTO {
/** 学位 */
@ApiModelProperty(value = "学位", position = 9)
private String degree;
/** 学位名称 */
@ApiModelProperty(value = "学位名称", position = 9)
private String degreeName;
/** 最高学位授予时间 */
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date degreeTime;
......@@ -148,9 +158,12 @@ public class ComTalentApplyDTO extends BaseDTO {
@ApiModelProperty(value = "党派", position = 9)
private String politicalParty;
/** 民族id */
@ApiModelProperty(value = "民族id", position = 11)
private String nation;
/** 民族 */
@ApiModelProperty(value = "民族", position = 11)
private String nation;
private String nationName;
/** 职务 */
@ApiModelProperty(value = "职务", position = 12)
private String duty;
......
......@@ -43,6 +43,12 @@ public class ComTalentBudgetDTO extends BaseDTO {
@ApiModelProperty(value = "第五年预算")
private BigDecimal yearValue5;
@ApiModelProperty(value = "合计", position = 7)
private BigDecimal amountFee;
@ApiModelProperty(value = "排序")
private Integer showIndex;
@ApiModelProperty(value = "是否为必填项", position = 8)
private Boolean isRequired;
}
\ No newline at end of file
......@@ -40,10 +40,10 @@ public class ComTalentMembersDTO extends BaseDTO {
private String specName;
@ApiModelProperty(value = "职务")
private String duty;
private String title;
@ApiModelProperty(value = "职务名称")
private String dutyName;
private String titleName;
@ApiModelProperty(value = "工作单位")
private String workUnit;
......
......@@ -42,4 +42,13 @@ public class ComTalentBudgetQueryVO extends PaginationVO {
@ApiModelProperty(value = "第五年预算")
private BigDecimal yearValue5;
@ApiModelProperty(value = "合计", position = 7)
private BigDecimal amountFee;
@ApiModelProperty(value = "排序")
private Integer showIndex;
@ApiModelProperty(value = "是否为必填项", position = 8)
private Boolean isRequired;
}
\ No newline at end of file
......@@ -37,7 +37,7 @@ public class ComTalentMembersQueryVO extends PaginationVO {
private String spec;
@ApiModelProperty(value = "职务")
private String duty;
private String title;
@ApiModelProperty(value = "工作单位")
private String workUnit;
......
......@@ -4,6 +4,7 @@ import com.yiboshi.arch.base.ResponseDataModel;
import com.yiboshi.science.base.Pagination;
import com.yiboshi.science.config.annotation.Logs;
import com.yiboshi.science.config.security.SecurityUserHolder;
import com.yiboshi.science.entity.ComProjectAudit;
import com.yiboshi.science.entity.ComTalentApply;
import com.yiboshi.science.enumeration.CommonEnum;
import com.yiboshi.science.param.dto.ComProjectDTO;
......@@ -11,6 +12,7 @@ import com.yiboshi.science.param.dto.ComTalentApplyDTO;
import com.yiboshi.science.param.dto.DataStatisticsDTO;
import com.yiboshi.science.param.query.ComTalentApplyQueryVO;
import com.yiboshi.science.rest.BaseController;
import com.yiboshi.science.service.ComProjectService;
import com.yiboshi.science.service.ComTalentApplyService;
import com.yiboshi.science.utils.StringUtil;
import io.swagger.annotations.Api;
......@@ -21,6 +23,9 @@ import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import static com.yiboshi.science.utils.StringUtil.hideAllIdCardNum;
import static com.yiboshi.science.utils.StringUtil.hideAllPhoneNum;
@Api(tags = "com-talent-apply", description = "项目表")
@RestController
@RequestMapping("/v1/science-admin/com-talent-apply")
......@@ -29,6 +34,9 @@ public class ComTalentApplyController extends BaseController<ComTalentApplyServi
@Autowired
private ComTalentApplyService comTalentApplyService;
@Autowired
private ComProjectService comProjectService;
@ApiOperation(value = "分页查询", httpMethod = "GET", notes = "根据参数获取列表")
@GetMapping
@RequestMapping(value = "/getListByPage")
......@@ -39,6 +47,15 @@ public class ComTalentApplyController extends BaseController<ComTalentApplyServi
}
Pagination<ComTalentApplyDTO> page = comTalentApplyService.getListByPage(vo);
if (null != page && null != page.getDataList() && page.getDataList().size() != 0) {
page.getDataList().forEach((e) -> {
e.setCertId(hideAllIdCardNum(e.getCertId()));
e.setMobile(hideAllPhoneNum(e.getMobile()));
//e.setCertId(AesHelper.encrypt(e.getCertId()));
if (null != e.getTalentState())
e.setTalentStateName(CommonEnum.talentState.getEnum(e.getTalentState()).getDescription());
});
}
return ResponseDataModel.ok(page);
}
......@@ -80,8 +97,29 @@ public class ComTalentApplyController extends BaseController<ComTalentApplyServi
@PostMapping
@RequestMapping("/save")
@PreAuthorize("hasAnyRole('REPORT','GOV','ADMIN')")
@Logs(value = CommonEnum.logType.talentApply)
@Logs(value = CommonEnum.logType.talentApplySave)
public ResponseDataModel<String> save(@RequestBody ComTalentApplyDTO comTalentApplyDTO, BindingResult bindingResult) {
return ResponseDataModel.ok(comTalentApplyService.save(comTalentApplyDTO));
}
/**
* @param id
* @return
*/
@ApiOperation(value = "删除", httpMethod = "DELETE", notes = "删除")
@DeleteMapping
@RequestMapping(value = "delete/{id}")
@Logs(value = CommonEnum.logType.talentApplyDelete)
public ResponseDataModel<String> delete(@PathVariable String id) {
return ResponseDataModel.ok(comTalentApplyService.delete(id));
}
@ApiOperation(value = "项目/任务书/中期考核表上报", httpMethod = "POST", notes = "项目/任务书/中期考核表上报")
@PostMapping
@RequestMapping("/report")
@Logs(value = CommonEnum.logType.talentApplyReport)
public ResponseDataModel<String> report(@Validated @RequestBody ComProjectAudit comProjectAudit) {
comProjectService.report(comProjectAudit, SecurityUserHolder.getUnitId(), SecurityUserHolder.getUnitCode());
return ResponseDataModel.ok("上报成功");
}
}
package com.yiboshi.science.rest.v1;
import com.yiboshi.arch.base.ResponseDataModel;
import com.yiboshi.science.entity.SystemParameter;
import com.yiboshi.science.entity.SystemSet;
import com.yiboshi.science.param.dto.SystemSetDTO;
import com.yiboshi.science.param.query.SystemSetQueryVO;
import com.yiboshi.science.rest.BaseController;
import com.yiboshi.science.service.SystemParameterService;
import com.yiboshi.science.service.SystemSetService;
import com.yiboshi.science.utils.SystemSetKey;
import io.swagger.annotations.Api;
......@@ -13,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -27,6 +30,10 @@ public class SystemSetController extends BaseController<SystemSetService,SystemS
@Autowired
private SystemSetService systemSetService;
@Autowired
private SystemParameterService systemParameterService;
@ApiOperation(value = "获取系统配置", httpMethod = "GET", notes = "获取系统配置")
@RequestMapping(value = "/getSystemSet")
@GetMapping
......@@ -47,4 +54,25 @@ public class SystemSetController extends BaseController<SystemSetService,SystemS
public ResponseDataModel<String> save(@RequestBody Map<String, Object> map) {
return ResponseDataModel.ok(systemSetService.save(map));
}
@ApiOperation(value = "获取系统配置", httpMethod = "GET", notes = "获取系统配置")
@RequestMapping(value = "/getTalentTraningInfo")
@GetMapping
public ResponseDataModel<Map<String, Object>> getTalentTraningInfo() {
List<SystemParameter> parameterList = systemParameterService.getListByType(21);
Map<String, Object> data = new HashMap<String, Object>(9) {
{
parameterList.forEach(e -> {
put(e.getCode(), e.getId());
});
put("ALTrainingYear", systemSetService.getByKey(SystemSetKey.SysALTrainingYear));
put("ALEveryYearFee", systemSetService.getByKey(SystemSetKey.SysALEveryYearFee));
put("HTTrainingYear", systemSetService.getByKey(SystemSetKey.SysHTTrainingYear));
put("HTEveryYearFee", systemSetService.getByKey(SystemSetKey.SysHTEveryYearFee));
put("RTTrainingYear", systemSetService.getByKey(SystemSetKey.SysRTTrainingYear));
put("RTEveryYearFee", systemSetService.getByKey(SystemSetKey.SysRTEveryYearFee));
}
};
return ResponseDataModel.ok(data);
}
}
\ No newline at end of file
......@@ -15,4 +15,10 @@ public interface ComPersonResumeService extends BaseService<ComPersonResumeQuery
void insertList(List<ComPersonResumeDTO> list, String PersonId, String TypeId);
List<ComPersonResumeDTO> getListByTalentId(String TalentId);
/** 删除对象列表
*
* @param objectId
*/
void deleteByObjectId(String objectId);
}
......@@ -15,4 +15,10 @@ public interface ComPersonScientificGainService extends BaseService<ComPersonSci
void insertList(List<ComPersonScientificGainDTO> list, String TalentId, String TypeId);
List<ComPersonScientificGainDTO> getListByTalentId(String TalentId);
/** 删除对象列表
*
* @param objectId
*/
void deleteByObjectId(String objectId);
}
......@@ -22,4 +22,11 @@ public interface ComTalentApplyService extends BaseService<ComTalentApplyQueryVO
ComTalentApplyDTO getNewTalentApply();
ComTalentApplyDTO getTalentApplyById(String id);
/**
* 删除人才申报信息
*
* @return
*/
String delete(String id);
}
......@@ -18,4 +18,10 @@ public interface ComTalentBudgetService extends BaseService<ComTalentBudgetQuery
List<ComTalentBudgetDTO> getListByTalentId(String talentId);
List<ComTalentBudgetDTO> getList();
/** 删除对象列表
*
* @param objectId
*/
void deleteByObjectId(String objectId);
}
......@@ -15,4 +15,10 @@ public interface ComTalentMembersService extends BaseService<ComTalentMembersQue
void insertList(List<ComTalentMembersDTO> list, String TalentId);
List<ComTalentMembersDTO> getListByTalentId(String talentId);
/** 删除对象列表
*
* @param objectId
*/
void deleteByObjectId(String objectId);
}
......@@ -53,4 +53,10 @@ public class ComPersonResumeServiceImpl extends BaseServiceImpl<ComPersonResumeD
public List<ComPersonResumeDTO> getListByTalentId(String TalentId) {
return comPersonResumeDAO.getListByTalentId(TalentId);
}
public void deleteByObjectId(String objectId) {
ComPersonResume e = new ComPersonResume();
e.setTalentId(objectId);
this.delete(e);
}
}
......@@ -53,4 +53,10 @@ public class ComPersonScientificGainServiceImpl extends BaseServiceImpl<ComPerso
public List<ComPersonScientificGainDTO> getListByTalentId(String TalentId) {
return comPersonScientificGainDAO.getListByTalentId(TalentId);
}
public void deleteByObjectId(String objectId) {
ComPersonScientificGain e = new ComPersonScientificGain();
e.setTalentId(objectId);
this.delete(e);
}
}
......@@ -7,6 +7,7 @@ import com.yiboshi.science.base.BaseServiceImpl;
import com.yiboshi.science.base.Pagination;
import com.yiboshi.science.config.security.SecurityUserHolder;
import com.yiboshi.science.dao.ComTalentApplyDAO;
import com.yiboshi.science.entity.ComProject;
import com.yiboshi.science.entity.ComTalentApply;
import com.yiboshi.science.entity.SystemParameter;
import com.yiboshi.science.enumeration.CommonEnum;
......@@ -18,8 +19,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
......@@ -77,27 +82,27 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
switch (vo.getTalentState()) {
case 1:
criteria.in("talent_state",
CommonEnum.projState.draft.getCode(),
CommonEnum.projState.waitSubmit.getCode());
CommonEnum.talentState.draft.getCode(),
CommonEnum.talentState.waitSubmit.getCode());
break;
case 2:
criteria.eq("talent_state", CommonEnum.projState.returnModify.getCode());
criteria.eq("talent_state", CommonEnum.talentState.returnModify.getCode());
break;
case 3:
criteria.in("talent_state",
CommonEnum.projState.toAudit.getCode(),
CommonEnum.projState.failed.getCode(),
CommonEnum.projState.pass.getCode(),
CommonEnum.projState.report.getCode(),
CommonEnum.projState.conclusion.getCode());
CommonEnum.talentState.toAudit.getCode(),
CommonEnum.talentState.failed.getCode(),
CommonEnum.talentState.pass.getCode(),
CommonEnum.talentState.report.getCode(),
CommonEnum.talentState.conclusion.getCode());
break;
case 4:
break;
case 5:
criteria.ge("talent_state", CommonEnum.projState.pass.getCode());
criteria.ge("talent_state", CommonEnum.talentState.pass.getCode());
break;
case 6:
criteria.ge("talent_state", CommonEnum.projState.report.getCode());
criteria.ge("talent_state", CommonEnum.talentState.report.getCode());
break;
default:
criteria.eq("talent_state", vo.getTalentState());
......@@ -127,15 +132,89 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
return comTalentApplyDAO.getCount(criteria);
}
private ComFileDTO configureFile(String FileExplain, int showIndex, Boolean isRequired, Boolean isTitle) {
ComFileDTO file = new ComFileDTO();
file.setFileType(CommonEnum.fileType.talentApply.getCode());
file.setFileExplain(FileExplain);
file.setShowIndex(showIndex);
file.setRequired(true);
file.setIsTitle(isTitle);
if (!isRequired.equals(null))
file.setIsRequired(isRequired);
else
file.setIsRequired(false);
return file;
}
private List<ComFileDTO> configureFileList() {
List<SystemParameter> parameterList = systemParameterService.getListByType(22);
List<ComFileDTO> fileList = new ArrayList<>();
parameterList.forEach(e -> {
Boolean isTitle = false;
if (e.getCode().equals("0"))
isTitle = true;
fileList.add(configureFile(e.getName(), e.getDisplayOrder(), e.getIsRequired(), isTitle));
});
return fileList;
}
public List<ComFileDTO> checkNecessaryAttachmentFile(List<ComFileDTO> fileList) {
List<SystemParameter> parameterList = systemParameterService.getListByType(22);
AtomicInteger allCount = new AtomicInteger(parameterList.size() + 1);
fileList.forEach(e -> {
AtomicInteger num = new AtomicInteger(1);
int i = num.get();
parameterList.forEach(p -> {
if (null != e.getFileExplain() && e.getFileExplain().equals(p.getName())) {
e.setShowIndex(p.getDisplayOrder());
e.setRequired(p.getIsRequired());
if (p.getCode().equals("0"))
e.setIsTitle(true);
else
e.setIsTitle(false);
num.incrementAndGet();
}
});
if (i == num.get()) {
e.setShowIndex(allCount.get());
e.setRequired(false);
allCount.incrementAndGet();
}
});
parameterList.forEach(p -> {
List<ComFileDTO> findList = fileList.stream().filter(e -> null != e.getFileExplain() && e.getFileExplain().equals(p.getName())).collect(Collectors.toList());
if (findList.size() == 0) {
Boolean isTitle = false;
if (p.getCode().equals("0"))
isTitle = true;
ComFileDTO fileDTO = configureFile(p.getName(), p.getDisplayOrder(), p.getIsRequired(), isTitle);
fileList.add(fileDTO);
}
});
fileList.sort(Comparator.comparingInt(ComFileDTO::getShowIndex));
return fileList;
}
public ComTalentApplyDTO getNewTalentApply() {
ComTalentApplyDTO dto = new ComTalentApplyDTO();
List<ComTalentBudgetDTO> bugetList = comTalentBudgetService.getList();
dto.setBudgetList(bugetList);
// 附件
List<ComFileDTO> fileList = configureFileList();
dto.setFileList(fileList);
dto.setApplyFund(new BigDecimal(0.00));
dto.setOtherFund(new BigDecimal(0.00));
dto.setTotalFund(new BigDecimal(0.00));
dto.setReportYear(comBatchService.getReportYear(null, CommonEnum.timeType.talentApply.getCode()));
dto.setCompleteStatus("0,0,0,0,0,0");
dto.setTalentState(CommonEnum.projState.draft.getCode());
dto.setTalentState(CommonEnum.talentState.draft.getCode());
dto.setAppPersonId(SecurityUserHolder.getPersonId());
dto.setAppUnitId(SecurityUserHolder.getUnitId());
......@@ -147,7 +226,7 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
if (null == dto)
throw new BusinessException("人才申报记录不存在或已删除!");
// 申报人
// 申报人
ComPersonDTO comPersonDTO = comPersonService.getPersonById(dto.getPersonId());
if (null != comPersonDTO) {
loadPersonInfo(dto, comPersonDTO);
......@@ -170,6 +249,21 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
List<ComPersonScientificGainDTO> scientificList = comPersonScientificGainService.getListByTalentId(dto.getId());
dto.setScientificList(scientificList);
//附件列表
List<ComFileDTO> fileList = comFileService.getListByObjectId(dto.getId(), CommonEnum.fileType.talentApply.getCode());
if (null == fileList || fileList.size() == 0)
fileList = configureFileList();
else
fileList = checkNecessaryAttachmentFile(fileList);
dto.setFileList(fileList);
if (Objects.isNull(dto.getApplyFund()))
dto.setApplyFund(new BigDecimal(0.00));
if (Objects.isNull(dto.getOtherFund()))
dto.setOtherFund(new BigDecimal(0.00));
if (Objects.isNull(dto.getTotalFund()))
dto.setTotalFund(new BigDecimal(0.00));
return dto;
}
......@@ -206,7 +300,7 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
case 2://申报人科研成绩
id = talentSaveStep2(dto);
break;
case 3://科学研究规划及团队人员名单
case 3://团队人员名单
id = talentSaveStep3(dto);
break;
case 4://经费预算及培养计划和目标
......@@ -282,6 +376,7 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
return dto.getId();
}
@Transactional
public String talentSaveStep4(ComTalentApplyDTO dto) {
ComTalentApply comTalentApply = convert2Entity(dto);
......@@ -317,4 +412,31 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
ComTalentApply apply = convert2Entity(dto);
return this.update(apply);
}
/**
* 删除人才申报信息
*
* @return
*/
public String delete(String id) {
ComTalentApply comTalentApply = this.entityById(id);
if (null == comTalentApply)
throw new BusinessException("人员申报信息不存在");
if (comTalentApply.getTalentState() > CommonEnum.talentState.waitSubmit.getCode())
throw new BusinessException("当前人员申报信息状态不能删除");
// 人员申报参加人员
comTalentMembersService.deleteByObjectId(id);
// 培养经费
comTalentBudgetService.deleteByObjectId(id);
// 人才简历
comPersonResumeService.deleteByObjectId(id);
// 申报人才科研学术成绩表
comPersonScientificGainService.deleteByObjectId(id);
// 附件
comFileService.deleteByObjectId(id);
this.deleteById(id);
return id;
}
}
......@@ -5,7 +5,6 @@ import com.yiboshi.science.base.BaseServiceImpl;
import com.yiboshi.science.dao.ComTalentBudgetDAO;
import com.yiboshi.science.entity.ComTalentBudget;
import com.yiboshi.science.entity.SystemParameter;
import com.yiboshi.science.param.dto.ComProjectBudgetDTO;
import com.yiboshi.science.param.dto.ComTalentBudgetDTO;
import com.yiboshi.science.param.query.ComTalentBudgetQueryVO;
import com.yiboshi.science.service.ComTalentBudgetService;
......@@ -17,7 +16,6 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* 申报人培养经费预算表 Service 实现类
......@@ -72,12 +70,24 @@ public class ComTalentBudgetServiceImpl extends BaseServiceImpl<ComTalentBudgetD
newVO.setYearValue3(new BigDecimal(0.00));
newVO.setYearValue4(new BigDecimal(0.00));
newVO.setYearValue5(new BigDecimal(0.00));
newVO.setAmountFee(new BigDecimal(0.00));
newVO.setBudgetName(p.getName());
newVO.setShowIndex(i);
newVO.setIsRequired(p.getIsRequired());
budgetList.add(newVO);
i++;
}
return budgetList;
}
/** 删除对象列表
*
* @param objectId
*/
public void deleteByObjectId(String objectId) {
ComTalentBudget e = new ComTalentBudget();
e.setTalentId(objectId);
this.delete(e);
}
}
......@@ -3,6 +3,7 @@ package com.yiboshi.science.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yiboshi.science.base.BaseServiceImpl;
import com.yiboshi.science.dao.ComTalentMembersDAO;
import com.yiboshi.science.entity.ComProjectMembers;
import com.yiboshi.science.entity.ComTalentMembers;
import com.yiboshi.science.param.dto.ComTalentMembersDTO;
import com.yiboshi.science.param.query.ComTalentMembersQueryVO;
......@@ -51,4 +52,10 @@ public class ComTalentMembersServiceImpl extends BaseServiceImpl<ComTalentMember
public List<ComTalentMembersDTO> getListByTalentId(String talentId) {
return comTalentMembersDAO.getListByTalentId(talentId);
}
public void deleteByObjectId(String objectId) {
ComTalentMembers e = new ComTalentMembers();
e.setTalentId(objectId);
this.delete(e);
}
}
......@@ -39,4 +39,16 @@ public class SystemSetKey {
/** 项目阶段实施内容及目标 */
public final static String taskCont6 = "Task.Cont6";
public final static String SysProjectType = "sys.projType";
/** 学科带头人培养年限 */
public final static String SysALTrainingYear = "sys.AcademicLeader.TrainingYear";
/** 学科带头人每年财政培养经费(单位:万元) */
public final static String SysALEveryYearFee = "sys.AcademicLeader.EveryYearFee";
/** 高端人才培养年限 */
public final static String SysHTTrainingYear = "sys.HighEndTalents.TrainingYear";
/** 高端人才每年财政培养经费(单位:万元) */
public final static String SysHTEveryYearFee = "sys.HighEndTalents.EveryYearFee";
/** 后备人才培养年限 */
public final static String SysRTTrainingYear = "sys.ReserveTalents.TrainingYear";
/** 后备人才每年财政培养经费(单位:万元) */
public final static String SysRTEveryYearFee = "sys.ReserveTalents.EveryYearFee";
}
......@@ -35,13 +35,16 @@
</select>
<select id="getById" parameterType="java.lang.String" resultType="com.yiboshi.science.param.dto.ComTalentApplyDTO">
SELECT a.*,b.cert_id,b.person_name,b.sex,b.birthday,b.title,b.spec,b.mobile,
i.name as title_name, j.name as spec_name, k.name as parent_name
SELECT a.*,b.cert_id,b.person_name,b.sex,b.birthday,b.title,b.spec,b.mobile,i.name as title_name, j.name as spec_name,
k.name as parent_name,l.name as talent_category_name, n.name as nation_name, m.name as degree_name
from com_talent_apply a
left join com_person b on a.person_id = b.id
left join system_parameter i on b.title=i.id and i.type_id=7
left join system_parameter j on b.spec=j.id and j.type_id=68
left join system_parameter i on b.title = i.id and i.type_id = 7
left join system_parameter j on b.spec = j.id and j.type_id = 68
left join system_parameter k on j.parent_id = k.id
left join system_parameter l on a.talent_category = l.id and l.type_id = 21
left join system_parameter n on b.nation = n.id and n.type_id = 11
left join system_parameter m on b.degree = m.id and m.type_id = 9
where a.id = #{id}
</select>
</mapper>
\ No newline at end of file
......@@ -46,9 +46,9 @@
</select>
<select id="getListByTalentId" parameterType="java.lang.String" resultType="com.yiboshi.science.param.dto.ComTalentMembersDTO">
SELECT a.*,d.name duty_name,f.name spec_name
SELECT a.*,d.name title_name,f.name spec_name
FROM com_talent_members a
left join system_parameter d on a.duty = d.id and d.type_id = 62
left join system_parameter d on a.title = d.id and d.type_id = 7
left join system_parameter f on a.spec = f.id and f.type_id = 68
where talent_id=#{talentId}
order by a.show_index asc
......
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