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
131b816c
Commit
131b816c
authored
Jul 25, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单业绩客户新老状态更新冗余业务补充完善
parent
d6876ce0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
9 deletions
+55
-9
update_2024-07.sql
sql/update_2024-07.sql
+10
-0
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+36
-0
DeptTargetMapper.xml
...src/main/resources/mapper/deptTarget/DeptTargetMapper.xml
+9
-9
No files found.
sql/update_2024-07.sql
View file @
131b816c
...
@@ -53,9 +53,19 @@ CREATE TABLE `ecw_vz` (
...
@@ -53,9 +53,19 @@ CREATE TABLE `ecw_vz` (
)
ENGINE
=
InnoDB
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'计量单位表'
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'计量单位表'
;
alter
table
`ecw_target_log`
add
column
`loglev`
int
DEFAULT
NULL
COMMENT
'逻辑计算来源'
;
alter
table
`ecw_target_log`
add
column
`gsf`
varchar
(
800
)
COLLATE
utf8mb4_general_ci
DEFAULT
NULL
;
alter
table
`ecw_target_log`
add
column
`gstype`
int
DEFAULT
NULL
;
-- 新增订单产生业绩时归属客户状态
-- 新增订单产生业绩时归属客户状态
alter
table
`ecw_order`
alter
table
`ecw_order`
add
column
`is_in_open_sea`
tinyint
DEFAULT
'0'
COMMENT
'是否公海客户'
,
add
column
`is_in_open_sea`
tinyint
DEFAULT
'0'
COMMENT
'是否公海客户'
,
-- 2024-07-25 刷新订单业绩客户新老客户状态冗余参数
update
ecw_order
o
left
join
ecw_customer
c
on
c
.
id
=
o
.
customer_id
set
o
.
yeji_type
=
IFNULL
(
c
.
is_new
,
1
);
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
131b816c
...
@@ -384,6 +384,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -384,6 +384,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
Objects
.
nonNull
(
customerDO
.
getIsShowTidanPrice
()))
{
Objects
.
nonNull
(
customerDO
.
getIsShowTidanPrice
()))
{
order
.
setDisplayBillLadingPrice
(
customerDO
.
getIsShowTidanPrice
());
order
.
setDisplayBillLadingPrice
(
customerDO
.
getIsShowTidanPrice
());
order
.
setIsInOpenSea
(
customerDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
customerDO
.
getIsInOpenSea
());
order
.
setYejiType
(
customerDO
.
getIsNew
()
?
1
:
0
);
}
}
}
}
}
}
...
@@ -1031,6 +1032,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1031,6 +1032,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
consignorDO
!=
null
)
{
if
(
consignorDO
!=
null
)
{
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
}
}
...
@@ -1046,16 +1048,19 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1046,16 +1048,19 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
}
else
if
(
order
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
())
{
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
}
else
if
(
order
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
())
{
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
}
else
{
}
else
{
//都不符合,归属收货人
//都不符合,归属收货人
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
}
}
}
else
if
(
order
.
getDrawee
()
==
2
)
{
}
else
if
(
order
.
getDrawee
()
==
2
)
{
...
@@ -1063,6 +1068,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1063,6 +1068,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
consigneeDO
!=
null
)
{
if
(
consigneeDO
!=
null
)
{
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
());
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
());
}
else
{
}
else
{
order
.
setCustomerId
(
0L
);
order
.
setCustomerId
(
0L
);
...
@@ -1083,25 +1089,30 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1083,25 +1089,30 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
}
else
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
)
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
}
else
if
(
CollectionUtil
.
isNotEmpty
(
offerBackVOList
)
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
}
else
{
}
else
{
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
}
}
...
@@ -1124,6 +1135,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1124,6 +1135,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
//业绩归属收货人
//业绩归属收货人
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
}
}
...
@@ -1151,6 +1163,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1151,6 +1163,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
consignorDO
!=
null
)
{
if
(
consignorDO
!=
null
)
{
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
}
}
...
@@ -1162,15 +1175,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1162,15 +1175,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
}
else
if
(
order
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
())
{
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
}
else
if
(
order
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
())
{
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
}
else
{
}
else
{
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
// order.setCustomerId(0L);
// order.setCustomerId(0L);
// order.setSalesmanId(0L);
// order.setSalesmanId(0L);
...
@@ -1179,6 +1195,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1179,6 +1195,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
consigneeDO
!=
null
)
{
if
(
consigneeDO
!=
null
)
{
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
());
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
());
}
else
{
}
else
{
//没有收货人
//没有收货人
...
@@ -1202,26 +1219,31 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1202,26 +1219,31 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
}
else
if
(
createReqVO
.
getOfferId
()
!=
null
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
}
else
if
(
createReqVO
.
getOfferId
()
!=
null
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
}
else
{
}
else
{
//去掉层级5、6 ,以上不符合的都归收货人
//去掉层级5、6 ,以上不符合的都归收货人
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
}
}
...
@@ -1232,6 +1254,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1232,6 +1254,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
//业绩归收货人
//业绩归收货人
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
}
}
...
@@ -1260,6 +1283,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1260,6 +1283,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 海外仓归属发货人
// 海外仓归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
customerType
=
1
;
customerType
=
1
;
}
else
{
}
else
{
...
@@ -1267,6 +1291,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1267,6 +1291,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
consignorDO
!=
null
)
{
if
(
consignorDO
!=
null
)
{
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
customerType
=
1
;
customerType
=
1
;
}
}
...
@@ -1279,17 +1304,20 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1279,17 +1304,20 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
()
!=
null
?
consignorDO
.
getCustomerService
()
:
0
);
customerType
=
1
;
customerType
=
1
;
}
else
if
(
order
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
())
{
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
}
else
if
(
order
.
getDrawee
()
==
1
&&
consignorDO
.
getDefaultPay
())
{
// 如果是发货人付款且档案设置默认付运费 --层级4 第一个
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
customerType
=
1
;
customerType
=
1
;
}
else
{
}
else
{
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
customerType
=
2
;
customerType
=
2
;
// order.setCustomerId(0L);
// order.setCustomerId(0L);
...
@@ -1299,6 +1327,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1299,6 +1327,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
consigneeDO
!=
null
)
{
if
(
consigneeDO
!=
null
)
{
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
());
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
());
customerType
=
1
;
customerType
=
1
;
}
else
{
}
else
{
...
@@ -1322,23 +1351,27 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1322,23 +1351,27 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
customerType
=
1
;
customerType
=
1
;
}
else
if
(
offerId
!=
null
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
}
else
if
(
offerId
!=
null
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
//层级3 第三个 订单关联报价单 && 自定义付款 且发货人付清关费
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
customerType
=
1
;
customerType
=
1
;
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
freight
==
1
))
{
//层级4 第二个 发货人档案设置默认付运费 且发货人付运费 业绩归属 发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
customerType
=
1
;
customerType
=
1
;
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
}
else
if
(
consignorDO
.
getDefaultPay
()
&&
(
order
.
getDrawee
()
==
3
&&
clearanceFee
==
1
))
{
// 层级4 第三个 发货人档案设置默认付运费 且发货人付清关费 业绩归属发货人
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setCustomerId
(
orderConsignorDO
.
getCustomerId
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consignorDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consignorDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
order
.
setSalesmanId
(
consignorDO
.
getCustomerService
());
customerType
=
1
;
customerType
=
1
;
...
@@ -1346,6 +1379,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1346,6 +1379,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
//去掉层级5、6 ,以上不符合的都归收货人
//去掉层级5、6 ,以上不符合的都归收货人
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
customerType
=
2
;
customerType
=
2
;
...
@@ -1358,6 +1392,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1358,6 +1392,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
//业绩归收货人
//业绩归收货人
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setCustomerId
(
orderConsigneeDO
.
getCustomerId
()
!=
null
?
orderConsigneeDO
.
getCustomerId
()
:
0
);
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setIsInOpenSea
(
consigneeDO
.
getIsInOpenSea
());
order
.
setYejiType
(
consigneeDO
.
getIsNew
()
?
1
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
order
.
setSalesmanId
(
consigneeDO
.
getCustomerService
()
!=
null
?
consigneeDO
.
getCustomerService
()
:
0
);
customerType
=
2
;
customerType
=
2
;
...
@@ -2195,6 +2230,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -2195,6 +2230,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
nonNull
(
customerDO
)
&&
Objects
.
nonNull
(
customerDO
.
getIsShowTidanPrice
()))
{
if
(
Objects
.
nonNull
(
customerDO
)
&&
Objects
.
nonNull
(
customerDO
.
getIsShowTidanPrice
()))
{
updateObj
.
setDisplayBillLadingPrice
(
customerDO
.
getIsShowTidanPrice
());
updateObj
.
setDisplayBillLadingPrice
(
customerDO
.
getIsShowTidanPrice
());
updateObj
.
setIsInOpenSea
(
customerDO
.
getIsInOpenSea
());
updateObj
.
setIsInOpenSea
(
customerDO
.
getIsInOpenSea
());
updateObj
.
setYejiType
(
customerDO
.
getIsNew
()
?
1
:
0
);
}
}
}
}
}
}
...
...
yudao-module-sale/yudao-module-sale-core/src/main/resources/mapper/deptTarget/DeptTargetMapper.xml
View file @
131b816c
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
select * from (
select * from (
SELECT
SELECT
IFNULL(t6.resource_type,1) as customer_type,
IFNULL(t6.resource_type,1) as customer_type,
( CASE WHEN t
6.is_new
= 1 THEN '新客户' ELSE '旧客户' END ) AS achieveType,
( CASE WHEN t
1.yeji_type
= 1 THEN '新客户' ELSE '旧客户' END ) AS achieveType,
t2.number,
t2.number,
t1.order_no,
t1.order_no,
(CASE WHEN t9.customer_id=t.customer_id THEN t9.name ELSE tx.name END) as name,
(CASE WHEN t9.customer_id=t.customer_id THEN t9.name ELSE tx.name END) as name,
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
and t7.departure_warehouse_id = #{query.startWarehouseId}
and t7.departure_warehouse_id = #{query.startWarehouseId}
</if>
</if>
<if
test=
"query.achieveType != null"
>
<if
test=
"query.achieveType != null"
>
and t
6.is_new
= #{query.achieveType}
and t
1.yeji_type
= #{query.achieveType}
</if>
</if>
<if
test=
"query.destWarehouseIdList != null"
>
<if
test=
"query.destWarehouseIdList != null"
>
and t8.objective_warehouse_id in
and t8.objective_warehouse_id in
...
@@ -132,7 +132,7 @@
...
@@ -132,7 +132,7 @@
select * from (
select * from (
SELECT
SELECT
IFNULL(t6.resource_type,1) as customer_type,
IFNULL(t6.resource_type,1) as customer_type,
( CASE WHEN t
6.is_new
= 1 THEN '新客户' ELSE '旧客户' END ) AS achieveType,
( CASE WHEN t
1.yeji_type
= 1 THEN '新客户' ELSE '旧客户' END ) AS achieveType,
t2.number,
t2.number,
t1.order_no,
t1.order_no,
(CASE WHEN t9.customer_id=t.customer_id THEN t9.name ELSE tx.name END) as name,
(CASE WHEN t9.customer_id=t.customer_id THEN t9.name ELSE tx.name END) as name,
...
@@ -206,7 +206,7 @@
...
@@ -206,7 +206,7 @@
and t7.departure_warehouse_id = #{query.startWarehouseId}
and t7.departure_warehouse_id = #{query.startWarehouseId}
</if>
</if>
<if
test=
"query.achieveType != null"
>
<if
test=
"query.achieveType != null"
>
and t
6.is_new
= #{query.achieveType}
and t
1.yeji_type
= #{query.achieveType}
</if>
</if>
<if
test=
"query.destWarehouseIdList != null"
>
<if
test=
"query.destWarehouseIdList != null"
>
and t8.objective_warehouse_id in
and t8.objective_warehouse_id in
...
@@ -224,7 +224,7 @@
...
@@ -224,7 +224,7 @@
select * from (
select * from (
SELECT
SELECT
IFNULL(t6.resource_type,1) as customer_type,
IFNULL(t6.resource_type,1) as customer_type,
( CASE WHEN t
6.is_new
= 1 THEN '新客户' ELSE '旧客户' END ) AS achieveType,
( CASE WHEN t
1.yeji_type
= 1 THEN '新客户' ELSE '旧客户' END ) AS achieveType,
t2.number,
t2.number,
t1.order_no,
t1.order_no,
(CASE WHEN t9.customer_id=t.customer_id THEN t9.name ELSE tx.name END) as name,
(CASE WHEN t9.customer_id=t.customer_id THEN t9.name ELSE tx.name END) as name,
...
@@ -294,7 +294,7 @@
...
@@ -294,7 +294,7 @@
and t7.departure_warehouse_id = #{query.startWarehouseId}
and t7.departure_warehouse_id = #{query.startWarehouseId}
</if>
</if>
<if
test=
"query.achieveType != null"
>
<if
test=
"query.achieveType != null"
>
and t
6.is_new
= #{query.achieveType}
and t
1.yeji_type
= #{query.achieveType}
</if>
</if>
<if
test=
"query.destWarehouseIdList != null"
>
<if
test=
"query.destWarehouseIdList != null"
>
and t8.objective_warehouse_id in
and t8.objective_warehouse_id in
...
@@ -312,7 +312,7 @@
...
@@ -312,7 +312,7 @@
select * from (
select * from (
SELECT
SELECT
IFNULL(t6.resource_type,1) as customer_type,
IFNULL(t6.resource_type,1) as customer_type,
( CASE WHEN t
6.is_new
= 1 THEN '新客户' ELSE '旧客户' END ) AS achieveType,
( CASE WHEN t
1.yeji_type
= 1 THEN '新客户' ELSE '旧客户' END ) AS achieveType,
t2.number,
t2.number,
t1.order_no,
t1.order_no,
(CASE WHEN t9.customer_id=t.customer_id THEN t9.name ELSE tx.name END) as name,
(CASE WHEN t9.customer_id=t.customer_id THEN t9.name ELSE tx.name END) as name,
...
@@ -382,7 +382,7 @@
...
@@ -382,7 +382,7 @@
and t7.departure_warehouse_id = #{query.startWarehouseId}
and t7.departure_warehouse_id = #{query.startWarehouseId}
</if>
</if>
<if
test=
"query.achieveType != null"
>
<if
test=
"query.achieveType != null"
>
and t
6.is_new
= #{query.achieveType}
and t
1.yeji_type
= #{query.achieveType}
</if>
</if>
<if
test=
"query.destWarehouseIdList != null"
>
<if
test=
"query.destWarehouseIdList != null"
>
and t8.objective_warehouse_id in
and t8.objective_warehouse_id in
...
@@ -406,7 +406,7 @@
...
@@ -406,7 +406,7 @@
FROM
FROM
(
(
SELECT
SELECT
( CASE WHEN t
6.is_new
= 1 THEN '新客户' ELSE '旧客户' END ) AS cusType,
( CASE WHEN t
1.yeji_type
= 1 THEN '新客户' ELSE '旧客户' END ) AS cusType,
(
(
SELECT
SELECT
CASE
CASE
...
...
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