Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jyzb_platformV2
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
赵剑炜
jyzb_platformV2
Commits
884f9489
Commit
884f9489
authored
Aug 23, 2023
by
李小惠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导入导出依赖
parent
8af7f90b
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
41 行增加
和
7 行删除
+41
-7
pom.xml
jyzb-api/pom.xml
+4
-1
InventoryVo.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/vo/InventoryVo.java
+0
-0
pom.xml
jyzb-biz/pom.xml
+4
-0
InventoryController.java
jyzb-biz/src/main/java/com/junmp/jyzb/controller/InventoryController.java
+2
-2
InventoryService.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/InventoryService.java
+1
-1
InventoryServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventoryServiceImpl.java
+13
-3
pom.xml
pom.xml
+17
-0
没有找到文件。
jyzb-api/pom.xml
View file @
884f9489
...
@@ -51,7 +51,10 @@
...
@@ -51,7 +51,10 @@
<groupId>
org.apache.commons
</groupId>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
easyexcel
</artifactId>
</dependency>
</dependencies>
</dependencies>
...
...
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/vo/InventoryVo.java
0 → 100644
View file @
884f9489
差异被折叠。
点击展开。
jyzb-biz/pom.xml
View file @
884f9489
...
@@ -47,6 +47,10 @@
...
@@ -47,6 +47,10 @@
<groupId>
com.junmp.v2
</groupId>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
v2-db-api
</artifactId>
<artifactId>
v2-db-api
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
office-sdk-excel
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
com.junmp.jyzb
</groupId>
<groupId>
com.junmp.jyzb
</groupId>
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/controller/InventoryController.java
View file @
884f9489
...
@@ -142,8 +142,8 @@ public class InventoryController {
...
@@ -142,8 +142,8 @@ public class InventoryController {
//导出,通过传递组织机构id,将该组织机构下的所有装备信息进行导出
//导出,通过传递组织机构id,将该组织机构下的所有装备信息进行导出
@PostMapping
(
"/ExportInventoryExcel"
)
@PostMapping
(
"/ExportInventoryExcel"
)
@ApiOperation
(
"组织机构装备导出"
)
@ApiOperation
(
"组织机构装备导出"
)
public
void
ExportInventoryExcel
(
@RequestBody
@Validated
(
ValidationApi
.
export
.
class
)
InventoryReq
req
,
HttpServletResponse
response
)
throws
IOException
{
public
void
ExportInventoryExcel
(
@RequestBody
@Validated
(
ValidationApi
.
export
.
class
)
InventoryReq
req
)
{
inventoryService
.
ExportInventoryExcel
(
req
,
response
);
inventoryService
.
ExportInventoryExcel
(
req
);
}
}
//装备出入库记录(通过装备id)
//装备出入库记录(通过装备id)
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/InventoryService.java
View file @
884f9489
...
@@ -54,7 +54,7 @@ public interface InventoryService extends IService<Inventory> {
...
@@ -54,7 +54,7 @@ public interface InventoryService extends IService<Inventory> {
List
<
InventorySummary
>
EqsByCabinetBoxId
(
CabinetBoxReq
req
);
List
<
InventorySummary
>
EqsByCabinetBoxId
(
CabinetBoxReq
req
);
//通过组织机构id对该组织机构下的装备进行导出
//通过组织机构id对该组织机构下的装备进行导出
void
ExportInventoryExcel
(
InventoryReq
req
,
HttpServletResponse
response
)
throws
IOException
;
void
ExportInventoryExcel
(
InventoryReq
req
)
;
//获取装备的出入库记录
//获取装备的出入库记录
List
<
InOutRecordsDto
>
getInOutRecords
(
InventoryReq
req
);
List
<
InOutRecordsDto
>
getInOutRecords
(
InventoryReq
req
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventoryServiceImpl.java
View file @
884f9489
...
@@ -16,6 +16,9 @@ import com.junmp.jyzb.entity.*;
...
@@ -16,6 +16,9 @@ import com.junmp.jyzb.entity.*;
import
com.junmp.jyzb.service.*
;
import
com.junmp.jyzb.service.*
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.exception.base.ServiceException
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.common.util.BeanPlusUtil
;
import
com.junmp.v2.common.util.HttpServletUtil
;
import
com.junmp.v2.office.api.OfficeExcelApi
;
import
com.junmp.v2.office.api.bean.ExcelExportParam
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -24,7 +27,6 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -24,7 +27,6 @@ import javax.servlet.http.HttpServletResponse;
import
com.junmp.jyzb.mapper.InventoryMapper
;
import
com.junmp.jyzb.mapper.InventoryMapper
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.io.IOException
;
import
java.util.*
;
import
java.util.*
;
...
@@ -63,6 +65,9 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
...
@@ -63,6 +65,9 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
@Resource
@Resource
private
LogDetailService
logDetailService
;
private
LogDetailService
logDetailService
;
@Resource
private
OfficeExcelApi
officeExcelApi
;
@Override
@Override
public
InventoryDto
getInventoryDetail
(
InventoryReq
req
)
{
public
InventoryDto
getInventoryDetail
(
InventoryReq
req
)
{
Inventory
inventory
=
InventoryExist
(
req
.
getId
());
Inventory
inventory
=
InventoryExist
(
req
.
getId
());
...
@@ -276,13 +281,18 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
...
@@ -276,13 +281,18 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
//通过组织机构id将该组织下的装备进行导出
//通过组织机构id将该组织下的装备进行导出
@Override
@Override
public
void
ExportInventoryExcel
(
InventoryReq
req
,
HttpServletResponse
response
)
throws
IOException
{
public
void
ExportInventoryExcel
(
InventoryReq
req
)
{
//判断组织机构是否存在
//判断组织机构是否存在
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
pubOrgService
.
PubOrgExist
(
req
.
getOrgId
());
//查询该组织机构下的所有装备信息
//查询该组织机构下的所有装备信息
List
<
Inventory
>
list
=
list
(
new
LambdaQueryWrapper
<
Inventory
>()
List
<
Inventory
>
list
=
list
(
new
LambdaQueryWrapper
<
Inventory
>()
.
eq
(
Inventory:
:
getOrgId
,
req
.
getOrgId
()));
.
eq
(
Inventory:
:
getOrgId
,
req
.
getOrgId
()));
String
filename
=
"装备列表"
;
HttpServletResponse
response
=
HttpServletUtil
.
getResponse
();
ExcelExportParam
param
=
new
ExcelExportParam
();
param
.
setDataList
(
list
);
param
.
setClazz
(
Inventory
.
class
);
param
.
setResponse
(
response
);
param
.
setFileName
(
"装备列表.xls"
);
//对数据进行导出
//对数据进行导出
// ExcelUtils.exportExcel(list,filename,"装备导出",Inventory.class,filename,response);
// ExcelUtils.exportExcel(list,filename,"装备导出",Inventory.class,filename,response);
}
}
...
...
pom.xml
View file @
884f9489
...
@@ -266,7 +266,24 @@
...
@@ -266,7 +266,24 @@
<version>
5.0.5.RELEASE
</version>
<version>
5.0.5.RELEASE
</version>
</dependency>
</dependency>
<!--导入导出依赖-->
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
office-api
</artifactId>
<version>
${junmp.v2.version}
</version>
</dependency>
<dependency>
<groupId>
com.junmp.v2
</groupId>
<artifactId>
office-sdk-excel
</artifactId>
<version>
${junmp.v2.version}
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
easyexcel
</artifactId>
<version>
3.1.3
</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论