Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
walker-sheng 2021-01-19 10:37:07 +08:00
commit 25e16b83ea
6 changed files with 16 additions and 31 deletions

View File

@ -102,7 +102,7 @@ public class WechatPayService {
public static void main(String[] args) throws Exception {
OrderPay pay = new OrderPay();
pay.setOrderNo("2018081400001");
pay.setOrderNo("2018081400003");
pay.setDescription("标准1号线ATS现地工作站实操");
pay.setTotalFee(1);
pay.setTimeExpire(OffsetDateTime.now().plusMinutes(10));

View File

@ -1,25 +0,0 @@
package club.joylink.rtss.services.pay.wechat.controller;
import club.joylink.rtss.services.pay.wechat.WechatPayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/wechatpay")
@Slf4j
public class PayResultController {
@Autowired
private WechatPayService wechatPayService;
@RequestMapping(path="/receive", method= {RequestMethod.POST})
public String receive(@RequestBody String data) {
log.info("支付结果通知:" + data);
return this.wechatPayService.receive(data);
}
}

View File

@ -77,7 +77,8 @@ public class AtsRouteService {
String.format("信号机[%s(%s)]没有已锁闭进路,不能设置联锁自动进路", signal.getName(), signal.getCode()));
}
if (!lockedRoute.isFlt()) {
throw new SimulationException(SimulationExceptionType.Unsupported_Operation);
throw new SimulationException(SimulationExceptionType.Unsupported_Operation,
String.format("进路[%s]不能设置车队进路", lockedRoute.getCode()));
}
if (lockedRoute.isCiControl()) {
throw new SimulationException(SimulationExceptionType.Operation_Conflict,

View File

@ -1,5 +1,6 @@
package club.joylink.rtss.simulation.cbtc.ATS.service;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.simulation.cbtc.ATS.ATSMessageCollectAndDispatcher;
import club.joylink.rtss.simulation.cbtc.ATS.operation.Operation;
import club.joylink.rtss.simulation.cbtc.Simulation;
@ -285,6 +286,11 @@ public class AtsStationService {
} else {
deviceStation = station.getDeviceStation();
}
//确认控制权现在属于该成员
BusinessExceptionAssertEnum.INVALID_OPERATION.assertTrue((member.isDispatcher() && station.isCenterControl())
|| (member.isStationSupervisor() && station.isStandControl()),
String.format("车站[%s]所属设备集中站[%s]当前控制权不在成员[%s]手中", station.getCode(), deviceStation.getCode(), member.getId()));
SimulationDataRepository repository = simulation.getRepository();
Set<Station> stations = repository.getStationsByDeviceStations(deviceStation);
stations.forEach(Station::surrenderControl);

View File

@ -29,10 +29,10 @@ public class SectionService {
* @param section
*/
public void blockade(Section section) {
if(section.isRouteLock() || section.isOverlapLock()) {
log.info(String.format("区段[%s(%s)]进路锁闭,不能封锁", section.getName(), section.getCode()));
return;
}
// if(section.isRouteLock() || section.isOverlapLock()) {
// log.info(String.format("区段[%s(%s)]进路锁闭,不能封锁", section.getName(), section.getCode()));
// return;
// }
if(!section.isBlockade()) {
section.setBlockade(true);
if (!section.isCross() && !CollectionUtils.isEmpty(section.getLogicList())) {

View File

@ -52,6 +52,9 @@ public class MapSignalNewVO {
@NotBlank(message = "所属区段编码不能为空")
private String sectionCode;
@ApiModelProperty(value = "所属车站编码")
private String belongStationCode;
/**
* 所属车站 编号
*/