From 93340345fdeba172644b6f2bdffb333f19c7ed0e Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 4 Jan 2022 10:38:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=BA=A6=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/AppointmentRecordResultDTO.java | 3 +++ .../service/impl/IcPartyServiceCenterServiceImpl.java | 9 +++++++++ .../resources/mapper/IcMatterAppointmentRecordDao.xml | 1 + 3 files changed, 13 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java index c3024a6bbb..eadadbccce 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java @@ -40,6 +40,8 @@ public class AppointmentRecordResultDTO implements Serializable { */ private String remark; + private Boolean isCancel; + private String recordId; private String centerName; private String address; @@ -65,5 +67,6 @@ public class AppointmentRecordResultDTO implements Serializable { this.appointmentTime = new ArrayList<>(); this.recordId = ""; this.appointmentDate = ""; + this.isCancel = true; } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 4cd1e6dc3d..7be111352d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java @@ -35,6 +35,7 @@ import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.PartyServiceCenterConstant; import com.epmet.dao.IcMatterAppointmentRecordDao; @@ -487,6 +488,10 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl list = Arrays.asList(r.getTimeId().split(",")); list.forEach(l -> timeList.stream().filter( t -> l.equals(t.getTimeId())).forEach(t -> time.add(t.getTime()))); r.setAppointmentTime(time); + String endTime = time.get(time.size() - NumConstant.ONE).substring(6, -1); + if (LocalDateTime.now().isBefore(LocalDateTime.parse(r.getAppointmentDate() + " " + endTime))){ + r.setIsCancel(false); + } }); return result; } @@ -545,6 +550,10 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl list = Arrays.asList(r.getTimeId().split(",")); list.forEach(l -> timeList.stream().filter( t -> l.equals(t.getTimeId())).forEach(t -> time.add(t.getTime()))); r.setAppointmentTime(time); + String endTime = time.get(time.size() - NumConstant.ONE).substring(6, -1); + if (LocalDateTime.now().isBefore(LocalDateTime.parse(r.getAppointmentDate() + " " + endTime))){ + r.setIsCancel(false); + } } }); }); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml index 4270ac8b44..c76cdf619d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml @@ -67,5 +67,6 @@ AND ar.ORG_ID = #{orgId} AND ar.CREATED_BY = #{userId} AND ar.`STATUS` = 'appointing' + ORDER BY ar.APPOINTMENT_DATE \ No newline at end of file