Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
rx
Commits
8e3facb1
Commit
8e3facb1
authored
Aug 23, 2024
by
wujipeng
Browse files
优化
parent
39d51189
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/ruzhoukj/rx/pojo/dto/EquipmentDTO.java
View file @
8e3facb1
package
com.ruzhoukj.rx.pojo.dto
;
import
com.ruzhoukj.rx.pojo.entity.EquipmentEntity
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
...
...
@@ -13,4 +15,6 @@ import lombok.EqualsAndHashCode;
@Data
public
class
EquipmentDTO
extends
EquipmentEntity
{
@ApiModelProperty
(
value
=
"设备名称或路名"
)
private
String
name
;
}
src/main/java/com/ruzhoukj/rx/pojo/entity/DeviceEntity.java
View file @
8e3facb1
package
com.ruzhoukj.rx.pojo.entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.mongodb.core.mapping.Document
;
...
...
@@ -17,11 +18,16 @@ import java.util.Date;
public
class
DeviceEntity
{
@Id
@ApiModelProperty
(
value
=
"主键id"
)
private
String
id
;
@ApiModelProperty
(
value
=
"设备id"
)
private
String
deviceId
;
@ApiModelProperty
(
value
=
"序列号"
)
private
String
serialnumber
;
@ApiModelProperty
(
value
=
"上报时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
timestamp
;
private
double
zu
;
private
double
zb
;
private
double
vj
;
...
...
@@ -29,12 +35,10 @@ public class DeviceEntity {
private
double
qa
;
private
double
pqa
;
private
double
ph
;
private
double
cod
;
private
double
tn
;
private
double
cond
;
private
double
tp
;
private
double
nqa
;
private
double
tss
;
private
double
pt
;
...
...
src/main/java/com/ruzhoukj/rx/pojo/entity/EquipmentEntity.java
View file @
8e3facb1
...
...
@@ -27,7 +27,7 @@ public class EquipmentEntity {
@ApiModelProperty
(
value
=
"污水厂id"
)
@TableField
(
"sewage_plant_id"
)
private
Integer
sewagePlantId
;
private
String
sewagePlantId
;
@ApiModelProperty
(
value
=
"设备名称"
)
@TableField
(
"device_name"
)
...
...
@@ -39,7 +39,7 @@ public class EquipmentEntity {
@ApiModelProperty
(
value
=
"序列号"
)
@TableField
(
"serial_number"
)
private
Integer
serialNumber
;
private
String
serialNumber
;
@ApiModelProperty
(
value
=
"经度"
)
@TableField
(
"longitude"
)
...
...
src/main/resources/com/ruzhoukj/rx/dao/EquipmentDao.xml
View file @
8e3facb1
...
...
@@ -37,11 +37,10 @@
from
equipment
<where>
<if
test=
"section != null and section != ''"
>
section like concat('%', #{section}, '%')
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
and device_name like concat('%', #{deviceName}, '%')
<if
test=
"name != null and name != ''"
>
section like concat('%', #{name}, '%')
or
device_name like concat('%', #{name}, '%')
</if>
</where>
</select>
...
...
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