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
b99c08a3
Commit
b99c08a3
authored
Jun 10, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-10提交
parent
76812eb5
Changes
21
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1105 additions
and
291 deletions
+1105
-291
ShipmentLoadExcelExportPushEvent2.java
.../core/event/export/ShipmentLoadExcelExportPushEvent2.java
+47
-0
WarehouseLineDO.java
.../depository/dal/dataobject/warehouse/WarehouseLineDO.java
+11
-1
WarehouseServiceImpl.java
...pository/service/warehouse/impl/WarehouseServiceImpl.java
+35
-30
WarehouseLineServiceReqVO.java
...le/depository/vo/warehouse/WarehouseLineServiceReqVO.java
+11
-0
WarehouseController.java
...itory/controller/admin/warehouse/WarehouseController.java
+2
-1
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+51
-31
OrderWarehouseInBackVO.java
...ule/order/vo/orderWarehouseIn/OrderWarehouseInBackVO.java
+0
-4
OrderWarehouseInController.java
...er/admin/orderWarehouseIn/OrderWarehouseInController.java
+2
-1
ShipmentAirLoadExcelExportListener.java
...shipment/listener/ShipmentAirLoadExcelExportListener.java
+4
-2
ShipmentLoadExcelExportListener.java
...le/shipment/listener/ShipmentLoadExcelExportListener.java
+146
-144
ShipmentLoadExcelExportListener2.java
...e/shipment/listener/ShipmentLoadExcelExportListener2.java
+566
-0
ShipmentReceivableExcelExportListener2.java
...ment/listener/ShipmentReceivableExcelExportListener2.java
+91
-75
DownloadLogServiceImpl.java
...le/system/service/downloadLog/DownloadLogServiceImpl.java
+20
-0
ReceiptAccountMapper.java
...wealth/dal/mysql/receiptAccount/ReceiptAccountMapper.java
+18
-0
ReceiptItemMapper.java
...odule/wealth/dal/mysql/receiptItem/ReceiptItemMapper.java
+3
-0
ReceiptServiceImpl.java
...dao/module/wealth/service/receipt/ReceiptServiceImpl.java
+1
-0
ReceiptItemService.java
...module/wealth/service/receiptItem/ReceiptItemService.java
+5
-0
ReceiptItemServiceImpl.java
...le/wealth/service/receiptItem/ReceiptItemServiceImpl.java
+5
-0
ReceiptItemBackVO.java
...yudao/module/wealth/vo/receiptItem/ReceiptItemBackVO.java
+5
-0
ReceiptItemController.java
...h/controller/admin/receiptItem/ReceiptItemController.java
+82
-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/ShipmentLoadExcelExportPushEvent2.java
0 → 100644
View file @
b99c08a3
package
cn
.
iocoder
.
yudao
.
framework
.
apollo
.
core
.
event
.
export
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
ShipmentLoadExcelExportPushEvent2
{
/**
* 操作用户
*/
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-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/dal/dataobject/warehouse/WarehouseLineDO.java
View file @
b99c08a3
...
...
@@ -118,4 +118,14 @@ public class WarehouseLineDO extends BaseDO {
@TableField
(
exist
=
false
)
private
String
destQianzhui
;
/*
落款信息 lanbm 2024-06-10 add
*/
private
String
lkLeft
;
/*
落款信息 lanbm 2024-06-10 add
*/
private
String
lkRight
;
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/service/warehouse/impl/WarehouseServiceImpl.java
View file @
b99c08a3
...
...
@@ -86,19 +86,19 @@ public class WarehouseServiceImpl implements WarehouseService {
String
newTradeType
=
updateObj
.
getTradeType
();
//判断是否修改了
if
(!
oldTradeType
.
equals
(
newTradeType
))
{
if
(!
oldTradeType
.
equals
(
newTradeType
))
{
//修改了贸易属性。修改成进出口则不用管
if
(
newTradeType
.
equals
(
"3"
))
return
;
if
(
newTradeType
.
equals
(
"3"
))
return
;
//老的是非进出口也不用管
if
(
oldTradeType
.
equals
(
"0"
))
return
;
if
(
oldTradeType
.
equals
(
"3"
))
{
if
(
oldTradeType
.
equals
(
"0"
))
return
;
if
(
oldTradeType
.
equals
(
"3"
))
{
//进出口改成了其他
if
(
newTradeType
.
equals
(
"1"
))
{
if
(
newTradeType
.
equals
(
"1"
))
{
//改成了进口,删除出口的线路
warehouseLineMapper
.
delete
(
new
LambdaQueryWrapperX
<
WarehouseLineDO
>()
.
eq
(
WarehouseLineDO:
:
getStartWarehouseId
,
id
)
);
}
else
if
(
newTradeType
.
equals
(
"2"
))
{
}
else
if
(
newTradeType
.
equals
(
"2"
))
{
//改成了出口,删掉进口的线路
warehouseLineMapper
.
delete
(
new
LambdaQueryWrapperX
<
WarehouseLineDO
>()
.
eq
(
WarehouseLineDO:
:
getDestWarehouseId
,
id
)
...
...
@@ -153,7 +153,7 @@ public class WarehouseServiceImpl implements WarehouseService {
@Override
public
List
<
WarehouseDO
>
getWarehouseList
(
Integer
tradeType
)
{
List
<
String
>
tradeTypeList
=
null
;
if
(
tradeType
!=
null
)
{
if
(
tradeType
!=
null
)
{
tradeTypeList
=
Arrays
.
asList
(
"3"
,
String
.
valueOf
(
tradeType
));
}
return
warehouseMapper
.
selectList
(
new
LambdaQueryWrapperX
<
WarehouseDO
>()
...
...
@@ -239,7 +239,7 @@ public class WarehouseServiceImpl implements WarehouseService {
List
<
String
>
currentTransportList
=
new
ArrayList
<>(
Arrays
.
asList
(
currentTransportArray
));
for
(
String
transportType
:
currentTransportList
)
{
//过滤掉禁用的运输方式
if
(!
existTypeList
.
contains
(
transportType
))
continue
;
if
(!
existTypeList
.
contains
(
transportType
))
continue
;
WarehouseDO
warehouseItem
=
ObjectUtil
.
clone
(
warehouseDO
);
//查看是否已经建立了关联关系
...
...
@@ -264,11 +264,11 @@ public class WarehouseServiceImpl implements WarehouseService {
warehouseItem
.
setTempTitleZh
(
lineDO
.
getTempTitleZh
());
String
recipientInfo
=
lineDO
.
getRecipientInfo
();
if
(
recipientInfo
!=
null
)
{
if
(
recipientInfo
!=
null
)
{
warehouseItem
.
setRecipientInfo
(
JSONObject
.
parseObject
(
recipientInfo
,
ContactInfoDTO
.
class
));
}
String
senderInfo
=
lineDO
.
getSenderInfo
();
if
(
senderInfo
!=
null
)
{
if
(
senderInfo
!=
null
)
{
warehouseItem
.
setSenderInfo
(
JSONObject
.
parseObject
(
senderInfo
,
ContactInfoDTO
.
class
));
}
}
else
{
...
...
@@ -305,10 +305,10 @@ public class WarehouseServiceImpl implements WarehouseService {
RLock
rLock
=
redissonClient
.
getLock
(
lockKey
);
try
{
boolean
success
=
rLock
.
tryLock
(
2
,
2
,
TimeUnit
.
SECONDS
);
if
(!
success
)
throw
new
ServiceException
(
500
,
"操作忙,请稍后再试"
);
if
(!
success
)
throw
new
ServiceException
(
500
,
"操作忙,请稍后再试"
);
//从线路里面找这个线路
WarehouseLineDO
warehouseLineDO
=
warehouseLineMapper
.
findOne
(
startWarehouseId
,
destWarehouseId
,
transportType
);
if
(
warehouseLineDO
==
null
)
{
if
(
warehouseLineDO
==
null
)
{
//新增
WarehouseLineDO
lineDO
=
new
WarehouseLineDO
();
lineDO
.
setTransportType
(
requestVO
.
getTransportType
());
...
...
@@ -347,7 +347,7 @@ public class WarehouseServiceImpl implements WarehouseService {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
rLock
.
isLocked
())
{
if
(
rLock
.
isLocked
())
{
rLock
.
unlock
();
}
}
...
...
@@ -440,15 +440,16 @@ public class WarehouseServiceImpl implements WarehouseService {
@Override
public
void
serviceConfig
(
WarehouseLineServiceReqVO
reqVO
)
{
String
senderInfo
=
null
;
if
(
reqVO
.
getSenderInfo
()
!=
null
)
{
if
(
reqVO
.
getSenderInfo
()
!=
null
)
{
senderInfo
=
JSON
.
toJSONString
(
reqVO
.
getSenderInfo
());
}
String
recipientInfo
=
null
;
if
(
reqVO
.
getRecipientInfo
()
!=
null
)
{
if
(
reqVO
.
getRecipientInfo
()
!=
null
)
{
recipientInfo
=
JSON
.
toJSONString
(
reqVO
.
getRecipientInfo
());
}
warehouseLineMapper
.
update
(
null
,
new
LambdaUpdateWrapper
<
WarehouseLineDO
>().
eq
(
WarehouseLineDO:
:
getId
,
reqVO
.
getLineId
())
warehouseLineMapper
.
update
(
null
,
new
LambdaUpdateWrapper
<
WarehouseLineDO
>().
eq
(
WarehouseLineDO:
:
getId
,
reqVO
.
getLineId
())
.
set
(
WarehouseLineDO:
:
getOtherService
,
reqVO
.
getOtherService
())
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getMakeBillNode
()),
WarehouseLineDO:
:
getMakeBillNode
,
reqVO
.
getMakeBillNode
())
.
set
(
reqVO
.
getIsClientShow
()
!=
null
,
WarehouseLineDO:
:
getIsClientShow
,
reqVO
.
getIsClientShow
())
...
...
@@ -456,9 +457,13 @@ public class WarehouseServiceImpl implements WarehouseService {
.
set
(
reqVO
.
getMinPrice
()
!=
null
,
WarehouseLineDO:
:
getMinPrice
,
reqVO
.
getMinPrice
())
.
set
(
senderInfo
!=
null
,
WarehouseLineDO:
:
getSenderInfo
,
senderInfo
)
.
set
(
recipientInfo
!=
null
,
WarehouseLineDO:
:
getRecipientInfo
,
recipientInfo
)
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getTempTitleEn
()),
WarehouseLineDO:
:
getTempTitleEn
,
reqVO
.
getTempTitleEn
())
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getTempTitleZh
()),
WarehouseLineDO:
:
getTempTitleZh
,
reqVO
.
getTempTitleZh
())
.
set
(
reqVO
.
getControlStatus
()
!=
null
,
WarehouseLineDO:
:
getControlStatus
,
reqVO
.
getControlStatus
()));
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getTempTitleEn
()),
WarehouseLineDO:
:
getTempTitleEn
,
reqVO
.
getTempTitleEn
())
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getTempTitleZh
()),
WarehouseLineDO:
:
getTempTitleZh
,
reqVO
.
getTempTitleZh
())
.
set
(
reqVO
.
getControlStatus
()
!=
null
,
WarehouseLineDO:
:
getControlStatus
,
reqVO
.
getControlStatus
())
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getLkLeft
()),
WarehouseLineDO:
:
getLkLeft
,
reqVO
.
getLkLeft
())
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getLkRight
()),
WarehouseLineDO:
:
getLkRight
,
reqVO
.
getLkRight
())
);
}
@Override
...
...
@@ -477,7 +482,7 @@ public class WarehouseServiceImpl implements WarehouseService {
for
(
WarehouseLineReq
req
:
list
)
{
String
key
=
req
.
getStartWarehouseId
()
+
"_"
+
req
.
getDestWarehouseId
()
+
"_"
+
req
.
getTransportType
();
WarehouseLineDO
lineDO
;
if
(
lineMap
.
containsKey
(
key
))
{
if
(
lineMap
.
containsKey
(
key
))
{
lineDO
=
lineMap
.
get
(
key
);
}
else
{
lineDO
=
getLineInfo
(
req
);
...
...
@@ -515,10 +520,10 @@ public class WarehouseServiceImpl implements WarehouseService {
@Override
public
List
<
WarehouseTreeRegionVO
>
getRegionList
(
Integer
type
,
String
regionId
,
String
destCountryId
,
String
objectiveId
,
String
destWarehouseId
)
{
if
(
regionId
.
equals
(
""
))
{
if
(
regionId
.
equals
(
""
))
{
return
new
ArrayList
();
}
List
<
WarehouseTreeRegionVO
>
list
=
warehouseMapper
.
getRegionList
(
type
,
regionId
,
destCountryId
,
objectiveId
,
destWarehouseId
);
List
<
WarehouseTreeRegionVO
>
list
=
warehouseMapper
.
getRegionList
(
type
,
regionId
,
destCountryId
,
objectiveId
,
destWarehouseId
);
return
list
;
}
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/vo/warehouse/WarehouseLineServiceReqVO.java
View file @
b99c08a3
...
...
@@ -47,4 +47,15 @@ public class WarehouseLineServiceReqVO {
*/
@ApiModelProperty
(
value
=
"模版标题中文"
)
private
String
tempTitleZh
;
/*
落款信息 lanbm 2024-06-10 add
*/
private
String
lkLeft
;
/*
落款信息 lanbm 2024-06-10 add
*/
private
String
lkRight
;
}
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/admin/warehouse/WarehouseController.java
View file @
b99c08a3
...
...
@@ -227,7 +227,8 @@ public class WarehouseController {
@PostMapping
(
"/serviceConfig"
)
@ApiOperation
(
"其他服务配置"
)
public
CommonResult
<
Boolean
>
serviceConfig
(
@RequestBody
WarehouseLineServiceReqVO
reqVO
)
{
public
CommonResult
<
Boolean
>
serviceConfig
(
@RequestBody
WarehouseLineServiceReqVO
reqVO
)
{
warehouseService
.
serviceConfig
(
reqVO
);
return
success
(
true
);
}
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
b99c08a3
...
...
@@ -3871,16 +3871,24 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
throw
ServiceExceptionUtil
.
exception
(
ErrorCodeConstants
.
ORDER_NOT_EXISTS
);
}
List
<
OrderItemDO
>
orderItemDOList
=
orderItemService
.
list
(
new
LambdaQueryWrapper
<
OrderItemDO
>()
List
<
OrderItemDO
>
orderItemDOList
=
orderItemService
.
list
(
new
LambdaQueryWrapper
<
OrderItemDO
>()
.
eq
(
OrderItemDO:
:
getOrderId
,
orderId
).
orderByAsc
(
OrderItemDO:
:
getOrderItemId
));
List
<
OrderWarehouseInDO
>
orderWarehouseInDOList
=
orderWarehouseInMapper
.
selectList
(
new
LambdaQueryWrapper
<
OrderWarehouseInDO
>()
.
eq
(
OrderWarehouseInDO:
:
getOrderId
,
orderId
).
orderByAsc
(
OrderWarehouseInDO:
:
getId
));
List
<
OrderWarehouseInDO
>
orderWarehouseInDOList
=
orderWarehouseInMapper
.
selectList
(
new
LambdaQueryWrapper
<
OrderWarehouseInDO
>()
.
eq
(
OrderWarehouseInDO:
:
getOrderId
,
orderId
).
orderByAsc
(
OrderWarehouseInDO:
:
getId
));
List
<
OrderLocationDO
>
orderLocationListByOrderId
=
orderLocationService
.
getOrderLocationListByOrderId
(
orderId
);
//订单仓位
List
<
OrderLocationDO
>
orderLocationListByOrderId
=
orderLocationService
.
getOrderLocationListByOrderId
(
orderId
);
if
(
CollectionUtil
.
isNotEmpty
(
orderItemDOList
))
{
return
orderItemDOList
.
stream
().
map
(
orderItemDO
->
{
return
getOrderWarehouseInBackVO
(
orderItemDO
,
orderWarehouseInDOList
,
orderLocationListByOrderId
);
return
getOrderWarehouseInBackVO
(
orderItemDO
,
orderWarehouseInDOList
,
orderLocationListByOrderId
);
}).
collect
(
Collectors
.
toList
());
}
...
...
@@ -3902,16 +3910,24 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
return
null
;
}
private
OrderWarehouseInBackVO
getOrderWarehouseInBackVO
(
OrderItemDO
orderItemDO
,
List
<
OrderWarehouseInDO
>
orderWarehouseInDOList
,
List
<
OrderLocationDO
>
orderLocationListByOrderId
)
{
OrderWarehouseInBackVO
orderWarehouseInBackVO
=
OrderItemConvert
.
INSTANCE
.
convertToOrderWarehouseInBackVo
(
orderItemDO
);
private
OrderWarehouseInBackVO
getOrderWarehouseInBackVO
(
OrderItemDO
orderItemDO
,
List
<
OrderWarehouseInDO
>
orderWarehouseInDOList
,
List
<
OrderLocationDO
>
orderLocationListByOrderId
)
{
OrderWarehouseInBackVO
orderWarehouseInBackVO
=
OrderItemConvert
.
INSTANCE
.
convertToOrderWarehouseInBackVo
(
orderItemDO
);
List
<
OrderWarehouseInBackItemDo
>
orderWarehouseInBackItemDoList
=
orderWarehouseInDOList
.
stream
()
List
<
OrderWarehouseInBackItemDo
>
orderWarehouseInBackItemDoList
=
orderWarehouseInDOList
.
stream
()
.
filter
(
t
->
t
.
getOrderItemId
().
equals
(
orderItemDO
.
getOrderItemId
()))
.
sorted
(
Comparator
.
comparing
(
OrderWarehouseInDO:
:
getInTime
))
.
map
(
orderWarehouseInDO
->
{
OrderWarehouseInBackItemDo
orderWarehouseInBackItemDo
=
OrderWarehouseInConvert
.
INSTANCE
.
convert2
(
orderWarehouseInDO
);
OrderWarehouseInBackItemDo
orderWarehouseInBackItemDo
=
OrderWarehouseInConvert
.
INSTANCE
.
convert2
(
orderWarehouseInDO
);
List
<
OrderLocationBackVO
>
orderLocationBackVOS
=
orderLocationService
.
filterByWarehouseIn
(
orderLocationListByOrderId
,
orderWarehouseInDO
);
List
<
OrderLocationBackVO
>
orderLocationBackVOS
=
orderLocationService
.
filterByWarehouseIn
(
orderLocationListByOrderId
,
orderWarehouseInDO
);
orderWarehouseInBackItemDo
.
setOrderLocationBackVOList
(
orderLocationBackVOS
);
String
orderLocationStr4Merge
=
orderLocationBackVOS
.
stream
().
map
(
item
->
{
return
(
item
.
getAreaName
()
==
null
?
""
:
item
.
getAreaName
())
+
(
item
.
getLocationName
()
==
null
?
""
:
item
.
getLocationName
());
...
...
@@ -3921,7 +3937,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
return
orderWarehouseInBackItemDo
;
}).
collect
(
Collectors
.
toList
());
orderWarehouseInBackItemDoList
=
orderWarehouseInBackItemDoList
.
stream
().
sorted
(
Comparator
.
comparing
(
OrderWarehouseInBackItemDo:
:
getInTime
).
thenComparing
(
OrderWarehouseInBackItemDo:
:
getUnit
).
thenComparing
(
OrderWarehouseInBackItemDo:
:
getOrderLocationStr4Merge
)).
collect
(
Collectors
.
toList
());
orderWarehouseInBackItemDoList
=
orderWarehouseInBackItemDoList
.
stream
().
sorted
(
Comparator
.
comparing
(
OrderWarehouseInBackItemDo:
:
getInTime
).
thenComparing
(
OrderWarehouseInBackItemDo:
:
getUnit
).
thenComparing
(
OrderWarehouseInBackItemDo:
:
getOrderLocationStr4Merge
)).
collect
(
Collectors
.
toList
());
// 设置件数差
BigDecimal
num
=
orderWarehouseInBackVO
.
getNum
();
...
...
@@ -3934,10 +3951,13 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
orderWarehouseInBackVO
.
setCartonsNumDiff
(
Math
.
abs
(
diff
));
}
orderWarehouseInBackVO
.
setOrderWarehouseInBackItemDoList
(
orderWarehouseInBackItemDoList
);
orderWarehouseInBackVO
.
setOrderWarehouseInBackItemDoList
(
orderWarehouseInBackItemDoList
);
// 设置入仓影像
List
<
String
>
pictureUrls
=
orderWarehousePictureService
.
getWarehousePictureUrlList
(
5
,
orderItemDO
.
getOrderItemId
());
List
<
String
>
pictureUrls
=
orderWarehousePictureService
.
getWarehousePictureUrlList
(
5
,
orderItemDO
.
getOrderItemId
());
if
(
CollectionUtil
.
isNotEmpty
(
pictureUrls
))
{
orderWarehouseInBackVO
.
setPictureUrls
(
pictureUrls
);
}
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/orderWarehouseIn/OrderWarehouseInBackVO.java
View file @
b99c08a3
...
...
@@ -23,9 +23,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@ApiModel
(
"管理后台 - 入仓货物详情 Response VO"
)
public
class
OrderWarehouseInBackVO
{
@ApiModelProperty
(
value
=
"订单ID"
,
required
=
true
)
@NotNull
(
message
=
"订单ID不能为空"
)
private
Long
orderId
;
...
...
@@ -136,7 +133,6 @@ public class OrderWarehouseInBackVO {
private
Date
updateTime
;
/**
* 入仓货物信息
*/
...
...
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/orderWarehouseIn/OrderWarehouseInController.java
View file @
b99c08a3
...
...
@@ -244,7 +244,8 @@ public class OrderWarehouseInController {
@ApiOperation
(
"获得订单的入仓货物详情"
)
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"订单id"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
<
List
<
OrderWarehouseInBackVO
>>
getOrderWarehouseIn
(
@RequestParam
(
"orderId"
)
Long
orderId
)
{
List
<
OrderWarehouseInBackVO
>
orderWarehouseInBackVOList
=
orderWarehouseInService
.
getOrderWarehouseInList
(
orderId
);
List
<
OrderWarehouseInBackVO
>
orderWarehouseInBackVOList
=
orderWarehouseInService
.
getOrderWarehouseInList
(
orderId
);
return
success
(
orderWarehouseInBackVOList
);
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentAirLoadExcelExportListener.java
View file @
b99c08a3
...
...
@@ -71,7 +71,7 @@ import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.HAVE_NOT
/**
* 自编号订单excel导出监听
*
*
空运已装单数据导出 lanbm 2024-06-10 添加注释
* @author zhengYi
*/
@Component
(
"ShipmentAirLoadExcelExportListener"
)
...
...
@@ -161,7 +161,9 @@ public class ShipmentAirLoadExcelExportListener {
toString
()).
concat
(
StrUtil
.
DASHED
).
concat
(
nowTime
).
concat
(
"shipment_preload.xlsx"
);
InputStream
inputStream
=
null
;
inputStream
=
this
.
getClass
().
getClassLoader
().
getResourceAsStream
(
ueProperties
.
getTemplatesUrl
()
+
"/airLoad.xlsx"
);
inputStream
=
this
.
getClass
().
getClassLoader
().
getResourceAsStream
(
ueProperties
.
getTemplatesUrl
()
+
"/airLoad.xlsx"
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
event
.
getRequestParams
());
Long
shipmentId
=
jsonObject
.
getLong
(
"shipmentId"
);
Map
headMap
=
new
HashMap
();
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentLoadExcelExportListener.java
View file @
b99c08a3
...
...
@@ -67,7 +67,8 @@ import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.HAVE_NOT
/**
* 自编号订单excel导出监听
* lanbm 2024-06-05 修改模板样式和添加列字段
*
* 海运已装单数据导出
* NG2408045L
* @author zhengYi
*/
@Component
(
"ShipmentLoadExcelExportListener"
)
...
...
@@ -137,12 +138,15 @@ public class ShipmentLoadExcelExportListener {
Map
headMap
=
new
HashMap
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
event
.
getRequestParams
());
Long
shipmentId
=
jsonObject
.
getLong
(
"shipmentId"
);
List
<
BoxPreloadGoodsBackVO
>
goodsItemList
=
boxPreloadGoodsService
.
getShipGoodItemList
(
shipmentId
);
if
(
CollectionUtil
.
isEmpty
(
goodsItemList
))
{
event
.
setResult
(
HAVE_NOT_PRELOAD_GOODS
.
getMsg
());
}
BoxDO
box
=
boxService
.
getBox
(
shipmentId
);
CabinetDO
cabinet
=
cabinetService
.
getCabinet
(
box
.
getCabinetId
());
BoxApprovalDO
boxApprovalDO
=
...
...
@@ -417,17 +421,15 @@ public class ShipmentLoadExcelExportListener {
event
.
setUrl
(
fileDO
.
getUrl
());
event
.
setFileId
(
fileDO
.
getId
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
event
.
setResult
(
e
.
getMessage
());
}
}
else
{
}
else
{
event
.
setResult
(
"param fail"
);
}
}
}
/*
lanbm 2024-06-05 添加商品属性转换函数
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentLoadExcelExportListener2.java
0 → 100644
View file @
b99c08a3
This diff is collapsed.
Click to expand it.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentReceivableExcelExportListener2.java
View file @
b99c08a3
This diff is collapsed.
Click to expand it.
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/downloadLog/DownloadLogServiceImpl.java
View file @
b99c08a3
...
...
@@ -283,6 +283,8 @@ public class DownloadLogServiceImpl extends AbstractService<DownloadLogMapper, D
//已装单导出
case
SHIPMENT_LOAD_EXCEL_EXPORT:
shipmentLoadExcelExportPushEvent
(
downloadLog
);
//lanbm 2024-06-10 总体切换
//shipmentLoadExcelExportPushEvent2(downloadLog);
break
;
//应收汇总导出 lanbm 2024-05-24 修改导出Excel样式
case
SHIPMENT_RECEIVABLE_EXCEL_EXPORT:
...
...
@@ -663,6 +665,24 @@ public class DownloadLogServiceImpl extends AbstractService<DownloadLogMapper, D
downloadLog
.
setFileId
(
event
.
getFileId
());
}
/*
海运已装单导出 lanbm 2024-06-10 add
*/
private
void
shipmentLoadExcelExportPushEvent2
(
DownloadLogDO
downloadLog
)
{
ShipmentLoadExcelExportPushEvent2
event
=
new
ShipmentLoadExcelExportPushEvent2
();
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
shipmentPreloadExcelExportPushEvent
(
DownloadLogDO
downloadLog
)
{
ShipmentPreloadExcelExportPushEvent
event
=
new
ShipmentPreloadExcelExportPushEvent
();
event
.
setUserId
(
downloadLog
.
getUserId
());
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receiptAccount/ReceiptAccountMapper.java
View file @
b99c08a3
...
...
@@ -7,7 +7,11 @@ import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptAccount.ReceiptAccountDO
;
import
cn.iocoder.yudao.module.wealth.vo.receiptAccount.ReceiptAccountQueryVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.ResultType
;
import
org.apache.ibatis.annotations.Select
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
...
...
@@ -50,4 +54,18 @@ public interface ReceiptAccountMapper extends AbstractMapper<ReceiptAccountDO> {
return
null
;
}
/*
获取核销基准金额 lanbm 2024-06-10 add
*/
@ResultType
(
BigDecimal
.
class
)
@Select
({
"<script>"
,
"select COALESCE(sum(r.write_off_amount),0) "
,
"from ecw_receipt_account r "
,
"where r.deleted = 0"
,
"AND r.receipt_id = #{receiptId} "
,
"</script>"
})
BigDecimal
getWriteOffAmountByReceiptId
(
@Param
(
"receiptId"
)
Long
receiptId
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receiptItem/ReceiptItemMapper.java
View file @
b99c08a3
...
...
@@ -69,6 +69,9 @@ public interface ReceiptItemMapper extends AbstractMapper<ReceiptItemDO> {
return
null
;
}
/*
获取已核销金额 lanbm 2024-06-10 添加注释
*/
@ResultType
(
BigDecimal
.
class
)
@Select
({
"<script>"
,
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receipt/ReceiptServiceImpl.java
View file @
b99c08a3
...
...
@@ -79,6 +79,7 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
@Resource
private
ReceiptItemMapper
receiptItemMapper
;
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemService.java
View file @
b99c08a3
...
...
@@ -6,8 +6,10 @@ import cn.iocoder.yudao.module.wealth.vo.receipt.FinanceReceiptItemCancelVo;
import
cn.iocoder.yudao.module.wealth.vo.receipt.FinanceReceiptItemVo
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemCreateReqVO
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemUpdateReqVO
;
import
org.apache.ibatis.annotations.Param
;
import
javax.validation.Valid
;
import
java.math.BigDecimal
;
import
java.util.Collection
;
import
java.util.List
;
...
...
@@ -116,4 +118,7 @@ public interface ReceiptItemService extends IService<ReceiptItemDO> {
*/
void
cancelFinanceReceiptItemWriteOffNo
(
FinanceReceiptItemCancelVo
financeReceiptItemVo
);
BigDecimal
getWriteOffAmountByReceiptId
(
Long
receiptId
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemServiceImpl.java
View file @
b99c08a3
...
...
@@ -539,4 +539,9 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
}
}
}
public
BigDecimal
getWriteOffAmountByReceiptId
(
Long
receiptId
)
{
return
receiptItemMapper
.
getWriteOffAmountByReceiptId
(
receiptId
);
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptItem/ReceiptItemBackVO.java
View file @
b99c08a3
...
...
@@ -93,5 +93,10 @@ public class ReceiptItemBackVO {
@ApiModelProperty
(
value
=
"当前流程ID"
)
private
String
bmpId
;
/*
剩余金额 lanbm 2024-06-10 add
*/
private
String
syValue
;
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receiptItem/ReceiptItemController.java
View file @
b99c08a3
...
...
@@ -2,9 +2,16 @@ package cn.iocoder.yudao.module.wealth.controller.admin.receiptItem;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.util.collectors.CollectorsUtil
;
import
cn.iocoder.yudao.framework.common.util.io.FileModel
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.module.ecw.api.currency.CurrencyApi
;
import
cn.iocoder.yudao.module.ecw.api.currency.dto.CurrencyRespDTO
;
import
cn.iocoder.yudao.module.wealth.convert.receiptItem.ReceiptItemConvert
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptAccount.ReceiptAccountDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptItem.ReceiptItemDO
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receiptAccount.ReceiptAccountMapper
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receiptItem.ReceiptItemMapper
;
import
cn.iocoder.yudao.module.wealth.service.receiptItem.ReceiptItemService
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.FinanceReceiptItemCancelVo
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.FinanceReceiptItemVo
;
...
...
@@ -20,7 +27,11 @@ import org.springframework.web.bind.annotation.*;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
...
...
@@ -33,6 +44,20 @@ public class ReceiptItemController {
@Resource
private
ReceiptItemService
receiptItemService
;
@Resource
private
ReceiptAccountMapper
receiptAccountMapper
;
@Resource
private
ReceiptItemMapper
receiptItemMapper
;
/*
币种 lanbm 2024-06-10 add
*/
@Resource
CurrencyApi
currencyApi
;
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建收款明细"
)
//@PreAuthorize("@ss.hasPermission('ecw:receipt-item:create')")
...
...
@@ -60,12 +85,67 @@ public class ReceiptItemController {
@GetMapping
(
"/get"
)
@ApiOperation
(
"获得收款明细详情"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
//@PreAuthorize("@ss.hasPermission('ecw:receipt-item:query')")
public
CommonResult
<
ReceiptItemBackVO
>
getReceiptItem
(
@RequestParam
(
"id"
)
Long
id
)
{
ReceiptItemDO
receiptItem
=
receiptItemService
.
getReceiptItem
(
id
);
return
success
(
ReceiptItemConvert
.
INSTANCE
.
convert
(
receiptItem
));
ReceiptItemBackVO
v
=
ReceiptItemConvert
.
INSTANCE
.
convert
(
receiptItem
);
//计算剩余金额 lanbm 2024-06-10 add
//BigDecimal p = receiptItemService.getWriteOffAmountByReceiptId(id);
//BigDecimal t = receiptAccountMapper.getWriteOffAmountByReceiptId(id);
getSY
(
v
,
v
.
getReceiptId
());
return
success
(
v
);
}
/*
获取剩余金额 lanbm 2024-06-10 add
*/
private
BigDecimal
getSY
(
ReceiptItemBackVO
v
,
long
id
)
{
Map
<
Integer
,
CurrencyRespDTO
>
currencyMap
=
currencyApi
.
getAllCurrency
();
BigDecimal
bResult
=
new
BigDecimal
(
0
);
LambdaQueryWrapper
<
ReceiptAccountDO
>
lambdaQueryWrapper2
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper2
.
eq
(
ReceiptAccountDO:
:
getReceiptId
,
id
);
List
<
ReceiptAccountDO
>
ReceiptAccountList
=
receiptAccountMapper
.
selectList
(
lambdaQueryWrapper2
);
BigDecimal
t
=
new
BigDecimal
(
0
);
Long
currencyId
=
null
;
if
(
CollectionUtil
.
isEmpty
(
ReceiptAccountList
)
==
true
)
{
t
=
new
BigDecimal
(
0
);
}
else
{
//获取币种
currencyId
=
ReceiptAccountList
.
get
(
0
).
getCurrencyId
();
t
=
ReceiptAccountList
.
stream
().
collect
(
CollectorsUtil
.
summingBigDecimal
(
ReceiptAccountDO:
:
getWriteOffAmount
));
}
LambdaQueryWrapper
<
ReceiptItemDO
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
ReceiptItemDO:
:
getReceiptId
,
id
);
List
<
ReceiptItemDO
>
listItem
=
receiptItemMapper
.
selectList
(
lambdaQueryWrapper
);
BigDecimal
p
=
new
BigDecimal
(
0
);
if
(
CollectionUtil
.
isEmpty
(
listItem
)
==
true
)
{
p
=
new
BigDecimal
(
0
);
}
else
{
//对指定列求和
p
=
listItem
.
stream
().
collect
(
CollectorsUtil
.
summingBigDecimal
(
ReceiptItemDO:
:
getWriteOffAmount
));
}
bResult
=
t
.
subtract
(
p
);
String
bzName
=
""
;
if
(
currencyId
!=
null
)
{
int
iId
=
Integer
.
parseInt
(
currencyId
.
toString
());
bzName
=
currencyMap
.
get
(
iId
).
getTitleZh
();
}
v
.
setSyValue
(
bResult
.
toString
()
+
bzName
);
return
bResult
;
}
@GetMapping
(
"/getReceivableItem"
)
@ApiOperation
(
"根据收款单ID获得收款明细列表"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
...
...
yudao-server/src/main/resources/templates/nrlyReceivable2.xlsx
View file @
b99c08a3
No preview for this file type
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