Просмотр исходного кода

修改加微状态,不再从口袋助理同步

cgp 1 день назад
Родитель
Сommit
22cc517ae8

+ 101 - 0
fs-admin/src/main/java/com/fs/his/controller/FsPrescribeDataScrmController.java

@@ -0,0 +1,101 @@
+package com.fs.his.controller;
+
+
+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);
+    }
+
+}

+ 5 - 5
fs-service/src/main/java/com/fs/his/utils/KdzlJsonParser.java

@@ -43,11 +43,11 @@ public class KdzlJsonParser {
                 return;
             }
 
-            // 1. 解析加微状态(优先使用lbl_doc中的“是否加微”,再使用properties中的“客户是否加微”)
-            Integer addWechatStatus = parseAddWechatStatus(custm.getLbl_doc(), custm.getProperties());
-            if (addWechatStatus != null) {
-                customer.setKdzlAddWechatStatus(addWechatStatus);
-            }
+            // 1. 解析加微状态(优先使用lbl_doc中的“是否加微”,再使用properties中的“客户是否加微”)2026-06-18 停止从口袋助理json中同步加微状态
+//            Integer addWechatStatus = parseAddWechatStatus(custm.getLbl_doc(), custm.getProperties());
+//            if (addWechatStatus != null) {
+//                customer.setKdzlAddWechatStatus(addWechatStatus);
+//            }
 
             // 2. 解析成交状态(仅从properties中读取)
             Integer makeStatus = parseMakeStatus(custm.getProperties());

+ 4 - 0
fs-service/src/main/java/com/fs/qw/service/impl/FsCompanyCustomerServiceImpl.java

@@ -244,6 +244,10 @@ public class FsCompanyCustomerServiceImpl implements IFsCompanyCustomerService {
             log.error("认领号码:{},客户号码:{}",fsCompanyCustomer.getClaimPhone(),oldCustomer.getPhone());
             throw new CustomException("认领号码与客户号码不一致,请重试");
         }
+        //校验加微状态
+        if (fsCompanyCustomer.getKdzlAddWechatStatus()==null){
+            throw new CustomException("未选择加微,请选择");
+        }
         FsImportMember fsImportMember=new FsImportMember();
         fsImportMember.setId(oldCustomer.getImportMemberId());
         fsImportMember.setCompanyId(companyUser.getCompanyId());