Forráskód Böngészése

优化节假日功能

hurugang 4 éve
szülő
commit
58d544b740

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

@@ -578,7 +578,7 @@ public class NavigationController {
 
 
     /**
-     * 收费项目折扣
+     * 惠民活动
      *
      * @return
      */

+ 99 - 0
src/main/java/cn/hnthyy/thmz/controller/api/MedicalViewApiController.java

@@ -688,6 +688,7 @@ public class MedicalViewApiController {
                 results.put("resultCode", 0);
                 results.put("resultMessage", "缴费成功");
                 results.put("guideListInfo", "");
+                return results;
             }
             String[] arr = haiciCharge.getHisOrdNum().split("_");
             MzDepositFileVo mzDepositFileVo = new MzDepositFileVo();
@@ -795,6 +796,104 @@ public class MedicalViewApiController {
     }
 
 
+
+//    /**
+//     * 门诊缴费订单退费
+//     *
+//     * @param haiciCharge
+//     * @return
+//     */
+//    @RequestMapping(value = "/saveRefundFeeFormHaiCi", method = {RequestMethod.POST})
+//    public Map<String, Object> saveRefundFeeFormHaiCi(@RequestBody HaiciCharge haiciCharge) {
+//        Map<String, Object> results = new HashMap<>();
+//        if (haiciCharge == null) {
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "门诊缴费订单支付参数为空");
+//            return results;
+//        }
+//        if (haiciCharge.getPatCardType() == null) {
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "患者诊疗卡类型不能为空");
+//            return results;
+//        }
+//        if (StringUtils.isBlank(haiciCharge.getPatCardNo())) {
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "患者诊疗卡号不能为空");
+//            return results;
+//        }
+//        if (StringUtils.isBlank(haiciCharge.getHisOrdNum())) {
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "医院订单号不能为空");
+//            return results;
+//        }
+//        if (StringUtils.isBlank(haiciCharge.getPsOrdNum())) {
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "平台订单号不能为空");
+//            return results;
+//        }
+//        if (StringUtils.isBlank(haiciCharge.getPayMode())) {
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "支付方式不能为空");
+//            return results;
+//        }
+//        if (!Arrays.asList(WX, ZFB).contains(haiciCharge.getPayMode())) {
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "支付方式有误,请联系管理员");
+//            return results;
+//        }
+//        if (haiciCharge.getPayAmt() == null) {
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "支付金额不能为空");
+//            return results;
+//        }
+//        if (StringUtils.isBlank(haiciCharge.getAgtOrdNum())) {
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "支付机构流水号不能为空");
+//            return results;
+//        }
+//        if (haiciCharge.getPayTime() == null) {
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "支付时间不能为空");
+//            return results;
+//        }
+//        try {
+//            MzDepositFile mzDepositFileDb = mzDepositFileService.queryMzDepositFileByAgtordnum(haiciCharge.getPsOrdNum(), haiciCharge.getAgtOrdNum(),null);
+//            if (mzDepositFileDb != null && PayMarkEnum.CHARGED.code.equals(mzDepositFileDb.getPayMark())) {
+//                results.put("resultCode", 0);
+//                results.put("resultMessage", "缴费成功");
+//                results.put("guideListInfo", "");
+//                return results;
+//            }
+//            String[] arr = haiciCharge.getHisOrdNum().split("_");
+//            MzDepositFileVo mzDepositFileVo = new MzDepositFileVo();
+//            mzDepositFileVo.setPatientId(arr[0]);
+//            mzDepositFileVo.setTimes(Integer.valueOf(arr[1]));
+//            mzDepositFileVo.setReceiptNo(Integer.valueOf(arr[2]));
+//            MzDepositFile mzDepositFile = new MzDepositFile();
+//            if (WX.equals(haiciCharge.getPayMode())) {
+//                mzDepositFile.setChequeType(Constants.ZZWX);
+//            } else {
+//                mzDepositFile.setChequeType(Constants.ZZZFB);
+//            }
+//            mzDepositFile.setPsordnum(haiciCharge.getPsOrdNum());
+//            mzDepositFile.setAgtordnum(haiciCharge.getAgtOrdNum());
+//            mzDepositFile.setAmount(haiciCharge.getPayAmt().divide(BigDecimal.valueOf(100)));
+//            mzDepositFileVo.setMzDepositFiles(Arrays.asList(mzDepositFile));
+//            mzChargeDetailService.chargeFee(Constants.BRZZJF_CODE, mzDepositFileVo);
+//            results.put("resultCode", 0);
+//            results.put("resultMessage", "缴费成功");
+//            results.put("guideListInfo", "");
+//            return results;
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            results.put("resultCode", -1);
+//            results.put("resultMessage", "门诊缴费订单支付失败,请联系管理员");
+//            log.error("系统异常,错误信息{}", e.getMessage());
+//            return results;
+//        }
+//    }
+
+
     /**
      * 门诊已缴费记录查询
      *

+ 4 - 4
src/main/java/cn/hnthyy/thmz/mapper/his/zd/ZdChargeItemMapper.java

@@ -21,7 +21,7 @@ public interface ZdChargeItemMapper {
     @Select({"<script>",
             "SELECT top ${pageSize} code,name,exec_unit,audit_code,charge_amount,effective_date,effective_amount,percentag1,percentag2,percentag3,percentag4,percentag5," +
                     "            rtrim(self_flag) self_flag,rtrim(separate_flag) separate_flag,rtrim(suppress_flag) suppress_flag,py_code,d_code wb_code,bill_item_zy,bill_item_mz," +
-                    "            charge_unit,percent_group_zy,percent_group_mz,rtrim(in_out_flag) in_out_flag,n_code yn_code,class_code,s_code bz_code,discription,rtrim(del_flag) del_flag," +
+                    "            charge_unit,percent_group_zy,percent_group_mz,rtrim(case  when in_out_flag ='' then null else in_out_flag end) in_out_flag,n_code yn_code,class_code,s_code bz_code,discription,rtrim(del_flag) del_flag," +
                     "            rtrim(yp_flag) yp_flag,bill_item_code,rtrim(xnh_flag) xnh_flag,add_date,hnsyb_code,hnsyb_name,xnh_code,xnh_name,xnh_ratio,xnh_quotamoney,rtrim(xnh_status) xnh_status," +
                     "            yb_flag_new,yb_comment_new,yb_bl_new,charge_amount_lwg,percent_group_1  percent_group1,yb_name,yb_comment,cl_code,e_code yb_code,co,xl_code FROM (SELECT ROW_NUMBER() OVER (ORDER BY zd_charge_item_page.add_date desc) ",
             "AS RowNumber,* from dbo.zd_charge_item zd_charge_item_page where 1=1 ",
@@ -98,7 +98,7 @@ public interface ZdChargeItemMapper {
      */
     @Select("select code,name,exec_unit,audit_code,charge_amount,effective_date,effective_amount,percentag1,percentag2,percentag3,percentag4,percentag5," +
             "rtrim(self_flag) self_flag,rtrim(separate_flag) separate_flag,rtrim(suppress_flag) suppress_flag,py_code,d_code wb_code,bill_item_zy,bill_item_mz," +
-            "charge_unit,percent_group_zy,percent_group_mz,rtrim(in_out_flag) in_out_flag,n_code yn_code,class_code,s_code bz_code,discription,rtrim(del_flag) del_flag, " +
+            "charge_unit,percent_group_zy,percent_group_mz,rtrim(case  when in_out_flag ='' then null else in_out_flag end) in_out_flag,n_code yn_code,class_code,s_code bz_code,discription,rtrim(del_flag) del_flag, " +
             "rtrim(yp_flag) yp_flag,bill_item_code,rtrim(xnh_flag) xnh_flag,add_date,hnsyb_code,hnsyb_name,xnh_code,xnh_name,xnh_ratio,xnh_quotamoney,rtrim(xnh_status) xnh_status," +
             "yb_flag_new,yb_comment_new,yb_bl_new,e_code yb_code,cl_code,co,xl_code from zd_charge_item where  code = #{code,jdbcType=VARCHAR} ")
     //     " and (del_flag != 1 or del_flag is null) " )
@@ -114,7 +114,7 @@ public interface ZdChargeItemMapper {
     @Select({"<script>",
             "select code,name,exec_unit,audit_code,charge_amount,effective_date,effective_amount,percentag1,percentag2,percentag3,percentag4,percentag5,",
             "rtrim(self_flag) self_flag,rtrim(separate_flag) separate_flag,rtrim(suppress_flag) suppress_flag,py_code,d_code wb_code,bill_item_zy,bill_item_mz,",
-            "charge_unit,percent_group_zy,percent_group_mz,rtrim(in_out_flag) in_out_flag,n_code yn_code,class_code,s_code bz_code,discription,rtrim(del_flag) del_flag, ",
+            "charge_unit,percent_group_zy,percent_group_mz,rtrim(case  when in_out_flag ='' then null else in_out_flag end) in_out_flag,n_code yn_code,class_code,s_code bz_code,discription,rtrim(del_flag) del_flag, ",
             "rtrim(yp_flag) yp_flag,bill_item_code,rtrim(xnh_flag) xnh_flag,add_date,hnsyb_code,hnsyb_name,xnh_code,xnh_name,xnh_ratio,xnh_quotamoney,rtrim(xnh_status) xnh_status,",
             // "yb_flag_new,yb_comment_new,yb_bl_new from zd_charge_item where (del_flag != 1 or del_flag is null) ",
             "yb_flag_new,yb_comment_new,yb_bl_new,e_code yb_code,cl_code,co,xl_code from zd_charge_item  ",
@@ -249,7 +249,7 @@ public interface ZdChargeItemMapper {
     @Select({"<script>",
             "SELECT  code,name,exec_unit,audit_code,charge_amount,effective_date,effective_amount,percentag1,percentag2,percentag3,percentag4,percentag5," +
                     "            rtrim(self_flag) self_flag,rtrim(separate_flag) separate_flag,rtrim(suppress_flag) suppress_flag,py_code,d_code wb_code,bill_item_zy,bill_item_mz," +
-                    "            charge_unit,percent_group_zy,percent_group_mz,rtrim(in_out_flag) in_out_flag,n_code yn_code,class_code,s_code bz_code,discription,rtrim(del_flag) del_flag," +
+                    "            charge_unit,percent_group_zy,percent_group_mz,rtrim(case  when in_out_flag ='' then null else in_out_flag end) in_out_flag,n_code yn_code,class_code,s_code bz_code,discription,rtrim(del_flag) del_flag," +
                     "            rtrim(yp_flag) yp_flag,bill_item_code,rtrim(xnh_flag) xnh_flag,add_date,hnsyb_code,hnsyb_name,xnh_code,xnh_name,xnh_ratio,xnh_quotamoney,rtrim(xnh_status) xnh_status," +
                     "            yb_flag_new,yb_comment_new,yb_bl_new,charge_amount_lwg,percent_group_1  percent_group1,yb_name,yb_comment,cl_code,e_code yb_code,co,xl_code FROM zd_charge_item ",
             " where del_flag =0 ",