Commit 40c1ead7e92a30f4524f6e06a0d62c70aa8370bf
Merge branch 'dev' of http://61.169.120.202:8888/youxiw20000/trash into dev
Showing
9 changed files
with
318 additions
and
22 deletions
trash-ui/src/views/unit/dropPointInfo/index.vue
| @@ -242,6 +242,12 @@ | @@ -242,6 +242,12 @@ | ||
| 242 | <el-input v-model="form.transportUnit" placeholder="请输入运输单位"/> | 242 | <el-input v-model="form.transportUnit" placeholder="请输入运输单位"/> |
| 243 | </el-form-item> | 243 | </el-form-item> |
| 244 | </el-col> | 244 | </el-col> |
| 245 | + <el-col :span="12"> | ||
| 246 | + <el-form-item label="坐标点" prop="coordinatePoint"> | ||
| 247 | + <el-input v-model="form.coordinatePoint" placeholder="请输入坐标点经纬度" readonly/> | ||
| 248 | + </el-form-item> | ||
| 249 | + <el-button type="primary" @click="handleOpenMap">坐标点</el-button> | ||
| 250 | + </el-col> | ||
| 245 | </el-row> | 251 | </el-row> |
| 246 | </el-form> | 252 | </el-form> |
| 247 | <div slot="footer" class="dialog-footer"> | 253 | <div slot="footer" class="dialog-footer"> |
| @@ -249,6 +255,41 @@ | @@ -249,6 +255,41 @@ | ||
| 249 | <el-button @click="cancel">取 消</el-button> | 255 | <el-button @click="cancel">取 消</el-button> |
| 250 | </div> | 256 | </div> |
| 251 | </el-dialog> | 257 | </el-dialog> |
| 258 | + <el-dialog title="高德地图" :visible.sync="openMap" width="1600px" height="750px" append-to-body> | ||
| 259 | + <div class="serach_map"> | ||
| 260 | + 搜索: | ||
| 261 | + <el-select | ||
| 262 | + v-model="keywords" | ||
| 263 | + filterable | ||
| 264 | + remote | ||
| 265 | + placeholder="请输入关键词" | ||
| 266 | + :remote-method="remoteMethod" | ||
| 267 | + :loading="loading" | ||
| 268 | + :clearable="true" | ||
| 269 | + size="mini" | ||
| 270 | + @change="currentSelect" | ||
| 271 | + style="width: 250px" | ||
| 272 | + > | ||
| 273 | + <el-option | ||
| 274 | + v-for="item in mapOptions" | ||
| 275 | + :key="item.id" | ||
| 276 | + :label="item.name" | ||
| 277 | + :value="item" | ||
| 278 | + class="one-text" | ||
| 279 | + > | ||
| 280 | + <span style="float: left">{{ item.name }}</span> | ||
| 281 | + <span style="float: right; color: #8492a6; font-size: 13px">{{ | ||
| 282 | + item.district | ||
| 283 | + }}</span> | ||
| 284 | + </el-option> | ||
| 285 | + </el-select> | ||
| 286 | + </div> | ||
| 287 | + <div v-loading="loading" id="dropPointInfoContainer" class="am-map" style="width:100%;height: 700px;"></div> | ||
| 288 | + <div slot="footer" class="dialog-footer"> | ||
| 289 | + <el-button type="primary" @click="clearCoordinatePoint">清除坐标点</el-button> | ||
| 290 | + <el-button type="primary" @click="openMap = false">确 定</el-button> | ||
| 291 | + </div> | ||
| 292 | + </el-dialog> | ||
| 252 | </div> | 293 | </div> |
| 253 | </template> | 294 | </template> |
| 254 | 295 | ||
| @@ -262,9 +303,17 @@ import { | @@ -262,9 +303,17 @@ import { | ||
| 262 | exportDropPointInfo | 303 | exportDropPointInfo |
| 263 | } from "@/api/unit/dropPointInfo"; | 304 | } from "@/api/unit/dropPointInfo"; |
| 264 | import {getAreaList} from "@/api/casefile/remoteServer"; | 305 | import {getAreaList} from "@/api/casefile/remoteServer"; |
| 306 | +import AMapLoader from "@amap/amap-jsapi-loader"; | ||
| 307 | +import Treeselect from "@riophae/vue-treeselect"; | ||
| 308 | + | ||
| 309 | +// 设置安全密钥 | ||
| 310 | +window._AMapSecurityConfig = { | ||
| 311 | + securityJsCode: 'aa1db7d8f534f3da3f6d8a6a71382802', | ||
| 312 | +} | ||
| 265 | 313 | ||
| 266 | export default { | 314 | export default { |
| 267 | name: "DropPointInfo", | 315 | name: "DropPointInfo", |
| 316 | + components: {AMapLoader}, | ||
| 268 | data() { | 317 | data() { |
| 269 | return { | 318 | return { |
| 270 | // 遮罩层 | 319 | // 遮罩层 |
| @@ -347,6 +396,9 @@ export default { | @@ -347,6 +396,9 @@ export default { | ||
| 347 | ], | 396 | ], |
| 348 | transportUnit: [ | 397 | transportUnit: [ |
| 349 | {required: true, message: "请输入运输单位", trigger: "blur"} | 398 | {required: true, message: "请输入运输单位", trigger: "blur"} |
| 399 | + ], | ||
| 400 | + coordinatePoint: [ | ||
| 401 | + {required: true, message: "请点击坐标点按钮选择坐标点", trigger: "blur"} | ||
| 350 | ] | 402 | ] |
| 351 | }, | 403 | }, |
| 352 | areas: [ | 404 | areas: [ |
| @@ -502,13 +554,152 @@ export default { | @@ -502,13 +554,152 @@ export default { | ||
| 502 | ] | 554 | ] |
| 503 | } | 555 | } |
| 504 | ], | 556 | ], |
| 505 | - streets:[] | 557 | + streets:[], |
| 558 | + // 地图 | ||
| 559 | + map: null, | ||
| 560 | + keywords: "", | ||
| 561 | + mapOptions: [], | ||
| 562 | + openMap:false, | ||
| 563 | + center: null, | ||
| 506 | }; | 564 | }; |
| 507 | }, | 565 | }, |
| 508 | created() { | 566 | created() { |
| 509 | this.getList(); | 567 | this.getList(); |
| 568 | + // this.initAMap(); | ||
| 510 | }, | 569 | }, |
| 511 | methods: { | 570 | methods: { |
| 571 | + clearCoordinatePoint(){ | ||
| 572 | + this.center = null; | ||
| 573 | + this.form.coordinatePoint = null; | ||
| 574 | + this.map = null; | ||
| 575 | + this.initAMap(); | ||
| 576 | + }, | ||
| 577 | + handleOpenMap(){ | ||
| 578 | + this.openMap = true; | ||
| 579 | + this.initAMap(); | ||
| 580 | + }, | ||
| 581 | + initAMap() { | ||
| 582 | + const _this = this | ||
| 583 | + // 加载高德地图 | ||
| 584 | + AMapLoader.load({ | ||
| 585 | + key: _this.$aMapKey, //设置高德地图申请的key | ||
| 586 | + version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 | ||
| 587 | + plugins: ['AMap.ToolBar','AMap.AutoComplete', 'AMap.PlaceSearch', 'AMap.Marker','AMap.CircleMarker'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 | ||
| 588 | + AMapUI: { | ||
| 589 | + version: "1.1", | ||
| 590 | + plugins: [] | ||
| 591 | + }, | ||
| 592 | + Loca: { | ||
| 593 | + version: "2.0" | ||
| 594 | + }, | ||
| 595 | + }).then(async (AMap) => { | ||
| 596 | + _this.map = await new AMap.Map("dropPointInfoContainer", { //设置地图容器id | ||
| 597 | + viewMode: "2D", // 默认使用 2D 模式 | ||
| 598 | + center: [113.01814545605467, 28.201039299894283], // 初始化地图中心点位置 | ||
| 599 | + zoom: 11, //初始化地图层级 | ||
| 600 | + resizeEnable: true, | ||
| 601 | + willreadoften: true | ||
| 602 | + }); | ||
| 603 | + _this.AutoComplete = await new AMap.AutoComplete({city:'长沙'}); | ||
| 604 | + // 数据回显 | ||
| 605 | + if(_this.form.coordinatePoint!=null&&_this.form.coordinatePoint!==""){ | ||
| 606 | + //设置圆形位置 | ||
| 607 | + _this.center = new AMap.LngLat(_this.form.coordinatePoint.split(",")[0], _this.form.coordinatePoint.split(",")[1]); | ||
| 608 | + //设置圆的半径大小 | ||
| 609 | + var radius = 10 //单位:px | ||
| 610 | + | ||
| 611 | + //创建圆形点标记 CircleMarker 实例 | ||
| 612 | + var circleMarker = new AMap.CircleMarker({ | ||
| 613 | + center: _this.center, //圆心 | ||
| 614 | + radius: radius, //半径 | ||
| 615 | + strokeColor: "white", //轮廓线颜色 | ||
| 616 | + strokeWeight: 2, //轮廓线宽度 | ||
| 617 | + strokeOpacity: 0.5, //轮廓线透明度 | ||
| 618 | + fillColor: "rgba(0,0,255,1)", //圆点填充颜色 | ||
| 619 | + fillOpacity: 0.5, //圆点填充透明度 | ||
| 620 | + zIndex: 10, //圆点覆盖物的叠加顺序 | ||
| 621 | + cursor: "pointer", //鼠标悬停时的鼠标样式 | ||
| 622 | + }); | ||
| 623 | + //圆形 circleMarker 对象添加到 Map | ||
| 624 | + _this.map.add(circleMarker); | ||
| 625 | + //将覆盖物调整到合适视野 | ||
| 626 | + _this.map.setFitView([circleMarker]); | ||
| 627 | + | ||
| 628 | + _this.form.coordinatePoint = e.lnglat.lng+","+e.lnglat.lat; | ||
| 629 | + } | ||
| 630 | + // 监听地图点击事件 | ||
| 631 | + _this.map.on("click", (e) => { | ||
| 632 | + //判断是否已有圆点标记 | ||
| 633 | + if(_this.center==null){ | ||
| 634 | + //设置圆形位置 | ||
| 635 | + _this.center = new AMap.LngLat(e.lnglat.lng, e.lnglat.lat); | ||
| 636 | + //设置圆的半径大小 | ||
| 637 | + var radius = 10 //单位:px | ||
| 638 | + | ||
| 639 | + //创建圆形点标记 CircleMarker 实例 | ||
| 640 | + var circleMarker = new AMap.CircleMarker({ | ||
| 641 | + center: _this.center, //圆心 | ||
| 642 | + radius: radius, //半径 | ||
| 643 | + strokeColor: "white", //轮廓线颜色 | ||
| 644 | + strokeWeight: 2, //轮廓线宽度 | ||
| 645 | + strokeOpacity: 0.5, //轮廓线透明度 | ||
| 646 | + fillColor: "rgba(0,0,255,1)", //圆点填充颜色 | ||
| 647 | + fillOpacity: 0.5, //圆点填充透明度 | ||
| 648 | + zIndex: 10, //圆点覆盖物的叠加顺序 | ||
| 649 | + cursor: "pointer", //鼠标悬停时的鼠标样式 | ||
| 650 | + }); | ||
| 651 | + //圆形 circleMarker 对象添加到 Map | ||
| 652 | + _this.map.add(circleMarker); | ||
| 653 | + //将覆盖物调整到合适视野 | ||
| 654 | + _this.map.setFitView([circleMarker]); | ||
| 655 | + | ||
| 656 | + _this.$set(_this.form, "coordinatePoint", e.lnglat.lng+","+e.lnglat.lat); | ||
| 657 | + } | ||
| 658 | + }); | ||
| 659 | + }).catch(e => { | ||
| 660 | + console.log(e); | ||
| 661 | + }); | ||
| 662 | + this.loading = false; | ||
| 663 | + // this.openMap = false; | ||
| 664 | + }, | ||
| 665 | + // 选中提示 | ||
| 666 | + currentSelect(val) { | ||
| 667 | + console.log(val); | ||
| 668 | + // 清空时不执行后面代码 | ||
| 669 | + if (!val) { | ||
| 670 | + return ; | ||
| 671 | + } | ||
| 672 | + | ||
| 673 | + //清除marker | ||
| 674 | + if (this.searchMarker){ | ||
| 675 | + this.map.remove(this.searchMarker) | ||
| 676 | + } | ||
| 677 | + //设置marker | ||
| 678 | + // this.searchMarker = new AMap.Marker({ | ||
| 679 | + // map: this.map, | ||
| 680 | + // position: [val.location.lng, val.location.lat], | ||
| 681 | + // }); | ||
| 682 | + // 自动适应显示想显示的范围区域 | ||
| 683 | + //定位 | ||
| 684 | + this.map.setCenter([val.location.lng, val.location.lat]) | ||
| 685 | + this.map.setZoom(18); | ||
| 686 | + this.keywords = val.name | ||
| 687 | + | ||
| 688 | + }, | ||
| 689 | + // 搜索地址 | ||
| 690 | + remoteMethod(query) { | ||
| 691 | + if (query !== "") { | ||
| 692 | + this.loading = true; | ||
| 693 | + setTimeout(() => { | ||
| 694 | + this.loading = false; | ||
| 695 | + this.AutoComplete.search(query, (status, result) => { | ||
| 696 | + this.mapOptions = result.tips; | ||
| 697 | + }); | ||
| 698 | + }, 200); | ||
| 699 | + } else { | ||
| 700 | + this.mapOptions = []; | ||
| 701 | + } | ||
| 702 | + }, | ||
| 512 | createDropPointNo(area){ | 703 | createDropPointNo(area){ |
| 513 | listDropPointInfo({dropPointNo: area.code}).then(response => { | 704 | listDropPointInfo({dropPointNo: area.code}).then(response => { |
| 514 | const total = response.total+1; | 705 | const total = response.total+1; |
| @@ -561,6 +752,8 @@ export default { | @@ -561,6 +752,8 @@ export default { | ||
| 561 | updateTime: null, | 752 | updateTime: null, |
| 562 | updateBy: null | 753 | updateBy: null |
| 563 | }; | 754 | }; |
| 755 | + this.map = null; | ||
| 756 | + this.center = null; | ||
| 564 | this.resetForm("form"); | 757 | this.resetForm("form"); |
| 565 | }, | 758 | }, |
| 566 | /** 搜索按钮操作 */ | 759 | /** 搜索按钮操作 */ |
trash-unit/src/main/java/com/trash/carInfo/controller/CarInfoController.java
| @@ -16,20 +16,18 @@ import org.springframework.web.bind.annotation.*; | @@ -16,20 +16,18 @@ import org.springframework.web.bind.annotation.*; | ||
| 16 | import org.springframework.web.multipart.MultipartFile; | 16 | import org.springframework.web.multipart.MultipartFile; |
| 17 | 17 | ||
| 18 | import java.io.IOException; | 18 | import java.io.IOException; |
| 19 | -import java.util.List; | ||
| 20 | -import java.util.Objects; | 19 | +import java.util.*; |
| 21 | import java.util.stream.Collectors; | 20 | import java.util.stream.Collectors; |
| 22 | 21 | ||
| 23 | /** | 22 | /** |
| 24 | * 运输车辆管理Controller | 23 | * 运输车辆管理Controller |
| 25 | - * | 24 | + * |
| 26 | * @author trash | 25 | * @author trash |
| 27 | * @date 2023-11-21 | 26 | * @date 2023-11-21 |
| 28 | */ | 27 | */ |
| 29 | @RestController | 28 | @RestController |
| 30 | @RequestMapping("/unit/carInfo") | 29 | @RequestMapping("/unit/carInfo") |
| 31 | -public class CarInfoController extends BaseController | ||
| 32 | -{ | 30 | +public class CarInfoController extends BaseController { |
| 33 | @Autowired | 31 | @Autowired |
| 34 | private ICarInfoService carInfoService; | 32 | private ICarInfoService carInfoService; |
| 35 | 33 | ||
| @@ -38,21 +36,20 @@ public class CarInfoController extends BaseController | @@ -38,21 +36,20 @@ public class CarInfoController extends BaseController | ||
| 38 | */ | 36 | */ |
| 39 | @PreAuthorize("@ss.hasPermi('unit:carInfo:list')") | 37 | @PreAuthorize("@ss.hasPermi('unit:carInfo:list')") |
| 40 | @GetMapping("/list") | 38 | @GetMapping("/list") |
| 41 | - public TableDataInfo list(CarInfoVo carInfo) | ||
| 42 | - { | 39 | + public TableDataInfo list(CarInfoVo carInfo) { |
| 43 | startPage(); | 40 | startPage(); |
| 44 | carInfo.setIsDel(1); | 41 | carInfo.setIsDel(1); |
| 45 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); | 42 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); |
| 46 | TableDataInfo data = getDataTable(list); | 43 | TableDataInfo data = getDataTable(list); |
| 47 | - if(CollectionUtils.isNotEmpty(list)){ | ||
| 48 | - list = list.stream().map(car->{ | ||
| 49 | - if(Objects.equals(car.getCarType(),"轻型货车")){ | 44 | + if (CollectionUtils.isNotEmpty(list)) { |
| 45 | + list = list.stream().map(car -> { | ||
| 46 | + if (Objects.equals(car.getCarType(), "轻型货车")) { | ||
| 50 | car.setCarLeft("car_1.png"); | 47 | car.setCarLeft("car_1.png"); |
| 51 | car.setRemark("箱体长2.6m,宽1.7m,高1.5m;最多可容纳约90袋装修垃圾(75cm*5cm每袋)"); | 48 | car.setRemark("箱体长2.6m,宽1.7m,高1.5m;最多可容纳约90袋装修垃圾(75cm*5cm每袋)"); |
| 52 | - }else if(Objects.equals(car.getCarType(),"中型货车")){ | 49 | + } else if (Objects.equals(car.getCarType(), "中型货车")) { |
| 53 | car.setCarLeft("car_2.png"); | 50 | car.setCarLeft("car_2.png"); |
| 54 | car.setRemark("箱体长3.2m,宽1.5m,高1.5m;最多可容纳约110袋装修垃圾(75cm*45cm每袋)"); | 51 | car.setRemark("箱体长3.2m,宽1.5m,高1.5m;最多可容纳约110袋装修垃圾(75cm*45cm每袋)"); |
| 55 | - }else if(Objects.equals(car.getCarType(),"大中型货车")){ | 52 | + } else if (Objects.equals(car.getCarType(), "大中型货车")) { |
| 56 | car.setCarLeft("car_3.png"); | 53 | car.setCarLeft("car_3.png"); |
| 57 | car.setRemark("箱体长3.2m,宽1.9m,高1.9m;最多可容纳约150袋装修垃圾(75cm*45cm每袋)"); | 54 | car.setRemark("箱体长3.2m,宽1.9m,高1.9m;最多可容纳约150袋装修垃圾(75cm*45cm每袋)"); |
| 58 | } | 55 | } |
| @@ -63,14 +60,54 @@ public class CarInfoController extends BaseController | @@ -63,14 +60,54 @@ public class CarInfoController extends BaseController | ||
| 63 | return data; | 60 | return data; |
| 64 | } | 61 | } |
| 65 | 62 | ||
| 63 | + @GetMapping("/list/group/by/carType") | ||
| 64 | + public TableDataInfo listGroupByCarType(CarInfoVo carInfo) { | ||
| 65 | + | ||
| 66 | + carInfo.setIsDel(1); | ||
| 67 | + List<CarInfoVo> list = carInfoService.selectCarInfoListFront(carInfo); | ||
| 68 | + TableDataInfo data = getDataTable(list); | ||
| 69 | + if (CollectionUtils.isNotEmpty(list)) { | ||
| 70 | + Map<String, List<CarInfoVo>> carMap = list.stream().map(car -> { | ||
| 71 | + if (Objects.equals(car.getCarType(), "轻型货车")) { | ||
| 72 | + car.setCarLeft("car_1.png"); | ||
| 73 | + car.setRemark("箱体长2.6m,宽1.7m,高1.5m;最多可容纳约90袋装修垃圾(75cm*5cm每袋)"); | ||
| 74 | + } else if (Objects.equals(car.getCarType(), "中型货车")) { | ||
| 75 | + car.setCarLeft("car_2.png"); | ||
| 76 | + car.setRemark("箱体长3.2m,宽1.5m,高1.5m;最多可容纳约110袋装修垃圾(75cm*45cm每袋)"); | ||
| 77 | + } else if (Objects.equals(car.getCarType(), "大中型货车")) { | ||
| 78 | + car.setCarLeft("car_3.png"); | ||
| 79 | + car.setRemark("箱体长3.2m,宽1.9m,高1.9m;最多可容纳约150袋装修垃圾(75cm*45cm每袋)"); | ||
| 80 | + } | ||
| 81 | + return car; | ||
| 82 | + }).collect(Collectors.groupingBy(CarInfoVo::getCarType)); | ||
| 83 | + | ||
| 84 | + List<CarInfoVo> carList = new ArrayList<>(); | ||
| 85 | + for (Map.Entry<String, List<CarInfoVo>> entry : carMap.entrySet()) { | ||
| 86 | + if (CollectionUtils.isNotEmpty(entry.getValue())) { | ||
| 87 | + Optional<CarInfoVo> opt = entry.getValue().stream().filter(car -> Objects.equals(car.getCarEquipment(), "4") || Objects.equals(car.getCarEquipment(), "6") || Objects.equals(car.getCarEquipment(), "8")).findFirst(); | ||
| 88 | + if (opt.isPresent()) { | ||
| 89 | + carList.add(opt.get()); | ||
| 90 | + } else { | ||
| 91 | + carList.add(entry.getValue().get(0)); | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + } | ||
| 95 | + } | ||
| 96 | + carList = carList.stream().sorted(Comparator.comparing(CarInfoVo::convertContainerVolumeDefaultMaxValue)).collect(Collectors.toList()); | ||
| 97 | + | ||
| 98 | + data.setRows(carList); | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + return data; | ||
| 102 | + } | ||
| 103 | + | ||
| 66 | /** | 104 | /** |
| 67 | * 导出运输车辆管理列表 | 105 | * 导出运输车辆管理列表 |
| 68 | */ | 106 | */ |
| 69 | @PreAuthorize("@ss.hasPermi('unit:carInfo:export')") | 107 | @PreAuthorize("@ss.hasPermi('unit:carInfo:export')") |
| 70 | @Log(title = "运输车辆管理", businessType = BusinessType.EXPORT) | 108 | @Log(title = "运输车辆管理", businessType = BusinessType.EXPORT) |
| 71 | @GetMapping("/export") | 109 | @GetMapping("/export") |
| 72 | - public AjaxResult export(CarInfoVo carInfo) | ||
| 73 | - { | 110 | + public AjaxResult export(CarInfoVo carInfo) { |
| 74 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); | 111 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); |
| 75 | ExcelUtil<CarInfoVo> util = new ExcelUtil<CarInfoVo>(CarInfoVo.class); | 112 | ExcelUtil<CarInfoVo> util = new ExcelUtil<CarInfoVo>(CarInfoVo.class); |
| 76 | return util.exportExcel(list, "carInfo"); | 113 | return util.exportExcel(list, "carInfo"); |
| @@ -81,8 +118,7 @@ public class CarInfoController extends BaseController | @@ -81,8 +118,7 @@ public class CarInfoController extends BaseController | ||
| 81 | */ | 118 | */ |
| 82 | @PreAuthorize("@ss.hasPermi('unit:carInfo:query')") | 119 | @PreAuthorize("@ss.hasPermi('unit:carInfo:query')") |
| 83 | @GetMapping(value = "/{id}") | 120 | @GetMapping(value = "/{id}") |
| 84 | - public AjaxResult getInfo(@PathVariable("id") Long id) | ||
| 85 | - { | 121 | + public AjaxResult getInfo(@PathVariable("id") Long id) { |
| 86 | return AjaxResult.success(carInfoService.selectCarInfoById(id)); | 122 | return AjaxResult.success(carInfoService.selectCarInfoById(id)); |
| 87 | } | 123 | } |
| 88 | 124 | ||
| @@ -123,9 +159,8 @@ public class CarInfoController extends BaseController | @@ -123,9 +159,8 @@ public class CarInfoController extends BaseController | ||
| 123 | */ | 159 | */ |
| 124 | @PreAuthorize("@ss.hasPermi('unit:carInfo:remove')") | 160 | @PreAuthorize("@ss.hasPermi('unit:carInfo:remove')") |
| 125 | @Log(title = "运输车辆管理", businessType = BusinessType.DELETE) | 161 | @Log(title = "运输车辆管理", businessType = BusinessType.DELETE) |
| 126 | - @DeleteMapping("/{ids}") | ||
| 127 | - public AjaxResult remove(@PathVariable Long[] ids) | ||
| 128 | - { | 162 | + @DeleteMapping("/{ids}") |
| 163 | + public AjaxResult remove(@PathVariable Long[] ids) { | ||
| 129 | return toAjax(carInfoService.deleteCarInfoByIds(ids)); | 164 | return toAjax(carInfoService.deleteCarInfoByIds(ids)); |
| 130 | } | 165 | } |
| 131 | } | 166 | } |
trash-unit/src/main/java/com/trash/carInfo/domain/vo/CarInfoVo.java
| 1 | package com.trash.carInfo.domain.vo; | 1 | package com.trash.carInfo.domain.vo; |
| 2 | 2 | ||
| 3 | import com.trash.carInfo.domain.CarInfo; | 3 | import com.trash.carInfo.domain.CarInfo; |
| 4 | +import com.trash.common.utils.StringUtils; | ||
| 5 | + | ||
| 6 | +import java.util.Objects; | ||
| 4 | 7 | ||
| 5 | public class CarInfoVo extends CarInfo { | 8 | public class CarInfoVo extends CarInfo { |
| 6 | private String companyName; | 9 | private String companyName; |
| @@ -24,4 +27,12 @@ public class CarInfoVo extends CarInfo { | @@ -24,4 +27,12 @@ public class CarInfoVo extends CarInfo { | ||
| 24 | this.driversName = driversName; | 27 | this.driversName = driversName; |
| 25 | } | 28 | } |
| 26 | 29 | ||
| 30 | + public Integer convertContainerVolumeDefaultMaxValue(){ | ||
| 31 | + try { | ||
| 32 | + return StringUtils.isEmpty(org.apache.commons.lang3.StringUtils.trim(this.getContainerVolume())) ? Integer.MAX_VALUE : Integer.parseInt(this.getContainerVolume()); | ||
| 33 | + }catch (Exception e){ | ||
| 34 | + return Integer.MAX_VALUE; | ||
| 35 | + } | ||
| 36 | + } | ||
| 37 | + | ||
| 27 | } | 38 | } |
trash-unit/src/main/java/com/trash/carInfo/mapper/CarInfoMapper.java
| @@ -31,6 +31,8 @@ public interface CarInfoMapper | @@ -31,6 +31,8 @@ public interface CarInfoMapper | ||
| 31 | */ | 31 | */ |
| 32 | List<CarInfoVo> selectCarInfoList(CarInfoVo carInfo); | 32 | List<CarInfoVo> selectCarInfoList(CarInfoVo carInfo); |
| 33 | 33 | ||
| 34 | + List<CarInfoVo> selectCarInfoListFront(CarInfoVo carInfo); | ||
| 35 | + | ||
| 34 | List<CarInfoVo> selectByCompanyId(@Param("companyId") Long companyId); | 36 | List<CarInfoVo> selectByCompanyId(@Param("companyId") Long companyId); |
| 35 | 37 | ||
| 36 | /** | 38 | /** |
trash-unit/src/main/java/com/trash/carInfo/service/ICarInfoService.java
| @@ -31,6 +31,8 @@ public interface ICarInfoService | @@ -31,6 +31,8 @@ public interface ICarInfoService | ||
| 31 | */ | 31 | */ |
| 32 | List<CarInfoVo> selectCarInfoList(CarInfoVo carInfo); | 32 | List<CarInfoVo> selectCarInfoList(CarInfoVo carInfo); |
| 33 | 33 | ||
| 34 | + List<CarInfoVo> selectCarInfoListFront(CarInfoVo carInfo); | ||
| 35 | + | ||
| 34 | List<CarInfoVo> selectByCompanyId(Long companyId); | 36 | List<CarInfoVo> selectByCompanyId(Long companyId); |
| 35 | 37 | ||
| 36 | /** | 38 | /** |
trash-unit/src/main/java/com/trash/carInfo/service/impl/CarInfoServiceImpl.java
| @@ -59,6 +59,12 @@ public class CarInfoServiceImpl implements ICarInfoService | @@ -59,6 +59,12 @@ public class CarInfoServiceImpl implements ICarInfoService | ||
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | @Override | 61 | @Override |
| 62 | + public List<CarInfoVo> selectCarInfoListFront(CarInfoVo carInfo) | ||
| 63 | + { | ||
| 64 | + return carInfoMapper.selectCarInfoListFront(carInfo); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @Override | ||
| 62 | public List<CarInfoVo> selectByCompanyId(Long companyId) { | 68 | public List<CarInfoVo> selectByCompanyId(Long companyId) { |
| 63 | return carInfoMapper.selectByCompanyId(companyId); | 69 | return carInfoMapper.selectByCompanyId(companyId); |
| 64 | } | 70 | } |
trash-unit/src/main/java/com/trash/dropPointInfo/domain/DropPointInfo.java
| @@ -81,10 +81,23 @@ public class DropPointInfo extends BaseEntity | @@ -81,10 +81,23 @@ public class DropPointInfo extends BaseEntity | ||
| 81 | @Excel(name = "运输单位") | 81 | @Excel(name = "运输单位") |
| 82 | private String transportUnit; | 82 | private String transportUnit; |
| 83 | 83 | ||
| 84 | + /** 坐标点 */ | ||
| 85 | + @Excel(name = "坐标点") | ||
| 86 | + private String coordinatePoint; | ||
| 87 | + | ||
| 84 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 88 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 85 | @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") | 89 | @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| 86 | private Date createTime; | 90 | private Date createTime; |
| 87 | 91 | ||
| 92 | + | ||
| 93 | + public String getCoordinatePoint() { | ||
| 94 | + return coordinatePoint; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + public void setCoordinatePoint(String coordinatePoint) { | ||
| 98 | + this.coordinatePoint = coordinatePoint; | ||
| 99 | + } | ||
| 100 | + | ||
| 88 | @Override | 101 | @Override |
| 89 | public Date getCreateTime() { | 102 | public Date getCreateTime() { |
| 90 | return createTime; | 103 | return createTime; |
trash-unit/src/main/resources/mapper/unit/CarInfoMapper.xml
| @@ -143,7 +143,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -143,7 +143,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 143 | <if test="drivers != null and drivers != ''"> and drivers = #{drivers}</if> | 143 | <if test="drivers != null and drivers != ''"> and drivers = #{drivers}</if> |
| 144 | <if test="status != null "> and car.status = #{status}</if> | 144 | <if test="status != null "> and car.status = #{status}</if> |
| 145 | <if test="creditStatus != null and creditStatus != ''"> and car.credit_status = #{creditStatus}</if> | 145 | <if test="creditStatus != null and creditStatus != ''"> and car.credit_status = #{creditStatus}</if> |
| 146 | - <if test="isDel != null"> and car.is_del = #{isDel}</if> | 146 | + <if test="isDel != null"> and car.is_del = #{isDel}</if> |
| 147 | + </where> | ||
| 148 | + </select> | ||
| 149 | + | ||
| 150 | + <select id="selectCarInfoListFront" parameterType="CarInfoVo" resultMap="CarInfoVoResult"> | ||
| 151 | + <include refid="selectCarInfoForCompanyVo"/> | ||
| 152 | + <where> | ||
| 153 | + <if test="companyName != null and companyName != ''"> and c.name like concat('%',#{companyName},'%')</if> | ||
| 154 | + <if test="carType != null and carType != ''"> and car_type = #{carType}</if> | ||
| 155 | + <if test="carCode != null and carCode != ''"> and car_code like concat('%',#{carCode},'%')</if> | ||
| 156 | + <if test="carBrank != null and carBrank != ''"> and car_brank like concat('%',#{carBrank},'%')</if> | ||
| 157 | + <if test="emissionStandard != null and emissionStandard != ''"> and emission_standard = #{emissionStandard}</if> | ||
| 158 | + <if test="roadTransportDate != null "> and road_transport_date = #{roadTransportDate}</if> | ||
| 159 | + <if test="drivingLicenseDate != null "> and driving_license_date = #{drivingLicenseDate}</if> | ||
| 160 | + <if test="enterDate != null "> and enter_date = #{enterDate}</if> | ||
| 161 | + <if test="farmeNumber != null and farmeNumber != ''"> and farme_number = #{farmeNumber}</if> | ||
| 162 | + <if test="carIdentification != null and carIdentification != ''"> and car_identification = #{carIdentification}</if> | ||
| 163 | + <if test="containerVolume != null and containerVolume != ''"> and container_volume = #{containerVolume}</if> | ||
| 164 | + <if test="carColor != null and carColor != ''"> and car_color = #{carColor}</if> | ||
| 165 | + <if test="carEquipment != null and carEquipment != ''"> and car_equipment = #{carEquipment}</if> | ||
| 166 | + <if test="roadTransport != null and roadTransport != ''"> and road_transport = #{roadTransport}</if> | ||
| 167 | + <if test="drivingLicense != null and drivingLicense != ''"> and driving_license = #{drivingLicense}</if> | ||
| 168 | + <if test="carFront != null and carFront != ''"> and car_front = #{carFront}</if> | ||
| 169 | + <if test="carLeft != null and carLeft != ''"> and car_left = #{carLeft}</if> | ||
| 170 | + <if test="carBehind != null and carBehind != ''"> and car_behind = #{carBehind}</if> | ||
| 171 | + <if test="carRight != null and carRight != ''"> and car_right = #{carRight}</if> | ||
| 172 | + <if test="drivers != null and drivers != ''"> and drivers = #{drivers}</if> | ||
| 173 | + <if test="status != null "> and car.status = #{status}</if> | ||
| 174 | + <if test="creditStatus != null and creditStatus != ''"> and car.credit_status = #{creditStatus}</if> | ||
| 175 | + <if test="isDel != null"> and car.is_del = #{isDel}</if> | ||
| 176 | + <if test="companyId != null"> and car.company_id = #{companyId}</if> | ||
| 147 | </where> | 177 | </where> |
| 148 | </select> | 178 | </select> |
| 149 | 179 |
trash-unit/src/main/resources/mapper/unit/DropPointInfoMapper.xml
| @@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 21 | <result property="dropPointNo" column="drop_point_no" /> | 21 | <result property="dropPointNo" column="drop_point_no" /> |
| 22 | <result property="operatingUnit" column="operating_unit" /> | 22 | <result property="operatingUnit" column="operating_unit" /> |
| 23 | <result property="transportUnit" column="transport_unit" /> | 23 | <result property="transportUnit" column="transport_unit" /> |
| 24 | + <result property="coordinatePoint" column="coordinate_point" /> | ||
| 24 | <result property="createTime" column="create_time" /> | 25 | <result property="createTime" column="create_time" /> |
| 25 | <result property="createBy" column="create_by" /> | 26 | <result property="createBy" column="create_by" /> |
| 26 | <result property="updateTime" column="update_time" /> | 27 | <result property="updateTime" column="update_time" /> |
| @@ -28,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -28,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 28 | </resultMap> | 29 | </resultMap> |
| 29 | 30 | ||
| 30 | <sql id="selectDropPointInfoVo"> | 31 | <sql id="selectDropPointInfoVo"> |
| 31 | - select id, drop_point_name, district, street, community, address, type, area, capacity, management_unit, custodian, custodian_phone, drop_time, drop_point_no, operating_unit, transport_unit, create_time, create_by, update_time, update_by from drop_point_info | 32 | + select id, drop_point_name, district, street, community, address, type, area, capacity, management_unit, custodian, custodian_phone, drop_time, drop_point_no, operating_unit, transport_unit,coordinate_point, create_time, create_by, update_time, update_by from drop_point_info |
| 32 | </sql> | 33 | </sql> |
| 33 | 34 | ||
| 34 | <select id="selectDropPointInfoList" parameterType="DropPointInfo" resultMap="DropPointInfoResult"> | 35 | <select id="selectDropPointInfoList" parameterType="DropPointInfo" resultMap="DropPointInfoResult"> |
| @@ -64,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -64,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 64 | <if test="dropPointNo != null">drop_point_no,</if> | 65 | <if test="dropPointNo != null">drop_point_no,</if> |
| 65 | <if test="operatingUnit != null">operating_unit,</if> | 66 | <if test="operatingUnit != null">operating_unit,</if> |
| 66 | <if test="transportUnit != null">transport_unit,</if> | 67 | <if test="transportUnit != null">transport_unit,</if> |
| 68 | + <if test="coordinatePoint != null">coordinate_point,</if> | ||
| 67 | <if test="createTime != null">create_time,</if> | 69 | <if test="createTime != null">create_time,</if> |
| 68 | <if test="createBy != null">create_by,</if> | 70 | <if test="createBy != null">create_by,</if> |
| 69 | <if test="updateTime != null">update_time,</if> | 71 | <if test="updateTime != null">update_time,</if> |
| @@ -85,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -85,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 85 | <if test="dropPointNo != null">#{dropPointNo},</if> | 87 | <if test="dropPointNo != null">#{dropPointNo},</if> |
| 86 | <if test="operatingUnit != null">#{operatingUnit},</if> | 88 | <if test="operatingUnit != null">#{operatingUnit},</if> |
| 87 | <if test="transportUnit != null">#{transportUnit},</if> | 89 | <if test="transportUnit != null">#{transportUnit},</if> |
| 90 | + <if test="coordinatePoint != null">#{coordinatePoint},</if> | ||
| 88 | <if test="createTime != null">#{createTime},</if> | 91 | <if test="createTime != null">#{createTime},</if> |
| 89 | <if test="createBy != null">#{createBy},</if> | 92 | <if test="createBy != null">#{createBy},</if> |
| 90 | <if test="updateTime != null">#{updateTime},</if> | 93 | <if test="updateTime != null">#{updateTime},</if> |
| @@ -110,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -110,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 110 | <if test="dropPointNo != null">drop_point_no = #{dropPointNo},</if> | 113 | <if test="dropPointNo != null">drop_point_no = #{dropPointNo},</if> |
| 111 | <if test="operatingUnit != null">operating_unit = #{operatingUnit},</if> | 114 | <if test="operatingUnit != null">operating_unit = #{operatingUnit},</if> |
| 112 | <if test="transportUnit != null">transport_unit = #{transportUnit},</if> | 115 | <if test="transportUnit != null">transport_unit = #{transportUnit},</if> |
| 116 | + <if test="coordinatePoint != null">coordinate_point = #{coordinatePoint},</if> | ||
| 113 | <if test="createTime != null">create_time = #{createTime},</if> | 117 | <if test="createTime != null">create_time = #{createTime},</if> |
| 114 | <if test="createBy != null">create_by = #{createBy},</if> | 118 | <if test="createBy != null">create_by = #{createBy},</if> |
| 115 | <if test="updateTime != null">update_time = #{updateTime},</if> | 119 | <if test="updateTime != null">update_time = #{updateTime},</if> |