|
@@ -1526,11 +1526,33 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 填写采购服务站
|
|
|
+ *
|
|
|
+ * @param yearsStandardVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public AjaxResult adPurchaseServices(PlanYearsStandardVo yearsStandardVo) {
|
|
|
PlanYears years = new PlanYears();
|
|
|
BeanUtils.copyProperties(yearsStandardVo, years);
|
|
|
+ //同步到季度计划
|
|
|
+ PlanQuarter byPlanYearId = planQuarterMapper.getByPlanYearId(years.getPlanYearId());
|
|
|
+ if (!ObjectUtils.isEmpty(byPlanYearId)) {
|
|
|
+ PlanQuarter quarter = new PlanQuarter();
|
|
|
+ quarter.setPurchaseServices(years.getPurchaseServices());
|
|
|
+ quarter.setPlanPracticalId(byPlanYearId.getPlanPracticalId());
|
|
|
+ planQuarterMapper.updateById(quarter);
|
|
|
+ //同步到项目管理
|
|
|
+ PmDemand pmDemand = demandService.selectByPlanId(byPlanYearId.getPlanPracticalId());
|
|
|
+ if (!ObjectUtils.isEmpty(pmDemand)) {
|
|
|
+ PmDemand demand = new PmDemand();
|
|
|
+ demand.setPurchaseServices(years.getPurchaseServices());
|
|
|
+ demand.setDemandId(pmDemand.getDemandId());
|
|
|
+ demandService.updateById(demand);
|
|
|
+ }
|
|
|
+ }
|
|
|
if (planYearsMapper.updateById(years) == 1) {
|
|
|
return AjaxResult.success("成功");
|
|
|
}
|