|
|
@@ -0,0 +1,100 @@
|
|
|
+package com.fs.company.controller.his;
|
|
|
+
|
|
|
+
|
|
|
+import com.fs.common.core.controller.BaseController;
|
|
|
+import com.fs.common.core.domain.AjaxResult;
|
|
|
+import com.fs.his.domain.FsPrescribeDataScrm;
|
|
|
+import com.fs.his.service.IFsPrescribeDataScrmService;
|
|
|
+import com.fs.his.vo.CustomerInfoVO;
|
|
|
+import com.fs.his.vo.DoctorSignVO;
|
|
|
+import com.fs.his.vo.PrescribeScrmDoctorAdviceVO;
|
|
|
+import com.fs.hisStore.domain.FsStoreOrderScrm;
|
|
|
+import com.fs.hisStore.service.IFsStoreOrderScrmService;
|
|
|
+import com.fs.qw.service.IFsCompanyCustomerService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 商城处方表(SCRM)Controller
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ * @date 2026-06-11
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/his/prescribeDataScrm")
|
|
|
+public class FsPrescribeDataScrmController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private IFsPrescribeDataScrmService fsPrescribeScrmService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFsCompanyCustomerService fsCompanyCustomerService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFsStoreOrderScrmService storeOrderScrmService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取商城处方表(SCRM)详细信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/{prescribeId}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("prescribeId") Long prescribeId)
|
|
|
+ {
|
|
|
+ return AjaxResult.success(fsPrescribeScrmService.selectFsPrescribeDataScrmByPrescribeId(prescribeId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据订单号获取处方信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/getPrescribeInfoByOrderCode")
|
|
|
+ public AjaxResult getPrescribeInfoByOrderCode(@RequestParam("orderCode") String orderCode)
|
|
|
+ {
|
|
|
+ FsStoreOrderScrm fsStoreOrderScrm = storeOrderScrmService.selectFsStoreOrderByOrderCode(orderCode);
|
|
|
+ if (fsStoreOrderScrm != null){
|
|
|
+ FsPrescribeDataScrm fsPrescribeDataScrm=fsPrescribeScrmService.selectFsPrescribeDataScrmByPrescribeId(fsStoreOrderScrm.getPrescribeId());
|
|
|
+ return AjaxResult.success(fsPrescribeDataScrm);
|
|
|
+ }
|
|
|
+ return AjaxResult.error("未找到订单信息");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取客户信息+问答信息(根据客户信息表id)
|
|
|
+ */
|
|
|
+ @GetMapping("/getCustomerInfoAndQuestionAnswer/{companyCustomerId}")
|
|
|
+ public AjaxResult getCustomerQuestionAnswer(@PathVariable Long companyCustomerId) {
|
|
|
+ CustomerInfoVO customerInfoVO = fsCompanyCustomerService.getCustomerInfoAndQuestionAnswer(companyCustomerId);
|
|
|
+ return AjaxResult.success(customerInfoVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取医生、药师签名信息
|
|
|
+ * @param doctorIds 医生id和药师id
|
|
|
+ * @return 医生、药师签名信息
|
|
|
+ * */
|
|
|
+ @PostMapping("/getSignInfo")
|
|
|
+ public AjaxResult getDoctorSignInfo(@RequestBody List<Long> doctorIds){
|
|
|
+ DoctorSignVO signVO = fsPrescribeScrmService.getDoctorSignInfo(doctorIds);
|
|
|
+ return AjaxResult.success(signVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取医生建议信息(诊断、舌诊、饮食运动建议、治疗方面、禁忌)
|
|
|
+ */
|
|
|
+ @GetMapping("/getDoctorAdvice/{prescribeId}")
|
|
|
+ public AjaxResult getDoctorAdvice(@PathVariable Long prescribeId) {
|
|
|
+ FsPrescribeDataScrm prescribe = fsPrescribeScrmService.selectFsPrescribeDataScrmByPrescribeId(prescribeId);
|
|
|
+ if (prescribe == null) {
|
|
|
+ return AjaxResult.error("处方不存在");
|
|
|
+ }
|
|
|
+ PrescribeScrmDoctorAdviceVO vo = new PrescribeScrmDoctorAdviceVO();
|
|
|
+ vo.setDiagnose(prescribe.getDiagnose());
|
|
|
+ vo.setFacialDiagnosis(prescribe.getFacialDiagnosis());
|
|
|
+ vo.setFoodAndExerciseGuidance(prescribe.getFoodAndExerciseGuidance());
|
|
|
+ vo.setHealingAreaJson(prescribe.getHealingAreaJson());
|
|
|
+ vo.setNoteTaboos(prescribe.getNoteTaboos());
|
|
|
+ return AjaxResult.success(vo);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|