Bladeren bron

数据回收站(v2.0)

JensionDzero 1 jaar geleden
bovenliggende
commit
72b385b79c
19 gewijzigde bestanden met toevoegingen van 237 en 5 verwijderingen
  1. 66 4
      benyun-core/src/main/java/com/benyun/core/controller/WdRecycleController.java
  2. 9 0
      benyun-core/src/main/java/com/benyun/core/dao/TrafficWdDao.java
  3. 2 0
      benyun-core/src/main/java/com/benyun/core/dao/WdInfoMapper.java
  4. 3 0
      benyun-core/src/main/java/com/benyun/core/entity/StoreWd.java
  5. 7 0
      benyun-core/src/main/java/com/benyun/core/service/BuildWdService.java
  6. 7 0
      benyun-core/src/main/java/com/benyun/core/service/EnterpriseWdService.java
  7. 7 0
      benyun-core/src/main/java/com/benyun/core/service/HouseWdService.java
  8. 7 0
      benyun-core/src/main/java/com/benyun/core/service/StoreWdService.java
  9. 7 0
      benyun-core/src/main/java/com/benyun/core/service/TrafficWdService.java
  10. 3 0
      benyun-core/src/main/java/com/benyun/core/service/WdRecycleService.java
  11. 19 0
      benyun-core/src/main/java/com/benyun/core/service/impl/BuildWdServiceeImpl.java
  12. 19 0
      benyun-core/src/main/java/com/benyun/core/service/impl/EnterpriseWdServiceImpl.java
  13. 19 0
      benyun-core/src/main/java/com/benyun/core/service/impl/HouseWdServiceImpl.java
  14. 20 0
      benyun-core/src/main/java/com/benyun/core/service/impl/StoreWdServiceImpl.java
  15. 19 0
      benyun-core/src/main/java/com/benyun/core/service/impl/TrafficWdServiceImpl.java
  16. 11 0
      benyun-core/src/main/java/com/benyun/core/service/impl/WdRecycleServiceImpl.java
  17. 4 0
      benyun-core/src/main/resources/mapper/WdInfoMapper.xml
  18. 1 1
      ruoyi-ui/package.json
  19. 7 0
      ruoyi-ui/vue.config.js

+ 66 - 4
benyun-core/src/main/java/com/benyun/core/controller/WdRecycleController.java

@@ -1,13 +1,12 @@
 package com.benyun.core.controller;
 
+import com.benyun.core.entity.*;
 import com.benyun.core.entity.vo.TypeByBody;
 import com.benyun.core.entity.vo.WdInfoVo;
-import com.benyun.core.service.WdRecycleService;
+import com.benyun.core.service.*;
 import com.ruoyi.common.core.domain.R;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.HashMap;
 import java.util.List;
@@ -16,9 +15,25 @@ import java.util.List;
 @RequestMapping("/recycle/wd")
 public class WdRecycleController {
 
+
     @Autowired
     WdRecycleService wdRecycleService;
 
+    @Autowired
+    StoreWdService storeWdService;
+
+    @Autowired
+    HouseWdService houseWdService;
+
+    @Autowired
+    BuildWdService buildWdService;
+
+    @Autowired
+    TrafficWdService trafficWdService;
+
+    @Autowired
+    EnterpriseWdService enterpriseWdService;
+
 
     //获取网点回收站列表
     @GetMapping("/list")
@@ -27,6 +42,53 @@ public class WdRecycleController {
         return R.ok(list);
     }
 
+    //获取门店网点类型明细
+    @GetMapping("/storeWdInfo")
+    public R storeWdInfo(String wdId){
+        StoreWd storeWd = storeWdService.storeWdInfo(wdId);
+        return R.ok(storeWd);
+    }
 
+    //获取小区网点类型明细
+    @GetMapping("/houseWdInfo")
+    public R houseWddInfo(String wdId){
+        HouseWd houseWd = houseWdService.houseWddInfo(wdId);
+        return R.ok(houseWd);
+    }
+
+    //获取楼宇网点类型明细
+    @GetMapping("/buildWdInfo")
+    public R buildWdInfo(String wdId){
+        BuildWd buildWd = buildWdService.buildWdInfo(wdId);
+        return R.ok(buildWd);
+    }
+
+    //获取交通设施网点类型明细
+    @GetMapping("/trafficWdInfo")
+    public R trafficWdInfo(String wdId){
+        TrafficWd trafficWd = trafficWdService.trafficWdInfo(wdId);
+        return R.ok(trafficWd);
+    }
+
+    //获取公司网点类型明细
+    @GetMapping("/enterpriseWdInfo")
+    public R enterpriseWdInfo(String wdId){
+        EnterpriseWd enterpriseWd = enterpriseWdService.enterpriseWdInfo(wdId);
+        return R.ok(enterpriseWd);
+    }
+
+    //移除
+    @DeleteMapping("/deleteWd/{wdId}")
+    public R deleteWd(@PathVariable("wdId") String wdId){
+        wdRecycleService.deleteWd(wdId);
+        return R.ok();
+    }
+
+    //恢复
+    @PutMapping("/recoverWd")
+    public R recoverWd(@RequestBody String wdId){
+        wdRecycleService.recoverWd(wdId);
+        return R.ok();
+    }
 
 }

+ 9 - 0
benyun-core/src/main/java/com/benyun/core/dao/TrafficWdDao.java

@@ -0,0 +1,9 @@
+package com.benyun.core.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.benyun.core.entity.TrafficWd;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface TrafficWdDao extends BaseMapper<TrafficWd> {
+}

+ 2 - 0
benyun-core/src/main/java/com/benyun/core/dao/WdInfoMapper.java

@@ -16,4 +16,6 @@ public interface WdInfoMapper extends BaseMapper<WdInfo> {
     List<WdAddrTypeDistribution> searchWdTotal();
 
     List<WdInfo> list(WdInfoVo wdInfoVo);
+
+    void recoverWd(String wdId);
 }

+ 3 - 0
benyun-core/src/main/java/com/benyun/core/entity/StoreWd.java

@@ -12,6 +12,9 @@ public class StoreWd {
     private String wdId;
     @TableField("brand_id")
     private String brandId;
+
+    @TableField("brand_name")
+    private String brandName;
     @TableField("per_capita_consumption")
     private String perCapitaConsumption;
     @TableField("manage_type_code")

+ 7 - 0
benyun-core/src/main/java/com/benyun/core/service/BuildWdService.java

@@ -0,0 +1,7 @@
+package com.benyun.core.service;
+
+import com.benyun.core.entity.BuildWd;
+
+public interface BuildWdService {
+    public BuildWd buildWdInfo(String wdId);
+}

+ 7 - 0
benyun-core/src/main/java/com/benyun/core/service/EnterpriseWdService.java

@@ -0,0 +1,7 @@
+package com.benyun.core.service;
+
+import com.benyun.core.entity.EnterpriseWd;
+
+public interface EnterpriseWdService {
+    public EnterpriseWd enterpriseWdInfo(String wdId);
+}

+ 7 - 0
benyun-core/src/main/java/com/benyun/core/service/HouseWdService.java

@@ -0,0 +1,7 @@
+package com.benyun.core.service;
+
+import com.benyun.core.entity.HouseWd;
+
+public interface HouseWdService {
+    public HouseWd houseWddInfo(String wdId);
+}

+ 7 - 0
benyun-core/src/main/java/com/benyun/core/service/StoreWdService.java

@@ -0,0 +1,7 @@
+package com.benyun.core.service;
+
+import com.benyun.core.entity.StoreWd;
+
+public interface StoreWdService {
+    public StoreWd storeWdInfo(String wdId);
+}

+ 7 - 0
benyun-core/src/main/java/com/benyun/core/service/TrafficWdService.java

@@ -0,0 +1,7 @@
+package com.benyun.core.service;
+
+import com.benyun.core.entity.TrafficWd;
+
+public interface TrafficWdService {
+    public TrafficWd trafficWdInfo(String wdId);
+}

+ 3 - 0
benyun-core/src/main/java/com/benyun/core/service/WdRecycleService.java

@@ -12,4 +12,7 @@ public interface WdRecycleService {
 
     HashMap<String, Object> list(WdInfoVo wdInfo);
 
+    void deleteWd(String wdId);
+
+    void recoverWd(String wdId);
 }

+ 19 - 0
benyun-core/src/main/java/com/benyun/core/service/impl/BuildWdServiceeImpl.java

@@ -0,0 +1,19 @@
+package com.benyun.core.service.impl;
+
+import com.benyun.core.dao.BuildWdDao;
+import com.benyun.core.entity.BuildWd;
+import com.benyun.core.service.BuildWdService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class BuildWdServiceeImpl implements BuildWdService {
+    @Autowired
+    BuildWdDao buildWdDao;
+    @Override
+    public BuildWd buildWdInfo(String wdId) {
+        return buildWdDao.selectById(wdId);
+    }
+}

+ 19 - 0
benyun-core/src/main/java/com/benyun/core/service/impl/EnterpriseWdServiceImpl.java

@@ -0,0 +1,19 @@
+package com.benyun.core.service.impl;
+
+import com.benyun.core.dao.EnterpriseWdDao;
+import com.benyun.core.entity.EnterpriseWd;
+import com.benyun.core.service.EnterpriseWdService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class EnterpriseWdServiceImpl implements EnterpriseWdService {
+    @Autowired
+    EnterpriseWdDao enterpriseWdDao;
+    @Override
+    public EnterpriseWd enterpriseWdInfo(String wdId) {
+        return enterpriseWdDao.selectById(wdId);
+    }
+}

+ 19 - 0
benyun-core/src/main/java/com/benyun/core/service/impl/HouseWdServiceImpl.java

@@ -0,0 +1,19 @@
+package com.benyun.core.service.impl;
+
+import com.benyun.core.dao.HouseWdDao;
+import com.benyun.core.entity.HouseWd;
+import com.benyun.core.service.HouseWdService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class HouseWdServiceImpl implements HouseWdService {
+    @Autowired
+    HouseWdDao houseWdDao;
+    @Override
+    public HouseWd houseWddInfo(String wdId) {
+        return houseWdDao.selectById(wdId);
+    }
+}

+ 20 - 0
benyun-core/src/main/java/com/benyun/core/service/impl/StoreWdServiceImpl.java

@@ -0,0 +1,20 @@
+package com.benyun.core.service.impl;
+
+import com.benyun.core.dao.StoreWdDao;
+import com.benyun.core.entity.StoreWd;
+import com.benyun.core.service.StoreWdService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class StoreWdServiceImpl implements StoreWdService {
+    @Autowired
+    StoreWdDao storeWdDao;
+    @Override
+    public StoreWd storeWdInfo(String wdId) {
+        StoreWd storeWd = storeWdDao.selectById(wdId);
+        return storeWd;
+    }
+}

+ 19 - 0
benyun-core/src/main/java/com/benyun/core/service/impl/TrafficWdServiceImpl.java

@@ -0,0 +1,19 @@
+package com.benyun.core.service.impl;
+
+import com.benyun.core.dao.TrafficWdDao;
+import com.benyun.core.entity.TrafficWd;
+import com.benyun.core.service.TrafficWdService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class TrafficWdServiceImpl implements TrafficWdService {
+    @Autowired
+    TrafficWdDao trafficWdDao;
+    @Override
+    public TrafficWd trafficWdInfo(String wdId) {
+        return trafficWdDao.selectById(wdId);
+    }
+}

+ 11 - 0
benyun-core/src/main/java/com/benyun/core/service/impl/WdRecycleServiceImpl.java

@@ -65,5 +65,16 @@ public class WdRecycleServiceImpl implements WdRecycleService {
         return result;
     }
 
+    @Override
+    public void deleteWd(String wdId) {
+        wdInfoMapper.deleteById(wdId);
+        return;
+    }
+
+    @Override
+    public void recoverWd(String wdId) {
+        wdInfoMapper.recoverWd(wdId);
+    }
+
 
 }

+ 4 - 0
benyun-core/src/main/resources/mapper/WdInfoMapper.xml

@@ -93,4 +93,8 @@
             </if>
         </where>
     </select>
+
+    <update id="recoverWd" parameterType="java.lang.String">
+        update ddt_wd_info set show_delete = 0 where wd_id = #{wdId}
+    </update>
 </mapper>

+ 1 - 1
ruoyi-ui/package.json

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

+ 7 - 0
ruoyi-ui/vue.config.js

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