Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
slm-bi
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
林锐标
slm-bi
Commits
a731a885
Commit
a731a885
authored
Mar 30, 2021
by
linruibiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整改接口
parent
15d8d356
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
144 additions
and
95 deletions
+144
-95
InstrumentPanelConfigController.java
...slm/slmbi/controller/InstrumentPanelConfigController.java
+28
-9
InstrumentPanelController.java
...m/syc/slm/slmbi/controller/InstrumentPanelController.java
+30
-30
InstrumentPanelGroupController.java
.../slm/slmbi/controller/InstrumentPanelGroupController.java
+29
-14
InstrumentPanelPermissionController.java
...slmbi/controller/InstrumentPanelPermissionController.java
+16
-16
PositionController.java
...java/com/syc/slm/slmbi/controller/PositionController.java
+2
-2
UserController.java
...ain/java/com/syc/slm/slmbi/controller/UserController.java
+4
-4
VariableController.java
...java/com/syc/slm/slmbi/controller/VariableController.java
+35
-20
No files found.
src/main/java/com/syc/slm/slmbi/controller/InstrumentPanelConfigController.java
View file @
a731a885
...
@@ -2,10 +2,12 @@ package com.syc.slm.slmbi.controller;
...
@@ -2,10 +2,12 @@ package com.syc.slm.slmbi.controller;
import
com.syc.slm.common.core.util.R
;
import
com.syc.slm.common.core.util.R
;
import
com.syc.slm.slmbi.dto.InstrumentPanelConfigDTO
;
import
com.syc.slm.slmbi.dto.InstrumentPanelConfigDTO
;
import
com.syc.slm.slmbi.dto.InstrumentPanelPermissionDTO
;
import
com.syc.slm.slmbi.service.InstrumentPanelConfigService
;
import
com.syc.slm.slmbi.service.InstrumentPanelConfigService
;
import
com.syc.slm.slmbi.vo.InstrumentPanelConfigVo
;
import
com.syc.slm.slmbi.vo.InstrumentPanelConfigVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
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.*
;
...
@@ -26,17 +28,34 @@ public class InstrumentPanelConfigController {
...
@@ -26,17 +28,34 @@ public class InstrumentPanelConfigController {
@Autowired
@Autowired
private
InstrumentPanelConfigService
instrumentPanelConfigService
;
private
InstrumentPanelConfigService
instrumentPanelConfigService
;
@PostMapping
(
"save_instrument_panel_config"
)
@PostMapping
@ApiOperation
(
"保存,或者发布仪表板样式以及数据配置"
)
@ApiOperation
(
"保存仪表板样式以及数据配置"
)
@ApiImplicitParam
(
name
=
"optType"
,
value
=
"1 保存 2 保存发布"
)
@ApiImplicitParams
({
public
R
<
Boolean
>
saveInstrumentPanelConfig
(
@RequestBody
InstrumentPanelConfigDTO
config
,
@RequestParam
Integer
optType
){
//1 保存 2 保存发布
@ApiImplicitParam
(
name
=
"instrumentPanelId"
,
value
=
"仪表板id"
,
required
=
true
),
return
R
.
ok
(
instrumentPanelConfigService
.
saveInstrumentPanelConfig
(
config
,
optType
));
@ApiImplicitParam
(
name
=
"visitPermission"
,
value
=
"访问权限"
,
required
=
true
,
dataTypeClass
=
InstrumentPanelPermissionDTO
.
class
),
@ApiImplicitParam
(
name
=
"configDetails"
,
value
=
"仪表板配置详情"
,
required
=
true
)
})
public
R
<
Boolean
>
saveInstrumentPanelConfig
(
@RequestBody
InstrumentPanelConfigDTO
config
)
{
return
R
.
ok
(
instrumentPanelConfigService
.
saveInstrumentPanelConfig
(
config
,
1
));
}
}
@GetMapping
(
"get_instrument_panel_config_by_instrument_panel_id"
)
@PostMapping
(
"save-push"
)
@ApiOperation
(
"保存发布仪表板样式以及数据配置"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"instrumentPanelId"
,
value
=
"仪表板id"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"visitPermission"
,
value
=
"访问权限"
,
required
=
true
,
dataTypeClass
=
InstrumentPanelPermissionDTO
.
class
),
@ApiImplicitParam
(
name
=
"configDetails"
,
value
=
"仪表板配置详情"
,
required
=
true
)
})
public
R
<
Boolean
>
saveAndPushConfig
(
@RequestBody
InstrumentPanelConfigDTO
config
)
{
return
R
.
ok
(
instrumentPanelConfigService
.
saveInstrumentPanelConfig
(
config
,
2
));
}
@GetMapping
(
"{panelId}"
)
@ApiOperation
(
"根据仪表板id获取仪表板配置"
)
@ApiOperation
(
"根据仪表板id获取仪表板配置"
)
@ApiImplicitParam
(
name
=
"instrumentPanelId"
,
value
=
"仪表板id"
)
@ApiImplicitParam
(
name
=
"instrumentPanelId"
,
value
=
"仪表板id"
)
public
R
<
InstrumentPanelConfigVo
>
getInstrumentPanelConfigByInstrumentPanelId
(
@
RequestParam
String
instrumentPanelId
)
{
public
R
<
InstrumentPanelConfigVo
>
getInstrumentPanelConfigByInstrumentPanelId
(
@
PathVariable
(
"panelId"
)
String
panelId
)
{
return
R
.
ok
(
instrumentPanelConfigService
.
getInstrumentPanelConfigByInstrumentPanelId
(
instrumentP
anelId
));
return
R
.
ok
(
instrumentPanelConfigService
.
getInstrumentPanelConfigByInstrumentPanelId
(
p
anelId
));
}
}
}
}
src/main/java/com/syc/slm/slmbi/controller/InstrumentPanelController.java
View file @
a731a885
...
@@ -3,14 +3,11 @@ package com.syc.slm.slmbi.controller;
...
@@ -3,14 +3,11 @@ package com.syc.slm.slmbi.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.syc.slm.common.core.util.R
;
import
com.syc.slm.common.core.util.R
;
import
com.syc.slm.slmbi.dto.InstrumentPanelDTO
;
import
com.syc.slm.slmbi.dto.InstrumentPanelDTO
;
import
com.syc.slm.slmbi.dto.InstrumentPanelGroupDTO
;
import
com.syc.slm.slmbi.entity.InstrumentPanel
;
import
com.syc.slm.slmbi.entity.InstrumentPanel
;
import
com.syc.slm.slmbi.entity.InstrumentPanelGroup
;
import
com.syc.slm.slmbi.service.InstrumentPanelService
;
import
com.syc.slm.slmbi.service.InstrumentPanelService
;
import
com.syc.slm.slmbi.vo.InstrumentPanelVo
;
import
com.syc.slm.slmbi.vo.InstrumentPanelVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
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.*
;
...
@@ -25,7 +22,7 @@ import java.util.List;
...
@@ -25,7 +22,7 @@ import java.util.List;
* @date : 2021-03-25 15:10
* @date : 2021-03-25 15:10
**/
**/
@RestController
@RestController
@RequestMapping
(
"/
instrument_panel
"
)
@RequestMapping
(
"/
panels
"
)
@Api
(
value
=
"仪表板"
,
description
=
"仪表板配置接口"
)
@Api
(
value
=
"仪表板"
,
description
=
"仪表板配置接口"
)
public
class
InstrumentPanelController
{
public
class
InstrumentPanelController
{
...
@@ -33,57 +30,60 @@ public class InstrumentPanelController {
...
@@ -33,57 +30,60 @@ public class InstrumentPanelController {
private
InstrumentPanelService
instrumentPanelService
;
private
InstrumentPanelService
instrumentPanelService
;
@GetMapping
@GetMapping
(
"/instrument_panels"
)
@ApiOperation
(
"仪表板列表"
)
@ApiOperation
(
"仪表板列表"
)
public
R
<
IPage
<
InstrumentPanelVo
>>
selectInstrumentPanelList
(
@RequestBody
InstrumentPanelDTO
where
)
{
//where :{name:'',creator:'',updater:'',startDate:'' ,endDate:'',recordStatus:''}
public
R
<
IPage
<
InstrumentPanelVo
>>
selectInstrumentPanelList
(
@RequestBody
InstrumentPanelDTO
where
)
{
//where :{name:'',creator:'',updater:'',startDate:'' ,endDate:'',recordStatus:''}
return
R
.
ok
(
instrumentPanelService
.
selectInstrumentPanelList
(
where
));
return
R
.
ok
(
instrumentPanelService
.
selectInstrumentPanelList
(
where
));
}
}
@PostMapping
(
"/save_instrument_panel"
)
@PostMapping
@ApiOperation
(
"新增仪表板"
)
@ApiOperation
(
"新增仪表板"
)
public
R
<
Boolean
>
saveInstrumentPanel
(
@RequestBody
InstrumentPanel
panel
)
{
public
R
<
Boolean
>
saveInstrumentPanel
(
@RequestBody
InstrumentPanel
panel
)
{
return
R
.
ok
(
instrumentPanelService
.
saveInstrumentPanel
(
panel
));
return
R
.
ok
(
instrumentPanelService
.
saveInstrumentPanel
(
panel
));
}
}
@PutMapping
(
"/batch-push"
)
@PostMapping
(
"/batch_push_instrument_panel"
)
@ApiOperation
(
"批量发布"
)
@ApiOperation
(
"批量发布或者下线"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"仪表板id集合"
,
required
=
true
)
@ApiImplicitParams
({
public
R
<
Boolean
>
batchPush
(
@RequestBody
List
<
String
>
ids
)
{
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"仪表板id集合"
,
required
=
true
),
return
R
.
ok
(
instrumentPanelService
.
batchPushInstrumentPanel
(
ids
,
1
));
@ApiImplicitParam
(
name
=
"optType"
,
value
=
"操作类型,1 发布,2 下线"
,
required
=
true
,
dataType
=
"Integer"
)
})
public
R
<
Boolean
>
batchPushInstrumentPanel
(
@RequestBody
List
<
String
>
ids
,
@RequestParam
Integer
optType
){
return
R
.
ok
(
instrumentPanelService
.
batchPushInstrumentPanel
(
ids
,
optType
));
}
}
@PutMapping
(
"/offline/{id}"
)
@ApiOperation
(
"下线"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"仪表板id"
,
required
=
true
)
public
R
<
Boolean
>
offline
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
instrumentPanelService
.
offline
(
id
));
}
@
PostMapping
(
"/del_push_instrument_panel
"
)
@
DeleteMapping
(
"/{id}
"
)
@ApiOperation
(
"删除仪表板"
)
@ApiOperation
(
"删除仪表板"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"仪表板id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"仪表板id"
,
required
=
true
)
public
R
<
Boolean
>
delPushInstrumentPanel
(
@
RequestParam
String
id
)
{
public
R
<
Boolean
>
delPushInstrumentPanel
(
@
PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
instrumentPanelService
.
delPushInstrumentPanel
(
id
));
return
R
.
ok
(
instrumentPanelService
.
delPushInstrumentPanel
(
id
));
}
}
@PostMapping
(
"/save
_as_instrument_panel
"
)
@PostMapping
(
"/save
-as
"
)
@ApiOperation
(
"另存为"
)
@ApiOperation
(
"另存为"
)
public
R
<
Boolean
>
saveAs
InstrumentPanel
(
@RequestBody
InstrumentPanelDTO
instrumentPanelDTO
)
{
public
R
<
Boolean
>
saveAs
(
@RequestBody
InstrumentPanelDTO
instrumentPanelDTO
)
{
return
R
.
ok
(
instrumentPanelService
.
save
As
InstrumentPanel
(
instrumentPanelDTO
));
return
R
.
ok
(
instrumentPanelService
.
saveInstrumentPanel
(
instrumentPanelDTO
));
}
}
@PostMapping
(
"/show
_recovery_btn
"
)
@PostMapping
(
"/show
-recovery-btn/{id}
"
)
@ApiOperation
(
"是否显示恢复按钮"
)
@ApiOperation
(
"是否显示恢复按钮"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"仪表板id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"仪表板id"
,
required
=
true
)
public
R
<
Boolean
>
showRecoveryBtn
(
@
RequestParam
String
id
)
{
public
R
<
Boolean
>
showRecoveryBtn
(
@
PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
instrumentPanelService
.
showRecoveryBtn
(
id
));
return
R
.
ok
(
instrumentPanelService
.
showRecoveryBtn
(
id
));
}
}
@P
ostMapping
(
"/recovery_instrument_panel
"
)
@P
utMapping
(
"/recovery/{id}
"
)
@ApiOperation
(
"恢复按钮操作"
)
@ApiOperation
(
"恢复按钮操作"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"仪表板id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"仪表板id"
,
required
=
true
)
public
R
<
Boolean
>
recoveryInstrumentPanel
(
@
RequestParam
String
id
)
{
public
R
<
Boolean
>
recoveryInstrumentPanel
(
@
PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
instrumentPanelService
.
recoveryInstrumentPanel
(
id
));
return
R
.
ok
(
instrumentPanelService
.
recoveryInstrumentPanel
(
id
));
}
}
}
}
src/main/java/com/syc/slm/slmbi/controller/InstrumentPanelGroupController.java
View file @
a731a885
...
@@ -5,7 +5,10 @@ import com.syc.slm.slmbi.dto.InstrumentPanelGroupDTO;
...
@@ -5,7 +5,10 @@ import com.syc.slm.slmbi.dto.InstrumentPanelGroupDTO;
import
com.syc.slm.slmbi.entity.InstrumentPanelGroup
;
import
com.syc.slm.slmbi.entity.InstrumentPanelGroup
;
import
com.syc.slm.slmbi.service.InstrumentPanelGroupService
;
import
com.syc.slm.slmbi.service.InstrumentPanelGroupService
;
import
com.syc.slm.slmbi.vo.InstrumentPanelGroupVo
;
import
com.syc.slm.slmbi.vo.InstrumentPanelGroupVo
;
import
com.syc.slm.slmbi.vo.PanelGroupVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
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.*
;
...
@@ -20,43 +23,55 @@ import java.util.List;
...
@@ -20,43 +23,55 @@ import java.util.List;
* @date : 2021-03-25 15:07
* @date : 2021-03-25 15:07
**/
**/
@RestController
@RestController
@RequestMapping
(
"/
instrumentPanelGroup
"
)
@RequestMapping
(
"/
panel/groups
"
)
@Api
(
value
=
"仪表板分组"
,
description
=
"仪表板分组接口"
)
@Api
(
value
=
"仪表板分组"
)
public
class
InstrumentPanelGroupController
{
public
class
InstrumentPanelGroupController
{
@Autowired
@Autowired
private
InstrumentPanelGroupService
instrumentPanelGroupService
;
private
InstrumentPanelGroupService
instrumentPanelGroupService
;
@GetMapping
(
"/selectInstrumentPanelGroupList"
)
@GetMapping
@ApiOperation
(
"获取所有的仪表板分组"
)
@ApiOperation
(
"第一次进入页面,或者点击查询,获取全部分组下的仪表板数据,以及分组数据"
)
public
R
<
List
<
InstrumentPanelGroupVo
>>
selectInstrumentPanelGroupList
(){
@ApiImplicitParam
(
name
=
"name"
,
value
=
"分组名称或者仪表板名称"
)
return
R
.
ok
(
instrumentPanelGroupService
.
selectInstrumentPanelGroupList
());
public
R
<
List
<
PanelGroupVo
>>
selectInstrumentPanelGroupList
(
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
{
return
R
.
ok
(
instrumentPanelGroupService
.
loadTrees
(
name
));
}
@GetMapping
(
"/next-nodes"
)
@ApiOperation
(
"点击节点获取,该分组下的仪表板信息,以及分组数据"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"groupId"
,
value
=
"分组id"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"分组名称或者仪表板名称"
)
})
public
R
<
List
<
PanelGroupVo
>>
findNextNodes
(
@RequestParam
(
"groupId"
)
String
groupId
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
{
return
R
.
ok
(
instrumentPanelGroupService
.
findNextNodes
(
groupId
,
name
));
}
}
@GetMapping
(
"/selectInstrumentPanelGroups"
)
@GetMapping
(
"/selectInstrumentPanelGroups"
)
@ApiOperation
(
"获取所有的仪表板分组以及分组下的仪表板以及仪表板下的组件"
)
@ApiOperation
(
"获取所有的仪表板分组以及分组下的仪表板以及仪表板下的组件"
)
public
R
<
List
<
InstrumentPanelGroupVo
>>
selectInstrumentPanelGroups
(){
public
R
<
List
<
InstrumentPanelGroupVo
>>
selectInstrumentPanelGroups
()
{
return
R
.
ok
(
instrumentPanelGroupService
.
selectInstrumentPanelGroupList
());
return
R
.
ok
(
instrumentPanelGroupService
.
selectInstrumentPanelGroupList
());
}
}
@PostMapping
(
"/saveInstrumentPanelGroup"
)
@PostMapping
@ApiOperation
(
"保存仪表板分组"
)
@ApiOperation
(
"保存仪表板分组"
)
public
R
<
Boolean
>
saveInstrumentPanelGroup
(
@RequestBody
InstrumentPanelGroupDTO
group
)
{
public
R
<
Boolean
>
saveInstrumentPanelGroup
(
@RequestBody
InstrumentPanelGroupDTO
group
)
{
return
R
.
ok
(
instrumentPanelGroupService
.
saveInstrumentPanelGroup
(
group
));
return
R
.
ok
(
instrumentPanelGroupService
.
saveInstrumentPanelGroup
(
group
));
}
}
@P
ostMapping
(
"/updateInstrumentPanelGroup"
)
@P
utMapping
@ApiOperation
(
"更新仪表板分组"
)
@ApiOperation
(
"更新仪表板分组"
)
public
R
<
Boolean
>
updateInstrumentPanelGroup
(
@RequestBody
InstrumentPanelGroupDTO
group
){
public
R
<
Boolean
>
updateInstrumentPanelGroup
(
@RequestBody
InstrumentPanelGroupDTO
group
)
{
return
R
.
ok
(
instrumentPanelGroupService
.
updateInstrumentPanelGroup
(
group
));
return
R
.
ok
(
instrumentPanelGroupService
.
updateInstrumentPanelGroup
(
group
));
}
}
@
PostMapping
(
"/delInstrumentPanelGroup
"
)
@
DeleteMapping
(
"/{groupId}
"
)
@ApiOperation
(
"删除仪表板分组"
)
@ApiOperation
(
"删除仪表板分组"
)
public
R
<
Boolean
>
delInstrumentPanelGroup
(
@
RequestParam
String
groupId
)
{
public
R
<
Boolean
>
delInstrumentPanelGroup
(
@
PathVariable
String
groupId
)
{
return
R
.
ok
(
instrumentPanelGroupService
.
delInstrumentPanelGroup
(
groupId
));
return
R
.
ok
(
instrumentPanelGroupService
.
delInstrumentPanelGroup
(
groupId
));
}
}
...
...
src/main/java/com/syc/slm/slmbi/controller/InstrumentPanelPermissionController.java
View file @
a731a885
...
@@ -21,36 +21,36 @@ import java.util.List;
...
@@ -21,36 +21,36 @@ import java.util.List;
**/
**/
@Api
(
value
=
"仪表板权限控制"
,
description
=
"仪表板权限控制"
)
@Api
(
value
=
"仪表板权限控制"
,
description
=
"仪表板权限控制"
)
@RestController
@RestController
@RequestMapping
(
"/p
ermission
"
)
@RequestMapping
(
"/p
anel/permissions
"
)
public
class
InstrumentPanelPermissionController
{
public
class
InstrumentPanelPermissionController
{
@Autowired
@Autowired
private
InstrumentPanelPermissionService
instrumentPanelPermissionService
;
private
InstrumentPanelPermissionService
instrumentPanelPermissionService
;
@PostMapping
(
"save_instrument_panel_permission"
)
@PostMapping
@ApiOperation
(
"保存仪表板权限"
)
@ApiOperation
(
"保存仪表板权限"
)
public
R
<
Boolean
>
saveInstrumentPanelPermission
(
@RequestBody
List
<
InstrumentPanelPermissionDTO
>
permissions
){
public
R
<
Boolean
>
saveInstrumentPanelPermission
(
@RequestBody
List
<
InstrumentPanelPermissionDTO
>
permissions
)
{
return
R
.
ok
(
instrumentPanelPermissionService
.
saveInstrumentPanelPermission
(
permissions
));
return
R
.
ok
(
instrumentPanelPermissionService
.
saveInstrumentPanelPermission
(
permissions
));
}
}
@PostMapping
(
"
save_copy_other_instrument_panel_permission
"
)
@PostMapping
(
"
/to-copy/{panelId}
"
)
@ApiOperation
(
"从其他仪表板复制配置"
)
@ApiOperation
(
"从其他仪表板复制配置"
)
@ApiImplicitParam
(
name
=
"otherInstrumentPanelId"
,
value
=
"其他仪表板id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"panelId"
,
value
=
"其他仪表板id"
,
required
=
true
)
public
R
<
List
<
InstrumentPanelPermissionVo
>>
saveCopyOtherInstrumentPanelPermission
(
@
RequestParam
String
otherInstrumentPanelId
)
{
public
R
<
List
<
InstrumentPanelPermissionVo
>>
saveCopyOtherInstrumentPanelPermission
(
@
PathVariable
String
panelId
)
{
return
R
.
ok
(
instrumentPanelPermissionService
.
saveCopyOtherInstrumentPanelPermission
(
otherInstrumentP
anelId
));
return
R
.
ok
(
instrumentPanelPermissionService
.
saveCopyOtherInstrumentPanelPermission
(
p
anelId
));
}
}
@PostMapping
(
"
save_copy_to_other_instrument_panel_permission
"
)
@PostMapping
(
"
/copy-to/{panelId}
"
)
@ApiOperation
(
"将仪表板权限复制给其他仪表板"
)
@ApiOperation
(
"将仪表板权限复制给其他仪表板"
)
@ApiImplicitParam
(
name
=
"otherInstrumentPanelId"
,
value
=
"其他仪表板id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"panelId"
,
value
=
"其他仪表板id"
,
required
=
true
)
public
R
<
Boolean
>
saveCopyToOtherInstrumentPanelPermission
(
@RequestBody
List
<
InstrumentPanelPermissionDTO
>
permissions
,
@RequestParam
String
otherInstrumentPanelId
)
{
public
R
<
Boolean
>
saveCopyToOtherInstrumentPanelPermission
(
@RequestBody
List
<
InstrumentPanelPermissionDTO
>
permissions
,
@PathVariable
(
"panelId"
)
String
panelId
)
{
return
R
.
ok
(
instrumentPanelPermissionService
.
saveCopyToOtherInstrumentPanelPermission
(
permissions
,
otherInstrumentP
anelId
));
return
R
.
ok
(
instrumentPanelPermissionService
.
saveCopyToOtherInstrumentPanelPermission
(
permissions
,
p
anelId
));
}
}
@GetMapping
(
"
select_instrument_panel_permission_by_id
"
)
@GetMapping
(
"
/{panelId}
"
)
@ApiOperation
(
"根据仪表板id获取仪表板权限"
)
@ApiOperation
(
"根据仪表板id获取仪表板权限"
)
@ApiImplicitParam
(
name
=
"instrumentPanelId"
,
value
=
"仪表板id"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"panelId"
,
value
=
"仪表板id"
,
required
=
true
)
public
R
<
List
<
InstrumentPanelPermissionVo
>>
select
nstrumentPanelPermissionById
(
@RequestParam
String
instrumentPanelId
)
{
public
R
<
List
<
InstrumentPanelPermissionVo
>>
select
InstrumentPanelPermissionById
(
@PathVariable
(
"panelId"
)
String
panelId
)
{
return
R
.
ok
(
instrumentPanelPermissionService
.
selectInstrumentPanelPermissionById
(
instrumentP
anelId
));
return
R
.
ok
(
instrumentPanelPermissionService
.
selectInstrumentPanelPermissionById
(
p
anelId
));
}
}
}
}
src/main/java/com/syc/slm/slmbi/controller/PositionController.java
View file @
a731a885
...
@@ -28,8 +28,8 @@ public class PositionController {
...
@@ -28,8 +28,8 @@ public class PositionController {
@GetMapping
@GetMapping
@ApiOperation
(
"职位查询列表"
)
@ApiOperation
(
"职位查询列表"
)
@ApiImplicitParam
(
name
=
"positionName"
,
value
=
"职位名称"
)
@ApiImplicitParam
(
name
=
"positionName"
,
value
=
"职位名称"
)
public
R
<
List
<
PositionVo
>>
selectPositionList
(
@RequestParam
(
value
=
"positionName"
,
required
=
false
)
String
positionName
)
{
public
R
<
List
<
PositionVo
>>
selectPositionList
(
@RequestParam
(
value
=
"positionName"
,
required
=
false
)
String
positionName
)
{
return
R
.
ok
(
positionWorkService
.
selectPositionList
(
positionName
));
return
R
.
ok
(
positionWorkService
.
selectPositionList
(
positionName
));
}
}
}
}
src/main/java/com/syc/slm/slmbi/controller/UserController.java
View file @
a731a885
...
@@ -28,10 +28,10 @@ public class UserController {
...
@@ -28,10 +28,10 @@ public class UserController {
@GetMapping
@GetMapping
@ApiOperation
(
"用户查询"
)
@ApiOperation
(
"用户查询"
)
@ApiImplicitParam
(
name
=
"userName"
,
value
=
"用户名称"
)
@ApiImplicitParam
(
name
=
"userName"
,
value
=
"用户名称"
)
public
R
<
List
<
UserVo
>>
selectUserList
(
@RequestParam
(
value
=
"userName"
,
required
=
false
)
String
userName
)
{
public
R
<
List
<
UserVo
>>
selectUserList
(
@RequestParam
(
value
=
"userName"
,
required
=
false
)
String
userName
)
{
return
R
.
ok
(
userService
.
selectUserList
(
userName
));
return
R
.
ok
(
userService
.
selectUserList
(
userName
));
}
}
}
}
src/main/java/com/syc/slm/slmbi/controller/VariableController.java
View file @
a731a885
...
@@ -12,9 +12,11 @@ import io.swagger.annotations.ApiImplicitParam;
...
@@ -12,9 +12,11 @@ import io.swagger.annotations.ApiImplicitParam;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
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.GetMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -32,40 +34,53 @@ public class VariableController {
...
@@ -32,40 +34,53 @@ public class VariableController {
@Autowired
@Autowired
private
VariableService
variableService
;
private
VariableService
variableService
;
@GetMapping
(
"get_variable_list"
)
@GetMapping
@ApiOperation
(
"获取变量列表"
)
@ApiOperation
(
"获取变量列表"
)
public
R
<
IPage
<
VariableVo
>>
getVariableList
(
@RequestBody
VariableDTO
variableDTO
){
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"sourceId"
,
value
=
"变量来源"
),
@ApiImplicitParam
(
name
=
"deviceId"
,
value
=
"所属设备"
),
@ApiImplicitParam
(
name
=
"variableName"
,
value
=
"变量名称"
),
@ApiImplicitParam
(
name
=
"description"
,
value
=
"描述"
)
})
public
R
<
IPage
<
VariableVo
>>
getVariableList
(
@RequestBody
VariableDTO
variableDTO
)
{
return
R
.
ok
(
variableService
.
getVariableList
(
variableDTO
));
return
R
.
ok
(
variableService
.
getVariableList
(
variableDTO
));
}
}
@GetMapping
(
"get_variable_source_list"
)
@GetMapping
(
"real-time"
)
@ApiOperation
(
"获取变量实时数据"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"variableIds"
,
value
=
"变量集合ids"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"format"
,
value
=
"时间格式"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"interval"
,
value
=
"时间间隔,代表(天,时,分,秒)"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"deviceId"
,
value
=
"所属设备"
,
required
=
true
)
})
public
R
getVariableRealTimeDataList
(
@RequestBody
VariableDTO
variableDTO
)
{
return
R
.
ok
();
}
@GetMapping
(
"source"
)
@ApiOperation
(
"获取变量来源列表"
)
@ApiOperation
(
"获取变量来源列表"
)
public
R
<
List
<
VariableSourceVo
>>
getVariableSourceList
(){
public
R
<
List
<
VariableSourceVo
>>
getVariableSourceList
()
{
return
R
.
ok
(
variableService
.
getVariableSourceList
());
return
R
.
ok
(
variableService
.
getVariableSourceList
());
}
}
@GetMapping
(
"
get_variable_device_list
"
)
@GetMapping
(
"
device
"
)
@ApiOperation
(
"获取变量所属设备列表"
)
@ApiOperation
(
"获取变量所属设备列表"
)
public
R
<
List
<
VariableDeviceVo
>>
getVariableDeviceList
(){
public
R
<
List
<
VariableDeviceVo
>>
getVariableDeviceList
()
{
return
R
.
ok
(
variableService
.
getVariableDeviceList
());
return
R
.
ok
(
variableService
.
getVariableDeviceList
());
}
}
@GetMapping
(
"get_variable_real_time_data_list"
)
@ApiOperation
(
"获取变量实时数据"
)
@ApiImplicitParam
(
name
=
"variableId"
,
value
=
"变量id"
)
public
R
getVariableRealTimeDataList
(
@RequestParam
String
variableId
){
return
R
.
ok
();
}
@GetMapping
(
"
get_variable_history_data_list
"
)
@GetMapping
(
"
history
"
)
@ApiOperation
(
"获取变量历史数据"
)
@ApiOperation
(
"获取变量历史数据"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"variableId"
,
value
=
"变量id"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"variableIds"
,
value
=
"变量集合ids"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"startTime"
,
value
=
"开始时间"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"deviceId"
,
value
=
"所属设备"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"endTime"
,
value
=
"结束时间"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"statisticsType"
,
value
=
"统计类型,代表(合计值,平均值,最大值,最小值)"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"startTime"
,
value
=
"开始时间"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"endTime"
,
value
=
"结束时间"
,
required
=
true
)
})
})
public
R
getVariableHistoryDataList
(
@Request
Param
String
variableId
,
@RequestParam
Date
startTime
,
@RequestParam
Date
endTime
)
{
public
R
getVariableHistoryDataList
(
@Request
Body
VariableDTO
variableDTO
)
{
return
R
.
ok
();
return
R
.
ok
();
}
}
}
}
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