瀏覽代碼

日志打印

13408401276 3 年之前
父節點
當前提交
81597a79ff

+ 2 - 0
src/main/java/com/tofly/dyrq/custom/controller/CustomPointController.java

@@ -1,6 +1,7 @@
 package com.tofly.dyrq.custom.controller;
 
 import com.alibaba.fastjson.JSON;
+import com.sun.tools.sjavac.Log;
 import com.tofly.common.core.entity.ResultRespone;
 import com.tofly.common.log.annotation.ToFlyAppLog;
 import com.tofly.dyrq.custom.entity.PointList;
@@ -29,6 +30,7 @@ public class CustomPointController {
     @ToFlyAppLog(title="更新点到位或线所属点的到位状态")
     public ResultRespone updatePointIsover(@RequestBody PointList pointList) {
         Map<String,Long> tempIds = customPointService.updatePointOrPathIsover(pointList.getUpdatePointList());
+        Log.warn("#############################5");
         return tempIds.size() > 0 ? ResultRespone.success(tempIds) : ResultRespone.success("更新成功");
     }
 

+ 4 - 8
src/main/java/com/tofly/dyrq/custom/service/impl/CustomPointServiceImpl.java

@@ -44,7 +44,6 @@ public class CustomPointServiceImpl implements CustomPointService {
         List<Long> childList = new ArrayList<>();
         HashSet<Long> childIds = new HashSet();
         
-        Log.warn("#############################1");
         for (UpdatePoint u : updatePoints) {
             if (u.getTempId() != null && u.getCheckTime() != null && u.getGpsSpeed() != null) {
                 if ("0".equals(u.getType())) {
@@ -53,7 +52,6 @@ public class CustomPointServiceImpl implements CustomPointService {
                         transfer.put("pointTempId", u.getTempId());
                         continue;
                     }
-                    Log.warn("#############################2");
                     planPointTempService.update(Wrappers.<PlanPointTemp>lambdaUpdate()
                             .set(PlanPointTemp::getIsover, "1")
                             .set(PlanPointTemp::getOverDate, u.getCheckTime())
@@ -69,7 +67,6 @@ public class CustomPointServiceImpl implements CustomPointService {
                             childList.add(u.getPlanChildId());
                         }
                     }
-                    Log.warn("#############################3");
                     planPathTempService.update(Wrappers.<TfPlanPathTemp>lambdaUpdate()
                             .set(TfPlanPathTemp::getIsover, "1")
                             .set(TfPlanPathTemp::getOverDate, u.getCheckTime())
@@ -77,21 +74,18 @@ public class CustomPointServiceImpl implements CustomPointService {
                             .eq(TfPlanPathTemp::getId, u.getTempId()));
                     //更新完成点所属线的完成率
                     Long pointTempId =planPathTempService.getById(u.getTempId()).getTempId();
-                    Log.warn("#############################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");
                     double pathOver = new BigDecimal((float) isOverNum / allNum).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
-                    Log.warn("#############################6");
                     PlanPointTemp one = new PlanPointTemp();
                     one.setId(pointTempId);
                     one.setPathIsover(new BigDecimal(pathOver));
                     planPointTempService.updateById(one);
-                    Log.warn("#############################7");
                 }
             }
             childIds.add(u.getPlanChildId());
         }
+        Log.warn("#############################1");
         //批量更新所有计划点,线完成率
         ExecutorService executorService = Executors.newSingleThreadExecutor();
         executorService.execute(new Runnable() {
@@ -113,13 +107,14 @@ public class CustomPointServiceImpl implements CustomPointService {
 //                    .eq(PlanChild::getPercent1, 1.00)
 //                    .eq(PlanChild::getId, cid));
 //        }
+        Log.warn("#############################3");
         return transfer;
     }
 
     @Override
     public void percentUpdate(String childPlanIds) {
         List<String> list = Arrays.asList(childPlanIds.split(","));
-        Log.warn("#############################8");
+        Log.warn("#############################2");
         for (String sid : list) {
             Long childPlanId = Long.parseLong(sid);
             Date now = Date8Util.getCurrentDate();
@@ -215,6 +210,7 @@ public class CustomPointServiceImpl implements CustomPointService {
             planChildService.update(Wrappers.<PlanChild>lambdaUpdate().set(PlanChild::getChildPlanState, "3")
                     .eq(PlanChild::getPercent1, 1).eq(PlanChild::getId, childPlanId));
         }
+        Log.warn("#############################4");
     }