Commit 0cf1d7a4 authored by wangxl's avatar wangxl

1

parent df2d0274
...@@ -109,10 +109,4 @@ public class ComBatchController extends BaseController<ComBatchService, ComBatch ...@@ -109,10 +109,4 @@ public class ComBatchController extends BaseController<ComBatchService, ComBatch
return ResponseDataModel.ok(comBatchService.getBatchList(entity)); return ResponseDataModel.ok(comBatchService.getBatchList(entity));
} }
@ApiOperation(value = "获取当前申报或审核时间", httpMethod = "GET", notes = "获取当前申报或审核时间")
@GetMapping
@RequestMapping("/getCurrentYearTalentBatch")
public ResponseDataModel<ComBatchDTO> getCurrentYearTalentBatch(int type) {
return ResponseDataModel.ok(comBatchService.getCurrentYearTalentBatch(type));
}
} }
...@@ -62,10 +62,5 @@ public interface ComBatchService extends BaseService<ComBatchQueryVO, ComBatchDT ...@@ -62,10 +62,5 @@ public interface ComBatchService extends BaseService<ComBatchQueryVO, ComBatchDT
*/ */
Integer getReportYear(Integer systemType, Integer timeType); Integer getReportYear(Integer systemType, Integer timeType);
/**
* 获取当前人才申报批次
* @param type
* @return
*/
ComBatchDTO getCurrentYearTalentBatch(int type);
} }
...@@ -139,9 +139,9 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu ...@@ -139,9 +139,9 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
/** /**
* 获取当前申报或审核时间 * 获取当前申报或审核时间
* *
* @param type 1:项目申报时间 2:州市级及以下单位上报时间 3:州市级行政单位审核时间 4:省直单位上报时间 5:专家评审时间 * @param type 1:项目申报时间 2:审核时间 5:专家评审时间
* @param systemType 1.科研项目申报 2.重点项目申报 * @param systemType 1.科研项目申报 2.人才
* @param timeType 1.项目申报 2.任务书上报 3.中期考核 4.人才申报 * @param timeType 1.项目申报 2.任务书上报 3.中期考核 4.人才申报
* @return * @return
*/ */
public ComBatchDTO getCurrentYearBatch(int type, Integer systemType, Integer timeType) { public ComBatchDTO getCurrentYearBatch(int type, Integer systemType, Integer timeType) {
...@@ -150,16 +150,15 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu ...@@ -150,16 +150,15 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
boolean flag = false; boolean flag = false;
if (null != comBatch) { if (null != comBatch) {
switch (type) { switch (type) {
case 1://项目申报时间(所有申报人项目上报单位时间) case 1:// 申报时间(所有申报人项目上报单位时间)
comBatch.setDisabled(judgementDateTimeDisabled(date, comBatch.getReportStart(), comBatch.getReportEnd())); comBatch.setDisabled(judgementDateTimeDisabled(date, comBatch.getReportStart(), comBatch.getReportEnd()));
comBatch.setDescription(judgementDateTimeStr(date, comBatch.getReportStart(), comBatch.getReportEnd(), comBatch.getBatch(), comBatch.getYear())); comBatch.setDescription(judgementDateTimeStr(date, comBatch.getReportStart(), comBatch.getReportEnd(), comBatch.getBatch(), comBatch.getYear()));
break; break;
case 2:// 审核时间 case 2:// 审核时间
flag = judgementDateTimeDisabled(date, comBatch.getAuditStart(), comBatch.getAuditEnd()); comBatch.setDisabled(judgementDateTimeDisabled(date, comBatch.getAuditStart(), comBatch.getAuditEnd()));
comBatch.setDisabled(flag);
comBatch.setDescription(judgementDateTimeStr(date, comBatch.getAuditStart(), comBatch.getAuditEnd(), comBatch.getBatch(), comBatch.getYear())); comBatch.setDescription(judgementDateTimeStr(date, comBatch.getAuditStart(), comBatch.getAuditEnd(), comBatch.getBatch(), comBatch.getYear()));
break; break;
case 5://专家评审时间 case 5:// 专家评审时间
comBatch.setDisabled(judgementDateTimeDisabled(date, comBatch.getExpertStart(), comBatch.getExpertEnd())); comBatch.setDisabled(judgementDateTimeDisabled(date, comBatch.getExpertStart(), comBatch.getExpertEnd()));
comBatch.setDescription(judgementDateTimeStr(date, comBatch.getExpertStart(), comBatch.getExpertEnd(), comBatch.getBatch(), comBatch.getYear())); comBatch.setDescription(judgementDateTimeStr(date, comBatch.getExpertStart(), comBatch.getExpertEnd(), comBatch.getBatch(), comBatch.getYear()));
break; break;
...@@ -226,31 +225,5 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu ...@@ -226,31 +225,5 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
return flag; return flag;
} }
/**
* 获取当前申报或审核时间
* @param type 1:人才申报时间 2:人才申报审核时间
* @return
*/
public ComBatchDTO getCurrentYearTalentBatch(int type) {
ComBatchDTO comBatch = this.getCurrentBatch(null, CommonEnum.timeType.talentApply.getCode());
Date date = new Date();// 获取当前时间
if (null != comBatch) {
switch (type) {
case 1:// 人才申报时间(人才申报项目上报单位时间)
comBatch.setDisabled(judgementDateTimeDisabled(date, comBatch.getReportStart(), comBatch.getReportEnd()));
comBatch.setDescription(judgementDateTimeStr(date, comBatch.getReportStart(), comBatch.getReportEnd(), comBatch.getBatch(), comBatch.getYear()));
break;
case 2:// 人才申报审核时间
comBatch.setDisabled(judgementDateTimeDisabled(date, comBatch.getAuditStart(), comBatch.getAuditEnd()));
comBatch.setDescription(judgementDateTimeStr(date, comBatch.getAuditStart(), comBatch.getAuditEnd(), comBatch.getBatch(), comBatch.getYear()));
break;
}
} else {
comBatch = new ComBatchDTO();
comBatch.setDisabled(false);
comBatch.setDescription(type == 1 ? "未设置填报时间!" : "未设置审核时间!");
}
return comBatch;
}
} }
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