feat(lastleg): connect appointment followups and fleet intake
This commit is contained in:
+10
@@ -24,6 +24,16 @@ public class FleetIncomingAdapter implements FleetBookingIncomingGateway {
|
||||
private final ObjectMapper json;
|
||||
public FleetIncomingAdapter(WarehouseTransferService service,WarehouseTransferOrderMapper orders,ObjectMapper json){this.service=service;this.orders=orders;this.json=json;}
|
||||
@Override @Transactional(propagation=Propagation.MANDATORY)
|
||||
public Map<Source,String> statuses(List<Source> sources) {
|
||||
if(sources.isEmpty())return Map.of();
|
||||
if(sources.size()>100)throw conflict("每次最多读取100条来货进度");
|
||||
var query=new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<com.baiyue.lastleg.transfer.entity.WarehouseTransferOrder>();
|
||||
query.and(q->{for(var source:sources)q.or(c->c.eq(com.baiyue.lastleg.transfer.entity.WarehouseTransferOrder::getCustomerId,source.customerId()).eq(com.baiyue.lastleg.transfer.entity.WarehouseTransferOrder::getTransferNo,source.incomingNo()));});
|
||||
var result=new HashMap<Source,String>();
|
||||
for(var row:orders.selectList(query))result.put(new Source(row.getCustomerId(),row.getTransferNo()),row.getStatus());
|
||||
return Map.copyOf(result);
|
||||
}
|
||||
@Override @Transactional(propagation=Propagation.MANDATORY)
|
||||
public Evidence create(String operator,Incoming input){
|
||||
boolean fba=input.cargo().destinationKey().startsWith("FBA:");
|
||||
String code=fba?input.cargo().destinationKey().substring(4):null;
|
||||
|
||||
Reference in New Issue
Block a user