From ec0342f01d418e96822fde75ceb201f78d55e8bb Mon Sep 17 00:00:00 2001
From: Jack <jack.su@pollex.com.tw>
Date: 星期五, 14 一月 2022 17:33:40 +0800
Subject: [PATCH] [ADD] 成交API新增remark欄位 [UPDATE] 進入顧問流程需一併更新appointment 的狀態 [ADD] 新增檢核不能重複新增appointment closed info

---
 pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java b/pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java
index dbed395..9931a44 100644
--- a/pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java
+++ b/pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java
@@ -1,10 +1,22 @@
 package com.pollex.pam.service;
 
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+
+import com.pollex.pam.domain.AppointmentClosedInfo;
+import com.pollex.pam.repository.AppointmentClosedInfoRepository;
+import com.pollex.pam.web.rest.errors.AppointmentClosedInfoNotFoundException;
 
 @Service
 @Transactional
 public class AppointmentClosedInfoService {
-
+	
+	@Autowired
+	AppointmentClosedInfoRepository appointmentClosedInfoRepository;
+	
+	public AppointmentClosedInfo findByAppointmentId(Long apId) {
+		return appointmentClosedInfoRepository.findByAppointmentId(apId)
+				.orElseThrow(AppointmentClosedInfoNotFoundException::new);
+	}
 }

--
Gitblit v1.8.0