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
49c8ed60
Commit
49c8ed60
authored
Mar 13, 2025
by
honghy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
需求121 PDA-集运签收-批量签收
parent
1b05d57f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
149 additions
and
13 deletions
+149
-13
CustomerContactsMapper.java
...er/dal/mysql/customerContacts/CustomerContactsMapper.java
+49
-0
CustomerContactsService.java
...mer/service/customerContacts/CustomerContactsService.java
+12
-0
CustomerContactsServiceImpl.java
...service/customerContacts/CustomerContactsServiceImpl.java
+10
-0
CustomerContactsController.java
...er/admin/customerContacts/CustomerContactsController.java
+28
-0
ConsServiceImpl.java
...oder/yudao/module/order/service/cons/ConsServiceImpl.java
+26
-3
ConsController.java
...ao/module/order/controller/admin/cons/ConsController.java
+24
-10
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 @
49c8ed60
...
@@ -110,6 +110,55 @@ public interface CustomerContactsMapper extends BaseMapperX<CustomerContactsDO>
...
@@ -110,6 +110,55 @@ public interface CustomerContactsMapper extends BaseMapperX<CustomerContactsDO>
@Param
(
"customerId"
)
Long
customerId
,
@Param
(
"customerId"
)
Long
customerId
,
@Param
(
"isConsService"
)
Boolean
isConsService
);
@Param
(
"isConsService"
)
Boolean
isConsService
);
@ResultType
(
CustomerContactsDto
.
class
)
@Select
({
"<script>"
,
"select"
,
"c.*, "
,
"c.id as customer_id, "
,
"c.name as customer_name, "
,
"c.name_en as customer_name_en, "
,
"c.number as customer_number, "
,
"c.default_pay as default_pay, "
,
"c.no_consignee as no_consignee, "
,
"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(c.`number`,''),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 = 'phone != null and phone != \"\" '>"
,
"and IFNULL(cc.`phone_new`,'') like concat('%', concat(#{phone}, '%'))"
,
"</when>"
,
"<when test = 'isConsService != null and isConsService != \"\" '>"
,
"and c.is_cons_service = #{isConsService}"
,
"</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>"
,
"order by cc.update_time desc "
,
"</script>"
})
IPage
<
CustomerContactsDto
>
selectBySearchKeyPda
(
IPage
page
,
@Param
(
"searchKey"
)
String
searchKey
,
@Param
(
"phone"
)
String
phone
,
@Param
(
"type"
)
String
type
,
@Param
(
"ids"
)
Collection
<
Long
>
ids
,
@Param
(
"customerId"
)
Long
customerId
,
@Param
(
"isConsService"
)
Boolean
isConsService
);
@ResultType
(
CustomerContactsDto
.
class
)
@ResultType
(
CustomerContactsDto
.
class
)
@Select
({
@Select
({
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerContacts/CustomerContactsService.java
View file @
49c8ed60
...
@@ -110,6 +110,18 @@ public interface CustomerContactsService extends IService<CustomerContactsDO> {
...
@@ -110,6 +110,18 @@ public interface CustomerContactsService extends IService<CustomerContactsDO> {
*/
*/
PageResult
<
CustomerContactsDto
>
selectBySearchKey
(
String
searchKey
,
String
phone
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
Boolean
isConsService
,
PageParam
page
);
PageResult
<
CustomerContactsDto
>
selectBySearchKey
(
String
searchKey
,
String
phone
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
Boolean
isConsService
,
PageParam
page
);
/**
* 模糊搜索指定数量的联系数据
*
* @param searchKey 关键字
* @param type
* @param ids 联系人ID
* @param customerId 客户ID
* @param isConsService 客户是否开通集运服务
* @return 联系人列表
*/
PageResult
<
CustomerContactsDto
>
selectBySearchKeyPda
(
String
searchKey
,
String
phone
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
Boolean
isConsService
,
PageParam
page
);
/*
/*
添加的客户选择函数
添加的客户选择函数
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerContacts/CustomerContactsServiceImpl.java
View file @
49c8ed60
...
@@ -165,6 +165,16 @@ public class CustomerContactsServiceImpl extends AbstractService<CustomerContact
...
@@ -165,6 +165,16 @@ public class CustomerContactsServiceImpl extends AbstractService<CustomerContact
return
PageResult
.
of
(
mpPage
);
return
PageResult
.
of
(
mpPage
);
}
}
@Override
public
PageResult
<
CustomerContactsDto
>
selectBySearchKeyPda
(
String
searchKey
,
String
phone
,
String
type
,
Collection
<
Long
>
ids
,
Long
customerId
,
Boolean
isConsService
,
PageParam
page
)
{
IPage
<
CustomerContactsDto
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
customerContactsMapper
.
selectBySearchKeyPda
(
mpPage
,
searchKey
,
phone
,
type
,
ids
,
customerId
,
isConsService
);
return
PageResult
.
of
(
mpPage
);
}
@Override
@Override
public
PageResult
<
CustomerContactsDto
>
selectBySearchKey2
(
public
PageResult
<
CustomerContactsDto
>
selectBySearchKey2
(
String
searchKey
,
String
searchKey
,
...
...
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customerContacts/CustomerContactsController.java
View file @
49c8ed60
...
@@ -220,4 +220,32 @@ public class CustomerContactsController {
...
@@ -220,4 +220,32 @@ public class CustomerContactsController {
type
,
ids
,
customerId
,
page
,
loginUserId
));
type
,
ids
,
customerId
,
page
,
loginUserId
));
}
}
@GetMapping
(
"/selectPda"
)
@ApiOperation
(
"获得客户联系人下拉框列表(单次最多显示20条,请输入联系人电话、联系人姓名、客户名称搜索)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"searchKey"
,
value
=
"请输入联系人电话、联系人姓名、客户名称搜索"
,
example
=
"姓名或电话"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
"phone"
,
value
=
"请输入联系人电话搜索"
,
example
=
"电话"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"客户类型"
,
example
=
"1"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
),
@ApiImplicitParam
(
name
=
"customerId"
,
value
=
"客户ID"
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
),
@ApiImplicitParam
(
name
=
"isConsTransform"
,
value
=
"是否转运"
,
example
=
"false"
,
dataTypeClass
=
Boolean
.
class
)
})
public
CommonResult
<
PageResult
<
CustomerContactsDto
>>
selectBySearchKeyPda
(
@RequestParam
(
value
=
"searchKey"
,
required
=
false
)
String
searchKey
,
@RequestParam
(
value
=
"phone"
,
required
=
false
)
String
phone
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"ids"
,
required
=
false
)
Collection
<
Long
>
ids
,
@RequestParam
(
value
=
"customerId"
,
required
=
false
)
Long
customerId
,
@RequestParam
(
value
=
"isConsTransform"
,
required
=
false
)
Boolean
isConsTransform
,
PageParam
page
)
{
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
Boolean
isConsService
=
null
;
//包裹转运时筛选所有转运服务客户
if
(
isConsTransform
!=
null
&&
isConsTransform
){
isConsService
=
true
;
}
return
success
(
customerContactsService
.
selectBySearchKeyPda
(
searchKey
,
phone
,
type
,
ids
,
customerId
,
isConsService
,
page
));
}
}
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/cons/ConsServiceImpl.java
View file @
49c8ed60
...
@@ -117,7 +117,7 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
...
@@ -117,7 +117,7 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
cons
.
setConsNum
(
consNum
);
cons
.
setConsNum
(
consNum
);
cons
.
setStatus
(
0
);
cons
.
setStatus
(
0
);
consMapper
.
insert
(
cons
);
consMapper
.
insert
(
cons
);
if
(
createReqVO
.
getConsItemVOList
()
!=
null
&&
!
createReqVO
.
getConsItemVOList
().
isEmpty
())
{
if
(
createReqVO
.
getConsItemVOList
()
!=
null
&&
!
createReqVO
.
getConsItemVOList
().
isEmpty
())
{
createReqVO
.
getConsItemVOList
().
forEach
(
consItemVO
->
{
createReqVO
.
getConsItemVOList
().
forEach
(
consItemVO
->
{
consItemVO
.
setConsId
(
cons
.
getId
());
consItemVO
.
setConsId
(
cons
.
getId
());
consItemService
.
createConsItem
(
consItemVO
);
consItemService
.
createConsItem
(
consItemVO
);
...
@@ -321,7 +321,30 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
...
@@ -321,7 +321,30 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
throw
new
ServiceException
(
500
,
"快递单号已存在,请检查"
);
throw
new
ServiceException
(
500
,
"快递单号已存在,请检查"
);
}
}
ConsDO
cons
=
ConsConvert
.
INSTANCE
.
convert
(
createReqVO
);
ConsDO
cons
=
ConsConvert
.
INSTANCE
.
convert
(
createReqVO
);
String
warehouseCode
=
""
;
if
(
createReqVO
.
getWareId
().
equals
(
1L
))
{
warehouseCode
=
"F"
;
}
else
if
(
createReqVO
.
getWareId
().
equals
(
3L
))
{
warehouseCode
=
"Y"
;
}
else
{
warehouseCode
=
"F"
;
}
String
consNum
=
generateConsNumber
(
warehouseCode
);
cons
.
setConsNum
(
consNum
);
consMapper
.
insert
(
cons
);
consMapper
.
insert
(
cons
);
//新增图片地址
if
(
createReqVO
.
getMediaUrl
()
!=
null
)
{
ConsMediaDO
consMedia
=
new
ConsMediaDO
();
ConsMediaCreateReqVO
consMediaCreateReqVO
=
new
ConsMediaCreateReqVO
();
consMediaCreateReqVO
.
setConsId
(
cons
.
getId
());
consMediaCreateReqVO
.
setMediaUrl
(
createReqVO
.
getMediaUrl
());
consMediaCreateReqVO
.
setMediaBusinessType
(
3
);
consMediaCreateReqVO
.
setBizId
(
cons
.
getId
());
consMediaCreateReqVO
.
setTableName
(
"ecw_cons"
);
consMediaCreateReqVO
.
setColumnName
(
"files"
);
consMediaCreateReqVO
.
setOriginalFileName
(
"签收图片"
);
consMediaService
.
createConsMedia
(
consMediaCreateReqVO
);
}
List
<
ConsItemCreateReqVO
>
consItemVOList
=
createReqVO
.
getConsItemVOList
();
List
<
ConsItemCreateReqVO
>
consItemVOList
=
createReqVO
.
getConsItemVOList
();
if
(
consItemVOList
!=
null
&&
!
consItemVOList
.
isEmpty
())
{
if
(
consItemVOList
!=
null
&&
!
consItemVOList
.
isEmpty
())
{
for
(
ConsItemCreateReqVO
consItemCreateReqVO
:
consItemVOList
)
{
for
(
ConsItemCreateReqVO
consItemCreateReqVO
:
consItemVOList
)
{
...
@@ -351,7 +374,7 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
...
@@ -351,7 +374,7 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
}
}
//更新图片地址,仅签收情况
//更新图片地址,仅签收情况
if
(
updateReqVO
.
getMediaUrl
()
!=
null
&&
updateReqVO
.
getSigner
()
!=
null
)
{
if
(
updateReqVO
.
getMediaUrl
()
!=
null
)
{
ConsMediaDO
consMedia
=
consMediaService
.
selectOne
(
new
LambdaQueryWrapperX
<
ConsMediaDO
>()
ConsMediaDO
consMedia
=
consMediaService
.
selectOne
(
new
LambdaQueryWrapperX
<
ConsMediaDO
>()
.
eq
(
ConsMediaDO:
:
getBizId
,
updateReqVO
.
getId
())
.
eq
(
ConsMediaDO:
:
getBizId
,
updateReqVO
.
getId
())
.
eq
(
ConsMediaDO:
:
getConsId
,
updateReqVO
.
getId
())
.
eq
(
ConsMediaDO:
:
getConsId
,
updateReqVO
.
getId
())
...
@@ -441,7 +464,7 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
...
@@ -441,7 +464,7 @@ public class ConsServiceImpl extends AbstractService<ConsMapper, ConsDO> impleme
if
(
consDO
.
getTransportId
()
!=
null
&&
orderBackVO
.
getTransportId
()
==
null
)
{
if
(
consDO
.
getTransportId
()
!=
null
&&
orderBackVO
.
getTransportId
()
==
null
)
{
orderBackVO
.
setTransportId
(
consDO
.
getTransportId
());
orderBackVO
.
setTransportId
(
consDO
.
getTransportId
());
}
}
if
(
consDO
.
getWarehouseLineId
()!=
null
&&
logisticsInfo
.
getLineId
()==
null
)
{
if
(
consDO
.
getWarehouseLineId
()
!=
null
&&
logisticsInfo
.
getLineId
()
==
null
)
{
logisticsInfo
=
logisticsInfo
=
warehouseLineMapper
.
getStartInfoAndDestInfoByLineId
(
consDO
.
getWarehouseLineId
());
warehouseLineMapper
.
getStartInfoAndDestInfoByLineId
(
consDO
.
getWarehouseLineId
());
if
(
Objects
.
isNull
(
logisticsInfo
))
{
if
(
Objects
.
isNull
(
logisticsInfo
))
{
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/cons/ConsController.java
View file @
49c8ed60
package
cn
.
iocoder
.
yudao
.
module
.
order
.
controller
.
admin
.
cons
;
package
cn
.
iocoder
.
yudao
.
module
.
order
.
controller
.
admin
.
cons
;
import
cn.iocoder.yudao.framework.common.exception.ServiceException
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
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.framework.common.util.code.CodeUtils
;
import
cn.iocoder.yudao.framework.common.util.code.CodeUtils
;
...
@@ -27,6 +28,7 @@ import cn.iocoder.yudao.module.order.vo.order.OrderBackVO;
...
@@ -27,6 +28,7 @@ import cn.iocoder.yudao.module.order.vo.order.OrderBackVO;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -200,17 +202,29 @@ public class ConsController {
...
@@ -200,17 +202,29 @@ public class ConsController {
@GetMapping
(
"/getPad"
)
@GetMapping
(
"/getPad"
)
@ApiOperation
(
"获得集运包裹主"
)
@ApiOperation
(
"获得集运包裹主"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
<
ConsBackVO
>
getPad
(
Long
id
,
String
expressNo
)
{
public
CommonResult
<
ConsBackVO
>
getPad
(
@RequestParam
(
"id"
)
Long
id
)
{
if
(
id
==
null
&&
StringUtils
.
isBlank
(
expressNo
))
{
ConsDO
cons
=
consService
.
getCons
(
id
);
throw
new
ServiceException
(
500
,
"参数错误"
);
}
ConsDO
cons
=
consService
.
selectOne
(
new
LambdaQueryWrapperX
<
ConsDO
>()
.
eq
(
id
!=
null
,
ConsDO:
:
getId
,
id
)
.
eq
(
StringUtils
.
isNotBlank
(
expressNo
),
ConsDO:
:
getExpressNo
,
expressNo
));
if
(
cons
==
null
)
{
return
success
(
null
);
}
CustomerDO
customer
=
customerService
.
selectOne
(
"id"
,
cons
.
getCustomerId
());
CustomerDO
customer
=
customerService
.
selectOne
(
"id"
,
cons
.
getCustomerId
());
CustomerContactsDO
customerContacts
=
customerContactsService
.
getDefaultContacts
(
cons
.
getCustomerId
());
CustomerContactsDO
customerContacts
=
customerContactsService
.
getDefaultContacts
(
cons
.
getCustomerId
());
List
<
ConsItemBackVO
>
consItemBackVOS
=
consItemService
.
getConsItemBackVOList
(
new
ConsItemQueryVO
().
setConsId
(
id
));
List
<
ConsItemBackVO
>
consItemBackVOS
=
consItemService
.
getConsItemBackVOList
(
new
ConsItemQueryVO
().
setConsId
(
cons
.
getId
()
));
ConsBackVO
consBackVO
=
ConsConvert
.
INSTANCE
.
convert
(
cons
);
ConsBackVO
consBackVO
=
ConsConvert
.
INSTANCE
.
convert
(
cons
);
consBackVO
.
setConsItemVOList
(
consItemBackVOS
);
consBackVO
.
setConsItemVOList
(
consItemBackVOS
);
consBackVO
.
setAreaCode
(
customerContacts
.
getAreaCode
());
if
(
customerContacts
!=
null
)
{
consBackVO
.
setPhoneNew
(
customerContacts
.
getPhoneNew
());
consBackVO
.
setAreaCode
(
customerContacts
.
getAreaCode
());
consBackVO
.
setCustomerName
(
customer
.
getName
());
consBackVO
.
setPhoneNew
(
customerContacts
.
getPhoneNew
());
}
if
(
customer
!=
null
)
{
consBackVO
.
setCustomerName
(
customer
.
getName
());
}
//获取签收图片
//获取签收图片
if
(
cons
.
getSigned
())
{
if
(
cons
.
getSigned
())
{
ConsMediaDO
consMedia
=
consentMediaService
.
getOne
(
new
LambdaQueryWrapperX
<
ConsMediaDO
>().
eq
(
ConsMediaDO:
:
getConsId
,
cons
.
getId
())
ConsMediaDO
consMedia
=
consentMediaService
.
getOne
(
new
LambdaQueryWrapperX
<
ConsMediaDO
>().
eq
(
ConsMediaDO:
:
getConsId
,
cons
.
getId
())
...
@@ -221,9 +235,9 @@ public class ConsController {
...
@@ -221,9 +235,9 @@ public class ConsController {
// 物流信息查询
// 物流信息查询
LogisticsInfoDto
initialLogisticsInfoDto
=
LogisticsInfoDto
initialLogisticsInfoDto
=
warehouseLineMapper
.
getStartInfoAndDestInfoByLineId
(
cons
.
getWarehouseLineId
());
warehouseLineMapper
.
getStartInfoAndDestInfoByLineId
(
cons
.
getWarehouseLineId
());
if
(
Objects
.
isNull
(
initialLogisticsInfoDto
))
{
//
if (Objects.isNull(initialLogisticsInfoDto)) {
throw
exception
(
NOT_FIND_LOGISTICS_INFO
);
//
throw exception(NOT_FIND_LOGISTICS_INFO);
}
//
}
//初始物流信息
//初始物流信息
consBackVO
.
setInitialLogisticsInfoDto
(
initialLogisticsInfoDto
);
consBackVO
.
setInitialLogisticsInfoDto
(
initialLogisticsInfoDto
);
return
success
(
consBackVO
);
return
success
(
consBackVO
);
...
...
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