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
4851ca51
Commit
4851ca51
authored
Jun 12, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-12-3提交发布
parent
b1227055
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
88 additions
and
99 deletions
+88
-99
WarehouseDO.java
...dule/depository/dal/dataobject/warehouse/WarehouseDO.java
+16
-0
WarehouseLineDO.java
.../depository/dal/dataobject/warehouse/WarehouseLineDO.java
+5
-0
WarehouseServiceImpl.java
...pository/service/warehouse/impl/WarehouseServiceImpl.java
+9
-0
WarehouseLineBindRespVO.java
...dule/depository/vo/warehouse/WarehouseLineBindRespVO.java
+17
-0
WarehouseLineServiceReqVO.java
...le/depository/vo/warehouse/WarehouseLineServiceReqVO.java
+5
-0
WarehouseController.java
...itory/controller/admin/warehouse/WarehouseController.java
+3
-0
ShipmentReceivableExcelExportListener2.java
...ment/listener/ShipmentReceivableExcelExportListener2.java
+33
-99
nrlyReceivable2.xlsx
...-server/src/main/resources/templates/nrlyReceivable2.xlsx
+0
-0
nrlyReceivable3.xlsx
...-server/src/main/resources/templates/nrlyReceivable3.xlsx
+0
-0
nrlyReceivable4.xlsx
...-server/src/main/resources/templates/nrlyReceivable4.xlsx
+0
-0
No files found.
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/dal/dataobject/warehouse/WarehouseDO.java
View file @
4851ca51
...
@@ -178,4 +178,20 @@ public class WarehouseDO extends BaseDO implements Serializable {
...
@@ -178,4 +178,20 @@ public class WarehouseDO extends BaseDO implements Serializable {
*/
*/
private
int
lockRecipientDays
;
private
int
lockRecipientDays
;
/*
落款信息 lanbm 2024-06-10 add
*/
private
String
lkLeft
;
/*
落款信息 lanbm 2024-06-10 add
*/
private
String
lkRight
;
/*
图章名称 lanbm 2024-06-12 add
*/
private
String
tzName
;
}
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/dal/dataobject/warehouse/WarehouseLineDO.java
View file @
4851ca51
...
@@ -128,4 +128,9 @@ public class WarehouseLineDO extends BaseDO {
...
@@ -128,4 +128,9 @@ public class WarehouseLineDO extends BaseDO {
*/
*/
private
String
lkRight
;
private
String
lkRight
;
/*
图章名称 lanbm 2024-06-12 add
*/
private
String
tzName
;
}
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/service/warehouse/impl/WarehouseServiceImpl.java
View file @
4851ca51
...
@@ -263,6 +263,13 @@ public class WarehouseServiceImpl implements WarehouseService {
...
@@ -263,6 +263,13 @@ public class WarehouseServiceImpl implements WarehouseService {
warehouseItem
.
setTempTitleEn
(
lineDO
.
getTempTitleEn
());
warehouseItem
.
setTempTitleEn
(
lineDO
.
getTempTitleEn
());
warehouseItem
.
setTempTitleZh
(
lineDO
.
getTempTitleZh
());
warehouseItem
.
setTempTitleZh
(
lineDO
.
getTempTitleZh
());
//lanbm 2024-06-12 添加配置
warehouseItem
.
setLkRight
(
lineDO
.
getLkRight
());
warehouseItem
.
setLkLeft
(
lineDO
.
getLkLeft
());
warehouseItem
.
setTzName
(
lineDO
.
getTzName
());
//end lanbm 2024-06-12 添加配置
String
recipientInfo
=
lineDO
.
getRecipientInfo
();
String
recipientInfo
=
lineDO
.
getRecipientInfo
();
if
(
recipientInfo
!=
null
)
{
if
(
recipientInfo
!=
null
)
{
warehouseItem
.
setRecipientInfo
(
JSONObject
.
parseObject
(
recipientInfo
,
ContactInfoDTO
.
class
));
warehouseItem
.
setRecipientInfo
(
JSONObject
.
parseObject
(
recipientInfo
,
ContactInfoDTO
.
class
));
...
@@ -448,6 +455,7 @@ public class WarehouseServiceImpl implements WarehouseService {
...
@@ -448,6 +455,7 @@ public class WarehouseServiceImpl implements WarehouseService {
recipientInfo
=
JSON
.
toJSONString
(
reqVO
.
getRecipientInfo
());
recipientInfo
=
JSON
.
toJSONString
(
reqVO
.
getRecipientInfo
());
}
}
//lanbm 2024-06-12 添加配置参数项
warehouseLineMapper
.
update
(
null
,
warehouseLineMapper
.
update
(
null
,
new
LambdaUpdateWrapper
<
WarehouseLineDO
>().
eq
(
WarehouseLineDO:
:
getId
,
reqVO
.
getLineId
())
new
LambdaUpdateWrapper
<
WarehouseLineDO
>().
eq
(
WarehouseLineDO:
:
getId
,
reqVO
.
getLineId
())
.
set
(
WarehouseLineDO:
:
getOtherService
,
reqVO
.
getOtherService
())
.
set
(
WarehouseLineDO:
:
getOtherService
,
reqVO
.
getOtherService
())
...
@@ -462,6 +470,7 @@ public class WarehouseServiceImpl implements WarehouseService {
...
@@ -462,6 +470,7 @@ public class WarehouseServiceImpl implements WarehouseService {
.
set
(
reqVO
.
getControlStatus
()
!=
null
,
WarehouseLineDO:
:
getControlStatus
,
reqVO
.
getControlStatus
())
.
set
(
reqVO
.
getControlStatus
()
!=
null
,
WarehouseLineDO:
:
getControlStatus
,
reqVO
.
getControlStatus
())
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getLkLeft
()),
WarehouseLineDO:
:
getLkLeft
,
reqVO
.
getLkLeft
())
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getLkLeft
()),
WarehouseLineDO:
:
getLkLeft
,
reqVO
.
getLkLeft
())
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getLkRight
()),
WarehouseLineDO:
:
getLkRight
,
reqVO
.
getLkRight
())
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getLkRight
()),
WarehouseLineDO:
:
getLkRight
,
reqVO
.
getLkRight
())
.
set
(
StringUtils
.
isNotEmpty
(
reqVO
.
getTzName
()),
WarehouseLineDO:
:
getTzName
,
reqVO
.
getTzName
())
);
);
}
}
...
...
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/vo/warehouse/WarehouseLineBindRespVO.java
View file @
4851ca51
...
@@ -70,4 +70,21 @@ public class WarehouseLineBindRespVO extends WarehouseBaseVO {
...
@@ -70,4 +70,21 @@ public class WarehouseLineBindRespVO extends WarehouseBaseVO {
*/
*/
private
String
tempTitleZh
;
private
String
tempTitleZh
;
/*
落款信息 lanbm 2024-06-10 add
*/
private
String
lkLeft
;
/*
落款信息 lanbm 2024-06-10 add
*/
private
String
lkRight
;
/*
图章名称 lanbm 2024-06-12 add
*/
private
String
tzName
;
}
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/vo/warehouse/WarehouseLineServiceReqVO.java
View file @
4851ca51
...
@@ -58,4 +58,9 @@ public class WarehouseLineServiceReqVO {
...
@@ -58,4 +58,9 @@ public class WarehouseLineServiceReqVO {
落款信息 lanbm 2024-06-10 add
落款信息 lanbm 2024-06-10 add
*/
*/
private
String
lkRight
;
private
String
lkRight
;
/*
图章名称 lanbm 2024-06-12 add
*/
private
String
tzName
;
}
}
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/admin/warehouse/WarehouseController.java
View file @
4851ca51
...
@@ -225,6 +225,9 @@ public class WarehouseController {
...
@@ -225,6 +225,9 @@ public class WarehouseController {
return
success
(
DeptWarehouseConvert
.
INSTANCE
.
convertList
(
entityList
));
return
success
(
DeptWarehouseConvert
.
INSTANCE
.
convertList
(
entityList
));
}
}
/*
lanbm 2024-06-12 添加配置参数
*/
@PostMapping
(
"/serviceConfig"
)
@PostMapping
(
"/serviceConfig"
)
@ApiOperation
(
"其他服务配置"
)
@ApiOperation
(
"其他服务配置"
)
public
CommonResult
<
Boolean
>
serviceConfig
(
public
CommonResult
<
Boolean
>
serviceConfig
(
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentReceivableExcelExportListener2.java
View file @
4851ca51
...
@@ -116,6 +116,30 @@ public class ShipmentReceivableExcelExportListener2 {
...
@@ -116,6 +116,30 @@ public class ShipmentReceivableExcelExportListener2 {
@Resource
@Resource
private
AdminUserApi
adminUserApi
;
private
AdminUserApi
adminUserApi
;
/*
lanbm 2024-06-12 add
*/
private
String
getTemplateName
(
WarehouseLineDO
warehouseLineDO
)
{
String
sTemName
=
"/nrlyReceivable2.xlsx"
;
if
(
warehouseLineDO
.
getTzName
()
==
null
||
warehouseLineDO
.
getTzName
().
length
()
==
0
)
{
sTemName
=
"/nrlyReceivable2.xlsx"
;
}
else
{
if
(
warehouseLineDO
.
getTzName
().
equals
(
"广州市捷道国际货运代理有限公司"
))
{
sTemName
=
"/nrlyReceivable2.xlsx"
;
}
else
if
(
warehouseLineDO
.
getTzName
().
equals
(
"广州市捷佳国际货运代理有限公司"
))
{
sTemName
=
"/nrlyReceivable3.xlsx"
;
}
else
if
(
warehouseLineDO
.
getTzName
().
equals
(
"义乌市捷道国际货运代理有限公司"
))
{
sTemName
=
"/nrlyReceivable4.xlsx"
;
}
else
{
sTemName
=
"/nrlyReceivable2.xlsx"
;
}
}
return
sTemName
;
}
/**
/**
* 订单导出监听
* 订单导出监听
*
*
...
@@ -158,12 +182,7 @@ public class ShipmentReceivableExcelExportListener2 {
...
@@ -158,12 +182,7 @@ public class ShipmentReceivableExcelExportListener2 {
JSONObject
jsonObject
=
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
event
.
getRequestParams
());
JSONObject
.
parseObject
(
event
.
getRequestParams
());
Long
shipmentId
=
jsonObject
.
getLong
(
"shipmentId"
);
Long
shipmentId
=
jsonObject
.
getLong
(
"shipmentId"
);
inputStream
=
getClass
().
getClassLoader
().
getResourceAsStream
(
ueProperties
.
getTemplatesUrl
()
+
"/nrlyReceivable2.xlsx"
);
String
templateFileName
=
ueProperties
.
getTemplatesUrl
()
+
"/nrlyReceivable2.xlsx"
;
BoxDO
box
=
boxService
.
getBox
(
shipmentId
);
BoxDO
box
=
boxService
.
getBox
(
shipmentId
);
WarehouseDO
startWarehouse
=
warehouseService
.
getWarehouse
(
box
.
getStartWarehouseId
());
WarehouseDO
startWarehouse
=
warehouseService
.
getWarehouse
(
box
.
getStartWarehouseId
());
...
@@ -174,6 +193,12 @@ public class ShipmentReceivableExcelExportListener2 {
...
@@ -174,6 +193,12 @@ public class ShipmentReceivableExcelExportListener2 {
box
.
getStartWarehouseId
(),
box
.
getDestWarehouseId
(),
box
.
getStartWarehouseId
(),
box
.
getDestWarehouseId
(),
box
.
getTransportType
());
box
.
getTransportType
());
//lanbm 添加动态模板逻辑
String
sTemName
=
getTemplateName
(
warehouseLineDO
);
inputStream
=
getClass
().
getClassLoader
().
getResourceAsStream
(
ueProperties
.
getTemplatesUrl
()
+
sTemName
);
if
(
StringUtils
.
isNotBlank
(
warehouseLineDO
.
getRecipientInfo
()))
{
if
(
StringUtils
.
isNotBlank
(
warehouseLineDO
.
getRecipientInfo
()))
{
recipientInfo
=
JSONObject
.
parseObject
(
warehouseLineDO
.
getRecipientInfo
(),
ContactInfoDTO
.
class
);
recipientInfo
=
JSONObject
.
parseObject
(
warehouseLineDO
.
getRecipientInfo
(),
ContactInfoDTO
.
class
);
}
}
...
@@ -210,7 +235,7 @@ public class ShipmentReceivableExcelExportListener2 {
...
@@ -210,7 +235,7 @@ public class ShipmentReceivableExcelExportListener2 {
headMap
.
put
(
"img2"
,
imageData
.
getUrl
());
headMap
.
put
(
"img2"
,
imageData
.
getUrl
());
//end lanbm 2024-06-11 添加图片自动填充功能
//end lanbm 2024-06-11 添加图片自动填充功能
if
(
box
.
getZgDate
()!=
null
)
{
if
(
box
.
getZgDate
()
!=
null
)
{
//装柜日期 日期格式化
//装柜日期 日期格式化
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
currentDate
=
sdf
.
format
(
box
.
getZgDate
());
String
currentDate
=
sdf
.
format
(
box
.
getZgDate
());
...
@@ -491,8 +516,8 @@ public class ShipmentReceivableExcelExportListener2 {
...
@@ -491,8 +516,8 @@ public class ShipmentReceivableExcelExportListener2 {
setScale
(
2
,
RoundingMode
.
HALF_UP
));
setScale
(
2
,
RoundingMode
.
HALF_UP
));
headMap
.
put
(
"BillinTTl"
,
headMap
.
put
(
"BillinTTl"
,
currencyFuhaoMap
.
get
(
qgCurrency
)
currencyFuhaoMap
.
get
(
qgCurrency
)
+
sum6
.
subtract
(
sum4
).
subtract
(
+
sum6
.
subtract
(
sum4
).
subtract
(
sum6
.
multiply
(
new
BigDecimal
(
0.2
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
)));
sum6
.
multiply
(
new
BigDecimal
(
0.2
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
)));
int
sumCount
=
0
;
int
sumCount
=
0
;
for
(
BoxMergePkgDO
boxMergePkgDO
:
boxMergePkgDOS
)
{
for
(
BoxMergePkgDO
boxMergePkgDO
:
boxMergePkgDOS
)
{
...
@@ -582,97 +607,6 @@ public class ShipmentReceivableExcelExportListener2 {
...
@@ -582,97 +607,6 @@ public class ShipmentReceivableExcelExportListener2 {
}
}
}
}
/*
@EventListener(ShipmentReceivableExcelExportPushEvent2.class)
public void shipmentReceivableExcelExportPushEvent(
ShipmentReceivableExcelExportPushEvent2 event)
throws MalformedURLException {
String sPath = "D:\\temp";
String fileName2 = sPath + File.separator + "1.xlsx";
ImageData imageData2 = new ImageData();
imageData2.setUrl(new URL(
"https://jiedao-pre-production.oss-cn-shenzhen.aliyuncs.com/2024/06/11/6668347de4b001393be98e24.jpg"));
Map<String, Object> map = new HashMap<>();
map.put("img1", imageData2.getUrl());
String templateFileName2 = "D:\\jd\\jiedao-api-boot-master\\yudao-server\\src\\main\\resources\\templates\\nrlyReceivable2.xlsx";
EasyExcel.write(fileName2).
withTemplate(templateFileName2).
sheet().doFill(map);
return;
/*
if (StringUtils.isNotBlank(event.getRequestParams())) {
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATA_FORMAT);
String nowTime = formatter.format(LocalDateTime.now());
String dir = ueProperties.getTempDir().concat("/receivable/excel/");
//先不合并单元格,之后合并,把合并的传到服务器 lanbm 2024-05-25 add
String fileName = event.getUserId().toString().
concat(StrUtil.DASHED).concat(event.getUserType().toString()).
concat(StrUtil.DASHED).concat(nowTime).
concat("receivable_notMerge.xlsx");
String fileNameMerge = event.getUserId().toString().
concat(StrUtil.DASHED).concat(event.getUserType().toString()).
concat(StrUtil.DASHED).concat(nowTime).
concat("receivable_Merge.xlsx");
InputStream inputStream = null;
JSONObject jsonObject =
JSONObject.parseObject(event.getRequestParams());
Long shipmentId = jsonObject.getLong("shipmentId");
inputStream = getClass().getClassLoader().
getResourceAsStream(ueProperties.getTemplatesUrl()
+ "/nrlyReceivable2.xlsx");
String templateFileName = ueProperties.getTemplatesUrl()
+ "/nrlyReceivable2.xlsx";
Map headMap = new HashMap();
//lanbm 2024-06-11 添加图片自动填充功能
ImageData imageData = new ImageData();
imageData.setUrl(new URL(
"https://jiedao-pre-production.oss-cn-shenzhen.aliyuncs.com/2024/06/11/6668347de4b001393be98e24.jpg"));
headMap.put("img1", imageData.getUrl());
headMap.put("img2", imageData.getUrl());
//end lanbm 2024-06-11 添加图片自动填充功能
File fileDir = new File(dir);
if (!fileDir.exists()) {
// 不存在则创建一个目录
fileDir.mkdirs();
}
//ExcelWriter excelWriter =
// EasyExcel.write(dir + fileName).
// withTemplate(inputStream).build();
// WriteSheet sheet = EasyExcel.writerSheet(0).build();
// excelWriter.fill(headMap, sheet);//填充非循环数据--表头
// excelWriter.finish();
// inputStream.close();
EasyExcel.write(dir + fileName).
withTemplate(inputStream).
sheet().doFill(headMap);
} catch (Exception e) {
e.printStackTrace();
event.setResult(e.getMessage());
}
} else {
event.setResult("param fail");
}
*/
// }
private
BigDecimal
changeAmountToDestCurrency
(
Long
fromCurrencyId
,
private
BigDecimal
changeAmountToDestCurrency
(
Long
fromCurrencyId
,
Long
toCurrencyId
,
Long
toCurrencyId
,
...
...
yudao-server/src/main/resources/templates/nrlyReceivable2.xlsx
View file @
4851ca51
No preview for this file type
yudao-server/src/main/resources/templates/nrlyReceivable3.xlsx
0 → 100644
View file @
4851ca51
File added
yudao-server/src/main/resources/templates/nrlyReceivable4.xlsx
0 → 100644
View file @
4851ca51
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