|
@@ -96,8 +96,6 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
@Autowired
|
|
|
private ProvisionalPlanMapper provisionalPlanMapper;
|
|
|
@Autowired
|
|
|
- private IPmDemandService pmDemandService;
|
|
|
- @Autowired
|
|
|
private ISysDictDataService dictDataService;
|
|
|
@Autowired
|
|
|
private BaseAgencyService baseAgencyService;
|
|
@@ -775,7 +773,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
pmDemandReqVo.setIsAdmin(SysUser.isAdmin(SecurityUtils.getUserId()));
|
|
|
pmDemandReqVo.setDeptId(SecurityUtils.getDeptId());
|
|
|
pmDemandReqVo.setPurchaseDeptId(Math.toIntExact(SecurityUtils.getDeptId()));
|
|
|
- IPage<PmDemandResVo> page = pmDemandService.selectPmDemandList(pmDemandReqVo, 3);
|
|
|
+ IPage<PmDemandResVo> page = demandService.selectPmDemandList(pmDemandReqVo, 3);
|
|
|
return AjaxResult.success(page.getTotal());
|
|
|
}
|
|
|
|
|
@@ -929,7 +927,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
return AjaxResult.error("没有查到相关数据!");
|
|
|
}
|
|
|
// 通过季度、临时计划ID查询项目数据
|
|
|
- PmDemand pmDemand = pmDemandService.selectByPlanId(provisionalPlan.getPlanPracticalId());
|
|
|
+ PmDemand pmDemand = demandService.selectByPlanId(provisionalPlan.getPlanPracticalId());
|
|
|
if (StringUtils.isNotNull(pmDemand)) {
|
|
|
String detailType = "";
|
|
|
if (StringUtils.isNotNull(yearsStandardVo.getDetailType())) {
|
|
@@ -1356,7 +1354,38 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
|
|
|
@Override
|
|
|
public AjaxResult appDelete(PlanYearsStandardVo yearsStandardVo) {
|
|
|
- return null;
|
|
|
+ PlanQuarter byPlanYearId = planQuarterMapper.getByPlanYearId(yearsStandardVo.getPlanYearId());
|
|
|
+ //需求待填制可以申请,需求建档就不能申请
|
|
|
+ if (!ObjectUtils.isEmpty(byPlanYearId)) {
|
|
|
+ PmDemand demand = demandService.selectByPlanId(byPlanYearId.getPlanPracticalId());
|
|
|
+ if (!ObjectUtils.isEmpty(demand) && !demand.getProjectStatus().equals(PmProjectStatus.DEMAND_WAIT_FILL.getCode())) {
|
|
|
+ return AjaxResult.error("改需求已建档,不可进行撤销");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ PlanYears years = new PlanYears();
|
|
|
+ BeanUtils.copyProperties(yearsStandardVo, years);
|
|
|
+ years.setAppDelete("true");
|
|
|
+ planYearsMapper.updateById(years);
|
|
|
+ return AjaxResult.success("申请成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public AjaxResult handleApp(PlanYearsStandardVo yearsStandardVo) {
|
|
|
+ //getProjectAttr传值1为同意。-1为拒绝
|
|
|
+ if ("1".equals(yearsStandardVo.getProjectAttr())) {
|
|
|
+ planYearsMapper.deletePlanYearsById(yearsStandardVo.getPlanYearId());
|
|
|
+ //年度计划撤销后季度计划也同步撤销
|
|
|
+ PlanQuarter byPlanYearId = planQuarterMapper.getByPlanYearId(yearsStandardVo.getPlanYearId());
|
|
|
+ if (!ObjectUtils.isEmpty(byPlanYearId)) {
|
|
|
+ planQuarterMapper.deletePlanQuarterById(byPlanYearId.getPlanPracticalId());
|
|
|
+ }
|
|
|
+ return AjaxResult.success("已成功进行撤销");
|
|
|
+ }
|
|
|
+ PlanYears years = new PlanYears();
|
|
|
+ BeanUtils.copyProperties(yearsStandardVo, years);
|
|
|
+ years.setAppDelete("false");
|
|
|
+ planYearsMapper.updateById(years);
|
|
|
+ return AjaxResult.success("已拒绝改申请");
|
|
|
}
|
|
|
|
|
|
/**
|