Commit ed336ab3 authored by lanbaoming's avatar lanbaoming

2024-06-14-7提交发布

parent 9af9da00
...@@ -18,6 +18,7 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException; ...@@ -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.exception.util.ServiceExceptionUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.date.DateUtils; 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.dto.DictDataRespDTO;
import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils; import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
import cn.iocoder.yudao.framework.i18n.core.I18nMessage; import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
...@@ -1140,13 +1141,18 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1140,13 +1141,18 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
@Override @Override
public PageResult<CustomerDO> getMyCustomerPage(CustomerPageReqDTO pageReqVO, PageVO page) { public PageResult<CustomerDO> getMyCustomerPage(CustomerPageReqDTO pageReqVO, PageVO page) {
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page); IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString()); log.warn(I18nMessage.getLang().toString());
int start = (page.getPage() - 1) * page.getRows(); int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows(); int size = page.getRows();
List<CustomerDO> list = customerMapper.getMyPage(start,size,pageReqVO); List<CustomerDO> list = customerMapper.getMyPage(start,size,pageReqVO);
long total = customerMapper.getMyPageCount(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 @Override
...@@ -1207,6 +1213,10 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1207,6 +1213,10 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page); IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString()); log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
int start = (page.getPage() - 1) * page.getRows(); int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows(); int size = page.getRows();
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
...@@ -1215,7 +1225,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1215,7 +1225,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
deptId = loginUser.getDeptId() ; 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) ; long total = customerMapper.getDeptCustomerPageReqCount(pageReqVO,deptId) ;
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());
} }
...@@ -1348,9 +1359,14 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1348,9 +1359,14 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
pageReqVO.setCustomerService(null) ; pageReqVO.setCustomerService(null) ;
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page); IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString()); log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
int start = (page.getPage() - 1) * page.getRows(); int start = (page.getPage() - 1) * page.getRows();
int size = 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) ; long total = customerMapper.getWaitToAssignedCustomerPageReqCount(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());
} }
...@@ -1467,9 +1483,14 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1467,9 +1483,14 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
pageReqVO.setIsInOpenSea(false) ; pageReqVO.setIsInOpenSea(false) ;
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page); IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString()); log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
int start = (page.getPage() - 1) * page.getRows(); int start = (page.getPage() - 1) * page.getRows();
int size = 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) ; long total = customerMapper.getWaitToConfirmCustomerPageReqCount(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());
} }
...@@ -1598,9 +1619,14 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1598,9 +1619,14 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page); IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString()); log.warn(I18nMessage.getLang().toString());
page.setPage(pageReqVO.getPageNo());
page.setRows(pageReqVO.getPageSize());
int start = (page.getPage() - 1) * page.getRows(); int start = (page.getPage() - 1) * page.getRows();
int size = 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) ; long total = customerMapper.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());
} }
......
...@@ -388,14 +388,19 @@ public class IndirectCustomerServiceImpl extends AbstractService<IndirectCustome ...@@ -388,14 +388,19 @@ public class IndirectCustomerServiceImpl extends AbstractService<IndirectCustome
} }
@Override @Override
public PageResult<IndirectCustomerDO> getIndirectCustomerPageReq(IndirectCustomerPageReqDTO pageReqVO, PageVO page){ public PageResult<IndirectCustomerDO> getIndirectCustomerPageReq(
IndirectCustomerPageReqDTO pageReqVO, PageVO page){
IPage<IndirectCustomerDO> mpPage = MyBatisUtils.buildPage(page); IPage<IndirectCustomerDO> mpPage = MyBatisUtils.buildPage(page);
log.warn(I18nMessage.getLang().toString()); log.warn(I18nMessage.getLang().toString());
int start = (page.getPage() - 1) * page.getRows(); int start = (page.getPage() - 1) * page.getRows();
int size = 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) ; 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 @Override
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.customer.dal.mysql.customer.CustomerMapper"> <mapper namespace="cn.iocoder.yudao.module.customer.dal.mysql.customer.CustomerMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
<sql id="queryTable"> <sql id="queryTable">
select contact.*, select contact.*,
level.name_zh as vip_level_name_zh, level.name_zh as vip_level_name_zh,
...@@ -15,10 +8,13 @@ ...@@ -15,10 +8,13 @@
credit.name_zh as credit_level_name_zh, credit.name_zh as credit_level_name_zh,
credit.name_en as credit_level_name_en, credit.name_en as credit_level_name_en,
ec.name_zh as country_name, ec.name_zh as country_name,
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s
where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!--concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -71,7 +67,9 @@ ...@@ -71,7 +67,9 @@
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!-- concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -110,7 +108,9 @@ ...@@ -110,7 +108,9 @@
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!--concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -149,7 +149,9 @@ ...@@ -149,7 +149,9 @@
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!--concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -402,10 +404,13 @@ ...@@ -402,10 +404,13 @@
credit.name_zh as credit_level_name_zh, credit.name_zh as credit_level_name_zh,
credit.name_en as credit_level_name_en, credit.name_en as credit_level_name_en,
ec.name_zh as country_name, ec.name_zh as country_name,
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s
where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!-- concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -435,7 +440,9 @@ ...@@ -435,7 +440,9 @@
select count(1) select count(1)
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!--concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -663,7 +670,9 @@ ...@@ -663,7 +670,9 @@
credit.name_en as credit_level_name_en credit.name_en as credit_level_name_en
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!-- concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.social as default_social, c.social as default_social,
c.email as default_email, c.email as default_email,
c.social_number as default_social_number c.social_number as default_social_number
...@@ -1369,7 +1378,9 @@ ...@@ -1369,7 +1378,9 @@
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!--concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -1401,7 +1412,9 @@ ...@@ -1401,7 +1412,9 @@
select count(1) select count(1)
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!-- concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -1437,7 +1450,9 @@ ...@@ -1437,7 +1450,9 @@
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!--concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -1472,7 +1487,9 @@ ...@@ -1472,7 +1487,9 @@
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!-- concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -1505,7 +1522,9 @@ ...@@ -1505,7 +1522,9 @@
select count(1) select count(1)
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!-- concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -1539,7 +1558,9 @@ ...@@ -1539,7 +1558,9 @@
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!-- concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -1573,7 +1594,9 @@ ...@@ -1573,7 +1594,9 @@
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!-- concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -1608,7 +1631,9 @@ ...@@ -1608,7 +1631,9 @@
select count(1) select count(1)
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!--concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
...@@ -1644,7 +1669,9 @@ ...@@ -1644,7 +1669,9 @@
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone (select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*, from (select a.*,
c.name as default_contact_name, c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone, <!--concat(c.area_code, c.phone_new, '') as default_contact_phone,-->
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone,
c.phone_new as contactPhone, c.phone_new as contactPhone,
c.id as defaultContactId, c.id as defaultContactId,
c.social as default_social, c.social as default_social,
......
...@@ -152,10 +152,10 @@ public class CustomerController { ...@@ -152,10 +152,10 @@ public class CustomerController {
@ApiOperation("创建客户") @ApiOperation("创建客户")
@Idempotent(timeout = 5) @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')") // @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("管理端页面新建客户"); createReqVO.setCustomerOperateLogRemark("管理端页面新建客户");
return createCustomerPrivate(createReqVO); return createCustomerPrivate(createReqVO);
} }
...@@ -367,16 +367,17 @@ public class CustomerController { ...@@ -367,16 +367,17 @@ public class CustomerController {
@GetMapping("/get-wait-for-confirm") @GetMapping("/get-wait-for-confirm")
@ApiOperation("获得待接收列表") @ApiOperation("获得待接收列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')") //@PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getWaitConfirmList(@Valid CustomerPageReqDTO customerPageReqVO,PageVO page) { public CommonResult<PageResult<CustomerRespVO>> getWaitConfirmList(@Valid CustomerPageReqDTO customerPageReqVO, PageVO page) {
//lanbm 2024-05-26 添加注释 //lanbm 2024-05-26 添加注释
//customerPageReqVO.setCustomerService(WebFrameworkUtils.getLoginUserId()); //customerPageReqVO.setCustomerService(WebFrameworkUtils.getLoginUserId());
List<Long> setCustomerService = new ArrayList<>(); List<Long> setCustomerService = new ArrayList<>();
setCustomerService.add(WebFrameworkUtils.getLoginUserId()) ; setCustomerService.add(WebFrameworkUtils.getLoginUserId());
customerPageReqVO.setCustomerService(setCustomerService) ; customerPageReqVO.setCustomerService(setCustomerService);
PageResult<CustomerDO> pageResult = PageResult<CustomerDO> pageResult =
customerService.getWaitToConfirmCustomerPageReq(customerPageReqVO,page); customerService.getWaitToConfirmCustomerPageReq(customerPageReqVO,
page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult)); return success(CustomerConvert.INSTANCE.convertPage(pageResult));
} }
...@@ -388,7 +389,7 @@ public class CustomerController { ...@@ -388,7 +389,7 @@ public class CustomerController {
@GetMapping("/get-potential") @GetMapping("/get-potential")
@ApiOperation("获得潜在客户列表") @ApiOperation("获得潜在客户列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')") // @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 全部客户列表,当客户经理不是空时,排除公海客户 // 20230331 全部客户列表,当客户经理不是空时,排除公海客户
if (pageVO.getCustomerService() != null) { if (pageVO.getCustomerService() != null) {
...@@ -399,26 +400,27 @@ public class CustomerController { ...@@ -399,26 +400,27 @@ public class CustomerController {
pageVO.setIsPotential(true); pageVO.setIsPotential(true);
//PageResult<CustomerDO> pageResult = customerService.getCustomerPage(pageVO); //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)); return success(CustomerConvert.INSTANCE.convertPage(pageResult));
} }
@GetMapping("/get-wait-for-distribution") @GetMapping("/get-wait-for-distribution")
@ApiOperation("获得待分配客户列表") @ApiOperation("获得待分配客户列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')") // @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 添加注释 //lanbm 2024-05-26 添加注释
PageResult<CustomerDO> pageResult = PageResult<CustomerDO> pageResult =
customerService.getWaitToAssignedCustomerPageReq(customerPageReqVO,page); customerService.getWaitToAssignedCustomerPageReq(customerPageReqVO, page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult)); return success(CustomerConvert.INSTANCE.convertPage(pageResult));
} }
@GetMapping("/get-public") @GetMapping("/get-public")
@ApiOperation("获得公海池客户列表") @ApiOperation("获得公海池客户列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')") // @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)); return success(CustomerConvert.INSTANCE.convertPage(pageResult));
} }
...@@ -506,19 +508,19 @@ public class CustomerController { ...@@ -506,19 +508,19 @@ public class CustomerController {
@GetMapping("/get-mine") @GetMapping("/get-mine")
@ApiOperation("获得我的客户列表") @ApiOperation("获得我的客户列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')") // @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()); //customerPageReqVO.setCustomerService(WebFrameworkUtils.getLoginUserId());
List<Long> setCustomerService = new ArrayList<>(); List<Long> setCustomerService = new ArrayList<>();
setCustomerService.add(WebFrameworkUtils.getLoginUserId()) ; setCustomerService.add(WebFrameworkUtils.getLoginUserId());
customerPageReqVO.setCustomerService(setCustomerService) ; customerPageReqVO.setCustomerService(setCustomerService);
//未被接收 //未被接收
customerPageReqVO.setIsCustomerServiceConfirmed(true); customerPageReqVO.setIsCustomerServiceConfirmed(true);
// customerPageReqVO.setFlag4QueryCondition("Y"); // customerPageReqVO.setFlag4QueryCondition("Y");
PageResult<CustomerDO> pageResult = customerService.getMyCustomerPage(customerPageReqVO ,page); PageResult<CustomerDO> pageResult = customerService.getMyCustomerPage(customerPageReqVO, page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult)); return success(CustomerConvert.INSTANCE.convertPage(pageResult));
} }
...@@ -590,22 +592,25 @@ public class CustomerController { ...@@ -590,22 +592,25 @@ public class CustomerController {
@GetMapping("/page") @GetMapping("/page")
@ApiOperation("获得客户分页") @ApiOperation("获得客户分页")
@PreAuthorize("@ss.hasPermission('ecw:customer:query')") @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 全部客户列表,当客户经理不是空时,排除公海客户 // 20230331 全部客户列表,当客户经理不是空时,排除公海客户
if (pageVO.getCustomerService() != null) { if (pageVO.getCustomerService() != null) {
pageVO.setIsInOpenSea(false); pageVO.setIsInOpenSea(false);
} }
//PageResult<CustomerDO> pageResult = customerService.getCustomerPage(pageVO); //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)); return success(CustomerConvert.INSTANCE.convertPage(pageResult));
} }
@GetMapping("/deptPage") @GetMapping("/deptPage")
@ApiOperation("获得部门客户") @ApiOperation("获得部门客户")
@PreAuthorize("@ss.hasAnyPermissions('ecw:customer:query', 'ecw:customer:dep-query')") @PreAuthorize("@ss.hasAnyPermissions('ecw:customer:query', 'ecw:customer:dep-query')")
public CommonResult<PageResult<CustomerRespVO>> getDeptCustomerPage(@Valid CustomerPageReqDTO pageVO,PageVO page) { public CommonResult<PageResult<CustomerRespVO>> getDeptCustomerPage(
PageResult<CustomerDO> pageResult = customerService.getDeptCustomerPageReq(pageVO,page); @Valid CustomerPageReqDTO pageVO, PageVO page) {
PageResult<CustomerDO> pageResult = customerService.getDeptCustomerPageReq(pageVO, page);
return success(CustomerConvert.INSTANCE.convertPage(pageResult)); return success(CustomerConvert.INSTANCE.convertPage(pageResult));
} }
...@@ -620,6 +625,7 @@ public class CustomerController { ...@@ -620,6 +625,7 @@ public class CustomerController {
/** /**
* 支持多选 * 支持多选
*
* @param exportReqVO * @param exportReqVO
* @param downloadTypeEnum * @param downloadTypeEnum
* @param fileName * @param fileName
...@@ -638,6 +644,7 @@ public class CustomerController { ...@@ -638,6 +644,7 @@ public class CustomerController {
/** /**
* 单选 * 单选
*
* @param exportReqVO * @param exportReqVO
* @param downloadTypeEnum * @param downloadTypeEnum
* @param fileName * @param fileName
...@@ -674,8 +681,8 @@ public class CustomerController { ...@@ -674,8 +681,8 @@ public class CustomerController {
exportReqVO.setIsCustomerServiceConfirmed(true); exportReqVO.setIsCustomerServiceConfirmed(true);
// customerPageReqVO.setFlag4QueryCondition("Y"); // customerPageReqVO.setFlag4QueryCondition("Y");
List<Long> setCustomerService = new ArrayList<>(); List<Long> setCustomerService = new ArrayList<>();
setCustomerService.add(WebFrameworkUtils.getLoginUserId()) ; setCustomerService.add(WebFrameworkUtils.getLoginUserId());
exportReqVO.setCustomerService(setCustomerService) ; exportReqVO.setCustomerService(setCustomerService);
sendFileMake(exportReqVO, DownloadTypeEnum.CUSTOMER_MINE_EXCEL_EXPORT, "我的客户导出Excel"); sendFileMake(exportReqVO, DownloadTypeEnum.CUSTOMER_MINE_EXCEL_EXPORT, "我的客户导出Excel");
return success(true); return success(true);
...@@ -715,7 +722,7 @@ public class CustomerController { ...@@ -715,7 +722,7 @@ public class CustomerController {
@OperateLog(type = EXPORT) @OperateLog(type = EXPORT)
public CommonResult<Boolean> exportPotentialCustomerExcel(@Valid CustomerExportReqDTO exportReqVO, public CommonResult<Boolean> exportPotentialCustomerExcel(@Valid CustomerExportReqDTO exportReqVO,
HttpServletResponse response) throws IOException { HttpServletResponse response) throws IOException {
if (CollectionUtil.isNotEmpty(exportReqVO.getCustomerService()) ) { if (CollectionUtil.isNotEmpty(exportReqVO.getCustomerService())) {
exportReqVO.setIsInOpenSea(false); exportReqVO.setIsInOpenSea(false);
} }
//设置潜在客户标识 //设置潜在客户标识
......
...@@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; ...@@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult; 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.convert.customer.complaint.follow.CustomerFollowConvert;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.follow.CustomerFollowDO; 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.service.customer.complaint.follow.CustomerFollowService;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowCreateReqVO; import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowCreateReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowPageReqVO; import cn.iocoder.yudao.module.customer.vo.customer.follow.CustomerFollowPageReqVO;
...@@ -80,6 +81,7 @@ public class CustomerFollowController { ...@@ -80,6 +81,7 @@ public class CustomerFollowController {
return success(CustomerFollowConvert.INSTANCE.convertPage(pageResult)); return success(CustomerFollowConvert.INSTANCE.convertPage(pageResult));
} }
//@GetMapping("/export-excel") //@GetMapping("/export-excel")
//@ApiOperation("导出客户跟进 Excel") //@ApiOperation("导出客户跟进 Excel")
//// @PreAuthorize("@ss.hasPermission('ecw:customer-follow:export')") //// @PreAuthorize("@ss.hasPermission('ecw:customer-follow:export')")
...@@ -94,4 +96,6 @@ public class CustomerFollowController { ...@@ -94,4 +96,6 @@ public class CustomerFollowController {
} }
...@@ -113,7 +113,8 @@ public class IndirectCustomerController { ...@@ -113,7 +113,8 @@ public class IndirectCustomerController {
@ApiOperation("获得间接客户分页") @ApiOperation("获得间接客户分页")
// @PreAuthorize("@ss.hasPermission('customer:indirect-customer:query')") // @PreAuthorize("@ss.hasPermission('customer:indirect-customer:query')")
public CommonResult<PageResult<IndirectCustomerBackVO>> getIndirectCustomerPage(@Valid IndirectCustomerPageReqDTO pageVO, PageVO page) { 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)); return success(IndirectCustomerConvert.INSTANCE.convertPage(pageResult));
} }
......
...@@ -735,8 +735,9 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -735,8 +735,9 @@ public class OrderQueryServiceImpl implements OrderQueryService {
if (i.getTitleZh() != null && i.getTitleZh().equals("到仓")) { if (i.getTitleZh() != null && i.getTitleZh().equals("到仓")) {
//i.getBusinessTime(); //i.getBusinessTime();
long l = i.getOrderId(); long l = i.getOrderId();
long shpId = orderTimeMapper.getShipment_id(l); //long shpId = orderTimeMapper.getShipment_id(l);
Date d = orderTimeMapper.getUlboxtime(shpId); //在订单操作日志中获取卸柜时间 2024-06-14 update
Date d = orderTimeMapper.getUlboxtime(l);
if (d != null) i.setBusinessTime(d); if (d != null) i.setBusinessTime(d);
} }
} }
......
...@@ -8,8 +8,12 @@ ...@@ -8,8 +8,12 @@
</select> </select>
<!--根据柜号获取卸柜时间 lanbm 2024-06-13 add--> <!--根据柜号获取卸柜时间 lanbm 2024-06-13 add-->
<select id="getUlboxtime" resultType="java.util.Date"> <select id="getUlboxtime" resultType="java.util.Date">
<!--
select ul_box_time from ecw_box_cabinet_unload 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> </select>
......
...@@ -166,9 +166,16 @@ public class ShipmentLoadExcelExportListener { ...@@ -166,9 +166,16 @@ public class ShipmentLoadExcelExportListener {
head = "第"+NumberUtils.int2chineseNum(i+1)+"部分(after "+ NumberUtils.format(i+1)+" parts)"; head = "第"+NumberUtils.int2chineseNum(i+1)+"部分(after "+ NumberUtils.format(i+1)+" parts)";
} }
list1.add(head); list1.add(head);
headList.add(list1);headList.add(list1);headList.add(list1);headList.add(list1);headList.add(list1);headList.add(list1);headList.add(list1); headList.add(list1);headList.add(list1);headList.add(list1);
headList.add(list1);headList.add(list1);headList.add(list1);headList.add(list1);headList.add(list1);headList.add(list1);headList.add(list1); headList.add(list1);headList.add(list1);headList.add(list1);
headList.add(list1);headList.add(list1);headList.add(list1);headList.add(list1);headList.add(list1); headList.add(list1);
headList.add(list1);headList.add(list1);headList.add(list1);
headList.add(list1);headList.add(list1);headList.add(list1);
headList.add(list1);
headList.add(list1);headList.add(list1);headList.add(list1);
//headList.add(list1);headList.add(list1);
//headList.add(list1);headList.add(list1); //headList.add(list1);headList.add(list1);
List<LoadDto> list = new ArrayList<>(); List<LoadDto> list = new ArrayList<>();
......
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