BPM接口调整

This commit is contained in:
dengwc 2024-03-15 18:02:22 +08:00
parent 633aa82fef
commit 838860bfde
1 changed files with 21 additions and 0 deletions

View File

@ -26,6 +26,7 @@ import com.chint.infrastructure.util.BaseContext;
import com.chint.interfaces.rest.bpm.BPMRequest;
import com.chint.interfaces.rest.bpm.dto.JTH3ChangeDto;
import com.chint.interfaces.rest.bpm.dto.XNChangeDto;
import com.chint.interfaces.rest.bpm.dto.ZWChangeDto;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -42,6 +43,8 @@ import static com.chint.infrastructure.constant.CommonMessageConstant.LEG_CHANGE
import static com.chint.infrastructure.constant.DataMessageConstant.DATA_NOT_FOUND;
import static com.chint.infrastructure.constant.DataMessageConstant.ORDER_STATUS_ERROR;
import static com.chint.infrastructure.constant.LegConstant.*;
import static com.chint.infrastructure.constant.RankConstant.ZTZW_COMPANY_CODE;
import static com.chint.infrastructure.constant.RankConstant.ZTZW_COMPANY_NAME;
import static com.chint.infrastructure.constant.RouteConstant.ORDER_STATUS_PREPARE;
import static com.chint.infrastructure.constant.UtilConstant.RESULT_ORDER_DETAIL;
@ -302,6 +305,24 @@ public class LegEventHandler implements LegEventService {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String userId = routeOrder.getUserId();
String accountCompany = routeOrder.getApproveOrderNo().getAccountCompany();
//智维
if (ZTZW_COMPANY_CODE.equals(accountCompany) || ZTZW_COMPANY_NAME.equals(accountCompany)) {
ZWChangeDto zwChangeDto = new ZWChangeDto();
if (leg.getChangeReason() != null) {
zwChangeDto.setStartTime(routeOrder.getStartTime().format(formatter));
zwChangeDto.setEndTime(routeOrder.getEndTime().format(formatter));
zwChangeDto.setReason(routeOrder.getApproveOrderNo().getInstructions());
}
if (changeType.equals(0)) {
zwChangeDto.addLegNewTrip(leg);
} else {
zwChangeDto.addLegOldTrip(command.getOldLeg());
zwChangeDto.addLegChangeTrip(leg);
}
bpmRequest.change(zwChangeDto, sysCode, userId, accountCompany);
return;
}
switch (bpmCode) {
case H3_BPM -> {
JTH3ChangeDto jth3ChangeDto = new JTH3ChangeDto();