同步代码

This commit is contained in:
lulz1 2024-02-27 16:14:33 +08:00
parent 803efc7790
commit 355c61e32a
1 changed files with 11 additions and 6 deletions

View File

@ -20,6 +20,7 @@ import com.chint.infrastructure.constant.FSSCConstant;
import com.chint.infrastructure.constant.LegConstant;
import com.chint.infrastructure.util.BaseContext;
import com.chint.infrastructure.util.PageResult;
import com.chint.interfaces.rest.user.UserHttpRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
@ -32,7 +33,6 @@ import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.chint.infrastructure.constant.SupplierNameConstant.SUPPLIER_C_TRIP;
import static com.chint.infrastructure.constant.SupplierNameConstant.SUPPLIER_L_Y;
@Service
public class OrderQuery {
@ -52,6 +52,9 @@ public class OrderQuery {
@Autowired
private UserRepository userRepository;
@Autowired
private UserHttpRequest userHttpRequest;
@Autowired
private EstimateAdapter estimateAdapter;
@ -118,7 +121,6 @@ public class OrderQuery {
}
//执行普通分页查询
PageResult<RouteOrder> routeOrderPageResult = routeRepository.pageQuery(queryData);
routeOrderPageResult.getRecords().forEach(order -> {
@ -169,7 +171,7 @@ public class OrderQuery {
}
public TripCallback queryTripCallbackData(OrderQueryData queryData) {
User currentUser = BaseContext.getCurrentUser();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
DateTimeFormatter simpleFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
// RouteOrder routeOrder = routeRepository.findByFakeOrderNoAndSysCode(queryData.getBillcode(), queryData.getSysCode())
@ -177,10 +179,13 @@ public class OrderQuery {
RouteOrder routeOrder = routeRepository.queryById(queryData.getRouteId())
.reloadStatus();
List<Location> locationList = new ArrayList<>();
User currentUser = userHttpRequest.loadUserInfo(
userRepository.findByUserEmployeeNo(routeOrder.getUserId())
);
List<Leg> legItems =
orderDomainService.queryLocation(routeOrder.getLegItems());
legItems.forEach(leg -> {
if (!locationList.contains(leg.getOriginLocation())) {
locationList.add(leg.getOriginLocation());