浏览代码

结算单添加新的功能

xiaochan 3 年之前
父节点
当前提交
032e35c1c3

+ 18 - 4
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/UpIdCollectionDao.java

@@ -226,8 +226,8 @@ public interface UpIdCollectionDao {
             "       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,datediff(day ,b.admiss_date ,b.dis_date) as act_ipt_days,b.operation,b.dec_type," +
-            "       id,req_op_id,rtrim(req_op_name) req_op_name,req_op_date,rtrim(req_remark) req_remark," +
-            "audit_staff,audit_name,audit_date,rtrim(audit_remark) audit_remark,audit_flag," +
+            "       id,req_op_id,rtrim(req_op_name) req_op_name,req_op_date,req_remark," +
+            "audit_staff,audit_name,audit_date,audit_remark,audit_flag," +
             "refer_physician_name = (select top 1 rtrim(name) from a_employee_mi where code = b.refer_physician),b.refer_physician " +
             "from t_si_setlinfo a left join  zy_inactpatient b on (a.pat_no = b.inpatient_no and a.times = b.admiss_times) " +
             "left join t_yb_setl_modify_req c on (a.pat_no = c.pat_no and a.times = c.times) " +
@@ -265,6 +265,12 @@ public interface UpIdCollectionDao {
             "#{item}" +
             "</foreach>" +
             "</if>" +
+            "<if test=\"decTypes.size > 0 \">" +
+            "  and b.dec_type in " +
+            "<foreach collection='decTypes' item='item' index='index' open='(' close=')' separator=','>" +
+            "#{item}" +
+            "</foreach>" +
+            "</if>" +
             "<if test=\"clrOptins.size > 0 \">" +
             "  and clr_optins in " +
             "<foreach collection='clrOptins' item='item' index='index' open='(' close=')' separator=','>" +
@@ -294,6 +300,7 @@ public interface UpIdCollectionDao {
                                              @Param("medTypes") List<String> medTypes,
                                              @Param("psnTypes") List<String> psnTypes,
                                              @Param("clrOptins") List<String> clrOptins,
+                                             @Param("decTypes") List<Integer> decTypes,
                                              @Param("flag") Integer flag,
                                              @Param("referPhysician") String referPhysician,
                                              @Param("auditFlag") Integer auditFlag,
@@ -339,6 +346,12 @@ public interface UpIdCollectionDao {
             "#{item}" +
             "</foreach>" +
             "</if>" +
+            "<if test=\"decTypes.size > 0 \">" +
+            "  and b.dec_type in " +
+            "<foreach collection='decTypes' item='item' index='index' open='(' close=')' separator=','>" +
+            "#{item}" +
+            "</foreach>" +
+            "</if>" +
             "<if test=\"clrOptins.size > 0 \">" +
             "  and clr_optins in " +
             "<foreach collection='clrOptins' item='item' index='index' open='(' close=')' separator=','>" +
@@ -367,6 +380,7 @@ public interface UpIdCollectionDao {
                                   @Param("medTypes") List<String> medTypes,
                                   @Param("psnTypes") List<String> psnTypes,
                                   @Param("clrOptins") List<String> clrOptins,
+                                  @Param("decTypes") List<Integer> decTypes,
                                   @Param("flag") Integer flag,
                                   @Param("referPhysician") String referPhysician,
                                   @Param("auditFlag") Integer auditFlag);
@@ -510,10 +524,10 @@ public interface UpIdCollectionDao {
                        @Param("endTime") String endTime,
                        @Param("opId") String opId);
 
-    @Select("select exec_unit as execUnit,execUnitName = (select rtrim(name) from zd_unit_code where code = exec_unit), " +
+    @Select("select ward_code as execUnit,execUnitName = (select rtrim(name) from zd_unit_code where code = ward_code), " +
             "       sum(charge_amount) chargeAmount,sum(charge_fee) chargeFee " +
             "from zy_detail_charge where inpatient_no = #{patNo} and admiss_times = #{times} " +
-            "group by exec_unit order by chargeFee desc")
+            "group by ward_code order by chargeFee desc")
     List<Map<String, String>> getHuanZheFeiYong(@Param("patNo") String patNo,
                                                 @Param("times") Integer times);
 

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

@@ -46,6 +46,8 @@ public class JieSuanDanChaXun {
      */
     private List<String> clrOptins;
 
+    private List<Integer> decTypes;
+
     /**
      * 管床医生
      */

+ 38 - 0
src/main/java/thyyxxk/webserver/entity/querydata/SiSetlinfoTemp.java

@@ -353,6 +353,44 @@ public class SiSetlinfoTemp implements Serializable {
     private Integer auditFlag;
 
 
+    public String getDecTypeName() {
+        if (decType != null) {
+            switch (decType) {
+                case 0:
+                    return "有对照";
+                case 1:
+                    return "治疗未完成";
+                case 2:
+                    return "无对照";
+                case 3:
+                    return "转科";
+                case 4:
+                    return "单列";
+            }
+        }
+        return "";
+    }
+
+
+    public String getAuditFlagName() {
+        if (auditFlag != null) {
+            switch (auditFlag) {
+                case 0:
+                    return "待审核";
+                case 1:
+                    return "审核通过";
+                case 2:
+                    return "审核驳回";
+                case 3:
+                    return "正在审核";
+                default:
+                    return "未知";
+            }
+        }
+        return "";
+    }
+
+
     public String getOperationName() {
         if (operation != null) {
             switch (operation) {

+ 21 - 19
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -384,8 +384,8 @@ public class SetlListUpldService {
     public ResultVo<IPage<SiSetlinfoTemp>> huoQuJieSuanRenYuan(JieSuanDanChaXun param) {
         IPage<SiSetlinfoTemp> page = new Page<>();
         page.setRecords(dao.huoQuJieSuanRenYuan(param.getStartTime(), param.getEndTime(), param.getClrType(), param.getPatNo(),
-                param.getInsutype(), param.getOutDept(), param.getMedType(), param.getPsnType(), param.getClrOptins(), param.getFlag(),
-                param.getReferPhysician(), param.getAuditFlag(), param.getCurrentPage(),
+                param.getInsutype(), param.getOutDept(), param.getMedType(), param.getPsnType(), param.getClrOptins(), param.getDecTypes(),
+                param.getFlag(), param.getReferPhysician(), param.getAuditFlag(), param.getCurrentPage(),
                 param.getPageSize()));
         if (ListUtil.isBlank(page.getRecords())) {
             return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
@@ -423,7 +423,7 @@ public class SetlListUpldService {
         }
         if (param.getTotal() == 0) {
             page.setTotal(dao.huoQuJieSuanRenYuanTotal(param.getStartTime(), param.getEndTime(), param.getClrType(), param.getPatNo(),
-                    param.getInsutype(), param.getOutDept(), param.getMedType(), param.getPsnType(), param.getClrOptins(), param.getFlag(),
+                    param.getInsutype(), param.getOutDept(), param.getMedType(), param.getPsnType(), param.getClrOptins(), param.getDecTypes(), param.getFlag(),
                     param.getReferPhysician(), param.getAuditFlag()));
         }
         return ResultVoUtil.success(page);
@@ -456,27 +456,29 @@ public class SetlListUpldService {
         param.setCurrentPage(1);
         log.info("医保结算单: {}", JSON.toJSONStringWithDateFormat(param, GetDateFormat.DATE));
         List<SiSetlinfoTemp> list = huoQuJieSuanRenYuan(param).getData().getRecords();
-        String[] title = {"姓名", "出院科室", "住院号/门诊号", "性别", "住院天数", "诊断编码", "诊断名称", "治疗方式", "总费用", "报销金额", "险种类型", "人员类别", "结算时间", "医疗类别", "清算机构", "管床医生"};
+        String[] title = {"姓名", "审核状态", "申报类型", "出院科室", "住院号/门诊号", "性别", "住院天数", "诊断编码", "诊断名称", "治疗方式", "总费用", "报销金额", "险种类型", "人员类别", "结算时间", "医疗类别", "清算机构", "管床医生"};
         String[][] content = new String[list.size()][];
         for (int i = 0; i < list.size(); i++) {
             content[i] = new String[title.length];
             SiSetlinfoTemp pojo = list.get(i);
             content[i][0] = pojo.getPsnName();
-            content[i][1] = pojo.getOutDeptName();
-            content[i][2] = pojo.getPatNo();
-            content[i][3] = pojo.getGendName();
-            content[i][4] = pojo.getActIptDays();
-            content[i][5] = pojo.getDisDiag();
-            content[i][6] = pojo.getDisDiagComment();
-            content[i][7] = pojo.getOperationName();
-            content[i][8] = pojo.getMedfeeSumamt();
-            content[i][9] = pojo.getFundPaySumamt();
-            content[i][10] = pojo.getInsutypeName();
-            content[i][11] = pojo.getPsnTypeName();
-            content[i][12] = DateUtil.formatDatetime(pojo.getSetlTime(), GetDateFormat.DATE_TIME);
-            content[i][13] = pojo.getMedTypeName();
-            content[i][14] = pojo.getClrOptinsName();
-            content[i][15] = pojo.getReferPhysicianName();
+            content[i][1] = pojo.getAuditFlagName();
+            content[i][2] = pojo.getDecTypeName();
+            content[i][3] = pojo.getOutDeptName();
+            content[i][4] = pojo.getPatNo();
+            content[i][5] = pojo.getGendName();
+            content[i][6] = pojo.getActIptDays();
+            content[i][7] = pojo.getDisDiag();
+            content[i][8] = pojo.getDisDiagComment();
+            content[i][9] = pojo.getOperationName();
+            content[i][10] = pojo.getMedfeeSumamt();
+            content[i][11] = pojo.getFundPaySumamt();
+            content[i][12] = pojo.getInsutypeName();
+            content[i][13] = pojo.getPsnTypeName();
+            content[i][14] = DateUtil.formatDatetime(pojo.getSetlTime(), GetDateFormat.DATE_TIME);
+            content[i][15] = pojo.getMedTypeName();
+            content[i][16] = pojo.getClrOptinsName();
+            content[i][17] = pojo.getReferPhysicianName();
         }
         //传三个参数 一个是 固定的 response ,excel的头部信息,excel的内容
         ExcelUtil.exportExcel(response, title, content);