黑名单和小于250电压停止充电
This commit is contained in:
parent
c77ff646eb
commit
1453125794
@ -44,7 +44,7 @@ public class CDConnectorChargeStatusInfoTask extends CoreDispatcher {
|
||||
* 设备充电中状态变化推送(我们平台推送成都市平台) --已推送
|
||||
* 实时数据没40秒
|
||||
*/
|
||||
//@Scheduled(fixedDelay = 1000 * 40)
|
||||
// @Scheduled(fixedDelay = 1000 * 40)
|
||||
public void run() throws Exception{
|
||||
|
||||
List<Long> longList =new ArrayList<>();
|
||||
|
||||
@ -46,7 +46,7 @@ public class CDNotificationEquipmentV2GPowerInfoTask extends CoreDispatcher {
|
||||
private final Logger logger = LoggerFactory.getLogger(CDNotificationEquipmentV2GPowerInfoTask.class);
|
||||
|
||||
//9099开放定时任务 9009不开放
|
||||
//@Scheduled(cron = "0 0/1 * * * ? ")
|
||||
//@Scheduled(cron = "0 0/1 * * * ? ")
|
||||
public void run() throws IOException {
|
||||
//不参与合作的电站
|
||||
List<XhpcStationInternetBlacklist> xhpcStationInternetBlacklist =xhpcStationInternetBlacklistRepo.findByInternetUserId(6L);
|
||||
|
||||
@ -32,7 +32,7 @@ public class NotificationCancelOrderTask extends CoreDispatcher {
|
||||
|
||||
//推送不开放(evcs 放开)
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(fixedRate = 1000 * 15)
|
||||
//@Scheduled(fixedRate = 1000 * 15)
|
||||
public void run() throws JsonProcessingException {
|
||||
|
||||
//Getting the orders, which need to be notified.
|
||||
|
||||
@ -40,7 +40,7 @@ public class NotificationChargeOrderInfoTask extends CoreDispatcher {
|
||||
private final Logger logger = LoggerFactory.getLogger(NotificationChargeOrderInfoTask.class);
|
||||
//推送不开放(evcs 放开)
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(fixedRate = 1000 * 15)
|
||||
//@Scheduled(fixedRate = 1000 * 15)
|
||||
public void run() throws JsonProcessingException {
|
||||
|
||||
Collection<String> orderKeys = REDIS.keys("order:*");
|
||||
|
||||
@ -50,7 +50,7 @@ public class NotificationEquipChargeStatusTask extends CoreDispatcher {
|
||||
*/
|
||||
//推送不开放
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(fixedRate = 1000 * 30)
|
||||
//@Scheduled(fixedRate = 1000 * 30)
|
||||
public void run() throws IOException {
|
||||
|
||||
List<AuthSecretToken> authSecretTokenOutList = authSecretTokenRepository.findBySecretTokenType(SECRET_TOKEN_TYPE_OUT);
|
||||
|
||||
@ -35,7 +35,7 @@ public class NotificationStartChargeResultTask extends CoreDispatcher {
|
||||
*/
|
||||
//(evcs 放开 30 秒, 测试平台开放 15秒)
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(fixedRate = 1000 * 15)
|
||||
//@Scheduled(fixedRate = 1000 * 15)
|
||||
public void run() throws IOException {
|
||||
|
||||
//Getting the charge orders which from 3rd.
|
||||
|
||||
@ -51,7 +51,7 @@ public class NotificationStationStatusTask extends CoreDispatcher {
|
||||
|
||||
//推送不开放(evcs 放开)
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(fixedRate = 1000 * 45)
|
||||
//@Scheduled(fixedRate = 1000 * 45)
|
||||
protected void run() throws IOException {
|
||||
|
||||
Collection<String> stationTerminalKeys = REDIS.keys("stationTerminalStatus:*");
|
||||
|
||||
@ -28,7 +28,7 @@ public class NotificationStopChargeResultTask extends CoreDispatcher {
|
||||
|
||||
//(evcs 放开)
|
||||
//9009开放定时任务 9099不开放
|
||||
@Scheduled(fixedRate = 1000 * 3)
|
||||
//@Scheduled(fixedRate = 1000 * 3)
|
||||
public void run() throws Exception {
|
||||
|
||||
notifyService();
|
||||
|
||||
@ -48,8 +48,8 @@ public class TokenController extends BaseController
|
||||
public static final String ACCOUNT ="scxhkj";
|
||||
public static final String PASSWD ="6A9628548C4CBECCE80A2479CD77679F";
|
||||
public static final String PRODUCTLD ="20191130000001";
|
||||
public static final String accessKeyId = "LTAI5t7vcQMfZPEZQkEdrAjx";
|
||||
public static final String accessKeySecret = "K7ZstCZoAjvJsBCe0CipodINETuPyi";
|
||||
public static final String accessKeyId = "LTAI5tHxc8hrG6cT5nDtEkiV";
|
||||
public static final String accessKeySecret = "5kFEaIFE7eeODxKQwD5mvTRF48MK6w";
|
||||
/**
|
||||
* 平台管理员登陆
|
||||
* @param form
|
||||
|
||||
@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
order by r.role_sort
|
||||
order by r.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
|
||||
|
||||
@ -169,7 +169,7 @@
|
||||
|
||||
<select id="selectUserByUserName" parameterType="java.lang.String" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_name = #{userName} and u.tenant_id =#{tenantId}
|
||||
where u.user_name = #{userName} and u.tenant_id =#{tenantId} and u.del_flag =0
|
||||
</select>
|
||||
|
||||
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
|
||||
|
||||
@ -40,17 +40,17 @@ INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_c
|
||||
(2, 'ruoyi-gateway-dev.yml', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net \n port: 6379\n password: tingsun@7645313\n cloud:\n gateway:\n discovery:\n locator:\n lowerCaseServiceId: true\n enabled: true\n routes:\n # 认证中心\n - id: ruoyi-auth\n uri: lb://ruoyi-auth\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - CacheRequestFilter\n - ValidateCodeFilter\n - StripPrefix=1\n # 代码生成\n - id: ruoyi-gen\n uri: lb://ruoyi-gen\n predicates:\n - Path=/code/**\n filters:\n - StripPrefix=1\n # 定时任务\n - id: ruoyi-job\n uri: lb://ruoyi-job\n predicates:\n - Path=/schedule/**\n filters:\n - StripPrefix=1\n # 系统模块\n - id: ruoyi-system\n uri: lb://ruoyi-system\n predicates:\n - Path=/system/**\n filters:\n - StripPrefix=1\n # 文件服务\n - id: ruoyi-file\n uri: lb://ruoyi-file\n predicates:\n - Path=/file/**\n filters:\n - StripPrefix=1\n # 充电桩服务\n - id: xhpc-power-pole\n uri: lb://xhpc-power-pole\n predicates:\n - Path=/pp/**\n filters:\n - StripPrefix=1\n # 账号服务\n - id: xhpc-user\n uri: lb://xhpc-user\n predicates:\n - Path=/xhpc-user/**\n filters:\n - StripPrefix=1\n # 支付服务\n - id: xhpc-payment\n uri: lb://xhpc-payment\n predicates:\n - Path=/xhpc-payment/**\n filters:\n - StripPrefix=1\n # 订单服务\n - id: xhpc-order\n uri: lb://xhpc-order\n predicates:\n - Path=/xhpc-order/**\n filters:\n - StripPrefix=1\n\n# 不校验白名单\nignore:\n whites:\n - /auth/logout\n - /auth/login\n - /*/v2/api-docs\n - /csrf\n - /xhpc-user/app/user/jscode2session\n - /xhpc-user/app/user/register\n - /xhpc-user/app/user/login\n - /xhpc-user/app/user/loginOut\n - /xhpc-user/app/user/voluntaryLogin\n - /xhpc-user/app/user/logout\n - /xhpc-user/app/user/alipayEmpower\n - /xhpc-user/app/user/appInfo\n - /xhpc-payment/wx/paymentCallback', '5a3b5371bf88b6b46ffe8271c7cae24c', '2020-05-14 14:17:55', '2021-07-28 07:50:28', 'nacos', '171.88.42.96', '', '', '网关模块', 'null', 'null', 'yaml', 'null'),
|
||||
(3, 'ruoyi-auth-dev.yml', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net \n port: 6379\n password: tingsun@7645313\n', '364ff5f362097c96a2ad12596b5ff9fd', '2020-11-20 00:00:00', '2021-07-23 09:21:25', 'nacos', '0:0:0:0:0:0:0:1', '', '', '认证中心', 'null', 'null', 'yaml', 'null'),
|
||||
(4, 'ruoyi-monitor-dev.yml', 'DEFAULT_GROUP', '# spring\r\nspring: \r\n security:\r\n user:\r\n name: ruoyi\r\n password: 123456\r\n boot:\r\n admin:\r\n ui:\r\n title: 若依服务状态监控\r\n', 'd8997d0707a2fd5d9fc4e8409da38129', '2020-11-20 00:00:00', '2020-12-21 16:28:07', NULL, '0:0:0:0:0:0:0:1', '', '', '监控中心', 'null', 'null', 'yaml', 'null'),
|
||||
(5, 'ruoyi-system-dev.yml', 'DEFAULT_GROUP', '# spring配置\nspring: \n redis:\n host: tingsun-znc.f3322.net \n port: 6379\n password: tingsun@7645313\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n # seata: true # 开启seata代理,开启后默认每个数据源都代理,如果某个不需要代理可单独关闭\n\n# seata配置\nseata:\n # 默认关闭,如需启用spring.datasource.dynami.seata需要同时开启\n enabled: false\n # Seata 应用编号,默认为 ${spring.application.name}\n application-id: ${spring.application.name}\n # Seata 事务组编号,用于 TC 集群名\n tx-service-group: ${spring.application.name}-group\n # 关闭自动代理\n enable-auto-data-source-proxy: false\n # 服务配置项\n service:\n # 虚拟组和分组的映射\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\n namespace:\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.xhpc\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 系统模块接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip', '58d5723fa8c81b12563941261fd7e758', '2020-11-20 00:00:00', '2021-07-28 10:44:08', 'nacos', '0:0:0:0:0:0:0:1', '', '', '系统模块', 'null', 'null', 'yaml', 'null'),
|
||||
(5, 'ruoyi-system-dev.yml', 'DEFAULT_GROUP', '# spring配置\nspring: \n redis:\n host: tingsun-znc.f3322.net \n port: 6379\n password: tingsun@7645313\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n # seata: true # 开启seata代理,开启后默认每个数据源都代理,如果某个不需要代理可单独关闭\n\n# seata配置\nseata:\n # 默认关闭,如需启用spring.datasource.dynami.seata需要同时开启\n enabled: false\n # Seata 应用编号,默认为 ${spring.application.name}\n application-id: ${spring.application.name}\n # Seata 事务组编号,用于 TC 集群名\n tx-service-group: ${spring.application.name}-group\n # 关闭自动代理\n enable-auto-data-source-proxy: false\n # 服务配置项\n service:\n # 虚拟组和分组的映射\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: 120.26.46.180:8858\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: 120.26.46.180:8858\n namespace:\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.xhpc\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 系统模块接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip', '58d5723fa8c81b12563941261fd7e758', '2020-11-20 00:00:00', '2021-07-28 10:44:08', 'nacos', '0:0:0:0:0:0:0:1', '', '', '系统模块', 'null', 'null', 'yaml', 'null'),
|
||||
(6, 'ruoyi-gen-dev.yml', 'DEFAULT_GROUP', '# spring配置\r\nspring: \r\n redis:\r\n host: tingsun-znc.f3322.net \r\n port: 6379\r\n password: tingsun@7645313\r\n datasource: \r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: ry-cloud\r\n password: xiaohua123\r\n\r\n# mybatis配置\r\nmybatis:\r\n # 搜索指定包别名\r\n typeAliasesPackage: com.xhpc.gen.domain\r\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\r\n mapperLocations: classpath:mapper/**/*.xml\r\n\r\n# swagger配置\r\nswagger:\r\n title: 代码生成接口文档\r\n license: Powered By ruoyi\r\n licenseUrl: https://ruoyi.vip\r\n\r\n# 代码生成\r\ngen: \r\n # 作者\r\n author: ruoyi\r\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\r\n packageName: com.xhpc.system\r\n # 自动去除表前缀,默认是false\r\n autoRemovePre: false\r\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\r\n tablePrefix: sys_\r\n', 'a21c5fa4c7c5731e62453614cf2e7d3f', '2020-11-20 00:00:00', '2021-07-24 14:16:06', NULL, '0:0:0:0:0:0:0:1', '', '', '代码生成', 'null', 'null', 'yaml', 'null'),
|
||||
(7, 'ruoyi-job-dev.yml', 'DEFAULT_GROUP', '# spring配置\nspring: \n redis:\n host: tingsun-znc.f3322.net \n port: 6379\n password: tingsun@7645313\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/quartz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: quartz\n password: quartz123\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.xhpc.job\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 定时任务接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip\n', 'e9233f5ce3b3de95233ad88bb1a4231a', '2020-11-20 00:00:00', '2021-07-29 08:51:36', 'nacos', '0:0:0:0:0:0:0:1', '', '', '定时任务', 'null', 'null', 'yaml', 'null'),
|
||||
(8, 'ruoyi-file-dev.yml', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net\n port: 6379\n password: tingsun@7645313 \n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n\nseata:\n enabled: false\n application-id: ${spring.application.name}\n tx-service-group: ${spring.application.name}-group\n enable-auto-data-source-proxy: false\n service:\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\n namespace: \n\nmybatis:\n typeAliasesPackage: com.xhpc.file\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n configuration:\n call-setters-on-nulls: true\n\n# 本地文件上传 \nfile:\n domain: http://127.0.0.1:9300\n path: D:/ruoyi/uploadPath\n prefix: /statics\n\n# FastDFS配置\nfdfs:\n domain: http://8.129.231.12\n soTimeout: 3000\n connectTimeout: 2000\n trackerList: 8.129.231.12:22122\n\n# Minio配置\nminio:\n url: http://8.129.231.12:9000\n accessKey: minioadmin\n secretKey: minioadmin\n bucketName: test\n#oss默认配置\noss:\n enabled: true\n name: qiniu\n tenant-mode: true\n endpoint: oss-accelerate.aliyuncs.com\n access-key: LTAIhOKfUxeutGeh\n secret-key: 2TvKIoX03bnP5WRLxtTaEYQufrtbav\n bucket-name: dx-gzxh\n', '435441353d3fbaa4ee8165d6f4b0374b', '2020-11-20 00:00:00', '2021-07-29 02:42:04', 'nacos', '171.88.42.96', '', '', '文件服务', 'null', 'null', 'yaml', 'null'),
|
||||
(8, 'ruoyi-file-dev.yml', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net\n port: 6379\n password: tingsun@7645313 \n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n\nseata:\n enabled: false\n application-id: ${spring.application.name}\n tx-service-group: ${spring.application.name}-group\n enable-auto-data-source-proxy: false\n service:\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: 120.26.46.180:8858\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: 120.26.46.180:8858\n namespace: \n\nmybatis:\n typeAliasesPackage: com.xhpc.file\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n configuration:\n call-setters-on-nulls: true\n\n# 本地文件上传 \nfile:\n domain: http://127.0.0.1:9300\n path: D:/ruoyi/uploadPath\n prefix: /statics\n\n# FastDFS配置\nfdfs:\n domain: http://8.129.231.12\n soTimeout: 3000\n connectTimeout: 2000\n trackerList: 8.129.231.12:22122\n\n# Minio配置\nminio:\n url: http://8.129.231.12:9000\n accessKey: minioadmin\n secretKey: minioadmin\n bucketName: test\n#oss默认配置\noss:\n enabled: true\n name: qiniu\n tenant-mode: true\n endpoint: oss-accelerate.aliyuncs.com\n access-key: LTAIhOKfUxeutGeh\n secret-key: 2TvKIoX03bnP5WRLxtTaEYQufrtbav\n bucket-name: dx-gzxh\n', '435441353d3fbaa4ee8165d6f4b0374b', '2020-11-20 00:00:00', '2021-07-29 02:42:04', 'nacos', '171.88.42.96', '', '', '文件服务', 'null', 'null', 'yaml', 'null'),
|
||||
(9, 'sentinel-ruoyi-gateway', 'DEFAULT_GROUP', '[\r\n {\r\n "resource": "ruoyi-auth",\r\n "count": 500,\r\n "grade": 1,\r\n "limitApp": "default",\r\n "strategy": 0,\r\n "controlBehavior": 0\r\n },\r\n {\r\n "resource": "ruoyi-system",\r\n "count": 1000,\r\n "grade": 1,\r\n "limitApp": "default",\r\n "strategy": 0,\r\n "controlBehavior": 0\r\n },\r\n {\r\n "resource": "ruoyi-gen",\r\n "count": 200,\r\n "grade": 1,\r\n "limitApp": "default",\r\n "strategy": 0,\r\n "controlBehavior": 0\r\n },\r\n {\r\n "resource": "ruoyi-job",\r\n "count": 300,\r\n "grade": 1,\r\n "limitApp": "default",\r\n "strategy": 0,\r\n "controlBehavior": 0\r\n }\r\n]', '9f3a3069261598f74220bc47958ec252', '2020-11-20 00:00:00', '2020-11-20 00:00:00', NULL, '0:0:0:0:0:0:0:1', '', '', '限流策略', 'null', 'null', 'json', 'null'),
|
||||
(20, 'xhpc-power-pile-dev.yml', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net\n port: 6379\n password: tingsun@7645313\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n\nseata:\n enabled: false\n application-id: ${spring.application.name}\n tx-service-group: ${spring.application.name}-group\n enable-auto-data-source-proxy: false\n service:\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\n namespace: \n\nmybatis:\n typeAliasesPackage: com.xhpc.pp\n mapperLocations: classpath:mapper/**/*.xml\n', 'e1cad28a4df29955413fa360a40a03dc', '2021-07-19 06:40:44', '2021-07-23 09:05:47', 'nacos', '0:0:0:0:0:0:0:1', '', '', '充电桩协议服务', '', '', 'yaml', ''),
|
||||
(22, 'xhpc-charging-station-dev.yml', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net\n port: 6379\n password: tingsun@7645313\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n\nseata:\n enabled: false\n application-id: ${spring.application.name}\n tx-service-group: ${spring.application.name}-group\n enable-auto-data-source-proxy: false\n service:\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\n namespace: \n\nmybatis:\n typeAliasesPackage: com.xhpc\n mapperLocations: classpath:mapper/**/*.xml\n', '5c9e25c8e8775649c0d5dcb5aed95715', '2021-07-19 08:22:12', '2021-07-28 08:51:17', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', ''),
|
||||
(23, 'xhpc-general-dev.yml', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net\n port: 6379\n password: tingsun@7645313\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n\nseata:\n enabled: false\n application-id: ${spring.application.name}\n tx-service-group: ${spring.application.name}-group\n enable-auto-data-source-proxy: false\n service:\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\n namespace: \n\nmybatis:\n typeAliasesPackage: com.xhpc.general\n mapperLocations: classpath:mapper/**/*.xml\n', 'c31f612a8d2c67dc69888b7c02bae5d0', '2021-07-20 20:39:06', '2021-07-21 10:03:06', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', ''),
|
||||
(24, 'xhpc-user', 'DEFAULT_GROUP', 'spring: \r\n redis:\r\n host: tingsun-znc.f3322.net\r\n port: 6379\r\n password: tingsun@7645313 \r\n jackson:\r\n date-format: yyyy-MM-dd HH:mm:ss\r\n time-zone: GMT+8\r\n datasource:\r\n druid:\r\n stat-view-servlet:\r\n enabled: true\r\n loginUsername: admin\r\n loginPassword: 123456\r\n dynamic:\r\n druid:\r\n initial-size: 5\r\n min-idle: 5\r\n maxActive: 20\r\n maxWait: 60000\r\n timeBetweenEvictionRunsMillis: 60000\r\n minEvictableIdleTimeMillis: 300000\r\n validationQuery: SELECT 1 FROM DUAL\r\n testWhileIdle: true\r\n testOnBorrow: false\r\n testOnReturn: false\r\n poolPreparedStatements: true\r\n maxPoolPreparedStatementPerConnectionSize: 20\r\n filters: stat,slf4j\r\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\r\n datasource:\r\n master:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: ry-cloud\r\n password: xiaohua123\r\n\r\nseata:\r\n enabled: false\r\n application-id: ${spring.application.name}\r\n tx-service-group: ${spring.application.name}-group\r\n enable-auto-data-source-proxy: false\r\n service:\r\n vgroup-mapping:\r\n ruoyi-system-group: default\r\n config:\r\n type: nacos\r\n nacos:\r\n serverAddr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\r\n group: SEATA_GROUP\r\n namespace:\r\n registry:\r\n type: nacos\r\n nacos:\r\n application: seata-server\r\n server-addr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\r\n namespace: \r\n\r\nmybatis:\r\n typeAliasesPackage: com.xhpc.user\r\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\r\n mapperLocations: classpath:mapper/**/*.xml\r\n configuration:\r\n call-setters-on-nulls: true\r\n', 'a5bc394601350c323c9ebe171864089b', '2021-07-21 12:11:14', '2021-07-29 16:21:37', NULL, '0:0:0:0:0:0:0:1', '', '', 'null', 'null', 'null', 'yaml', 'null'),
|
||||
(20, 'xhpc-power-pile-dev.yml', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net\n port: 6379\n password: tingsun@7645313\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n\nseata:\n enabled: false\n application-id: ${spring.application.name}\n tx-service-group: ${spring.application.name}-group\n enable-auto-data-source-proxy: false\n service:\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: 120.26.46.180:8858\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: 120.26.46.180:8858\n namespace: \n\nmybatis:\n typeAliasesPackage: com.xhpc.pp\n mapperLocations: classpath:mapper/**/*.xml\n', 'e1cad28a4df29955413fa360a40a03dc', '2021-07-19 06:40:44', '2021-07-23 09:05:47', 'nacos', '0:0:0:0:0:0:0:1', '', '', '充电桩协议服务', '', '', 'yaml', ''),
|
||||
(22, 'xhpc-charging-station-dev.yml', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net\n port: 6379\n password: tingsun@7645313\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n\nseata:\n enabled: false\n application-id: ${spring.application.name}\n tx-service-group: ${spring.application.name}-group\n enable-auto-data-source-proxy: false\n service:\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: 120.26.46.180:8858\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: 120.26.46.180:8858\n namespace: \n\nmybatis:\n typeAliasesPackage: com.xhpc\n mapperLocations: classpath:mapper/**/*.xml\n', '5c9e25c8e8775649c0d5dcb5aed95715', '2021-07-19 08:22:12', '2021-07-28 08:51:17', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', ''),
|
||||
(23, 'xhpc-general-dev.yml', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net\n port: 6379\n password: tingsun@7645313\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n\nseata:\n enabled: false\n application-id: ${spring.application.name}\n tx-service-group: ${spring.application.name}-group\n enable-auto-data-source-proxy: false\n service:\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: 120.26.46.180:8858\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: 120.26.46.180:8858\n namespace: \n\nmybatis:\n typeAliasesPackage: com.xhpc.general\n mapperLocations: classpath:mapper/**/*.xml\n', 'c31f612a8d2c67dc69888b7c02bae5d0', '2021-07-20 20:39:06', '2021-07-21 10:03:06', 'nacos', '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', ''),
|
||||
(24, 'xhpc-user', 'DEFAULT_GROUP', 'spring: \r\n redis:\r\n host: tingsun-znc.f3322.net\r\n port: 6379\r\n password: tingsun@7645313 \r\n jackson:\r\n date-format: yyyy-MM-dd HH:mm:ss\r\n time-zone: GMT+8\r\n datasource:\r\n druid:\r\n stat-view-servlet:\r\n enabled: true\r\n loginUsername: admin\r\n loginPassword: 123456\r\n dynamic:\r\n druid:\r\n initial-size: 5\r\n min-idle: 5\r\n maxActive: 20\r\n maxWait: 60000\r\n timeBetweenEvictionRunsMillis: 60000\r\n minEvictableIdleTimeMillis: 300000\r\n validationQuery: SELECT 1 FROM DUAL\r\n testWhileIdle: true\r\n testOnBorrow: false\r\n testOnReturn: false\r\n poolPreparedStatements: true\r\n maxPoolPreparedStatementPerConnectionSize: 20\r\n filters: stat,slf4j\r\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\r\n datasource:\r\n master:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: ry-cloud\r\n password: xiaohua123\r\n\r\nseata:\r\n enabled: false\r\n application-id: ${spring.application.name}\r\n tx-service-group: ${spring.application.name}-group\r\n enable-auto-data-source-proxy: false\r\n service:\r\n vgroup-mapping:\r\n ruoyi-system-group: default\r\n config:\r\n type: nacos\r\n nacos:\r\n serverAddr: 120.26.46.180:8858\r\n group: SEATA_GROUP\r\n namespace:\r\n registry:\r\n type: nacos\r\n nacos:\r\n application: seata-server\r\n server-addr: 120.26.46.180:8858\r\n namespace: \r\n\r\nmybatis:\r\n typeAliasesPackage: com.xhpc.user\r\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\r\n mapperLocations: classpath:mapper/**/*.xml\r\n configuration:\r\n call-setters-on-nulls: true\r\n', 'a5bc394601350c323c9ebe171864089b', '2021-07-21 12:11:14', '2021-07-29 16:21:37', NULL, '0:0:0:0:0:0:0:1', '', '', 'null', 'null', 'null', 'yaml', 'null'),
|
||||
(32, 'xhpc-payment', 'DEFAULT_GROUP', 'spring: \n redis:\n host: tingsun-znc.f3322.net\n port: 6379\n password: tingsun@7645313 \n jackson:\n date-format: yyyy-MM-dd HH:mm:ss\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: ry-cloud\n password: xiaohua123\n\nseata:\n enabled: false\n application-id: ${spring.application.name}\n tx-service-group: ${spring.application.name}-group\n enable-auto-data-source-proxy: false\n service:\n vgroup-mapping:\n ruoyi-system-group: default\n config:\n type: nacos\n nacos:\n serverAddr: 118.24.137.203:8848\n group: SEATA_GROUP\n namespace:\n registry:\n type: nacos\n nacos:\n application: seata-server\n server-addr: 118.24.137.203:8848\n namespace: \n\nmybatis:\n typeAliasesPackage: com.xhpc.payment\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n configuration:\n call-setters-on-nulls: true\n', '406756afa55d157cb60305f89f29ec0c', '2021-07-22 16:44:26', '2021-07-22 11:10:56', 'nacos', '110.184.240.136', '', '', '', '', '', 'yaml', ''),
|
||||
(45, 'xhpc-order', 'DEFAULT_GROUP', 'spring: \r\n redis:\r\n host: tingsun-znc.f3322.net\r\n port: 6379\r\n password: tingsun@7645313 \r\n jackson:\r\n date-format: yyyy-MM-dd HH:mm:ss\r\n datasource:\r\n druid:\r\n stat-view-servlet:\r\n enabled: true\r\n loginUsername: admin\r\n loginPassword: 123456\r\n dynamic:\r\n druid:\r\n initial-size: 5\r\n min-idle: 5\r\n maxActive: 20\r\n maxWait: 60000\r\n timeBetweenEvictionRunsMillis: 60000\r\n minEvictableIdleTimeMillis: 300000\r\n validationQuery: SELECT 1 FROM DUAL\r\n testWhileIdle: true\r\n testOnBorrow: false\r\n testOnReturn: false\r\n poolPreparedStatements: true\r\n maxPoolPreparedStatementPerConnectionSize: 20\r\n filters: stat,slf4j\r\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\r\n datasource:\r\n master:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: ry-cloud\r\n password: xiaohua123\r\n\r\nseata:\r\n enabled: false\r\n application-id: ${spring.application.name}\r\n tx-service-group: ${spring.application.name}-group\r\n enable-auto-data-source-proxy: false\r\n service:\r\n vgroup-mapping:\r\n ruoyi-system-group: default\r\n config:\r\n type: nacos\r\n nacos:\r\n serverAddr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\r\n group: SEATA_GROUP\r\n namespace:\r\n registry:\r\n type: nacos\r\n nacos:\r\n application: seata-server\r\n server-addr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848\r\n namespace: \r\n\r\nmybatis:\r\n typeAliasesPackage: com.xhpc.order\r\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\r\n mapperLocations: classpath:mapper/**/*.xml\r\n configuration:\r\n call-setters-on-nulls: true\r\n', 'dda0f504b5a217c72b8e9cc62f449da5', '2021-07-26 15:35:37', '2021-07-26 15:35:37', NULL, '0:0:0:0:0:0:0:1', '', '', NULL, NULL, NULL, 'yaml', NULL);
|
||||
(45, 'xhpc-order', 'DEFAULT_GROUP', 'spring: \r\n redis:\r\n host: tingsun-znc.f3322.net\r\n port: 6379\r\n password: tingsun@7645313 \r\n jackson:\r\n date-format: yyyy-MM-dd HH:mm:ss\r\n datasource:\r\n druid:\r\n stat-view-servlet:\r\n enabled: true\r\n loginUsername: admin\r\n loginPassword: 123456\r\n dynamic:\r\n druid:\r\n initial-size: 5\r\n min-idle: 5\r\n maxActive: 20\r\n maxWait: 60000\r\n timeBetweenEvictionRunsMillis: 60000\r\n minEvictableIdleTimeMillis: 300000\r\n validationQuery: SELECT 1 FROM DUAL\r\n testWhileIdle: true\r\n testOnBorrow: false\r\n testOnReturn: false\r\n poolPreparedStatements: true\r\n maxPoolPreparedStatementPerConnectionSize: 20\r\n filters: stat,slf4j\r\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\r\n datasource:\r\n master:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://182.140.223.172:8036/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: ry-cloud\r\n password: xiaohua123\r\n\r\nseata:\r\n enabled: false\r\n application-id: ${spring.application.name}\r\n tx-service-group: ${spring.application.name}-group\r\n enable-auto-data-source-proxy: false\r\n service:\r\n vgroup-mapping:\r\n ruoyi-system-group: default\r\n config:\r\n type: nacos\r\n nacos:\r\n serverAddr: 120.26.46.180:8858\r\n group: SEATA_GROUP\r\n namespace:\r\n registry:\r\n type: nacos\r\n nacos:\r\n application: seata-server\r\n server-addr: 120.26.46.180:8858\r\n namespace: \r\n\r\nmybatis:\r\n typeAliasesPackage: com.xhpc.order\r\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\r\n mapperLocations: classpath:mapper/**/*.xml\r\n configuration:\r\n call-setters-on-nulls: true\r\n', 'dda0f504b5a217c72b8e9cc62f449da5', '2021-07-26 15:35:37', '2021-07-26 15:35:37', NULL, '0:0:0:0:0:0:0:1', '', '', NULL, NULL, NULL, 'yaml', NULL);
|
||||
/*!40000 ALTER TABLE `config_info` ENABLE KEYS */;
|
||||
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
|
||||
@ -22,6 +22,8 @@ public interface XhpcClearingHistoryOrderMapper {
|
||||
|
||||
List<XhpcClearingHistoryOrderDomain> getListPage(@Param("params") Map params);
|
||||
|
||||
String getClearingOrderIds(@Param("params") Map params);
|
||||
|
||||
int updateStatusBatchByOrderIds(@Param("orderIds") String orderIds, @Param("status") Integer status, @Param("checkBy")String checkBy);
|
||||
|
||||
BigDecimal selectCheckedAmount(@Param("operatorId")String operatorId);
|
||||
|
||||
@ -40,6 +40,8 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@ -72,6 +74,8 @@ public class XhpcClearingCheckoutServiceImpl extends BaseService implements Xhpc
|
||||
@Resource
|
||||
AsyncService asyncService;
|
||||
|
||||
private final ExecutorService executorService = Executors.newFixedThreadPool(20);
|
||||
|
||||
@Override
|
||||
public List<XhpcClearingCheckoutDomain> getPage(Map<String, Object> params) {
|
||||
|
||||
@ -173,11 +177,16 @@ public class XhpcClearingCheckoutServiceImpl extends BaseService implements Xhpc
|
||||
domain.setStatus(99);
|
||||
checkoutMapper.insert(domain);
|
||||
|
||||
if (StringUtils.isEmpty(domain.getClearingOrderIds())) {
|
||||
asyncService.updateCheckoutByOperatorAsync(domain.getOperatorId(), domain.getClearingCheckoutId());
|
||||
} else {
|
||||
asyncService.updateCheckoutByOrderIdsAsync(domain.getClearingOrderIds(), domain.getClearingCheckoutId());
|
||||
}
|
||||
executorService.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (StringUtils.isEmpty(domain.getClearingOrderIds())) {
|
||||
asyncService.updateCheckoutByOperatorAsync(domain.getOperatorId(), domain.getClearingCheckoutId());
|
||||
} else {
|
||||
asyncService.updateCheckoutByOrderIdsAsync(domain.getClearingOrderIds(), domain.getClearingCheckoutId());
|
||||
}
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -31,6 +31,8 @@ import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@ -59,6 +61,8 @@ public class XhpcClearingHistoryOrderServiceImpl extends BaseService implements
|
||||
@Resource
|
||||
AsyncService asyncService;
|
||||
|
||||
private final ExecutorService executorService = Executors.newFixedThreadPool(20);
|
||||
|
||||
@Override
|
||||
public List<XhpcClearingHistoryOrderDomain> getPage(Map<String, Object> params) {
|
||||
LoginUser loginUser = tokenService.getLoginUser();
|
||||
@ -91,7 +95,6 @@ public class XhpcClearingHistoryOrderServiceImpl extends BaseService implements
|
||||
if (StringUtils.isEmpty(orderVo.getOrderIds())) {
|
||||
throw new CustomException("缺少订单ID");
|
||||
}
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("startTime", orderVo.getStartTime());
|
||||
params.put("endTime", orderVo.getEndTime());
|
||||
@ -105,12 +108,21 @@ public class XhpcClearingHistoryOrderServiceImpl extends BaseService implements
|
||||
params.put("chargingPileId", orderVo.getChargingPileId());
|
||||
params.put("terminalId", orderVo.getTerminalId());
|
||||
|
||||
List<XhpcClearingHistoryOrderDomain> orderDomainList = historyOrderMapper.getListPage(params);
|
||||
String orderIds = orderDomainList.stream().map(n -> n.getClearingOrderId().toString()).collect(Collectors.joining(","));
|
||||
|
||||
if (StringUtils.isNotEmpty(orderIds)){
|
||||
asyncService.updateCheckStatusAsync(orderIds, orderVo.getStatus(), orderVo.getCheckBy());
|
||||
}
|
||||
// List<XhpcClearingHistoryOrderDomain> orderDomainList = historyOrderMapper.getListPage(params);
|
||||
// String orderIds = orderDomainList.stream().map(n -> n.getClearingOrderId().toString()).collect(Collectors.joining(","));
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(orderIds)){
|
||||
// asyncService.updateCheckStatusAsync(orderIds, orderVo.getStatus(), orderVo.getCheckBy());
|
||||
// }
|
||||
executorService.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String clearingOrderIds = historyOrderMapper.getClearingOrderIds(params);
|
||||
if (StringUtils.isNotEmpty(clearingOrderIds)){
|
||||
asyncService.updateCheckStatusAsync(clearingOrderIds, orderVo.getStatus(), orderVo.getCheckBy());
|
||||
}
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -305,6 +305,63 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getClearingOrderIds" resultType="String">
|
||||
select
|
||||
ho.clearing_order_id clearingOrderId
|
||||
from xhpc_clearing_history_order as ho
|
||||
left join xhpc_charging_station as ct on ct.charging_station_id = ho.charging_station_id
|
||||
left join xhpc_charge_order co on co.charge_order_id = ho.charge_order_id
|
||||
where ho.status =0 and ho.del_flag=0 and ho.check_status=0 and ho.state <![CDATA[ <> ]]> 3
|
||||
<if test="params.startTime!=null and params.startTime!=''">
|
||||
and ho.end_time <![CDATA[ >= ]]> #{params.startTime}
|
||||
</if>
|
||||
<if test="params.endTime!= null and params.endTime!=''">
|
||||
and ho.end_time <![CDATA[ <= ]]> #{params.endTime}
|
||||
</if>
|
||||
<if test="params.tenantId!=null and params.tenantId !=''">
|
||||
and ct.tenant_id=#{params.tenantId}
|
||||
</if>
|
||||
<if test="params.orderNo!=null and params.orderNo!=''">
|
||||
and ho.serial_number like concat('%', #{params.orderNo}, '%')
|
||||
</if>
|
||||
<if test="params.userType!=null and params.userType!=''">
|
||||
and co.source=#{params.userType}
|
||||
</if>
|
||||
<if test="params.internetName!=null and params.internetName!=''">
|
||||
and ho.charging_mode=#{params.internetName}
|
||||
</if>
|
||||
<if test="params.operatorId!=null and params.operatorId!=''">
|
||||
and ct.operator_id=#{params.operatorId}
|
||||
</if>
|
||||
<if test="params.stationId!=null and params.stationId!=''">
|
||||
and ho.charging_station_id=#{params.stationId}
|
||||
</if>
|
||||
<if test="params.checkoutIds!=null and params.checkoutIds!='' and params.checkoutIds!='-1'">
|
||||
and find_in_set(ho.clearing_checkout_id, #{params.checkoutIds})
|
||||
</if>
|
||||
|
||||
<if test="params.operatorId !=null and params.operatorId !=''">
|
||||
and ho.operator_id =#{params.operatorId}
|
||||
</if>
|
||||
<if test="params.chargingStationId !=null and params.chargingStationId !=''">
|
||||
and ho.charging_station_id =#{params.chargingStationId}
|
||||
</if>
|
||||
<if test="params.chargingPileId !=null and params.chargingPileId !=''">
|
||||
and ho.terminal_id in (select terminal_id from xhpc_terminal where charging_pile_id=#{params.chargingPileId} and del_flag =0)
|
||||
</if>
|
||||
<if test="params.terminalId !=null and params.terminalId !=''">
|
||||
and ho.terminal_id#{params.terminalId}
|
||||
</if>
|
||||
<if test="params.type==1">
|
||||
and ho.charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{params.logOperatorId})
|
||||
</if>
|
||||
<if test="params.type==2">
|
||||
and ho.charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{params.logOperatorId})
|
||||
</if>
|
||||
<if test="params.orderIds != null and params.orderIds!='' and params.orderIds !='-1'">
|
||||
and find_in_set(ho.clearing_order_id, #{params.orderIds})
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
|
||||
@ -288,6 +288,10 @@ public class XhpcHistoryOrder extends BaseEntity {
|
||||
*/
|
||||
private Integer parkingVoucher;
|
||||
|
||||
/**
|
||||
* 运营商id
|
||||
*/
|
||||
private Long operatorId;
|
||||
|
||||
public Integer getConfirmResult() {
|
||||
|
||||
@ -809,4 +813,12 @@ public class XhpcHistoryOrder extends BaseEntity {
|
||||
public void setParkingVoucher(Integer parkingVoucher) {
|
||||
this.parkingVoucher = parkingVoucher;
|
||||
}
|
||||
|
||||
public Long getOperatorId() {
|
||||
return operatorId;
|
||||
}
|
||||
|
||||
public void setOperatorId(Long operatorId) {
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,8 +23,8 @@ import java.util.Map;
|
||||
@RequestMapping("/file")
|
||||
public class XhpcFileController {
|
||||
|
||||
public static final String accessKeyId = "LTAI5t7vcQMfZPEZQkEdrAjx";
|
||||
public static final String accessKeySecret = "K7ZstCZoAjvJsBCe0CipodINETuPyi";
|
||||
public static final String accessKeyId = "LTAI5tHxc8hrG6cT5nDtEkiV";
|
||||
public static final String accessKeySecret = "5kFEaIFE7eeODxKQwD5mvTRF48MK6w";
|
||||
|
||||
@PostMapping(value = "/addFile")
|
||||
public R addFile(@RequestParam MultipartFile file){
|
||||
|
||||
@ -35,8 +35,8 @@ import java.util.regex.Pattern;
|
||||
public class XhpcSmsServiceImpl implements IXhpcSmsService {
|
||||
|
||||
public static RedisService REDIS;
|
||||
public static final String accessKeyId = "LTAI5t7vcQMfZPEZQkEdrAjx";
|
||||
public static final String accessKeySecret = "K7ZstCZoAjvJsBCe0CipodINETuPyi";
|
||||
public static final String accessKeyId = "LTAI5tHxc8hrG6cT5nDtEkiV";
|
||||
public static final String accessKeySecret = "5kFEaIFE7eeODxKQwD5mvTRF48MK6w";
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(XhpcSmsServiceImpl.class);
|
||||
@Autowired
|
||||
|
||||
@ -13,8 +13,8 @@ import com.aliyun.teaopenapi.models.Config;
|
||||
*/
|
||||
public class SmsUtil {
|
||||
|
||||
private static String accessKeyId = "LTAI5t7vcQMfZPEZQkEdrAjx";
|
||||
private static String accessKeySecret = "K7ZstCZoAjvJsBCe0CipodINETuPyi";
|
||||
private static String accessKeyId = "LTAI5tHxc8hrG6cT5nDtEkiV";
|
||||
private static String accessKeySecret = "5kFEaIFE7eeODxKQwD5mvTRF48MK6w";
|
||||
|
||||
/**
|
||||
* 使用AK&SK初始化账号Client
|
||||
|
||||
@ -340,6 +340,16 @@ public class XhpcPileOrderController extends BaseController {
|
||||
return R.fail(500,"充电桩校验故障");
|
||||
}
|
||||
}
|
||||
|
||||
int workingVoltage =Integer.parseInt(keysMapOrder.get("workingVoltage").toString());
|
||||
if(workingVoltage<2500){
|
||||
//电压小于250V,停止充电
|
||||
xhpcChargeOrder.setRemark("电压小于250V,停止充电");
|
||||
xhpcChargeOrderService.updateXhpcChargeOrder(xhpcChargeOrder);
|
||||
powerPileService.stopCharging(orderNo, substring,orderNo.substring(0, 16), "0C");
|
||||
System.out.println("=====================p平台下发停止充电=============================="+xhpcChargeOrder.getSerialNumber());
|
||||
return R.fail(500,"充电桩校验故障");
|
||||
}
|
||||
}else{
|
||||
keysMap.put("identical","0");
|
||||
}
|
||||
|
||||
@ -480,4 +480,21 @@ public class XhpcStatisticsController extends BaseController {
|
||||
public AjaxResult getHistoryOrderMassage(Long chargeOrderId){
|
||||
return AjaxResult.success(xhpcStatisticsService.getHistoryOrderMassage(chargeOrderId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 桩离线统计
|
||||
*/
|
||||
@GetMapping("/getChargingPileStatusPage")
|
||||
public TableDataInfo getChargingPileStatusPage(HttpServletRequest request,String chargingStationId,String serialNumber,String statusName,String startTime, String endTime)
|
||||
{
|
||||
List<Map<String, Object>> list = xhpcStatisticsService.getChargingPileStatusPage(request,chargingStationId,serialNumber,statusName,startTime,endTime);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PostMapping("/getChargingPileStatusPage/export")
|
||||
public void getChargingPileStatusPageExport(HttpServletRequest request,HttpServletResponse response,String chargingStationId,String serialNumber,String statusName,String startTime, String endTime)throws IOException
|
||||
{
|
||||
xhpcStatisticsService.getChargingPileStatusPageExport(request,response,chargingStationId,serialNumber,statusName,startTime,endTime);
|
||||
}
|
||||
}
|
||||
|
||||
@ -236,4 +236,8 @@ public interface XhpcStatisticsServiceMapper {
|
||||
Map<String, Object> getHistoryOrderMassage(@Param("chargeOrderId")Long chargeOrderId);
|
||||
|
||||
|
||||
List<Map<String, Object>> getChargingPileStatusPage(@Param("chargingStationId") String chargingStationId,@Param("serialNumber") String serialNumber,@Param("statusName")String statusName,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("type") Integer type,@Param("userId")Long userId,@Param("tenantId")String tenantId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -333,4 +333,12 @@ public interface IXhpcStatisticsService {
|
||||
void getChargeOrderFaultPageExport(HttpServletRequest request,HttpServletResponse response,Long chargingStationId,String serialNumber,String startTime, String endTime) throws IOException ;
|
||||
|
||||
Map<String, Object> getHistoryOrderMassage(Long chargeOrderId);
|
||||
|
||||
|
||||
List<Map<String, Object>> getChargingPileStatusPage(HttpServletRequest request,String chargingStationId,String serialNumber,String statusName,String startTime, String endTime);
|
||||
|
||||
|
||||
|
||||
void getChargingPileStatusPageExport(HttpServletRequest request,HttpServletResponse response,String chargingStationId,String serialNumber,String statusName,String startTime, String endTime) throws IOException ;
|
||||
|
||||
}
|
||||
|
||||
@ -259,17 +259,17 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
if (Integer.parseInt(userMessage.get("isRefundApplication").toString()) != 0) {
|
||||
return AjaxResult.error(1101, "你有申请退款订单在审核中,需要充电请取消申请退款");
|
||||
}
|
||||
String i = xhpcChargeOrderMapper.countXhpcRealTimeOrder(userId,userType,tenantId);
|
||||
if (!"".equals(i) && i!=null) {
|
||||
return AjaxResult.error(1102, "车辆正在充电,请查询车辆充电信息");
|
||||
}
|
||||
// if(Integer.valueOf(userMessage.get("sunchaSwitch").toString()) ==0){
|
||||
// //充电用户是否在充电中
|
||||
// String i = xhpcChargeOrderMapper.countXhpcRealTimeOrder(userId,userType,tenantId);
|
||||
// if (!"".equals(i) && i!=null) {
|
||||
// return AjaxResult.error(1102, "车辆正在充电,请查询车辆充电信息");
|
||||
// }
|
||||
// String i = xhpcChargeOrderMapper.countXhpcRealTimeOrder(userId,userType,tenantId);
|
||||
// if (!"".equals(i) && i!=null) {
|
||||
// return AjaxResult.error(1102, "车辆正在充电,请查询车辆充电信息");
|
||||
// }
|
||||
if(Integer.valueOf(userMessage.get("sunchaSwitch").toString()) ==0){
|
||||
//充电用户是否在充电中
|
||||
String i = xhpcChargeOrderMapper.countXhpcRealTimeOrder(userId,userType,tenantId);
|
||||
if (!"".equals(i) && i!=null) {
|
||||
return AjaxResult.error(1102, "车辆正在充电,请查询车辆充电信息");
|
||||
}
|
||||
}
|
||||
//终端状态是否空闲
|
||||
//是否插枪
|
||||
Map<String, Object> cacheMap = REDIS.getCacheMap("gun:" + terminalSerialNumber);
|
||||
@ -313,14 +313,23 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
}
|
||||
|
||||
//判断是否可以充电(黑名单)
|
||||
// int blacklistUser = xhpcChargeOrderMapper.getBlacklistUser(userMessage.get("phone").toString(), userMessage.get("vinSpecCode").toString(), userMessage.get("vehicleName").toString(), xhpcTerminal.getChargingStationId(), DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
// if(blacklistUser>0){
|
||||
// return AjaxResult.error(1104, "该车辆暂停充电,请联系客服");
|
||||
// }
|
||||
int blacklistUser =0;
|
||||
if(userMessage.get("vinSpecCode") !=null && userMessage.get("vehicleName") !=null){
|
||||
blacklistUser = xhpcChargeOrderMapper.getBlacklistUser(userMessage.get("phone").toString(), userMessage.get("vinSpecCode").toString(), userMessage.get("vehicleName").toString(), xhpcTerminal.getChargingStationId(), DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
}else if(userMessage.get("vinSpecCode") !=null && userMessage.get("vehicleName") ==null){
|
||||
blacklistUser = xhpcChargeOrderMapper.getBlacklistUser(userMessage.get("phone").toString(), userMessage.get("vinSpecCode").toString(), null, xhpcTerminal.getChargingStationId(), DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
}else if(userMessage.get("vinSpecCode") ==null && userMessage.get("vehicleName") !=null){
|
||||
blacklistUser = xhpcChargeOrderMapper.getBlacklistUser(userMessage.get("phone").toString(), null, userMessage.get("vehicleName").toString(), xhpcTerminal.getChargingStationId(), DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
}else{
|
||||
blacklistUser = xhpcChargeOrderMapper.getBlacklistUser(userMessage.get("phone").toString(), null, null, xhpcTerminal.getChargingStationId(), DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
}
|
||||
if(blacklistUser>0){
|
||||
return AjaxResult.error(1104, "该车辆暂停充电,请联系客服");
|
||||
}
|
||||
|
||||
// if(Integer.valueOf(userMessage.get("sunchaSwitch").toString()) !=0){
|
||||
// return startUpSuncha(userMessage,xhpcChargeOrder,xhpcTerminal,tenantId,userType,terminalSerialNumber,type);
|
||||
// }
|
||||
if(Integer.valueOf(userMessage.get("sunchaSwitch").toString()) !=0){
|
||||
return startUpSuncha(userMessage,xhpcChargeOrder,xhpcTerminal,tenantId,userType,terminalSerialNumber,type);
|
||||
}
|
||||
//余额
|
||||
String balance = new BigDecimal(userMessage.get("balance").toString()).multiply(new BigDecimal(100)).toString();
|
||||
//获取桩信息
|
||||
@ -1716,6 +1725,7 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
if (terminalSerialNumber.length() != 16 || !m.matches()) {
|
||||
return AjaxResult.error(1104, "无效的终端编号");
|
||||
}
|
||||
logger.info("<<<<<<<"+terminalSerialNumber+"启动充电时间差>>111>>>:"+(l2-l1));
|
||||
//终端信息
|
||||
XhpcTerminal xhpcTerminal = xhpcChargeOrderMapper.getXhpcTerminalSerialNumber(terminalSerialNumber,tenantId);
|
||||
if (xhpcTerminal == null || xhpcTerminal.getTerminalId() == null || xhpcTerminal.getChargingPileId() == null || xhpcTerminal.getPileSerialNumber() == null) {
|
||||
@ -1729,6 +1739,7 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.info("<<<<<<<"+terminalSerialNumber+"启动充电时间差>>222>>>:"+(l2-l1));
|
||||
//查看充电用户金额是否大于5元
|
||||
//Map<String, Object> userMessage = xhpcChargeOrderMapper.getUserMessage(userId);
|
||||
BigDecimal a = new BigDecimal(5);
|
||||
@ -1749,6 +1760,7 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
if (!"".equals(i) && i!=null) {
|
||||
return AjaxResult.error(1102, "车辆正在充电,请查询车辆充电信息");
|
||||
}
|
||||
logger.info("<<<<<<<"+terminalSerialNumber+"启动充电时间差>>3333>>>:"+(l2-l1));
|
||||
//终端状态是否空闲
|
||||
//是否插枪
|
||||
Map<String, Object> cacheMap = REDIS.getCacheMap("gun:" + terminalSerialNumber);
|
||||
@ -1924,6 +1936,8 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
//判断双枪启规则
|
||||
private AjaxResult startUpSuncha(Map<String, Object> userMessage,XhpcChargeOrder xhpcChargeOrder,XhpcTerminal xhpcTerminal,String tenantId,Integer source,String terminalSerialNumber,Integer type){
|
||||
|
||||
logger.info("========================判断双枪启规则============================");
|
||||
logger.info("========================判断双枪启规则============================");
|
||||
//余额
|
||||
String balance = new BigDecimal(userMessage.get("balance").toString()).multiply(new BigDecimal(100)).toString();
|
||||
|
||||
|
||||
@ -267,6 +267,14 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
chargeOrder.setEndTime(DateUtil.parse(lastOrderTime));
|
||||
message.put("startTime",startTime);
|
||||
message.put("endTime",lastOrderTime);
|
||||
|
||||
if(cacheMap.get("endSoc")==null){
|
||||
message.put("endSoc",message.get("soc").toString());
|
||||
}
|
||||
if(cacheMap.get("startSoc")!=null){
|
||||
message.put("startSoc",cacheMap.get("startSoc").toString());
|
||||
}
|
||||
|
||||
if (cacheMap.get("totalPower")!=null && cacheMap.get("totalMoney")!=null) {
|
||||
String totalPower = cacheMap.get("totalPower").toString();
|
||||
//String totalPowerSub = totalPower.substring(0, totalPower.length() - 1);
|
||||
|
||||
@ -1623,6 +1623,82 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getChargingPileStatusPage(HttpServletRequest request, String chargingStationId, String serialNumber,String statusName,String startTime, String endTime) {
|
||||
|
||||
//获取登陆用户
|
||||
LoginUser loginUser = tokenService.getLoginUser(request);
|
||||
SysUser sysUser = loginUser.getSysUser();
|
||||
Long sysUserId = sysUser.getUserId();
|
||||
String tenantId = sysUser.getTenantId();
|
||||
//获取登陆用户
|
||||
List<Map<String, Object>> list =new ArrayList<>();
|
||||
if(!UserTypeUtil.SYS_USER_TYPE_ADMIN.equals(sysUser.getUserId())){
|
||||
startPage();
|
||||
if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){
|
||||
Long logOperatorId = sysUser.getOperatorId();
|
||||
//运营商看自己的场站
|
||||
list = xhpcStatisticsServiceMapper.getChargingPileStatusPage(chargingStationId,serialNumber, statusName, startTime, endTime, 1,logOperatorId,tenantId);
|
||||
}else{
|
||||
//查询赋值的场站
|
||||
list = xhpcStatisticsServiceMapper.getChargingPileStatusPage(chargingStationId,serialNumber, statusName,startTime, endTime, 2,sysUserId,tenantId);
|
||||
}
|
||||
}else{
|
||||
startPage();
|
||||
list =xhpcStatisticsServiceMapper.getChargingPileStatusPage(chargingStationId,serialNumber, statusName,startTime, endTime, 0,sysUserId,tenantId);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getChargingPileStatusPageExport(HttpServletRequest request, HttpServletResponse response, String chargingStationId, String serialNumber, String statusName, String startTime, String endTime) throws IOException {
|
||||
LoginUser loginUser = tokenService.getLoginUser(request);
|
||||
SysUser sysUser = loginUser.getSysUser();
|
||||
Long sysUserId = sysUser.getUserId();
|
||||
String tenantId = sysUser.getTenantId();
|
||||
//获取登陆用户
|
||||
List<Map<String, Object>> list =new ArrayList<>();
|
||||
if(!UserTypeUtil.SYS_USER_TYPE_ADMIN.equals(sysUser.getUserId())){
|
||||
startPage();
|
||||
if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){
|
||||
Long logOperatorId = sysUser.getOperatorId();
|
||||
//运营商看自己的场站
|
||||
list = xhpcStatisticsServiceMapper.getChargingPileStatusPage(chargingStationId,serialNumber, statusName, startTime, endTime, 1,logOperatorId,tenantId);
|
||||
}else{
|
||||
//查询赋值的场站
|
||||
list = xhpcStatisticsServiceMapper.getChargingPileStatusPage(chargingStationId,serialNumber, statusName,startTime, endTime, 2,sysUserId,tenantId);
|
||||
}
|
||||
}else{
|
||||
startPage();
|
||||
list =xhpcStatisticsServiceMapper.getChargingPileStatusPage(chargingStationId,serialNumber, statusName,startTime, endTime, 0,sysUserId,tenantId);
|
||||
}
|
||||
|
||||
// 通过工具类创建writer,默认创建xls格式
|
||||
BigExcelWriter writer = ExcelUtil.getBigWriter("temp_" + System.currentTimeMillis() + ".xlsx");
|
||||
writer.addHeaderAlias("stationName", "场站名称");
|
||||
writer.addHeaderAlias("pileName", "桩名称");
|
||||
writer.addHeaderAlias("statusName", "枪名称");
|
||||
writer.addHeaderAlias("number", "离线次数");
|
||||
|
||||
// 默认的,未添加alias的属性也会写出,如果想只写出加了别名的字段,可以调用此方法排除之
|
||||
writer.setOnlyAlias(true);
|
||||
// 一次性写出内容,使用默认样式,强制输出标题
|
||||
writer.write(list, true);
|
||||
//out为OutputStream,需要写出到的目标流
|
||||
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
|
||||
writer.flush(out, true);
|
||||
// 关闭writer,释放内存
|
||||
writer.close();
|
||||
//此处记得关闭输出Servlet流
|
||||
IoUtil.close(out);
|
||||
}
|
||||
|
||||
|
||||
private Map<String, Object> averageOrder(Integer status,Integer type,Long logOperatorId,Long operatorId, Long chargingStationId, Long chargingPileId, String tenantId,String conditionBeginOfDay,String conditionEndOfDay) {
|
||||
List<Map<String, Object>> dateOrder = xhpcStatisticsServiceMapper.getDateOrderCount(type,status,logOperatorId,operatorId,chargingStationId,chargingPileId,tenantId,conditionBeginOfDay,conditionEndOfDay);
|
||||
|
||||
@ -523,7 +523,7 @@
|
||||
app_user_id as appUserId,
|
||||
vehicle_name as vehicleName
|
||||
from xhpc_user_vehicle where source =#{source} and app_user_id =#{userId} and del_flag=0
|
||||
and vin_blacklist !=1 order by type,create_time desc LIMIT 1
|
||||
and vin_blacklist !=1 order by type desc,create_time desc LIMIT 1
|
||||
</select>
|
||||
<select id="getXhpcChargingPileById" resultType="map">
|
||||
select
|
||||
|
||||
@ -1763,4 +1763,50 @@
|
||||
<select id="getHistoryOrderMassage" resultType="map">
|
||||
select history_order_id historyOrderId from xhpc_history_order where charge_order_id=#{chargeOrderId} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getChargingPileStatusPage" resultType="map">
|
||||
SELECT
|
||||
xcs.NAME stationName,
|
||||
concat(xcp.name,'号桩') pileName,
|
||||
ifnull(us.number,0) as number,
|
||||
xt.name as statusName
|
||||
from xhpc_terminal xt
|
||||
LEFT JOIN xhpc_charging_pile xcp on xcp.charging_pile_id = xt.charging_pile_id
|
||||
LEFT JOIN xhpc_charging_station xcs ON xcs.charging_station_id = xcp.charging_station_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
count( xcps.charging_pile_status_id )as number,
|
||||
xcps.serial_number as serialNumber
|
||||
from xhpc_charging_pile_status xcps
|
||||
LEFT JOIN xhpc_charging_station xcs ON xcs.charging_station_id = xcps.station_id
|
||||
where 1=1
|
||||
<if test="startTime !=null and startTime !=''">
|
||||
and xcps.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime !=null and endTime !=''">
|
||||
and xcps.create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="serialNumber !=null and serialNumber !=''">
|
||||
and xcps.serial_number LIKE concat('%',#{serialNumber}, '%')
|
||||
</if>
|
||||
<if test="chargingStationId !=null and chargingStationId !=''">
|
||||
and xcs.charging_station_id=#{chargingStationId}
|
||||
</if>
|
||||
<if test="statusName !=null and statusName !=''">
|
||||
and xcs.status_name=#{statusName}
|
||||
</if>
|
||||
<if test="type==1">
|
||||
and xcs.charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{userId})
|
||||
</if>
|
||||
<if test="type==2">
|
||||
and xcs.charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{userId})
|
||||
</if>
|
||||
group by xcps.serial_number
|
||||
) us on us.serialNumber = xt.serial_number
|
||||
GROUP BY
|
||||
xt.serial_number
|
||||
ORDER BY
|
||||
xt.charging_station_id,xt.serial_number
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -493,21 +493,20 @@ public class WxPaymentController {
|
||||
}
|
||||
String key = "user:" + xhpcRechargeOrder.getUserId() + userType + ".order";
|
||||
|
||||
Map<String, Object> cacheMap = redisService.getCacheMap(key);
|
||||
//判断用户是否在充电中
|
||||
String serialMumberA = xhpcUserAccountStatementMapper.getUserHistotyChargeOrderSuncha(xhpcRechargeOrder.getUserId(),source,tenantId,1);
|
||||
if(!"".equals(serialMumberA) && serialMumberA !=null){
|
||||
//充电中
|
||||
Map<String, Object> mapA = new HashMap<>();
|
||||
map.put("aBalance", aBalance);
|
||||
redisService.setCacheMap(key,mapA);
|
||||
cacheMap.put("aBalance", aBalance.multiply(new BigDecimal(100)));
|
||||
redisService.setCacheMap(key,cacheMap);
|
||||
postRefreshBalance(aBalance, serialMumberA);
|
||||
}
|
||||
String serialMumberB = xhpcUserAccountStatementMapper.getUserHistotyChargeOrderSuncha(xhpcRechargeOrder.getUserId(),source,tenantId,2);
|
||||
if(!"".equals(serialMumberB) && serialMumberB !=null){
|
||||
//充电中
|
||||
Map<String, Object> mapA = new HashMap<>();
|
||||
map.put("bBalance", bBalance);
|
||||
redisService.setCacheMap(key,mapA);
|
||||
cacheMap.put("bBalance", bBalance.multiply(new BigDecimal(100)));
|
||||
redisService.setCacheMap(key,cacheMap);
|
||||
postRefreshBalance(bBalance, serialMumberB);
|
||||
}
|
||||
|
||||
|
||||
@ -149,7 +149,7 @@
|
||||
xau.tenant_id tenantId,
|
||||
xau.soc_protect socProtect,
|
||||
ten.status tenantStatus,
|
||||
(select vehicle_name as vehicleName from xhpc_user_vehicle where app_user_id = xau.app_internet_user_id and source=1 and del_flag=0 and vin_blacklist !=1 order by type,create_time desc LIMIT 1) as vehicleName,
|
||||
(select vehicle_name as vehicleName from xhpc_user_vehicle where app_user_id = xau.app_internet_user_id and source=1 and del_flag=0 and vin_blacklist !=1 order by type desc,create_time desc LIMIT 1) as vehicleName,
|
||||
xau.create_time as createTime
|
||||
from xhpc_app_internet_user xau
|
||||
left join xhpc_tenant ten on ten.tenant_id = xau.tenant_id and ten.is_deleted =0
|
||||
|
||||
@ -326,12 +326,12 @@
|
||||
|
||||
<select id="compareTotalTimeMoney" resultType="map">
|
||||
select
|
||||
if(xro.amount <= (SELECT IFNULL(SUM(amount)-sum(refund_fee),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and type =2 and create_time >= #{startTime} and create_time <=#{endTime}) ,1,2) zfbStatus,
|
||||
if(xro.amount <= (SELECT IFNULL(SUM(amount)-sum(refund_fee),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and type =1 and create_time >= #{startTime} and create_time <=#{endTime}),1,2) wxStatus,
|
||||
if(xro.amount <= (SELECT IFNULL(SUM(amount)-sum(refund_fee),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and create_time >= #{startTime} and create_time <=#{endTime}),1,2) refundStatus,
|
||||
(SELECT IFNULL(SUM(amount)-sum(refund_fee),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and type =2 and create_time >= #{startTime} and create_time <=#{endTime}) zfbMoney,
|
||||
(SELECT IFNULL(SUM(amount)-sum(refund_fee),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and type =1 and create_time >= #{startTime} and create_time <=#{endTime}) wxMoney,
|
||||
(SELECT IFNULL(SUM(amount)-sum(refund_fee),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and create_time >= #{startTime} and create_time <=#{endTime}) totalMoney
|
||||
if(xro.amount <= (SELECT IFNULL(SUM(amount)-IFNULL(sum(refund_fee),0),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and type =2 and create_time >= #{startTime} and create_time <=#{endTime}) ,1,2) zfbStatus,
|
||||
if(xro.amount <= (SELECT IFNULL(SUM(amount)-IFNULL(sum(refund_fee),0),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and type =1 and create_time >= #{startTime} and create_time <=#{endTime}),1,2) wxStatus,
|
||||
if(xro.amount <= (SELECT IFNULL(SUM(amount)-IFNULL(sum(refund_fee),0),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and create_time >= #{startTime} and create_time <=#{endTime}),1,2) refundStatus,
|
||||
(SELECT IFNULL(SUM(amount)-IFNULL(sum(refund_fee),0),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and type =2 and create_time >= #{startTime} and create_time <=#{endTime}) zfbMoney,
|
||||
(SELECT IFNULL(SUM(amount)-IFNULL(sum(refund_fee),0),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and type =1 and create_time >= #{startTime} and create_time <=#{endTime}) wxMoney,
|
||||
(SELECT IFNULL(SUM(amount)-IFNULL(sum(refund_fee),0),0) from xhpc_recharge_order where refund_status !=2 and user_id=xro.user_id and status =1 and source =xro.source and create_time >= #{startTime} and create_time <=#{endTime}) totalMoney
|
||||
from xhpc_refund_order xro
|
||||
where xro.refund_order_id =#{refundOrderId}
|
||||
</select>
|
||||
@ -361,7 +361,7 @@
|
||||
update_by updateBy,
|
||||
remark remark,
|
||||
tenant_id tenantId,
|
||||
refund_fee refundFee,
|
||||
IFNULL(sum(refund_fee),0) refundFee,
|
||||
refund_status refundStatus
|
||||
from xhpc_recharge_order xro
|
||||
where xro.user_id =#{userId} and xro.source=#{source} and refund_status !=2 and create_time < #{createTime}
|
||||
|
||||
@ -554,8 +554,8 @@ public class ChargingController {
|
||||
// Integer F03 = HexUtils.reverseHexInt("03");
|
||||
// System.out.println("F03 转化成="+F03);
|
||||
//
|
||||
// Integer D3C0F = HexUtils.reverseHexInt("3C0F");
|
||||
// System.out.println("3C0F 转化成="+D3C0F);
|
||||
Integer D3C0F = HexUtils.reverseHexInt("385A");
|
||||
System.out.println("3C0F 转化成="+D3C0F);
|
||||
//
|
||||
// Integer f4C1D = HexUtils.reverseHexInt("4C1D");
|
||||
// System.out.println("f4C1D 转化成="+f4C1D);
|
||||
@ -598,9 +598,10 @@ public class ChargingController {
|
||||
//
|
||||
// System.out.println("-111-变为--:" + s1);
|
||||
|
||||
String ascii = HexUtils.toAscii("4C465A3733464C34374E44303032343535");
|
||||
// String ascii = HexUtils.toAscii("828dcc2624042615");
|
||||
// System.out.println("ascii :"+ascii);
|
||||
|
||||
|
||||
System.out.println("ascii :"+ascii);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -14,7 +14,8 @@ public interface XhpcDeviceMessageMapper {
|
||||
|
||||
int insertByDomain(XhpcDeviceMessage xhpcDeviceMessage);
|
||||
|
||||
|
||||
//桩离线统计
|
||||
int insertChargingPileStatus(@Param("serialNumber") String serialNumber,@Param("pileSerialNumber") String pileSerialNumber,@Param("stationId")String stationId,@Param("statusName")String statusName);
|
||||
void deleteByLastThreeMonth(String expireDate);
|
||||
|
||||
XhpcChargingPile getXhpcChargingPile(@Param("pileNo") String pileNo);
|
||||
|
||||
@ -25,7 +25,7 @@ public class HBCheckTask {
|
||||
XhpcDeviceMessageMapper deviceMessageMapper;
|
||||
|
||||
//每5分钟执行一次
|
||||
//@Scheduled(cron = "0 0/5 * * * ?")
|
||||
@Scheduled(cron = "0 0/10 * * * ?")
|
||||
protected void run() {
|
||||
|
||||
String svcSrvKey = "svcSrvGuns:".concat(getLocalIPAndPort());
|
||||
@ -37,22 +37,33 @@ public class HBCheckTask {
|
||||
hbtime = hbtime == null ? 0 : hbtime;
|
||||
if ((now - hbtime) > 75000) {
|
||||
String pileId = StrUtil.sub(gunkey.substring(gunkey.lastIndexOf(":") + 1), 0, -2);
|
||||
// System.out.println("================充电桩心跳掉线==========pileId========"+pileId);
|
||||
// System.out.println("================充电桩心跳掉线==========pileId========"+pileId);
|
||||
// if (!DISCONNECTED.equals(cacheGun.get("status"))) {
|
||||
// cacheGun.put("statusInt", OFF_LINE);
|
||||
// cacheGun.put("status", DISCONNECTED);
|
||||
// REDIS.setCacheMap(gunkey, cacheGun);
|
||||
//
|
||||
// XhpcDeviceMessage deviceMessage = new XhpcDeviceMessage();
|
||||
// deviceMessage.setType(StationDeviceEnum.PILE.getCode());
|
||||
//
|
||||
// String pileId = StrUtil.sub(gunkey.substring(gunkey.lastIndexOf(":") + 1), 0, -2);
|
||||
// deviceMessage.setSerialNumber(pileId);
|
||||
// deviceMessage.setStatus(0);
|
||||
// deviceMessage.setRemark("充电桩心跳掉线");
|
||||
// deviceMessageMapper.insertByDomain(deviceMessage);
|
||||
// }
|
||||
if (DISCONNECTED.equals(cacheGun.get("status"))) {
|
||||
cacheGun.put("statusInt", OFF_LINE);
|
||||
cacheGun.put("status", DISCONNECTED);
|
||||
REDIS.setCacheMap(gunkey, cacheGun);
|
||||
XhpcDeviceMessage deviceMessage = new XhpcDeviceMessage();
|
||||
deviceMessage.setType(StationDeviceEnum.PILE.getCode());
|
||||
//String pileId = StrUtil.sub(gunkey.substring(gunkey.lastIndexOf(":") + 1), 0, -2);
|
||||
deviceMessage.setSerialNumber(pileId);
|
||||
deviceMessage.setStatus(0);
|
||||
deviceMessage.setRemark("充电桩心跳掉线");
|
||||
deviceMessageMapper.insertByDomain(deviceMessage);
|
||||
try{
|
||||
String pkey = "pile:".concat(pileId);
|
||||
Map<String, Object> cachePile = REDIS.getCacheMap(pkey);
|
||||
String stationId = cachePile.get("stationId").toString();
|
||||
System.out.println("================gunkey===="+gunkey+"======pileId========"+pileId+"========stationId==="+stationId);
|
||||
if(1==Integer.parseInt(gunkey.substring(gunkey.length() - 1))){
|
||||
deviceMessageMapper.insertChargingPileStatus(gunkey.substring(gunkey.lastIndexOf(":") + 1),pileId,stationId,"A枪");
|
||||
}else{
|
||||
deviceMessageMapper.insertChargingPileStatus(gunkey.substring(gunkey.lastIndexOf(":") + 1),pileId,stationId,"B枪");
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -61,8 +72,12 @@ public class HBCheckTask {
|
||||
|
||||
long time = new Date().getTime();
|
||||
|
||||
String st = "gun:8083600040000102";
|
||||
|
||||
System.out.println("time ");
|
||||
String substring = st.substring(st.length() - 1);
|
||||
|
||||
|
||||
System.out.println("substring "+substring);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -86,6 +86,24 @@
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertChargingPileStatus">
|
||||
insert into xhpc_charging_pile_status(
|
||||
<if test="serialNumber != null and serialNumber != ''">serial_number,</if>
|
||||
<if test="pileSerialNumber != null and pileSerialNumber != ''">pile_serial_number,</if>
|
||||
<if test="stationId != null and stationId != ''">station_id,</if>
|
||||
<if test="statusName != null and statusName != ''">status_name,</if>
|
||||
create_time,
|
||||
update_time
|
||||
)values(
|
||||
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if>
|
||||
<if test="pileSerialNumber != null and pileSerialNumber != ''">#{pileSerialNumber},</if>
|
||||
<if test="stationId != null and stationId != ''">#{stationId},</if>
|
||||
<if test="statusName != null and statusName != ''">#{statusName},</if>
|
||||
sysdate(),
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByLastThreeMonth">
|
||||
delete from xhpc_message
|
||||
where create_time <![CDATA[ <= ]]> #{expireDate};
|
||||
|
||||
@ -93,6 +93,16 @@ public class AllInvoiceOrdersResponse {
|
||||
*/
|
||||
@JsonProperty("drawer")
|
||||
private String drawer;
|
||||
/**
|
||||
* 订单所属运营商
|
||||
*/
|
||||
@JsonProperty("orderOperatorName")
|
||||
private String orderOperatorName;
|
||||
/**
|
||||
* 开票运营商
|
||||
*/
|
||||
@JsonProperty("invoiceOperatorName")
|
||||
private String invoiceOperatorName;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -138,6 +138,16 @@ public class SpecificInvoiceWrap {
|
||||
*/
|
||||
@JsonProperty("drawer")
|
||||
private String drawer;
|
||||
/**
|
||||
* 订单所属运营商
|
||||
*/
|
||||
@JsonProperty("orderOperatorName")
|
||||
private String orderOperatorName;
|
||||
/**
|
||||
* 开票运营商
|
||||
*/
|
||||
@JsonProperty("invoiceOperatorName")
|
||||
private String invoiceOperatorName;
|
||||
/**
|
||||
* 该发票所包含的历史订单的开始时间-结束时间
|
||||
*/
|
||||
|
||||
@ -34,7 +34,7 @@ public class XhpcCustomers extends BaseEntity {
|
||||
* 服务费优惠比例
|
||||
*/
|
||||
private Double servicePreferential;
|
||||
|
||||
private Integer minLimit;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
|
||||
@ -51,4 +51,10 @@ public interface XhpcHistoryOrderMapper {
|
||||
*/
|
||||
List<XhpcHistoryOrder> findById(List<Integer> historyOrderIds);
|
||||
|
||||
|
||||
List<Map<String, Object>> countOperatorOnHistoryOrderIds(@Param("historyOrderIds")List<Integer> historyOrderIds);
|
||||
|
||||
List<Map<String, Object>> findHistoryOrderIds(@Param("historyOrderIds")List<Integer> historyOrderIds,@Param("operatorId")Long operatorId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -164,6 +164,19 @@ public class XhpcInvoice implements Serializable {
|
||||
//0增值税普通发票 1增值税专用发票
|
||||
private Integer invoiceStatus;
|
||||
|
||||
/**
|
||||
* 充电订单运营商id
|
||||
*/
|
||||
private Long orderOperatorId;
|
||||
/**
|
||||
* 开票运营商id
|
||||
*/
|
||||
private Long invoiceOperatorId;
|
||||
|
||||
private String orderOperatorName;
|
||||
|
||||
private String invoiceOperatorName;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
||||
@ -97,6 +97,8 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
||||
itemsDTO.setCreatorType(xhpcInvoice.getCreatorType());
|
||||
itemsDTO.setInvoiceMoney(xhpcInvoice.getInvoiceMoney());
|
||||
itemsDTO.setStatus(xhpcInvoice.getStatus());
|
||||
itemsDTO.setOrderOperatorName(xhpcInvoice.getOrderOperatorName());
|
||||
itemsDTO.setInvoiceOperatorName(xhpcInvoice.getInvoiceOperatorName());
|
||||
itemsDTO.setCreateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, xhpcInvoice.getCreateTime()));
|
||||
if (xhpcInvoice.getInvoicingTime() != null) {
|
||||
itemsDTO.setInvoicingTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, xhpcInvoice.getInvoicingTime()));
|
||||
@ -229,6 +231,8 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
||||
InvoiceTitleResponse invoiceTitleResponse = new InvoiceTitleResponse();
|
||||
//如果没有记录,则返回空包装类
|
||||
if (xhpcInvoiceList.size() == 0) {
|
||||
ArrayList<InvoiceTitleResponse.DataDTO> dataDTOList = new ArrayList<>();
|
||||
invoiceTitleResponse.setData(dataDTOList);
|
||||
return invoiceTitleResponse;
|
||||
}
|
||||
ArrayList<InvoiceTitleResponse.DataDTO> dataDTOList = new ArrayList<>();
|
||||
@ -560,11 +564,8 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
||||
* @date 2021/12/28 14:33
|
||||
* @since version-1.0
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveInvoiceInfo(SaveInvoiceInfoRequest saveInvoiceInfoRequest) throws Exception {
|
||||
|
||||
//System.out.println("<<<<<<<<<<111<<<<<<<<发票>>>>>>>>>>111>>>>>>>>"+saveInvoiceInfoRequest.toString());
|
||||
public void saveInvoiceInfoYu(SaveInvoiceInfoRequest saveInvoiceInfoRequest) throws Exception {
|
||||
//判断传入的历史订单是否被其他发票包含
|
||||
List<Integer> historyOrderIds = saveInvoiceInfoRequest.getHistoryOrderIds();
|
||||
List<XhpcInvoiceMapHistoryOrder> lockOrderList = xhpcInvoiceMapHistoryOrderMapper.getLockedOnesByHistoryOrderId(historyOrderIds);
|
||||
@ -643,6 +644,116 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 将用户申请的发票信息,保存到数据库中
|
||||
*
|
||||
* @param saveInvoiceInfoRequest 发票信息
|
||||
* @throws Exception 传入发票金额参数与内部该发票所包含的所有订单金额参数不一致出现,出现此异常
|
||||
* @author WH
|
||||
* @date 2021/12/28 14:33
|
||||
* @since version-1.0
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveInvoiceInfo(SaveInvoiceInfoRequest saveInvoiceInfoRequest) throws Exception {
|
||||
//判断传入的历史订单是否被其他发票包含
|
||||
List<Integer> historyOrderIds = saveInvoiceInfoRequest.getHistoryOrderIds();
|
||||
List<XhpcInvoiceMapHistoryOrder> lockOrderList = xhpcInvoiceMapHistoryOrderMapper.getLockedOnesByHistoryOrderId(historyOrderIds);
|
||||
if (lockOrderList.size() > 0) {
|
||||
throw new Exception("该历史订单已被其他发票包含");
|
||||
}
|
||||
|
||||
List<Map<String, Object>> operatorIdList = xhpcHistoryOrderMapper.countOperatorOnHistoryOrderIds(historyOrderIds);
|
||||
//该变量是用来计算内部存储的历史订单金额是否与传入的一致
|
||||
double totalActPrice = 0;
|
||||
for (int i = 0; i <operatorIdList.size() ; i++) {
|
||||
Map<String, Object> stringObjectMap = operatorIdList.get(i);
|
||||
Long operatorId = Long.valueOf(stringObjectMap.get("operatorId").toString());
|
||||
|
||||
//将该发票记录放入数据库生成发票记录,除了所包含的历史订单的总电费,总服务费
|
||||
XhpcInvoice xhpcInvoice = new XhpcInvoice();
|
||||
xhpcInvoice.setReceiveEmail(saveInvoiceInfoRequest.getReceiveEmail());
|
||||
xhpcInvoice.setTitleType(saveInvoiceInfoRequest.getTitleType());
|
||||
xhpcInvoice.setTitleContent(saveInvoiceInfoRequest.getTitleContent());
|
||||
xhpcInvoice.setDutyNumber(saveInvoiceInfoRequest.getDutyNumber());
|
||||
xhpcInvoice.setInvoiceContent(saveInvoiceInfoRequest.getInvoiceContent());
|
||||
xhpcInvoice.setFirmAddress(saveInvoiceInfoRequest.getFirmAddress());
|
||||
xhpcInvoice.setFirmPhone(saveInvoiceInfoRequest.getFirmPhone());
|
||||
xhpcInvoice.setFirmBank(saveInvoiceInfoRequest.getFirmBank());
|
||||
xhpcInvoice.setFirmBankAccount(saveInvoiceInfoRequest.getFirmBankAccount());
|
||||
xhpcInvoice.setIsShowDate(saveInvoiceInfoRequest.getIsShowDate());
|
||||
xhpcInvoice.setUserNotes(saveInvoiceInfoRequest.getUserNotes());
|
||||
xhpcInvoice.setCreatorId(saveInvoiceInfoRequest.getCreatorId());
|
||||
xhpcInvoice.setCreatorType(saveInvoiceInfoRequest.getCreatorType());
|
||||
xhpcInvoice.setCreator(saveInvoiceInfoRequest.getCreator());
|
||||
xhpcInvoice.setCreateTime(DateUtils.parseDate(saveInvoiceInfoRequest.getCreateTime()));
|
||||
xhpcInvoice.setStatus(0);
|
||||
xhpcInvoice.setInvoiceMoney(new BigDecimal(1));
|
||||
xhpcInvoice.setInvoiceStatus(saveInvoiceInfoRequest.getInvoiceStatus());
|
||||
|
||||
xhpcInvoiceMapper.insertSelectiveAndReturnId(xhpcInvoice);
|
||||
//获取所插入的发票id
|
||||
Long invoiceId = xhpcInvoice.getInvoiceId();
|
||||
//存储该发票所包含的所有历史订单总电量
|
||||
double totalPowerPrice = 0;
|
||||
//存储该发票所包含的所有历史订单总服务费
|
||||
double totalServicePrice = 0;
|
||||
//建立订单与发票之间的关联
|
||||
List<Map<String, Object>> xhpcHistoryOrderList = xhpcHistoryOrderMapper.findHistoryOrderIds(historyOrderIds, operatorId);
|
||||
|
||||
for (int j = 0; j <xhpcHistoryOrderList.size() ; j++) {
|
||||
|
||||
Map<String, Object> map = xhpcHistoryOrderList.get(j);
|
||||
|
||||
XhpcInvoiceMapHistoryOrder xhpcInvoiceMapHistoryOrder = new XhpcInvoiceMapHistoryOrder();
|
||||
xhpcInvoiceMapHistoryOrder.setInvoiceId(invoiceId);
|
||||
xhpcInvoiceMapHistoryOrder.setHistoryOrderId(Long.valueOf(map.get("historyOrderId").toString()));
|
||||
xhpcInvoiceMapHistoryOrder.setHistoryUserId(Long.valueOf(map.get("userId").toString()));
|
||||
xhpcInvoiceMapHistoryOrder.setHistoryUserType(Long.valueOf(map.get("source").toString()));
|
||||
xhpcInvoiceMapHistoryOrder.setHistorySerialNumber(map.get("serialNumber").toString());
|
||||
xhpcInvoiceMapHistoryOrder.setPowerPriceTotal(new BigDecimal(map.get("powerPriceTotal").toString()));
|
||||
xhpcInvoiceMapHistoryOrder.setServicePriceTotal(BigDecimal.valueOf(new BigDecimal(map.get("servicePriceTotal").toString()).doubleValue() - new BigDecimal(map.get("promotionDiscount").toString()).doubleValue()));
|
||||
xhpcInvoiceMapHistoryOrder.setPromotionDiscount(new BigDecimal(map.get("promotionDiscount").toString()));
|
||||
xhpcInvoiceMapHistoryOrder.setHistoryActPrice(new BigDecimal(map.get("actPrice").toString()));
|
||||
xhpcInvoiceMapHistoryOrder.setCreateTime(cn.hutool.core.date.DateUtil.parse(map.get("createTime").toString()));
|
||||
xhpcInvoiceMapHistoryOrder.setChargingMode(map.get("chargingMode").toString());
|
||||
xhpcInvoiceMapHistoryOrder.setChargingStationId(Long.valueOf(map.get("chargingStationId").toString()));
|
||||
xhpcInvoiceMapHistoryOrder.setTerminalId(Long.valueOf(map.get("terminalId").toString()));
|
||||
xhpcInvoiceMapHistoryOrder.setLockFlag(InvoiceMapHistoryOrderStatusConst.LOCK);
|
||||
xhpcInvoiceMapHistoryOrderMapper.insertSelective(xhpcInvoiceMapHistoryOrder);
|
||||
totalPowerPrice += new BigDecimal(map.get("powerPriceTotal").toString()).doubleValue();
|
||||
totalServicePrice += (new BigDecimal(map.get("servicePriceTotal").toString()).doubleValue() - new BigDecimal(map.get("promotionDiscount").toString()).doubleValue());
|
||||
totalActPrice += new BigDecimal(map.get("actPrice").toString()).doubleValue();
|
||||
|
||||
}
|
||||
xhpcInvoice.setInvoiceOrderEletricTotalMoney(BigDecimal.valueOf(totalPowerPrice));
|
||||
xhpcInvoice.setInvoiceOrderServiceTotalMoney(BigDecimal.valueOf(totalServicePrice));
|
||||
xhpcInvoice.setInvoiceMoney(BigDecimal.valueOf(totalPowerPrice).add(BigDecimal.valueOf(totalServicePrice)));
|
||||
xhpcInvoice.setOrderOperatorId(operatorId);
|
||||
xhpcInvoice.setInvoiceOperatorId(operatorId);
|
||||
xhpcInvoiceMapper.updateElectricAndServiceById(xhpcInvoice);
|
||||
}
|
||||
|
||||
BigDecimal bigDecimal = saveInvoiceInfoRequest.getInvoiceMoney().setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal bigDecimal2 = new BigDecimal(totalActPrice).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
if (!bigDecimal2.equals(bigDecimal)) {
|
||||
throw new Exception("传入的发票金额与实际包含的历史订单总金额参数不匹配");
|
||||
}
|
||||
|
||||
try {
|
||||
LoginUser loginUser = tokenService.getLoginUser();
|
||||
getCreatorRead(saveInvoiceInfoRequest.getCreatorId(),saveInvoiceInfoRequest.getCreatorType(),loginUser.getTenantId());
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询指定用户没有查看的已开的发票的数量,即该用户有几个未读发票
|
||||
*
|
||||
|
||||
@ -48,11 +48,11 @@ oss:
|
||||
name: qiniu
|
||||
tenant-mode: true
|
||||
endpoint: oss-accelerate.aliyuncs.com
|
||||
access-key: LTAI5t7vcQMfZPEZQkEdrAjx
|
||||
secret-key: K7ZstCZoAjvJsBCe0CipodINETuPyi
|
||||
access-key: LTAI5tHxc8hrG6cT5nDtEkiV
|
||||
secret-key: 5kFEaIFE7eeODxKQwD5mvTRF48MK6w
|
||||
bucket-name: xhpc-bucket1
|
||||
|
||||
#文件路径
|
||||
file:
|
||||
aliyunPath: invoicePdf/
|
||||
serverStoreDisposableFileLocation: /www/wwwroot/scxhua.cn/disposableFiles/
|
||||
serverStoreDisposableFileLocation: /www/wwwroot/scxhua.cn/disposableFiles/
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
xau.suncha_switch as sunchaSwitch,
|
||||
xau.a_balance as aBalance,
|
||||
xau.b_balance as bBalance,
|
||||
(select vin_spec_code as vinSpecCode from xhpc_user_vehicle where app_user_id = xau.app_user_id and source=0 and del_flag=0 and vin_blacklist !=1 order by type,create_time desc LIMIT 1) as vinSpecCode,
|
||||
(select vehicle_name as vehicleName from xhpc_user_vehicle where app_user_id = xau.app_user_id and source=0 and del_flag=0 and vin_blacklist !=1 order by type,create_time desc LIMIT 1) as vehicleName,
|
||||
(select vin_spec_code as vinSpecCode from xhpc_user_vehicle where app_user_id = xau.app_user_id and source=0 and del_flag=0 and vin_blacklist !=1 order by type desc,create_time desc LIMIT 1) as vinSpecCode,
|
||||
(select vehicle_name as vehicleName from xhpc_user_vehicle where app_user_id = xau.app_user_id and source=0 and del_flag=0 and vin_blacklist !=1 order by type desc,create_time desc LIMIT 1) as vehicleName,
|
||||
xau.create_time as createTime
|
||||
from xhpc_app_user xau
|
||||
left join xhpc_tenant ten on ten.tenant_id = xau.tenant_id and ten.is_deleted =0
|
||||
@ -73,8 +73,8 @@
|
||||
xcp.suncha_switch as sunchaSwitch,
|
||||
xcp.a_balance as aBalance,
|
||||
xcp.b_balance as bBalance,
|
||||
(select vin_spec_code as vinSpecCode from xhpc_user_vehicle where app_user_id = xcp.community_personnel_id and source=2 and del_flag=0 and vin_blacklist !=1 order by type,create_time desc LIMIT 1) as vinSpecCode,
|
||||
(select vehicle_name as vehicleName from xhpc_user_vehicle where app_user_id = xcp.community_personnel_id and source=2 and del_flag=0 and vin_blacklist !=1 order by type,create_time desc LIMIT 1) as vehicleName,
|
||||
(select vin_spec_code as vinSpecCode from xhpc_user_vehicle where app_user_id = xcp.community_personnel_id and source=2 and del_flag=0 and vin_blacklist !=1 order by type desc,create_time desc LIMIT 1) as vinSpecCode,
|
||||
(select vehicle_name as vehicleName from xhpc_user_vehicle where app_user_id = xcp.community_personnel_id and source=2 and del_flag=0 and vin_blacklist !=1 order by type desc,create_time desc LIMIT 1) as vehicleName,
|
||||
<if test="serialNumber !=null and serialNumber !=''">
|
||||
(select count(charging_station_id) from xhpc_mechanism where community_id=mechanism_id and source=0 and charging_station_id in (select charging_station_id from xhpc_terminal where 1=1 and del_flag=0 and serial_number=#{serialNumber})) as number,
|
||||
</if>
|
||||
@ -117,8 +117,8 @@
|
||||
xcp.suncha_switch as sunchaSwitch,
|
||||
xcp.a_balance as aBalance,
|
||||
xcp.b_balance as bBalance,
|
||||
(select vin_spec_code as vinSpecCode from xhpc_user_vehicle where app_user_id = xcp.customers_personnel_id and source=3 and del_flag=0 and vin_blacklist !=1 order by type,create_time desc LIMIT 1) as vinSpecCode,
|
||||
(select vehicle_name as vehicleName from xhpc_user_vehicle where app_user_id = xcp.customers_personnel_id and source=3 and del_flag=0 and vin_blacklist !=1 order by type,create_time desc LIMIT 1) as vehicleName,
|
||||
(select vin_spec_code as vinSpecCode from xhpc_user_vehicle where app_user_id = xcp.customers_personnel_id and source=3 and del_flag=0 and vin_blacklist !=1 order by type desc,create_time desc LIMIT 1) as vinSpecCode,
|
||||
(select vehicle_name as vehicleName from xhpc_user_vehicle where app_user_id = xcp.customers_personnel_id and source=3 and del_flag=0 and vin_blacklist !=1 order by type desc,create_time desc LIMIT 1) as vehicleName,
|
||||
<if test="serialNumber !=null and serialNumber !=''">
|
||||
(select count(charging_station_id) from xhpc_mechanism where customers_id=mechanism_id and source=1 and charging_station_id in (select charging_station_id from xhpc_terminal where 1=1 and del_flag=0 and serial_number=#{serialNumber})) as number,
|
||||
</if>
|
||||
@ -160,7 +160,7 @@
|
||||
xau.tenant_id tenantId,
|
||||
xau.soc_protect socProtect,
|
||||
ten.status tenantStatus,
|
||||
(select vehicle_name as vehicleName from xhpc_user_vehicle where app_user_id = xau.app_internet_user_id and source=1 and del_flag=0 and vin_blacklist !=1 order by type,create_time desc LIMIT 1) as vehicleName,
|
||||
(select vehicle_name as vehicleName from xhpc_user_vehicle where app_user_id = xau.app_internet_user_id and source=1 and del_flag=0 and vin_blacklist !=1 order by type desc,create_time desc LIMIT 1) as vehicleName,
|
||||
xau.create_time as createTime
|
||||
from xhpc_app_internet_user xau
|
||||
left join xhpc_tenant ten on ten.tenant_id = xau.tenant_id and ten.is_deleted =0
|
||||
|
||||
@ -77,6 +77,9 @@
|
||||
<if test="null != servicePreferential">
|
||||
service_preferential,
|
||||
</if>
|
||||
<if test="null != minLimit">
|
||||
min_limit,
|
||||
</if>
|
||||
<if test="null != contactName and '' != contactName">
|
||||
contact_name,
|
||||
</if>
|
||||
@ -130,6 +133,9 @@
|
||||
<if test="null != servicePreferential">
|
||||
#{servicePreferential},
|
||||
</if>
|
||||
<if test="null != minLimit">
|
||||
#{minLimit},
|
||||
</if>
|
||||
<if test="null != contactName and '' != contactName">
|
||||
#{contactName},
|
||||
</if>
|
||||
@ -180,6 +186,7 @@
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="servicePreferential != null">service_preferential = #{servicePreferential},</if>
|
||||
<if test="minLimit != null">min_limit = #{minLimit},</if>
|
||||
<if test="contactName != null">contact_name = #{contactName},</if>
|
||||
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
@ -209,6 +216,7 @@
|
||||
co.customers_id as customersId,
|
||||
co.name as name,
|
||||
co.service_preferential as servicePreferential,
|
||||
co.min_limit as minLimit,
|
||||
co.contact_name as contactName,
|
||||
co.contact_phone as contactPhone,
|
||||
co.address as address,
|
||||
|
||||
@ -59,8 +59,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
history_order_id
|
||||
,
|
||||
history_order_id,
|
||||
charging_station_id,
|
||||
charge_order_id,
|
||||
user_id,
|
||||
@ -168,4 +167,57 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countOperatorOnHistoryOrderIds" resultType="map">
|
||||
select
|
||||
xo.operator_id operatorId
|
||||
FROM
|
||||
xhpc_history_order xho
|
||||
left join xhpc_charging_station xcs on xho.charging_station_id = xcs.charging_station_id
|
||||
left join xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||
WHERE
|
||||
xho.del_flag = 0
|
||||
<if test="historyOrderIds!=null">
|
||||
AND xho.history_order_id IN
|
||||
<foreach collection="historyOrderIds" open="(" close=")" item="historyOrderId" separator=",">
|
||||
#{historyOrderId}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY xo.operator_id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findHistoryOrderIds" resultType="map">
|
||||
SELECT
|
||||
xho.history_order_id as historyOrderId,
|
||||
xho.user_id as userId,
|
||||
xho.source as source,
|
||||
xho.serial_number as serialNumber,
|
||||
xho.power_price_total as powerPriceTotal,
|
||||
xho.service_price_total as servicePriceTotal,
|
||||
xho.promotion_discount as promotionDiscount,
|
||||
xho.act_price as actPrice,
|
||||
xho.create_time as createTime,
|
||||
xho.charging_mode as chargingMode,
|
||||
xho.charging_station_id as chargingStationId,
|
||||
xho.terminal_id as terminalId,
|
||||
xo.operator_id as operatorId,
|
||||
xo.name as operatorName,
|
||||
xo.invoice_type as invoiceType
|
||||
FROM
|
||||
xhpc_history_order xho
|
||||
left join xhpc_charging_station xcs on xho.charging_station_id = xcs.charging_station_id
|
||||
left join xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||
WHERE
|
||||
xho.del_flag = 0
|
||||
<if test="historyOrderIds!=null">
|
||||
AND xho.history_order_id IN
|
||||
<foreach collection="historyOrderIds" open="(" close=")" item="historyOrderId" separator=",">
|
||||
#{historyOrderId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="operatorId !=null">
|
||||
and xo.operator_id=#{operatorId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -32,6 +32,8 @@
|
||||
<result column="is_read" jdbcType="TINYINT" property="isRead"/>
|
||||
<result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
|
||||
<result column="invoice_status" jdbcType="INTEGER" property="invoiceStatus"/>
|
||||
<result column="order_operator_id" jdbcType="INTEGER" property="orderOperatorId"/>
|
||||
<result column="invoice_operator_id" jdbcType="INTEGER" property="invoiceOperatorId"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
@ -68,60 +70,98 @@
|
||||
`del_flag`
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultType="com.xhpc.user.pojo.XhpcInvoice">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from xhpc_invoice
|
||||
where invoice_id = #{invoiceId,jdbcType=BIGINT} and del_flag is null;
|
||||
xi.`invoice_id` as invoiceId,
|
||||
xi.invoice_type as invoiceType,
|
||||
xi.`receive_email` as receiveEmail,
|
||||
xi.`title_type` as titleType,
|
||||
xi.`title_content` as titleContent,
|
||||
xi.`duty_number` as dutyNumber,
|
||||
xi.`invoice_content` as invoiceContent,
|
||||
xi.`invoice_money` as invoiceMoney,
|
||||
xi.`invoice_order_eletric_total_money` as invoiceOrderEletricTotalMoney,
|
||||
xi.`invoice_order_service_total_money` as invoiceOrderServiceTotalMoney,
|
||||
xi.`firm_address` as firmAddress,
|
||||
xi.`firm_phone` as firmPhone,
|
||||
xi.`firm_bank` as firmBank,
|
||||
xi.`firm_bank_account` as firmBankAccount,
|
||||
xi.`is_show_date` as isShowDate,
|
||||
xi.`user_notes` as userNotes,
|
||||
xi.`creator_id` as creatorId,
|
||||
xi.`creator_type` as creatorType,
|
||||
xi.`creator` as creator,
|
||||
xi.`create_time` as createTime,
|
||||
xi.`status` as status,
|
||||
xi.`invoicing_time` as invoicingTime,
|
||||
xi.`drawer` as drawer,
|
||||
xi.`finance_notes` as financeNotes,
|
||||
xi.`electric_invoice_url` as electricInvoiceUrl,
|
||||
xi.`updator` as updator,
|
||||
xi.`update_time` as updateTime,
|
||||
xi.`is_read` as isRead,
|
||||
xi.tenant_id as tenantId,
|
||||
xi.invoice_status as invoiceStatus,
|
||||
xi.`del_flag` as delFlag,
|
||||
xo.name as orderOperatorName,
|
||||
xop.name as invoiceOperatorName
|
||||
from xhpc_invoice as xi
|
||||
left join xhpc_operator xo on xo.operator_id = xi.order_operator_id
|
||||
left join xhpc_operator xop on xop.operator_id = xi.invoice_operator_id
|
||||
where xi.invoice_id = #{invoiceId,jdbcType=BIGINT} and xi.del_flag is null;
|
||||
</select>
|
||||
<select id="selectAllInvoiceOrdersByCondition" resultMap="BaseResultMap">
|
||||
<select id="selectAllInvoiceOrdersByCondition" resultType="com.xhpc.user.pojo.XhpcInvoice">
|
||||
SELECT
|
||||
invoice_id,
|
||||
invoice_type,
|
||||
tenant_id,
|
||||
creator,
|
||||
creator_type,
|
||||
invoice_money,
|
||||
status,
|
||||
create_time,
|
||||
invoicing_time,
|
||||
drawer,
|
||||
invoice_status
|
||||
xi.invoice_id as invoiceId,
|
||||
xi.invoice_type as invoiceType,
|
||||
xi.tenant_id as tenantId,
|
||||
xi.creator AS creator,
|
||||
xi.creator_type AS creatorType,
|
||||
xi.invoice_money AS invoiceMoney,
|
||||
xi.status AS status,
|
||||
xi.create_time AS createtime,
|
||||
xi.invoicing_time as invoicingTime,
|
||||
xi.drawer AS drawer,
|
||||
xi.invoice_status AS invoiceStatus,
|
||||
xo.name as orderOperatorName,
|
||||
xop.name as invoiceOperatorName
|
||||
FROM
|
||||
xhpc_invoice
|
||||
xhpc_invoice as xi
|
||||
left join xhpc_operator xo on xo.operator_id = xi.order_operator_id
|
||||
left join xhpc_operator xop on xop.operator_id = xi.invoice_operator_id
|
||||
<where>
|
||||
del_flag IS NULL
|
||||
xi.del_flag IS NULL
|
||||
<if test="creator!=null and creator!='' ">
|
||||
and creator like concat('%', #{creator}, '%')
|
||||
and xi.creator like concat('%', #{creator}, '%')
|
||||
</if>
|
||||
<if test="creatorType!=null">
|
||||
and creator_type = #{creatorType}
|
||||
and xi.creator_type = #{creatorType}
|
||||
</if>
|
||||
<if test="invoiceType!=null">
|
||||
and invoice_type = #{invoiceType}
|
||||
and xi.invoice_type = #{invoiceType}
|
||||
</if>
|
||||
<if test="tenantId!=null and tenantId !=''">
|
||||
and tenant_id = #{tenantId}
|
||||
and xi.tenant_id = #{tenantId}
|
||||
</if>
|
||||
<if test="status!=null">
|
||||
and status = #{status}
|
||||
and xi.status = #{status}
|
||||
</if>
|
||||
<if test="startCreatorTime!=null">
|
||||
and create_time >= #{startCreatorTime}
|
||||
and xi.create_time >= #{startCreatorTime}
|
||||
</if>
|
||||
<if test="endCreatorTime!=null">
|
||||
and create_time <= #{endCreatorTime}
|
||||
and xi.create_time <= #{endCreatorTime}
|
||||
</if>
|
||||
<if test="startInvoicingTime!=null">
|
||||
and invoicing_time >= #{startInvoicingTime}
|
||||
and xi.invoicing_time >= #{startInvoicingTime}
|
||||
</if>
|
||||
<if test="endInvoicingTime!=null">
|
||||
and invoicing_time <= #{endInvoicingTime}
|
||||
and xi.invoicing_time <= #{endInvoicingTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
STATUS ASC,
|
||||
create_time DESC
|
||||
xi.STATUS ASC,
|
||||
xi.create_time DESC
|
||||
LIMIT #{currentPage},#{items}
|
||||
</select>
|
||||
<select id="sumItemsInvoice" resultType="java.lang.Long">
|
||||
@ -773,7 +813,10 @@
|
||||
<update id="updateElectricAndServiceById">
|
||||
UPDATE xhpc_invoice
|
||||
SET invoice_order_eletric_total_money = #{invoiceOrderEletricTotalMoney},
|
||||
invoice_order_service_total_money = #{invoiceOrderServiceTotalMoney}
|
||||
invoice_order_service_total_money = #{invoiceOrderServiceTotalMoney},
|
||||
invoice_money =#{invoiceMoney},
|
||||
order_operator_id = #{orderOperatorId},
|
||||
invoice_operator_id = #{invoiceOperatorId}
|
||||
WHERE invoice_id = #{invoiceId};
|
||||
</update>
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
<if test="null != businessLicenseId and '' != businessLicenseId">
|
||||
business_license_id,
|
||||
</if>
|
||||
<if test="null != withdrawalTime">
|
||||
<if test="null != withdrawalTime and '' != withdrawalTime">
|
||||
withdrawal_time,
|
||||
</if>
|
||||
<if test="null != soc and '' != soc">
|
||||
|
||||
@ -290,7 +290,7 @@
|
||||
</insert>
|
||||
|
||||
<select id="checkUserNameUnique" parameterType="java.lang.String" resultType="int">
|
||||
select count(1) from sys_user where user_name = #{userName}
|
||||
select count(1) from sys_user where user_name = #{userName} and del_flag =0
|
||||
<if test="userId !=null">
|
||||
and user_id=#{userId}
|
||||
</if>
|
||||
|
||||
@ -73,6 +73,7 @@
|
||||
<if test="tenantId !=null and tenantId !=''">
|
||||
and xuv.tenant_id=#{tenantId}
|
||||
</if>
|
||||
order by xuv.type desc,xuv.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getUserVehicleList" resultType="map">
|
||||
@ -83,7 +84,7 @@
|
||||
vin_spec_code as vinSpecCode,
|
||||
type as type,
|
||||
status as status
|
||||
from xhpc_user_vehicle where source =#{source} and app_user_id =#{userId} and del_flag=0 order by create_time desc
|
||||
from xhpc_user_vehicle where source =#{source} and app_user_id =#{userId} and del_flag=0 order by type desc,create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
@ -172,7 +173,7 @@
|
||||
and type =#{type}
|
||||
</if>
|
||||
|
||||
order by create_time desc limit 1
|
||||
order by tyep desc,create_time desc limit 1
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user