Browse Source

no message

xiaochan 4 years ago
parent
commit
a89fb84bcb

+ 6 - 6
src/main/java/thyyxxk/webserver/service/querydata/CovidVaccinateAppointmentService.java

@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.Capacity;
+import thyyxxk.webserver.constants.GetDateFormat;
 import thyyxxk.webserver.dao.his.querydata.CovidVaccinateAppointmentDao;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.querydata.CovidVaccinateAppointment;
@@ -35,8 +36,7 @@ import java.util.*;
 public class CovidVaccinateAppointmentService {
 
     private final CovidVaccinateAppointmentDao dao;
-    private static final String DATE_FORMAT = "yyyy-MM-dd";
-    private static final SimpleDateFormat SDF = new SimpleDateFormat(DATE_FORMAT);
+    private static final SimpleDateFormat SDF = new SimpleDateFormat(GetDateFormat.DATE);
     private static final int GET_DATE_SECTION = 7;
 
     @Autowired
@@ -97,10 +97,10 @@ public class CovidVaccinateAppointmentService {
             date = SDF.parse(DateUtil.getOffsetDate(i));
             if (maxDate == null) {
                 dateList.add(date);
-                log.info("新冠疫苗插入默认设置阈值 --> code:{},插入的日期为:{}", code, DateUtil.formatDatetime(date, DATE_FORMAT));
+                log.info("新冠疫苗插入默认设置阈值 --> code:{},插入的日期为:{}", code, DateUtil.formatDatetime(date, GetDateFormat.DATE));
             } else if (maxDate.getTime() < date.getTime()) {
                 dateList.add(date);
-                log.info("新冠疫苗厂家阈值插入 --> code:{},添加日期为:{}", code, DateUtil.formatDatetime(date, DATE_FORMAT));
+                log.info("新冠疫苗厂家阈值插入 --> code:{},添加日期为:{}", code, DateUtil.formatDatetime(date, GetDateFormat.DATE));
             }
         }
         //因为在 查看的时候 也是需要 执行 要判断一下 只有日期为空的时候才会插入
@@ -116,7 +116,7 @@ public class CovidVaccinateAppointmentService {
      * @param param    name姓名  ExecuteDate预约时间  currentPage=1  PageSize=-1 这样写才能导出全部的数据
      */
     public void exportExcel(HttpServletResponse response, CovidVaccinateAppointment param) {
-        log.info("导出新冠疫苗excel: {}", JSON.toJSONStringWithDateFormat(param, DATE_FORMAT));
+        log.info("导出新冠疫苗excel: {}", JSON.toJSONStringWithDateFormat(param, GetDateFormat.DATE));
         List<CovidVaccinateAppointment> list = getQueryPage(param).getRecords();
         String[] title = {"门诊id", "姓名", "性别", "联系电话", "身份证号", "年龄", "工作单位", "工作性质", "预约接种时间", "产品编码", "产品名称", "疫苗厂商"};
         String[][] content = new String[list.size()][];
@@ -231,7 +231,7 @@ public class CovidVaccinateAppointmentService {
      * @param param 修改的字段为 name  enableFlag bookTip 通过id来修改
      */
     public ResultVo<Boolean> xiuGaiYiMiao(ZdCovidVaccinate param) {
-        log.info("修改疫苗 --> 操作人:{},数据:{}", TokenUtil.getTokenUserId(), JSON.toJSONStringWithDateFormat(param, DATE_FORMAT));
+        log.info("修改疫苗 --> 操作人:{},数据:{}", TokenUtil.getTokenUserId(), JSON.toJSONStringWithDateFormat(param, GetDateFormat.DATE));
         dao.xiuGaiYiMiao(param);
         return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION,
                 String.format("<p style='color:#67C23A'>%s</p>修改成功 \(☆o☆)/", param.getName()));