Commit 11d33ceb authored by yanghao's avatar yanghao

task: #970 客户列表新增最新发货时间

parent d7a59e26
......@@ -251,4 +251,14 @@ public class CustomerRespVO extends CustomerBaseVO {
// offerId
@ApiModelProperty(value = "报价单ID")
private Long offerId;
// 最近发货订单的发货时间
@ApiModelProperty(value = "最近发货订单的发货时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date lastLoadOrderLoadTime;
// 最近发货订单id
@ApiModelProperty(value = "最近发货订单id")
private Long lastLoadOrderId;
}
......@@ -53,6 +53,8 @@ import cn.iocoder.yudao.module.ecw.service.internalMessage.InternalMessageServic
import cn.iocoder.yudao.module.ecw.service.paramValid.ParamValidatorService;
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
import cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.dal.mysql.order.OrderMapper;
import cn.iocoder.yudao.module.sale.dal.dataobject.offer.OfferDO;
import cn.iocoder.yudao.module.sale.dal.mysql.offer.OfferMapper;
import cn.iocoder.yudao.module.system.api.file.FileMakeApi;
......@@ -149,6 +151,10 @@ public class CustomerController {
OfferMapper offerMapper;
@Resource
OrderMapper orderMapper;
public CustomerController() {
}
......@@ -525,6 +531,7 @@ public class CustomerController {
// 设置报价单号和报价id
setCustomerLastOffer(respVO);
setCustomerLastLoadOrder(respVO);
}
}
return success(respVOPageResult);
......@@ -564,6 +571,7 @@ public class CustomerController {
// 设置报价单号和报价id
setCustomerLastOffer(respVO);
setCustomerLastLoadOrder(respVO);
}
}
return success(respVOPageResult);
......@@ -589,6 +597,7 @@ public class CustomerController {
// 设置报价单号和报价id
setCustomerLastOffer(respVO);
setCustomerLastLoadOrder(respVO);
}
}
return success(respVOPageResult);
......@@ -614,6 +623,7 @@ public class CustomerController {
// 设置报价单号和报价id
setCustomerLastOffer(respVO);
setCustomerLastLoadOrder(respVO);
}
}
return success(respVOPageResult);
......@@ -730,6 +740,7 @@ public class CustomerController {
// 设置报价单号和报价id
setCustomerLastOffer(respVO);
setCustomerLastLoadOrder(respVO);
}
}
return success(respVOPageResult);
......@@ -823,6 +834,7 @@ public class CustomerController {
}
setCustomerLastOffer(respVO);
setCustomerLastLoadOrder(respVO);
}
}
return success(respVOPageResult);
......@@ -838,6 +850,17 @@ public class CustomerController {
}
}
private void setCustomerLastLoadOrder(CustomerRespVO respVO) {
// 设置最新的发货单号和发货单id
OrderDO lastLoadOrder = orderMapper.selectOne(new LambdaQueryWrapper<OrderDO>().eq(OrderDO::getCustomerId, respVO.getId())
.isNotNull(OrderDO::getLoadTime)
.orderByDesc(OrderDO::getLoadTime).last("limit 1"));
if (lastLoadOrder != null) {
respVO.setLastLoadOrderId(lastLoadOrder.getOrderId());
respVO.setLastLoadOrderLoadTime(lastLoadOrder.getLoadTime());
}
}
@GetMapping("/deptPage")
@ApiOperation("获得部门客户")
@PreAuthorize("@ss.hasAnyPermissions('ecw:customer:query', 'ecw:customer:dep-query')")
......
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