|
@@ -1,7 +1,6 @@
|
|
|
package com.tofly.dyrq.custom.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
-import com.sun.tools.sjavac.Log;
|
|
|
import com.tofly.common.core.util.Date8Util;
|
|
|
import com.tofly.dyrq.custom.entity.UpdatePoint;
|
|
|
import com.tofly.dyrq.custom.mapper.CustomPlanMapper;
|
|
@@ -17,6 +16,7 @@ import com.tofly.dyrq.service.SysDeviceTypeService;
|
|
|
import com.tofly.dyrq.service.TfPlanPathTempService;
|
|
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -29,6 +29,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
@AllArgsConstructor
|
|
|
+@Slf4j
|
|
|
public class CustomPointServiceImpl implements CustomPointService {
|
|
|
private CustomPointMapper customPointMapper;
|
|
|
private PlanPointTempService planPointTempService;
|
|
@@ -44,7 +45,7 @@ public class CustomPointServiceImpl implements CustomPointService {
|
|
|
List<Long> childList = new ArrayList<>();
|
|
|
HashSet<Long> childIds = new HashSet();
|
|
|
|
|
|
- Log.warn("#############################1");
|
|
|
+ log.info("#############################1");
|
|
|
for (UpdatePoint u : updatePoints) {
|
|
|
if (u.getTempId() != null && u.getCheckTime() != null && u.getGpsSpeed() != null) {
|
|
|
if ("0".equals(u.getType())) {
|
|
@@ -53,7 +54,7 @@ public class CustomPointServiceImpl implements CustomPointService {
|
|
|
transfer.put("pointTempId", u.getTempId());
|
|
|
continue;
|
|
|
}
|
|
|
- Log.warn("#############################2");
|
|
|
+ log.info("#############################2");
|
|
|
planPointTempService.update(Wrappers.<PlanPointTemp>lambdaUpdate()
|
|
|
.set(PlanPointTemp::getIsover, "1")
|
|
|
.set(PlanPointTemp::getOverDate, u.getCheckTime())
|
|
@@ -69,7 +70,7 @@ public class CustomPointServiceImpl implements CustomPointService {
|
|
|
childList.add(u.getPlanChildId());
|
|
|
}
|
|
|
}
|
|
|
- Log.warn("#############################3");
|
|
|
+ log.info("#############################3");
|
|
|
planPathTempService.update(Wrappers.<TfPlanPathTemp>lambdaUpdate()
|
|
|
.set(TfPlanPathTemp::getIsover, "1")
|
|
|
.set(TfPlanPathTemp::getOverDate, u.getCheckTime())
|
|
@@ -77,17 +78,17 @@ public class CustomPointServiceImpl implements CustomPointService {
|
|
|
.eq(TfPlanPathTemp::getId, u.getTempId()));
|
|
|
|
|
|
Long pointTempId =planPathTempService.getById(u.getTempId()).getTempId();
|
|
|
- Log.warn("#############################4");
|
|
|
+ log.info("#############################4");
|
|
|
int isOverNum = planPathTempService.count(Wrappers.<TfPlanPathTemp>lambdaQuery().eq(TfPlanPathTemp::getTempId, pointTempId).eq(TfPlanPathTemp::getIsover, "1"));
|
|
|
int allNum = planPathTempService.count(Wrappers.<TfPlanPathTemp>lambdaQuery().eq(TfPlanPathTemp::getTempId, pointTempId));
|
|
|
- Log.warn("#############################5");
|
|
|
+ log.info("#############################5");
|
|
|
double pathOver = new BigDecimal((float) isOverNum / allNum).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
|
- Log.warn("#############################6");
|
|
|
+ log.info("#############################6");
|
|
|
PlanPointTemp one = new PlanPointTemp();
|
|
|
one.setId(pointTempId);
|
|
|
one.setPathIsover(new BigDecimal(pathOver));
|
|
|
planPointTempService.updateById(one);
|
|
|
- Log.warn("#############################7");
|
|
|
+ log.info("#############################7");
|
|
|
}
|
|
|
}
|
|
|
childIds.add(u.getPlanChildId());
|
|
@@ -119,7 +120,7 @@ public class CustomPointServiceImpl implements CustomPointService {
|
|
|
@Override
|
|
|
public void percentUpdate(String childPlanIds) {
|
|
|
List<String> list = Arrays.asList(childPlanIds.split(","));
|
|
|
- Log.warn("#############################8");
|
|
|
+ log.info("#############################8");
|
|
|
for (String sid : list) {
|
|
|
Long childPlanId = Long.parseLong(sid);
|
|
|
Date now = Date8Util.getCurrentDate();
|