From fbd762b2bde8af760cd4c1f3595ed94b6f40f9c6 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 20 十一月 2025 12:13:14 +0800
Subject: [PATCH] 最新版本541200007
---
admin/src/views/business/categoryJkLine.vue | 8
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkSketchServiceImpl.java | 72 ++++---
server/doc/重置规划有失败的情况的客户信息.sql | 490 +++++++++++++++++++++++++++++++++++++++++++++++++
server/system_gateway/src/main/resources/bootstrap.yml | 2
server/system_gateway/src/main/resources/application-pro.yml | 2
5 files changed, 537 insertions(+), 37 deletions(-)
diff --git a/admin/src/views/business/categoryJkLine.vue b/admin/src/views/business/categoryJkLine.vue
index d66b9e8..2509850 100644
--- a/admin/src/views/business/categoryJkLine.vue
+++ b/admin/src/views/business/categoryJkLine.vue
@@ -43,8 +43,8 @@
>
<template slot-scope="{row}">
<el-button type="text" icon="el-icon-edit" @click="$refs.OperaCategoryJkLineWindow.open('缂栬緫涓荤嚎璺�',row)" v-permissions="['business:category:update']">缂栬緫</el-button>
- <el-button type="text" icon="el-icon-edit" @click="distanceDo(row)" v-if="row.status !=2 && row.customerDoneNum < row.customerNum " v-permissions="['business:category:update']">浜ら�氳鍒�</el-button>
- <el-button type="text" icon="el-icon-edit" @click="distanceDo(row)" v-if="row.status ==2 " v-permissions="['business:category:update']">閲嶆柊瑙勫垝</el-button>
+ <el-button type="text" icon="el-icon-edit" @click="distanceDo(row,0)" v-if="row.status !=2 && row.customerDoneNum < row.customerNum " v-permissions="['business:category:update']">浜ら�氳鍒�</el-button>
+ <el-button type="text" icon="el-icon-edit" @click="distanceDo(row,1)" v-if="row.status !=2 && row.customerDoneNum === row.customerNum" v-permissions="['business:category:update']">閲嶆柊瑙勫垝</el-button>
<el-button type="text" icon="el-icon-delete" @click="deleteById(row)" style="color: red" v-permissions="['business:category:delete']">鍒犻櫎</el-button>
</template>
</el-table-column>
@@ -90,14 +90,14 @@
this.search()
},
methods: {
- distanceDo (row) {
+ distanceDo (row,force) {
var that = this
this.$confirm('纭畾杩涜璇ヤ富绾胯矾涓嬪鎴疯窛绂昏绠楀悧?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- distanceCustomer({ categoryId: row.id })
+ distanceCustomer({ categoryId: row.id,forceUpdate: force })
.then(res => {
this.$tip.apiSuccess('浜ら�氳鍒掍换鍔℃鍦ㄥ悗鍙版墽琛岋紝鍙兘闇�瑕佷竴娈垫椂闂达紝璇风瓑寰呬换鍔″畬鎴愬悗鏌ョ湅缁撴灉')
that.search()
diff --git "a/server/doc/\351\207\215\347\275\256\350\247\204\345\210\222\346\234\211\345\244\261\350\264\245\347\232\204\346\203\205\345\206\265\347\232\204\345\256\242\346\210\267\344\277\241\346\201\257.sql" "b/server/doc/\351\207\215\347\275\256\350\247\204\345\210\222\346\234\211\345\244\261\350\264\245\347\232\204\346\203\205\345\206\265\347\232\204\345\256\242\346\210\267\344\277\241\346\201\257.sql"
new file mode 100644
index 0000000..41ee89a
--- /dev/null
+++ "b/server/doc/\351\207\215\347\275\256\350\247\204\345\210\222\346\234\211\345\244\261\350\264\245\347\232\204\346\203\205\345\206\265\347\232\204\345\256\242\346\210\267\344\277\241\346\201\257.sql"
@@ -0,0 +1,490 @@
+update jk_customer a set a.DISTANCE_STATUS =0 where a.LATITUDE is not null and (LENGTH(a.DISTANCE) - LENGTH(REPLACE(a.DISTANCE,'"distance":0,','')))/LENGTH('"distance":0,') >1 and a.DISTANCE_STATUS=1
+
+a.id in (1078494567,
+1078494568,
+1078494570,
+1078494572,
+1078494744,
+1078494745,
+1078494747,
+1078494749,
+1078494757,
+1078494685,
+1078494577,
+1078494733,
+1078494694,
+1078494686,
+1078494689,
+1078494690,
+1078494692,
+1078494700,
+1078494701,
+1078494702,
+1078494703,
+1078494704,
+1078494719,
+1078494705,
+1078494723,
+1078494706,
+1078494754,
+1078494720,
+1078494490,
+1078494491,
+1078494760,
+1078494721,
+1078494683,
+1078494735,
+1078494574,
+1078494722,
+1078494727,
+1078494736,
+1078494758,
+1078494759,
+1078494762,
+1078494763,
+1078494766,
+1078494767,
+1078494768,
+1078494956,
+1078494774,
+1078494775,
+1078494718,
+1078494746,
+1078494955,
+1078494785,
+1078494788,
+1078494793,
+1078494794,
+1078494795,
+1078494796,
+1078494941,
+1078494761,
+1078494769,
+1078494770,
+1078494772,
+1078494773,
+1078494777,
+1078494778,
+1078494779,
+1078494780,
+1078494781,
+1078494782,
+1078494783,
+1078494784,
+1078494787,
+1078494789,
+1078494790,
+1078494791,
+1078494792,
+1078494798,
+1078494800,
+1078494801,
+1078494942,
+1078494943,
+1078494944,
+1078494945,
+1078494946,
+1078494947,
+1078494949,
+1078494764,
+1078494954,
+1078494661,
+1078494569,
+1078494673,
+1078494674,
+1078494675,
+1078494688,
+1078494571,
+1078494575,
+1078494578,
+1078494579,
+1078494580,
+1078494581,
+1078494583,
+1078494584,
+1078494585,
+1078494586,
+1078494587,
+1078494660,
+1078494663,
+1078494664,
+1078494669,
+1078494670,
+1078494671,
+1078494672,
+1078494678,
+1078494681,
+1078494682,
+1078494684,
+1078494687,
+1078494691,
+1078494693,
+1078494697,
+1078494698,
+1078494699,
+1078494707,
+1078494708,
+1078494709,
+1078494713,
+1078494724,
+1078494725,
+1078494726,
+1078494729,
+1078494730,
+1078494731,
+1078494732,
+1078494734,
+1078494737,
+1078494738,
+1078494740,
+1078494741,
+1078494742,
+1078494743,
+1078494748,
+1078494750,
+1078494751,
+1078494752,
+1078494753,
+1078494755,
+1078494756,
+1078494952,
+1078494658,
+1078494573,
+1078494469,
+1078494470,
+1078494475,
+1078494476,
+1078494477,
+1078494680,
+1078494803,
+1078494711,
+1078494714,
+1078494712,
+1078494710,
+1078494715,
+1078494717,
+1078494471,
+1078494474,
+1078494940,
+1078494765,
+1078494472,
+1078494473,
+1078494804,
+1078494480,
+1078494481,
+1078494482,
+1078494588,
+1078494806,
+1078494807,
+1078494811,
+1078494656,
+1078494771,
+1078494776,
+1078494786,
+1078494799,
+1078494488,
+1078494510,
+1078494513,
+1078494515,
+1078494517,
+1078494519,
+1078494522,
+1078494523,
+1078494529,
+1078494539,
+1078494545,
+1078494548,
+1078494552,
+1078494553,
+1078494555,
+1078494556,
+1078494562,
+1078494602,
+1078494603,
+1078494609,
+1078494622,
+1078494626,
+1078494935,
+1078494489,
+1078494637,
+1078494478,
+1078494662,
+1078494665,
+1078494739,
+1078494554,
+1078494615,
+1078494633,
+1078494634,
+1078494635,
+1078494636,
+1078494596,
+1078494629,
+1078494632,
+1078494639,
+1078494643,
+1078494666,
+1078494484,
+1078494505,
+1078494508,
+1078494509,
+1078494512,
+1078494530,
+1078494531,
+1078494561,
+1078494591,
+1078494604,
+1078494605,
+1078494606,
+1078494607,
+1078494608,
+1078494610,
+1078494613,
+1078494621,
+1078494623,
+1078494628,
+1078494631,
+1078494638,
+1078494640,
+1078494641,
+1078494495,
+1078494657,
+1078494659,
+1078494667,
+1078494668,
+1078494676,
+1078494677,
+1078494716,
+1078494582,
+1078494695,
+1078494696,
+1078494627,
+1078494802,
+1078494805,
+1078494932,
+1078494527,
+1078494597,
+1078494649,
+1078494590,
+1078494598,
+1078494564,
+1078494679,
+1078494630,
+1078494483,
+1078494565,
+1078494652,
+1078494653,
+1078494650,
+1078494651,
+1078494654,
+1078494655,
+1078494647,
+1078494648,
+1078494479,
+1078494492,
+1078494619,
+1078494620,
+1078494485,
+1078494486,
+1078494815,
+1078494814,
+1078494936,
+1078494600,
+1078494601,
+1078494849,
+1078494850,
+1078494858,
+1078494861,
+1078494862,
+1078494863,
+1078494864,
+1078494865,
+1078494866,
+1078494867,
+1078494868,
+1078494869,
+1078494870,
+1078494871,
+1078494948,
+1078494817,
+1078494909,
+1078494950,
+1078494951,
+1078494616,
+1078494487,
+1078494599,
+1078494617,
+1078494493,
+1078494502,
+1078494497,
+1078494498,
+1078494496,
+1078494500,
+1078494499,
+1078494501,
+1078494797,
+1078494503,
+1078494820,
+1078494822,
+1078494819,
+1078494614,
+1078494559,
+1078494816,
+1078494910,
+1078494912,
+1078494913,
+1078494914,
+1078494916,
+1078494927,
+1078494937,
+1078494938,
+1078494953,
+1078494560,
+1078494821,
+1078494624,
+1078494558,
+1078494557,
+1078494518,
+1078494521,
+1078494524,
+1078494526,
+1078494504,
+1078494611,
+1078494507,
+1078494511,
+1078494827,
+1078494925,
+1078494520,
+1078494823,
+1078494824,
+1078494825,
+1078494826,
+1078494828,
+1078494829,
+1078494926,
+1078494901,
+1078494922,
+1078494533,
+1078494920,
+1078494534,
+1078494911,
+1078494915,
+1078494818,
+1078494923,
+1078494528,
+1078494594,
+1078494595,
+1078494642,
+1078494931,
+1078494506,
+1078494830,
+1078494831,
+1078494547,
+1078494514,
+1078494532,
+1078494535,
+1078494536,
+1078494835,
+1078494566,
+1078494592,
+1078494593,
+1078494644,
+1078494645,
+1078494833,
+1078494834,
+1078494836,
+1078494838,
+1078494840,
+1078494842,
+1078494843,
+1078494844,
+1078494845,
+1078494846,
+1078494848,
+1078494851,
+1078494906,
+1078494907,
+1078494924,
+1078494837,
+1078494852,
+1078494853,
+1078494854,
+1078494855,
+1078494856,
+1078494857,
+1078494859,
+1078494546,
+1078494847,
+1078494516,
+1078494551,
+1078494839,
+1078494841,
+1078494612,
+1078494549,
+1078494541,
+1078494889,
+1078494890,
+1078494891,
+1078494550,
+1078494537,
+1078494538,
+1078494860,
+1078494872,
+1078494876,
+1078494881,
+1078494884,
+1078494873,
+1078494874,
+1078494875,
+1078494880,
+1078494882,
+1078494883,
+1078494898,
+1078494899,
+1078494900,
+1078494902,
+1078494903,
+1078494904,
+1078494905,
+1078494832,
+1078494886,
+1078494542,
+1078494543,
+1078494544,
+1078494887,
+1078494540,
+1078494494,
+1078494917,
+1078494918,
+1078494919,
+1078494921,
+1078494618,
+1078494589,
+1078494625,
+1078494728,
+1078494808,
+1078494809,
+1078494810,
+1078494877,
+1078494879,
+1078494929,
+1078494930,
+1078494812,
+1078494939,
+1078494646,
+1078494933,
+1078494563,
+1078494525,
+1078494928,
+1078494934,
+1078494878,
+1078494908,
+1078494813,
+1078494885,
+1078494888,
+1078494892,
+1078494893,
+1078494894,
+1078494895,
+1078494896,
+1078494897,
+1078494576)
diff --git a/server/system_gateway/src/main/resources/application-pro.yml b/server/system_gateway/src/main/resources/application-pro.yml
index df592ab..06c2ac6 100644
--- a/server/system_gateway/src/main/resources/application-pro.yml
+++ b/server/system_gateway/src/main/resources/application-pro.yml
@@ -18,7 +18,7 @@
-debug_model: true
+debug_model: false
captcha_check: true
diff --git a/server/system_gateway/src/main/resources/bootstrap.yml b/server/system_gateway/src/main/resources/bootstrap.yml
index 02ca26f..3d2cb09 100644
--- a/server/system_gateway/src/main/resources/bootstrap.yml
+++ b/server/system_gateway/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
profiles:
- active: dev
+ active: pro
application:
name: system_gateway
# 瀹夊叏閰嶇疆
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkSketchServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkSketchServiceImpl.java
index f5dbf90..29fecf8 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkSketchServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkSketchServiceImpl.java
@@ -287,7 +287,7 @@
int index =0;
for (int j = start; j < end; j++) {
try {
- log.error("浜ら�氳鍒�========"+customerList.get(j).getName()+"========cirle:"+finalI+"==="+index++);
+ log.error("浜ら�氳鍒�========"+cate.getId()+"/"+cate.getName()+"/"+customerList.get(j).getName()+"=======cirle/index:"+finalI+"/"+index++);
dealDistancePerCustomer(customerList.get(j),url,date, finalCLatitude, finalCLongitude,customerList);
}catch (Exception e){
@@ -321,7 +321,7 @@
List<JkCustomerNavigation> navigationList = new ArrayList<>();
List<DistanceMapParam> tmpList = new ArrayList<>();
List<DistanceMapParam> distanceMapParamList = getListFromJsonStr(c.getDistance());
- boolean isNew = false;
+ boolean isNew = false,hasError =false;
JkCustomer u =new JkCustomer();
DistanceMapParam t0 = new DistanceMapParam();
t0.setId(-2);//琛ㄧず杩斿洖鍥尯
@@ -344,13 +344,14 @@
//濡傛灉鏈夎矾寰勪俊鎭�
u.setStartSteps(dm.getPolyline());
}
+ }else{
+ hasError=true;
}
}
tmpList.add(t0);
for(JkCustomer cm : customerList){
//瀹㈡埛鍜屽鎴蜂箣闂寸殑璺濈淇℃伅
- Thread.sleep(500);
DistanceMapParam t = new DistanceMapParam();
t.setId(cm.getId());
DistanceMapParam param = getParamByCustomerIds( cm.getId(),distanceMapParamList);
@@ -373,10 +374,15 @@
}else{
DistanceCustomerModel dm = DistanceCalculator.calculateDistanceGaode(url,c,cm);
t.setDistance(dm.getDistance() );
- if(dm.getLocations().size()>0){
- //濡傛灉鏈夎矾寰勪俊鎭�
- navigation.setSteps(dm.getPolyline());
+ if(dm.getCode() == 1){
+ if(dm.getLocations().size()>0){
+ //濡傛灉鏈夎矾寰勪俊鎭�
+ navigation.setSteps(dm.getPolyline());
+ }
+ }else{
+ hasError=true;
}
+
}
navigation.setIdIndex(c.getId()+"-"+cm.getId());
navigation.setDistance(t.getDistance());
@@ -405,12 +411,14 @@
//濡傛灉鏈夎矾寰勪俊鎭�
u.setEndSteps(dm.getPolyline());
}
+ }else{
+ hasError=true;
}
}
tmpList.add(tt);
if(isNew){//
- u.setDistanceStatus(Constants.ONE);
+ u.setDistanceStatus(hasError?Constants.ZERO:Constants.ONE);//鎵�鏈夐兘鎴愬姛鎵嶆爣娉ㄥ凡瑙勫垝
u.setId(c.getId());
u.setDistance(JSONObject.toJSONString(tmpList));
updateCustomerList.add(u);
@@ -470,8 +478,8 @@
.eq(JkCustomer::getIsdeleted,Constants.ZERO)
.eq(JkLine::getCategoryId,model.getCategoryId() );
List<JkCustomer> customerList = jkCustomerMapper.selectJoinList(JkCustomer.class,queryWrapper1);
- List<JkCustomer> needList =checkNeedDistanceDo(customerList);
- if(needList == null || needList.size() == 0){
+ List<JkCustomer> needList =checkNeedDistanceDo(customerList);
+ if(Constants.equalsInteger(model.getForceUpdate(),0)&& (needList == null || needList.size() == 0)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"璇ヤ富绾夸笅鏃犻渶瑕佽繘琛岃窛绂昏绠楃殑瀹㈡埛淇℃伅锛�");
}
String errorMsg ="";
@@ -485,7 +493,7 @@
}
c.setStatus(Constants.TWO);
categoryMapper.updateById(c);//鏇存柊浠诲姟鎵ц鐘舵��
- c.setCustomerList(customerList);
+ c.setCustomerList(Constants.equalsInteger(model.getForceUpdate(),0)?needList:customerList);
return c;
}
@@ -1497,31 +1505,33 @@
List<JkSketchLine> jkSketchLineList = jkSketchLineMapper.selectJoinList(JkSketchLine.class,queryWrapper);
List<TelecomCategoryDataVO> telecomCategoryDataVOList = new ArrayList<>();
- for (JkSketch jkSketch:sketchList) {
- TelecomCategoryDataVO telecomCategoryDataVO = new TelecomCategoryDataVO();
- telecomCategoryDataVO.setId(jkSketch.getCategoryId());
- telecomCategoryDataVO.setName(jkSketch.getCategoryName());
- //浼樺寲鍓嶆暟鎹�
- List<JkSketchLine> beforeList = jkSketchLineList.stream()
- .filter(i->Constants.equalsInteger(i.getSketchId(),jkSketch.getId())&&Constants.equalsInteger(i.getType(),Constants.ZERO)).collect(Collectors.toList());
- telecomCategoryDataVO.setDistance(
- beforeList.stream().map(i->i.getDistance()).reduce(Long.valueOf(0),Long::sum)
- );
- if(Constants.equalsInteger(jkSketch.getOptStatus(),Constants.ZERO)){
- telecomCategoryDataVO.setDistanceAfter(telecomCategoryDataVO.getDistance());
- }else{
- //浼樺寲鍚庢暟鎹�
- List<JkSketchLine> afterList = jkSketchLineList.stream()
- .filter(i->Constants.equalsInteger(i.getSketchId(),jkSketch.getId())&&Constants.equalsInteger(i.getType(),Constants.ONE)&&Constants.equalsInteger(i.getIsdeleted(),Constants.ZERO)).collect(Collectors.toList());
+ if(sketchList!=null){
+ for (JkSketch jkSketch:sketchList) {
+ TelecomCategoryDataVO telecomCategoryDataVO = new TelecomCategoryDataVO();
+ telecomCategoryDataVO.setId(jkSketch.getCategoryId());
+ telecomCategoryDataVO.setName(jkSketch.getCategoryName());
+ //浼樺寲鍓嶆暟鎹�
+ List<JkSketchLine> beforeList = jkSketchLineList.stream()
+ .filter(i->Constants.equalsInteger(i.getSketchId(),jkSketch.getId())&&Constants.equalsInteger(i.getType(),Constants.ZERO)).collect(Collectors.toList());
+ telecomCategoryDataVO.setDistance(
+ beforeList.stream().map(i->i.getDistance()).reduce(Long.valueOf(0),Long::sum)
+ );
+ if(Constants.equalsInteger(jkSketch.getOptStatus(),Constants.ZERO)){
+ telecomCategoryDataVO.setDistanceAfter(telecomCategoryDataVO.getDistance());
+ }else{
+ //浼樺寲鍚庢暟鎹�
+ List<JkSketchLine> afterList = jkSketchLineList.stream()
+ .filter(i->Constants.equalsInteger(i.getSketchId(),jkSketch.getId())&&Constants.equalsInteger(i.getType(),Constants.ONE)&&Constants.equalsInteger(i.getIsdeleted(),Constants.ZERO)).collect(Collectors.toList());
- Long distanceAfter = 0L;
- for (JkSketchLine jkSketchLine:afterList) {
+ Long distanceAfter = 0L;
+ for (JkSketchLine jkSketchLine:afterList) {
distanceAfter = distanceAfter + jkSketchLine.getDistance();
- }
- telecomCategoryDataVO.setDistanceAfter(distanceAfter);
+ }
+ telecomCategoryDataVO.setDistanceAfter(distanceAfter);
+ }
+ telecomCategoryDataVOList.add(telecomCategoryDataVO);
}
- telecomCategoryDataVOList.add(telecomCategoryDataVO);
}
return telecomCategoryDataVOList;
}
--
Gitblit v1.9.3