Commit 6afc8acf authored by wangxl's avatar wangxl

1

parent a2c1f5f1
......@@ -187,7 +187,7 @@ bin/
/science-admin/target/classes/com/yiboshi/science/enumeration/CommonEnum$loginState.class
/science-admin/target/classes/com/yiboshi/science/enumeration/CommonEnum$personState.class
/science-admin/target/classes/com/yiboshi/science/enumeration/CommonEnum$projState.class
/science-admin/target/classes/com/yiboshi/science/enumeration/CommonEnum$projType.class
/science-admin/target/classes/com/yiboshi/science/enumeration/CommonEnum$systemType.class
/science-admin/target/classes/com/yiboshi/science/enumeration/CommonEnum$systemRole.class
/science-admin/target/classes/com/yiboshi/science/enumeration/CommonEnum$taskState.class
/science-admin/target/classes/com/yiboshi/science/enumeration/CommonEnum$thesisState.class
......
......@@ -134,8 +134,8 @@ public class SecurityUserHolder {
public static int projectType() {
if (null != getAuthType() && getAuthType().equals("2"))
return CommonEnum.projType.key.getCode();
return CommonEnum.systemType.key.getCode();
else
return CommonEnum.projType.num.getCode();
return CommonEnum.systemType.num.getCode();
}
}
......@@ -17,7 +17,7 @@ public class loginUser implements Serializable {
/** 申报类型 1 申报科研项目 2申报重点学科项目 3 同时申报*/
private String type;
/** 项目类型 1 申报科研项目 2申报重点学科项目 */
private String projType;
private String systemType;
/** 信息是否完整 */
private boolean complete;
/** 信息是否完整 */
......
......@@ -13,5 +13,5 @@ import com.yiboshi.science.param.query.ComBatchQueryVO;
* @version 2021-08-26
*/
public interface ComBatchDAO extends BaseMapper<ComBatch>, BaseDAO<ComBatchQueryVO,ComBatchDTO,ComBatch> {
ComBatchDTO getCurrentBatch(Integer projType,Integer timeType);
ComBatchDTO getCurrentBatch(Integer systemType,Integer timeType);
}
......@@ -35,7 +35,7 @@ public interface ComProjectAuditDAO extends BaseMapper<ComProjectAudit>, BaseDAO
DataStatisticsDTO getTalentAuditCount(@Param("ew") Wrapper<ComProject> queryWrapper);
DataStatisticsDTO getFirstAuditPassCount(@Param("ew") Wrapper<ComProject> queryWrapper);
DataStatisticsDTO getCountByDay(@Param("ew") Wrapper<ComProject> queryWrapper);
DataStatisticsDTO getAssignPersonCount(Integer assignYear, Integer projType);
DataStatisticsDTO getAssignPersonCount(Integer assignYear, Integer systemType);
List<DataStatisticsDTO> getTreeCodeProjectCount(@Param("ew") Wrapper<ComProject> queryWrapper,String treeCode);
List<DataStatisticsDTO> getKnowledgeCount(@Param("ew") Wrapper<ComProject> queryWrapper);
List<KnowledgeStatisticsDTO> getKnowledgeStatistic(@Param("ew") Wrapper<ComProjectAuditQueryVO> queryWrapper);
......
......@@ -22,7 +22,7 @@ public class ComBatch extends BaseEntity {
/** 时间类型 1项目申报 2任务书上报 3中期考核 */
private Integer timeType;
/** 批次类型 1科研项目申报 2重点学科申报 */
private Integer projType;
private Integer systemType;
/** 申报开始时间 */
private Date reportStart;
/** 申报结束时间 */
......
......@@ -63,7 +63,7 @@ public class ComProject extends BaseEntity {
private Integer projState;
/** 项目类型 1 科研项目 2重点学科项目 */
@ApiModelProperty(value = "项目名称", position = 1 )
private Integer projType;
private Integer systemType;
/** 项目类别 (1 一般项目 2重点项目)*/
@ApiModelProperty(value = "项目类别 (1 一般项目 2重点项目)", position = 3 )
private Integer projClass;
......
......@@ -92,11 +92,11 @@ public class CommonEnum {
}
}
public enum projType implements INumberEnum {
public enum systemType implements INumberEnum {
num(1, "卫生健康领域科技计划项目"),
key(2, "公立医院高水平临床专科建设科技项目");
projType(int number, String description) {
systemType(int number, String description) {
this.code = number;
this.description = description;
}
......@@ -114,12 +114,12 @@ public class CommonEnum {
return description;
}
public static projType getEnum(Integer value) {
for (projType e : projType.values()) {
public static systemType getEnum(Integer value) {
for (systemType e : systemType.values()) {
if (e.getCode().equals(value))
return e;
}
return projType.num;//For values out of enum scope
return systemType.num;//For values out of enum scope
}
}
......
......@@ -27,7 +27,7 @@ public class ComBatchDTO extends BaseDTO {
/** 时间类型 1项目申报 2任务书上报 3中期考核 */
private Integer timeType;
/** 批次类型 1科研项目申报 2重点学科申报 */
private Integer projType;
private Integer systemType;
/** 申报开始时间 */
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date reportStart;
......
......@@ -173,7 +173,7 @@ public class ComProjectAssignDTO extends BaseDTO {
private String appNo;
/** 项目类型 1 科研项目 2重点学科项目 */
@ApiModelProperty(value = "项目名称", position = 1 )
private Integer projType;
private Integer systemType;
/** 项目类别 1 一般项目 2重点项目 */
@ApiModelProperty(value = "项目类别", position = 1 )
private Integer projClass;
......
......@@ -101,7 +101,7 @@ public class ComProjectAuditDTO extends BaseDTO {
private String projClass;
/** 项目类型 1 科研项目 2重点学科项目 */
@ApiModelProperty(value = "项目名称", position = 1 )
private Integer projType;
private Integer systemType;
/** 项目类别 */
@ApiModelProperty(value = "项目类别", position = 3)
private String projClassName;
......
......@@ -57,7 +57,7 @@ public class ComProjectDTO extends BaseDTO {
private Integer projState;
/** 项目类型 1 科研项目 2重点学科项目 */
@ApiModelProperty(value = "项目名称", position = 1 )
private Integer projType;
private Integer systemType;
/** 项目类别 (1 一般项目 2重点项目)*/
@ApiModelProperty(value = "项目类别 (1 一般项目 2重点项目)", position = 3 )
private Integer projClass;
......
......@@ -149,7 +149,7 @@ public class ComProjectTaskDTO extends BaseDTO {
private String projNo;
/** 项目类型 */
@ApiModelProperty(value = "项目类型", position = 3 )
private Integer projType;
private Integer systemType;
/** 项目开始时间 */
@ApiModelProperty(value = "项目开始时间", position = 10 )
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
......
......@@ -26,7 +26,7 @@ public class ComBatchQueryVO extends PaginationVO{
/** 时间类型 1项目申报 2任务书上报 3中期考核 */
private Integer timeType;
/** 批次类型 1科研项目申报 2重点学科申报 */
private Integer projType;
private Integer systemType;
/** 申报开始时间 */
private Date reportStart;
/** 申报结束时间 */
......
......@@ -141,7 +141,7 @@ public class ComProjectAssignQueryVO extends PaginationVO {
private String projNo;
/** 项目类型 1 科研项目 2重点学科项目 */
@ApiModelProperty(value = "项目名称", position = 1 )
private Integer projType;
private Integer systemType;
/** 姓名 */
@ExcelProperty("姓名")
@ApiModelProperty(value = "姓名", position = 3)
......
......@@ -75,7 +75,7 @@ public class ComProjectAuditQueryVO extends PaginationVO{
private String projClass;
/** 项目类型 1 科研项目 2重点学科项目 */
@ApiModelProperty(value = "项目名称", position = 1 )
private Integer projType;
private Integer systemType;
/** 二级学科Id */
@ApiModelProperty(value = "二级学科Id", position = 4)
private String knowledgeParentId;
......
......@@ -63,7 +63,7 @@ public class ComProjectQueryVO extends PaginationVO{
private Integer projState;
/** 项目类型 1 科研项目 2重点学科项目 */
@ApiModelProperty(value = "项目名称", position = 1 )
private Integer projType;
private Integer systemType;
/** 项目类别 (1 一般项目 2重点项目)*/
@ApiModelProperty(value = "项目类别 (1 一般项目 2重点项目)", position = 3 )
private Integer projClass;
......
......@@ -145,7 +145,7 @@ public class ComProjectTaskQueryVO extends PaginationVO{
private String projNo;
/** 项目类型 */
@ApiModelProperty(value = "项目类型", position = 3 )
private Integer projType;
private Integer systemType;
/** 项目开始时间 */
@ApiModelProperty(value = "项目开始时间", position = 10 )
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
......
......@@ -172,7 +172,7 @@ public class AuthorizationController {
StringUtil.copyObj2Obj(SecurityUserHolder.getCurrentUser(), user);
user.setType(systemSetService.getByKey(SystemSetKey.SysProjectType));
if(!user.getType().equals("3")){
user.setProjType(systemSetService.getByKey(SystemSetKey.SysProjectType));
user.setSystemType(systemSetService.getByKey(SystemSetKey.SysProjectType));
}
if (SecurityUserHolder.getRoles().contains(CommonEnum.systemRole.personal.getCode().toString())) {
ComPerson person = comPersonService.getById(SecurityUserHolder.getPersonId());
......
......@@ -73,8 +73,8 @@ public class ComBatchController extends BaseController<ComBatchService, ComBatch
@ApiOperation(value = "获取当前申报或审核时间", httpMethod = "GET", notes = "获取当前申报或审核时间")
@GetMapping
@RequestMapping("/getCurrentYearBatch")
public ResponseDataModel<ComBatchDTO> getCurrentYearBatch(int type, Integer projType, Integer timeType) {
return ResponseDataModel.ok(comBatchService.getCurrentYearBatch(type, projType, timeType));
public ResponseDataModel<ComBatchDTO> getCurrentYearBatch(int type, Integer systemType, Integer timeType) {
return ResponseDataModel.ok(comBatchService.getCurrentYearBatch(type, systemType, timeType));
}
/**
......@@ -83,8 +83,8 @@ public class ComBatchController extends BaseController<ComBatchService, ComBatch
@ApiOperation(value = "获取申报年度下拉列表", httpMethod = "GET", notes = "获取申报年度下拉列表")
@GetMapping
@RequestMapping("/getCurrentReportYearList")
public ResponseDataModel<Map<String, Object>> getCurrentReportYearList(Integer projType) {
ComBatchDTO comBatchDTO = comBatchService.getCurrentBatch(projType, null);
public ResponseDataModel<Map<String, Object>> getCurrentReportYearList(Integer systemType) {
ComBatchDTO comBatchDTO = comBatchService.getCurrentBatch(systemType, null);
Integer year = (null != comBatchDTO && Objects.nonNull(comBatchDTO.getYear())) ? comBatchDTO.getYear() : Calendar.getInstance().get(Calendar.YEAR);
List<SelectListItem> list = new ArrayList<>();
for (Integer i = year; i > year - 10; i--) {
......
......@@ -253,7 +253,7 @@ public class ComProjectAuditController extends BaseController<ComProjectAuditSer
@RequestMapping("/getAssignProjectListByPage")
public ResponseDataModel<Pagination<ComProjectAuditDTO>> getAssignProjectListByPage(@Validated ComProjectAuditQueryVO vo, BindingResult bindingResult) {
vo.setAuditUnitId(SecurityUserHolder.getUnitId());
vo.setProjType(SecurityUserHolder.projectType());
vo.setSystemType(SecurityUserHolder.projectType());
vo.setAuditType(1);
vo.setAuditMethod(CommonEnum.auditMethod.last.getCode());
return ResponseDataModel.ok(comProjectAuditService.getAuditListByPage(vo));
......@@ -265,7 +265,7 @@ public class ComProjectAuditController extends BaseController<ComProjectAuditSer
public ResponseDataModel<Pagination<ComProjectAuditDTO>> getUnAssignProjectListByPage(@Validated ComProjectAuditQueryVO vo, BindingResult bindingResult) {
vo.setAuditUnitId(SecurityUserHolder.getUnitId());
vo.setKnowledgeId(null);
//vo.setProjType(SecurityUserHolder.projectType());
//vo.setSystemType(SecurityUserHolder.projectType());
vo.setAuditType(1);
vo.setAuditMethod(CommonEnum.auditMethod.last.getCode());
return ResponseDataModel.ok(comProjectAuditService.getUnAssignProjectListByPage(vo));
......
......@@ -103,8 +103,8 @@ public class ComProjectController extends BaseController<ComProjectService, ComP
@ApiOperation(value = "创建基础项目信息", httpMethod = "GET", notes = "创建基础项目信息")
@GetMapping
@RequestMapping("/getNewProject")
public ResponseDataModel<ComProjectDTO> getNewProject(Integer projType) {
return ResponseDataModel.ok(comProjectService.getNewProject(projType));
public ResponseDataModel<ComProjectDTO> getNewProject(Integer systemType) {
return ResponseDataModel.ok(comProjectService.getNewProject(systemType));
}
/**
......
......@@ -82,14 +82,14 @@ public class ComProjectGroupController extends BaseController<ComProjectGroupSer
@ApiOperation(value = "项目组专家分配", httpMethod = "GET", notes = "项目组专家分配")
@GetMapping
@RequestMapping("/assignProjectGroup")
public ResponseDataModel<String> assignProjectGroup(@RequestParam int projType, @RequestParam String groupIds, @RequestParam String expertIds) {
public ResponseDataModel<String> assignProjectGroup(@RequestParam int systemType, @RequestParam String groupIds, @RequestParam String expertIds) {
String[] split = groupIds.split(",");
List<String> GroupList = Arrays.asList(split);
split = expertIds.split(",");
List<String> ExpertList = Arrays.asList(split);
return ResponseDataModel.ok(comProjectGroupService.assignProjectGroup(projType, GroupList, ExpertList));
return ResponseDataModel.ok(comProjectGroupService.assignProjectGroup(systemType, GroupList, ExpertList));
}
@ApiOperation(value = "删除分配项目组专家及项目专家关系", httpMethod = "DELETE", notes = "删除分配项目组专家及项目专家关系")
......
......@@ -106,9 +106,9 @@ public class StatisticalController {
@GetMapping
@RequestMapping("/getAssignPersonCount")
@PreAuthorize("hasAnyRole('GOV')")
public ResponseDataModel<DataStatisticsDTO> getAssignPersonCount(Integer projType) {
Integer assignYear = comBatchService.getReportYear(projType, null);
return ResponseDataModel.ok(comProjectAuditService.getAssignPersonCount(assignYear, projType));
public ResponseDataModel<DataStatisticsDTO> getAssignPersonCount(Integer systemType) {
Integer assignYear = comBatchService.getReportYear(systemType, null);
return ResponseDataModel.ok(comProjectAuditService.getAssignPersonCount(assignYear, systemType));
}
/**
......@@ -172,8 +172,8 @@ public class StatisticalController {
@PreAuthorize("hasAnyRole('GOV','UNIT')")
public ResponseDataModel<List<DataStatisticsDTO>> getTreeCodeProjectCount(ComProjectAuditQueryVO v) {
v.setAuditUnitId(SecurityUserHolder.getUnitId());
if(Objects.nonNull(v.getProjType())){
if(v.getProjType().equals(CommonEnum.projType.key.getCode()))
if(Objects.nonNull(v.getSystemType())){
if(v.getSystemType().equals(CommonEnum.systemType.key.getCode()))
v.setAuditMethod(CommonEnum.auditMethod.audit.getCode());
else
v.setAuditMethod(CommonEnum.auditMethod.last.getCode());
......@@ -190,8 +190,8 @@ public class StatisticalController {
@PreAuthorize("hasAnyRole('GOV','UNIT')")
public ResponseDataModel<List<DataStatisticsDTO>> getKnowledgeCount(ComProjectAuditQueryVO v) {
v.setAuditUnitId(SecurityUserHolder.getUnitId());
if(Objects.nonNull(v.getProjType())){
if(v.getProjType().equals(CommonEnum.projType.key.getCode()))
if(Objects.nonNull(v.getSystemType())){
if(v.getSystemType().equals(CommonEnum.systemType.key.getCode()))
v.setAuditMethod(CommonEnum.auditMethod.audit.getCode());
else
v.setAuditMethod(CommonEnum.auditMethod.last.getCode());
......@@ -211,8 +211,8 @@ public class StatisticalController {
@PreAuthorize("hasAnyRole('GOV')")
public ResponseDataModel<List<KnowledgeStatisticsDTO>> getKnowledgeStatistic(ComProjectAuditQueryVO v) {
v.setAuditUnitId(SecurityUserHolder.getUnitId());
if (Objects.nonNull(v.getProjType())) {
if (v.getProjType().equals(CommonEnum.projType.key.getCode()))
if (Objects.nonNull(v.getSystemType())) {
if (v.getSystemType().equals(CommonEnum.systemType.key.getCode()))
v.setAuditMethod(CommonEnum.auditMethod.audit.getCode());
else
v.setAuditMethod(CommonEnum.auditMethod.last.getCode());
......@@ -227,8 +227,8 @@ public class StatisticalController {
@PreAuthorize("hasAnyRole('GOV')")
public ResponseDataModel<List<KnowledgeStatisticsDTO>> getKnowledgeSelectedList(ComProjectAuditQueryVO v) {
v.setAuditUnitId(SecurityUserHolder.getUnitId());
if (Objects.nonNull(v.getProjType())) {
if (v.getProjType().equals(CommonEnum.projType.key.getCode()))
if (Objects.nonNull(v.getSystemType())) {
if (v.getSystemType().equals(CommonEnum.systemType.key.getCode()))
v.setAuditMethod(CommonEnum.auditMethod.audit.getCode());
else
v.setAuditMethod(CommonEnum.auditMethod.last.getCode());
......@@ -243,7 +243,7 @@ public class StatisticalController {
@PreAuthorize("hasAnyRole('GOV')")
public ResponseDataModel<List<projectExpertGroupStatisticDTO>> getProjectExpertGroupStatistic(ComProjectAuditQueryVO vo) {
vo.setAuditUnitId(SecurityUserHolder.getUnitId());
vo.setProjType(SecurityUserHolder.projectType());
vo.setSystemType(SecurityUserHolder.projectType());
vo.setAuditType(1);
vo.setAuditMethod(CommonEnum.auditMethod.last.getCode());
return ResponseDataModel.ok(comProjectAuditService.getProjectExpertGroupStatistic(vo));
......
......@@ -42,7 +42,7 @@ public class SystemSetController extends BaseController<SystemSetService,SystemS
{
put("SMSApiUrl", systemSetService.getByKey(SystemSetKey.SMSApiUrl));
put("loginType", systemSetService.getByKey(SystemSetKey.LoginType));
put("projType", systemSetService.getByKey(SystemSetKey.SysProjectType));
put("systemType", systemSetService.getByKey(SystemSetKey.SysProjectType));
}
};
return ResponseDataModel.ok(data);
......
......@@ -45,22 +45,22 @@ public interface ComBatchService extends BaseService<ComBatchQueryVO, ComBatchDT
* 获取当前项目申报批次
*
* @param type
* @param projType
* @param systemType
*/
ComBatchDTO getCurrentYearBatch(int type,Integer projType,Integer timeType);
ComBatchDTO getCurrentYearBatch(int type,Integer systemType,Integer timeType);
/**
* 获取当前申报批次
*
* @param timeType
* @param projType
* @param systemType
*/
ComBatchDTO getCurrentBatch(Integer projType,Integer timeType);
ComBatchDTO getCurrentBatch(Integer systemType,Integer timeType);
/**
* 获取当前申报年度
*
* @param projType
* @param systemType
*/
Integer getReportYear(Integer projType, Integer timeType);
Integer getReportYear(Integer systemType, Integer timeType);
/**
* 获取当前人才申报批次
......
......@@ -131,10 +131,10 @@ public interface ComProjectAuditService extends BaseService<ComProjectAuditQuery
/**
* 科研项目分配人次
* @param assignYear
* @param projType
* @param systemType
* @return
*/
DataStatisticsDTO getAssignPersonCount(Integer assignYear, Integer projType);
DataStatisticsDTO getAssignPersonCount(Integer assignYear, Integer systemType);
/**
* 获取统计数据
*
......
......@@ -29,7 +29,7 @@ public interface ComProjectGroupService extends BaseService<ComProjectGroupQuery
void CalculateGroupExpertCount(String groupId);
String assignProjectGroup(int projType, List<String> GroupList, List<String> ExpertList);
String assignProjectGroup(int systemType, List<String> GroupList, List<String> ExpertList);
String deleteAssignGroupExpert(String id);
......
......@@ -64,7 +64,7 @@ public interface ComProjectService extends BaseService<ComProjectQueryVO, ComPro
/**
* 创建基础项目信息
*/
ComProjectDTO getNewProject(Integer projType);
ComProjectDTO getNewProject(Integer systemType);
/**
* 项目/任务书/中期考核上报
......
......@@ -50,8 +50,8 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
if (Objects.nonNull(vo.getTimeType())) {
criteria.eq("time_type", vo.getTimeType());
}
if (Objects.nonNull(vo.getProjType())) {
criteria.eq("proj_type", vo.getProjType());
if (Objects.nonNull(vo.getSystemType())) {
criteria.eq("system_type", vo.getSystemType());
}
if (Objects.nonNull(vo.getReportStart())) {
criteria.eq("report_start", vo.getReportStart());
......@@ -91,7 +91,7 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
ComBatch batch = new ComBatch();
batch.setYear(dto.getYear());
batch.setBatch(dto.getBatch());
batch.setProjType(dto.getProjType());
batch.setSystemType(dto.getSystemType());
batch.setTimeType(dto.getTimeType());
batch = this.getEntity(batch);
if (null != batch)
......@@ -108,7 +108,7 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
ComBatch comBatch = new ComBatch();
batch.setYear(dto.getYear());
batch.setBatch(dto.getBatch());
batch.setProjType(dto.getProjType());
batch.setSystemType(dto.getSystemType());
batch.setTimeType(dto.getTimeType());
comBatch = this.getEntity(comBatch);
if (null != comBatch)
......@@ -140,12 +140,12 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
* 获取当前申报或审核时间
*
* @param type 1:项目申报时间 2:州市级及以下单位上报时间 3:州市级行政单位审核时间 4:省直单位上报时间 5:专家评审时间
* @param projType 1.科研项目申报 2.重点项目申报
* @param systemType 1.科研项目申报 2.重点项目申报
* @param timeType 1.项目申报 2.任务书上报 3.中期考核 4.人才申报
* @return
*/
public ComBatchDTO getCurrentYearBatch(int type, Integer projType, Integer timeType) {
ComBatchDTO comBatch = this.getCurrentBatch(projType, timeType);
public ComBatchDTO getCurrentYearBatch(int type, Integer systemType, Integer timeType) {
ComBatchDTO comBatch = this.getCurrentBatch(systemType, timeType);
Date date = new Date();// 获取当前时间
boolean flag = false;
if (null != comBatch) {
......@@ -177,18 +177,18 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
return comBatch;
}
public Integer getReportYear(Integer projType, Integer timeType) {
ComBatchDTO comBatch = this.getCurrentBatch(projType, timeType);
public Integer getReportYear(Integer systemType, Integer timeType) {
ComBatchDTO comBatch = this.getCurrentBatch(systemType, timeType);
if (null != comBatch)
return comBatch.getYear();
else
return 0;
}
public ComBatchDTO getCurrentBatch(Integer projType, Integer timeType) {
public ComBatchDTO getCurrentBatch(Integer systemType, Integer timeType) {
if (Objects.isNull(timeType))
timeType = 1;
return comBatchDAO.getCurrentBatch(projType, timeType);
return comBatchDAO.getCurrentBatch(systemType, timeType);
}
private String judgementDateTimeStr(Date currentDate, Date startDate, Date endDate, int Batch, Integer year) {
......
......@@ -72,8 +72,8 @@ public class ComProjectAssignServiceImpl extends BaseServiceImpl<ComProjectAssig
if (Objects.nonNull(vo.getProjName())) {
criteria.like("f.proj_name", vo.getProjName());
}
if (Objects.nonNull(vo.getProjType())) {
criteria.eq("f.proj_type", vo.getProjType());
if (Objects.nonNull(vo.getSystemType())) {
criteria.eq("f.system_type", vo.getSystemType());
}
if (Objects.nonNull(vo.getProjNo())) {
criteria.like("f.proj_no", vo.getProjNo());
......@@ -106,15 +106,15 @@ public class ComProjectAssignServiceImpl extends BaseServiceImpl<ComProjectAssig
throw new BusinessException("参数错误");
if (!map.containsKey("projects"))
throw new BusinessException("参数错误");
if (!map.containsKey("projType"))
if (!map.containsKey("systemType"))
throw new BusinessException("参数错误");
Integer projType = CommonEnum.projType.num.getCode();
if (map.containsKey("projType")) {
projType = (int) map.get("projType");
Integer systemType = CommonEnum.systemType.num.getCode();
if (map.containsKey("systemType")) {
systemType = (int) map.get("systemType");
}
experts = (List<String>) map.get("experts");
projects = (List<String>) map.get("projects");
Integer reportYear = comBatchService.getReportYear(projType, null);
Integer reportYear = comBatchService.getReportYear(systemType, null);
if (null == projects || projects.size() == 0 || null == experts || experts.size() == 0)
throw new BusinessException("参数错误");
return this.assignProject(reportYear, projects, experts);
......
......@@ -78,8 +78,8 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
if (Objects.nonNull(vo.getProjNo())) {
criteria.like("proj_no", vo.getProjNo());
}
if (Objects.nonNull(vo.getProjType())) {
criteria.eq("proj_type", vo.getProjType());
if (Objects.nonNull(vo.getSystemType())) {
criteria.eq("system_type", vo.getSystemType());
}
if (Objects.nonNull(vo.getProjClass())) {
criteria.eq("proj_class", vo.getProjClass());
......@@ -499,8 +499,8 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
return comProjectAuditDAO.getFirstAuditPassCount(criteria);
}
public DataStatisticsDTO getAssignPersonCount(Integer assignYear, Integer projType) {
DataStatisticsDTO dto = comProjectAuditDAO.getAssignPersonCount(assignYear, projType);
public DataStatisticsDTO getAssignPersonCount(Integer assignYear, Integer systemType) {
DataStatisticsDTO dto = comProjectAuditDAO.getAssignPersonCount(assignYear, systemType);
return dto;
}
......
......@@ -283,7 +283,7 @@ public class ComProjectGroupServiceImpl extends BaseServiceImpl<ComProjectGroupD
}
@Transactional
public String assignProjectGroup(int projType, List<String> GroupList, List<String> ExpertList) {
public String assignProjectGroup(int systemType, List<String> GroupList, List<String> ExpertList) {
GroupList.forEach(g -> {
ExpertList.forEach(e -> {
ComProjectGroupAssign entity = new ComProjectGroupAssign();
......@@ -299,7 +299,7 @@ public class ComProjectGroupServiceImpl extends BaseServiceImpl<ComProjectGroupD
});
List<ComProjectGroupDetailDTO> ProjectInfoList = comProjectGroupDetailService.getProjectListByGroupIds(GroupList);
Integer reportYear = comBatchService.getReportYear(projType, null);
Integer reportYear = comBatchService.getReportYear(systemType, null);
List<String> ProjectList = new ArrayList<>();
ProjectInfoList.forEach(p -> {
ProjectList.add(p.getProjId());
......
......@@ -182,8 +182,8 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
if (Objects.nonNull(vo.getProjBasis())) {
criteria.eq("proj_basis", vo.getProjBasis());
}
if (Objects.nonNull(vo.getProjType())) {
criteria.eq("proj_type", vo.getProjType());
if (Objects.nonNull(vo.getSystemType())) {
criteria.eq("system_type", vo.getSystemType());
}
if (Objects.nonNull(vo.getResearchContent())) {
criteria.eq("research_content", vo.getResearchContent());
......@@ -244,12 +244,12 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
/**
* 根据id获取项目信息
*/
public ComProjectDTO getNewProject(Integer projType) {
public ComProjectDTO getNewProject(Integer systemType) {
ComProjectDTO dto = new ComProjectDTO();
if (Objects.isNull(projType)) {
projType = CommonEnum.projType.num.getCode();
if (Objects.isNull(systemType)) {
systemType = CommonEnum.systemType.num.getCode();
}
dto.setProjType(projType);
dto.setSystemType(systemType);
//申报单位
ComUnitDTO comUnitDTO = comUnitService.getUnitById(SecurityUserHolder.getUnitId());
if (null != comUnitDTO) {
......@@ -296,10 +296,10 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
NewProjectKPIInfo(dto);
// 附件
List<ComFileDTO> fileList = configureFileList(projType);
List<ComFileDTO> fileList = configureFileList(systemType);
dto.setFileList(fileList);
dto.setReportYear(comBatchService.getReportYear(projType, CommonEnum.timeType.projApply.getCode()));
dto.setReportYear(comBatchService.getReportYear(systemType, CommonEnum.timeType.projApply.getCode()));
dto.setProjState(CommonEnum.projState.draft.getCode());
dto.setAppPersonId(SecurityUserHolder.getPersonId());
dto.setAppUnitId(SecurityUserHolder.getUnitId());
......@@ -444,9 +444,9 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
//附件列表
List<ComFileDTO> fileList = ComFileService.getListByObjectId(dto.getId(), CommonEnum.fileType.project.getCode());
if (null == fileList || fileList.size() == 0)
fileList = configureFileList(dto.getProjType());
fileList = configureFileList(dto.getSystemType());
else
fileList = checkNecessaryAttachmentFile(dto.getProjType(), fileList);
fileList = checkNecessaryAttachmentFile(dto.getSystemType(), fileList);
dto.setFileList(fileList);
//审核记录列表
......@@ -517,11 +517,11 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
dto.setProjectKPI(kpiDTO);
}
private List<ComFileDTO> configureFileList(Integer projType) {
private List<ComFileDTO> configureFileList(Integer systemType) {
List<ComFileDTO> fileList = new ArrayList<>();
List<SystemParameter> parameterList;
//健康领域科技项目
if (projType == CommonEnum.projType.num.getCode())
if (systemType == CommonEnum.systemType.num.getCode())
parameterList = systemParameterService.getListByType(61);
else//临床科技项目
parameterList = systemParameterService.getListByType(13);
......@@ -544,10 +544,10 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
return file;
}
public List<ComFileDTO> checkNecessaryAttachmentFile(Integer projType, List<ComFileDTO> fileList) {
public List<ComFileDTO> checkNecessaryAttachmentFile(Integer systemType, List<ComFileDTO> fileList) {
List<SystemParameter> parameterList;
//健康领域科技项目
if (projType == CommonEnum.projType.num.getCode())
if (systemType == CommonEnum.systemType.num.getCode())
parameterList = systemParameterService.getListByType(61);
else//临床科技项目
parameterList = systemParameterService.getListByType(13);
......@@ -912,7 +912,7 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
}
private String InsertProjectBaseInfo(ComProjectDTO dto) {
ComBatchDTO comBatchDTO = comBatchService.getCurrentBatch(dto.getProjType(), null);
ComBatchDTO comBatchDTO = comBatchService.getCurrentBatch(dto.getSystemType(), null);
ComProject comProject = convert2Entity(dto);
comProject.setAppNo(getAppNo());
comProject.setReportYear(comBatchDTO.getYear());
......@@ -1113,7 +1113,7 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
// comProject.setReportYear(e.getReportYear());
//
// comProject.setProjState(50);
// comProject.setProjType(1);
// comProject.setSystemType(1);
// comProject.setAppNo(e.getProjStateName());
//
// comProject.setBatch(1);
......
......@@ -76,8 +76,8 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
if (Objects.nonNull(vo.getReportYear())) {
criteria.eq("c.report_year", vo.getReportYear());
}
if (Objects.nonNull(vo.getProjType())) {
criteria.eq("proj_type", vo.getProjType());
if (Objects.nonNull(vo.getSystemType())) {
criteria.eq("system_type", vo.getSystemType());
}
if (Objects.nonNull(vo.getAppUnitId())) {
criteria.eq("app_unit_id", vo.getAppUnitId());
......@@ -287,9 +287,9 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
//附件列表
List<ComFileDTO> fileList = ComFileService.getListByObjectId(dto.getProjId(), CommonEnum.fileType.project.getCode());
if (null == fileList || fileList.size() == 0)
fileList = configureFileList(dto.getProjType());
fileList = configureFileList(dto.getSystemType());
else
fileList = checkNecessaryAttachmentFile(dto.getProjType(), fileList);
fileList = checkNecessaryAttachmentFile(dto.getSystemType(), fileList);
dto.setFileList(fileList);
return dto;
......@@ -356,11 +356,11 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
dto.setProjectKPI(kpiDTO);
}
private List<ComFileDTO> configureFileList(Integer projType) {
private List<ComFileDTO> configureFileList(Integer systemType) {
List<ComFileDTO> fileList = new ArrayList<>();
List<SystemParameter> parameterList;
//健康领域科技项目
if (projType == CommonEnum.projType.num.getCode())
if (systemType == CommonEnum.systemType.num.getCode())
parameterList = systemParameterService.getListByType(61);
else//临床科技项目
parameterList = systemParameterService.getListByType(13);
......@@ -383,10 +383,10 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
return file;
}
public List<ComFileDTO> checkNecessaryAttachmentFile(Integer projType, List<ComFileDTO> fileList) {
public List<ComFileDTO> checkNecessaryAttachmentFile(Integer systemType, List<ComFileDTO> fileList) {
List<SystemParameter> parameterList;
//健康领域科技项目
if (projType == CommonEnum.projType.num.getCode())
if (systemType == CommonEnum.systemType.num.getCode())
parameterList = systemParameterService.getListByType(61);
else//临床科技项目
parameterList = systemParameterService.getListByType(13);
......
......@@ -69,16 +69,16 @@ public class SystemSetServiceImpl extends BaseServiceImpl<SystemSetDAO, SystemSe
public String save(Map<String, Object> map) {
String SMSApiUrl = "";
String loginType = "";
String projType = "";
String systemType = "";
if (!map.containsKey("SMSApiUrl"))
throw new BusinessException("参数错误");
if (!map.containsKey("loginType"))
throw new BusinessException("参数错误");
if (!map.containsKey("projType"))
if (!map.containsKey("systemType"))
throw new BusinessException("参数错误");
SMSApiUrl = (String) map.get("SMSApiUrl");
loginType = (String) map.get("loginType");
projType = (String) map.get("projType");
systemType = (String) map.get("systemType");
if (Objects.nonNull(SMSApiUrl)) {
SystemSet set=getBykey(SystemSetKey.SMSApiUrl);
if(null!=set){
......@@ -105,16 +105,16 @@ public class SystemSetServiceImpl extends BaseServiceImpl<SystemSetDAO, SystemSe
this.insert(set);
}
}
if (Objects.nonNull(projType)) {
if (Objects.nonNull(systemType)) {
SystemSet set=getBykey(SystemSetKey.SysProjectType);
if(null!=set){
set.setValue(projType);
set.setValue(systemType);
this.update(set);
}
else{
set=new SystemSet();
set.setName(SystemSetKey.SysProjectType);
set.setValue(projType);
set.setValue(systemType);
this.insert(set);
}
}
......
......@@ -38,7 +38,7 @@ public class SystemSetKey {
public final static String taskCont5 = "Task.Cont5";
/** 项目阶段实施内容及目标 */
public final static String taskCont6 = "Task.Cont6";
public final static String SysProjectType = "sys.projType";
public final static String SysProjectType = "sys.systemType";
/** 学科带头人培养年限 */
public final static String SysALTrainingYear = "sys.AcademicLeader.TrainingYear";
/** 学科带头人每年财政培养经费(单位:万元) */
......
......@@ -17,14 +17,14 @@
<select id="getMaxBatch" resultType="java.lang.Integer">
select ifnull(max(batch), 0)
from com_batch
where year = #{year} and proj_type = #{projType}
where year = #{year} and system_type = #{systemType}
</select>
<select id="getCurrentBatch" parameterType="java.util.Map" resultType="com.yiboshi.science.param.dto.ComBatchDTO">
select *
from com_batch
<where>
<if test="projType != null and projType != ''">
and proj_type = #{projType}
<if test="systemType != null and system_type != ''">
and system_type = #{systemType}
</if>
<if test="timeType != null and timeType != ''">
and time_type = #{timeType}
......
......@@ -252,7 +252,7 @@
ifnull(sum(case when a.audit_state =2 then 1 else 0 end),0) count3,
ifnull(sum(case when to_days(a.updated) = to_days(now()) then 1 else 0 end),0) count4
from com_project_assign a left join com_project b on a.proj_id = b.id
where a.assign_year = #{assignYear} and b.proj_type = #{projType}
where a.assign_year = #{assignYear} and b.system_type = #{systemType}
</select>
<select id="getKnowledgeStatistic" resultType="com.yiboshi.science.param.dto.KnowledgeStatisticsDTO">
select tabA.*, IFNULL(tabB.count1,0) as knowledgeCount from
......
......@@ -53,11 +53,11 @@
where a.id = #{id}
</select>
<select id="getProjectReportCountByGov" resultType="com.yiboshi.science.param.dto.DataStatisticsDTO">
select count(*) as count1 from com_project where proj_state = 26 and proj_type = 1 and app_unit_id in (
select count(*) as count1 from com_project where proj_state = 26 and system_type = 1 and app_unit_id in (
select id from com_unit where tree_code like CONCAT('',#{treeCode},'%') and unit_type &lt;&gt; 0
)
</select>
<select id="getProjectReportCountByUnitId" resultType="com.yiboshi.science.param.dto.DataStatisticsDTO">
select count(*) as count1 from com_project where proj_state = 26 and proj_type = 1 and app_unit_id = #{appUnitId}
select count(*) as count1 from com_project where proj_state = 26 and system_type = 1 and app_unit_id = #{appUnitId}
</select>
</mapper>
......@@ -37,7 +37,7 @@
pt.key_areas,pt.proj_work,pt.telephone,pt.fax,
pt.link_name,pt.link_mobile,pt.link_fax,pt.link_email,
pt.is_technology_report,pt.project_report,pt.progress_report,pt.special_report,pt.final_report,
a.proj_name,a.proj_no,a.start_date projStart,a.end_date projEnd,a.app_person_id,a.app_unit_id,a.proj_type,
a.proj_name,a.proj_no,a.start_date projStart,a.end_date projEnd,a.app_person_id,a.app_unit_id,a.system_type,
b.name knowledge_name,
ic.proj_id,ic.job_time,ic.main_research_areas,ic.address,
ic.unit_link_name,ic.unit_link_mobile,ic.unit_link_email,ic.unit_link_fax,ic.subject_scope,ic.proj_abstract,ic.proj_keywords,
......
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