Merge pull request 'master' (#13) from master into prod
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 18m50s
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 18m50s
合并分支
This commit is contained in:
@@ -29,10 +29,11 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.DayOfWeek;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.TemporalAdjusters;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -176,15 +177,16 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
|
||||
@Override
|
||||
public List<MeetBookingWeekVo> appointmentIdList(String meetId) {
|
||||
// 计算当前周的起止时间
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date());
|
||||
// 设置为周一
|
||||
calendar.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
|
||||
Date startOfWeek = calendar.getTime();
|
||||
// 加6天变为周日
|
||||
calendar.add(Calendar.DAY_OF_MONTH, 6);
|
||||
Date endOfWeek = calendar.getTime();
|
||||
// 获取本周一00:00:00
|
||||
LocalDateTime startOfWeek = LocalDate.now()
|
||||
.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY))
|
||||
.atStartOfDay();
|
||||
|
||||
// 获取本周日23:59:59
|
||||
LocalDateTime endOfWeek = LocalDate.now()
|
||||
.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY))
|
||||
.atTime(23, 59, 59, 999000000);
|
||||
|
||||
// 构建查询条件
|
||||
LambdaQueryWrapper<MeetBooking> bookingLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
bookingLambdaQueryWrapper.eq(MeetBooking::getMeetId, meetId)
|
||||
@@ -196,7 +198,6 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<MeetBookingWeekVo> meetBookingWeekVoList = BeanUtil.copyToList(meetBookingVoList, MeetBookingWeekVo.class);
|
||||
String[] weekStr = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
|
||||
List<MeetBookingWeekVo> meetBookingWeekList = new ArrayList<>();
|
||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
|
||||
@@ -211,14 +212,9 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
}
|
||||
if (CollUtil.isNotEmpty(remoteUserVos)) {
|
||||
ResidentPersonVo residentPersonVo = remoteUserVos.stream()
|
||||
.filter(vo -> vo.getUserId() != null && String.valueOf(vo.getUserId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getUserName() : null);
|
||||
}
|
||||
//设置指定的Date对象不设置默认返回当天的星期
|
||||
calendar.setTime(s.getScheduledStarttime());
|
||||
//获取当前时间的星期
|
||||
int firstDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
|
||||
s.setWeek(weekStr[firstDayOfWeek - 1]);
|
||||
String str = df.format(s.getScheduledStarttime());
|
||||
int a = Integer.parseInt(str);
|
||||
s.setSlots(a <= 12 ? "上午" : "下午");
|
||||
|
@@ -195,7 +195,7 @@ public class RemoteSisAuthServiceImpl implements RemoteSisAuthService {
|
||||
ApiResp<String> imgResult = e8PlatformApi.uploadFace(imgByte);
|
||||
Assert.isTrue(imgResult.getSuccess(), "图片上传E8平台失败:" + imgResult.getMessage() + "--" + person.getName() + "----" + person.getId());
|
||||
log.info("e8平台上传照片完成");
|
||||
String e8ImgUrl = imgResult.getResult();
|
||||
String e8ImgUrl = imgResult.getMessage();
|
||||
count++; // 图片上传完成步进器+1
|
||||
|
||||
log.info("e8同步新建人员");
|
||||
|
@@ -1,7 +1,6 @@
|
||||
package org.dromara.sis.dubbo;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
@@ -51,8 +50,9 @@ public class RemoteVisitorServiceImpl implements RemoteVisitorService {
|
||||
|
||||
byte[] zipByte = imageUtil.compressImageToRequirements(imgByte);
|
||||
|
||||
imgUrl = e8PlatformApi.uploadFace(zipByte).getResult();
|
||||
Assert.notNull(imgUrl, "e8平台上传访客照片失败");
|
||||
ApiResp<String> imgUrlRes = e8PlatformApi.uploadFace(zipByte);
|
||||
Assert.isTrue(imgUrlRes.getSuccess(), imgUrlRes.getMessage());
|
||||
imgUrl = imgUrlRes.getMessage();
|
||||
}
|
||||
VisitorAddReq req = new VisitorAddReq();
|
||||
req.setVisitorName(visitor.getVisitorName());
|
||||
@@ -61,12 +61,11 @@ public class RemoteVisitorServiceImpl implements RemoteVisitorService {
|
||||
req.setVisitorStartTime(visitor.getVisitorStartTime());
|
||||
req.setVistorEndTime(visitor.getVistorEndTime());
|
||||
req.setVisitorFaceImg(imgUrl);
|
||||
ApiResp res = e8PlatformApi.addVisitor(req);
|
||||
Assert.notNull(res, "e8平台新增访客登记失败");
|
||||
ApiResp<VisitorAddRes> res = e8PlatformApi.addVisitor(req);
|
||||
Assert.isTrue(res.getSuccess(), res.getMessage());
|
||||
|
||||
return res.getCode() == 0
|
||||
? Map.of("code", 200, "data",
|
||||
JSONUtil.toBean(JSONUtil.toJsonStr(res.getResult()), VisitorAddRes.class).getId())
|
||||
? Map.of("code", 200, "data", res.getResult().getId())
|
||||
: Map.of("code", 500, "data", res.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.info(e.getMessage());
|
||||
|
Reference in New Issue
Block a user