Commit 0bff0b48 authored by lanbaoming's avatar lanbaoming

Merge branch 'dev'

# Conflicts:
#	yudao-module-order/yudao-module-order-core/src/main/resources/mapper/order/OrderTimeMapper.xml
#	yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentLoadExcelExportListener2.java
parents c1ed5836 ed336ab3
......@@ -18,6 +18,7 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
......@@ -1140,13 +1141,18 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
@Override
public PageResult<CustomerDO> getMyCustomerPage(CustomerPageReqDTO pageReqVO, PageVO page) {
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<CustomerDO> list = customerMapper.getMyPage(start,size,pageReqVO);
long total = customerMapper.getMyPageCount(pageReqVO) ;
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
return new PageResult<>(list, total,
mpPage.getSize(), page.getPage(),
(total + mpPage.getSize() - 1) / mpPage.getSize());
}
@Override
......@@ -1207,6 +1213,10 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
......@@ -1215,7 +1225,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
deptId = loginUser.getDeptId() ;
}
List<CustomerDO> list = customerMapper.getDeptCustomerPageReq(start,size,pageReqVO,deptId);
List<CustomerDO> list =
customerMapper.getDeptCustomerPageReq(start,size,pageReqVO,deptId);
long total = customerMapper.getDeptCustomerPageReqCount(pageReqVO,deptId) ;
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
}
......@@ -1348,9 +1359,14 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
pageReqVO.setCustomerService(null) ;
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<CustomerDO> list = customerMapper.getWaitToAssignedCustomerPageReq(start,size,pageReqVO);
List<CustomerDO> list =
customerMapper.getWaitToAssignedCustomerPageReq(start,size,pageReqVO);
long total = customerMapper.getWaitToAssignedCustomerPageReqCount(pageReqVO) ;
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
}
......@@ -1467,9 +1483,14 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
pageReqVO.setIsInOpenSea(false) ;
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<CustomerDO> list = customerMapper.getWaitToConfirmCustomerPageReq(start,size,pageReqVO);
List<CustomerDO> list =
customerMapper.getWaitToConfirmCustomerPageReq(start,size,pageReqVO);
long total = customerMapper.getWaitToConfirmCustomerPageReqCount(pageReqVO) ;
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
}
......@@ -1598,9 +1619,14 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<CustomerDO> list = customerMapper.getOpenSeaCustomerPageReq(start,size,pageReqVO);
List<CustomerDO> list =
customerMapper.getOpenSeaCustomerPageReq(start,size,pageReqVO);
long total = customerMapper.getOpenSeaCustomerPageReqCount(pageReqVO) ;
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
}
......
......@@ -388,14 +388,19 @@ public class IndirectCustomerServiceImpl extends AbstractService<IndirectCustome
}
@Override
public PageResult<IndirectCustomerDO> getIndirectCustomerPageReq(IndirectCustomerPageReqDTO pageReqVO, PageVO page){
public PageResult<IndirectCustomerDO> getIndirectCustomerPageReq(
IndirectCustomerPageReqDTO pageReqVO, PageVO page){
IPage<IndirectCustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString());
int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows();
List<IndirectCustomerDO> list = indirectCustomerMapper.getIndirectCustomerPageReq(start,size,pageReqVO);
List<IndirectCustomerDO> list =
indirectCustomerMapper.getIndirectCustomerPageReq(start,size,pageReqVO);
long total = indirectCustomerMapper.getOpenSeaCustomerPageReqCount(pageReqVO) ;
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
return new PageResult<>(list, total, mpPage.getSize(),
page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
}
@Override
......
......@@ -152,10 +152,10 @@ public class CustomerController {
@ApiOperation("创建客户")
@Idempotent(timeout = 5)
// @PreAuthorize("@ss.hasAnyPermissions('ecw:customer:create','ecw:customer:my-create','ecw:customer: treat-create','ecw:customer:distribution-create','ecw:customer:dep-create')")
public CommonResult<Long> createCustomer(@Valid @RequestBody CustomerCreateReqVO createReqVO, HttpServletRequest request) {
public CommonResult<Long> createCustomer(
@Valid @RequestBody CustomerCreateReqVO createReqVO,
HttpServletRequest request) {
createReqVO.setCustomerOperateLogRemark("管理端页面新建客户");
return createCustomerPrivate(createReqVO);
}
......@@ -367,16 +367,17 @@ public class CustomerController {
@GetMapping("/get-wait-for-confirm")
@ApiOperation("获得待接收列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getWaitConfirmList(@Valid CustomerPageReqDTO customerPageReqVO,PageVO page) {
//@PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getWaitConfirmList(@Valid CustomerPageReqDTO customerPageReqVO, PageVO page) {
//lanbm 2024-05-26 添加注释
//customerPageReqVO.setCustomerService(WebFrameworkUtils.getLoginUserId());
List<Long> setCustomerService = new ArrayList<>();
setCustomerService.add(WebFrameworkUtils.getLoginUserId()) ;
customerPageReqVO.setCustomerService(setCustomerService) ;
setCustomerService.add(WebFrameworkUtils.getLoginUserId());
customerPageReqVO.setCustomerService(setCustomerService);
PageResult<CustomerDO> pageResult =
customerService.getWaitToConfirmCustomerPageReq(customerPageReqVO,page);
customerService.getWaitToConfirmCustomerPageReq(customerPageReqVO,
page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult));
}
......@@ -388,7 +389,7 @@ public class CustomerController {
@GetMapping("/get-potential")
@ApiOperation("获得潜在客户列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getPotentialList(@Valid CustomerPageReqDTO pageVO,PageVO page) {
public CommonResult<PageResult<CustomerRespVO>> getPotentialList(@Valid CustomerPageReqDTO pageVO, PageVO page) {
// 20230331 全部客户列表,当客户经理不是空时,排除公海客户
if (pageVO.getCustomerService() != null) {
......@@ -399,26 +400,27 @@ public class CustomerController {
pageVO.setIsPotential(true);
//PageResult<CustomerDO> pageResult = customerService.getCustomerPage(pageVO);
PageResult<CustomerDO> pageResult = customerService.getMyCustomerPage(pageVO,page);
PageResult<CustomerDO> pageResult = customerService.getMyCustomerPage(pageVO, page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/get-wait-for-distribution")
@ApiOperation("获得待分配客户列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getWaitForDistributionList(@Valid CustomerPageReqDTO customerPageReqVO,PageVO page) {
public CommonResult<PageResult<CustomerRespVO>> getWaitForDistributionList(@Valid CustomerPageReqDTO customerPageReqVO, PageVO page) {
//lanbm 2024-05-26 添加注释
PageResult<CustomerDO> pageResult =
customerService.getWaitToAssignedCustomerPageReq(customerPageReqVO,page);
customerService.getWaitToAssignedCustomerPageReq(customerPageReqVO, page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/get-public")
@ApiOperation("获得公海池客户列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getPublicCustomerList(@Valid CustomerPageReqDTO customerPageReqVO,PageVO page) {
public CommonResult<PageResult<CustomerRespVO>> getPublicCustomerList(@Valid CustomerPageReqDTO customerPageReqVO, PageVO page) {
PageResult<CustomerDO> pageResult = customerService.getOpenSeaCustomerPageReq(customerPageReqVO,page);
PageResult<CustomerDO> pageResult =
customerService.getOpenSeaCustomerPageReq(customerPageReqVO, page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult));
}
......@@ -506,19 +508,19 @@ public class CustomerController {
@GetMapping("/get-mine")
@ApiOperation("获得我的客户列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getMine(@Valid CustomerPageReqDTO customerPageReqVO, PageVO page ) {
public CommonResult<PageResult<CustomerRespVO>> getMine(@Valid CustomerPageReqDTO customerPageReqVO, PageVO page) {
//customerPageReqVO.setCustomerService(WebFrameworkUtils.getLoginUserId());
List<Long> setCustomerService = new ArrayList<>();
setCustomerService.add(WebFrameworkUtils.getLoginUserId()) ;
customerPageReqVO.setCustomerService(setCustomerService) ;
setCustomerService.add(WebFrameworkUtils.getLoginUserId());
customerPageReqVO.setCustomerService(setCustomerService);
//未被接收
customerPageReqVO.setIsCustomerServiceConfirmed(true);
// customerPageReqVO.setFlag4QueryCondition("Y");
PageResult<CustomerDO> pageResult = customerService.getMyCustomerPage(customerPageReqVO ,page);
PageResult<CustomerDO> pageResult = customerService.getMyCustomerPage(customerPageReqVO, page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult));
}
......@@ -590,22 +592,25 @@ public class CustomerController {
@GetMapping("/page")
@ApiOperation("获得客户分页")
@PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getCustomerPage(@Valid CustomerPageReqDTO pageVO,PageVO page) {
public CommonResult<PageResult<CustomerRespVO>> getCustomerPage(
@Valid CustomerPageReqDTO pageVO, PageVO page) {
// 20230331 全部客户列表,当客户经理不是空时,排除公海客户
if (pageVO.getCustomerService() != null) {
pageVO.setIsInOpenSea(false);
}
//PageResult<CustomerDO> pageResult = customerService.getCustomerPage(pageVO);
PageResult<CustomerDO> pageResult = customerService.getMyCustomerPage(pageVO,page);
PageResult<CustomerDO> pageResult =
customerService.getMyCustomerPage(pageVO, page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/deptPage")
@ApiOperation("获得部门客户")
@PreAuthorize("@ss.hasAnyPermissions('ecw:customer:query', 'ecw:customer:dep-query')")
public CommonResult<PageResult<CustomerRespVO>> getDeptCustomerPage(@Valid CustomerPageReqDTO pageVO,PageVO page) {
PageResult<CustomerDO> pageResult = customerService.getDeptCustomerPageReq(pageVO,page);
public CommonResult<PageResult<CustomerRespVO>> getDeptCustomerPage(
@Valid CustomerPageReqDTO pageVO, PageVO page) {
PageResult<CustomerDO> pageResult = customerService.getDeptCustomerPageReq(pageVO, page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult));
}
......@@ -620,7 +625,8 @@ public class CustomerController {
/**
* 支持多选
* @param exportReqVO
*
* @param exportReqVO
* @param downloadTypeEnum
* @param fileName
*/
......@@ -638,6 +644,7 @@ public class CustomerController {
/**
* 单选
*
* @param exportReqVO
* @param downloadTypeEnum
* @param fileName
......@@ -674,8 +681,8 @@ public class CustomerController {
exportReqVO.setIsCustomerServiceConfirmed(true);
// customerPageReqVO.setFlag4QueryCondition("Y");
List<Long> setCustomerService = new ArrayList<>();
setCustomerService.add(WebFrameworkUtils.getLoginUserId()) ;
exportReqVO.setCustomerService(setCustomerService) ;
setCustomerService.add(WebFrameworkUtils.getLoginUserId());
exportReqVO.setCustomerService(setCustomerService);
sendFileMake(exportReqVO, DownloadTypeEnum.CUSTOMER_MINE_EXCEL_EXPORT, "我的客户导出Excel");
return success(true);
......@@ -715,7 +722,7 @@ public class CustomerController {
@OperateLog(type = EXPORT)
public CommonResult<Boolean> exportPotentialCustomerExcel(@Valid CustomerExportReqDTO exportReqVO,
HttpServletResponse response) throws IOException {
if (CollectionUtil.isNotEmpty(exportReqVO.getCustomerService()) ) {
if (CollectionUtil.isNotEmpty(exportReqVO.getCustomerService())) {
exportReqVO.setIsInOpenSea(false);
}
//设置潜在客户标识
......
......@@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.customer.convert.customer.complaint.follow.CustomerFollowConvert;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.follow.CustomerFollowDO;
//import cn.iocoder.yudao.module.customer.dto.follow.CustomerFollowPageDTO;
import cn.iocoder.yudao.module.customer.service.customer.complaint.follow.CustomerFollowService;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowCreateReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowPageReqVO;
......@@ -80,6 +81,7 @@ public class CustomerFollowController {
return success(CustomerFollowConvert.INSTANCE.convertPage(pageResult));
}
//@GetMapping("/export-excel")
//@ApiOperation("导出客户跟进 Excel")
//// @PreAuthorize("@ss.hasPermission('ecw:customer-follow:export')")
......@@ -94,4 +96,6 @@ public class CustomerFollowController {
}
......@@ -113,7 +113,8 @@ public class IndirectCustomerController {
@ApiOperation("获得间接客户分页")
// @PreAuthorize("@ss.hasPermission('customer:indirect-customer:query')")
public CommonResult<PageResult<IndirectCustomerBackVO>> getIndirectCustomerPage(@Valid IndirectCustomerPageReqDTO pageVO, PageVO page) {
PageResult<IndirectCustomerDO> pageResult = indirectCustomerService.getIndirectCustomerPageReq(pageVO,page);
PageResult<IndirectCustomerDO> pageResult =
indirectCustomerService.getIndirectCustomerPageReq(pageVO,page);
return success(IndirectCustomerConvert.INSTANCE.convertPage(pageResult));
}
......
......@@ -735,8 +735,9 @@ public class OrderQueryServiceImpl implements OrderQueryService {
if (i.getTitleZh() != null && i.getTitleZh().equals("到仓")) {
//i.getBusinessTime();
long l = i.getOrderId();
long shpId = orderTimeMapper.getShipment_id(l);
Date d = orderTimeMapper.getUlboxtime(shpId);
//long shpId = orderTimeMapper.getShipment_id(l);
//在订单操作日志中获取卸柜时间 2024-06-14 update
Date d = orderTimeMapper.getUlboxtime(l);
if (d != null) i.setBusinessTime(d);
}
}
......
......@@ -8,8 +8,12 @@
</select>
<!--根据柜号获取卸柜时间 lanbm 2024-06-13 add-->
<select id="getUlboxtime" resultType="java.util.Date">
<!--
select ul_box_time from ecw_box_cabinet_unload
where shipment_id=#{shipmentId} limit 1
where shipment_id=#{shipmentId} limit 1-->
SELECT create_time from ecw_order_operate_log
where order_id=#{shipmentId} and msg='已卸柜'
ORDER BY create_time desc LIMIT 1
</select>
......
......@@ -419,13 +419,13 @@ public class ShipmentLoadExcelExportListener2 {
//用途
if (item.getUsageIds() == null || item.getUsageIds().length() == 0) {
// preloadDto.setUsageIds("");
//preloadDto.setUsageIds("");
} else {
//在缓存数据字典中获取用途信息
String sUserdName = DictFrameworkUtils.getDictDataFromCache(
"order_item_usage",
item.getUsageIds() + "").getLabel();
// preloadDto.setUsageIds(sUserdName);
//preloadDto.setUsageIds(sUserdName);
}
//商品特性赋值 lanbm 2024-06-05 add
......
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