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
e8d929a6
Commit
e8d929a6
authored
Aug 11, 2021
by
tianbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
9e463132
05639847
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
916 additions
and
876 deletions
+916
-876
CatalogTreeController.java
...aintenance/business/controller/CatalogTreeController.java
+8
-7
CheckController.java
...amos/maintenance/business/controller/CheckController.java
+22
-21
CommonController.java
...mos/maintenance/business/controller/CommonController.java
+9
-8
ConfigController.java
...mos/maintenance/business/controller/ConfigController.java
+7
-5
EquipmentRuleController.java
...ntenance/business/controller/EquipmentRuleController.java
+4
-3
ExcelExportController.java
...aintenance/business/controller/ExcelExportController.java
+4
-3
GroupController.java
...amos/maintenance/business/controller/GroupController.java
+9
-8
HomeController.java
.../amos/maintenance/business/controller/HomeController.java
+4
-3
InputItemController.java
.../maintenance/business/controller/InputItemController.java
+14
-13
MeasuresController.java
...s/maintenance/business/controller/MeasuresController.java
+5
-4
MsgController.java
...n/amos/maintenance/business/controller/MsgController.java
+10
-9
PlanController.java
.../amos/maintenance/business/controller/PlanController.java
+10
-9
PlanTaskController.java
...s/maintenance/business/controller/PlanTaskController.java
+50
-33
PointController.java
...amos/maintenance/business/controller/PointController.java
+38
-37
QueryStatsController.java
...maintenance/business/controller/QueryStatsController.java
+3
-2
RouteController.java
...amos/maintenance/business/controller/RouteController.java
+19
-18
SafetyController.java
...mos/maintenance/business/controller/SafetyController.java
+4
-3
SafetyPreCtrlController.java
...ntenance/business/controller/SafetyPreCtrlController.java
+21
-20
SynDataController.java
...os/maintenance/business/controller/SynDataController.java
+9
-8
TaskController.java
.../amos/maintenance/business/controller/TaskController.java
+25
-24
TaskReportController.java
...maintenance/business/controller/TaskReportController.java
+4
-3
UserController.java
.../amos/maintenance/business/controller/UserController.java
+12
-11
Permission.java
...m/yeejoin/amos/maintenance/core/framework/Permission.java
+28
-27
PermissionAspect.java
...oin/amos/maintenance/core/framework/PermissionAspect.java
+173
-173
CatalogTreeController.java
...mos/patrol/business/controller/CatalogTreeController.java
+7
-7
CheckController.java
...join/amos/patrol/business/controller/CheckController.java
+21
-21
CommonController.java
...oin/amos/patrol/business/controller/CommonController.java
+6
-6
ConfigController.java
...oin/amos/patrol/business/controller/ConfigController.java
+2
-2
EquipmentRuleController.java
...s/patrol/business/controller/EquipmentRuleController.java
+3
-3
ExcelExportController.java
...mos/patrol/business/controller/ExcelExportController.java
+3
-3
GroupController.java
...join/amos/patrol/business/controller/GroupController.java
+8
-8
HomeController.java
...ejoin/amos/patrol/business/controller/HomeController.java
+3
-3
InputItemController.java
.../amos/patrol/business/controller/InputItemController.java
+12
-12
MeasuresController.java
...n/amos/patrol/business/controller/MeasuresController.java
+4
-4
MsgController.java
...eejoin/amos/patrol/business/controller/MsgController.java
+9
-9
PlanController.java
...ejoin/amos/patrol/business/controller/PlanController.java
+8
-8
PlanTaskController.java
...n/amos/patrol/business/controller/PlanTaskController.java
+21
-21
PointController.java
...join/amos/patrol/business/controller/PointController.java
+37
-37
QueryStatsController.java
...amos/patrol/business/controller/QueryStatsController.java
+2
-2
RouteController.java
...join/amos/patrol/business/controller/RouteController.java
+19
-19
SafetyController.java
...oin/amos/patrol/business/controller/SafetyController.java
+3
-3
SafetyPreCtrlController.java
...s/patrol/business/controller/SafetyPreCtrlController.java
+20
-20
SynDataController.java
...in/amos/patrol/business/controller/SynDataController.java
+8
-8
TaskController.java
...ejoin/amos/patrol/business/controller/TaskController.java
+24
-24
TaskReportController.java
...amos/patrol/business/controller/TaskReportController.java
+3
-3
UserController.java
...ejoin/amos/patrol/business/controller/UserController.java
+11
-11
Permission.java
...va/com/yeejoin/amos/patrol/core/framework/Permission.java
+14
-14
PermissionAspect.java
.../yeejoin/amos/patrol/core/framework/PermissionAspect.java
+176
-176
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/CatalogTreeController.java
View file @
e8d929a6
...
...
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.CatalogTreeMapper
;
...
...
@@ -22,7 +24,6 @@ import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.dao.entity.CatalogTree
;
import
io.swagger.annotations.Api
;
...
...
@@ -42,7 +43,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"树结构查询"
,
notes
=
"树结构查询"
)
@RequestMapping
(
value
=
"/getCatalogTree"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getCatalogTree
()
{
...
...
@@ -57,7 +58,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"树结构查询"
,
notes
=
"树结构查询"
)
@RequestMapping
(
value
=
"/catalogList"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getCatalogList
()
{
...
...
@@ -72,7 +73,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分类新增"
,
notes
=
"分类新增"
)
@RequestMapping
(
value
=
"/addCatalogTree"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
catalogTreeAdd
(
@ApiParam
(
value
=
"分类"
,
required
=
true
)
@RequestBody
CatalogTree
param
)
{
...
...
@@ -124,7 +125,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除分类"
,
notes
=
"删除分类"
)
@RequestMapping
(
value
=
"/deleteCatalogTreeById"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
deleteCatalogTreeById
(
...
...
@@ -144,7 +145,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分类数据查询"
,
notes
=
"分类数据查询"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCatalogTreeInfoPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -164,7 +165,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询分类按照id"
,
notes
=
"查询分类按照id"
)
@RequestMapping
(
value
=
"/catalogTreeDetById/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCatalogTreeById
(
@ApiParam
(
value
=
"分类id"
,
required
=
true
)
@PathVariable
(
name
=
"id"
)
Long
id
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/CheckController.java
View file @
e8d929a6
...
...
@@ -36,6 +36,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
...
@@ -63,7 +65,6 @@ import com.yeejoin.amos.maintenance.core.common.request.CommonPageable;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.maintenance.core.common.response.GraphInitDataResponse
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.core.util.StringUtil
;
import
com.yeejoin.amos.maintenance.dao.entity.PlanTask
;
import
com.yeejoin.amos.maintenance.mqtt.WebMqttComponent
;
...
...
@@ -115,7 +116,7 @@ public class CheckController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检记录查询"
,
notes
=
"巡检记录查询"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCheckInfoPage
(
...
...
@@ -147,7 +148,7 @@ public class CheckController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
list
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录"
,
notes
=
"导出巡检记录"
)
@PostMapping
(
value
=
"/export"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
)
public
void
exportCheck
(
...
...
@@ -186,7 +187,7 @@ public class CheckController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录"
,
notes
=
"导出巡检记录"
)
@RequestMapping
(
value
=
"/exportSelectRecord"
,
method
=
RequestMethod
.
GET
)
public
void
exportSelectCheckRecord
(
...
...
@@ -197,7 +198,7 @@ public class CheckController extends AbstractBaseController {
FileHelper
.
exportExcel
(
list
,
"巡检记录"
,
"巡检记录"
,
CheckInfoVo
.
class
,
fileName
+
".xls"
,
response
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录图片"
,
notes
=
"导出巡检记录图片"
)
@RequestMapping
(
value
=
"/exportImgs"
,
method
=
RequestMethod
.
POST
)
public
void
exportCheckImgs
(
...
...
@@ -231,7 +232,7 @@ public class CheckController extends AbstractBaseController {
FileHelper
.
exportZip
(
list
,
fileName
,
response
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录图片"
,
notes
=
"导出巡检记录图片"
)
@RequestMapping
(
value
=
"/exportImgsByIds"
,
method
=
RequestMethod
.
GET
)
public
void
exportCheckImgs
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestParam
(
required
=
false
)
Long
[]
ids
,
...
...
@@ -245,7 +246,7 @@ public class CheckController extends AbstractBaseController {
FileHelper
.
exportZip
(
list
,
fileName
,
response
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存巡检记录<font color='blue'>手机app</font>"
,
notes
=
"保存巡检记录<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/saveRecord"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
saveCheckRecord
(
...
...
@@ -328,7 +329,7 @@ public class CheckController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检记录"
,
notes
=
"删除巡检记录"
)
@RequestMapping
(
value
=
"/testPush"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
deleteCheckById
(
@ApiParam
(
value
=
"巡检计划ID"
,
required
=
true
)
@RequestBody
Long
id
)
{
...
...
@@ -348,7 +349,7 @@ public class CheckController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检记录"
,
notes
=
"删除巡检记录"
)
@RequestMapping
(
value
=
"/deleteCheckById"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
deleteCheckById
(
@ApiParam
(
value
=
"巡检计划ID"
,
required
=
true
)
@RequestBody
List
<
Long
>
ids
)
{
...
...
@@ -368,7 +369,7 @@ public class CheckController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"据检查项ID获取所有不合格检查项<font color='blue'>手机app</font>"
,
notes
=
"据检查项ID获取所有不合格检查项<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/queryUnqualifiedInputItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryUnqualifiedInputItem
(
@RequestParam
(
required
=
true
)
int
checkId
)
{
...
...
@@ -381,7 +382,7 @@ public class CheckController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>"
,
notes
=
"获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/queryCheckPointDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCheckPointDetail
(
@RequestParam
long
checkId
)
{
...
...
@@ -395,7 +396,7 @@ public class CheckController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>"
,
notes
=
"获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/v2/queryCheckPointDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCheckPointDetailInVersion2
(
@RequestParam
long
checkId
)
{
...
...
@@ -415,7 +416,7 @@ public class CheckController extends AbstractBaseController {
* @param queryRequests
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检日历数据<font color='blue'>手机app</font>"
,
notes
=
"获取巡检日历数据<font color='blue'>手机app</font>"
)
@PostMapping
(
value
=
"/checkCalendar"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
checkCalendar
(
...
...
@@ -436,7 +437,7 @@ public class CheckController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检点巡检记录列表信息<font color='blue'>手机app</font>"
,
notes
=
"获取巡检点巡检记录列表信息<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/queryCheckRecord"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryRecordByPointId
(
...
...
@@ -460,7 +461,7 @@ public class CheckController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
map
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检记录详情信息<font color='blue'>手机app</font>"
,
notes
=
"获取巡检记录详情信息<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/queryCheckDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryRecordById
(
@RequestParam
(
required
=
true
)
int
checkId
)
{
...
...
@@ -479,7 +480,7 @@ public class CheckController extends AbstractBaseController {
* @param checkId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检记录ID获取巡检记录详情"
,
notes
=
"根据巡检记录ID获取巡检记录详情"
)
@RequestMapping
(
value
=
"/queryCheckInfo"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
printTaskDetail
(
@ApiParam
(
value
=
"巡检记录ID"
)
@RequestParam
(
required
=
true
)
int
checkId
)
{
...
...
@@ -530,7 +531,7 @@ public class CheckController extends AbstractBaseController {
* @return
*/
//@Authorization(ingore=true)
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检点初始数据(<font color='blue'>release</font>)"
,
notes
=
"获取巡检点初始数据"
)
@RequestMapping
(
value
=
"/viewModule/initData"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getViewModuleInitData
()
{
...
...
@@ -544,7 +545,7 @@ public class CheckController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检情况统计分析"
,
notes
=
"巡检情况统计分析"
)
@RequestMapping
(
value
=
"/statisticalAnalysis"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getCheckStatisticalAnalysis
(
...
...
@@ -556,7 +557,7 @@ public class CheckController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
list
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检情况统计分析"
,
notes
=
"导出巡检情况统计分析"
)
@RequestMapping
(
value
=
"/exportStatisticalAnalysis"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
)
public
void
exportStatisticalAnalysis
(
...
...
@@ -579,7 +580,7 @@ public class CheckController extends AbstractBaseController {
* @param checkInputId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取检查项照片URL(<font color='blue'>release</font>)"
,
notes
=
"获取检查项照片URL"
)
@RequestMapping
(
value
=
"/getCheckPic"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getCheckPhotosByCheckAndInputId
(
...
...
@@ -594,7 +595,7 @@ public class CheckController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询最近一条维保记录"
,
notes
=
"不包括漏检"
)
@GetMapping
(
value
=
"/{relationId}/last-check"
)
public
CommonResponse
obtainLastCheckRecord
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/CommonController.java
View file @
e8d929a6
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
controller
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IAppService
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.common.enums.CheckStatisticsTypeEnum
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskExecution
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskFinishStatusEnum
;
...
...
@@ -28,35 +29,35 @@ public class CommonController extends AbstractBaseController{
@Autowired
private
IAppService
iAppService
;
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务统计口径类型"
,
notes
=
"任务统计口径类型"
)
@RequestMapping
(
value
=
"/taskgetStatisticsType"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getTaskStatisticsType
()
{
return
CommonResponseUtil
.
success
(
TaskStatisticsTypeEnum
.
getEnumList
());
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检统计口径类型"
,
notes
=
"巡检统计口径类型"
)
@RequestMapping
(
value
=
"/checkStatisticsType"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getCheckStatisticsType
()
{
return
CommonResponseUtil
.
success
(
CheckStatisticsTypeEnum
.
getEnumList
());
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"计划任务完成种类"
,
notes
=
"计划任务完成种类"
)
@RequestMapping
(
value
=
"/planTaskFinishStatus"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPlanTaskFinishStatus
()
{
return
CommonResponseUtil
.
success
(
PlanTaskFinishStatusEnum
.
getEnumList
());
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划任务执行情况种类"
,
notes
=
"计划任务执行情况种类"
)
@RequestMapping
(
value
=
"/planTaskExecution"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPlanTaskExecution
()
{
return
CommonResponseUtil
.
success
(
PlanTaskExecution
.
getEnumList
());
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取app最新版本信息"
,
notes
=
"获取app最新版本信息"
)
@RequestMapping
(
value
=
"/queryAppVersion"
,
method
=
RequestMethod
.
GET
)
//@Authorization(ingore=true)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/ConfigController.java
View file @
e8d929a6
...
...
@@ -2,16 +2,18 @@ package com.yeejoin.amos.maintenance.business.controller;
import
java.util.List
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IConfigDao
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IConfigDao
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.dao.entity.Config
;
import
io.swagger.annotations.Api
;
...
...
@@ -42,7 +44,7 @@ public class ConfigController extends AbstractBaseController{
* @return
*/
//@Authorization(ingore = true)
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取配置接口信息"
,
notes
=
" 获取配置接口信息"
)
@RequestMapping
(
value
=
"/getConfigsInfo"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getConfigsInfo
()
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/EquipmentRuleController.java
View file @
e8d929a6
...
...
@@ -10,13 +10,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IEquipmentHandlerService
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.business.util.Toke
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.dao.entity.InputItem
;
import
io.swagger.annotations.Api
;
...
...
@@ -41,7 +42,7 @@ public class EquipmentRuleController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"装备检查项"
,
notes
=
"装备检查项"
)
@RequestMapping
(
value
=
"/equipmnetInput"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
getPlanTaskList
(
...
...
@@ -62,7 +63,7 @@ public class EquipmentRuleController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"装备检查项"
,
notes
=
"装备检查项"
)
@RequestMapping
(
value
=
"/getEquipmnetRules"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getEquipmnetRules
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/ExcelExportController.java
View file @
e8d929a6
...
...
@@ -19,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.param.TaskStatisticsParam
;
...
...
@@ -26,7 +28,6 @@ import com.yeejoin.amos.maintenance.business.service.impl.TaskReportService;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.business.util.Toke
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
cn.afterturn.easypoi.excel.ExcelExportUtil
;
import
cn.afterturn.easypoi.excel.entity.TemplateExportParams
;
...
...
@@ -57,7 +58,7 @@ public class ExcelExportController extends AbstractBaseController{
*
* 导出格式为:vnd.ms-excel
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检完成情况月报表导出excel"
,
notes
=
" 巡检完成情况月报表导出excel"
)
@RequestMapping
(
value
=
"/task/{statistical}"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
taskReport
(
...
...
@@ -86,7 +87,7 @@ public class ExcelExportController extends AbstractBaseController{
return
CommonResponseUtil
.
success
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
" 人员综合统计分析Excel导出"
,
notes
=
" 人员综合统计分析Excel导出"
)
@RequestMapping
(
value
=
"/comprehensive/user"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
comprehensiveStatisticalForUser
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/GroupController.java
View file @
e8d929a6
...
...
@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -23,7 +25,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.ISafety3DDataSendServ
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.core.common.response.TaskInfoRespone
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.email.IEmailService
;
import
com.yeejoin.amos.maintenance.feign.RemoteSecurityService
;
...
...
@@ -51,7 +52,7 @@ public class GroupController extends AbstractBaseController{
* 部门查询
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取当前用户所属公司的所有部门"
,
notes
=
"获取当前用户所属公司的所有部门"
)
@RequestMapping
(
value
=
"/queryDept"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCurrentCompanyDept
()
{
...
...
@@ -138,7 +139,7 @@ public class GroupController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
res
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取当前用户所属公司的所有部门及人员"
,
notes
=
"获取当前用户所属公司的所有部门及人员"
)
@RequestMapping
(
value
=
"/queryDeptAndUser"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCurrentCompanyDeptAndUser
()
{
...
...
@@ -288,7 +289,7 @@ public class GroupController extends AbstractBaseController{
* @param companyId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据指定公司ID获取公司和所属公司的子公司信息"
,
notes
=
"根据指定公司ID获取公司和所属公司的子公司信息"
)
@RequestMapping
(
value
=
"/queryCompanyLeaves"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCompanyLeavesById
(
@ApiParam
(
value
=
"公司Id"
)
@RequestParam
(
"companyId"
)
String
companyId
)
{
...
...
@@ -308,7 +309,7 @@ public class GroupController extends AbstractBaseController{
* 根据用户所有属公司ID,查询所有子公司末端公司信息
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取用户所属公司和所属公司的子公司信息"
,
notes
=
"获取用户所属公司和所属公司的子公司信息"
)
@RequestMapping
(
value
=
"/queryAuthCompanyLeaves"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryAuthCompanyLeaves
()
{
...
...
@@ -351,7 +352,7 @@ public class GroupController extends AbstractBaseController{
@Autowired
private
ISafety3DDataSendService
safety3DDataSend
;
//@Authorization(ingore=true)
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"检查点状态推送"
,
notes
=
"检查点状态推送"
)
@RequestMapping
(
value
=
"/testCheckPushStatus"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
testCheckPushStatus
(
@ApiParam
(
value
=
"Id"
)
@RequestParam
(
"checkId"
)
long
checkId
)
{
...
...
@@ -366,7 +367,7 @@ public class GroupController extends AbstractBaseController{
}
//@Authorization(ingore=true)
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务状态推送"
,
notes
=
"任务状态推送"
)
@RequestMapping
(
value
=
"/testTaskPushStatus"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
testTaskPushStatus
(
@ApiParam
(
value
=
"Id"
)
@RequestParam
(
"checkId"
)
Long
taskId
)
{
...
...
@@ -379,7 +380,7 @@ public class GroupController extends AbstractBaseController{
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检点信息"
,
notes
=
"巡检点信息"
)
@RequestMapping
(
value
=
"/pointInfo"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPointInfo
(
@ApiParam
(
value
=
"Id"
)
@RequestParam
(
"pointId"
)
Long
pointId
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/HomeController.java
View file @
e8d929a6
...
...
@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.service.intfc.ICheckService
;
...
...
@@ -19,7 +21,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.IPointService;
import
com.yeejoin.amos.maintenance.business.service.intfc.ITaskService
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.feign.RemoteSecurityService
;
import
io.swagger.annotations.Api
;
...
...
@@ -46,7 +47,7 @@ public class HomeController extends AbstractBaseController{
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"首页数据"
,
notes
=
"首页数据"
)
@GetMapping
(
value
=
"/overviewData"
)
// @Authorization(ingore = true)
...
...
@@ -83,7 +84,7 @@ public class HomeController extends AbstractBaseController{
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"首页数据"
,
notes
=
"首页数据"
)
@GetMapping
(
value
=
"/getCheckData"
)
public
CommonResponse
getCheckData
()
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/InputItemController.java
View file @
e8d929a6
...
...
@@ -27,6 +27,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
...
@@ -46,7 +48,6 @@ import com.yeejoin.amos.maintenance.common.enums.DictTypeEnum;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.enums.QueryOperatorEnum
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.core.util.StringUtil
;
import
com.yeejoin.amos.maintenance.dao.entity.InputItem
;
...
...
@@ -77,7 +78,7 @@ public class InputItemController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增检查项"
,
notes
=
"新增检查项"
)
@RequestMapping
(
value
=
"/addItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
addNewItem
(
@ApiParam
(
value
=
"检查项信息"
)
@RequestBody
InputItemParam
param
)
{
...
...
@@ -108,7 +109,7 @@ public class InputItemController extends AbstractBaseController {
* @param itemID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"检查项ID"
,
notes
=
"检查项详情"
)
@RequestMapping
(
value
=
"/queryItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryItemDetail
(
@ApiParam
(
value
=
"巡检项ID"
)
@RequestParam
(
required
=
true
)
Long
itemID
)
{
...
...
@@ -120,7 +121,7 @@ public class InputItemController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"更新检查项"
,
notes
=
"更新检查项"
)
@RequestMapping
(
value
=
"/updateItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
updateItem
(
@ApiParam
(
value
=
"检查项详情"
,
required
=
false
)
@RequestBody
InputItemParam
param
)
{
...
...
@@ -148,7 +149,7 @@ public class InputItemController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"批量删除检查项"
,
notes
=
"批量删除检查项"
)
@RequestMapping
(
value
=
"/batchDelItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
batchDelItem
(
...
...
@@ -171,7 +172,7 @@ public class InputItemController extends AbstractBaseController {
* @param itemID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除检查项"
,
notes
=
"删除检查项"
)
@RequestMapping
(
value
=
"/delItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
delItem
(
@ApiParam
(
value
=
"巡检项ID"
)
@RequestParam
(
required
=
true
)
Long
itemID
)
{
...
...
@@ -189,7 +190,7 @@ public class InputItemController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"检查项另存为"
,
notes
=
"检查项另存为"
)
@RequestMapping
(
value
=
"/saveAs"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
saveAs
(
@ApiParam
(
value
=
"巡检项ID"
)
@RequestParam
(
required
=
true
)
String
itemIDs
)
{
...
...
@@ -216,7 +217,7 @@ public class InputItemController extends AbstractBaseController {
* @param pageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分页查询检查项"
,
notes
=
"分页查询检查项"
)
@RequestMapping
(
value
=
"/queryItemByPage"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryItemByPage
(
...
...
@@ -237,7 +238,7 @@ public class InputItemController extends AbstractBaseController {
* @param queryRequests
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryItemByCondition"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询检查项"
,
notes
=
"条件查询检查项"
)
public
CommonResponse
queryItemByCondition
(
...
...
@@ -262,7 +263,7 @@ public class InputItemController extends AbstractBaseController {
* @param params
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryCustomInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询检查项"
,
notes
=
"条件查询检查项"
)
public
CommonResponse
queryCustomInputItem
(
@RequestBody
HashMap
<
String
,
Object
>
params
)
{
...
...
@@ -278,7 +279,7 @@ public class InputItemController extends AbstractBaseController {
* @param queryRequests 查询条件
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryItemByCondition1"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询检查项"
,
notes
=
"条件查询检查项"
)
public
CommonResponse
queryItemByCondition1
(
...
...
@@ -320,7 +321,7 @@ public class InputItemController extends AbstractBaseController {
* @param queryRequests 查询条件
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点编号信息"
,
notes
=
"查询巡检点编号信息"
)
@GetMapping
(
value
=
"/queryItemNo/{itemId}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryItemNoList
(
...
...
@@ -375,7 +376,7 @@ public class InputItemController extends AbstractBaseController {
* @return
* @Since 2021-3-10
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/uploadListByTemplate"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"维保项信息导入"
,
notes
=
"维保项信息导入"
)
public
CommonResponse
uploadListByTemplate
(
MultipartFile
file
)
throws
Exception
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/MeasuresController.java
View file @
e8d929a6
...
...
@@ -8,11 +8,12 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IMeasuresService
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.dao.entity.Measure
;
import
io.swagger.annotations.Api
;
...
...
@@ -27,7 +28,7 @@ public class MeasuresController extends AbstractBaseController {
@Autowired
IMeasuresService
measuresService
;
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"add"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"新增风险措施"
,
notes
=
"新增风险措施"
)
public
CommonResponse
measuresAdd
(
@ApiParam
(
value
=
"风险措施参数"
,
required
=
false
)
@RequestBody
(
required
=
false
)
Measure
measure
)
{
...
...
@@ -39,7 +40,7 @@ public class MeasuresController extends AbstractBaseController {
return
CommonResponseUtil
.
success
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"update"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"修改风险措施"
,
notes
=
"修改风险措施"
)
public
CommonResponse
measuresUpdate
(
@ApiParam
(
value
=
"风险措施参数"
,
required
=
false
)
@RequestBody
(
required
=
false
)
Measure
measure
)
{
...
...
@@ -53,7 +54,7 @@ public class MeasuresController extends AbstractBaseController {
return
CommonResponseUtil
.
success
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"delete/{id}"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"删除风险措施"
,
notes
=
"删除风险措施"
)
public
CommonResponse
measuresDelete
(
@ApiParam
(
value
=
"风险措施id"
,
required
=
false
)
@PathVariable
(
required
=
true
)
Long
id
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/MsgController.java
View file @
e8d929a6
...
...
@@ -21,6 +21,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
...
@@ -44,7 +46,6 @@ import com.yeejoin.amos.maintenance.common.enums.CheckTypeEnum;
import
com.yeejoin.amos.maintenance.common.enums.MsgTypeEnum
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.dao.entity.Msg
;
import
com.yeejoin.amos.maintenance.dao.entity.MsgSubscribe
;
import
com.yeejoin.amos.maintenance.quartz.IJobService
;
...
...
@@ -90,7 +91,7 @@ public class MsgController extends AbstractBaseController {
* 获取用户当前所选择公司的消息订阅信息
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取用户当前所选择公司的消息订阅信息"
,
notes
=
"获取用户当前所选择公司的消息订阅信息"
)
@GetMapping
(
value
=
"/querySubscribe"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryMsgSetting
()
{
...
...
@@ -181,7 +182,7 @@ public class MsgController extends AbstractBaseController {
* @param subscribe
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存用户消息订阅信息"
,
notes
=
"保存用户消息订阅信息"
)
@PostMapping
(
value
=
"/saveSubscribe"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
saveSubscribe
(
@ApiParam
(
value
=
"消息订阅信息"
,
required
=
false
)
@RequestBody
(
required
=
true
)
List
<
MsgSubscribe
>
subscribe
)
{
...
...
@@ -252,7 +253,7 @@ public class MsgController extends AbstractBaseController {
* 根据登陆用户APP获取未读消息个数
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"APP根据登陆用户获取未读消息个数"
,
notes
=
"APP根据登陆用户获取未读消息个数"
)
@GetMapping
(
value
=
"/unreadCount"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getUnreadCount
()
{
...
...
@@ -270,7 +271,7 @@ public class MsgController extends AbstractBaseController {
* 获取消息类型
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"APP获取消息类型"
,
notes
=
"APP获取消息类型"
)
@GetMapping
(
value
=
"/MsgType"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getMsgType
()
{
...
...
@@ -288,7 +289,7 @@ public class MsgController extends AbstractBaseController {
* @param commonPageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"APP 根据条件获取消息列表"
,
notes
=
"APP 根据条件获取消息列表"
)
@PostMapping
(
value
=
"/msgList"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryMsgList
(
...
...
@@ -358,7 +359,7 @@ public class MsgController extends AbstractBaseController {
* @param commonPageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据条件获取消息列表"
,
notes
=
"APP 根据条件获取消息列表"
)
@PostMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
querylist
(
...
...
@@ -385,7 +386,7 @@ public class MsgController extends AbstractBaseController {
* @param msgId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"修改消失为已读"
,
notes
=
"修改消失为已读"
)
@PostMapping
(
value
=
"/isRead"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
isRead
(
...
...
@@ -404,7 +405,7 @@ public class MsgController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"通知发布"
,
notes
=
"通知发布"
)
@PostMapping
(
value
=
"/noticePublish"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
noticePublish
(
@ApiParam
(
value
=
"通知信息"
,
required
=
true
)
@RequestBody
NoticePublishParam
msg
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/PlanController.java
View file @
e8d929a6
...
...
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.param.PlanInfoPageParam
;
...
...
@@ -21,7 +23,6 @@ import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import
com.yeejoin.amos.maintenance.business.util.PlanPageParamUtil
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.dao.entity.Plan
;
import
io.swagger.annotations.Api
;
...
...
@@ -43,7 +44,7 @@ public class PlanController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检计划查询"
,
notes
=
"巡检计划查询"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCheckInfoPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -64,7 +65,7 @@ public class PlanController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"业主单位维保计划查询"
,
notes
=
"业主单位维保计划查询"
)
@RequestMapping
(
value
=
"/owner/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryInfoPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -82,7 +83,7 @@ public class PlanController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检计划新增及编辑"
,
notes
=
"巡检计划新增及编辑"
)
@RequestMapping
(
value
=
"/addPlan"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
checkPlanAdd
(
@ApiParam
(
value
=
"巡检计划"
,
required
=
true
)
@RequestBody
Plan
param
)
{
...
...
@@ -108,7 +109,7 @@ public class PlanController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检计划"
,
notes
=
"删除巡检计划"
)
@RequestMapping
(
value
=
"/deletePlanById"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
deletePlanById
(
...
...
@@ -129,7 +130,7 @@ public class PlanController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"另存巡检计划"
,
notes
=
"另存巡检计划"
)
@RequestMapping
(
value
=
"/saveAs"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
planSaveAs
(
@ApiParam
(
value
=
"参数"
,
required
=
true
)
@RequestBody
String
[]
param
)
{
...
...
@@ -148,7 +149,7 @@ public class PlanController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检计划明细"
,
notes
=
"查询巡检计划明细"
)
@RequestMapping
(
value
=
"/detail/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPointById
(
@ApiParam
(
value
=
"计划id"
,
required
=
true
)
@PathVariable
(
name
=
"id"
)
Long
id
)
{
...
...
@@ -165,7 +166,7 @@ public class PlanController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检计划查询"
,
notes
=
"巡检计划查询"
)
@RequestMapping
(
value
=
"/queryPlanByOrgCode"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCheckInfo
(
@ApiParam
(
value
=
"查询条件"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
)
{
...
...
@@ -177,7 +178,7 @@ public class PlanController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
list
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询计划列表(<font color='blue'>手机app</font>)"
,
notes
=
"查询计划列表(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPlanList"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPlanList
()
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/PlanTaskController.java
View file @
e8d929a6
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
controller
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletResponse
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
...
@@ -8,7 +33,11 @@ import com.yeejoin.amos.maintenance.business.param.PlanTaskPageParam;
import
com.yeejoin.amos.maintenance.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IPointService
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IRouteService
;
import
com.yeejoin.amos.maintenance.business.util.*
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.business.util.FileHelper
;
import
com.yeejoin.amos.maintenance.business.util.PlanTaskPageParamUtil
;
import
com.yeejoin.amos.maintenance.business.util.Toke
;
import
com.yeejoin.amos.maintenance.business.vo.CodeOrderVo
;
import
com.yeejoin.amos.maintenance.business.vo.PlanTaskVo
;
import
com.yeejoin.amos.maintenance.business.vo.PointInputItemVo
;
...
...
@@ -19,26 +48,14 @@ import com.yeejoin.amos.maintenance.common.enums.TaskIsOrderEnum;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.dao.entity.Point
;
import
com.yeejoin.amos.maintenance.dao.entity.PointClassify
;
import
com.yeejoin.amos.maintenance.exception.YeeException
;
import
com.yeejoin.amos.maintenance.feign.RemoteSecurityService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
@RestController
@RequestMapping
(
value
=
"/api/planTask"
)
...
...
@@ -66,7 +83,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param commonPageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划执行查询"
,
notes
=
"计划执行查询"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
getPlanTaskList
(
...
...
@@ -87,7 +104,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划执行重做"
,
notes
=
"计划执行重做"
)
@RequestMapping
(
value
=
"/regenPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
planTaskReGen
(
...
...
@@ -113,7 +130,7 @@ public class PlanTaskController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"初始化统计数据"
,
notes
=
"始化统计数据"
)
@RequestMapping
(
value
=
"/resetPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
resetPlanTask
(
@ApiParam
(
value
=
"组织编码"
,
required
=
false
)
@RequestParam
(
required
=
true
)
String
orgCode
)
{
...
...
@@ -142,7 +159,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param strArry
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划执行删除"
,
notes
=
"计划执行删除"
)
@RequestMapping
(
value
=
"/deletePlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
planTaskDelete
(
@ApiParam
(
value
=
"计划id数组"
,
required
=
true
)
@RequestBody
String
[]
strArry
)
{
...
...
@@ -158,7 +175,7 @@ public class PlanTaskController extends AbstractBaseController {
/**
* 执行计划导出
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"执行计划导出"
,
notes
=
"执行计划导出"
)
@PostMapping
(
value
=
"/reportPlanTask"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
)
public
void
planTaskReport
(
...
...
@@ -178,7 +195,7 @@ public class PlanTaskController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录"
,
notes
=
"导出巡检记录"
)
@RequestMapping
(
value
=
"/exportSelectPlanTask"
,
method
=
RequestMethod
.
GET
)
public
void
exportSelectPlanTask
(
...
...
@@ -212,7 +229,7 @@ public class PlanTaskController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"模拟定时任务调起服务"
,
notes
=
"模拟定时任务调起服务"
)
@RequestMapping
(
value
=
"/schJobTest"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
schJobTest
(
@ApiParam
(
value
=
"跑批日期格式yyyyMMdd"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
runDate
)
{
...
...
@@ -234,7 +251,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param planTaskId 巡检任务Id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据点查询用户权限所有巡检执行计划(<font color='blue'>手机app</font>)"
,
notes
=
"根据点查询用户权限所有巡检执行计划(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPlanTaskBySerial"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryPlanTaskByPoint
(
...
...
@@ -296,7 +313,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param pointId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
//@Authorization(ingore = true)
@ApiOperation
(
value
=
"根据计划任务ID和点ID初始化巡检页面(<font color='blue'>手机app</font>)"
,
notes
=
"根据计划任务ID和点ID初始化巡检页面((<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/initPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -368,7 +385,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param pointId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
// @Authorization(ingore = true)
@ApiOperation
(
value
=
"根据计划任务ID和点ID初始化巡检页面(<font color='blue'>手机app</font>)"
,
notes
=
"根据计划任务ID和点ID初始化巡检页面((<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/v2/initPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -435,7 +452,7 @@ public class PlanTaskController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据计划任务ID查询计划任务详情和任务点(<font color='blue'>手机app</font>)"
,
notes
=
"根据计划任务ID查询计划任务详情和任务点(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPlanTaskById"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryPlanTaskById
(
...
...
@@ -471,7 +488,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
(
isPersonIdentity
=
true
)
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保任务查询-mobile"
,
notes
=
"根据用户条件查询所有计划任务"
)
@RequestMapping
(
value
=
"/queryPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryLoginUserPlanTask
(
...
...
@@ -512,7 +529,7 @@ public class PlanTaskController extends AbstractBaseController {
/**
* 查询任务列表
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取用户当前所正在进行中和尚未开始的任务个数(<font color='blue'>手机app</font>)"
,
notes
=
"获取用户当前所欲呕正在进行中和尚未开始的任务个数(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPlanTaskCount"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
hasPlanTask
()
{
...
...
@@ -525,7 +542,7 @@ public class PlanTaskController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryPlanTaskStatistics"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"查询用户计划任务统计(<font color='blue'>手机app</font>)"
,
notes
=
"查询用户计划任务统计(<font color='blue'>手机app</font>)<br />font color='blue'>参数: startTime, endTime </font>"
)
public
CommonResponse
queryPlanTaskStatistics
(
...
...
@@ -563,7 +580,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param pointId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据任务id和点id获取“未开始”任务点详情(<font color='blue'>手机app</font>)"
,
notes
=
"根据任务id和点id获取“未开始”任务点详情(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPointPlanTaskDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPointPlanTaskDetail
(
...
...
@@ -588,7 +605,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param pointId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据任务id和点id获取“未开始”任务点详情(<font color='blue'>手机app</font>)"
,
notes
=
"根据任务id和点id获取“未开始”任务点详情(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/v2/queryPointPlanTaskDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPointPlanTaskDetailInVersion2
(
...
...
@@ -611,7 +628,7 @@ public class PlanTaskController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
//@Authorization(ingore = true)
@ApiOperation
(
value
=
"获取离线巡检数据"
,
notes
=
"取离线巡检数据"
)
@RequestMapping
(
value
=
"/queryLeavePlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -633,7 +650,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param createDate
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"业务查询巡检点时间戳数据"
,
notes
=
"业务查询巡检点时间戳数据"
)
@RequestMapping
(
value
=
"/queryPlanTaskTimeAxis"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPlanTaskTimeAxis
(
...
...
@@ -656,7 +673,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param createDate
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"业务查询巡检点时间戳数据"
,
notes
=
"业务查询巡检点时间戳数据"
)
@RequestMapping
(
value
=
"/queryTimeAxis"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryTimeAxis
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/PointController.java
View file @
e8d929a6
...
...
@@ -28,6 +28,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
...
@@ -50,7 +52,6 @@ import com.yeejoin.amos.maintenance.business.vo.PointVo;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.response.PointResponse
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.dao.entity.Point
;
import
com.yeejoin.amos.maintenance.dao.entity.PointClassify
;
import
com.yeejoin.amos.maintenance.feign.RemoteSecurityService
;
...
...
@@ -81,7 +82,7 @@ public class PointController extends AbstractBaseController {
* @param pointParam
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增巡检点"
,
notes
=
"新增巡检点"
)
@PostMapping
(
value
=
"/addPoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addPoint
(
@ApiParam
(
value
=
"巡检点"
,
required
=
true
)
@RequestBody
PointParam
pointParam
)
{
...
...
@@ -104,7 +105,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增移动巡检点(<font color='blue'>手机app</font>)"
,
notes
=
"新增移动巡检点(<font color='blue'>手机app</font>)"
)
@PostMapping
(
value
=
"/addMovePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addMovePoint
(
@RequestBody
MovePointParam
param
)
{
...
...
@@ -132,7 +133,7 @@ public class PointController extends AbstractBaseController {
* @param ids
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检点"
,
notes
=
"删除巡检点"
)
@DeleteMapping
(
value
=
"/deletePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
deletePoint
(
@ApiParam
(
value
=
"巡检点ID"
,
required
=
true
)
@RequestParam
Long
[]
ids
)
{
...
...
@@ -151,7 +152,7 @@ public class PointController extends AbstractBaseController {
* @param pointParam
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"更新巡检点"
,
notes
=
"更新巡检点"
)
@PutMapping
(
value
=
"/updatePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updatePoint
(
@ApiParam
(
value
=
"巡检点"
,
required
=
true
)
@RequestBody
PointParam
pointParam
)
{
...
...
@@ -171,7 +172,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@GetMapping
(
value
=
"/queryPointById/{id}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointById
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@PathVariable
(
name
=
"id"
)
Long
id
)
{
...
...
@@ -184,7 +185,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点详情<font color='blue'>手机app</font>)"
,
notes
=
"查询巡检点详情<font color='blue'>手机app</font>)"
)
@GetMapping
(
value
=
"/queryPointDetailById"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointDetailById
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
(
name
=
"pointId"
)
Long
id
)
{
...
...
@@ -198,7 +199,7 @@ public class PointController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点详情<font color='blue'>手机app</font>)"
,
notes
=
"查询巡检点详情<font color='blue'>手机app</font>)"
)
@GetMapping
(
value
=
"/v2/queryPointDetailById"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointDetailByIdInVersion2
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
(
name
=
"pointId"
)
Long
id
)
{
...
...
@@ -218,7 +219,7 @@ public class PointController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@PostMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listPoint
(
...
...
@@ -244,7 +245,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@PostMapping
(
value
=
"/{ownerId}/list-with-item"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listPointWithRoute
(
...
...
@@ -272,7 +273,7 @@ public class PointController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询所有检查点"
,
notes
=
"查询所有检查点"
)
@PostMapping
(
value
=
"/list/all"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listAllPoint
()
{
...
...
@@ -317,7 +318,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导入导入模板"
,
notes
=
"导入导入模板"
)
@PostMapping
(
value
=
"/exportTemplate"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
exportTemplate
(
HttpServletResponse
response
)
{
...
...
@@ -349,7 +350,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@PostMapping
(
value
=
"/exportListPoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
exportListPoint
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -376,7 +377,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@GetMapping
(
value
=
"/exportListPointByIds"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
exportListPointByIds
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestParam
(
value
=
"ids"
,
required
=
false
)
Long
[]
ids
,
...
...
@@ -405,7 +406,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息(<font color='blue'>手机app</font>)"
,
notes
=
"查询巡检点信息(<font color='blue'>手机app</font>)"
)
@PostMapping
(
value
=
"/queryPointByPage"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointByPage
(
...
...
@@ -431,7 +432,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询用户登录公司全部巡检点"
,
notes
=
"查询用户登录公司全部巡检点"
)
@GetMapping
(
value
=
"/authPoints"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listPoint
(
@ApiParam
(
value
=
"巡检点编码"
,
required
=
false
)
@RequestParam
(
"ids"
)
List
<
String
>
ids
,
...
...
@@ -453,7 +454,7 @@ public class PointController extends AbstractBaseController {
* @param name
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询用户登录公司全部巡检点"
,
notes
=
"查询用户登录公司全部巡检点"
)
@GetMapping
(
value
=
"/queryPoints"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPoints
(
@ApiParam
(
value
=
"巡检点编码"
,
required
=
false
)
@RequestParam
(
"code"
)
String
code
,
...
...
@@ -475,7 +476,7 @@ public class PointController extends AbstractBaseController {
* @param ids
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"另存巡检点"
,
notes
=
"另存巡检点"
)
@PostMapping
(
value
=
"/saveAs"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
saveAs
(
@ApiParam
(
value
=
"巡检点id集合"
,
required
=
true
)
@RequestParam
Long
[]
ids
)
{
...
...
@@ -501,7 +502,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点的巡检项"
,
notes
=
"查询巡检点的巡检项"
)
@PostMapping
(
value
=
"/queryPointInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointInputItem
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
)
{
...
...
@@ -520,7 +521,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点的巡检项"
,
notes
=
"查询巡检点的巡检项"
)
@GetMapping
(
value
=
"/queryEquipPointInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryEquipPointInputItem
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
)
{
...
...
@@ -539,7 +540,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点的分类"
,
notes
=
"查询巡检点的分类"
)
@PostMapping
(
value
=
"/queryPointClassify"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointClassify
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
)
{
...
...
@@ -558,7 +559,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据分类id查询对应项"
,
notes
=
"根据分类id查询对应项"
)
@PostMapping
(
value
=
"/queryPointInputItemByClassify"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointInputItemByClassify
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
,
...
...
@@ -578,7 +579,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据点id查询点的分类及对应项"
,
notes
=
"根据点id查询点的分类及对应项"
)
@PostMapping
(
value
=
"/queryPointClassifyWithInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointClassifyWithInputItem
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
)
{
...
...
@@ -598,7 +599,7 @@ public class PointController extends AbstractBaseController {
* @param isOffine
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"设置巡检点巡检模式"
,
notes
=
"设置巡检点巡检模式"
)
@PostMapping
(
value
=
"/setPatrolMode"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
setPatrolMode
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
,
...
...
@@ -615,7 +616,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询用户权限点信息饼图(<font color='blue'>手机app</font>)"
,
notes
=
"查询用户权限点信息饼图(<font color='blue'>手机app</font>)"
)
@GetMapping
(
value
=
"/queryPointPie"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointPie
()
{
...
...
@@ -627,7 +628,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
response
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询用户权限点信息柱状图(<font color='blue'>手机app</font>)"
,
notes
=
"查查询用户权限点信息柱状图(<font color='blue'>手机app</font>)"
)
@GetMapping
(
value
=
"/queryPointHistogram"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointHistogram
()
{
...
...
@@ -674,7 +675,7 @@ public class PointController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点编号信息"
,
notes
=
"查询巡检点编号信息"
)
@GetMapping
(
value
=
"/queryPointNo/{pointId}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointNoList
(
...
...
@@ -708,7 +709,7 @@ public class PointController extends AbstractBaseController {
* @param startTime
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询离线点信息"
,
notes
=
"查询离线点信息"
)
@GetMapping
(
value
=
"/queryLeavelPoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryLeavelPoint
(
@ApiParam
(
value
=
"数据同步开始时间(不传为全部同步)"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
startTime
)
{
...
...
@@ -720,7 +721,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
queryLeavelPoint
(
getToken
(),
getProduct
(),
getAppKey
(),
loginOrgCode
,
startTime
));
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询点信息json"
,
notes
=
"查询点信息json"
)
@GetMapping
(
value
=
"/getPointConfigJson"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getPointConfigJson
()
{
...
...
@@ -728,7 +729,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
getPointConfigDom
());
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询点信息xml"
,
notes
=
"查询点信息xml"
)
@GetMapping
(
value
=
"/getPointConfigDom"
,
produces
=
MediaType
.
APPLICATION_XML_VALUE
)
public
List
<
PointResponse
>
getPointConfigDom
()
{
...
...
@@ -736,7 +737,7 @@ public class PointController extends AbstractBaseController {
return
iPointService
.
getPointConfigDom
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出IEC104点位表"
,
notes
=
"导出IEC104点位表"
)
@PostMapping
(
value
=
"/exportPoint/iec"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
exportIecPoint
(
HttpServletResponse
response
)
{
...
...
@@ -752,7 +753,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*巡检点筛选分页列表"
,
notes
=
"新*巡检点筛选分页列表"
)
@GetMapping
(
value
=
"/list-new"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointList4Route
(
...
...
@@ -764,7 +765,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
queryPointList4Route
(
riskSourceId
,
pointNo
,
name
,
current
,
size
));
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点列表"
,
notes
=
"新*查询巡检点列表"
)
@GetMapping
(
value
=
"/route-list-new"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointListByRouteId
(
...
...
@@ -772,7 +773,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
queryPointListByRouteId
(
routeId
));
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点对应设备列表"
,
notes
=
"新*查询巡检点对应设备列表"
)
@GetMapping
(
value
=
"/equip-list-new"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryEquipListByPointId
(
...
...
@@ -780,7 +781,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
queryEquipListByPointId
(
pointId
));
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点对应设备列表"
,
notes
=
"新*查询巡检点对应设备列表"
)
@GetMapping
(
value
=
"/item-list-new"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryItemList4RoutePoint
(
...
...
@@ -794,7 +795,7 @@ public class PointController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点列表"
,
notes
=
"新*查询巡检点列表"
)
@GetMapping
(
value
=
"/regionTress"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getRegionTress
()
{
...
...
@@ -806,7 +807,7 @@ public class PointController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"装备维保项"
,
notes
=
"装备维保项"
)
@RequestMapping
(
value
=
"/equipmentInput"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
syncSavePoint
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/QueryStatsController.java
View file @
e8d929a6
...
...
@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.param.CheckStatsListPageParam
;
...
...
@@ -19,7 +21,6 @@ import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import
com.yeejoin.amos.maintenance.business.vo.CheckStatsVo
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -39,7 +40,7 @@ public class QueryStatsController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@PostMapping
(
value
=
"/checkStats"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryCheckStats
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/RouteController.java
View file @
e8d929a6
...
...
@@ -20,6 +20,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.param.RoutePageParam
;
...
...
@@ -30,7 +32,6 @@ import com.yeejoin.amos.maintenance.business.util.RoutePageParamUtil;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.request.RoutePointInputItemRequest
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.dao.entity.InputItem
;
import
com.yeejoin.amos.maintenance.dao.entity.Plan
;
import
com.yeejoin.amos.maintenance.dao.entity.Route
;
...
...
@@ -56,7 +57,7 @@ public class RouteController extends AbstractBaseController {
* @param route 路线
* @return CommonResponse
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增巡检路线"
,
notes
=
"新增巡检路线"
)
@PostMapping
(
value
=
"/addRoute"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addRoute
(
@ApiParam
(
value
=
"巡检路线"
,
required
=
true
)
@RequestBody
Route
route
)
{
...
...
@@ -83,7 +84,7 @@ public class RouteController extends AbstractBaseController {
* @param route
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"更新巡检路线"
,
notes
=
"更新巡检路线"
)
@PutMapping
(
value
=
"/updateRoute"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updateRoute
(
@ApiParam
(
value
=
"巡检路线"
,
required
=
true
)
@RequestBody
Route
route
)
{
...
...
@@ -106,7 +107,7 @@ public class RouteController extends AbstractBaseController {
* @param routeIds
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检路线"
,
notes
=
"删除巡检路线"
)
@DeleteMapping
(
value
=
"/deleteRoute"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
deleteRoute
(
@ApiParam
(
value
=
"巡检路线ID"
,
required
=
false
)
@RequestParam
List
<
Long
>
routeIds
)
{
...
...
@@ -151,7 +152,7 @@ public class RouteController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检路线信息"
,
notes
=
"查询巡检路线信息"
)
@GetMapping
(
value
=
"/queryRouteById/{id}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryRouteById
(
...
...
@@ -165,7 +166,7 @@ public class RouteController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"迁移路线上点到其他路线"
,
notes
=
"迁移路线上点到其他路线"
)
@PostMapping
(
value
=
"/migrateRoutePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
migrateRoutePoint
(
...
...
@@ -186,7 +187,7 @@ public class RouteController extends AbstractBaseController {
*
* @return CommonResponse
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检路线信息"
,
notes
=
"查询巡检路线信息"
)
@PostMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listRoute
(
...
...
@@ -205,7 +206,7 @@ public class RouteController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询当前登录公司的的所有巡检路线"
,
notes
=
"查询当前登录公司的的所有巡检路线"
)
@GetMapping
(
value
=
"/All"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryAllRoute
(
...
...
@@ -228,7 +229,7 @@ public class RouteController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询所有路线列表<font color='blue'>手机app</font>"
,
notes
=
"查询所有路线列表<font color='blue'>手机app</font>"
)
@GetMapping
(
value
=
"/routeList"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryRouteList
()
{
...
...
@@ -249,7 +250,7 @@ public class RouteController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检路线上点列表"
,
notes
=
"查询巡检路线上点列表"
)
@PostMapping
(
value
=
"/{routeId}/listRoutePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listRoutePoint
(
@PathVariable
Long
routeId
)
{
...
...
@@ -262,7 +263,7 @@ public class RouteController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检路线上点列表"
,
notes
=
"查询巡检路线上点列表"
)
@PutMapping
(
value
=
"/exchangeOrderNumber"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
exchangeRoutePointOrderNumber
(
@ApiParam
(
value
=
"路线巡检点id"
,
required
=
true
)
@RequestParam
long
src
,
...
...
@@ -279,7 +280,7 @@ public class RouteController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检路线上增加巡检点"
,
notes
=
"巡检路线上增加巡检点"
)
@PostMapping
(
value
=
"/addRoutePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addRoutePoint
(
@ApiParam
(
value
=
"路线id"
,
required
=
true
)
@RequestParam
String
routeId
,
...
...
@@ -316,7 +317,7 @@ public class RouteController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检路线上删除巡检点"
,
notes
=
"巡检路线上删除巡检点"
)
@DeleteMapping
(
value
=
"/deleteRoutePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
deleteRoutePoint
(
@ApiParam
(
value
=
"路线id"
,
required
=
true
)
@RequestParam
Long
routeId
,
...
...
@@ -336,7 +337,7 @@ public class RouteController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"列出巡检线路点的巡检项"
,
notes
=
"列出巡检线路点的巡检项"
)
@PostMapping
(
value
=
"/listRoutePointInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listRoutePointInputItem
(
@ApiParam
(
value
=
"路线id"
,
required
=
true
)
@RequestBody
RoutePointInputItemRequest
request
)
{
...
...
@@ -355,7 +356,7 @@ public class RouteController extends AbstractBaseController {
* @param pointId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"列出巡检线路点的分类及巡检项"
,
notes
=
"列出巡检线路点的分类及巡检项"
)
@PostMapping
(
value
=
"/listRoutePointInputItemWithClassify"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listRoutePointInputItemWithClassify
(
@ApiParam
(
value
=
"路线id"
,
required
=
true
)
@RequestParam
long
routeId
,
...
...
@@ -377,7 +378,7 @@ public class RouteController extends AbstractBaseController {
* @param inputItemIds
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"修改巡检线路点的巡检项"
,
notes
=
"修改巡检线路点的巡检项"
)
@PostMapping
(
value
=
"/updateRoutePointInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updateRoutePointInputItem
(
@ApiParam
(
value
=
"巡检路线id"
,
required
=
true
)
@RequestParam
Long
routeId
,
...
...
@@ -397,7 +398,7 @@ public class RouteController extends AbstractBaseController {
*
* @return IDs
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检路线上的所有点ID"
,
notes
=
"获取巡检路线上的所有点ID"
)
@RequestMapping
(
value
=
"/points/{routeID}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
getPointIDByRouyeId
(
@ApiParam
(
value
=
"巡检路线ID"
)
@PathVariable
(
required
=
true
)
Long
routeID
)
{
...
...
@@ -410,7 +411,7 @@ public class RouteController extends AbstractBaseController {
*
* @return IDs
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检路线上的所有点ID"
,
notes
=
"获取巡检路线上的所有点ID"
)
@RequestMapping
(
value
=
"/points"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
getPointIDByRouteId
(
@ApiParam
(
value
=
"巡检路线ID信息"
)
@RequestBody
(
required
=
true
)
Map
routeInfo
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/SafetyController.java
View file @
e8d929a6
...
...
@@ -9,11 +9,12 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.feign.RemoteSecurityService
;
import
io.swagger.annotations.Api
;
...
...
@@ -57,7 +58,7 @@ public class SafetyController extends AbstractBaseController{
/**
* 保存登陆用户选择公司信息
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
" 保存登陆用户选择公司信息"
,
notes
=
" 保存登陆用户选择公司信息"
)
@PostMapping
(
value
=
"/save/curCompany"
)
public
CommonResponse
saveCurCompany
(
@RequestBody
ReginParams
reginParams
)
{
...
...
@@ -71,7 +72,7 @@ public class SafetyController extends AbstractBaseController{
/**
* 保存登陆用户选择公司信息(换流站项目登录巡检)
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存登陆用户选择公司信息"
,
notes
=
"保存登陆用户选择公司信息"
)
@GetMapping
(
value
=
"/save/shortCutCompany"
)
public
CommonResponse
specialSaveCurCompany
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/SafetyPreCtrlController.java
View file @
e8d929a6
...
...
@@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
...
@@ -41,7 +43,6 @@ import com.yeejoin.amos.maintenance.core.common.request.CommonPageable;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.response.CommonPage
;
import
com.yeejoin.amos.maintenance.core.common.response.QueryCriteriaRespone
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.dao.entity.Measure
;
import
com.yeejoin.amos.maintenance.feign.RemoteSecurityService
;
...
...
@@ -71,7 +72,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检点统计"
,
notes
=
"巡检点统计"
)
@RequestMapping
(
value
=
"/countPoint"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
sumCheckPtById
()
{
...
...
@@ -89,7 +90,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param dateMonth
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检情况统计"
,
notes
=
"巡检情况统计"
)
@RequestMapping
(
value
=
"/countMonth/{dateMonth}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
countMonthCheckById
(
@ApiParam
(
value
=
"年月日(yyyyMMdd)8位"
,
required
=
false
)
@PathVariable
String
dateMonth
)
{
...
...
@@ -107,7 +108,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检执行情况查询"
,
notes
=
"巡检执行情况查询"
)
@RequestMapping
(
value
=
"/checkExecute/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
findChkExList
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -126,7 +127,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检点列表查询接口(<font color='blue'>release</font>)"
,
notes
=
"获取巡检点列表查询接口"
)
@RequestMapping
(
value
=
"/point/queryCriteria/init"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getQueryCriteriaInit
()
{
...
...
@@ -147,7 +148,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检记录统计"
,
notes
=
"巡检记录统计"
)
@RequestMapping
(
value
=
"/check-info/count"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
countCheckInfoDate
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
HashMap
<
String
,
Object
>
map
)
{
...
...
@@ -167,7 +168,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param PointID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检点id查询巡检人员"
,
notes
=
"根据巡检点id查询巡检人员"
)
@RequestMapping
(
value
=
"/check-user/{PointID}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryCheckUserById
(
@ApiParam
(
value
=
"点编号"
,
required
=
true
)
@PathVariable
int
PointID
)
{
...
...
@@ -186,7 +187,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检记录查询"
,
notes
=
"巡检记录查询"
)
@RequestMapping
(
value
=
"/check-info/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCheckInfoPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -206,7 +207,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检记录id查询巡检检查项"
,
notes
=
"根据巡检记录id查询巡检检查项"
)
@RequestMapping
(
value
=
"check-input"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
fetchCheckInputById
(
@ApiParam
(
value
=
"查询参数"
,
required
=
true
)
@RequestBody
CheckDetailInputPageParam
param
)
{
...
...
@@ -231,7 +232,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检记录id查询巡检点装备(新)"
,
notes
=
"根据巡检记录id查询巡检点装备(新)"
)
@RequestMapping
(
value
=
"check-input-new"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
newfetchCheckInputById
(
@ApiParam
(
value
=
"查询参数"
,
required
=
true
)
@RequestBody
CheckDetailInputPageParam
param
)
{
...
...
@@ -245,7 +246,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检记录id查询巡检点装备(新)"
,
notes
=
"根据巡检记录id查询巡检点装备(新)"
)
@RequestMapping
(
value
=
"equip-input"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
newfetchEquipInputById
(
@ApiParam
(
value
=
"查询参数"
,
required
=
true
)
@RequestBody
CheckDetailInputPageParam
param
)
{
...
...
@@ -253,7 +254,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkInputBos
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风险点管控措施"
,
notes
=
"风险点管控措施"
)
@ApiImplicitParam
(
name
=
"PointID"
,
value
=
"风险点ID"
,
dataType
=
"int"
,
paramType
=
"path"
)
@RequestMapping
(
value
=
"/measures/{PointID}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -272,7 +273,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param commonPageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风险点查询"
,
notes
=
"风险点查询"
)
@RequestMapping
(
value
=
"/point/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
findPointList
(
...
...
@@ -286,7 +287,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkPtListBo
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风险点"
,
notes
=
"通过ID查询风险点"
)
@ApiImplicitParam
(
name
=
"PointID"
,
value
=
"风险点ID"
,
dataType
=
"int"
,
paramType
=
"path"
)
@RequestMapping
(
value
=
"/queryPointById/{PointID}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -335,7 +336,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
point
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检记录id查询巡检详细信息"
,
notes
=
"根据巡检记录id查询巡检详细信息"
)
@RequestMapping
(
value
=
"check-detail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
fetchCheckDetailById
(
...
...
@@ -344,7 +345,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkDetail
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/state"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"获取巡检点状态枚举集合"
,
notes
=
"获取巡检点状态枚举集合"
)
public
CommonResponse
getCheckState
()
{
...
...
@@ -367,7 +368,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/check/state"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"获取巡检点状态枚举集合"
,
notes
=
"获取巡检点状态枚举集合"
)
public
CommonResponse
getCheckStateList
()
{
...
...
@@ -380,7 +381,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检轨迹查询"
,
notes
=
"巡检轨迹查询"
)
@RequestMapping
(
value
=
"/trajectory/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
findTrajectoryList
(
...
...
@@ -406,7 +407,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
// @
Permission
// @
TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation
(
value
=
"点id"
,
notes
=
"路线计划点最近巡检记录查询"
)
@RequestMapping
(
value
=
"/routePlanPoint/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
findRoutePlanPointList
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
)
{
...
...
@@ -419,7 +420,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkChkExListBo
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询条件初始化口(<font color='blue'>release</font>)"
,
notes
=
"查询条件初始化口"
)
@RequestMapping
(
value
=
"/queryConditions/init/{type}"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
findCheckSystemInit
(
@ApiParam
(
value
=
"类型"
,
required
=
true
)
@PathVariable
String
type
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/SynDataController.java
View file @
e8d929a6
...
...
@@ -10,6 +10,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.param.SynInputItemParam
;
...
...
@@ -20,7 +22,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.ISynDataService;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.business.util.Toke
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -46,7 +47,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 同步巡检项
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检项"
,
notes
=
"同步巡检项"
)
@PostMapping
(
value
=
"/inputItem/{operationType}"
)
public
CommonResponse
inputItem
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
...
...
@@ -77,7 +78,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 同步巡检点
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检点"
,
notes
=
"同步巡检点"
)
@PostMapping
(
value
=
"/point/{operationType}"
)
public
CommonResponse
point
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
...
...
@@ -108,7 +109,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 同步巡检点和巡检项关系
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检点和巡检项关系"
,
notes
=
"同步巡检点和巡检项关系"
)
@PostMapping
(
value
=
"/pointItem/relation/{operationType}"
)
public
CommonResponse
relation
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
...
...
@@ -135,7 +136,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 同步巡检路线
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检路线"
,
notes
=
"同步巡检路线"
)
@PostMapping
(
value
=
"/route/{operationType}"
)
public
CommonResponse
route
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
...
...
@@ -164,7 +165,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 同步巡检计划
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检计划"
,
notes
=
"同步巡检计划"
)
@PostMapping
(
value
=
"/plan/{operationType}"
)
public
CommonResponse
plan
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
...
...
@@ -197,7 +198,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 停用巡检计划
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"停用巡检计划"
,
notes
=
"停用巡检计划"
)
@PostMapping
(
value
=
"/stopPlan"
)
public
CommonResponse
stopPlan
(
@ApiParam
(
value
=
"巡检计划信息"
,
required
=
true
)
@RequestParam
String
originalId
)
{
...
...
@@ -217,7 +218,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 获取巡检计划已完成次数
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检计划已完成次数"
,
notes
=
"获取巡检计划已完成次数"
)
@GetMapping
(
value
=
"/plan/getFinishTimes"
)
public
CommonResponse
getPlanFinishTimes
(
@ApiParam
(
value
=
"巡检计划原始编号(多个逗号隔开)"
,
required
=
true
)
@RequestParam
String
originalIds
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/TaskController.java
View file @
e8d929a6
...
...
@@ -42,6 +42,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.thoughtworks.xstream.XStream
;
import
com.thoughtworks.xstream.io.xml.DomDriver
;
...
...
@@ -70,7 +72,6 @@ import com.yeejoin.amos.maintenance.core.async.AsyncTask;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.response.QueryCriteriaRespone
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.core.util.DateUtil
;
import
com.yeejoin.amos.maintenance.dao.entity.Task
;
import
com.yeejoin.amos.maintenance.dao.entity.TaskFeedback
;
...
...
@@ -108,7 +109,7 @@ public class TaskController extends AbstractBaseController{
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增任务"
,
notes
=
"新增任务"
)
@RequestMapping
(
value
=
"/addTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
addNewTask
(
@RequestBody
TaskParam
param
)
{
...
...
@@ -140,7 +141,7 @@ public class TaskController extends AbstractBaseController{
* @param taskID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务详情"
,
notes
=
"任务详情"
)
@RequestMapping
(
value
=
"/queryTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryTaskDetail
(
@ApiParam
(
value
=
"任务ID"
)
@RequestParam
(
required
=
true
)
long
taskID
)
{
...
...
@@ -200,7 +201,7 @@ public class TaskController extends AbstractBaseController{
* @param taskID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务详情"
,
notes
=
"任务详情"
)
@RequestMapping
(
value
=
"/printTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
printTaskDetail
(
@ApiParam
(
value
=
"任务ID"
)
@RequestParam
(
required
=
true
)
long
taskID
)
{
...
...
@@ -262,7 +263,7 @@ public class TaskController extends AbstractBaseController{
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"更新任务"
,
notes
=
"更新任务"
)
@RequestMapping
(
value
=
"/updateTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
updateTask
(
@ApiParam
(
value
=
"修改任务信息"
)
@RequestBody
TaskParam
param
)
{
...
...
@@ -283,7 +284,7 @@ public class TaskController extends AbstractBaseController{
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"处理任务"
,
notes
=
"处理任务"
)
@RequestMapping
(
value
=
"/handleTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
handleTask
(
@ApiParam
(
value
=
"任务ID"
,
required
=
true
)
@RequestParam
String
taskIds
,
...
...
@@ -309,7 +310,7 @@ public class TaskController extends AbstractBaseController{
* @param taskID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除任务"
,
notes
=
"删除任务"
)
@RequestMapping
(
value
=
"/delTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
delTask
(
@ApiParam
(
value
=
"任务ID"
,
required
=
true
)
@RequestParam
long
taskID
)
{
...
...
@@ -327,7 +328,7 @@ public class TaskController extends AbstractBaseController{
* @param taskID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除任务"
,
notes
=
"批量删除删除任务(任务id以半角英文字符分割。如: 1,2)"
)
@RequestMapping
(
value
=
"/batchDelTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
batchDelTask
(
@ApiParam
(
value
=
"任务ID"
,
required
=
true
)
@RequestParam
String
taskIDs
)
{
...
...
@@ -345,7 +346,7 @@ public class TaskController extends AbstractBaseController{
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务回复"
,
notes
=
"任务回复"
)
@RequestMapping
(
value
=
"/feedbackTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
feedbackTask
(
@ApiParam
(
value
=
"回复信息(包含图片base64编码)"
)
@RequestBody
FeedbackParam
param
)
{
...
...
@@ -409,7 +410,7 @@ public class TaskController extends AbstractBaseController{
* @param taskID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务转发"
,
notes
=
"任务转发"
)
@RequestMapping
(
value
=
"/forwardTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
forwardTask
(
@RequestParam
(
required
=
true
)
String
userId
,
@RequestParam
(
required
=
true
)
long
taskID
)
{
...
...
@@ -432,7 +433,7 @@ public class TaskController extends AbstractBaseController{
* @param pageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分页查询任务"
,
notes
=
"人也查询任务"
)
@RequestMapping
(
value
=
"/queryTaskByPage"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryTaskByPage
(
...
...
@@ -470,7 +471,7 @@ public class TaskController extends AbstractBaseController{
* @param queryRequests
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryTaskByCondition"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询任务"
,
notes
=
"条件查询任务"
)
public
CommonResponse
queryTaskByCondition
(
...
...
@@ -491,7 +492,7 @@ public class TaskController extends AbstractBaseController{
* @param queryRequests
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryTaskCountByCondition"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询任务个数"
,
notes
=
"条件查询任务个数"
)
public
CommonResponse
queryTaskCountByCondition
(
...
...
@@ -507,7 +508,7 @@ public class TaskController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
count
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryTaskCharts"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询任务图表数据(<font color='blue'>手机app</font>)"
,
notes
=
"条件查询任务图表数据(<font color='blue'>手机app</font>)"
)
public
CommonResponse
queryTaskCharts
(
@ApiParam
(
value
=
"组合查询条件"
,
required
=
false
,
defaultValue
=
"[]"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
)
{
...
...
@@ -556,7 +557,7 @@ public class TaskController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
charts
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryTasksByPage"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询任务数据(<font color='blue'>手机app</font>)"
,
notes
=
"条件查询任务数据(<font color='blue'>手机app</font>)"
)
public
CommonResponse
queryTasksByPage
(
@ApiParam
(
value
=
"组合查询条件"
,
required
=
false
,
defaultValue
=
"[]"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -612,7 +613,7 @@ public class TaskController extends AbstractBaseController{
* 获取任务列表查询接口
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取任务列表查询接口(<font color='blue'>release</font>)"
,
notes
=
"获取任务列表查询接口"
)
@RequestMapping
(
value
=
"/queryCriteria/init"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getQueryCriteriaInit
(){
...
...
@@ -653,7 +654,7 @@ public class TaskController extends AbstractBaseController{
* @param dateMonth
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"隐患治理统计"
,
notes
=
"隐患治理统计"
)
@RequestMapping
(
value
=
"/hiddenDanger/count/{dateMonth}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
hiddenDangerCountByDate
(
@ApiParam
(
value
=
"年月日(yyyyMMdd)8位"
,
required
=
true
)
@PathVariable
String
dateMonth
)
{
...
...
@@ -685,7 +686,7 @@ public class TaskController extends AbstractBaseController{
* 根据巡检路线ID获取该路线上的所有点ID
* @return IDs
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检路线上的所有点ID"
,
notes
=
"获取巡检路线上的所有点ID"
)
@RequestMapping
(
value
=
"/points"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
getPointIDsByRouteID
(
@ApiParam
(
value
=
"巡检路线IDs"
)
@RequestBody
(
required
=
true
)
RoutePointParam
param
)
{
...
...
@@ -699,7 +700,7 @@ public class TaskController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
result
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/queryTaskStatistics"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"查询用户任务统计(<font color='blue'>手机app</font>)"
,
notes
=
"查询用户任务统计(<font color='blue'>手机app</font>)"
)
public
CommonResponse
getUserTaskStatistics
()
{
...
...
@@ -734,7 +735,7 @@ public class TaskController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
resp
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getStatisticsData"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"查询任务统计"
,
notes
=
"查询任务统计"
)
public
CommonResponse
getTaskStatistics
(
@RequestBody
(
required
=
true
)
TaskStatisticsParam
param
)
{
...
...
@@ -787,7 +788,7 @@ public class TaskController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
list
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/exportStatisticsData"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
)
@ApiOperation
(
value
=
"查询任务统计"
,
notes
=
"查询任务统计"
)
public
void
exportStatisticsData
(
@RequestBody
(
required
=
true
)
TaskStatisticsParam
param
,
HttpServletResponse
response
)
{
...
...
@@ -860,7 +861,7 @@ public class TaskController extends AbstractBaseController{
FileHelper
.
exportExcel
(
list
,
"任务统计"
,
"任务统计"
,
TaskStatisticsVo
.
class
,
fileName
+
".xls"
,
response
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据任务id查询任务日志"
,
notes
=
"根据任务id查询任务日志"
)
@RequestMapping
(
value
=
"/queryTaskRecordByTaskId"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryTaskRecordByTaskId
(
@ApiParam
(
value
=
"任务ID"
)
@RequestParam
(
required
=
true
)
long
taskId
)
{
...
...
@@ -879,7 +880,7 @@ public class TaskController extends AbstractBaseController{
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询检查项任务所有检查不合格项详情(<font color='blue'>手机app</font>)"
,
notes
=
"查询检查项任务所有检查不合格项详情"
)
@RequestMapping
(
value
=
"/queryCheckTaskDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCheckTaskDetail
(
@RequestParam
(
required
=
true
)
long
checkId
,
@RequestParam
(
required
=
true
)
long
taskId
)
{
...
...
@@ -892,7 +893,7 @@ public class TaskController extends AbstractBaseController{
* 同步离线任务
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步离线任务(<font color='blue'>手机app</font>)"
,
notes
=
"同步离线任务"
)
@RequestMapping
(
value
=
"/queryOfflineTasks"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
synchronizedOfflineTasks
()
{
AgencyUserModel
user
=
getUserInfo
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/TaskReportController.java
View file @
e8d929a6
...
...
@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.param.TaskStatisticsParam
;
...
...
@@ -18,7 +20,6 @@ import com.yeejoin.amos.maintenance.business.service.impl.TaskReportService;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.business.util.Toke
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -34,7 +35,7 @@ public class TaskReportController extends AbstractBaseController{
@Autowired
private
TaskReportService
taskReportService
;
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
" 巡检完成情况月报表"
,
notes
=
" 巡检完成情况月报表"
)
@RequestMapping
(
value
=
"/{statistical}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
taskReport
(
...
...
@@ -52,7 +53,7 @@ public class TaskReportController extends AbstractBaseController{
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
" 人员综合统计分析"
,
notes
=
" 人员综合统计分析"
)
@PostMapping
(
value
=
"/comprehensive/user"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
comprehensiveStatisticalForUser
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/UserController.java
View file @
e8d929a6
...
...
@@ -30,6 +30,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
...
...
@@ -51,7 +53,6 @@ import com.yeejoin.amos.maintenance.business.util.DepartmentUserTreeAppVo;
import
com.yeejoin.amos.maintenance.business.util.DepartmentUserTreeWebVo
;
import
com.yeejoin.amos.maintenance.business.util.DesUtil
;
import
com.yeejoin.amos.maintenance.business.util.StringUtil
;
import
com.yeejoin.amos.maintenance.core.framework.Permission
;
import
com.yeejoin.amos.maintenance.feign.RemoteSecurityService
;
import
com.yeejoin.amos.maintenance.jpush.AppMessagePushService
;
...
...
@@ -97,7 +98,7 @@ public class UserController extends AbstractBaseController {
* @param deptId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"部门人员查询"
,
notes
=
"部门人员查询"
)
@RequestMapping
(
value
=
"/queryDeptUser"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryDeptUser
(
@RequestParam
(
value
=
"deptId"
,
required
=
false
)
String
deptId
)
{
...
...
@@ -177,7 +178,7 @@ public class UserController extends AbstractBaseController {
return
userList
;
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"部门人员树查询"
,
notes
=
"部门人员树查询"
)
@RequestMapping
(
value
=
"/queryDeptUserTree1"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryDeptUserTree1
()
{
...
...
@@ -294,7 +295,7 @@ public class UserController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"人员查询"
,
notes
=
"人员查询"
)
@RequestMapping
(
value
=
"/queryAuthUsers"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
// @Authorization(ingore = true)
...
...
@@ -312,7 +313,7 @@ public class UserController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"部门人员树查询"
,
notes
=
"部门人员树查询"
)
@RequestMapping
(
value
=
"/queryDeptUserTree"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryDeptUserTree
()
{
...
...
@@ -330,7 +331,7 @@ public class UserController extends AbstractBaseController {
* @return
* @RequestParam userName 用户名
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"通讯录(<font color='blue'>手机app</font>)"
,
notes
=
"通讯录(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryUserAddressList"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryUserAddressListTree
(
...
...
@@ -490,7 +491,7 @@ public class UserController extends AbstractBaseController {
return
userList
;
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"用户登录成功之后数据初始化(<font color='blue'>手机app</font>)"
,
notes
=
"用户登录成功之后数据初始化"
)
@RequestMapping
(
value
=
"/initData"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
initUserApp
()
{
...
...
@@ -529,7 +530,7 @@ public class UserController extends AbstractBaseController {
}
///////////////////////////////2019-11-18安全服务升级///////////////////////////////
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"通讯录"
,
notes
=
"通讯录"
)
@RequestMapping
(
value
=
"/mobile/addressList"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
addressList
()
{
...
...
@@ -740,7 +741,7 @@ public class UserController extends AbstractBaseController {
/**
* 保存登陆用户选择公司信息
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存登陆用户选择公司信息"
,
notes
=
"保存登陆用户选择公司信息"
)
@PostMapping
(
value
=
"/save/curCompany"
)
public
CommonResponse
saveCurCompany
(
@ApiParam
(
value
=
"当前登陆用户所选单位机构编号"
,
required
=
true
)
@RequestBody
ReginParams
reginParams
)
{
...
...
@@ -791,7 +792,7 @@ public class UserController extends AbstractBaseController {
/**
* 装备登录返回巡检统计信息
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"装备登录返回巡检统计信息"
,
notes
=
"装备登录返回巡检统计信息"
)
@GetMapping
(
value
=
"/patrolCount"
)
public
CommonResponse
getPatrolCount
()
{
...
...
@@ -808,7 +809,7 @@ public class UserController extends AbstractBaseController {
/**
* 修改密码
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
" 修改密码"
,
notes
=
" 修改密码"
)
@GetMapping
(
value
=
"/editPassword"
)
public
CommonResponse
editPassword
(
@ApiParam
(
value
=
"旧密码"
,
required
=
true
)
@RequestParam
String
password
,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/core/framework/Permission.java
View file @
e8d929a6
package
com
.
yeejoin
.
amos
.
maintenance
.
core
.
framework
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* @author DELL
*/
@Target
(
ElementType
.
METHOD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
Permission
{
/**
* value
* @return
*/
String
value
()
default
""
;
/**
* 是否进行人员校验
* @return
*/
boolean
isPersonIdentity
()
default
false
;
}
//package com.yeejoin.amos.maintenance.core.framework;
//
//import java.lang.annotation.Documented;
//import java.lang.annotation.ElementType;
//import java.lang.annotation.Retention;
//import java.lang.annotation.RetentionPolicy;
//import java.lang.annotation.Target;
//
///**
// * @author DELL
// */
//@Target(ElementType.METHOD)
//@Retention(RetentionPolicy.RUNTIME)
//@Documented
//public @interface Permission {
// /**
// * value
// * @return
// */
// String value() default "";
//
// /**
// * 是否进行人员校验
// * @return
// */
// boolean isPersonIdentity() default false;
//}
//
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/core/framework/PermissionAspect.java
View file @
e8d929a6
package
com
.
yeejoin
.
amos
.
maintenance
.
core
.
framework
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.RoleBo
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.config.TokenOperation
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.maintenance.exception.PermissionException
;
import
com.yeejoin.amos.maintenance.feign.RemoteSecurityService
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Before
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
@Aspect
@Component
@ResponseBody
public
class
PermissionAspect
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PermissionAspect
.
class
);
@Autowired
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Before
(
value
=
"@annotation(Permission) && @annotation(permission)"
)
public
void
PermissionCheck
(
JoinPoint
joinPoint
,
Permission
permission
)
throws
PermissionException
{
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
logger
.
info
(
"======开始权限校验======"
);
String
token
=
request
.
getHeader
(
"token"
);
token
=
ObjectUtils
.
isEmpty
(
token
)
?
request
.
getHeader
(
"X-Access-Token"
)
:
token
;
String
product
=
request
.
getHeader
(
"product"
);
String
appKey
=
request
.
getHeader
(
"appKey"
);
RequestContext
.
setToken
(
token
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setAppKey
(
appKey
);
if
(!
TokenOperation
.
refresh
(
token
))
{
throw
new
PermissionException
(
"登录信息失效,请重新登录"
);
}
FeignClientResult
feignClientResult
;
AgencyUserModel
userModel
=
null
;
try
{
feignClientResult
=
Privilege
.
agencyUserClient
.
getme
();
userModel
=
(
AgencyUserModel
)
feignClientResult
.
getResult
();
}
catch
(
InnerInvokException
e
)
{
throw
new
PermissionException
(
"用户信息校验失败"
);
}
if
(
userModel
==
null
)
{
throw
new
PermissionException
(
"用户信息校验失败"
);
}
String
name
=
""
;
String
companyId
=
""
;
String
type
=
""
;
if
(
permission
.
isPersonIdentity
())
{
//调用jcs,进行人员身份判断,是维保公司人员还是业主单位人员
JSONObject
result
=
new
JSONObject
();
name
=
result
.
get
(
"name"
).
toString
();
companyId
=
result
.
get
(
"companyId"
).
toString
();
type
=
result
.
get
(
"type"
).
toString
();
}
ReginParams
regionParam
=
new
ReginParams
();
String
userId
=
userModel
.
getUserId
();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
userModel
.
getOrgRoles
();
ReginParams
reginParams
=
JSON
.
parseObject
(
redisTemplate
.
opsForValue
().
get
(
buildKey
(
userModel
.
getUserId
(),
token
)),
ReginParams
.
class
);
if
(
reginParams
==
null
&&
userModel
.
getCompanys
().
size
()
>
0
)
{
CompanyModel
companyModel
=
userModel
.
getCompanys
().
get
(
0
);
List
<
DepartmentModel
>
deptList
=
remoteSecurityService
.
getDepartmentTreeByCompanyId
(
token
,
product
,
appKey
,
companyModel
.
getSequenceNbr
().
toString
());
regionParam
.
setPersonIdentity
(
new
ReginParams
.
PersonIdentity
(
type
,
name
,
companyId
));
if
(
deptList
.
size
()
>
0
)
{
CompanyBo
companyBo
=
convertCompanyModelToBo
(
companyModel
);
DepartmentBo
departmentBo
=
convertDepartmentModelToBo
(
deptList
.
get
(
0
));
regionParam
.
setCompany
(
companyBo
);
regionParam
.
setDepartment
(
departmentBo
);
if
(!
ObjectUtils
.
isEmpty
(
orgRoles
)
&&
!
orgRoles
.
get
(
departmentBo
.
getSequenceNbr
()).
isEmpty
())
{
regionParam
.
setRole
(
convertRoleModelToBo
(
orgRoles
.
get
(
departmentBo
.
getSequenceNbr
()).
get
(
0
)));
}
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
userModel
.
getOrgRoles
())
&&
!
ObjectUtils
.
isEmpty
(
companyModel
)
&&
userModel
.
getOrgRoles
().
get
(
companyModel
.
getSequenceNbr
()).
size
()
>
0
)
{
RoleModel
role
=
userModel
.
getOrgRoles
().
get
(
companyModel
.
getSequenceNbr
()).
get
(
0
);
RoleBo
roleBo
=
new
RoleBo
();
BeanUtils
.
copyProperties
(
role
,
roleBo
);
regionParam
.
setRole
(
roleBo
);
}
}
redisTemplate
.
opsForValue
().
set
(
buildKey
(
userId
,
token
),
JSONObject
.
toJSONString
(
regionParam
));
}
}
private
DepartmentBo
convertDepartmentModelToBo
(
DepartmentModel
departmentModel
)
{
DepartmentBo
departmentBo
=
new
DepartmentBo
();
if
(
departmentModel
!=
null
)
{
departmentBo
.
setCompanySeq
(
departmentModel
.
getCompanySeq
());
departmentBo
.
setDepartmentDesc
(
departmentModel
.
getDepartmentDesc
());
departmentBo
.
setDepartmentName
(
departmentModel
.
getDepartmentName
());
departmentBo
.
setLevel
(
departmentModel
.
getLevel
());
departmentBo
.
setOrgCode
(
departmentModel
.
getOrgCode
());
departmentBo
.
setParentId
(
departmentModel
.
getParentId
());
departmentBo
.
setDeptOrgCode
(
departmentModel
.
getDeptOrgCode
());
departmentBo
.
setSequenceNbr
(
departmentModel
.
getSequenceNbr
());
}
return
departmentBo
;
}
/**
* Model 转 Bo
*/
private
CompanyBo
convertCompanyModelToBo
(
CompanyModel
companyModel
)
{
CompanyBo
companyBo
=
new
CompanyBo
();
if
(
companyModel
!=
null
)
{
companyBo
.
setAddress
(
companyModel
.
getAddress
());
companyBo
.
setCompanyName
(
companyModel
.
getCompanyName
());
companyBo
.
setCompanyOrgCode
(
companyModel
.
getCompanyOrgCode
());
companyBo
.
setEmail
(
companyModel
.
getEmail
());
companyBo
.
setLandlinePhone
(
companyModel
.
getLandlinePhone
());
companyBo
.
setLongitude
(
companyModel
.
getLongitude
());
companyBo
.
setLatitude
(
companyModel
.
getLatitude
());
companyBo
.
setLevel
(
companyModel
.
getLevel
());
companyBo
.
setOrgCode
(
companyModel
.
getOrgCode
());
companyBo
.
setSequenceNbr
(
companyModel
.
getSequenceNbr
());
companyBo
.
setParentId
(
companyModel
.
getParentId
());
}
return
companyBo
;
}
private
RoleBo
convertRoleModelToBo
(
RoleModel
roleModel
)
{
RoleBo
roleBo
=
new
RoleBo
();
if
(
roleModel
!=
null
)
{
roleBo
.
setRoleName
(
roleModel
.
getRoleName
());
roleBo
.
setRoleType
(
roleModel
.
getRoleType
());
roleBo
.
setSequenceNbr
(
roleModel
.
getSequenceNbr
());
}
return
roleBo
;
}
/**
* redis缓存选择的用户信息
*
* @param userId userId
* @param token token
* @return String
*/
private
String
buildKey
(
String
userId
,
String
token
)
{
return
"region_"
+
userId
+
"_"
+
token
;
}
}
//
package com.yeejoin.amos.maintenance.core.framework;
//
//
//
import com.alibaba.fastjson.JSON;
//
import com.alibaba.fastjson.JSONObject;
//
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
//
import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo;
//
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
//
import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
//
import com.yeejoin.amos.component.feign.config.InnerInvokException;
//
import com.yeejoin.amos.component.feign.config.TokenOperation;
//
import com.yeejoin.amos.component.feign.model.FeignClientResult;
//
import com.yeejoin.amos.feign.privilege.Privilege;
//
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
//
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
//
import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
//
import com.yeejoin.amos.feign.privilege.model.RoleModel;
//
import com.yeejoin.amos.maintenance.exception.PermissionException;
//
import com.yeejoin.amos.maintenance.feign.RemoteSecurityService;
//
import org.aspectj.lang.JoinPoint;
//
import org.aspectj.lang.annotation.Aspect;
//
import org.aspectj.lang.annotation.Before;
//
import org.slf4j.Logger;
//
import org.slf4j.LoggerFactory;
//
import org.springframework.beans.BeanUtils;
//
import org.springframework.beans.factory.annotation.Autowired;
//
import org.springframework.data.redis.core.RedisTemplate;
//
import org.springframework.stereotype.Component;
//
import org.springframework.util.ObjectUtils;
//
import org.springframework.web.bind.annotation.ResponseBody;
//
import org.springframework.web.context.request.RequestContextHolder;
//
import org.springframework.web.context.request.ServletRequestAttributes;
//
import org.typroject.tyboot.core.foundation.context.RequestContext;
//
//
import javax.servlet.http.HttpServletRequest;
//
import java.util.List;
//
import java.util.Map;
//
//
@Aspect
//
@Component
//
@ResponseBody
//
public class PermissionAspect {
//
private static final Logger logger = LoggerFactory.getLogger(PermissionAspect.class);
//
//
@Autowired
//
private RedisTemplate<String, String> redisTemplate;
//
//
@Autowired
//
private RemoteSecurityService remoteSecurityService;
//
//
@Before(value = "@annotation(Permission) && @annotation(permission)")
//
public void PermissionCheck(JoinPoint joinPoint, Permission permission) throws PermissionException {
//
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
//
logger.info("======开始权限校验======");
//
String token = request.getHeader("token");
//
token = ObjectUtils.isEmpty(token) ? request.getHeader("X-Access-Token") : token;
//
String product = request.getHeader("product");
//
String appKey = request.getHeader("appKey");
//
RequestContext.setToken(token);
//
RequestContext.setProduct(product);
//
RequestContext.setAppKey(appKey);
//
if (!TokenOperation.refresh(token)) {
//
throw new PermissionException("登录信息失效,请重新登录");
//
}
//
FeignClientResult feignClientResult;
//
AgencyUserModel userModel = null;
//
try {
//
feignClientResult = Privilege.agencyUserClient.getme();
//
userModel = (AgencyUserModel) feignClientResult.getResult();
//
} catch (InnerInvokException e) {
//
throw new PermissionException("用户信息校验失败");
//
}
//
if (userModel == null) {
//
throw new PermissionException("用户信息校验失败");
//
}
//
String name = "";
//
String companyId = "";
//
String type = "";
//
if (permission.isPersonIdentity()) {
//
//调用jcs,进行人员身份判断,是维保公司人员还是业主单位人员
//
JSONObject result = new JSONObject();
//
name = result.get("name").toString();
//
companyId = result.get("companyId").toString();
//
type = result.get("type").toString();
//
}
//
ReginParams regionParam = new ReginParams();
//
String userId = userModel.getUserId();
//
Map<Long, List<RoleModel>> orgRoles = userModel.getOrgRoles();
//
ReginParams reginParams = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(userModel.getUserId(), token)), ReginParams.class);
//
if (reginParams == null && userModel.getCompanys().size() > 0) {
//
CompanyModel companyModel = userModel.getCompanys().get(0);
//
List<DepartmentModel> deptList = remoteSecurityService.getDepartmentTreeByCompanyId(token, product, appKey, companyModel.getSequenceNbr().toString());
//
regionParam.setPersonIdentity(new ReginParams.PersonIdentity(type, name, companyId));
//
if (deptList.size() > 0) {
//
CompanyBo companyBo = convertCompanyModelToBo(companyModel);
//
DepartmentBo departmentBo = convertDepartmentModelToBo(deptList.get(0));
//
regionParam.setCompany(companyBo);
//
regionParam.setDepartment(departmentBo);
//
if (!ObjectUtils.isEmpty(orgRoles) && !orgRoles.get(departmentBo.getSequenceNbr()).isEmpty()) {
//
regionParam.setRole(convertRoleModelToBo(orgRoles.get(departmentBo.getSequenceNbr()).get(0)));
//
}
//
} else {
//
if (!ObjectUtils.isEmpty(userModel.getOrgRoles()) && !ObjectUtils.isEmpty(companyModel) && userModel.getOrgRoles().get(companyModel.getSequenceNbr()).size() > 0) {
//
RoleModel role = userModel.getOrgRoles().get(companyModel.getSequenceNbr()).get(0);
//
RoleBo roleBo = new RoleBo();
//
BeanUtils.copyProperties(role, roleBo);
//
regionParam.setRole(roleBo);
//
}
//
}
//
redisTemplate.opsForValue().set(buildKey(userId, token), JSONObject.toJSONString(regionParam));
//
}
//
}
//
//
//
private DepartmentBo convertDepartmentModelToBo(DepartmentModel departmentModel) {
//
DepartmentBo departmentBo = new DepartmentBo();
//
if (departmentModel != null) {
//
departmentBo.setCompanySeq(departmentModel.getCompanySeq());
//
departmentBo.setDepartmentDesc(departmentModel.getDepartmentDesc());
//
departmentBo.setDepartmentName(departmentModel.getDepartmentName());
//
departmentBo.setLevel(departmentModel.getLevel());
//
departmentBo.setOrgCode(departmentModel.getOrgCode());
//
departmentBo.setParentId(departmentModel.getParentId());
//
departmentBo.setDeptOrgCode(departmentModel.getDeptOrgCode());
//
departmentBo.setSequenceNbr(departmentModel.getSequenceNbr());
//
}
//
return departmentBo;
//
}
//
//
/**
//
* Model 转 Bo
//
*/
//
private CompanyBo convertCompanyModelToBo(CompanyModel companyModel) {
//
//
CompanyBo companyBo = new CompanyBo();
//
if (companyModel != null) {
//
companyBo.setAddress(companyModel.getAddress());
//
companyBo.setCompanyName(companyModel.getCompanyName());
//
companyBo.setCompanyOrgCode(companyModel.getCompanyOrgCode());
//
companyBo.setEmail(companyModel.getEmail());
//
companyBo.setLandlinePhone(companyModel.getLandlinePhone());
//
companyBo.setLongitude(companyModel.getLongitude());
//
companyBo.setLatitude(companyModel.getLatitude());
//
companyBo.setLevel(companyModel.getLevel());
//
companyBo.setOrgCode(companyModel.getOrgCode());
//
companyBo.setSequenceNbr(companyModel.getSequenceNbr());
//
companyBo.setParentId(companyModel.getParentId());
//
}
//
return companyBo;
//
}
//
//
private RoleBo convertRoleModelToBo(RoleModel roleModel) {
//
RoleBo roleBo = new RoleBo();
//
if (roleModel != null) {
//
roleBo.setRoleName(roleModel.getRoleName());
//
roleBo.setRoleType(roleModel.getRoleType());
//
roleBo.setSequenceNbr(roleModel.getSequenceNbr());
//
}
//
return roleBo;
//
}
//
//
/**
//
* redis缓存选择的用户信息
//
*
//
* @param userId userId
//
* @param token token
//
* @return String
//
*/
//
private String buildKey(String userId, String token) {
//
return "region_" + userId + "_" + token;
//
//
}
//
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CatalogTreeController.java
View file @
e8d929a6
...
...
@@ -22,7 +22,7 @@ import com.yeejoin.amos.patrol.business.util.CommonResponse;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.dao.entity.CatalogTree
;
import
io.swagger.annotations.Api
;
...
...
@@ -42,7 +42,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"树结构查询"
,
notes
=
"树结构查询"
)
@RequestMapping
(
value
=
"/getCatalogTree"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getCatalogTree
()
{
...
...
@@ -57,7 +57,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"树结构查询"
,
notes
=
"树结构查询"
)
@RequestMapping
(
value
=
"/catalogList"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getCatalogList
()
{
...
...
@@ -72,7 +72,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分类新增"
,
notes
=
"分类新增"
)
@RequestMapping
(
value
=
"/addCatalogTree"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
catalogTreeAdd
(
@ApiParam
(
value
=
"分类"
,
required
=
true
)
@RequestBody
CatalogTree
param
)
{
...
...
@@ -124,7 +124,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除分类"
,
notes
=
"删除分类"
)
@RequestMapping
(
value
=
"/deleteCatalogTreeById"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
deleteCatalogTreeById
(
...
...
@@ -144,7 +144,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分类数据查询"
,
notes
=
"分类数据查询"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCatalogTreeInfoPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -164,7 +164,7 @@ public class CatalogTreeController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询分类按照id"
,
notes
=
"查询分类按照id"
)
@RequestMapping
(
value
=
"/catalogTreeDetById/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCatalogTreeById
(
@ApiParam
(
value
=
"分类id"
,
required
=
true
)
@PathVariable
(
name
=
"id"
)
Long
id
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CheckController.java
View file @
e8d929a6
...
...
@@ -61,7 +61,7 @@ import com.yeejoin.amos.patrol.core.common.request.CommonPageable;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.patrol.core.common.response.GraphInitDataResponse
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.core.util.DateUtil
;
import
com.yeejoin.amos.patrol.core.util.StringUtil
;
import
com.yeejoin.amos.patrol.dao.entity.PlanTask
;
...
...
@@ -119,7 +119,7 @@ public class CheckController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检记录查询"
,
notes
=
"巡检记录查询"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCheckInfoPage
(
...
...
@@ -144,7 +144,7 @@ public class CheckController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
list
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录"
,
notes
=
"导出巡检记录"
)
@PostMapping
(
value
=
"/export"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
)
public
void
exportCheck
(
...
...
@@ -170,7 +170,7 @@ public class CheckController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录"
,
notes
=
"导出巡检记录"
)
@RequestMapping
(
value
=
"/exportSelectRecord"
,
method
=
RequestMethod
.
GET
)
public
void
exportSelectCheckRecord
(
...
...
@@ -181,7 +181,7 @@ public class CheckController extends AbstractBaseController {
FileHelper
.
exportExcel
(
list
,
"巡检记录"
,
"巡检记录"
,
CheckInfoVo
.
class
,
fileName
+
".xls"
,
response
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录图片"
,
notes
=
"导出巡检记录图片"
)
@RequestMapping
(
value
=
"/exportImgs"
,
method
=
RequestMethod
.
POST
)
public
void
exportCheckImgs
(
...
...
@@ -201,7 +201,7 @@ public class CheckController extends AbstractBaseController {
FileHelper
.
exportZip
(
list
,
fileName
,
response
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录图片"
,
notes
=
"导出巡检记录图片"
)
@RequestMapping
(
value
=
"/exportImgsByIds"
,
method
=
RequestMethod
.
GET
)
public
void
exportCheckImgs
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestParam
(
required
=
false
)
Long
[]
ids
,
...
...
@@ -215,7 +215,7 @@ public class CheckController extends AbstractBaseController {
FileHelper
.
exportZip
(
list
,
fileName
,
response
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存巡检记录<font color='blue'>手机app</font>"
,
notes
=
"保存巡检记录<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/saveRecord"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
saveCheckRecord
(
...
...
@@ -298,7 +298,7 @@ public class CheckController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检记录"
,
notes
=
"删除巡检记录"
)
@RequestMapping
(
value
=
"/testPush"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
deleteCheckById
(
@ApiParam
(
value
=
"巡检计划ID"
,
required
=
true
)
@RequestBody
Long
id
)
{
...
...
@@ -314,7 +314,7 @@ public class CheckController extends AbstractBaseController {
// @
Permission
// @
TycloudOperation(ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "上传检查记录图片<font color='blue'>手机app</font>", notes = "上传检查记录图片<font color='blue'>手机app</font>")
// @RequestMapping(value = "/uploadCheckImg", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
// public CommonResponse uploadCheckImg(
...
...
@@ -388,7 +388,7 @@ public class CheckController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检记录"
,
notes
=
"删除巡检记录"
)
@RequestMapping
(
value
=
"/deleteCheckById"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
deleteCheckById
(
@ApiParam
(
value
=
"巡检计划ID"
,
required
=
true
)
@RequestBody
List
<
Long
>
ids
)
{
...
...
@@ -408,7 +408,7 @@ public class CheckController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"据检查项ID获取所有不合格检查项<font color='blue'>手机app</font>"
,
notes
=
"据检查项ID获取所有不合格检查项<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/queryUnqualifiedInputItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryUnqualifiedInputItem
(
@RequestParam
(
required
=
true
)
int
checkId
)
{
...
...
@@ -421,7 +421,7 @@ public class CheckController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>"
,
notes
=
"获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/queryCheckPointDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCheckPointDetail
(
@RequestParam
long
checkId
)
{
...
...
@@ -435,7 +435,7 @@ public class CheckController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>"
,
notes
=
"获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/v2/queryCheckPointDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCheckPointDetailInVersion2
(
@RequestParam
long
checkId
)
{
...
...
@@ -455,7 +455,7 @@ public class CheckController extends AbstractBaseController {
* @param queryRequests
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检日历数据<font color='blue'>手机app</font>"
,
notes
=
"获取巡检日历数据<font color='blue'>手机app</font>"
)
@PostMapping
(
value
=
"/checkCalendar"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
checkCalendar
(
...
...
@@ -477,7 +477,7 @@ public class CheckController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检点巡检记录列表信息<font color='blue'>手机app</font>"
,
notes
=
"获取巡检点巡检记录列表信息<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/queryCheckRecord"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryRecordByPointId
(
...
...
@@ -501,7 +501,7 @@ public class CheckController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
map
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检记录详情信息<font color='blue'>手机app</font>"
,
notes
=
"获取巡检记录详情信息<font color='blue'>手机app</font>"
)
@RequestMapping
(
value
=
"/queryCheckDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryRecordById
(
@RequestParam
(
required
=
true
)
int
checkId
)
{
...
...
@@ -520,7 +520,7 @@ public class CheckController extends AbstractBaseController {
* @param checkId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检记录ID获取巡检记录详情"
,
notes
=
"根据巡检记录ID获取巡检记录详情"
)
@RequestMapping
(
value
=
"/queryCheckInfo"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
printTaskDetail
(
@ApiParam
(
value
=
"巡检记录ID"
)
@RequestParam
(
required
=
true
)
int
checkId
)
{
...
...
@@ -571,7 +571,7 @@ public class CheckController extends AbstractBaseController {
* @return
*/
//@Authorization(ingore=true)
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检点初始数据(<font color='blue'>release</font>)"
,
notes
=
"获取巡检点初始数据"
)
@RequestMapping
(
value
=
"/viewModule/initData"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getViewModuleInitData
()
{
...
...
@@ -585,7 +585,7 @@ public class CheckController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检情况统计分析"
,
notes
=
"巡检情况统计分析"
)
@RequestMapping
(
value
=
"/statisticalAnalysis"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getCheckStatisticalAnalysis
(
...
...
@@ -598,7 +598,7 @@ public class CheckController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
list
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检情况统计分析"
,
notes
=
"导出巡检情况统计分析"
)
@RequestMapping
(
value
=
"/exportStatisticalAnalysis"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
)
public
void
exportStatisticalAnalysis
(
...
...
@@ -621,7 +621,7 @@ public class CheckController extends AbstractBaseController {
* @param checkInputId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取检查项照片URL(<font color='blue'>release</font>)"
,
notes
=
"获取检查项照片URL"
)
@RequestMapping
(
value
=
"/getCheckPic"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getCheckPhotosByCheckAndInputId
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CommonController.java
View file @
e8d929a6
...
...
@@ -12,7 +12,7 @@ import com.yeejoin.amos.patrol.common.enums.CheckStatisticsTypeEnum;
import
com.yeejoin.amos.patrol.common.enums.PlanTaskExecution
;
import
com.yeejoin.amos.patrol.common.enums.PlanTaskFinishStatusEnum
;
import
com.yeejoin.amos.patrol.common.enums.TaskStatisticsTypeEnum
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -28,35 +28,35 @@ public class CommonController extends AbstractBaseController{
@Autowired
private
IAppService
iAppService
;
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务统计口径类型"
,
notes
=
"任务统计口径类型"
)
@RequestMapping
(
value
=
"/taskgetStatisticsType"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getTaskStatisticsType
()
{
return
CommonResponseUtil
.
success
(
TaskStatisticsTypeEnum
.
getEnumList
());
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检统计口径类型"
,
notes
=
"巡检统计口径类型"
)
@RequestMapping
(
value
=
"/checkStatisticsType"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getCheckStatisticsType
()
{
return
CommonResponseUtil
.
success
(
CheckStatisticsTypeEnum
.
getEnumList
());
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"计划任务完成种类"
,
notes
=
"计划任务完成种类"
)
@RequestMapping
(
value
=
"/planTaskFinishStatus"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPlanTaskFinishStatus
()
{
return
CommonResponseUtil
.
success
(
PlanTaskFinishStatusEnum
.
getEnumList
());
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划任务执行情况种类"
,
notes
=
"计划任务执行情况种类"
)
@RequestMapping
(
value
=
"/planTaskExecution"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPlanTaskExecution
()
{
return
CommonResponseUtil
.
success
(
PlanTaskExecution
.
getEnumList
());
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取app最新版本信息"
,
notes
=
"获取app最新版本信息"
)
@RequestMapping
(
value
=
"/queryAppVersion"
,
method
=
RequestMethod
.
GET
)
//@Authorization(ingore=true)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/ConfigController.java
View file @
e8d929a6
...
...
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.yeejoin.amos.patrol.business.dao.repository.IConfigDao
;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.dao.entity.Config
;
import
io.swagger.annotations.Api
;
...
...
@@ -42,7 +42,7 @@ public class ConfigController extends AbstractBaseController{
* @return
*/
//@Authorization(ingore = true)
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取配置接口信息"
,
notes
=
" 获取配置接口信息"
)
@RequestMapping
(
value
=
"/getConfigsInfo"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getConfigsInfo
()
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/EquipmentRuleController.java
View file @
e8d929a6
...
...
@@ -18,7 +18,7 @@ import com.yeejoin.amos.patrol.business.service.intfc.IEquipmentHandlerService;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.business.util.Toke
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.dao.entity.InputItem
;
import
io.swagger.annotations.Api
;
...
...
@@ -43,7 +43,7 @@ public class EquipmentRuleController extends AbstractBaseController{
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"装备检查项"
,
notes
=
"装备检查项"
)
@RequestMapping
(
value
=
"/equipmnetInput"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
getPlanTaskList
(
...
...
@@ -63,7 +63,7 @@ public class EquipmentRuleController extends AbstractBaseController{
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"装备检查项"
,
notes
=
"装备检查项"
)
@RequestMapping
(
value
=
"/getEquipmnetRules"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getEquipmnetRules
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/ExcelExportController.java
View file @
e8d929a6
...
...
@@ -26,7 +26,7 @@ import com.yeejoin.amos.patrol.business.service.impl.TaskReportService;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.business.util.Toke
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
cn.afterturn.easypoi.excel.ExcelExportUtil
;
import
cn.afterturn.easypoi.excel.entity.TemplateExportParams
;
...
...
@@ -57,7 +57,7 @@ public class ExcelExportController extends AbstractBaseController{
*
* 导出格式为:vnd.ms-excel
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检完成情况月报表导出excel"
,
notes
=
" 巡检完成情况月报表导出excel"
)
@RequestMapping
(
value
=
"/task/{statistical}"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
taskReport
(
...
...
@@ -86,7 +86,7 @@ public class ExcelExportController extends AbstractBaseController{
return
CommonResponseUtil
.
success
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
" 人员综合统计分析Excel导出"
,
notes
=
" 人员综合统计分析Excel导出"
)
@RequestMapping
(
value
=
"/comprehensive/user"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
comprehensiveStatisticalForUser
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/GroupController.java
View file @
e8d929a6
...
...
@@ -23,7 +23,7 @@ import com.yeejoin.amos.patrol.business.service.intfc.ISafety3DDataSendService;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.core.common.response.TaskInfoRespone
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.email.IEmailService
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
...
...
@@ -51,7 +51,7 @@ public class GroupController extends AbstractBaseController{
* 部门查询
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取当前用户所属公司的所有部门"
,
notes
=
"获取当前用户所属公司的所有部门"
)
@RequestMapping
(
value
=
"/queryDept"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCurrentCompanyDept
()
{
...
...
@@ -138,7 +138,7 @@ public class GroupController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
res
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取当前用户所属公司的所有部门及人员"
,
notes
=
"获取当前用户所属公司的所有部门及人员"
)
@RequestMapping
(
value
=
"/queryDeptAndUser"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCurrentCompanyDeptAndUser
()
{
...
...
@@ -288,7 +288,7 @@ public class GroupController extends AbstractBaseController{
* @param companyId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据指定公司ID获取公司和所属公司的子公司信息"
,
notes
=
"根据指定公司ID获取公司和所属公司的子公司信息"
)
@RequestMapping
(
value
=
"/queryCompanyLeaves"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCompanyLeavesById
(
@ApiParam
(
value
=
"公司Id"
)
@RequestParam
(
"companyId"
)
String
companyId
)
{
...
...
@@ -308,7 +308,7 @@ public class GroupController extends AbstractBaseController{
* 根据用户所有属公司ID,查询所有子公司末端公司信息
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取用户所属公司和所属公司的子公司信息"
,
notes
=
"获取用户所属公司和所属公司的子公司信息"
)
@RequestMapping
(
value
=
"/queryAuthCompanyLeaves"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryAuthCompanyLeaves
()
{
...
...
@@ -351,7 +351,7 @@ public class GroupController extends AbstractBaseController{
@Autowired
private
ISafety3DDataSendService
safety3DDataSend
;
//@Authorization(ingore=true)
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"检查点状态推送"
,
notes
=
"检查点状态推送"
)
@RequestMapping
(
value
=
"/testCheckPushStatus"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
testCheckPushStatus
(
@ApiParam
(
value
=
"Id"
)
@RequestParam
(
"checkId"
)
long
checkId
)
{
...
...
@@ -366,7 +366,7 @@ public class GroupController extends AbstractBaseController{
}
//@Authorization(ingore=true)
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务状态推送"
,
notes
=
"任务状态推送"
)
@RequestMapping
(
value
=
"/testTaskPushStatus"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
testTaskPushStatus
(
@ApiParam
(
value
=
"Id"
)
@RequestParam
(
"checkId"
)
Long
taskId
)
{
...
...
@@ -379,7 +379,7 @@ public class GroupController extends AbstractBaseController{
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检点信息"
,
notes
=
"巡检点信息"
)
@RequestMapping
(
value
=
"/pointInfo"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPointInfo
(
@ApiParam
(
value
=
"Id"
)
@RequestParam
(
"pointId"
)
Long
pointId
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/HomeController.java
View file @
e8d929a6
...
...
@@ -19,7 +19,7 @@ import com.yeejoin.amos.patrol.business.service.intfc.IPointService;
import
com.yeejoin.amos.patrol.business.service.intfc.ITaskService
;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
io.swagger.annotations.Api
;
...
...
@@ -46,7 +46,7 @@ public class HomeController extends AbstractBaseController{
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"首页数据"
,
notes
=
"首页数据"
)
@GetMapping
(
value
=
"/overviewData"
)
// @Authorization(ingore = true)
...
...
@@ -83,7 +83,7 @@ public class HomeController extends AbstractBaseController{
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"首页数据"
,
notes
=
"首页数据"
)
@GetMapping
(
value
=
"/getCheckData"
)
public
CommonResponse
getCheckData
()
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/InputItemController.java
View file @
e8d929a6
...
...
@@ -35,7 +35,7 @@ import com.yeejoin.amos.patrol.common.enums.DictTypeEnum;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.enums.QueryOperatorEnum
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.core.util.StringUtil
;
import
com.yeejoin.amos.patrol.dao.entity.InputItem
;
...
...
@@ -67,7 +67,7 @@ public class InputItemController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增检查项"
,
notes
=
"新增检查项"
)
@RequestMapping
(
value
=
"/addItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
addNewItem
(
@ApiParam
(
value
=
"检查项信息"
)
@RequestBody
InputItemParam
param
)
{
...
...
@@ -100,7 +100,7 @@ public class InputItemController extends AbstractBaseController {
* @param itemID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"检查项ID"
,
notes
=
"检查项详情"
)
@RequestMapping
(
value
=
"/queryItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryItemDetail
(
@ApiParam
(
value
=
"巡检项ID"
)
@RequestParam
(
required
=
true
)
Long
itemID
)
{
...
...
@@ -113,7 +113,7 @@ public class InputItemController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"更新检查项"
,
notes
=
"更新检查项"
)
@RequestMapping
(
value
=
"/updateItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
updateItem
(
@ApiParam
(
value
=
"检查项详情"
,
required
=
false
)
@RequestBody
InputItemParam
param
)
{
...
...
@@ -142,7 +142,7 @@ public class InputItemController extends AbstractBaseController {
* @param itemID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"批量删除检查项"
,
notes
=
"批量删除检查项"
)
@RequestMapping
(
value
=
"/batchDelItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
batchDelItem
(
...
...
@@ -165,7 +165,7 @@ public class InputItemController extends AbstractBaseController {
* @param itemID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除检查项"
,
notes
=
"删除检查项"
)
@RequestMapping
(
value
=
"/delItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
delItem
(
@ApiParam
(
value
=
"巡检项ID"
)
@RequestParam
(
required
=
true
)
Long
itemID
)
{
...
...
@@ -183,7 +183,7 @@ public class InputItemController extends AbstractBaseController {
* @param itemID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"检查项另存为"
,
notes
=
"检查项另存为"
)
@RequestMapping
(
value
=
"/saveAs"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
saveAs
(
@ApiParam
(
value
=
"巡检项ID"
)
@RequestParam
(
required
=
true
)
String
itemIDs
)
{
...
...
@@ -210,7 +210,7 @@ public class InputItemController extends AbstractBaseController {
* @param pageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分页查询检查项"
,
notes
=
"分页查询检查项"
)
@RequestMapping
(
value
=
"/queryItemByPage"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryItemByPage
(
...
...
@@ -235,7 +235,7 @@ public class InputItemController extends AbstractBaseController {
* @param queryRequests
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryItemByCondition"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询检查项"
,
notes
=
"条件查询检查项"
)
public
CommonResponse
queryItemByCondition
(
...
...
@@ -261,7 +261,7 @@ public class InputItemController extends AbstractBaseController {
* @param params
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryCustomInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询检查项"
,
notes
=
"条件查询检查项"
)
public
CommonResponse
queryCustomInputItem
(
@RequestBody
HashMap
<
String
,
Object
>
params
){
...
...
@@ -276,7 +276,7 @@ public class InputItemController extends AbstractBaseController {
* @param queryRequests 查询条件
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryItemByCondition1"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询检查项"
,
notes
=
"条件查询检查项"
)
public
CommonResponse
queryItemByCondition1
(
...
...
@@ -321,7 +321,7 @@ public class InputItemController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点编号信息"
,
notes
=
"查询巡检点编号信息"
)
@GetMapping
(
value
=
"/queryItemNo/{itemId}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryItemNoList
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/MeasuresController.java
View file @
e8d929a6
...
...
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.yeejoin.amos.patrol.business.service.intfc.IMeasuresService
;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.dao.entity.Measure
;
import
io.swagger.annotations.Api
;
...
...
@@ -27,7 +27,7 @@ public class MeasuresController extends AbstractBaseController {
@Autowired
IMeasuresService
measuresService
;
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"add"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"新增风险措施"
,
notes
=
"新增风险措施"
)
public
CommonResponse
measuresAdd
(
@ApiParam
(
value
=
"风险措施参数"
,
required
=
false
)
@RequestBody
(
required
=
false
)
Measure
measure
)
{
...
...
@@ -39,7 +39,7 @@ public class MeasuresController extends AbstractBaseController {
return
CommonResponseUtil
.
success
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"update"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"修改风险措施"
,
notes
=
"修改风险措施"
)
public
CommonResponse
measuresUpdate
(
@ApiParam
(
value
=
"风险措施参数"
,
required
=
false
)
@RequestBody
(
required
=
false
)
Measure
measure
)
{
...
...
@@ -53,7 +53,7 @@ public class MeasuresController extends AbstractBaseController {
return
CommonResponseUtil
.
success
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"delete/{id}"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"删除风险措施"
,
notes
=
"删除风险措施"
)
public
CommonResponse
measuresDelete
(
@ApiParam
(
value
=
"风险措施id"
,
required
=
false
)
@PathVariable
(
required
=
true
)
Long
id
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/MsgController.java
View file @
e8d929a6
...
...
@@ -44,7 +44,7 @@ import com.yeejoin.amos.patrol.common.enums.CheckTypeEnum;
import
com.yeejoin.amos.patrol.common.enums.MsgTypeEnum
;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.dao.entity.Msg
;
import
com.yeejoin.amos.patrol.dao.entity.MsgSubscribe
;
import
com.yeejoin.amos.patrol.quartz.IJobService
;
...
...
@@ -90,7 +90,7 @@ public class MsgController extends AbstractBaseController {
* 获取用户当前所选择公司的消息订阅信息
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取用户当前所选择公司的消息订阅信息"
,
notes
=
"获取用户当前所选择公司的消息订阅信息"
)
@GetMapping
(
value
=
"/querySubscribe"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryMsgSetting
()
{
...
...
@@ -181,7 +181,7 @@ public class MsgController extends AbstractBaseController {
* @param subscribe
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存用户消息订阅信息"
,
notes
=
"保存用户消息订阅信息"
)
@PostMapping
(
value
=
"/saveSubscribe"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
saveSubscribe
(
@ApiParam
(
value
=
"消息订阅信息"
,
required
=
false
)
@RequestBody
(
required
=
true
)
List
<
MsgSubscribe
>
subscribe
)
{
...
...
@@ -252,7 +252,7 @@ public class MsgController extends AbstractBaseController {
* 根据登陆用户APP获取未读消息个数
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"APP根据登陆用户获取未读消息个数"
,
notes
=
"APP根据登陆用户获取未读消息个数"
)
@GetMapping
(
value
=
"/unreadCount"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getUnreadCount
()
{
...
...
@@ -270,7 +270,7 @@ public class MsgController extends AbstractBaseController {
* 获取消息类型
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"APP获取消息类型"
,
notes
=
"APP获取消息类型"
)
@GetMapping
(
value
=
"/MsgType"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getMsgType
()
{
...
...
@@ -288,7 +288,7 @@ public class MsgController extends AbstractBaseController {
* @param commonPageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"APP 根据条件获取消息列表"
,
notes
=
"APP 根据条件获取消息列表"
)
@PostMapping
(
value
=
"/msgList"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryMsgList
(
...
...
@@ -358,7 +358,7 @@ public class MsgController extends AbstractBaseController {
* @param commonPageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据条件获取消息列表"
,
notes
=
"APP 根据条件获取消息列表"
)
@PostMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
querylist
(
...
...
@@ -385,7 +385,7 @@ public class MsgController extends AbstractBaseController {
* @param msgId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"修改消失为已读"
,
notes
=
"修改消失为已读"
)
@PostMapping
(
value
=
"/isRead"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
isRead
(
...
...
@@ -404,7 +404,7 @@ public class MsgController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"通知发布"
,
notes
=
"通知发布"
)
@PostMapping
(
value
=
"/noticePublish"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
noticePublish
(
@ApiParam
(
value
=
"通知信息"
,
required
=
true
)
@RequestBody
NoticePublishParam
msg
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PlanController.java
View file @
e8d929a6
...
...
@@ -22,7 +22,7 @@ import com.yeejoin.amos.patrol.business.util.CommonResponseUtil;
import
com.yeejoin.amos.patrol.business.util.PlanPageParamUtil
;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.dao.entity.Plan
;
import
io.swagger.annotations.Api
;
...
...
@@ -41,7 +41,7 @@ public class PlanController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检计划查询"
,
notes
=
"巡检计划查询"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCheckInfoPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -71,7 +71,7 @@ public class PlanController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检计划新增及编辑"
,
notes
=
"巡检计划新增及编辑"
)
@RequestMapping
(
value
=
"/addPlan"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
checkPlanAdd
(
@ApiParam
(
value
=
"巡检计划"
,
required
=
true
)
@RequestBody
Plan
param
)
{
...
...
@@ -96,7 +96,7 @@ public class PlanController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检计划"
,
notes
=
"删除巡检计划"
)
@RequestMapping
(
value
=
"/deletePlanById"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
deletePlanById
(
...
...
@@ -116,7 +116,7 @@ public class PlanController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"另存巡检计划"
,
notes
=
"另存巡检计划"
)
@RequestMapping
(
value
=
"/saveAs"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
planSaveAs
(
@ApiParam
(
value
=
"参数"
,
required
=
true
)
@RequestBody
String
[]
param
)
{
...
...
@@ -135,7 +135,7 @@ public class PlanController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检计划明细"
,
notes
=
"查询巡检计划明细"
)
@RequestMapping
(
value
=
"/detail/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPointById
(
@ApiParam
(
value
=
"计划id"
,
required
=
true
)
@PathVariable
(
name
=
"id"
)
Long
id
)
{
...
...
@@ -151,7 +151,7 @@ public class PlanController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检计划查询"
,
notes
=
"巡检计划查询"
)
@RequestMapping
(
value
=
"/queryPlanByOrgCode"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCheckInfo
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
)
{
...
...
@@ -164,7 +164,7 @@ public class PlanController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
list
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询计划列表(<font color='blue'>手机app</font>)"
,
notes
=
"查询计划列表(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPlanList"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPlanList
()
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PlanTaskController.java
View file @
e8d929a6
...
...
@@ -48,7 +48,7 @@ import com.yeejoin.amos.patrol.common.enums.TaskIsOrderEnum;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.dao.entity.Point
;
import
com.yeejoin.amos.patrol.dao.entity.PointClassify
;
import
com.yeejoin.amos.patrol.exception.YeeException
;
...
...
@@ -87,7 +87,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param commonPageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划执行查询"
,
notes
=
"计划执行查询"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
getPlanTaskList
(
...
...
@@ -110,7 +110,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划执行重做"
,
notes
=
"计划执行重做"
)
@RequestMapping
(
value
=
"/regenPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
planTaskReGen
(
...
...
@@ -136,7 +136,7 @@ public class PlanTaskController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"初始化统计数据"
,
notes
=
"始化统计数据"
)
@RequestMapping
(
value
=
"/resetPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
resetPlanTask
(
@ApiParam
(
value
=
"组织编码"
,
required
=
false
)
@RequestParam
(
required
=
true
)
String
orgCode
)
{
...
...
@@ -166,7 +166,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param strArry
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"计划执行删除"
,
notes
=
"计划执行删除"
)
@RequestMapping
(
value
=
"/deletePlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
planTaskDelete
(
@ApiParam
(
value
=
"计划id数组"
,
required
=
true
)
@RequestBody
String
[]
strArry
)
{
...
...
@@ -182,7 +182,7 @@ public class PlanTaskController extends AbstractBaseController {
/**
* 执行计划导出
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"执行计划导出"
,
notes
=
"执行计划导出"
)
@PostMapping
(
value
=
"/reportPlanTask"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
)
public
void
planTaskReport
(
...
...
@@ -203,7 +203,7 @@ public class PlanTaskController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录"
,
notes
=
"导出巡检记录"
)
@RequestMapping
(
value
=
"/exportSelectPlanTask"
,
method
=
RequestMethod
.
GET
)
public
void
exportSelectPlanTask
(
...
...
@@ -238,7 +238,7 @@ public class PlanTaskController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"模拟定时任务调起服务"
,
notes
=
"模拟定时任务调起服务"
)
@RequestMapping
(
value
=
"/schJobTest"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
schJobTest
(
@ApiParam
(
value
=
"跑批日期格式yyyyMMdd"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
runDate
)
{
...
...
@@ -260,7 +260,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param planTaskId 巡检任务Id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据点查询用户权限所有巡检执行计划(<font color='blue'>手机app</font>)"
,
notes
=
"根据点查询用户权限所有巡检执行计划(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPlanTaskBySerial"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryPlanTaskByPoint
(
...
...
@@ -326,7 +326,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param pointId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
//@Authorization(ingore = true)
@ApiOperation
(
value
=
"根据计划任务ID和点ID初始化巡检页面(<font color='blue'>手机app</font>)"
,
notes
=
"根据计划任务ID和点ID初始化巡检页面((<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/initPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -398,7 +398,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param pointId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
// @Authorization(ingore = true)
@ApiOperation
(
value
=
"根据计划任务ID和点ID初始化巡检页面(<font color='blue'>手机app</font>)"
,
notes
=
"根据计划任务ID和点ID初始化巡检页面((<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/v2/initPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -465,7 +465,7 @@ public class PlanTaskController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据计划任务ID查询计划任务详情和任务点(<font color='blue'>手机app</font>)"
,
notes
=
"根据计划任务ID查询计划任务详情和任务点(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPlanTaskById"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryPlanTaskById
(
...
...
@@ -501,7 +501,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param queryRequests
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据用户条件查询所有计划任务(<font color='blue'>手机app</font>)"
,
notes
=
"根据用户条件查询所有计划任务(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryLoginUserPlanTask
(
...
...
@@ -604,7 +604,7 @@ public class PlanTaskController extends AbstractBaseController {
/**
* 查询任务列表
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取用户当前所正在进行中和尚未开始的任务个数(<font color='blue'>手机app</font>)"
,
notes
=
"获取用户当前所欲呕正在进行中和尚未开始的任务个数(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPlanTaskCount"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
hasPlanTask
()
{
...
...
@@ -617,7 +617,7 @@ public class PlanTaskController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryPlanTaskStatistics"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"查询用户计划任务统计(<font color='blue'>手机app</font>)"
,
notes
=
"查询用户计划任务统计(<font color='blue'>手机app</font>)<br />font color='blue'>参数: startTime, endTime </font>"
)
public
CommonResponse
queryPlanTaskStatistics
(
...
...
@@ -673,7 +673,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param pointId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据任务id和点id获取“未开始”任务点详情(<font color='blue'>手机app</font>)"
,
notes
=
"根据任务id和点id获取“未开始”任务点详情(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryPointPlanTaskDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPointPlanTaskDetail
(
...
...
@@ -698,7 +698,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param pointId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据任务id和点id获取“未开始”任务点详情(<font color='blue'>手机app</font>)"
,
notes
=
"根据任务id和点id获取“未开始”任务点详情(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/v2/queryPointPlanTaskDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPointPlanTaskDetailInVersion2
(
...
...
@@ -721,7 +721,7 @@ public class PlanTaskController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
//@Authorization(ingore = true)
@ApiOperation
(
value
=
"获取离线巡检数据"
,
notes
=
"取离线巡检数据"
)
@RequestMapping
(
value
=
"/queryLeavePlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -741,7 +741,7 @@ public class PlanTaskController extends AbstractBaseController {
// * @param createDate
// * @return
// */
// @
Permission
// @
TycloudOperation(ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "业务查询巡检点时间戳数据", notes = "业务查询巡检点时间戳数据")
// @RequestMapping(value = "/queryPlanTaskTimeAxis", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
// public CommonResponse queryPlanTaskTimeAxis(
...
...
@@ -766,7 +766,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param createDate
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"业务查询巡检点时间戳数据"
,
notes
=
"业务查询巡检点时间戳数据"
)
@RequestMapping
(
value
=
"/queryPlanTaskTimeAxis"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPlanTaskTimeAxis
(
...
...
@@ -791,7 +791,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param createDate
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"业务查询巡检点时间戳数据"
,
notes
=
"业务查询巡检点时间戳数据"
)
@RequestMapping
(
value
=
"/queryTimeAxis"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryTimeAxis
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PointController.java
View file @
e8d929a6
...
...
@@ -52,7 +52,7 @@ import com.yeejoin.amos.patrol.core.async.AsyncTask;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.common.response.PointResponse
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.dao.entity.Point
;
import
com.yeejoin.amos.patrol.dao.entity.PointClassify
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
...
...
@@ -85,7 +85,7 @@ public class PointController extends AbstractBaseController {
* @param pointParam
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增巡检点"
,
notes
=
"新增巡检点"
)
@PostMapping
(
value
=
"/addPoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addPoint
(
@ApiParam
(
value
=
"巡检点"
,
required
=
true
)
@RequestBody
PointParam
pointParam
){
...
...
@@ -117,7 +117,7 @@ public class PointController extends AbstractBaseController {
* @param pointParam
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增巡检点"
,
notes
=
"新增巡检点"
)
@PostMapping
(
value
=
"/newAddPoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
newAddPoint
(
@ApiParam
(
value
=
"巡检点"
,
required
=
true
)
@RequestBody
NewPointParam
pointParam
){
...
...
@@ -155,7 +155,7 @@ public class PointController extends AbstractBaseController {
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增移动巡检点(<font color='blue'>手机app</font>)"
,
notes
=
"新增移动巡检点(<font color='blue'>手机app</font>)"
)
@PostMapping
(
value
=
"/addMovePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addMovePoint
(
@RequestBody
MovePointParam
param
)
{
...
...
@@ -184,7 +184,7 @@ public class PointController extends AbstractBaseController {
* @param ids
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检点"
,
notes
=
"删除巡检点"
)
@DeleteMapping
(
value
=
"/deletePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
deletePoint
(
@ApiParam
(
value
=
"巡检点ID"
,
required
=
true
)
@RequestParam
Long
[]
ids
)
{
...
...
@@ -217,7 +217,7 @@ public class PointController extends AbstractBaseController {
* @param pointParam
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"更新巡检点"
,
notes
=
"更新巡检点"
)
@PutMapping
(
value
=
"/updatePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updatePoint
(
@ApiParam
(
value
=
"巡检点"
,
required
=
true
)
@RequestBody
PointParam
pointParam
)
{
...
...
@@ -241,7 +241,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@GetMapping
(
value
=
"/queryPointById/{id}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointById
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@PathVariable
(
name
=
"id"
)
Long
id
)
{
...
...
@@ -253,7 +253,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
failure
(
"查询巡检点失败"
);
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点详情<font color='blue'>手机app</font>)"
,
notes
=
"查询巡检点详情<font color='blue'>手机app</font>)"
)
@GetMapping
(
value
=
"/queryPointDetailById"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointDetailById
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
(
name
=
"pointId"
)
Long
id
)
{
...
...
@@ -266,7 +266,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点详情<font color='blue'>手机app</font>)"
,
notes
=
"查询巡检点详情<font color='blue'>手机app</font>)"
)
@GetMapping
(
value
=
"/v2/queryPointDetailById"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointDetailByIdInVersion2
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
(
name
=
"pointId"
)
Long
id
)
{
...
...
@@ -286,7 +286,7 @@ public class PointController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@PostMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listPoint
(
...
...
@@ -321,7 +321,7 @@ public class PointController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询所有检查点"
,
notes
=
"查询所有检查点"
)
@PostMapping
(
value
=
"/list/all"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listAllPoint
()
{
...
...
@@ -360,7 +360,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导入导入模板"
,
notes
=
"导入导入模板"
)
@PostMapping
(
value
=
"/exportTemplate"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
exportTemplate
(
HttpServletResponse
response
)
{
...
...
@@ -392,7 +392,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@PostMapping
(
value
=
"/exportListPoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
exportListPoint
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -420,7 +420,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@GetMapping
(
value
=
"/exportListPointByIds"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
exportListPointByIds
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestParam
(
value
=
"ids"
,
required
=
false
)
Long
[]
ids
,
...
...
@@ -449,7 +449,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息(<font color='blue'>手机app</font>)"
,
notes
=
"查询巡检点信息(<font color='blue'>手机app</font>)"
)
@PostMapping
(
value
=
"/queryPointByPage"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointByPage
(
...
...
@@ -475,7 +475,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询用户登录公司全部巡检点"
,
notes
=
"查询用户登录公司全部巡检点"
)
@GetMapping
(
value
=
"/authPoints"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listPoint
(
@ApiParam
(
value
=
"巡检点编码"
,
required
=
false
)
@RequestParam
(
"ids"
)
List
<
String
>
ids
,
...
...
@@ -498,7 +498,7 @@ public class PointController extends AbstractBaseController {
* @param name
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询用户登录公司全部巡检点"
,
notes
=
"查询用户登录公司全部巡检点"
)
@GetMapping
(
value
=
"/queryPoints"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPoints
(
@ApiParam
(
value
=
"巡检点编码"
,
required
=
false
)
@RequestParam
(
"code"
)
String
code
,
...
...
@@ -524,7 +524,7 @@ public class PointController extends AbstractBaseController {
* @param ids
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"另存巡检点"
,
notes
=
"另存巡检点"
)
@PostMapping
(
value
=
"/saveAs"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
saveAs
(
@ApiParam
(
value
=
"巡检点id集合"
,
required
=
true
)
@RequestParam
Long
[]
ids
)
{
...
...
@@ -550,7 +550,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点的巡检项"
,
notes
=
"查询巡检点的巡检项"
)
@PostMapping
(
value
=
"/queryPointInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointInputItem
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
)
{
...
...
@@ -568,7 +568,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点的巡检项"
,
notes
=
"查询巡检点的巡检项"
)
@GetMapping
(
value
=
"/queryEquipPointInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryEquipPointInputItem
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
)
{
...
...
@@ -586,7 +586,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点的分类"
,
notes
=
"查询巡检点的分类"
)
@PostMapping
(
value
=
"/queryPointClassify"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointClassify
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
)
{
...
...
@@ -605,7 +605,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据分类id查询对应项"
,
notes
=
"根据分类id查询对应项"
)
@PostMapping
(
value
=
"/queryPointInputItemByClassify"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointInputItemByClassify
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
,
...
...
@@ -625,7 +625,7 @@ public class PointController extends AbstractBaseController {
* @param id
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据点id查询点的分类及对应项"
,
notes
=
"根据点id查询点的分类及对应项"
)
@PostMapping
(
value
=
"/queryPointClassifyWithInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointClassifyWithInputItem
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
)
{
...
...
@@ -644,7 +644,7 @@ public class PointController extends AbstractBaseController {
* @param isOffine
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"设置巡检点巡检模式"
,
notes
=
"设置巡检点巡检模式"
)
@PostMapping
(
value
=
"/setPatrolMode"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
setPatrolMode
(
@ApiParam
(
value
=
"巡检点id"
,
required
=
true
)
@RequestParam
Long
pointId
,
...
...
@@ -661,7 +661,7 @@ public class PointController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询用户权限点信息饼图(<font color='blue'>手机app</font>)"
,
notes
=
"查询用户权限点信息饼图(<font color='blue'>手机app</font>)"
)
@GetMapping
(
value
=
"/queryPointPie"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointPie
()
{
...
...
@@ -680,7 +680,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
response
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询用户权限点信息柱状图(<font color='blue'>手机app</font>)"
,
notes
=
"查查询用户权限点信息柱状图(<font color='blue'>手机app</font>)"
)
@GetMapping
(
value
=
"/queryPointHistogram"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointHistogram
()
{
...
...
@@ -744,7 +744,7 @@ public class PointController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点编号信息"
,
notes
=
"查询巡检点编号信息"
)
@GetMapping
(
value
=
"/queryPointNo/{pointId}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointNoList
(
...
...
@@ -779,7 +779,7 @@ public class PointController extends AbstractBaseController {
* @param startTime
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询离线点信息"
,
notes
=
"查询离线点信息"
)
@GetMapping
(
value
=
"/queryLeavelPoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryLeavelPoint
(
@ApiParam
(
value
=
"数据同步开始时间(不传为全部同步)"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
startTime
)
{
...
...
@@ -793,7 +793,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
queryLeavelPoint
(
getToken
(),
getProduct
(),
getAppKey
(),
loginOrgCode
,
startTime
));
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询点信息json"
,
notes
=
"查询点信息json"
)
@GetMapping
(
value
=
"/getPointConfigJson"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getPointConfigJson
()
{
...
...
@@ -801,7 +801,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
getPointConfigDom
());
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询点信息xml"
,
notes
=
"查询点信息xml"
)
@GetMapping
(
value
=
"/getPointConfigDom"
,
produces
=
MediaType
.
APPLICATION_XML_VALUE
)
public
List
<
PointResponse
>
getPointConfigDom
()
{
...
...
@@ -809,7 +809,7 @@ public class PointController extends AbstractBaseController {
return
iPointService
.
getPointConfigDom
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出IEC104点位表"
,
notes
=
"导出IEC104点位表"
)
@PostMapping
(
value
=
"/exportPoint/iec"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
exportIecPoint
(
HttpServletResponse
response
)
{
...
...
@@ -827,7 +827,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
();
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*巡检点筛选分页列表"
,
notes
=
"新*巡检点筛选分页列表"
)
@GetMapping
(
value
=
"/list-new"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointList4Route
(
...
...
@@ -839,7 +839,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
queryPointList4Route
(
riskSourceId
,
pointNo
,
name
,
current
,
size
));
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点列表"
,
notes
=
"新*查询巡检点列表"
)
@GetMapping
(
value
=
"/route-list-new"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointListByRouteId
(
...
...
@@ -847,7 +847,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
queryPointListByRouteId
(
routeId
));
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点对应设备列表"
,
notes
=
"新*查询巡检点对应设备列表"
)
@GetMapping
(
value
=
"/equip-list-new"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryEquipListByPointId
(
...
...
@@ -855,7 +855,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
queryEquipListByPointId
(
pointId
));
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点对应设备列表"
,
notes
=
"新*查询巡检点对应设备列表"
)
@GetMapping
(
value
=
"/item-list-new"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryItemList4RoutePoint
(
...
...
@@ -870,7 +870,7 @@ public class PointController extends AbstractBaseController {
* @param newPointParam
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"更新巡检点"
,
notes
=
"更新巡检点"
)
@PutMapping
(
value
=
"/v3/updatePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updatePoint3
(
@ApiParam
(
value
=
"巡检点"
,
required
=
true
)
@RequestBody
NewPointParam
newPointParam
)
{
...
...
@@ -892,7 +892,7 @@ public class PointController extends AbstractBaseController {
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点列表"
,
notes
=
"新*查询巡检点列表"
)
@GetMapping
(
value
=
"/regionTress"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getRegionTress
()
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/QueryStatsController.java
View file @
e8d929a6
...
...
@@ -19,7 +19,7 @@ import com.yeejoin.amos.patrol.business.util.CommonResponseUtil;
import
com.yeejoin.amos.patrol.business.vo.CheckStatsVo
;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -39,7 +39,7 @@ public class QueryStatsController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检点信息"
,
notes
=
"查询巡检点信息"
)
@PostMapping
(
value
=
"/checkStats"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryCheckStats
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/RouteController.java
View file @
e8d929a6
...
...
@@ -39,7 +39,7 @@ import com.yeejoin.amos.patrol.core.common.request.CommonPageable;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.common.request.RoutePointInputItemRequest
;
import
com.yeejoin.amos.patrol.core.common.response.RoutePointRespone
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.dao.entity.InputItem
;
import
com.yeejoin.amos.patrol.dao.entity.Plan
;
import
com.yeejoin.amos.patrol.dao.entity.Route
;
...
...
@@ -70,7 +70,7 @@ public class RouteController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增巡检路线"
,
notes
=
"新增巡检路线"
)
@PostMapping
(
value
=
"/addRoute"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addRoute
(
@ApiParam
(
value
=
"巡检路线"
,
required
=
true
)
@RequestBody
Route
route
)
{
...
...
@@ -120,7 +120,7 @@ public class RouteController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"更新巡检路线"
,
notes
=
"更新巡检路线"
)
@PutMapping
(
value
=
"/updateRoute"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updateRoute
(
@ApiParam
(
value
=
"巡检路线"
,
required
=
true
)
@RequestBody
Route
route
)
{
...
...
@@ -145,7 +145,7 @@ public class RouteController extends AbstractBaseController {
* @param routeIds
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检路线"
,
notes
=
"删除巡检路线"
)
@DeleteMapping
(
value
=
"/deleteRoute"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
deleteRoute
(
@ApiParam
(
value
=
"巡检路线ID"
,
required
=
false
)
@RequestParam
List
<
Long
>
routeIds
)
{
...
...
@@ -194,7 +194,7 @@ public class RouteController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检路线信息"
,
notes
=
"查询巡检路线信息"
)
@GetMapping
(
value
=
"/queryRouteById/{id}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryRouteById
(
...
...
@@ -208,7 +208,7 @@ public class RouteController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"迁移路线上点到其他路线"
,
notes
=
"迁移路线上点到其他路线"
)
@PostMapping
(
value
=
"/migrateRoutePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
migrateRoutePoint
(
...
...
@@ -230,7 +230,7 @@ public class RouteController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检路线信息"
,
notes
=
"查询巡检路线信息"
)
@PostMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listRoute
(
...
...
@@ -279,7 +279,7 @@ public class RouteController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询当前登录公司的的所有巡检路线"
,
notes
=
"查询当前登录公司的的所有巡检路线"
)
@GetMapping
(
value
=
"/All"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryAllRoute
()
{
...
...
@@ -303,7 +303,7 @@ public class RouteController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询所有路线列表<font color='blue'>手机app</font>"
,
notes
=
"查询所有路线列表<font color='blue'>手机app</font>"
)
@GetMapping
(
value
=
"/routeList"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryRouteList
()
{
...
...
@@ -339,7 +339,7 @@ public class RouteController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检路线上点列表"
,
notes
=
"查询巡检路线上点列表"
)
@PostMapping
(
value
=
"/listRoutePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listRoutePoint
(
@ApiParam
(
value
=
"路线id"
,
required
=
true
)
@RequestParam
long
routeId
,
...
...
@@ -360,7 +360,7 @@ public class RouteController extends AbstractBaseController {
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询巡检路线上点列表"
,
notes
=
"查询巡检路线上点列表"
)
@PutMapping
(
value
=
"/exchangeOrderNumber"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
exchangeRoutePointOrderNumber
(
@ApiParam
(
value
=
"路线巡检点id"
,
required
=
true
)
@RequestParam
long
src
,
...
...
@@ -377,7 +377,7 @@ public class RouteController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检路线上增加巡检点"
,
notes
=
"巡检路线上增加巡检点"
)
@PostMapping
(
value
=
"/addRoutePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addRoutePoint
(
@ApiParam
(
value
=
"路线id"
,
required
=
true
)
@RequestParam
String
routeId
,
...
...
@@ -414,7 +414,7 @@ public class RouteController extends AbstractBaseController {
* @param point
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检路线上删除巡检点"
,
notes
=
"巡检路线上删除巡检点"
)
@DeleteMapping
(
value
=
"/deleteRoutePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
deleteRoutePoint
(
@ApiParam
(
value
=
"路线id"
,
required
=
true
)
@RequestParam
Long
routeId
,
...
...
@@ -434,7 +434,7 @@ public class RouteController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"列出巡检线路点的巡检项"
,
notes
=
"列出巡检线路点的巡检项"
)
@PostMapping
(
value
=
"/listRoutePointInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listRoutePointInputItem
(
@ApiParam
(
value
=
"路线id"
,
required
=
true
)
@RequestBody
RoutePointInputItemRequest
request
)
{
...
...
@@ -454,7 +454,7 @@ public class RouteController extends AbstractBaseController {
* @param pointId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"列出巡检线路点的分类及巡检项"
,
notes
=
"列出巡检线路点的分类及巡检项"
)
@PostMapping
(
value
=
"/listRoutePointInputItemWithClassify"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
listRoutePointInputItemWithClassify
(
@ApiParam
(
value
=
"路线id"
,
required
=
true
)
@RequestParam
long
routeId
,
...
...
@@ -476,7 +476,7 @@ public class RouteController extends AbstractBaseController {
* @param inputItemIds
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"修改巡检线路点的巡检项"
,
notes
=
"修改巡检线路点的巡检项"
)
@PostMapping
(
value
=
"/updateRoutePointInputItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updateRoutePointInputItem
(
@ApiParam
(
value
=
"巡检路线id"
,
required
=
true
)
@RequestParam
Long
routeId
,
...
...
@@ -495,7 +495,7 @@ public class RouteController extends AbstractBaseController {
* 根据巡检路线ID获取该路线上的所有点ID
* @return IDs
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检路线上的所有点ID"
,
notes
=
"获取巡检路线上的所有点ID"
)
@RequestMapping
(
value
=
"/points/{routeID}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
getPointIDByRouyeId
(
@ApiParam
(
value
=
"巡检路线ID"
)
@PathVariable
(
required
=
true
)
Long
routeID
)
{
...
...
@@ -507,7 +507,7 @@ public class RouteController extends AbstractBaseController {
* 根据巡检路线ID获取该路线上的所有点ID
* @return IDs
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检路线上的所有点ID"
,
notes
=
"获取巡检路线上的所有点ID"
)
@RequestMapping
(
value
=
"/points"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
getPointIDByRouteId
(
@ApiParam
(
value
=
"巡检路线ID信息"
)
@RequestBody
(
required
=
true
)
Map
routeInfo
)
{
...
...
@@ -520,7 +520,7 @@ public class RouteController extends AbstractBaseController {
* 修改保存巡检路线
* @return IDs
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*保存巡检路线"
,
notes
=
"新*保存巡检路线"
)
@PutMapping
(
value
=
"/save-new"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updateRouteNew
(
@ApiParam
(
value
=
"巡检路线"
,
required
=
true
)
@RequestBody
Route
route
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/SafetyController.java
View file @
e8d929a6
...
...
@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
io.swagger.annotations.Api
;
...
...
@@ -57,7 +57,7 @@ public class SafetyController extends AbstractBaseController{
/**
* 保存登陆用户选择公司信息
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
" 保存登陆用户选择公司信息"
,
notes
=
" 保存登陆用户选择公司信息"
)
@PostMapping
(
value
=
"/save/curCompany"
)
public
CommonResponse
saveCurCompany
(
@RequestBody
ReginParams
reginParams
)
{
...
...
@@ -71,7 +71,7 @@ public class SafetyController extends AbstractBaseController{
/**
* 保存登陆用户选择公司信息(换流站项目登录巡检)
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存登陆用户选择公司信息"
,
notes
=
"保存登陆用户选择公司信息"
)
@GetMapping
(
value
=
"/save/shortCutCompany"
)
public
CommonResponse
specialSaveCurCompany
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/SafetyPreCtrlController.java
View file @
e8d929a6
...
...
@@ -41,7 +41,7 @@ import com.yeejoin.amos.patrol.core.common.request.CommonPageable;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.common.response.CommonPage
;
import
com.yeejoin.amos.patrol.core.common.response.QueryCriteriaRespone
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.dao.entity.Measure
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
...
...
@@ -70,7 +70,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检点统计"
,
notes
=
"巡检点统计"
)
@RequestMapping
(
value
=
"/countPoint"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
sumCheckPtById
()
{
...
...
@@ -87,7 +87,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param dateMonth
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检情况统计"
,
notes
=
"巡检情况统计"
)
@RequestMapping
(
value
=
"/countMonth/{dateMonth}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
countMonthCheckById
(
@ApiParam
(
value
=
"年月日(yyyyMMdd)8位"
,
required
=
false
)
@PathVariable
String
dateMonth
)
{
...
...
@@ -104,7 +104,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检执行情况查询"
,
notes
=
"巡检执行情况查询"
)
@RequestMapping
(
value
=
"/checkExecute/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
findChkExList
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -122,7 +122,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* 获取巡检点列表查询接口
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检点列表查询接口(<font color='blue'>release</font>)"
,
notes
=
"获取巡检点列表查询接口"
)
@RequestMapping
(
value
=
"/point/queryCriteria/init"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getQueryCriteriaInit
(){
...
...
@@ -142,7 +142,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检记录统计"
,
notes
=
"巡检记录统计"
)
@RequestMapping
(
value
=
"/check-info/count"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
countCheckInfoDate
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
HashMap
<
String
,
Object
>
map
)
{
...
...
@@ -161,7 +161,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param PointID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检点id查询巡检人员"
,
notes
=
"根据巡检点id查询巡检人员"
)
@RequestMapping
(
value
=
"/check-user/{PointID}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryCheckUserById
(
@ApiParam
(
value
=
"点编号"
,
required
=
true
)
@PathVariable
int
PointID
)
{
...
...
@@ -179,7 +179,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检记录查询"
,
notes
=
"巡检记录查询"
)
@RequestMapping
(
value
=
"/check-info/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCheckInfoPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -199,7 +199,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检记录id查询巡检检查项"
,
notes
=
"根据巡检记录id查询巡检检查项"
)
@RequestMapping
(
value
=
"check-input"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
fetchCheckInputById
(
@ApiParam
(
value
=
"查询参数"
,
required
=
true
)
@RequestBody
CheckDetailInputPageParam
param
)
{
...
...
@@ -224,7 +224,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检记录id查询巡检点装备(新)"
,
notes
=
"根据巡检记录id查询巡检点装备(新)"
)
@RequestMapping
(
value
=
"check-input-new"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
newfetchCheckInputById
(
@ApiParam
(
value
=
"查询参数"
,
required
=
true
)
@RequestBody
CheckDetailInputPageParam
param
)
{
...
...
@@ -238,7 +238,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检记录id查询巡检点装备(新)"
,
notes
=
"根据巡检记录id查询巡检点装备(新)"
)
@RequestMapping
(
value
=
"equip-input"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
newfetchEquipInputById
(
@ApiParam
(
value
=
"查询参数"
,
required
=
true
)
@RequestBody
CheckDetailInputPageParam
param
)
{
...
...
@@ -246,7 +246,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkInputBos
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风险点管控措施"
,
notes
=
"风险点管控措施"
)
@ApiImplicitParam
(
name
=
"PointID"
,
value
=
"风险点ID"
,
dataType
=
"int"
,
paramType
=
"path"
)
@RequestMapping
(
value
=
"/measures/{PointID}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -264,7 +264,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风险点查询"
,
notes
=
"风险点查询"
)
@RequestMapping
(
value
=
"/point/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
findPointList
(
...
...
@@ -279,7 +279,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkPtListBo
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风险点"
,
notes
=
"通过ID查询风险点"
)
@ApiImplicitParam
(
name
=
"PointID"
,
value
=
"风险点ID"
,
dataType
=
"int"
,
paramType
=
"path"
)
@RequestMapping
(
value
=
"/queryPointById/{PointID}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -329,7 +329,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
point
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据巡检记录id查询巡检详细信息"
,
notes
=
"根据巡检记录id查询巡检详细信息"
)
@RequestMapping
(
value
=
"check-detail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
fetchCheckDetailById
(
...
...
@@ -338,7 +338,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkDetail
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/state"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"获取巡检点状态枚举集合"
,
notes
=
"获取巡检点状态枚举集合"
)
public
CommonResponse
getCheckState
()
...
...
@@ -362,7 +362,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* 获取巡检点状态枚举
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/check/state"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"获取巡检点状态枚举集合"
,
notes
=
"获取巡检点状态枚举集合"
)
public
CommonResponse
getCheckStateList
(){
...
...
@@ -374,7 +374,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"巡检轨迹查询"
,
notes
=
"巡检轨迹查询"
)
@RequestMapping
(
value
=
"/trajectory/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
findTrajectoryList
(
...
...
@@ -399,7 +399,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
* @param param
* @return
*/
// @
Permission
// @
TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation
(
value
=
"点id"
,
notes
=
"路线计划点最近巡检记录查询"
)
@RequestMapping
(
value
=
"/routePlanPoint/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
findRoutePlanPointList
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
)
{
...
...
@@ -412,7 +412,7 @@ public class SafetyPreCtrlController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkChkExListBo
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询条件初始化口(<font color='blue'>release</font>)"
,
notes
=
"查询条件初始化口"
)
@RequestMapping
(
value
=
"/queryConditions/init/{type}"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
findCheckSystemInit
(
@ApiParam
(
value
=
"类型"
,
required
=
true
)
@PathVariable
String
type
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/SynDataController.java
View file @
e8d929a6
...
...
@@ -20,7 +20,7 @@ import com.yeejoin.amos.patrol.business.service.intfc.ISynDataService;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.business.util.Toke
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -46,7 +46,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 同步巡检项
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检项"
,
notes
=
"同步巡检项"
)
@PostMapping
(
value
=
"/inputItem/{operationType}"
)
public
CommonResponse
inputItem
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
...
...
@@ -77,7 +77,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 同步巡检点
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检点"
,
notes
=
"同步巡检点"
)
@PostMapping
(
value
=
"/point/{operationType}"
)
public
CommonResponse
point
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
...
...
@@ -108,7 +108,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 同步巡检点和巡检项关系
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检点和巡检项关系"
,
notes
=
"同步巡检点和巡检项关系"
)
@PostMapping
(
value
=
"/pointItem/relation/{operationType}"
)
public
CommonResponse
relation
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
...
...
@@ -135,7 +135,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 同步巡检路线
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检路线"
,
notes
=
"同步巡检路线"
)
@PostMapping
(
value
=
"/route/{operationType}"
)
public
CommonResponse
route
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
...
...
@@ -164,7 +164,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 同步巡检计划
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检计划"
,
notes
=
"同步巡检计划"
)
@PostMapping
(
value
=
"/plan/{operationType}"
)
public
CommonResponse
plan
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
...
...
@@ -197,7 +197,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 停用巡检计划
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"停用巡检计划"
,
notes
=
"停用巡检计划"
)
@PostMapping
(
value
=
"/stopPlan"
)
public
CommonResponse
stopPlan
(
@ApiParam
(
value
=
"巡检计划信息"
,
required
=
true
)
@RequestParam
String
originalId
)
{
...
...
@@ -217,7 +217,7 @@ public class SynDataController extends AbstractBaseController {
/**
* 获取巡检计划已完成次数
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检计划已完成次数"
,
notes
=
"获取巡检计划已完成次数"
)
@GetMapping
(
value
=
"/plan/getFinishTimes"
)
public
CommonResponse
getPlanFinishTimes
(
@ApiParam
(
value
=
"巡检计划原始编号(多个逗号隔开)"
,
required
=
true
)
@RequestParam
String
originalIds
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/TaskController.java
View file @
e8d929a6
...
...
@@ -70,7 +70,7 @@ import com.yeejoin.amos.patrol.core.async.AsyncTask;
import
com.yeejoin.amos.patrol.core.common.request.CommonPageable
;
import
com.yeejoin.amos.patrol.core.common.request.CommonRequest
;
import
com.yeejoin.amos.patrol.core.common.response.QueryCriteriaRespone
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.core.util.DateUtil
;
import
com.yeejoin.amos.patrol.dao.entity.Task
;
import
com.yeejoin.amos.patrol.dao.entity.TaskFeedback
;
...
...
@@ -108,7 +108,7 @@ public class TaskController extends AbstractBaseController{
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增任务"
,
notes
=
"新增任务"
)
@RequestMapping
(
value
=
"/addTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
addNewTask
(
@RequestBody
TaskParam
param
)
{
...
...
@@ -140,7 +140,7 @@ public class TaskController extends AbstractBaseController{
* @param taskID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务详情"
,
notes
=
"任务详情"
)
@RequestMapping
(
value
=
"/queryTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryTaskDetail
(
@ApiParam
(
value
=
"任务ID"
)
@RequestParam
(
required
=
true
)
long
taskID
)
{
...
...
@@ -200,7 +200,7 @@ public class TaskController extends AbstractBaseController{
* @param taskID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务详情"
,
notes
=
"任务详情"
)
@RequestMapping
(
value
=
"/printTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
printTaskDetail
(
@ApiParam
(
value
=
"任务ID"
)
@RequestParam
(
required
=
true
)
long
taskID
)
{
...
...
@@ -262,7 +262,7 @@ public class TaskController extends AbstractBaseController{
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"更新任务"
,
notes
=
"更新任务"
)
@RequestMapping
(
value
=
"/updateTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
updateTask
(
@ApiParam
(
value
=
"修改任务信息"
)
@RequestBody
TaskParam
param
)
{
...
...
@@ -283,7 +283,7 @@ public class TaskController extends AbstractBaseController{
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"处理任务"
,
notes
=
"处理任务"
)
@RequestMapping
(
value
=
"/handleTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
handleTask
(
@ApiParam
(
value
=
"任务ID"
,
required
=
true
)
@RequestParam
String
taskIds
,
...
...
@@ -309,7 +309,7 @@ public class TaskController extends AbstractBaseController{
* @param taskID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除任务"
,
notes
=
"删除任务"
)
@RequestMapping
(
value
=
"/delTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
delTask
(
@ApiParam
(
value
=
"任务ID"
,
required
=
true
)
@RequestParam
long
taskID
)
{
...
...
@@ -327,7 +327,7 @@ public class TaskController extends AbstractBaseController{
* @param taskID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除任务"
,
notes
=
"批量删除删除任务(任务id以半角英文字符分割。如: 1,2)"
)
@RequestMapping
(
value
=
"/batchDelTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
batchDelTask
(
@ApiParam
(
value
=
"任务ID"
,
required
=
true
)
@RequestParam
String
taskIDs
)
{
...
...
@@ -345,7 +345,7 @@ public class TaskController extends AbstractBaseController{
* @param param
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务回复"
,
notes
=
"任务回复"
)
@RequestMapping
(
value
=
"/feedbackTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
feedbackTask
(
@ApiParam
(
value
=
"回复信息(包含图片base64编码)"
)
@RequestBody
FeedbackParam
param
)
{
...
...
@@ -409,7 +409,7 @@ public class TaskController extends AbstractBaseController{
* @param taskID
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"任务转发"
,
notes
=
"任务转发"
)
@RequestMapping
(
value
=
"/forwardTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
forwardTask
(
@RequestParam
(
required
=
true
)
String
userId
,
@RequestParam
(
required
=
true
)
long
taskID
)
{
...
...
@@ -432,7 +432,7 @@ public class TaskController extends AbstractBaseController{
* @param pageable
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分页查询任务"
,
notes
=
"人也查询任务"
)
@RequestMapping
(
value
=
"/queryTaskByPage"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryTaskByPage
(
...
...
@@ -470,7 +470,7 @@ public class TaskController extends AbstractBaseController{
* @param queryRequests
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryTaskByCondition"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询任务"
,
notes
=
"条件查询任务"
)
public
CommonResponse
queryTaskByCondition
(
...
...
@@ -491,7 +491,7 @@ public class TaskController extends AbstractBaseController{
* @param queryRequests
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryTaskCountByCondition"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询任务个数"
,
notes
=
"条件查询任务个数"
)
public
CommonResponse
queryTaskCountByCondition
(
...
...
@@ -507,7 +507,7 @@ public class TaskController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
count
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryTaskCharts"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询任务图表数据(<font color='blue'>手机app</font>)"
,
notes
=
"条件查询任务图表数据(<font color='blue'>手机app</font>)"
)
public
CommonResponse
queryTaskCharts
(
@ApiParam
(
value
=
"组合查询条件"
,
required
=
false
,
defaultValue
=
"[]"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
)
{
...
...
@@ -556,7 +556,7 @@ public class TaskController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
charts
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryTasksByPage"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"条件查询任务数据(<font color='blue'>手机app</font>)"
,
notes
=
"条件查询任务数据(<font color='blue'>手机app</font>)"
)
public
CommonResponse
queryTasksByPage
(
@ApiParam
(
value
=
"组合查询条件"
,
required
=
false
,
defaultValue
=
"[]"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
...
...
@@ -612,7 +612,7 @@ public class TaskController extends AbstractBaseController{
* 获取任务列表查询接口
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取任务列表查询接口(<font color='blue'>release</font>)"
,
notes
=
"获取任务列表查询接口"
)
@RequestMapping
(
value
=
"/queryCriteria/init"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
getQueryCriteriaInit
(){
...
...
@@ -653,7 +653,7 @@ public class TaskController extends AbstractBaseController{
* @param dateMonth
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"隐患治理统计"
,
notes
=
"隐患治理统计"
)
@RequestMapping
(
value
=
"/hiddenDanger/count/{dateMonth}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
hiddenDangerCountByDate
(
@ApiParam
(
value
=
"年月日(yyyyMMdd)8位"
,
required
=
true
)
@PathVariable
String
dateMonth
)
{
...
...
@@ -685,7 +685,7 @@ public class TaskController extends AbstractBaseController{
* 根据巡检路线ID获取该路线上的所有点ID
* @return IDs
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检路线上的所有点ID"
,
notes
=
"获取巡检路线上的所有点ID"
)
@RequestMapping
(
value
=
"/points"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
getPointIDsByRouteID
(
@ApiParam
(
value
=
"巡检路线IDs"
)
@RequestBody
(
required
=
true
)
RoutePointParam
param
)
{
...
...
@@ -699,7 +699,7 @@ public class TaskController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
result
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/queryTaskStatistics"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"查询用户任务统计(<font color='blue'>手机app</font>)"
,
notes
=
"查询用户任务统计(<font color='blue'>手机app</font>)"
)
public
CommonResponse
getUserTaskStatistics
()
{
...
...
@@ -734,7 +734,7 @@ public class TaskController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
resp
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getStatisticsData"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"查询任务统计"
,
notes
=
"查询任务统计"
)
public
CommonResponse
getTaskStatistics
(
@RequestBody
(
required
=
true
)
TaskStatisticsParam
param
)
{
...
...
@@ -787,7 +787,7 @@ public class TaskController extends AbstractBaseController{
return
CommonResponseUtil
.
success
(
list
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/exportStatisticsData"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
)
@ApiOperation
(
value
=
"查询任务统计"
,
notes
=
"查询任务统计"
)
public
void
exportStatisticsData
(
@RequestBody
(
required
=
true
)
TaskStatisticsParam
param
,
HttpServletResponse
response
)
{
...
...
@@ -860,7 +860,7 @@ public class TaskController extends AbstractBaseController{
FileHelper
.
exportExcel
(
list
,
"任务统计"
,
"任务统计"
,
TaskStatisticsVo
.
class
,
fileName
+
".xls"
,
response
);
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据任务id查询任务日志"
,
notes
=
"根据任务id查询任务日志"
)
@RequestMapping
(
value
=
"/queryTaskRecordByTaskId"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryTaskRecordByTaskId
(
@ApiParam
(
value
=
"任务ID"
)
@RequestParam
(
required
=
true
)
long
taskId
)
{
...
...
@@ -879,7 +879,7 @@ public class TaskController extends AbstractBaseController{
}
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询检查项任务所有检查不合格项详情(<font color='blue'>手机app</font>)"
,
notes
=
"查询检查项任务所有检查不合格项详情"
)
@RequestMapping
(
value
=
"/queryCheckTaskDetail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryCheckTaskDetail
(
@RequestParam
(
required
=
true
)
long
checkId
,
@RequestParam
(
required
=
true
)
long
taskId
)
{
...
...
@@ -892,7 +892,7 @@ public class TaskController extends AbstractBaseController{
* 同步离线任务
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步离线任务(<font color='blue'>手机app</font>)"
,
notes
=
"同步离线任务"
)
@RequestMapping
(
value
=
"/queryOfflineTasks"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
synchronizedOfflineTasks
()
{
AgencyUserModel
user
=
getUserInfo
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/TaskReportController.java
View file @
e8d929a6
...
...
@@ -18,7 +18,7 @@ import com.yeejoin.amos.patrol.business.service.impl.TaskReportService;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
import
com.yeejoin.amos.patrol.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.patrol.business.util.Toke
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -34,7 +34,7 @@ public class TaskReportController extends AbstractBaseController{
@Autowired
private
TaskReportService
taskReportService
;
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
" 巡检完成情况月报表"
,
notes
=
" 巡检完成情况月报表"
)
@RequestMapping
(
value
=
"/{statistical}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
taskReport
(
...
...
@@ -52,7 +52,7 @@ public class TaskReportController extends AbstractBaseController{
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
" 人员综合统计分析"
,
notes
=
" 人员综合统计分析"
)
@PostMapping
(
value
=
"/comprehensive/user"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
comprehensiveStatisticalForUser
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/UserController.java
View file @
e8d929a6
...
...
@@ -51,7 +51,7 @@ import com.yeejoin.amos.patrol.business.util.DepartmentUserTreeAppVo;
import
com.yeejoin.amos.patrol.business.util.DepartmentUserTreeWebVo
;
import
com.yeejoin.amos.patrol.business.util.DesUtil
;
import
com.yeejoin.amos.patrol.business.util.StringUtil
;
import
com.yeejoin.amos.patrol.core.framework.Permiss
ion
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperat
ion
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.jpush.AppMessagePushService
;
...
...
@@ -97,7 +97,7 @@ public class UserController extends AbstractBaseController {
* @param deptId
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"部门人员查询"
,
notes
=
"部门人员查询"
)
@RequestMapping
(
value
=
"/queryDeptUser"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryDeptUser
(
@RequestParam
(
value
=
"deptId"
,
required
=
false
)
String
deptId
)
{
...
...
@@ -177,7 +177,7 @@ public class UserController extends AbstractBaseController {
return
userList
;
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"部门人员树查询"
,
notes
=
"部门人员树查询"
)
@RequestMapping
(
value
=
"/queryDeptUserTree1"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryDeptUserTree1
()
{
...
...
@@ -294,7 +294,7 @@ public class UserController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"人员查询"
,
notes
=
"人员查询"
)
@RequestMapping
(
value
=
"/queryAuthUsers"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
// @Authorization(ingore = true)
...
...
@@ -312,7 +312,7 @@ public class UserController extends AbstractBaseController {
*
* @return
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"部门人员树查询"
,
notes
=
"部门人员树查询"
)
@RequestMapping
(
value
=
"/queryDeptUserTree"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryDeptUserTree
()
{
...
...
@@ -330,7 +330,7 @@ public class UserController extends AbstractBaseController {
* @return
* @RequestParam userName 用户名
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"通讯录(<font color='blue'>手机app</font>)"
,
notes
=
"通讯录(<font color='blue'>手机app</font>)"
)
@RequestMapping
(
value
=
"/queryUserAddressList"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryUserAddressListTree
(
...
...
@@ -490,7 +490,7 @@ public class UserController extends AbstractBaseController {
return
userList
;
}
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"用户登录成功之后数据初始化(<font color='blue'>手机app</font>)"
,
notes
=
"用户登录成功之后数据初始化"
)
@RequestMapping
(
value
=
"/initData"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
initUserApp
()
{
...
...
@@ -529,7 +529,7 @@ public class UserController extends AbstractBaseController {
}
///////////////////////////////2019-11-18安全服务升级///////////////////////////////
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"通讯录"
,
notes
=
"通讯录"
)
@RequestMapping
(
value
=
"/mobile/addressList"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
addressList
()
{
...
...
@@ -740,7 +740,7 @@ public class UserController extends AbstractBaseController {
/**
* 保存登陆用户选择公司信息
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存登陆用户选择公司信息"
,
notes
=
"保存登陆用户选择公司信息"
)
@PostMapping
(
value
=
"/save/curCompany"
)
public
CommonResponse
saveCurCompany
(
@ApiParam
(
value
=
"当前登陆用户所选单位机构编号"
,
required
=
true
)
@RequestBody
ReginParams
reginParams
)
{
...
...
@@ -791,7 +791,7 @@ public class UserController extends AbstractBaseController {
/**
* 装备登录返回巡检统计信息
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"装备登录返回巡检统计信息"
,
notes
=
"装备登录返回巡检统计信息"
)
@GetMapping
(
value
=
"/patrolCount"
)
public
CommonResponse
getPatrolCount
()
{
...
...
@@ -808,7 +808,7 @@ public class UserController extends AbstractBaseController {
/**
* 修改密码
*/
@
Permission
@
TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
" 修改密码"
,
notes
=
" 修改密码"
)
@GetMapping
(
value
=
"/editPassword"
)
public
CommonResponse
editPassword
(
@ApiParam
(
value
=
"旧密码"
,
required
=
true
)
@RequestParam
String
password
,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/core/framework/Permission.java
View file @
e8d929a6
package
com
.
yeejoin
.
amos
.
patrol
.
core
.
framework
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
@Target
(
ElementType
.
METHOD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
Permission
{
String
value
()
default
""
;
}
//
package com.yeejoin.amos.patrol.core.framework;
//
//
import java.lang.annotation.Documented;
//
import java.lang.annotation.ElementType;
//
import java.lang.annotation.Retention;
//
import java.lang.annotation.RetentionPolicy;
//
import java.lang.annotation.Target;
//
//
@Target(ElementType.METHOD)
//
@Retention(RetentionPolicy.RUNTIME)
//
@Documented
//
public @interface Permission {
//
String value() default "";
//
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/core/framework/PermissionAspect.java
View file @
e8d929a6
package
com
.
yeejoin
.
amos
.
patrol
.
core
.
framework
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Before
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.RoleBo
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.config.TokenOperation
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.patrol.exception.PermissionException
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
@Aspect
@Component
@ResponseBody
public
class
PermissionAspect
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PermissionAspect
.
class
);
@Autowired
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
// 前置通知,在方法执行之前
@Before
(
value
=
"@annotation(Permission)"
)
public
void
PermissionCheck
(
JoinPoint
joinPoint
)
throws
PermissionException
{
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
logger
.
info
(
"======开始权限校验======"
);
// 用户token
String
token
=
(
String
)
request
.
getHeader
(
"token"
);
token
=
ObjectUtils
.
isEmpty
(
token
)
?
(
String
)
request
.
getHeader
(
"X-Access-Token"
)
:
token
;
String
product
=
(
String
)
request
.
getHeader
(
"product"
);
String
appKey
=
(
String
)
request
.
getHeader
(
"appKey"
);
logger
.
info
(
"用户token:"
+
token
);
RequestContext
.
setToken
(
token
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setAppKey
(
appKey
);
if
(!
TokenOperation
.
refresh
(
token
))
{
throw
new
PermissionException
(
"登录信息失效,请重新登录"
);
}
if
(
joinPoint
.
getSignature
().
getName
().
equals
(
"saveCurCompany"
))
{
return
;
}
FeignClientResult
feignClientResult
;
AgencyUserModel
userModel
=
null
;
try
{
feignClientResult
=
Privilege
.
agencyUserClient
.
getme
();
userModel
=
(
AgencyUserModel
)
feignClientResult
.
getResult
();
}
catch
(
InnerInvokException
e
)
{
e
.
printStackTrace
();
}
String
userId
=
null
;
ReginParams
regionParam
=
new
ReginParams
();
if
(
userModel
!=
null
){
userId
=
userModel
.
getUserId
();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
userModel
.
getOrgRoles
();
List
<
RoleModel
>
roleModels
=
null
;
if
(!
ObjectUtils
.
isEmpty
(
orgRoles
))
{
for
(
Map
.
Entry
<
Long
,
List
<
RoleModel
>>
entry
:
orgRoles
.
entrySet
())
{
roleModels
=
entry
.
getValue
();
break
;
}
}
ReginParams
reginParams
=
JSON
.
parseObject
(
redisTemplate
.
opsForValue
().
get
(
buildKey
(
userModel
.
getUserId
(),
token
)),
ReginParams
.
class
);
if
(
reginParams
==
null
&&
userModel
.
getCompanys
().
size
()
>
0
){
CompanyModel
companyModel
=
userModel
.
getCompanys
().
get
(
0
);
List
<
DepartmentModel
>
deptList
=
remoteSecurityService
.
getDepartmentTreeByCompanyId
(
token
,
product
,
appKey
,
companyModel
.
getSequenceNbr
().
toString
());
if
(
deptList
.
size
()
>
0
){
CompanyBo
companyBo
=
convertCompanyModelToBo
(
companyModel
);
DepartmentBo
departmentBo
=
convertDepartmentModelToBo
(
deptList
.
get
(
0
));
regionParam
.
setCompany
(
companyBo
);
regionParam
.
setDepartment
(
departmentBo
);
if
(!
ObjectUtils
.
isEmpty
(
roleModels
)){
regionParam
.
setRole
(
convertRoleModelToBo
(
roleModels
.
get
(
0
)));
}
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
userModel
.
getOrgRoles
())
&&
!
ObjectUtils
.
isEmpty
(
companyModel
)
&&
userModel
.
getOrgRoles
().
get
(
companyModel
.
getSequenceNbr
()).
size
()
>
0
){
RoleModel
role
=
userModel
.
getOrgRoles
().
get
(
companyModel
.
getSequenceNbr
()).
get
(
0
);
RoleBo
roleBo
=
new
RoleBo
();
BeanUtils
.
copyProperties
(
role
,
roleBo
);
regionParam
.
setRole
(
roleBo
);
}
}
redisTemplate
.
opsForValue
().
set
(
buildKey
(
userId
,
token
),
JSONObject
.
toJSONString
(
regionParam
));
}
}
}
private
DepartmentBo
convertDepartmentModelToBo
(
DepartmentModel
departmentModel
){
DepartmentBo
departmentBo
=
new
DepartmentBo
();
if
(
departmentModel
!=
null
)
{
departmentBo
.
setCompanySeq
(
departmentModel
.
getCompanySeq
());
departmentBo
.
setDepartmentDesc
(
departmentModel
.
getDepartmentDesc
());
departmentBo
.
setDepartmentName
(
departmentModel
.
getDepartmentName
());
departmentBo
.
setLevel
(
departmentModel
.
getLevel
());
departmentBo
.
setOrgCode
(
departmentModel
.
getOrgCode
());
departmentBo
.
setParentId
(
departmentModel
.
getParentId
());
departmentBo
.
setDeptOrgCode
(
departmentModel
.
getDeptOrgCode
());
departmentBo
.
setSequenceNbr
(
departmentModel
.
getSequenceNbr
());
}
return
departmentBo
;
}
/**
* Model 转 Bo
*/
private
CompanyBo
convertCompanyModelToBo
(
CompanyModel
companyModel
){
CompanyBo
companyBo
=
new
CompanyBo
();
if
(
companyModel
!=
null
)
{
companyBo
.
setAddress
(
companyModel
.
getAddress
());
companyBo
.
setCompanyName
(
companyModel
.
getCompanyName
());
companyBo
.
setCompanyOrgCode
(
companyModel
.
getCompanyOrgCode
());
companyBo
.
setEmail
(
companyModel
.
getEmail
());
companyBo
.
setLandlinePhone
(
companyModel
.
getLandlinePhone
());
companyBo
.
setLongitude
(
companyModel
.
getLongitude
());
companyBo
.
setLatitude
(
companyModel
.
getLatitude
());
companyBo
.
setLevel
(
companyModel
.
getLevel
());
companyBo
.
setOrgCode
(
companyModel
.
getOrgCode
());
companyBo
.
setSequenceNbr
(
companyModel
.
getSequenceNbr
());
companyBo
.
setParentId
(
companyModel
.
getParentId
());
}
return
companyBo
;
}
private
RoleBo
convertRoleModelToBo
(
RoleModel
roleModel
)
{
RoleBo
roleBo
=
new
RoleBo
();
if
(
roleModel
!=
null
){
roleBo
.
setRoleName
(
roleModel
.
getRoleName
());
roleBo
.
setRoleType
(
roleModel
.
getRoleType
());
roleBo
.
setSequenceNbr
(
roleModel
.
getSequenceNbr
());
}
return
roleBo
;
}
//redi缓存选择的用户信息
private
String
buildKey
(
String
userId
,
String
token
)
{
return
"region_"
+
userId
+
"_"
+
token
;
}
}
//
package com.yeejoin.amos.patrol.core.framework;
//
//
//
import java.util.List;
//
import java.util.Map;
//
//
import javax.servlet.http.HttpServletRequest;
//
//
import org.aspectj.lang.JoinPoint;
//
import org.aspectj.lang.annotation.Aspect;
//
import org.aspectj.lang.annotation.Before;
//
import org.slf4j.Logger;
//
import org.slf4j.LoggerFactory;
//
import org.springframework.beans.BeanUtils;
//
import org.springframework.beans.factory.annotation.Autowired;
//
import org.springframework.data.redis.core.RedisTemplate;
//
import org.springframework.stereotype.Component;
//
import org.springframework.util.ObjectUtils;
//
import org.springframework.web.bind.annotation.ResponseBody;
//
import org.springframework.web.context.request.RequestContextHolder;
//
import org.springframework.web.context.request.ServletRequestAttributes;
//
import org.typroject.tyboot.core.foundation.context.RequestContext;
//
//
import com.alibaba.fastjson.JSON;
//
import com.alibaba.fastjson.JSONObject;
//
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
//
import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo;
//
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
//
import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
//
import com.yeejoin.amos.component.feign.config.InnerInvokException;
//
import com.yeejoin.amos.component.feign.config.TokenOperation;
//
import com.yeejoin.amos.component.feign.model.FeignClientResult;
//
import com.yeejoin.amos.feign.privilege.Privilege;
//
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
//
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
//
import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
//
import com.yeejoin.amos.feign.privilege.model.RoleModel;
//
import com.yeejoin.amos.patrol.exception.PermissionException;
//
import com.yeejoin.amos.patrol.feign.RemoteSecurityService;
//
//
@Aspect
//
@Component
//
@ResponseBody
//
public class PermissionAspect {
//
private static final Logger logger = LoggerFactory.getLogger(PermissionAspect.class);
//
//
@Autowired
//
private RedisTemplate<String, String> redisTemplate;
//
//
@Autowired
//
private RemoteSecurityService remoteSecurityService;
//
//
// 前置通知,在方法执行之前
//
@Before(value = "@annotation(Permission)")
//
public void PermissionCheck(JoinPoint joinPoint) throws PermissionException {
//
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder
//
.getRequestAttributes()).getRequest();
//
//
logger.info("======开始权限校验======");
//
// 用户token
//
String token = (String) request.getHeader("token");
//
token = ObjectUtils.isEmpty(token) ? (String) request.getHeader("X-Access-Token") : token;
//
String product = (String) request.getHeader("product");
//
String appKey = (String) request.getHeader("appKey");
//
logger.info("用户token:" + token);
//
RequestContext.setToken(token);
//
RequestContext.setProduct(product);
//
RequestContext.setAppKey(appKey);
//
if (!TokenOperation.refresh(token)) {
//
throw new PermissionException("登录信息失效,请重新登录");
//
}
//
//
if (joinPoint.getSignature().getName().equals("saveCurCompany")) {
//
return;
//
}
//
FeignClientResult feignClientResult;
//
AgencyUserModel userModel=null;
//
try {
//
feignClientResult = Privilege.agencyUserClient.getme();
//
userModel = (AgencyUserModel) feignClientResult.getResult();
//
//
} catch (InnerInvokException e) {
//
e.printStackTrace();
//
}
//
String userId = null;
//
ReginParams regionParam = new ReginParams();
//
if(userModel != null){
//
userId = userModel.getUserId();
//
Map<Long, List<RoleModel>> orgRoles = userModel.getOrgRoles();
//
List<RoleModel> roleModels = null;
//
if(!ObjectUtils.isEmpty(orgRoles)) {
//
for (Map.Entry<Long, List<RoleModel>> entry : orgRoles.entrySet()) {
//
roleModels = entry.getValue();
//
break;
//
}
//
}
//
ReginParams reginParams = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(userModel.getUserId(), token)), ReginParams.class);
//
if(reginParams == null && userModel.getCompanys().size() > 0){
//
CompanyModel companyModel = userModel.getCompanys().get(0);
//
//
List<DepartmentModel> deptList = remoteSecurityService.getDepartmentTreeByCompanyId(token, product, appKey, companyModel.getSequenceNbr().toString());
//
if(deptList.size() > 0){
//
CompanyBo companyBo = convertCompanyModelToBo(companyModel);
//
DepartmentBo departmentBo = convertDepartmentModelToBo(deptList.get(0));
//
regionParam.setCompany(companyBo);
//
regionParam.setDepartment(departmentBo);
//
if(!ObjectUtils.isEmpty(roleModels)){
//
regionParam.setRole(convertRoleModelToBo(roleModels.get(0)));
//
}
//
}else{
//
if(!ObjectUtils.isEmpty(userModel.getOrgRoles()) && !ObjectUtils.isEmpty(companyModel) && userModel.getOrgRoles().get(companyModel.getSequenceNbr()).size() > 0){
//
RoleModel role = userModel.getOrgRoles().get(companyModel.getSequenceNbr()).get(0);
//
RoleBo roleBo = new RoleBo();
//
BeanUtils.copyProperties(role, roleBo);
//
regionParam.setRole(roleBo);
//
}
//
}
//
redisTemplate.opsForValue().set(buildKey(userId, token), JSONObject.toJSONString(regionParam));
//
}
//
}
//
}
//
//
//
private DepartmentBo convertDepartmentModelToBo(DepartmentModel departmentModel){
//
DepartmentBo departmentBo = new DepartmentBo();
//
if(departmentModel != null) {
//
departmentBo.setCompanySeq(departmentModel.getCompanySeq());
//
departmentBo.setDepartmentDesc(departmentModel.getDepartmentDesc());
//
departmentBo.setDepartmentName(departmentModel.getDepartmentName());
//
departmentBo.setLevel(departmentModel.getLevel());
//
departmentBo.setOrgCode(departmentModel.getOrgCode());
//
departmentBo.setParentId(departmentModel.getParentId());
//
departmentBo.setDeptOrgCode(departmentModel.getDeptOrgCode());
//
departmentBo.setSequenceNbr(departmentModel.getSequenceNbr());
//
}
//
return departmentBo;
//
}
//
//
/**
//
* Model 转 Bo
//
*/
//
private CompanyBo convertCompanyModelToBo(CompanyModel companyModel){
//
//
CompanyBo companyBo = new CompanyBo();
//
if(companyModel != null) {
//
companyBo.setAddress(companyModel.getAddress());
//
companyBo.setCompanyName(companyModel.getCompanyName());
//
companyBo.setCompanyOrgCode(companyModel.getCompanyOrgCode());
//
companyBo.setEmail(companyModel.getEmail());
//
companyBo.setLandlinePhone(companyModel.getLandlinePhone());
//
companyBo.setLongitude(companyModel.getLongitude());
//
companyBo.setLatitude(companyModel.getLatitude());
//
companyBo.setLevel(companyModel.getLevel());
//
companyBo.setOrgCode(companyModel.getOrgCode());
//
companyBo.setSequenceNbr(companyModel.getSequenceNbr());
//
companyBo.setParentId(companyModel.getParentId());
//
}
//
return companyBo;
//
}
//
//
private RoleBo convertRoleModelToBo(RoleModel roleModel) {
//
RoleBo roleBo = new RoleBo();
//
if(roleModel != null){
//
roleBo.setRoleName(roleModel.getRoleName());
//
roleBo.setRoleType(roleModel.getRoleType());
//
roleBo.setSequenceNbr(roleModel.getSequenceNbr());
//
}
//
return roleBo;
//
}
//
//
//redi缓存选择的用户信息
//
private String buildKey(String userId, String token) {
//
return "region_" + userId + "_" + token;
//
//
}
//
}
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