xiaochan преди 3 години
родител
ревизия
dd05358b53

+ 0 - 1
src/main/java/thyyxxk/webserver/config/exception/ExceptionEnum.java

@@ -9,7 +9,6 @@ public enum ExceptionEnum {
     // 提示成功
     SUCCESS_AND_NOTIFICATION(201, "操作成功"),
 
-    SUCCESS_TABLE(202, "分页数据"),
     // 以下是需要消息提示的错误
     INTERNAL_SERVER_ERROR(1001, "服务器内部错误!"),
     NULL_POINTER(1002, "有不合法的空值存在!"),

+ 9 - 0
src/main/java/thyyxxk/webserver/controller/medicalinsurance/SiManageController.java

@@ -6,6 +6,7 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import thyyxxk.webserver.config.auth.PassToken;
 import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyInactpatient;
 import thyyxxk.webserver.entity.medicalinsurance.manage.*;
 import thyyxxk.webserver.entity.medicalinsurance.setlinfo.SlctSetlPrm;
 import thyyxxk.webserver.entity.medicalinsurance.setllistupload.UpldCollection;
@@ -85,16 +86,24 @@ public class SiManageController {
     }
 
     @GetMapping("/getUploadInfo")
+    @PassToken
     public ResultVo<UpldCollection> getUploadInfo(@RequestParam("patNo") String patNo,
                                                   @RequestParam("times") Integer times,
                                                   @RequestParam("ledgerSn") Integer ledgerSn) throws Exception {
         return service.getUploadInfo(patNo, times, ledgerSn);
     }
 
+
     @PostMapping("/exportExcel")
     public void exportExcel(HttpServletResponse response,
                             @RequestBody @Validated JieSuanDanChaXun param) {
         service.exportExcel(response, param);
     }
 
+    @GetMapping("/jieSuanDanKeXiuGaiXinXi")
+    public ResultVo<ZyInactpatient> jieSuanDanKeXiuGaiXinXi(String patNo, Integer times, Integer ledgerSn) {
+        return service.jieSuanDanKeXiuGaiXinXi(patNo, times, ledgerSn);
+    }
+
+
 }

+ 39 - 27
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/UpIdCollectionDao.java

@@ -5,7 +5,9 @@ import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
-import thyyxxk.webserver.entity.medicalinsurance.query.SiPatInfo;
+import thyyxxk.webserver.entity.medicalinsurance.inpatient.BatjBa4;
+import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyDisDiagYb;
+import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyInactpatient;
 import thyyxxk.webserver.entity.medicalinsurance.setllistupload.*;
 import thyyxxk.webserver.entity.querydata.TSiSetlinfo;
 
@@ -43,7 +45,8 @@ public interface UpIdCollectionDao {
             "       psnCashpay=cast(a.psn_cash_pay as decimal(16,2)) ,  " + // --  个人现金支付
             "       hiPaymtd='3',  " + // --  医保支付方式
             "       a.clr_optins as hsorg,  " + // -- 医保机构
-            "       a.insutype as hi_type  " + // -- 枚举 MdcsType
+            "       a.insutype as hi_type," +
+            "       a.setl_time as  setl_end_date " + // -- 枚举 MdcsType
             "from t_si_setlinfo a, t_si_pat_info b " +
             "where a.pat_no=b.pat_no and a.times=b.times " +
             "and a.pat_no = #{patNo} and a.times = #{times} " +
@@ -137,7 +140,7 @@ public interface UpIdCollectionDao {
 
     // 这里是 住院诊断消息
     @Select("select si_diag_type as diag_type,  " +
-            "        rtrim(dis_diag) as diag_code,  " +
+            "       rtrim(dis_diag) as diag_code,  " +
             "       rtrim(dis_diag_comment) as diag_name,  " +
             "       case when dis_diag_no = 1 then 1 else 0 end as maindiag_flag  " +
             "from zy_dis_diag_yb  " +
@@ -212,19 +215,6 @@ public interface UpIdCollectionDao {
     void fanHuiLiuShuiHao(@Param("setlListId") String setlListId,
                           @Param("setlId") String setlId);
 
-    @Select("<script>" +
-            "select a.pat_no,a.times,a.ledger_sn from t_si_setlinfo a,t_si_pat_info b where a.pat_no = b.pat_no " +
-            "and a.times = b.times and a.ledger_sn = b.ledger_sn and revoked = 0 and setl_type = 21 and " +
-            "b.insuplc_admdvs like '4301%' and b.insuplc_admdvs != '430182' and setl_list_id is null " +
-            "and a.setl_time &gt;= #{startTime} and a.setl_time &lt;= #{endTime} " +
-            "<if test=\"insutype!=null and insutype!=''\">" +
-            "and a.insutype=#{insutype}" +
-            "</if>" +
-            "</script>")
-    List<SiPatInfo> getHuanZheXinXi(@Param("startTime") String startTime,
-                                    @Param("endTime") String endTime,
-                                    @Param("insutype") String insutype);
-
     @Select("<script>" +
             "select top ${pageSize} * from (" +
             "select " +
@@ -233,10 +223,12 @@ public interface UpIdCollectionDao {
             "       a.med_type,medfee_sumamt,fund_pay_sumamt, " +
             "       acct_pay,psn_cash_pay,clr_optins,clr_optins_name = (select name from t_region where code=clr_optins), " +
             "       outDeptName=(select rtrim(name) from zd_unit_code where code=small_dept), " +
-            "       setl_list_id " +
+            "       setl_list_id,datediff(day ,b.admiss_date ,b.dis_date) as act_ipt_days,b.operation " +
             "from t_si_setlinfo a left join  zy_inactpatient b on (a.pat_no = b.inpatient_no and a.times = b.admiss_times) " +
-            "where " +
-            "  setl_time &gt;= #{startTime} and setl_time &lt;= #{endTime} " +
+            "where 1=1 " +
+            "<if test=\"startTime !=null and startTime != '' \">" +
+            " and setl_time &gt;= #{startTime} and setl_time &lt;= #{endTime} " +
+            "</if>" +
             "<if test=\"setlType !=null and setlType != '' \">" +
             "  and setl_type = #{setlType} " +
             "</if>" +
@@ -273,10 +265,10 @@ public interface UpIdCollectionDao {
             "#{item}" +
             "</foreach>" +
             "</if>" +
-            "<if test=\"flag == false \">" +
+            "<if test=\"flag == 1 \">" +
             " and a.setl_list_id is null " +
             "</if>" +
-            "<if test=\"flag == true \">" +
+            "<if test=\"flag == 2 \">" +
             " and a.setl_list_id is not null " +
             "</if>" +
             " ) temp where rowNumber > ${pageSize} * (${currentPage} - 1)" +
@@ -290,7 +282,7 @@ public interface UpIdCollectionDao {
                                           @Param("medTypes") List<String> medTypes,
                                           @Param("psnTypes") List<String> psnTypes,
                                           @Param("clrOptins") List<String> clrOptins,
-                                          @Param("flag") boolean flag,
+                                          @Param("flag") Integer flag,
                                           @Param("currentPage") long currentPage,
                                           @Param("pageSize") long pageSize);
 
@@ -298,8 +290,10 @@ public interface UpIdCollectionDao {
     @Select("<script>" +
             "select count(*) " +
             "from t_si_setlinfo a left join  zy_inactpatient b on (a.pat_no = b.inpatient_no and a.times = b.admiss_times) " +
-            "where  " +
-            " setl_time &gt;= #{startTime} and setl_time &lt;= #{endTime} " +
+            "where 1=1 " +
+            "<if test=\"startTime !=null and startTime != '' \">" +
+            " and setl_time &gt;= #{startTime} and setl_time &lt;= #{endTime} " +
+            "</if>" +
             "<if test=\"setlType !=null and setlType != '' \">" +
             "  and setl_type = #{setlType} " +
             "</if>" +
@@ -336,10 +330,10 @@ public interface UpIdCollectionDao {
             "#{item}" +
             "</foreach>" +
             "</if>" +
-            "<if test=\"flag == false \">" +
+            "<if test=\"flag == 1 \">" +
             " and a.setl_list_id is null " +
             "</if>" +
-            "<if test=\"flag == true \">" +
+            "<if test=\"flag == 2 \">" +
             " and a.setl_list_id is not null " +
             "</if>" +
             "</script>")
@@ -352,6 +346,24 @@ public interface UpIdCollectionDao {
                                   @Param("medTypes") List<String> medTypes,
                                   @Param("psnTypes") List<String> psnTypes,
                                   @Param("clrOptins") List<String> clrOptins,
-                                  @Param("flag") boolean flag);
+                                  @Param("flag") Integer flag);
+
+
+    @Select("select opName = (select top(1) rtrim(name) from a_employee_mi where code = op_id_code),* " +
+            "from zy_dis_diag_yb where inpatient_no = #{patNo} and admiss_times = #{times} ")
+    List<ZyDisDiagYb> zhenDuanXinXi(@Param("patNo") String patNo,
+                                    @Param("times") Integer times);
+
+
+    @Select("select * from batj_ba4 where zyh = #{patNo} and zycs = #{times} ")
+    List<BatjBa4> shouShuXinXi(@Param("patNo") String patNo,
+                               @Param("times") Integer times);
+
+
+    @Select("select inpatient_no,admiss_times,name,admiss_date,dis_date,responce_type,operation, " +
+            "       responce_type_name = (select rtrim(name) from zy_zd_responce_type where code = responce_type),sex " +
+            "from zy_inactpatient where inpatient_no = #{patNo} and admiss_times = #{times}")
+    ZyInactpatient huanZheXinXi(@Param("patNo") String patNo,
+                                @Param("times") Integer times);
 
 }

+ 107 - 0
src/main/java/thyyxxk/webserver/entity/medicalinsurance/inpatient/BatjBa4.java

@@ -0,0 +1,107 @@
+package thyyxxk.webserver.entity.medicalinsurance.inpatient;
+
+import java.io.Serializable;
+import lombok.Data;
+import java.util.Date;
+
+@Data
+public class BatjBa4  implements Serializable {
+
+	private static final long serialVersionUID =  2951195859758849520L;
+
+	/**
+	 * bah
+	 */
+	private String bah;
+
+	/**
+	 * zyh
+	 */
+	private String zyh;
+
+	/**
+	 * zycs
+	 */
+	private Integer zycs;
+
+	/**
+	 * ssxh
+	 */
+	private Integer ssxh;
+
+	/**
+	 * ssrq
+	 */
+	private Date ssrq;
+
+	/**
+	 * sstj
+	 */
+	private String sstj;
+
+	/**
+	 * ssys
+	 */
+	private String ssys;
+
+	/**
+	 * sszs1
+	 */
+	private String sszs1;
+
+	/**
+	 * sszs2
+	 */
+	private String sszs2;
+
+	/**
+	 * mzys
+	 */
+	private String mzys;
+
+	/**
+	 * ssbm
+	 */
+	private String ssbm;
+
+	/**
+	 * ssmc
+	 */
+	private String ssmc;
+
+	/**
+	 * mzff
+	 */
+	private String mzff;
+
+	/**
+	 * qkjb
+	 */
+	private String qkjb;
+
+	/**
+	 * yhqk
+	 */
+	private String yhqk;
+
+	/**
+	 * ssbfz
+	 */
+	private String ssbfz;
+
+	/**
+	 * fhqk
+	 */
+	private String fhqk;
+
+	/**
+	 * ssjb
+	 */
+	private String ssjb;
+
+	/**
+	 * cutHeal
+	 */
+	private String cutHeal;
+
+}

+ 16 - 12
src/main/java/thyyxxk/webserver/entity/medicalinsurance/inpatient/ZyDisDiagYb.java

@@ -1,23 +1,27 @@
 package thyyxxk.webserver.entity.medicalinsurance.inpatient;
 
 import lombok.Data;
+
 import java.util.Date;
 
 /**
+ * 诊断表
+ *
  * @author dj
  */
 @Data
 public class ZyDisDiagYb {
-	private String inpatientNo;
-	private Integer admissTimes;
-	private Integer disDiagNo;
-	private String disDiagType;
-	private String disDiag;
-	private String disDiagComment;
-	private String opIdCode;
-	private String opName;
-	private Date opDiagDate;
-	private String disDiagBzfx;
-	private String disDiagStatus;
-	private String operation;
+    private String inpatientNo;
+    private Integer admissTimes;
+    private Integer disDiagNo;
+    private String disDiagType;
+    private String disDiag;
+    private String disDiagComment;
+    private String opIdCode;
+    private String opName;
+    private Date opDiagDate;
+    private String disDiagBzfx;
+    private String disDiagStatus;
+    private String operation;
+    private String siDiagType;
 }

+ 840 - 0
src/main/java/thyyxxk/webserver/entity/medicalinsurance/inpatient/ZyInactpatient.java

@@ -0,0 +1,840 @@
+package thyyxxk.webserver.entity.medicalinsurance.inpatient;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class ZyInactpatient implements Serializable {
+
+    private static final long serialVersionUID = 3303071221155865876L;
+
+    /**
+     * inpatientNo
+     */
+    private String inpatientNo;
+
+    /**
+     * admissTimes
+     */
+    private Integer admissTimes;
+
+    /**
+     * name
+     */
+    private String name;
+
+    /**
+     * outpatientNo
+     */
+    private String outpatientNo;
+
+    /**
+     * chargeType
+     */
+    private String chargeType;
+
+    /**
+     * visitType
+     */
+    private String visitType;
+
+    /**
+     * admissDate
+     */
+    private Date admissDate;
+
+    /**
+     * admissStatus
+     */
+    private String admissStatus;
+
+    /**
+     * clinicDiag
+     */
+    private String clinicDiag;
+
+    /**
+     * admissDiag
+     */
+    private String admissDiag;
+
+    /**
+     * admissPhysician
+     */
+    private String admissPhysician;
+
+    /**
+     * referPhysician
+     */
+    private String referPhysician;
+
+    /**
+     * consultPhysician
+     */
+    private String consultPhysician;
+
+    /**
+     * deptDirector
+     */
+    private String deptDirector;
+
+    /**
+     * admissDept
+     */
+    private String admissDept;
+
+    /**
+     * admissWard
+     */
+    private String admissWard;
+
+    /**
+     * disDate
+     */
+    private Date disDate;
+
+    /**
+     * disDiag
+     */
+    private String disDiag;
+
+    /**
+     * disStatus
+     */
+    private String disStatus;
+
+    /**
+     * disDept
+     */
+    private String disDept;
+
+    /**
+     * disWard
+     */
+    private String disWard;
+
+    /**
+     * insurCode
+     */
+    private String insurCode;
+
+    /**
+     * contractCode
+     */
+    private String contractCode;
+
+    /**
+     * responceType
+     */
+    private String responceType;
+    /**
+     * 医保身份
+     */
+    private String responceTypeName;
+
+
+    /**
+     * timesBilled
+     */
+    private Integer timesBilled;
+
+    /**
+     * balance
+     */
+    private Double balance;
+
+    /**
+     * totalCharge
+     */
+    private Double totalCharge;
+
+    /**
+     * charge1
+     */
+    private Double charge1;
+
+    /**
+     * charge2
+     */
+    private Double charge2;
+
+    /**
+     * charge3
+     */
+    private Double charge3;
+
+    /**
+     * charge4
+     */
+    private Double charge4;
+
+    /**
+     * charge5
+     */
+    private Double charge5;
+
+    /**
+     * charge6
+     */
+    private Double charge6;
+
+    /**
+     * charge7
+     */
+    private Double charge7;
+
+    /**
+     * charge8
+     */
+    private Double charge8;
+
+    /**
+     * charge9
+     */
+    private Double charge9;
+
+    /**
+     * charge10
+     */
+    private Double charge10;
+
+    /**
+     * charge11
+     */
+    private Double charge11;
+
+    /**
+     * charge12
+     */
+    private Double charge12;
+
+    /**
+     * charge13
+     */
+    private Double charge13;
+
+    /**
+     * charge14
+     */
+    private Double charge14;
+
+    /**
+     * charge15
+     */
+    private Double charge15;
+
+    /**
+     * charge16
+     */
+    private Double charge16;
+
+    /**
+     * charge17
+     */
+    private Double charge17;
+
+    /**
+     * charge18
+     */
+    private Double charge18;
+
+    /**
+     * charge19
+     */
+    private Double charge19;
+
+    /**
+     * charge20
+     */
+    private Double charge20;
+
+    /**
+     * charge21
+     */
+    private Double charge21;
+
+    /**
+     * charge22
+     */
+    private Double charge22;
+
+    /**
+     * charge23
+     */
+    private Double charge23;
+
+    /**
+     * charge24
+     */
+    private Double charge24;
+
+    /**
+     * charge25
+     */
+    private Double charge25;
+
+    /**
+     * charge26
+     */
+    private Double charge26;
+
+    /**
+     * charge27
+     */
+    private Double charge27;
+
+    /**
+     * charge28
+     */
+    private Double charge28;
+
+    /**
+     * charge29
+     */
+    private Double charge29;
+
+    /**
+     * charge30
+     */
+    private Double charge30;
+
+    /**
+     * ward
+     */
+    private String ward;
+
+    /**
+     * dept
+     */
+    private String dept;
+
+    /**
+     * bedNo
+     */
+    private String bedNo;
+
+    /**
+     * sex
+     */
+    private String sex;
+
+    /**
+     * bloodType
+     */
+    private String bloodType;
+
+    /**
+     * diagnosisDate
+     */
+    private Date diagnosisDate;
+
+    /**
+     * allergyMedicine
+     */
+    private String allergyMedicine;
+
+    /**
+     * rescueTimes
+     */
+    private String rescueTimes;
+
+    /**
+     * successTimes
+     */
+    private String successTimes;
+
+    /**
+     * followupMark
+     */
+    private String followupMark;
+
+    /**
+     * followupPrior
+     */
+    private String followupPrior;
+
+    /**
+     * autopsyMark
+     */
+    private String autopsyMark;
+
+    /**
+     * qualityLevel
+     */
+    private String qualityLevel;
+
+    /**
+     * opIdCode
+     */
+    private String opIdCode;
+
+    /**
+     * archiveCode
+     */
+    private String archiveCode;
+
+    /**
+     * archiveMark
+     */
+    private String archiveMark;
+
+    /**
+     * teachingMark
+     */
+    private String teachingMark;
+
+    /**
+     * diagnoseConform1
+     */
+    private String diagnoseConform1;
+
+    /**
+     * diagnoseConform2
+     */
+    private String diagnoseConform2;
+
+    /**
+     * diagnoseConform3
+     */
+    private String diagnoseConform3;
+
+    /**
+     * diagnoseConform4
+     */
+    private String diagnoseConform4;
+
+    /**
+     * diagnoseConform5
+     */
+    private String diagnoseConform5;
+
+    /**
+     * diagnoseConform6
+     */
+    private String diagnoseConform6;
+
+    /**
+     * diagnoseConform7
+     */
+    private String diagnoseConform7;
+
+    /**
+     * diagnoseConform8
+     */
+    private String diagnoseConform8;
+
+    /**
+     * internCode
+     */
+    private String internCode;
+
+    /**
+     * diagnoseConform9
+     */
+    private String diagnoseConform9;
+
+    /**
+     * diagnoseConform10
+     */
+    private String diagnoseConform10;
+
+    /**
+     * pathologyDiag
+     */
+    private String pathologyDiag;
+
+    /**
+     * disHour
+     */
+    private Date disHour;
+
+    /**
+     * admissHour
+     */
+    private Date admissHour;
+
+    /**
+     * capBloody
+     */
+    private Integer capBloody;
+
+    /**
+     * maxLedger
+     */
+    private Integer maxLedger;
+
+    /**
+     * admissDiagStr
+     */
+    private String admissDiagStr;
+
+    /**
+     * patientStatus
+     */
+    private String patientStatus;
+
+    /**
+     * moveFlag
+     */
+    private String moveFlag;
+
+    /**
+     * jzjlh
+     */
+    private String jzjlh;
+
+    /**
+     * zkDept
+     */
+    private String zkDept;
+
+    /**
+     * hbsag
+     */
+    private String hbsag;
+
+    /**
+     * archiveCode1
+     */
+    private String archiveCode1;
+
+    /**
+     * jobDoctor
+     */
+    private String jobDoctor;
+
+    /**
+     * jobNurse
+     */
+    private String jobNurse;
+
+    /**
+     * ybjy
+     */
+    private Double ybjy;
+
+    /**
+     * bczf
+     */
+    private Double bczf;
+
+    /**
+     * zflj
+     */
+    private Double zflj;
+
+    /**
+     * disDiagStr
+     */
+    private String disDiagStr;
+
+    /**
+     * ybZyh
+     */
+    private String ybZyh;
+
+    /**
+     * ybJzlb
+     */
+    private String ybJzlb;
+
+    /**
+     * yzIn
+     */
+    private Date yzIn;
+
+    /**
+     * yzOut
+     */
+    private Date yzOut;
+
+    /**
+     * ybFlag
+     */
+    private String ybFlag;
+
+    /**
+     * oweFlag
+     */
+    private String oweFlag;
+
+    /**
+     * zkWard
+     */
+    private String zkWard;
+
+    /**
+     * zkDate
+     */
+    private Date zkDate;
+
+    /**
+     * ybJlh
+     */
+    private String ybJlh;
+
+    /**
+     * ybType
+     */
+    private String ybType;
+
+    /**
+     * zySerialNo
+     */
+    private String zySerialNo;
+
+    /**
+     * mzNo
+     */
+    private String mzNo;
+
+    /**
+     * clinicDiagStr
+     */
+    private String clinicDiagStr;
+
+    /**
+     * bedStatus
+     */
+    private String bedStatus;
+
+    /**
+     * inputDate
+     */
+    private Date inputDate;
+
+    /**
+     * ybJsffbz
+     */
+    private String ybJsffbz;
+
+    /**
+     * ybSylb
+     */
+    private String ybSylb;
+
+    /**
+     * ybZszh
+     */
+    private String ybZszh;
+
+    /**
+     * admissDateYb
+     */
+    private Date admissDateYb;
+
+    /**
+     * baReceiveFlag
+     */
+    private String baReceiveFlag;
+
+    /**
+     * blzkStatus
+     */
+    private String blzkStatus;
+
+    /**
+     * room
+     */
+    private String room;
+
+    /**
+     * disYb
+     */
+    private String disYb;
+
+    /**
+     * disYbStr
+     */
+    private String disYbStr;
+
+    /**
+     * ybBzfx
+     */
+    private String ybBzfx;
+
+    /**
+     * disRoom
+     */
+    private String disRoom;
+
+    /**
+     * disYb1
+     */
+    private String disYb1;
+
+    /**
+     * disYbStr1
+     */
+    private String disYbStr1;
+
+    /**
+     * disYb2
+     */
+    private String disYb2;
+
+    /**
+     * disYbStr2
+     */
+    private String disYbStr2;
+
+    /**
+     * smallDept
+     */
+    private String smallDept;
+
+    /**
+     * xnhFamilysysno
+     */
+    private String xnhFamilysysno;
+
+    /**
+     * xnhMembersysno
+     */
+    private String xnhMembersysno;
+
+    /**
+     * xnhBookno
+     */
+    private String xnhBookno;
+
+    /**
+     * xnhCardno
+     */
+    private String xnhCardno;
+
+    /**
+     * xnhCmisno
+     */
+    private String xnhCmisno;
+
+    /**
+     * xnhZyh
+     */
+    private String xnhZyh;
+
+    /**
+     * xnhReferralno
+     */
+    private String xnhReferralno;
+
+    /**
+     * xnhRedeemType
+     */
+    private String xnhRedeemType;
+
+    /**
+     * xnhHasreferral
+     */
+    private String xnhHasreferral;
+
+    /**
+     * zyFlag
+     */
+    private String zyFlag;
+
+    /**
+     * xnhRejectFlag
+     */
+    private String xnhRejectFlag;
+
+    /**
+     * ownFlag
+     */
+    private String ownFlag;
+
+    /**
+     * ownTime
+     */
+    private Date ownTime;
+
+    /**
+     * freeFlag
+     */
+    private String freeFlag;
+
+    /**
+     * operation
+     */
+    private String operation;
+
+    /**
+     * cyyy
+     */
+    private String cyyy;
+
+    /**
+     * ybGsNo
+     */
+    private String ybGsNo;
+
+    /**
+     * treatType
+     */
+    private String treatType;
+
+    /**
+     * hicNo
+     */
+    private String hicNo;
+
+    /**
+     * ybRegisterDate
+     */
+    private Date ybRegisterDate;
+
+    /**
+     * pathologyDiagComment
+     */
+    private String pathologyDiagComment;
+
+    /**
+     * fileStatus
+     */
+    private String fileStatus;
+
+    /**
+     * lendFlag
+     */
+    private Integer lendFlag;
+
+    /**
+     * medType
+     */
+    private String medType;
+
+    /**
+     * admdvs
+     */
+    private String admdvs;
+
+    /**
+     * latechbFlag
+     */
+    private String latechbFlag;
+
+    /**
+     * pretFlag
+     */
+    private String pretFlag;
+
+    /**
+     * matnType
+     */
+    private String matnType;
+
+
+    /**
+     * 申报类型
+     */
+    private Integer decType;
+
+    // 手术信息
+    private List<BatjBa4> batjBa4;
+    // 诊断编码
+    private List<ZyDisDiagYb> zyDisDiagYb;
+
+}

+ 1 - 1
src/main/java/thyyxxk/webserver/entity/querydata/JieSuanDanChaXun.java

@@ -50,7 +50,7 @@ public class JieSuanDanChaXun {
      * false 未传
      * true 已传
      */
-    private Boolean flag;
+    private Integer flag;
 
 
     private long currentPage;

+ 10 - 0
src/main/java/thyyxxk/webserver/entity/querydata/TSiSetlinfo.java

@@ -282,5 +282,15 @@ public class TSiSetlinfo implements Serializable {
 
     private String outDeptName;
 
+    /**
+     * 实际住院天数
+     */
+    private String actIptDays;
+
+    /**
+     * 治疗方式
+     */
+    private String operation;
+
 
 }

+ 47 - 12
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiManageService.java

@@ -23,6 +23,7 @@ import thyyxxk.webserver.dao.his.yibao.DismissDao;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.dictionary.PureCodeName;
+import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyInactpatient;
 import thyyxxk.webserver.entity.medicalinsurance.manage.*;
 import thyyxxk.webserver.entity.medicalinsurance.query.SiSetlFeeDetl;
 import thyyxxk.webserver.entity.medicalinsurance.setlinfo.SiSetlinfo;
@@ -333,15 +334,15 @@ public class SiManageService {
         JSONObject jsonObject = exec.makeTradeHeaderWithInsureArea(SiFunction.UPLOAD_SI_SETTLE_INFO, upldCollection.getData().getSetlinfo().getInsuplc());
         jsonObject.replace("input", input);
         // 这里是上传
-        JSONObject result = exec.executeTrade(jsonObject, SiFunction.UPLOAD_SI_SETTLE_INFO);
-
-//        JSONObject result = new JSONObject();
-//        if (times % 2 == 0) {
-//            result.put("infcode", 0);
-//        } else {
-//            result.put("infcode", -1);
-//            result.put("err_msg", "知道你为啥失败吗?");
-//        }
+//        JSONObject result = exec.executeTrade(jsonObject, SiFunction.UPLOAD_SI_SETTLE_INFO);
+
+        JSONObject result = new JSONObject();
+        if (times % 2 == 0) {
+            result.put("infcode", 0);
+        } else {
+            result.put("infcode", -1);
+            result.put("err_msg", "知道你为啥失败吗?");
+        }
         log.info("医保结算信息上传 \n操作人:{}\n参数:{} \n结果:{}", TokenUtil.getTokenUserId(), jsonObject, result);
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
@@ -350,7 +351,7 @@ public class SiManageService {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, String.format("医保中心报错:【%s】 ", result.getString("message")));
         }
         if (result.getIntValue(RESULT_CODE) == 0) {
-            upIdCollectionDao.fanHuiLiuShuiHao(result.getJSONObject(OUTPUT).getString("setl_list_id"), upldCollection.getData().getSetlinfo().getSetlId());
+//            upIdCollectionDao.fanHuiLiuShuiHao(result.getJSONObject(OUTPUT).getString("setl_list_id"), upldCollection.getData().getSetlinfo().getSetlId());
             return ResultVoUtil.success(ExceptionEnum.SUCCESS, "上传成功");
         }
         return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, String.format("医保中心报错:【%s】 ", result.getString("err_msg")));
@@ -418,7 +419,6 @@ public class SiManageService {
             }
         }
         setlinfoUpld.setSetlBegnDate(setlinfoUpld.getAdmTime());
-        setlinfoUpld.setSetlEndDate(setlinfoUpld.getDscgTime());
         setlinfoUpld.setBillCode(setlinfoUpld.getMedcasno() + "_" + ledgerSn);
         setlinfoUpld.setBillNo(setlinfoUpld.getBillCode());
         setlinfoUpld.setBizSn(SnowFlakeId.instance().nextId());
@@ -623,8 +623,13 @@ public class SiManageService {
     }
 
 
+    /**
+     * 获取医保结算单信息
+     *
+     * @param param 参数
+     * @return 返回数据
+     */
     public ResultVo<IPage<TSiSetlinfo>> huoQuJieSuanRenYuan(JieSuanDanChaXun param) {
-        log.info("参数:{}", JSONObject.toJSONString(param));
         IPage<TSiSetlinfo> page = new Page<>();
         page.setRecords(upIdCollectionDao.huoQuJieSuanRenYuan(param.getStartTime(), param.getEndTime(), param.getClrType(), param.getPatNo(),
                 param.getInsutype(), param.getOutDept(), param.getMedType(), param.getPsnType(), param.getClrOptins(), param.getFlag(), param.getCurrentPage(),
@@ -632,6 +637,7 @@ public class SiManageService {
         if (ListUtil.isBlank(page.getRecords())) {
             return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
         }
+        Set<String> inpatientNo =
         for (TSiSetlinfo item : page.getRecords()) {
             item.setGendName(item.getGend().equals("1") ? "男" : "女");
             if (item.getClrOptinsName() == null) {
@@ -657,6 +663,11 @@ public class SiManageService {
         return ResultVoUtil.success(page);
     }
 
+    /**
+     * 获取 医疗类别
+     *
+     * @return 返回 code name
+     */
     public ResultVo<List<Object>> getMedType() {
         JSONArray jsonArray = new JSONArray();
         for (MedType e : MedType.values()) {
@@ -668,6 +679,12 @@ public class SiManageService {
         return ResultVoUtil.success(jsonArray);
     }
 
+    /**
+     * 医保结算单上传导出 execl 表格
+     *
+     * @param response 返回
+     * @param param    参数
+     */
     public void exportExcel(HttpServletResponse response, JieSuanDanChaXun param) {
         param.setPageSize(param.getTotal());
         log.info("医保结算单: {}", JSON.toJSONStringWithDateFormat(param, GetDateFormat.DATE));
@@ -700,5 +717,23 @@ public class SiManageService {
         ExcelUtil.exportExcel(response, title, content);
     }
 
+    public ResultVo<ZyInactpatient> jieSuanDanKeXiuGaiXinXi(String patNo, Integer times, Integer ledgerSn) {
+        SetlinfoUpld setlinfoUpld = upIdCollectionDao.setlinfo1(patNo, times, ledgerSn);
+        if (StringUtil.isBlank(setlinfoUpld.getSetlId())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "结算id为空");
+        }
+        if (!setlinfoUpld.getInsuplc().startsWith("4301") || setlinfoUpld.getInsuplc().equals("430182")) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "该患者参保地不属于长沙市,无法上传结算清单。");
+        }
+        ZyInactpatient zy = upIdCollectionDao.huanZheXinXi(patNo, times);
+        if (zy == null) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "未查询到患者信息。");
+        }
+        // 手术
+        zy.setBatjBa4(upIdCollectionDao.shouShuXinXi(patNo, times));
+        // 诊断编码
+        zy.setZyDisDiagYb(upIdCollectionDao.zhenDuanXinXi(patNo, times));
+        return ResultVoUtil.success(zy);
+    }
 
 }