Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile into dev
| | |
| | | @Data |
| | | @Document(collection = "qr_code_delivery") //指定要对应的文档名(表名) |
| | | @Accessors(chain = true) |
| | | public class QrCodeDelivery { |
| | | public class QrCodeDelivery extends BaseModel { |
| | | |
| | | private String charging_pile_code; // 桩编码 |
| | | private String charging_gun_code; // 枪编码 |
| | |
| | | <if test="dictType != null and dictType != ''">#{dictType},</if> |
| | | <if test="sort != null">#{sort},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="dictType != null">dict_type = #{dictType},</if> |
| | | <if test="sort != null">sort = #{sort},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where column_id = #{columnId} |
| | | </update> |
| | |
| | | <if test="genPath != null and genPath != ''">#{genPath},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="options != null and options != ''">options = #{options},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where table_id = #{tableId} |
| | | </update> |
| | |
| | | <if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status !=null">status = #{status},</if> |
| | | <if test="remark != null and remark != ''">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where job_id = #{jobId} |
| | | </update> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="configType != null and configType != ''">#{configType},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="configType != null and configType != ''">config_type = #{configType},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where config_id = #{configId} |
| | | </update> |
| | |
| | | <if test="email != null and email != ''">#{email},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="email != null">email = #{email},</if> |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where dept_id = #{deptId} |
| | | </update> |
| | |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where dict_code = #{dictCode} |
| | | </update> |
| | |
| | | <if test="status != null">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where dict_id = #{dictId} |
| | | </update> |
| | |
| | | <if test="status != null">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="icon !=null and icon != ''">icon = #{icon},</if> |
| | | <if test="remark != null and remark != ''">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where menu_id = #{menuId} |
| | | </update> |
| | |
| | | <if test="icon != null and icon != ''">#{icon},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status != null and status != ''">#{status}, </if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="noticeContent != null">notice_content = #{noticeContent}, </if> |
| | | <if test="status != null and status != ''">status = #{status}, </if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where notice_id = #{noticeId} |
| | | </update> |
| | |
| | | |
| | | <insert id="insertOperlog" parameterType="com.ruoyi.system.api.domain.SysOperLog"> |
| | | insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, cost_time, oper_time) |
| | | values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate()) |
| | | values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, now()) |
| | | </insert> |
| | | |
| | | <select id="selectOperLogList" parameterType="com.ruoyi.system.api.domain.SysOperLog" resultMap="SysOperLogResult"> |
| | |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where post_id = #{postId} |
| | | </update> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where role_id = #{roleId} |
| | | </update> |
| | |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="objectId != null and objectId != ''">#{objectId},</if> |
| | | <if test="passWordUpdate != null and passWordUpdate != ''">#{passWordUpdate},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="forbiddenRemark != null">forbidden_remark = #{forbiddenRemark},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where user_id = #{userId} |
| | | </update> |
| | |
| | | accountingStrategyVO.setUserName(userName); |
| | | } |
| | | accountingStrategyVO.setAccountingStrategyDetailList(accountingStrategyDetailService.list(Wrappers.lambdaQuery(TAccountingStrategyDetail.class) |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, children.getId()))); |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, children.getId()).eq(TAccountingStrategyDetail::getDelFlag, 0))); |
| | | }else { |
| | | TAccountingStrategy accountingStrategy = accountingStrategyService.getById(id); |
| | | BeanUtils.copyProperties(accountingStrategy,accountingStrategyVO); |
| | |
| | | accountingStrategyVO.setUserName(userName); |
| | | } |
| | | accountingStrategyVO.setAccountingStrategyDetailList(accountingStrategyDetailService.list(Wrappers.lambdaQuery(TAccountingStrategyDetail.class) |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, id))); |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, id).eq(TAccountingStrategyDetail::getDelFlag, 0))); |
| | | } |
| | | return AjaxResult.ok(accountingStrategyVO); |
| | | } |
| | |
| | | } |
| | | //硬件 |
| | | |
| | | List<TAccountingStrategyDetail> accountingStrategyDetails = accountingStrategyDetailService.list(new LambdaQueryWrapper<TAccountingStrategyDetail>().eq(TAccountingStrategyDetail::getAccountingStrategyId, byId.getId())); |
| | | List<TAccountingStrategyDetail> accountingStrategyDetails = accountingStrategyDetailService.list(new LambdaQueryWrapper<TAccountingStrategyDetail>() |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, byId.getId()).eq(TAccountingStrategyDetail::getDelFlag, 0)); |
| | | List<TChargingPile> list = chargingPileService.lambdaQuery().eq(TChargingPile::getSiteId, byId.getSiteId()).list(); |
| | | for (TChargingPile tChargingPile : list) { |
| | | integrationClient.setupBillingModel1(tChargingPile.getCode(), JSON.toJSONString(accountingStrategyDetails)); |
| | |
| | | // 会员折扣 |
| | | BigDecimal discount = one1.getDiscount(); |
| | | List<TAccountingStrategyDetail> list = accountingStrategyDetailService.lambdaQuery().eq(TAccountingStrategyDetail::getAccountingStrategyId, one1.getId()) |
| | | .list(); |
| | | .eq(TAccountingStrategyDetail::getDelFlag, 0).list(); |
| | | // 当前时间属于哪个计费策略 |
| | | LocalTime now = LocalTime.now(); |
| | | // 电价 |
| | |
| | | qrCodeDelivery.setPrefix_length(code_prefix.length()); |
| | | qrCodeDelivery.setCode_prefix(code_prefix); |
| | | qrCodeDelivery.setQr_code(code_prefix + chargingPile.getCode() + dto.getCode()); |
| | | qrCodeDelivery.setCreate_time(new Date()); |
| | | qrCodeDelivery.setLast_time(new Date()); |
| | | sendMessageClient.qrCodeDelivery(qrCodeDelivery); |
| | | Site site = siteMapper.selectById(chargingPile.getSiteId()); |
| | | // 推送充换电站信息 |
| | |
| | | qrCodeDelivery.setPrefix_length(code_prefix.length()); |
| | | qrCodeDelivery.setCode_prefix(code_prefix); |
| | | qrCodeDelivery.setQr_code(code_prefix + chargingPile.getCode() + dto.getCode()); |
| | | qrCodeDelivery.setCreate_time(new Date()); |
| | | qrCodeDelivery.setLast_time(new Date()); |
| | | sendMessageClient.qrCodeDelivery(qrCodeDelivery); |
| | | tcecClient.superviseNotificationStationInfo(one.getSiteId()); |
| | | |
| | |
| | | qrCodeDelivery.setPrefix_length(code_prefix.length()); |
| | | qrCodeDelivery.setCode_prefix(code_prefix); |
| | | qrCodeDelivery.setQr_code(code_prefix + chargingPile.getCode() + chargingGun.getCode()); |
| | | qrCodeDelivery.setCreate_time(new Date()); |
| | | qrCodeDelivery.setLast_time(new Date()); |
| | | sendMessageClient.qrCodeDelivery(qrCodeDelivery); |
| | | } |
| | | tcecClient.superviseNotificationStationInfo(chargingPile.getSiteId()); |
| | |
| | | FROM t_accounting_strategy_detail tasd |
| | | LEFT JOIN t_accounting_strategy tas ON tas.id = tasd.accounting_strategy_id |
| | | <where> |
| | | tasd.del_flag = 0 |
| | | <if test="strategyId != null"> |
| | | AND tasd.accounting_strategy_id = #{strategyId} |
| | | </if> |
| | |
| | | <if test="chargingPileId != null and chargingPileId != 0">#{chargingPileId},</if> |
| | | <if test="phone != null and phone != ''">#{phone},</if> |
| | | <if test="content != null and content != ''">#{content},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | acquisitionBillingModeService.create(acquisitionBillingMode); |
| | | break; |
| | | case SendTagConstant.UPLOAD_REAL_TIME_MONITORING_DATA: |
| | | //限制数据处理频率,30秒一次 |
| | | //限制数据处理频率,60秒一次 |
| | | UploadRealTimeMonitoringDataMessage uploadRealTimeMonitoringDataMessage = message.getUploadRealTimeMonitoringDataMessage(); |
| | | String transaction_serial_number = uploadRealTimeMonitoringDataMessage.getTransaction_serial_number(); |
| | | Object o = redisTemplate.opsForValue().get("upload_real_time_monitoring_data:" + transaction_serial_number); |
| | | if(null != o){ |
| | | Long m = System.currentTimeMillis() - (Long) o; |
| | | if(m < 30000){ |
| | | if(m < 60000){ |
| | | break; |
| | | } |
| | | } |
| | |
| | | Object o1 = redisTemplate.opsForValue().get("bms_demand_and_charger_exportation:" + transaction_serial_number1); |
| | | if(null != o1){ |
| | | Long m = System.currentTimeMillis() - (Long) o1; |
| | | if(m < 30000){ |
| | | if(m < 60000){ |
| | | break; |
| | | } |
| | | } |
| | |
| | | Object o2 = redisTemplate.opsForValue().get("bms_information:" + transaction_serial_number2); |
| | | if(null != o2){ |
| | | Long m = System.currentTimeMillis() - (Long) o2; |
| | | if(m < 30000){ |
| | | if(m < 60000){ |
| | | break; |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * 定时任务删除3个月前的数据 |
| | | * 定时任务删除2个月前的数据 |
| | | */ |
| | | void taskDelete(); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 定时任务删除3个月前的数据 |
| | | * 定时任务删除2个月前的数据 |
| | | */ |
| | | void taskDelete(); |
| | | } |
| | |
| | | void updateById(String id); |
| | | |
| | | /** |
| | | * 定时任务删除3个月前的数据 |
| | | * 定时任务删除2个月前的数据 |
| | | */ |
| | | void taskDelete(); |
| | | } |
| | |
| | | @Override |
| | | public void taskDelete() { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("create_time").lt(LocalDateTime.now().minusMonths(3))); |
| | | query.addCriteria(Criteria.where("create_time").lt(LocalDateTime.now().minusMonths(2))); |
| | | mongoTemplate.remove(query, BmsDemandAndChargerExportation.class); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 定时任务删除3个月前的数据 |
| | | * 定时任务删除2个月前的数据 |
| | | */ |
| | | @Override |
| | | public void taskDelete() { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("create_time").lt(LocalDateTime.now().minusMonths(3))); |
| | | query.addCriteria(Criteria.where("create_time").lt(LocalDateTime.now().minusMonths(2))); |
| | | mongoTemplate.remove(query, BmsInformation.class); |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public void taskDelete() { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("create_time").lt(LocalDateTime.now().minusMonths(3))); |
| | | query.addCriteria(Criteria.where("create_time").lt(LocalDateTime.now().minusMonths(2))); |
| | | mongoTemplate.remove(query, UploadRealTimeMonitoringData.class); |
| | | } |
| | | } |
| | |
| | | sendMessageClient.platformStopCharging(platformStopCharging); |
| | | log.info(code1 + ":-------------------远程停止充电请求-------------------"); |
| | | log.info(platformStopCharging.toString()); |
| | | |
| | | //推送监管平台订单状态和订单详情 |
| | | ChargingOrderVo chargingOrderVo = new ChargingOrderVo(); |
| | | BeanUtils.copyProperties(order, chargingOrderVo); |
| | | chargingMessageClient.pushOrderInfo(chargingOrderVo); |
| | | chargingMessageClient.pushOrderStatus(chargingOrderVo); |
| | | }); |
| | | //推送三方平台 |
| | | if (2 == order.getOrderSource()) { |
| | |
| | | summaryData.setElectricPrice(electronic_reduce.setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | summaryData.setServicePrice(serviceMoney.setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | chargingOrderSummaryDataService.save(summaryData); |
| | | |
| | | //推送监管平台订单状态和订单详情 |
| | | ChargingOrderVo chargingOrderVo = new ChargingOrderVo(); |
| | | BeanUtils.copyProperties(chargingOrder, chargingOrderVo); |
| | | chargingMessageClient.pushOrderInfo(chargingOrderVo); |
| | | chargingMessageClient.pushOrderStatus(chargingOrderVo); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | |
| | | sendMessageClient.platformStopCharging(platformStopCharging); |
| | | log.info(code1 + ":-------------------远程停止充电请求-------------------"); |
| | | log.info(platformStopCharging.toString()); |
| | | |
| | | //推送监管平台订单状态和订单详情 |
| | | ChargingOrderVo chargingOrderVo = new ChargingOrderVo(); |
| | | BeanUtils.copyProperties(chargingOrder, chargingOrderVo); |
| | | chargingMessageClient.pushOrderInfo(chargingOrderVo); |
| | | chargingMessageClient.pushOrderStatus(chargingOrderVo); |
| | | }); |
| | | return R.ok(); |
| | | } |
| | |
| | | BeanUtils.copyProperties(one, vo); |
| | | R r = chargingOrderService.endChargeBillingCharge(vo); |
| | | log.info("定时任务执行,充电中的订单处理结果:{}", JSON.toJSONString(r)); |
| | | |
| | | if(200 == r.getCode()){ |
| | | order = chargingOrderService.getById(order.getId()); |
| | | //推送监管平台订单状态和订单详情 |
| | | ChargingOrderVo chargingOrderVo = new ChargingOrderVo(); |
| | | BeanUtils.copyProperties(order, chargingOrderVo); |
| | | chargingMessageClient.pushOrderInfo(chargingOrderVo); |
| | | chargingMessageClient.pushOrderStatus(chargingOrderVo); |
| | | } |
| | | } |
| | | } |
| | | } |