Procházet zdrojové kódy

1、资产管理
2、车场区域
3、服务员

slowslo před 4 roky
rodič
revize
dda1e00488
49 změnil soubory, kde provedl 1574 přidání a 101 odebrání
  1. 7 0
      blade-service-api/community-api/src/main/java/org/springblade/community/entity/Agency.java
  2. 8 0
      blade-service-api/device-api/src/main/java/org/springblade/device/entity/GbDeviceChannel.java
  3. 9 7
      blade-service-api/device-api/src/main/java/org/springblade/device/vo/GbDeviceStatisticsVO.java
  4. 5 4
      blade-service-api/enterprise-api/src/main/java/org/springblade/enterprise/feign/EnterpriseClientFallback.java
  5. 7 0
      blade-service-api/enterprise-api/src/main/java/org/springblade/enterprise/feign/IEnterpriseClient.java
  6. 6 0
      blade-service-api/enterprise-api/src/main/java/org/springblade/enterprise/feign/IStaffClient.java
  7. 6 2
      blade-service-api/enterprise-api/src/main/java/org/springblade/enterprise/feign/StaffClientFallback.java
  8. 2 0
      blade-service-api/enterprise-api/src/main/java/org/springblade/enterprise/vo/EnterpriseVO.java
  9. 34 0
      blade-service-api/estate-api/src/main/java/org/springblade/estate/dto/AssetsDTO.java
  10. 34 0
      blade-service-api/estate-api/src/main/java/org/springblade/estate/dto/ParkingAreaDTO.java
  11. 78 0
      blade-service-api/estate-api/src/main/java/org/springblade/estate/entity/Assets.java
  12. 72 0
      blade-service-api/estate-api/src/main/java/org/springblade/estate/entity/ParkingArea.java
  13. 0 5
      blade-service-api/estate-api/src/main/java/org/springblade/estate/entity/Repair.java
  14. 62 0
      blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/AssetsClientFallback.java
  15. 63 0
      blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/IAssetsClient.java
  16. 63 0
      blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/IParkingAreaClient.java
  17. 8 2
      blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/IServerUserClient.java
  18. 62 0
      blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/ParkingAreaClientFallback.java
  19. 8 3
      blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/ServerUserClientFallback.java
  20. 36 0
      blade-service-api/estate-api/src/main/java/org/springblade/estate/vo/AssetsVO.java
  21. 36 0
      blade-service-api/estate-api/src/main/java/org/springblade/estate/vo/ParkingAreaVO.java
  22. 28 1
      blade-service/community/src/main/java/org/springblade/community/controller/statistic/controller/StatisticsController.java
  23. 48 0
      blade-service/community/src/main/java/org/springblade/community/controller/statistic/vo/DataStaticVO.java
  24. 1 0
      blade-service/community/src/main/java/org/springblade/community/mapper/AgencyMapper.xml
  25. 26 19
      blade-service/device/src/main/java/org/springblade/device/controller/GbDeviceStatisticsController.java
  26. 1 0
      blade-service/device/src/main/java/org/springblade/device/mapper/GbDeviceChannelMapper.java
  27. 2 0
      blade-service/device/src/main/java/org/springblade/device/service/IGbDeviceChannelService.java
  28. 8 0
      blade-service/device/src/main/java/org/springblade/device/service/impl/GbDeviceChannelServiceImpl.java
  29. 0 42
      blade-service/enterprise/src/main/java/org/springblade/enterprise/controller/EnterpriseController.java
  30. 6 0
      blade-service/enterprise/src/main/java/org/springblade/enterprise/feign/EnterpriseClient.java
  31. 7 1
      blade-service/enterprise/src/main/java/org/springblade/enterprise/feign/StaffClient.java
  32. 8 4
      blade-service/enterprise/src/main/java/org/springblade/enterprise/wrapper/EnterpriseWrapper.java
  33. 8 4
      blade-service/enterprise/src/main/java/org/springblade/enterprise/wrapper/StaffWrapper.java
  34. 129 0
      blade-service/estate/src/main/java/org/springblade/estate/controller/AssetsController.java
  35. 129 0
      blade-service/estate/src/main/java/org/springblade/estate/controller/ParkingAreaController.java
  36. 90 0
      blade-service/estate/src/main/java/org/springblade/estate/feign/AssetsClient.java
  37. 63 0
      blade-service/estate/src/main/java/org/springblade/estate/feign/IParkingAreaClient.java
  38. 9 5
      blade-service/estate/src/main/java/org/springblade/estate/feign/ServerUserClient.java
  39. 42 0
      blade-service/estate/src/main/java/org/springblade/estate/mapper/AssetsMapper.java
  40. 29 0
      blade-service/estate/src/main/java/org/springblade/estate/mapper/AssetsMapper.xml
  41. 42 0
      blade-service/estate/src/main/java/org/springblade/estate/mapper/ParkingAreaMapper.java
  42. 28 0
      blade-service/estate/src/main/java/org/springblade/estate/mapper/ParkingAreaMapper.xml
  43. 2 2
      blade-service/estate/src/main/java/org/springblade/estate/mapper/RepairMapper.xml
  44. 41 0
      blade-service/estate/src/main/java/org/springblade/estate/service/IAssetsService.java
  45. 41 0
      blade-service/estate/src/main/java/org/springblade/estate/service/IParkingAreaService.java
  46. 41 0
      blade-service/estate/src/main/java/org/springblade/estate/service/impl/AssetsServiceImpl.java
  47. 41 0
      blade-service/estate/src/main/java/org/springblade/estate/service/impl/ParkingAreaServiceImpl.java
  48. 49 0
      blade-service/estate/src/main/java/org/springblade/estate/wrapper/AssetsWrapper.java
  49. 49 0
      blade-service/estate/src/main/java/org/springblade/estate/wrapper/ParkingAreaWrapper.java

+ 7 - 0
blade-service-api/community-api/src/main/java/org/springblade/community/entity/Agency.java

@@ -165,4 +165,11 @@ public class Agency extends BaseEntity {
 	@ApiModelProperty(value = "单体应用的主键id")
 	private Long gridId;
 
+	/**
+	 * 1、社区
+	 * 2、园区
+	 */
+	@ApiModelProperty(value = "园区类型")
+	private Integer agencyType;
+
 }

+ 8 - 0
blade-service-api/device-api/src/main/java/org/springblade/device/entity/GbDeviceChannel.java

@@ -87,6 +87,14 @@ public class GbDeviceChannel extends BaseEntity {
 	*/
 		@ApiModelProperty(value = "端口号")
 		private Integer port;
+
+	/**
+	 * 是否告警
+	 * 1:是
+	 * 0:否
+	 */
+	@ApiModelProperty(value = "是否告警")
+	private Integer isAlarm;
 	/**
 	* 云台类型:0 - 未知, 1 - 球机, 2 - 半球,3 - 固定枪机, 4 - 遥控枪机
 	*/

+ 9 - 7
blade-service-api/device-api/src/main/java/org/springblade/device/vo/GbDeviceStatisticsVO.java

@@ -13,12 +13,14 @@ import lombok.Data;
 public class GbDeviceStatisticsVO {
 
 	@ApiModelProperty(value = "设备总数")
-	private Long total;
-	@ApiModelProperty(value = "在线数")
-	private Long onlineCount;
-	@ApiModelProperty(value = "离线数")
-	private Long offlineCount;
-	@ApiModelProperty(value = "警告数")
-	private Long waringCount;
+	private Integer deviceCnt;
+	@ApiModelProperty(value = "通道总数")
+	private Integer channelCnt;
+	@ApiModelProperty(value = "设备在线数")
+	private Integer deviceOnlineCnt;
+	@ApiModelProperty(value = "设备离线数")
+	private Integer deviceOfflineCnt;
+	@ApiModelProperty(value = "设备通道警告数")
+	private Integer channelAlarmCnt;
 
 }

+ 5 - 4
blade-service-api/enterprise-api/src/main/java/org/springblade/enterprise/feign/EnterpriseClientFallback.java

@@ -1,12 +1,8 @@
 package org.springblade.enterprise.feign;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import org.springblade.core.secure.BladeUser;
 import org.springblade.enterprise.entity.Enterprise;
 import org.springblade.enterprise.vo.EnterpriseVO;
 import org.springframework.stereotype.Component;
-import javax.validation.Valid;
 import java.util.List;
 
 @Component
@@ -72,5 +68,10 @@ public class EnterpriseClientFallback implements IEnterpriseClient {
 		return null;
 	}
 
+	@Override
+	public Integer count(String tenantId) {
+		return null;
+	}
+
 
 }

+ 7 - 0
blade-service-api/enterprise-api/src/main/java/org/springblade/enterprise/feign/IEnterpriseClient.java

@@ -3,6 +3,7 @@ package org.springblade.enterprise.feign;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import io.swagger.annotations.ApiParam;
+import org.apache.ibatis.annotations.Param;
 import org.springblade.core.secure.BladeUser;
 import org.springblade.enterprise.entity.Enterprise;
 import org.springblade.enterprise.vo.EnterpriseVO;
@@ -72,4 +73,10 @@ public interface IEnterpriseClient  {
 	 * */
 	@PostMapping("/listForOrg")
 	List<Enterprise> listForOrg(@RequestBody List<Object> params);
+
+	/**
+	 * 数量
+	 */
+	@GetMapping("/count")
+	Integer count(@RequestParam(value = "tenantId", required = false) String tenantId);
 }

+ 6 - 0
blade-service-api/enterprise-api/src/main/java/org/springblade/enterprise/feign/IStaffClient.java

@@ -62,6 +62,12 @@ public interface IStaffClient {
 	@PostMapping("/remove")
     boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);
 
+	/**
+	 * 数量
+	 */
+	@GetMapping("/count")
+	Integer count(@RequestParam(value = "tenantId", required = false) String tenantId);
+
 
 
 

+ 6 - 2
blade-service-api/enterprise-api/src/main/java/org/springblade/enterprise/feign/StaffClientFallback.java

@@ -3,7 +3,6 @@ package org.springblade.enterprise.feign;
 import org.springblade.enterprise.entity.Staff;
 import org.springblade.enterprise.vo.StaffVO;
 import org.springframework.stereotype.Component;
-import javax.validation.Valid;
 import java.util.List;
 
 @Component
@@ -64,4 +63,9 @@ public class StaffClientFallback implements IStaffClient {
             return false;
         }
 
-    }
+	@Override
+	public Integer count(String tenantId) {
+		return null;
+	}
+
+}

+ 2 - 0
blade-service-api/enterprise-api/src/main/java/org/springblade/enterprise/vo/EnterpriseVO.java

@@ -36,4 +36,6 @@ public class EnterpriseVO extends Enterprise {
 	//企业类型名称
 	private String enterpriseTypeName;
 
+	private String agencyName;
+
 }

+ 34 - 0
blade-service-api/estate-api/src/main/java/org/springblade/estate/dto/AssetsDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.dto;
+
+import org.springblade.estate.entity.Assets;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-01-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AssetsDTO extends Assets {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/estate-api/src/main/java/org/springblade/estate/dto/ParkingAreaDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.dto;
+
+import org.springblade.estate.entity.ParkingArea;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ParkingAreaDTO extends ParkingArea {
+	private static final long serialVersionUID = 1L;
+
+}

+ 78 - 0
blade-service-api/estate-api/src/main/java/org/springblade/estate/entity/Assets.java

@@ -0,0 +1,78 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.springblade.core.mp.base.BaseEntity;
+import java.time.LocalDate;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2022-01-10
+ */
+@Data
+@TableName("estate_assets")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "Assets对象", description = "Assets对象")
+public class Assets extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 资产编号
+	*/
+		@ApiModelProperty(value = "资产编号")
+		private String assetsNo;
+	/**
+	* 资产名称
+	*/
+		@ApiModelProperty(value = "资产名称")
+		private String assetsName;
+	/**
+	* 资产价值
+	*/
+		@ApiModelProperty(value = "资产价值")
+		private String assetsValue;
+	/**
+	* 资产分类
+	*/
+		@ApiModelProperty(value = "资产分类")
+		private String assetsCategory;
+	/**
+	 * 资产描述
+	 */
+	@ApiModelProperty(value = "资产描述")
+	private String assetsDesc;
+	/**
+	* 资产图片
+	*/
+		@ApiModelProperty(value = "资产图片")
+		private String assetsImg;
+	/**
+	* 财物入账时间
+	*/
+		@ApiModelProperty(value = "财物入账时间")
+		private LocalDate assetsRecordTime;
+
+
+}

+ 72 - 0
blade-service-api/estate-api/src/main/java/org/springblade/estate/entity/ParkingArea.java

@@ -0,0 +1,72 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2022-01-11
+ */
+@Data
+@TableName("estate_parking_area")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ParkingArea对象", description = "ParkingArea对象")
+public class ParkingArea extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 车场区域名称
+	*/
+		@ApiModelProperty(value = "车场区域名称")
+		private String name;
+	/**
+	* 该区域下的车位宽高参数,例如:30,50 。宽30高50
+	*/
+		@ApiModelProperty(value = "该区域下的车位宽高参数,例如:30,50 。宽30高50")
+		private String pakingSpaceParams;
+	/**
+	* 该区域的宽
+	*/
+		@ApiModelProperty(value = "该区域的宽")
+		private Double width;
+	/**
+	* 该区域的高
+	*/
+		@ApiModelProperty(value = "该区域的高")
+		private Double height;
+	/**
+	* 该区域在车场中的x坐标
+	*/
+		@ApiModelProperty(value = "该区域在车场中的x坐标")
+		private Double left;
+	/**
+	* 该区域在车场中的y坐标
+	*/
+		@ApiModelProperty(value = "该区域在车场中的y坐标")
+		private Double top;
+
+
+}

+ 0 - 5
blade-service-api/estate-api/src/main/java/org/springblade/estate/entity/Repair.java

@@ -121,11 +121,6 @@ public class Repair extends BaseEntity {
 		@ApiModelProperty(value = "小区名称")
 		private String residentialName;
 	/**
-	* 物业系统id
-	*/
-		@ApiModelProperty(value = "物业系统id")
-		private Long oldId;
-	/**
 	* 图片-多张图片用“,”切割
 	*/
 		@ApiModelProperty(value = "图片-多张图片用“,”切割")

+ 62 - 0
blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/AssetsClientFallback.java

@@ -0,0 +1,62 @@
+package org.springblade.estate.feign;
+
+import org.springblade.estate.entity.Assets;
+import org.springblade.estate.vo.AssetsVO;
+import org.springframework.stereotype.Component;
+import javax.validation.Valid;
+import java.util.List;
+
+@Component
+public class AssetsClientFallback implements IAssetsClient {
+            /**
+         * 详情
+         */
+        @Override
+        public AssetsVO detail(Assets assets) {
+            return null;
+        }
+
+        /**
+         * 查询 
+         */
+        @Override
+        public List<AssetsVO> list(Assets assets) {
+            return null;
+        }
+
+    
+
+        /**
+         * 新增 
+         */
+        @Override
+        public boolean save( Assets assets) {
+            return false;
+        }
+
+        /**
+         * 修改 
+         */
+        @Override
+        public boolean update( Assets assets) {
+            return false;
+        }
+
+        /**
+         * 新增或修改 
+         */
+        @Override
+        public boolean submit( Assets assets) {
+            return false;
+        }
+
+    
+        /**
+         * 删除 
+         */
+        @Override
+        public boolean remove( String ids) {
+            return false;
+        }
+
+    }

+ 63 - 0
blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/IAssetsClient.java

@@ -0,0 +1,63 @@
+package org.springblade.estate.feign;
+
+import io.swagger.annotations.ApiParam;
+import org.springblade.estate.entity.Assets;
+import org.springblade.estate.vo.AssetsVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ *  Feign
+ *
+ * @author lianghanqiang
+ * @since 2022-01-10
+ */
+@FeignClient(value = "cyzh-estate",path = "/feign/assets")
+public interface IAssetsClient  {
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+    AssetsVO detail(Assets assets);
+
+	/**
+	 * 查询 
+	 */
+	@GetMapping("/list")
+    List<AssetsVO> list(Assets assets);
+
+
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	boolean save(@Valid @RequestBody Assets assets);
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+    boolean update(@Valid @RequestBody Assets assets);
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+    boolean submit(@Valid @RequestBody Assets assets);
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);
+
+	
+}

+ 63 - 0
blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/IParkingAreaClient.java

@@ -0,0 +1,63 @@
+package org.springblade.estate.feign;
+
+import io.swagger.annotations.ApiParam;
+import org.springblade.estate.entity.ParkingArea;
+import org.springblade.estate.vo.ParkingAreaVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ *  Feign
+ *
+ * @author lianghanqiang
+ * @since 2022-01-11
+ */
+@FeignClient(value = "cyzh-estate",path = "/feign/parkingarea")
+public interface IParkingAreaClient  {
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+    ParkingAreaVO detail(ParkingArea parkingArea);
+
+	/**
+	 * 查询 
+	 */
+	@GetMapping("/list")
+    List<ParkingAreaVO> list(ParkingArea parkingArea);
+
+
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	boolean save(@Valid @RequestBody ParkingArea parkingArea);
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+    boolean update(@Valid @RequestBody ParkingArea parkingArea);
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+    boolean submit(@Valid @RequestBody ParkingArea parkingArea);
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);
+
+	
+}

+ 8 - 2
blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/IServerUserClient.java

@@ -52,12 +52,18 @@ public interface IServerUserClient  {
 	@PostMapping("/submit")
     boolean submit(@Valid @RequestBody ServerUser serverUser);
 
-	
+
 	/**
 	 * 删除 服务人员
 	 */
 	@PostMapping("/remove")
     boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);
 
-	
+	/**
+	 * 数量
+	 */
+	@GetMapping("/count")
+	Integer count(@RequestParam(value = "tenantId", required = false) String tenantId);
+
+
 }

+ 62 - 0
blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/ParkingAreaClientFallback.java

@@ -0,0 +1,62 @@
+package org.springblade.estate.feign;
+
+import org.springblade.estate.entity.ParkingArea;
+import org.springblade.estate.vo.ParkingAreaVO;
+import org.springframework.stereotype.Component;
+import javax.validation.Valid;
+import java.util.List;
+
+@Component
+public class ParkingAreaClientFallback implements IParkingAreaClient {
+            /**
+         * 详情
+         */
+        @Override
+        public ParkingAreaVO detail(ParkingArea parkingArea) {
+            return null;
+        }
+
+        /**
+         * 查询 
+         */
+        @Override
+        public List<ParkingAreaVO> list(ParkingArea parkingArea) {
+            return null;
+        }
+
+    
+
+        /**
+         * 新增 
+         */
+        @Override
+        public boolean save( ParkingArea parkingArea) {
+            return false;
+        }
+
+        /**
+         * 修改 
+         */
+        @Override
+        public boolean update( ParkingArea parkingArea) {
+            return false;
+        }
+
+        /**
+         * 新增或修改 
+         */
+        @Override
+        public boolean submit( ParkingArea parkingArea) {
+            return false;
+        }
+
+    
+        /**
+         * 删除 
+         */
+        @Override
+        public boolean remove( String ids) {
+            return false;
+        }
+
+    }

+ 8 - 3
blade-service-api/estate-api/src/main/java/org/springblade/estate/feign/ServerUserClientFallback.java

@@ -24,7 +24,7 @@ public class ServerUserClientFallback implements IServerUserClient {
             return null;
         }
 
-    
+
 
         /**
          * 新增 服务人员
@@ -50,7 +50,7 @@ public class ServerUserClientFallback implements IServerUserClient {
             return false;
         }
 
-    
+
         /**
          * 删除 服务人员
          */
@@ -59,4 +59,9 @@ public class ServerUserClientFallback implements IServerUserClient {
             return false;
         }
 
-    }
+	@Override
+	public Integer count(String tenantId) {
+		return null;
+	}
+
+}

+ 36 - 0
blade-service-api/estate-api/src/main/java/org/springblade/estate/vo/AssetsVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.vo;
+
+import org.springblade.estate.entity.Assets;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2022-01-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "AssetsVO对象", description = "AssetsVO对象")
+public class AssetsVO extends Assets {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/estate-api/src/main/java/org/springblade/estate/vo/ParkingAreaVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.vo;
+
+import org.springblade.estate.entity.ParkingArea;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2022-01-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ParkingAreaVO对象", description = "ParkingAreaVO对象")
+public class ParkingAreaVO extends ParkingArea {
+	private static final long serialVersionUID = 1L;
+
+}

+ 28 - 1
blade-service/community/src/main/java/org/springblade/community/controller/statistic/controller/StatisticsController.java

@@ -28,6 +28,7 @@ import org.springblade.device.vo.IotDeviceVO;
 import org.springblade.enterprise.entity.Enterprise;
 import org.springblade.enterprise.entity.Staff;
 import org.springblade.enterprise.feign.IEnterpriseClient;
+import org.springblade.enterprise.feign.IStaffClient;
 import org.springblade.enterprise.vo.EnterpriseVO;
 import org.springblade.estate.entity.*;
 import org.springblade.estate.feign.*;
@@ -85,9 +86,10 @@ public class StatisticsController extends BladeController {
 	private final ICarOutRecordClient carOutRecordClient;
 	private final ITenantTypeClient tenantTypeClient;
 	private final IEnterpriseClient enterpriseClient;
+	private final IStaffClient staffClient;
+	private final IServerUserClient serverUserClient;
 	private final RedisTemplate<String,String> redisTemplate;
 	private final ICarClient carClient;
-	private final ITemperatureRecordClient temperatureRecordClient;
 	private final IAccessRecordClient accessRecordClient;
 	/**
 	 * 园区全景页面统计
@@ -903,4 +905,29 @@ public class StatisticsController extends BladeController {
 		);
 	}
 
+
+	/**
+	 * 	园区车辆出入趋势
+	 * */
+	@GetMapping("/dataStat")
+	@ApiOperation("园区数据统计")
+	public R<DataStaticVO> dataStat(BladeUser bladeUser){
+		List<Agency> agencyList = agencyService.list(new LambdaQueryWrapper<Agency>().eq(Agency::getAgencyType, 2));
+		int agencyCount = agencyList.size();
+		int residentialCount = residentialService.count(new LambdaQueryWrapper<Residential>().in(Residential::getAgencyId, agencyList));
+		int buildingCount = buildingService.count(new LambdaQueryWrapper<Building>().in(Building::getAgencyId, agencyList));
+		Integer enterpriseCount = enterpriseClient.count(bladeUser.getTenantId());
+		Integer staffCount = staffClient.count(bladeUser.getTenantId());
+		Integer serverUserCount = serverUserClient.count(bladeUser.getTenantId());
+		return R.data(DataStaticVO.builder()
+			.agencyList(agencyList)
+			.agencyCount(agencyCount)
+			.residentialCount(residentialCount)
+			.buildingCount(buildingCount)
+			.enterpriseCount(enterpriseCount)
+			.staffCount(staffCount)
+			.serverUserCount(serverUserCount)
+			.build());
+	}
+
 }

+ 48 - 0
blade-service/community/src/main/java/org/springblade/community/controller/statistic/vo/DataStaticVO.java

@@ -0,0 +1,48 @@
+package org.springblade.community.controller.statistic.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import org.springblade.community.entity.Agency;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+@Builder
+public class DataStaticVO implements Serializable {
+
+	@ApiModelProperty("园区总数")
+	private Integer agencyCount;
+
+	@ApiModelProperty("区域总数")
+	private Integer residentialCount;
+
+	@ApiModelProperty("企业总数")
+	private Integer enterpriseCount;
+
+	@ApiModelProperty("楼栋总数")
+	private Integer buildingCount;
+
+	@ApiModelProperty("单元总数")
+	private Integer unitCount;
+
+	@ApiModelProperty("楼层数")
+	private Integer floorCount;
+
+	@ApiModelProperty("员工总数")
+	private Integer staffCount;
+
+	@ApiModelProperty("服务员总数")
+	private Integer serverUserCount;
+
+	private  Integer roomCount;
+
+	private Integer userCount;
+
+	private Integer deviceCount;
+
+	private List<Agency> agencyList = new ArrayList<>();
+
+}

+ 1 - 0
blade-service/community/src/main/java/org/springblade/community/mapper/AgencyMapper.xml

@@ -36,6 +36,7 @@
         <result column="boundary_path" property="boundaryPath"/>
         <result column="tenant_password" property="tenantPassword"/>
         <result column="grid_id" property="gridId"/>
+        <result column="agency_type" property="agencyType"/>
     </resultMap>
 
 

+ 26 - 19
blade-service/device/src/main/java/org/springblade/device/controller/GbDeviceStatisticsController.java

@@ -5,7 +5,9 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.mp.support.Condition;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
 import org.springblade.device.entity.Gb28181Device;
 import org.springblade.device.entity.GbDeviceChannel;
@@ -17,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 监控设备统计
@@ -26,7 +29,7 @@ import java.util.List;
 @AllArgsConstructor
 @RequestMapping("/gbdevicestatistics")
 @Api(value = "", tags = "接口")
-public class GbDeviceStatisticsController {
+public class GbDeviceStatisticsController extends BladeController {
 
 	private final IGbDeviceService gbDeviceService;
 	private final IGbDeviceChannelService gbDeviceChannelService;
@@ -34,27 +37,31 @@ public class GbDeviceStatisticsController {
 	/**
 	 * 监控设备统计【web端智能安防】
 	 */
-	@GetMapping("/monitoringaids")
+	@GetMapping("/stat")
 	@ApiOperationSupport(order = 1)
-	@ApiOperation(value = "详情", notes = "传入doorDevice")
-	public R monitoringaids(){
+	@ApiOperation(value = "监控设备统计")
+	public R<GbDeviceStatisticsVO> stat(BladeUser bladeUser){
 		List<Gb28181Device> gbDeviceList = gbDeviceService.list();
-		Long total = 0L;
-		Long onlineCount = 0L;
-		Long offlineCount = 0L;
-		Long waringCount = 0L;
-		if (CollUtil.isNotEmpty(gbDeviceList)) {
-			for (Gb28181Device device : gbDeviceList) {
-				List<GbDeviceChannel> deviceChannelList = gbDeviceChannelService.list(Condition.getQueryWrapper(new GbDeviceChannel()).lambda()
-					.eq(GbDeviceChannel::getDeviceId, device.getDeviceId()));
-				total += deviceChannelList.stream().count();
-			}
-		}
+		int deviceCnt = 0;
+		int channelCnt = 0;
+		int deviceOnlineCnt = 0;
+		int deviceOfflineCnt = 0;
+		int channelAlarmCnt = 0;
+		deviceCnt = gbDeviceList.size();
+		List<GbDeviceChannel> deviceChannelList = gbDeviceChannelService.selectByDeviceIds(gbDeviceList.stream().map(Gb28181Device::getDeviceId).collect(Collectors.toList()));
+		channelCnt = deviceChannelList.size();
+		List<Gb28181Device> deviceOnlineList = gbDeviceList.stream().filter(device -> device.getOnline() == 1).collect(Collectors.toList());
+		List<Gb28181Device> deviceOfflineList = gbDeviceList.stream().filter(device -> device.getOnline() == 2).collect(Collectors.toList());
+		deviceOnlineCnt = deviceOnlineList.size();
+		deviceOfflineCnt = deviceOfflineList.size();
+		List<GbDeviceChannel> channelAlarmList = deviceChannelList.stream().filter(channel -> channel.getIsAlarm() == 1).collect(Collectors.toList());
+		channelAlarmCnt = channelAlarmList.size();
 		return R.data(GbDeviceStatisticsVO.builder()
-			.total(total)
-			.onlineCount(onlineCount)
-			.offlineCount(offlineCount)
-			.waringCount(waringCount)
+			.deviceCnt(deviceCnt)
+			.channelCnt(channelCnt)
+			.deviceOnlineCnt(deviceOnlineCnt)
+			.deviceOfflineCnt(deviceOfflineCnt)
+			.channelAlarmCnt(channelAlarmCnt)
 			.build());
 	}
 

+ 1 - 0
blade-service/device/src/main/java/org/springblade/device/mapper/GbDeviceChannelMapper.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.device.mapper;
 
+import org.apache.ibatis.annotations.Param;
 import org.springblade.device.entity.GbDeviceChannel;
 import org.springblade.device.vo.GbDeviceChannelVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;

+ 2 - 0
blade-service/device/src/main/java/org/springblade/device/service/IGbDeviceChannelService.java

@@ -50,4 +50,6 @@ public interface IGbDeviceChannelService extends BaseService<GbDeviceChannel> {
 
 	R<String> stop(String deviceId, String channelId);
 
+	List<GbDeviceChannel> selectByDeviceIds(List<String> deviceIdList);
+
 }

+ 8 - 0
blade-service/device/src/main/java/org/springblade/device/service/impl/GbDeviceChannelServiceImpl.java

@@ -95,4 +95,12 @@ public class GbDeviceChannelServiceImpl extends BaseServiceImpl<GbDeviceChannelM
 		return stopResult;
 	}
 
+	@Override
+	public List<GbDeviceChannel> selectByDeviceIds(List<String> deviceIdList) {
+		LambdaQueryWrapper<GbDeviceChannel> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.in(GbDeviceChannel::getDeviceId, deviceIdList);
+		return this.list(lambdaQueryWrapper);
+
+	}
+
 }

+ 0 - 42
blade-service/enterprise/src/main/java/org/springblade/enterprise/controller/EnterpriseController.java

@@ -89,48 +89,6 @@ public class EnterpriseController extends BladeController {
 	public R<IPage<EnterpriseVO>> list(@RequestParam Map<String,Object> enterprise, Query query, BladeUser bladeUser) {
 		String deptId = bladeUser.getDeptId();
 		String[] deptIds = deptId.split(",");
-//
-//		Dept dept = new Dept();
-//		dept.setId(Long.valueOf(deptIds[0]));
-//		DeptVO deptVO = deptClient.detail(dept);
-//		if (dept == null){
-//			return null;
-//		}
-//		if (dept.getDeptCategory() == 1){
-//			String creditCode = null, password = null;
-//			if (enterprise.get("creditCode") != null) {
-//				creditCode = enterprise.get("creditCode").toString();
-//				enterprise.remove("creditCode");
-//			}
-//			if (enterprise.get("password") != null) {
-//				password = enterprise.get("password").toString();
-//				enterprise.remove("password");
-//			}
-//			LambdaQueryWrapper<Enterprise> wrapper = Condition.getQueryWrapper(enterprise, Enterprise.class).lambda();
-//
-//			OrgPosition orgPosition = orgPositionService.getBaseMapper().selectOne(new QueryWrapper<>(new OrgPosition()).lambda().eq(OrgPosition::getOrgId, dept.getId()));
-//			if (orgPosition == null){
-//				return null;
-//			}
-//			String[] enterpriseIds = orgPosition.getEnterpriseIds().split(",");
-//			if (creditCode != null) {
-//				wrapper.eq(Enterprise::getCreditCode, creditCode);
-//			}
-//			if (password != null) {
-//				wrapper.eq(Enterprise::getPassword, password);
-//			}
-//			wrapper.in(Enterprise::getId, enterpriseIds);
-//			IPage<Enterprise> page = enterpriseService.page(Condition.getPage(query), wrapper);
-//			return R.data(EnterpriseWrapper.build(agencyService,residentialService).pageVO(page));
-//		}else {
-//			LambdaQueryWrapper<Enterprise> wrapper = Condition.getQueryWrapper(enterprise, Enterprise.class).lambda();
-//			//获取角色信息
-//			Role role = roleService.getById(bladeUser.getRoleId());
-//			//非超管,根据tenantId租户id过滤
-//			if (!role.getRoleAlias().equals("administrator")){
-//				wrapper.eq(Enterprise::getTenantId,bladeUser.getTenantId());
-//			}
-//		}
 		LambdaQueryWrapper<Enterprise> wrapper = Condition.getQueryWrapper(enterprise,Enterprise.class).lambda();
 		wrapper.orderByDesc(Enterprise::getCreateTime);
 		IPage<Enterprise> pages = enterpriseService.page(Condition.getPage(query), wrapper);

+ 6 - 0
blade-service/enterprise/src/main/java/org/springblade/enterprise/feign/EnterpriseClient.java

@@ -118,5 +118,11 @@ public class EnterpriseClient implements IEnterpriseClient {
 		return enterpriseService.getBaseMapper().selectList(enterpriseLambdaQueryWrapper);
 	}
 
+	@Override
+	@GetMapping("/count")
+	public Integer count(@RequestParam(value = "tenantId", required = false) String tenantId) {
+    	return enterpriseService.count();
+	}
+
 
 }

+ 7 - 1
blade-service/enterprise/src/main/java/org/springblade/enterprise/feign/StaffClient.java

@@ -1,5 +1,6 @@
 package org.springblade.enterprise.feign;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import io.swagger.annotations.ApiParam;
 import lombok.AllArgsConstructor;
 import javax.validation.Valid;
@@ -24,7 +25,6 @@ import java.util.List;
 @AllArgsConstructor
 @RestController
 @RequestMapping("/feign/staff")
-
 public class StaffClient implements IStaffClient {
 
     private final IStaffService staffService;
@@ -93,5 +93,11 @@ public class StaffClient implements IStaffClient {
         return staffService.deleteLogic(Func.toLongList(ids));
         }
 
+	@Override
+	@GetMapping("/count")
+	public Integer count(@RequestParam(value = "tenantId", required = false) String tenantId) {
+		return staffService.count();
+	}
+
 
 }

+ 8 - 4
blade-service/enterprise/src/main/java/org/springblade/enterprise/wrapper/EnterpriseWrapper.java

@@ -16,6 +16,8 @@
  */
 package org.springblade.enterprise.wrapper;
 
+import org.springblade.community.entity.Agency;
+import org.springblade.community.feign.IAgencyClient;
 import org.springblade.core.mp.support.BaseEntityWrapper;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
@@ -35,9 +37,11 @@ import java.util.Objects;
 public class EnterpriseWrapper extends BaseEntityWrapper<Enterprise, EnterpriseVO>  {
 
 	private static IDictBizClient dictBizClient;
+	private static IAgencyClient agencyClient;
 
 	static {
 		dictBizClient = SpringUtil.getBean(IDictBizClient.class);
+		agencyClient = SpringUtil.getBean(IAgencyClient.class);
 	}
 	public static EnterpriseWrapper build() {
 		return new EnterpriseWrapper();
@@ -48,10 +52,10 @@ public class EnterpriseWrapper extends BaseEntityWrapper<Enterprise, EnterpriseV
 		EnterpriseVO enterpriseVO = Objects.requireNonNull(BeanUtil.copy(enterprise, EnterpriseVO.class));
 		R<String> enterpriseTypeNameR = dictBizClient.getValue("enterprise_type", enterprise.getEnterpriseType());
 		enterpriseVO.setEnterpriseTypeName(enterpriseTypeNameR.getData());
-		//User createUser = UserCache.getUser(enterprise.getCreateUser());
-		//User updateUser = UserCache.getUser(enterprise.getUpdateUser());
-		//enterpriseVO.setCreateUserName(createUser.getName());
-		//enterpriseVO.setUpdateUserName(updateUser.getName());
+		Agency agency = agencyClient.getById(enterprise.getAgencyId());
+		if(agency != null){
+			enterpriseVO.setAgencyName(agency.getName());
+		}
 
 		return enterpriseVO;
 	}

+ 8 - 4
blade-service/enterprise/src/main/java/org/springblade/enterprise/wrapper/StaffWrapper.java

@@ -16,6 +16,8 @@
  */
 package org.springblade.enterprise.wrapper;
 
+import org.springblade.community.entity.Agency;
+import org.springblade.community.feign.IAgencyClient;
 import org.springblade.core.mp.support.BaseEntityWrapper;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.SpringUtil;
@@ -38,10 +40,12 @@ public class StaffWrapper extends BaseEntityWrapper<Staff, StaffVO>  {
 
 	private static IConfClient confClient;
 	private static IDeptService deptService;
+	private static IAgencyClient agencyClient;
 
 	static {
 		confClient = SpringUtil.getBean(IConfClient.class);
 		deptService = SpringUtil.getBean(IDeptService.class);
+		agencyClient = SpringUtil.getBean(IAgencyClient.class);
 	}
 	public static StaffWrapper build() {
 		return new StaffWrapper();
@@ -58,10 +62,10 @@ public class StaffWrapper extends BaseEntityWrapper<Staff, StaffVO>  {
 				staffVO.setEnterpriseDeptName(dept.getName());
 			}
 		}
-		//User createUser = UserCache.getUser(staff.getCreateUser());
-		//User updateUser = UserCache.getUser(staff.getUpdateUser());
-		//staffVO.setCreateUserName(createUser.getName());
-		//staffVO.setUpdateUserName(updateUser.getName());
+		Agency agency = agencyClient.getById(staff.getAgencyId());
+		if(agency != null){
+			staffVO.setAgencyName(agency.getName());
+		}
 
 		return staffVO;
 	}

+ 129 - 0
blade-service/estate/src/main/java/org/springblade/estate/controller/AssetsController.java

@@ -0,0 +1,129 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.estate.entity.Assets;
+import org.springblade.estate.vo.AssetsVO;
+import org.springblade.estate.wrapper.AssetsWrapper;
+import org.springblade.estate.service.IAssetsService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2022-01-10
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/assets")
+@Api(value = "", tags = "接口")
+public class AssetsController extends BladeController {
+
+	private final IAssetsService assetsService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入assets")
+	public R<AssetsVO> detail(Assets assets) {
+		Assets detail = assetsService.getOne(Condition.getQueryWrapper(assets));
+		return R.data(AssetsWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入assets")
+	public R<IPage<AssetsVO>> list(Assets assets, Query query) {
+		IPage<Assets> pages = assetsService.page(Condition.getPage(query), Condition.getQueryWrapper(assets));
+		return R.data(AssetsWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入assets")
+	public R<IPage<AssetsVO>> page(AssetsVO assets, Query query) {
+		IPage<AssetsVO> pages = assetsService.selectAssetsPage(Condition.getPage(query), assets);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入assets")
+	public R save(@Valid @RequestBody Assets assets) {
+		return R.status(assetsService.save(assets));
+	}
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入assets")
+	public R update(@Valid @RequestBody Assets assets) {
+		return R.status(assetsService.updateById(assets));
+	}
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入assets")
+	public R submit(@Valid @RequestBody Assets assets) {
+		return R.status(assetsService.saveOrUpdate(assets));
+	}
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(assetsService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 129 - 0
blade-service/estate/src/main/java/org/springblade/estate/controller/ParkingAreaController.java

@@ -0,0 +1,129 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.estate.entity.ParkingArea;
+import org.springblade.estate.vo.ParkingAreaVO;
+import org.springblade.estate.wrapper.ParkingAreaWrapper;
+import org.springblade.estate.service.IParkingAreaService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2022-01-11
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/parkingarea")
+@Api(value = "", tags = "接口")
+public class ParkingAreaController extends BladeController {
+
+	private final IParkingAreaService parkingAreaService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入parkingArea")
+	public R<ParkingAreaVO> detail(ParkingArea parkingArea) {
+		ParkingArea detail = parkingAreaService.getOne(Condition.getQueryWrapper(parkingArea));
+		return R.data(ParkingAreaWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入parkingArea")
+	public R<IPage<ParkingAreaVO>> list(ParkingArea parkingArea, Query query) {
+		IPage<ParkingArea> pages = parkingAreaService.page(Condition.getPage(query), Condition.getQueryWrapper(parkingArea));
+		return R.data(ParkingAreaWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入parkingArea")
+	public R<IPage<ParkingAreaVO>> page(ParkingAreaVO parkingArea, Query query) {
+		IPage<ParkingAreaVO> pages = parkingAreaService.selectParkingAreaPage(Condition.getPage(query), parkingArea);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入parkingArea")
+	public R save(@Valid @RequestBody ParkingArea parkingArea) {
+		return R.status(parkingAreaService.save(parkingArea));
+	}
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入parkingArea")
+	public R update(@Valid @RequestBody ParkingArea parkingArea) {
+		return R.status(parkingAreaService.updateById(parkingArea));
+	}
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入parkingArea")
+	public R submit(@Valid @RequestBody ParkingArea parkingArea) {
+		return R.status(parkingAreaService.saveOrUpdate(parkingArea));
+	}
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(parkingAreaService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 90 - 0
blade-service/estate/src/main/java/org/springblade/estate/feign/AssetsClient.java

@@ -0,0 +1,90 @@
+package org.springblade.estate.feign;
+
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springblade.estate.entity.Assets;
+import org.springblade.estate.vo.AssetsVO;
+import org.springblade.estate.wrapper.AssetsWrapper;
+import org.springblade.estate.service.IAssetsService;
+import org.springblade.core.boot.ctrl.BladeController;
+import java.util.List;
+/**
+ *  client
+ *
+ * @author lianghanqiang
+ * @since 2022-01-10
+ */
+
+@AllArgsConstructor
+@RestController
+@RequestMapping("/feign/assets")
+
+public class AssetsClient implements IAssetsClient {
+
+    private final IAssetsService assetsService;
+
+        /**
+     * 详情
+     */
+    @Override
+    @GetMapping("/detail")
+    public AssetsVO detail(Assets assets) {
+        Assets detail = assetsService.getOne(Condition.getQueryWrapper(assets));
+        return AssetsWrapper.build().entityVO(detail);
+        }
+
+    /**
+     * 查询 
+     */
+    @Override
+    @GetMapping("/list")
+    public List<AssetsVO> list(Assets assets) {
+        return AssetsWrapper.build().listVO(assetsService.list(Condition.getQueryWrapper(assets)));
+        }
+
+    
+
+    /**
+     * 新增 
+     */
+    @Override
+    @PostMapping("/save")
+    public boolean save(@Valid @RequestBody Assets assets) {
+        return assetsService.save(assets);
+        }
+
+    /**
+     * 修改 
+     */
+    @Override
+    @PostMapping("/update")
+    public boolean update(@Valid @RequestBody Assets assets) {
+        return assetsService.updateById(assets);
+        }
+
+    /**
+     * 新增或修改 
+     */
+    @Override
+    @PostMapping("/submit")
+    public boolean submit(@Valid @RequestBody Assets assets) {
+        return assetsService.saveOrUpdate(assets);
+        }
+
+    
+    /**
+     * 删除 
+     */
+    @Override
+    @PostMapping("/remove")
+    public boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        return assetsService.deleteLogic(Func.toLongList(ids));
+        }
+
+    
+}

+ 63 - 0
blade-service/estate/src/main/java/org/springblade/estate/feign/IParkingAreaClient.java

@@ -0,0 +1,63 @@
+package org.springblade.estate.feign;
+
+import io.swagger.annotations.ApiParam;
+import org.springblade.estate.entity.ParkingArea;
+import org.springblade.estate.vo.ParkingAreaVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ *  Feign
+ *
+ * @author lianghanqiang
+ * @since 2022-01-11
+ */
+@FeignClient(value = "cyzh-estate",path = "/feign/parkingarea")
+public interface IParkingAreaClient  {
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+    ParkingAreaVO detail(ParkingArea parkingArea);
+
+	/**
+	 * 查询 
+	 */
+	@GetMapping("/list")
+    List<ParkingAreaVO> list(ParkingArea parkingArea);
+
+
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	boolean save(@Valid @RequestBody ParkingArea parkingArea);
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+    boolean update(@Valid @RequestBody ParkingArea parkingArea);
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+    boolean submit(@Valid @RequestBody ParkingArea parkingArea);
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);
+
+	
+}

+ 9 - 5
blade-service/estate/src/main/java/org/springblade/estate/feign/ServerUserClient.java

@@ -1,5 +1,6 @@
 package org.springblade.estate.feign;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import io.swagger.annotations.ApiParam;
 import lombok.AllArgsConstructor;
 import javax.validation.Valid;
@@ -11,7 +12,6 @@ import org.springblade.estate.entity.ServerUser;
 import org.springblade.estate.vo.ServerUserVO;
 import org.springblade.estate.wrapper.ServerUserWrapper;
 import org.springblade.estate.service.IServerUserService;
-import org.springblade.core.boot.ctrl.BladeController;
 import java.util.List;
 /**
  * 服务人员 client
@@ -23,7 +23,6 @@ import java.util.List;
 @AllArgsConstructor
 @RestController
 @RequestMapping("/feign/serveruser")
-
 public class ServerUserClient implements IServerUserClient {
 
     private final IServerUserService serverUserService;
@@ -47,7 +46,7 @@ public class ServerUserClient implements IServerUserClient {
         return ServerUserWrapper.build().listVO(serverUserService.list(Condition.getQueryWrapper(serverUser)));
         }
 
-    
+
 
     /**
      * 新增 服务人员
@@ -76,7 +75,7 @@ public class ServerUserClient implements IServerUserClient {
         return serverUserService.saveOrUpdate(serverUser);
         }
 
-    
+
     /**
      * 删除 服务人员
      */
@@ -86,5 +85,10 @@ public class ServerUserClient implements IServerUserClient {
         return serverUserService.deleteLogic(Func.toLongList(ids));
         }
 
-    
+	@Override
+	@GetMapping("/count")
+	public Integer count(@RequestParam(value = "tenantId", required = false) String tenantId) {
+		return serverUserService.count();
+	}
+
 }

+ 42 - 0
blade-service/estate/src/main/java/org/springblade/estate/mapper/AssetsMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.mapper;
+
+import org.springblade.estate.entity.Assets;
+import org.springblade.estate.vo.AssetsVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-01-10
+ */
+public interface AssetsMapper extends BaseMapper<Assets> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param assets
+	 * @return
+	 */
+	List<AssetsVO> selectAssetsPage(IPage page, AssetsVO assets);
+
+}

+ 29 - 0
blade-service/estate/src/main/java/org/springblade/estate/mapper/AssetsMapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.estate.mapper.AssetsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="assetsResultMap" type="org.springblade.estate.entity.Assets">
+        <result column="id" property="id"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="create_user" property="createUser"/>
+        <result column="status" property="status"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="assets_no" property="assetsNo"/>
+        <result column="assets_name" property="assetsName"/>
+        <result column="assets_value" property="assetsValue"/>
+        <result column="assets_category" property="assetsCategory"/>
+        <result column="assets_img" property="assetsImg"/>
+        <result column="assets_desc" property="assetsDesc"/>
+        <result column="assets_record_time" property="assetsRecordTime"/>
+    </resultMap>
+
+
+    <select id="selectAssetsPage" resultMap="assetsResultMap">
+        select * from estate_assets where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/estate/src/main/java/org/springblade/estate/mapper/ParkingAreaMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.mapper;
+
+import org.springblade.estate.entity.ParkingArea;
+import org.springblade.estate.vo.ParkingAreaVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-01-11
+ */
+public interface ParkingAreaMapper extends BaseMapper<ParkingArea> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param parkingArea
+	 * @return
+	 */
+	List<ParkingAreaVO> selectParkingAreaPage(IPage page, ParkingAreaVO parkingArea);
+
+}

+ 28 - 0
blade-service/estate/src/main/java/org/springblade/estate/mapper/ParkingAreaMapper.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.estate.mapper.ParkingAreaMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="parkingAreaResultMap" type="org.springblade.estate.entity.ParkingArea">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="name" property="name"/>
+        <result column="paking_space_params" property="pakingSpaceParams"/>
+        <result column="width" property="width"/>
+        <result column="height" property="height"/>
+        <result column="left" property="left"/>
+        <result column="top" property="top"/>
+    </resultMap>
+
+
+    <select id="selectParkingAreaPage" resultMap="parkingAreaResultMap">
+        select * from estate_parking_area where is_deleted = 0
+    </select>
+
+</mapper>

+ 2 - 2
blade-service/estate/src/main/java/org/springblade/estate/mapper/RepairMapper.xml

@@ -19,8 +19,9 @@
         <result column="handler" property="handler"/>
         <result column="handler_phone" property="handlerPhone"/>
         <result column="job_status" property="jobStatus"/>
+        <result column="agency_id" property="agencyId"/>
         <result column="residential_id" property="residentialId"/>
-        <result column="org_position" property="orgPosition"/>
+        <result column="enterprise_id" property="enterpriseId"/>
         <result column="report_position" property="reportPosition"/>
         <result column="begin_time" property="beginTime"/>
         <result column="end_time" property="endTime"/>
@@ -28,7 +29,6 @@
         <result column="comment" property="comment"/>
         <result column="handle_time" property="handleTime"/>
         <result column="residential_name" property="residentialName"/>
-        <result column="old_id" property="oldId"/>
         <result column="pic" property="pic"/>
         <result column="report_detail" property="reportDetail"/>
         <result column="tenant_id" property="tenantId"/>

+ 41 - 0
blade-service/estate/src/main/java/org/springblade/estate/service/IAssetsService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.service;
+
+import org.springblade.estate.entity.Assets;
+import org.springblade.estate.vo.AssetsVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2022-01-10
+ */
+public interface IAssetsService extends BaseService<Assets> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param assets
+	 * @return
+	 */
+	IPage<AssetsVO> selectAssetsPage(IPage<AssetsVO> page, AssetsVO assets);
+
+}

+ 41 - 0
blade-service/estate/src/main/java/org/springblade/estate/service/IParkingAreaService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.service;
+
+import org.springblade.estate.entity.ParkingArea;
+import org.springblade.estate.vo.ParkingAreaVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2022-01-11
+ */
+public interface IParkingAreaService extends BaseService<ParkingArea> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param parkingArea
+	 * @return
+	 */
+	IPage<ParkingAreaVO> selectParkingAreaPage(IPage<ParkingAreaVO> page, ParkingAreaVO parkingArea);
+
+}

+ 41 - 0
blade-service/estate/src/main/java/org/springblade/estate/service/impl/AssetsServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.service.impl;
+
+import org.springblade.estate.entity.Assets;
+import org.springblade.estate.vo.AssetsVO;
+import org.springblade.estate.mapper.AssetsMapper;
+import org.springblade.estate.service.IAssetsService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2022-01-10
+ */
+@Service
+public class AssetsServiceImpl extends BaseServiceImpl<AssetsMapper, Assets> implements IAssetsService {
+
+	@Override
+	public IPage<AssetsVO> selectAssetsPage(IPage<AssetsVO> page, AssetsVO assets) {
+		return page.setRecords(baseMapper.selectAssetsPage(page, assets));
+	}
+
+}

+ 41 - 0
blade-service/estate/src/main/java/org/springblade/estate/service/impl/ParkingAreaServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.service.impl;
+
+import org.springblade.estate.entity.ParkingArea;
+import org.springblade.estate.vo.ParkingAreaVO;
+import org.springblade.estate.mapper.ParkingAreaMapper;
+import org.springblade.estate.service.IParkingAreaService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2022-01-11
+ */
+@Service
+public class ParkingAreaServiceImpl extends BaseServiceImpl<ParkingAreaMapper, ParkingArea> implements IParkingAreaService {
+
+	@Override
+	public IPage<ParkingAreaVO> selectParkingAreaPage(IPage<ParkingAreaVO> page, ParkingAreaVO parkingArea) {
+		return page.setRecords(baseMapper.selectParkingAreaPage(page, parkingArea));
+	}
+
+}

+ 49 - 0
blade-service/estate/src/main/java/org/springblade/estate/wrapper/AssetsWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.estate.entity.Assets;
+import org.springblade.estate.vo.AssetsVO;
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2022-01-10
+ */
+public class AssetsWrapper extends BaseEntityWrapper<Assets, AssetsVO>  {
+
+	public static AssetsWrapper build() {
+		return new AssetsWrapper();
+ 	}
+
+	@Override
+	public AssetsVO entityVO(Assets assets) {
+		AssetsVO assetsVO = Objects.requireNonNull(BeanUtil.copy(assets, AssetsVO.class));
+
+		//User createUser = UserCache.getUser(assets.getCreateUser());
+		//User updateUser = UserCache.getUser(assets.getUpdateUser());
+		//assetsVO.setCreateUserName(createUser.getName());
+		//assetsVO.setUpdateUserName(updateUser.getName());
+
+		return assetsVO;
+	}
+
+}

+ 49 - 0
blade-service/estate/src/main/java/org/springblade/estate/wrapper/ParkingAreaWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.estate.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.estate.entity.ParkingArea;
+import org.springblade.estate.vo.ParkingAreaVO;
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2022-01-11
+ */
+public class ParkingAreaWrapper extends BaseEntityWrapper<ParkingArea, ParkingAreaVO>  {
+
+	public static ParkingAreaWrapper build() {
+		return new ParkingAreaWrapper();
+ 	}
+
+	@Override
+	public ParkingAreaVO entityVO(ParkingArea parkingArea) {
+		ParkingAreaVO parkingAreaVO = Objects.requireNonNull(BeanUtil.copy(parkingArea, ParkingAreaVO.class));
+
+		//User createUser = UserCache.getUser(parkingArea.getCreateUser());
+		//User updateUser = UserCache.getUser(parkingArea.getUpdateUser());
+		//parkingAreaVO.setCreateUserName(createUser.getName());
+		//parkingAreaVO.setUpdateUserName(updateUser.getName());
+
+		return parkingAreaVO;
+	}
+
+}