Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
a8ce13fc
Commit
a8ce13fc
authored
May 23, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-23提交
parent
13545881
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
135 additions
and
20 deletions
+135
-20
CustomerContactsMapper.java
...er/dal/mysql/customerContacts/CustomerContactsMapper.java
+50
-1
CustomerContactsDto.java
...ocoder/yudao/module/customer/dto/CustomerContactsDto.java
+3
-0
CustomerContactsService.java
...mer/service/customerContacts/CustomerContactsService.java
+9
-0
CustomerContactsServiceImpl.java
...service/customerContacts/CustomerContactsServiceImpl.java
+18
-1
CustomerContactsController.java
...er/admin/customerContacts/CustomerContactsController.java
+15
-5
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+40
-13
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/dal/mysql/customerContacts/CustomerContactsMapper.java
View file @
a8ce13fc
...
...
@@ -93,5 +93,54 @@ public interface CustomerContactsMapper extends BaseMapperX<CustomerContactsDO>
"order by cc.update_time desc "
,
"</script>"
})
IPage
<
CustomerContactsDto
>
selectBySearchKey
(
IPage
page
,
@Param
(
"searchKey"
)
String
searchKey
,
@Param
(
"type"
)
String
type
,
@Param
(
"ids"
)
Collection
<
Long
>
ids
,
@Param
(
"customerId"
)
Long
customerId
);
IPage
<
CustomerContactsDto
>
selectBySearchKey
(
IPage
page
,
@Param
(
"searchKey"
)
String
searchKey
,
@Param
(
"type"
)
String
type
,
@Param
(
"ids"
)
Collection
<
Long
>
ids
,
@Param
(
"customerId"
)
Long
customerId
);
@ResultType
(
CustomerContactsDto
.
class
)
@Select
({
"<script>"
,
"select"
,
"c.*, "
,
"c.id as customer_id, "
,
"c.name as customer_name, "
,
"c.name_en as customer_name_en, "
,
"cc.* , "
,
"cc.id as customer_contacts_id, "
,
"cc.name as contacts_name, "
,
"cc.name_en as contacts_name_en "
,
"from ecw_customer_contacts cc "
,
"left join ecw_customer c "
,
"on cc.customer_id = c.id "
,
"where "
,
"cc.deleted = 0 and cc.customer_id is not null "
,
"<when test = 'searchKey != null and searchKey != \"\" '>"
,
"and CONCAT(IFNULL(cc.`name`,''),IFNULL(cc.`name_en`,''),IFNULL(cc.`phone_new`,''),IFNULL(cc.`email`,''),IFNULL(c.`company`,''),IFNULL(c.`company_en`,'')) like concat('%', concat(#{searchKey}, '%'))"
,
"</when>"
,
"<when test = 'type != null and type != \"\" '>"
,
"and FIND_IN_SET(#{type}, c.type) "
,
"</when>"
,
"<when test = 'ids != null and ids.size()>0'>"
,
"AND cc.`id` in "
,
"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>#{id}</foreach>"
,
"</when>"
,
"<when test = 'customerId != null'>"
,
"and c.id = #{customerId}"
,
"</when>"
,
"<when test = 'UserId != null'>"
,
"and c.customer_service = #{UserId} and is_in_open_sea=0"
,
"</when>"
,
"order by cc.update_time desc "
,
"</script>"
})
//lanbm 2024-05-22 过滤客户经理函数
IPage
<
CustomerContactsDto
>
selectBySearchKey2
(
IPage
page
,
@Param
(
"searchKey"
)
String
searchKey
,
@Param
(
"type"
)
String
type
,
@Param
(
"ids"
)
Collection
<
Long
>
ids
,
@Param
(
"customerId"
)
Long
customerId
,
@Param
(
"UserId"
)
Long
UserId
);
}
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/dto/CustomerContactsDto.java
View file @
a8ce13fc
...
...
@@ -82,4 +82,7 @@ public class CustomerContactsDto {
@ApiModelProperty
(
value
=
"是否公海客户"
)
private
Boolean
isInOpenSea
;
}
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerContacts/CustomerContactsService.java
View file @
a8ce13fc
...
...
@@ -109,6 +109,15 @@ public interface CustomerContactsService extends IService<CustomerContactsDO> {
*/
PageResult
<
CustomerContactsDto
>
selectBySearchKey
(
String
searchKey
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
PageParam
page
);
/*
lanbm 2024-05-23 添加的客户选择函数
*/
PageResult
<
CustomerContactsDto
>
selectBySearchKey2
(
String
searchKey
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
PageParam
page
,
Long
UserId
);
/**
* 根据客户ID更新EMAIL和公司名称
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerContacts/CustomerContactsServiceImpl.java
View file @
a8ce13fc
...
...
@@ -148,7 +148,24 @@ public class CustomerContactsServiceImpl extends AbstractService<CustomerContact
@Override
public
PageResult
<
CustomerContactsDto
>
selectBySearchKey
(
String
searchKey
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
PageParam
page
)
{
IPage
<
CustomerContactsDto
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
customerContactsMapper
.
selectBySearchKey
(
mpPage
,
searchKey
,
type
,
ids
,
customerId
);
customerContactsMapper
.
selectBySearchKey
(
mpPage
,
searchKey
,
type
,
ids
,
customerId
);
return
PageResult
.
of
(
mpPage
);
}
@Override
public
PageResult
<
CustomerContactsDto
>
selectBySearchKey2
(
String
searchKey
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
PageParam
page
,
Long
UserId
)
{
IPage
<
CustomerContactsDto
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
customerContactsMapper
.
selectBySearchKey2
(
mpPage
,
searchKey
,
type
,
ids
,
customerId
,
UserId
);
return
PageResult
.
of
(
mpPage
);
}
...
...
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customerContacts/CustomerContactsController.java
View file @
a8ce13fc
...
...
@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.customer.convert.customerContacts.CustomerContactsConvert
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
...
...
@@ -139,12 +140,21 @@ public class CustomerContactsController {
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
),
@ApiImplicitParam
(
name
=
"customerId"
,
value
=
"客户ID"
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
})
public
CommonResult
<
PageResult
<
CustomerContactsDto
>>
selectBySearchKey
(
@RequestParam
(
value
=
"searchKey"
,
required
=
false
)
String
searchKey
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"ids"
,
required
=
false
)
Collection
<
Long
>
ids
,
@RequestParam
(
value
=
"customerId"
,
required
=
false
)
Long
customerId
public
CommonResult
<
PageResult
<
CustomerContactsDto
>>
selectBySearchKey
(
@RequestParam
(
value
=
"searchKey"
,
required
=
false
)
String
searchKey
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"ids"
,
required
=
false
)
Collection
<
Long
>
ids
,
@RequestParam
(
value
=
"customerId"
,
required
=
false
)
Long
customerId
,
PageParam
page
)
{
return
success
(
customerContactsService
.
selectBySearchKey
(
searchKey
,
type
,
ids
,
customerId
,
page
));
//lanbm 2024-05-22修改报价单联系人选择
/*
return success(customerContactsService.selectBySearchKey(searchKey,
type, ids, customerId, page));*/
//当前用户ID
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
return
success
(
customerContactsService
.
selectBySearchKey2
(
searchKey
,
type
,
ids
,
customerId
,
page
,
loginUserId
));
}
}
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
a8ce13fc
...
...
@@ -950,6 +950,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
boxAirCheckoutBackVO
.
setOperator
(
getUserName
(
boxAirCheckoutDO
.
getCreator
()));
boxBackVO
.
setRealNum
(
boxAirCheckoutDO
.
getRealNum
());
}
//lanbm 2024-05-22
boxBackVO
.
setPlanNum
(
getPlanNum
(
id
));
boxBackVO
.
setRealNum
(
getRealNum
(
id
));
...
...
@@ -1437,22 +1438,39 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
return
boxBackVO
;
}
/*
获取计划数
*/
public
Integer
getPlanNum
(
Long
id
)
{
int
planNum
=
0
;
List
<
BoxMergePkgDO
>
boxMergePkgDOS
=
boxMergePkgService
.
selectList
(
BoxMergePkgDO:
:
getShipmentId
,
id
);
List
<
BoxPreloadGoodsDO
>
boxPreloadGoodsDOS
=
boxPreloadGoodsService
.
selectList
(
new
LambdaQueryWrapperX
<
BoxPreloadGoodsDO
>().
eq
(
BoxPreloadGoodsDO:
:
getShipmentId
,
id
).
eq
(
BoxPreloadGoodsDO:
:
getIsRemove
,
0
));
List
<
Long
>
preloadOrderIds
=
boxPreloadGoodsDOS
.
stream
().
map
(
BoxPreloadGoodsDO:
:
getOrderId
).
distinct
().
collect
(
Collectors
.
toList
());
//ecw_box_merge_pkg 合包箱表
List
<
BoxMergePkgDO
>
boxMergePkgDOS
=
boxMergePkgService
.
selectList
(
BoxMergePkgDO:
:
getShipmentId
,
id
);
//预装货物 ecw_box_preload_goods
List
<
BoxPreloadGoodsDO
>
boxPreloadGoodsDOS
=
boxPreloadGoodsService
.
selectList
(
new
LambdaQueryWrapperX
<
BoxPreloadGoodsDO
>().
eq
(
BoxPreloadGoodsDO:
:
getShipmentId
,
id
).
eq
(
BoxPreloadGoodsDO:
:
getIsRemove
,
0
));
List
<
Long
>
preloadOrderIds
=
boxPreloadGoodsDOS
.
stream
().
map
(
BoxPreloadGoodsDO:
:
getOrderId
).
distinct
().
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
boxMergePkgDOS
))
{
List
<
Long
>
pkgIds
=
boxMergePkgDOS
.
stream
().
map
(
BoxMergePkgDO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
BoxPkgOrderDO
>
boxPkgOrderDOS
=
boxPkgOrderService
.
selectList
(
BoxPkgOrderDO:
:
getPkgId
,
pkgIds
);
List
<
Long
>
pkgIds
=
boxMergePkgDOS
.
stream
().
map
(
BoxMergePkgDO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
BoxPkgOrderDO
>
boxPkgOrderDOS
=
boxPkgOrderService
.
selectList
(
BoxPkgOrderDO:
:
getPkgId
,
pkgIds
);
if
(
CollectionUtil
.
isNotEmpty
(
boxPkgOrderDOS
))
{
List
<
Long
>
pkgOrderIds
=
boxPkgOrderDOS
.
stream
().
map
(
BoxPkgOrderDO:
:
getOrderId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
pkgOrderIds
=
boxPkgOrderDOS
.
stream
().
map
(
BoxPkgOrderDO:
:
getOrderId
).
collect
(
Collectors
.
toList
());
preloadOrderIds
.
removeAll
(
pkgOrderIds
);
}
planNum
=
planNum
+
boxMergePkgDOS
.
size
();
}
if
(
CollectionUtil
.
isNotEmpty
(
preloadOrderIds
))
{
List
<
OrderDO
>
orderDOS
=
orderService
.
selectList
(
OrderDO:
:
getOrderId
,
preloadOrderIds
);
List
<
OrderDO
>
orderDOS
=
orderService
.
selectList
(
OrderDO:
:
getOrderId
,
preloadOrderIds
);
planNum
=
planNum
+
orderDOS
.
stream
().
mapToInt
(
OrderDO:
:
getSumNum
).
sum
();
}
return
planNum
;
...
...
@@ -5058,11 +5076,18 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
orderService
.
finishOrderSortingReverseReviewUnlock
(
null
,
orderIds
);
}
/*
获取实际数
*/
@Override
public
Integer
getRealNum
(
Long
shipmentId
)
{
int
realNum
=
0
;
List
<
BoxMergePkgDO
>
boxMergePkgDOS
=
boxMergePkgService
.
selectList
(
BoxMergePkgDO:
:
getShipmentId
,
shipmentId
);
List
<
BoxPreloadGoodsDO
>
boxPreloadGoodsDOS
=
boxPreloadGoodsService
.
selectList
(
new
LambdaQueryWrapperX
<
BoxPreloadGoodsDO
>().
eq
(
BoxPreloadGoodsDO:
:
getShipmentId
,
shipmentId
).
eq
(
BoxPreloadGoodsDO:
:
getIsRemove
,
0
));
List
<
BoxMergePkgDO
>
boxMergePkgDOS
=
boxMergePkgService
.
selectList
(
BoxMergePkgDO:
:
getShipmentId
,
shipmentId
);
List
<
BoxPreloadGoodsDO
>
boxPreloadGoodsDOS
=
boxPreloadGoodsService
.
selectList
(
new
LambdaQueryWrapperX
<
BoxPreloadGoodsDO
>().
eq
(
BoxPreloadGoodsDO:
:
getShipmentId
,
shipmentId
).
eq
(
BoxPreloadGoodsDO:
:
getIsRemove
,
0
));
List
<
Long
>
preloadOrderIds
=
boxPreloadGoodsDOS
.
stream
().
map
(
BoxPreloadGoodsDO:
:
getOrderId
).
distinct
().
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
boxMergePkgDOS
))
{
for
(
BoxMergePkgDO
boxMergePkgDO
:
boxMergePkgDOS
)
{
...
...
@@ -5086,10 +5111,12 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
}
if
(
CollectionUtil
.
isNotEmpty
(
preloadOrderIds
))
{
Long
notInMergeOrderCount
=
boxLoadInfoService
.
selectCount
(
new
LambdaQueryWrapperX
<
BoxLoadInfoDO
>()
.
eq
(
BoxLoadInfoDO:
:
getShipmentId
,
shipmentId
)
.
in
(
BoxLoadInfoDO:
:
getOrderId
,
preloadOrderIds
)
);
Long
notInMergeOrderCount
=
boxLoadInfoService
.
selectCount
(
new
LambdaQueryWrapperX
<
BoxLoadInfoDO
>()
.
eq
(
BoxLoadInfoDO:
:
getShipmentId
,
shipmentId
)
.
in
(
BoxLoadInfoDO:
:
getOrderId
,
preloadOrderIds
)
);
realNum
=
realNum
+
(
notInMergeOrderCount
==
null
?
0
:
notInMergeOrderCount
.
intValue
());
}
return
realNum
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment