同步代码
This commit is contained in:
parent
a2e9018143
commit
126953bd85
|
@ -51,6 +51,8 @@ public class LegRes {
|
||||||
legRes.setAmountTypeName(legExtensionField.getAmountTypeName());
|
legRes.setAmountTypeName(legExtensionField.getAmountTypeName());
|
||||||
legRes.setAmountTypeEnName(legExtensionField.getAmountTypeEnName());
|
legRes.setAmountTypeEnName(legExtensionField.getAmountTypeEnName());
|
||||||
}
|
}
|
||||||
|
legRes.setOriginLocation(LocationRes.copyFrom(leg.getOriginLocation()));
|
||||||
|
legRes.setDestinationLocation(LocationRes.copyFrom(leg.getDestinationLocation()));
|
||||||
return legRes;
|
return legRes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import com.chint.infrastructure.util.PageResult;
|
||||||
import com.chint.infrastructure.util.Result;
|
import com.chint.infrastructure.util.Result;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import static com.chint.infrastructure.constant.CommonMessageConstant.SUCCESS;
|
import static com.chint.infrastructure.constant.CommonMessageConstant.SUCCESS;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/order")
|
@RequestMapping("/order")
|
||||||
public class OrderOutController {
|
public class OrderOutController {
|
||||||
|
@ -37,7 +39,7 @@ public class OrderOutController {
|
||||||
public Result<RouteOrderRes> queryOrderByBillCodeAndSysCode(@RequestBody OrderQueryData queryData) {
|
public Result<RouteOrderRes> queryOrderByBillCodeAndSysCode(@RequestBody OrderQueryData queryData) {
|
||||||
RouteOrder routeOrder = orderQuery.queryByBillCodeAndSysCode(queryData.getBillcode(), queryData.getSysCode())
|
RouteOrder routeOrder = orderQuery.queryByBillCodeAndSysCode(queryData.getBillcode(), queryData.getSysCode())
|
||||||
.reloadStatus();
|
.reloadStatus();
|
||||||
return Result.Success(SUCCESS, orderQuery.queryRouteDetail(routeOrder));
|
return Result.Success(SUCCESS, orderQuery.queryRouteRes(routeOrder));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,7 +47,7 @@ public class OrderOutController {
|
||||||
@PostMapping("/query")
|
@PostMapping("/query")
|
||||||
public Result<RouteOrderRes> queryOrder(@RequestBody OrderQueryData queryData) {
|
public Result<RouteOrderRes> queryOrder(@RequestBody OrderQueryData queryData) {
|
||||||
RouteOrder routeOrder = orderQuery.queryById(queryData.getRouteId()).reloadStatus();
|
RouteOrder routeOrder = orderQuery.queryById(queryData.getRouteId()).reloadStatus();
|
||||||
RouteOrderRes routeOrderRes = orderQuery.queryRouteDetail(routeOrder);
|
RouteOrderRes routeOrderRes = orderQuery.queryRouteRes(routeOrder);
|
||||||
return Result.Success(SUCCESS, routeOrderRes);
|
return Result.Success(SUCCESS, routeOrderRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +82,7 @@ public class OrderOutController {
|
||||||
TripCallback tripCallback = orderQuery.queryTripCallbackData(queryData);
|
TripCallback tripCallback = orderQuery.queryTripCallbackData(queryData);
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
String json = gson.toJson(tripCallback);
|
String json = gson.toJson(tripCallback);
|
||||||
System.out.println(json);
|
log.info(json);
|
||||||
return Result.Success(SUCCESS, tripCallback);
|
return Result.Success(SUCCESS, tripCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -297,9 +297,11 @@ public class OrderQuery {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public RouteOrderRes queryRouteDetail(RouteOrder routeOrder){
|
public RouteOrderRes queryRouteRes(RouteOrder routeOrder){
|
||||||
RouteOrderRes routeOrderRes = RouteOrderRes.copyFrom(routeOrder);
|
RouteOrderRes routeOrderRes = RouteOrderRes.copyFrom(routeOrder);
|
||||||
List<LegRes> list = routeOrder.getLegItems().stream().map(LegRes::copyFrom).toList();
|
List<Leg> legItems = routeOrder.getLegItems();
|
||||||
|
orderDomainService.queryLocation(legItems);
|
||||||
|
List<LegRes> list = legItems.stream().map(LegRes::copyFrom).toList();
|
||||||
routeOrderRes.setLegResList(list);
|
routeOrderRes.setLegResList(list);
|
||||||
List<OrderDetailRes> orderDetailResList = routeOrder
|
List<OrderDetailRes> orderDetailResList = routeOrder
|
||||||
.getOrderDetails()
|
.getOrderDetails()
|
||||||
|
|
Loading…
Reference in New Issue