Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tianjin-cement
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
竹天卫
tianjin-cement
Commits
98189e15
Commit
98189e15
authored
Oct 12, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
列表导出接口完成
parent
a4ad43ff
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
505 additions
and
44 deletions
+505
-44
EquipmentController.java
...se/sc/cement/business/controller/EquipmentController.java
+9
-1
PlanConsumablesPurchaseController.java
...usiness/controller/PlanConsumablesPurchaseController.java
+14
-0
PlanEquipmentMaintainController.java
.../business/controller/PlanEquipmentMaintainController.java
+13
-0
PlanEquipmentPurchaseController.java
.../business/controller/PlanEquipmentPurchaseController.java
+12
-0
PlanEquipmentRepairController.java
...nt/business/controller/PlanEquipmentRepairController.java
+13
-0
PlanStandardPurchaseController.java
...t/business/controller/PlanStandardPurchaseController.java
+13
-0
EquipmentUseMapper.java
...cn/wise/sc/cement/business/mapper/EquipmentUseMapper.java
+4
-0
PlanConsumablesPurchaseMapper.java
...cement/business/mapper/PlanConsumablesPurchaseMapper.java
+4
-0
PlanEquipmentMaintainMapper.java
...c/cement/business/mapper/PlanEquipmentMaintainMapper.java
+3
-0
PlanEquipmentPurchaseMapper.java
...c/cement/business/mapper/PlanEquipmentPurchaseMapper.java
+3
-0
PlanEquipmentRepairMapper.java
.../sc/cement/business/mapper/PlanEquipmentRepairMapper.java
+3
-0
PlanStandardPurchaseMapper.java
...sc/cement/business/mapper/PlanStandardPurchaseMapper.java
+3
-0
EquipmentUseMapper.xml
...wise/sc/cement/business/mapper/xml/EquipmentUseMapper.xml
+23
-3
PlanConsumablesPurchaseMapper.xml
...ent/business/mapper/xml/PlanConsumablesPurchaseMapper.xml
+19
-0
PlanEquipmentMaintainMapper.xml
...ement/business/mapper/xml/PlanEquipmentMaintainMapper.xml
+18
-0
PlanEquipmentPurchaseMapper.xml
...ement/business/mapper/xml/PlanEquipmentPurchaseMapper.xml
+20
-0
PlanEquipmentRepairMapper.xml
.../cement/business/mapper/xml/PlanEquipmentRepairMapper.xml
+17
-0
PlanStandardPurchaseMapper.xml
...cement/business/mapper/xml/PlanStandardPurchaseMapper.xml
+16
-0
IEquipmentService.java
...cn/wise/sc/cement/business/service/IEquipmentService.java
+2
-0
IPlanConsumablesPurchaseService.java
...ent/business/service/IPlanConsumablesPurchaseService.java
+4
-0
IPlanEquipmentMaintainService.java
...ement/business/service/IPlanEquipmentMaintainService.java
+4
-0
IPlanEquipmentPurchaseService.java
...ement/business/service/IPlanEquipmentPurchaseService.java
+4
-0
IPlanEquipmentRepairService.java
.../cement/business/service/IPlanEquipmentRepairService.java
+3
-0
IPlanStandardPurchaseService.java
...cement/business/service/IPlanStandardPurchaseService.java
+4
-0
EquipmentServiceImpl.java
...sc/cement/business/service/impl/EquipmentServiceImpl.java
+45
-40
PlanConsumablesPurchaseServiceImpl.java
...ness/service/impl/PlanConsumablesPurchaseServiceImpl.java
+47
-0
PlanEquipmentMaintainServiceImpl.java
...siness/service/impl/PlanEquipmentMaintainServiceImpl.java
+48
-0
PlanEquipmentPurchaseServiceImpl.java
...siness/service/impl/PlanEquipmentPurchaseServiceImpl.java
+46
-0
PlanEquipmentRepairServiceImpl.java
...business/service/impl/PlanEquipmentRepairServiceImpl.java
+47
-0
PlanStandardPurchaseServiceImpl.java
...usiness/service/impl/PlanStandardPurchaseServiceImpl.java
+44
-0
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EquipmentController.java
View file @
98189e15
...
@@ -298,7 +298,15 @@ public class EquipmentController {
...
@@ -298,7 +298,15 @@ public class EquipmentController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
"设备使用记录导出"
)
@PostMapping
(
"/exportUse"
)
public
void
exportUse
(
String
brand
,
Integer
supplierId
,
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
equipmentService
.
exportUse
(
brand
,
supplierId
,
name
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备使用记录导出{}"
,
e
);
}
}
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanConsumablesPurchaseController.java
View file @
98189e15
...
@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
...
@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* <p>
* <p>
* 前端控制器
* 前端控制器
...
@@ -48,6 +50,18 @@ public class PlanConsumablesPurchaseController {
...
@@ -48,6 +50,18 @@ public class PlanConsumablesPurchaseController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
"消耗品采购计划列表导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
consumablesPurchaseService
.
export
(
name
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"消耗品采购计划列表导出{}"
,
e
);
}
}
@ApiOperation
(
value
=
"新增消耗品采购计划"
)
@ApiOperation
(
value
=
"新增消耗品采购计划"
)
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
PlanConsumablesPurchaseQuery
query
){
public
BaseResponse
create
(
@RequestBody
PlanConsumablesPurchaseQuery
query
){
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanEquipmentMaintainController.java
View file @
98189e15
...
@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
...
@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* <p>
* <p>
* 前端控制器
* 前端控制器
...
@@ -47,6 +49,17 @@ public class PlanEquipmentMaintainController {
...
@@ -47,6 +49,17 @@ public class PlanEquipmentMaintainController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
"设备维护计划分列表导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
equipmentMaintainService
.
export
(
name
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备维护计划分列表导出{}"
,
e
);
}
}
@ApiOperation
(
value
=
"新增设设备维护计划分页列表"
)
@ApiOperation
(
value
=
"新增设设备维护计划分页列表"
)
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
PlanEquipmentMaintainQuery
query
){
public
BaseResponse
create
(
@RequestBody
PlanEquipmentMaintainQuery
query
){
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanEquipmentPurchaseController.java
View file @
98189e15
...
@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
...
@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* <p>
* <p>
* 前端控制器
* 前端控制器
...
@@ -47,6 +49,16 @@ public class PlanEquipmentPurchaseController {
...
@@ -47,6 +49,16 @@ public class PlanEquipmentPurchaseController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
"设备采购计划列表导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
equipmentPurchaseService
.
export
(
name
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备采购计划列表导出{}"
,
e
);
}
}
@ApiOperation
(
value
=
"新增设备采购计划"
)
@ApiOperation
(
value
=
"新增设备采购计划"
)
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
PlanEquipmentPurchaseQuery
query
){
public
BaseResponse
create
(
@RequestBody
PlanEquipmentPurchaseQuery
query
){
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanEquipmentRepairController.java
View file @
98189e15
...
@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
...
@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* <p>
* <p>
* 前端控制器
* 前端控制器
...
@@ -47,6 +49,17 @@ public class PlanEquipmentRepairController {
...
@@ -47,6 +49,17 @@ public class PlanEquipmentRepairController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
"设备维修计划列表导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
equipmentRepairService
.
export
(
name
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"设备维修计划列表导出{}"
,
e
);
}
}
@ApiOperation
(
value
=
"新增设备维修计划"
)
@ApiOperation
(
value
=
"新增设备维修计划"
)
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
PlanEquipmentRepairQuery
query
){
public
BaseResponse
create
(
@RequestBody
PlanEquipmentRepairQuery
query
){
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanStandardPurchaseController.java
View file @
98189e15
...
@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
...
@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* <p>
* <p>
* 前端控制器
* 前端控制器
...
@@ -47,6 +49,17 @@ public class PlanStandardPurchaseController {
...
@@ -47,6 +49,17 @@ public class PlanStandardPurchaseController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
"标样采购计划列表导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
try
{
standardPurchaseService
.
export
(
name
,
fileName
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"标样采购计划列表导出{}"
,
e
);
}
}
@ApiOperation
(
value
=
"新增标样采购计划"
)
@ApiOperation
(
value
=
"新增标样采购计划"
)
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
PlanStandardPurchaseQuery
query
){
public
BaseResponse
create
(
@RequestBody
PlanStandardPurchaseQuery
query
){
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/EquipmentUseMapper.java
View file @
98189e15
...
@@ -23,6 +23,10 @@ public interface EquipmentUseMapper extends BaseMapper<EquipmentUse> {
...
@@ -23,6 +23,10 @@ public interface EquipmentUseMapper extends BaseMapper<EquipmentUse> {
IPage
<
EquipmentUseVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
IPage
<
EquipmentUseVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
exportList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
/**
/**
* 根据项目id获取使用到的设备名字
* 根据项目id获取使用到的设备名字
* @param entrustId 项目id
* @param entrustId 项目id
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/PlanConsumablesPurchaseMapper.java
View file @
98189e15
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -22,6 +23,9 @@ public interface PlanConsumablesPurchaseMapper extends BaseMapper<PlanConsumable
...
@@ -22,6 +23,9 @@ public interface PlanConsumablesPurchaseMapper extends BaseMapper<PlanConsumable
IPage
<
PlanConsumablesPurchaseVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
IPage
<
PlanConsumablesPurchaseVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
exportList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
PlanConsumablesPurchaseVo
getDetail
(
Integer
id
);
PlanConsumablesPurchaseVo
getDetail
(
Integer
id
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/PlanEquipmentMaintainMapper.java
View file @
98189e15
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -22,6 +23,8 @@ public interface PlanEquipmentMaintainMapper extends BaseMapper<PlanEquipmentMai
...
@@ -22,6 +23,8 @@ public interface PlanEquipmentMaintainMapper extends BaseMapper<PlanEquipmentMai
IPage
<
PlanEquipmentMaintainVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
IPage
<
PlanEquipmentMaintainVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
exportList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
PlanEquipmentMaintainVo
getDetail
(
Integer
id
);
PlanEquipmentMaintainVo
getDetail
(
Integer
id
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/PlanEquipmentPurchaseMapper.java
View file @
98189e15
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -22,6 +23,8 @@ public interface PlanEquipmentPurchaseMapper extends BaseMapper<PlanEquipmentPur
...
@@ -22,6 +23,8 @@ public interface PlanEquipmentPurchaseMapper extends BaseMapper<PlanEquipmentPur
IPage
<
PlanEquipmentPurchaseVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
IPage
<
PlanEquipmentPurchaseVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
exportList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
PlanEquipmentPurchaseVo
getDetail
(
Integer
id
);
PlanEquipmentPurchaseVo
getDetail
(
Integer
id
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/PlanEquipmentRepairMapper.java
View file @
98189e15
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -22,6 +23,8 @@ public interface PlanEquipmentRepairMapper extends BaseMapper<PlanEquipmentRepai
...
@@ -22,6 +23,8 @@ public interface PlanEquipmentRepairMapper extends BaseMapper<PlanEquipmentRepai
IPage
<
PlanEquipmentRepairVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
IPage
<
PlanEquipmentRepairVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
exportList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
PlanEquipmentRepairVo
getDetail
(
Integer
id
);
PlanEquipmentRepairVo
getDetail
(
Integer
id
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/PlanStandardPurchaseMapper.java
View file @
98189e15
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -22,6 +23,8 @@ public interface PlanStandardPurchaseMapper extends BaseMapper<PlanStandardPurch
...
@@ -22,6 +23,8 @@ public interface PlanStandardPurchaseMapper extends BaseMapper<PlanStandardPurch
IPage
<
PlanStandardPurchaseVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
IPage
<
PlanStandardPurchaseVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
exportList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
PlanStandardPurchaseVo
getDetail
(
Integer
id
);
PlanStandardPurchaseVo
getDetail
(
Integer
id
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EquipmentUseMapper.xml
View file @
98189e15
...
@@ -17,13 +17,33 @@
...
@@ -17,13 +17,33 @@
</sql>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentUseVo"
>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.EquipmentUseVo"
>
SELECT e
t
.*,
SELECT e
u
.*,
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model
FROM equipment_use eu
FROM equipment_use eu
left join equipment e on e.id = e
t
.equipment_id
left join equipment e on e.id = e
u
.equipment_id
<include
refid=
"where"
/>
<include
refid=
"where"
/>
ORDER BY e
t
.create_time ASC
ORDER BY e
u
.create_time ASC
</select>
</select>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
(@i:=@i+1) as 序号,
e.name as 设备名称,
e.code as 设备编号,
e.model as '规格/型号',
IF(ISNULL(eu.use_date),'',eu.use_date) as 使用日期,
IF(ISNULL(eu.user_name),'',eu.user_name) as 使用人,
IF(ISNULL(eu.project_name),'',eu.project_name) as 参与项目,
IF(ISNULL(eu.project_code),'',eu.project_code) as 项目编号,
IF(ISNULL(eu.test_item),'',eu.test_item) as 检测项
FROM equipment_use eu
left join equipment e on e.id = eu.equipment_id
,(select @i:=0)eu
<include
refid=
"where"
/>
ORDER BY eu.create_time ASC
</select>
<select
id=
"getEquipmentNamesByProjectId"
resultType=
"java.lang.String"
>
<select
id=
"getEquipmentNamesByProjectId"
resultType=
"java.lang.String"
>
SELECT CONCAT(e.`name`,' (',e.`code`,')') FROM equipment_use eu
SELECT CONCAT(e.`name`,' (',e.`code`,')') FROM equipment_use eu
RIGHT JOIN
RIGHT JOIN
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanConsumablesPurchaseMapper.xml
View file @
98189e15
...
@@ -21,6 +21,25 @@
...
@@ -21,6 +21,25 @@
ORDER BY t.id DESC
ORDER BY t.id DESC
</select>
</select>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
(@i:=@i+1) as 序号,
t.name as 产品名称,
t.model as '规格/型号',
t.technical_index as 技术指标,
t.unit_price as 单价(万元),
t.production_unit as 生产单位,
t.purchase_num as 采购数量,
t.purchase_date as 购买日期,
su.name as 采购人
FROM plan_consumables_purchase t
left join sys_user su on su.id = t.purchaser_id
,(select @i:=0)t
<include
refid=
"where"
/>
ORDER BY t.id DESC
</select>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo"
>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo"
>
SELECT t.*, su.name as purchaserName, su2.name as userName
SELECT t.*, su.name as purchaserName, su2.name as userName
FROM plan_consumables_purchase t
FROM plan_consumables_purchase t
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanEquipmentMaintainMapper.xml
View file @
98189e15
...
@@ -21,6 +21,24 @@
...
@@ -21,6 +21,24 @@
ORDER BY t.id DESC
ORDER BY t.id DESC
</select>
</select>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
(@i:=@i+1) as 序号,
t.name as 产品名称,
t.model as '规格/型号',
t.code as 编号,
t.maintain_date as 维护日期,
t.maintain_content as 维护内容,
su.name as 执行人,
t.maintain_result as 完成情况
FROM plan_equipment_maintain t
left join sys_user su on su.id = t.maintainer_id
,(select @i:=0)t
<include
refid=
"where"
/>
ORDER BY t.id DESC
</select>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo"
>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo"
>
SELECT t.*, su.name as maintainerName, su2.name as userName
SELECT t.*, su.name as maintainerName, su2.name as userName
FROM plan_equipment_maintain t
FROM plan_equipment_maintain t
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanEquipmentPurchaseMapper.xml
View file @
98189e15
...
@@ -21,6 +21,26 @@
...
@@ -21,6 +21,26 @@
ORDER BY t.id DESC
ORDER BY t.id DESC
</select>
</select>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
(@i:=@i+1) as 序号,
t.name as 产品名称,
t.model as '规格/型号',
t.technical_index as 技术指标,
t.unit_price as 单价(万元),
t.production_unit as 生产单位,
t.purchase_num as 采购数量,
t.purchase_date as 购买日期,
su.name as 采购人
FROM plan_equipment_purchase t
left join sys_user su on su.id = t.purchaser_id
,(select @i:=0)t
<include
refid=
"where"
/>
ORDER BY t.id DESC
</select>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo"
>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo"
>
SELECT t.*, su.name as purchaserName, su2.name as userName
SELECT t.*, su.name as purchaserName, su2.name as userName
FROM plan_equipment_purchase t
FROM plan_equipment_purchase t
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanEquipmentRepairMapper.xml
View file @
98189e15
...
@@ -21,6 +21,23 @@
...
@@ -21,6 +21,23 @@
ORDER BY t.id DESC
ORDER BY t.id DESC
</select>
</select>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
(@i:=@i+1) as 序号,
t.name as 产品名称,
t.model as '规格/型号',
t.technical_index as 技术指标,
t.unit_price as 单价(万元),
t.production_unit as 生产单位,
t.repair_date as 维修日期,
su.name as 执行人
FROM plan_equipment_repair t
left join sys_user su on su.id = t.repairer_id
,(select @i:=0)t
<include
refid=
"where"
/>
ORDER BY t.id DESC
</select>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentRepairVo"
>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentRepairVo"
>
SELECT t.*, su.name as repairerName, su2.name as userName
SELECT t.*, su.name as repairerName, su2.name as userName
FROM plan_equipment_repair t
FROM plan_equipment_repair t
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanStandardPurchaseMapper.xml
View file @
98189e15
...
@@ -21,6 +21,22 @@
...
@@ -21,6 +21,22 @@
ORDER BY t.id DESC
ORDER BY t.id DESC
</select>
</select>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
(@i:=@i+1) as 序号,
t.name as 标物名称,
t.distribution_unit as 经销单位,
t.purchase_num as 采购数量,
t.purchase_date as 采购时间,
su.name as 采购人
FROM plan_standard_purchase t
left join sys_user su on su.id = t.purchaser_id
,(select @i:=0)t
<include
refid=
"where"
/>
ORDER BY t.id DESC
</select>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo"
>
<select
id=
"getDetail"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo"
>
SELECT t.*, su.name as purchaserName, su2.name as userName
SELECT t.*, su.name as purchaserName, su2.name as userName
FROM plan_standard_purchase t
FROM plan_standard_purchase t
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEquipmentService.java
View file @
98189e15
...
@@ -60,5 +60,7 @@ public interface IEquipmentService extends IService<Equipment> {
...
@@ -60,5 +60,7 @@ public interface IEquipmentService extends IService<Equipment> {
BaseResponse
<
IPage
<
EquipmentUseVo
>>
getUsePage
(
PageQuery
pageQuery
,
BaseResponse
<
IPage
<
EquipmentUseVo
>>
getUsePage
(
PageQuery
pageQuery
,
String
brand
,
Integer
supplierId
,
String
name
);
String
brand
,
Integer
supplierId
,
String
name
);
void
exportUse
(
String
brand
,
Integer
supplierId
,
String
name
,
String
fileName
,
HttpServletResponse
response
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanConsumablesPurchaseService.java
View file @
98189e15
...
@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo;
...
@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* <p>
* <p>
* 服务类
* 服务类
...
@@ -20,6 +22,8 @@ public interface IPlanConsumablesPurchaseService extends IService<PlanConsumable
...
@@ -20,6 +22,8 @@ public interface IPlanConsumablesPurchaseService extends IService<PlanConsumable
BaseResponse
<
IPage
<
PlanConsumablesPurchaseVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
BaseResponse
<
IPage
<
PlanConsumablesPurchaseVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
);
BaseResponse
<
PlanConsumablesPurchase
>
create
(
PlanConsumablesPurchaseQuery
query
);
BaseResponse
<
PlanConsumablesPurchase
>
create
(
PlanConsumablesPurchaseQuery
query
);
BaseResponse
<
PlanConsumablesPurchase
>
update
(
PlanConsumablesPurchaseQuery
query
);
BaseResponse
<
PlanConsumablesPurchase
>
update
(
PlanConsumablesPurchaseQuery
query
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanEquipmentMaintainService.java
View file @
98189e15
...
@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo;
...
@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* <p>
* <p>
* 服务类
* 服务类
...
@@ -20,6 +22,8 @@ public interface IPlanEquipmentMaintainService extends IService<PlanEquipmentMai
...
@@ -20,6 +22,8 @@ public interface IPlanEquipmentMaintainService extends IService<PlanEquipmentMai
BaseResponse
<
IPage
<
PlanEquipmentMaintainVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
BaseResponse
<
IPage
<
PlanEquipmentMaintainVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
);
BaseResponse
<
PlanEquipmentMaintain
>
create
(
PlanEquipmentMaintainQuery
query
);
BaseResponse
<
PlanEquipmentMaintain
>
create
(
PlanEquipmentMaintainQuery
query
);
BaseResponse
<
PlanEquipmentMaintain
>
update
(
PlanEquipmentMaintainQuery
query
);
BaseResponse
<
PlanEquipmentMaintain
>
update
(
PlanEquipmentMaintainQuery
query
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanEquipmentPurchaseService.java
View file @
98189e15
...
@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo;
...
@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* <p>
* <p>
* 服务类
* 服务类
...
@@ -20,6 +22,8 @@ public interface IPlanEquipmentPurchaseService extends IService<PlanEquipmentPur
...
@@ -20,6 +22,8 @@ public interface IPlanEquipmentPurchaseService extends IService<PlanEquipmentPur
BaseResponse
<
IPage
<
PlanEquipmentPurchaseVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
BaseResponse
<
IPage
<
PlanEquipmentPurchaseVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
);
BaseResponse
<
PlanEquipmentPurchase
>
create
(
PlanEquipmentPurchaseQuery
query
);
BaseResponse
<
PlanEquipmentPurchase
>
create
(
PlanEquipmentPurchaseQuery
query
);
BaseResponse
<
PlanEquipmentPurchase
>
update
(
PlanEquipmentPurchaseQuery
query
);
BaseResponse
<
PlanEquipmentPurchase
>
update
(
PlanEquipmentPurchaseQuery
query
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanEquipmentRepairService.java
View file @
98189e15
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* <p>
* <p>
...
@@ -22,6 +23,8 @@ public interface IPlanEquipmentRepairService extends IService<PlanEquipmentRepai
...
@@ -22,6 +23,8 @@ public interface IPlanEquipmentRepairService extends IService<PlanEquipmentRepai
BaseResponse
<
IPage
<
PlanEquipmentRepairVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
BaseResponse
<
IPage
<
PlanEquipmentRepairVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
);
BaseResponse
<
PlanEquipmentRepair
>
create
(
PlanEquipmentRepairQuery
query
);
BaseResponse
<
PlanEquipmentRepair
>
create
(
PlanEquipmentRepairQuery
query
);
BaseResponse
<
PlanEquipmentRepair
>
update
(
PlanEquipmentRepairQuery
query
);
BaseResponse
<
PlanEquipmentRepair
>
update
(
PlanEquipmentRepairQuery
query
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanStandardPurchaseService.java
View file @
98189e15
...
@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo;
...
@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
* <p>
* <p>
* 服务类
* 服务类
...
@@ -20,6 +22,8 @@ public interface IPlanStandardPurchaseService extends IService<PlanStandardPurch
...
@@ -20,6 +22,8 @@ public interface IPlanStandardPurchaseService extends IService<PlanStandardPurch
BaseResponse
<
IPage
<
PlanStandardPurchaseVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
BaseResponse
<
IPage
<
PlanStandardPurchaseVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
);
BaseResponse
<
PlanStandardPurchase
>
create
(
PlanStandardPurchaseQuery
query
);
BaseResponse
<
PlanStandardPurchase
>
create
(
PlanStandardPurchaseQuery
query
);
BaseResponse
<
PlanStandardPurchase
>
update
(
PlanStandardPurchaseQuery
query
);
BaseResponse
<
PlanStandardPurchase
>
update
(
PlanStandardPurchaseQuery
query
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EquipmentServiceImpl.java
View file @
98189e15
...
@@ -507,6 +507,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
...
@@ -507,6 +507,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
* @param fileName
* @param fileName
* @param response
* @param response
*/
*/
@Override
public
void
exportScrapApproval
(
String
brand
,
Integer
supplierId
,
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
public
void
exportScrapApproval
(
String
brand
,
Integer
supplierId
,
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"brand"
,
brand
);
params
.
put
(
"brand"
,
brand
);
...
@@ -544,12 +545,6 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
...
@@ -544,12 +545,6 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
}
}
}
}
/**
/**
* 报废申请详情
* 报废申请详情
* @param id 设备报废表id
* @param id 设备报废表id
...
@@ -585,40 +580,50 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
...
@@ -585,40 +580,50 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
return
BaseResponse
.
okData
(
pages
);
return
BaseResponse
.
okData
(
pages
);
}
}
/**
* 设备使用记录导出
* @param brand
* @param supplierId
* @param name
* @param fileName
* @param response
*/
@Override
public
void
exportUse
(
String
brand
,
Integer
supplierId
,
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"brand"
,
brand
);
params
.
put
(
"supplierId"
,
supplierId
);
params
.
put
(
"name"
,
name
);
List
<
Map
<
String
,
Object
>>
list
=
scrapMapper
.
exportList
(
params
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
String
[]
headers
=
new
String
[
map
.
size
()];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"设备名称"
;
headers
[
2
]
=
"设备编号"
;
headers
[
3
]
=
"规格/型号"
;
headers
[
4
]
=
"使用日期"
;
headers
[
5
]
=
"使用人"
;
headers
[
6
]
=
"参与项目"
;
headers
[
7
]
=
"项目编号"
;
headers
[
8
]
=
"检测项"
;
List
<
Object
[]>
datas
=
new
ArrayList
<>(
list
.
size
());
for
(
Map
<
String
,
Object
>
m
:
list
)
{
Object
[]
objects
=
new
Object
[
headers
.
length
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
=
m
.
get
(
headers
[
j
]).
toString
();
if
(
j
==
0
){
obj
=
obj
.
split
(
"\\."
)[
0
];
}
objects
[
j
]
=
obj
;
}
datas
.
add
(
objects
);
}
ExcelUtil
.
excelExport
(
fileName
==
null
||
fileName
.
trim
().
length
()
<=
0
?
"设备使用记录"
:
fileName
,
headers
,
datas
,
response
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanConsumablesPurchaseServiceImpl.java
View file @
98189e15
...
@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo;
...
@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo;
import
cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo
;
import
cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo
;
import
cn.wise.sc.cement.business.service.IPlanConsumablesPurchaseService
;
import
cn.wise.sc.cement.business.service.IPlanConsumablesPurchaseService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
...
@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -58,6 +62,49 @@ public class PlanConsumablesPurchaseServiceImpl extends ServiceImpl<PlanConsumab
...
@@ -58,6 +62,49 @@ public class PlanConsumablesPurchaseServiceImpl extends ServiceImpl<PlanConsumab
return
BaseResponse
.
okData
(
pages
);
return
BaseResponse
.
okData
(
pages
);
}
}
/**
* 消耗品采购计划导出
* @param name
* @param fileName
* @param response
*/
@Override
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"name"
,
name
);
List
<
Map
<
String
,
Object
>>
list
=
consumablesPurchaseMapper
.
exportList
(
params
);
if
(!
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
String
[]
headers
=
new
String
[
map
.
size
()];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"产品名称"
;
headers
[
2
]
=
"规格/型号"
;
headers
[
3
]
=
"技术指标"
;
headers
[
4
]
=
"单价(万元)"
;
headers
[
5
]
=
"生产单位"
;
headers
[
6
]
=
"采购数量"
;
headers
[
7
]
=
"购买日期"
;
headers
[
8
]
=
"采购人"
;
List
<
Object
[]>
datas
=
new
ArrayList
<>(
list
.
size
());
for
(
Map
<
String
,
Object
>
m
:
list
)
{
Object
[]
objects
=
new
Object
[
headers
.
length
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
=
m
.
get
(
headers
[
j
]).
toString
();
if
(
j
==
0
){
obj
=
obj
.
split
(
"\\."
)[
0
];
}
objects
[
j
]
=
obj
;
}
datas
.
add
(
objects
);
}
ExcelUtil
.
excelExport
(
fileName
==
null
||
fileName
.
trim
().
length
()
<=
0
?
"消耗品采购计划"
:
fileName
,
headers
,
datas
,
response
);
}
}
/**
/**
* 创建
* 创建
* @param query
* @param query
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanEquipmentMaintainServiceImpl.java
View file @
98189e15
...
@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo;
...
@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo;
import
cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo
;
import
cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo
;
import
cn.wise.sc.cement.business.service.IPlanEquipmentMaintainService
;
import
cn.wise.sc.cement.business.service.IPlanEquipmentMaintainService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
...
@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -59,6 +63,50 @@ public class PlanEquipmentMaintainServiceImpl extends ServiceImpl<PlanEquipmentM
...
@@ -59,6 +63,50 @@ public class PlanEquipmentMaintainServiceImpl extends ServiceImpl<PlanEquipmentM
return
BaseResponse
.
okData
(
pages
);
return
BaseResponse
.
okData
(
pages
);
}
}
/**
* 设备维护计划列表导出
* @param name
* @param fileName
* @param response
*/
@Override
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"name"
,
name
);
List
<
Map
<
String
,
Object
>>
list
=
equipmentMaintainMapper
.
exportList
(
params
);
if
(!
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
String
[]
headers
=
new
String
[
map
.
size
()];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"产品名称"
;
headers
[
2
]
=
"规格/型号"
;
headers
[
3
]
=
"编号"
;
headers
[
4
]
=
"维护日期"
;
headers
[
5
]
=
"维护内容"
;
headers
[
6
]
=
"执行人"
;
headers
[
7
]
=
"完成情况"
;
List
<
Object
[]>
datas
=
new
ArrayList
<>(
list
.
size
());
for
(
Map
<
String
,
Object
>
m
:
list
)
{
Object
[]
objects
=
new
Object
[
headers
.
length
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
=
m
.
get
(
headers
[
j
]).
toString
();
if
(
j
==
0
){
obj
=
obj
.
split
(
"\\."
)[
0
];
}
objects
[
j
]
=
obj
;
}
datas
.
add
(
objects
);
}
ExcelUtil
.
excelExport
(
fileName
==
null
||
fileName
.
trim
().
length
()
<=
0
?
"设备维护计划"
:
fileName
,
headers
,
datas
,
response
);
}
}
/**
/**
* 创建
* 创建
* @param query
* @param query
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanEquipmentPurchaseServiceImpl.java
View file @
98189e15
...
@@ -15,6 +15,7 @@ import cn.wise.sc.cement.business.model.vo.TeamListVo;
...
@@ -15,6 +15,7 @@ import cn.wise.sc.cement.business.model.vo.TeamListVo;
import
cn.wise.sc.cement.business.model.vo.TeamVo
;
import
cn.wise.sc.cement.business.model.vo.TeamVo
;
import
cn.wise.sc.cement.business.service.IPlanEquipmentPurchaseService
;
import
cn.wise.sc.cement.business.service.IPlanEquipmentPurchaseService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -27,7 +28,9 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -27,7 +28,9 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -63,6 +66,49 @@ public class PlanEquipmentPurchaseServiceImpl extends ServiceImpl<PlanEquipmentP
...
@@ -63,6 +66,49 @@ public class PlanEquipmentPurchaseServiceImpl extends ServiceImpl<PlanEquipmentP
return
BaseResponse
.
okData
(
pages
);
return
BaseResponse
.
okData
(
pages
);
}
}
/**
* 设备采购计划列表导出
* @param name
* @param fileName
* @param response
*/
@Override
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"name"
,
name
);
List
<
Map
<
String
,
Object
>>
list
=
equipmentPurchaseMapper
.
exportList
(
params
);
if
(!
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
String
[]
headers
=
new
String
[
map
.
size
()];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"产品名称"
;
headers
[
2
]
=
"规格/型号"
;
headers
[
3
]
=
"技术指标"
;
headers
[
4
]
=
"单价(万元)"
;
headers
[
5
]
=
"生产单位"
;
headers
[
6
]
=
"采购数量"
;
headers
[
7
]
=
"购买日期"
;
headers
[
8
]
=
"采购人"
;
List
<
Object
[]>
datas
=
new
ArrayList
<>(
list
.
size
());
for
(
Map
<
String
,
Object
>
m
:
list
)
{
Object
[]
objects
=
new
Object
[
headers
.
length
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
=
m
.
get
(
headers
[
j
]).
toString
();
if
(
j
==
0
){
obj
=
obj
.
split
(
"\\."
)[
0
];
}
objects
[
j
]
=
obj
;
}
datas
.
add
(
objects
);
}
ExcelUtil
.
excelExport
(
fileName
==
null
||
fileName
.
trim
().
length
()
<=
0
?
"设备采购计划"
:
fileName
,
headers
,
datas
,
response
);
}
}
/**
/**
* 创建
* 创建
* @param query
* @param query
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanEquipmentRepairServiceImpl.java
View file @
98189e15
...
@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo;
...
@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo;
import
cn.wise.sc.cement.business.model.vo.PlanEquipmentRepairVo
;
import
cn.wise.sc.cement.business.model.vo.PlanEquipmentRepairVo
;
import
cn.wise.sc.cement.business.service.IPlanEquipmentRepairService
;
import
cn.wise.sc.cement.business.service.IPlanEquipmentRepairService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
...
@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -58,6 +62,49 @@ public class PlanEquipmentRepairServiceImpl extends ServiceImpl<PlanEquipmentRep
...
@@ -58,6 +62,49 @@ public class PlanEquipmentRepairServiceImpl extends ServiceImpl<PlanEquipmentRep
return
BaseResponse
.
okData
(
pages
);
return
BaseResponse
.
okData
(
pages
);
}
}
/**
* 设备维修计划导出
* @param name
* @param fileName
* @param response
*/
@Override
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"name"
,
name
);
List
<
Map
<
String
,
Object
>>
list
=
equipmentRepairMapper
.
exportList
(
params
);
if
(!
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
String
[]
headers
=
new
String
[
map
.
size
()];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"产品名称"
;
headers
[
2
]
=
"规格/型号"
;
headers
[
3
]
=
"技术指标"
;
headers
[
4
]
=
"单价(万元)"
;
headers
[
5
]
=
"生产单位"
;
headers
[
6
]
=
"维修日期"
;
headers
[
7
]
=
"执行人"
;
List
<
Object
[]>
datas
=
new
ArrayList
<>(
list
.
size
());
for
(
Map
<
String
,
Object
>
m
:
list
)
{
Object
[]
objects
=
new
Object
[
headers
.
length
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
=
m
.
get
(
headers
[
j
]).
toString
();
if
(
j
==
0
){
obj
=
obj
.
split
(
"\\."
)[
0
];
}
objects
[
j
]
=
obj
;
}
datas
.
add
(
objects
);
}
ExcelUtil
.
excelExport
(
fileName
==
null
||
fileName
.
trim
().
length
()
<=
0
?
"设备维修计划"
:
fileName
,
headers
,
datas
,
response
);
}
}
/**
/**
* 创建
* 创建
* @param query
* @param query
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanStandardPurchaseServiceImpl.java
View file @
98189e15
...
@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo;
...
@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo;
import
cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo
;
import
cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo
;
import
cn.wise.sc.cement.business.service.IPlanStandardPurchaseService
;
import
cn.wise.sc.cement.business.service.IPlanStandardPurchaseService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
...
@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -60,6 +64,46 @@ public class PlanStandardPurchaseServiceImpl extends ServiceImpl<PlanStandardPur
...
@@ -60,6 +64,46 @@ public class PlanStandardPurchaseServiceImpl extends ServiceImpl<PlanStandardPur
return
BaseResponse
.
okData
(
pages
);
return
BaseResponse
.
okData
(
pages
);
}
}
/**
* 标样采购计划导出
* @param name
* @param fileName
* @param response
*/
@Override
public
void
export
(
String
name
,
String
fileName
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"name"
,
name
);
List
<
Map
<
String
,
Object
>>
list
=
standardPurchaseMapper
.
exportList
(
params
);
if
(!
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
String
[]
headers
=
new
String
[
map
.
size
()];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"标物名称"
;
headers
[
2
]
=
"经销单位"
;
headers
[
3
]
=
"采购数量"
;
headers
[
4
]
=
"采购时间"
;
headers
[
5
]
=
"采购人"
;
List
<
Object
[]>
datas
=
new
ArrayList
<>(
list
.
size
());
for
(
Map
<
String
,
Object
>
m
:
list
)
{
Object
[]
objects
=
new
Object
[
headers
.
length
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
=
m
.
get
(
headers
[
j
]).
toString
();
if
(
j
==
0
){
obj
=
obj
.
split
(
"\\."
)[
0
];
}
objects
[
j
]
=
obj
;
}
datas
.
add
(
objects
);
}
ExcelUtil
.
excelExport
(
fileName
==
null
||
fileName
.
trim
().
length
()
<=
0
?
"标样采购计划"
:
fileName
,
headers
,
datas
,
response
);
}
}
/**
/**
* 创建
* 创建
* @param query
* @param query
...
...
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