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
2ec88a7c
Commit
2ec88a7c
authored
Oct 23, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into dev
parents
575f8b1f
b8c4ba8e
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
147 additions
and
41 deletions
+147
-41
20240826.sql
sql/v2.1/20240826.sql
+1
-4
system_dict_update_20240815.sql
sql/数据字典备份脚本/system_dict_update_20240815.sql
+0
-0
AbstractMapper.java
...r/yudao/framework/mybatis/core/mapper/AbstractMapper.java
+1
-1
CustomerFollowupQueryVO.java
...customer/vo/customerFollowup/CustomerFollowupQueryVO.java
+11
-0
CustomerFollowupMapper.xml
...main/resources/mapper/customer/CustomerFollowupMapper.xml
+29
-0
CustomerMergeServiceImpl.java
...r/controller/admin/customer/CustomerMergeServiceImpl.java
+12
-14
WarehouseController.java
...itory/controller/admin/warehouse/WarehouseController.java
+5
-1
AppWarehouseController.java
...tory/controller/app/warehouse/AppWarehouseController.java
+5
-1
OrderCargoControlPickMapper.java
...ql/orderCargoControlPick/OrderCargoControlPickMapper.java
+4
-0
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+2
-1
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+77
-17
OrderMapper.xml
...rder-core/src/main/resources/mapper/order/OrderMapper.xml
+0
-2
No files found.
sql/v2.1/20240826.sql
View file @
2ec88a7c
-- 这里是补充脚本,生产环境已存在
-- 添加新字段
-- 添加新字段
alter
table
`ecw_customer`
add
column
`no_consignee`
bit
(
1
)
NOT
NULL
DEFAULT
b
'0'
COMMENT
'控货无收货人'
;
alter
table
`ecw_customer`
add
column
`no_consignee`
bit
(
1
)
NOT
NULL
DEFAULT
b
'0'
COMMENT
'控货无收货人'
;
alter
table
`ecw_customer`
add
column
`default_pay`
bit
(
1
)
NOT
NULL
DEFAULT
b
'0'
COMMENT
'是否默认付款'
;
alter
table
`ecw_customer`
add
column
`default_pay`
bit
(
1
)
NOT
NULL
DEFAULT
b
'0'
COMMENT
'是否默认付款'
;
-- 添加新字段
-- 添加新字段
alter
table
`ecw_warehouse`
add
column
`rent_free_days`
int
DEFAULT
NULL
COMMENT
'仓库免租期'
;
alter
table
`ecw_warehouse`
add
column
`rent_free_days`
int
DEFAULT
NULL
COMMENT
'仓库免租期'
;
alter
table
`ecw_warehouse`
add
column
`lock_recipient_days`
int
DEFAULT
NULL
COMMENT
'锁定收货人天数'
;
alter
table
`ecw_warehouse`
add
column
`lock_recipient_days`
int
DEFAULT
NULL
COMMENT
'锁定收货人天数'
;
sql/数据字典备份脚本/system_dict_update_20240815.sql
View file @
2ec88a7c
This diff is collapsed.
Click to expand it.
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/AbstractMapper.java
View file @
2ec88a7c
...
@@ -55,7 +55,7 @@ public interface AbstractMapper<T> extends BaseMapper<T> {
...
@@ -55,7 +55,7 @@ public interface AbstractMapper<T> extends BaseMapper<T> {
IPage
<
T
>
mpPage
=
MyBatisUtils
.
buildPage
(
pageParam
);
IPage
<
T
>
mpPage
=
MyBatisUtils
.
buildPage
(
pageParam
);
selectPage
(
mpPage
,
queryWrapper
);
selectPage
(
mpPage
,
queryWrapper
);
// 转换返回
// 转换返回
return
new
PageResult
<>(
mpPage
.
getRecords
(),
mpPage
.
getTotal
());
return
new
PageResult
<>(
mpPage
.
getRecords
(),
mpPage
.
getTotal
()
,
mpPage
.
getSize
(),
mpPage
.
getCurrent
(),
mpPage
.
getPages
()
);
}
}
/***
/***
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customerFollowup/CustomerFollowupQueryVO.java
View file @
2ec88a7c
...
@@ -85,4 +85,15 @@ public class CustomerFollowupQueryVO extends PageParam {
...
@@ -85,4 +85,15 @@ public class CustomerFollowupQueryVO extends PageParam {
@ApiModelProperty
(
value
=
"结束创建时间"
)
@ApiModelProperty
(
value
=
"结束创建时间"
)
private
Date
endCreateTime
;
private
Date
endCreateTime
;
@ApiModelProperty
(
value
=
"跟进类型,下拉多选"
)
private
List
<
Integer
>
followTypes
;
@ApiModelProperty
(
value
=
"跟进方式,下拉多选"
)
private
List
<
Integer
>
followMethods
;
@ApiModelProperty
(
value
=
"跟进结果,下拉多选"
)
private
List
<
Integer
>
resultTypes
;
//跟进状态,多选,逗号分隔
@ApiModelProperty
(
value
=
"跟进状态,下拉多选"
)
private
List
<
Integer
>
statuses
;
}
}
yudao-module-customer/yudao-module-customer-core/src/main/resources/mapper/customer/CustomerFollowupMapper.xml
View file @
2ec88a7c
...
@@ -38,6 +38,35 @@
...
@@ -38,6 +38,35 @@
AND a.result_type = #{query.resultType}
AND a.result_type = #{query.resultType}
</if>
</if>
<if
test=
"query.followTypes != null and query.followTypes.size()>0"
>
AND
<foreach
item=
'item'
index=
"index"
collection=
'query.followTypes'
open=
'('
separator=
'or'
close=
')'
>
FIND_IN_SET(#{item}, a.follow_type)
</foreach>
</if>
<if
test=
"query.followMethods != null and query.followMethods.size()>0"
>
AND
<foreach
item=
'item'
index=
"index"
collection=
'query.followMethods'
open=
'('
separator=
'or'
close=
')'
>
FIND_IN_SET(#{item}, a.follow_method)
</foreach>
</if>
<if
test=
"query.resultTypes != null and query.resultTypes.size()>0"
>
AND
<foreach
item=
'item'
index=
"index"
collection=
'query.resultTypes'
open=
'('
separator=
'or'
close=
')'
>
FIND_IN_SET(#{item}, a.result_type)
</foreach>
</if>
<if
test=
"query.statuses != null and query.statuses.size()>0"
>
AND
<foreach
item=
'item'
index=
"index"
collection=
'query.statuses'
open=
'('
separator=
'or'
close=
')'
>
FIND_IN_SET(#{item}, a.status)
</foreach>
</if>
</sql>
</sql>
<select
id=
"selectPage1"
resultType=
"cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO"
>
<select
id=
"selectPage1"
resultType=
"cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO"
>
...
...
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customer/CustomerMergeServiceImpl.java
View file @
2ec88a7c
...
@@ -9,15 +9,13 @@ import cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO;
...
@@ -9,15 +9,13 @@ import cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.complaint.CustomerComplaintDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.complaint.CustomerComplaintDO
;
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.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customer.commission.CustomerCommissionService
;
import
cn.iocoder.yudao.module.customer.service.customer.commission.CustomerCommissionService
;
import
cn.iocoder.yudao.module.customer.service.customer.complaint.CustomerComplaintService
;
import
cn.iocoder.yudao.module.customer.service.customer.complaint.CustomerComplaintService
;
import
cn.iocoder.yudao.module.customer.service.customer.complaint.follow.CustomerFollowService
;
import
cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.customer.service.customerCredit.CustomerCreditService
;
import
cn.iocoder.yudao.module.customer.service.customerFollowup.CustomerFollowupService
;
import
cn.iocoder.yudao.module.customer.service.customerLevel.CustomerLevelService
;
import
cn.iocoder.yudao.module.customer.service.customerLevelLog.CustomerLevelLogService
;
import
cn.iocoder.yudao.module.customer.service.customerLevelLog.CustomerLevelLogService
;
import
cn.iocoder.yudao.module.customer.service.customerLevelLog.CustomerLevelLogServiceImpl
;
import
cn.iocoder.yudao.module.customer.service.customerOperateLog.CustomerOperateLogService
;
import
cn.iocoder.yudao.module.customer.service.customerOperateLog.CustomerOperateLogService
;
import
cn.iocoder.yudao.module.customer.vo.customerOperateLog.CustomerOperateLogCreateReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customerOperateLog.CustomerOperateLogCreateReqVO
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum
;
...
@@ -60,7 +58,7 @@ public class CustomerMergeServiceImpl implements CustomerMergeService {
...
@@ -60,7 +58,7 @@ public class CustomerMergeServiceImpl implements CustomerMergeService {
//客户跟进
//客户跟进
@Resource
@Resource
CustomerFollow
Service
customerFollow
Service
;
CustomerFollow
upService
customerFollowup
Service
;
@Resource
@Resource
private
CustomerComplaintService
customerComplaintService
;
private
CustomerComplaintService
customerComplaintService
;
...
@@ -134,7 +132,7 @@ public class CustomerMergeServiceImpl implements CustomerMergeService {
...
@@ -134,7 +132,7 @@ public class CustomerMergeServiceImpl implements CustomerMergeService {
//合并报价单 2
//合并报价单 2
doMogeOffer
(
customerDOSaved
,
customerDODeleted
,
loginUserId
);
doMogeOffer
(
customerDOSaved
,
customerDODeleted
,
loginUserId
);
//合并跟进记录 3
//合并跟进记录 3
doMergeCustomerFollow
(
customerDOSaved
,
customerDODeleted
,
loginUserId
);
doMergeCustomerFollow
up
(
customerDOSaved
,
customerDODeleted
,
loginUserId
);
//合并客户投诉 4
//合并客户投诉 4
doMergeCustomerComplaint
(
customerDOSaved
,
customerDODeleted
,
loginUserId
);
doMergeCustomerComplaint
(
customerDOSaved
,
customerDODeleted
,
loginUserId
);
//合并产品品牌授权 6
//合并产品品牌授权 6
...
@@ -293,19 +291,19 @@ public class CustomerMergeServiceImpl implements CustomerMergeService {
...
@@ -293,19 +291,19 @@ public class CustomerMergeServiceImpl implements CustomerMergeService {
//合并客户跟进
//合并客户跟进
private
void
doMergeCustomerFollow
(
CustomerDO
customerDOSaved
,
private
void
doMergeCustomerFollow
up
(
CustomerDO
customerDOSaved
,
CustomerDO
customerDODeleted
,
CustomerDO
customerDODeleted
,
long
loginUserId
)
{
long
loginUserId
)
{
LambdaQueryWrapperX
q2
=
LambdaQueryWrapperX
q2
=
new
LambdaQueryWrapperX
<
CustomerFollowDO
>().
new
LambdaQueryWrapperX
<
CustomerFollow
up
DO
>().
eq
(
CustomerFollowDO:
:
getCustomerId
,
customerDODeleted
.
getId
());
eq
(
CustomerFollow
up
DO:
:
getCustomerId
,
customerDODeleted
.
getId
());
List
<
CustomerFollow
DO
>
list
=
customerFollow
Service
.
selectList
(
q2
);
List
<
CustomerFollow
upDO
>
list
=
customerFollowup
Service
.
selectList
(
q2
);
if
(
CollectionUtil
.
isEmpty
(
list
))
return
;
if
(
CollectionUtil
.
isEmpty
(
list
))
return
;
for
(
CustomerFollowDO
d
:
list
for
(
CustomerFollow
up
DO
d
:
list
)
{
)
{
d
.
setCustomerId
(
customerDOSaved
.
getId
());
d
.
setCustomerId
(
customerDOSaved
.
getId
());
customerFollowService
.
updateById
(
d
);
customerFollow
up
Service
.
updateById
(
d
);
}
}
}
}
...
...
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/admin/warehouse/WarehouseController.java
View file @
2ec88a7c
...
@@ -33,6 +33,7 @@ import java.io.IOException;
...
@@ -33,6 +33,7 @@ import java.io.IOException;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
error
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
...
@@ -109,7 +110,7 @@ public class WarehouseController {
...
@@ -109,7 +110,7 @@ public class WarehouseController {
@GetMapping
(
"/getGuojiaAndShiAndWarehouseList"
)
@GetMapping
(
"/getGuojiaAndShiAndWarehouseList"
)
@ApiOperation
(
"获取仓库区域并行国家、城市、仓库列表"
)
@ApiOperation
(
"获取仓库区域并行国家、城市、仓库列表"
)
@ApiImplicitParam
(
name
=
"tradeType"
,
value
=
"进出口类型,1-进口,2-出口"
,
required
=
fals
e
,
example
=
"1"
,
dataTypeClass
=
Integer
.
class
)
@ApiImplicitParam
(
name
=
"tradeType"
,
value
=
"进出口类型,1-进口,2-出口"
,
required
=
tru
e
,
example
=
"1"
,
dataTypeClass
=
Integer
.
class
)
public
CommonResult
<
WarehouseListVO
>
getGuojiaAndShiAndWarehouseList
(
Integer
tradeType
){
public
CommonResult
<
WarehouseListVO
>
getGuojiaAndShiAndWarehouseList
(
Integer
tradeType
){
WarehouseListVO
warehouseListVO
=
warehouseService
.
getGuojiaAndShiAndWarehouseList
(
tradeType
);
WarehouseListVO
warehouseListVO
=
warehouseService
.
getGuojiaAndShiAndWarehouseList
(
tradeType
);
return
success
(
warehouseListVO
);
return
success
(
warehouseListVO
);
...
@@ -216,6 +217,9 @@ public class WarehouseController {
...
@@ -216,6 +217,9 @@ public class WarehouseController {
channelInfoEvent
.
setChannelId
(
requestVO
.
getChannelId
());
channelInfoEvent
.
setChannelId
(
requestVO
.
getChannelId
());
applicationContext
.
publishEvent
(
channelInfoEvent
);
applicationContext
.
publishEvent
(
channelInfoEvent
);
if
(
Objects
.
nonNull
(
channelInfoEvent
.
getCountryId
())
&&
channelInfoEvent
.
getCountryId
()
>
0L
){
if
(
Objects
.
nonNull
(
channelInfoEvent
.
getCountryId
())
&&
channelInfoEvent
.
getCountryId
()
>
0L
){
if
(
Objects
.
nonNull
(
requestVO
.
getDestCountryId
())
&&
requestVO
.
getDestCountryId
()
>
0L
&&
!
Objects
.
equals
(
requestVO
.
getDestCountryId
(),
channelInfoEvent
.
getCountryId
()))
{
return
error
(
400
,
"目的国与渠道不匹配"
);
}
requestVO
.
setDestCountryId
(
channelInfoEvent
.
getCountryId
());
requestVO
.
setDestCountryId
(
channelInfoEvent
.
getCountryId
());
}
}
}
}
...
...
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/app/warehouse/AppWarehouseController.java
View file @
2ec88a7c
...
@@ -29,6 +29,7 @@ import javax.validation.Valid;
...
@@ -29,6 +29,7 @@ import javax.validation.Valid;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
error
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
@Api
(
tags
=
"app-web - 仓库"
)
@Api
(
tags
=
"app-web - 仓库"
)
...
@@ -137,6 +138,9 @@ public class AppWarehouseController {
...
@@ -137,6 +138,9 @@ public class AppWarehouseController {
channelInfoEvent
.
setChannelId
(
requestVO
.
getChannelId
());
channelInfoEvent
.
setChannelId
(
requestVO
.
getChannelId
());
applicationContext
.
publishEvent
(
channelInfoEvent
);
applicationContext
.
publishEvent
(
channelInfoEvent
);
if
(
Objects
.
nonNull
(
channelInfoEvent
.
getCountryId
())
&&
channelInfoEvent
.
getCountryId
()
>
0L
){
if
(
Objects
.
nonNull
(
channelInfoEvent
.
getCountryId
())
&&
channelInfoEvent
.
getCountryId
()
>
0L
){
if
(
Objects
.
nonNull
(
requestVO
.
getDestCountryId
())
&&
requestVO
.
getDestCountryId
()
>
0L
&&
!
Objects
.
equals
(
requestVO
.
getDestCountryId
(),
channelInfoEvent
.
getCountryId
()))
{
return
error
(
400
,
"目的国与渠道不匹配"
);
}
requestVO
.
setDestCountryId
(
channelInfoEvent
.
getCountryId
());
requestVO
.
setDestCountryId
(
channelInfoEvent
.
getCountryId
());
}
}
}
}
...
@@ -186,7 +190,7 @@ public class AppWarehouseController {
...
@@ -186,7 +190,7 @@ public class AppWarehouseController {
@GetMapping
(
"/getGuojiaAndShiAndWarehouseList"
)
@GetMapping
(
"/getGuojiaAndShiAndWarehouseList"
)
@ApiOperation
(
"获取仓库区域并行国家、城市、仓库列表"
)
@ApiOperation
(
"获取仓库区域并行国家、城市、仓库列表"
)
@ApiImplicitParam
(
name
=
"tradeType"
,
value
=
"进出口类型,1-进口,2-出口"
,
required
=
fals
e
,
example
=
"1"
,
dataTypeClass
=
Integer
.
class
)
@ApiImplicitParam
(
name
=
"tradeType"
,
value
=
"进出口类型,1-进口,2-出口"
,
required
=
tru
e
,
example
=
"1"
,
dataTypeClass
=
Integer
.
class
)
public
CommonResult
<
WarehouseListVO
>
getGuojiaAndShiAndWarehouseList
(
Integer
tradeType
){
public
CommonResult
<
WarehouseListVO
>
getGuojiaAndShiAndWarehouseList
(
Integer
tradeType
){
WarehouseListVO
warehouseListVO
=
warehouseService
.
getGuojiaAndShiAndWarehouseList
(
tradeType
);
WarehouseListVO
warehouseListVO
=
warehouseService
.
getGuojiaAndShiAndWarehouseList
(
tradeType
);
return
success
(
warehouseListVO
);
return
success
(
warehouseListVO
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/mysql/orderCargoControlPick/OrderCargoControlPickMapper.java
View file @
2ec88a7c
...
@@ -111,6 +111,10 @@ public interface OrderCargoControlPickMapper extends AbstractMapper<OrderCargoCo
...
@@ -111,6 +111,10 @@ public interface OrderCargoControlPickMapper extends AbstractMapper<OrderCargoCo
"o.sum_volume, "
,
"o.sum_volume, "
,
"o.sum_weight, "
,
"o.sum_weight, "
,
"o.create_time, "
,
"o.create_time, "
,
"o.`unload_time`, "
,
"o.`is_limit_update_consignee`, "
,
"o.`lock_consignee_time`, "
,
"o.`lock_consignee_day`, "
,
"nee.name as consignee_name, "
,
"nee.name as consignee_name, "
,
"nee.name_en as consignee_name_en, "
,
"nee.name_en as consignee_name_en, "
,
"nee.phone as consignee_phone, "
,
"nee.phone as consignee_phone, "
,
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
2ec88a7c
...
@@ -2322,6 +2322,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2322,6 +2322,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
//15 是费用计算
//15 是费用计算
//10 入仓更新
//10 入仓更新
//30 空运定时刷新价格
//30 空运定时刷新价格
@Override
public
void
costCalculation
(
String
userId
,
public
void
costCalculation
(
String
userId
,
OrderDO
orderDO
,
OrderDO
orderDO
,
Long
consignorCustomerId
,
Long
consignorCustomerId
,
...
@@ -2728,7 +2729,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2728,7 +2729,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
// 拆单后的子订单直接去生成应收
// 拆单后的子订单直接去生成应收
isPayAdvanceException
=
this
.
addOrderReceivable
(
orderDO
,
1
);
isPayAdvanceException
=
this
.
addOrderReceivable
(
orderDO
,
1
);
}
else
{
}
else
{
if
(
type
==
6
&&
Objects
.
equals
(
orderDO
.
getInWarehouseState
(),
OrderWarehouseInStatusEnum
.
warehouse_finished
.
getValue
()))
{
if
(
(
type
==
6
||
type
==
12
)
&&
Objects
.
equals
(
orderDO
.
getInWarehouseState
(),
OrderWarehouseInStatusEnum
.
warehouse_finished
.
getValue
()))
{
// 处理未报价时,如果是已入仓产品去生成应收
// 处理未报价时,如果是已入仓产品去生成应收
isPayAdvanceException
=
this
.
addOrderReceivable
(
orderDO
,
isPayAdvanceException
=
this
.
addOrderReceivable
(
orderDO
,
1
);
1
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
2ec88a7c
...
@@ -312,7 +312,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -312,7 +312,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
String
creator
=
String
.
valueOf
(
loginUser
!=
null
?
loginUser
.
getId
()
:
null
);
String
creator
=
String
.
valueOf
(
loginUser
!=
null
?
loginUser
.
getId
()
:
null
);
Date
now
=
new
Date
();
Date
now
=
new
Date
();
if
(
Objects
.
nonNull
(
createReqVO
.
getHarvestMethod
())
&&
createReqVO
.
getHarvestMethod
()
==
2
)
{
order
.
setCountry
(
createReqVO
.
getCountry
());
order
.
setProvince
(
createReqVO
.
getProvince
());
order
.
setCity
(
createReqVO
.
getCity
());
order
.
setConsigneeAddress
(
createReqVO
.
getConsigneeAddress
());
}
else
{
order
.
setCountry
(
0L
);
order
.
setProvince
(
0L
);
order
.
setCity
(
0L
);
order
.
setConsigneeAddress
(
""
);
}
order
.
setCreator
(
creator
);
order
.
setCreator
(
creator
);
order
.
setUpdater
(
creator
);
order
.
setUpdater
(
creator
);
order
.
setCreateTime
(
now
);
order
.
setCreateTime
(
now
);
...
@@ -619,8 +629,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -619,8 +629,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO
.
setCompanyEn
(
createReqVO
.
getConsigneeCompanyEn
());
orderConsigneeDO
.
setCompanyEn
(
createReqVO
.
getConsigneeCompanyEn
());
orderConsigneeDO
.
setHarvestMethod
(
createReqVO
.
getHarvestMethod
());
// 收货方式
orderConsigneeDO
.
setHarvestMethod
(
createReqVO
.
getHarvestMethod
());
// 收货方式
if
(
StringUtils
.
isNotBlank
(
createReqVO
.
getConsigneeAddress
()))
{
if
(
Objects
.
nonNull
(
createReqVO
.
getHarvestMethod
())
&&
createReqVO
.
getHarvestMethod
()
==
2
)
{
orderConsigneeDO
.
setAddress
(
createReqVO
.
getConsigneeAddress
());
if
(
StringUtils
.
isNotBlank
(
createReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
createReqVO
.
getConsigneeAddress
());
}
}
else
{
orderConsigneeDO
.
setAddress
(
""
);
}
}
orderConsigneeDO
.
setCountry
(
createReqVO
.
getCountry
());
orderConsigneeDO
.
setCountry
(
createReqVO
.
getCountry
());
orderConsigneeDO
.
setProvince
(
createReqVO
.
getProvince
());
orderConsigneeDO
.
setProvince
(
createReqVO
.
getProvince
());
...
@@ -684,7 +698,11 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -684,7 +698,11 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeService
.
save
(
orderConsigneeDO
);
orderConsigneeService
.
save
(
orderConsigneeDO
);
}
else
{
}
else
{
// 控货订单没有收货人则不限制修改收货人
// 控货订单没有收货人则不限制修改收货人
order
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
if
(
order
.
getIsCargoControl
()
&&
!
hasConsignee
)
{
order
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
}
else
{
order
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
}
}
}
if
(!
Objects
.
equals
(
createReqVO
.
getStatus
(),
DRAFT
.
getValue
()))
{
if
(!
Objects
.
equals
(
createReqVO
.
getStatus
(),
DRAFT
.
getValue
()))
{
//customerType 发货人-1 收货人 2
//customerType 发货人-1 收货人 2
...
@@ -879,9 +897,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -879,9 +897,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO
.
setHarvestMethod
(
createReqVO
.
getHarvestMethod
());
orderConsigneeDO
.
setHarvestMethod
(
createReqVO
.
getHarvestMethod
());
//收货方式
//收货方式
if
(
Objects
.
nonNull
(
createReqVO
.
getHarvestMethod
())
&&
createReqVO
.
getHarvestMethod
()
==
2
)
{
if
(
StringUtils
.
isNotBlank
(
createReqVO
.
getConsigneeAddress
()))
{
if
(
StringUtils
.
isNotBlank
(
createReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
createReqVO
.
getConsigneeAddress
());
orderConsigneeDO
.
setAddress
(
createReqVO
.
getConsigneeAddress
());
}
}
else
{
orderConsigneeDO
.
setAddress
(
""
);
}
}
orderConsigneeDO
.
setCountry
(
createReqVO
.
getCountry
());
orderConsigneeDO
.
setCountry
(
createReqVO
.
getCountry
());
orderConsigneeDO
.
setProvince
(
createReqVO
.
getProvince
());
orderConsigneeDO
.
setProvince
(
createReqVO
.
getProvince
());
...
@@ -931,7 +952,11 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -931,7 +952,11 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
}
else
{
}
else
{
// 控货订单没有收货人则不限制修改收货人
// 控货订单没有收货人则不限制修改收货人
order
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
if
(
order
.
getIsCargoControl
()
&&
!
hasConsignee
)
{
order
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
}
else
{
order
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
}
}
}
if
(!
Objects
.
equals
(
createReqVO
.
getStatus
(),
if
(!
Objects
.
equals
(
createReqVO
.
getStatus
(),
DRAFT
.
getValue
()))
{
DRAFT
.
getValue
()))
{
...
@@ -1627,7 +1652,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1627,7 +1652,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
Date
now
=
new
Date
();
Date
now
=
new
Date
();
updateObj
.
setUpdater
(
updater
);
updateObj
.
setUpdater
(
updater
);
updateObj
.
setUpdateTime
(
now
);
updateObj
.
setUpdateTime
(
now
);
if
(
Objects
.
nonNull
(
updateReqVO
.
getHarvestMethod
())
&&
updateReqVO
.
getHarvestMethod
()
==
2
)
{
updateObj
.
setCountry
(
updateReqVO
.
getCountry
());
updateObj
.
setProvince
(
updateReqVO
.
getProvince
());
updateObj
.
setCity
(
updateReqVO
.
getCity
());
updateObj
.
setConsigneeAddress
(
updateReqVO
.
getConsigneeAddress
());
}
else
{
updateObj
.
setCountry
(
0L
);
updateObj
.
setProvince
(
0L
);
updateObj
.
setCity
(
0L
);
updateObj
.
setConsigneeAddress
(
""
);
}
departureDO
.
setUpdater
(
updater
);
departureDO
.
setUpdater
(
updater
);
departureDO
.
setUpdateTime
(
now
);
departureDO
.
setUpdateTime
(
now
);
departureDO
.
setDepartureCountryId
(
logisticsInfoDto
.
getStartCountryId
());
departureDO
.
setDepartureCountryId
(
logisticsInfoDto
.
getStartCountryId
());
...
@@ -2947,6 +2982,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -2947,6 +2982,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeBackVO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
orderConsigneeBackVO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
orderConsigneeBackVO
.
setHarvestMethod
(
updateReqVO
.
getHarvestMethod
());
orderConsigneeBackVO
.
setHarvestMethod
(
updateReqVO
.
getHarvestMethod
());
vo
.
setConsigneeVO
(
orderConsigneeBackVO
);
vo
.
setConsigneeVO
(
orderConsigneeBackVO
);
vo
.
setCountry
(
updateReqVO
.
getCountry
());
vo
.
setProvince
(
updateReqVO
.
getProvince
());
vo
.
setCity
(
updateReqVO
.
getCity
());
vo
.
setConsigneeAddress
(
updateReqVO
.
getConsigneeAddress
());
}
else
{
vo
.
setCountry
(
0L
);
vo
.
setProvince
(
0L
);
vo
.
setCity
(
0L
);
vo
.
setConsigneeAddress
(
""
);
}
}
applyInfoList
.
add
(
infoVO
);
applyInfoList
.
add
(
infoVO
);
}
}
...
@@ -3214,8 +3258,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3214,8 +3258,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO
.
setCompanyEn
(
updateReqVO
.
getConsigneeCompanyEn
());
orderConsigneeDO
.
setCompanyEn
(
updateReqVO
.
getConsigneeCompanyEn
());
orderConsigneeDO
.
setHarvestMethod
(
updateReqVO
.
getHarvestMethod
());
// 收货方式
orderConsigneeDO
.
setHarvestMethod
(
updateReqVO
.
getHarvestMethod
());
// 收货方式
if
(
StringUtils
.
isNotBlank
(
updateReqVO
.
getConsigneeAddress
()))
{
if
(
Objects
.
nonNull
(
updateReqVO
.
getHarvestMethod
())
&&
updateReqVO
.
getHarvestMethod
()
==
2
)
{
orderConsigneeDO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
if
(
StringUtils
.
isNotBlank
(
updateReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
}
}
else
{
orderConsigneeDO
.
setAddress
(
""
);
}
}
orderConsigneeDO
.
setCountry
(
updateReqVO
.
getCountry
());
orderConsigneeDO
.
setCountry
(
updateReqVO
.
getCountry
());
orderConsigneeDO
.
setProvince
(
updateReqVO
.
getProvince
());
orderConsigneeDO
.
setProvince
(
updateReqVO
.
getProvince
());
...
@@ -3267,12 +3315,16 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3267,12 +3315,16 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeService
.
saveOrUpdate
(
orderConsigneeDO
);
orderConsigneeService
.
saveOrUpdate
(
orderConsigneeDO
);
}
else
{
}
else
{
// 如果控货订单发货人设置了控货无收货人,则需要删除订单已有收货人
// 如果控货订单发货人设置了控货无收货人,则需要删除订单已有收货人
if
(
Objects
.
nonNull
(
orderConsigneeDO
))
{
if
(
Objects
.
nonNull
(
orderConsigneeDO
)
&&
!
hasConsignee
)
{
orderConsigneeService
.
removeById
(
orderConsigneeDO
.
getId
());
orderConsigneeService
.
removeById
(
orderConsigneeDO
.
getId
());
orderConsigneeDO
=
null
;
orderConsigneeDO
=
null
;
}
}
// 控货订单没有收货人则不限制修改收货人
// 控货订单没有收货人则不限制修改收货人
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
if
(
updateObj
.
getIsCargoControl
()
&&
!
hasConsignee
)
{
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
}
else
{
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
}
}
}
if
(!
Objects
.
equals
(
updateReqVO
.
getStatus
(),
if
(!
Objects
.
equals
(
updateReqVO
.
getStatus
(),
DRAFT
.
getValue
()))
{
DRAFT
.
getValue
()))
{
...
@@ -3481,8 +3533,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3481,8 +3533,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
throw
exception
(
CONSIGNEE_PHONE_IS_EXTERNAL
);
throw
exception
(
CONSIGNEE_PHONE_IS_EXTERNAL
);
}
}
orderConsigneeDO
.
setHarvestMethod
(
updateReqVO
.
getHarvestMethod
());
// 收货方式
orderConsigneeDO
.
setHarvestMethod
(
updateReqVO
.
getHarvestMethod
());
// 收货方式
if
(
StringUtils
.
isNotBlank
(
updateReqVO
.
getConsigneeAddress
()))
{
if
(
Objects
.
nonNull
(
updateReqVO
.
getHarvestMethod
())
&&
updateReqVO
.
getHarvestMethod
()
==
2
)
{
orderConsigneeDO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
if
(
StringUtils
.
isNotBlank
(
updateReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
}
}
else
{
orderConsigneeDO
.
setAddress
(
""
);
}
}
orderConsigneeDO
.
setOrderId
(
updateObj
.
getOrderId
());
orderConsigneeDO
.
setOrderId
(
updateObj
.
getOrderId
());
orderConsigneeDO
.
setUpdater
(
updater
);
orderConsigneeDO
.
setUpdater
(
updater
);
...
@@ -3526,13 +3582,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3526,13 +3582,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
}
else
{
}
else
{
// 如果控货订单发货人设置了控货无收货人,则需要删除订单已有收货人
// 如果控货订单发货人设置了控货无收货人,则需要删除订单已有收货人
if
(
Objects
.
nonNull
(
orderConsigneeDO
))
{
if
(
Objects
.
nonNull
(
orderConsigneeDO
)
&&
!
hasConsignee
)
{
orderConsigneeService
.
removeById
(
orderConsigneeDO
.
getId
());
orderConsigneeService
.
removeById
(
orderConsigneeDO
.
getId
());
orderConsigneeDO
=
null
;
orderConsigneeDO
=
null
;
}
}
consigneeDO
=
null
;
consigneeDO
=
null
;
// 控货订单没有收货人则不限制修改收货人
// 控货订单没有收货人则不限制修改收货人
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
if
(
updateObj
.
getIsCargoControl
()
&&
!
hasConsignee
)
{
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
}
else
{
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
}
}
}
if
(!
Objects
.
equals
(
updateReqVO
.
getStatus
(),
if
(!
Objects
.
equals
(
updateReqVO
.
getStatus
(),
DRAFT
.
getValue
()))
{
DRAFT
.
getValue
()))
{
...
...
yudao-module-order/yudao-module-order-core/src/main/resources/mapper/order/OrderMapper.xml
View file @
2ec88a7c
...
@@ -6563,8 +6563,6 @@
...
@@ -6563,8 +6563,6 @@
from (
from (
select
select
o.*,
o.*,
o.release_num,
o.release_ratio,
occ.`name` as cargo_control_name,
occ.`name` as cargo_control_name,
occ.dial_code as cargo_control_country_code,
occ.dial_code as cargo_control_country_code,
occ.phone as cargo_control_phone,
occ.phone as cargo_control_phone,
...
...
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