From 6bf04d03aa5376062bc9bb77030f533b3d1b9aa9 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期五, 24 四月 2026 15:34:22 +0800
Subject: [PATCH] 修改打卡规则
---
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
index 59e347e..d2f37e4 100644
--- a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
+++ b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
@@ -27,6 +27,8 @@
import com.xiaopeng.maintenance.service.IXpCruiseCheckInRecordService;
import com.xiaopeng.maintenance.service.IXpCruiseCheckInRuleLocationService;
import com.xiaopeng.maintenance.service.IXpCruiseCheckInRuleService;
+import com.xiaopeng.maintenance.vo.CruiseCheckInLocationVo;
+import com.xiaopeng.maintenance.vo.XpCruiseCheckInRuleInfoVo;
import com.xiaopeng.maintenance.vo.XpCruiseCheckInRuleListPage;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -64,6 +66,8 @@
@Resource
private XpCruiseCheckInRuleOperationsUserMapper xpCruiseCheckInRuleOperationsUserMapper;
+
+
@Override
@@ -314,4 +318,29 @@
xpCruiseCheckInRuleOperationsUser.setOperationsUserId(relationId);
xpCruiseCheckInRuleOperationsUserMapper.insert(xpCruiseCheckInRuleOperationsUser);
}
+
+
+ /**
+ * 获取打卡规则详情
+ * @param id
+ * @return
+ */
+ @Override
+ public XpCruiseCheckInRuleInfoVo getXpCruiseCheckInRuleInfo(Integer id) {
+ XpCruiseCheckInRuleInfoVo info = new XpCruiseCheckInRuleInfoVo();
+ XpCruiseCheckInRule byId = this.getById(id);
+ BeanUtils.copyProperties(byId, info);
+ List<XpCruiseCheckInRuleLocation> list = xpCruiseCheckInRuleLocationService.list(new QueryWrapper<XpCruiseCheckInRuleLocation>().eq("cruise_check_in_rule_id", id));
+ List<XpCheckLocation> xpCheckLocations = xpCheckLocationService.listByIds(list.stream().map(XpCruiseCheckInRuleLocation::getCheckLocationId).collect(Collectors.toList()));
+ List<CruiseCheckInLocationVo> collect = list.stream().map(locationList -> {
+ CruiseCheckInLocationVo vo = new CruiseCheckInLocationVo();
+ vo.setAddress(xpCheckLocations.stream().filter(xpCheckLocation -> xpCheckLocation.getId().equals(locationList.getCheckLocationId())).findFirst().get().getLocationAddress());
+ vo.setCheckRange(xpCheckLocations.stream().filter(xpCheckLocation -> xpCheckLocation.getId().equals(locationList.getCheckLocationId())).findFirst().get().getLocationRange());
+ vo.setCheckTime(StringUtils.isNotEmpty(locationList.getStartTime()) ? locationList.getStartTime() + "~" + locationList.getEndTime() : "不限");
+ return vo;
+
+ }).collect(Collectors.toList());
+ info.setLocationList(collect);
+ return info;
+ }
}
--
Gitblit v1.7.1