From e36c1e2363e36a69a3cc8ccbc00d28b16f926abd Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 07 十一月 2024 14:38:57 +0800
Subject: [PATCH] 序号表操作
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceServiceImpl.java | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceServiceImpl.java
index 4216715..d99ebbd 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceServiceImpl.java
@@ -4,6 +4,8 @@
import cn.lihu.jh.module.ecg.dal.dataobject.checktype.CheckTypeDO;
import cn.lihu.jh.module.ecg.dal.mysql.checktype.CheckTypeMapper;
import cn.lihu.jh.module.infra.api.config.ConfigApi;
+import cn.lihu.jh.module.system.api.dict.DictDataApi;
+import cn.lihu.jh.module.system.api.dict.dto.DictDataRespDTO;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
@@ -35,6 +37,9 @@
@Resource
private ConfigApi configApi;
+
+ @Resource
+ private DictDataApi dictDataApi;
@Resource
private QueueSequenceMapper queueSequenceMapper;
@@ -90,17 +95,21 @@
// 璇诲彇鏃舵閰嶇疆
String strBookTimeslotLength = configApi.getConfigValueByKey(BOOK_TIMESLOT_LENGTH);
- String strBookTimeslotList = configApi.getConfigValueByKey(BOOK_TIMESLOT_LIST);
+
+ // 鏂规1锛氶厤缃腑鍙� 7:30,8:30,9:30,10:30,11:30,12:30,13:30,14:30,15:30
+ //String strBookTimeslotList = configApi.getConfigValueByKey(BOOK_TIMESLOT_LIST);
+ //List<LocalTime> timeslotList = Utils.parseTimeSlotList(strBookTimeslotList, Integer.valueOf(strBookTimeslotLength));
+
+ List<DictDataRespDTO> dictBookTimeslotList = dictDataApi.getDictDataList(ECG_BOOK_TIMESLOT);
// 璇诲彇鎵�鏈夌殑妫�鏌ョ被鍨�
List<CheckTypeDO> checkTypeDOList = checkTypeMapper.simpleCheckTypeList();
checkTypeDOList.forEach( checkTypeDO -> {
- List<LocalTime> timeslotList = Utils.parseTimeSlotList(strBookTimeslotList, Integer.valueOf(strBookTimeslotLength));
- for (int i=0; i < timeslotList.size(); i++) {
- LocalTime timeslot = timeslotList.get(i);
+
+ for (int i=0; i < dictBookTimeslotList.size(); i++) {
QueueSequenceDO queueSequenceDO = new QueueSequenceDO();
queueSequenceDO.setCheckType( checkTypeDO.getValue() );
- queueSequenceDO.setTimeSlot( timeslot.getHour()*100 + timeslot.getMinute() );
+ queueSequenceDO.setTimeSlot( Integer.valueOf(dictBookTimeslotList.get(i).getValue()) );
queueSequenceDO.setQueueNo( i * checkTypeDO.getTimeslotBookNum() + checkTypeDO.getTimeslotReservedNum());
queueSequenceDO.setQueueVipNo( i * checkTypeDO.getTimeslotBookNum());
queueSequenceDO.setQueueFull( i * checkTypeDO.getTimeslotBookNum() + checkTypeDO.getTimeslotBookNum());
--
Gitblit v1.9.3