同步代码
This commit is contained in:
parent
803efc7790
commit
355c61e32a
|
@ -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;
|
||||
|
||||
|
@ -105,7 +108,7 @@ public class OrderQuery {
|
|||
}
|
||||
|
||||
//根据出差说明进行模糊匹配查询
|
||||
if(queryData.getInstructions() != null){
|
||||
if (queryData.getInstructions() != null) {
|
||||
Page<RouteOrder> byInstructions = routeRepository.findByInstructions(queryData);
|
||||
List<RouteOrder> content = byInstructions.getContent();
|
||||
content.forEach(RouteOrder::reloadStatus);
|
||||
|
@ -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());
|
||||
|
@ -252,7 +257,7 @@ public class OrderQuery {
|
|||
.endDate(simpleFormatter.format(leg.getEndTime()))
|
||||
.systemStatus(FSSCConstant.TRIP_CALLBACK_RECEIPT_STATUS)
|
||||
.parentScheduleNum(leg.getLegNo())
|
||||
.amount(leg.queryEstimateAmount(estimateAdapter,SUPPLIER_C_TRIP).getEstimateAmount())
|
||||
.amount(leg.queryEstimateAmount(estimateAdapter, SUPPLIER_C_TRIP).getEstimateAmount())
|
||||
.reserveCount("1")
|
||||
.quoteGroupNum("0")
|
||||
.extStatus(0)
|
||||
|
|
Loading…
Reference in New Issue