Commit 4241dcb3 authored by Smile's avatar Smile Committed by wux

bug312 APP/WEB控货订单下载提单添加限制条件

parent d83b5f57
...@@ -3888,17 +3888,13 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -3888,17 +3888,13 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return success(false); return success(false);
} }
// 判断发货人是否是当前登录人 // 判断发货人是否是当前登录人
Long customerId = dto.getConsignorVO().getCustomerId(); Long customerContactsId = dto.getConsignorVO().getCustomerContactsId();
String phone = dto.getConsignorVO().getPhone(); CustomerContactsDO customerContactsDO = customerContactsService.getById(customerContactsId);
List<CustomerContactsDO> consignorCustomerList = customerContactsService.getCustomerContactsListByCustomerId(customerId); if (Objects.equals(customerContactsDO.getUserid(),user.getId())){
CustomerContactsDO customerContactsDO = consignorCustomerList.stream().filter(val -> Objects.equals(val.getPhoneNew(), phone)).findFirst().orElse(null);
if (Objects.equals(customerContactsDO.getPhoneNew(),user.getMobile())){
return success(true); return success(true);
} }
Long customerId1 = dto.getConsigneeVO().getCustomerId(); Long customerContactsId1 = dto.getConsigneeVO().getCustomerContactsId();
String phone1 = dto.getConsigneeVO().getPhone(); CustomerContactsDO customerContactsDO1 = customerContactsService.getById(customerContactsId1);
List<CustomerContactsDO> consigneeCustomerList = customerContactsService.getCustomerContactsListByCustomerId(customerId1);
CustomerContactsDO customerContactsDO1 = consigneeCustomerList.stream().filter(val -> Objects.equals(val.getPhoneNew(), phone1)).findFirst().orElse(null);
List<OrderControlLogDO> orderControlLogListByOrderIdList = orderControlLogService.getOrderControlLogListByOrderId(orderId, null); List<OrderControlLogDO> orderControlLogListByOrderIdList = orderControlLogService.getOrderControlLogListByOrderId(orderId, null);
boolean isFirstAllAllow = false; boolean isFirstAllAllow = false;
int count = 0; // 新增计数器 int count = 0; // 新增计数器
...@@ -3914,7 +3910,7 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -3914,7 +3910,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
} }
} }
isFirstAllAllow = (count == 1); // 最终判断是否严格等于1 isFirstAllAllow = (count == 1); // 最终判断是否严格等于1
if (dto.getSumNum()==dto.getReleaseNum()&&dto.getCargoControlStatus()==1&&isFirstAllAllow&& msg.contains(String.valueOf(customerContactsDO1.getPhoneNew())) && customerContactsDO1.getPhoneNew().equals(user.getMobile())){ if (dto.getSumNum()==dto.getReleaseNum()&&dto.getCargoControlStatus()==1&&isFirstAllAllow&& msg.contains(String.valueOf(customerContactsDO1.getPhoneNew())) && customerContactsDO1.getUserid().equals(user.getId())){
return success(true); return success(true);
} }
return success(false); return success(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment