|
@@ -47,8 +47,6 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.validation.Validator;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
@@ -280,7 +278,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
//判断是否为超额计划
|
|
|
- //ofYears.setIsExcess(isExcessOrNo(ofYears.getProjectType(), ofYears.getEvaluation()));
|
|
|
+ ofYears.setIsExcess(deptService.isExcessOrNo(ofYears.getProjectType(), ofYears.getEvaluation(), Long.valueOf(ofYears.getPurchaseDeptId())));
|
|
|
ofYears.setProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
|
|
|
ofYears.setCreateTime(new Date());
|
|
|
planYearsMapper.insertPlanYears(ofYears);
|
|
@@ -351,7 +349,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- //ofYears.setIsExcess(isExcessOrNo(ofYears.getProjectType(), ofYears.getEvaluation()));
|
|
|
+ ofYears.setIsExcess(deptService.isExcessOrNo(ofYears.getProjectType(), ofYears.getEvaluation(), Long.valueOf(ofYears.getPurchaseDeptId())));
|
|
|
ofYears.setUpdateTime(new Date());
|
|
|
planYearsMapper.updateInfoById(ofYears);
|
|
|
List<SysFileRef> sysFileRefs = yearsStandardVo.getSysFileRefs();
|
|
@@ -429,7 +427,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
}
|
|
|
ofYear.setProjectAttr(builder.toString());
|
|
|
ofYear.setPurchaseServices(purchaseServices.get(ofYear.getPurchaseServices()));
|
|
|
- //ofYear.setIsExcess(isExcessOrNo(ofYear.getProjectType(), ofYear.getEvaluation()));
|
|
|
+ ofYear.setIsExcess(deptService.isExcessOrNo(ofYear.getProjectType(), ofYear.getEvaluation(), Long.valueOf(ofYear.getPurchaseDeptId())));
|
|
|
ofYear.setCreated(String.valueOf(loginUser.getUserId()));
|
|
|
ofYear.setCreateTime(new Date());
|
|
|
planYearsMapper.insertPlanYears(ofYear);
|
|
@@ -1267,32 +1265,6 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
return quarterRes;
|
|
|
}
|
|
|
|
|
|
- ////判断是否为超额计划
|
|
|
- //public String isExcessOrNo(String projectType, BigDecimal evaluation) {
|
|
|
- // BigDecimal threshold = new BigDecimal(0);
|
|
|
- // //获取各个项目类型设定的概算金额阈值
|
|
|
- // List<SysDictData> data = dictTypeService.selectDictDataByType("sys_over_limit_threshold");
|
|
|
- // HashMap<String, String> thresholdMap = new LinkedHashMap<>();
|
|
|
- // //各个类型的概算金额阈值
|
|
|
- // for (SysDictData dictData : data) {
|
|
|
- // // 类型----阈值
|
|
|
- // thresholdMap.put(dictData.getDictLabel(), dictData.getDictValue());
|
|
|
- // }
|
|
|
- // //项目类型
|
|
|
- // for (ProjectTypes value : ProjectTypes.values()) {
|
|
|
- // if (projectType.equals(value.getCode())) {
|
|
|
- // threshold = BigDecimal.valueOf(Long.parseLong(thresholdMap.get(value.getInfo())));
|
|
|
- // }
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // if (evaluation.compareTo(threshold) == 1) {
|
|
|
- // //是超额计划
|
|
|
- // return ("1");
|
|
|
- // } else {
|
|
|
- // return ("0");
|
|
|
- // }
|
|
|
- //}
|
|
|
-
|
|
|
//字段赋值对应的名称
|
|
|
public List<PlanYearsResponseVo> changeTo(List<PlanYears> planYears) {
|
|
|
//获取年度计划提报时间的阈值
|
|
@@ -1416,7 +1388,5 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
|
|
|
return "";
|
|
|
}
|
|
|
- //判断是否为超额计划
|
|
|
-
|
|
|
|
|
|
}
|