From 5c63d3fa13956182f999a02ebd291161cf1b32bc Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 03 一月 2025 18:22:42 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java | 181 +++++++++++++++++++++++++++++++++++----------
1 files changed, 141 insertions(+), 40 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 d1ca0f1..3549483 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
@@ -17,7 +17,11 @@
import com.doumee.core.tms.model.response.TmsBaseResponse;
import com.doumee.core.tms.model.response.TmsLockStatusQueryResponse;
import com.doumee.core.utils.*;
+import com.doumee.core.wx.wxPlat.WxPlatConstants;
+import com.doumee.core.wx.wxPlat.WxPlatNotice;
import com.doumee.dao.business.*;
+import com.doumee.dao.business.dao.MemberMapper;
+import com.doumee.dao.business.dao.SmsConfigMapper;
import com.doumee.dao.business.dao.SmsEmailMapper;
import com.doumee.dao.business.join.PlatformJobJoinMapper;
import com.doumee.dao.business.join.PlatformJoinMapper;
@@ -26,6 +30,7 @@
import com.doumee.dao.openapi.request.*;
import com.doumee.dao.openapi.response.*;
+import com.doumee.dao.system.SystemUserMapper;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.dao.web.reqeust.*;
import com.doumee.dao.web.response.DriverHomeVO;
@@ -46,6 +51,7 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
@@ -54,6 +60,7 @@
import java.math.RoundingMode;
import java.util.*;
import java.util.Date;
+import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
@@ -114,9 +121,17 @@
private EmayService emayService;
@Autowired
+ private RedisTemplate<String, Object> redisTemplate;
+ @Autowired
private PlatformBroadcastLogMapper platformBroadcastLogMapper;
@Autowired
private PlatformWarnEventServiceImpl platformWarnEventService;
+ @Autowired
+ private MemberMapper memberMapper;
+ @Autowired
+ private WxNoticeConfigMapper wxNoticeConfigMapper;
+ @Autowired
+ private SystemUserMapper systemUserMapper;
@Override
public Integer create(PlatformJob platformJob) {
@@ -321,6 +336,7 @@
.selectAs(Platform::getName,PlatformJob::getPlatformName)
.selectAs(Platform::getWorkRate,PlatformJob::getWorkRate)
.selectAs(PlatformWmsJob::getCarrierName,PlatformJob::getCarrierName)
+ .select(" case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end ioQty ")
.leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
.leftJoin(PlatformWmsJob.class,PlatformWmsJob::getCarryBillCode,PlatformJob::getBillCode)
.leftJoin(PlatformBooks.class,PlatformBooks::getJobId,PlatformJob::getId)
@@ -362,8 +378,9 @@
IPage<PlatformJob> platformJobIPage = platformJobJoinMapper.selectJoinPage(page,PlatformJob.class,queryWrapper);
platformJobIPage.getRecords().forEach(i->{
i.dealTime();
- this.getWmsJobData(i);
- this.queryWaitNum(i);
+ i.setTotalNum(i.getIoQty());
+// this.getWmsJobData(i);
+// this.queryWaitNum(i);
});
return PageData.from(platformJobIPage);
}
@@ -374,7 +391,6 @@
|| Constants.equalsInteger(platformJob.getType(),Constants.platformJobType.zyczh)
|| Constants.equalsInteger(platformJob.getType(),Constants.platformJobType.wxcxh)
|| Constants.equalsInteger(platformJob.getType(),Constants.platformJobType.wxczh)) {
-
PlatformWmsJob platformWmsJob = platformWmsJobMapper.selectOne(new QueryWrapper<PlatformWmsJob>().lambda()
.eq(PlatformWmsJob::getIsdeleted,Constants.ZERO)
.eq(PlatformWmsJob::getJobId,platformJob.getId())
@@ -406,11 +422,7 @@
}else{
platformJob.setLockStatus(Constants.ONE); //閮ㄥ垎涓婇攣
}
-
}
-
-
-
}
}
}
@@ -441,7 +453,8 @@
sumWorkRate = sumWorkRate.add(linePlatformJob.getTotalNum());
}
//璁$畻棰勮绛夊緟鏃堕棿
- List<Platform> platformList = platformJoinMapper.selectList(new QueryWrapper<Platform>().lambda().eq(Platform::getIsdeleted,Constants.ZERO).eq(Platform::getGroupId,platformJob.getPlatformGroupId()));
+ List<Platform> platformList = platformJoinMapper.selectList(new QueryWrapper<Platform>().lambda()
+ .eq(Platform::getIsdeleted,Constants.ZERO).eq(Platform::getGroupId,platformJob.getPlatformGroupId()));
BigDecimal workRate = platformList.stream().map(m->m.getWorkRate()).reduce(BigDecimal.ZERO,BigDecimal::add);
if(sumWorkRate.compareTo(BigDecimal.ZERO) > Constants.ZERO && workRate.compareTo(BigDecimal.ZERO) > Constants.ZERO ){
BigDecimal sumMinute = sumWorkRate.divide(workRate,1, RoundingMode.HALF_DOWN).multiply(BigDecimal.valueOf(60L));
@@ -503,6 +516,14 @@
.leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
.eq(PlatformJob::getDrivierPhone,loginUserInfo.getMobile())
+ .and(i->i.like(PlatformJob::getDoneDate,DateUtil.getCurrDate())
+ .or().in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CALL.getKey()
+ ,Constants.PlatformJobStatus.WAIT_CONFIRM.getKey(),
+ Constants.PlatformJobStatus.WART_SIGN_IN.getKey(),
+ Constants.PlatformJobStatus.IN_WAIT.getKey(),
+ Constants.PlatformJobStatus.CALLED.getKey(),
+ Constants.PlatformJobStatus.WORKING.getKey())
+ )
.orderByDesc(PlatformJob::getId)
);
for (PlatformJob platformJob:platformJobList) {
@@ -513,7 +534,6 @@
}
driverHomeVO.setPlatformJobList(platformJobList);
-
// 鍥尯瀵艰鍥� 鍥剧墖
driverHomeVO.setReservationMap(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.PLATFORM_GUIDEMAP).getCode());
// 棰勭害鎸囧崡 鏂囨湰
@@ -646,11 +666,11 @@
}
public void sceneSignIn(SignInDTO signInDTO){
-
if( StringUtils.isNotBlank(signInDTO.getQrCodeKey())){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- if(!signInDTO.getQrCodeKey().equals(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_QRCODE).getCode())){
+ if(!signInDTO.getQrCodeKey().equals(
+ systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_QRCODE_PREFIX).getCode() + systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_QRCODE).getCode())){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"浜岀淮鐮佸凡杩囨湡,璇峰埛鏂伴噸璇�");
}
}
@@ -695,7 +715,7 @@
}
}
platformJob.dealTime();
- this.getWorkTime(platformJob);
+ this.getWorkTime(platformJob,platformLogMapper);
this.getWmsJobData(platformJob);
return platformJob;
}
@@ -723,6 +743,7 @@
,PlatformJob::getId,lineUpDetailDTO.getJobId())
.in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CALL.getKey(),
Constants.PlatformJobStatus.IN_WAIT.getKey(),
+ Constants.PlatformJobStatus.WORKING.getKey(),
Constants.PlatformJobStatus.CALLED.getKey())
.orderByDesc(PlatformJob::getStatus)
.orderByAsc(PlatformJob::getSignDate)
@@ -777,7 +798,7 @@
* 鑾峰彇宸蹭綔涓氭椂闂�
* @param platformJob
*/
- public Long getWorkTime(PlatformJob platformJob){
+ public static Long getWorkTime(PlatformJob platformJob,PlatformLogMapper platformLogMapper){
List<PlatformLog> platformLogList = platformLogMapper.selectList(new QueryWrapper<PlatformLog>()
.lambda().eq(PlatformLog::getIsdeleted,Constants.ZERO)
.eq(PlatformLog::getJobId,platformJob.getId())
@@ -800,7 +821,7 @@
.last(" limit 1 ")
);
if(Objects.nonNull(lastBeginPlatform)){
- String v = Long.toString(System.currentTimeMillis() - lastBeginPlatform.getCreateDate().getTime() / 1000) ;
+ String v = Long.toString((System.currentTimeMillis() - lastBeginPlatform.getCreateDate().getTime() )/ 1000) ;
optTime = optTime + Long.valueOf(v);
}
}
@@ -861,9 +882,42 @@
emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(),
SmsConstants.platformJobContent.platformJobCallIn,null,null
);
-
+
+ //鍏紬鍙锋ā鏉挎秷鎭�
+ if(Objects.nonNull(platformJob.getDriverId())) {
+ this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobCallIn,platformJob);
+ }
return platformJob;
}
+
+ public void sendWxNotice(String objCode,PlatformJob platformJob){
+ SystemUser driver = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda()
+ .eq(SystemUser::getDeleted, Constants.ZERO)
+ .eq(SystemUser::getType, Constants.ZERO)
+ .eq(SystemUser::getMobile,platformJob.getDrivierPhone())
+ .last(" limit 1 "));
+ if (Objects.nonNull(driver) && StringUtils.isNotBlank(driver.getOpenid())) {
+ PlatformJob p = platformJobJoinMapper.selectJoinOne(PlatformJob.class,
+ new MPJLambdaWrapper<PlatformJob>()
+ .selectAll(PlatformJob.class)
+ .selectAs(Platform::getName,PlatformJob::getPlatformName)
+ .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
+ .eq(PlatformJob::getId,platformJob.getId())
+ .last(" limit 1")
+ );
+
+ WxPlatNotice wxPlatNotice = new WxPlatNotice();
+ wxPlatNotice.sendPlatformJobTemplateNotice(systemDictDataBiz,
+ wxNoticeConfigMapper, p,
+ objCode,
+ systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
+ Arrays.asList(driver.getOpenid().split(","))
+ );
+ }
+ }
+
+
+
private Logger logger = LoggerFactory.getLogger(PlatformJobServiceImpl.class);
@@ -966,6 +1020,7 @@
public void cancelInPark(PlatformJob platformJob){
if(Constants.equalsInteger(platformJob.getType(),Constants.TWO)
|| Constants.equalsInteger(platformJob.getType(),Constants.THREE)
+ || StringUtils.isBlank(platformJob.getCarCodeFront())
|| Constants.equalsInteger(platformJob.getType(),Constants.FOUR)){
List<VisitPark> visitParkList = visitParkMapper.selectList(new QueryWrapper<VisitPark>().lambda()
@@ -1057,6 +1112,12 @@
emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(),
SmsConstants.platformJobContent.platformJobSingIn,platform.getName(),null
);
+
+ //鍏紬鍙锋ā鏉挎秷鎭�
+ if(Objects.nonNull(platformJob.getDriverId())){
+ this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobSingIn,platformJob);
+ }
+
//骞挎挱 led閫氱煡
platformJob.setPlatformName(platform.getName());
@@ -1188,6 +1249,11 @@
SmsConstants.platformJobContent.platformJobMove,oldPlatform.getName(),platform.getName()
);
+ //鍏紬鍙锋ā鏉挎秷鎭�
+ if(Objects.nonNull(platformJob.getDriverId())) {
+ this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobMove,platformJob);
+ }
+
platformJob.setPlatformName(oldPlatform.getName());
platformJob.setPlatformId(oldPlatform.getId());
this.broadcastAndLEed(platformJob, StringUtils.isBlank(oldPlatform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():oldPlatform.getLedContent(),
@@ -1216,7 +1282,7 @@
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧�,涓氬姟鐘舵�佸凡娴佽浆锛�");
}
- Platform platform = platformJoinMapper.selectById(jobOperateDTO.getPlatformId());
+ Platform platform = platformJoinMapper.selectById(platformJob.getPlatformId());
if(Objects.isNull(platform)){
throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌鏈堝彴淇℃伅");
}
@@ -1235,6 +1301,12 @@
emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(),
SmsConstants.platformJobContent.platformJobOverNum,null,null
);
+
+ //鍏紬鍙锋ā鏉挎秷鎭�
+ if(Objects.nonNull(platformJob.getDriverId())){
+ this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobOverNum,platformJob);
+ }
+
platformJob.setPlatformName(platform.getName());
this.broadcastAndLEed(platformJob, StringUtils.isBlank(platform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():platform.getLedContent(),
null
@@ -1281,6 +1353,11 @@
emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(),
SmsConstants.platformJobContent.platformJobError,platform.getName(),null
);
+
+ //鍏紬鍙锋ā鏉挎秷鎭�
+ if(Objects.nonNull(platformJob.getDriverId())) {
+ this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobError,platformJob);
+ }
platformJob.setPlatformName(platform.getName());
this.broadcastAndLEed(platformJob, StringUtils.isBlank(platform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():platform.getLedContent(),
@@ -1331,7 +1408,10 @@
emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(),
SmsConstants.platformJobContent.platformJobWorking,platform.getName(),null
);
-
+ //鍏紬鍙锋ā鏉挎秷鎭�
+ if(Objects.nonNull(platformJob.getDriverId())) {
+ this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobWorking,platformJob);
+ }
//骞挎挱 led閫氱煡
platformJob.setPlatformName(platform.getName());
this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.WORKING.getInfo(),
@@ -1340,11 +1420,22 @@
return platformJob;
}
-
-
- /**
- * 瀹屾垚浣滀笟
- */
+
+ @Override
+ public PlatformJob getLastWaitJob(String uuid, LoginUserInfo loginUser){
+ String u = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.BIGSCREEN_UUID);
+ if(!StringUtils.equals(u,uuid)){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝浜岀淮鐮佸凡澶辨晥锛�");
+ }
+ PlatformJob platformJob = platformJobMapper.selectOne(new QueryWrapper<PlatformJob>().lambda()
+ .eq(PlatformJob::getDrivierPhone,loginUser.getMobile())
+ .eq(PlatformJob::getIsdeleted,Constants.ZERO)
+ .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.WART_SIGN_IN.getKey())
+ .orderByDesc(PlatformJob::getCreateDate)
+ .last(" limit 1 ") );
+ return platformJob;
+ }
+
@Override
@Transactional(rollbackFor = {Exception.class,BusinessException.class})
public PlatformJob finishWork(JobOperateDTO jobOperateDTO){
@@ -1416,6 +1507,12 @@
emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(),
SmsConstants.platformJobContent.platformJobFinish,platform.getName(),null
);
+
+ //鍏紬鍙锋ā鏉挎秷鎭�
+ if(Objects.nonNull(platformJob.getDriverId())) {
+ this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobFinish,platformJob);
+ }
+
//骞挎挱 led閫氱煡
platformJob.setPlatformName(platform.getName());
this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.DONE.getInfo(),
@@ -1685,10 +1782,11 @@
@Override
public PlatformWorkVO getPlatformWorkVOById(Integer platformId){
//鑾峰彇鏈堝彴涓嬬殑鎵�鏈変綔涓氭暟鎹�
- List<PlatformJob> platformJobList = platformJobJoinMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>()
+ List<PlatformJob> allPlatformJobList = platformJobJoinMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>()
.selectAll(PlatformJob.class)
- .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 5 order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
- .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 4 order by pl.CREATE_DATE desc limit 1 ) as newCallDate ")
+ .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.WORKING.getKey()+" order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
+ .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.CALLED.getKey()+" order by pl.CREATE_DATE desc limit 1 ) as newCallDate ")
+ .select(" case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end ioQty ")
.selectAs(Platform::getName,PlatformJob::getPlatformName)
.selectAs(Platform::getWorkRate,PlatformJob::getWorkRate)
.selectAs(PlatformWmsJob::getCarrierName,PlatformJob::getCarrierName)
@@ -1708,13 +1806,13 @@
)
.orderByDesc(PlatformJob::getId)
);
- for (PlatformJob platformJob:platformJobList) {
- //澶勭悊WSM鏁伴噺
- this.getWmsJobData(platformJob);
- //鏌ヨ鍓嶆柟鎺掗槦鏁伴噺
- this.queryWaitNum(platformJob);
- }
- PlatformWorkVO platformWorkVO = PlatformGroupServiceImpl.getPlatformWorkVO(platformJoinMapper.selectById(platformId),platformJobList);
+// List<PlatformJob> platformJobList = allPlatformJobList.stream().filter(i->Constants.equalsInteger(i.getPlatformId(),platformId)).collect(Collectors.toList());
+// for (PlatformJob platformJob:platformJobList) {
+// platformJob.setTotalNum(platformJob.getIoQty());
+// //鏌ヨ鍓嶆柟鎺掗槦鏁伴噺
+// this.queryWaitNum(platformJob);
+// }
+ PlatformWorkVO platformWorkVO = PlatformGroupServiceImpl.getPlatformWorkVO(platformJoinMapper.selectById(platformId),allPlatformJobList);
return platformWorkVO;
}
@@ -1766,8 +1864,8 @@
.selectAs(Platform::getWorkRate, PlatformJob::getWorkRate)
.selectAs(Platform::getName, PlatformJob::getPlatformName)
.select(" case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end workNum ")
- .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 5 order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
- .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 4 order by pl.CREATE_DATE desc limit 1 ) as newCallDate ")
+ .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.WORKING.getKey()+" order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
+ .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.CALLED.getKey()+" order by pl.CREATE_DATE desc limit 1 ) as newCallDate ")
.leftJoin(Platform.class, Platform::getId, PlatformJob::getPlatformId)
.eq(PlatformJob::getStatus, Constants.PlatformJobStatus.WORKING.getKey())
.eq(PlatformJob::getPlatformId, platform.getId())
@@ -1967,8 +2065,8 @@
.selectAs(Platform::getName,PlatformJob::getPlatformName)
.selectAs(PlatformGroup::getWaitCallTime,PlatformJob::getWorktimeOutAlarmTime)
.select(" case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end workNum ")
- .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 5 order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
- .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 4 order by pl.CREATE_DATE desc limit 1 ) as newCallDate ")
+ .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.WORKING.getKey()+" order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
+ .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.CALLED.getKey()+" order by pl.CREATE_DATE desc limit 1 ) as newCallDate ")
.leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
.leftJoin(PlatformGroup.class,PlatformGroup::getId,Platform::getGroupId)
.eq(PlatformJob::getIsdeleted,Constants.ZERO)
@@ -2002,7 +2100,11 @@
List<PlatformJob> calledList = platformJobList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())).collect(Collectors.toList());
largeScreenDataVO.setWaitWorkList(calledList);
}
- largeScreenDataVO.setQrCode(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_QRCODE).getCode());
+ String u = UUID.randomUUID().toString();
+ redisTemplate.opsForValue().set(Constants.RedisKeys.BIGSCREEN_UUID,u,3, TimeUnit.MINUTES);
+ String url = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(),Constants.WxUrlParams.BISCREEN_CODE,u);
+ largeScreenDataVO.setQrCode(url);
+ largeScreenDataVO.setAttention(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_ATTENTION).getCode());
return largeScreenDataVO;
}
@@ -2052,7 +2154,7 @@
List<PlatformJob> platformJobList = platformJobJoinMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>()
.selectAll(PlatformJob.class)
.selectAs(Platform::getName,PlatformJob::getPlatformName)
- .select(" ( now() >= DATE_ADD( ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 4 " +
+ .select(" ( now() >= DATE_ADD( ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.CALLED.getKey()+" " +
"order by pl.CREATE_DATE desc limit 1 ) ,INTERVAL t2.WAIT_CALL_TIME MINUTE) ) as isTimeOut ")
.leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
.leftJoin(PlatformGroup.class,PlatformGroup::getId,Platform::getGroupId)
@@ -2084,7 +2186,7 @@
.selectAs(Platform::getWorkRate, PlatformJob::getWorkRate)
.selectAs(Platform::getWorkTimeoutAlarmTime, PlatformJob::getWorktimeOutAlarmTime)
.select(" case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end workNum ")
- .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = 5 order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
+ .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.WORKING.getKey()+" order by pl.CREATE_DATE desc limit 1 ) as newStartDate ")
.leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
.eq(PlatformJob::getStatus,Constants.PlatformJobStatus.WORKING.getKey())
.eq(PlatformJob::getInOut,Constants.ONE)
@@ -2109,7 +2211,6 @@
}
}
-
--
Gitblit v1.9.3