瀏覽代碼

保存按钮

yeguodong 2 周之前
父節點
當前提交
ce0d47cf15

+ 0 - 6
src/main/java/cn/hnthyy/thmz/entity/yb/SelinfoSold.java

@@ -274,12 +274,6 @@ public class SelinfoSold {
     @JSONField(name = "MDTRT_SETL_TYPE")
     private String mdtrtSetlType;
 
-    /**
-     * 溯源码节点信息
-     * */
-    @JSONField(name = "drugtracinfo")
-    private List<DrugTracCodg> drugtracinfo;
-
     /**
      * 关联字段 - 病人ID(用于关联发药记录)
      * 数据来源:mz_charge_detail.patient_id 表

+ 16 - 0
src/main/java/cn/hnthyy/thmz/entity/yb/SelinfoSoldTotal.java

@@ -0,0 +1,16 @@
+package cn.hnthyy.thmz.entity.yb;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class SelinfoSoldTotal{
+
+    private SelinfoSold selinfoSold;
+    /**
+     * 溯源码节点信息
+     * */
+    private List<DrugTracCodg> drugtracinfo;
+}

+ 9 - 7
src/main/java/cn/hnthyy/thmz/service/yb/YbService.java

@@ -5,6 +5,7 @@ import cn.hnthyy.thmz.entity.jy.ResultVo;
 import cn.hnthyy.thmz.entity.yb.DrugTracCodg;
 import cn.hnthyy.thmz.entity.yb.SelinfoSold;
 import cn.hnthyy.thmz.entity.yb.SelinfoReturn;
+import cn.hnthyy.thmz.entity.yb.SelinfoSoldTotal;
 import cn.hnthyy.thmz.mapper.his.yb.SelinfoSoldMapper;
 import cn.hnthyy.thmz.service.taobao.TaobaoService;
 import com.alibaba.fastjson.JSONArray;
@@ -57,19 +58,20 @@ public class YbService {
      * 3. 医保系统记录关联字段,便于后续查询和审计
      * 4. 可通过关联字段查询具体的发药记录和追溯码信息
      * 
-     * @param selInfo 医保销售信息对象,包含关联字段和药品追溯码信息
+     * @param selinfoSoldTotal 医保销售信息对象,包含关联字段和药品追溯码信息
      * @return ResultVo 医保接口调用结果
      */
-    public ResultVo saleGoodsItem(SelinfoSold selInfo) {
+    public ResultVo saleGoodsItem(SelinfoSoldTotal selinfoSoldTotal) {
         ResultVo response = null;
+        SelinfoSold selInfo = selinfoSoldTotal.getSelinfoSold();
 
         // 记录关联字段信息(用于关联发药记录)
         // 这些字段用于后续查询发药记录,确保医保记录与发药记录的一一对应
-        log.info("医保接口调用 - 关联字段: patientId={}, times={}, receiptNo={}, orderNo={}, chargeItemCode={}, realNo={}", 
-                selInfo.getPatientId(), selInfo.getTimes(), selInfo.getReceiptNo(), 
+        log.info("医保接口调用 - 关联字段: patientId={}, times={}, receiptNo={}, orderNo={}, chargeItemCode={}, realNo={}",
+                selInfo.getPatientId(), selInfo.getTimes(), selInfo.getReceiptNo(),
                 selInfo.getOrderNo(), selInfo.getChargeItemCode(), selInfo.getRealNo());
 
-        List<DrugTracCodg> drugTracCodgList = selInfo.getDrugtracinfo();
+        List<DrugTracCodg> drugTracCodgList = selinfoSoldTotal.getDrugtracinfo();
         if(drugTracCodgList == null || drugTracCodgList.isEmpty()) {
             response = new ResultVo(-1, "追溯码不能为空");
             return response;
@@ -205,7 +207,7 @@ public class YbService {
         log.info("医保退药接口 - 关联键: {}", associationKey);
 
         // 处理追溯码信息(如果有的话)
-        if(drugTracCodgList != null && !drugTracCodgList.isEmpty()) {
+        /*if(drugTracCodgList != null && !drugTracCodgList.isEmpty()) {
             String drugTracCodg = drugTracCodgList.get(0).getDrugTracCodg();
             String result = taobaoService.sendGet("/queryCodeDetail?codes=" + drugTracCodg);
             JSONObject resultJson = JSONObject.parseObject(result);
@@ -228,7 +230,7 @@ public class YbService {
             }
         } else {
             log.warn("退药操作没有追溯码信息,继续处理");
-        }
+        }*/
         
         selinfoReturn.setSelRetnCnt(drugTracCodgList != null ? drugTracCodgList.size() : 0);
         String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());