Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
f6357920
Commit
f6357920
authored
Oct 19, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_upgrade_huaian' into dev_upgrade_huaian
parents
ad0df265
62c66b9d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
7 deletions
+64
-7
EquipmentController.java
...oin/amos/fas/business/controller/EquipmentController.java
+17
-3
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+37
-0
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+10
-4
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EquipmentController.java
View file @
f6357920
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.List
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
com.yeejoin.amos.fas.business.util.ExcelUtils
;
import
com.yeejoin.amos.fas.business.util.ExcelUtils
;
import
com.yeejoin.amos.fas.core.util.*
;
import
com.yeejoin.amos.fas.core.util.*
;
...
@@ -139,6 +138,21 @@ public class EquipmentController extends BaseController {
...
@@ -139,6 +138,21 @@ public class EquipmentController extends BaseController {
return
CommonResponseUtil
.
success
(
list
);
return
CommonResponseUtil
.
success
(
list
);
}
}
/**
* 保护对象查询查询,不分页
* @return
*/
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"保护对象查询不分页"
,
notes
=
"保护对象查询不分页"
)
@RequestMapping
(
value
=
"/all-list-for-studio"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
queryImpEquipNoPageForStudio
()
{
List
<
Equipment
>
list
=
iEquipService
.
queryEquipNoPage
();
List
<
Equipment
>
result
=
Objects
.
isNull
(
list
)
?
Collections
.
emptyList
()
:
list
;
return
CommonResponseUtil2
.
success
(
result
);
}
/**
/**
* 绑定消防设备
* 绑定消防设备
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireSourceController.java
View file @
f6357920
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireCarService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireCarService
;
...
@@ -12,6 +14,8 @@ import com.yeejoin.amos.fas.core.common.request.CommonRequest;
...
@@ -12,6 +14,8 @@ import com.yeejoin.amos.fas.core.common.request.CommonRequest;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil2
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
...
@@ -23,8 +27,10 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -23,8 +27,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RestController
@RequestMapping
(
value
=
"/api/fireSource"
)
@RequestMapping
(
value
=
"/api/fireSource"
)
...
@@ -189,6 +195,37 @@ public class FireSourceController extends BaseController {
...
@@ -189,6 +195,37 @@ public class FireSourceController extends BaseController {
}
}
@Permission
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
@RequestMapping
(
value
=
"/data/history-for-studio"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
queryForFireEquipmentHistoryForStudio
(
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
fireEquipmentName
,
@ApiParam
(
value
=
"按保护对象名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipmentName
,
@ApiParam
(
value
=
"开始日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
startTime
,
@ApiParam
(
value
=
"结束日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
endTime
,
@ApiParam
(
value
=
"当前页码"
,
required
=
false
)
@RequestParam
(
required
=
true
)
int
pageNumber
,
@ApiParam
(
value
=
"每页大小"
,
required
=
false
)
@RequestParam
(
required
=
true
)
int
pageSize
)
{
if
(
pageNumber
>=
1
)
{
--
pageNumber
;
}
Page
page
;
try
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
page
=
iFireEquipService
.
queryForFireEquipmentHistory
(
StringUtils
.
trimToNull
(
fireEquipmentName
),
StringUtils
.
trimToNull
(
equipmentName
),
StringUtils
.
trimToNull
(
startTime
),
StringUtils
.
trimToNull
(
endTime
),
commonPageable
);
}
catch
(
Exception
e
)
{
return
CommonResponseUtil2
.
failure
(
e
.
getMessage
());
}
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
Object
>
objectPage
=
new
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<>();
objectPage
.
setCurrent
(
page
.
getNumber
());
objectPage
.
setRecords
(
page
.
getContent
());
objectPage
.
setTotal
(
page
.
getTotalElements
());
objectPage
.
setPages
(
page
.
getTotalPages
());
return
CommonResponseUtil2
.
success
(
objectPage
);
}
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备列表"
,
notes
=
"查询消防设备列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备列表"
,
notes
=
"查询消防设备列表"
)
@RequestMapping
(
value
=
"/info/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/info/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEquipmentList
(
public
CommonResponse
queryForEquipmentList
(
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
f6357920
...
@@ -144,8 +144,11 @@
...
@@ -144,8 +144,11 @@
<if
test=
"equipmentName!=null"
>
<if
test=
"equipmentName!=null"
>
AND d.equipmentName LIKE '%${equipmentName}%'
AND d.equipmentName LIKE '%${equipmentName}%'
</if>
</if>
<if
test=
"startTime!=null"
>
<if
test=
"startTime != null and startTime != ''"
>
AND d.update_date BETWEEN '${startTime}' AND '${endTime}'
AND d.update_date
>
= #{startTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
AND d.update_date
<
= #{endTime}
</if>
</if>
</where>
</where>
</select>
</select>
...
@@ -196,8 +199,11 @@
...
@@ -196,8 +199,11 @@
<if
test=
"equipmentName!=null"
>
<if
test=
"equipmentName!=null"
>
AND d.equipmentName LIKE '%${equipmentName}%'
AND d.equipmentName LIKE '%${equipmentName}%'
</if>
</if>
<if
test=
"startTime!=null"
>
<if
test=
"startTime != null and startTime != ''"
>
AND d.create_date BETWEEN '${startTime}' AND '${endTime}'
AND d.create_date
>
= #{startTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
AND d.create_date
<
= #{endTime}
</if>
</if>
</where>
</where>
ORDER BY d.create_date desc
ORDER BY d.create_date desc
...
...
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