|
@@ -448,8 +448,9 @@ public class ProvisionalPlanServiceImpl extends ServiceImpl<ProvisionalPlanMappe
|
|
|
}
|
|
|
PmDemand demand = new PmDemand();
|
|
|
BeanUtils.copyProperties(byId, demand);
|
|
|
- demand.setPlanId(Long.valueOf(byId.getPlanPracticalId()));
|
|
|
+ demand.setPlanId(byId.getPlanPracticalId());
|
|
|
demand.setEvaluation(byId.getEvaluation().doubleValue());
|
|
|
+ demand.setIsExcess(Integer.parseInt(byId.getIsExcess()));
|
|
|
//同步到项目管理状态为需求待填制
|
|
|
demand.setProjectStatus(PmProjectStatus.DEMAND_WAIT_FILL.getCode());
|
|
|
demand.setPurchaseDeptId(Long.parseLong(byId.getPurchaseDeptId()));
|
|
@@ -505,32 +506,6 @@ public class ProvisionalPlanServiceImpl extends ServiceImpl<ProvisionalPlanMappe
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
|
|
|
- //判断是否为超额计划
|
|
|
- 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 ProvisionalPlan changeToProvisionalPlan(ProvisionalPlan provisionalPlan) {
|
|
|
HashMap<String, HashMap<String, String>> planEnums = dictTypeService.getAboutEnums();
|