| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<Site> getSiteListPaging(Integer PageNo, Integer PageSize, List<String> ids) { |
| | | public PageInfo<Site> getSiteListPaging(Integer PageNo, Integer PageSize, List<String> ids, Integer isOpenSynchronization) { |
| | | return null; |
| | | } |
| | | |
| | |
| | | @PostMapping("/site/getSiteListPaging") |
| | | PageInfo<Site> getSiteListPaging(@RequestParam("PageNo") Integer PageNo, |
| | | @RequestParam("PageSize") Integer PageSize, |
| | | @RequestParam("ids") List<String> ids); |
| | | @RequestParam("ids") List<String> ids, |
| | | @RequestParam("isOpenSynchronization") Integer isOpenSynchronization); |
| | | |
| | | |
| | | /** |
| | |
| | | @TableField("supportOrder") |
| | | @ApiModelProperty(value = "2.0修改字段-是否支持预约 0不支持1支持") |
| | | private Integer supportOrder; |
| | | /** |
| | | * 高速路服务区编号 |
| | | */ |
| | | @TableField("serAreaCode") |
| | | @ApiModelProperty(value = "高速路服务区编号") |
| | | private String serAreaCode; |
| | | /** |
| | | * 引流平台数据同步(0=否,1=是) |
| | | */ |
| | | @TableField("isOpenSynchronization") |
| | | @ApiModelProperty(value = "引流平台数据同步(0=否,1=是)") |
| | | private Integer isOpenSynchronization; |
| | | // /** |
| | | // * 换电设备信息 |
| | | // */ |
| | |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 登录校验方法 |
| | |
| | | sysUser.setUserName(username); |
| | | sysUser.setNickName(username); |
| | | sysUser.setPassword(SecurityUtils.encryptPassword(password)); |
| | | sysUser.setPassWordUpdate(new Date()); |
| | | R<?> registerResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); |
| | | |
| | | if (R.FAIL == registerResult.getCode()) { |
| | |
| | | sysUser.setNickName(companyUserListVo.getNickName()); |
| | | sysUser.setCreateBy(SecurityUtils.getUsername()); |
| | | sysUser.setCreateTime(new Date()); |
| | | sysUser.setPassWordUpdate(new Date()); |
| | | userService.insertUser(sysUser); |
| | | SysUserRole sysUserRole = new SysUserRole(); |
| | | sysUserRole.setRoleId(20l); |
| | |
| | | sysUser.setObjectId(dto.getRepairId()); |
| | | sysUser.setUserName(add.getPhonenumber()); |
| | | sysUser.setNickName(add.getPhonenumber()); |
| | | sysUser.setPassWordUpdate(new Date()); |
| | | userService.insertUser(sysUser); |
| | | userIds.add(sysUser.getUserId().intValue()); |
| | | } |
| | |
| | | if(null == user.getRoleType()){ |
| | | user.setRoleType(1); |
| | | } |
| | | user.setPassWordUpdate(new Date()); |
| | | userService.insertUser(user); |
| | | SysUserRole sysUserRole = new SysUserRole(); |
| | | sysUserRole.setRoleId(user.getRoleId()); |
| | |
| | | BeanValidators.validateWithException(validator, user); |
| | | user.setPassword(SecurityUtils.encryptPassword(password)); |
| | | user.setCreateBy(operName); |
| | | user.setPassWordUpdate(new Date()); |
| | | userMapper.insertUser(user); |
| | | successNum++; |
| | | successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 导入成功"); |
| | |
| | | </sql> |
| | | |
| | | <select id="selectUserList" parameterType="com.ruoyi.system.api.domain.SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u |
| | | select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.passWordUpdate, d.dept_name, d.leader from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | where u.del_flag = '0' |
| | | <if test="phonenumber != null and phonenumber != ''"> |
| | |
| | | </select> |
| | | |
| | | <select id="selectAllocatedList" parameterType="com.ruoyi.system.api.domain.SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status,u.passWordUpdate, u.create_time |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | |
| | | </select> |
| | | |
| | | <select id="selectUnallocatedList" parameterType="com.ruoyi.system.api.domain.SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status,u.passWordUpdate, u.create_time |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | |
| | | <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> |
| | | <if test="passWordUpdate != null">passWordUpdate = #{passWordUpdate},</if> |
| | | update_time = now() |
| | | </set> |
| | | where user_id = #{userId} |
| | |
| | | </update> |
| | | |
| | | <update id="resetUserPwd" parameterType="com.ruoyi.system.api.domain.SysUser"> |
| | | update sys_user set password = #{password} where user_name = #{userName} |
| | | update sys_user set password = #{password}, passWordUpdate = now() where user_name = #{userName} |
| | | </update> |
| | | |
| | | <delete id="deleteUserById" parameterType="Long"> |
| | |
| | | */ |
| | | @PostMapping("/getSiteListPaging") |
| | | public PageInfo<Site> getSiteListPaging(@RequestParam("PageNo") Integer PageNo, @RequestParam("PageSize") Integer PageSize, |
| | | @RequestParam("ids") List<String> ids){ |
| | | @RequestParam("ids") List<String> ids, @RequestParam("isOpenSynchronization") Integer isOpenSynchronization){ |
| | | PageInfo<Site> pageInfo = new PageInfo<>(PageNo, PageSize); |
| | | PageInfo<Site> page = siteService.lambdaQuery().eq(Site::getStatus, 1).in(ids.size() > 0, Site::getId, ids) |
| | | PageInfo<Site> page = siteService.lambdaQuery().eq(Site::getStatus, 1) |
| | | .in(ids.size() > 0, Site::getId, ids) |
| | | .eq(-1 != isOpenSynchronization, Site::getIsOpenSynchronization, isOpenSynchronization) |
| | | .ne(Site::getSiteType, 2).page(pageInfo); |
| | | return page; |
| | | } |
| | |
| | | accountingStrategyService.removeById(one.getId()); |
| | | |
| | | //推送三方平台 |
| | | List<Integer> siteIds = list.stream().map(Site::getId).collect(Collectors.toList()); |
| | | tcecClient.notificationStationChange(siteIds); |
| | | List<Integer> siteIds = list.stream().filter(s->1 == s.getIsOpenSynchronization()).map(Site::getId).collect(Collectors.toList()); |
| | | if(!siteIds.isEmpty()){ |
| | | tcecClient.notificationStationChange(siteIds); |
| | | } |
| | | |
| | | } |
| | | //硬件 |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.chargingPile.api.model.TChargingGun; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPile; |
| | | import com.ruoyi.chargingPile.api.model.TFaultMessage; |
| | | import com.ruoyi.chargingPile.api.model.*; |
| | | import com.ruoyi.chargingPile.api.query.TChargingGunQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TChargingGunVO; |
| | | import com.ruoyi.chargingPile.api.vo.UpdateChargingPileStatusVo; |
| | |
| | | |
| | | @Resource |
| | | private TCECClient tcecClient; |
| | | |
| | | @Resource |
| | | private ISiteService siteService; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | TChargingPile chargingPile = chargingPileService.getById(tChargingGun.getChargingPileId()); |
| | | //枪处于离线或者故障,返回状态为正常,则修改其状态 |
| | | if(0 == status && tChargingGun.getStatus() != 2){ |
| | | Site site = siteService.getById(tChargingGun.getSiteId()); |
| | | TChargingGun tChargingGun1 = new TChargingGun(); |
| | | tChargingGun1.setId(tChargingGun.getId()); |
| | | tChargingGun1.setStatus(2); |
| | | chargingGunService.updateById(tChargingGun1); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), 2); |
| | | } |
| | | }).start(); |
| | | if(site.getIsOpenSynchronization() == 1){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), 2); |
| | | } |
| | | }).start(); |
| | | } |
| | | |
| | | if(chargingPile.getStatus() != 1){ |
| | | TChargingPile chargingPile1 = new TChargingPile(); |
| | |
| | | } |
| | | //枪处于正常,返回状态为故障,则修改其状态 |
| | | if(1 == status && tChargingGun.getStatus() != 1 && tChargingGun.getStatus() != 7){ |
| | | Site site = siteService.getById(tChargingGun.getSiteId()); |
| | | TChargingGun tChargingGun1 = new TChargingGun(); |
| | | tChargingGun1.setId(tChargingGun.getId()); |
| | | tChargingGun1.setStatus(7); |
| | | chargingGunService.updateById(tChargingGun1); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), 7); |
| | | } |
| | | }).start(); |
| | | if(site.getIsOpenSynchronization() == 1){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), 7); |
| | | } |
| | | }).start(); |
| | | } |
| | | |
| | | |
| | | //桩处于正常,桩所属的枪都处于非正常,修改桩状态为异常 |
| | | List<TChargingGun> list = chargingGunService.list(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getChargingPileId, chargingPile.getId()).eq(TChargingGun::getDelFlag, 0)); |
| | |
| | | order.setStatusList(Arrays.asList(1, 2, 3, 4, 5)); |
| | | List<TChargingOrder> orders = chargingOrderClient.getChargingOrder(order).getData(); |
| | | if(orders.size() > 0){ |
| | | Site site = siteService.getById(tChargingGun.getSiteId()); |
| | | TChargingOrder chargingOrder = orders.get(0); |
| | | TChargingGun tChargingGun1 = new TChargingGun(); |
| | | if(Arrays.asList(1, 2, 5).contains(chargingOrder.getStatus())){ |
| | |
| | | tChargingGun1.setId(tChargingGun.getId()); |
| | | chargingGunService.updateById(tChargingGun1); |
| | | } |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), 5); |
| | | } |
| | | }).start(); |
| | | if(site.getIsOpenSynchronization() == 1){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), 5); |
| | | } |
| | | }).start(); |
| | | } |
| | | |
| | | }else{ |
| | | Site site = siteService.getById(tChargingGun.getSiteId()); |
| | | TChargingGun tChargingGun1 = new TChargingGun(); |
| | | tChargingGun1.setId(tChargingGun.getId()); |
| | | tChargingGun1.setStatus(3); |
| | | chargingGunService.updateById(tChargingGun1); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), 3); |
| | | } |
| | | }).start(); |
| | | if(site.getIsOpenSynchronization() == 1){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), 3); |
| | | } |
| | | }).start(); |
| | | } |
| | | } |
| | | |
| | | List<TFaultMessage> list = faultMessageService.list(new LambdaQueryWrapper<TFaultMessage>().eq(TFaultMessage::getChargingGunId, tChargingGun.getId()) |
| | |
| | | user.setDelFlag("0"); |
| | | user.setRoleId(partner.getRoleId().longValue()); |
| | | user.setRoleType(2); |
| | | user.setPassWordUpdate(new Date()); |
| | | R<Long> r = sysUserClient.addSysUser(user); |
| | | if(200 != r.getCode()){ |
| | | throw new RuntimeException(r.getMsg()); |
| | |
| | | user.setRoleId(partner.getRoleId().longValue()); |
| | | user.setRoleType(2); |
| | | user.setObjectId(partner.getId()); |
| | | user.setPassWordUpdate(new Date()); |
| | | R r = sysUserClient.addSysUser(user); |
| | | if(200 != r.getCode()){ |
| | | throw new RuntimeException(r.getMsg()); |
| | |
| | | user.setAvatar(partner.getLogoUrl()); |
| | | user.setPassword(partner.getPassword()); |
| | | user.setRoleId(partner.getRoleId().longValue()); |
| | | user.setPassWordUpdate(new Date()); |
| | | R r = sysUserClient.updateSysUser(user); |
| | | if(200 != r.getCode()){ |
| | | throw new RuntimeException(r.getMsg()); |
| | |
| | | //修改登录账号的密码 |
| | | SysUser user = sysUserClient.queryUserByUserName(partner.getAccount()).getData(); |
| | | user.setPassword(partner.getPassword()); |
| | | user.setPassWordUpdate(new Date()); |
| | | sysUserClient.resetPassword(user); |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | integrationClient.setupBillingModel1(tChargingPile.getCode(), JSON.toJSONString(accountingStrategyDetails)); |
| | | } |
| | | |
| | | //推送三方平台 |
| | | tcecClient.notificationStationChange(Arrays.asList(id)); |
| | | if(1 == site.getIsOpenSynchronization()){ |
| | | //推送三方平台 |
| | | tcecClient.notificationStationChange(Arrays.asList(id)); |
| | | } |
| | | } |
| | | } |
| | |
| | | chargingGun1.setId(chargingGun.getId()); |
| | | chargingGun1.setStatus(1); |
| | | chargingGunService.updateById(chargingGun1); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), 1); |
| | | } |
| | | }).start(); |
| | | Site site = siteService.getById(chargingGun.getSiteId()); |
| | | if(1 == site.getIsOpenSynchronization()){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), 1); |
| | | } |
| | | }).start(); |
| | | } |
| | | |
| | | //桩处于正常,桩所属的枪都处于非正常,修改桩状态为异常 |
| | | TChargingPile chargingPile = this.getById(chargingGun.getChargingPileId()); |
| | |
| | | faultMessageService.save(faultMessage); |
| | | |
| | | // 发送故障短信 |
| | | Site site = siteService.getById(faultMessage.getSiteId()); |
| | | String siteName = site.getName(); |
| | | SendMessageDTO sendMessageDTO = new SendMessageDTO(); |
| | | sendMessageDTO.setPhone(site.getPhone()); |
| | |
| | | if(null == pageSize){ |
| | | pageSize = 10; |
| | | } |
| | | PageInfo<Site> siteListPaging = siteClient.getSiteListPaging(pageNo, pageSize, new ArrayList<>()); |
| | | PageInfo<Site> siteListPaging = siteClient.getSiteListPaging(pageNo, pageSize, new ArrayList<>(), 1); |
| | | List<TParkingLot> parkingLots = parkingLotClient.getAllParkingLot().getData(); |
| | | QueryStationsInfoResult queryStationsInfoResult = new QueryStationsInfoResult(); |
| | | queryStationsInfoResult.setPageNo(pageNo); |
| | |
| | | if(null == pageSize){ |
| | | pageSize = 50; |
| | | } |
| | | PageInfo<Site> siteListPaging = siteClient.getSiteListPaging(pageNo, pageSize, stationIDs); |
| | | PageInfo<Site> siteListPaging = siteClient.getSiteListPaging(pageNo, pageSize, stationIDs, -1); |
| | | List<TParkingLot> parkingLots = parkingLotClient.getAllParkingLot().getData(); |
| | | QueryStationsInfoResult queryStationsInfoResult = new QueryStationsInfoResult(); |
| | | queryStationsInfoResult.setPageNo(pageNo); |
| | |
| | | String key = "AQJC_" + chargingOrder.getChargingGunId(); |
| | | List<PlatformStartChargingReply> data = platformStartChargingReplyService.getPlatformStartChargingReply(code); |
| | | log.info(code + ":-------------------开始检查调起充电结果-------------------" + data.toString()); |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(chargingOrder.getSiteId())).getData().get(0); |
| | | if (data.size() != 0) { |
| | | PlatformStartChargingReply platformStartChargingReply = data.get(1); |
| | | Integer startup_result = platformStartChargingReply.getStartup_result(); |
| | |
| | | |
| | | redisService.setCacheObject(key, preChargeCheck1, 24L, TimeUnit.HOURS); |
| | | //推送三方平台订单状态 |
| | | if (2 == chargingOrder.getOrderSource()) { |
| | | if (2 == chargingOrder.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | } |
| | | return true; |
| | |
| | | this.updateById(order); |
| | | redisService.setCacheObject(key, preChargeCheck1, 24L, TimeUnit.HOURS); |
| | | //推送三方平台订单状态 |
| | | if (2 == chargingOrder.getOrderSource()) { |
| | | if (2 == chargingOrder.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | } |
| | | return true; |
| | |
| | | if (order.getStatus() != 2) { |
| | | return; |
| | | } |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(order.getSiteId())).getData().get(0); |
| | | String code = order.getCode(); |
| | | PreChargeCheck preChargeCheck1 = redisService.getCacheObject("AQJC_" + order.getChargingGunId()); |
| | | if (null != preChargeCheck1) { |
| | |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(order.getChargingGunId()).getData(); |
| | | chargingGun.setStatus(4); |
| | | chargingGunClient.updateChargingGunById(chargingGun); |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), 4); |
| | | if(1 == site.getIsOpenSynchronization()){ |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), 4); |
| | | } |
| | | } |
| | | redisService.setCacheObject("AQJC_" + order.getChargingGunId(), preChargeCheck1, 24L, TimeUnit.HOURS); |
| | | this.updateById(order); |
| | |
| | | result.setStartTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | Operator operator = operatorClient.getOperatorById(order.getOperatorId()).getData(); |
| | | result.setOperatorID(operator.getOperatorId()); |
| | | tcecClient.notificationStartChargeResult(result); |
| | | if(1 == site.getIsOpenSynchronization()){ |
| | | tcecClient.notificationStartChargeResult(result); |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | } |
| | | |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | log.info(code1 + ":-------------------远程停止充电请求-------------------"); |
| | | log.info(platformStopCharging.toString()); |
| | | }); |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(order.getSiteId())).getData().get(0); |
| | | //推送三方平台 |
| | | if (2 == order.getOrderSource()) { |
| | | if (2 == order.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | } |
| | | |
| | |
| | | redisService.setCacheObject("chargingOrderStatus:" + vo.getTransaction_serial_number(), 5, 100L, TimeUnit.SECONDS); |
| | | |
| | | chargingOrder = this.getById(chargingOrder.getId()); |
| | | |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(chargingOrder.getSiteId())).getData().get(0); |
| | | //推送三方平台 |
| | | if (2 == chargingOrder.getOrderSource()) { |
| | | if (2 == chargingOrder.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | TChargingOrder finalChargingOrder = chargingOrder; |
| | | new Thread(new Runnable() { |
| | | @Override |
| | |
| | | chargingGunClient.updateChargingGunById(chargingGun); |
| | | chargingGun = chargingGunClient.getChargingGunById(chargingOrder.getChargingGunId()).getData(); |
| | | //推送状态给三方平台 |
| | | if (2 == chargingOrder.getOrderSource()) { |
| | | if (2 == chargingOrder.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), 2); |
| | | } |
| | | |
| | |
| | | // scheduler.shutdown(); |
| | | // } |
| | | // }, 5, 1, TimeUnit.SECONDS); |
| | | |
| | | //推送三方平台订单状态 |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(chargingOrder.getSiteId())).getData().get(0); |
| | | if(1 == site.getIsOpenSynchronization()){ |
| | | //推送三方平台订单状态 |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | chargingOrder.setStatus(4); |
| | | chargingOrder.setEndMode(1); |
| | | this.updateById(chargingOrder); |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(chargingOrder.getSiteId())).getData().get(0); |
| | | if(1 == site.getIsOpenSynchronization()){ |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | } |
| | | |
| | | String code1 = order.getCode(); |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(order.getChargingGunId()).getData(); |
| | |
| | | chargingOrderService.updateById(order); |
| | | |
| | | order = chargingOrderService.getById(order.getId()); |
| | | |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(order.getSiteId())).getData().get(0); |
| | | //推送三方平台 |
| | | if (2 == order.getOrderSource()) { |
| | | if (2 == order.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | TChargingOrder finalChargingOrder = order; |
| | | new Thread(new Runnable() { |
| | | @Override |
| | |
| | | chargingGunClient.updateChargingGunById(chargingGun); |
| | | chargingGun = chargingGunClient.getChargingGunById(order.getChargingGunId()).getData(); |
| | | //推送状态给三方平台 |
| | | if (2 == order.getOrderSource()) { |
| | | if (2 == order.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), 2); |
| | | } |
| | | |