diff --git a/.gitignore b/.gitignore index 11d5aae..d90ac3d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ target node_modules psdc-ui/yarn.lock +dist diff --git a/psdc-admin/src/main/resources/application-dev.yml b/psdc-admin/src/main/resources/application-dev.yml index 31dfcf2..f6dbe4a 100644 --- a/psdc-admin/src/main/resources/application-dev.yml +++ b/psdc-admin/src/main/resources/application-dev.yml @@ -15,7 +15,6 @@ psdc: server: # 服务器的HTTP端口,默认为8080 port: 8999 - servlet: # 应用的访问路径 context-path: / diff --git a/psdc-admin/src/main/resources/application-prod.yml b/psdc-admin/src/main/resources/application-prod.yml index 2f08eaf..9e6d263 100644 --- a/psdc-admin/src/main/resources/application-prod.yml +++ b/psdc-admin/src/main/resources/application-prod.yml @@ -48,15 +48,15 @@ spring: config: activate: on-profile: - - prop + - prod # 资源信息 datasource: # 数据库驱动 driver-class-name: com.mysql.cj.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource - url: jdbc:mysql://192.168.10.99:3306/psdc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true - username: hwjsolar - password: 123456 + url: jdbc:mysql://127.0.0.1:3308/psdc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true + username: root + password: root messages: # 国际化资源文件路径 basename: i18n/messages @@ -95,7 +95,6 @@ spring: # #连接池最大阻塞等待时间(使用负值表示没有限制) max-wait: -1ms - # token配置 token: # 令牌自定义标识 @@ -139,11 +138,12 @@ mqtt: #QOS等级 0, 1, 2 qos: 1 #客户端id 必须唯一 - clientId: psdc-prop + clientId: psdc@system #连接超时,默认30000 timeOut: 10 #心跳间隔时间,默认3000 keepAlive: 200 - topic1: /psdc/devices/1672921261340/datas/report/dataTimingReport - topic2: /psdc/report/dataTimingReport - + #主题 + dataTopic: /hwj1/dntd/datas/report/dataTimingReport + controlTopic: /hwj1/dntd/request/action/command + controlResponseTopic: /hwj1/dntd/response/action/command diff --git a/psdc-admin/src/main/resources/application.yml b/psdc-admin/src/main/resources/application.yml index caf4dfc..90385b2 100644 --- a/psdc-admin/src/main/resources/application.yml +++ b/psdc-admin/src/main/resources/application.yml @@ -1,3 +1,3 @@ spring: profiles: - active: dev \ No newline at end of file + active: prod \ No newline at end of file diff --git a/psdc-business/src/main/java/com/psdc/service/impl/PsdcElectricHtdataServiceImpl.java b/psdc-business/src/main/java/com/psdc/service/impl/PsdcElectricHtdataServiceImpl.java index 937dc06..3da4071 100644 --- a/psdc-business/src/main/java/com/psdc/service/impl/PsdcElectricHtdataServiceImpl.java +++ b/psdc-business/src/main/java/com/psdc/service/impl/PsdcElectricHtdataServiceImpl.java @@ -10,6 +10,7 @@ import com.psdc.service.IPsdcElectricHtdataService; import com.psdc.utils.StringUtils; import com.psdc.utils.bean.BeanUtils; import lombok.extern.slf4j.Slf4j; +import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -113,6 +114,7 @@ public class PsdcElectricHtdataServiceImpl implements IPsdcElectricHtdataService * @param energyStatisticsRequest 请求数据 * @return 一天每小时能耗数据 */ + @Override public List selectAllByListDay(EnergyStatisticsRequest energyStatisticsRequest){ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); /* @@ -129,6 +131,7 @@ public class PsdcElectricHtdataServiceImpl implements IPsdcElectricHtdataService * @param energyStatisticsRequest 请求数据 * @return 一天每小时能耗数据 */ + @Override public List selectAllByListMonth(EnergyStatisticsRequest energyStatisticsRequest) { return psdcStatisticsMonthMapper.queryAllByLimit(energyStatisticsRequest); @@ -139,6 +142,7 @@ public class PsdcElectricHtdataServiceImpl implements IPsdcElectricHtdataService * @param energyStatisticsRequest 请求数据 * @return 一天每小时能耗数据 */ + @Override public List selectAllByListYear(EnergyStatisticsRequest energyStatisticsRequest){ return psdcStatisticsYearMapper.queryAllByLimit(energyStatisticsRequest); } @@ -147,6 +151,7 @@ public class PsdcElectricHtdataServiceImpl implements IPsdcElectricHtdataService * 每日统计定时任务 */ // @Scheduled(cron = "0 10 0 * * ? ") + @Override public void statisticalTask(){ //获取昨日用电量总和 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); diff --git a/psdc-business/src/main/resources/mapper/business/PsdcStatisticsMonthMapper.xml b/psdc-business/src/main/resources/mapper/business/PsdcStatisticsMonthMapper.xml index b860ddd..4d599a3 100644 --- a/psdc-business/src/main/resources/mapper/business/PsdcStatisticsMonthMapper.xml +++ b/psdc-business/src/main/resources/mapper/business/PsdcStatisticsMonthMapper.xml @@ -91,11 +91,11 @@ - AND date_format(monthDate,'%Y-%m') >= #{startTime} + AND date_format(month_date,'%Y-%m') >= #{startTime} - AND date_format(monthDate,'%Y-%m') <= #{endTime} + AND date_format(month_date,'%Y-%m') <= #{endTime} diff --git a/psdc-common/src/main/java/com/psdc/core/text/Convert.java b/psdc-common/src/main/java/com/psdc/core/text/Convert.java index 8f6c501..f21d91d 100644 --- a/psdc-common/src/main/java/com/psdc/core/text/Convert.java +++ b/psdc-common/src/main/java/com/psdc/core/text/Convert.java @@ -28,7 +28,7 @@ public class Convert public static String toStr(Object value, String defaultValue) { if (null == value) - { + { return defaultValue; } if (value instanceof String) diff --git a/psdc-ui/package-lock.json b/psdc-ui/package-lock.json index fe2c92c..99bbda9 100644 --- a/psdc-ui/package-lock.json +++ b/psdc-ui/package-lock.json @@ -30,7 +30,7 @@ "@vue/compiler-sfc": "3.2.45", "sass": "1.56.1", "unplugin-auto-import": "0.11.4", - "vite": "3.2.3", + "vite": "^3.2.3", "vite-plugin-compression": "0.5.1", "vite-plugin-svg-icons": "2.0.1", "vite-plugin-vue-setup-extend": "0.4.0" @@ -1414,6 +1414,20 @@ "node": ">=12" } }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -3607,7 +3621,6 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.3.tgz", "integrity": "sha512-h8jl1TZ76eGs3o2dIBSsvXDLb1m/Ec1iej8ZMdz+PsaFUsftZeWe2CZOI3qogEsMNaywc17gu0q6cQDzh/weCQ==", "dev": true, - "license": "MIT", "dependencies": { "esbuild": "^0.15.9", "postcss": "^8.4.18", diff --git a/psdc-ui/package.json b/psdc-ui/package.json index 059d474..a14f07e 100644 --- a/psdc-ui/package.json +++ b/psdc-ui/package.json @@ -31,7 +31,7 @@ "@vue/compiler-sfc": "3.2.45", "sass": "1.56.1", "unplugin-auto-import": "0.11.4", - "vite": "3.2.3", + "vite": "^4.3.9", "vite-plugin-compression": "0.5.1", "vite-plugin-svg-icons": "2.0.1", "vite-plugin-vue-setup-extend": "0.4.0" diff --git a/psdc-ui/src/router/index.js b/psdc-ui/src/router/index.js index 76bdf48..981efb8 100644 --- a/psdc-ui/src/router/index.js +++ b/psdc-ui/src/router/index.js @@ -142,20 +142,7 @@ export const dynamicRoutes = [ } ] }, - { - path: '/tool/gen-edit', - component: Layout, - hidden: true, - permissions: ['tool:gen:edit'], - children: [ - { - path: 'index/:tableId(\\d+)', - component: () => import('@/views/tool/gen/editTable'), - name: 'GenEdit', - meta: { title: '修改生成配置', activeMenu: '/tool/gen' } - } - ] - } + ] const router = createRouter({ diff --git a/psdc-ui/src/views/bigview/index.vue b/psdc-ui/src/views/bigview/index.vue index 62b80b4..35026db 100644 --- a/psdc-ui/src/views/bigview/index.vue +++ b/psdc-ui/src/views/bigview/index.vue @@ -49,7 +49,7 @@
当前功率
- +
{{ nowEle }}kWh
diff --git a/psdc-ui/src/views/system/device/index.vue b/psdc-ui/src/views/system/device/index.vue index 59feab1..8229e3a 100644 --- a/psdc-ui/src/views/system/device/index.vue +++ b/psdc-ui/src/views/system/device/index.vue @@ -27,6 +27,15 @@ v-hasPermi="['system:user:import']" >导入 + + 导出 +
@@ -41,8 +50,24 @@ - -