Pārlūkot izejas kodu

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_java

caoliqin 4 dienas atpakaļ
vecāks
revīzija
fd99bc447d
22 mainītis faili ar 1887 papildinājumiem un 19 dzēšanām
  1. 31 11
      fs-admin/src/main/java/com/fs/his/task/Task.java
  2. 26 0
      fs-service/src/main/java/com/fs/his/domain/HsyyValidationResult.java
  3. 80 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/AdministrationRoute.java
  4. 54 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/AntibioticLevel.java
  5. 58 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/CardType.java
  6. 57 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/DecoctionRequirement.java
  7. 127 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/DrugFormulation.java
  8. 55 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/EducationLevel.java
  9. 59 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/ExaminationType.java
  10. 55 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/Gender.java
  11. 56 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/IdCardType.java
  12. 57 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/LaboratoryType.java
  13. 57 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/MedicationRoute.java
  14. 58 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/PaymentType.java
  15. 64 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/PoliticalStatus.java
  16. 84 0
      fs-service/src/main/java/com/fs/his/enums/hsyy/ProfessionalTitle.java
  17. 2 0
      fs-service/src/main/java/com/fs/his/mapper/FsStoreSubOrderMapper.java
  18. 432 0
      fs-service/src/main/java/com/fs/his/param/FsSubOrderHsyyParam.java
  19. 4 0
      fs-service/src/main/java/com/fs/his/service/IFsStoreSubOrderService.java
  20. 421 4
      fs-service/src/main/java/com/fs/his/service/impl/FsStoreSubOrderServiceImpl.java
  21. 46 0
      fs-service/src/main/java/com/fs/his/utils/HsyyPushApiClientUtil.java
  22. 4 4
      fs-service/src/main/java/com/fs/live/vo/LiveAfterSalesVo.java

+ 31 - 11
fs-admin/src/main/java/com/fs/his/task/Task.java

@@ -1,12 +1,11 @@
 package com.fs.his.task;
 
+import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.service.impl.SmsServiceImpl;
@@ -23,16 +22,11 @@ import com.fs.company.vo.RedPacketMoneyVO;
 import com.fs.course.dto.BatchSendCourseAllDTO;
 import com.fs.course.mapper.FsCourseRedPacketLogMapper;
 import com.fs.course.service.IFsCourseWatchLogService;
-import com.fs.course.service.IFsUserCourseOrderService;
 import com.fs.course.service.ITencentCloudCosService;
 import com.fs.erp.domain.ErpDeliverys;
-import com.fs.erp.domain.ErpOrder;
 import com.fs.erp.domain.ErpOrderQuery;
-import com.fs.erp.domain.FsErpFinishPush;
 import com.fs.erp.dto.ErpOrderQueryRequert;
 import com.fs.erp.dto.ErpOrderQueryResponse;
-import com.fs.erp.dto.ErpOrderResponse;
-import com.fs.erp.mapper.FsErpFinishPushMapper;
 import com.fs.erp.service.IErpOrderService;
 import com.fs.fastGpt.domain.*;
 import com.fs.fastGpt.mapper.FastGptChatSessionMapper;
@@ -41,7 +35,6 @@ import com.fs.fastGpt.service.AiHookService;
 import com.fs.fastGpt.service.IFastgptEventLogTotalService;
 import com.fs.fastgptApi.util.AudioUtils;
 import com.fs.fastgptApi.vo.AudioVO;
-import com.fs.gtPush.mapper.PushLogMapper;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.config.StoreConfig;
 import com.fs.his.domain.*;
@@ -52,13 +45,11 @@ import com.fs.his.mapper.*;
 import com.fs.his.param.FsInquiryOrderFinishParam;
 import com.fs.his.param.FsPackageOrderCancelParam;
 import com.fs.his.service.*;
-import com.fs.his.service.impl.FsPackageOrderServiceImpl;
 import com.fs.his.utils.ConfigUtil;
 import com.fs.his.vo.FsSubOrderResultVO;
 import com.fs.hisStore.domain.FsStoreOrderScrm;
 import com.fs.hisStore.domain.FsStorePaymentScrm;
 import com.fs.hisStore.mapper.FsStorePaymentScrmMapper;
-import com.fs.hisStore.service.IFsStorePaymentScrmService;
 import com.fs.huifuPay.domain.HuiFuQueryOrderResult;
 import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayQueryRequest;
 import com.fs.huifuPay.service.HuiFuService;
@@ -90,8 +81,8 @@ import org.springframework.stereotype.Component;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.concurrent.CompletableFuture;
 import java.util.function.Consumer;
@@ -907,6 +898,35 @@ public class Task {
         }
     }
 
+    /**
+     * 推送河山医院
+     */
+    public void puSubStoreOrderHsyy() {
+        // 获取时间并格式化为字符串
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+
+        String todayStartStr = LocalDateTime.now()
+                .withHour(0)
+                .withMinute(0)
+                .withSecond(0)
+                .withNano(0)
+                .format(formatter);
+
+        String yesterdayStartStr = LocalDateTime.now()
+                .minusDays(1)
+                .withHour(0)
+                .withMinute(0)
+                .withSecond(0)
+                .withNano(0)
+                .format(formatter);
+
+        List<FsStoreSubOrder> list = fsStoreSubOrderService.selectFsStoreSubOrderListByCreateTime(yesterdayStartStr, todayStartStr);
+        log.info("------>>>>>>"+todayStartStr+"推送" + yesterdayStartStr+"的子订单数据共:" + list.size() + "条");
+        if(CollectionUtil.isNotEmpty(list)){
+            fsStoreSubOrderService.pushHsyy(list);
+        }
+    }
+
     public void refundOp() {
         List<FsStoreAfterSales> list = fsStoreAfterSalesService.selectFsStoreAfterSalesByDoAudit();
         if (list != null) {

+ 26 - 0
fs-service/src/main/java/com/fs/his/domain/HsyyValidationResult.java

@@ -0,0 +1,26 @@
+package com.fs.his.domain;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @Author:peicj
+ * @Description: 验证订单数据
+ * @Date:2026/1/7 14:58
+ */
+@Data
+public class HsyyValidationResult {
+
+    private boolean isValid = true;
+    private String message = "";
+    private FsPatient patient;
+    private FsDoctor doctor;
+    private FsDoctor drugDoctor;
+    private FsDepartment department;
+    private FsInquiryOrder inquiryOrder;
+    private FsPrescribe prescribe;
+    private FsHospital hospital;
+    private FsStore store;
+    private List<FsPrescribeDrug> prescribeDrugs;
+}

+ 80 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/AdministrationRoute.java

@@ -0,0 +1,80 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 给药途径
+ * @Date:2026/1/5 11:23
+ */
+public enum AdministrationRoute {
+
+    // 基础给药途径
+    ORAL(1, "口服"),
+    RECTAL(2, "直肠给药"),
+    SUBLINGUAL(3, "舌下给药"),
+    INJECTION(4, "注射给药"),
+    INHALATION(5, "吸入给药"),
+    LOCAL_APPLICATION(6, "局部用药"),
+    OTHER_ROUTE(9, "其他给药途径"),
+
+    // 注射给药子类型
+    SUBCUTANEOUS_INJECTION(401, "皮下注射"),
+    INTRADERMAL_INJECTION(402, "皮内注射"),
+    INTRAMUSCULAR_INJECTION(403, "肌肉注射"),
+    INTRAVENOUS_INJECTION(404, "静脉注射或静脉滴注"),
+
+    // 局部用药子类型
+    INTRATHECAL_USE(601, "椎管内用药"),
+    INTRA_ARTICULAR_USE(602, "关节腔内用药"),
+    PLEURAL_CAVITY_USE(603, "胸膜腔用药"),
+    PERITONEAL_CAVITY_USE(604, "腹腔用药"),
+    VAGINAL_USE(605, "阴道用药"),
+    TRACHEAL_USE(606, "气管内用药"),
+    EYE_DROPS(607, "滴眼"),
+    NASAL_DROPS(608, "滴鼻"),
+    THROAT_SPRAY(609, "喷喉"),
+    SUBLINGUAL_USE(610, "含化"),
+    WOUND_DRESSING(611, "敷伤口"),
+    SKIN_APPLICATION(612, "擦皮肤"),
+    OTHER_LOCAL_ROUTE(699, "其他局部给药途径");
+
+    private final int code;
+    private final String description;
+
+    AdministrationRoute(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static AdministrationRoute fromCode(int code) {
+        for (AdministrationRoute route : values()) {
+            if (route.code == code) {
+                return route;
+            }
+        }
+        return OTHER_ROUTE; // 默认返回其他给药途径
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (AdministrationRoute route : values()) {
+            if (route.description.equals(description)) {
+                return route.code;
+            }
+        }
+        return OTHER_ROUTE.code;
+    }
+}

+ 54 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/AntibioticLevel.java

@@ -0,0 +1,54 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 抗生素级别代码
+ * @Date:2026/1/5 11:30
+ */
+public enum AntibioticLevel {
+
+    SPECIAL_LEVEL(1, "特殊级"),
+    RESTRICTED_LEVEL(2, "限制级"),
+    NON_RESTRICTED_LEVEL(3, "非限制级"),
+    OTHER(99, "其他");
+
+    private final int code;
+    private final String description;
+
+    AntibioticLevel(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static AntibioticLevel fromCode(int code) {
+        for (AntibioticLevel level : values()) {
+            if (level.code == code) {
+                return level;
+            }
+        }
+        return OTHER; // 默认返回其他
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (AntibioticLevel level : values()) {
+            if (level.description.equals(description)) {
+                return level.code;
+            }
+        }
+        return OTHER.code;
+    }
+}

+ 58 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/CardType.java

@@ -0,0 +1,58 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 卡类型
+ * @Date:2026/1/5 11:13
+ */
+public enum CardType {
+
+    HOSPITAL_TREATMENT_CARD(1, "院内诊疗卡"),
+    VIRTUAL_CARD(2, "虚拟卡"),
+    HEALTH_CARD(3, "健康卡"),
+    SOCIAL_SECURITY_CARD(4, "社保卡"),
+    MEDICAL_INSURANCE_CARD(5, "医保卡"),
+    CITIZEN_CARD(6, "市民卡"),
+    OTHER(9, "其它");
+
+    private final int code;
+    private final String description;
+
+    CardType(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static CardType fromCode(int code) {
+        for (CardType cardType : values()) {
+            if (cardType.code == code) {
+                return cardType;
+            }
+        }
+        return OTHER; // 默认返回其它
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (CardType cardType : values()) {
+            if (cardType.description.equals(description)) {
+                return cardType.code;
+            }
+        }
+        return OTHER.code;
+    }
+}

+ 57 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/DecoctionRequirement.java

@@ -0,0 +1,57 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 煎煮要求
+ * @Date:2026/1/5 11:26
+ */
+public enum DecoctionRequirement {
+
+    PRE_DECOCION(1, "先煎"),
+    POST_ADDITION(2, "后下"),
+    WRAPPED_DECOCION(3, "包煎"),
+    SEPARATE_DECOCION(4, "另煎"),
+    MELTING(5, "烊化"),
+    FLUSHING(6, "冲服"),
+    OTHER(99, "其他");
+
+    private final int code;
+    private final String description;
+
+    DecoctionRequirement(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static DecoctionRequirement fromCode(int code) {
+        for (DecoctionRequirement requirement : values()) {
+            if (requirement.code == code) {
+                return requirement;
+            }
+        }
+        return OTHER; // 默认返回其他
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (DecoctionRequirement requirement : values()) {
+            if (requirement.description.equals(description)) {
+                return requirement.code;
+            }
+        }
+        return OTHER.code;
+    }
+}

+ 127 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/DrugFormulation.java

@@ -0,0 +1,127 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 药物剂型代码
+ * @Date:2026/1/5 11:27
+ */
+public enum DrugFormulation {
+
+    RAW_MATERIAL(0, "原料"),
+    UNCOATED_TABLETS(1, "片剂(素片,压制片),浸膏片,非包衣片"),
+    COATED_TABLETS(2, "糖衣片,包衣片,薄膜衣片"),
+    CHEWING_TABLETS(3, "咀嚼片,糖片,异型片,糖胶片"),
+    ENTERIC_COATED_TABLETS(4, "肠溶片(肠衣片)"),
+    MODIFIED_RELEASE_TABLETS(5, "调释片,缓释片,控释片,长效片"),
+    EFFERVESCENT_TABLETS(6, "泡腾片"),
+    SUBLINGUAL_TABLETS(7, "舌下片"),
+    LOZENGES(8, "含片,嗽口片(含嗽片),喉症片(喉片),口腔粘附片"),
+    EXTERNAL_TABLETS(9, "外用片,外用膜,坐药片,环型片"),
+    VAGINAL_TABLETS(10, "阴道片,外用阴道膜,阴道用药,阴道栓片"),
+    WATER_SOLUBLE_TABLETS(11, "水溶片,眼药水片"),
+    DISPERSIBLE_TABLETS(12, "分散片(适应片)"),
+    PAPER_TABLETS(13, "纸片(纸型片),膜片(薄膜片)"),
+    PILLS(14, "丸剂,药丸,眼丸,耳丸,糖丸,糖衣丸,浓缩丸,调释丸,水丸"),
+    POWDER_INJECTION(15, "粉针剂(冻干粉针剂),冻干粉"),
+    INJECTION(16, "注射液(水针剂),油针剂,混悬针剂"),
+    INJECTION_SOLVENT(17, "注射溶媒(在16有冲突时,可代油针剂,混悬针剂)"),
+    INFUSION(18, "输液剂,血浆代用品"),
+    CAPSULES(19, "胶囊剂,硬胶囊"),
+    SOFT_CAPSULES(20, "软胶囊,滴丸,胶丸"),
+    ENTERIC_COATED_CAPSULES(21, "肠溶胶囊,肠溶胶丸"),
+    MODIFIED_RELEASE_CAPSULES(22, "调释胶囊,控释胶囊,缓释胶囊"),
+    SOLUTION(23, "溶液剂,含漱液,内服混悬液"),
+    MIXTURE(24, "合剂"),
+    EMULSION(25, "乳剂,乳胶"),
+    GEL(26, "凝胶剂,胶剂(胶体),胶冻,胶体微粒"),
+    MUCILAGE(27, "胶浆剂"),
+    AROMATIC_WATER(28, "芳香水剂(露剂)"),
+    DROPS(29, "滴剂"),
+    SYRUP(30, "糖浆剂(蜜浆剂)"),
+    ORAL_LIQUID(31, "口服液"),
+    EXTRACT(32, "浸膏剂"),
+    FLUID_EXTRACT(33, "流浸膏剂"),
+    TINCTURE(34, "酊剂"),
+    SPIRIT(35, "醑剂"),
+    JUICE(36, "酏剂"),
+    LINIMENT(37, "洗剂,阴道冲洗剂"),
+    RUBEFACIENT(38, "搽剂(涂剂,擦剂),外用混悬液剂"),
+    OIL(39, "油剂,甘油剂"),
+    COLLIDION(40, "棉胶剂(火棉胶剂)"),
+    FILM_FORMING_AGENT(41, "涂膜剂"),
+    APPLICATION(42, "涂布剂"),
+    EYE_DROPS(43, "滴眼剂,洗眼剂,粉剂眼花缭乱药"),
+    NASAL_DROPS(44, "滴鼻剂,洗鼻剂"),
+    EAR_DROPS(45, "滴耳剂,洗耳剂"),
+    ORAL_CAVITY_AGENT(46, "口腔药剂,口腔用药,牙科用药"),
+    ENEMA(47, "灌肠剂"),
+    OINTMENT(48, "软膏剂(油膏剂,水膏剂)"),
+    CREAM(49, "霜剂(乳膏剂)"),
+    PASTE(50, "糊剂"),
+    PLASTER(51, "硬膏剂,橡皮膏"),
+    EYE_OINTMENT(52, "眼膏剂"),
+    POWDER(53, "散剂(内服散剂,外用散剂,粉剂,撒布粉"),
+    GRANULES(54, "颗粒剂(冲剂),晶剂(结晶,晶体),干糖浆"),
+    EFFERVESCENT_GRANULES(55, "泡腾颗粒剂"),
+    MODIFIED_RELEASE_GRANULES(56, "调释颗粒剂,缓释颗粒剂"),
+    AEROSOL(57, "气雾剂,水雾剂, (加抛射剂)"),
+    SPRAY(58, "喷雾剂, (不加抛射剂)"),
+    SUSPENSION_AEROSOL(59, "混悬雾剂, (水,气,粉三相)"),
+    INHALATION_AGENT(60, "吸入药剂(鼻吸式),粉雾剂"),
+    FILM(61, "膜剂(口腔膜)"),
+    SPONGE(62, "海绵剂"),
+    SUPPOSITORY(63, "栓剂,痔疮栓,耳栓"),
+    IMPLANT_SUPPOSITORY(64, "植入栓"),
+    TRANSDERMAL_AGENT(65, "透皮剂,贴剂(贴膏,贴膜),贴片"),
+    CONTROLLED_RELEASE_TRANSDERMAL(66, "控释透皮剂,控释贴片,控释口颊片"),
+    SCARIFICATION_AGENT(67, "划痕剂"),
+    PEARL_CHAIN(68, "珠链(泥珠链)"),
+    LOZENGE(69, "锭剂,糖锭"),
+    MICROCAPSULE(70, "微囊胶囊(微丸胶囊)"),
+    DRY_SUSPENSION(71, "干混悬剂(干悬乳剂/口服乳干粉)"),
+    INHALANT(72, "吸放剂(气体)"),
+    KIT(90, "试剂盒(诊断用试剂),药盒"),
+    OTHER(99, "其它剂型(空心胶囊,绷带,纱布,胶布");
+
+    private final int code;
+    private final String description;
+
+    DrugFormulation(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static DrugFormulation fromCode(int code) {
+        for (DrugFormulation formulation : values()) {
+            if (formulation.code == code) {
+                return formulation;
+            }
+        }
+        return OTHER; // 默认返回其他
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (DrugFormulation formulation : values()) {
+            if (formulation.description.equals(description)) {
+                return formulation.code;
+            }
+        }
+        return OTHER.code;
+    }
+
+}

+ 55 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/EducationLevel.java

@@ -0,0 +1,55 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 学历代码
+ * @Date:2026/1/5 11:21
+ */
+public enum EducationLevel {
+
+    DOCTORAL_GRADUATE(11, "博士研究生"),
+    MASTER_GRADUATE(14, "硕士研究生"),
+    BACHELOR(21, "本科"),
+    ASSOCIATE(31, "专科"),
+    OTHER(90, "其他");
+
+    private final int code;
+    private final String description;
+
+    EducationLevel(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static EducationLevel fromCode(int code) {
+        for (EducationLevel level : values()) {
+            if (level.code == code) {
+                return level;
+            }
+        }
+        return OTHER; // 默认返回其他
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (EducationLevel level : values()) {
+            if (level.description.equals(description)) {
+                return level.code;
+            }
+        }
+        return OTHER.code;
+    }
+}

+ 59 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/ExaminationType.java

@@ -0,0 +1,59 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 检查类型
+ * @Date:2026/1/5 11:31
+ */
+public enum ExaminationType {
+
+    CT(1, "CT"),
+    RADIOLOGY(2, "放射线"),
+    MRI(3, "核磁"),
+    ULTRASOUND(4, "超声"),
+    ECG(5, "心电"),
+    EEG(6, "脑电"),
+    GASTROSCOPY(7, "胃镜"),
+    COLONOSCOPY(8, "肠镜"),
+    OTHER(9, "其他检查");
+
+    private final int code;
+    private final String description;
+
+    ExaminationType(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static ExaminationType fromCode(int code) {
+        for (ExaminationType type : values()) {
+            if (type.code == code) {
+                return type;
+            }
+        }
+        return OTHER; // 默认返回其他检查
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (ExaminationType type : values()) {
+            if (type.description.equals(description)) {
+                return type.code;
+            }
+        }
+        return OTHER.code;
+    }
+}

+ 55 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/Gender.java

@@ -0,0 +1,55 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 性别
+ * @Date:2026/1/5 11:10
+ */
+public enum Gender {
+
+    UNKNOWN(0, "未知"),
+    MALE(1, "男"),
+    FEMALE(2, "女"),
+    OTHER(9, "其他");
+
+    private final int code;
+    private final String description;
+
+    Gender(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static Gender fromCode(int code) {
+        for (Gender gender : values()) {
+            if (gender.code == code) {
+                return gender;
+            }
+        }
+        return UNKNOWN; // 默认返回未知
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (Gender gender : values()) {
+            if (gender.description.equals(description)) {
+                return gender.code;
+            }
+        }
+        return UNKNOWN.code;
+    }
+}

+ 56 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/IdCardType.java

@@ -0,0 +1,56 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 证件类型
+ * @Date:2026/1/5 11:15
+ */
+public enum IdCardType {
+
+    ID_CARD(1, "身份证"),
+    HK_MACAU_PASS(2, "港澳居民来往内地通行证"),
+    TAIWAN_PASS(3, "台湾居民来往大陆通行证/台胞证"),
+    PASSPORT(4, "护照"),
+    OTHER(9, "其它");
+
+    private final int code;
+    private final String description;
+
+    IdCardType(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static IdCardType fromCode(int code) {
+        for (IdCardType idCardType : values()) {
+            if (idCardType.code == code) {
+                return idCardType;
+            }
+        }
+        return OTHER; // 默认返回其它
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (IdCardType idCardType : values()) {
+            if (idCardType.description.equals(description)) {
+                return idCardType.code;
+            }
+        }
+        return OTHER.code;
+    }
+}

+ 57 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/LaboratoryType.java

@@ -0,0 +1,57 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 检验类型
+ * @Date:2026/1/5 11:33
+ */
+public enum LaboratoryType {
+
+    IMMUNOLOGY(1, "免疫"),
+    MICROBIOLOGY(2, "微生物"),
+    BIOCHEMISTRY(3, "生化"),
+    BIOMOLECULAR(4, "生物分子"),
+    CLINICAL_LAB(5, "临检"),
+    EMERGENCY_LAB(6, "急诊检验"),
+    OTHER(9, "其他检验");
+
+    private final int code;
+    private final String description;
+
+    LaboratoryType(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static LaboratoryType fromCode(int code) {
+        for (LaboratoryType type : values()) {
+            if (type.code == code) {
+                return type;
+            }
+        }
+        return OTHER; // 默认返回其他检验
+    }
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (LaboratoryType type : values()) {
+            if (type.description.equals(description)) {
+                return type.code;
+            }
+        }
+        return OTHER.code;
+    }
+}

+ 57 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/MedicationRoute.java

@@ -0,0 +1,57 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 用药途径
+ * @Date:2026/1/5 11:34
+ */
+public enum MedicationRoute {
+
+    CHRONIC_DISEASE(1, "慢病用药"),
+    GYNECOLOGY(2, "妇科用药"),
+    DERMATOLOGY(3, "皮肤用药"),
+    ONCOLOGY(4, "肿瘤用药"),
+    CARDIOVASCULAR(5, "心脑血管"),
+    PEDIATRIC(6, "儿童用药"),
+    OTHER(7, "其他");
+
+    private final int code;
+    private final String description;
+
+    MedicationRoute(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static MedicationRoute fromCode(int code) {
+        for (MedicationRoute route : values()) {
+            if (route.code == code) {
+                return route;
+            }
+        }
+        return OTHER; // 默认返回其他
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (MedicationRoute route : values()) {
+            if (route.description.equals(description)) {
+                return route.code;
+            }
+        }
+        return OTHER.code;
+    }
+}

+ 58 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/PaymentType.java

@@ -0,0 +1,58 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 支付类型
+ * @Date:2026/1/5 11:16
+ */
+public enum PaymentType {
+
+    CASH(1, "现金"),
+    ONLINE_PAYMENT(2, "在线支付"),
+    WECHAT(21, "微信"),
+    ALIPAY(22, "支付宝"),
+    UNIONPAY(23, "银联"),
+    BANK(24, "银行"),
+    OTHER(99, "其他");
+
+    private final int code;
+    private final String description;
+
+    PaymentType(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static PaymentType fromCode(int code) {
+        for (PaymentType paymentType : values()) {
+            if (paymentType.code == code) {
+                return paymentType;
+            }
+        }
+        return OTHER; // 默认返回其他
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (PaymentType paymentType : values()) {
+            if (paymentType.description.equals(description)) {
+                return paymentType.code;
+            }
+        }
+        return OTHER.code;
+    }
+}

+ 64 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/PoliticalStatus.java

@@ -0,0 +1,64 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 政治面貌国标码
+ * @Date:2026/1/5 11:20
+ */
+public enum PoliticalStatus {
+
+    CPC_MEMBER(1, "中国共产党党员"),
+    CPC_PROBATIONARY_MEMBER(2, "中国共产党预备党员"),
+    CYLC_MEMBER(3, "中国共产主义青年团团员"),
+    CMRPG_MEMBER(4, "中国国民党革命委员会会员"),
+    CDM_MEMBER(5, "中国民主同盟盟员"),
+    CDBM_MEMBER(6, "中国民主建国会会员"),
+    CFM_MEMBER(7, "中国民主促进会会员"),
+    CADPM_MEMBER(8, "中国农工民主党党员"),
+    CCPP_MEMBER(9, "中国致公党党员"),
+    JSS_MEMBER(10, "九三学社社员"),
+    TDMAT_MEMBER(11, "台湾民主自治同盟盟员"),
+    NON_PARTISAN(12, "无党派民主人士"),
+    PUBLIC(13, "群众");
+
+    private final int code;
+    private final String description;
+
+    PoliticalStatus(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static PoliticalStatus fromCode(int code) {
+        for (PoliticalStatus status : values()) {
+            if (status.code == code) {
+                return status;
+            }
+        }
+        return PUBLIC; // 默认返回群众
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (PoliticalStatus status : values()) {
+            if (status.description.equals(description)) {
+                return status.code;
+            }
+        }
+        return PUBLIC.code;
+    }
+}

+ 84 - 0
fs-service/src/main/java/com/fs/his/enums/hsyy/ProfessionalTitle.java

@@ -0,0 +1,84 @@
+package com.fs.his.enums.hsyy;
+
+/**
+ * @Author:peicj
+ * @Description: 职称
+ * @Date:2026/1/5 11:19
+ */
+public enum ProfessionalTitle {
+
+    // 卫生技术人员(医疗)
+    MEDICAL_STAFF(23, "卫生技术人员(医疗)"),
+    CHIEF_PHYSICIAN(231, "主任医师"),
+    VICE_CHIEF_PHYSICIAN(232, "副主任医师"),
+    ATTENDING_PHYSICIAN(233, "主治医师"),
+    PHYSICIAN(234, "医师"),
+    MEDICAL_CLERK(235, "医士"),
+
+    // 卫生技术人员(药剂)
+    PHARMACY_STAFF(24, "卫生技术人员(药剂)"),
+    CHIEF_PHARMACIST(241, "主任药师"),
+    VICE_CHIEF_PHARMACIST(242, "副主任药师"),
+    CHIEF_PHARMACY_TECHNICIAN(243, "主管药师"),
+    PHARMACIST(244, "药师"),
+    PHARMACY_CLERK(245, "药士"),
+
+    // 卫生技术人员(护理)
+    NURSING_STAFF(25, "卫生技术人员(护理)"),
+    CHIEF_NURSE(251, "主任护师"),
+    VICE_CHIEF_NURSE(252, "副主任护师"),
+    CHIEF_NURSING_TECHNICIAN(253, "主管护师"),
+    NURSE(254, "护师"),
+    NURSE_ASSISTANT(255, "护士"),
+
+    // 卫生技术人员(技师)
+    TECHNICIAN_STAFF(26, "卫生技术人员(技师)"),
+    CHIEF_TECHNICIAN(261, "主任技师"),
+    VICE_CHIEF_TECHNICIAN(262, "副主任技师"),
+    CHIEF_TECHNICAL_SUPERVISOR(263, "主管技师"),
+    TECHNICIAN(264, "技师"),
+    TECHNICAL_CLERK(265, "技士"),
+
+    OTHER(999, "其他");
+
+    private final int code;
+    private final String description;
+
+    ProfessionalTitle(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    // 根据code获取枚举
+    public static ProfessionalTitle fromCode(int code) {
+        for (ProfessionalTitle title : values()) {
+            if (title.code == code) {
+                return title;
+            }
+        }
+        return OTHER; // 默认返回其他
+    }
+
+    // 根据code获取描述
+    public static String getDescriptionByCode(int code) {
+        return fromCode(code).getDescription();
+    }
+
+    // 根据描述获取code
+    public static int getCodeByDescription(String description) {
+        for (ProfessionalTitle title : values()) {
+            if (title.description.equals(description)) {
+                return title.code;
+            }
+        }
+        return OTHER.code;
+    }
+}

+ 2 - 0
fs-service/src/main/java/com/fs/his/mapper/FsStoreSubOrderMapper.java

@@ -168,4 +168,6 @@ public interface FsStoreSubOrderMapper
             "        </where> "+
             "</script>"})
     Long selectFsStoreSubOrderListCount(FsStoreOrderParam fsStoreSubOrder);
+    @Select("SELECT * FROM fs_store_sub_order WHERE create_time >= #{yesterdayStartStr} and create_time <= #{todayStartStr} order by create_time")
+    List<FsStoreSubOrder> selectFsStoreSubOrderListByCreateTime(@Param("yesterdayStartStr") String yesterdayStartStr, @Param("todayStartStr") String todayStartStr);
 }

+ 432 - 0
fs-service/src/main/java/com/fs/his/param/FsSubOrderHsyyParam.java

@@ -0,0 +1,432 @@
+package com.fs.his.param;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @Author:peicj
+ * @Description: 河山医院请求参数
+ * @Date:2026/1/5 9:57
+ * @Fields:
+ * userinfo List 是 患者信息
+ * department List 是 科室信息
+ * doctor List 是 医生信息
+ * medicine List 是 药品信息
+ * offline List 是 线下初诊信息
+ * recipe List 是 处方信息
+ * sign List 是 签名
+ * uniacid String (32) 是 Uniacid 接口提供方提供
+ * orderNo String (255) 是 订单号
+ * hname String (255) 是 医院名称
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class FsSubOrderHsyyParam {
+
+    /**
+     * 患者信息
+     * @Fields:
+     * name String (32) 是 患者姓名
+     * numcard String (16) 是 患者身份证
+     * birthday String (16) 是 患者生日
+     * sex String (2) 是 患者性别
+     * datetime String (16) 是 患者出生日期
+     * age decimal(10,1) 是 患者年龄
+     * tel String (32) 是 患者电话
+     * present_illness_history String (50) 是 现病史
+     * past_history String (200) 是 既往史
+     * personal_history String (200) 是 个人史
+     * family_history String (200) 是 家族史
+     * allergy String (200) 是 过敏史
+     * tijian String (200) 是 体检
+     * usertime String (16) 是 就诊时间
+     */
+    private UserinfoType userinfo;
+
+    /**
+     * 科室信息
+     * @Fields:
+     * dep_name String (50) 是 科室名称 例子:中医科
+     * dep_id String (50) 是 科室 ID HIS 对应 ID
+     * dep_code String (50) 是 科室编码 例子:A50
+     */
+    private DepartmentType department;
+
+    /**
+     * 医生信息
+     * @Fields:
+     * doc_name String (50) 是 医生姓名
+     * doc_numcard String (50) 是 医生身份证号
+     * doc_sex String (50) 是 医生性别
+     * doc_tel String (50) 是 医生电话
+     * doc_zhicheng String (50) 是 医生职称
+     * doc_code String (50) 是 医生编码
+     * doc_type String (50) 是 医生类型 1 医生 3 药师
+     * doc_rank String (50) 是 医生职级
+     * doc_license_no String (50) 是 资格证号码
+     * doc_license_date String (50) 是 资格证发证日期 格式:YYYY-MM-DD
+     * doc_practice_no String (50) 是 执业证号码
+     * doc_practice_address String (50) 是 第一执业地址
+     * doc_practice_category String (50) 是 执业类型
+     * doc_practice_scope String (50) 是 执业范围
+     * doc_first_date String (50) 是 执业证首次注册日期 格式:YYYY-MM-DD
+     * doc_current_date String (50) 是 执业证本次注册日期 格式:YYYY-MM-DD
+     * doc_valid_date String (50) 是 执业证注册有效期 格式:YYYY-MM-DD
+     * doc_politics_status String (50) 是 政治面貌
+     * doc_starting_work_date String (50) 是 参加工作日期 格式:YYYY-MM-DD
+     * doc_independent_work_date String (50) 是 独立工作日期 格式:YYYY-MM-DD
+     * doc_fullTime_degree String (50) 是 全日制最高所学专业情况学历
+     * doc_full_time_degree_year String (50) 是 全日制最高所学专业情况学历取得年份 格式:YYYY
+     */
+    private DoctorType doctor;
+
+    /**
+     * 药品信息
+     * @Fields:
+     * bm String (64) 是 编码
+     * store_id String (64) 否 药店ID
+     * store_name String (255) 否 药店名称
+     * sname String (255) 是 药品名称(商品名)
+     * tname String (255) 是 药品通用名
+     * price decimal(11,2) 是 单价 单位:分
+     * guige String (255) 是 规格
+     * doc_num String (50) 是 批准文号
+     * component String (255) 是 成分
+     * character String (255) 是 性状
+     * adapt String (255) 是 适应症
+     * use String (255) 是 用法用量
+     * dosage String (255) 是 剂量
+     * frequency String (255) 是 使用频次
+     * unit String (255) 是 剂量单位
+     * adverse_reactions String (255) 是 不良反应
+     * dosageform String (255) 是 剂型
+     * package_spec String (255) 是 包装规格 例:0.5g*30 片/盒
+     * count String (10) 是 数量
+     * amount decimal(11,2) 是 金额 单位:分
+     * health_care_code String (100) 是 医保编码
+     * health_care_type String (2) 是 医保类型 药品医保级别,1-有自付,2-无自付,3- 全自付
+     * is_base String (2) 是 是否基药 0 否 1 是
+     * manufacturer String (100) 是 生产厂商
+     * has_prescription String (2) 是 是否包含处方药 0 否 1 是
+     * supplier String (32) 是 药品供应商
+     * medication_route String (2) 是 用药途径 参考字典
+     * checker_name String (50) 审核人姓名
+     * dispenser_name String (50) 发药人姓名
+     */
+    private List<MedicineType> medicine;
+
+    /**
+     * 线下初诊信息
+     * @Fields:
+     * medical_record_no String (50) 是 患者病历号 需要和HIS一样
+     * visit_no String (50) 是 就诊号
+     * visit_date String (10) 是 就诊日期
+     * offline_dept_code String (50) 是 线下初诊就诊科室代号
+     * offline_dept_name String (100) 是 线下初诊就诊科室名
+     * offline_doctor_code String (50) 是 线下初诊就诊医生代号
+     * offline_diagnosis String (100) 是 线下初诊就诊诊断
+     */
+    private OfflineType offline;
+
+    /**
+     * 处方信息
+     * @Fields:
+     * recipe_id String(64) 是 处方 id 需要和HIS相同
+     * serial_no String (128) 是 处方序列号
+     * create_time String(32) 是 开方时间 格式:YYYY-MM-DD HH24:MI:SS
+     * status String (16) 是 处方状态
+     * hospital_name String (50) 是 医院名称
+     * dept_code String (32) 是 科室编码
+     * dept_name String (32) 是 科室名称
+     * doc_code String (32) 是 医生编码
+     * doc_name String (50) 是 医生姓名
+     * zhusu String (50) 是 主诉
+     * advice String (128) 是 医嘱
+     * yijian String (50) 是 意见
+     * diagnose String (64) 是 诊断(ICD10)
+     * diagnose_code String (64) 是 诊断编码(ICD10)
+     * recipe_type String (2) 是 处方分类 1、普通处方 2、儿童处方 3、急诊处方 4、毒麻处方 5、一类精神处方 6、二类精神处方 99、未知
+     * getType String(2) 是 药品发放类型 1-在线配送 2- 自提 3-药店配送
+     * Recipe_img String(500) 医保处方地址
+     * Patienttype String(500) 慢病处方/特病处方
+     * Pharmacy String(500) 药店名
+     * Consultationtype String(500) 视频/图文
+     * Ybtype String(10) 医保区划
+     * process List 是 问诊过程
+     * process_time 是 时间 格式:YYYY-MM-DD HH24:MI:SS
+     * role 是 角色 1-患者 2-医生
+     * content 是 内容
+     */
+    private RecipeType recipe;
+
+    /**
+     * 签名信息
+     * @Fields:
+     * role String (16) 是 角色 处方医生/审核人/发药人等
+     * executor String (16) 是 执行人姓名
+     * person_code String (16) 是 执行人编码
+     * exe_time String (32) 是 执行时间 格式:YYYY-MM-DD HH24:MI:SS
+     */
+    private List<SignType> sign;
+    //Uniacid 接口提供方提供
+    private Integer uniacid;
+    //订单号
+    private String orderNo;
+    //医院名称
+    private String hname;
+
+    private Integer ybtype;
+
+    @Data
+    @Builder
+    @AllArgsConstructor
+    @NoArgsConstructor
+    public static class UserinfoType {
+        private String name;
+        /**
+         * {@link com.fs.his.enums.hsyy.IdCardType}
+         */
+        private String numcard;
+        private String birthday;
+        /**
+         * {@link com.fs.his.enums.hsyy.Gender}
+         */
+        private String sex;
+        private String datetime;
+        private Integer age;
+        private String tel;
+        private String present_illness_history;
+        private String past_history;
+        private String personal_history;
+        private String family_history;
+        private String allergy;
+        private String tijian;
+        private String usertime;
+
+    }
+
+    @Data
+    @Builder
+    @AllArgsConstructor
+    @NoArgsConstructor
+    public static class DepartmentType {
+        private String dep_name;
+        private Integer dep_id;
+        private String dep_code;
+
+    }
+
+    @Data
+    @Builder
+    @AllArgsConstructor
+    @NoArgsConstructor
+    public static class DoctorType {
+        private String doc_name;
+        /**
+         * {@link com.fs.his.enums.hsyy.IdCardType}
+         */
+        private String doc_numcard;
+        /**
+         * {@link com.fs.his.enums.hsyy.Gender}
+         */
+        private Integer doc_sex;
+        private String doc_tel;
+        /**
+         * {@link com.fs.his.enums.hsyy.ProfessionalTitle}
+         */
+        private String doc_zhicheng;
+        private String doc_code;
+        /**
+         * 医生类型 1 医生 3 药师
+         */
+        private String doc_type;
+        private String doc_rank;
+        private String doc_license_no;
+        /**
+         * 资格证发证日期 格式:YYYY-MM-DD
+         */
+        private String doc_license_date;
+        private String doc_practice_no;
+        private String doc_practice_address;
+        private String doc_practice_category;
+        private String doc_practice_scope;
+        /**
+         * 执业证首次注册日期 格式:YYYY-MM-DD
+         */
+        private String doc_first_date;
+        /**
+         *执业证本次注册日期 格式:YYYY-MM-DD
+         */
+        private String doc_current_date;
+        /**
+         * 执业证注册有效期 格式:YYYY-MM-DD
+         */
+        private String doc_valid_date;
+        /**
+         * {@link com.fs.his.enums.hsyy.PoliticalStatus}
+         */
+        private String doc_politics_status;
+        /**
+         * 参加工作日期 格式:YYYY-MM-DD
+         */
+        private String doc_starting_work_date;
+        /**
+         * 独立工作日期 格式:YYYY-MM-DD
+         */
+        private String doc_independent_work_date;
+        /**
+         * {@link com.fs.his.enums.hsyy.EducationLevel}
+         */
+        private String doc_fullTime_degree;
+        /**
+         * 满级教育年限 格式:YYYY
+         */
+        private String doc_full_time_degree_year;
+
+    }
+
+    @Data
+    @Builder
+    @AllArgsConstructor
+    @NoArgsConstructor
+    public static class MedicineType {
+        private String bm;
+        private String store_id;
+        private String store_name;
+        private String sname;
+        private String tname;
+        private String price;
+        private String guige;
+        private String doc_num;
+        private String component;
+        private String character;
+        private String adapt;
+        private String use;
+        private String dosage;
+        private String frequency;
+        private String unit;
+        private String adverse_reactions;
+        private String dosageform;
+        private String package_spec;
+        private Integer count;
+        private Integer amount;
+        private String health_care_code;
+        private String health_care_type;
+        private String is_base;
+        private String manufacturer;
+        private String has_prescription;
+        private String supplier;
+        /**
+         * {@link com.fs.his.enums.hsyy.MedicationRoute}
+         */
+        private String medication_route;
+        private Integer getType;
+        private String checker_name;
+        private String dispenser_name;
+    }
+
+    @Data
+    @Builder
+    @AllArgsConstructor
+    @NoArgsConstructor
+    public static class OfflineType {
+        private String medical_record_no;
+        private Long visit_no;
+        private String visit_date;
+        private String offline_dept_code;
+        private String offline_dept_name;
+        private String offline_doctor_code;
+        private String offline_diagnosis;
+
+    }
+
+    @Data
+    @Builder
+    @AllArgsConstructor
+    @NoArgsConstructor
+    public static class RecipeType {
+        private Long recipe_id;
+        private String serial_no;
+        /**
+         * 开方时间 格式:YYYY-MM-DD HH24:MI:SS
+         */
+        private String create_time;
+        private String status;
+        private String hospital_name;
+        private String dept_code;
+        private String dept_name;
+        private String doc_code;
+        private String doc_name;
+        private String zhusu;
+        private String advice;
+        private String yijian;
+        private String diagnose;
+        private String diagnose_code;
+        /**
+         * 处方分类
+         * 1、普通处方
+         * 2、儿童处方
+         * 3、急诊处方
+         * 4、毒麻处方
+         * 5、一类精神处方
+         * 6、二类精神处方
+         * 99、未知
+         */
+        private String recipe_type;
+        /**
+         * 药品发放类型 1-在线配送 2- 自提 3-药店配送
+         */
+        private Integer getType;
+        private String Recipe_img;
+        /**
+         * 慢病处方/特病处方
+         */
+        private String Patienttype;
+        private String Pharmacy;
+        private String Consultationtype;
+        private String Ybtype;
+        private List<ProcessType> process;
+
+    }
+
+    @Data
+    @Builder
+    @AllArgsConstructor
+    @NoArgsConstructor
+    public static class ProcessType {
+        /**
+         * 时间 格式:YYYY-MM-DD HH24:MI:SS
+         */
+        private String process_time;
+        /**
+         * 角色 1-患者 2-医生
+         */
+        private String role;
+        private String content;
+
+    }
+
+    @Data
+    @Builder
+    @AllArgsConstructor
+    @NoArgsConstructor
+    public static class SignType {
+        /**
+         * 角色 处方医生/审核人/发药人等
+         */
+        private String role;
+        private String executor;
+        private String person_code;
+        /**
+         * 执行时间 格式:YYYY-MM-DD HH24:MI:SS
+         */
+        private String exe_time;
+
+    }
+}

+ 4 - 0
fs-service/src/main/java/com/fs/his/service/IFsStoreSubOrderService.java

@@ -77,4 +77,8 @@ public interface IFsStoreSubOrderService
     Boolean isEntityNull(FsStoreOrderParam fsStoreSubOrder);
 
     Long selectFsStoreSubOrderListCount(FsStoreOrderParam fsStoreSubOrder);
+
+    List<FsStoreSubOrder> selectFsStoreSubOrderListByCreateTime(String yesterdayStartStr, String todayStartStr);
+
+    void pushHsyy(List<FsStoreSubOrder> list);
 }

+ 421 - 4
fs-service/src/main/java/com/fs/his/service/impl/FsStoreSubOrderServiceImpl.java

@@ -6,31 +6,39 @@ import java.math.RoundingMode;
 import java.nio.charset.StandardCharsets;
 import java.text.SimpleDateFormat;
 import java.util.*;
-import java.util.logging.Logger;
 
+import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.IdUtil;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.fs.common.BeanCopyUtils;
-import com.fs.common.annotation.Log;
 import com.fs.common.utils.DateUtils;
+import com.fs.common.utils.StringUtils;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.domain.*;
 import com.fs.his.dto.FsPrescribeUsageDTO;
 import com.fs.his.dto.FsStoreOrderItemDTO;
+import com.fs.his.enums.hsyy.AdministrationRoute;
+import com.fs.his.enums.hsyy.EducationLevel;
+import com.fs.his.enums.hsyy.Gender;
+import com.fs.his.enums.hsyy.ProfessionalTitle;
 import com.fs.his.mapper.*;
 import com.fs.his.param.FsStoreOrderParam;
 import com.fs.his.param.FsSubOrderDrugListParam;
+import com.fs.his.param.FsSubOrderHsyyParam;
 import com.fs.his.param.FsSubOrderParam;
 import com.fs.his.utils.ConfigUtil;
+import com.fs.his.utils.HsyyPushApiClientUtil;
+import com.fs.his.utils.PhoneUtil;
 import com.fs.his.vo.FsStoreProductAttrVO;
 import com.fs.his.vo.FsStoreSubOrderListVO;
 import com.fs.his.vo.FsStoreSubOrderVO;
 import com.fs.his.vo.FsSubOrderResultVO;
-import com.qcloud.cos.transfer.Copy;
 import org.apache.http.HttpEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.util.EntityUtils;
+import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -69,7 +77,13 @@ public class FsStoreSubOrderServiceImpl implements IFsStoreSubOrderService
     FsStoreProductMapper fsStoreProductMapper;
     @Autowired
     ConfigUtil configUtil;
-    org.slf4j.Logger logger= LoggerFactory.getLogger(getClass());
+    Logger logger= LoggerFactory.getLogger(getClass());
+    @Autowired
+    private FsDepartmentMapper fsDepartmentMapper;
+    @Autowired
+    private FsInquiryOrderMapper fsInquiryOrderMapper;
+    @Autowired
+    private FsHospitalMapper fsHospitalMapper;
     /**
      * 查询订单
      *
@@ -649,4 +663,407 @@ public class FsStoreSubOrderServiceImpl implements IFsStoreSubOrderService
         return fsStoreSubOrderMapper.selectFsStoreSubOrderListCount(fsStoreSubOrder);
     }
 
+    @Override
+    public List<FsStoreSubOrder> selectFsStoreSubOrderListByCreateTime(String yesterdayStartStr, String todayStartStr) {
+        return fsStoreSubOrderMapper.selectFsStoreSubOrderListByCreateTime(yesterdayStartStr, todayStartStr);
+    }
+
+    /**
+     * 推送河山医院数据
+     * @param list 订单列表
+     */
+    @Override
+    public void pushHsyy(List<FsStoreSubOrder> list) {
+        SimpleDateFormat ymd = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat ymdhms = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        HsyyPushApiClientUtil hsyyPushApiClientUtil = new HsyyPushApiClientUtil();
+
+        for (FsStoreSubOrder order : list) {
+            try {
+                FsSubOrderHsyyParam param = processSingleOrder(order, ymd, ymdhms);
+                if (param == null) {
+                    continue;
+                }
+                String result = hsyyPushApiClientUtil.callApi(param);
+                handleApiResponse(order, result, param);
+            } catch (Exception e) {
+                logger.error("处理订单推送异常,订单ID: {}", order.getSubOrderId(), e);
+            }
+        }
+    }
+
+    /**
+     * 处理API响应
+     */
+    private void handleApiResponse(FsStoreSubOrder order, String result,FsSubOrderHsyyParam param) {
+        if (StringUtils.isEmpty(result)) {
+            logger.warn("订单 {} 推送返回结果为空", order.getSubOrderId());
+            return;
+        }
+
+        try {
+            result = JSON.parseObject(result, String.class);
+            // 解析响应结果
+            logger.info("订单 {} 推送响应: {}", order.getSubOrderId(), result);
+
+            JSONObject jsonObject = JSONObject.parseObject(result);
+            Integer code = jsonObject.getInteger("code");
+            if (code != null && code == 0) {
+                logger.info("订单 {} 推送成功", order.getSubOrderId());
+            } else {
+                String errorMsg = jsonObject.getString("msg");
+                logger.warn("订单 {} 推送失败: {},推送数据: {}",
+                        order.getSubOrderId(),
+                        errorMsg,
+                        JSONObject.toJSONString(param));
+            }
+        } catch (Exception e) {
+            logger.error("解析订单 {} 推送响应异常: {}", order.getSubOrderId(), e.getMessage());
+        }
+    }
+    private FsSubOrderHsyyParam processSingleOrder(FsStoreSubOrder order, SimpleDateFormat ymd, SimpleDateFormat ymdhms) {
+        // 验证订单必要数据
+        HsyyValidationResult hsyyValidationResult = validateOrderData(order);
+        if (!hsyyValidationResult.isValid()) {
+            logger.warn("订单 {} 验证失败: {}", order.getSubOrderId(), hsyyValidationResult.getMessage());
+            return null;
+        }
+
+        // 构建参数对象
+        return buildHsyyParam(order, hsyyValidationResult, ymd, ymdhms);
+    }
+
+    /**
+     * 构建河山医院参数对象
+     */
+    private FsSubOrderHsyyParam buildHsyyParam(FsStoreSubOrder order, HsyyValidationResult validation,SimpleDateFormat ymd, SimpleDateFormat ymdhms) {
+        FsSubOrderHsyyParam param = new FsSubOrderHsyyParam();
+        param.setOrderNo(order.getSubOrderId() + "");
+
+        // 设置各个部分的数据
+        param.setUserinfo(buildUserinfo(order, validation.getPatient(), ymd, ymdhms));
+        param.setDepartment(buildDepartment(validation.getDepartment()));
+        param.setDoctor(buildDoctor(validation.getDoctor(), ymd));
+        param.setMedicine(buildMedicines(order, validation.getPrescribeDrugs(),
+                validation.getStore().getStoreId() + "", validation.getStore().getStoreName()));
+        param.setOffline(buildOffline(ymd, validation.getDoctor(), validation.getDepartment(),
+                order.getSubOrderId() + "", validation.getInquiryOrder()));
+        param.setRecipe(buildRecipe(ymdhms, validation.getDoctor(), validation.getDepartment(),
+                order.getSubOrderId(), validation.getPrescribe(),
+                validation.getStore().getStoreName(), validation.getHospital().getHospitalName()));
+        param.setSign(buildSigns(order, ymdhms, validation.getDoctor(), validation.getDrugDoctor()));
+
+        return param;
+    }
+
+    private FsSubOrderHsyyParam.UserinfoType buildUserinfo(FsStoreSubOrder order,FsPatient patient, SimpleDateFormat ymd,SimpleDateFormat ymdhms) {
+        return FsSubOrderHsyyParam.UserinfoType.builder()
+                .name(StringUtils.isNotEmpty(order.getPatientName())?order.getPatientName():"无")
+                .numcard(StringUtils.isNotEmpty(patient.getIdCard())?patient.getIdCard():"无")
+                .birthday(patient.getBirthday() != null ? ymd.format(patient.getBirthday()) : "无")
+                .sex(patient.getSex() == 1 ? Gender.MALE.getCode() + "" : Gender.FEMALE.getCode() + "")
+                .datetime(patient.getBirthday() != null ? ymd.format(patient.getBirthday()) : "")
+                .age(patient.getAge())
+                .tel(StringUtils.isNotEmpty(patient.getMobile()) ? PhoneUtil.decryptPhone(patient.getMobile()) : "无")
+                .present_illness_history("无")
+                .past_history("无")
+                .personal_history(StringUtils.isNotEmpty(patient.getSelfMedHistory())?patient.getSelfMedHistory():"无")
+                .family_history(StringUtils.isNotEmpty(patient.getFamilyMedHistory())?patient.getFamilyMedHistory():"无")
+                .allergy(StringUtils.isNotEmpty(patient.getHistoryAllergic())?patient.getHistoryAllergic():"无")
+                .tijian("无")
+                .usertime(patient.getCreateTime() != null ? ymdhms.format(patient.getCreateTime()):"")
+                .build();
+    }
+
+    private FsSubOrderHsyyParam.DepartmentType buildDepartment(FsDepartment department) {
+        return FsSubOrderHsyyParam.DepartmentType.builder()
+                .dep_name(StringUtils.isNotEmpty(department.getDeptName())?department.getDeptName():"无")
+                .dep_id(department.getDeptId() != null ? Integer.parseInt(department.getDeptId() + "") : 0)
+                .dep_code(StringUtils.isNotEmpty(department.getDeptCode())?department.getDeptCode():"0")
+                .build();
+    }
+
+    private FsSubOrderHsyyParam.DoctorType buildDoctor(FsDoctor doctor,SimpleDateFormat ymd) {
+        return FsSubOrderHsyyParam.DoctorType.builder()
+                .doc_name(StringUtils.isNotEmpty(doctor.getDoctorName())?doctor.getDoctorName():"无")
+                .doc_numcard(StringUtils.isNotEmpty(doctor.getIdCard())?doctor.getIdCard():"无")
+                .doc_sex(doctor.getSex() == 1 ? Gender.MALE.getCode() :
+                        Gender.FEMALE.getCode())
+                .doc_tel(StringUtils.isNotEmpty(doctor.getMobile()) ?
+                        doctor.getMobile() : "无")
+                .doc_zhicheng(StringUtils.isNotEmpty(doctor.getPosition()) ?
+                        ProfessionalTitle.getCodeByDescription(doctor.getPosition()) + "" : ProfessionalTitle.PHYSICIAN.getCode() +"")
+                .doc_code(doctor.getDoctorId() != null ?doctor.getDoctorId() + "" : "0")
+                .doc_type(doctor.getDoctorType() != null ?
+                        (doctor.getDoctorType() == 1 ? "1" : "3") : "1")
+                .doc_license_no(StringUtils.isNotEmpty(doctor.getCertificateCode())?doctor.getCertificateCode():"")
+                //--------虚拟数据堆begin------------
+                .doc_rank("高级")
+                .doc_license_date(doctor.getCreateTime() != null ? ymd.format(doctor.getCreateTime()) : "")
+                .doc_practice_no("")
+                .doc_practice_address("")
+                .doc_practice_category("")
+                .doc_practice_scope("")
+                .doc_first_date(doctor.getCreateTime() != null ? ymd.format(doctor.getCreateTime()) : "")
+                .doc_current_date(doctor.getCreateTime() != null ? ymd.format(doctor.getCreateTime()) : "")
+                .doc_valid_date("2099-01-01")
+                .doc_politics_status("1")
+                .doc_starting_work_date(doctor.getCreateTime() != null ? ymd.format(doctor.getCreateTime()) : "")
+                .doc_independent_work_date(doctor.getCreateTime() != null ? ymd.format(doctor.getCreateTime()) : "")
+                .doc_fullTime_degree(EducationLevel.BACHELOR.getCode() + "")
+                .doc_full_time_degree_year("2099")
+                //--------虚拟数据堆end------------
+                .build();
+    }
+
+    private List<FsSubOrderHsyyParam.MedicineType> buildMedicines(FsStoreSubOrder order,List<FsPrescribeDrug> prescribeDrugs,String storeId,String storeName) {
+        List<FsSubOrderHsyyParam.MedicineType> medicines = new ArrayList<>();
+        for (FsPrescribeDrug drug : prescribeDrugs) {
+            medicines.add(FsSubOrderHsyyParam.MedicineType.builder()
+                    .bm(drug.getProductId() != null?drug.getProductId() + "":"XA10BAE021A010011401021")
+                    .store_id(storeId)
+                    .store_name(storeName)
+                    .sname(StringUtils.isNotEmpty(drug.getDrugName()) ? drug.getDrugName() : "")
+                    .tname(StringUtils.isNotEmpty(drug.getDrugName())?drug.getDrugName():"")
+                    .price(drug.getDrugPrice() != null ? drug.getDrugPrice().multiply(BigDecimal.valueOf(100)).intValue()+"" : "0")
+                    .guige(StringUtils.isNotEmpty(drug.getDrugSpec())?drug.getDrugSpec():"无")
+                    .use(StringUtils.isNotEmpty(drug.getUsageMethod())?drug.getUsageMethod():"无")
+                    .dosage(StringUtils.isNotEmpty(drug.getUsagePerUseCount())?drug.getUsagePerUseCount():"1")
+                    .frequency(StringUtils.isNotEmpty(drug.getUsageFrequencyUnit())?drug.getUsageFrequencyUnit():"无")
+                    .unit(StringUtils.isNotEmpty(drug.getUsagePerUseUnit())?drug.getUsagePerUseUnit():"盒")
+                    .count(drug.getDrugNum() != null ? Integer.parseInt(drug.getDrugNum()+""): 0)
+                    .amount(order.getPayMoney() != null ?order.getPayMoney().multiply(BigDecimal.valueOf(100)).intValue() : 0)
+                    //--------虚拟数据堆begin------------
+                    .doc_num("国药准字H20050349")
+                    .component("")
+                    .character("")
+                    .adapt("")
+                    .adverse_reactions("")
+                    .dosageform("10")
+                    .package_spec(StringUtils.isNotEmpty(drug.getDrugSpec())?drug.getDrugSpec():"")
+                    .health_care_code("XA10BAE021A010011401021")
+                    .health_care_type("1")
+                    .is_base("0")
+                    .manufacturer("重庆科瑞南海制药有限责任公司")
+                    .has_prescription("0")
+                    .supplier("重庆科瑞南海制药有限责任公司")
+                    .medication_route(AdministrationRoute.ORAL.getCode() + "")
+                    .getType(3)
+                    .checker_name("")
+                    .dispenser_name("")
+                    //--------虚拟数据堆end------------
+                    .build());
+            }
+            return medicines;
+    }
+
+    private FsSubOrderHsyyParam.OfflineType buildOffline(SimpleDateFormat ymd,FsDoctor doctor,FsDepartment dept,String hisId,FsInquiryOrder inquiryOrder) {
+        String doctorDeptCode = doctor.getDoctorId() + "";
+        String doctorDeptName =  StringUtils.isNotEmpty(dept.getDeptName())?dept.getDeptName():"";
+        String doctorCode = StringUtils.isNotEmpty(dept.getDeptCode())?dept.getDeptCode():"";
+
+        return FsSubOrderHsyyParam.OfflineType.builder()
+                .medical_record_no(hisId)
+                .visit_no(StringUtils.isNotEmpty(inquiryOrder.getOrderSn())?Long.parseLong(inquiryOrder.getOrderSn()):0L)
+                .visit_date(inquiryOrder.getCreateTime() != null ?
+                        ymd.format(inquiryOrder.getCreateTime()) : "")
+                .offline_dept_code(doctorDeptCode)
+                .offline_dept_name(doctorDeptName)
+                .offline_doctor_code(doctorCode)
+                //--------虚拟数据堆begin------------
+                .offline_diagnosis("高血压")
+                //--------虚拟数据堆end------------
+                .build();
+    }
+
+    private FsSubOrderHsyyParam.RecipeType buildRecipe(SimpleDateFormat ymdhms,FsDoctor doctor,FsDepartment dept,Long hisId,FsPrescribe prescribe,String storeName,String hospitalName) {
+        List<FsSubOrderHsyyParam.ProcessType> process = new ArrayList<>();
+        String doctorName = doctor.getDoctorName(), doctorCode = doctor.getDoctorId() + "",
+                doctorDeptCode = dept.getDeptCode(),doctorDeptName=dept.getDeptName();
+
+        process.add(FsSubOrderHsyyParam.ProcessType
+                .builder()
+                .process_time(ymdhms.format(prescribe.getCreateTime()))
+                .role("2")
+                .content(StringUtils.isNotEmpty(prescribe.getDiagnose())?prescribe.getDiagnose():"无")
+                .build());
+        process.add(FsSubOrderHsyyParam.ProcessType
+                .builder()
+                .process_time(ymdhms.format(prescribe.getCreateTime()))
+                .role("1")
+                .content(StringUtils.isNotEmpty(prescribe.getPatientDescs())?prescribe.getPatientDescs():"无")
+                .build());
+
+        return FsSubOrderHsyyParam.RecipeType.builder()
+                .recipe_id(hisId)
+                .serial_no(StringUtils.isNotEmpty(prescribe.getPrescribeCode())?prescribe.getPrescribeCode():"")
+                .create_time(prescribe.getCreateTime() != null ? ymdhms.format(prescribe.getCreateTime()) : "")
+                .status("已开方")
+                .hospital_name(hospitalName)
+                .dept_code(doctorDeptCode)
+                .dept_name(doctorDeptName)
+                .doc_code(doctorCode)
+                .doc_name(doctorName)
+                .zhusu(StringUtils.isNotEmpty(prescribe.getPatientDescs())?prescribe.getPatientDescs():"无")
+                .diagnose(StringUtils.isNotEmpty(prescribe.getDiagnose())? prescribe.getDiagnose() : "无")
+                .Recipe_img(StringUtils.isNotEmpty(prescribe.getPrescribeImgUrl())?prescribe.getPrescribeImgUrl():"")
+                .Pharmacy(storeName)
+                .process(process)
+                //--------虚拟数据堆begin------------
+                .Consultationtype("视频")
+                .Ybtype("230128")
+                .advice("无")
+                .yijian("无")
+                .diagnose_code("M01603")
+                .recipe_type("1")
+                .getType(3)
+                .Patienttype("慢病处方")
+                //--------虚拟数据堆end------------
+                .build();
+    }
+
+    private List<FsSubOrderHsyyParam.SignType> buildSigns(FsStoreSubOrder order, SimpleDateFormat ymdhms, FsDoctor doctor,FsDoctor drugDoctor) {
+        List<FsSubOrderHsyyParam.SignType> signs = new ArrayList<>();
+        String doctorName = doctor.getDoctorName();
+        String doctorCode = doctor.getDoctorId() + "";
+        signs.add(FsSubOrderHsyyParam.SignType.builder()
+                .role("处方医生")
+                .executor(doctorName)
+                .person_code(doctorCode)
+                .exe_time(order.getCreateTime() != null ?ymdhms.format(order.getCreateTime()) : "")
+                .build());
+        signs.add(FsSubOrderHsyyParam.SignType.builder()
+                .role("药师")
+                .executor(drugDoctor.getDoctorName())
+                .person_code(drugDoctor.getDoctorId() + "")
+                .exe_time(order.getCreateTime() != null ?ymdhms.format(order.getCreateTime()) : "")
+                .build());
+        return signs;
+    }
+
+    /**
+     * 验证订单数据
+     */
+    private HsyyValidationResult validateOrderData(FsStoreSubOrder order) {
+        HsyyValidationResult result = new HsyyValidationResult();
+
+        // 验证患者信息
+        if (order.getPatientId() == null) {
+            result.setValid(false);
+            result.setMessage("缺少患者信息");
+            return result;
+        }
+        result.setPatient(fsPatientMapper.selectFsPatientByPatientId(order.getPatientId()));
+        if (result.getPatient() == null) {
+            result.setValid(false);
+            result.setMessage("患者信息不存在");
+            return result;
+        }
+
+        // 验证医生信息
+        if (order.getDoctorId() == null) {
+            result.setValid(false);
+            result.setMessage("缺少医生信息");
+            return result;
+        }
+        result.setDoctor(fsDoctorMapper.selectFsDoctorByDoctorId(order.getDoctorId()));
+        if (result.getDoctor() == null) {
+            result.setValid(false);
+            result.setMessage("医生信息不存在");
+            return result;
+        }
+
+        // 验证科室信息
+        result.setDepartment(fsDepartmentMapper.selectFsDepartmentByDeptId(result.getDoctor().getDeptId()));
+        if (result.getDepartment() == null) {
+            result.setValid(false);
+            result.setMessage("科室信息不存在");
+            return result;
+        }
+
+        // 验证线下初诊信息
+        if (order.getInquiryOrderId() == null) {
+            result.setValid(false);
+            result.setMessage("缺少线下初诊信息");
+            return result;
+        }
+        result.setInquiryOrder(fsInquiryOrderMapper.selectFsInquiryOrderByOrderId(order.getInquiryOrderId()));
+        if (result.getInquiryOrder() == null) {
+            result.setValid(false);
+            result.setMessage("线下初诊信息不存在");
+            return result;
+        }
+
+        // 验处方信息
+        if (StringUtils.isEmpty(order.getPrescribeJson())) {
+            result.setValid(false);
+            result.setMessage("缺少处方信息");
+            return result;
+        }
+        result.setPrescribe(JSON.parseObject(order.getPrescribeJson(), FsPrescribe.class));
+        if (result.getPrescribe() == null) {
+            result.setValid(false);
+            result.setMessage("处方信息解析失败");
+            return result;
+        }
+
+        // 验证药品信息
+        if (StringUtils.isEmpty(order.getPrescribeDrugJson())) {
+            result.setValid(false);
+            result.setMessage("缺少药品信息");
+            return result;
+        }
+        result.setPrescribeDrugs(JSON.parseArray(order.getPrescribeDrugJson(), FsPrescribeDrug.class));
+        if (CollectionUtil.isEmpty(result.getPrescribeDrugs())) {
+            result.setValid(false);
+            result.setMessage("药品信息解析失败");
+            return result;
+        }
+
+        // 验证医院信息
+        if (result.getDoctor().getHospitalId() == null) {
+            result.setValid(false);
+            result.setMessage("医生缺少医院信息");
+            return result;
+        }
+        result.setHospital(fsHospitalMapper.selectFsHospitalByHospitalId(result.getDoctor().getHospitalId()));
+        if (result.getHospital() == null) {
+            result.setValid(false);
+            result.setMessage("医院信息不存在");
+            return result;
+        }
+
+        // 验证签名药师信息
+        if (order.getDrugDoctorId() == null) {
+            result.setValid(false);
+            result.setMessage("缺少签名药师信息");
+            return result;
+        }
+        if (result.getPrescribe().getDrugDoctorId() == null) {
+            result.setValid(false);
+            result.setMessage("处方缺少签名药师信息");
+            return result;
+        }
+        result.setDrugDoctor(fsDoctorMapper.selectFsDoctorByDoctorId(result.getPrescribe().getDrugDoctorId()));
+        if (result.getDrugDoctor() == null) {
+            result.setValid(false);
+            result.setMessage("签名药师信息不存在");
+            return result;
+        }
+
+        // 验证门店信息
+        if (order.getStoreId() == null) {
+            result.setValid(false);
+            result.setMessage("缺少门店信息");
+            return result;
+        }
+        result.setStore(fsStoreMapper.selectFsStoreByStoreId(order.getStoreId()));
+        if (result.getStore() == null) {
+            result.setValid(false);
+            result.setMessage("门店信息不存在");
+            return result;
+        }
+        return result;
+    }
+
 }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 46 - 0
fs-service/src/main/java/com/fs/his/utils/HsyyPushApiClientUtil.java


+ 4 - 4
fs-service/src/main/java/com/fs/live/vo/LiveAfterSalesVo.java

@@ -143,11 +143,11 @@ public class LiveAfterSalesVo {
     /** 创建时间 */
     @Excel(name = "下单开始时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTimeBegin;
+    private String createTimeBegin;
     /** 创建时间 */
     @Excel(name = "下单结束时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTimeEnd;
+    private String createTimeEnd;
 
 
 
@@ -160,10 +160,10 @@ public class LiveAfterSalesVo {
 
     @Excel(name ="产品名称")
     private String productName;
-    
+
     /** 产品名称查询参数(用于搜索) */
     private String productNameQuery;
-    
+
     @Excel(name ="产品编码")
     private String productBarCode;
     @Excel(name ="规格")

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels