Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
82fb5771
Commit
82fb5771
authored
Sep 13, 2022
by
wufeifan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了故障管理导出功能
parent
aa9868dc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
14 deletions
+49
-14
EquipmentFaultVO.java
...eejoin/equipmanage/common/entity/vo/EquipmentFaultVO.java
+2
-1
EquipmentFaultController.java
...join/equipmanage/controller/EquipmentFaultController.java
+37
-9
EquipmentFaultMapper.java
.../com/yeejoin/equipmanage/mapper/EquipmentFaultMapper.java
+1
-1
IEquipmentFaultService.java
...m/yeejoin/equipmanage/service/IEquipmentFaultService.java
+1
-1
EquipmentFaultServiceImpl.java
...n/equipmanage/service/impl/EquipmentFaultServiceImpl.java
+2
-2
EquipmentFaultMapper.xml
...-equip/src/main/resources/mapper/EquipmentFaultMapper.xml
+6
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/EquipmentFaultVO.java
View file @
82fb5771
...
@@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.annotation.Excel;
...
@@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.annotation.Excel;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -11,7 +12,7 @@ import java.util.Date;
...
@@ -11,7 +12,7 @@ import java.util.Date;
* 接受故障管理查询结果
* 接受故障管理查询结果
*/
*/
@Data
@Data
public
class
EquipmentFaultVO
{
public
class
EquipmentFaultVO
implements
Serializable
{
@ApiModelProperty
(
value
=
"id"
)
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
private
Long
id
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentFaultController.java
View file @
82fb5771
...
@@ -50,19 +50,47 @@ public class EquipmentFaultController {
...
@@ -50,19 +50,47 @@ public class EquipmentFaultController {
return
psge
;
return
psge
;
}
}
// @ApiOperation(value = "导出故障清单", notes = "导出故障清单", produces = "application/octet-stream")
// @PostMapping(value = "/export",produces = "application/json;charset=UTF-8")
// @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
// public void exportDangerList(@RequestBody List<EquipmentFaultVO> equipmentFaultVO, @RequestParam Integer prop, HttpServletResponse response) {
// SimpleDateFormat formatter= new SimpleDateFormat("yyyyMMdd");
// String format = formatter.format(new Date());
// if(prop==1){//全部导出
// equipmentFaultVO = iEquipmentFaultService.getAll();
// FileHelper.exportExcel(equipmentFaultVO, "故障清单", "故障清单", EquipmentFaultVO.class, format + ".xls", response);
// }
// else {//仅仅导出筛选结果的数据
// FileHelper.exportExcel(equipmentFaultVO, "故障清单", "故障清单", EquipmentFaultVO.class, format + ".xls", response);
// }
// }
// @ApiOperation(value = "导出故障清单", notes = "导出故障清单", produces = "application/octet-stream")
// @PostMapping(value = "/exportData")
// @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
// public void exportDangerList(@RequestParam Integer prop, HttpServletResponse response) {
// SimpleDateFormat formatter= new SimpleDateFormat("yyyyMMdd");
// String format = formatter.format(new Date());
// List<EquipmentFaultVO> equipmentFaultVO = iEquipmentFaultService.getAll();
// if(prop==1){//全部导出
// FileHelper.exportExcel(equipmentFaultVO, "故障清单", "故障清单", EquipmentFaultVO.class, format + ".xls", response);
// }
// else {//仅仅导出筛选结果的数据
// FileHelper.exportExcel(equipmentFaultVO, "故障清单", "故障清单", EquipmentFaultVO.class, format + ".xls", response);
// }
// }
@ApiOperation
(
value
=
"导出故障清单"
,
notes
=
"导出故障清单"
,
produces
=
"application/octet-stream"
)
@ApiOperation
(
value
=
"导出故障清单"
,
notes
=
"导出故障清单"
,
produces
=
"application/octet-stream"
)
@PostMapping
(
value
=
"/export
"
,
produces
=
"application/json;charset=UTF-8
"
)
@PostMapping
(
value
=
"/export
Data
"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
public
void
exportDangerList
(
@RequestBody
List
<
EquipmentFaultVO
>
equipmentFaultVO
,
@RequestParam
Integer
prop
,
HttpServletResponse
response
)
{
public
void
exportDangerList
(
@RequestParam
(
required
=
false
)
String
code
,
@RequestParam
(
required
=
false
)
String
eqCode
,
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
faultOccurTime
,
HttpServletResponse
response
)
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
String
format
=
formatter
.
format
(
new
Date
());
String
format
=
formatter
.
format
(
new
Date
());
if
(
prop
==
1
){
//全部导出
List
<
EquipmentFaultVO
>
equipmentFaultVO
=
iEquipmentFaultService
.
getAll
(
code
,
eqCode
,
name
,
faultOccurTime
);
equipmentFaultVO
=
iEquipmentFaultService
.
getAll
();
FileHelper
.
exportExcel
(
equipmentFaultVO
,
"故障清单"
,
"故障清单"
,
EquipmentFaultVO
.
class
,
format
+
".xls"
,
response
);
FileHelper
.
exportExcel
(
equipmentFaultVO
,
"故障清单"
,
"故障清单"
,
EquipmentFaultVO
.
class
,
format
+
".xls"
,
response
);
}
else
{
//仅仅导出筛选结果的数据
FileHelper
.
exportExcel
(
equipmentFaultVO
,
"故障清单"
,
"故障清单"
,
EquipmentFaultVO
.
class
,
format
+
".xls"
,
response
);
}
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentFaultMapper.java
View file @
82fb5771
...
@@ -21,6 +21,6 @@ public interface EquipmentFaultMapper extends BaseMapper<EquipmentDetail> {
...
@@ -21,6 +21,6 @@ public interface EquipmentFaultMapper extends BaseMapper<EquipmentDetail> {
int
selectEquipmentFaultListcount
(
@Param
(
"code"
)
String
code
,
@Param
(
"eqCode"
)
String
eqCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"faultOccurTime"
)
String
faultOccurTime
);
int
selectEquipmentFaultListcount
(
@Param
(
"code"
)
String
code
,
@Param
(
"eqCode"
)
String
eqCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"faultOccurTime"
)
String
faultOccurTime
);
List
<
EquipmentFaultVO
>
getAll
();
List
<
EquipmentFaultVO
>
getAll
(
@Param
(
"code"
)
String
code
,
@Param
(
"eqCode"
)
String
eqCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"faultOccurTime"
)
String
faultOccurTime
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentFaultService.java
View file @
82fb5771
...
@@ -14,5 +14,5 @@ public interface IEquipmentFaultService {
...
@@ -14,5 +14,5 @@ public interface IEquipmentFaultService {
int
selectEquipmentFaultListCount
(
String
code
,
String
eqCode
,
String
name
,
String
faultOccurTime
);
int
selectEquipmentFaultListCount
(
String
code
,
String
eqCode
,
String
name
,
String
faultOccurTime
);
List
<
EquipmentFaultVO
>
getAll
();
List
<
EquipmentFaultVO
>
getAll
(
String
code
,
String
eqCode
,
String
name
,
String
faultOccurTime
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentFaultServiceImpl.java
View file @
82fb5771
...
@@ -48,8 +48,8 @@ public class EquipmentFaultServiceImpl implements IEquipmentFaultService {
...
@@ -48,8 +48,8 @@ public class EquipmentFaultServiceImpl implements IEquipmentFaultService {
}
}
@Override
@Override
public
List
<
EquipmentFaultVO
>
getAll
()
{
public
List
<
EquipmentFaultVO
>
getAll
(
String
code
,
String
eqCode
,
String
name
,
String
faultOccurTime
)
{
return
equipmentFaultMapper
.
getAll
();
return
equipmentFaultMapper
.
getAll
(
code
,
eqCode
,
name
,
faultOccurTime
);
}
}
}
}
amos-boot-system-equip/src/main/resources/mapper/EquipmentFaultMapper.xml
View file @
82fb5771
...
@@ -64,6 +64,12 @@
...
@@ -64,6 +64,12 @@
LEFT JOIN wl_equipment_specific wles ON wlep.detail_id = wles.iot_code
LEFT JOIN wl_equipment_specific wles ON wlep.detail_id = wles.iot_code
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment_category wlec ON wled.code = wlec.code
LEFT JOIN wl_equipment_category wlec ON wled.code = wlec.code
<where>
<if
test=
"code != null and code != ''"
>
AND wlec.code LIKE CONCAT(#{code},'%' )
</if>
<if
test=
"eqCode != null and eqCode != ''"
>
AND wled.eq_code LIKE CONCAT('%',#{eqCode},'%' )
</if>
<if
test=
"name != null and name != ''"
>
AND wled.name LIKE CONCAT('%',#{name},'%' )
</if>
<if
test=
"faultOccurTime != null and faultOccurTime != ''"
>
AND wlep.create_date LIKE CONCAT('%',#{faultOccurTime},'%' )
</if>
</where>
ORDER BY wlep.create_date DESC
ORDER BY wlep.create_date DESC
</select>
</select>
</mapper>
</mapper>
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