hurugang 5 rokov pred
rodič
commit
a02e92a0b1

+ 15 - 0
src/main/java/cn/hnthyy/thmz/Utils/DateUtil.java

@@ -115,6 +115,21 @@ public class DateUtil {
         }
     }
 
+
+    /**
+     * 转换时间
+     * @param time
+     * @param format
+     * @return
+     */
+    public static String fomart(Date time,String format){
+        if(time==null || StringUtils.isBlank(format)){
+            return null;
+        }
+        SimpleDateFormat smf = new SimpleDateFormat(format);
+        return smf.format(time);
+    }
+
     /**
      * 根据给定日期获取给定日期当月的第一天的0点0分0秒
      * @return

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

@@ -1,6 +1,7 @@
 package cn.hnthyy.thmz.controller.api;
 
 
+import cn.hnthyy.thmz.Utils.DateUtil;
 import cn.hnthyy.thmz.common.Constants;
 import cn.hnthyy.thmz.entity.MzException;
 import cn.hnthyy.thmz.entity.haici.HaiciCharge;
@@ -466,6 +467,7 @@ public class MedicalViewApiController {
                 map.put("totalAmt", totalAmount);
                 map.put("medInsAmt", BigDecimal.ZERO);
                 map.put("selfAmt", totalAmount);
+                map.put("priceTime", DateUtil.fomart(mzChargeDetail.getPriceTime(),"yyyy-MM-dd HH:mm:ss"));
                 returnList.add(map);
             }
             results.put("resultCode", 0);