From f4af3160d181e9e4f9a0d26ecafd8794738b26c8 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 24 九月 2024 09:28:22 +0800
Subject: [PATCH] 代码初始化
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java | 36 ++++++++++++++++++++++++++----------
1 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
index 0432147..af60a31 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -239,8 +239,8 @@
.eq(pageWrap.getModel().getPlatformGroupId() != null, PlatformJob::getPlatformGroupId, pageWrap.getModel().getPlatformGroupId())
.apply(pageWrap.getModel().getQueryStatus() != null, " find_in_set(t.`STATUS`,'"+pageWrap.getModel().getQueryStatus()+"')")
- .ge(pageWrap.getModel().getBeginWorkDateStart() != null, PlatformJob::getStartDate, Utils.Date.getStart(pageWrap.getModel().getBeginWorkDateStart()))
- .le(pageWrap.getModel().getBeginWorkDateEnd() != null, PlatformJob::getStartDate, Utils.Date.getEnd(pageWrap.getModel().getBeginWorkDateEnd()))
+ .ge(pageWrap.getModel().getBeginWorkDateStart() != null, PlatformJob::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getBeginWorkDateStart()))
+ .le(pageWrap.getModel().getBeginWorkDateEnd() != null, PlatformJob::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getBeginWorkDateEnd()))
.eq(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ONE,pageWrap.getModel().getJobType()), PlatformJob::getType, Constants.platformJobType.sgscxh)
.ne(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ZERO,pageWrap.getModel().getJobType()), PlatformJob::getType, Constants.platformJobType.sgscxh)
;
@@ -373,7 +373,8 @@
}else{
platformJob.setWaitTime("绛夊緟鍙彿");
}
- }else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){
+ }else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())
+ || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){
//鏌ヨ鏈�鍚庡紑濮嬩换鍔$殑鏈堝彴璁板綍 鏃ュ織琛� 鍥犱负瀛樺湪寮傚父鎸傝捣 杞Щ 绛夐棶棰�
PlatformLog platformLog = platformLogMapper.selectOne(new QueryWrapper<PlatformLog>().lambda()
.eq(PlatformLog::getJobId,platformJob.getId())
@@ -416,7 +417,7 @@
.leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.eq(PlatformJob::getDrivierPhone,loginUserInfo.getMobile())
- .like(PlatformJob::getArriveDate,DateUtil.getCurrDate())
+// .like(PlatformJob::getArriveDate,DateUtil.getCurrDate())
.orderByDesc(PlatformJob::getId)
);
for (PlatformJob platformJob:platformJobList) {
@@ -462,8 +463,9 @@
PlatformJob oldPlatformJob = new PlatformJob();
BeanUtils.copyProperties(platformJob,oldPlatformJob);
-
+ platformJob.setConfirmTaskDate(new Date());
platformJob.setArriveDate(confirmTaskDTO.getArriveDate());
+ platformJob.setCarCodeBack(confirmTaskDTO.getCarCodeBack());
platformJob.setStatus(Constants.PlatformJobStatus.WART_SIGN_IN.getKey());
platformJob.setEditDate(new Date());
platformJobMapper.updateById(platformJob);
@@ -488,19 +490,31 @@
if(Objects.isNull(platformJob)){
throw new BusinessException(ResponseStatus.DATA_EMPTY);
}
- if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓氬姟鐘舵�佸凡娴佽浆锛岃鍒锋柊鏌ョ湅");
- }
+
PlatformJob oldPlatformJob = new PlatformJob();
BeanUtils.copyProperties(platformJob,oldPlatformJob);
if(Constants.equalsInteger(signInDTO.getSignType(),Constants.ZERO)){
+ if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓氬姟鐘舵�佸凡娴佽浆锛岃鍒锋柊鏌ョ湅");
+ }
this.distanceSignIn(signInDTO,platformJob);
}else if(Constants.equalsInteger(signInDTO.getSignType(),Constants.ONE)){
+ if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓氬姟鐘舵�佸凡娴佽浆锛岃鍒锋柊鏌ョ湅");
+ }
this.sceneSignIn(signInDTO);
+ }else if(Constants.equalsInteger(signInDTO.getSignType(),Constants.TWO)){
+ if(!(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey())||
+ Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey()))
+ ){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"涓氬姟鐘舵�佸凡娴佽浆锛岃鍒锋柊鏌ョ湅");
+ }
+ }else{
+ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"绛惧埌绫诲瀷閿欒");
}
platformJob.setSignDate(new Date());
- platformJob.setSingType(Constants.ZERO);
+ platformJob.setSingType(signInDTO.getSignType());
platformJob.setStatus(Constants.PlatformJobStatus.WAIT_CALL.getKey());
platformJobMapper.updateById(platformJob);
//瀛樺偍鎿嶄綔鏃ュ織
@@ -508,12 +522,12 @@
Constants.PlatformJobLogType.SIGN.getInfo());
}
-
public void distanceSignIn(SignInDTO signInDTO , PlatformJob platformJob){
if(Objects.isNull(signInDTO.getLat())
|| Objects.isNull(signInDTO.getLnt())){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"缁忕含搴︿俊鎭紓甯�");
}
+
//鑾峰彇绛惧埌鐐圭殑缁忕含搴�
Double lat = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LAT).getCode());
Double lnt = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LNT).getCode());
@@ -529,6 +543,7 @@
}
public void sceneSignIn(SignInDTO signInDTO){
+
if( StringUtils.isNotBlank(signInDTO.getQrCodeKey())){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
@@ -716,6 +731,7 @@
|| Constants.equalsInteger(platformJob.getType(),Constants.FOUR)){
//TODO 涓嬪彂鍏ュ洯鏉冮檺
+
}
//瀛樺偍鎿嶄綔鏃ュ織
savePlatformLog(Constants.PlatformJobLogType.IN_WAIT.getKey(),oldPlatformJob,platformJob,
--
Gitblit v1.9.3