|
@@ -13,6 +13,7 @@ import com.management.platform.mapper.*;
|
|
|
import com.management.platform.service.*;
|
|
|
import com.management.platform.util.ExcelUtil;
|
|
|
import com.management.platform.util.HttpRespMsg;
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.poi.ss.usermodel.CellType;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFCell;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFRow;
|
|
@@ -553,12 +554,15 @@ public class SalesOrderServiceImpl extends ServiceImpl<SalesOrderMapper, SalesOr
|
|
|
List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getCompanyId, user.getCompanyId()));
|
|
|
// List<SalesOrderPayment> list = salesOrderPaymentService.list(new LambdaQueryWrapper<SalesOrderPayment>().eq(SalesOrderPayment::getOrderId, orderId));
|
|
|
List<SalesOrderPayment> list = salesOrderPaymentMapper.getUnDelPaymentListByOId(orderId);
|
|
|
- list.forEach(l->{
|
|
|
- Optional<User> first = userList.stream().filter(u -> u.getId().equals(l.getCreatorId())).findFirst();
|
|
|
- if(first.isPresent()){
|
|
|
- l.setCreatorName(first.get().getName());
|
|
|
- }
|
|
|
- });
|
|
|
+ if(CollectionUtils.isNotEmpty(list)){
|
|
|
+ list.forEach(l->{
|
|
|
+ Optional<User> first = userList.stream().filter(u -> u.getId().equals(l.getCreatorId())).findFirst();
|
|
|
+ if(first.isPresent()){
|
|
|
+ l.setCreatorName(first.get().getName());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ msg.setData(list);
|
|
|
return msg;
|
|
|
}
|
|
|
|