From 88ca2e40cdd8b209b7c13f97de9e98564e0e75ba Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 22 七月 2025 16:20:22 +0800
Subject: [PATCH] 代码提交

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java
index 00230cd..fb98ade 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java
@@ -20,6 +20,7 @@
 import cn.lihu.jh.module.ecg.service.queuesequence.QueueSequenceService;
 import cn.lihu.jh.module.ecg.webservice.WebServiceClient;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -378,7 +379,7 @@
             // 鍖荤敓寮�鍗曟椂闂�
             Optional.ofNullable(dataMap.get("controlActProcess")).map(controlActProcess -> (Map<String, Object>) controlActProcess).map(controlActProcess -> (Map<String, Object>) controlActProcess.get("subject")).map(subject -> (Map<String, Object>) subject.get("observationRequest")).map(observationRequest -> (Map<String, Object>) observationRequest.get("author")).map(author -> (Map<String, Object>) author.get("time")).map(time -> (String) time.get("value")).map(str -> {
                 try {
-                    return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(str);
+                    return new SimpleDateFormat("yyyyMMddHHmmss").parse(str);
                 } catch (Exception e) {
                     e.printStackTrace();
                     return null;
@@ -686,6 +687,32 @@
         appointmentMapper.updateById(appointment);
     }
 
+    @Override
+    public void handleAppointmentStatusUpdate(Map<String, Object> dataMap) {
+        if (dataMap == null) {
+            throw exception(APPOINTMENT_STATUS_REGISTER_UPDATE_FAIL);
+        }
+        //鑾峰彇applyNo
+        Map<String, Object> controlActProcess = (Map<String, Object>) dataMap.get("controlActProcess");
+        Map<String, Object> subject = (Map<String, Object>) controlActProcess.get("subject");
+        Map<String, Object> placerGroup = (Map<String, Object>) subject.get("placerGroup");
+        Map<String, Object> component2 = (Map<String, Object>) placerGroup.get("component2");
+        Map<String, Object> observationRequest = (Map<String, Object>) component2.get("observationRequest");
+        Map<String, Object> id = (Map<String, Object>) observationRequest.get("id");
+        String applyNo = String.valueOf(id.get("extension"));
+
+        //鑾峰彇status
+        Map<String, Object> component1 = (Map<String, Object>) observationRequest.get("component1");
+        Map<String, Object> processStep = (Map<String, Object>) component1.get("processStep");
+        Map<String, Object> codeMap = (Map<String, Object>) processStep.get("code");
+        String status = String.valueOf(codeMap.get("code"));
+
+        //鐘舵�佹洿鏂�
+        Integer i = appointmentMapper.updateStatusByApplyNo(applyNo, status, null);
+        log.info("鐢宠鍗曠櫥璁癮pplyNo:{},鐘舵�乻tatus:{},鏇存柊缁撴灉锛歿}", applyNo, status, i);
+
+    }
+
     public AppointmentDO getByApplyNo(String applyNo) {
         return appointmentMapper.getByApplyNo(applyNo);
     }

--
Gitblit v1.9.3