Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
EIP-API
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
李炎
EIP-API
Commits
cfa0ca4a
提交
cfa0ca4a
authored
7月 09, 2021
作者:
Wangjiajie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加送货管理总行,修改送货管理的查看图片功能(未完成)
上级
73593866
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
93 行增加
和
11 行删除
+93
-11
IostDeliveryNoteController.java
.../iost/basedata/controller/IostDeliveryNoteController.java
+9
-4
IostDeliveryRecordController.java
...ost/basedata/controller/IostDeliveryRecordController.java
+83
-6
application-docker.yml
...-boot-module-system/target/classes/application-docker.yml
+1
-1
IostDeliveryNoteController.class
...iost/basedata/controller/IostDeliveryNoteController.class
+0
-0
IostDeliveryRecordController.class
...st/basedata/controller/IostDeliveryRecordController.class
+0
-0
没有找到文件。
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/basedata/controller/IostDeliveryNoteController.java
浏览文件 @
cfa0ca4a
...
...
@@ -194,7 +194,8 @@ public class IostDeliveryNoteController {
response
.
addHeader
(
"Content-Disposition"
,
"attachment;filename="
+
new
String
(
fileName
.
getBytes
(
"utf-8"
),
"ISO8859-1"
)+
".pdf"
);
//加载字体
BaseFont
bfChinese
=
BaseFont
.
createFont
(
"/wmssystem/config/res/stsong.ttf"
,
BaseFont
.
IDENTITY_H
,
BaseFont
.
NOT_EMBEDDED
);
//BaseFont bfChinese = BaseFont.createFont("/wmssystem/config/res/stsong.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
BaseFont
bfChinese
=
BaseFont
.
createFont
(
"/res/stsong.ttf"
,
BaseFont
.
IDENTITY_H
,
BaseFont
.
NOT_EMBEDDED
);
//Create Document Instance
Document
document
=
new
Document
(
PageSize
.
A4
);
Font
textFont
=
new
Font
(
bfChinese
,
6
,
Font
.
NORMAL
);
...
...
@@ -213,9 +214,11 @@ public class IostDeliveryNoteController {
document
.
newPage
();
addTitle
(
document
,
textFont
);
PdfPTable
detailTable
=
new
PdfPTable
(
1
);
detailTable
.
setWidthPercentage
(
100
f
);
List
<
Image
>
img
=
getImg
(
iostDeliveryRecordPic
)
;
for
(
Image
imagelist:
img
)
{
PdfPCell
cell
=
new
PdfPCell
(
imagelist
);
cell
.
setBorder
(
PdfPCell
.
NO_BORDER
);
detailTable
.
addCell
(
cell
);
PdfPCell
cell
=
new
PdfPCell
(
imagelist
);
cell
.
setBorder
(
PdfPCell
.
NO_BORDER
);
cell
.
setHorizontalAlignment
(
Element
.
ALIGN_LEFT
);
detailTable
.
addCell
(
cell
);
}
//cell.setFixedHeight(img.getHeight() * (60 / img.getWidth()));cell.setFixedHeight(200);
document
.
add
(
detailTable
);
...
...
@@ -247,7 +250,8 @@ public class IostDeliveryNoteController {
String
substring
=
string
.
substring
(
0
,
string
.
length
());
String
[]
result
=
substring
.
split
(
","
);
for
(
int
i
=
0
;
i
<
result
.
length
;
i
++){
imageList
.
add
(
Image
.
getInstance
(
"/wmssystem/storage/opt/upFiles/"
+
result
[
i
]));
Image
img
=
Image
.
getInstance
(
"/公司专用文件/wmssystem/storage/opt/upFiles/"
+
result
[
i
]);
imageList
.
add
(
img
);
}
return
imageList
;
...
...
@@ -287,7 +291,8 @@ public class IostDeliveryNoteController {
Document
document
=
new
Document
(
PageSize
.
A4
);
//加载字体
BaseFont
bfChinese
=
BaseFont
.
createFont
(
"/wmssystem/config/res/stsong.ttf"
,
BaseFont
.
IDENTITY_H
,
BaseFont
.
NOT_EMBEDDED
);
//BaseFont bfChinese = BaseFont.createFont("/wmssystem/config/res/stsong.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
BaseFont
bfChinese
=
BaseFont
.
createFont
(
"/res/stsong.ttf"
,
BaseFont
.
IDENTITY_H
,
BaseFont
.
NOT_EMBEDDED
);
//字体
Font
titleFont
=
new
Font
(
bfChinese
,
20
,
Font
.
BOLD
);
Font
keyFont
=
new
Font
(
bfChinese
,
8
,
Font
.
NORMAL
);
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/basedata/controller/IostDeliveryRecordController.java
浏览文件 @
cfa0ca4a
...
...
@@ -2,6 +2,7 @@ package org.jeecg.modules.iost.basedata.controller;
import
java.io.UnsupportedEncodingException
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.net.URLDecoder
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
...
...
@@ -13,6 +14,8 @@ import java.util.stream.Collectors;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.jeecg.modules.iost.basedata.entity.*
;
import
org.jeecg.modules.iost.basedata.vo.IostSummarySheetPage
;
import
org.jeecgframework.poi.excel.ExcelImportUtil
;
import
org.jeecgframework.poi.excel.def.NormalExcelConstants
;
import
org.jeecgframework.poi.excel.entity.ExportParams
;
...
...
@@ -23,10 +26,6 @@ import org.apache.shiro.SecurityUtils;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.system.query.QueryGenerator
;
import
org.jeecg.common.util.oConvertUtils
;
import
org.jeecg.modules.iost.basedata.entity.IostDeliveryRecordList
;
import
org.jeecg.modules.iost.basedata.entity.IostReceivinglist
;
import
org.jeecg.modules.iost.basedata.entity.DeliverySumSourceField
;
import
org.jeecg.modules.iost.basedata.entity.IostDeliveryRecord
;
import
org.jeecg.modules.iost.basedata.vo.IostDeliveryRecordPage
;
import
org.jeecg.modules.iost.basedata.vo.IostReceivingPage
;
import
org.jeecg.modules.iost.basedata.service.IIostDeliveryRecordService
;
...
...
@@ -408,7 +407,7 @@ public class IostDeliveryRecordController {
/**
* 通过id删除
*
* @param
i
* @param
* @return
*/
@AutoLog
(
value
=
"出库记录-通过id删除"
)
...
...
@@ -480,6 +479,83 @@ public class IostDeliveryRecordController {
return
Result
.
OK
(
iostDeliveryRecordListList
);
}
/***
* 增加统计行
* @param pageList
*/
private
IostDeliveryRecordPage
addSumRow
(
List
<
IostDeliveryRecordPage
>
pageList
)
{
IostDeliveryRecordPage
iostDeliveryRecord
=
new
IostDeliveryRecordPage
();
List
<
IostDeliveryRecordList
>
iostDeliveryRecordLists
=
new
ArrayList
<>();
double
totlevolume
=
0
;
//体积总
int
totlepackagesTotals
=
0
;
//件数总
double
totleweightTotals
=
0
;
//重量总
double
totleMoney
=
0
;
//金额总
double
totlevolumeList
=
0
;
//体积总
int
totlepackagesTotalsList
=
0
;
//件数总
double
totleweightTotalsList
=
0
;
//重量总
double
totleMoneyList
=
0
;
//金额总
for
(
IostDeliveryRecordPage
iostDeliveryRecordPage:
pageList
){
for
(
IostDeliveryRecordList
iostDeliveryRecordList
:
iostDeliveryRecordPage
.
getIostDeliveryRecordListList
()){
BigDecimal
A1
;
BigDecimal
A2
;
if
(
iostDeliveryRecordList
.
getVolumeTotal
()!=
null
){
A1
=
new
BigDecimal
(
Double
.
toString
(
totlevolumeList
));
A2
=
new
BigDecimal
(
Double
.
toString
(
iostDeliveryRecordList
.
getVolumeTotal
()));
totlevolumeList
=
A1
.
add
(
A2
).
doubleValue
();
}
if
(
iostDeliveryRecordList
.
getWeightTotal
()!=
null
){
A1
=
new
BigDecimal
(
Double
.
toString
(
totleweightTotalsList
));
A2
=
new
BigDecimal
(
Double
.
toString
(
iostDeliveryRecordList
.
getWeightTotal
()));
totleweightTotalsList
=
A1
.
add
(
A2
).
doubleValue
();
}
if
(
iostDeliveryRecordList
.
getWeightTotal
()!=
null
){
totlepackagesTotalsList
=
totlepackagesTotalsList
+
iostDeliveryRecordList
.
getPackagesTotal
();
}
if
(
iostDeliveryRecordList
.
getMoney
()!=
null
){
A1
=
new
BigDecimal
(
Double
.
toString
(
totleMoneyList
));
A2
=
new
BigDecimal
(
Double
.
toString
(
iostDeliveryRecordList
.
getMoney
()));
totleMoneyList
=
A1
.
add
(
A2
).
doubleValue
();
}
}
BigDecimal
A1
;
BigDecimal
A2
;
if
(
iostDeliveryRecordPage
.
getVolumeTotals
()!=
null
){
A1
=
new
BigDecimal
(
Double
.
toString
(
totlevolumeList
));
A2
=
new
BigDecimal
(
Double
.
toString
(
iostDeliveryRecordPage
.
getVolumeTotals
()));
totlevolume
=
A1
.
add
(
A2
).
doubleValue
();
}
if
(
iostDeliveryRecordPage
.
getWeightTotals
()!=
null
){
A1
=
new
BigDecimal
(
Double
.
toString
(
totleweightTotalsList
));
A2
=
new
BigDecimal
(
Double
.
toString
(
iostDeliveryRecordPage
.
getWeightTotals
()));
totleweightTotals
=
A1
.
add
(
A2
).
doubleValue
();
}
if
(
iostDeliveryRecordPage
.
getWeightTotals
()!=
null
){
totlepackagesTotals
=
totlepackagesTotalsList
+
iostDeliveryRecordPage
.
getPackagesTotals
();
}
if
(
iostDeliveryRecordPage
.
getMoneyTotal
()!=
null
){
A1
=
new
BigDecimal
(
Double
.
toString
(
totleMoneyList
));
A2
=
new
BigDecimal
(
Double
.
toString
(
iostDeliveryRecordPage
.
getMoneyTotal
()));
totleMoney
=
A1
.
add
(
A2
).
doubleValue
();
}
}
//List<IostDeliveryRecordList>
IostDeliveryRecordList
iostDeliveryRecord1
=
new
IostDeliveryRecordList
();
iostDeliveryRecord1
.
setVolumeTotal
(
totlevolumeList
);
iostDeliveryRecord1
.
setWeightTotal
(
totleweightTotalsList
);
iostDeliveryRecord1
.
setPackagesTotal
(
totlepackagesTotalsList
);
iostDeliveryRecord1
.
setMoney
(
totleMoneyList
);
iostDeliveryRecordLists
.
add
(
iostDeliveryRecord1
);
//IostDeliveryRecordPage
iostDeliveryRecord
.
setBulkNo
(
"总行"
);
iostDeliveryRecord
.
setVolumeTotals
(
totlevolume
);
iostDeliveryRecord
.
setWeightTotals
(
totleweightTotals
);
iostDeliveryRecord
.
setPackagesTotals
(
totlepackagesTotals
);
iostDeliveryRecord
.
setMoneyTotal
(
totleMoney
);
iostDeliveryRecord
.
setIostDeliveryRecordListList
(
iostDeliveryRecordLists
);
return
iostDeliveryRecord
;
}
/**
* 导出excel
*
...
...
@@ -513,7 +589,8 @@ public class IostDeliveryRecordController {
vo
.
setIostDeliveryRecordListList
(
iostDeliveryRecordListList
);
pageList
.
add
(
vo
);
}
//添加总数行
pageList
.
add
(
addSumRow
(
pageList
));
// Step.4 AutoPoi 导出Excel
ModelAndView
mv
=
new
ModelAndView
(
new
JeecgEntityExcelView
());
mv
.
addObject
(
NormalExcelConstants
.
FILE_NAME
,
"出库记录列表"
);
...
...
jeecg-boot-module-system/target/classes/application-docker.yml
浏览文件 @
cfa0ca4a
...
...
@@ -140,7 +140,7 @@ spring:
#redis 配置
redis
:
database
:
0
host
:
127.0.0.1
host
:
wmssystem-redis
lettuce
:
pool
:
max-active
:
8
#最大连接数据库连接数,设 0 为没有限制
...
...
jeecg-boot-module-system/target/classes/org/jeecg/modules/iost/basedata/controller/IostDeliveryNoteController.class
浏览文件 @
cfa0ca4a
No preview for this file type
jeecg-boot-module-system/target/classes/org/jeecg/modules/iost/basedata/controller/IostDeliveryRecordController.class
浏览文件 @
cfa0ca4a
No preview for this file type
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论