|
@@ -219,9 +219,6 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
if (planYearsMapper.countProjectName(yearsStandardVo.getProjectName()) > 0) {
|
|
|
return AjaxResult.error("该项目名称已经存在");
|
|
|
}
|
|
|
- if (!isBetweenValue(yearsStandardVo)) {
|
|
|
- return AjaxResult.error("所创计划不在提报日期内!");
|
|
|
- }
|
|
|
//默认未超额
|
|
|
if (ObjectUtils.isEmpty(yearsStandardVo.getIsExcess())) {
|
|
|
yearsStandardVo.setIsExcess("0");
|
|
@@ -298,9 +295,6 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
if (planYearsMapper.countProjectNameOther(yearsStandardVo.getProjectName(), String.valueOf(yearsStandardVo.getPlanYearId())) > 0) {
|
|
|
return AjaxResult.error("该项目名称已经存在");
|
|
|
}
|
|
|
- if (!isBetweenValue(yearsStandardVo)) {
|
|
|
- return AjaxResult.error("所创计划不在提报日期内!");
|
|
|
- }
|
|
|
//默认未超额
|
|
|
if (ObjectUtils.isEmpty(yearsStandardVo.getIsExcess())) {
|
|
|
yearsStandardVo.setIsExcess("0");
|
|
@@ -334,7 +328,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
}
|
|
|
|
|
|
//是否在提报时间内
|
|
|
- public Boolean isBetweenValue(PlanYearsStandardVo yearsStandardVo) {
|
|
|
+ public Boolean isBetweenValue(PlanYears planYear) {
|
|
|
//获取年度计划提报时间的阈值
|
|
|
List<SysDictData> supTime = dictTypeService.selectDictDataByType("sys_annual_plan");
|
|
|
HashMap<String, String> thresholdMap = new LinkedHashMap<>();
|
|
@@ -346,7 +340,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
Date thresholdTimeStart = null;
|
|
|
Date thresholdTimeEnd = null;
|
|
|
- Date subTime = yearsStandardVo.getPlanDemandSubTime();
|
|
|
+ Date subTime = planYear.getPlanDemandSubTime();
|
|
|
try {
|
|
|
if (!ObjectUtils.isEmpty(thresholdTimeStart) && !ObjectUtils.isEmpty(thresholdTimeEnd)) {
|
|
|
thresholdTimeStart = dateFormat.parse(thresholdMap.get("起止时间开始"));
|
|
@@ -447,6 +441,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
@Transactional
|
|
|
public AjaxResult commit(PlanYearsStandardVo yearsStandardVo) {
|
|
|
PlanYears byId = planYearsMapper.getById(yearsStandardVo.getPlanYearId());
|
|
|
+ if (!isBetweenValue(byId)) {
|
|
|
+ return AjaxResult.error("所创计划不在提报日期内!");
|
|
|
+ }
|
|
|
BigDecimal evaluation = byId.getEvaluation();
|
|
|
SysUser sysUser = userService.selectUserById(SecurityUtils.getUserId());
|
|
|
Long deptId = sysUser.getDeptId();
|