yuliang 5 лет назад
Родитель
Сommit
febc66f581

+ 7 - 8
whepi-ui/templates/home/ribao.js

@@ -819,7 +819,8 @@ function ribao_cell(v) {
 function ribao_add() {
   $('#btnAdd').on('click', function () {
 
-
+// 获取定位
+    getLocation();
     if ($('#ribao')[0].style.display == 'none') {
       $('#notOpenRibao').toggle();
       $('#ribao')[0].style.display = '';
@@ -1016,8 +1017,6 @@ function ribao_add() {
     //     }
     //   },
     // });
-    // 获取定位
-    getLocation();
 
   });
 }
@@ -1247,9 +1246,9 @@ function ribaoCommit() {
 
   } else
     {
-    workLocal = 10;
+    workLocal = 0;
     workLocalOther = "";
-    todyLocal = 10;
+    todyLocal = 0;
     todyLocalOther = "";
     isTrip = 0;
     listcx = [];
@@ -1400,6 +1399,9 @@ function updateSuspected(suspectedId) {
     success: function (data) {
       // console.log(data);
       if (data) {
+        // 获取定位
+        getLocation();
+
         var suspected = data;
         $("#suspectedId").val(suspected.suspectedId);
         $("#js_input_user_sex").val(getGreder(suspected.grender));
@@ -1569,9 +1571,6 @@ function updateSuspected(suspectedId) {
             tab();
           },
         });
-
-        // 获取定位
-        getLocation();
       }
     },
   });

+ 1 - 1
whepi-web/src/main/java/com/bofeng/service/MsTripService.java

@@ -147,7 +147,7 @@ public class MsTripService {
             msSuspectedMapper.insert(msSuspected);
 
             //添加出行
-            if (todayLocal > 0 && workLocal > 0) {
+            if (todayLocal >= 0 && workLocal >= 0) {
                 MsTrip msTrip = new MsTrip();
                 msTrip.setTripId(msSuspected.getSuspectedId());
                 msTrip.setIsTrip(isTrip);