Commit c5fbafdb authored by 徐俊's avatar 徐俊

xujun

parent fbb8b832
......@@ -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 */
......
......@@ -635,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;
......@@ -732,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;
......
......@@ -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;
......@@ -32,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")
......@@ -92,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>(6) {
{
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;
......@@ -225,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);
......@@ -375,6 +376,7 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
return dto.getId();
}
@Transactional
public String talentSaveStep4(ComTalentApplyDTO dto) {
ComTalentApply comTalentApply = convert2Entity(dto);
......@@ -410,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 实现类
......@@ -82,4 +80,14 @@ public class ComTalentBudgetServiceImpl extends BaseServiceImpl<ComTalentBudgetD
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";
}
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