Quellcode durchsuchen

医保试算不再对比总费用与报销金额的大小

lighter vor 3 Jahren
Ursprung
Commit
e8c2d7a2f0

+ 1 - 4
src/main/java/thyyxxk/sizyfeeoprnsystm/service/SiZyFeeService.java

@@ -189,7 +189,7 @@ public class SiZyFeeService {
         String ref = JSONArray.toJSONString(fees);
         input.getJSONObject("input").put("feedetail", JSONArray.parse(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.UPLOAD_HOSPITALIZATION_FEE_DETAILS);
-        log.info("【操作员:{}】,医保费用上传:\n参数:{},\n结果:{}", p.getStaffId(), input, result);
+        log.info("【操作员:{}】,医保费用上传结果:{}", p.getStaffId(), result);
         RestTemplate template = new RestTemplate();
         if (null != result) {
             if (result.getIntValue(RESULT_CODE) == 0) {
@@ -254,9 +254,6 @@ public class SiZyFeeService {
         if (infcode == 0) {
             JSONObject setlinfo = result.getJSONObject(OUTPUT).getJSONObject("setlinfo");
             String fundPay = setlinfo.getString("fund_pay_sumamt");
-            if (DecimalUtil.compare(fundPay, p.getTotalCharge()) == 1) {
-                fundPay = p.getTotalCharge();
-            }
             zyDao.updateFundPay(fundPay, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
             String message = "患者【" + p.getName() + "】院内总费用与医保中心总费用一致,医保报销金额为:¥ " + fundPay + "。";
             return ResultVoUtil.success(message);

+ 0 - 70
src/main/java/thyyxxk/sizyfeeoprnsystm/utils/DecimalUtil.java

@@ -1,70 +0,0 @@
-package thyyxxk.sizyfeeoprnsystm.utils;
-
-import java.math.BigDecimal;
-import java.math.RoundingMode;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-
-public class DecimalUtil {
-    public static boolean betweenAutoUpload() {
-        SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
-        try {
-            String now = format.format(new Date());
-            Date nowTime = format.parse(now);
-            Date startTime = format.parse("01:55:00");
-            Date endTime = format.parse("08:00:00");
-            if (nowTime.getTime() == startTime.getTime()
-                    || nowTime.getTime() == endTime.getTime()) {
-                return true;
-            }
-            Calendar date = Calendar.getInstance();
-            date.setTime(nowTime);
-            Calendar begin = Calendar.getInstance();
-            begin.setTime(startTime);
-            Calendar end = Calendar.getInstance();
-            end.setTime(endTime);
-            return date.after(begin) && date.before(end);
-        } catch (Exception e) {
-            e.printStackTrace();
-            return false;
-        }
-    }
-
-    public static String mathMinus(String a, String b) {
-        BigDecimal d1 = new BigDecimal(a);
-        BigDecimal d2 = new BigDecimal(b);
-        return d1.subtract(d2).toString();
-    }
-
-    public static String mathDivide(String a, String b) {
-        BigDecimal b1 = new BigDecimal(a);
-        BigDecimal b2 = new BigDecimal(b);
-        // 保留4位小数,四舍五入
-        return b1.divide(b2, 2, RoundingMode.HALF_UP).toString();
-    }
-
-    public static int mathCompare(String a, String b) {
-        BigDecimal b1 = new BigDecimal(a);
-        BigDecimal b2 = new BigDecimal(b);
-        return b1.compareTo(b2);
-    }
-
-    public static String mathAdd(String a, String b) {
-        BigDecimal d1 = new BigDecimal(a);
-        BigDecimal d2 = new BigDecimal(b);
-        return d1.add(d2).toString();
-    }
-
-    public static int compare(String a, String b) {
-        if (StringUtil.isBlank(a)) {
-            a = "0";
-        }
-        if (StringUtil.isBlank(b)) {
-            b = "0";
-        }
-        BigDecimal d1 = new BigDecimal(a);
-        BigDecimal d2 = new BigDecimal(b);
-        return d1.compareTo(d2);
-    }
-}