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
96e27c3b
Commit
96e27c3b
authored
Jun 04, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-04
parent
c03e4afa
Changes
26
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
674 additions
and
402 deletions
+674
-402
CustomerUpdateReqVO.java
...o/module/customer/vo/customer/vo/CustomerUpdateReqVO.java
+3
-0
CustomerController.java
...ustomer/controller/admin/customer/CustomerController.java
+6
-2
EcwVzController.java
...dao/module/delivery/controller/admin/EcwVzController.java
+2
-0
WarehouseDO.java
...dule/depository/dal/dataobject/warehouse/WarehouseDO.java
+13
-1
WarehouseBaseVO.java
...yudao/module/depository/vo/warehouse/WarehouseBaseVO.java
+13
-0
WarehouseLineMapper.xml
...c/main/resources/mapper/warehouse/WarehouseLineMapper.xml
+1
-6
OrderExceptionEnum.java
.../iocoder/yudao/module/order/enums/OrderExceptionEnum.java
+5
-0
OrderAirServiceImpl.java
.../module/order/service/order/impl/OrderAirServiceImpl.java
+6
-2
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+37
-28
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+273
-263
OrderExceptionServiceImpl.java
...der/service/orderException/OrderExceptionServiceImpl.java
+25
-8
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+165
-63
OrderExceptionChannelPriceController.java
...ionChannelPrice/OrderExceptionChannelPriceController.java
+5
-1
OrderExceptionController.java
...eptionResult/orderException/OrderExceptionController.java
+3
-1
OrderWarehouseInController.java
...er/admin/orderWarehouseIn/OrderWarehouseInController.java
+7
-1
MyOrderController.java
.../module/order/controller/app/order/MyOrderController.java
+1
-1
ProdLinePriceController.java
...roduct/controller/admin/prod/ProdLinePriceController.java
+30
-10
BoxCostDO.java
...coder/yudao/module/shipment/dal/dataobject/BoxCostDO.java
+4
-0
MakeBillOfLadingMapper.java
...nt/dal/mysql/makeBillOfLading/MakeBillOfLadingMapper.java
+2
-0
MakeBillOfLadingService.java
...ent/service/makeBillOfLading/MakeBillOfLadingService.java
+5
-0
MakeBillOfLadingServiceImpl.java
...service/makeBillOfLading/MakeBillOfLadingServiceImpl.java
+7
-0
BoxCostBackVO.java
...coder/yudao/module/shipment/vo/boxCost/BoxCostBackVO.java
+13
-0
MakeBillOfLadingBackVO.java
.../shipment/vo/makeBillOfLading/MakeBillOfLadingBackVO.java
+5
-0
MakeBillOfLadingMapper.xml
...core/src/main/resources/mapper/MakeBillOfLadingMapper.xml
+4
-6
BoxCostController.java
...o/module/shipment/controller/admin/BoxCostController.java
+21
-6
MakeBillOfLadingController.java
...shipment/controller/admin/MakeBillOfLadingController.java
+18
-3
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customer/vo/CustomerUpdateReqVO.java
View file @
96e27c3b
...
@@ -112,6 +112,9 @@ public class CustomerUpdateReqVO extends CustomerBaseVO {
...
@@ -112,6 +112,9 @@ public class CustomerUpdateReqVO extends CustomerBaseVO {
private
String
remarks
;
private
String
remarks
;
/*
lanbm 2024-06-03 处理开启到仓确认,就报发货人异常的BUG
*/
@ApiModelProperty
(
value
=
"到仓确认"
)
@ApiModelProperty
(
value
=
"到仓确认"
)
private
Integer
arrivalConfirm
;
private
Integer
arrivalConfirm
;
...
...
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customer/CustomerController.java
View file @
96e27c3b
...
@@ -204,9 +204,13 @@ public class CustomerController {
...
@@ -204,9 +204,13 @@ public class CustomerController {
@ApiOperation
(
"更新客户"
)
@ApiOperation
(
"更新客户"
)
@PreAuthorize
(
"@ss.hasAnyPermissions('ecw:customer:update', 'ecw:customer:dep-update', 'ecw:customer:my-update', 'ecw:customer:distribution-update')"
)
@PreAuthorize
(
"@ss.hasAnyPermissions('ecw:customer:update', 'ecw:customer:dep-update', 'ecw:customer:my-update', 'ecw:customer:distribution-update')"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
updateCustomer
(
@Valid
@RequestBody
CustomerUpdateReqVO
updateReqVO
)
{
public
CommonResult
<
Boolean
>
updateCustomer
(
@Valid
@RequestBody
CustomerUpdateReqVO
updateReqVO
)
{
List
<
CustomerContactsUpdateReqVO
>
customerContacts
=
updateReqVO
.
getCustomerContacts
();
//SELECT arrival_confirm from ecw_customer 到仓确认
List
<
CustomerContactsUpdateReqVO
>
customerContacts
=
updateReqVO
.
getCustomerContacts
();
if
(!
CollectionUtils
.
isEmpty
(
customerContacts
))
{
if
(!
CollectionUtils
.
isEmpty
(
customerContacts
))
{
long
count
=
customerContacts
.
stream
().
filter
(
t
->
CustomerContactsDefaultEnum
.
IS_DEFAULT
.
getValue
().
equals
(
t
.
getIsDefault
())).
count
();
long
count
=
customerContacts
.
stream
().
filter
(
t
->
CustomerContactsDefaultEnum
.
IS_DEFAULT
.
getValue
().
equals
(
t
.
getIsDefault
())).
count
();
if
(
count
<=
0
)
{
if
(
count
<=
0
)
{
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/EcwVzController.java
View file @
96e27c3b
...
@@ -64,6 +64,8 @@ public class EcwVzController {
...
@@ -64,6 +64,8 @@ public class EcwVzController {
private
final
String
HYPG
=
"海运拼柜"
;
private
final
String
HYPG
=
"海运拼柜"
;
private
final
String
ZXKY
=
"专线空运"
;
private
final
String
ZXKY
=
"专线空运"
;
/**
/**
* 新增数据
* 新增数据
*
*
...
...
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/dal/dataobject/warehouse/WarehouseDO.java
View file @
96e27c3b
...
@@ -166,4 +166,16 @@ public class WarehouseDO extends BaseDO implements Serializable {
...
@@ -166,4 +166,16 @@ public class WarehouseDO extends BaseDO implements Serializable {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
tempTitleZh
;
private
String
tempTitleZh
;
/*
仓库免租期,单位为天数
*/
private
int
rentFreeDays
;
/*
锁定收货人天数
*/
private
int
lockRecipientDays
;
}
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/vo/warehouse/WarehouseBaseVO.java
View file @
96e27c3b
...
@@ -81,4 +81,17 @@ public class WarehouseBaseVO {
...
@@ -81,4 +81,17 @@ public class WarehouseBaseVO {
@ApiModelProperty
(
value
=
"会员控货下单要求"
)
@ApiModelProperty
(
value
=
"会员控货下单要求"
)
private
String
kycStatus
;
private
String
kycStatus
;
/*
仓库免租期,单位为天数
*/
@ApiModelProperty
(
value
=
"仓库免租期"
)
private
int
rentFreeDays
;
/*
锁定收货人天数
*/
@ApiModelProperty
(
value
=
"锁定收货人天数"
)
private
int
lockRecipientDays
;
}
}
yudao-module-depository/yudao-module-depository-core/src/main/resources/mapper/warehouse/WarehouseLineMapper.xml
View file @
96e27c3b
...
@@ -2,12 +2,7 @@
...
@@ -2,12 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.depository.dal.mysql.warehouse.WarehouseLineMapper"
>
<mapper
namespace=
"cn.iocoder.yudao.module.depository.dal.mysql.warehouse.WarehouseLineMapper"
>
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
<resultMap
id=
"warehouseLineEntity"
type=
"cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseLineDO"
>
<resultMap
id=
"warehouseLineEntity"
type=
"cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseLineDO"
>
<!-- <result property="id" column="id" />-->
<!-- <result property="id" column="id" />-->
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/enums/OrderExceptionEnum.java
View file @
96e27c3b
...
@@ -2,6 +2,10 @@ package cn.iocoder.yudao.module.order.enums;
...
@@ -2,6 +2,10 @@ package cn.iocoder.yudao.module.order.enums;
import
lombok.Getter
;
import
lombok.Getter
;
/*
订单异常枚举类型
lanbm 2024-06-03 添加注释
*/
@Getter
@Getter
public
enum
OrderExceptionEnum
{
public
enum
OrderExceptionEnum
{
ORDER_NO_QUOTE_EXCEPTION
(
"order_no_quote_exception"
,
"未报价异常"
,
"no quote"
),
ORDER_NO_QUOTE_EXCEPTION
(
"order_no_quote_exception"
,
"未报价异常"
,
"no quote"
),
...
@@ -34,6 +38,7 @@ public enum OrderExceptionEnum {
...
@@ -34,6 +38,7 @@ public enum OrderExceptionEnum {
GOODS_OVERWEIGHT_EXCEPTION
(
"overweight_exception"
,
"商品重量超限异常"
,
"overweight exception"
),
GOODS_OVERWEIGHT_EXCEPTION
(
"overweight_exception"
,
"商品重量超限异常"
,
"overweight exception"
),
CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION
(
"channel_packaging_overweight_exception"
,
"渠道包装重量超限异常"
,
"channel packaging overweight exception"
),
CHANNEL_PACKAGING_OVERWEIGHT_EXCEPTION
(
"channel_packaging_overweight_exception"
,
"渠道包装重量超限异常"
,
"channel packaging overweight exception"
),
//不可出渠道异常,lanbm 2024-06-03 处理异常添加注释
NOT_SHIPPING_CHANNEL_EXCEPTION
(
"not_shipping_channel_exception"
,
"不可出渠道异常"
,
"not shipping channel exception"
),
NOT_SHIPPING_CHANNEL_EXCEPTION
(
"not_shipping_channel_exception"
,
"不可出渠道异常"
,
"not shipping channel exception"
),
GOODS_WEIGHT_EXCEPTION
(
"goods_weight_exception"
,
"货物重量异常"
,
"goods weight exception"
),
GOODS_WEIGHT_EXCEPTION
(
"goods_weight_exception"
,
"货物重量异常"
,
"goods weight exception"
),
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderAirServiceImpl.java
View file @
96e27c3b
...
@@ -217,7 +217,8 @@ public class OrderAirServiceImpl extends AbstractService<OrderMapper, OrderDO> i
...
@@ -217,7 +217,8 @@ public class OrderAirServiceImpl extends AbstractService<OrderMapper, OrderDO> i
@Override
@Override
public
void
inspectWarehouseInOrderChannelNoCan
(
QueryChannelInfoEvent
event
)
{
public
void
inspectWarehouseInOrderChannelNoCan
(
QueryChannelInfoEvent
event
)
{
// 获取已入仓的渠道相关空运订单
// 获取已入仓的渠道相关空运订单
List
<
OrderDO
>
orderDOList
=
orderService
.
selectList
(
new
LambdaQueryWrapper
<
OrderDO
>()
List
<
OrderDO
>
orderDOList
=
orderService
.
selectList
(
new
LambdaQueryWrapper
<
OrderDO
>()
.
eq
(
OrderDO:
:
getStatus
,
OrderStatusEnum
.
IN_WAREHOUSE
.
getValue
())
.
eq
(
OrderDO:
:
getStatus
,
OrderStatusEnum
.
IN_WAREHOUSE
.
getValue
())
.
eq
(
OrderDO:
:
getTransportId
,
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
())
.
eq
(
OrderDO:
:
getTransportId
,
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
())
.
eq
(
OrderDO:
:
getChannelId
,
event
.
getChannelId
()));
.
eq
(
OrderDO:
:
getChannelId
,
event
.
getChannelId
()));
...
@@ -226,7 +227,10 @@ public class OrderAirServiceImpl extends AbstractService<OrderMapper, OrderDO> i
...
@@ -226,7 +227,10 @@ public class OrderAirServiceImpl extends AbstractService<OrderMapper, OrderDO> i
// 检查订单的不可出特性渠道异常情况,如果有则判断是否自动处理,如果没有则判断是否生成
// 检查订单的不可出特性渠道异常情况,如果有则判断是否自动处理,如果没有则判断是否生成
// 更新完订单所有计价信息后,对未报价的订单项去生成未报价异常(待确认商品不予生成未报价异常)
// 更新完订单所有计价信息后,对未报价的订单项去生成未报价异常(待确认商品不予生成未报价异常)
// 只对非拆单子订单进行校验
// 只对非拆单子订单进行校验
if
(
Objects
.
isNull
(
orderDO
.
getParentOrderId
())
||
orderDO
.
getParentOrderId
()
==
0
||
orderDO
.
getSplitSeparateOrder
())
{
if
(
Objects
.
isNull
(
orderDO
.
getParentOrderId
())
||
orderDO
.
getParentOrderId
()
==
0
||
orderDO
.
getSplitSeparateOrder
())
{
orderBusinessService
.
addOrderOperateLog
(
orderDO
.
getOrderId
(),
"订单操作"
,
"渠道特性修改自动检查订单不可出渠道特性"
,
""
);
orderBusinessService
.
addOrderOperateLog
(
orderDO
.
getOrderId
(),
"订单操作"
,
"渠道特性修改自动检查订单不可出渠道特性"
,
""
);
List
<
OrderItemDO
>
orderItemDOList
=
orderItemMapper
.
selectList
(
new
LambdaQueryWrapper
<
OrderItemDO
>().
eq
(
OrderItemDO:
:
getOrderId
,
orderDO
.
getOrderId
()));
List
<
OrderItemDO
>
orderItemDOList
=
orderItemMapper
.
selectList
(
new
LambdaQueryWrapper
<
OrderItemDO
>().
eq
(
OrderItemDO:
:
getOrderId
,
orderDO
.
getOrderId
()));
// 查询待处理的不可出渠道异常
// 查询待处理的不可出渠道异常
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
96e27c3b
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
96e27c3b
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderException/OrderExceptionServiceImpl.java
View file @
96e27c3b
...
@@ -170,7 +170,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -170,7 +170,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Long
createOrderException
(
OrderExceptionCreateReqVO
createReqVO
)
{
public
Long
createOrderException
(
OrderExceptionCreateReqVO
createReqVO
)
{
OrderAbnormalStateEnum
abnormal
=
OrderAbnormalStateEnum
.
keyOf
(
createReqVO
.
getOrderExceptionType
());
OrderAbnormalStateEnum
abnormal
=
OrderAbnormalStateEnum
.
keyOf
(
createReqVO
.
getOrderExceptionType
());
if
(
null
==
abnormal
)
{
if
(
null
==
abnormal
)
{
throw
exception
(
ORDER_EXCEPTION_NOT_EXISTS
);
throw
exception
(
ORDER_EXCEPTION_NOT_EXISTS
);
}
}
...
@@ -230,7 +231,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -230,7 +231,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
}
}
if
(
mustToInsert
)
{
if
(
mustToInsert
)
{
OrderExceptionDO
orderException
=
OrderExceptionConvert
.
INSTANCE
.
convert
(
createReqVO
);
OrderExceptionDO
orderException
=
OrderExceptionConvert
.
INSTANCE
.
convert
(
createReqVO
);
orderException
.
setOrderExceptionRemark
(
JSONObject
.
toJSONString
(
createReqVO
.
getOrderExceptionDescVO
()));
orderException
.
setOrderExceptionRemark
(
JSONObject
.
toJSONString
(
createReqVO
.
getOrderExceptionDescVO
()));
orderExceptionMapper
.
insert
(
orderException
);
orderExceptionMapper
.
insert
(
orderException
);
resultId
=
orderException
.
getId
();
resultId
=
orderException
.
getId
();
...
@@ -553,7 +555,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -553,7 +555,8 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
handlerExceptionByExceptionId
(
OrderExceptionResultHandlerVo
vo
)
{
public
void
handlerExceptionByExceptionId
(
OrderExceptionResultHandlerVo
vo
)
{
OrderExceptionDO
orderExceptionDO
=
this
.
getById
(
vo
.
getOrderExceptionId
());
OrderExceptionDO
orderExceptionDO
=
this
.
getById
(
vo
.
getOrderExceptionId
());
if
(
null
==
orderExceptionDO
)
{
if
(
null
==
orderExceptionDO
)
{
throw
exception
(
ORDER_EXCEPTION_RESULT_NOT_EXISTS
);
throw
exception
(
ORDER_EXCEPTION_RESULT_NOT_EXISTS
);
}
}
...
@@ -600,6 +603,7 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -600,6 +603,7 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
List
<
ApplyInfoVO
>
applyInfoVOList
=
new
ArrayList
<>();
List
<
ApplyInfoVO
>
applyInfoVOList
=
new
ArrayList
<>();
orderExceptionResultService
.
save
(
orderExceptionResult
);
orderExceptionResultService
.
save
(
orderExceptionResult
);
if
((
orderExceptionDO
.
getOrderExceptionType
()
+
"_result"
).
equals
(
OrderExceptionResult
.
ORDER_COD_EXCEPTION_RESULT
.
KEY
))
{
if
((
orderExceptionDO
.
getOrderExceptionType
()
+
"_result"
).
equals
(
OrderExceptionResult
.
ORDER_COD_EXCEPTION_RESULT
.
KEY
))
{
//代收货款
//代收货款
if
(
vo
.
getOrderExceptionHandlerResult
().
equals
(
OrderExceptionResult
.
ORDER_COD_EXCEPTION_RESULT
.
COD
))
{
if
(
vo
.
getOrderExceptionHandlerResult
().
equals
(
OrderExceptionResult
.
ORDER_COD_EXCEPTION_RESULT
.
COD
))
{
...
@@ -2616,26 +2620,39 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -2616,26 +2620,39 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
@Override
@Override
public
void
autoProcessException
(
Long
orderId
,
Long
orderItemId
,
OrderExceptionEnum
orderExceptionEnum
,
String
remark
,
String
orderExceptionHandlerResult
,
boolean
isSystemAutoProcess
)
{
public
void
autoProcessException
(
Long
orderId
,
List
<
OrderExceptionDO
>
pendHeavyExceptionList
=
this
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderId
,
orderItemId
,
orderExceptionEnum
.
getKey
());
Long
orderItemId
,
OrderExceptionEnum
orderExceptionEnum
,
String
remark
,
String
orderExceptionHandlerResult
,
boolean
isSystemAutoProcess
)
{
List
<
OrderExceptionDO
>
pendHeavyExceptionList
=
this
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderId
,
orderItemId
,
orderExceptionEnum
.
getKey
());
if
(
CollectionUtil
.
isNotEmpty
(
pendHeavyExceptionList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
pendHeavyExceptionList
))
{
for
(
OrderExceptionDO
orderExceptionDO
:
pendHeavyExceptionList
)
{
for
(
OrderExceptionDO
orderExceptionDO
:
pendHeavyExceptionList
)
{
// 自动处理 只处理待处理的。 处理中的不需要了
// 自动处理 只处理待处理的。 处理中的不需要了
if
(
orderExceptionDO
.
getOrderExceptionStatus
()
==
0
)
{
if
(
orderExceptionDO
.
getOrderExceptionStatus
()
==
0
)
{
autoProcessExceptionDo
(
orderExceptionDO
,
orderExceptionHandlerResult
,
remark
,
isSystemAutoProcess
);
autoProcessExceptionDo
(
orderExceptionDO
,
orderExceptionHandlerResult
,
remark
,
isSystemAutoProcess
);
}
}
}
}
}
}
}
}
private
void
autoProcessExceptionDo
(
OrderExceptionDO
orderExceptionDO
,
String
orderExceptionHandlerResult
,
String
remark
,
boolean
isSystemAutoProcess
)
{
private
void
autoProcessExceptionDo
(
OrderExceptionDO
orderExceptionDO
,
String
orderExceptionHandlerResult
,
String
remark
,
boolean
isSystemAutoProcess
)
{
//默认admin
//默认admin
Long
adminId
=
1
l
;
Long
adminId
=
1
l
;
if
(!
isSystemAutoProcess
)
{
if
(!
isSystemAutoProcess
)
{
adminId
=
SecurityFrameworkUtils
.
getLoginUserId
();
adminId
=
SecurityFrameworkUtils
.
getLoginUserId
();
}
}
OrderExceptionResultHandlerVo
orderExceptionResultHandlerVo
=
new
OrderExceptionResultHandlerVo
();
OrderExceptionResultHandlerVo
orderExceptionResultHandlerVo
=
new
OrderExceptionResultHandlerVo
();
orderExceptionResultHandlerVo
.
setSource
(
"pc"
);
orderExceptionResultHandlerVo
.
setSource
(
"pc"
);
orderExceptionResultHandlerVo
.
setOrderExceptionId
(
orderExceptionDO
.
getId
());
orderExceptionResultHandlerVo
.
setOrderExceptionId
(
orderExceptionDO
.
getId
());
orderExceptionResultHandlerVo
.
setSystemAutoProcess
(
isSystemAutoProcess
);
orderExceptionResultHandlerVo
.
setSystemAutoProcess
(
isSystemAutoProcess
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
96e27c3b
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderExceptionChannelPrice/OrderExceptionChannelPriceController.java
View file @
96e27c3b
...
@@ -70,6 +70,9 @@ public class OrderExceptionChannelPriceController {
...
@@ -70,6 +70,9 @@ public class OrderExceptionChannelPriceController {
return
success
(
OrderExceptionChannelPriceConvert
.
INSTANCE
.
convert
(
exceptionChannelPrice
));
return
success
(
OrderExceptionChannelPriceConvert
.
INSTANCE
.
convert
(
exceptionChannelPrice
));
}
}
/*
getOrderExceptionChannelPriceList
*/
@PostMapping
(
"/getOrderExceptionChannelPriceList"
)
@PostMapping
(
"/getOrderExceptionChannelPriceList"
)
@ApiOperation
(
"根据订单ID,异常ID获取价格"
)
@ApiOperation
(
"根据订单ID,异常ID获取价格"
)
public
CommonResult
<
List
<
OrderExceptionChannelPriceBackVO
>>
getOrderExceptionChannelPriceList
(
@Valid
@RequestBody
OrderExceptionChannelPriceQueryVO
queryVO
)
{
public
CommonResult
<
List
<
OrderExceptionChannelPriceBackVO
>>
getOrderExceptionChannelPriceList
(
@Valid
@RequestBody
OrderExceptionChannelPriceQueryVO
queryVO
)
{
...
@@ -77,7 +80,8 @@ public class OrderExceptionChannelPriceController {
...
@@ -77,7 +80,8 @@ public class OrderExceptionChannelPriceController {
queryWrapper
.
eq
(
OrderExceptionChannelPriceDO:
:
getOrderId
,
queryVO
.
getOrderId
());
queryWrapper
.
eq
(
OrderExceptionChannelPriceDO:
:
getOrderId
,
queryVO
.
getOrderId
());
queryWrapper
.
eq
(
OrderExceptionChannelPriceDO:
:
getExceptionId
,
queryVO
.
getExceptionId
());
queryWrapper
.
eq
(
OrderExceptionChannelPriceDO:
:
getExceptionId
,
queryVO
.
getExceptionId
());
queryWrapper
.
eq
(
OrderExceptionChannelPriceDO:
:
getExceptionResultId
,
queryVO
.
getExceptionResultId
());
queryWrapper
.
eq
(
OrderExceptionChannelPriceDO:
:
getExceptionResultId
,
queryVO
.
getExceptionResultId
());
List
<
OrderExceptionChannelPriceDO
>
exceptionChannelPrice
=
exceptionChannelPriceService
.
list
(
queryWrapper
);
List
<
OrderExceptionChannelPriceDO
>
exceptionChannelPrice
=
exceptionChannelPriceService
.
list
(
queryWrapper
);
return
success
(
OrderExceptionChannelPriceConvert
.
INSTANCE
.
convertList
(
exceptionChannelPrice
));
return
success
(
OrderExceptionChannelPriceConvert
.
INSTANCE
.
convertList
(
exceptionChannelPrice
));
}
}
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderExceptionResult/orderException/OrderExceptionController.java
View file @
96e27c3b
...
@@ -102,7 +102,9 @@ public class OrderExceptionController {
...
@@ -102,7 +102,9 @@ public class OrderExceptionController {
return
success
(
orderExceptionService
.
statisticsOrder
(
query
));
return
success
(
orderExceptionService
.
statisticsOrder
(
query
));
}
}
/*
根据订单ID获取订单异常处理记录 lanbm 2024-06-04 添加注释
*/
@GetMapping
(
"/getExceptionListByOrderId"
)
@GetMapping
(
"/getExceptionListByOrderId"
)
@ApiOperation
(
"根据订单ID获取所有的订单异常列表"
)
@ApiOperation
(
"根据订单ID获取所有的订单异常列表"
)
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"订单ID"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"订单ID"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderWarehouseIn/OrderWarehouseInController.java
View file @
96e27c3b
...
@@ -75,6 +75,9 @@ public class OrderWarehouseInController {
...
@@ -75,6 +75,9 @@ public class OrderWarehouseInController {
/*
/*
创建入仓,保存入仓记录 lanbm 2024-05-28 添加注释
创建入仓,保存入仓记录 lanbm 2024-05-28 添加注释
渠道,关联可出商品属性
SELECT * from ecw_channel
SELECT * from ecw_product_attr
*/
*/
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@ApiOperation
(
"入仓/追加"
)
@ApiOperation
(
"入仓/追加"
)
...
@@ -130,7 +133,9 @@ public class OrderWarehouseInController {
...
@@ -130,7 +133,9 @@ public class OrderWarehouseInController {
@PostMapping
(
"/finish"
)
@PostMapping
(
"/finish"
)
@ApiOperation
(
"入仓完成/转异"
)
@ApiOperation
(
"入仓完成/转异"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
finishWarehouseIn
(
@Valid
@RequestBody
OrderWarehouseInFinishReqVO
finishReqVO
)
{
public
CommonResult
<
Boolean
>
finishWarehouseIn
(
@Valid
@RequestBody
OrderWarehouseInFinishReqVO
finishReqVO
)
{
//lanbm 2024-05-26 在此处添加注释
//lanbm 2024-05-26 在此处添加注释
String
redisKey
=
MessageFormat
.
format
(
ORDER_FINISH_WAREHOUSE_IN_KEY
,
String
redisKey
=
MessageFormat
.
format
(
ORDER_FINISH_WAREHOUSE_IN_KEY
,
finishReqVO
.
getOrderId
().
toString
());
finishReqVO
.
getOrderId
().
toString
());
...
@@ -140,6 +145,7 @@ public class OrderWarehouseInController {
...
@@ -140,6 +145,7 @@ public class OrderWarehouseInController {
}
}
boolean
hasException
=
false
;
boolean
hasException
=
false
;
try
{
try
{
//完成入仓
redisHelper
.
expire
(
redisKey
,
1
,
TimeUnit
.
MINUTES
);
redisHelper
.
expire
(
redisKey
,
1
,
TimeUnit
.
MINUTES
);
hasException
=
orderWarehouseInService
.
finishWarehouseIn
(
finishReqVO
);
hasException
=
orderWarehouseInService
.
finishWarehouseIn
(
finishReqVO
);
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/app/order/MyOrderController.java
View file @
96e27c3b
...
@@ -126,7 +126,7 @@ public class MyOrderController {
...
@@ -126,7 +126,7 @@ public class MyOrderController {
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@DynamicRateLimiter
(
base
=
"#Headers['Authorization']"
,
permits
=
1
)
@DynamicRateLimiter
(
base
=
"#Headers['Authorization']"
,
permits
=
1
)
@ApiOperation
(
value
=
"创建订单"
,
notes
=
"发货人只取当前用户信息,收货人取当前用户的客户信息"
)
@ApiOperation
(
value
=
"创建订单"
,
notes
=
"发货人只取当前用户信息,收货人取当前用户的客户信息"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
1
5
)
@PreAuthenticated
@PreAuthenticated
public
CommonResult
<
Long
>
createOrder
(
@Valid
@RequestBody
OrderCreateReqVO
createReqVO
)
{
public
CommonResult
<
Long
>
createOrder
(
@Valid
@RequestBody
OrderCreateReqVO
createReqVO
)
{
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
...
...
yudao-module-product/yudao-module-product-rest/src/main/java/cn/iocoder/yudao/module/product/controller/admin/prod/ProdLinePriceController.java
View file @
96e27c3b
...
@@ -41,19 +41,39 @@ public class ProdLinePriceController {
...
@@ -41,19 +41,39 @@ public class ProdLinePriceController {
*/
*/
@PostMapping
(
"/calculation"
)
@PostMapping
(
"/calculation"
)
@ApiOperation
(
"计算单种运输方式的商品费用(单个商品也做数组传参)"
)
@ApiOperation
(
"计算单种运输方式的商品费用(单个商品也做数组传参)"
)
public
CommonResult
<
CalculationCostResultDto
>
calculationProdCost
(
@RequestBody
ConditionParam
param
)
{
public
CommonResult
<
CalculationCostResultDto
>
calculationProdCost
(
if
(
CollectionUtil
.
isEmpty
(
param
.
getProdConditionParamList
())){
@RequestBody
ConditionParam
param
)
{
if
(
CollectionUtil
.
isEmpty
(
param
.
getProdConditionParamList
()))
{
return
error
(
ORDER_ITEM_PROD_NOT_EXISTS
);
return
error
(
ORDER_ITEM_PROD_NOT_EXISTS
);
}
}
// 前端实时计价时需要将订单的固定价格参数进行格式化,转为未定价,否则不会去查询当前实时价格
// 前端实时计价时需要将订单的固定价格参数进行格式化,转为未定价,否则不会去查询当前实时价格
param
.
setProdConditionParamList
(
param
.
getProdConditionParamList
().
stream
().
peek
(
it
->
it
.
setIsPriced
(
false
)).
collect
(
Collectors
.
toList
()));
param
.
setProdConditionParamList
(
param
.
getProdConditionParamList
().
stream
().
peek
(
it
->
it
.
setIsPriced
(
false
)).
collect
(
Collectors
.
toList
()));
List
<
ProdConditionParam
>
prodConditionParams
=
prodCostCalculation
.
obtainProdLineOnePrice
(
param
.
getProdConditionParamList
(),
""
,
List
<
ProdConditionParam
>
prodConditionParams
=
Objects
.
nonNull
(
param
.
getCustomsType
())
?
param
.
getCustomsType
()
:
1
,
param
.
getCustomerId
(),
prodCostCalculation
.
obtainProdLineOnePrice
(
param
.
getTransportId
(),
param
.
getLineId
(),
param
.
getChannelId
(),
false
);
param
.
getProdConditionParamList
(),
CalculationCostResultDto
dto
=
prodCostCalculation
.
calculationProdCost
(
prodConditionParams
,
""
,
""
,
param
.
getOrderType
(),
Objects
.
nonNull
(
param
.
getCustomsType
())
?
param
.
getCustomsType
()
:
1
,
Objects
.
nonNull
(
param
.
getIsCargoControl
())
&&
param
.
getIsCargoControl
()
?
1
:
0
,
Objects
.
nonNull
(
param
.
getCustomsType
())
?
param
.
getCustomsType
()
:
1
,
param
.
getUserId
(),
param
.
getCustomerId
(),
param
.
getConsignorCustomerId
(),
param
.
getConsigneeCustomerId
(),
param
.
getCustomerId
(),
param
.
getConsignorCustomerContactsId
(),
param
.
getConsigneeCustomerContactsId
(),
param
.
getTransportId
(),
param
.
getLineId
(),
param
.
getChannelId
());
param
.
getTransportId
(),
param
.
getLineId
(),
param
.
getChannelId
(),
false
);
CalculationCostResultDto
dto
=
prodCostCalculation
.
calculationProdCost
(
prodConditionParams
,
""
,
param
.
getOrderType
(),
Objects
.
nonNull
(
param
.
getCustomsType
())
?
param
.
getCustomsType
()
:
1
,
Objects
.
nonNull
(
param
.
getIsCargoControl
())
&&
param
.
getIsCargoControl
()
?
1
:
0
,
param
.
getUserId
(),
param
.
getCustomerId
(),
param
.
getConsignorCustomerId
(),
param
.
getConsigneeCustomerId
(),
param
.
getConsignorCustomerContactsId
(),
param
.
getConsigneeCustomerContactsId
(),
param
.
getTransportId
(),
param
.
getLineId
(),
param
.
getChannelId
());
return
success
(
dto
);
return
success
(
dto
);
}
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/dal/dataobject/BoxCostDO.java
View file @
96e27c3b
package
cn
.
iocoder
.
yudao
.
module
.
shipment
.
dal
.
dataobject
;
package
cn
.
iocoder
.
yudao
.
module
.
shipment
.
dal
.
dataobject
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.*
;
import
lombok.*
;
import
java.util.*
;
import
java.util.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY
;
/**
/**
* 费用登记 DO
* 费用登记 DO
*
*
...
@@ -56,6 +59,7 @@ public class BoxCostDO extends BaseDO {
...
@@ -56,6 +59,7 @@ public class BoxCostDO extends BaseDO {
/*
/*
费用产生时间 lanbm 2024-05-17 add
费用产生时间 lanbm 2024-05-17 add
*/
*/
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
private
Date
freecsdate
;
private
Date
freecsdate
;
}
}
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/dal/mysql/makeBillOfLading/MakeBillOfLadingMapper.java
View file @
96e27c3b
...
@@ -46,4 +46,6 @@ public interface MakeBillOfLadingMapper extends AbstractMapper<MakeBillOfLadingD
...
@@ -46,4 +46,6 @@ public interface MakeBillOfLadingMapper extends AbstractMapper<MakeBillOfLadingD
}
}
MakeBillOfLadingListBackVO
getLadingBillOrderInfo
(
Long
orderId
);
MakeBillOfLadingListBackVO
getLadingBillOrderInfo
(
Long
orderId
);
String
getBpmStatus
(
String
process_instance_id
);
}
}
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/makeBillOfLading/MakeBillOfLadingService.java
View file @
96e27c3b
...
@@ -15,6 +15,11 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
...
@@ -15,6 +15,11 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
*/
*/
public
interface
MakeBillOfLadingService
extends
IService
<
MakeBillOfLadingDO
>
{
public
interface
MakeBillOfLadingService
extends
IService
<
MakeBillOfLadingDO
>
{
/*
获取提单审批状态 lanbm 2024-06-04 add
*/
String
getBpmStatus
(
String
process_instance_id
);
/**
/**
* 创建制作提货单
* 创建制作提货单
* @param createReqVO 创建信息
* @param createReqVO 创建信息
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/makeBillOfLading/MakeBillOfLadingServiceImpl.java
View file @
96e27c3b
...
@@ -173,6 +173,13 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
...
@@ -173,6 +173,13 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
@Resource
@Resource
private
CurrencyApi
currencyApi
;
private
CurrencyApi
currencyApi
;
/*
获取提单审批状态 lanbm 2024-06-04 add
*/
public
String
getBpmStatus
(
String
process_instance_id
)
{
return
makeBillOfLadingMapper
.
getBpmStatus
(
process_instance_id
);
}
@SneakyThrows
@SneakyThrows
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/vo/boxCost/BoxCostBackVO.java
View file @
96e27c3b
...
@@ -92,4 +92,17 @@ public class BoxCostBackVO {
...
@@ -92,4 +92,17 @@ public class BoxCostBackVO {
private
String
updater
;
private
String
updater
;
/*
应付款,关联的付款单 lanbm 2024-06-03 add
*/
private
String
paymentId
;
/*
费用产生时间 lanbm 2024-05-17 add
*/
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
private
Date
freecsdate
;
}
}
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/vo/makeBillOfLading/MakeBillOfLadingBackVO.java
View file @
96e27c3b
...
@@ -38,6 +38,11 @@ public class MakeBillOfLadingBackVO {
...
@@ -38,6 +38,11 @@ public class MakeBillOfLadingBackVO {
@ApiModelProperty
(
value
=
"流程实例ID"
)
@ApiModelProperty
(
value
=
"流程实例ID"
)
private
String
bpmProcessId
;
private
String
bpmProcessId
;
/*
审批状态 lanbm 2024-05-04 add
*/
private
String
bpmStatus
;
@ApiModelProperty
(
value
=
"提货单pdfURL"
)
@ApiModelProperty
(
value
=
"提货单pdfURL"
)
private
String
imgUrl
;
private
String
imgUrl
;
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/resources/mapper/MakeBillOfLadingMapper.xml
View file @
96e27c3b
...
@@ -2,12 +2,10 @@
...
@@ -2,12 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.shipment.dal.mysql.makeBillOfLading.MakeBillOfLadingMapper"
>
<mapper
namespace=
"cn.iocoder.yudao.module.shipment.dal.mysql.makeBillOfLading.MakeBillOfLadingMapper"
>
<!--
<select
id=
"getBpmStatus"
resultType=
"java.lang.String"
>
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
SELECT status from bpm_process_instance_ext
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
where deleted=0 and process_instance_id=#{process_instance_id}
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
</select>
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select
id=
"getLadingBillOrderInfo"
parameterType=
"java.lang.Long"
resultType=
"cn.iocoder.yudao.module.shipment.vo.makeBillOfLading.MakeBillOfLadingListBackVO"
>
<select
id=
"getLadingBillOrderInfo"
parameterType=
"java.lang.Long"
resultType=
"cn.iocoder.yudao.module.shipment.vo.makeBillOfLading.MakeBillOfLadingListBackVO"
>
SELECT distinct
SELECT distinct
...
...
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/BoxCostController.java
View file @
96e27c3b
...
@@ -71,7 +71,7 @@ public class BoxCostController {
...
@@ -71,7 +71,7 @@ public class BoxCostController {
//@PreAuthorize("@ss.hasPermission('ecw:box-cost:create')")
//@PreAuthorize("@ss.hasPermission('ecw:box-cost:create')")
public
CommonResult
<
Long
>
createBoxCost
(
@Valid
@RequestBody
BoxCostCreateReqVO
createReqVO
)
{
public
CommonResult
<
Long
>
createBoxCost
(
@Valid
@RequestBody
BoxCostCreateReqVO
createReqVO
)
{
//lanbm 2024-05-17 添加费用产生日期字段
//lanbm 2024-05-17 添加费用产生日期字段
String
s
=
""
;
String
s
=
""
;
return
success
(
boxCostService
.
createBoxCost
(
createReqVO
));
return
success
(
boxCostService
.
createBoxCost
(
createReqVO
));
}
}
...
@@ -80,7 +80,7 @@ public class BoxCostController {
...
@@ -80,7 +80,7 @@ public class BoxCostController {
// @PreAuthorize("@ss.hasPermission('ecw:box-cost:update')")
// @PreAuthorize("@ss.hasPermission('ecw:box-cost:update')")
public
CommonResult
<
Boolean
>
updateBoxCost
(
@Valid
@RequestBody
BoxCostUpdateReqVO
updateReqVO
)
{
public
CommonResult
<
Boolean
>
updateBoxCost
(
@Valid
@RequestBody
BoxCostUpdateReqVO
updateReqVO
)
{
//lanbm 2024-05-17 添加费用产生日期字段
//lanbm 2024-05-17 添加费用产生日期字段
String
s
=
""
;
String
s
=
""
;
boxCostService
.
updateBoxCost
(
updateReqVO
);
boxCostService
.
updateBoxCost
(
updateReqVO
);
return
success
(
true
);
return
success
(
true
);
}
}
...
@@ -111,19 +111,25 @@ public class BoxCostController {
...
@@ -111,19 +111,25 @@ public class BoxCostController {
public
CommonResult
<
Long
>
getPaymentId
(
@RequestParam
(
"id"
)
Long
id
)
{
public
CommonResult
<
Long
>
getPaymentId
(
@RequestParam
(
"id"
)
Long
id
)
{
PayableDO
payableDO
=
payableService
.
getPayable
(
id
);
PayableDO
payableDO
=
payableService
.
getPayable
(
id
);
if
(
payableDO
==
null
)
{
if
(
payableDO
==
null
)
{
return
error
(
new
ErrorCode
(
1
,
"费用记录不存在"
));
return
error
(
new
ErrorCode
(
1
,
"费用记录不存在"
));
}
}
if
(
payableDO
.
getPaymentId
()==
null
||
payableDO
.
getPaymentId
()
==
0
)
{
//ecw_payable 付款单信息
return
error
(
new
ErrorCode
(
2
,
"付款单信息还未生成。"
));
if
(
payableDO
.
getPaymentId
()
==
null
||
payableDO
.
getPaymentId
()
==
0
)
{
return
error
(
new
ErrorCode
(
2
,
"付款单信息还未生成。"
));
}
}
return
success
(
payableDO
.
getPaymentId
());
return
success
(
payableDO
.
getPaymentId
());
}
}
/*
-- 先登记费用信息,生成 ecw_payable 付款单,付款单付款付款后生成
-- 应付款 ecw_payment
*/
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ApiOperation
(
"获得费用登记列表, use this"
)
@ApiOperation
(
"获得费用登记列表, use this"
)
//@PreAuthorize("@ss.hasPermission('ecw:box-cost:query')")
//@PreAuthorize("@ss.hasPermission('ecw:box-cost:query')")
public
CommonResult
<
List
<
BoxCostBackVO
>>
getBoxCostList
(
@Valid
BoxCostQueryVO
query
)
{
public
CommonResult
<
List
<
BoxCostBackVO
>>
getBoxCostList
(
@Valid
BoxCostQueryVO
query
)
{
//ecw_box_cost 费用登记
List
<
BoxCostDO
>
list
=
boxCostService
.
getBoxCostList
(
query
);
List
<
BoxCostDO
>
list
=
boxCostService
.
getBoxCostList
(
query
);
List
<
BoxCostBackVO
>
costList
=
BoxCostConvert
.
INSTANCE
.
convertList
(
list
);
List
<
BoxCostBackVO
>
costList
=
BoxCostConvert
.
INSTANCE
.
convertList
(
list
);
...
@@ -149,7 +155,9 @@ public class BoxCostController {
...
@@ -149,7 +155,9 @@ public class BoxCostController {
if
(
CollectionUtil
.
isNotEmpty
(
payableList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
payableList
))
{
Map
<
Long
,
PayableDO
>
payableMap
=
payableList
.
stream
()
Map
<
Long
,
PayableDO
>
payableMap
=
payableList
.
stream
()
.
collect
(
Collectors
.
toMap
(
PayableDO:
:
getShippingFeeId
,
t
->
t
));
.
collect
(
Collectors
.
toMap
(
PayableDO:
:
getShippingFeeId
,
t
->
t
));
for
(
BoxCostBackVO
boxCostBackVO
:
costList
)
{
for
(
BoxCostBackVO
boxCostBackVO
:
costList
)
{
//获取应付款信息
PayableDO
payableDO
=
payableMap
.
get
(
boxCostBackVO
.
getId
());
PayableDO
payableDO
=
payableMap
.
get
(
boxCostBackVO
.
getId
());
if
(
payableDO
!=
null
)
{
if
(
payableDO
!=
null
)
{
//lanbm 2024-05-16 添加实付金额币种
//lanbm 2024-05-16 添加实付金额币种
...
@@ -161,6 +169,13 @@ public class BoxCostController {
...
@@ -161,6 +169,13 @@ public class BoxCostController {
//lanbm 2024-05-16 添加付款单单号
//lanbm 2024-05-16 添加付款单单号
boxCostBackVO
.
setPayableNo
(
payableDO
.
getPayableNo
());
boxCostBackVO
.
setPayableNo
(
payableDO
.
getPayableNo
());
boxCostBackVO
.
setPayableId
(
payableDO
.
getId
());
boxCostBackVO
.
setPayableId
(
payableDO
.
getId
());
//判断是否生成付款单 lanbm 2024-06-03
if
(
payableDO
.
getPaymentId
()
==
null
||
payableDO
.
getPaymentId
()
==
0
)
{
boxCostBackVO
.
setPaymentId
(
"-1"
);
}
else
{
boxCostBackVO
.
setPaymentId
(
payableDO
.
getPaymentId
().
toString
());
}
}
}
}
}
}
}
...
...
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/MakeBillOfLadingController.java
View file @
96e27c3b
package
cn
.
iocoder
.
yudao
.
module
.
shipment
.
controller
.
admin
;
package
cn
.
iocoder
.
yudao
.
module
.
shipment
.
controller
.
admin
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.iocoder.yudao.framework.common.exception.ErrorCode
;
import
cn.iocoder.yudao.framework.common.exception.ErrorCode
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
...
@@ -89,7 +90,7 @@ public class MakeBillOfLadingController {
...
@@ -89,7 +90,7 @@ public class MakeBillOfLadingController {
//ecw_make_bill_of_lading 提单
//ecw_make_bill_of_lading 提单
String
redisKey
=
MessageFormat
.
format
(
BOX_MAKE_LADING_KEY
,
createReqVO
.
getOrderId
().
toString
());
String
redisKey
=
MessageFormat
.
format
(
BOX_MAKE_LADING_KEY
,
createReqVO
.
getOrderId
().
toString
());
Long
count
=
redisHelper
.
incrBy
(
redisKey
,
1
);
Long
count
=
redisHelper
.
incrBy
(
redisKey
,
1
);
if
(
count
>
1
){
if
(
count
>
1
)
{
return
error
(
BOX_MAKE_LADING_REPEAT_COMMIT
);
return
error
(
BOX_MAKE_LADING_REPEAT_COMMIT
);
}
}
redisHelper
.
expire
(
redisKey
,
1
,
TimeUnit
.
MINUTES
);
redisHelper
.
expire
(
redisKey
,
1
,
TimeUnit
.
MINUTES
);
...
@@ -181,13 +182,27 @@ public class MakeBillOfLadingController {
...
@@ -181,13 +182,27 @@ public class MakeBillOfLadingController {
public
CommonResult
<
MakeBillOfLadingBackVO
>
downloadByOrderId
(
@RequestParam
(
"orderId"
)
Long
orderId
,
HttpServletResponse
response
)
{
public
CommonResult
<
MakeBillOfLadingBackVO
>
downloadByOrderId
(
@RequestParam
(
"orderId"
)
Long
orderId
,
HttpServletResponse
response
)
{
MakeBillOfLadingDO
lading
=
makeBillOfLadingService
.
selectOne
(
MakeBillOfLadingDO:
:
getOrderId
,
orderId
);
MakeBillOfLadingDO
lading
=
makeBillOfLadingService
.
selectOne
(
MakeBillOfLadingDO:
:
getOrderId
,
orderId
);
if
(
lading
==
null
)
{
if
(
lading
==
null
)
{
return
error
(
new
ErrorCode
(
1109010018
,
"该提单未制作或未审批通过!"
));
return
error
(
new
ErrorCode
(
1109010018
,
"该提单未制作或未审批通过!"
));
}
}
OrderDO
orderDOCheck
=
orderService
.
getById
(
orderId
);
OrderDO
orderDOCheck
=
orderService
.
getById
(
orderId
);
if
(
orderDOCheck
.
getStatus
()
<
OrderStatusEnum
.
INSTALLED_CABINET
.
getValue
())
{
if
(
orderDOCheck
.
getStatus
()
<
OrderStatusEnum
.
INSTALLED_CABINET
.
getValue
())
{
return
error
(
new
ErrorCode
(
1109010019
,
"装柜前无法下载提货单"
));
return
error
(
new
ErrorCode
(
1109010019
,
"装柜前无法下载提货单"
));
}
}
return
success
(
MakeBillOfLadingConvert
.
INSTANCE
.
convert
(
lading
));
MakeBillOfLadingBackVO
vResult
=
MakeBillOfLadingConvert
.
INSTANCE
.
convert
(
lading
);
if
(
lading
.
getBpmProcessId
()
==
null
||
lading
.
getBpmProcessId
().
length
()
==
0
)
{
vResult
.
setBpmStatus
(
"-1"
);
}
else
{
String
sStatus
=
makeBillOfLadingService
.
getBpmStatus
(
lading
.
getBpmProcessId
());
if
(
sStatus
==
null
)
sStatus
=
"-1"
;
vResult
.
setBpmStatus
(
sStatus
);
}
return
success
(
vResult
);
}
}
@GetMapping
(
"/download"
)
@GetMapping
(
"/download"
)
...
...
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