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
722ddaf6
Commit
722ddaf6
authored
May 26, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-23-4提交
parent
f0c3f018
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
816 additions
and
61 deletions
+816
-61
ShipmentReceivableExcelExportPushEvent2.java
...event/export/ShipmentReceivableExcelExportPushEvent2.java
+52
-0
BpmTaskApproveReqVO.java
...pm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java
+6
-2
BpmTaskServiceImpl.java
...der/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
+1
-0
EcwVzController.java
...dao/module/delivery/controller/admin/EcwVzController.java
+2
-1
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+13
-9
OrderBackPageVO.java
.../iocoder/yudao/module/order/vo/order/OrderBackPageVO.java
+11
-3
OrderWarehouseInController.java
...er/admin/orderWarehouseIn/OrderWarehouseInController.java
+1
-0
ProductPriceServiceImpl.java
...product/service/product/impl/ProductPriceServiceImpl.java
+35
-12
ProductPriceController.java
...duct/controller/admin/product/ProductPriceController.java
+4
-1
AirBillReceivableExcelExportListener.java
...ipment/listener/AirBillReceivableExcelExportListener.java
+45
-11
ShipmentReceivableExcelExportListener.java
...pment/listener/ShipmentReceivableExcelExportListener.java
+0
-1
ShipmentReceivableExcelExportListener2.java
...ment/listener/ShipmentReceivableExcelExportListener2.java
+548
-0
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+4
-4
BoxApprovalServiceImpl.java
.../shipment/service/boxApproval/BoxApprovalServiceImpl.java
+18
-5
MakeBillOfLadingServiceImpl.java
...service/makeBillOfLading/MakeBillOfLadingServiceImpl.java
+47
-9
BoxPreloadGoodsController.java
.../shipment/controller/admin/BoxPreloadGoodsController.java
+2
-0
MakeBillOfLadingController.java
...shipment/controller/admin/MakeBillOfLadingController.java
+4
-1
DownloadLogServiceImpl.java
...le/system/service/downloadLog/DownloadLogServiceImpl.java
+23
-2
nrlyReceivable2.xlsx
...-server/src/main/resources/templates/nrlyReceivable2.xlsx
+0
-0
No files found.
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/export/ShipmentReceivableExcelExportPushEvent2.java
0 → 100644
View file @
722ddaf6
package
cn
.
iocoder
.
yudao
.
framework
.
apollo
.
core
.
event
.
export
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/*
lanbm 2024-05-25 lanbm add
*/
@Data
public
class
ShipmentReceivableExcelExportPushEvent2
{
/**
* 操作用户
*/
private
Long
userId
;
/**
* 端口
*/
private
Integer
userType
;
/**
* 请求参数
*/
private
String
requestParams
;
/**
* 国际化语言值,默认0中文, 具体取值I18nMessage.getLang()
*/
private
Integer
lang
=
0
;
/**
* 文件名称
*/
private
String
fileName
;
/**
* 文件路径
*/
private
String
path
;
/**
* 下载地址
*/
private
String
url
;
/**
* 执行结果
*/
private
String
result
;
@ApiModelProperty
(
value
=
"文件ID"
)
private
Long
fileId
;
}
yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskApproveReqVO.java
View file @
722ddaf6
...
...
@@ -18,8 +18,12 @@ public class BpmTaskApproveReqVO {
@NotEmpty
(
message
=
"任务编号不能为空"
)
private
String
id
;
@ApiModelProperty
(
value
=
"审批意见"
,
required
=
true
,
example
=
"不错不错!"
)
@NotEmpty
(
message
=
"审批意见不能为空"
)
/*
lanbm 2024-05-24 修改为审批意见可以为空,
客户要求部分审批流程不用写审批意见
*/
@ApiModelProperty
(
value
=
"审批意见"
,
required
=
false
,
example
=
"不错不错!"
)
//@NotEmpty(message = "审批意见不能为空")
private
String
comment
;
@ApiModelProperty
(
"抄送用户Id"
)
...
...
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
View file @
722ddaf6
...
...
@@ -270,6 +270,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
taskService
.
addComment
(
task
.
getId
(),
task
.
getProcessInstanceId
(),
BpmProcessInstanceResultEnum
.
APPROVE
.
getDesc
(),
reqVO
.
getComment
());
taskService
.
complete
(
task
.
getId
(),
instance
.
getProcessVariables
());
// 是否有抄送
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/EcwVzController.java
View file @
722ddaf6
...
...
@@ -34,9 +34,10 @@ import java.util.List;
/**
* V值转换配置参数(EcwVz)表控制层
*
*
https://ft0n6y6ben.feishu.cn/sheets/Y7PosKYx5h2O2btS6Gcc0TS7nZe?from=from_copylink
* @author lanbm
* @since 2024-04-02
* CNG244324 测试提单号
*/
@RestController
@RequestMapping
(
"/ecwVz/vz"
)
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
722ddaf6
...
...
@@ -6,7 +6,7 @@ import cn.hutool.core.date.DateTime;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.iocoder.yudao.framework.apollo.core.event.BoxCheckOrderSchedulingEvent
;
//
import cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderVValueEvent;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderVValueEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.QueryChannelInfoEvent
;
import
cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
...
...
@@ -1173,11 +1173,12 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 自定义体积
//
orderDO.setCustomSumVolume(finishReqVO.getSumVolume());
//
orderDO.setCustomSumVolume(finishReqVO.getSumVolume());
// 自定义重量
//
orderDO.setCustomSumWeight(finishReqVO.getSumWeight());
//
orderDO.setCustomSumWeight(finishReqVO.getSumWeight());
// 20230115 拆单子订单入仓不需要产生除转异外的其他异常,同时也不需要重新计算价格; 退场入仓也不需要产生异常
// 20230115 拆单子订单入仓不需要产生除转异外的其他异常,
// 同时也不需要重新计算价格; 退场入仓也不需要产生异常
if
(!
isSplitOrderChildren
&&
isNotRollbackIn
)
{
//处理重泡货异常
...
...
@@ -1201,7 +1202,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 处理发货人异常
processConsignorException
(
finishReqVO
,
orderId
,
orderDO
);
// 重新调用计算订单价格, 订单信息和订单项信息需要重新查询,可能创建异常和修改订单已经对订单信息造成改变
// 重新调用计算订单价格, 订单信息和订单项信息需要重新查询,
// 可能创建异常和修改订单已经对订单信息造成改变
boolean
firstRucang
=
orderDO
.
getRucangTime
()
==
null
;
if
(
firstRucang
)
{
...
...
@@ -1225,7 +1227,9 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
processOrderPayException
(
orderId
,
orderDO
,
result
);
}
int
numSum2
=
orderWarehouseInDOList
.
stream
().
filter
(
t
->
t
.
getCartonsNum
()
!=
null
).
mapToInt
(
OrderWarehouseInDO:
:
getCartonsNum
).
sum
();
int
numSum2
=
orderWarehouseInDOList
.
stream
().
filter
(
t
->
t
.
getCartonsNum
()
!=
null
).
mapToInt
(
OrderWarehouseInDO:
:
getCartonsNum
).
sum
();
// 保存箱号
if
(
finishReqVO
.
getUpdateLabel
())
{
...
...
@@ -1311,7 +1315,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
CustomerDO
consignorCustomer
=
customerService
.
getById
(
orderConsignorDO2
.
getCustomerId
())
;
//获取收货人客户经理
CustomerDO
consigneeCustomer
=
customerService
.
getById
(
orderConsigneeDO2
.
getCustomerId
())
;
//订单的发货人、收货人同属一个客户经理,则两个客户经理都延期,否则只延期订单中业绩归属方客户
//订单的发货人、收货人同属一个客户经理,则两个客户经理都延期,
// 否则只延期订单中业绩归属方客户
if
(
consignorCustomer
!=
null
&&
consigneeCustomer
!=
null
&&
Objects
.
nonNull
(
consignorCustomer
.
getCustomerService
())
&&
Objects
.
nonNull
(
consigneeCustomer
.
getCustomerService
())
&&
...
...
@@ -1343,10 +1348,9 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
}
//入仓完成,计算V值 lanbm 2024-05-13 add
/*
CalculateOrderVValueEvent
event
=
new
CalculateOrderVValueEvent
();
event
.
setOrderId
(
orderId
);
applicationContext.publishEvent(event);
*/
applicationContext
.
publishEvent
(
event
);
//end 入仓完成,计算V值 lanbm 2024-05-13 add
// 返回是否包含异常
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/order/OrderBackPageVO.java
View file @
722ddaf6
...
...
@@ -495,6 +495,7 @@ public class OrderBackPageVO {
this
.
inWarehouseState
=
inWarehouseState
;
this
.
getOrderDesc
();
}
public
void
setAirShipment
(
Integer
airShipment
)
{
this
.
airShipment
=
airShipment
;
this
.
getOrderDesc
();
...
...
@@ -556,7 +557,8 @@ public class OrderBackPageVO {
this
.
statusMsg
=
lang
==
0
?
I18nMessage
.
getZhMessage
(
auditResult
)
:
I18nMessage
.
getEnMessage
(
auditResult
);
}
else
if
(
CollectionUtil
.
isNotEmpty
(
this
.
remindExceptionDtoList
)
&&
this
.
remindExceptionDtoList
.
size
()
>
0
)
{
this
.
statusMsg
=
remindExceptionDtoList
.
get
(
0
).
getReason
();
}
else
if
(
null
!=
this
.
status
&&
this
.
status
==
5
&&
CollectionUtil
.
isNotEmpty
(
this
.
guanLianOrderStatusVOList
))
{
}
else
if
(
null
!=
this
.
status
&&
this
.
status
==
5
&&
CollectionUtil
.
isNotEmpty
(
this
.
guanLianOrderStatusVOList
))
{
// 已入仓的订单才展示关联异常信息
// 如果查询返回了关联订单状态,表示需要显示关联订单状态,关联订单状态冗余的是国际化key值
// 排序
...
...
@@ -581,8 +583,14 @@ public class OrderBackPageVO {
default
:
this
.
statusMsg
=
lang
==
0
?
I18nMessage
.
getZhMessage
(
guanlianOrderStatusVO
.
getStatusMsg
())
:
I18nMessage
.
getEnMessage
(
guanlianOrderStatusVO
.
getStatusMsg
());
}
}
else
if
(
null
!=
this
.
status
&&
null
!=
this
.
inWarehouseState
&&
null
!=
this
.
shipmentState
&&
null
!=
this
.
airShipment
&&
null
!=
this
.
transportId
)
{
this
.
statusMsg
=
OrderStatusMsgEnum
.
getMsg
(
this
.
status
,
this
.
inWarehouseState
,
this
.
shipmentState
,
this
.
airShipment
,
this
.
transportId
,
this
.
userType
,
lang
);
}
else
if
(
null
!=
this
.
status
&&
null
!=
this
.
inWarehouseState
&&
null
!=
this
.
shipmentState
&&
null
!=
this
.
airShipment
&&
null
!=
this
.
transportId
)
{
this
.
statusMsg
=
OrderStatusMsgEnum
.
getMsg
(
this
.
status
,
this
.
inWarehouseState
,
this
.
shipmentState
,
this
.
airShipment
,
this
.
transportId
,
this
.
userType
,
lang
);
// this.statusKey = OrderStatusMsgEnum.getStatusKey(this.status, this.inWarehouseState, this.shipmentState);
}
}
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderWarehouseIn/OrderWarehouseInController.java
View file @
722ddaf6
...
...
@@ -124,6 +124,7 @@ public class OrderWarehouseInController {
@ApiOperation
(
"入仓完成/转异"
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
finishWarehouseIn
(
@Valid
@RequestBody
OrderWarehouseInFinishReqVO
finishReqVO
)
{
//lanbm 2024-05-26 在此处添加注释
String
redisKey
=
MessageFormat
.
format
(
ORDER_FINISH_WAREHOUSE_IN_KEY
,
finishReqVO
.
getOrderId
().
toString
());
Long
count
=
redisHelper
.
incrBy
(
redisKey
,
1
);
if
(
count
>
1
)
{
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/impl/ProductPriceServiceImpl.java
View file @
722ddaf6
...
...
@@ -2370,13 +2370,17 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
}
@Override
public
void
batchAddPrice
(
ProductPriceBatchAddPriceReqVo
batchAddPriceReqVo
,
ProductPriceCheckAO
productPriceCheckAO
)
{
public
void
batchAddPrice
(
ProductPriceBatchAddPriceReqVo
batchAddPriceReqVo
,
ProductPriceCheckAO
productPriceCheckAO
)
{
String
json
=
JSON
.
toJSONString
(
batchAddPriceReqVo
);
List
<
ProductDO
>
productList
=
productPriceCheckAO
.
getProductList
();
List
<
LineChannelVo
>
lineChannelList
=
batchAddPriceReqVo
.
getLineChannelList
();
List
<
LineChannelVo
>
lineChannelList
=
batchAddPriceReqVo
.
getLineChannelList
();
logAndDelKey
(
json
,
productList
,
lineChannelList
);
List
<
WarehouseLineDO
>
warehouseLineList
=
productPriceCheckAO
.
getWarehouseLineList
();
List
<
WarehouseLineDO
>
warehouseLineList
=
productPriceCheckAO
.
getWarehouseLineList
();
String
content
=
productPriceCheckAO
.
getContent
();
int
countBatch
=
(
int
)
Math
.
ceil
((
double
)
productList
.
size
()
/
DATA_THRESHOLD
);
...
...
@@ -2385,23 +2389,30 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
.
parallel
()
.
map
(
a
->
productList
.
stream
().
skip
(
a
*
DATA_THRESHOLD
).
limit
(
DATA_THRESHOLD
).
parallel
().
collect
(
toList
())
).
collect
(
toList
());
//ecw_product 首先遍历产品
for
(
List
<
ProductDO
>
itemList
:
splitList
)
{
ProductPriceCreateReqVO
createReqVO
=
new
ProductPriceCreateReqVO
();
BeanUtils
.
copyProperties
(
batchAddPriceReqVo
,
createReqVO
);
batchAddPrice
(
createReqVO
,
warehouseLineList
,
itemList
);
}
//发送站内信
sendMessage
(
content
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
batchAddPrice
(
ProductPriceCreateReqVO
batchAddPriceReqVo
,
List
<
WarehouseLineDO
>
warehouseLineList
,
List
<
ProductDO
>
productList
)
{
public
void
batchAddPrice
(
ProductPriceCreateReqVO
batchAddPriceReqVo
,
List
<
WarehouseLineDO
>
warehouseLineList
,
List
<
ProductDO
>
productList
)
{
long
t1
=
System
.
currentTimeMillis
();
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
ProductPriceDO
productPrice
=
ProductPriceConvert
.
INSTANCE
.
convert
(
batchAddPriceReqVo
);
ProductPriceDO
productPrice
=
ProductPriceConvert
.
INSTANCE
.
convert
(
batchAddPriceReqVo
);
List
<
LineChannelVo
>
lineChannelList
=
batchAddPriceReqVo
.
getLineChannelList
();
List
<
LineChannelVo
>
lineChannelList
=
batchAddPriceReqVo
.
getLineChannelList
();
Set
<
Long
>
lineIdList
=
lineChannelList
.
stream
()
.
map
(
LineChannelVo:
:
getLineId
)
.
collect
(
Collectors
.
toSet
());
...
...
@@ -2424,6 +2435,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
Map
<
String
,
ProductPriceDO
>
productLineChannelMap
=
dbPriceList
.
stream
()
.
collect
(
Collectors
.
toMap
(
t
->
t
.
getProductId
()
+
"-"
+
t
.
getWarehouseLineId
()
+
"-"
+
t
.
getShippingChannelId
(),
v
->
v
,
(
v1
,
v2
)
->
v2
));
//ecw_product_price 产品价格
List
<
ProductPriceDO
>
priceList
=
new
ArrayList
<>();
List
<
ProductPriceDO
>
updateList
=
new
ArrayList
<>();
...
...
@@ -2468,9 +2480,12 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
}
Map
<
Long
,
String
>
priceTransportTypeMap
=
new
HashMap
<>();
priceList
.
forEach
(
t
->
priceTransportTypeMap
.
put
(
t
.
getId
(),
lineTransportTypeMap
.
get
(
t
.
getWarehouseLineId
())));
priceList
.
forEach
(
t
->
priceTransportTypeMap
.
put
(
t
.
getId
(),
lineTransportTypeMap
.
get
(
t
.
getWarehouseLineId
())));
if
(
null
!=
batchAddPriceReqVo
.
getStepPrice
()
&&
batchAddPriceReqVo
.
getStepPrice
()
==
1
)
{
if
(
null
!=
batchAddPriceReqVo
.
getStepPrice
()
&&
batchAddPriceReqVo
.
getStepPrice
()
==
1
)
{
snapshotList
=
new
ArrayList
<>();
updateList
=
new
ArrayList
<>();
...
...
@@ -2506,13 +2521,16 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
}
else
{
if
(
CollectionUtil
.
isNotEmpty
(
updateList
))
{
productPriceMapper
.
updateBatch
(
updateList
);
//添加修改日志,需要查询特需和阶梯,所以需要在修改之前执行
batchAddSnapshot
(
snapshotList
);
//价格特需
specialListAddPrice
(
updateList
,
batchAddPriceReqVo
.
getSpecialList
(),
priceTransportTypeMap
);
specialListAddPrice
(
updateList
,
batchAddPriceReqVo
.
getSpecialList
(),
priceTransportTypeMap
);
//价格包装单位
List
<
ProductPricePackagingDO
>
allPackagingList
=
buildAllPackageList
(
batchAddPriceReqVo
);
...
...
@@ -2595,7 +2613,9 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
return
update
;
}
private
void
specialListAddPrice
(
List
<
ProductPriceDO
>
productPriceList
,
List
<
ProductPriceSpecialDO
>
specialList
,
Map
<
Long
,
String
>
priceTransportTypeMap
)
{
private
void
specialListAddPrice
(
List
<
ProductPriceDO
>
productPriceList
,
List
<
ProductPriceSpecialDO
>
specialList
,
Map
<
Long
,
String
>
priceTransportTypeMap
)
{
if
(
specialList
==
null
)
return
;
specialList
=
specialList
.
stream
()
...
...
@@ -2612,7 +2632,9 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
List
<
Long
>
idList
=
priceItemList
.
stream
()
.
map
(
ProductPriceDO:
:
getId
)
.
collect
(
toList
());
List
<
ProductPriceSpecialDO
>
itemSpecialList
=
productPriceSpecialService
.
selectList
(
new
LambdaQueryWrapper
<
ProductPriceSpecialDO
>()
List
<
ProductPriceSpecialDO
>
itemSpecialList
=
productPriceSpecialService
.
selectList
(
new
LambdaQueryWrapper
<
ProductPriceSpecialDO
>()
.
in
(
ProductPriceSpecialDO:
:
getProductPriceId
,
idList
)
);
allSpecialList
.
addAll
(
itemSpecialList
);
...
...
@@ -2627,7 +2649,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
for
(
ProductPriceDO
productPriceDO
:
productPriceList
)
{
Long
productPriceId
=
productPriceDO
.
getId
();
List
<
ProductPriceSpecialDO
>
productSpecialList
=
priceSpecialMap
.
get
(
productPriceId
);
List
<
ProductPriceSpecialDO
>
productSpecialList
=
priceSpecialMap
.
get
(
productPriceId
);
//价格没有特需则跳过
if
(
CollectionUtil
.
isEmpty
(
productSpecialList
))
continue
;
...
...
yudao-module-product/yudao-module-product-rest/src/main/java/cn/iocoder/yudao/module/product/controller/admin/product/ProductPriceController.java
View file @
722ddaf6
...
...
@@ -125,8 +125,11 @@ public class ProductPriceController {
@ApiOperation
(
"批量加价"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:product-price:update')"
)
public
CommonResult
<
Boolean
>
batchAddPrice
(
@RequestBody
ProductPriceBatchAddPriceReqVo
updateReqVO
)
{
//批量修改价格 lanbm 2024-05-23 添加注释
updateReqVO
.
setCheckStepPrice
(
false
);
ProductPriceCheckAO
productPriceCheckAO
=
productPriceService
.
check
(
updateReqVO
);
ProductPriceCheckAO
productPriceCheckAO
=
productPriceService
.
check
(
updateReqVO
);
routerService
.
batchAddPrice
(
updateReqVO
,
productPriceCheckAO
);
return
success
(
true
);
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/AirBillReceivableExcelExportListener.java
View file @
722ddaf6
...
...
@@ -62,6 +62,10 @@ import java.util.stream.Collectors;
import
static
cn
.
iocoder
.
yudao
.
framework
.
excel
.
constant
.
ExportConstant
.
DATA_FORMAT
;
import
static
cn
.
iocoder
.
yudao
.
module
.
shipment
.
enums
.
ErrorCodeConstants
.
HAVE_NOT_PRELOAD_GOODS
;
/*
空运应收款汇总下载
lanbm 2024-05-25 添加注释
*/
@Component
(
"AirBillReceivableExcelExportListener"
)
@AllArgsConstructor
@Slf4j
...
...
@@ -113,21 +117,42 @@ public class AirBillReceivableExcelExportListener {
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
DATA_FORMAT
);
String
nowTime
=
formatter
.
format
(
LocalDateTime
.
now
());
String
dir
=
ueProperties
.
getTempDir
().
concat
(
"/airReceivable/excel/"
);
String
fileName
=
event
.
getUserId
().
toString
().
concat
(
StrUtil
.
DASHED
).
concat
(
event
.
getUserType
().
toString
()).
concat
(
StrUtil
.
DASHED
).
concat
(
nowTime
).
concat
(
"air_receivable_notMerge.xlsx"
);
String
fileNameMerge
=
event
.
getUserId
().
toString
().
concat
(
StrUtil
.
DASHED
).
concat
(
event
.
getUserType
().
toString
()).
concat
(
StrUtil
.
DASHED
).
concat
(
nowTime
).
concat
(
"air_receivable_Merge.xlsx"
);
String
fileName
=
event
.
getUserId
().
toString
().
concat
(
StrUtil
.
DASHED
).
concat
(
event
.
getUserType
().
toString
()).
concat
(
StrUtil
.
DASHED
).
concat
(
nowTime
).
concat
(
"air_receivable_notMerge.xlsx"
);
String
fileNameMerge
=
event
.
getUserId
().
toString
().
concat
(
StrUtil
.
DASHED
).
concat
(
event
.
getUserType
().
toString
()).
concat
(
StrUtil
.
DASHED
).
concat
(
nowTime
).
concat
(
"air_receivable_Merge.xlsx"
);
List
<
CurrencyDO
>
currencyList
=
currencyService
.
getCurrencyList
();
Map
<
Integer
,
String
>
currencyMap
=
currencyList
.
stream
().
collect
(
Collectors
.
toMap
(
CurrencyDO:
:
getId
,
CurrencyDO:
:
getTitleEn
,
(
key1
,
key2
)
->
key2
));
Map
<
Integer
,
String
>
currencyFuhaoMap
=
currencyList
.
stream
().
collect
(
Collectors
.
toMap
(
CurrencyDO:
:
getId
,
CurrencyDO:
:
getFuhao
,
(
key1
,
key2
)
->
key2
));
Map
<
Integer
,
String
>
currencyMap
=
currencyList
.
stream
().
collect
(
Collectors
.
toMap
(
CurrencyDO:
:
getId
,
CurrencyDO:
:
getTitleEn
,
(
key1
,
key2
)
->
key2
));
Map
<
Integer
,
String
>
currencyFuhaoMap
=
currencyList
.
stream
().
collect
(
Collectors
.
toMap
(
CurrencyDO:
:
getId
,
CurrencyDO:
:
getFuhao
,
(
key1
,
key2
)
->
key2
));
InputStream
inputStream
=
null
;
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
event
.
getRequestParams
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
event
.
getRequestParams
());
Long
shipmentId
=
jsonObject
.
getLong
(
"shipmentId"
);
inputStream
=
getClass
().
getClassLoader
().
getResourceAsStream
(
ueProperties
.
getTemplatesUrl
()
+
"/airBillTemplate.xlsx"
);
inputStream
=
getClass
().
getClassLoader
().
getResourceAsStream
(
ueProperties
.
getTemplatesUrl
()
+
"/airBillTemplate.xlsx"
);
BoxDO
box
=
boxService
.
getBox
(
shipmentId
);
WarehouseDO
startWarehouse
=
warehouseService
.
getWarehouse
(
box
.
getStartWarehouseId
());
WarehouseDO
destWarehouse
=
warehouseService
.
getWarehouse
(
box
.
getDestWarehouseId
());
RegionDO
startRegion
=
regionService
.
getRegion
(
startWarehouse
.
getGuojia
());
RegionDO
destRegion
=
regionService
.
getRegion
(
destWarehouse
.
getGuojia
());
WarehouseLineDO
warehouseLineDO
=
warehouseLineMapper
.
findOne
(
box
.
getStartWarehouseId
(),
box
.
getDestWarehouseId
(),
box
.
getTransportType
());
WarehouseLineDO
warehouseLineDO
=
warehouseLineMapper
.
findOne
(
box
.
getStartWarehouseId
(),
box
.
getDestWarehouseId
(),
box
.
getTransportType
());
if
(
StringUtils
.
isNotBlank
(
warehouseLineDO
.
getRecipientInfo
()))
{
recipientInfo
=
JSONObject
.
parseObject
(
warehouseLineDO
.
getRecipientInfo
(),
ContactInfoDTO
.
class
);
}
...
...
@@ -191,7 +216,12 @@ public class AirBillReceivableExcelExportListener {
Integer
sum14
=
0
;
BigDecimal
sum15
=
BigDecimal
.
ZERO
;
BigDecimal
sum16
=
BigDecimal
.
ZERO
;
List
<
BoxMergePkgDO
>
boxMergePkgDOS
=
boxMergePkgService
.
selectList
(
new
LambdaQueryWrapperX
<
BoxMergePkgDO
>().
eq
(
BoxMergePkgDO:
:
getShipmentId
,
shipmentId
).
orderByDesc
(
BoxMergePkgDO:
:
getId
));
List
<
BoxMergePkgDO
>
boxMergePkgDOS
=
boxMergePkgService
.
selectList
(
new
LambdaQueryWrapperX
<
BoxMergePkgDO
>().
eq
(
BoxMergePkgDO:
:
getShipmentId
,
shipmentId
).
orderByDesc
(
BoxMergePkgDO:
:
getId
));
for
(
Map
.
Entry
<
Long
,
List
<
BoxPreloadGoodsBackVO
>>
entry
:
orderMap
.
entrySet
())
{
Long
orderId
=
entry
.
getKey
();
OrderBackInfoDto
orderInfo
=
orderQueryService
.
info
(
orderId
);
...
...
@@ -376,6 +406,7 @@ public class AirBillReceivableExcelExportListener {
map
.
put
(
"objectiveName"
,
orderInfo
.
getLogisticsInfoDto
().
getDestTitleEn
());
map
.
put
(
"consignorPhone"
,
orderInfo
.
getConsignorVO
().
getPhone
());
map
.
put
(
"consignorName"
,
orderInfo
.
getConsignorVO
().
getName
());
if
(
CollectionUtil
.
isNotEmpty
(
entry
.
getValue
()))
{
Long
pkgId
=
entry
.
getValue
().
get
(
0
).
getPkgId
();
if
(
pkgId
!=
null
&&
pkgId
>
0L
)
{
...
...
@@ -383,8 +414,10 @@ public class AirBillReceivableExcelExportListener {
map
.
put
(
"remark"
,
boxMergePkgDO
.
getPkgNum
());
}
}
if
(
orderInfo
.
getSalesmanId
()
!=
null
&&
orderInfo
.
getSalesmanId
().
longValue
()
>
0L
)
{
map
.
put
(
"accountManager"
,
getUserName
(
String
.
valueOf
(
orderInfo
.
getSalesmanId
())));
if
(
orderInfo
.
getSalesmanId
()
!=
null
&&
orderInfo
.
getSalesmanId
().
longValue
()
>
0L
)
{
map
.
put
(
"accountManager"
,
getUserName
(
String
.
valueOf
(
orderInfo
.
getSalesmanId
())));
}
list
.
add
(
map
);
}
...
...
@@ -457,7 +490,8 @@ public class AirBillReceivableExcelExportListener {
}
}
FileOutputStream
fileOutputStream
=
new
FileOutputStream
(
new
File
(
dir
+
fileNameMerge
));
FileOutputStream
fileOutputStream
=
new
FileOutputStream
(
new
File
(
dir
+
fileNameMerge
));
workbook
.
write
(
fileOutputStream
);
fileOutputStream
.
close
();
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentReceivableExcelExportListener.java
View file @
722ddaf6
...
...
@@ -261,7 +261,6 @@ public class ShipmentReceivableExcelExportListener {
event
.
setUrl
(
fileDO
.
getUrl
());
event
.
setFileId
(
fileDO
.
getId
());
}
catch
(
Exception
e
)
{
// TODO 测试阶段打印堆栈错误信息,便于分析原因
e
.
printStackTrace
();
event
.
setResult
(
e
.
getMessage
());
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentReceivableExcelExportListener2.java
0 → 100644
View file @
722ddaf6
This diff is collapsed.
Click to expand it.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
722ddaf6
...
...
@@ -1456,7 +1456,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
if
(
CollectionUtil
.
isNotEmpty
(
boxMergePkgDOS
))
{
List
<
Long
>
pkgIds
=
boxMergePkgDOS
.
stream
().
map
(
BoxMergePkgDO:
:
getId
).
collect
(
Collectors
.
toList
());
map
(
BoxMergePkgDO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
BoxPkgOrderDO
>
boxPkgOrderDOS
=
boxPkgOrderService
.
selectList
(
BoxPkgOrderDO:
:
getPkgId
,
pkgIds
);
...
...
@@ -2504,8 +2504,9 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
public
PageResult
<
BoxBackVO
>
getBoxExitPageAir
(
MyBoxExitQueryVO
query
)
{
Set
<
Long
>
warehouseIdSet
=
getDepartWarehouseId
();
PageResult
<
BoxDO
>
pageResult
=
selectPage
(
query
,
new
LambdaQuery
<
BoxDO
>()
.
likeIfPresent
(
BoxDO:
:
getSelfNo
,
query
.
getSelfNo
())
//已出仓
.
likeIfPresent
(
BoxDO:
:
getSelfNo
,
query
.
getSelfNo
())
//已出仓 222
.
eq
(
BoxDO:
:
getCheckoutStatus
,
AirCheckoutStatusEnum
.
CHECKOUT
.
getStatus
())
.
and
(
i
->
i
.
and
(
t
->
...
...
@@ -2519,7 +2520,6 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
.
eq
(
BoxDO:
:
getOverMachineExamineStatus
,
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
)
)
.
and
(
i
->
i
.
in
(
BoxDO:
:
getStartWarehouseId
,
warehouseIdSet
)
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxApproval/BoxApprovalServiceImpl.java
View file @
722ddaf6
...
...
@@ -895,7 +895,10 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
case
SHIPMENT_CUSTOMS_DECLARE_REMOVE_SPLIT:
// 删单退场拆单业务(主要操作流程与部分退场拆单一致)
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
OrderSplitApplyDetailDto
orderSplitApplyDetailDto
=
JSON
.
parseObject
(
boxApprovalDO
.
getDetails
(),
OrderSplitApplyDetailDto
.
class
);
OrderSplitApplyDetailDto
orderSplitApplyDetailDto
=
JSON
.
parseObject
(
boxApprovalDO
.
getDetails
(),
OrderSplitApplyDetailDto
.
class
);
OrderDO
oldOrder
=
boxService
.
getOrder
(
orderId
);
orderSplitApplyDetailDto
.
setBoxSplitOrder
(
true
);
// 标识为出货拆单,需要保持主拆单原状态、原单价等数据
orderSplitApplyDetailDto
.
setPartRefundSplit
(
true
);
// 标识为部分退场拆单,需要将子状态也保持原有状态(注:删单退场拆单逻辑一致,拆单后状态与母订单一致,等操作退场提交审批后才会修改状态)
...
...
@@ -1146,15 +1149,25 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
//==============删单退场=============================
case
SHIPMENT_CUSTOMS_DECLARE_REMOVE:
//解析审核详情
CustomsExitType
customsExitType
=
JSON
.
parseObject
(
boxApprovalDO
.
getDetails
(),
CustomsExitType
.
class
);
//出货审批-报关删单退场审核 lanbm 2024-05-25
CustomsExitType
customsExitType
=
JSON
.
parseObject
(
boxApprovalDO
.
getDetails
(),
CustomsExitType
.
class
);
if
(
customsExitType
.
getDeleteExitType
()
==
2
)
{
opStatus
=
Integer
.
parseInt
(
DcStatueEnum
.
CUSTOMING
.
getDcStatus
()
+
"3"
+
result
);
opStatus
=
Integer
.
parseInt
(
DcStatueEnum
.
CUSTOMING
.
getDcStatus
()
+
"3"
+
result
);
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
//如果审核通过,重新修改状态为未处理
boxDO
.
setCheckDealStatus
(
0
);
boxOpLogService
.
createBoxOpLog
(
boxDO
.
getId
(),
opStatus
,
"报关删单退场审核成功"
,
"delete return of customs declaration under review success"
,
boxApprovalDO
.
getId
());
boxOpLogService
.
createBoxOpLog
(
boxDO
.
getId
(),
opStatus
,
"报关删单退场审核成功"
,
"delete return of customs declaration under review success"
,
boxApprovalDO
.
getId
());
}
else
if
(
result
==
BpmProcessInstanceResultEnum
.
REJECT
.
getResult
())
{
boxOpLogService
.
createBoxOpLog
(
boxDO
.
getId
(),
opStatus
,
"报关删单审核失败"
,
"delete return of customs declaration under review fail"
,
boxApprovalDO
.
getId
());
boxOpLogService
.
createBoxOpLog
(
boxDO
.
getId
(),
opStatus
,
"报关删单审核失败"
,
"delete return of customs declaration under review fail"
,
boxApprovalDO
.
getId
());
}
}
boxService
.
updateOrderStatusByShipmentId
(
shipmentId
,
null
,
null
,
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/makeBillOfLading/MakeBillOfLadingServiceImpl.java
View file @
722ddaf6
...
...
@@ -188,7 +188,8 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
}
// 插入
MakeBillOfLadingDO
makeBillOfLading
=
MakeBillOfLadingConvert
.
INSTANCE
.
convert
(
createReqVO
);
MakeBillOfLadingDO
makeBillOfLading
=
MakeBillOfLadingConvert
.
INSTANCE
.
convert
(
createReqVO
);
//查询shipmentId
List
<
BoxPreloadGoodsDO
>
preloadGoodsDOList
=
boxPreloadGoodsService
.
list
(
new
LambdaQueryWrapper
<
BoxPreloadGoodsDO
>()
...
...
@@ -251,11 +252,31 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
makeBillOfLadingMapper
.
insert
(
makeBillOfLading
);
// 返回
OrderDO
orderDO
=
orderService
.
selectOne
(
OrderDO:
:
getOrderId
,
createReqVO
.
getOrderId
());
String
bpmProcessId
=
bpmCreateServiceFactory
.
createBmp
(
SecurityFrameworkUtils
.
getLoginUserId
(),
makeBillOfLading
.
getId
(),
WorkFlowEmus
.
SHIPMENT_BILL_LADING
.
getKey
(),
orderDO
.
getOrderNo
(),
createReqVO
.
getCopyUserId
());
OrderDO
orderDO
=
orderService
.
selectOne
(
OrderDO:
:
getOrderId
,
createReqVO
.
getOrderId
());
String
bpmProcessId
=
bpmCreateServiceFactory
.
createBmp
(
SecurityFrameworkUtils
.
getLoginUserId
(),
makeBillOfLading
.
getId
(),
WorkFlowEmus
.
SHIPMENT_BILL_LADING
.
getKey
(),
orderDO
.
getOrderNo
(),
createReqVO
.
getCopyUserId
());
makeBillOfLading
.
setBpmProcessId
(
bpmProcessId
);
//lanbm 2024-05-24 修改为自动审批通过
//ecw_make_bill_of_lading
/*
PROCESS(1, "处理中"),
APPROVE(2, "通过"),
REJECT(3, "不通过"),
CANCEL(4, "已取消"),*/
makeBillOfLading
.
setStatus
(
2
);
makeBillOfLadingMapper
.
updateById
(
makeBillOfLading
);
orderBusinessService
.
addOrderOperateLog
(
Long
.
valueOf
(
createReqVO
.
getOrderId
()),
"出货操作"
,
"提交提单制作审核"
,
""
);
//提交提单制作审核
orderBusinessService
.
addOrderOperateLog
(
Long
.
valueOf
(
createReqVO
.
getOrderId
()),
"出货操作"
,
"提交提单制作审批通过"
,
""
);
return
makeBillOfLading
.
getId
();
}
...
...
@@ -264,10 +285,18 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
// 校验存在
this
.
validateMakeBillOfLadingExists
(
updateReqVO
.
getId
());
// 更新
MakeBillOfLadingDO
updateObj
=
MakeBillOfLadingConvert
.
INSTANCE
.
convert
(
updateReqVO
);
MakeBillOfLadingDO
updateObj
=
MakeBillOfLadingConvert
.
INSTANCE
.
convert
(
updateReqVO
);
//lanbm 2024-05-24 提单直接审批通过
updateObj
.
setStatus
(
2
);
//end lanbm 2024-05-24 提单直接审批通过
makeBillOfLadingMapper
.
updateById
(
updateObj
);
OrderBackVO
order
=
orderQueryService
.
getOrder
(
Long
.
valueOf
(
makeBillOfLadingMapper
.
selectById
(
updateReqVO
.
getId
()).
getOrderId
()));
String
bpmProcessId
=
bpmCreateServiceFactory
.
createBmp
(
SecurityFrameworkUtils
.
getLoginUserId
(),
updateReqVO
.
getId
(),
WorkFlowEmus
.
SHIPMENT_BILL_LADING
.
getKey
(),
order
.
getOrderNo
(),
updateReqVO
.
getCopyUserId
());
String
bpmProcessId
=
bpmCreateServiceFactory
.
createBmp
(
SecurityFrameworkUtils
.
getLoginUserId
(),
updateReqVO
.
getId
(),
WorkFlowEmus
.
SHIPMENT_BILL_LADING
.
getKey
(),
order
.
getOrderNo
(),
updateReqVO
.
getCopyUserId
());
updateObj
.
setBpmProcessId
(
bpmProcessId
);
makeBillOfLadingMapper
.
updateById
(
updateObj
);
}
...
...
@@ -637,13 +666,21 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
return
stringBuffer
.
toString
();
}
/* lanbm 2024-05-24 添加注释
PROCESS(1, "处理中"),
APPROVE(2, "通过"),
REJECT(3, "不通过"),
CANCEL(4, "已取消"),
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateBillOfLadingResult
(
String
id
,
int
result
)
{
MakeBillOfLadingDO
makeBillOfLadingDO
=
new
MakeBillOfLadingDO
();
makeBillOfLadingDO
.
setId
(
Long
.
valueOf
(
id
));
makeBillOfLadingDO
.
setStatus
(
result
);
MakeBillOfLadingDO
makeBillOfLadingDO1
=
makeBillOfLadingMapper
.
selectById
(
id
);
MakeBillOfLadingDO
makeBillOfLadingDO1
=
makeBillOfLadingMapper
.
selectById
(
id
);
if
(
result
==
4
)
{
makeBillOfLadingMapper
.
updateById
(
makeBillOfLadingDO
);
makeBillOfLadingMapper
.
deleteById
(
Long
.
valueOf
(
id
));
...
...
@@ -699,8 +736,9 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
}
makeBillOfLadingMapper
.
updateById
(
makeBillOfLadingDO
);
if
(
makeBillOfLadingDO1
!=
null
)
{
orderBusinessService
.
addOrderOperateLog
(
Long
.
valueOf
(
makeBillOfLadingDO1
.
getOrderId
()),
"出货操作"
,
"提单制作审核通过"
,
""
);
orderBusinessService
.
addOrderOperateLog
(
Long
.
valueOf
(
makeBillOfLadingDO1
.
getOrderId
()),
"出货操作"
,
"提单制作审核通过"
,
""
);
}
}
// if (result == 2) {
...
...
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/BoxPreloadGoodsController.java
View file @
722ddaf6
...
...
@@ -355,6 +355,7 @@ public class BoxPreloadGoodsController {
@ApiOperation
(
"下载应收汇总"
)
@ApiImplicitParam
(
name
=
"shipmentId"
,
value
=
"出货单ID"
,
required
=
true
,
example
=
"20"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
downloadReceivableList
(
@RequestParam
(
"shipmentId"
)
Long
shipmentId
,
HttpServletResponse
response
)
throws
Exception
{
//下载应收汇总表 ,修改模板样式 lanbm 2024-04-24 添加注释
BoxDO
box
=
boxService
.
getBox
(
shipmentId
);
FileMakeReqDTO
reqDTO
=
new
FileMakeReqDTO
();
JSONObject
jsonObject
=
new
JSONObject
();
...
...
@@ -374,6 +375,7 @@ public class BoxPreloadGoodsController {
@ApiOperation
(
"下载空运应收汇总"
)
@ApiImplicitParam
(
name
=
"shipmentId"
,
value
=
"出货单ID"
,
required
=
true
,
example
=
"20"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
downloadAirBillReceivable
(
@RequestParam
(
"shipmentId"
)
Long
shipmentId
,
HttpServletResponse
response
)
throws
Exception
{
//下载空运应收款汇总单 lanbm 2024-05-25 添加注释
BoxDO
box
=
boxService
.
getBox
(
shipmentId
);
FileMakeReqDTO
reqDTO
=
new
FileMakeReqDTO
();
JSONObject
jsonObject
=
new
JSONObject
();
...
...
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/MakeBillOfLadingController.java
View file @
722ddaf6
...
...
@@ -85,13 +85,16 @@ public class MakeBillOfLadingController {
@Idempotent
(
timeout
=
10
)
//@PreAuthorize("@ss.hasPermission('shipment:make-bill-of-lading:create')")
public
CommonResult
<
Long
>
createMakeBillOfLading
(
@Valid
@RequestBody
MakeBillOfLadingCreateReqVO
createReqVO
)
{
//lanbm 2024-05-24 修改此函数,取消审批流程
//ecw_make_bill_of_lading 提单
String
redisKey
=
MessageFormat
.
format
(
BOX_MAKE_LADING_KEY
,
createReqVO
.
getOrderId
().
toString
());
Long
count
=
redisHelper
.
incrBy
(
redisKey
,
1
);
if
(
count
>
1
){
return
error
(
BOX_MAKE_LADING_REPEAT_COMMIT
);
}
redisHelper
.
expire
(
redisKey
,
1
,
TimeUnit
.
MINUTES
);
Long
makeBillOfLading
=
makeBillOfLadingService
.
createMakeBillOfLading
(
createReqVO
);
Long
makeBillOfLading
=
makeBillOfLadingService
.
createMakeBillOfLading
(
createReqVO
);
redisHelper
.
delete
(
redisKey
);
return
success
(
makeBillOfLading
);
}
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/downloadLog/DownloadLogServiceImpl.java
View file @
722ddaf6
...
...
@@ -284,9 +284,11 @@ public class DownloadLogServiceImpl extends AbstractService<DownloadLogMapper, D
case
SHIPMENT_LOAD_EXCEL_EXPORT:
shipmentLoadExcelExportPushEvent
(
downloadLog
);
break
;
//应收汇总导出
//应收汇总导出
lanbm 2024-05-24 修改导出Excel样式
case
SHIPMENT_RECEIVABLE_EXCEL_EXPORT:
shipmentReceivableExcelExportPushEvent
(
downloadLog
);
//老模板导出方式
//shipmentReceivableExcelExportPushEvent(downloadLog);
shipmentReceivableExcelExportPushEvent2
(
downloadLog
);
break
;
//提单打包导出
case
SHIPMENT_BILLING_ZIP_EXPORT:
...
...
@@ -628,6 +630,25 @@ public class DownloadLogServiceImpl extends AbstractService<DownloadLogMapper, D
downloadLog
.
setFileId
(
event
.
getFileId
());
}
/*
lanbm 2024-05-25 add
*/
private
void
shipmentReceivableExcelExportPushEvent2
(
DownloadLogDO
downloadLog
)
{
ShipmentReceivableExcelExportPushEvent2
event
=
new
ShipmentReceivableExcelExportPushEvent2
();
event
.
setUserId
(
downloadLog
.
getUserId
());
event
.
setUserType
(
downloadLog
.
getUserType
());
event
.
setLang
(
downloadLog
.
getLang
());
event
.
setRequestParams
(
downloadLog
.
getRequestParams
());
applicationContext
.
publishEvent
(
event
);
downloadLog
.
setFileName
(
event
.
getFileName
());
downloadLog
.
setPath
(
event
.
getPath
());
downloadLog
.
setDownloadUrl
(
event
.
getUrl
());
downloadLog
.
setResult
(
event
.
getResult
());
downloadLog
.
setFileId
(
event
.
getFileId
());
}
private
void
shipmentLoadExcelExportPushEvent
(
DownloadLogDO
downloadLog
)
{
ShipmentLoadExcelExportPushEvent
event
=
new
ShipmentLoadExcelExportPushEvent
();
event
.
setUserId
(
downloadLog
.
getUserId
());
...
...
yudao-server/src/main/resources/templates/nrlyReceivable2.xlsx
0 → 100644
View file @
722ddaf6
File added
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