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
db4af367
Commit
db4af367
authored
Jul 22, 2022
by
Tkunkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出功能修改
parent
f8a4f138
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
122 additions
and
119 deletions
+122
-119
Equipment.java
...java/com/yeejoin/equipmanage/common/entity/Equipment.java
+0
-17
EquipmentDetail.java
...om/yeejoin/equipmanage/common/entity/EquipmentDetail.java
+22
-15
EquipmentParams.java
...om/yeejoin/equipmanage/common/entity/EquipmentParams.java
+4
-0
EquipmentSpecific.java
.../yeejoin/equipmanage/common/entity/EquipmentSpecific.java
+8
-7
EquipmentPar.java
.../java/com/yeejoin/equipmanage/common/vo/EquipmentPar.java
+6
-20
EquipmentController.java
...m/yeejoin/equipmanage/controller/EquipmentController.java
+50
-47
EquipmentDetailMapper.java
...com/yeejoin/equipmanage/mapper/EquipmentDetailMapper.java
+1
-1
IEquipmentDetailService.java
.../yeejoin/equipmanage/service/IEquipmentDetailService.java
+2
-2
EquipmentDetailServiceImpl.java
.../equipmanage/service/impl/EquipmentDetailServiceImpl.java
+1
-1
EquipmentDetailMapper.xml
...equip/src/main/resources/mapper/EquipmentDetailMapper.xml
+28
-9
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/Equipment.java
View file @
db4af367
...
@@ -30,31 +30,25 @@ public class Equipment extends BaseEntity {
...
@@ -30,31 +30,25 @@ public class Equipment extends BaseEntity {
@ApiModelProperty
(
value
=
"装备名称"
)
@ApiModelProperty
(
value
=
"装备名称"
)
@TableField
(
"name"
)
@TableField
(
"name"
)
@Excel
(
name
=
"装备名称"
,
width
=
20
,
orderNum
=
"1"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"装备编码"
)
@ApiModelProperty
(
value
=
"装备编码"
)
@TableField
(
"code"
)
@TableField
(
"code"
)
@Excel
(
name
=
"装备编码"
,
width
=
20
,
orderNum
=
"2"
)
private
String
code
;
private
String
code
;
@ApiModelProperty
(
value
=
"装备分类id"
)
@ApiModelProperty
(
value
=
"装备分类id"
)
@TableField
(
"category_id"
)
@TableField
(
"category_id"
)
@Excel
(
name
=
"装备分类id"
,
width
=
20
,
orderNum
=
"3"
)
private
Long
categoryId
;
private
Long
categoryId
;
@ApiModelProperty
(
value
=
"装备型号"
)
@ApiModelProperty
(
value
=
"装备型号"
)
@Excel
(
name
=
"装备型号"
,
width
=
20
,
orderNum
=
"4"
)
@TableField
(
"country"
)
@TableField
(
"country"
)
private
String
country
;
private
String
country
;
@ApiModelProperty
(
value
=
"存放位置"
)
@ApiModelProperty
(
value
=
"存放位置"
)
@Excel
(
name
=
"存放位置"
,
width
=
20
,
orderNum
=
"5"
)
@TableField
(
"area"
)
@TableField
(
"area"
)
private
String
area
;
private
String
area
;
@ApiModelProperty
(
value
=
"生产厂家"
)
@ApiModelProperty
(
value
=
"生产厂家"
)
@Excel
(
name
=
"生产厂家"
,
width
=
20
,
orderNum
=
"6"
)
@TableField
(
"made_in"
)
@TableField
(
"made_in"
)
private
String
madeIn
;
private
String
madeIn
;
...
@@ -62,37 +56,28 @@ public class Equipment extends BaseEntity {
...
@@ -62,37 +56,28 @@ public class Equipment extends BaseEntity {
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@TableField
(
"open_time"
)
@TableField
(
"open_time"
)
@ApiModelProperty
(
value
=
"出厂时间"
)
@ApiModelProperty
(
value
=
"出厂时间"
)
@Excel
(
name
=
"出厂时间"
,
width
=
20
,
orderNum
=
"7"
)
private
Date
openTime
;
private
Date
openTime
;
@ApiModelProperty
(
value
=
"工作时间"
)
@ApiModelProperty
(
value
=
"工作时间"
)
@Excel
(
name
=
"工作时间"
,
width
=
20
,
orderNum
=
"8"
)
@TableField
(
"remark"
)
@TableField
(
"remark"
)
private
String
remark
;
private
String
remark
;
@ApiModelProperty
(
value
=
"所属单位"
)
@ApiModelProperty
(
value
=
"所属单位"
)
@TableField
(
"company_name"
)
@TableField
(
"company_name"
)
@Excel
(
name
=
"所属单位"
,
width
=
20
,
orderNum
=
"9"
)
private
String
companyName
;
private
String
companyName
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@TableField
(
"join_time"
)
@TableField
(
"join_time"
)
@ApiModelProperty
(
value
=
"入库时间"
)
@ApiModelProperty
(
value
=
"入库时间"
)
@Excel
(
name
=
"入库时间"
,
width
=
20
,
orderNum
=
"10"
)
private
Date
joinTime
;
private
Date
joinTime
;
@ApiModelProperty
(
value
=
"保养周期"
)
@ApiModelProperty
(
value
=
"保养周期"
)
private
Short
maintenanceCycle
;
private
Short
maintenanceCycle
;
@ApiModelProperty
(
value
=
"检查周期(天)"
)
@ApiModelProperty
(
value
=
"检查周期(天)"
)
private
Short
checkCycle
;
private
Short
checkCycle
;
@ApiModelProperty
(
value
=
"管理方式 单件还是批量管理模式,单件S,批量:P"
)
@ApiModelProperty
(
value
=
"管理方式 单件还是批量管理模式,单件S,批量:P"
)
private
Long
managementStyle
;
private
Long
managementStyle
;
...
@@ -109,8 +94,6 @@ public class Equipment extends BaseEntity {
...
@@ -109,8 +94,6 @@ public class Equipment extends BaseEntity {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
Unit
unit
;
private
Unit
unit
;
@ApiModelProperty
(
value
=
"生产厂家"
)
@ApiModelProperty
(
value
=
"生产厂家"
)
private
String
manufacturer
;
private
String
manufacturer
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentDetail.java
View file @
db4af367
...
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
...
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
@@ -16,7 +17,7 @@ import lombok.EqualsAndHashCode;
...
@@ -16,7 +17,7 @@ import lombok.EqualsAndHashCode;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
/**
/**
*
*
*
*
* @author wujiang
* @author wujiang
* @date 2020-07-07
* @date 2020-07-07
...
@@ -32,48 +33,57 @@ public class EquipmentDetail extends BaseEntity {
...
@@ -32,48 +33,57 @@ public class EquipmentDetail extends BaseEntity {
@TableField
(
"name"
)
@TableField
(
"name"
)
@ApiModelProperty
(
value
=
"名称"
)
@ApiModelProperty
(
value
=
"名称"
)
@Excel
(
name
=
"名称"
,
orderNum
=
"1"
)
private
String
name
;
private
String
name
;
@TableField
(
"code"
)
@TableField
(
"code"
)
@ApiModelProperty
(
value
=
"编码"
)
@ApiModelProperty
(
value
=
"编码"
)
@Excel
(
name
=
"编码"
,
orderNum
=
"2"
)
private
String
code
;
private
String
code
;
@TableField
(
"remark"
)
@TableField
(
"remark"
)
@ApiModelProperty
(
value
=
"生产厂家"
)
@ApiModelProperty
(
value
=
"生产厂家"
)
@Excel
(
name
=
"生产厂家"
,
orderNum
=
"3"
)
private
String
remark
;
private
String
remark
;
@TableField
(
"manufacturer_id"
)
@TableField
(
"manufacturer_id"
)
@ApiModelProperty
(
value
=
"所属分系统id"
)
@ApiModelProperty
(
value
=
"所属分系统id"
)
@Excel
(
name
=
"所属分系统id"
,
orderNum
=
"4"
)
private
Long
manufacturerId
;
private
Long
manufacturerId
;
@TableField
(
"maintenance_cycle"
)
@TableField
(
"maintenance_cycle"
)
@ApiModelProperty
(
value
=
"工作时间"
)
@ApiModelProperty
(
value
=
"工作时间"
)
//@Excel(name = "工作时间", orderNum = "5")
private
BigDecimal
maintenanceCycle
;
private
BigDecimal
maintenanceCycle
;
@TableField
(
"standard"
)
@TableField
(
"standard"
)
@ApiModelProperty
(
value
=
"部件型号"
)
@ApiModelProperty
(
value
=
"部件型号"
)
@Excel
(
name
=
"部件型号"
,
orderNum
=
"6"
)
private
String
standard
;
private
String
standard
;
@TableField
(
"brand"
)
@TableField
(
"brand"
)
@ApiModelProperty
(
value
=
"所属单位"
)
@ApiModelProperty
(
value
=
"所属单位"
)
@Excel
(
name
=
"所属单位"
,
orderNum
=
"7"
)
private
String
brand
;
private
String
brand
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@TableField
(
"production_date"
)
@TableField
(
"production_date"
)
@ApiModelProperty
(
value
=
"出厂日期"
)
@ApiModelProperty
(
value
=
"出厂日期"
)
//@Excel(name = "出厂日期", orderNum = "8")
private
Date
productionDate
;
private
Date
productionDate
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@TableField
(
"update_date"
)
@TableField
(
"update_date"
)
@ApiModelProperty
(
value
=
"入库时间"
)
@ApiModelProperty
(
value
=
"入库时间"
)
// @Excel(name = "入库时间", orderNum = "9")
private
Date
updateDate
;
private
Date
updateDate
;
@TableField
(
"area"
)
@TableField
(
"area"
)
@ApiModelProperty
(
value
=
"存放位置"
)
@ApiModelProperty
(
value
=
"存放位置"
)
@Excel
(
name
=
"存放位置"
,
orderNum
=
"10"
)
private
String
area
;
private
String
area
;
@TableField
(
"agent"
)
@TableField
(
"agent"
)
@ApiModelProperty
(
value
=
"代理商"
)
@ApiModelProperty
(
value
=
"代理商"
)
private
String
agent
;
private
String
agent
;
...
@@ -96,12 +106,17 @@ public class EquipmentDetail extends BaseEntity {
...
@@ -96,12 +106,17 @@ public class EquipmentDetail extends BaseEntity {
private
String
categoryName
;
private
String
categoryName
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
manufacturerName
;
@TableField
(
exist
=
false
)
private
ManufacturerInfo
manufacturerInfo
;
private
ManufacturerInfo
manufacturerInfo
;
@TableField
(
"contract_code"
)
@TableField
(
"contract_code"
)
@ApiModelProperty
(
value
=
"合同编号"
)
@ApiModelProperty
(
value
=
"合同编号"
)
private
String
contractCode
;
private
String
contractCode
;
@TableField
(
"perf_quota_str"
)
@TableField
(
"perf_quota_str"
)
@ApiModelProperty
(
value
=
"核心参数"
)
@ApiModelProperty
(
value
=
"核心参数"
)
private
String
perfQuotaStr
;
private
String
perfQuotaStr
;
...
@@ -125,16 +140,16 @@ public class EquipmentDetail extends BaseEntity {
...
@@ -125,16 +140,16 @@ public class EquipmentDetail extends BaseEntity {
@TableField
(
"supplier_id"
)
@TableField
(
"supplier_id"
)
@ApiModelProperty
(
value
=
"供应商id"
)
@ApiModelProperty
(
value
=
"供应商id"
)
private
String
supplierId
;
private
String
supplierId
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
UploadFile
>
img
;
private
List
<
UploadFile
>
img
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
UploadFile
>
video
;
private
List
<
UploadFile
>
video
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
UploadFile
>
certification
;
private
List
<
UploadFile
>
certification
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
UploadFile
>
instruction
;
private
List
<
UploadFile
>
instruction
;
...
@@ -156,19 +171,11 @@ public class EquipmentDetail extends BaseEntity {
...
@@ -156,19 +171,11 @@ public class EquipmentDetail extends BaseEntity {
@TableField
(
"department_name"
)
@TableField
(
"department_name"
)
@ApiModelProperty
(
value
=
"部门名"
)
@ApiModelProperty
(
value
=
"部门名"
)
private
String
departmentName
;
private
String
departmentName
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
countryName
;
private
String
countryName
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
unitName
;
private
String
unitName
;
@TableField
(
exist
=
false
)
private
String
manufacturerName
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentParams.java
View file @
db4af367
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
*/
*/
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
;
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
...
@@ -25,14 +26,17 @@ public class EquipmentParams extends BaseEntity {
...
@@ -25,14 +26,17 @@ public class EquipmentParams extends BaseEntity {
@TableField
(
"status"
)
@TableField
(
"status"
)
@ApiModelProperty
(
value
=
"状态"
)
@ApiModelProperty
(
value
=
"状态"
)
@Excel
(
name
=
"状态"
,
orderNum
=
"11"
)
private
int
status
;
private
int
status
;
@TableField
(
"reason"
)
@TableField
(
"reason"
)
@ApiModelProperty
(
value
=
"原因分析"
)
@ApiModelProperty
(
value
=
"原因分析"
)
@Excel
(
name
=
"原因分析"
,
orderNum
=
"12"
)
private
String
reason
;
private
String
reason
;
@TableField
(
"measure"
)
@TableField
(
"measure"
)
@ApiModelProperty
(
value
=
"处置措施"
)
@ApiModelProperty
(
value
=
"处置措施"
)
@Excel
(
name
=
"处置措施"
,
orderNum
=
"13"
)
private
String
measure
;
private
String
measure
;
@TableField
(
"code"
)
@TableField
(
"code"
)
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecific.java
View file @
db4af367
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.common.entity;
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.common.entity;
import
java.util.Date
;
import
java.util.Date
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
...
@@ -59,7 +60,7 @@ public class EquipmentSpecific extends BaseEntity {
...
@@ -59,7 +60,7 @@ public class EquipmentSpecific extends BaseEntity {
@ApiModelProperty
(
value
=
"所属单位id(来源于平台)"
)
@ApiModelProperty
(
value
=
"所属单位id(来源于平台)"
)
@TableField
(
"agency_id"
)
@TableField
(
"agency_id"
)
private
String
agencyId
;
private
String
agencyId
;
@ApiModelProperty
(
value
=
"所属单位名称(来源于平台)"
)
@ApiModelProperty
(
value
=
"所属单位名称(来源于平台)"
)
@TableField
(
"agency_name"
)
@TableField
(
"agency_name"
)
private
String
agencyName
;
private
String
agencyName
;
...
@@ -71,23 +72,23 @@ public class EquipmentSpecific extends BaseEntity {
...
@@ -71,23 +72,23 @@ public class EquipmentSpecific extends BaseEntity {
@ApiModelProperty
(
value
=
"队伍名称(冗余字段来源于平台)"
)
@ApiModelProperty
(
value
=
"队伍名称(冗余字段来源于平台)"
)
@TableField
(
"team_name"
)
@TableField
(
"team_name"
)
private
String
teamName
;
private
String
teamName
;
@ApiModelProperty
(
value
=
"实时指标名称"
)
@ApiModelProperty
(
value
=
"实时指标名称"
)
@TableField
(
"realtime_iot_index_name"
)
@TableField
(
"realtime_iot_index_name"
)
private
String
realtimeIotIndexName
;
private
String
realtimeIotIndexName
;
@ApiModelProperty
(
value
=
"实时指标编码"
)
@ApiModelProperty
(
value
=
"实时指标编码"
)
@TableField
(
"realtime_iot_index_key"
)
@TableField
(
"realtime_iot_index_key"
)
private
String
realtimeIotIndexKey
;
private
String
realtimeIotIndexKey
;
@ApiModelProperty
(
value
=
"实时指标值"
)
@ApiModelProperty
(
value
=
"实时指标值"
)
@TableField
(
"realtime_iot_index_value"
)
@TableField
(
"realtime_iot_index_value"
)
private
String
realtimeIotIndexValue
;
private
String
realtimeIotIndexValue
;
@ApiModelProperty
(
value
=
"实时指标id(wl_equipment_specific_index_id)"
)
@ApiModelProperty
(
value
=
"实时指标id(wl_equipment_specific_index_id)"
)
@TableField
(
"realtime_iot_es_index_id"
)
@TableField
(
"realtime_iot_es_index_id"
)
private
Long
realtimeIotEsIndexId
;
private
Long
realtimeIotEsIndexId
;
@ApiModelProperty
(
value
=
"指标id(wl_equipment_index_id)"
)
@ApiModelProperty
(
value
=
"指标id(wl_equipment_index_id)"
)
@TableField
(
"realtime_iot_index_id"
)
@TableField
(
"realtime_iot_index_id"
)
private
Long
realtimeIotIndexId
;
private
Long
realtimeIotIndexId
;
...
@@ -95,7 +96,7 @@ public class EquipmentSpecific extends BaseEntity {
...
@@ -95,7 +96,7 @@ public class EquipmentSpecific extends BaseEntity {
@ApiModelProperty
(
value
=
"实时指标更新时间"
)
@ApiModelProperty
(
value
=
"实时指标更新时间"
)
@TableField
(
"realtime_iot_index_update_date"
)
@TableField
(
"realtime_iot_index_update_date"
)
private
Date
realtimeIotIndexUpdateDate
;
private
Date
realtimeIotIndexUpdateDate
;
@ApiModelProperty
(
value
=
"完整二维码"
)
@ApiModelProperty
(
value
=
"完整二维码"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
fullqrCode
;
private
String
fullqrCode
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/vo/EquipmentPar.java
View file @
db4af367
...
@@ -5,33 +5,19 @@
...
@@ -5,33 +5,19 @@
*/
*/
package
com
.
yeejoin
.
equipmanage
.
common
.
vo
;
package
com
.
yeejoin
.
equipmanage
.
common
.
vo
;
import
cn.afterturn.easypoi.excel.annotation.ExcelEntity
;
import
com.yeejoin.equipmanage.common.entity.Equipment
;
import
com.yeejoin.equipmanage.common.entity.Equipment
;
import
com.yeejoin.equipmanage.common.entity.EquipmentDetail
;
import
com.yeejoin.equipmanage.common.entity.EquipmentDetail
;
import
com.yeejoin.equipmanage.common.entity.EquipmentParams
;
import
com.yeejoin.equipmanage.common.entity.EquipmentParams
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecific
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecific
;
import
lombok.Data
;
@Data
public
class
EquipmentPar
{
public
class
EquipmentPar
{
@ExcelEntity
private
EquipmentParams
equipmentParams
;
private
EquipmentDetail
equipmentDetail
;
private
EquipmentDetail
equipmentDetail
;
@ExcelEntity
public
EquipmentParams
getEquipmentParams
()
{
private
EquipmentParams
equipmentParams
;
return
equipmentParams
;
}
public
void
setEquipmentParams
(
EquipmentParams
equipmentParams
)
{
this
.
equipmentParams
=
equipmentParams
;
}
public
EquipmentDetail
getEquipmentDetail
()
{
return
equipmentDetail
;
}
public
void
setEquipmentDetail
(
EquipmentDetail
equipmentDetail
)
{
this
.
equipmentDetail
=
equipmentDetail
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentController.java
View file @
db4af367
...
@@ -35,6 +35,7 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -35,6 +35,7 @@ import org.springframework.web.multipart.MultipartFile;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
ucar.ma2.ArrayLong
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -42,7 +43,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -42,7 +43,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.util.*
;
import
java.util.*
;
/**
/**
*
*
*
*
* @author wujiang
* @author wujiang
* @date 2020-07-07
* @date 2020-07-07
...
@@ -62,9 +63,6 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -62,9 +63,6 @@ public class EquipmentController extends AbstractBaseController {
private
EquipmentMapper
equipmentMapper
;
private
EquipmentMapper
equipmentMapper
;
@Autowired
@Autowired
private
EquipmentDetailMapper
equipmentDetailMapper
;
private
EquipmentDetailMapper
equipmentDetailMapper
;
@Autowired
private
EquipmentServiceImpl
equipmentService
;
@Autowired
@Autowired
private
CarMapper
carMapper
;
private
CarMapper
carMapper
;
@Autowired
@Autowired
...
@@ -82,7 +80,7 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -82,7 +80,7 @@ public class EquipmentController extends AbstractBaseController {
/**
/**
* 新增
* 新增
*
*
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json;charset=UTF-8"
)
...
@@ -115,7 +113,7 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -115,7 +113,7 @@ public class EquipmentController extends AbstractBaseController {
/**
/**
* 根据id删除
* 根据id删除
*
*
* @param ids
* @param ids
* @return
* @return
*/
*/
...
@@ -143,7 +141,7 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -143,7 +141,7 @@ public class EquipmentController extends AbstractBaseController {
/**
/**
* 修改
* 修改
*
*
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
,
produces
=
"application/json;charset=UTF-8"
)
...
@@ -156,7 +154,7 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -156,7 +154,7 @@ public class EquipmentController extends AbstractBaseController {
/**
/**
* 根据id查询
* 根据id查询
*
*
* @param id
* @param id
* @return
* @return
*/
*/
...
@@ -177,7 +175,7 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -177,7 +175,7 @@ public class EquipmentController extends AbstractBaseController {
/**
/**
* 列表分页查询
* 列表分页查询
*
*
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
...
@@ -195,7 +193,7 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -195,7 +193,7 @@ public class EquipmentController extends AbstractBaseController {
/**
/**
* 获取装备新能参数列表
* 获取装备新能参数列表
*
*
*/
*/
@RequestMapping
(
value
=
"/queryPerfQuotaListByEquipId"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/queryPerfQuotaListByEquipId"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -212,7 +210,7 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -212,7 +210,7 @@ public class EquipmentController extends AbstractBaseController {
/**
/**
* 编辑指标项
* 编辑指标项
*
*
*/
*/
@RequestMapping
(
value
=
"/performanceindexTemp"
,
method
=
RequestMethod
.
PUT
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/performanceindexTemp"
,
method
=
RequestMethod
.
PUT
,
produces
=
"application/json;charset=UTF-8"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -361,9 +359,9 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -361,9 +359,9 @@ public class EquipmentController extends AbstractBaseController {
}
}
/**
/**
*
*
* 导入数据接口
* 导入数据接口
*
*
**/
**/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"excel上传(<font color='blue'>release</font>)"
,
notes
=
"上传excel同步数据库"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"excel上传(<font color='blue'>release</font>)"
,
notes
=
"上传excel同步数据库"
)
...
@@ -399,8 +397,8 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -399,8 +397,8 @@ public class EquipmentController extends AbstractBaseController {
}
}
/*
/*
*
*
*
*
* 装备分类树
* 装备分类树
**/
**/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -485,7 +483,7 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -485,7 +483,7 @@ public class EquipmentController extends AbstractBaseController {
/**
/**
* 获取子节点
* 获取子节点
*
*
* @param list
* @param list
* @param tmpMap
* @param tmpMap
*/
*/
...
@@ -571,10 +569,10 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -571,10 +569,10 @@ public class EquipmentController extends AbstractBaseController {
}
}
/**
/**
*
*
*
*
* 获取子节点
* 获取子节点
*
*
**/
**/
private
List
<
CalculateUnitResponse
>
getUnitChildren
(
List
<
CalculateUnitResponse
>
list
,
String
id
)
{
private
List
<
CalculateUnitResponse
>
getUnitChildren
(
List
<
CalculateUnitResponse
>
list
,
String
id
)
{
List
<
CalculateUnitResponse
>
temp
=
new
ArrayList
<>();
List
<
CalculateUnitResponse
>
temp
=
new
ArrayList
<>();
...
@@ -594,9 +592,9 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -594,9 +592,9 @@ public class EquipmentController extends AbstractBaseController {
}
}
/***
/***
*
*
* 返回结果封装
* 返回结果封装
*
*
**/
**/
public
CalculateUnitResponse
createCalculateUnitResponse
(
Unit
instance
)
{
public
CalculateUnitResponse
createCalculateUnitResponse
(
Unit
instance
)
{
...
@@ -627,7 +625,7 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -627,7 +625,7 @@ public class EquipmentController extends AbstractBaseController {
/**
/**
* 分类查询
* 分类查询
*
*
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"/list/{categoryId}"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/list/{categoryId}"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
...
@@ -710,34 +708,39 @@ public class EquipmentController extends AbstractBaseController {
...
@@ -710,34 +708,39 @@ public class EquipmentController extends AbstractBaseController {
* 导出隐患清单
* 导出隐患清单
*/
*/
/**
* @ApiParam(value = "导出装备的数据") @RequestBody(required = false) List<EquipmentDate> equipmentDate,
* @ApiParam(value = "是否全部导出" ) @RequestParam(required = false) boolean type,
*/
@ApiOperation
(
value
=
"导出装备清单"
,
notes
=
"导出装备清单"
)
@ApiOperation
(
value
=
"导出装备清单"
,
notes
=
"导出装备清单"
)
@
Ge
tMapping
(
value
=
"/export"
)
@
Pos
tMapping
(
value
=
"/export"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
public
void
exportDangerList
(
HttpServletResponse
response
)
{
public
void
exportDangerList
(
@ApiParam
(
value
=
"导出装备的数据"
)
@RequestBody
(
required
=
false
)
List
<
EquipmentPar
>
equipmentPars
,
/* AgencyUserModel user = getUserInfo();
@ApiParam
(
value
=
"是否全部导出"
)
@RequestParam
boolean
type
,
if (ObjectUtils.isEmpty(user)) {
HttpServletResponse
response
)
{
throw new RuntimeException("用户session过期");
}*/
// pageParam.setPageSize(Integer.MAX_VALUE);
// List<DangerListResponse> list = iLatentDangerService.export(pageParam);
/*List<TestEntity> testEntities = new ArrayList<>();
TestEntity testEntity = new TestEntity();
testEntity.setName("1111");
testEntity.setSex("222");
testEntities.add(testEntity);
TestEntity testEntity2 = new TestEntity();
testEntity2.setName("1111");
testEntity2.setSex("2222");
testEntities.add(testEntity2);*/
List
<
Equipment
>
list
=
equipmentService
.
list
();
String
fileName
=
"装备清单"
+
new
Date
().
getTime
();
String
fileName
=
"装备清单"
+
new
Date
().
getTime
();
FileHelper
.
exportExcel
(
list
,
"装备清单"
,
"装备清单"
,
Equipment
.
class
,
fileName
+
".xls"
,
response
);
if
(
type
==
true
){
//全部导出
List
<
EquipmentPar
>
equpar
=
equipmentDetailMapper
.
equpar
();
FileHelper
.
exportExcel
(
equpar
,
"装备清单"
,
"装备清单"
,
EquipmentPar
.
class
,
fileName
+
".xls"
,
response
);
}
else
{
//仅仅导出筛选结果的数据
FileHelper
.
exportExcel
(
equipmentPars
,
"装备清单"
,
"装备清单"
,
Equipment
.
class
,
fileName
+
".xls"
,
response
);
}
}
}
@ApiOperation
(
value
=
"测试"
,
notes
=
"测试"
)
@GetMapping
(
value
=
"/export1111"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
public
void
exportDangerList
(
HttpServletResponse
response
)
{
String
fileName
=
"装备清单"
+
new
Date
().
getTime
();
ArrayList
<
Test01
>
list
=
new
ArrayList
<>();
Test01
test01
=
new
Test01
();
Test02
test02
=
new
Test02
();
Test03
test03
=
new
Test03
();
test02
.
setName
(
"tjk"
);
test02
.
setAge
(
"100岁"
);
test03
.
setGread
(
"100"
);
test03
.
setHigh
(
"150cm"
);
test01
.
setTest02
(
test02
);
test01
.
setTest03
(
test03
);
list
.
add
(
test01
);
FileHelper
.
exportExcel
(
list
,
"装备清单"
,
"装备清单"
,
Test01
.
class
,
fileName
+
".xls"
,
response
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentDetailMapper.java
View file @
db4af367
...
@@ -31,7 +31,7 @@ public interface EquipmentDetailMapper extends BaseMapper<EquipmentDetail> {
...
@@ -31,7 +31,7 @@ public interface EquipmentDetailMapper extends BaseMapper<EquipmentDetail> {
int
countCategory
(
@Param
(
"offset"
)
long
offset
,
@Param
(
"size"
)
long
size
,
int
countCategory
(
@Param
(
"offset"
)
long
offset
,
@Param
(
"size"
)
long
size
,
@Param
(
"list"
)
List
<
EquipmentCategory
>
list
);
@Param
(
"list"
)
List
<
EquipmentCategory
>
list
);
EquipmentPar
equpar
();
List
<
EquipmentPar
>
equpar
();
int
quotaUpdate
(
EquProperty
e
);
int
quotaUpdate
(
EquProperty
e
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentDetailService.java
View file @
db4af367
...
@@ -27,7 +27,7 @@ public interface IEquipmentDetailService extends IService<EquipmentDetail> {
...
@@ -27,7 +27,7 @@ public interface IEquipmentDetailService extends IService<EquipmentDetail> {
boolean
removeOneById
(
long
id
);
boolean
removeOneById
(
long
id
);
Page
<
EquipmentDetail
>
page
(
Page
<
EquipmentDetail
>
pageBean
,
String
category
);
Page
<
EquipmentDetail
>
page
(
Page
<
EquipmentDetail
>
pageBean
,
String
category
);
boolean
removeBatchById
(
List
<
Long
>
idList
);
boolean
removeBatchById
(
List
<
Long
>
idList
);
boolean
quotaUpdate
(
List
<
EquProperty
>
e
);
boolean
quotaUpdate
(
List
<
EquProperty
>
e
);
...
@@ -35,5 +35,5 @@ public interface IEquipmentDetailService extends IService<EquipmentDetail> {
...
@@ -35,5 +35,5 @@ public interface IEquipmentDetailService extends IService<EquipmentDetail> {
String
checkDelete
(
List
<
Long
>
ids
);
String
checkDelete
(
List
<
Long
>
ids
);
EquipmentPar
getEqur
();
List
<
EquipmentPar
>
getEqur
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentDetailServiceImpl.java
View file @
db4af367
...
@@ -259,7 +259,7 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
...
@@ -259,7 +259,7 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
@Override
@Override
public
EquipmentPar
getEqur
()
{
public
List
<
EquipmentPar
>
getEqur
()
{
return
equipmentDetailMapper
.
equpar
();
return
equipmentDetailMapper
.
equpar
();
}
}
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentDetailMapper.xml
View file @
db4af367
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
<mapper
namespace=
"com.yeejoin.equipmanage.mapper.EquipmentDetailMapper"
>
namespace=
"com.yeejoin.equipmanage.mapper.EquipmentDetailMapper"
>
<resultMap
id=
"EquipmentDetailMap"
type=
"com.yeejoin.equipmanage.common.vo.EquipmentPar"
>
<association
property=
"equipmentDetail"
javaType=
"com.yeejoin.equipmanage.common.entity.EquipmentDetail"
>
<result
column=
"name"
property=
"name"
/>
<result
column=
"code"
property=
"code"
/>
<result
column=
"remark"
property=
"remark"
/>
<result
column=
"manufacturer_id"
property=
"manufacturerId"
/>
<result
column=
"supplier_id"
property=
"supplierId"
/>
<result
column=
"standard"
property=
"standard"
/>
<result
column=
"brand"
property=
"brand"
/>
<result
column=
"production_date"
property=
"productionDate"
/>
<result
column=
"update_date"
property=
"updateDate"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"area"
property=
"area"
/>
</association>
<association
property=
"equipmentParams"
javaType=
"com.yeejoin.equipmanage.common.entity.EquipmentParams"
>
<result
column=
"status"
property=
"status"
/>
<result
column=
"reason"
property=
"reason"
/>
<result
column=
"measure"
property=
"measure"
/>
</association>
</resultMap>
<select
id=
"page"
<select
id=
"page"
resultType=
"com.yeejoin.equipmanage.common.entity.EquipmentDetail"
>
resultType=
"com.yeejoin.equipmanage.common.entity.EquipmentDetail"
>
SELECT
SELECT
wed.id AS id,
wed.id AS id,
wec.name AS categoryName,
wec.name AS categoryName,
...
@@ -41,7 +60,7 @@
...
@@ -41,7 +60,7 @@
)
)
</if>
</if>
<if
<if
test=
"equip.manufacturerName != null and equip.manufacturerName != ''"
>
AND wmi.name LIKE CONCAT('%',#{equip.manufacturerName},'%' )
test=
"equip.manufacturerName != null and equip.manufacturerName != ''"
>
AND wmi.name LIKE CONCAT('%',#{equip.manufacturerName},'%' )
</if>
</if>
</if>
</if>
</where>
</where>
...
@@ -49,7 +68,7 @@
...
@@ -49,7 +68,7 @@
LIMIT #{offset},#{size}
LIMIT #{offset},#{size}
</select>
</select>
<select
id=
"equpar"
result
Type=
"com.yeejoin.equipmanage.common.vo.EquipmentPar
"
>
<select
id=
"equpar"
result
Map=
"EquipmentDetailMap
"
>
SELECT
SELECT
wled.name,
wled.name,
wled.code,
wled.code,
...
@@ -90,14 +109,14 @@
...
@@ -90,14 +109,14 @@
)
)
</if>
</if>
<if
<if
test=
"equip.manufacturerName != null and equip.manufacturerName != ''"
>
AND wmi.name LIKE CONCAT('%',#{equip.manufacturerName},'%' )
test=
"equip.manufacturerName != null and equip.manufacturerName != ''"
>
AND wmi.name LIKE CONCAT('%',#{equip.manufacturerName},'%' )
</if>
</if>
</if>
</if>
</where>
</where>
</select>
</select>
<select
id=
"pageCategory"
<select
id=
"pageCategory"
resultType=
"com.yeejoin.equipmanage.common.entity.EquipmentDetail"
>
resultType=
"com.yeejoin.equipmanage.common.entity.EquipmentDetail"
>
SELECT
SELECT
wed.id AS id,
wed.id AS id,
wec.name AS categoryName,
wec.name AS categoryName,
...
@@ -128,7 +147,7 @@
...
@@ -128,7 +147,7 @@
<if
test=
"list!=null"
>
<if
test=
"list!=null"
>
AND we.category_id IN
AND we.category_id IN
<foreach
item=
"item"
collection=
"list"
separator=
","
<foreach
item=
"item"
collection=
"list"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item.id}
open=
"("
close=
")"
index=
""
>
#{item.id}
</foreach>
</foreach>
</if>
</if>
</where>
</where>
...
@@ -154,7 +173,7 @@
...
@@ -154,7 +173,7 @@
<if
test=
"list!=null"
>
<if
test=
"list!=null"
>
AND we.category_id IN
AND we.category_id IN
<foreach
item=
"item"
collection=
"list"
separator=
","
<foreach
item=
"item"
collection=
"list"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item.id}
open=
"("
close=
")"
index=
""
>
#{item.id}
</foreach>
</foreach>
</if>
</if>
</where>
</where>
...
...
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