|
|
|
@ -329,19 +329,20 @@ public class BuyerServiceImpl implements BuyerService { |
|
|
|
|
List<BuyerEntity> buyerEntities = buyerMapper.selectBuyerByBuyerEntity(buyerEntity, shList); |
|
|
|
|
log.info("{}根据销方税号和自编ID查询购方信息结果{}", LOGGER_MSG, JsonUtils.getInstance().toJsonString(buyerEntity)); |
|
|
|
|
|
|
|
|
|
if (buyerEntities != null && buyerEntities.size() > 0) { |
|
|
|
|
return buyerEntities.get(0); |
|
|
|
|
} else { |
|
|
|
|
List<String> shList1 = new ArrayList<>(); |
|
|
|
|
shList1.add("-1"); |
|
|
|
|
BuyerEntity buyerEntity1 = new BuyerEntity(); |
|
|
|
|
buyerEntity1.setBuyerCode(buyerCode); |
|
|
|
|
List<BuyerEntity> entities = buyerMapper.selectBuyerByBuyerEntity(buyerEntity1, shList1); |
|
|
|
|
if(entities != null && entities.size() > 0){ |
|
|
|
|
return entities.get(0); |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
return buyerEntities.stream().findFirst().orElse(buyerEntity); |
|
|
|
|
// if (buyerEntities != null && buyerEntities.size() > 0) {
|
|
|
|
|
// }
|
|
|
|
|
// else {
|
|
|
|
|
// List<String> shList1 = new ArrayList<>();
|
|
|
|
|
// shList1.add("-1");
|
|
|
|
|
// BuyerEntity buyerEntity1 = new BuyerEntity();
|
|
|
|
|
// buyerEntity1.setBuyerCode(buyerCode);
|
|
|
|
|
// List<BuyerEntity> entities = buyerMapper.selectBuyerByBuyerEntity(buyerEntity1, shList1);
|
|
|
|
|
// if(entities != null && entities.size() > 0){
|
|
|
|
|
// return entities.get(0);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// return null;
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|