From 649f2395f80c6e435b18cf6857b66ab7a8e95506 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 27 二月 2024 14:18:42 +0800
Subject: [PATCH] 整理
---
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java | 34 +++++++++++++++++++---------------
1 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
index 8a1521d..862ba48 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
@@ -684,7 +684,7 @@
private Member getMemberListParam(String cardno, Visits visits, List<Member> addList, List<Member> editList) {
if(!StringUtils.isNotBlank(visits.getCarNos())
-// &&!Constants.checkCarNo(visits.getCarNos())
+ &&Objects.isNull(Constants.getVehiclePlateNo(visits.getCarNos()))
){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "瀵逛笉璧凤紝杞︾墝鍙枫��"+visits.getCarNos()+"銆戜笉鍚堟硶锛岃鏍稿疄鍚庨噸璇晘");
}
@@ -730,7 +730,9 @@
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "瀵逛笉璧凤紝璇ヨ韩浠借瘉鍙疯绂佹璁块棶鐢宠锛屽鏈夌枒闂紝璇疯仈绯绘偍鐨勬嫓璁夸汉杩涜鏍稿疄");
}
//鏍告煡棰勭害鐢ㄦ埛鏄惁瀛樺湪鏈绂荤殑棰勭害璁板綍
- isExsitNoOutVisisRecord(member);
+
+// isExsitNoOutVisisRecord(member);
+
member.setFaceImg(visits.getFaceImg());
member.setImgurl(StringUtils.isNotBlank(visits.getImgurl())?visits.getImgurl():null);
member.setEditDate(visits.getCreateDate());
@@ -751,9 +753,10 @@
}
//鏍规嵁鎵嬫満鍙峰拰韬唤璇佸彿鐮佹煡璇� 褰撳墠棰勭害鐨勬椂闂存槸鍚︿笌鍏朵粬棰勭害璁板綍鏈夊啿绐�
if (visitsMapper.selectCount(new QueryWrapper<Visits>().lambda()
- .notIn(Visits::getStatus,Constants.VisitStatus.cancel,Constants.VisitStatus.cancel,Constants.VisitStatus.noPass,Constants.VisitStatus.xfFail)
- .and(ms -> ms.eq(Visits::getPhone, visits.getPhone())
- .or().eq(Visits::getIdcardDecode, Constants.getTuominStr(cardno)))
+ .notIn(Visits::getStatus,Constants.VisitStatus.cancel,Constants.VisitStatus.noPass,Constants.VisitStatus.xfFail)
+// .and(ms -> ms.eq(Visits::getPhone, visits.getPhone())
+// .or().eq(Visits::getIdcardDecode, Constants.getTuominStr(cardno)))
+ .eq(Visits::getIdcardDecode, Constants.getTuominStr(cardno))
.and(ms -> ms.apply(" visits.STARTTIME <= '" + DateUtil.DateToStr(visits.getStarttime(),"yyyy-MM-dd HH:mm:ss") + "' and visits.ENDTIME >= '" + DateUtil.DateToStr(visits.getStarttime(),"yyyy-MM-dd HH:mm:ss") + "' ")
.or().apply(" visits.STARTTIME <= '" + DateUtil.DateToStr(visits.getEndtime(),"yyyy-MM-dd HH:mm:ss") + "' and visits.ENDTIME >= '" + DateUtil.DateToStr(visits.getEndtime(),"yyyy-MM-dd HH:mm:ss") + "' ")
)) > Constants.ZERO) {
@@ -1017,7 +1020,7 @@
MPJLambdaWrapper<Visits> queryWrapper = new MPJLambdaWrapper<>();
queryWrapper.selectAll(Visits.class);
queryWrapper.selectAs(Member::getName,Visits::getReceptMemberName);
- queryWrapper.select("TIMESTAMPDIFF( MINUTE, NOW(), t.ENDTIME) AS timeOut");
+ queryWrapper.select("TIMESTAMPDIFF( MINUTE, NOW(), t.OUT_DATE) AS timeOut");
queryWrapper.selectAs(Member::getType,Visits::getMemberType);
queryWrapper.selectAs(Company::getName,Visits::getReceptMemberDepartment);
queryWrapper.leftJoin(Member.class,Member::getId,Visits::getReceptMemberId);
@@ -1026,7 +1029,7 @@
queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getLevelStatus()),Visits::getStatus,Constants.VisitStatus.signin);
- queryWrapper.apply(Objects.nonNull(pageWrap.getModel().getLevelStatus())," TIMESTAMPDIFF( MINUTE, NOW(), t.ENDTIME) <= "+code+" ");
+ queryWrapper.apply(Objects.nonNull(pageWrap.getModel().getLevelStatus())," TIMESTAMPDIFF( MINUTE, NOW(), t.OUT_DATE) <= "+code+" ");
queryWrapper.ne("m.type ",Constants.TWO);
queryWrapper.eq(Visits::getIsdeleted,Constants.ZERO);
@@ -1036,19 +1039,20 @@
.eq(StringUtils.isNotBlank(pageWrap.getModel().getIdcardNo()),Visits::getIdcardNo,StringUtils.isNotBlank(pageWrap.getModel().getIdcardNo()))
.eq(StringUtils.isNotBlank(pageWrap.getModel().getCompanyName()),Visits::getCompanyName,pageWrap.getModel().getCompanyName())
.eq(Objects.nonNull(pageWrap.getModel().getStatus()),Visits::getStatus,pageWrap.getModel().getStatus());
- queryWrapper.isNull(Visits::getOutDate);
+ queryWrapper.isNull(!Objects.nonNull(pageWrap.getModel().getLevelStatus()),Visits::getOutDate);
queryWrapper.orderByDesc(Visits::getEditDate);
IPage<Visits> result = visitsJoinMapper.selectJoinPage(page, Visits.class,queryWrapper);
if(result!=null&&result.getRecords()!=null){
result.getRecords().stream().forEach(s ->{
- if(s.getTimeOut()<=Integer.valueOf(code)&&s.getTimeOut()>=0){
- s.setOutStatus(Constants.TWO);
- }else if(s.getTimeOut()>Constants.ZERO){
- s.setOutStatus(Constants.ZERO);
- }else{
- s.setOutStatus(Constants.ONE);
+ if(s.getStatus().equals(Constants.VisitStatus.signin)){
+ if(s.getTimeOut()<=Integer.valueOf(code)&&s.getTimeOut()>=0){
+ s.setOutStatus(Constants.TWO);
+ }else if(s.getTimeOut()>Constants.ZERO){
+ s.setOutStatus(Constants.ZERO);
+ }else{
+ s.setOutStatus(Constants.ONE);
+ }
}
-
});
}
--
Gitblit v1.9.3