Browse Source

配置修改

jichaobo 2 years ago
parent
commit
fa2e2871ab
49 changed files with 764 additions and 1073 deletions
  1. 54 4
      fiveep-controller/pom.xml
  2. 6 4
      fiveep-controller/src/main/java/com/bizmatics/controller/DemoControllerApplication.java
  3. 69 7
      fiveep-controller/src/main/java/com/bizmatics/controller/web/AlarmPowerController.java
  4. 215 33
      fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceController.java
  5. 0 26
      fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceStatusController.java
  6. 4 3
      fiveep-controller/src/main/java/com/bizmatics/controller/web/FacilityController.java
  7. 137 19
      fiveep-controller/src/main/java/com/bizmatics/controller/web/HtAnalogDataController.java
  8. 0 26
      fiveep-controller/src/main/java/com/bizmatics/controller/web/HtSwitchDataController.java
  9. 0 26
      fiveep-controller/src/main/java/com/bizmatics/controller/web/RouteController.java
  10. 88 16
      fiveep-controller/src/main/java/com/bizmatics/controller/web/RtAnalogDataController.java
  11. 9 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/RtSwitchDataController.java
  12. 111 10
      fiveep-controller/src/main/java/com/bizmatics/controller/web/SiteController.java
  13. 0 13
      fiveep-controller/src/main/java/com/bizmatics/controller/web/SiteObjectController.java
  14. 71 7
      fiveep-controller/src/main/java/com/bizmatics/controller/web/SitedtlController.java
  15. 0 22
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcAccessTokenController.java
  16. 0 22
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcKeySecretController.java
  17. 0 22
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcMeasTypeController.java
  18. 0 22
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcUserController.java
  19. 0 22
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcUserTokenController.java
  20. 0 8
      fiveep-model/src/main/java/com/bizmatics/model/Test.java
  21. 0 40
      fiveep-model/src/main/java/com/bizmatics/model/WcAccessToken.java
  22. 0 50
      fiveep-model/src/main/java/com/bizmatics/model/WcKeySecret.java
  23. 0 36
      fiveep-model/src/main/java/com/bizmatics/model/WcMeasType.java
  24. 0 58
      fiveep-model/src/main/java/com/bizmatics/model/WcUser.java
  25. 0 43
      fiveep-model/src/main/java/com/bizmatics/model/WcUserToken.java
  26. 0 16
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcAccessTokenMapper.java
  27. 0 16
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcKeySecretMapper.java
  28. 0 16
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcMeasTypeMapper.java
  29. 0 16
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcUserMapper.java
  30. 0 16
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcUserTokenMapper.java
  31. 0 12
      fiveep-persistence/src/main/resources/mapper/mysql/WcAccessTokenMapper.xml
  32. 0 14
      fiveep-persistence/src/main/resources/mapper/mysql/WcKeySecretMapper.xml
  33. 0 12
      fiveep-persistence/src/main/resources/mapper/mysql/WcMeasTypeMapper.xml
  34. 0 15
      fiveep-persistence/src/main/resources/mapper/mysql/WcUserMapper.xml
  35. 0 12
      fiveep-persistence/src/main/resources/mapper/mysql/WcUserTokenMapper.xml
  36. 0 16
      fiveep-service/src/main/java/com/bizmatics/service/WcAccessTokenService.java
  37. 0 16
      fiveep-service/src/main/java/com/bizmatics/service/WcKeySecretService.java
  38. 0 16
      fiveep-service/src/main/java/com/bizmatics/service/WcMeasTypeService.java
  39. 0 16
      fiveep-service/src/main/java/com/bizmatics/service/WcUserService.java
  40. 0 16
      fiveep-service/src/main/java/com/bizmatics/service/WcUserTokenService.java
  41. 0 22
      fiveep-service/src/main/java/com/bizmatics/service/config/MyWebConfigurer.java
  42. 0 53
      fiveep-service/src/main/java/com/bizmatics/service/config/SessionFilter.java
  43. 0 20
      fiveep-service/src/main/java/com/bizmatics/service/impl/WcAccessTokenServiceImpl.java
  44. 0 20
      fiveep-service/src/main/java/com/bizmatics/service/impl/WcKeySecretServiceImpl.java
  45. 0 20
      fiveep-service/src/main/java/com/bizmatics/service/impl/WcMeasTypeServiceImpl.java
  46. 0 20
      fiveep-service/src/main/java/com/bizmatics/service/impl/WcUserServiceImpl.java
  47. 0 20
      fiveep-service/src/main/java/com/bizmatics/service/impl/WcUserTokenServiceImpl.java
  48. 0 87
      fiveep-service/src/main/java/com/bizmatics/service/util/Arith.java
  49. 0 43
      fiveep-service/src/main/java/com/bizmatics/service/util/SessionLocal.java

+ 54 - 4
fiveep-controller/pom.xml

@@ -2,15 +2,15 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>fiveep-controller</artifactId>
+    <artifactId>usky-power-controller</artifactId>
     <version>0.0.1</version>
-    <name>fiveep-controller</name>
+    <name>usky-power-controller</name>
 
     <properties>
         <project.name>${parent.name}</project.name>
     </properties>
     <parent>
-        <artifactId>fiveep</artifactId>
+        <artifactId>usky-power</artifactId>
         <groupId>com.bizmatics</groupId>
         <version>0.0.1</version>
     </parent>
@@ -18,7 +18,7 @@
     <dependencies>
         <dependency>
             <groupId>com.bizmatics</groupId>
-            <artifactId>fiveep-service</artifactId>
+            <artifactId>usky-power-service</artifactId>
             <version>0.0.1</version>
         </dependency>
 
@@ -52,6 +52,50 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-log4j2</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-jul</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.logging.log4j</groupId>
+                    <artifactId>log4j-slf4j-impl</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <version>2.17.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <version>2.17.1</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>log4j-api</artifactId>
+                    <groupId>org.apache.logging.log4j</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-jul</artifactId>
+            <version>2.17.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
+            <version>2.17.1</version>
         </dependency>
 
         <dependency>
@@ -64,6 +108,12 @@
             <artifactId>spring-web</artifactId>
             <version>5.2.7.RELEASE</version>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.4</version>
+        </dependency>
+
 
 <!--        <dependency>-->
 <!--            <groupId>org.springframework.cloud</groupId>-->

+ 6 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/DemoControllerApplication.java

@@ -1,17 +1,19 @@
 package com.bizmatics.controller;
 
+import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.servlet.ServletComponentScan;
-import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
-@ServletComponentScan("com.bizmatics.service.config.SessionFilter")
-@EnableFeignClients("com.bizmatics")
 @ComponentScan("com.bizmatics")
 @SpringBootApplication
 @EnableTransactionManagement
+@EnableScheduling
+@MapperScan(value = "com.bizmatics.persistence.mapper")
+@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true)
 public class DemoControllerApplication {
 
     public static void main(String[] args) {

+ 69 - 7
fiveep-controller/src/main/java/com/bizmatics/controller/web/AlarmPowerController.java

@@ -5,14 +5,14 @@ import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.common.core.bean.CommonPage;
 import com.bizmatics.model.AlarmPower;
 import com.bizmatics.service.AlarmPowerService;
+import com.bizmatics.service.aop.BusinessType;
+import com.bizmatics.service.aop.Log;
+import com.bizmatics.service.vo.AlarmGradeVO;
+import com.bizmatics.service.vo.AlarmVO;
 import com.bizmatics.service.vo.ApCountVO;
 import com.bizmatics.service.vo.CommonIcoVO;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
 import java.util.List;
@@ -39,8 +39,10 @@ public class AlarmPowerController {
      * @return
      */
     @GetMapping("/count")
-    public ApiResult<ApCountVO> count(@RequestParam(required = false) Integer siteId) {
-        return ApiResult.success(alarmPowerService.selectCount(siteId));
+    public ApiResult<ApCountVO> count(@RequestParam(required = false) Integer siteId,
+                                      @RequestParam(required = false) Date startTime,
+                                      @RequestParam(required = false) Date endTime) {
+        return ApiResult.success(alarmPowerService.selectCount(siteId,startTime,endTime));
     }
 
 
@@ -79,6 +81,65 @@ public class AlarmPowerController {
         return ApiResult.success(alarmPowerService.page(startTime, endTime, status, siteId, current, size));
     }
 
+    /**
+     * 告警等级统计
+     * @param siteId 站点id
+     * @param startTime 开始时间
+     * @param endTime 结束时间
+     * @param current 页数
+     * @param size 条数
+     * @return
+     */
+    @GetMapping("/alarmGradeCount")
+    public ApiResult<CommonPage<AlarmGradeVO>> alarmGradeCount(@RequestParam(required = false) Integer siteId,
+                                                               @RequestParam(required = false) Date startTime,
+                                                               @RequestParam(required = false) Date endTime,
+                                                               @RequestParam Integer current,
+                                                               @RequestParam Integer size){
+        return ApiResult.success(alarmPowerService.alarmGradeCount(siteId, startTime, endTime, current, size));
+    }
+
+    /**
+     * 告警等级集合
+     * @param siteId 站点id
+     * @param startTime 开始时间
+     * @param endTime 结束时间
+     * @param current 页数
+     * @param size 条数
+     * @return
+     */
+    @GetMapping("/alarmGradeList")
+    public ApiResult<CommonPage<AlarmPower>> alarmGradeList(@RequestParam(required = false) Integer siteId,
+                                                            @RequestParam(required = false) Date startTime,
+                                                            @RequestParam(required = false) Date endTime,
+                                                            @RequestParam Integer current,
+                                                            @RequestParam Integer size,
+                                                            @RequestParam(required = false) Integer type){
+
+        return ApiResult.success(alarmPowerService.alarmGradeList(siteId,startTime,endTime,current,size,type));
+    }
+
+    /**
+     * 电力详情
+     * @param id
+     * @return
+     */
+    @GetMapping("/{id}")
+    public ApiResult<AlarmVO> alarmGradeList(@PathVariable Long id){
+        return ApiResult.success(alarmPowerService.getOne(id));
+    }
+
+    /**
+     * 修改数据
+     * @param alarmPower
+     * @return
+     */
+    @Log(title = "电力告警", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public ApiResult<Boolean> update(@RequestBody AlarmPower alarmPower){
+        return ApiResult.success(alarmPowerService.updateById(alarmPower));
+    }
+
     @RequestMapping("LoopStatusList")
     public ApiResult<List<Map<String,Object>>> getLoopStatus(@RequestParam Integer siteId){
         return ApiResult.success(alarmPowerService.getLoopStatusList(siteId));
@@ -93,6 +154,7 @@ public class AlarmPowerController {
      * @param siteId 站点
      * @return
      */
+    @Log(title = "电力告警", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public ApiResult<String> export(@RequestParam(required = false) Date startTime,
                                                   @RequestParam(required = false) Date endTime,

+ 215 - 33
fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceController.java

@@ -2,28 +2,26 @@ package com.bizmatics.controller.web;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
-import com.bizmatics.common.core.util.DateUtils;
+import com.bizmatics.common.core.bean.CommonPage;
 import com.bizmatics.model.Device;
-import com.bizmatics.model.HtAnalogData;
-import com.bizmatics.persistence.mapper.DeviceMapper;
-import com.bizmatics.persistence.mapper.HtAnalogDataMapper;
+import com.bizmatics.model.DeviceList;
+import com.bizmatics.model.vo.CorrespondDeviceListVO;
+import com.bizmatics.model.vo.CorrespondDeviceVO;
+import com.bizmatics.model.vo.DeviceOneVo;
 import com.bizmatics.service.DeviceService;
+import com.bizmatics.service.aop.BusinessType;
+import com.bizmatics.service.aop.Log;
 import com.bizmatics.service.vo.DeviceCountVO;
-import lombok.Synchronized;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
 /**
- * 设备
+ * 设备管理-通信设备
  *
  * @author ya
  * @since 2021-07-07
@@ -35,46 +33,230 @@ public class DeviceController {
     @Autowired
     private DeviceService deviceService;
 
-    @Autowired
-    private DeviceMapper deviceMapper;
-
-    @Autowired
-    private HtAnalogDataMapper htAnalogDataMapper;
-
-
     /**
      * 查询设备总数
+     *
      * @param startTime
      * @param endTime
      * @return
      */
     @GetMapping("/count")
-    public ApiResult<DeviceCountVO> count(@RequestParam Date startTime, @RequestParam Date endTime){
-        return ApiResult.success(deviceService.selectDeviceCount(startTime,endTime));
+    public ApiResult<DeviceCountVO> count(@RequestParam Date startTime, @RequestParam Date endTime) {
+        return ApiResult.success(deviceService.selectDeviceCount(startTime, endTime));
     }
 
 
     /**
      * 查询不同类型的设备数量
+     *
      * @param site 站点id
      * @return
      */
     @GetMapping("/deviceTypeCount")
-    public ApiResult<DeviceCountVO> selectDeviceCountByType(@RequestParam Integer site){
+    public ApiResult<DeviceCountVO> selectDeviceCountByType(@RequestParam Integer site) {
         return ApiResult.success(deviceService.selectDeviceCountByType(site));
     }
 
-    @GetMapping("/test")
-    public List<String> test(){
-        List<Device> list = deviceMapper.list(1, null, null, null, null, null);
-        List<String> list1 = new ArrayList<>();
-        for (Device device:list) {
-            long l = System.currentTimeMillis();
-            List<HtAnalogData> list2 = htAnalogDataMapper.list(DateUtils.addYears(new Date(), -10), new Date(), device.getDeviceCode());
-            long e = System.currentTimeMillis();
-            log.info("一个站点的数据获取时间"+(e-l));
-        }
-        return list1;
+    /**
+     * 通信设备-设备下拉框查询
+     *
+     * @param siteId 站点ID
+     * @return
+     */
+    @GetMapping("deviceList")
+    public ApiResult<List<DeviceList>> deviceList(@RequestParam(value = "siteId", required = false, defaultValue = "0") String siteId) {
+        return ApiResult.success(deviceService.deviceList(siteId));
+    }
+
+
+    /**
+     * 数据管理-同比分析报表-右侧设备查询
+     *
+     * @param siteId     站点ID
+     * @param deviceType 设备类型 默认1、用电设备
+     * @return
+     */
+    @GetMapping("dataManagementDeviceList")
+    public ApiResult<List<DeviceOneVo>> dataManagementDeviceList(@RequestParam int siteId,
+                                                                 @RequestParam(value = "deviceType", required = false, defaultValue = "1") int deviceType) {
+        return ApiResult.success(deviceService.dataManagementDeviceList(siteId, deviceType));
+    }
+
+
+    /**
+     * 设备管理-通信设备-新增
+     *
+     * @param device
+     * @return
+     */
+    @Log(title = "设备管理-通信设备", businessType = BusinessType.INSERT)
+    @PostMapping("correspondDeviceAdd")
+    public ApiResult<Void> correspondDeviceAdd(@RequestBody Device device) {
+        deviceService.correspondDeviceAdd(device);
+        return ApiResult.success();
+    }
+
+    /**
+     * 设备管理-通信设备-修改
+     *
+     * @param device
+     * @return
+     */
+    @Log(title = "设备管理-通信设备", businessType = BusinessType.UPDATE)
+    @PostMapping("correspondDeviceUpdate")
+    public ApiResult<Void> correspondDeviceUpdate(@RequestBody Device device) {
+        deviceService.correspondDeviceUpdate(device);
+        return ApiResult.success();
+    }
+
+    /**
+     * 设备管理-通信设备-注销
+     *
+     * @param id
+     * @return
+     */
+    @Log(title = "设备管理-通信设备", businessType = BusinessType.DELETE)
+    @GetMapping("correspondDeviceDel")
+    public ApiResult<Void> correspondDeviceDel(@RequestParam int id) {
+        deviceService.correspondDeviceDel(id);
+        return ApiResult.success();
+    }
+
+    /**
+     * 设备管理-通信设备-查询
+     *
+     * @param deviceName 设备名称
+     * @param size       条数
+     * @param current    页数
+     * @return
+     */
+    @GetMapping("correspondDeviceList")
+    public ApiResult<CommonPage<CorrespondDeviceVO>> correspondDeviceList(@RequestParam(required = false) String deviceName,
+                                                                          @RequestParam(value = "size", required = false, defaultValue = "15") int size,
+                                                                          @RequestParam(value = "current", required = false, defaultValue = "1") int current) {
+        return ApiResult.success(deviceService.correspondDeviceList(deviceName, size, current));
+    }
+
+    /**
+     * 设备管理-通信设备-修改回显
+     *
+     * @param id 通信设备表主键ID
+     * @return
+     */
+    @GetMapping("correspondDeviceListEcho")
+    public ApiResult<List<CorrespondDeviceListVO>> correspondDeviceListEcho(@RequestParam int id) {
+        return ApiResult.success(deviceService.correspondDeviceListEcho(id));
+    }
+
+    /**
+     * 设备管理-视频监测-列表查询
+     *
+     * @param siteId     站点ID
+     * @param deviceName 设备名称
+     * @param size       页数
+     * @param current    条数
+     * @param deviceType 1:183用电设备,2:视频监控设备,3:171用电设备,4:173用电设备,5:158智能网关,6:其他 0:所有
+     * @return
+     */
+    @GetMapping("videoMonitoringDeviceList")
+    public ApiResult<CommonPage<Device>> videoMonitoringDeviceList(@RequestParam Integer siteId,
+                                                                   @RequestParam(required = false) String deviceName,
+                                                                   @RequestParam(value = "size", required = false, defaultValue = "10") Integer size,
+                                                                   @RequestParam(value = "current", required = false, defaultValue = "1") Integer current,
+                                                                   @RequestParam(value = "deviceType", required = false, defaultValue = "2") Integer deviceType
+    ) {
+        return ApiResult.success(deviceService.videoMonitoringDeviceList(deviceName, deviceType, siteId, size, current));
+    }
+
+
+    /**
+     * 设备管理-通信设备-克隆
+     *
+     * @param type          1 新设备 2 已有设备
+     * @param newDeviceCode 克隆设备对象
+     * @param oldDeviceCode 设备编号
+     * @param deviceName    设备名称
+     * @return
+     */
+    @Log(title = "设备管理-通信设备", businessType = BusinessType.INSERT)
+    @GetMapping("variableCloning")
+    public ApiResult<Void> variableCloning(@RequestParam Integer type,
+                                           @RequestParam String newDeviceCode,
+                                           @RequestParam String oldDeviceCode,
+                                           @RequestParam(required = false) String deviceName
+    ) {
+        deviceService.variableCloning(type, newDeviceCode, oldDeviceCode, deviceName);
+        return ApiResult.success();
     }
+
+
+    /**
+     * 通信设备列表查询-无分页
+     *
+     * @param siteId     站点ID
+     * @param deviceType 1电力 2视频
+     * @return
+     */
+    @GetMapping("deviceListOne")
+    public ApiResult<List<Device>> deviceListOne(@RequestParam Integer siteId,
+                                                 @RequestParam(value = "deviceType", required = false, defaultValue = "1") Integer deviceType) {
+        return ApiResult.success(deviceService.deviceListOne(siteId, deviceType));
+    }
+
+
+    /**
+     * 站点管理-摄像头-导出
+     *
+     * @param siteId     站点Id
+     * @param deviceName 设备名称
+     * @param deviceType 1:183用电设备,2:视频监控设备,3:171用电设备,4:173用电设备,5:158智能网关,6:其他
+     * @return
+     */
+    @Log(title = "设备管理-摄像头", businessType = BusinessType.EXPORT)
+    @GetMapping("deviceExport")
+    public ApiResult<String> deviceExport(@RequestParam(value = "siteId", required = false, defaultValue = "0") Integer siteId,
+                                          @RequestParam(required = false) String deviceName,
+                                          @RequestParam(value = "deviceType", required = false, defaultValue = "2") Integer deviceType) {
+        return ApiResult.success(deviceService.deviceExport(deviceName, deviceType, siteId));
+    }
+
+
+    /**
+     * 设备管理-通信设备-导出
+     *
+     * @param deviceName 设备名称
+     * @return
+     */
+    @Log(title = "设备管理-通信设备", businessType = BusinessType.EXPORT)
+    @GetMapping("correspondDeviceExport")
+    public ApiResult<String> correspondDeviceExport(@RequestParam(required = false) String deviceName) {
+        return ApiResult.success(deviceService.correspondDeviceExport(deviceName));
+    }
+
+    /**
+     * 通信设备-导入
+     *
+     * @param file 导入文件
+     * @return
+     * @throws Exception
+     */
+    @Log(title = "设备管理-通信设备", businessType = BusinessType.IMPORT)
+    @PostMapping("/deviceImport")
+    public ApiResult<Void> deviceImport(@RequestParam("file") MultipartFile file){
+        deviceService.deviceImport(file);
+        return ApiResult.success();
+    }
+
+    /**
+     *  数据管理-需量分析-用能月报查询
+     * @param siteId 站点ID
+     * @return
+     */
+    @GetMapping("deviceBoxList")
+    public ApiResult<List<DeviceOneVo>> deviceBoxList(@RequestParam (required = false) Integer siteId) {
+        return ApiResult.success(deviceService.deviceBoxList(siteId));
+    }
+
+
 }
 

+ 0 - 26
fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceStatusController.java

@@ -1,26 +0,0 @@
-package com.bizmatics.controller.web;
-
-
-import com.bizmatics.model.DeviceStatus;
-import com.bizmatics.service.DeviceStatusService;
-import org.checkerframework.checker.units.qual.A;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * 设备状态
- * @author ya
- * @since 2021-07-07
- */
-@RestController
-@RequestMapping("/deviceStatus")
-public class DeviceStatusController {
-
-    @Autowired
-    private DeviceStatusService deviceStatusService;
-}
-

+ 4 - 3
fiveep-controller/src/main/java/com/bizmatics/controller/web/FacilityController.java

@@ -4,7 +4,6 @@ import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.service.FacilityService;
 import com.bizmatics.service.vo.FacilityCountVO;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -13,7 +12,8 @@ import org.springframework.web.bind.annotation.RestController;
 import java.util.List;
 
 /**
- * object
+ * 未定模块
+ *
  * @author yq
  * @date 2021/7/12 9:09
  */
@@ -27,11 +27,12 @@ public class FacilityController {
 
     /**
      * 查询不同设备的数量
+     *
      * @param siteId
      * @return
      */
     @GetMapping("count")
-    public ApiResult<List<FacilityCountVO>> getCount(@RequestParam Integer siteId){
+    public ApiResult<List<FacilityCountVO>> getCount(@RequestParam Integer siteId) {
         return ApiResult.success(facilityService.getCount(siteId));
     }
 }

+ 137 - 19
fiveep-controller/src/main/java/com/bizmatics/controller/web/HtAnalogDataController.java

@@ -2,16 +2,17 @@ package com.bizmatics.controller.web;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.model.vo.DataManagementOneVO;
+import com.bizmatics.model.vo.SingleLoopReportOneVo;
 import com.bizmatics.service.HtAnalogDataService;
+import com.bizmatics.service.aop.BusinessType;
+import com.bizmatics.service.aop.Log;
 import com.bizmatics.service.vo.CommonIcoVO;
 import com.bizmatics.service.vo.HadCountVO;
+import com.bizmatics.service.vo.RealScoreVO;
 import com.bizmatics.service.vo.TimeShareVO;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
 import java.util.List;
@@ -29,70 +30,187 @@ public class HtAnalogDataController {
     @Autowired
     private HtAnalogDataService htAnalogDataService;
 
-
-
     /**
      * 首页日/月/年用电量
+     *
      * @return
      */
     @GetMapping("count")
-    public ApiResult<HadCountVO> count(){
+    public ApiResult<HadCountVO> count() {
         return ApiResult.success(htAnalogDataService.selectCount());
     }
 
     /**
      * 今日/昨日用电趋势
-     * @param startTime 开始时间
+     *
      * @param siteId 站点id
      * @return
      */
     @GetMapping("eptrendIco")
-    public ApiResult<List<CommonIcoVO>> getTrendByDate(@RequestParam Date startTime,@RequestParam(required = false) Integer siteId){
-        return ApiResult.success(htAnalogDataService.selectTrendByDate(startTime,siteId));
+    public ApiResult<List<CommonIcoVO>> getTrendByDate(@RequestParam(required = false) Integer siteId) {
+        return ApiResult.success(htAnalogDataService.selectTrendByDate(siteId));
+    }
+
+    /**
+     * 当月用电趋势图
+     *
+     * @return
+     */
+    @GetMapping("eptrendIcoMonth")
+    public ApiResult<List<CommonIcoVO>> getTrendByMonth() {
+        return ApiResult.success(htAnalogDataService.selectTrendByMonth());
     }
 
 
     /**
      * 站点日/月/年用电量
+     *
      * @param siteId 站点id
      * @return
      */
     @GetMapping("dayMonthYearEp")
-    public ApiResult<HadCountVO> getCountBySite(@RequestParam Integer siteId){
+    public ApiResult<HadCountVO> getCountBySite(@RequestParam Integer siteId) {
         return ApiResult.success(htAnalogDataService.getCountBySite(siteId));
     }
 
 
     /**
      * 分时电量
+     *
      * @param siteId 站点id
-     * @param date 时间
+     * @param type   时间
      * @return
      */
     @GetMapping("timeShare")
-    public ApiResult<TimeShareVO> getTimeShare(@RequestParam Integer siteId,@RequestParam Date date){
-        return ApiResult.success(htAnalogDataService.getTimeShare(siteId,date));
+    public ApiResult<TimeShareVO> getTimeShare(@RequestParam Integer siteId, @RequestParam Integer type) {
+        return ApiResult.success(htAnalogDataService.getTimeShare(siteId, type));
     }
 
     /**
      * 需量趋势图
+     *
      * @param siteId 站点id
      * @return
      */
     @GetMapping("demandIco")
-    public ApiResult<List<CommonIcoVO>> getDemandIco(@RequestParam Integer siteId){
+    public ApiResult<List<CommonIcoVO>> getDemandIco(@RequestParam Integer siteId) {
         return ApiResult.success(htAnalogDataService.getDemandIco(siteId));
     }
 
     /**
      * 历史记录电流电压
+     *
      * @param siteId 站点id
-     * @param date 时间
+     * @param date   时间
      * @return
      */
     @GetMapping("electricIco")
-    public ApiResult<List<CommonIcoVO>> getElectricIco(@RequestParam Integer siteId,@RequestParam Date date){
-        return ApiResult.success(htAnalogDataService.getElectricIco(siteId,date));
+    public ApiResult<List<CommonIcoVO>> getElectricIco(@RequestParam Integer siteId, @RequestParam Date date) {
+        return ApiResult.success(htAnalogDataService.getElectricIco(siteId, date));
+    }
+
+    /**
+     * 历史电流电压评分
+     *
+     * @param deviceCode
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    @GetMapping("rtRealScore")
+    public ApiResult<List<RealScoreVO>> rtRealScore(@RequestParam String deviceCode,
+                                                    @RequestParam Date startTime,
+                                                    @RequestParam Date endTime) {
+        return ApiResult.success(htAnalogDataService.rtRealScore(deviceCode, startTime, endTime));
+    }
+
+    /**
+     * 数据管理-同比分析报表-统计图数据查询
+     *
+     * @param dataManagementOneVO
+     * @return
+     */
+    @PostMapping("yearOnYearList")
+    public ApiResult<List<CommonIcoVO>> yearOnYearList(@RequestBody DataManagementOneVO dataManagementOneVO) {
+        return ApiResult.success(htAnalogDataService.yearOnYearList(dataManagementOneVO));
+    }
+
+
+    /**
+     * 数据管理-环比分析报表-统计图数据查询
+     *
+     * @param dataManagementOneVO
+     * @return
+     */
+    @PostMapping("ringRatioList")
+    public ApiResult<List<CommonIcoVO>> ringRatioList(@RequestBody DataManagementOneVO dataManagementOneVO) {
+        return ApiResult.success(htAnalogDataService.ringRatioList(dataManagementOneVO));
+    }
+
+    /**
+     * 数据管理-用能月报-统计图数据查询
+     *
+     * @param deviceCode 设备编号
+     * @param cycle      1.日报表 2.月报表 3.年报表
+     * @param startTime  开始时间
+     * @param endTime    结束时间
+     * @return
+     */
+    @GetMapping("monthlyReport")
+    public ApiResult<List<CommonIcoVO>> monthlyReport(@RequestParam String deviceCode,
+                                                      @RequestParam int cycle,
+                                                      @RequestParam String startTime,
+                                                      @RequestParam String endTime) {
+        return ApiResult.success(htAnalogDataService.monthlyReport(deviceCode, cycle, startTime, endTime));
+    }
+
+    /**
+     * 数据管理-需量分析-统计图数据查询
+     *
+     * @param deviceCode 设备编号
+     * @param cycle      1.电费结算周期 2.自然月
+     * @param monthDate  时间 xxxx-xx
+     * @return
+     */
+    @GetMapping("demandAnalysis")
+    public ApiResult<List<CommonIcoVO>> demandAnalysis(@RequestParam String deviceCode,
+                                                       @RequestParam int cycle,
+                                                       @RequestParam String monthDate) {
+        return ApiResult.success(htAnalogDataService.demandAnalysis(deviceCode, monthDate, cycle));
+
+    }
+
+    /**
+     * 数据管理-用能月报-导出
+     *
+     * @param deviceCode 设备编号
+     * @param cycle      1.日报表 2.月报表 3.年报表
+     * @param startTime  开始时间
+     * @param endTime    结束时间
+     * @return
+     */
+    @Log(title = "数据管理-用能月报", businessType = BusinessType.EXPORT)
+    @GetMapping("monthlyReportExport")
+    public ApiResult<String> monthlyReportExport(@RequestParam String deviceCode,
+                                                 @RequestParam int cycle,
+                                                 @RequestParam String startTime,
+                                                 @RequestParam String endTime) {
+        return ApiResult.success(htAnalogDataService.monthlyReportExport(deviceCode, startTime, endTime, cycle));
+    }
+
+    /**
+     * 电能质量(单回路报告)
+     *
+     * @param deviceCode 设备编号
+     * @param time       时间 type为1时时间格式 yyyy-MM-dd type为2时时间格式 yyyy-MM
+     * @param type       类型 1:日 2:月
+     * @return
+     */
+    @GetMapping("SingleLoopReportData")
+    public ApiResult<SingleLoopReportOneVo> SingleLoopReportData(@RequestParam String deviceCode,
+                                                                 @RequestParam Date time,
+                                                                 @RequestParam int type) {
+        return ApiResult.success(htAnalogDataService.SingleLoopReportData(deviceCode, time, type));
     }
 }
 

+ 0 - 26
fiveep-controller/src/main/java/com/bizmatics/controller/web/HtSwitchDataController.java

@@ -1,26 +0,0 @@
-package com.bizmatics.controller.web;
-
-
-import com.bizmatics.service.HtSwitchDataService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- *
- * 历史消费组开关
- * @author ya
- * @since 2021-07-07
- */
-@RestController
-@RequestMapping("/htSwitchData")
-public class HtSwitchDataController {
-
-
-    @Autowired
-    private HtSwitchDataService htSwitchDataService;
-
-}
-

+ 0 - 26
fiveep-controller/src/main/java/com/bizmatics/controller/web/RouteController.java

@@ -1,26 +0,0 @@
-package com.bizmatics.controller.web;
-
-
-import com.bizmatics.service.RouteService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * 线路表
- *
- * @author ya
- * @since 2021-07-07
- */
-@RestController
-@RequestMapping("/route")
-public class RouteController {
-
-
-    @Autowired
-    private RouteService routeService;
-
-}
-

+ 88 - 16
fiveep-controller/src/main/java/com/bizmatics/controller/web/RtAnalogDataController.java

@@ -3,11 +3,14 @@ package com.bizmatics.controller.web;
 
 import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.service.RtAnalogDataService;
+import com.bizmatics.service.aop.BusinessType;
+import com.bizmatics.service.aop.Log;
 import com.bizmatics.service.vo.RadCountVO;
+import com.bizmatics.service.vo.RealScoreOneVO;
+import com.bizmatics.service.vo.RealScoreVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
-
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -31,56 +34,125 @@ public class RtAnalogDataController {
 
     /**
      * 重载/轻载/正常
+     *
      * @return
      */
     @GetMapping("count")
-    public ApiResult<RadCountVO> getCount(){
+    public ApiResult<RadCountVO> getCount() {
         return ApiResult.success(rtAnalogDataService.selectCount());
     }
 
     /**
      * 查看实时数据详情
+     *
      * @param siteId 站点id
      * @return
      */
     @GetMapping("one")
-    public ApiResult<List<Map<String,Object>>> getOne(@RequestParam Integer siteId){
+    public ApiResult<List<Map<String, Object>>> getOne(@RequestParam Integer siteId) {
         return ApiResult.success(rtAnalogDataService.getOne(siteId));
     }
 
 
     /**
      * 实时负荷
+     *
      * @param siteId 站点id
      * @return
      */
     @GetMapping("epLoad")
-    public ApiResult<Double> getEpLoad(Integer siteId){
+    public ApiResult<Double> getEpLoad(Integer siteId) {
         return ApiResult.success(rtAnalogDataService.getEpLoad(siteId));
     }
 
+    /**
+     * 电能质量(实时评分)
+     *
+     * @param deviceCode 设备编号
+     * @return
+     */
+    @GetMapping("realScore")
+    public ApiResult<RealScoreVO> realScore(@RequestParam String deviceCode) {
+        return ApiResult.success(rtAnalogDataService.realScore(deviceCode));
+    }
+
+    /**
+     * 电能质量(单回路监测)
+     *
+     * @param deviceCode 设备编号
+     * @return
+     */
+    @GetMapping("realScoreOne")
+    public ApiResult<RealScoreOneVO> realScoreOne(@RequestParam String deviceCode) {
+        return ApiResult.success(rtAnalogDataService.realScoreOne(deviceCode));
+    }
+
+    /**
+     * 伍继PC1.0-数据报表
+     *
+     * @param siteId    站点ID
+     * @param startTime 开始时间
+     * @param endTime   结束时间
+     * @param queryType 类型 日 月 年
+     * @return
+     */
     @RequestMapping("DataReport")
-    public ApiResult<List<Map<String,Object>>> getDataReport(@RequestParam Integer siteId,
-                                                             @RequestParam(required = false) Date startTime,
-                                                             @RequestParam(required = false) Date endTime,
-                                                             @RequestParam(required = true) String queryType){
-        return ApiResult.success(rtAnalogDataService.getDataReport(siteId,startTime,endTime,queryType));
+    public ApiResult<List<Map<String, Object>>> getDataReport(@RequestParam Integer siteId,
+                                                              @RequestParam(required = false) Date startTime,
+                                                              @RequestParam(required = false) Date endTime,
+                                                              @RequestParam(required = true) String queryType) {
+        return ApiResult.success(rtAnalogDataService.getDataReport(siteId, startTime, endTime, queryType));
     }
 
+    /**
+     * 伍继PC1.0-历史趋势数据查询
+     *
+     * @param siteId    站点ID
+     * @param startTime 开始时间
+     * @param endTime   结束时间
+     * @param queryType 类型 日 月 年
+     * @return
+     */
     @RequestMapping("HistoricalCurve")
-    public ApiResult<List<Map<String,Object>>> getHistoricalCurve(@RequestParam Integer siteId,
-                                                             @RequestParam(required = false) Date startTime,
-                                                             @RequestParam(required = false) Date endTime,
-                                                             @RequestParam(required = true) String queryType){
-        return ApiResult.success(rtAnalogDataService.getHistoricalCurve(siteId,startTime,endTime,queryType));
+    public ApiResult<List<Map<String, Object>>> getHistoricalCurve(@RequestParam Integer siteId,
+                                                                   @RequestParam(required = false) Date startTime,
+                                                                   @RequestParam(required = false) Date endTime,
+                                                                   @RequestParam(required = true) String queryType) {
+        return ApiResult.success(rtAnalogDataService.getHistoricalCurve(siteId, startTime, endTime, queryType));
     }
 
+    /**
+     * 伍继PC1.0-数据报表导出
+     *
+     * @param siteId    站点ID
+     * @param startTime 开始时间
+     * @param endTime   结束时间
+     * @param queryType 类型 日 月 年
+     * @return
+     */
+    @Log(title = "数据报表", businessType = BusinessType.EXPORT)
     @GetMapping("/DataReportExport")
     public ApiResult<String> export(@RequestParam Integer siteId,
                                     @RequestParam(required = false) Date startTime,
                                     @RequestParam(required = false) Date endTime,
-                                    @RequestParam(required = true) String queryType){
-        return ApiResult.success(rtAnalogDataService.DataReportExport(siteId,startTime,endTime,queryType));
+                                    @RequestParam(required = true) String queryType) {
+        return ApiResult.success(rtAnalogDataService.DataReportExport(siteId, startTime, endTime, queryType));
+    }
+
+
+    /**
+     * 电能质量(评估报告)
+     *
+     * @param siteId 站点ID
+     * @param time 时间 type为1时时间格式 yyyy-MM-dd type为2时时间格式 yyyy-MM
+     * @param type 类型 1:日 2:月
+     * @return
+     */
+    @GetMapping("evaluationReport")
+    public ApiResult<List<RealScoreVO>> evaluationReport(@RequestParam int siteId,
+                                                         @RequestParam Date time,
+                                                         @RequestParam int type) {
+        return ApiResult.success(rtAnalogDataService.evaluationReport(siteId, time, type));
     }
 
 }

+ 9 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/RtSwitchDataController.java

@@ -6,8 +6,6 @@ import com.bizmatics.service.RtSwitchDataService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -29,16 +27,23 @@ public class RtSwitchDataController {
 
     /**
      * 查看单个信息
+     *
      * @return
      */
     @GetMapping("one")
-    public ApiResult<List<Map<String,Object>>> getOne(@RequestParam Integer siteId){
+    public ApiResult<List<Map<String, Object>>> getOne(@RequestParam Integer siteId) {
         return ApiResult.success(rtSwitchDataService.getOne(siteId));
     }
 
 
+    /**
+     * 伍继PC1.0-运行状态统计上部分查询
+     *
+     * @param siteId 站点ID
+     * @return
+     */
     @RequestMapping("LoopStatus")
-    public ApiResult<List<Map<String,Object>>> getLoopStatus(@RequestParam Integer siteId){
+    public ApiResult<List<Map<String, Object>>> getLoopStatus(@RequestParam Integer siteId) {
         return ApiResult.success(rtSwitchDataService.getLoopStatus(siteId));
     }
 

+ 111 - 10
fiveep-controller/src/main/java/com/bizmatics/controller/web/SiteController.java

@@ -2,18 +2,18 @@ package com.bizmatics.controller.web;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
-import com.bizmatics.model.Site;
+import com.bizmatics.model.*;
 import com.bizmatics.service.SiteService;
+import com.bizmatics.service.aop.BusinessType;
+import com.bizmatics.service.aop.Log;
 import com.bizmatics.service.vo.DeviceCountVO;
 import com.bizmatics.service.vo.SiteVO;
+import com.bizmatics.service.vo.SiteVOT;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 站点
@@ -31,38 +31,139 @@ public class SiteController {
 
     /**
      * 查看不同状态的站点数量
+     *
      * @return
      */
     @GetMapping("count")
-    public ApiResult<DeviceCountVO> getCount(){
+    public ApiResult<DeviceCountVO> getCount() {
         return ApiResult.success(siteService.selectCount());
     }
 
 
     /**
      * 查看站点列表
+     *
      * @param name 名称
      * @return
      */
     @GetMapping("list")
-    public ApiResult<List<Site>> list(@RequestParam(required = false) String name){
+    public ApiResult<List<Site>> list(@RequestParam(required = false) String name) {
         return ApiResult.success(siteService.list(name));
     }
 
+    /**
+     * 查看站点列表
+     *
+     * @param name 名称
+     * @return
+     */
+    @GetMapping("list2")
+    public ApiResult<List<SiteTwo>> list2(@RequestParam(required = false) String name) {
+        return ApiResult.success(siteService.list2(name));
+    }
+
+    /**
+     * 未知
+     * @param name 站点名称
+     * @return
+     */
 
     @GetMapping("listStatus")
-    public ApiResult<List<SiteVO>> siteAndStatus(@RequestParam(required = false) String name){
+    public ApiResult<List<SiteVO>> siteAndStatus(@RequestParam(required = false) String name) {
         return ApiResult.success(siteService.siteAndStatusList(name));
     }
 
     /**
      * 查看站点详情
+     *
      * @param siteId 站点id
      * @return
      */
     @GetMapping("one")
-    public ApiResult<SiteVO> getOne(@RequestParam Long siteId){
+    public ApiResult<SiteVO> getOne(@RequestParam Long siteId) {
         return ApiResult.success(siteService.getOne(siteId));
     }
+
+    /**
+     * 查看站点列表
+     *
+     * @param name 站点名称
+     * @return
+     */
+    @GetMapping("siteList")
+    public ApiResult<List<Site>> siteList(@RequestParam(required = false) String name) {
+        return ApiResult.success(siteService.siteList(name));
+    }
+
+
+    /**
+     *站点管理-基础信息-新增修改
+     * @param siteVOT
+     * @return
+     */
+    @Log(title = "站点管理-基础信息", businessType = BusinessType.INSERT)
+    @PostMapping("siteAdd")
+    public ApiResult<Void> siteAdd(@RequestBody SiteVOT siteVOT) {
+        if (siteVOT.getId()==0){
+            siteService.siteAdd(siteVOT);
+        }else {
+            siteService.siteUpdate(siteVOT);
+        }
+        return ApiResult.success();
+    }
+
+    /**
+     * 站点管理-基础信息-站点注销
+     * @param id
+     * @return
+     */
+    @Log(title = "站点管理-基础信息", businessType = BusinessType.DELETE)
+    @GetMapping("siteDel")
+    public ApiResult<Void> siteDel(@RequestParam(required = false) String id) {
+            siteService.sitedel(id);
+        return ApiResult.success();
+    }
+
+    /**
+     * 站点管理-基础信息-详情查询
+     * @param id 站点ID
+     * @return
+     */
+    @GetMapping("getSite")
+    public ApiResult<List<TemplateData>> getSite(@RequestParam String id) {
+        return ApiResult.success(siteService.getSite(id));
+    }
+
+    /**
+     * 站点管理-右侧树形目录
+     * @param name
+     * @return
+     */
+    @GetMapping("sitelist")
+    public ApiResult<List<Map<String,Object>>> sitelist(@RequestParam(required = false) String name){
+        return ApiResult.success(siteService.sitelist(name));
+    }
+
+    /**
+     * 站点管理-基础信息-动态属性下拉框
+     * @param siteId 站点管理
+     * @param dataArea 1.模拟量 2.状态量 3.参数量
+     * @return
+     */
+    @GetMapping("dynamicPropertiesDroplist")
+    public ApiResult<List<DeviceAnalogVariableList>> dynamicPropertiesDroplist(@RequestParam(value = "siteId", required = false, defaultValue = "0") Integer siteId,
+                                                                               @RequestParam(value = "dataArea", required = false, defaultValue = "1") Integer dataArea) {
+        return ApiResult.success(siteService.dynamicPropertiesDroplist(siteId, dataArea));
+    }
+
+
+    /**
+     * 站点管理-基础信息-线路下拉框
+     * @return
+     */
+    @GetMapping("routeDroplist")
+    public ApiResult<List<Route>> dynamicPropertiesDroplist() {
+        return ApiResult.success(siteService.routeDroplist());
+    }
 }
 

+ 0 - 13
fiveep-controller/src/main/java/com/bizmatics/controller/web/SiteObjectController.java

@@ -1,13 +0,0 @@
-package com.bizmatics.controller.web;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author yq
- * @date 2021/7/12 9:09
- */
-@RestController
-@RequestMapping("siteObject")
-public class SiteObjectController {
-}

+ 71 - 7
fiveep-controller/src/main/java/com/bizmatics/controller/web/SitedtlController.java

@@ -1,24 +1,88 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.common.core.bean.CommonPage;
+import com.bizmatics.model.vo.SitedtlArchivesVo;
+import com.bizmatics.model.vo.SitedtlVo;
 import com.bizmatics.service.SitedtlService;
+import com.bizmatics.service.aop.BusinessType;
+import com.bizmatics.service.aop.Log;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 /**
- * 站点详情
+ * 运维管理-现场档案
+ *
  * @author ya
- * @since 2021-07-07
+ * @since 2021-10-26
  */
 @RestController
 @RequestMapping("/sitedtl")
 public class SitedtlController {
 
-
     @Autowired
     private SitedtlService sitedtlService;
+
+    /**
+     * 运维管理-现场档案-新增
+     *
+     * @param sitedtlArchivesVo
+     * @return
+     */
+    @Log(title = "运维管理-现场档案", businessType = BusinessType.INSERT)
+    @PostMapping("sitedtlAdd")
+    public ApiResult<Void> sitedtlAdd(@RequestBody SitedtlArchivesVo sitedtlArchivesVo) {
+        sitedtlService.sitedtlAdd(sitedtlArchivesVo);
+        return ApiResult.success();
+    }
+
+    /**
+     * 运维管理-现场档案-修改
+     *
+     * @param sitedtlArchivesVo
+     * @return
+     */
+    @Log(title = "运维管理-现场档案", businessType = BusinessType.UPDATE)
+    @PostMapping("sitedtlUpdate")
+    public ApiResult<Void> sitedtlUpdate(@RequestBody SitedtlArchivesVo sitedtlArchivesVo) {
+        sitedtlService.sitedtlUpdate(sitedtlArchivesVo);
+        return ApiResult.success();
+    }
+
+
+    /**
+     * 运维管理-现场档案-列表查询
+     *
+     * @param siteId              站点ID
+     * @param electricTestOverdue 电试日期
+     * @param size                条数
+     * @param current             页数
+     * @return
+     */
+    @GetMapping("sitedtlList")
+    public ApiResult<CommonPage<SitedtlVo>> sitedtlList(@RequestParam(value = "siteId", required = false, defaultValue = "0") Integer siteId,
+                                                        @RequestParam(required = false) String electricTestOverdue,
+                                                        @RequestParam(value = "size", required = false, defaultValue = "15") Integer size,
+                                                        @RequestParam(value = "current", required = false, defaultValue = "1") Integer current
+    ) {
+        return ApiResult.success(sitedtlService.sitedtlList(siteId, electricTestOverdue, size, current));
+    }
+
+    /**
+     * 运维管理-现场档案-导出
+     *
+     * @param siteId              站点ID
+     * @param electricTestOverdue 电试超期
+     * @return
+     */
+    @Log(title = "运维管理-现场档案", businessType = BusinessType.EXPORT)
+    @GetMapping("variableListExport")
+    public ApiResult<String> variableListExport(@RequestParam(value = "siteId", required = false, defaultValue = "0") Integer siteId,
+                                                @RequestParam(required = false) String electricTestOverdue
+    ) {
+        return ApiResult.success(sitedtlService.variableListExport(siteId, electricTestOverdue));
+    }
+
 }
 

+ 0 - 22
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcAccessTokenController.java

@@ -1,22 +0,0 @@
-package com.bizmatics.controller.web;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@RestController
-@RequestMapping("/wcAccessToken")
-public class WcAccessTokenController {
-
-}
-

+ 0 - 22
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcKeySecretController.java

@@ -1,22 +0,0 @@
-package com.bizmatics.controller.web;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@RestController
-@RequestMapping("/wcKeySecret")
-public class WcKeySecretController {
-
-}
-

+ 0 - 22
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcMeasTypeController.java

@@ -1,22 +0,0 @@
-package com.bizmatics.controller.web;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@RestController
-@RequestMapping("/wcMeasType")
-public class WcMeasTypeController {
-
-}
-

+ 0 - 22
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcUserController.java

@@ -1,22 +0,0 @@
-package com.bizmatics.controller.web;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@RestController
-@RequestMapping("/wcUser")
-public class WcUserController {
-
-}
-

+ 0 - 22
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcUserTokenController.java

@@ -1,22 +0,0 @@
-package com.bizmatics.controller.web;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@RestController
-@RequestMapping("/wcUserToken")
-public class WcUserTokenController {
-
-}
-

+ 0 - 8
fiveep-model/src/main/java/com/bizmatics/model/Test.java

@@ -1,8 +0,0 @@
-package com.bizmatics.model;
-
-/**
- * @author yq
- * @date 2021/7/5 18:12
- */
-public class Test {
-}

+ 0 - 40
fiveep-model/src/main/java/com/bizmatics/model/WcAccessToken.java

@@ -1,40 +0,0 @@
-package com.bizmatics.model;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
-import java.io.Serializable;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class WcAccessToken implements Serializable {
-
-    private static final long serialVersionUID=1L;
-
-    @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
-
-    /**
-     * 微信接口token
-     */
-    private String accessToken;
-
-    /**
-     * 更新时间
-     */
-    private LocalDateTime updateTime;
-
-
-}

+ 0 - 50
fiveep-model/src/main/java/com/bizmatics/model/WcKeySecret.java

@@ -1,50 +0,0 @@
-package com.bizmatics.model;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
-import java.io.Serializable;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class WcKeySecret implements Serializable {
-
-    private static final long serialVersionUID=1L;
-
-    @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
-
-    /**
-     * 微信key
-     */
-    private String wcKey;
-
-    /**
-     * 微信secret
-     */
-    private String wcSecret;
-
-    /**
-     * 备注
-     */
-    private String remarks;
-
-    /**
-     * 更新时间
-     */
-    private LocalDateTime updateTime;
-
-
-}

+ 0 - 36
fiveep-model/src/main/java/com/bizmatics/model/WcMeasType.java

@@ -1,36 +0,0 @@
-package com.bizmatics.model;
-
-import java.io.Serializable;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class WcMeasType implements Serializable {
-
-    private static final long serialVersionUID=1L;
-
-    private Integer id;
-
-    /**
-     * 告警名称
-     */
-    private String measName;
-
-    /**
-     * 告警名称描述
-     */
-    private String measDesc;
-
-
-}

+ 0 - 58
fiveep-model/src/main/java/com/bizmatics/model/WcUser.java

@@ -1,58 +0,0 @@
-package com.bizmatics.model;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
-import java.io.Serializable;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class WcUser implements Serializable {
-
-    private static final long serialVersionUID=1L;
-
-    /**
-     * 公众号用户表ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
-
-    /**
-     * 手机号/用户名
-     */
-    private String phone;
-
-    /**
-     * 公众号openid
-     */
-    private String openId;
-
-    /**
-     * 类型:wx、app
-     */
-    private String registrationType;
-
-    /**
-     * 添加时间
-     */
-    private LocalDateTime createTime;
-
-    /**
-     * 使能标识:1可用;0不可用
-     */
-    private Integer enable;
-
-
-}

+ 0 - 43
fiveep-model/src/main/java/com/bizmatics/model/WcUserToken.java

@@ -1,43 +0,0 @@
-package com.bizmatics.model;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
-import java.io.Serializable;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class WcUserToken implements Serializable {
-
-    private static final long serialVersionUID=1L;
-
-    /**
-     * 用户token表
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
-
-    /**
-     * 用户token
-     */
-    private String token;
-
-    /**
-     * token生成时间
-     */
-    private LocalDateTime createTime;
-
-
-}

+ 0 - 16
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcAccessTokenMapper.java

@@ -1,16 +0,0 @@
-package com.bizmatics.persistence.mapper;
-
-import com.bizmatics.model.WcAccessToken;
-import com.bizmatics.common.mvc.base.CrudMapper;
-
-/**
- * <p>
- *  Mapper 接口
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-public interface WcAccessTokenMapper extends CrudMapper<WcAccessToken> {
-
-}

+ 0 - 16
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcKeySecretMapper.java

@@ -1,16 +0,0 @@
-package com.bizmatics.persistence.mapper;
-
-import com.bizmatics.model.WcKeySecret;
-import com.bizmatics.common.mvc.base.CrudMapper;
-
-/**
- * <p>
- *  Mapper 接口
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-public interface WcKeySecretMapper extends CrudMapper<WcKeySecret> {
-
-}

+ 0 - 16
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcMeasTypeMapper.java

@@ -1,16 +0,0 @@
-package com.bizmatics.persistence.mapper;
-
-import com.bizmatics.model.WcMeasType;
-import com.bizmatics.common.mvc.base.CrudMapper;
-
-/**
- * <p>
- *  Mapper 接口
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-public interface WcMeasTypeMapper extends CrudMapper<WcMeasType> {
-
-}

+ 0 - 16
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcUserMapper.java

@@ -1,16 +0,0 @@
-package com.bizmatics.persistence.mapper;
-
-import com.bizmatics.model.WcUser;
-import com.bizmatics.common.mvc.base.CrudMapper;
-
-/**
- * <p>
- *  Mapper 接口
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-public interface WcUserMapper extends CrudMapper<WcUser> {
-
-}

+ 0 - 16
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcUserTokenMapper.java

@@ -1,16 +0,0 @@
-package com.bizmatics.persistence.mapper;
-
-import com.bizmatics.model.WcUserToken;
-import com.bizmatics.common.mvc.base.CrudMapper;
-
-/**
- * <p>
- *  Mapper 接口
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-public interface WcUserTokenMapper extends CrudMapper<WcUserToken> {
-
-}

+ 0 - 12
fiveep-persistence/src/main/resources/mapper/mysql/WcAccessTokenMapper.xml

@@ -1,12 +0,0 @@
-<?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="com.bizmatics.persistence.mapper.WcAccessTokenMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.bizmatics.model.WcAccessToken">
-        <id column="id" property="id" />
-        <result column="access_token" property="accessToken" />
-        <result column="update_time" property="updateTime" />
-    </resultMap>
-
-</mapper>

+ 0 - 14
fiveep-persistence/src/main/resources/mapper/mysql/WcKeySecretMapper.xml

@@ -1,14 +0,0 @@
-<?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="com.bizmatics.persistence.mapper.WcKeySecretMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.bizmatics.model.WcKeySecret">
-        <id column="id" property="id" />
-        <result column="wc_key" property="wcKey" />
-        <result column="wc_secret" property="wcSecret" />
-        <result column="remarks" property="remarks" />
-        <result column="update_time" property="updateTime" />
-    </resultMap>
-
-</mapper>

+ 0 - 12
fiveep-persistence/src/main/resources/mapper/mysql/WcMeasTypeMapper.xml

@@ -1,12 +0,0 @@
-<?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="com.bizmatics.persistence.mapper.WcMeasTypeMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.bizmatics.model.WcMeasType">
-        <id column="id" property="id" />
-        <result column="meas_name" property="measName" />
-        <result column="meas_desc" property="measDesc" />
-    </resultMap>
-
-</mapper>

+ 0 - 15
fiveep-persistence/src/main/resources/mapper/mysql/WcUserMapper.xml

@@ -1,15 +0,0 @@
-<?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="com.bizmatics.persistence.mapper.WcUserMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.bizmatics.model.WcUser">
-        <id column="id" property="id" />
-        <result column="phone" property="phone" />
-        <result column="open_id" property="openId" />
-        <result column="registration_type" property="registrationType" />
-        <result column="create_time" property="createTime" />
-        <result column="enable" property="enable" />
-    </resultMap>
-
-</mapper>

+ 0 - 12
fiveep-persistence/src/main/resources/mapper/mysql/WcUserTokenMapper.xml

@@ -1,12 +0,0 @@
-<?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="com.bizmatics.persistence.mapper.WcUserTokenMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.bizmatics.model.WcUserToken">
-        <id column="id" property="id" />
-        <result column="token" property="token" />
-        <result column="create_time" property="createTime" />
-    </resultMap>
-
-</mapper>

+ 0 - 16
fiveep-service/src/main/java/com/bizmatics/service/WcAccessTokenService.java

@@ -1,16 +0,0 @@
-package com.bizmatics.service;
-
-import com.bizmatics.model.WcAccessToken;
-import com.bizmatics.common.mvc.base.CrudService;
-
-/**
- * <p>
- *  服务类
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-public interface WcAccessTokenService extends CrudService<WcAccessToken> {
-
-}

+ 0 - 16
fiveep-service/src/main/java/com/bizmatics/service/WcKeySecretService.java

@@ -1,16 +0,0 @@
-package com.bizmatics.service;
-
-import com.bizmatics.model.WcKeySecret;
-import com.bizmatics.common.mvc.base.CrudService;
-
-/**
- * <p>
- *  服务类
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-public interface WcKeySecretService extends CrudService<WcKeySecret> {
-
-}

+ 0 - 16
fiveep-service/src/main/java/com/bizmatics/service/WcMeasTypeService.java

@@ -1,16 +0,0 @@
-package com.bizmatics.service;
-
-import com.bizmatics.model.WcMeasType;
-import com.bizmatics.common.mvc.base.CrudService;
-
-/**
- * <p>
- *  服务类
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-public interface WcMeasTypeService extends CrudService<WcMeasType> {
-
-}

+ 0 - 16
fiveep-service/src/main/java/com/bizmatics/service/WcUserService.java

@@ -1,16 +0,0 @@
-package com.bizmatics.service;
-
-import com.bizmatics.model.WcUser;
-import com.bizmatics.common.mvc.base.CrudService;
-
-/**
- * <p>
- *  服务类
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-public interface WcUserService extends CrudService<WcUser> {
-
-}

+ 0 - 16
fiveep-service/src/main/java/com/bizmatics/service/WcUserTokenService.java

@@ -1,16 +0,0 @@
-package com.bizmatics.service;
-
-import com.bizmatics.model.WcUserToken;
-import com.bizmatics.common.mvc.base.CrudService;
-
-/**
- * <p>
- *  服务类
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-public interface WcUserTokenService extends CrudService<WcUserToken> {
-
-}

+ 0 - 22
fiveep-service/src/main/java/com/bizmatics/service/config/MyWebConfigurer.java

@@ -1,22 +0,0 @@
-package com.bizmatics.service.config;
-
-import org.springframework.boot.SpringBootConfiguration;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-@SpringBootConfiguration
-public class MyWebConfigurer implements WebMvcConfigurer {
-
-    @Override
-    public void addCorsMappings(CorsRegistry registry) {
-        // 设置允许跨域的路径
-        registry.addMapping("/**")
-                // 设置允许跨域请求的域名
-                .allowedOrigins("*")
-                // 是否允许证书
-                .allowCredentials(true)
-                .allowedMethods("*")
-                .maxAge(3600);
-    }
-
-}

+ 0 - 53
fiveep-service/src/main/java/com/bizmatics/service/config/SessionFilter.java

@@ -1,53 +0,0 @@
-//package com.bizmatics.service.config;
-//
-//
-//import com.bizmatics.common.core.exception.BusinessException;
-//import com.bizmatics.model.User;
-//import com.bizmatics.service.util.SessionLocal;
-//import lombok.extern.slf4j.Slf4j;
-//import org.springframework.stereotype.Component;
-//
-//import javax.servlet.*;
-//import javax.servlet.annotation.WebFilter;
-//import javax.servlet.http.HttpServletRequest;
-//import javax.servlet.http.HttpServletResponse;
-//import javax.servlet.http.HttpSession;
-//import java.io.IOException;
-//import java.util.Arrays;
-//import java.util.Collections;
-//import java.util.HashSet;
-//import java.util.Set;
-//
-///**
-// * @author yq
-// * @date 2021/7/8 10:35
-// */
-//@Component
-//@Slf4j
-//@WebFilter(urlPatterns = "/*", filterName = "reqResFilter")
-//public class SessionFilter implements Filter {
-//
-//    private static final Set<String> ALLOWED_PATHS = Collections.unmodifiableSet(new HashSet<>(
-//            Collections.singletonList("/user/login")));
-//
-//
-//    @Override
-//    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain) throws IOException, ServletException {
-//        HttpServletRequest request = (HttpServletRequest)servletRequest;
-//        String path = request.getRequestURI().substring(request.getContextPath().length()).replaceAll("[/]+$", "");
-//        boolean allowedPath = ALLOWED_PATHS.contains(path);
-//        if (!allowedPath){
-//            HttpSession session = request.getSession();
-//            if(session.getAttribute( "sessionuser") != null) {
-//                if(SessionLocal.getUser() == null) {
-//                    log.info("【当前线程"+Thread.currentThread().getName()+"中用户信息为空,从session中set到ThreadLocal.】");
-//                    SessionLocal.setUser( (User)session.getAttribute( "sessionuser") );
-//                }
-//            } else {
-//                throw new BusinessException("用户未登录请先登录");
-//            }
-//        }
-//        chain.doFilter(servletRequest,servletResponse);
-//    }
-//
-//}

+ 0 - 20
fiveep-service/src/main/java/com/bizmatics/service/impl/WcAccessTokenServiceImpl.java

@@ -1,20 +0,0 @@
-package com.bizmatics.service.impl;
-
-import com.bizmatics.model.WcAccessToken;
-import com.bizmatics.persistence.mapper.WcAccessTokenMapper;
-import com.bizmatics.service.WcAccessTokenService;
-import com.bizmatics.common.mvc.base.AbstractCrudService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- *  服务实现类
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@Service
-public class WcAccessTokenServiceImpl extends AbstractCrudService<WcAccessTokenMapper, WcAccessToken> implements WcAccessTokenService {
-
-}

+ 0 - 20
fiveep-service/src/main/java/com/bizmatics/service/impl/WcKeySecretServiceImpl.java

@@ -1,20 +0,0 @@
-package com.bizmatics.service.impl;
-
-import com.bizmatics.model.WcKeySecret;
-import com.bizmatics.persistence.mapper.WcKeySecretMapper;
-import com.bizmatics.service.WcKeySecretService;
-import com.bizmatics.common.mvc.base.AbstractCrudService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- *  服务实现类
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@Service
-public class WcKeySecretServiceImpl extends AbstractCrudService<WcKeySecretMapper, WcKeySecret> implements WcKeySecretService {
-
-}

+ 0 - 20
fiveep-service/src/main/java/com/bizmatics/service/impl/WcMeasTypeServiceImpl.java

@@ -1,20 +0,0 @@
-package com.bizmatics.service.impl;
-
-import com.bizmatics.model.WcMeasType;
-import com.bizmatics.persistence.mapper.WcMeasTypeMapper;
-import com.bizmatics.service.WcMeasTypeService;
-import com.bizmatics.common.mvc.base.AbstractCrudService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- *  服务实现类
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@Service
-public class WcMeasTypeServiceImpl extends AbstractCrudService<WcMeasTypeMapper, WcMeasType> implements WcMeasTypeService {
-
-}

+ 0 - 20
fiveep-service/src/main/java/com/bizmatics/service/impl/WcUserServiceImpl.java

@@ -1,20 +0,0 @@
-package com.bizmatics.service.impl;
-
-import com.bizmatics.model.WcUser;
-import com.bizmatics.persistence.mapper.WcUserMapper;
-import com.bizmatics.service.WcUserService;
-import com.bizmatics.common.mvc.base.AbstractCrudService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- *  服务实现类
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@Service
-public class WcUserServiceImpl extends AbstractCrudService<WcUserMapper, WcUser> implements WcUserService {
-
-}

+ 0 - 20
fiveep-service/src/main/java/com/bizmatics/service/impl/WcUserTokenServiceImpl.java

@@ -1,20 +0,0 @@
-package com.bizmatics.service.impl;
-
-import com.bizmatics.model.WcUserToken;
-import com.bizmatics.persistence.mapper.WcUserTokenMapper;
-import com.bizmatics.service.WcUserTokenService;
-import com.bizmatics.common.mvc.base.AbstractCrudService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- *  服务实现类
- * </p>
- *
- * @author ya
- * @since 2021-07-07
- */
-@Service
-public class WcUserTokenServiceImpl extends AbstractCrudService<WcUserTokenMapper, WcUserToken> implements WcUserTokenService {
-
-}

+ 0 - 87
fiveep-service/src/main/java/com/bizmatics/service/util/Arith.java

@@ -1,87 +0,0 @@
-package com.bizmatics.service.util;
-
-import java.math.BigDecimal;
-
-/**
- * @author yq
- * @date 2021/6/8 9:12
- */
-public class Arith {
-
-
-    //默认除法运算精度
-    private static final int DEF_DIV_SCALE = 4;
-
-    /**
-     * 构造器私有,让这个类不能实例化
-     */
-    private Arith(){}
-
-    /**
-     * 加法
-     * @param v1
-     * @param v2
-     * @return
-     */
-    public static double add(double v1,double v2){
-        BigDecimal b1 = BigDecimal.valueOf(v1);
-        BigDecimal b2 = BigDecimal.valueOf(v2);
-        return b1.add(b2).doubleValue();
-    }
-
-    /**
-     * 减法
-     * @param v1
-     * @param v2
-     * @return
-     */
-    public static double sub(double v1,double v2){
-        BigDecimal b1 = BigDecimal.valueOf(v1);
-        BigDecimal b2 = BigDecimal.valueOf(v2);
-        return b1.subtract(b2).doubleValue();
-    }
-
-    /**
-     * 乘法
-     * @param v1
-     * @param v2
-     * @return
-     */
-    public static double mul(double v1,double v2){
-        BigDecimal b1 = BigDecimal.valueOf(v1);
-        BigDecimal b2 = BigDecimal.valueOf(v2);
-        return b1.multiply(b2).doubleValue();
-    }
-
-    /**
-     * 除法
-     * @param v1
-     * @param v2
-     * @return
-     */
-    public static double div(double v1,double v2){
-        return div(v1,v2,DEF_DIV_SCALE);
-    }
-
-
-    /**
-     * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指定精度,以后的数字四舍五入
-     * @param v1
-     *            被除數
-     * @param v2
-     *            除數
-     * @param scale
-     *            表示表示需要精確到小數點以後位数。
-     * @return 兩個參數的商
-     */
-    public static double div(double v1, double v2, int scale) {
-        if (scale < 0) {
-            throw new IllegalArgumentException(
-                    "The scale must be a positive integer or zero");
-        }
-        BigDecimal b1 = BigDecimal.valueOf(v1);
-        BigDecimal b2 = BigDecimal.valueOf(v2);
-        return b1.divide(b2, scale, BigDecimal.ROUND_HALF_UP).doubleValue();
-    }
-
-}

+ 0 - 43
fiveep-service/src/main/java/com/bizmatics/service/util/SessionLocal.java

@@ -1,43 +0,0 @@
-package com.bizmatics.service.util;
-
-import com.bizmatics.common.core.exception.BusinessException;
-import com.bizmatics.model.User;
-import lombok.extern.log4j.Log4j2;
-
-import java.util.Optional;
-
-import static com.bizmatics.common.core.exception.BusinessErrorCode.BIZ_LACK_NECESSARY_PARAM_ERROR;
-
-/**
- * @author yq
- * @date 2021/7/8 10:34
- */
-@Log4j2
-public class SessionLocal {
-    private static ThreadLocal<User> local = new ThreadLocal<User>();
-
-    /**
-     * 设置用户信息
-     *
-     * @param user
-     */
-    public static void setUser( User user )
-    {
-        local.set( user );
-    }
-
-    /**
-     * 获取登录用户信息
-     *
-     * @return
-     */
-    public static User getUser() {
-        log.info( "当前线程:" + Thread.currentThread().getName() );
-        return local.get();
-    }
-
-    public static Integer getUserId(){
-        return 1;
-//        return Optional.ofNullable(getUser()).map(User::getId).orElseThrow(() ->new BusinessException(BIZ_LACK_NECESSARY_PARAM_ERROR,"用户未登录"));
-    }
-}