From cfbd93a77796c4b4eb7f476addc6fe888908bd22 Mon Sep 17 00:00:00 2001
From: zhs <zhs18203887318@163.com>
Date: 星期三, 25 六月 2025 11:33:25 +0800
Subject: [PATCH] 06-25 zhs

---
 smartor/src/main/java/com/smartor/service/IServiceExternalService.java                    |   15 
 smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml                      |  367 ++++++----
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java |   54 +
 smartor/src/main/java/com/smartor/domain/ExternalInspectionJC.java                        |  112 +++
 smartor/src/main/java/com/smartor/mapper/PatMedInspectionItemMapper.java                  |   65 +
 smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java            |  357 ++++++++++
 smartor/src/main/java/com/smartor/service/IPatMedInspectionItemService.java               |   64 +
 smartor/src/main/java/com/smartor/service/impl/PatMedInspectionItemServiceImpl.java       |  100 ++
 smartor/src/main/java/com/smartor/domain/PatMedInspectionItem.java                        |  145 ++++
 smartor/src/main/java/com/smartor/domain/PatMedInspection.java                            |  434 +++---------
 smartor/src/main/resources/mapper/smartor/PatMedInspectionItemMapper.xml                  |  225 ++++++
 smartor/src/main/java/com/smartor/domain/ExternalInspectionDetail.java                    |   86 ++
 12 files changed, 1,559 insertions(+), 465 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java
index a0b4db6..7d2086f 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java
@@ -213,6 +213,23 @@
     }
 
     /**
+     *
+     */
+    @ApiOperation("鏂板鍑洪櫌璁板綍鐧昏淇℃伅")
+    @PostMapping("/addOutHospJLInfo")
+    public Map<String, Object> addOutHospJLInfo(@RequestBody Map dataMap) {
+        Boolean aBoolean = true;
+        try {
+            aBoolean = serviceExternalService.addOutHospJLInfo(dataMap);
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("serviceExternal---addOutHospJLInfo锛歿}", e.getMessage());
+            aBoolean = false;
+        }
+        return returnParam(aBoolean, dataMap);
+    }
+
+    /**
      * 鍙栨秷鍑洪櫌鐧昏淇℃伅
      */
     @ApiOperation("鍙栨秷鍑洪櫌鐧昏淇℃伅")
@@ -298,6 +315,43 @@
     }
 
 
+    /**
+     * 妫�鏌ョ敵璇锋湇鍔�/妫�鏌ヤ慨鏀规湇鍔�
+     */
+    @ApiOperation("妫�鏌ョ敵璇锋湇鍔�")
+    @PostMapping("/addInspectService")
+    public Map<String, Object> addInspectService(@RequestBody Map dataMap) {
+        Boolean aBoolean = true;
+        try {
+            aBoolean = serviceExternalService.addInspectService(dataMap);
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("serviceExternal---addInspectService锛歿}", e.getMessage());
+            aBoolean = false;
+        }
+        return returnParam(aBoolean, dataMap);
+    }
+
+    /**
+     * 妫�鏌ユ姤鍛婃湇鍔�
+     */
+    @ApiOperation("妫�鏌ユ姤鍛婃湇鍔�")
+    @PostMapping("/addInspectBGService")
+    public Map<String, Object> addInspectBGService(@RequestBody Map dataMap) {
+        Boolean aBoolean = true;
+        try {
+            aBoolean = serviceExternalService.addInspectBGService(dataMap);
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("serviceExternal---addInspectBGService锛歿}", e.getMessage());
+            aBoolean = false;
+        }
+        return returnParam(aBoolean, dataMap);
+    }
+
+
+
+
     private Map<String, Object> returnParam(Boolean b, Map dataMap) {
         Map yeWuXX = (Map) dataMap.get("YeWuXX");
         String XiaoXiID = (String) yeWuXX.get("XiaoXiID");
diff --git a/smartor/src/main/java/com/smartor/domain/ExternalInspectionDetail.java b/smartor/src/main/java/com/smartor/domain/ExternalInspectionDetail.java
new file mode 100644
index 0000000..279674e
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/ExternalInspectionDetail.java
@@ -0,0 +1,86 @@
+package com.smartor.domain;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author 鎺ユ敹绗笁鏂规鏌ユ姤鍛婅缁嗕俊鎭�
+ * @date 2025-06-17
+ */
+@Data
+@ApiModel(value = "ExternalInspectionDetail", description = "鎺ユ敹绗笁鏂规鏌ユ姤鍛婅缁嗕俊鎭�")
+public class ExternalInspectionDetail extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "鏈烘瀯ID")
+    private String ZuZhiJGID;
+
+    @ApiModelProperty(value = "鐥呮鍙�")
+    private String BingAnHao;
+
+    @ApiModelProperty(value = "鐥呬汉ID")
+    private String BingRenID;
+
+    @ApiModelProperty(value = "鐥呬汉濮撳悕")
+    private String BingRenXM;
+
+    @ApiModelProperty(value = "璇佷欢鍙�")
+    private String LianXiDH;
+
+    @ApiModelProperty(value = "鐢宠鍗旾D")
+    private String ShenQingDID;
+
+    @ApiModelProperty(value = "鐢宠鍗旾D")
+    private String BaoGaoID;
+
+    @ApiModelProperty(value = "鐢宠鍗旾D")
+    private String JianChaHao;
+
+    @ApiModelProperty(value = "褰撳墠鐘舵�佷唬鐮�")
+    private String DangQianZTDM;
+
+    @ApiModelProperty(value = "褰撳墠鐘舵�佸悕绉�")
+    private String DangQianZTMC;
+
+    @ApiModelProperty(value = "鎶ュ憡浜篒D")
+    private String BaoGaoRID;
+
+    @ApiModelProperty(value = "鎶ュ憡浜哄鍚�")
+    private String BaoGaoRXM;
+
+    @ApiModelProperty(value = "鎶ュ憡鏃堕棿")
+    private String BaoGaoSJ;
+
+    @ApiModelProperty(value = "璇婃柇鍗拌薄")
+    private String ZhenDuanYX;
+
+    @ApiModelProperty(value = "璇婃柇鎵�瑙�")
+    private String ZhenDuanSJ;
+
+    @ApiModelProperty(value = "璇婃柇寤鸿")
+    private String ZhenDuanJY;
+
+    @ApiModelProperty(value = "鎶ュ憡鍗拌薄鍦板潃")
+    private String BaoGaoYXDZ;
+
+    @ApiModelProperty(value = "鍗辨�ュ�兼爣蹇�")
+    private String WeiJiZBZ;
+
+    @ApiModelProperty(value = "鍗辨�ュ�煎唴瀹�")
+    private String WeiJiZNR;
+
+    @ApiModelProperty(value = "鎶ュ憡绉戝ID")
+    private String BaoGaoKSID;
+
+    @ApiModelProperty(value = "鎶ュ憡绉戝鍚嶇О")
+    private String BaoGaoKSMC;
+
+    @ApiModelProperty(value = "妫�鏌ョ粨鏋滀唬鐮�")
+    private String JianChaJGDM;
+
+    @ApiModelProperty(value = "妫�鏌ョ粨鏋滃悕绉�")
+    private String JianChaJGMC;
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/ExternalInspectionJC.java b/smartor/src/main/java/com/smartor/domain/ExternalInspectionJC.java
new file mode 100644
index 0000000..42973b8
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/ExternalInspectionJC.java
@@ -0,0 +1,112 @@
+package com.smartor.domain;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author 鎺ユ敹绗笁鏂规鏌ヤ俊鎭�
+ * @date 2025-06-17
+ */
+@Data
+@ApiModel(value = "ExternalInspectionJC", description = "鎺ユ敹绗笁鏂规鏌ヤ俊鎭�")
+public class ExternalInspectionJC extends BaseEntity  {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "鐥呮鍙�")
+    private String BingAnHao;
+
+    @ApiModelProperty(value = "鐥呬汉ID")
+    private String BingRenID;
+
+    @ApiModelProperty(value = "鐥呬汉濮撳悕")
+    private String BingRenXM;
+
+    @ApiModelProperty(value = "浣忛櫌鍙�")
+    private String ZhuYuanHao;
+
+    @ApiModelProperty(value = "璇佷欢鍙�")
+    private String LianXiDH;
+
+    @ApiModelProperty(value = "鍑虹敓鏃ユ湡")
+    private String ChuShengRQ;
+
+    @ApiModelProperty(value = "寮�鍗曠瀹D")
+    private String KaiDanKSID;
+
+    @ApiModelProperty(value = "寮�鍗曠瀹ゅ悕绉�")
+    private String KaiDanKSMC;
+
+    @ApiModelProperty(value = "寮�鍗曚汉ID")
+    private String KaiDanRID;
+
+    @ApiModelProperty(value = "寮�鍗曚汉濮撳悕")
+    private String KaiDanRXM;
+
+    @ApiModelProperty(value = "寮�鍗曟椂闂�")
+    private String KaiDanSJ;
+
+    @ApiModelProperty(value = "瀹℃牳浜篒D")
+    private String ShenHeRID;
+
+    @ApiModelProperty(value = "瀹℃牳浜哄鍚�")
+    private String ShenHeRXM;
+
+    @ApiModelProperty(value = "瀹℃牳鏃堕棿")
+    private String ShenHeSJ;
+
+    @ApiModelProperty(value = "浼樺厛绾�")
+    private String YouXianJi;
+
+    @ApiModelProperty(value = "鍖诲槺ID")
+    private String YiZhuID;
+
+    @ApiModelProperty(value = "鐢宠鍗旾D")
+    private String ShenQingDID;
+
+    @ApiModelProperty(value = "妫�鏌ラ」鐩甀D")
+    private String JianChaXMID;
+
+    @ApiModelProperty(value = "妫�鏌ラ」鐩悕绉�")
+    private String JianChaXMMC;
+
+    @ApiModelProperty(value = "妫�鏌ラ儴浣岻D")
+    private String JianChaBWID;
+
+    @ApiModelProperty(value = "妫�鏌ラ儴浣嶅悕绉�")
+    private String JianChaBWMC;
+
+    @ApiModelProperty(value = "妫�鏌ョ被鍨婭D")
+    private String JianChaLXID;
+
+    @ApiModelProperty(value = "妫�鏌ョ被鍨嬪悕绉�")
+    private String JianChaLXMC;
+
+    @ApiModelProperty(value = "璇婃柇ID")
+    private String ZhenDuanID;
+
+    @ApiModelProperty(value = "璇婃柇鍚嶇О")
+    private String ZhenDuanMC;
+
+    @ApiModelProperty(value = "鎵ц鏃堕棿")
+    private String ZhiXingSJ;
+
+    @ApiModelProperty(value = "搴婅竟鏍囧織")
+    private String ChuangBianBZ;
+
+    @ApiModelProperty(value = "鎺ㄥ簥鏍囧織")
+    private String TuiChuangBZ;
+
+    @ApiModelProperty(value = "鐢靛瓙鑳剁墖鏍囧織")
+    private String DianZiJPBZ;
+
+    @ApiModelProperty(value = "鍔犳�ユ爣蹇�")
+    private String JiaJiBZ;
+
+    @ApiModelProperty(value = "鏈敹鍏堟墽琛屾爣蹇�")
+    private String WeiShouXZXBZ;
+
+    @ApiModelProperty(value = "閲戦")
+    private String JinE;
+}
diff --git a/smartor/src/main/java/com/smartor/domain/PatMedInspection.java b/smartor/src/main/java/com/smartor/domain/PatMedInspection.java
index 4e195d3..fc29ec2 100644
--- a/smartor/src/main/java/com/smartor/domain/PatMedInspection.java
+++ b/smartor/src/main/java/com/smartor/domain/PatMedInspection.java
@@ -4,6 +4,7 @@
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -13,9 +14,10 @@
  * 鎮h�呮鏌ユ楠岃褰曞璞� pat_med_inspection
  * 
  * @author ruoyi
- * @date 2023-06-16
+ * @date 2025-06-18
  */
 @ApiModel(value = "PatMedInspection", description = "鎮h�呮鏌ユ楠岃褰曞璞�")
+@Data
 public class PatMedInspection extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -24,49 +26,43 @@
     @ApiModelProperty(value = "鑷ID")
     private Long id;
 
-    /**  娴佹按鍙�  */
-    @Excel(name = " 娴佹按鍙� ")
-    @ApiModelProperty(value = "娴佹按鍙�")
-    private String serialnum;
-
-    /**  妗fID  */
-    @Excel(name = " 妗fID ")
-    @ApiModelProperty(value = "妗fID")
-    private Long patid;
-
     /**  绫诲瀷;0.妫�楠岄」鐩� 1.妫�鏌ラ」鐩�  */
     @ApiModelProperty(value = "绫诲瀷;0.妫�楠岄」鐩� 1.妫�鏌ラ」鐩�")
-    @Excel(name = " 绫诲瀷;0.妫�楠岄」鐩� 1.妫�鏌ラ」鐩� ")
-    private Long projecttype;
+    private Integer projecttype;
 
-    /**  椤圭洰缂栧彿  */
-    @Excel(name = " 椤圭洰缂栧彿 ")
-    @ApiModelProperty(value = "椤圭洰缂栧彿")
-    private String projectcode;
+    /**  鐥呮鍙�  */
+    @ApiModelProperty(value = "鐥呮鍙�")
+    private String inhospno;
 
-    /**  椤圭洰鍚嶇О  */
-    @Excel(name = " 椤圭洰鍚嶇О ")
-    @ApiModelProperty(value = "椤圭洰鍚嶇О")
-    private String projectname;
+    /**  鎮h�匢D  */
+    @ApiModelProperty(value = "鎮h�匢D")
+    private String patidHis;
 
-    /**  鎶ュ憡鏃堕棿  */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = " 鎶ュ憡鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd")
-    @ApiModelProperty(value = "鎶ュ憡鏃堕棿")
-    private Date reporttime;
+    /**  璇佷欢鍙风爜  */
+    @ApiModelProperty(value = "璇佷欢鍙风爜")
+    private String idcardno;
 
-    /**  鍖婚櫌鍚嶇О  */
-    @Excel(name = " 鍖婚櫌鍚嶇О ")
-    @ApiModelProperty(value = "鍖婚櫌鍚嶇О")
-    private String hospitalname;
+    /**  鎮h�呭鍚�  */
+    @ApiModelProperty(value = "鎮h�呭鍚�")
+    private String patname;
 
-    /**  鍖婚櫌缂栧彿  */
-    @Excel(name = " 鍖婚櫌缂栧彿 ")
-    @ApiModelProperty(value = "鍖婚櫌缂栧彿")
-    private String hospitalcode;
+    /**  鎵嬫満鍙风爜  */
+    @ApiModelProperty(value = "鎵嬫満鍙风爜")
+    private String telcode;
+
+    /**  鍖诲槺ID  */
+    @ApiModelProperty(value = "鍖诲槺ID")
+    private Long adviceId;
+
+    /**  鐢宠鍗旾D  */
+    @ApiModelProperty(value = "鐢宠鍗旾D")
+    private String appliyid;
+
+    /**  浼樺厛绾�  */
+    @ApiModelProperty(value = "浼樺厛绾�")
+    private String priority;
 
     /**  鏈烘瀯ID  */
-    @Excel(name = " 鏈烘瀯ID ")
     @ApiModelProperty(value = "鏈烘瀯ID")
     private String orgid;
 
@@ -74,322 +70,126 @@
     @ApiModelProperty(value = "鍒犻櫎鏍囪")
     private String delFlag;
 
-    /**  涓婁紶鏍囪  */
-    @ApiModelProperty(value = "涓婁紶鏍囪")
-    @Excel(name = " 涓婁紶鏍囪 ")
-    private Long isupload;
+    /**  寮�鍗曚汉ID  */
+    @ApiModelProperty(value = "寮�鍗曚汉ID")
+    private String drcode;
 
-    /**  涓婁紶鏃堕棿  */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd")
-    @ApiModelProperty(value = "涓婁紶鏃堕棿")
-    private Date uploadTime;
-
-    /**  椤圭洰ID  */
-    @Excel(name = " 椤圭洰ID ")
-    @ApiModelProperty(value = "椤圭洰ID")
-    private Long projectid;
-
-    /**  鐢宠鏃堕棿  */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = " 鐢宠鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd")
-    @ApiModelProperty(value = "鐢宠鏃堕棿")
-    private Date applicationtime;
-
-    /**  灏辫瘖绫诲瀷  */
-    @Excel(name = " 灏辫瘖绫诲瀷 ")
-    @ApiModelProperty(value = "灏辫瘖绫诲瀷")
-    private Long visittype;
-
-    /**  灏辫瘖ID  */
-    @Excel(name = " 灏辫瘖ID ")
-    @ApiModelProperty(value = "灏辫瘖ID")
-    private Long visitid;
-
-    /**  鏄惁鐢熸垚鏂规鐘舵��;0鏈敓鎴� 1鐢熸垚鐢宠鍚� 2.鐢熸垚鎶ュ憡鍚�  9鏃犲尮閰嶆柟妗�  */
-    @Excel(name = " 鏄惁鐢熸垚鏂规鐘舵��;0鏈敓鎴� 1鐢熸垚鐢宠鍚� 2.鐢熸垚鎶ュ憡鍚�  9鏃犲尮閰嶆柟妗� ")
-    @ApiModelProperty(value = "鏄惁鐢熸垚鏂规鐘舵��;0鏈敓鎴� 1鐢熸垚鐢宠鍚� 2.鐢熸垚鎶ュ憡鍚�  9鏃犲尮閰嶆柟妗�")
-    private Long schemestatus;
-
-    /**  鏄惁寮傚父;0鍚� 1鏄�  */
-    @Excel(name = " 鏄惁寮傚父;0鍚� 1鏄� ")
-    @ApiModelProperty(value = "鏄惁寮傚父;0鍚� 1鏄�")
-    private Long isabnormal;
-
-    /**  鎶ュ憡缁撹  */
-    @Excel(name = " 鎶ュ憡缁撹 ")
-    @ApiModelProperty(value = "鎶ュ憡缁撹")
-    private String reportconclusion;
-
-    /**  鏂规鐘舵�佹搷浣滄椂闂�  */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = " 鏂规鐘舵�佹搷浣滄椂闂� ", width = 30, dateFormat = "yyyy-MM-dd")
-    @ApiModelProperty(value = "鏂规鐘舵�佹搷浣滄椂闂�")
-    private Date schemetime;
+    /**  寮�鍗曚汉濮撳悕  */
+    @ApiModelProperty(value = "寮�鍗曚汉濮撳悕")
+    private String drname;
 
     /**  寮�鍗曠瀹や唬鐮�  */
-    @Excel(name = " 寮�鍗曠瀹や唬鐮� ")
     @ApiModelProperty(value = "寮�鍗曠瀹や唬鐮�")
     private String deptcode;
 
     /**  寮�鍗曠瀹ゅ悕绉�  */
-    @Excel(name = " 寮�鍗曠瀹ゅ悕绉� ")
     @ApiModelProperty(value = "寮�鍗曠瀹ゅ悕绉�")
     private String deptname;
 
-    /**  寮�鍗曠瀹D  */
-    @Excel(name = " 寮�鍗曠瀹D ")
-    @ApiModelProperty(value = "寮�鍗曠瀹D")
-    private Long deptid;
+    /**  寮�鍗曟椂闂�  */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "寮�鍗曟椂闂�")
+    private Date opendate;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
+    /**  瀹℃牳浜篒D  */
+    @ApiModelProperty(value = "瀹℃牳浜篒D")
+    private String operatorId;
 
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setSerialnum(String serialnum) 
-    {
-        this.serialnum = serialnum;
-    }
+    /**  瀹℃牳浜哄鍚�  */
+    @ApiModelProperty(value = "瀹℃牳浜哄鍚�")
+    private String operatorName;
 
-    public String getSerialnum() 
-    {
-        return serialnum;
-    }
-    public void setPatid(Long patid) 
-    {
-        this.patid = patid;
-    }
+    /**  瀹℃牳鏃堕棿  */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "瀹℃牳鏃堕棿")
+    private Date operatorDate;
 
-    public Long getPatid() 
-    {
-        return patid;
-    }
-    public void setProjecttype(Long projecttype) 
-    {
-        this.projecttype = projecttype;
-    }
+    /**  閲戦  */
+    @ApiModelProperty(value = "閲戦")
+    private Float money;
 
-    public Long getProjecttype() 
-    {
-        return projecttype;
-    }
-    public void setProjectcode(String projectcode) 
-    {
-        this.projectcode = projectcode;
-    }
+    /**  淇敼浜�  */
+    @ApiModelProperty(value = "淇敼浜�")
+    private String updateBy;
 
-    public String getProjectcode() 
-    {
-        return projectcode;
-    }
-    public void setProjectname(String projectname) 
-    {
-        this.projectname = projectname;
-    }
+    /**  淇敼鏃堕棿  */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "淇敼鏃堕棿")
+    private Date updateDate;
 
-    public String getProjectname() 
-    {
-        return projectname;
-    }
-    public void setReporttime(Date reporttime) 
-    {
-        this.reporttime = reporttime;
-    }
+    /**  鍒涘缓浜�  */
+    @ApiModelProperty(value = "鍒涘缓浜�")
+    private String createBy;
 
-    public Date getReporttime() 
-    {
-        return reporttime;
-    }
-    public void setHospitalname(String hospitalname) 
-    {
-        this.hospitalname = hospitalname;
-    }
+    /**  鍒涘缓鏃堕棿  */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    private Date createTime;
 
-    public String getHospitalname() 
-    {
-        return hospitalname;
-    }
-    public void setHospitalcode(String hospitalcode) 
-    {
-        this.hospitalcode = hospitalcode;
-    }
+    /**  鎵ц鏃堕棿  */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "鎵ц鏃堕棿")
+    private Date startTime;
 
-    public String getHospitalcode() 
-    {
-        return hospitalcode;
-    }
-    public void setOrgid(String orgid) 
-    {
-        this.orgid = orgid;
-    }
+    /**  妫�鏌ラ」鐩甀D  */
+    @ApiModelProperty(value = "妫�鏌ラ」鐩甀D")
+    private String projectId;
 
-    public String getOrgid() 
-    {
-        return orgid;
-    }
-    public void setDelFlag(String delFlag) 
-    {
-        this.delFlag = delFlag;
-    }
+    /**  妫�鏌ラ」鐩悕绉�  */
+    @ApiModelProperty(value = "妫�鏌ラ」鐩悕绉�")
+    private String projectName;
 
-    public String getDelFlag() 
-    {
-        return delFlag;
-    }
-    public void setIsupload(Long isupload) 
-    {
-        this.isupload = isupload;
-    }
+    /**  璇婃柇ID  */
+    @ApiModelProperty(value = "璇婃柇ID")
+    private String diagid;
 
-    public Long getIsupload() 
-    {
-        return isupload;
-    }
-    public void setUploadTime(Date uploadTime) 
-    {
-        this.uploadTime = uploadTime;
-    }
+    /**  璇婃柇鍚嶇О  */
+    @ApiModelProperty(value = "璇婃柇鍚嶇О")
+    private String diagname;
 
-    public Date getUploadTime() 
-    {
-        return uploadTime;
-    }
-    public void setProjectid(Long projectid) 
-    {
-        this.projectid = projectid;
-    }
+    /**  妫�鏌ラ儴浣岻D  */
+    @ApiModelProperty(value = "妫�鏌ラ儴浣岻D")
+    private String partId;
 
-    public Long getProjectid() 
-    {
-        return projectid;
-    }
-    public void setApplicationtime(Date applicationtime) 
-    {
-        this.applicationtime = applicationtime;
-    }
+    /**  妫�鏌ラ儴浣嶅悕绉�  */
+    @ApiModelProperty(value = "妫�鏌ラ儴浣嶅悕绉�")
+    private String partName;
 
-    public Date getApplicationtime() 
-    {
-        return applicationtime;
-    }
-    public void setVisittype(Long visittype) 
-    {
-        this.visittype = visittype;
-    }
+    /**  妫�鏌ョ被鍨婭D  */
+    @ApiModelProperty(value = "妫�鏌ョ被鍨婭D")
+    private String typeId;
 
-    public Long getVisittype() 
-    {
-        return visittype;
-    }
-    public void setVisitid(Long visitid) 
-    {
-        this.visitid = visitid;
-    }
+    /**  妫�鏌ョ被鍨嬪悕绉�  */
+    @ApiModelProperty(value = "妫�鏌ョ被鍨嬪悕绉�")
+    private String typeName;
 
-    public Long getVisitid() 
-    {
-        return visitid;
-    }
-    public void setSchemestatus(Long schemestatus) 
-    {
-        this.schemestatus = schemestatus;
-    }
+    /**  鑳剁墖璐规爣蹇�  */
+    @ApiModelProperty(value = "鑳剁墖璐规爣蹇�")
+    private Integer filmFlag;
 
-    public Long getSchemestatus() 
-    {
-        return schemestatus;
-    }
-    public void setIsabnormal(Long isabnormal) 
-    {
-        this.isabnormal = isabnormal;
-    }
+    /**  搴婅竟鏍囧織  */
+    @ApiModelProperty(value = "搴婅竟鏍囧織")
+    private Integer bedFlag;
 
-    public Long getIsabnormal() 
-    {
-        return isabnormal;
-    }
-    public void setReportconclusion(String reportconclusion) 
-    {
-        this.reportconclusion = reportconclusion;
-    }
+    /**  鎺ㄥ簥鏍囧織  */
+    @ApiModelProperty(value = "鎺ㄥ簥鏍囧織")
+    private Integer pushFlag;
 
-    public String getReportconclusion() 
-    {
-        return reportconclusion;
-    }
-    public void setSchemetime(Date schemetime) 
-    {
-        this.schemetime = schemetime;
-    }
+    /**  鍔犳�ユ爣蹇�  */
+    @ApiModelProperty(value = "鍔犳�ユ爣蹇�")
+    private Integer urgentFlag;
 
-    public Date getSchemetime() 
-    {
-        return schemetime;
-    }
-    public void setDeptcode(String deptcode) 
-    {
-        this.deptcode = deptcode;
-    }
+    /**  鏈敹鍏堟墽琛屾爣蹇�  */
+    @ApiModelProperty(value = "鏈敹鍏堟墽琛屾爣蹇�")
+    private Integer nostartFlag;
 
-    public String getDeptcode() 
-    {
-        return deptcode;
-    }
-    public void setDeptname(String deptname) 
-    {
-        this.deptname = deptname;
-    }
+    @ApiModelProperty(value = "鐖禛UID")
+    private String pguid;
 
-    public String getDeptname() 
-    {
-        return deptname;
-    }
-    public void setDeptid(Long deptid) 
-    {
-        this.deptid = deptid;
-    }
+    @ApiModelProperty(value = "鐖禝D")
+    private String guid;
 
-    public Long getDeptid() 
-    {
-        return deptid;
-    }
+    @ApiModelProperty(value = "鐖禝D")
+    private Integer pid;
 
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("serialnum", getSerialnum())
-            .append("patid", getPatid())
-            .append("projecttype", getProjecttype())
-            .append("projectcode", getProjectcode())
-            .append("projectname", getProjectname())
-            .append("reporttime", getReporttime())
-            .append("hospitalname", getHospitalname())
-            .append("hospitalcode", getHospitalcode())
-            .append("orgid", getOrgid())
-            .append("delFlag", getDelFlag())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("isupload", getIsupload())
-            .append("uploadTime", getUploadTime())
-            .append("projectid", getProjectid())
-            .append("applicationtime", getApplicationtime())
-            .append("visittype", getVisittype())
-            .append("visitid", getVisitid())
-            .append("schemestatus", getSchemestatus())
-            .append("isabnormal", getIsabnormal())
-            .append("reportconclusion", getReportconclusion())
-            .append("schemetime", getSchemetime())
-            .append("deptcode", getDeptcode())
-            .append("deptname", getDeptname())
-            .append("deptid", getDeptid())
-            .toString();
-    }
 }
diff --git a/smartor/src/main/java/com/smartor/domain/PatMedInspectionItem.java b/smartor/src/main/java/com/smartor/domain/PatMedInspectionItem.java
new file mode 100644
index 0000000..b80a59f
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/PatMedInspectionItem.java
@@ -0,0 +1,145 @@
+package com.smartor.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 鎮h�呮鏌ユ楠岃褰曡鎯呭璞� pat_med_inspection_item
+ *
+ * @author ruoyi
+ * @date 2025-06-18
+ */
+@ApiModel(value = "PatMedInspectionItem", description = "鎮h�呮鏌ユ楠岃褰曡鎯呭璞�")
+@Data
+public class PatMedInspectionItem extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**  鑷ID  */
+    @ApiModelProperty(value = "鑷ID")
+    private Long id;
+
+    /**  瀵瑰簲璁板綍琛�  */
+    @ApiModelProperty(value = "瀵瑰簲璁板綍琛�")
+    private Integer inspectionid;
+
+    /**  妫�鏌ュ彿  */
+    @ApiModelProperty(value = "妫�鏌ュ彿")
+    private String inspectionName;
+
+    /**  鎶ュ憡ID  */
+    @ApiModelProperty(value = "鎶ュ憡ID")
+    private String reportid;
+
+    /**  鍖婚櫌鏈烘瀯ID  */
+    @ApiModelProperty(value = "鍖婚櫌鏈烘瀯ID")
+    private String orgid;
+
+    /**  褰撳墠鐘舵�佷唬鐮�  */
+    @ApiModelProperty(value = "褰撳墠鐘舵�佷唬鐮�")
+    private String statuscode;
+
+    /**  褰撳墠浠g爜鍚嶇О  */
+    @ApiModelProperty(value = "褰撳墠浠g爜鍚嶇О")
+    private String statusname;
+
+    /**  鎶ュ憡浜篒D  */
+    @ApiModelProperty(value = "鎶ュ憡浜篒D")
+    private String reporterid;
+
+    /**  鎶ュ憡浜哄鍚�  */
+    @ApiModelProperty(value = "鎶ュ憡浜哄鍚�")
+    private String reportername;
+
+    /**  鎶ュ憡鏃堕棿  */
+    @ApiModelProperty(value = "鎶ュ憡鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+        private Date reportdate;
+
+    /**  璇婃柇鍗拌薄  */
+    @ApiModelProperty(value = "璇婃柇鍗拌薄")
+    private String diagimpression;
+
+    /**  璇婃柇鎵�瑙�  */
+    @ApiModelProperty(value = "璇婃柇鎵�瑙�")
+    private String diagfindings;
+
+    /**  璇婃柇寤鸿  */
+    @ApiModelProperty(value = "璇婃柇寤鸿")
+    private String diagsuggestion;
+
+    /**  鎶ュ憡鍦板潃  */
+    @ApiModelProperty(value = "鎶ュ憡鍦板潃")
+    private String reporturl;
+
+    /**  鍗辨�ュ�兼爣蹇�  */
+    @ApiModelProperty(value = "鍗辨�ュ�兼爣蹇�")
+    private Integer criticalFlag;
+
+    /**  鍗辨�ュ�煎唴瀹�  */
+    @ApiModelProperty(value = "鍗辨�ュ�煎唴瀹�")
+    private String criticalContent;
+
+    /**  鎶ュ憡绉戝id  */
+    @ApiModelProperty(value = "鎶ュ憡绉戝id")
+    private String reportdeptid;
+
+    /**  鎶ュ憡绉戝鍚嶇О  */
+    @ApiModelProperty(value = "鎶ュ憡绉戝鍚嶇О")
+    private String reportdeptname;
+
+    /**  妫�鏌ョ粨鏋滀唬鐮�  */
+    @ApiModelProperty(value = "妫�鏌ョ粨鏋滀唬鐮�")
+    private String resultcode;
+
+    /**  妫�鏌ョ粨鏋滃悕绉�  */
+    @ApiModelProperty(value = "妫�鏌ョ粨鏋滃悕绉�")
+    private String resultname;
+
+    /**  鍒犻櫎鏍囧織锛�0锛氭湭鍒犻櫎 1锛氬凡鍒犻櫎锛�  */
+    @ApiModelProperty(value = "鍒犻櫎鏍囧織锛�0锛氭湭鍒犻櫎 1锛氬凡鍒犻櫎锛�")
+    private String delFlag;
+
+    /**  鏇存柊浜�  */
+    @ApiModelProperty(value = "鏇存柊浜�")
+    private String updateBy;
+
+    /**  鏇存柊鏃堕棿  */
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date updateTime;
+
+    /**  鍒涘缓浜�  */
+    @ApiModelProperty(value = "鍒涘缓浜�")
+    private String createBy;
+
+    /**  鍒涘缓鏃堕棿  */
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createTime;
+
+    /**  涓婁紶鏍囧織锛�0锛氭湭涓婁紶 1锛氬凡涓婁紶锛�  */
+    @ApiModelProperty(value = "涓婁紶鏍囧織锛�0锛氭湭涓婁紶 1锛氬凡涓婁紶锛�")
+    private Integer isupload;
+
+    /**  涓婁紶鏃堕棿  */
+    @ApiModelProperty(value = "涓婁紶鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date uploadTime;
+
+    /**  鐖禛UID  */
+    @ApiModelProperty(value = "鐖禛UID")
+    private String pguid;
+
+    /**  GUID  */
+    @ApiModelProperty(value = "GUID")
+    private String guid;
+
+    /**  鐖禝D  */
+    @ApiModelProperty(value = "鐖禝D")
+    private Integer pid;
+}
diff --git a/smartor/src/main/java/com/smartor/mapper/PatMedInspectionItemMapper.java b/smartor/src/main/java/com/smartor/mapper/PatMedInspectionItemMapper.java
new file mode 100644
index 0000000..b47c408
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/mapper/PatMedInspectionItemMapper.java
@@ -0,0 +1,65 @@
+package com.smartor.mapper;
+
+import com.smartor.domain.PatMedInspectionItem;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 鎮h�呮鏌ユ楠岃鎯呰褰昅apper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2025-06-21
+ */
+@Mapper
+public interface PatMedInspectionItemMapper {
+
+    /**
+     * 鏌ヨ鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param id 鎮h�呮鏌ユ楠岃褰曚富閿�
+     * @return 鎮h�呮鏌ユ楠岃褰�
+     */
+    public PatMedInspectionItem selectPatMedInspectionItemById(Long id);
+
+    /**
+     * 鏌ヨ鎮h�呮鏌ユ楠岃褰曞垪琛�
+     *
+     * @param patMedInspectionItem 鎮h�呮鏌ユ楠岃褰�
+     * @return 鎮h�呮鏌ユ楠岃褰曢泦鍚�
+     */
+    public List<PatMedInspectionItem> selectPatMedInspectionItemList(PatMedInspectionItem patMedInspectionItem);
+
+    /**
+     * 鏂板鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param patMedInspectionItem 鎮h�呮鏌ユ楠岃褰�
+     * @return 缁撴灉
+     */
+    public int insertPatMedInspectionItem(PatMedInspectionItem patMedInspectionItem);
+
+    /**
+     * 淇敼鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param patMedInspectionItem 鎮h�呮鏌ユ楠岃褰�
+     * @return 缁撴灉
+     */
+    public int updatePatMedInspectionItem(PatMedInspectionItem patMedInspectionItem);
+
+    /**
+     * 鍒犻櫎鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param id 鎮h�呮鏌ユ楠岃褰曚富閿�
+     * @return 缁撴灉
+     */
+    public int deletePatMedInspectionItemById(Long id);
+
+    /**
+     * 鎵归噺鍒犻櫎鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deletePatMedInspectionItemByIds(Long[] ids);
+
+}
diff --git a/smartor/src/main/java/com/smartor/service/IPatMedInspectionItemService.java b/smartor/src/main/java/com/smartor/service/IPatMedInspectionItemService.java
new file mode 100644
index 0000000..4eca895
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/IPatMedInspectionItemService.java
@@ -0,0 +1,64 @@
+package com.smartor.service;
+
+
+
+import com.smartor.domain.PatMedInspectionItem;
+
+import java.util.List;
+
+/**
+ * 鎮h�呮鏌ユ楠岃鎯呰褰昐ervice鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2025-06-21
+ */
+public interface IPatMedInspectionItemService {
+
+    /**
+     * 鏌ヨ鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param id 鎮h�呮鏌ユ楠岃褰曚富閿�
+     * @return 鎮h�呮鏌ユ楠岃褰�
+     */
+    public PatMedInspectionItem selectPatMedInspectionItemById(Long id);
+
+    /**
+     * 鏌ヨ鎮h�呮鏌ユ楠岃褰曞垪琛�
+     *
+     * @param patMedInspectionItem 鎮h�呮鏌ユ楠岃褰�
+     * @return 鎮h�呮鏌ユ楠岃褰曢泦鍚�
+     */
+    public List<PatMedInspectionItem> selectPatMedInspectionItemList(PatMedInspectionItem patMedInspectionItem);
+
+    /**
+     * 鏂板鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param patMedInspectionItem 鎮h�呮鏌ユ楠岃褰�
+     * @return 缁撴灉
+     */
+    public int insertPatMedInspectionItem(PatMedInspectionItem patMedInspectionItem);
+
+    /**
+     * 淇敼鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param patMedInspectionItem 鎮h�呮鏌ユ楠岃褰�
+     * @return 缁撴灉
+     */
+    public int updatePatMedInspectionItem(PatMedInspectionItem patMedInspectionItem);
+
+    /**
+     * 鎵归噺鍒犻櫎鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑鎮h�呮鏌ユ楠岃褰曚富閿泦鍚�
+     * @return 缁撴灉
+     */
+    public int deletePatMedInspectionItemByIds(Long[] ids);
+
+    /**
+     * 鍒犻櫎鎮h�呮鏌ユ楠岃褰曚俊鎭�
+     *
+     * @param id 鎮h�呮鏌ユ楠岃褰曚富閿�
+     * @return 缁撴灉
+     */
+    public int deletePatMedInspectionItemById(Long id);
+}
diff --git a/smartor/src/main/java/com/smartor/service/IServiceExternalService.java b/smartor/src/main/java/com/smartor/service/IServiceExternalService.java
index ee69b4e..e6f5209 100644
--- a/smartor/src/main/java/com/smartor/service/IServiceExternalService.java
+++ b/smartor/src/main/java/com/smartor/service/IServiceExternalService.java
@@ -73,6 +73,11 @@
     public Boolean addOutHospInfo(@RequestBody Map dataMap);
 
     /**
+     * 鏂板鍑洪櫌璁板綍鐧昏淇℃伅
+     */
+    public Boolean addOutHospJLInfo(@RequestBody Map dataMap);
+
+    /**
      * 鍙栨秷鍑洪櫌鐧昏淇℃伅
      */
     public Boolean cancelOutHospInfo(@RequestBody Map dataMap);
@@ -107,4 +112,14 @@
      * 鏂板鍖荤枟缁勫尰鐢�
      */
     public Boolean addMedicalTeam(Map dataMap);
+
+    /**
+     * 妫�鏌ョ敵璇锋湇鍔�
+     */
+    public Boolean addInspectService(Map dataMap);
+
+    /**
+     * 妫�鏌ユ姤鍛婃湇鍔�
+     */
+    public Boolean addInspectBGService(Map dataMap);
 }
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedInspectionItemServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedInspectionItemServiceImpl.java
new file mode 100644
index 0000000..43916c6
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInspectionItemServiceImpl.java
@@ -0,0 +1,100 @@
+package com.smartor.service.impl;
+
+
+import com.ruoyi.common.utils.DateUtils;
+import com.smartor.domain.PatMedInspection;
+import com.smartor.domain.PatMedInspectionItem;
+import com.smartor.mapper.PatMedInspectionItemMapper;
+import com.smartor.service.IPatMedInspectionItemService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 鎮h�呮鏌ユ楠岃鎯呰褰昐ervice涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2025-06-21
+ */
+@Service
+public class PatMedInspectionItemServiceImpl implements IPatMedInspectionItemService {
+
+    @Autowired
+    private PatMedInspectionItemMapper patMedInspectionItemMapper;
+
+    /**
+     * 鏌ヨ鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param id 鎮h�呮鏌ユ楠岃褰曚富閿�
+     * @return 鎮h�呮鏌ユ楠岃褰�
+     */
+    @Override
+    public PatMedInspectionItem selectPatMedInspectionItemById(Long id)
+    {
+        return patMedInspectionItemMapper.selectPatMedInspectionItemById(id);
+    }
+
+    /**
+     * 鏌ヨ鎮h�呮鏌ユ楠岃褰曞垪琛�
+     *
+     * @param patMedInspectionItem 鎮h�呮鏌ユ楠岃褰�
+     * @return 鎮h�呮鏌ユ楠岃褰�
+     */
+    @Override
+    public List<PatMedInspectionItem> selectPatMedInspectionItemList(PatMedInspectionItem patMedInspectionItem)
+    {
+        return patMedInspectionItemMapper.selectPatMedInspectionItemList(patMedInspectionItem);
+    }
+
+    /**
+     * 鏂板鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param patMedInspectionItem 鎮h�呮鏌ユ楠岃褰�
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertPatMedInspectionItem(PatMedInspectionItem patMedInspectionItem)
+    {
+        patMedInspectionItem.setCreateTime(DateUtils.getNowDate());
+        patMedInspectionItem.setUpdateTime(DateUtils.getNowDate());
+        return patMedInspectionItemMapper.insertPatMedInspectionItem(patMedInspectionItem);
+    }
+
+    /**
+     * 淇敼鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param patMedInspectionItem 鎮h�呮鏌ユ楠岃褰�
+     * @return 缁撴灉
+     */
+    @Override
+    public int updatePatMedInspectionItem(PatMedInspectionItem patMedInspectionItem)
+    {
+        patMedInspectionItem.setUpdateTime(DateUtils.getNowDate());
+        return patMedInspectionItemMapper.updatePatMedInspectionItem(patMedInspectionItem);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎鎮h�呮鏌ユ楠岃褰�
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑鎮h�呮鏌ユ楠岃褰曚富閿�
+     * @return 缁撴灉
+     */
+    @Override
+    public int deletePatMedInspectionItemByIds(Long[] ids)
+    {
+        return patMedInspectionItemMapper.deletePatMedInspectionItemByIds(ids);
+    }
+
+    /**
+     * 鍒犻櫎鎮h�呮鏌ユ楠岃褰曚俊鎭�
+     *
+     * @param id 鎮h�呮鏌ユ楠岃褰曚富閿�
+     * @return 缁撴灉
+     */
+    @Override
+    public int deletePatMedInspectionItemById(Long id)
+    {
+        return patMedInspectionItemMapper.deletePatMedInspectionItemById(id);
+    }
+}
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
index 218e9f7..f1d7bcf 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -56,6 +56,10 @@
     @Autowired
     private PatMedOperationItemMapper patMedOperationItemMapper;
     @Autowired
+    private PatMedInspectionMapper patMedInspectionMapper;
+    @Autowired
+    private PatMedInspectionItemMapper patMedInspectionItemMapper;
+    @Autowired
     private Icd10Mapper icd10Mapper;
     @Autowired
     private PatMedOuthospMapper patMedOuthospMapper;
@@ -432,6 +436,139 @@
                 } catch (ParseException e) {
                     e.printStackTrace();
                 }
+            }
+            patMedInhosp1.setFuperiod(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangZQJY")) ? SuiFangJH.get("SuiFangZQJY").toString() : null);
+            patMedInhosp1.setFutypecode(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangFSDM")) ? SuiFangJH.get("SuiFangFSDM").toString() : null);
+            patMedInhosp1.setFutypedesc(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangFSMC")) ? SuiFangJH.get("SuiFangFSMC").toString() : null);
+            patMedInhosp1.setFuadvice(ObjectUtils.isNotEmpty(SuiFangJH.get("FuZhenZD")) ? SuiFangJH.get("FuZhenZD").toString() : null);
+            patMedInhosp1.setFuspecialadvice(ObjectUtils.isNotEmpty(SuiFangJH.get("QiTaZKJBSF")) ? SuiFangJH.get("QiTaZKJBSF").toString() : null);
+        }
+
+        List<HashMap<String, Object>> zhenDuanList = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("ZhenDuanList") : null;
+        if (CollectionUtils.isNotEmpty(zhenDuanList)) {
+            List<ExternalInHospPatientDiagnoseInfo> hospPatientDiagnoseInfos2 = zhenDuanList.stream().map(map -> {
+                ExternalInHospPatientDiagnoseInfo info = new ExternalInHospPatientDiagnoseInfo();
+                info.setZhenDuanID((String) map.get("ZhenDuanID"));
+                info.setZhenDuanMC((String) map.get("ZhenDuanMC"));
+                info.setIcd10((String) map.get("Icd10"));
+                return info;
+            }).collect(Collectors.toList());
+            patMedInhosp1.setLeaveicd10code(hospPatientDiagnoseInfos2.get(0).getIcd10());
+            patMedInhosp1.setLeavediagname(hospPatientDiagnoseInfos2.get(0).getZhenDuanMC());
+            //patMedInhosp1.setDiagname(StringUtils.isNotEmpty(patMedInhosp1.getLeavediagname()) ? patMedInhosp1.getLeavediagname() + "," + hospPatientDiagnoseInfos2.get(0).getZhenDuanMC() : hospPatientDiagnoseInfos2.get(0).getZhenDuanMC());
+            patMedInhosp1.setDiagname(StringUtils.isNotEmpty(patMedInhosp1.getLeavediagname()) ? patMedInhosp1.getLeavediagname() : hospPatientDiagnoseInfos2.get(0).getZhenDuanMC());
+        }
+
+        patMedInhosp1.setInhospstate("1");
+        if (CollectionUtils.isNotEmpty(patMedInhospList)) {
+            patMedInhosp1.setUpdateTime(new Date());
+            patMedInhosp1.setOrgid(ObjectUtils.isNotEmpty(BingRenXX) && ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGID")) ? BingRenXX.get("ZuZhiJGID").toString() : null);
+            int i = patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
+            if (i != 1) return false;
+        } else {
+            if (ObjectUtils.isNotEmpty(BingRenXX)) {
+                patMedInhosp1.setHospitalname(ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGMC")) ? BingRenXX.get("ZuZhiJGMC").toString() : null);
+                patMedInhosp1.setHospitalcode(ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGID")) ? BingRenXX.get("ZuZhiJGID").toString() : null);
+                patMedInhosp1.setLeavehospitaldistrictname(ObjectUtils.isNotEmpty(BingRenXX.get("DangQianBQMC")) ? BingRenXX.get("DangQianBQMC").toString() : null);
+                patMedInhosp1.setLeavehospitaldistrictcode(ObjectUtils.isNotEmpty(BingRenXX.get("DangQianBQID")) ? BingRenXX.get("DangQianBQID").toString() : null);
+                patMedInhosp1.setOrgid(ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGID")) ? BingRenXX.get("ZuZhiJGID").toString() : null);
+                patMedInhosp1.setPatno(ObjectUtils.isNotEmpty(BingRenXX.get("BingRenID")) ? BingRenXX.get("BingRenID").toString() : null);
+                patMedInhosp1.setInhospno(ObjectUtils.isNotEmpty(BingRenXX.get("BingAnHao")) ? BingRenXX.get("BingAnHao").toString() : null);
+                patMedInhosp1.setSerialnum(ObjectUtils.isNotEmpty(BingRenXX.get("JiuZhenYWID")) ? BingRenXX.get("JiuZhenYWID").toString() : null);
+            }
+            patMedInhosp1.setPatid(patArchive.getId());
+            patMedInhosp1.setPatname(patArchive.getName());
+
+            patMedInhosp1.setCreateTime(new Date());
+            int i = patMedInhospMapper.insertPatMedInhosp(patMedInhosp1);
+            if (i != 1) return false;
+        }
+        return true;
+    }
+
+    @Override
+    public Boolean addOutHospJLInfo(Map dataMap) {
+        log.error("ServiceExternalServiceImpl---addOutHospJLInfo鐨勬柊澧炵殑鍊间负锛歿}", dataMap);
+        Map yeWuXX = (Map) dataMap.get("YeWuXX");
+        Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null;
+        Map<String, Object> ChuYuanJL = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("ChuYuanJL") : null;
+        List<HashMap<String, Object>> epai = ObjectUtils.isNotEmpty(BingRenXX) ? (List<HashMap<String, Object>>) BingRenXX.get("DiZhiXXList") : null;
+        List<HashMap<String, Object>> epli = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("LianXiRList") : null;
+        Map<String, Object> SuiFangJH = ObjectUtils.isNotEmpty(ChuYuanJL) ? (Map<String, Object>) ChuYuanJL.get("SuiFangJH") : null;
+
+        ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true);
+        ExternalInHospPatientAddrInfo externalInHospPatientAddrInfo = null;
+        ExternalInHospPatientLiaisonInfo externalInHospPatientLiaisonInfo = null;
+        List<ExternalInHospPatientAddrInfo> epai2 = null;
+        if (CollectionUtils.isNotEmpty(epai)) {
+            epai2 = epai.stream().map(map -> {
+                ExternalInHospPatientAddrInfo info = new ExternalInHospPatientAddrInfo();
+                info.setDiZhiLX((String) map.get("DiZhiLX")); // 鍋囪瀛楁绫诲瀷鏄� Integer
+                info.setDiZhiXX((String) map.get("DiZhiXX"));
+                info.setShengFenDM((String) map.get("ShengFenDM"));
+                info.setShengFenMC((String) map.get("ShengFenMC"));
+                info.setShiDiQDM((String) map.get("ShiDiQDM"));
+                info.setShiDiQMC((String) map.get("ShiDiQMC"));
+                info.setXianQuDM((String) map.get("XianQuDM"));
+                info.setXianQuMC((String) map.get("XianQuMC"));
+                info.setXiangZhenDM((String) map.get("XiangZhenDM"));
+                info.setXiangZhenMC((String) map.get("XiangZhenMC"));
+                info.setCunJiDM((String) map.get("CunJiDM"));
+                info.setQiTaXX((String) map.get("QiTaXX"));
+                info.setYouBian((String) map.get("YouBian"));
+                return info;
+            }).collect(Collectors.toList());
+        }
+        List<ExternalInHospPatientLiaisonInfo> epli2 = null;
+        if (CollectionUtils.isNotEmpty(epli)) {
+            epli2 = epli.stream().map(map -> {
+                ExternalInHospPatientLiaisonInfo info = new ExternalInHospPatientLiaisonInfo();
+                info.setLianXiRXM((String) map.get("LianXiRXM"));
+                info.setLianXiRDH((String) map.get("LianXiRDH"));
+                info.setGuanXiDM((String) map.get("GuanXiDM"));
+                info.setGuanXiMC((String) map.get("GuanXiMC"));
+                return info;
+            }).collect(Collectors.toList());
+        }
+        if (CollectionUtils.isNotEmpty(epai)) externalInHospPatientAddrInfo = epai2.get(0);
+        if (CollectionUtils.isNotEmpty(epli)) externalInHospPatientLiaisonInfo = epli2.get(0);
+        //鏂板鎮h�呭熀鏈俊鎭柊澧炴垨淇敼
+        PatArchive patArchive = addPatArchive(externalInHospPatientInfo, externalInHospPatientAddrInfo, externalInHospPatientLiaisonInfo);
+
+        PatMedInhosp patMedInhosp = new PatMedInhosp();
+        patMedInhosp.setInhospno(externalInHospPatientInfo.getBingAnHao());
+        patMedInhosp.setSerialnum(externalInHospPatientInfo.getJiuZhenYWID());
+        List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp);
+        for (PatMedInhosp patMedInhosp1 : patMedInhospList) {
+            String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid());
+            patMedInhosp1.setTagname(tagname);
+        }
+        PatMedInhosp patMedInhosp1 = new PatMedInhosp();
+        if (CollectionUtils.isNotEmpty(patMedInhospList)) patMedInhosp1 = patMedInhospList.get(0);
+        patMedInhosp1.setSchemestatus(2L);
+        patMedInhosp1.setUpdateTime(new Date());
+        patMedInhosp1.setTelcode(patArchive.getTelcode());
+        patMedInhosp1.setLeavehospitaldistrictcode(externalInHospPatientInfo.getDangQianBQID());
+        patMedInhosp1.setLeavehospitaldistrictname(externalInHospPatientInfo.getDangQianBQMC());
+        patMedInhosp1.setLeaveldeptname(externalInHospPatientInfo.getDangQianKSMC());
+        patMedInhosp1.setDeptname(externalInHospPatientInfo.getDangQianKSMC());
+        patMedInhosp1.setLeaveldeptcode(externalInHospPatientInfo.getDangQianKSID());
+        patMedInhosp1.setDeptcode(externalInHospPatientInfo.getDangQianKSID());
+
+        if (ObjectUtils.isNotEmpty(SuiFangJH)) {
+            patMedInhosp1.setFuflag(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangBS")) ? SuiFangJH.get("SuiFangBS").toString() : null);
+            if (ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangRQ"))) {
+                try {
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                    patMedInhosp1.setFudate(simpleDateFormat.parse(SuiFangJH.get("SuiFangRQ").toString()));
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
+            }
+            try {
+                patMedInhosp1.setFudate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(SuiFangJH.get("SuiFangRQ").toString()));
+            } catch (ParseException e) {
+                e.printStackTrace();
             }
             patMedInhosp1.setFuperiod(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangZQJY")) ? SuiFangJH.get("SuiFangZQJY").toString() : null);
             patMedInhosp1.setFutypecode(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangFSDM")) ? SuiFangJH.get("SuiFangFSDM").toString() : null);
@@ -1174,6 +1311,212 @@
         return true;
     }
 
+    //妫�鏌ョ敵璇锋湇鍔�
+    @Override
+    public Boolean addInspectService(Map dataMap) {
+        log.error("ServiceExternalServiceImpl---addInspectService鐨勬柊澧炵殑鍊间负锛歿}", dataMap);
+        Map xiaoXiTou = (Map) dataMap.get("XiaoXiTou");
+        Map yeWuXX = (Map) dataMap.get("YeWuXX");
+        Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null;
+        Map<String, Object> JianChaSQ = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JianChaSQ") : null;
+        List<HashMap<String, Object>> JianChaBWList = ObjectUtils.isNotEmpty(JianChaSQ) ? (List<HashMap<String, Object>>) JianChaSQ.get("JianChaBWList") : null;
+        List<HashMap<String, Object>> ZhenDuanList = ObjectUtils.isNotEmpty(JianChaSQ) ? (List<HashMap<String, Object>>) JianChaSQ.get("ZhenDuanList") : null;
+        List<HashMap<String, Object>> epai = ObjectUtils.isNotEmpty(BingRenXX) ? (List<HashMap<String, Object>>) BingRenXX.get("DiZhiXXList") : null;
+
+        ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true);
+        externalInHospPatientInfo.setZuZhiJGID(xiaoXiTou.get("FaSongJGID").toString());
+        ExternalInHospPatientAddrInfo externalInHospPatientAddrInfo = null;
+        ExternalInHospPatientLiaisonInfo externalInHospPatientLiaisonInfo = null;
+        List<ExternalInHospPatientAddrInfo> epai2 = null;
+        if (CollectionUtils.isNotEmpty(epai)) {
+            epai2 = epai.stream().map(map -> {
+                ExternalInHospPatientAddrInfo info = new ExternalInHospPatientAddrInfo();
+                info.setDiZhiLX((String) map.get("DiZhiLX")); // 鍋囪瀛楁绫诲瀷鏄� Integer
+                info.setDiZhiXX((String) map.get("DiZhiXX"));
+                info.setShengFenDM((String) map.get("ShengFenDM"));
+                info.setShengFenMC((String) map.get("ShengFenMC"));
+                info.setShiDiQDM((String) map.get("ShiDiQDM"));
+                info.setShiDiQMC((String) map.get("ShiDiQMC"));
+                info.setXianQuDM((String) map.get("XianQuDM"));
+                info.setXianQuMC((String) map.get("XianQuMC"));
+                info.setXiangZhenDM((String) map.get("XiangZhenDM"));
+                info.setXiangZhenMC((String) map.get("XiangZhenMC"));
+                info.setCunJiDM((String) map.get("CunJiDM"));
+                info.setQiTaXX((String) map.get("QiTaXX"));
+                info.setYouBian((String) map.get("YouBian"));
+                return info;
+            }).collect(Collectors.toList());
+        }
+        if (CollectionUtils.isNotEmpty(epai)) externalInHospPatientAddrInfo = epai2.get(0);
+        //鏂板鎮h�呭熀鏈俊鎭柊澧炴垨淇敼
+        PatArchive patArchive = addPatArchive(externalInHospPatientInfo, externalInHospPatientAddrInfo, externalInHospPatientLiaisonInfo);
+
+        PatMedInspection patMedInspection = new PatMedInspection();
+        patMedInspection.setProjecttype(1);
+        patMedInspection.setOrgid(externalInHospPatientInfo.getZuZhiJGID());
+        patMedInspection.setInhospno(externalInHospPatientInfo.getBingAnHao());
+        patMedInspection.setPatidHis(externalInHospPatientInfo.getBingRenID());
+        patMedInspection.setPatname(externalInHospPatientInfo.getXingMing());
+        patMedInspection.setProjecttype(1);
+
+        if (ObjectUtils.isNotEmpty(BingRenXX)) {
+            patMedInspection.setIdcardno(ObjectUtils.isNotEmpty(BingRenXX.get("ZhengJianHM")) ? BingRenXX.get("ZhengJianHM").toString() : null);
+            patMedInspection.setTelcode(ObjectUtils.isNotEmpty(BingRenXX.get("LianXiDH")) ? BingRenXX.get("LianXiDH").toString() : null);
+        }
+        List<PatMedInspection> patMedInspections = patMedInspectionMapper.selectPatMedInspectionList(patMedInspection);
+        if(ObjectUtils.isNotEmpty(JianChaSQ)){
+            patMedInspection.setAdviceId(Long.valueOf(ObjectUtils.isNotEmpty(JianChaSQ.get("YiZhuID")) ? JianChaSQ.get("YiZhuID").toString() : null));
+            patMedInspection.setAppliyid(ObjectUtils.isNotEmpty(JianChaSQ.get("ShenQingDID")) ? JianChaSQ.get("ShenQingDID").toString() : null);
+            patMedInspection.setPriority(ObjectUtils.isNotEmpty(JianChaSQ.get("YouXianJi")) ? JianChaSQ.get("YouXianJi").toString() : null);
+            patMedInspection.setDrcode(ObjectUtils.isNotEmpty(JianChaSQ.get("KaiDanRID")) ? JianChaSQ.get("KaiDanRID").toString() : null);
+            patMedInspection.setDrname(ObjectUtils.isNotEmpty(JianChaSQ.get("KaiDanRXM")) ? JianChaSQ.get("KaiDanRXM").toString() : null);
+            patMedInspection.setDeptcode(ObjectUtils.isNotEmpty(JianChaSQ.get("KaiDanKSID")) ? JianChaSQ.get("KaiDanKSID").toString() : null);
+            patMedInspection.setDeptname(ObjectUtils.isNotEmpty(JianChaSQ.get("KaiDanKSMC")) ? JianChaSQ.get("KaiDanKSMC").toString() : null);
+            patMedInspection.setOperatorId(ObjectUtils.isNotEmpty(JianChaSQ.get("ShenHeRID")) ? JianChaSQ.get("ShenHeRID").toString() : null);
+            patMedInspection.setOperatorName(ObjectUtils.isNotEmpty(JianChaSQ.get("ShenHeRXM")) ? JianChaSQ.get("ShenHeRXM").toString() : null);
+            patMedInspection.setTypeId(ObjectUtils.isNotEmpty(JianChaSQ.get("JianChaLXID")) ? JianChaSQ.get("JianChaLXID").toString() : null);
+            patMedInspection.setTypeName(ObjectUtils.isNotEmpty(JianChaSQ.get("JianChaLXMC")) ? JianChaSQ.get("JianChaLXMC").toString() : null);
+            patMedInspection.setMoney(Float.valueOf(ObjectUtils.isNotEmpty(JianChaSQ.get("JinE")) ? JianChaSQ.get("JinE").toString() : null));
+            patMedInspection.setFilmFlag(Integer.valueOf(ObjectUtils.isNotEmpty(JianChaSQ.get("JiaoPianFBZ")) ? JianChaSQ.get("JiaoPianFBZ").toString() : null));
+            patMedInspection.setBedFlag(Integer.valueOf(ObjectUtils.isNotEmpty(JianChaSQ.get("ChuangBianBZ")) ? JianChaSQ.get("ChuangBianBZ").toString() : null));
+            patMedInspection.setPushFlag(Integer.valueOf(ObjectUtils.isNotEmpty(JianChaSQ.get("TuiChuangBZ")) ? JianChaSQ.get("TuiChuangBZ").toString() : null));
+            patMedInspection.setUrgentFlag(Integer.valueOf(ObjectUtils.isNotEmpty(JianChaSQ.get("JiaJiBZ")) ? JianChaSQ.get("JiaJiBZ").toString() : null));
+            patMedInspection.setNostartFlag(Integer.valueOf(ObjectUtils.isNotEmpty(JianChaSQ.get("WeiShouXZXBZ")) ? JianChaSQ.get("WeiShouXZXBZ").toString() : null));
+            if (ObjectUtils.isNotEmpty(JianChaSQ.get("KaiDanSJ"))) {
+                try {
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                    patMedInspection.setOpendate(simpleDateFormat.parse(JianChaSQ.get("KaiDanSJ").toString()));
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
+            }
+            if (ObjectUtils.isNotEmpty(JianChaSQ.get("ShenHeSJ"))) {
+                try {
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                    patMedInspection.setOperatorDate(simpleDateFormat.parse(JianChaSQ.get("ShenHeSJ").toString()));
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
+            }
+            if (ObjectUtils.isNotEmpty(JianChaSQ.get("ZhiXingSJ"))) {
+                try {
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                    patMedInspection.setStartTime(simpleDateFormat.parse(JianChaSQ.get("ZhiXingSJ").toString()));
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        if (CollectionUtils.isNotEmpty(JianChaBWList)) {
+            List<ExternalInspectionJC> externalInspectionJC = JianChaBWList.stream().map(map -> {
+                ExternalInspectionJC info = new ExternalInspectionJC();
+                info.setJianChaXMID((String) map.get("JianChaXMID"));
+                info.setJianChaXMMC((String) map.get("JianChaXMMC"));
+                info.setJianChaBWID((String) map.get("JianChaBWID"));
+                info.setJianChaBWMC((String) map.get("JianChaBWMC"));
+                return info;
+            }).collect(Collectors.toList());
+            patMedInspection.setProjectId(externalInspectionJC.get(0).getJianChaXMID());
+            patMedInspection.setProjectName(externalInspectionJC.get(0).getJianChaXMMC());
+            patMedInspection.setPartId(externalInspectionJC.get(0).getJianChaBWID());
+            patMedInspection.setPartName(externalInspectionJC.get(0).getJianChaBWMC());
+        }
+
+        if (CollectionUtils.isNotEmpty(ZhenDuanList)) {
+            List<ExternalInspectionJC> externalInspectionJC = ZhenDuanList.stream().map(map -> {
+                ExternalInspectionJC info = new ExternalInspectionJC();
+                info.setZhenDuanID((String) map.get("ZhenDuanID"));
+                info.setZhenDuanMC((String) map.get("ZhenDuanMC"));
+                return info;
+            }).collect(Collectors.toList());
+            patMedInspection.setDiagid(externalInspectionJC.get(0).getZhenDuanID());
+            patMedInspection.setDiagname(externalInspectionJC.get(0).getZhenDuanMC());
+        }
+
+        if (CollectionUtils.isNotEmpty(patMedInspections)){
+            patMedInspection.setUpdateDate(new Date());
+            patMedInspection.setOrgid(ObjectUtils.isNotEmpty(xiaoXiTou) && ObjectUtils.isNotEmpty(xiaoXiTou.get("FaSongJGID")) ? xiaoXiTou.get("FaSongJGID").toString() : null);
+            //   鏇存柊鎿嶄綔
+            int i = patMedInspectionMapper.updatePatMedInspection(patMedInspection);
+            if (i != 1) return false;
+        }else {
+            patMedInspection.setDelFlag("0");
+            patMedInspection.setCreateTime(new Date());
+            int i = patMedInspectionMapper.insertPatMedInspection(patMedInspection);
+            if (i != 1) return false;
+        }
+
+        return true;
+    }
+
+    //妫�鏌ヨ鎯呮坊鍔�
+    @Override
+    public Boolean addInspectBGService(Map dataMap) {
+        log.error("ServiceExternalServiceImpl---addInspectBGService鐨勬柊澧炵殑鍊间负锛歿}", dataMap);
+        Map xiaoXiTou = (Map) dataMap.get("XiaoXiTou");
+        Map yeWuXX = (Map) dataMap.get("YeWuXX");
+        Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null;
+        Map<String, Object> JianChaBG = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JianChaBG") : null;
+        List<HashMap<String, Object>> JianChaBWList = ObjectUtils.isNotEmpty(JianChaBG) ? (List<HashMap<String, Object>>) JianChaBG.get("JianChaBWList") : null;
+        PatMedInspection patMedInspection = new PatMedInspection();
+        PatMedInspectionItem patMedInspectionItem = new PatMedInspectionItem();
+        patMedInspection.setOrgid(BingRenXX.get("ZuZhiJGID").toString());
+        patMedInspection.setInhospno(BingRenXX.get("BingAnHao").toString());
+        patMedInspection.setPatidHis(BingRenXX.get("BingRenID").toString());
+        patMedInspection.setPatname(BingRenXX.get("XingMing").toString());
+        patMedInspection.setAppliyid(JianChaBG.get("ShenQingDID").toString());
+        //鏌ユ壘鎮h�呮鏌ユ楠屼俊鎭紝濡傛灉鏃狅紝杩涜鏂板姞
+        List<PatMedInspection> patMedInspections = patMedInspectionMapper.selectPatMedInspectionList(patMedInspection);
+        if(CollectionUtils.isNotEmpty(patMedInspections)){
+            patMedInspectionItem.setInspectionid(patMedInspections.get(0).getId().intValue());
+        }else{
+            addInspectService(dataMap);
+            List<PatMedInspection> patMedInspections2 = patMedInspectionMapper.selectPatMedInspectionList(patMedInspection);
+            patMedInspectionItem.setInspectionid(patMedInspections2.get(0).getId().intValue());
+        }
+        //妫�鏌ユ楠屾姤鍛婃暟鎹鐞�
+        patMedInspectionItem.setOrgid(BingRenXX.get("ZuZhiJGID").toString());
+        List<PatMedInspectionItem> patMedInspectionItems = patMedInspectionItemMapper.selectPatMedInspectionItemList(patMedInspectionItem);
+        if (ObjectUtils.isNotEmpty(JianChaBG)){
+            patMedInspectionItem.setInspectionName(JianChaBG.get("JianChaHao").toString());
+            patMedInspectionItem.setReportid(JianChaBG.get("JianChaHao").toString());
+            patMedInspectionItem.setStatuscode(JianChaBG.get("DangQianZTDM").toString());
+            patMedInspectionItem.setStatusname(JianChaBG.get("DangQianZTMC").toString());
+            patMedInspectionItem.setReportid(JianChaBG.get("BaoGaoRID").toString());
+            patMedInspectionItem.setReportername(JianChaBG.get("BaoGaoRXM").toString());
+            patMedInspectionItem.setDiagimpression(JianChaBG.get("ZhenDuanYX").toString());
+            patMedInspectionItem.setDiagfindings(JianChaBG.get("ZhenDuanSJ").toString());
+            patMedInspectionItem.setDiagsuggestion(JianChaBG.get("ZhenDuanJY").toString());
+            patMedInspectionItem.setReporturl(JianChaBG.get("BaoGaoYXDZ").toString());
+            patMedInspectionItem.setCriticalFlag(Integer.valueOf(JianChaBG.get("WeiJiZBZ").toString()));
+            patMedInspectionItem.setCriticalContent(JianChaBG.get("WeiJiZNR").toString());
+            patMedInspectionItem.setReportdeptid(JianChaBG.get("BaoGaoKSID").toString());
+            patMedInspectionItem.setReportdeptname(JianChaBG.get("BaoGaoKSMC").toString());
+            patMedInspectionItem.setResultcode(JianChaBG.get("JianChaJGDM").toString());
+            patMedInspectionItem.setResultname(JianChaBG.get("JianChaJGMC").toString());
+            if (ObjectUtils.isNotEmpty(JianChaBG.get("BaoGaoSJ"))) {
+                try {
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                    patMedInspection.setOpendate(simpleDateFormat.parse(JianChaBG.get("BaoGaoSJ").toString()));
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        if(ObjectUtils.isNotEmpty(patMedInspectionItems)){
+            patMedInspectionItem.setUpdateTime(new Date());
+            int i = patMedInspectionItemMapper.updatePatMedInspectionItem(patMedInspectionItem);
+            if (i != 1) return false;
+        }else {
+            patMedInspectionItem.setDelFlag("0");
+            patMedInspectionItem.setCreateTime(new Date());
+            int i = patMedInspectionItemMapper.insertPatMedInspectionItem(patMedInspectionItem);
+            if (i != 1) return false;
+        }
+
+        return true;
+    }
+
     private Boolean getType(String type, Map dataMap) {
         switch (type) {
             case "BR_DA_DangAnJL":
@@ -1205,22 +1548,25 @@
                 return true;
             case "JC_SQ_ShenQing":
                 log.error("妫�鏌ョ敵璇峰崟鍏ュ弬绫诲瀷涓猴細{}", type);
-                return true;
+                return addInspectService(dataMap);
             case "JC_SQ_XiuGai":
                 log.error("妫�鏌ョ敵璇蜂俊鎭洿鏂板叆鍙傜被鍨嬩负锛歿}", type);
-                return true;
+                return addInspectService(dataMap);
             case "JC_SQ_CheXiao":
                 log.error("妫�鏌ユ挙閿�鍏ュ弬绫诲瀷涓猴細{}", type);
                 return true;
+            case "JC_BG_BaoGao":
+                log.error("妫�鏌ユ姤鍛婂叆鍙傜被鍨嬩负锛歿}", type);
+                return addInspectBGService(dataMap);
             case "JY_SQ_ShenQing":
                 log.error("妫�楠岀敵璇峰叆鍙傜被鍨嬩负锛歿}", type);
-                return true;
+                return addInspectService(dataMap);
             case "JY_SQ_CheXiao":
                 log.error("妫�楠屾挙閿�鍏ュ弬绫诲瀷涓猴細{}", type);
                 return true;
             case "JY_SQ_XiuGai":
                 log.error("妫�楠屼慨鏀瑰叆鍙傜被鍨嬩负杈咃細{}", type);
-                return true;
+                return addInspectService(dataMap);
             case "JY_SQ_BiaoBenCJ":
                 log.error("妫�楠屾爣鏈噰闆嗗叆鍙傜被鍨嬩负锛歿}", type);
                 return true;
@@ -1267,6 +1613,9 @@
             case "JZ_ZY_ChuYuan":
                 log.error("鎮h�呭嚭闄㈠叆鍙傜被鍨嬩负锛歿}", type);
                 return addOutHospInfo(dataMap);
+            case "BL_JL_ChuYuanJL":
+                log.error("鎮h�呭嚭闄㈣褰曞叆鍙傜被鍨嬩负锛歿}", type);
+                return addOutHospJLInfo(dataMap);
             case "JZ_ZY_QuXiaoCY":
                 log.error("鍙栨秷鍑洪櫌鍏ュ弬绫诲瀷涓猴細{}", type);
                 return cancelOutHospInfo(dataMap);
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInspectionItemMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInspectionItemMapper.xml
new file mode 100644
index 0000000..14392f7
--- /dev/null
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInspectionItemMapper.xml
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.smartor.mapper.PatMedInspectionItemMapper">
+
+    <resultMap type="com.smartor.domain.PatMedInspectionItem" id="PatMedInspectionItemResult">
+        <result property="id" column="id"/>
+        <result property="inspectionid" column="inspectionid"/>
+        <result property="inspectionName" column="inspection_name"/>
+        <result property="reportid" column="reportid"/>
+        <result property="orgid" column="orgid"/>
+        <result property="statuscode" column="statuscode"/>
+        <result property="statusname" column="statusname"/>
+        <result property="reporterid" column="reporterid"/>
+        <result property="reportername" column="reportername"/>
+        <result property="reportdate" column="reportdate"/>
+        <result property="diagimpression" column="diagimpression"/>
+        <result property="diagfindings" column="diagfindings"/>
+        <result property="diagsuggestion" column="diagsuggestion"/>
+        <result property="reporturl" column="reporturl"/>
+        <result property="criticalFlag" column="critical_flag"/>
+        <result property="criticalContent" column="critical_content"/>
+        <result property="reportdeptid" column="reportdeptid"/>
+        <result property="reportdeptname" column="reportdeptname"/>
+        <result property="resultcode" column="resultcode"/>
+        <result property="resultname" column="resultname"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="isupload" column="isupload"/>
+        <result property="uploadTime" column="upload_time"/>
+        <result property="pguid" column="pguid"/>
+        <result property="guid" column="guid"/>
+        <result property="pid" column="pid"/>
+    </resultMap>
+
+    <sql id="selectPatMedInspectionItemVo">
+        select id,
+               inspectionid,
+               inspection_name,
+               reportid,
+               orgid,
+               statuscode,
+               statusname,
+               reporterid,
+               reportername,
+               reportdate,
+               diagimpression,
+               diagfindings,
+               diagsuggestion,
+               reporturl,
+               critical_flag,
+               critical_content,
+               reportdeptid,
+               reportdeptname,
+               resultcode,
+               resultname,
+               del_flag,
+               update_by,
+               update_time,
+               create_by,
+               create_time,
+               isupload,
+               upload_time,
+               pguid,
+               guid,
+               pid
+        from pat_med_inspection_item
+    </sql>
+
+    <select id="selectPatMedInspectionItemList" parameterType="com.smartor.domain.PatMedInspectionItem"
+            resultMap="PatMedInspectionItemResult">
+        <include refid="selectPatMedInspectionItemVo"/>
+        <where>
+            <if test="inspectionid != null  and inspectionid != ''">and inspectionid = #{inspectionid}</if>
+            <if test="inspectionName != null  and inspectionName != ''">and inspection_name = #{inspectionName}</if>
+            <if test="reportid != null  and reportid != ''">and reportid = #{reportid}</if>
+            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
+            <if test="statuscode != null  and statuscode != ''">and statuscode = #{statuscode}</if>
+            <if test="statusname != null  and statusname != ''">and statusname = #{statusname}</if>
+            <if test="reporterid != null  and reporterid != ''">and reporterid = #{reporterid}</if>
+            <if test="reportername != null  and reportername != ''">and reportername = #{reportername}</if>
+            <if test="reportdate != null  and reportdate != ''">and reportdate = #{reportdate}</if>
+            <if test="diagimpression != null  and diagimpression != ''">and diagimpression = #{diagimpression}</if>
+            <if test="diagfindings != null  and diagfindings != ''">and diagfindings = #{diagfindings}</if>
+            <if test="diagsuggestion != null  and diagsuggestion != ''">and diagsuggestion = #{diagsuggestion}</if>
+            <if test="reporturl != null  and reporturl != ''">and reporturl = #{reporturl}</if>
+            <if test="criticalFlag != null  and criticalFlag != ''">and critical_flag = #{criticalFlag}</if>
+            <if test="criticalContent != null  and criticalContent != ''">and critical_content = #{criticalContent}</if>
+            <if test="reportdeptid != null  and reportdeptid != ''">and reportdeptid = #{reportdeptid}</if>
+            <if test="reportdeptname != null  and reportdeptname != ''">and reportdeptname = #{reportdeptname}</if>
+            <if test="resultcode != null  and resultcode != ''">and resultcode = #{resultcode}</if>
+            <if test="resultname != null  and resultname != ''">and resultname = #{resultname}</if>
+            <if test="delFlag != null  and delFlag != ''">and del_flag = #{delFlag}</if>
+            <if test="updateBy != null  and updateBy != ''">and update_by = #{updateBy}</if>
+            <if test="updateTime != null  and updateTime != ''">and update_time = #{updateTime}</if>
+            <if test="createBy != null  and createBy != ''">and create_by = #{createBy}</if>
+            <if test="createTime != null  and createTime != ''">and create_time = #{createTime}</if>
+            <if test="isupload != null  and isupload != ''">and isupload = #{isupload}</if>
+            <if test="uploadTime != null  and uploadTime != ''">and upload_time = #{uploadTime}</if>
+            <if test="pguid != null  and pguid != ''">and pguid = #{pguid}</if>
+            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
+            <if test="pid != null  and pid != ''">and pid = #{pid}</if>
+        </where>
+--         order by update_time desc
+    </select>
+
+    <select id="selectPatMedInspectionItemById" parameterType="Long" resultMap="PatMedInspectionItemResult">
+        <include refid="selectPatMedInspectionItemVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertPatMedInspectionItem" parameterType="com.smartor.domain.PatMedInspectionItem" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into pat_med_inspection_item
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="inspectionid != null">inspectionid,</if>
+            <if test="inspectionName != null">inspection_name,</if>
+            <if test="reportid != null">reportid,</if>
+            <if test="orgid != null">orgid,</if>
+            <if test="statuscode != null">statuscode,</if>
+            <if test="statusname != null">statusname,</if>
+            <if test="reporterid != null">reporterid,</if>
+            <if test="reportername != null">reportername,</if>
+            <if test="reportdate != null">reportdate,</if>
+            <if test="diagimpression != null">diagimpression,</if>
+            <if test="diagfindings != null">diagfindings,</if>
+            <if test="diagsuggestion != null">diagsuggestion,</if>
+            <if test="reporturl != null">reporturl,</if>
+            <if test="criticalFlag != null">critical_flag,</if>
+            <if test="criticalContent != null">critical_content,</if>
+            <if test="reportdeptid != null">reportdeptid,</if>
+            <if test="reportdeptname != null">reportdeptname,</if>
+            <if test="resultcode != null">resultcode,</if>
+            <if test="resultname != null">resultname,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="isupload != null">isupload,</if>
+            <if test="uploadTime != null">upload_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="inspectionid != null">#{inspectionid},</if>
+            <if test="inspectionName != null">#{inspectionName},</if>
+            <if test="reportid != null">#{reportid},</if>
+            <if test="orgid != null">#{orgid},</if>
+            <if test="statuscode != null">#{statuscode},</if>
+            <if test="statusname != null">#{statusname},</if>
+            <if test="reporterid != null">#{reporterid},</if>
+            <if test="reportername != null">#{reportername},</if>
+            <if test="reportdate != null">#{reportdate},</if>
+            <if test="diagimpression != null">#{diagimpression},</if>
+            <if test="diagfindings != null">#{diagfindings},</if>
+            <if test="diagsuggestion != null">#{diagsuggestion},</if>
+            <if test="reporturl != null">#{reporturl},</if>
+            <if test="criticalFlag != null">#{criticalFlag},</if>
+            <if test="criticalContent != null">#{criticalContent},</if>
+            <if test="reportdeptid != null">#{reportdeptid},</if>
+            <if test="reportdeptname != null">#{reportdeptname},</if>
+            <if test="resultcode != null">#{resultcode},</if>
+            <if test="resultname != null">#{resultname},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="isupload != null">#{isupload},</if>
+            <if test="uploadTime != null">#{uploadTime},</if>
+            <if test="pguid != null">#{pguid},</if>
+            <if test="guid != null">#{guid},</if>
+            <if test="pid != null">#{pid}</if>
+        </trim>
+    </insert>
+
+    <update id="updatePatMedInspectionItem" parameterType="com.smartor.domain.PatMedInspectionItem">
+        update pat_med_inspection_item
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="inspectionid != null">inspectionid = #{inspectionid},</if>
+            <if test="inspectionName != null">inspection_name = #{inspectionName},</if>
+            <if test="reportid != null">reportid = #{reportid},</if>
+            <if test="orgid != null">orgid = #{orgid},</if>
+            <if test="statuscode != null">statuscode = #{statuscode},</if>
+            <if test="statusname != null">statusname = #{statusname},</if>
+            <if test="reporterid != null">reporterid = #{reporterid},</if>
+            <if test="reportername != null">reportername = #{reportername},</if>
+            <if test="reportdate != null">reportdate = #{reportdate},</if>
+            <if test="diagimpression != null">diagimpression = #{diagimpression},</if>
+            <if test="diagfindings != null">diagfindings = #{diagfindings},</if>
+            <if test="diagsuggestion != null">diagsuggestion = #{diagsuggestion},</if>
+            <if test="reporturl != null">reporturl = #{reporturl},</if>
+            <if test="criticalFlag != null">critical_flag = #{criticalFlag},</if>
+            <if test="criticalContent != null">critical_content = #{criticalContent},</if>
+            <if test="reportdeptid != null">reportdeptid = #{reportdeptid},</if>
+            <if test="reportdeptname != null">reportdeptname = #{reportdeptname},</if>
+            <if test="resultcode != null">resultcode = #{resultcode},</if>
+            <if test="resultname != null">resultname = #{resultname},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="isupload != null">isupload = #{isupload},</if>
+            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deletePatMedInspectionItemById" parameterType="Long">
+        delete
+        from pat_med_inspection_item
+        where id = #{id}
+    </delete>
+
+    <delete id="deletePatMedInspectionItemByIds" parameterType="String">
+        delete from pat_med_inspection_item where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>
\ No newline at end of file
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml
index 4e2740b..ecab3cc 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml
@@ -6,66 +6,92 @@
 
     <resultMap type="com.smartor.domain.PatMedInspection" id="PatMedInspectionResult">
         <result property="id" column="id"/>
-        <result property="serialnum" column="serialnum"/>
-        <result property="patid" column="patid"/>
         <result property="projecttype" column="projecttype"/>
-        <result property="projectcode" column="projectcode"/>
-        <result property="projectname" column="projectname"/>
-        <result property="reporttime" column="reporttime"/>
-        <result property="hospitalname" column="hospitalname"/>
-        <result property="hospitalcode" column="hospitalcode"/>
+        <result property="inhospno" column="inhospno"/>
+        <result property="patidHis" column="patid_his"/>
+        <result property="idcardno" column="idcardno"/>
+        <result property="patname" column="patname"/>
+        <result property="telcode" column="telcode"/>
+        <result property="adviceId" column="adviceId"/>
+        <result property="appliyid" column="appliyid"/>
+        <result property="priority" column="priority"/>
         <result property="orgid" column="orgid"/>
         <result property="delFlag" column="del_flag"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="isupload" column="isupload"/>
-        <result property="uploadTime" column="upload_time"/>
-        <result property="projectid" column="projectid"/>
-        <result property="applicationtime" column="applicationtime"/>
-        <result property="visittype" column="visittype"/>
-        <result property="visitid" column="visitid"/>
-        <result property="schemestatus" column="schemestatus"/>
-        <result property="isabnormal" column="isabnormal"/>
-        <result property="reportconclusion" column="reportconclusion"/>
-        <result property="schemetime" column="schemetime"/>
+        <result property="drcode" column="drcode"/>
+        <result property="drname" column="drname"/>
         <result property="deptcode" column="deptcode"/>
         <result property="deptname" column="deptname"/>
-        <result property="deptid" column="deptid"/>
+        <result property="opendate" column="opendate"/>
+        <result property="operatorId" column="operator_id"/>
+        <result property="operatorName" column="operator_name"/>
+        <result property="operatorDate" column="operator_date"/>
+        <result property="money" column="money"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateDate" column="update_date"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="startTime" column="start_time"/>
+        <result property="projectId" column="project_id"/>
+        <result property="projectName" column="project_name"/>
+        <result property="diagid" column="diagid"/>
+        <result property="diagname" column="diagname"/>
+        <result property="partId" column="part_id"/>
+        <result property="partName" column="part_name"/>
+        <result property="typeId" column="type_id"/>
+        <result property="typeName" column="type_name"/>
+        <result property="filmFlag" column="film_flag"/>
+        <result property="bedFlag" column="bed_flag"/>
+        <result property="pushFlag" column="push_flag"/>
+        <result property="urgentFlag" column="urgent_flag"/>
+        <result property="nostartFlag" column="nostart_flag"/>
+        <result property="pguid" column="pguid"/>
         <result property="guid" column="guid"/>
+        <result property="pid" column="pid"/>
     </resultMap>
 
     <sql id="selectPatMedInspectionVo">
         select id,
-               serialnum,
-               guid,
-               patid,
                projecttype,
-               projectcode,
-               projectname,
-               reporttime,
-               hospitalname,
-               hospitalcode,
+               inhospno,
+               patid_his,
+               idcardno,
+               patname,
+               telcode,
+               adviceId,
+               appliyid,
+               priority,
                orgid,
                del_flag,
-               update_by,
-               update_time,
-               create_by,
-               create_time,
-               isupload,
-               upload_time,
-               projectid,
-               applicationtime,
-               visittype,
-               visitid,
-               schemestatus,
-               isabnormal,
-               reportconclusion,
-               schemetime,
+               drcode,
+               drname,
                deptcode,
                deptname,
-               deptid
+               opendate,
+               operator_id,
+               operator_name,
+               operator_date,
+               money,
+               update_by,
+               update_date,
+               create_by,
+               create_time,
+               start_time,
+               project_id,
+               project_name,
+               diagid,
+               diagname,
+               part_id,
+               part_name,
+               type_id,
+               type_name,
+               film_flag,
+               bed_flag,
+               push_flag,
+               urgent_flag,
+               nostart_flag,
+               pguid,
+               guid,
+               pid
         from pat_med_inspection
     </sql>
 
@@ -73,35 +99,49 @@
             resultMap="PatMedInspectionResult">
         <include refid="selectPatMedInspectionVo"/>
         <where>
-            <if test="serialnum != null  and serialnum != ''">and serialnum = #{serialnum}</if>
-            <if test="patid != null ">and patid = #{patid}</if>
-            <if test="projecttype != null ">and projecttype = #{projecttype}</if>
-            <if test="projectcode != null  and projectcode != ''">and projectcode = #{projectcode}</if>
-            <if test="projectname != null  and projectname != ''">and projectname like concat('%', #{projectname},
-                '%')
-            </if>
-            <if test="reporttime != null ">and reporttime = #{reporttime}</if>
-            <if test="hospitalname != null  and hospitalname != ''">and hospitalname like concat('%', #{hospitalname},
-                '%')
-            </if>
-            <if test="hospitalcode != null  and hospitalcode != ''">and hospitalcode = #{hospitalcode}</if>
-            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
-            <if test="isupload != null ">and isupload = #{isupload}</if>
-            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
-            <if test="projectid != null ">and projectid = #{projectid}</if>
-            <if test="applicationtime != null ">and applicationtime = #{applicationtime}</if>
-            <if test="visittype != null ">and visittype = #{visittype}</if>
-            <if test="visitid != null ">and visitid = #{visitid}</if>
-            <if test="schemestatus != null ">and schemestatus = #{schemestatus}</if>
-            <if test="isabnormal != null ">and isabnormal = #{isabnormal}</if>
-            <if test="reportconclusion != null  and reportconclusion != ''">and reportconclusion = #{reportconclusion}
-            </if>
-            <if test="schemetime != null ">and schemetime = #{schemetime}</if>
-            <if test="deptcode != null  and deptcode != ''">and deptcode = #{deptcode}</if>
-            <if test="deptname != null  and deptname != ''">and deptname like concat('%', #{deptname}, '%')</if>
-            <if test="deptid != null ">and deptid = #{deptid}</if>
+            <if test="projecttype != null">and projecttype = #{projecttype}</if>
+            <if test="inhospno != null">and inhospno = #{inhospno}</if>
+            <if test="patidHis != null">and patid_his = #{patidHis}</if>
+            <if test="idcardno != null">and idcardno = #{idcardno}</if>
+            <if test="patname != null">and patname = #{patname}</if>
+            <if test="telcode != null ">and telcode = #{telcode}</if>
+            <if test="adviceId != null">and adviceId = #{adviceId}</if>
+            <if test="appliyid != null">and appliyid = #{appliyid}</if>
+            <if test="priority != null">and priority = #{priority}</if>
+            <if test="orgid != null">and orgid = #{orgid}</if>
+            <if test="delFlag != null">and del_flag = #{delFlag}</if>
+            <if test="drcode != null">and drcode = #{drcode}</if>
+            <if test="drname != null">and drname = #{drname}</if>
+            <if test="deptcode != null">and deptcode = #{deptcode}</if>
+            <if test="deptname != null">and deptname = #{deptname}</if>
+            <if test="opendate != null">and opendate = #{opendate}</if>
+            <if test="operatorId != null">and operator_id = #{operatorId}</if>
+            <if test="operatorName != null">and operator_name = #{operatorName}</if>
+            <if test="operatorDate != null">and operator_date = #{operatorDate}</if>
+            <if test="money != null">and money = #{money}</if>
+            <if test="updateBy != null">and update_by = #{updateBy}</if>
+            <if test="updateDate != null">and update_date = #{updateDate}</if>
+            <if test="createBy != null">and create_by = #{createBy}</if>
+            <if test="createTime != null">and create_time = #{createTime}</if>
+            <if test="startTime != null">and start_time = #{startTime}</if>
+            <if test="projectId != null">and project_id = #{projectId}</if>
+            <if test="projectName != null">and project_name = #{projectName}</if>
+            <if test="diagid != null">and diagid = #{diagid}</if>
+            <if test="diagname != null">and diagname = #{diagname}</if>
+            <if test="partId != null">and part_id = #{partId}</if>
+            <if test="partName != null">and part_name = #{partName}</if>
+            <if test="typeId != null">and type_id = #{typeId}</if>
+            <if test="typeName != null">and type_name = #{type}</if>
+            <if test="filmFlag != null">and film_flag = #{filmFlag}</if>
+            <if test="bedFlag != null">and bed_flag = #{bedFlag}</if>
+            <if test="pushFlag != null">and push_flag = #{pushFlag}</if>
+            <if test="urgentFlag != null">and urgent_flag = #{urgentFlag}</if>
+            <if test="nostartFlag != null">and nostart_flag = #{nostartFlag}</if>
+            <if test="pguid != null">and pguid = #{pguid}</if>
+            <if test="guid != null">and guid = #{guid}</if>
+            <if test="pid != null">and pid = #{pid}</if>
         </where>
-        order by update_time desc
+--         order by update_time desc
     </select>
 
     <select id="selectPatMedInspectionById" parameterType="Long" resultMap="PatMedInspectionResult">
@@ -113,100 +153,139 @@
             keyProperty="id">
         insert into pat_med_inspection
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="serialnum != null">serialnum,</if>
-            <if test="patid != null">patid,</if>
             <if test="projecttype != null">projecttype,</if>
-            <if test="projectcode != null">projectcode,</if>
-            <if test="projectname != null">projectname,</if>
-            <if test="reporttime != null">reporttime,</if>
-            <if test="hospitalname != null">hospitalname,</if>
-            <if test="hospitalcode != null">hospitalcode,</if>
+            <if test="inhospno != null">inhospno,</if>
+            <if test="patidHis != null">patid_his,</if>
+            <if test="idcardno != null">idcardno,</if>
+            <if test="patname != null">patname,</if>
+            <if test="telcode != null">telcode,</if>
+            <if test="adviceId != null">adviceId,</if>
+            <if test="appliyid != null">appliyid,</if>
+            <if test="priority != null">priority,</if>
             <if test="orgid != null">orgid,</if>
-            <if test="delFlag != null and delFlag != ''">del_flag,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="isupload != null">isupload,</if>
-            <if test="uploadTime != null">upload_time,</if>
-            <if test="projectid != null">projectid,</if>
-            <if test="applicationtime != null">applicationtime,</if>
-            <if test="visittype != null">visittype,</if>
-            <if test="visitid != null">visitid,</if>
-            <if test="schemestatus != null">schemestatus,</if>
-            <if test="isabnormal != null">isabnormal,</if>
-            <if test="reportconclusion != null">reportconclusion,</if>
-            <if test="schemetime != null">schemetime,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="drcode != null">drcode,</if>
+            <if test="drname != null">drname,</if>
             <if test="deptcode != null">deptcode,</if>
             <if test="deptname != null">deptname,</if>
-            <if test="deptid != null">deptid,</if>
+            <if test="opendate != null">opendate,</if>
+            <if test="operatorId != null">operator_id,</if>
+            <if test="operatorName != null">operator_name,</if>
+            <if test="operatorDate != null">operator_date,</if>
+            <if test="money != null">money,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateDate != null">update_date,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="projectId != null">project_id,</if>
+            <if test="projectName != null">project_name,</if>
+            <if test="diagid != null">diagid,</if>
+            <if test="diagname != null">diagname,</if>
+            <if test="partId != null">part_id,</if>
+            <if test="partName != null">part_name,</if>
+            <if test="typeId != null">type_id,</if>
+            <if test="typeName != null">type_name,</if>
+            <if test="filmFlag != null">film_flag,</if>
+            <if test="bedFlag != null">bed_flag,</if>
+            <if test="pushFlag != null">push_flag,</if>
+            <if test="urgentFlag != null">urgent_flag,</if>
+            <if test="nostartFlag != null">nostart_flag,</if>
+            <if test="pguid != null">pguid,</if>
             <if test="guid != null">guid,</if>
+            <if test="pid != null">pid,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="serialnum != null">#{serialnum},</if>
-            <if test="patid != null">#{patid},</if>
             <if test="projecttype != null">#{projecttype},</if>
-            <if test="projectcode != null">#{projectcode},</if>
-            <if test="projectname != null">#{projectname},</if>
-            <if test="reporttime != null">#{reporttime},</if>
-            <if test="hospitalname != null">#{hospitalname},</if>
-            <if test="hospitalcode != null">#{hospitalcode},</if>
+            <if test="inhospno != null">#{inhospno},</if>
+            <if test="patidHis != null">#{patidHis},</if>
+            <if test="idcardno != null">#{idcardno},</if>
+            <if test="patname != null">#{patname},</if>
+            <if test="telcode != null">#{telcode},</if>
+            <if test="adviceId != null">#{adviceId},</if>
+            <if test="appliyid != null">#{appliyid},</if>
+            <if test="priority != null">#{priority},</if>
             <if test="orgid != null">#{orgid},</if>
-            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="isupload != null">#{isupload},</if>
-            <if test="uploadTime != null">#{uploadTime},</if>
-            <if test="projectid != null">#{projectid},</if>
-            <if test="applicationtime != null">#{applicationtime},</if>
-            <if test="visittype != null">#{visittype},</if>
-            <if test="visitid != null">#{visitid},</if>
-            <if test="schemestatus != null">#{schemestatus},</if>
-            <if test="isabnormal != null">#{isabnormal},</if>
-            <if test="reportconclusion != null">#{reportconclusion},</if>
-            <if test="schemetime != null">#{schemetime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="drcode != null">#{drcode},</if>
+            <if test="drname != null">#{drname},</if>
             <if test="deptcode != null">#{deptcode},</if>
             <if test="deptname != null">#{deptname},</if>
-            <if test="deptid != null">#{deptid},</if>
+            <if test="opendate != null">#{opendate},</if>
+            <if test="operatorId != null">#{operatorId},</if>
+            <if test="operatorName != null">#{operatorName},</if>
+            <if test="operatorDate != null">#{operatorDate},</if>
+            <if test="money != null">#{money},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateDate != null">#{updateDate},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="startTime != null">#{startTime},</if>
+            <if test="projectId != null">#{projectId},</if>
+            <if test="projectName != null">#{projectName},</if>
+            <if test="diagid != null">#{diagid},</if>
+            <if test="diagname != null">#{diagname},</if>
+            <if test="partId != null">#{partId},</if>
+            <if test="partName != null">#{partName},</if>
+            <if test="typeId != null">#{typeId},</if>
+            <if test="typeName != null">#{typeName},</if>
+            <if test="filmFlag != null">#{filmFlag},</if>
+            <if test="bedFlag != null">#{bedFlag},</if>
+            <if test="pushFlag != null">#{pushFlag},</if>
+            <if test="urgentFlag != null">#{urgentFlag},</if>
+            <if test="nostartFlag != null">#{nostartFlag},</if>
+            <if test="pguid != null">#{pguid},</if>
             <if test="guid != null">#{guid},</if>
+            <if test="pid != null">#{pid},</if>
         </trim>
     </insert>
 
     <update id="updatePatMedInspection" parameterType="com.smartor.domain.PatMedInspection">
         update pat_med_inspection
         <trim prefix="SET" suffixOverrides=",">
-            <if test="serialnum != null">serialnum = #{serialnum},</if>
-            <if test="patid != null">patid = #{patid},</if>
             <if test="projecttype != null">projecttype = #{projecttype},</if>
-            <if test="projectcode != null">projectcode = #{projectcode},</if>
-            <if test="projectname != null">projectname = #{projectname},</if>
-            <if test="reporttime != null">reporttime = #{reporttime},</if>
-            <if test="hospitalname != null">hospitalname = #{hospitalname},</if>
-            <if test="hospitalcode != null">hospitalcode = #{hospitalcode},</if>
+            <if test="inhospno != null">inhospno = #{inhospno},</if>
+            <if test="patidHis != null">patid_his = #{patidHis},</if>
+            <if test="idcardno != null">idcardno = #{idcardno},</if>
+            <if test="patname != null">patname = #{patname},</if>
+            <if test="telcode != null">telcode = #{telcode},</if>
+            <if test="adviceId != null">adviceId = #{adviceId},</if>
+            <if test="appliyid != null">appliyid = #{appliyid},</if>
+            <if test="priority != null">priority = #{priority},</if>
             <if test="orgid != null">orgid = #{orgid},</if>
-            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="isupload != null">isupload = #{isupload},</if>
-            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
-            <if test="projectid != null">projectid = #{projectid},</if>
-            <if test="applicationtime != null">applicationtime = #{applicationtime},</if>
-            <if test="visittype != null">visittype = #{visittype},</if>
-            <if test="visitid != null">visitid = #{visitid},</if>
-            <if test="schemestatus != null">schemestatus = #{schemestatus},</if>
-            <if test="isabnormal != null">isabnormal = #{isabnormal},</if>
-            <if test="reportconclusion != null">reportconclusion = #{reportconclusion},</if>
-            <if test="schemetime != null">schemetime = #{schemetime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="drcode != null">drcode = #{drcode},</if>
+            <if test="drname != null">drname = #{drname},</if>
             <if test="deptcode != null">deptcode = #{deptcode},</if>
             <if test="deptname != null">deptname = #{deptname},</if>
-            <if test="deptid != null">deptid = #{deptid},</if>
-            <if test="guid != null">guid = #{guid},</if>
+            <if test="opendate != null">opendate = #{opendate},</if>
+            <if test="operatorId != null">operator_id = #{operatorId},</if>
+            <if test="operatorName != null">operator_name = #{operatorName},</if>
+            <if test="operatorDate != null">operator_date = #{operatorDate},</if>
+            <if test="money != null">money = #{money},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateDate != null">update_date = #{updateDate},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="projectId != null">project_id = #{projectId},</if>
+            <if test="projectName != null">project_name = #{projectName},</if>
+            <if test="diagid != null">diagid = #{diagid},</if>
+            <if test="diagname != null">diagname = #{diagname},</if>
+            <if test="partId != null">part_id = #{partId},</if>
+            <if test="partName != null">part_name = #{partName},</if>
+            <if test="typeId != null">type_id = #{typeId},</if>
+            <if test="typeName != null">type_name = #{typeName},</if>
+            <if test="filmFlag != null">film_flag = #{filmFlag},</if>
+            <if test="bedFlag != null">bed_flag = #{bedFlag},</if>
+            <if test="pushFlag != null">push_flag = #{pushFlag},</if>
+            <if test="urgentFlag != null">urgent_flag = #{urgentFlag},</if>
+            <if test="nostartFlag != null">nostart_flag = #{nostartFlag},</if>
         </trim>
-        where id = #{id}
+        where projecttype = #{projecttype}
+        and inhospno = #{inhospno}
+        and patid_his = #{patidHis}
+        and idcardno = #{idcardno}
     </update>
 
     <delete id="deletePatMedInspectionById" parameterType="Long">

--
Gitblit v1.9.3