Browse Source

修复同一就诊次数反复退费问题

hurugang 5 năm trước cách đây
mục cha
commit
30046a8716

+ 6 - 1
src/main/java/cn/hnthyy/thmz/controller/MzChargeDetailController.java

@@ -525,7 +525,12 @@ public class MzChargeDetailController {
             resultMap.put("pageViewVo", pageViewVo);
             resultMap.put("mzChargeDetails", mzChargeDetails);
             return resultMap;
-        } catch (Exception e) {
+        } catch (MzException e){
+            resultMap.put("code", -1);
+            resultMap.put("message", e.getMessage());
+            log.error("预退费操作失败,系统异常,错误信息{}", e);
+            return resultMap;
+        } catch (Exception e){
             e.printStackTrace();
             resultMap.put("code", -1);
             resultMap.put("message", "预退费操作失败,系统出错,请联系管理员");

+ 13 - 5
src/main/java/cn/hnthyy/thmz/mapper/his/MzChargeDetailMapper.java

@@ -276,7 +276,16 @@ public interface MzChargeDetailMapper {
             "rtrim(self_flag) self_flag,rtrim(responce_type) responce_type,dec_amount,back_serial,input_time,cy_mtjs,cy_jsl,cy_zql,cy_fj,cy_ffcs,cy_fysm,supply_amount,rtrim(cy_jssm) cy_jssm,",
             "dept_no,gl_percent_ft,rtrim(yb_zf_flag) yb_zf_flag,orig_price,rtrim(try_result) try_result,rtrim(supply_exec) supply_exec,rtrim(cy_dj) cy_dj,rtrim(receive_flag) receive_flag,",
             "rtrim(chequ_type) chequ_type,rtrim(print_flag_yj) print_flag_yj,rtrim(confirm_flag_qx) confirm_flag_qx ",
-            "from dbo.mz_charge_detail where  patient_id =#{patientId,jdbcType=CHAR} and times =#{times,jdbcType=INTEGER} and pay_mark=#{payMark,jdbcType=CHAR} order by order_no desc",
+            "from dbo.mz_charge_detail where  patient_id =#{patientId,jdbcType=CHAR} and times =#{times,jdbcType=INTEGER}" +
+                    "<choose>" +
+                    "<when test='payMark!=null and payMark ==0 '>",
+            " and pay_mark=#{payMark,jdbcType=CHAR}  and confirm_flag <![CDATA[<>]]> 4 ",
+            "</when>",
+            "<otherwise>" +
+                    " and pay_mark=#{payMark,jdbcType=CHAR} " +
+                    "</otherwise>" +
+                    "</choose>" +
+                    "order by order_no desc",
             "</script>"})
     List<MzChargeDetail> selectMzChargeDetailByPatientId(@Param("patientId") String patientId, @Param("times") Integer times, @Param("payMark") String payMark);
 
@@ -735,8 +744,7 @@ public interface MzChargeDetailMapper {
     String selectJZName(@Param("patientId") String patientId, @Param("times") Integer times);
 
     /**
-     *
-     * @param thmzmxsrParamsVo  caseType = 1 申请科室核算报表  0 执行科室核算报表
+     * @param thmzmxsrParamsVo caseType = 1 申请科室核算报表  0 执行科室核算报表
      * @return
      */
     @Select({"<script>",
@@ -773,13 +781,13 @@ public interface MzChargeDetailMapper {
 
 //                    "          and isnull(a.dept_no,'') like '%' " +
                     "<when test='execDept!=null'>",
-                    "          and ( case '1' when #{caseType} then " +
+            "          and ( case '1' when #{caseType} then " +
                     "      case when isnull(a.warn_dept,'')='' then  a.exec_dept else a.warn_dept end " +
                     "      else  " +
                     "     case when isnull(a.exec_dept,'') ='' then a.warn_dept else a.exec_dept end " +
                     "  end " +
                     ") =#{execDept} " +
-                     "</when>"       +
+                    "</when>" +
                     "group by " +
                     "z.name,c.audit_code,isnull(a.group_no,'00')," +
                     " case a.charge_bill_code when 'BILL10' then 'BILL01' when 'BILL11' then 'BILL28' when 'BILL12' then 'BILL02' else a.charge_bill_code end" +

+ 3 - 3
src/main/resources/static/js/toll_administration.js

@@ -1945,9 +1945,6 @@ function initRefundChargeDetailTable(chargeItemCodes) {
                 return;
             }
             var ress = eval(res);
-            $("#oriAmount").text(ress.pageViewVo.data[0].oriAmount);
-            $("#newAmount").text(ress.pageViewVo.data[0].amount);
-            $("#refundAmount").text(ress.pageViewVo.data[0].refundFee);
             if (ress.code == -1) {
                 new PNotify({
                     title: '错误提示',
@@ -1961,6 +1958,9 @@ function initRefundChargeDetailTable(chargeItemCodes) {
                     "rows": {}   //数据
                 };
             }
+            $("#oriAmount").text(ress.pageViewVo.data[0].oriAmount);
+            $("#newAmount").text(ress.pageViewVo.data[0].amount);
+            $("#refundAmount").text(ress.pageViewVo.data[0].refundFee);
             return {
                 "total": ress.pageViewVo.total,//总页数
                 "rows": ress.pageViewVo.data   //数据