2022-09-05 09:02:09 +00:00
|
|
|
package com.dbnt.faisp.fpiMgt.monthPlan;
|
|
|
|
|
|
|
|
|
|
|
2022-09-06 09:10:03 +00:00
|
|
|
import com.dbnt.faisp.fpiMgt.monthPlan.model.BoardPlan;
|
|
|
|
|
import com.dbnt.faisp.fpiMgt.monthPlan.model.PlanFile;
|
|
|
|
|
import com.dbnt.faisp.fpiMgt.monthPlan.repository.BoardPlanRepository;
|
|
|
|
|
import com.dbnt.faisp.fpiMgt.monthPlan.repository.PlanFileRepository;
|
|
|
|
|
import com.dbnt.faisp.fpiMgt.monthPlan.repository.PlanMainInfoRepository;
|
2022-09-05 09:02:09 +00:00
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
@RequiredArgsConstructor
|
2022-09-06 09:10:03 +00:00
|
|
|
public class MonthPlanService {
|
|
|
|
|
private final BoardPlanRepository boardPlanRepository;
|
|
|
|
|
private final PlanFileRepository planFileRepository;
|
|
|
|
|
private final PlanMainInfoRepository planMainInfoRepository;
|
|
|
|
|
|
|
|
|
|
public BoardPlan selectBoardPlan(Integer planKey) {
|
|
|
|
|
BoardPlan savedPlan = boardPlanRepository.findById(planKey).orElse(null);
|
|
|
|
|
savedPlan.setFileList(planFileRepository.findByPlanKey(planKey));
|
|
|
|
|
savedPlan.setMainInfoList(planMainInfoRepository.findByPlanKey(planKey));
|
|
|
|
|
return savedPlan;
|
|
|
|
|
}
|
2022-09-05 09:02:09 +00:00
|
|
|
}
|