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
17b6c6bc
Commit
17b6c6bc
authored
Jun 24, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-24提交
parent
eaf0b25b
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
289 additions
and
66 deletions
+289
-66
CustomerMapper.xml
...ore/src/main/resources/mapper/customer/CustomerMapper.xml
+1
-1
CustomerAnalysisReq.java
...der/yudao/module/delivery/entity/CustomerAnalysisReq.java
+14
-4
CustomerAnalysisImpl.java
...ao/module/delivery/service/Impl/CustomerAnalysisImpl.java
+139
-3
CustomerAnalysisMapper.xml
...rest/src/main/resources/mapper/CustomerAnalysisMapper.xml
+35
-8
WarehouseAreaServiceImpl.java
...tory/service/warehouse/impl/WarehouseAreaServiceImpl.java
+2
-1
WarehouseAreaController.java
...y/controller/admin/warehouse/WarehouseAreaController.java
+6
-3
AppWarehouseAreaController.java
.../controller/app/warehouse/AppWarehouseAreaController.java
+2
-1
OrderExceptionServiceImpl.java
...der/service/orderException/OrderExceptionServiceImpl.java
+48
-24
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+12
-5
OrderExceptionMapper.xml
.../resources/mapper/orderException/OrderExceptionMapper.xml
+0
-7
OrderController.java
.../module/order/controller/admin/order/OrderController.java
+2
-1
OrderExceptionController.java
...eptionResult/orderException/OrderExceptionController.java
+22
-4
OrderLocationController.java
...ntroller/admin/orderLocation/OrderLocationController.java
+4
-2
AppOrderExceptionController.java
...oller/app/orderException/AppOrderExceptionController.java
+2
-1
ProdCostCalculation.java
...r/yudao/module/product/component/ProdCostCalculation.java
+0
-1
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/resources/mapper/customer/CustomerMapper.xml
View file @
17b6c6bc
...
...
@@ -11,7 +11,7 @@
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts s
where s.deleted = 0 and s.customer_id=contact.id) as all_contact_phone
from (select a.*,
c.name as default_contact_name
2
,
c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone,
(select GROUP_CONCAT(s.phone_new) from ecw_customer_contacts
s where s.deleted = 0 and s.customer_id=a.id) as default_contact_phone2,
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/CustomerAnalysisReq.java
View file @
17b6c6bc
...
...
@@ -6,6 +6,7 @@ import lombok.Data;
import
lombok.ToString
;
import
java.math.BigDecimal
;
import
java.util.List
;
/*
客户分析报表
...
...
@@ -35,23 +36,30 @@ public class CustomerAnalysisReq extends PageParam {
/*
客户国家
*/
private
String
country
;
private
List
<
String
>
country
;
private
String
countrystr
;
private
String
countrystrs
;
/*
客户来源
*/
private
int
source
;
private
List
<
Integer
>
source
;
private
String
sourcestr
;
private
String
sourcestrs
;
/*
销售经理
*/
private
String
salesmanid
;
private
String
salesmanidstr
;
private
String
salesmanidstrs
;
/*
部门ID
*/
private
String
deptid
;
private
String
deptidstr
;
private
String
deptidstrs
;
/*
客户姓名
...
...
@@ -77,7 +85,9 @@ public class CustomerAnalysisReq extends PageParam {
/*
客户角色
*/
private
String
customerrole
;
private
List
<
String
>
customerrole
;
private
String
customerrolestr
;
private
String
customerrolestrs
;
/*
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/CustomerAnalysisImpl.java
View file @
17b6c6bc
...
...
@@ -218,9 +218,146 @@ public class CustomerAnalysisImpl implements CustomerAnalysisService {
if (Req.getSearchData3() != null) {
Req.setSearchData3(Req.getSearchData3().divide(new BigDecimal(100)));
}*/
setCountry
(
Req
);
setCusRole
(
Req
);
setSource
(
Req
);
//setsalesmanid(Req);
//setDept(Req);
return
Req
;
}
/*
设置部门多选
private void setDept(CustomerAnalysisReq Req)
{
if (Req.getDeptid() != null && Req.getDeptid().size() > 0) {
if (Req.getDeptid().size() == 1) {
Req.setDeptidstr(Req.getDeptid().get(0).toString());
Req.setDeptidstrs("");
} else if (Req.getDeptid().size() > 1) {
String sR = "(";
for (String s : Req.getDeptid()
) {
sR += s + ",";
}
sR = sR.substring(0, sR.length() - 1);
sR += ")";
Req.setDeptidstr("");
Req.setDeptidstrs(sR);
}
} else {
Req.setDeptidstr("");
Req.setDeptidstrs("");
}
}
*/
/*
客户经理
private void setsalesmanid(CustomerAnalysisReq Req) {
if (Req.getSalesmanid() != null && Req.getSalesmanid().size() > 0) {
if (Req.getSalesmanid().size() == 1) {
Req.setSalesmanidstr(Req.getSalesmanid().get(0).toString());
Req.setSalesmanidstrs("");
} else if (Req.getSalesmanid().size() > 1) {
String sR = "(";
for (String s : Req.getSalesmanid()
) {
sR += s + ",";
}
sR = sR.substring(0, sR.length() - 1);
sR += ")";
Req.setSalesmanidstr("");
Req.setSalesmanidstrs(sR);
}
} else {
Req.setSalesmanidstr("");
Req.setSalesmanidstrs("");
}
}
*/
/*
客户来源
*/
private
void
setSource
(
CustomerAnalysisReq
Req
)
{
if
(
Req
.
getSource
()
!=
null
&&
Req
.
getSource
().
size
()
>
0
)
{
if
(
Req
.
getSource
().
size
()
==
1
)
{
Req
.
setSourcestr
(
Req
.
getSource
().
get
(
0
).
toString
());
Req
.
setSourcestrs
(
""
);
}
else
if
(
Req
.
getSource
().
size
()
>
1
)
{
String
sR
=
"("
;
for
(
int
s
:
Req
.
getSource
()
)
{
sR
+=
s
+
","
;
}
sR
=
sR
.
substring
(
0
,
sR
.
length
()
-
1
);
sR
+=
")"
;
Req
.
setSourcestr
(
""
);
Req
.
setSourcestrs
(
sR
);
}
}
else
{
Req
.
setSourcestr
(
""
);
Req
.
setSourcestrs
(
""
);
}
}
private
void
setCountry
(
CustomerAnalysisReq
Req
)
{
//设置多选查询条件 lanbm 2024-06-24 add
if
(
Req
.
getCountry
()
!=
null
&&
Req
.
getCountry
().
size
()
>
0
)
{
if
(
Req
.
getCountry
().
size
()
==
1
)
{
Req
.
setCountrystr
(
Req
.
getCountry
().
get
(
0
));
Req
.
setCountrystrs
(
""
);
}
else
if
(
Req
.
getCountry
().
size
()
>
1
)
{
String
sR
=
"("
;
for
(
String
s
:
Req
.
getCountry
()
)
{
sR
+=
s
+
","
;
}
sR
=
sR
.
substring
(
0
,
sR
.
length
()
-
1
);
sR
+=
")"
;
Req
.
setCountrystr
(
""
);
Req
.
setCountrystrs
(
sR
);
}
}
else
{
Req
.
setCountrystr
(
""
);
Req
.
setCountrystrs
(
""
);
}
}
/*
客户角色多选 lanbm 2024-06-24 add
*/
private
void
setCusRole
(
CustomerAnalysisReq
Req
)
{
if
(
Req
.
getCustomerrole
()
!=
null
&&
Req
.
getCustomerrole
().
size
()
>
0
)
{
if
(
Req
.
getCustomerrole
().
size
()
==
1
)
{
Req
.
setCustomerrolestr
(
Req
.
getCustomerrole
().
get
(
0
));
Req
.
setCustomerrolestrs
(
""
);
}
else
if
(
Req
.
getCustomerrole
().
size
()
>
1
)
{
String
sR
=
"("
;
for
(
String
s
:
Req
.
getCustomerrole
()
)
{
sR
+=
s
+
","
;
}
sR
=
sR
.
substring
(
0
,
sR
.
length
()
-
1
);
sR
+=
")"
;
Req
.
setCustomerrolestr
(
""
);
Req
.
setCustomerrolestrs
(
sR
);
}
}
else
{
Req
.
setCustomerrolestrs
(
""
);
Req
.
setCustomerrolestr
(
""
);
}
}
/*
获取某年某月的最后一天 lanbm 2024-04-16 add
...
...
@@ -687,7 +824,7 @@ public class CustomerAnalysisImpl implements CustomerAnalysisService {
// 计算百分比
double
percentage
=
number
/
(
double
)
divisor
;
// 格式化输出百分比
String
formatted
=
String
.
format
(
"%.2f%%"
,
percentage
*
100
);
String
formatted
=
String
.
format
(
"%.2f%%"
,
percentage
*
100
);
return
formatted
;
}
...
...
@@ -736,14 +873,13 @@ public class CustomerAnalysisImpl implements CustomerAnalysisService {
}
/*
lanbm 2024-04-26 add
*/
public
PageResult
<
CustomerAnalysisResp
>
getListPage_New
(
CustomerAnalysisReq
req
)
throws
JsonProcessingException
{
List
<
CustomerAnalysisResp
>
list
=
customerAnalysisMapper
.
getListPage_New
(
req
);
long
total
=
list
.
size
();
long
total
=
list
.
size
();
list
=
GetPageResult
(
list
,
req
.
getPageNo
(),
req
.
getPageSize
());
return
new
PageResult
<>(
list
,
total
,
req
.
getPageSize
(),
req
.
getPageNo
(),
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/resources/mapper/CustomerAnalysisMapper.xml
View file @
17b6c6bc
...
...
@@ -160,23 +160,50 @@
<!--业绩类型-->
and c.is_new= #{cusYjType}
</if>
<if
test=
"source!=null and source!=''"
>
and source= #{source}
<!--客户来源-->
<if
test=
"sourcestr!=null and sourcestr!=''"
>
and source= #{sourcestr}
</if>
<if
test=
"customerrole!=null and customerrole!=''"
>
and type= #{customerrole}
<if
test=
"sourcestrs!=null and sourcestrs!=''"
>
and source in ${sourcestrs}
</if>
<if
test=
"country!=null and country!=''"
>
and c.country= #{country}
<!--客户角色-->
<if
test=
"customerrolestr!=null and customerrolestr!=''"
>
and type =#{customerrolestr}
</if>
<if
test=
"salesmanid!=null and salesmanid!=''"
>
<if
test=
"customerrolestrs!=null and customerrolestrs!=''"
>
and type in ${customerrolestrs}
</if>
<!--lanbm 2024-06-24 添加国家多选功能-->
<if
test=
"countrystr!=null and countrystr!=''"
>
and c.country= #{countrystr}
</if>
<if
test=
"countrystrs!=null and countrystrs!=''"
>
and c.country in ${countrystrs}
</if>
<if
test=
"salesmanidstr!=null and salesmanidstr!=''"
>
<!--有具体的客户经理,就不算掉入公海池客户-->
and c.is_in_open_sea=0
and c.customer_service= #{salesmanid}
and c.customer_service= #{salesmanid
str
}
</if>
<if
test=
"salesmanidstrs!=null and salesmanidstrs!=''"
>
<!--有具体的客户经理,就不算掉入公海池客户-->
and c.is_in_open_sea=0
and c.customer_service in ${salesmanidstrs}
</if>
<if
test=
"deptid!=null and deptid!=''"
>
and u_d.dept_id= #{deptid}
</if>
<if
test=
"deptidstrs!=null and deptidstrs!=''"
>
and u_d.dept_id in ${deptidstrs}
</if>
<if
test=
"sdate4!=null and sdate4!=''"
>
<!--客户创建时间-->
<if
test=
"edate4!=null and edate4!=''"
>
...
...
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/service/warehouse/impl/WarehouseAreaServiceImpl.java
View file @
17b6c6bc
...
...
@@ -103,7 +103,8 @@ public class WarehouseAreaServiceImpl extends AbstractService<WarehouseAreaMappe
@Override
public
List
<
WarehouseAreaBackVO
>
getWarehouseAreaListV1
(
WarehouseAreaQueryVO
query
)
{
List
<
WarehouseAreaDO
>
list
=
getWarehouseAreaList
(
query
);
List
<
WarehouseAreaBackVO
>
dataList
=
WarehouseAreaConvert
.
INSTANCE
.
convertList
(
list
);
List
<
WarehouseAreaBackVO
>
dataList
=
WarehouseAreaConvert
.
INSTANCE
.
convertList
(
list
);
matchChild
(
dataList
,
true
);
return
dataList
;
}
...
...
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/admin/warehouse/WarehouseAreaController.java
View file @
17b6c6bc
...
...
@@ -103,11 +103,14 @@ public class WarehouseAreaController {
ExcelUtils
.
write
(
response
,
"库区库域.xls"
,
"数据"
,
WarehouseAreaBackVO
.
class
,
datas
);
}
//查询库位
@GetMapping
(
"/getByWarehouseId"
)
@ApiOperation
(
"获得仓库查询库域"
)
// @PreAuthorize("@ss.hasPermission('ecw:warehouse-area:query')")
public
CommonResult
<
List
<
WarehouseAreaBackVO
>>
getWarehouseAreaPage
(
WarehouseAreaQueryVO
query
)
{
List
<
WarehouseAreaBackVO
>
list
=
warehouseAreaService
.
getWarehouseAreaListV1
(
query
);
//@PreAuthorize("@ss.hasPermission('ecw:warehouse-area:query')")
public
CommonResult
<
List
<
WarehouseAreaBackVO
>>
getWarehouseAreaPage
(
WarehouseAreaQueryVO
query
)
{
List
<
WarehouseAreaBackVO
>
list
=
warehouseAreaService
.
getWarehouseAreaListV1
(
query
);
return
success
(
list
);
}
...
...
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/app/warehouse/AppWarehouseAreaController.java
View file @
17b6c6bc
...
...
@@ -82,7 +82,8 @@ public class AppWarehouseAreaController {
@ApiOperation
(
"获得仓库查询库域"
)
@PreAuthenticated
public
CommonResult
<
List
<
WarehouseAreaBackVO
>>
getWarehouseAreaPage
(
WarehouseAreaQueryVO
query
)
{
List
<
WarehouseAreaDO
>
list
=
warehouseAreaService
.
getWarehouseAreaList
(
query
);
List
<
WarehouseAreaDO
>
list
=
warehouseAreaService
.
getWarehouseAreaList
(
query
);
// 导出 Excel
List
<
WarehouseAreaBackVO
>
datas
=
WarehouseAreaConvert
.
INSTANCE
.
convertList
(
list
);
matchChild
(
datas
,
true
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderException/OrderExceptionServiceImpl.java
View file @
17b6c6bc
...
...
@@ -169,8 +169,6 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
private
ApplicationContext
applicationContext
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Long
createOrderException
(
OrderExceptionCreateReqVO
createReqVO
)
{
...
...
@@ -497,7 +495,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
QueryWrapperX
lambdaQueryWrapper
=
new
QueryWrapperX
();
lambdaQueryWrapper
.
eq
(
"a.deleted"
,
0
);
lambdaQueryWrapper
.
apply
(
"a.order_id = {0}"
,
orderId
);
return
orderExceptionMapper
.
selectOrderExceptionListByOrderId
(
lambdaQueryWrapper
);
return
orderExceptionMapper
.
selectOrderExceptionListByOrderId
(
lambdaQueryWrapper
);
}
@Override
...
...
@@ -557,7 +556,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
handlerExceptionByExceptionId
(
OrderExceptionResultHandlerVo
vo
)
{
public
void
handlerExceptionByExceptionId
(
OrderExceptionResultHandlerVo
vo
)
{
OrderExceptionDO
orderExceptionDO
=
this
.
getById
(
vo
.
getOrderExceptionId
());
...
...
@@ -769,7 +769,9 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
}
else
{
throw
exception
(
ORDER_HANDLER_EXCEPTION_NOT_EXISTS
);
}
}
else
if
((
orderExceptionDO
.
getOrderExceptionType
()
+
"_result"
).
equals
(
OrderExceptionResult
.
ORDER_LACK_BOX_EXCEPTION_RESULT
.
KEY
))
{
}
else
if
((
orderExceptionDO
.
getOrderExceptionType
()
+
"_result"
).
equals
(
OrderExceptionResult
.
ORDER_LACK_BOX_EXCEPTION_RESULT
.
KEY
))
{
//少箱
switch
(
vo
.
getOrderExceptionHandlerResult
())
{
case
OrderExceptionResult
.
ORDER_LACK_BOX_EXCEPTION_RESULT
.
PENDING
:
...
...
@@ -788,6 +790,7 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
break
;
default
:
throw
exception
(
ORDER_HANDLER_EXCEPTION_NOT_EXISTS
);
}
}
else
if
((
orderExceptionDO
.
getOrderExceptionType
()
+
"_result"
).
equals
(
OrderExceptionResult
.
ORDER_OTHER_EXCEPTION_RESULT
.
KEY
))
{
//其它异常
...
...
@@ -1381,8 +1384,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
orderBusinessService
.
addOrderOperateLog
(
orderExceptionDO
.
getOrderId
(),
""
,
"处理"
+
orderExceptionEnum
.
getZhValueDesc
(),
applyInfoVOList
);
}
// 如果是处理未设置渠道的异常,需要在处理完异常后再调用订单处理业务,否则订单会判断你渠道异常存在,不会去生成未报价与清关费未报价异常
if
((
orderExceptionDO
.
getOrderExceptionType
()
+
"_result"
).
equals
(
OrderExceptionResult
.
CHANNEL_EXCEPTION_RESULT
.
KEY
)){
if
(
vo
.
getOrderExceptionHandlerResult
().
equals
(
OrderExceptionResult
.
CHANNEL_EXCEPTION_RESULT
.
SET_SHIPMENT_CHANNEL
)){
if
((
orderExceptionDO
.
getOrderExceptionType
()
+
"_result"
).
equals
(
OrderExceptionResult
.
CHANNEL_EXCEPTION_RESULT
.
KEY
))
{
if
(
vo
.
getOrderExceptionHandlerResult
().
equals
(
OrderExceptionResult
.
CHANNEL_EXCEPTION_RESULT
.
SET_SHIPMENT_CHANNEL
))
{
orderBusinessService
.
handleOrderChannelException
(
orderExceptionDO
.
getOrderId
(),
vo
.
getChannelId
());
}
}
...
...
@@ -1614,7 +1617,7 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
String
.
format
(
"更新商品价格路线重量上限为[%s]后,系统自动处理"
,
airWeightLimitNew
==
null
?
"空"
:
airWeightLimitNew
),
true
);
}
}
});
});
}
/**
...
...
@@ -2391,7 +2394,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
}
@Override
public
PageResult
<
OrderBackVO
>
selectOrderExceptionPage
(
OrderExceptionQueryVO
reqVo
,
PageVO
page
)
{
public
PageResult
<
OrderBackVO
>
selectOrderExceptionPage
(
OrderExceptionQueryVO
reqVo
,
PageVO
page
)
{
String
startTime
=
""
;
String
endTime
=
""
;
...
...
@@ -2405,28 +2409,38 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
}
if
(
StrUtil
.
equals
(
reqVo
.
getOrderNoKey
(),
"in"
))
{
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
reqVo
.
getOrderNo
()),
"a.order_no"
,
reqVo
.
getOrderNo
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
reqVo
.
getOrderNo
()),
"a.order_no"
,
reqVo
.
getOrderNo
());
}
else
if
(
StrUtil
.
equals
(
reqVo
.
getOrderNoKey
(),
"eq"
))
{
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
reqVo
.
getOrderNo
()),
"a.order_no"
,
reqVo
.
getOrderNo
());
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
reqVo
.
getOrderNo
()),
"a.order_no"
,
reqVo
.
getOrderNo
());
}
else
if
(
StrUtil
.
equals
(
reqVo
.
getOrderNoKey
(),
"ne"
))
{
queryWrapper
.
ne
(
StrUtil
.
isNotBlank
(
reqVo
.
getOrderNo
()),
"a.order_no"
,
reqVo
.
getOrderNo
());
queryWrapper
.
ne
(
StrUtil
.
isNotBlank
(
reqVo
.
getOrderNo
()),
"a.order_no"
,
reqVo
.
getOrderNo
());
}
else
if
(
StrUtil
.
equals
(
reqVo
.
getOrderNoKey
(),
"nt"
))
{
queryWrapper
.
notLike
(
StrUtil
.
isNotBlank
(
reqVo
.
getOrderNo
()),
"a.order_no"
,
reqVo
.
getOrderNo
());
queryWrapper
.
notLike
(
StrUtil
.
isNotBlank
(
reqVo
.
getOrderNo
()),
"a.order_no"
,
reqVo
.
getOrderNo
());
}
if
(
StrUtil
.
equals
(
reqVo
.
getMarksKey
(),
"in"
))
{
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
reqVo
.
getMarks
()),
"a.marks"
,
reqVo
.
getMarks
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
reqVo
.
getMarks
()),
"a.marks"
,
reqVo
.
getMarks
());
}
else
if
(
StrUtil
.
equals
(
reqVo
.
getMarksKey
(),
"eq"
))
{
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
reqVo
.
getMarks
()),
"a.marks"
,
reqVo
.
getMarks
());
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
reqVo
.
getMarks
()),
"a.marks"
,
reqVo
.
getMarks
());
}
else
if
(
StrUtil
.
equals
(
reqVo
.
getMarksKey
(),
"ne"
))
{
queryWrapper
.
ne
(
StrUtil
.
isNotBlank
(
reqVo
.
getMarks
()),
"a.marks"
,
reqVo
.
getMarks
());
queryWrapper
.
ne
(
StrUtil
.
isNotBlank
(
reqVo
.
getMarks
()),
"a.marks"
,
reqVo
.
getMarks
());
}
else
if
(
StrUtil
.
equals
(
reqVo
.
getMarksKey
(),
"nt"
))
{
queryWrapper
.
notLike
(
StrUtil
.
isNotBlank
(
reqVo
.
getMarks
()),
"a.marks"
,
reqVo
.
getMarks
());
queryWrapper
.
notLike
(
StrUtil
.
isNotBlank
(
reqVo
.
getMarks
()),
"a.marks"
,
reqVo
.
getMarks
());
}
queryWrapper
.
eqIfPresent
(
"a.is_external_warehouse"
,
reqVo
.
getIsExternalWarehouse
());
queryWrapper
.
eqIfPresent
(
"a.is_cargo_control"
,
reqVo
.
getIsCargoControl
());
queryWrapper
.
eqIfPresent
(
"a.is_external_warehouse"
,
reqVo
.
getIsExternalWarehouse
());
queryWrapper
.
eqIfPresent
(
"a.is_cargo_control"
,
reqVo
.
getIsCargoControl
());
queryWrapper
.
eqIfPresent
(
"a.transport_id"
,
reqVo
.
getTransportId
());
if
(
StringUtils
.
isNotBlank
(
reqVo
.
getOriginId
()))
{
queryWrapper
.
eqIfPresent
(
"wl.start_warehouse_id"
,
reqVo
.
getOriginId
());
...
...
@@ -2502,7 +2516,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
queryWrapper.inIfPresent("b.order_exception_type", reqVo.getOrderExceptionType());
}*/
orderExceptionMapper
.
selectOrderPage
(
mpPage
,
queryWrapper
,
reqVo
.
getOrderExceptionType
(),
startTime
,
endTime
);
orderExceptionMapper
.
selectOrderPage
(
mpPage
,
queryWrapper
,
reqVo
.
getOrderExceptionType
(),
startTime
,
endTime
);
return
PageResult
.
of
(
mpPage
);
}
...
...
@@ -2632,9 +2647,15 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
boolean
isSystemAutoProcess
)
{
List
<
OrderExceptionDO
>
pendHeavyExceptionList
=
this
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderId
,
orderItemId
,
orderExceptionEnum
.
getKey
());
this
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderId
,
orderItemId
,
orderExceptionEnum
.
getKey
());
if
(
CollectionUtil
.
isNotEmpty
(
pendHeavyExceptionList
))
{
for
(
OrderExceptionDO
orderExceptionDO
:
pendHeavyExceptionList
)
{
for
(
OrderExceptionDO
orderExceptionDO
:
pendHeavyExceptionList
)
{
// 自动处理 只处理待处理的。 处理中的不需要了
if
(
orderExceptionDO
.
getOrderExceptionStatus
()
==
0
)
{
autoProcessExceptionDo
(
orderExceptionDO
,
...
...
@@ -2660,9 +2681,12 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
orderExceptionResultHandlerVo
.
setSource
(
"pc"
);
orderExceptionResultHandlerVo
.
setOrderExceptionId
(
orderExceptionDO
.
getId
());
orderExceptionResultHandlerVo
.
setSystemAutoProcess
(
isSystemAutoProcess
);
orderExceptionResultHandlerVo
.
setOrderExceptionHandlerResult
(
orderExceptionHandlerResult
);
orderExceptionResultHandlerVo
.
setOrderExceptionHandlerResult
(
orderExceptionHandlerResult
);
orderExceptionResultHandlerVo
.
setOrderExceptionHandlerRemark
(
StrUtil
.
isBlank
(
remark
)
?
"系统自动处理"
:
remark
);
orderExceptionResultHandlerVo
.
setOrderExceptionHandlerRemark
(
StrUtil
.
isBlank
(
remark
)
?
"系统自动处理"
:
remark
);
//自动处理时设置处理人为admin
orderExceptionResultHandlerVo
.
setHandlerId
(
adminId
);
//工作流处理
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
17b6c6bc
...
...
@@ -1281,7 +1281,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
boolean
firstRucang
=
orderDO
.
getRucangTime
()
==
null
;
if
(
firstRucang
)
{
//在下面的函数中
弯沉
费用计算 lanbm 2024-06-20 添加注释
//在下面的函数中
完成
费用计算 lanbm 2024-06-20 添加注释
orderService
.
finishOrderWarehouseIn
(
orderDO
.
getOrderId
());
}
else
{
orderService
.
finishOrderWarehouseInUpdate
(
orderDO
.
getOrderId
());
...
...
@@ -1815,17 +1815,23 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
String
autoProcessExceptionRemark
=
"系统自动处理 处理人admin"
;
if
(
OrderItemStatusEnum
.
more_than
.
getValue
().
equals
(
diffType
))
{
OrderExceptionEnum
orderSuperfluousBoxException
=
OrderExceptionEnum
.
ORDER_SUPERFLUOUS_BOX_EXCEPTION
;
OrderExceptionEnum
orderSuperfluousBoxException
=
OrderExceptionEnum
.
ORDER_SUPERFLUOUS_BOX_EXCEPTION
;
// 箱数有变化时才更新异常
boolean
noSameCartonsOrderException
=
isNoSameCartonsOrderException
(
orderId
,
cartonsNumDiff
,
orderSuperfluousBoxException
);
boolean
noSameCartonsOrderException
=
isNoSameCartonsOrderException
(
orderId
,
cartonsNumDiff
,
orderSuperfluousBoxException
);
if
(
noSameCartonsOrderException
)
{
// 生成多箱异常
OrderExceptionCreateReqVO
orderExceptionCreateReqVO
=
genOrderException
(
orderId
,
null
,
orderDO
,
OrderExceptionCreateReqVO
orderExceptionCreateReqVO
=
genOrderException
(
orderId
,
null
,
orderDO
,
OrderExceptionEnum
.
ORDER_SUPERFLUOUS_BOX_EXCEPTION
,
String
.
format
(
"超出%d%s"
,
cartonsNumDiff
,
label
),
String
.
format
(
"more than %d %s"
,
cartonsNumDiff
,
labelEn
),
null
);
String
.
format
(
"more than %d %s"
,
cartonsNumDiff
,
labelEn
),
null
);
orderExceptionService
.
createOrderException
(
orderExceptionCreateReqVO
);
// 自动处理少箱的未处理异常
...
...
@@ -1866,6 +1872,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
autoProcessExceptionRemark
,
OrderExceptionResult
.
ORDER_LACK_BOX_EXCEPTION_RESULT
.
CONFIRM_CORRECT
);
// 删除多箱的未处理异常
//lanbm 2024-06-23 处理少箱异常的时间问题
orderExceptionService
.
autoProcessException
(
orderId
,
null
,
OrderExceptionEnum
.
ORDER_SUPERFLUOUS_BOX_EXCEPTION
,
autoProcessExceptionRemark
,
...
...
yudao-module-order/yudao-module-order-core/src/main/resources/mapper/orderException/OrderExceptionMapper.xml
View file @
17b6c6bc
...
...
@@ -2,13 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.order.dal.mysql.orderException.OrderExceptionMapper"
>
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select
id=
"selectOrderPage"
resultType=
"cn.iocoder.yudao.module.order.vo.orderException.OrderBackVO"
>
SELECT b.id AS id,
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/order/OrderController.java
View file @
17b6c6bc
...
...
@@ -342,7 +342,8 @@ public class OrderController {
query
.
setUserType
(
UserTypeEnum
.
ADMIN
.
getValue
());
// query.setSalesmanId(salesmanId);
query
.
setCreator
(
String
.
valueOf
(
salesmanId
));
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
myOrderPage
(
query
,
page
);
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
myOrderPage
(
query
,
page
);
return
success
(
pageResult
);
}
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderExceptionResult/orderException/OrderExceptionController.java
View file @
17b6c6bc
...
...
@@ -66,19 +66,25 @@ public class OrderExceptionController {
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得订单异常分页"
)
public
CommonResult
<
PageResult
<
OrderBackVO
>>
getOrderExceptionPage
(
@Valid
OrderExceptionQueryVO
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
OrderBackVO
>>
getOrderExceptionPage
(
@Valid
OrderExceptionQueryVO
query
,
PageVO
page
)
{
if
(
StrUtil
.
isNotBlank
(
query
.
getSalesmanId
()))
{
//得到跟进客服对应的所有客户经理
List
<
String
>
serviceIdList
=
orderExceptionService
.
getCustomerServiceListById
(
Long
.
parseLong
(
query
.
getSalesmanId
()));
List
<
String
>
serviceIdList
=
orderExceptionService
.
getCustomerServiceListById
(
Long
.
parseLong
(
query
.
getSalesmanId
()));
List
<
String
>
customerServiceList
=
query
.
getCustomerIds
();
if
(
null
==
customerServiceList
)
{
customerServiceList
=
new
ArrayList
<>();
}
customerServiceList
.
addAll
(
serviceIdList
);
List
list
=
customerServiceList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
List
list
=
customerServiceList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
query
.
setCustomerIds
(
list
);
}
PageResult
<
OrderBackVO
>
pageResult
=
orderExceptionService
.
selectOrderExceptionPage
(
query
,
page
);
PageResult
<
OrderBackVO
>
pageResult
=
orderExceptionService
.
selectOrderExceptionPage
(
query
,
page
);
return
success
(
pageResult
);
}
...
...
@@ -111,6 +117,18 @@ public class OrderExceptionController {
public
CommonResult
<
List
<
OrderExceptionBackVO
>>
getOrderExceptionListByOrderId
(
@RequestParam
(
"orderId"
)
Long
orderId
)
{
List
<
OrderExceptionBackVO
>
list
=
orderExceptionService
.
getOrderExceptionListByOrderId
(
orderId
);
for
(
OrderExceptionBackVO
v
:
list
)
{
//lanbm 2024-06-23 处理少箱异常,创建时间和处理时间一致
if
(
v
.
getHandlerRemark
()
!=
null
&&
v
.
getOrderExceptionType
()
!=
null
)
{
if
(
v
.
getHandlerRemark
().
equals
(
"系统自动处理 处理人admin"
)
&&
v
.
getOrderExceptionType
()
==
"order_lack_box_exception"
)
{
//少箱异常
v
.
setHandlerTime
(
v
.
getCreateTime
());
}
}
}
return
success
(
list
);
}
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderLocation/OrderLocationController.java
View file @
17b6c6bc
...
...
@@ -31,8 +31,10 @@ public class OrderLocationController {
@GetMapping
(
"/list-by-order-id"
)
@ApiOperation
(
"根据订单id获得订单仓位列表"
)
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"订单id"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
<
List
<
OrderLocationBackVO
>>
getLocationListByOrderId
(
@RequestParam
(
"orderId"
)
Long
orderId
)
{
List
<
OrderLocationDO
>
list
=
locationService
.
getOrderLocationListByOrderId
(
orderId
);
public
CommonResult
<
List
<
OrderLocationBackVO
>>
getLocationListByOrderId
(
@RequestParam
(
"orderId"
)
Long
orderId
)
{
List
<
OrderLocationDO
>
list
=
locationService
.
getOrderLocationListByOrderId
(
orderId
);
return
success
(
OrderLocationConvert
.
INSTANCE
.
convertList
(
list
));
}
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/app/orderException/AppOrderExceptionController.java
View file @
17b6c6bc
...
...
@@ -32,7 +32,8 @@ public class AppOrderExceptionController {
@ApiOperation
(
"根据订单ID获取所有的订单异常列表"
)
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"订单ID"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
<
List
<
OrderExceptionBackVO
>>
getOrderExceptionListByOrderId
(
@RequestParam
(
"orderId"
)
Long
orderId
)
{
List
<
OrderExceptionBackVO
>
list
=
orderExceptionService
.
getOrderExceptionListByOrderId
(
orderId
);
List
<
OrderExceptionBackVO
>
list
=
orderExceptionService
.
getOrderExceptionListByOrderId
(
orderId
);
return
success
(
list
);
}
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/component/ProdCostCalculation.java
View file @
17b6c6bc
...
...
@@ -1551,7 +1551,6 @@ public class ProdCostCalculation {
clearancePrice = result >= 0 ? clearanceBasePrice :
lineClearanceBasePrice;
*/
clearancePrice
=
lineClearanceBasePrice
;
}
else
{
...
...
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