浏览代码

修改时区配置

hurugang 2 年之前
父节点
当前提交
ca1f372b36

+ 12 - 0
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzChargeDetail.java

@@ -1,6 +1,8 @@
 package cn.hnthyy.thmz.entity.his.mz;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -52,8 +54,12 @@ public class MzChargeDetail implements Serializable,Comparable<MzChargeDetail> {
     //姓名
     private String name;
     //收费日期
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS",timezone="GMT+8")
     private Date chargeDate;
     //发药时间
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS",timezone="GMT+8")
     private Date confirmTime;
     //发药药房  如果是00 说明是医技套餐项目   71 普药  81 普通中药 82 颗粒剂中药 91 医材  111 麻精一  131 精二
     private String groupNo;
@@ -64,6 +70,8 @@ public class MzChargeDetail implements Serializable,Comparable<MzChargeDetail> {
     //录入员 退费人
     private String inputId;
     //输入日期  退费时间
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS",timezone="GMT+8")
     private Date inputDate;
     //收款员->配药员
     private String cashierId;
@@ -72,6 +80,8 @@ public class MzChargeDetail implements Serializable,Comparable<MzChargeDetail> {
     //划价人
     private String priceId;
     //划价时间
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS",timezone="GMT+8")
     private Date priceTime;
     //执行科室
     private String execDept;
@@ -156,6 +166,8 @@ public class MzChargeDetail implements Serializable,Comparable<MzChargeDetail> {
     //反查 取药号码
     private Integer backSerial;
     //录入时刻->配药时间
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS",timezone="GMT+8")
     private Date inputTime;
     //每天剂数
     private Integer cyMtjs;

+ 3 - 3
src/main/resources/application-dev.yml

@@ -18,10 +18,10 @@ server:
   servlet:
     context-path: "/thmz"
 spring:
-  jackson:
-    date-format: "yyyy-MM-dd HH:mm:ss"
+  #jackson:
+    #date-format: "yyyy-MM-dd HH:mm:ss"
     #设置为东八区时间
-    timezone: GMT+8
+    #timezone: GMT+8
     #serialization:
     #使用数值timestamp表示日期
     #write-dates-as-timestamps: true

+ 3 - 3
src/main/resources/application-prod.yml

@@ -18,10 +18,10 @@ server:
   servlet:
     context-path: "/thmz"
 spring:
-  jackson:
-    date-format: "yyyy-MM-dd HH:mm:ss"
+  #jackson:
+    #date-format: "yyyy-MM-dd HH:mm:ss"
     #设置为东八区时间
-    timezone: GMT+8
+    #timezone: GMT+8
     #serialization:
     #使用数值timestamp表示日期
     #write-dates-as-timestamps: true