Przeglądaj źródła

精准营销-plus 整合 精准营销(v2.0)

JensionDzero 1 rok temu
rodzic
commit
6260a3eefc

+ 2 - 2
benyun-core/src/main/java/com/benyun/core/controller/WdInfoController.java

@@ -48,7 +48,7 @@ public class WdInfoController {
 //        return R.ok(wdInfoService.searchWdTotal());
 //    }
 
-//    网点数量新增情况
+    //    网点数量新增情况
     @PostMapping("/addStatus")
     public R addStatus(ListQueryBody body){
         List<String> addrCode = body.getAddrCode();
@@ -57,7 +57,7 @@ public class WdInfoController {
         return R.ok(addStatusVos);
     }
 
-//    近期各地区网点开关数量变化情况
+    //    近期各地区网点开关数量变化情况
     @PostMapping("/opclose")
     public R opclose(ListQueryBody body){
         List<String> addrCode = body.getAddrCode();

+ 4 - 3
benyun-core/src/main/java/com/benyun/core/service/WdInfoService.java

@@ -11,7 +11,8 @@ import java.util.HashMap;
 import java.util.List;
 
 public interface WdInfoService {
-    List<WdAddrTypeDistribution> searchAddrTypeDistribution(List<String> addrCodes, List<String> typeCodes);
-    List<WdAddrTypeDistribution> searchWdTypeDistribution(List<String> addrCodes, List<String> typeCodes);
-    List<WdAddrTypeDistribution> searchWdTotal();
+    //    List<WdAddrTypeDistribution> searchAddrTypeDistribution(List<String> addrCodes, List<String> typeCodes);
+//    List<WdAddrTypeDistribution> searchWdTypeDistribution(List<String> addrCodes, List<String> typeCodes);
+//    List<WdAddrTypeDistribution> searchWdTotal();
+    List<AddStatusVo> searchAddStatus(List<String> addrCodes,List<String> typeCodes);
 }

+ 12 - 3
benyun-core/src/main/java/com/benyun/core/service/impl/ChannelAnalyseServiceImpl.java

@@ -234,7 +234,7 @@ public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
         List<WdTopologicalInfo> originWdInfos = wdTopologicalInfoDao.selectList(queryWrapper);
 
         //统计
-        Integer total = 0 ;
+        Integer total = originWdInfos.size() ;
         HashMap<String,Integer> hashMap = new HashMap<>();
         for (WdTopologicalInfo originWdInfo : originWdInfos) {
             String tag = originWdInfo.getTag();
@@ -259,7 +259,6 @@ public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
                         else {
                             hashMap.put(t,hashMap.get(t)+1);
                         }
-                        total++;
                     }
                 }
             }
@@ -283,8 +282,18 @@ public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
             }
         });
 
+
+        int i = 1;
+        int start = 0,end = 6;
+        while(start<list.size()){
+            if(end>=list.size())
+                end = list.size();
+            result.put(""+i++,new ArrayList(list.subList(start,end)));
+            start=end;
+            end+=6;
+        }
+        result.put("pages",i-1);
         result.put("total",total);
-        result.put("data",list);
         return result;
     }
 

+ 27 - 0
benyun-core/src/main/java/com/benyun/core/service/impl/TopologicalCommonServiceImpl.java

@@ -44,6 +44,33 @@ public class TopologicalCommonServiceImpl implements TopologicalCommonService {
 
     }
 
+//    @Override
+//    public List<WdInfo> map(TopologicalWdAceeptVo topologicalWdAceeptVo) {
+//        QueryWrapper<WdInfo> queryWrapper = new QueryWrapper<>();
+//
+//        //条件构造
+//        queryWrapper.in("wd_type_code",topologicalWdAceeptVo.getChannel());
+//        queryWrapper.and(wdInfoQueryWrapper -> {
+//            wdInfoQueryWrapper.likeRight("geo_hash",topologicalWdAceeptVo.getGeoHash().substring(0,5));
+//        });
+//
+//        //查询结果
+//        List<WdInfo> wdInfos = wdInfoDao.selectList(queryWrapper);
+//
+//        List<WdInfo> list = new ArrayList<>();  //返回结果集
+//        GlobalCoordinates source = new GlobalCoordinates(topologicalWdAceeptVo.getLat(), topologicalWdAceeptVo.getLng());
+//        for (WdInfo wdInfo : wdInfos) {
+//            //1.计算距离
+//            GlobalCoordinates target = new GlobalCoordinates(wdInfo.getLat().doubleValue(), wdInfo.getLng().doubleValue());
+//            double meter2 = DistanceUtil.getDistanceMeter(source, target, Ellipsoid.WGS84);
+//
+//            if(meter2 <= topologicalWdAceeptVo.getRadius()){
+//                list.add(wdInfo);
+//            }
+//        }
+//        return list;
+//    }
+
     @Override
     public List<WdInfo> map(TopologicalWdAceeptVo topologicalWdAceeptVo) {
         QueryWrapper<WdInfo> queryWrapper = new QueryWrapper<>();

+ 0 - 44
benyun-core/src/main/java/com/benyun/core/service/impl/WdInfoServiceImpl.java

@@ -15,11 +15,8 @@ import com.benyun.core.entity.vo.TypeByBody;
 import com.benyun.core.entity.vo.WdInfoVo;
 import com.benyun.core.service.CategoryService;
 import com.benyun.core.service.WdInfoService;
-import com.benyun.core.utils.DistanceUtil;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
-import org.gavaghan.geodesy.Ellipsoid;
-import org.gavaghan.geodesy.GlobalCoordinates;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Service;
@@ -220,45 +217,4 @@ public class WdInfoServiceImpl implements WdInfoService {
 //        return list;
 //    }
 
-    @Override
-    public List<WdInfo> map(String wdId,int r,int size,String wd_type_code) {
-        QueryWrapper<WdInfo> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("wd_id", wdId);
-        WdInfo wdInfo = wdInfoMapper.selectOne(queryWrapper);
-
-        QueryWrapper<WdInfo> queryWrapper1 = new QueryWrapper<>();
-        queryWrapper1.select("wd_id","wd_name","addr_info","type_name_by","wd_type_code","lat","lng","geo_hash");
-        queryWrapper1.eq("wd_type_code",wd_type_code);
-        queryWrapper1.and(wdInfoQueryWrapper -> {
-            wdInfoQueryWrapper.likeRight("geo_hash", wdInfo.getGeoHash().substring(0, 5));
-        });
-        List<WdInfo> wdInfos = wdInfoMapper.selectList(queryWrapper1);
-
-        System.out.println(wdInfos.size());
-
-        List<WdInfo> map = new ArrayList<>();
-        for (WdInfo info : wdInfos) {
-            if(map.size() == size)
-                break;
-
-            //网点等于自己不要
-            if (info.getWdId().equals(wdInfo.getWdId()))
-                continue;
-
-            //计算距离
-            GlobalCoordinates source = new GlobalCoordinates(wdInfo.getLat().doubleValue(), wdInfo.getLng().doubleValue());
-            GlobalCoordinates target = new GlobalCoordinates(info.getLat().doubleValue(), info.getLng().doubleValue());
-            double meter2 = DistanceUtil.getDistanceMeter(source, target, Ellipsoid.WGS84);
-
-            //大于4.89Km不要
-            if (meter2 > r)
-                continue;
-
-            map.add(info);
-        }
-        System.out.println(map.size());
-        return map;
-
-    }
-
 }

+ 2 - 2
ruoyi-admin/src/main/resources/application-prod.yml

@@ -52,7 +52,7 @@ spring:
           driverClassName: com.mysql.cj.jdbc.Driver
           # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
           # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
-          url: jdbc:mysql://192.168.2.64:3306/bailian-ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
           username: root
           password: benyun
 
@@ -61,7 +61,7 @@ spring:
           lazy: true
           type: ${spring.datasource.type}
           driverClassName: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://192.168.2.64:3306/bailian-ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
           username:
           password:
 #        oracle:

+ 1 - 1
ruoyi-extend/ruoyi-xxl-job-admin/src/main/resources/application-prod.yml

@@ -14,7 +14,7 @@ spring:
   datasource:
     type: com.zaxxer.hikari.HikariDataSource
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://192.168.2.64:3306/bailian-ai?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
     username: root
     password: benyun
     hikari:

+ 1 - 1
ruoyi-ui/package.json

@@ -6,7 +6,7 @@
   "license": "MIT",
   "scripts": {
     "dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
-    "build:prod": "vue-cli-service build",
+    "build:prod": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
     "preview": "set NODE_OPTIONS=--openssl-legacy-provider && node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src"
   },

+ 1 - 1
ruoyi-ui/src/layout/components/Sidebar/Logo.vue

@@ -35,7 +35,7 @@ export default {
   },
   data() {
     return {
-      title: 'RuoYi-Vue-Plus',
+      title: '精准营销后台管理系统',
       logo: logoImg
     }
   }

+ 1 - 1
ruoyi-ui/src/router/index.js

@@ -64,7 +64,7 @@ export const constantRoutes = [
   {
     path: '',
     component: Layout,
-    redirect: 'index',
+    redirect: '/data/wdData',
     children: [
       {
         path: 'index',

+ 2 - 2
ruoyi-ui/src/views/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container home">
-    <el-row :gutter="20">
+    <!-- <el-row :gutter="20">
       <el-col :sm="24" :lg="12" style="padding-left: 20px">
         <h2>RuoYi-Vue-Plus后台管理框架</h2>
         <p>
@@ -104,7 +104,7 @@
         </el-row>
       </el-col>
     </el-row>
-    <el-divider />
+    <el-divider /> -->
   </div>
 </template>
 

+ 1 - 1
ruoyi-ui/vue.config.js

@@ -34,7 +34,7 @@ module.exports = {
     open: true,
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
-      [process.env.VUE_APP_BASE_API + '/bailianAi']:{
+      [process.env.VUE_APP_BASE_API + "/bailianAi"]:{
         target: `http://192.168.2.207:8000`,
         changeOrigin: true,
         pathRewrite: {