变更添加出差时间

This commit is contained in:
dengwc 2024-03-14 22:40:03 +08:00
parent 426016cf13
commit 46189c0d5f
2 changed files with 5 additions and 6 deletions

View File

@ -141,7 +141,6 @@ public class OrderApplicationService {
leg.setDestinationId(legData.getOriginId());
}
//如果是用车和其他类型需要保存扩展字段
if ((leg.getLegType().equals(LEG_TYPE_OTHER) || leg.getLegType().equals(LEG_TYPE_TAXI)) && legData.getLegExtensionFieldData() != null) {
LegExtensionFieldData legExtensionFieldData = legData.getLegExtensionFieldData();
@ -156,20 +155,15 @@ public class OrderApplicationService {
}
}
orderDomainService.queryLocation(List.of(oldLeg, leg));
//保存变更事件理由
leg = legDomainService.addChangeEvent(leg, legData.getChangeReason());
//推送未同步事件
leg = legDomainService.addApproveEvent(leg);
legRepository.save(leg).reloadStatus();
//发送bpm保存结果
Command.of(BPMLegChangeCommand.class)
.routeId(addLegData.getRouteId())

View File

@ -298,10 +298,13 @@ public class LegEventHandler implements LegEventService {
String sysCode = routeOrder.getApproveOrderNo().getSysCode();
SystemCode bySysCode = systemCodeRepository.findBySysCode(sysCode);
String bpmCode = bySysCode.getBpmCode();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
switch (bpmCode) {
case H3_BPM -> {
JTH3ChangeDto jth3ChangeDto = new JTH3ChangeDto();
if (leg.getChangeReason() != null) {
jth3ChangeDto.setStartTime(routeOrder.getStartTime().format(formatter));
jth3ChangeDto.setEndTime(routeOrder.getEndTime().format(formatter));
jth3ChangeDto.setReason(leg.getChangeReason());
}
if (changeType.equals(0)) {
@ -315,6 +318,8 @@ public class LegEventHandler implements LegEventService {
case XNYS_BPM -> {
XNChangeDto xnChangeDto = new XNChangeDto();
if (leg.getChangeReason() != null) {
xnChangeDto.setStartTime(routeOrder.getStartTime().format(formatter));
xnChangeDto.setEndTime(routeOrder.getEndTime().format(formatter));
xnChangeDto.setReason(leg.getChangeReason());
}
if (changeType.equals(0)) {