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
2fbf82de
Commit
2fbf82de
authored
Aug 31, 2021
by
李成龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
2e2913b4
7852d225
Hide whitespace changes
Inline
Side-by-side
Showing
96 changed files
with
2840 additions
and
2306 deletions
+2840
-2306
WorkflowFeignService.java
.../boot/biz/common/workflow/feign/WorkflowFeignService.java
+1
-1
MetaHandler.java
...in/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
+10
-7
controller.java.ftl
...iz-common/src/main/resources/template/controller.java.ftl
+1
-1
FirefightersContractDto.java
...s/boot/module/common/api/dto/FirefightersContractDto.java
+3
-0
WaterResourceDto.java
...oin/amos/boot/module/common/api/dto/WaterResourceDto.java
+6
-0
FailureDetailsMapper.java
...s/boot/module/common/api/mapper/FailureDetailsMapper.java
+19
-4
LinkageUnitMapper.java
...amos/boot/module/common/api/mapper/LinkageUnitMapper.java
+1
-1
ILinkageUnitService.java
...s/boot/module/common/api/service/ILinkageUnitService.java
+7
-11
FailureDetailsMapper.xml
...on-api/src/main/resources/mapper/FailureDetailsMapper.xml
+3
-1
LinkageUnitMapper.xml
...ommon-api/src/main/resources/mapper/LinkageUnitMapper.xml
+4
-0
WaterResourceMapper.xml
...mon-api/src/main/resources/mapper/WaterResourceMapper.xml
+2
-2
AircraftDtos.java
...om/yeejoin/amos/boot/module/jcs/api/dto/AircraftDtos.java
+163
-0
AlertLocationLogDto.java
...oin/amos/boot/module/jcs/api/dto/AlertLocationLogDto.java
+33
-0
RallyPointDto.java
...m/yeejoin/amos/boot/module/jcs/api/dto/RallyPointDto.java
+39
-0
AlertLocationLog.java
...oin/amos/boot/module/jcs/api/entity/AlertLocationLog.java
+43
-0
RallyPoint.java
...m/yeejoin/amos/boot/module/jcs/api/entity/RallyPoint.java
+55
-0
AlertLocationLogMapper.java
...os/boot/module/jcs/api/mapper/AlertLocationLogMapper.java
+14
-0
RallyPointMapper.java
...oin/amos/boot/module/jcs/api/mapper/RallyPointMapper.java
+14
-0
IAlertLocationLogService.java
...boot/module/jcs/api/service/IAlertLocationLogService.java
+12
-0
IRallyPointService.java
.../amos/boot/module/jcs/api/service/IRallyPointService.java
+12
-0
AlertLocationLogMapper.xml
...-api/src/main/resources/mapper/AlertLocationLogMapper.xml
+5
-0
RallyPointMapper.xml
...le-jcs-api/src/main/resources/mapper/RallyPointMapper.xml
+5
-0
PlanTypeEnum.java
...m/yeejoin/amos/maintenance/common/enums/PlanTypeEnum.java
+54
-0
Check.java
...n/java/com/yeejoin/amos/maintenance/dao/entity/Check.java
+480
-439
Plan.java
...in/java/com/yeejoin/amos/maintenance/dao/entity/Plan.java
+486
-490
Point.java
...n/java/com/yeejoin/amos/supervision/dao/entity/Point.java
+7
-7
AlertCalledDto.java
.../yeejoin/amos/boot/module/tzs/api/dto/AlertCalledDto.java
+3
-0
AlertCalled.java
.../yeejoin/amos/boot/module/tzs/api/entity/AlertCalled.java
+4
-0
AlertCalledMapper.java
...in/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
+18
-3
IAlertCalledService.java
...amos/boot/module/tzs/api/service/IAlertCalledService.java
+18
-4
AlertCalledMapper.xml
...e-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
+29
-32
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+2
-2
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+52
-2
FireExpertsController.java
...t/module/common/biz/controller/FireExpertsController.java
+44
-12
LinkageUnitController.java
...t/module/common/biz/controller/LinkageUnitController.java
+2
-2
OrgPersonController.java
...oot/module/common/biz/controller/OrgPersonController.java
+1
-9
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+16
-2
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+4
-4
FailureAuditServiceImpl.java
...dule/common/biz/service/impl/FailureAuditServiceImpl.java
+5
-1
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+21
-5
FailureMaintainServiceImpl.java
...e/common/biz/service/impl/FailureMaintainServiceImpl.java
+0
-13
FailureRepairlogServiceImpl.java
.../common/biz/service/impl/FailureRepairlogServiceImpl.java
+0
-2
LinkageUnitServiceImpl.java
...odule/common/biz/service/impl/LinkageUnitServiceImpl.java
+6
-4
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+14
-1
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+4
-7
AircraftController.java
...os/boot/module/jcs/biz/controller/AircraftController.java
+117
-48
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+14
-0
AlertLocationLogController.java
...module/jcs/biz/controller/AlertLocationLogController.java
+116
-0
RallyPointController.java
.../boot/module/jcs/biz/controller/RallyPointController.java
+130
-0
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+35
-0
AlertLocationLogServiceImpl.java
...ule/jcs/biz/service/impl/AlertLocationLogServiceImpl.java
+34
-0
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+2
-2
RallyPointServiceImpl.java
...ot/module/jcs/biz/service/impl/RallyPointServiceImpl.java
+35
-0
pom.xml
...-boot-module-biz/amos-boot-module-maintenance-biz/pom.xml
+4
-6
CheckController.java
...amos/maintenance/business/controller/CheckController.java
+22
-15
PlanTaskController.java
...s/maintenance/business/controller/PlanTaskController.java
+4
-17
PointController.java
...amos/maintenance/business/controller/PointController.java
+2
-5
RouteController.java
...amos/maintenance/business/controller/RouteController.java
+13
-61
SynDataController.java
...os/maintenance/business/controller/SynDataController.java
+14
-213
CheckMapper.java
...oin/amos/maintenance/business/dao/mapper/CheckMapper.java
+1
-1
PlanTaskPointInputItemBo.java
...nce/business/entity/mybatis/PlanTaskPointInputItemBo.java
+17
-0
CheckServiceImpl.java
...s/maintenance/business/service/impl/CheckServiceImpl.java
+34
-20
PlanTaskServiceImpl.java
...aintenance/business/service/impl/PlanTaskServiceImpl.java
+7
-20
PointServiceImpl.java
...s/maintenance/business/service/impl/PointServiceImpl.java
+11
-22
RouteServiceImpl.java
...s/maintenance/business/service/impl/RouteServiceImpl.java
+20
-7
SynDataServiceImpl.java
...maintenance/business/service/impl/SynDataServiceImpl.java
+20
-524
ICheckService.java
...mos/maintenance/business/service/intfc/ICheckService.java
+1
-1
IPointService.java
...mos/maintenance/business/service/intfc/IPointService.java
+2
-1
ISynDataService.java
...s/maintenance/business/service/intfc/ISynDataService.java
+7
-32
PersonIdentifyAspect.java
...amos/maintenance/core/framework/PersonIdentifyAspect.java
+1
-1
AppMessagePushService.java
...yeejoin/amos/maintenance/jpush/AppMessagePushService.java
+61
-62
JobService.java
.../java/com/yeejoin/amos/maintenance/quartz/JobService.java
+6
-2
PlanTaskJob.java
...n/java/com/yeejoin/amos/maintenance/task/PlanTaskJob.java
+27
-0
CheckController.java
...amos/supervision/business/controller/CheckController.java
+5
-7
InputItemMapper.java
...amos/supervision/business/dao/mapper/InputItemMapper.java
+2
-0
IPointDao.java
...n/amos/supervision/business/dao/repository/IPointDao.java
+3
-3
CheckServiceImpl.java
...s/supervision/business/service/impl/CheckServiceImpl.java
+1
-0
PointServiceImpl.java
...s/supervision/business/service/impl/PointServiceImpl.java
+14
-8
InputItemParamUtil.java
...in/amos/supervision/business/util/InputItemParamUtil.java
+2
-0
AmosMqttListener.java
...a/com/yeejoin/amos/supervision/mqtt/AmosMqttListener.java
+7
-4
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+64
-17
CtiController.java
...in/amos/boot/module/tzs/biz/controller/CtiController.java
+6
-3
VoiceRecordFileController.java
.../module/tzs/biz/controller/VoiceRecordFileController.java
+12
-7
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+31
-3
CtiServiceImpl.java
...amos/boot/module/tzs/biz/service/impl/CtiServiceImpl.java
+9
-40
pom.xml
amos-boot-module/amos-boot-module-biz/pom.xml
+6
-0
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+58
-1
MaintenanceApplication.java
...rc/main/java/com/yeejoin/amos/MaintenanceApplication.java
+13
-10
mt-1.0.0.xml
...-maintenance/src/main/resources/db/changelog/mt-1.0.0.xml
+45
-0
dbTemplate_check.xml
...tenance/src/main/resources/db/mapper/dbTemplate_check.xml
+39
-51
dbTemplate_plan_task.xml
...nce/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+8
-2
application-dev.properties
...supervision/src/main/resources/application-dev.properties
+8
-7
dbTemplate_check.xml
...rvision/src/main/resources/db/mapper/dbTemplate_check.xml
+7
-7
dbTemplate_input_item.xml
...on/src/main/resources/db/mapper/dbTemplate_input_item.xml
+14
-4
application-dev.properties
...-system-tzs/src/main/resources/application-dev.properties
+6
-2
pom.xml
pom.xml
+1
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/workflow/feign/WorkflowFeignService.java
View file @
2fbf82de
...
@@ -13,7 +13,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -13,7 +13,7 @@ import com.alibaba.fastjson.JSONObject;
import
feign.Response
;
import
feign.Response
;
@FeignClient
(
name
=
"AMOS-API-WORKFLOW
-CHENZHAO
"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
public
interface
WorkflowFeignService
{
public
interface
WorkflowFeignService
{
/**
/**
* 发起流程
* 发起流程
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
View file @
2fbf82de
...
@@ -14,6 +14,7 @@ import org.springframework.util.ObjectUtils;
...
@@ -14,6 +14,7 @@ import org.springframework.util.ObjectUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Map
;
/**
/**
* @author Dell
* @author Dell
...
@@ -39,10 +40,10 @@ public class MetaHandler implements MetaObjectHandler {
...
@@ -39,10 +40,10 @@ public class MetaHandler implements MetaObjectHandler {
*/
*/
@Override
@Override
public
void
insertFill
(
MetaObject
metaObject
)
{
public
void
insertFill
(
MetaObject
metaObject
)
{
autoFillUser
(
metaObject
);
autoFillUser
(
metaObject
,
metaObject
.
getOriginalObject
()
);
}
}
private
void
autoFillUser
(
MetaObject
metaObject
)
{
private
void
autoFillUser
(
MetaObject
metaObject
,
Object
entity
)
{
//获取用户信息 以及当前用户登录公司部门,角色
//获取用户信息 以及当前用户登录公司部门,角色
ReginParams
reginParams
=
ReginParams
reginParams
=
JSONObject
.
parseObject
(
null
!=
redisUtils
.
get
(
RedisKey
.
buildKey
(
getToken
()))
?
JSONObject
.
parseObject
(
null
!=
redisUtils
.
get
(
RedisKey
.
buildKey
(
getToken
()))
?
...
@@ -54,12 +55,12 @@ public class MetaHandler implements MetaObjectHandler {
...
@@ -54,12 +55,12 @@ public class MetaHandler implements MetaObjectHandler {
if
(
ObjectUtils
.
isEmpty
(
reginParams
)
||
ObjectUtils
.
isEmpty
(
agencyUserModel
)){
if
(
ObjectUtils
.
isEmpty
(
reginParams
)
||
ObjectUtils
.
isEmpty
(
agencyUserModel
)){
return
;
return
;
}
}
Object
entity
=
metaObject
.
getOriginalObject
();
//
Object entity = metaObject.getOriginalObject();
if
(
isExistField
(
"recUserId"
,
entity
))
{
if
(
isExistField
(
"recUserId"
,
entity
))
{
this
.
setFieldValByName
(
"recUserId"
,
agencyUserModel
.
getUserId
(),
metaObject
);
this
.
setFieldValByName
(
"recUserId"
,
agencyUserModel
.
getUserId
(),
metaObject
);
}
}
if
(
isExistField
(
"recUserName"
,
entity
))
{
if
(
isExistField
(
"recUserName"
,
entity
))
{
this
.
setFieldValByName
(
"recUserName"
,
agencyUserModel
.
getUserName
(),
metaObject
);
this
.
setFieldValByName
(
"recUserName"
,
agencyUserModel
.
getUserName
(),
metaObject
);
}
}
...
@@ -71,8 +72,8 @@ public class MetaHandler implements MetaObjectHandler {
...
@@ -71,8 +72,8 @@ public class MetaHandler implements MetaObjectHandler {
Date
currentDate
=
new
Date
();
Date
currentDate
=
new
Date
();
this
.
setFieldValByName
(
"recDate"
,
currentDate
,
metaObject
);
this
.
setFieldValByName
(
"recDate"
,
currentDate
,
metaObject
);
}
}
// if (isExistField("companyCode", entity)) {
// if (isExistField("companyCode", entity)) {
// this.setFieldValByName("companyCode", reginParams.getDepartment().getOrgCode(), metaObject);
// this.setFieldValByName("companyCode", reginParams.getDepartment().getOrgCode(), metaObject);
// }
// }
...
@@ -102,6 +103,8 @@ public class MetaHandler implements MetaObjectHandler {
...
@@ -102,6 +103,8 @@ public class MetaHandler implements MetaObjectHandler {
*/
*/
@Override
@Override
public
void
updateFill
(
MetaObject
metaObject
)
{
public
void
updateFill
(
MetaObject
metaObject
)
{
Object
updateEntity
=
((
Map
)
metaObject
.
getOriginalObject
()).
get
(
"et"
);
autoFillUser
(
metaObject
,
updateEntity
);
Date
currentDate
=
new
Date
();
Date
currentDate
=
new
Date
();
this
.
setFieldValByName
(
"updateTime"
,
currentDate
,
metaObject
);
this
.
setFieldValByName
(
"updateTime"
,
currentDate
,
metaObject
);
}
}
...
...
amos-boot-biz-common/src/main/resources/template/controller.java.ftl
View file @
2fbf82de
...
@@ -35,7 +35,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -35,7 +35,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
<#
else
>
<#
else
>
@
Controller
@
Controller
</#
if
>
</#
if
>
@
RequestMapping
(
value
=
"
<#if package.ModuleName??>/${package.ModuleName}</#if>
/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>"
)
@
RequestMapping
(
value
=
"/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>"
)
<#
if
kotlin
>
<#
if
kotlin
>
class
${
table
.
controllerName
}<#
if
superControllerClass
??>
:
${
superControllerClass
}()</#
if
>
class
${
table
.
controllerName
}<#
if
superControllerClass
??>
:
${
superControllerClass
}()</#
if
>
<#
else
>
<#
else
>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FirefightersContractDto.java
View file @
2fbf82de
...
@@ -37,6 +37,9 @@ public class FirefightersContractDto extends BaseDto {
...
@@ -37,6 +37,9 @@ public class FirefightersContractDto extends BaseDto {
@ApiModelProperty
(
value
=
"到期时间"
)
@ApiModelProperty
(
value
=
"到期时间"
)
private
Date
expireTime
;
private
Date
expireTime
;
@ApiModelProperty
(
value
=
"起始时间"
)
private
Date
startTime
;
@ApiModelProperty
(
value
=
"服务内容"
)
@ApiModelProperty
(
value
=
"服务内容"
)
private
String
serviceContent
;
private
String
serviceContent
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/WaterResourceDto.java
View file @
2fbf82de
...
@@ -306,10 +306,16 @@ public class WaterResourceDto extends BaseDto {
...
@@ -306,10 +306,16 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"物联参数"
)
@ApiModelProperty
(
value
=
"物联参数"
)
private
WaterResourceIotDto
waterResourceIotDto
;
private
WaterResourceIotDto
waterResourceIotDto
;
@ApiModelProperty
(
"设施定义id"
)
private
Long
equipId
;
@ApiModelProperty
(
"设施定义名称"
)
@ApiModelProperty
(
"设施定义名称"
)
@ExcelProperty
(
value
=
"设施定义名称"
,
index
=
44
)
@ExcelProperty
(
value
=
"设施定义名称"
,
index
=
44
)
private
String
equipName
;
private
String
equipName
;
@ApiModelProperty
(
"设施分类id"
)
private
Long
equipCategoryId
;
@ApiModelProperty
(
"设施分类名称"
)
@ApiModelProperty
(
"设施分类名称"
)
@ExcelProperty
(
value
=
"设施分类名称"
,
index
=
45
)
@ExcelProperty
(
value
=
"设施分类名称"
,
index
=
45
)
private
String
equipCategoryName
;
private
String
equipCategoryName
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/FailureDetailsMapper.java
View file @
2fbf82de
...
@@ -22,7 +22,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -22,7 +22,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
/**
/**
* 查询全部 分页
* 查询全部 分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param current 当前页
* @param current 当前页
* @return
* @return
*/
*/
...
@@ -30,11 +33,17 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -30,11 +33,17 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
List
<
FailureDetails
>
selectAllPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
List
<
FailureDetails
>
selectAllPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
/**
* 查询我发起的 分页
* 查询我发起的 分页
* current 当前页
* current 当前页
* size 条数
* size 条数
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @return
* @return
*/
*/
List
<
FailureDetails
>
selectISubPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
List
<
FailureDetails
>
selectISubPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
...
@@ -42,7 +51,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -42,7 +51,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
/**
/**
* 查询待处理 分页
* 查询待处理 分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @param
* @return
* @return
*/
*/
...
@@ -58,7 +70,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -58,7 +70,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
String
startTime
,
String
endTime
,
Integer
submissionPid
);
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
/**
* 查询待处理 维修人员分页
* 查询待处理 维修人员分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @param
* @return
* @return
*/
*/
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/LinkageUnitMapper.java
View file @
2fbf82de
...
@@ -58,7 +58,7 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> {
...
@@ -58,7 +58,7 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> {
* @return
* @return
*/
*/
Page
<
List
<
LinkageUnitDto
>>
getEmergencyLinkageUnitList
(
IPage
<
LinkageUnitDto
>
page
,
String
unitName
,
Page
<
List
<
LinkageUnitDto
>>
getEmergencyLinkageUnitList
(
IPage
<
LinkageUnitDto
>
page
,
String
unitName
,
String
linkageUnitType
,
String
emergencyLinkageUnitCode
);
String
linkageUnitType
,
String
linkageUnitTypeCode
,
String
emergencyLinkageUnitCode
);
List
<
LinkageUnitDto
>
exportToExcel
();
List
<
LinkageUnitDto
>
exportToExcel
();
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/ILinkageUnitService.java
View file @
2fbf82de
...
@@ -2,16 +2,12 @@ package com.yeejoin.amos.boot.module.common.api.service;
...
@@ -2,16 +2,12 @@ package com.yeejoin.amos.boot.module.common.api.service;
import
java.util.List
;
import
java.util.List
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit
;
/**
/**
* 联动单位接口类
* 联动单位接口类
...
@@ -37,17 +33,17 @@ public interface ILinkageUnitService {
...
@@ -37,17 +33,17 @@ public interface ILinkageUnitService {
* @param emergencyLinkageUnitCode 紧急联动单位类型code
* @param emergencyLinkageUnitCode 紧急联动单位类型code
* @return
* @return
*/
*/
Page
<
LinkageUnitDto
>
queryForLinkageUnitPage
(
IPage
<
LinkageUnitDto
>
page
,
Page
<
LinkageUnitDto
>
queryForLinkageUnitPage
(
IPage
<
LinkageUnitDto
>
page
,
Boolean
isDelete
,
String
unitName
,
@Condition
(
Operator
.
eq
)
Boolean
isDelete
,
String
linkageUnitTypeCode
,
String
linkageUnitType
,
String
emergencyLinkageUnitCode
,
String
inAgreement
);
@Condition
(
Operator
.
like
)
String
unitName
,
@Condition
(
Operator
.
eq
)
String
linkageUnitTypeCode
,
@Condition
(
Operator
.
eq
)
String
emergencyLinkageUnitCode
,
String
inAgreement
);
/**
/**
* 获取当前存在的联动单位的类型组code
* 获取当前存在的联动单位的类型组code
*
* @return
* @return
*/
*/
public
List
<
Menu
>
getEmergencyLinkageUnitCodeGroupBy
(
String
type
,
String
rootName
)
;
public
List
<
Menu
>
getEmergencyLinkageUnitCodeGroupBy
(
String
type
,
String
rootName
);
List
<
LinkageUnitDto
>
exportToExcel
();
List
<
LinkageUnitDto
>
exportToExcel
();
List
<
LinkageUnitDto
>
queryForLinkageUnitList
(
Boolean
isDelete
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FailureDetailsMapper.xml
View file @
2fbf82de
...
@@ -29,9 +29,11 @@
...
@@ -29,9 +29,11 @@
</if>
</if>
</where>
</where>
order by submission_time DESC limit #{current},#{size}
order by submission_time DESC limit #{current},#{size}
</select>
</select>
<select
id=
"selectISubPage"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.FailureDetails"
>
<select
id=
"selectISubPage"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.FailureDetails"
>
SELECT sequence_nbr,
SELECT sequence_nbr,
current_status,
current_status,
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/LinkageUnitMapper.xml
View file @
2fbf82de
...
@@ -192,5 +192,9 @@
...
@@ -192,5 +192,9 @@
test=
"emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != ''"
>
test=
"emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != ''"
>
AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode}
AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode}
</if>
</if>
<if
test=
"linkageUnitTypeCode != null and linkageUnitTypeCode != ''"
>
AND clu.linkage_unit_type_code =#{linkageUnitTypeCode}
</if>
</select>
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/WaterResourceMapper.xml
View file @
2fbf82de
...
@@ -110,8 +110,8 @@
...
@@ -110,8 +110,8 @@
when ISNULL(belong_fighting_system) = 0 and LENGTH(trim(belong_fighting_system)) > 0
when ISNULL(belong_fighting_system) = 0 and LENGTH(trim(belong_fighting_system)) > 0
then belong_fighting_system
then belong_fighting_system
else '其他' end) belong_fighting_system,
else '其他' end) belong_fighting_system,
resource_type,
equip_id as
resource_type,
resource_type_name
equip_name as
resource_type_name
from cb_water_resource
from cb_water_resource
where is_delete = #{isDelete}
where is_delete = #{isDelete}
</select>
</select>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/AircraftDtos.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.metadata.BaseRowModel
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
AircraftDtos
extends
BaseRowModel
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
@ExcelProperty
(
value
=
"飞机型号"
,
index
=
0
)
@ApiModelProperty
(
value
=
"飞机型号"
)
private
String
aircraftModel
;
@ExcelProperty
(
value
=
"中文全称"
,
index
=
1
)
@ApiModelProperty
(
value
=
"中文全称"
)
private
String
fullName
;
@ExcelProperty
(
value
=
"飞机长度"
,
index
=
2
)
@ApiModelProperty
(
value
=
"飞机长度"
)
private
Double
aircraftLength
;
@ExcelProperty
(
value
=
"机舱长度"
,
index
=
3
)
@ApiModelProperty
(
value
=
"机舱长度"
)
private
Double
cabinLength
;
@ExcelProperty
(
value
=
"尾翼高度"
,
index
=
4
)
@ApiModelProperty
(
value
=
"尾翼高度"
)
private
Double
tailHeight
;
@ExcelProperty
(
value
=
"翼展"
,
index
=
5
)
@ApiModelProperty
(
value
=
"翼展"
)
private
Double
wingspan
;
@ExcelProperty
(
value
=
"机身直径"
,
index
=
6
)
@ApiModelProperty
(
value
=
"机身直径"
)
private
Double
fuselageDiameter
;
@ExcelProperty
(
value
=
"翼展面积"
,
index
=
7
)
@ApiModelProperty
(
value
=
"翼展面积"
)
private
Double
wingspanArea
;
@ExplicitConstraint
(
type
=
"FDJLX"
,
indexNum
=
8
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"发动机类型"
,
index
=
8
)
@ApiModelProperty
(
value
=
"发动机类型"
)
private
String
engineType
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"发动机类型code"
)
private
String
engineTypeCode
;
@ExcelProperty
(
value
=
"发动机数量"
,
index
=
9
)
@ApiModelProperty
(
value
=
"发动机数量"
)
private
Integer
enginesmNum
;
@ExcelProperty
(
value
=
"发动机型号"
,
index
=
10
)
@ApiModelProperty
(
value
=
"发动机型号"
)
private
String
engineModel
;
@ExplicitConstraint
(
type
=
"RYLX"
,
indexNum
=
11
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"燃油类型"
,
index
=
11
)
@ApiModelProperty
(
value
=
"燃油类型"
)
private
String
fuelType
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"燃油类型code"
)
private
String
fuelTypeCode
;
@ExcelProperty
(
value
=
"最大载油量"
,
index
=
12
)
@ApiModelProperty
(
value
=
"最大载油量"
)
private
Double
oilLoadMax
;
@ExcelProperty
(
value
=
"标准燃油"
,
index
=
13
)
@ApiModelProperty
(
value
=
"标准燃油"
)
private
Double
standardFuel
;
@ExcelProperty
(
value
=
"空重"
,
index
=
14
)
@ApiModelProperty
(
value
=
"空重"
)
private
Double
emptyWeight
;
@ExcelProperty
(
value
=
"飞机主要构造材料"
,
index
=
15
)
@ApiModelProperty
(
value
=
"飞机主要构造材料"
)
private
String
structuralMaterial
;
@ExcelProperty
(
value
=
"氧气瓶数量"
,
index
=
16
)
@ApiModelProperty
(
value
=
"氧气瓶数量"
)
private
Integer
oxygenCylinderNum
;
@ExcelProperty
(
value
=
"氧气瓶位置描述"
,
index
=
17
)
@ApiModelProperty
(
value
=
"氧气瓶位置描述"
)
private
String
oxygenCylinderLocation
;
@ExcelProperty
(
value
=
"标准坐席数"
,
index
=
18
)
@ApiModelProperty
(
value
=
"标准坐席数"
)
private
Integer
seatNum
;
@ExcelProperty
(
value
=
"商载(吨)"
,
index
=
19
)
@ApiModelProperty
(
value
=
"商载(吨)"
)
private
Double
commercialLoad
;
@ExcelProperty
(
value
=
"货仓容积(立方米)"
,
index
=
20
)
@ApiModelProperty
(
value
=
"货仓容积(立方米)"
)
private
Double
warehouseVolume
;
@ExcelProperty
(
value
=
"最大起飞总重(吨)"
,
index
=
21
)
@ApiModelProperty
(
value
=
"最大起飞总重(吨)"
)
private
Double
takeoffWeightNum
;
@ExcelProperty
(
value
=
"最大巡航速度(马赫)"
,
index
=
22
)
@ApiModelProperty
(
value
=
"最大巡航速度(马赫)"
)
private
Double
cruiseSpeedNum
;
@ExcelProperty
(
value
=
"航程"
,
index
=
23
)
@ApiModelProperty
(
value
=
"航程"
)
private
Double
voyage
;
@ExcelProperty
(
value
=
"主要设施"
,
index
=
24
)
@ApiModelProperty
(
value
=
"主要设施"
)
private
String
facilitie
;
@ExcelProperty
(
value
=
"主要燃烧物质"
,
index
=
25
)
@ApiModelProperty
(
value
=
"主要燃烧物质"
)
private
String
combustionMaterial
;
@ExcelProperty
(
value
=
"疏散出口及安全通道"
,
index
=
26
)
@ApiModelProperty
(
value
=
"疏散出口及安全通道"
)
private
String
exitPassage
;
@ExcelProperty
(
value
=
"备注"
,
index
=
27
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ExcelProperty
(
value
=
"外观图"
,
index
=
28
)
@ApiModelProperty
(
value
=
"外观图"
)
private
String
appearanceImages
;
@ExcelProperty
(
value
=
"平面图"
,
index
=
29
)
@ApiModelProperty
(
value
=
"平面图"
)
private
String
planeImages
;
@ExcelProperty
(
value
=
"救援图"
,
index
=
30
)
@ApiModelProperty
(
value
=
"救援图"
)
private
String
rescueImages
;
@ExcelProperty
(
value
=
"方位图"
,
index
=
31
)
@ApiModelProperty
(
value
=
"方位图"
)
private
String
positionImages
;
@ExcelProperty
(
value
=
"三维模型"
,
index
=
32
)
@ApiModelProperty
(
value
=
"三维模型"
)
private
String
models
;
@ApiModelProperty
(
value
=
"现场图片"
)
private
List
<
String
>
scenePicture
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/AlertLocationLogDto.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
*
*
* @author system_generator
* @date 2021-08-26
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"AlertLocationLogDto"
,
description
=
""
)
public
class
AlertLocationLogDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"警情id"
)
private
Long
alertId
;
@ApiModelProperty
(
value
=
"经度"
)
private
String
longitude
;
@ApiModelProperty
(
value
=
"纬度"
)
private
String
latitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/RallyPointDto.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 集结点
*
* @author system_generator
* @date 2021-08-25
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"RallyPointDto"
,
description
=
"集结点"
)
public
class
RallyPointDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"地址"
)
private
String
address
;
@ApiModelProperty
(
value
=
"警情id"
)
private
Long
alertId
;
@ApiModelProperty
(
value
=
"经度"
)
private
String
longitude
;
@ApiModelProperty
(
value
=
"纬度"
)
private
String
latitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/AlertLocationLog.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
*
*
* @author system_generator
* @date 2021-08-26
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"jc_alert_location_log"
)
public
class
AlertLocationLog
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 警情id
*/
@TableField
(
"alert_id"
)
private
Long
alertId
;
/**
* 经度
*/
@TableField
(
"longitude"
)
private
String
longitude
;
/**
* 纬度
*/
@TableField
(
"latitude"
)
private
String
latitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/RallyPoint.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
* 集结点
*
* @author system_generator
* @date 2021-08-25
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"jc_rally_point"
)
public
class
RallyPoint
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 名称
*/
@TableField
(
"name"
)
private
String
name
;
/**
* 地址
*/
@TableField
(
"address"
)
private
String
address
;
/**
* 警情id
*/
@TableField
(
"alert_id"
)
private
Long
alertId
;
/**
* 经度
*/
@TableField
(
"longitude"
)
private
String
longitude
;
/**
* 纬度
*/
@TableField
(
"latitude"
)
private
String
latitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertLocationLogMapper.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertLocationLog
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* Mapper 接口
*
* @author system_generator
* @date 2021-08-26
*/
public
interface
AlertLocationLogMapper
extends
BaseMapper
<
AlertLocationLog
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/RallyPointMapper.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.RallyPoint
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 集结点 Mapper 接口
*
* @author system_generator
* @date 2021-08-25
*/
public
interface
RallyPointMapper
extends
BaseMapper
<
RallyPoint
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertLocationLogService.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
/**
* 接口类
*
* @author system_generator
* @date 2021-08-26
*/
public
interface
IAlertLocationLogService
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IRallyPointService.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
/**
* 集结点接口类
*
* @author system_generator
* @date 2021-08-25
*/
public
interface
IRallyPointService
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertLocationLogMapper.xml
0 → 100644
View file @
2fbf82de
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jcs.api.mapper.AlertLocationLogMapper"
>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/RallyPointMapper.xml
0 → 100644
View file @
2fbf82de
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jcs.api.mapper.RallyPointMapper"
>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/common/enums/PlanTypeEnum.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
common
.
enums
;
import
lombok.Data
;
import
java.util.Arrays
;
import
java.util.Optional
;
/**
* @author DELL
*/
public
enum
PlanTypeEnum
{
/**
* 计划类型枚举
*/
PLAN_TYPE_DAY
(
"1"
,
"日计划"
),
PLAN_TYPE_WEEK
(
"2"
,
"周计划"
),
PLAN_TYPE_MONTH
(
"3"
,
"月计划"
),
PLAN_TYPE_YEAR
(
"4"
,
"年计划"
);
/**
* 名称
*/
private
String
name
;
/**
* code
*/
private
String
code
;
PlanTypeEnum
(
String
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
public
String
getName
()
{
return
name
;
}
public
static
PlanTypeEnum
getEnumByCode
(
String
code
)
{
Optional
<
PlanTypeEnum
>
op
=
Arrays
.
stream
(
PlanTypeEnum
.
values
()).
filter
(
e
->
e
.
code
.
equals
(
code
)).
findFirst
();
return
op
.
orElse
(
null
);
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/dao/entity/Check.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
maintenance
.
dao
.
entity
;
import
javax.persistence.*
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
javax.persistence.CascadeType
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.OneToMany
;
import
javax.persistence.Table
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
/**
/**
* The persistent class for the p_check database table.
* The persistent class for the p_check database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"p_check"
)
@Table
(
name
=
"p_check"
)
@NamedQuery
(
name
=
"Check.findAll"
,
query
=
"SELECT c FROM Check c"
)
@NamedQuery
(
name
=
"Check.findAll"
,
query
=
"SELECT c FROM Check c"
)
public
class
Check
extends
BasicEntity
{
public
class
Check
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* 参考地址
* 参考地址
*/
*/
@Column
(
name
=
"address"
)
@Column
(
name
=
"address"
)
private
String
address
;
private
String
address
;
/**
/**
* 巡检方式
* 巡检方式
*/
*/
@Column
(
name
=
"check_mode"
)
@Column
(
name
=
"check_mode"
)
private
String
checkMode
=
""
;
private
String
checkMode
=
""
;
/**
/**
* 检查时间
* 检查时间
*/
*/
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Column
(
name
=
"check_time"
)
@Column
(
name
=
"check_time"
)
private
Date
checkTime
;
private
Date
checkTime
;
/**
/**
* 设备编号
* 设备编号
*/
*/
@Column
(
name
=
"device_id"
)
@Column
(
name
=
"device_id"
)
private
String
deviceId
;
private
String
deviceId
;
/**
/**
* 不合格项目
* 不合格项目
*/
*/
private
String
error
;
private
String
error
;
/**
/**
* 是否合格
* 是否合格
*/
*/
@Column
(
name
=
"is_ok"
)
@Column
(
name
=
"is_ok"
)
private
String
isOk
;
private
String
isOk
;
/**
/**
* 经度
* 经度
*/
*/
private
String
latitude
;
private
String
latitude
;
/**
/**
* 纬度
* 纬度
*/
*/
private
String
longitude
;
private
String
longitude
;
/**
/**
* 权限系统org code
* 权限系统org code
*/
*/
@Column
(
name
=
"org_code"
)
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
orgCode
;
/**
/**
* 计划编号
* 计划编号
*/
*/
@Column
(
name
=
"plan_id"
)
@Column
(
name
=
"plan_id"
)
private
Long
planId
;
private
Long
planId
;
/**
/**
* 线路名称
* 线路名称
*/
*/
@Column
(
name
=
"plan_name"
)
@Column
(
name
=
"plan_name"
)
private
String
planName
;
private
String
planName
;
/**
/**
* 计划执行编号
* 计划执行编号
*/
*/
@Column
(
name
=
"plan_task_id"
)
@Column
(
name
=
"plan_task_id"
)
private
Long
planTaskId
;
private
Long
planTaskId
;
/**
/**
* 执行计划详情id
* 执行计划详情id
*/
*/
@Column
(
name
=
"plan_task_detail_id"
)
@Column
(
name
=
"plan_task_detail_id"
)
private
Long
planTaskDetailId
;
private
Long
planTaskDetailId
;
/**
/**
* 风险辨识与管控措施
* 巡检点id
*/
*/
private
String
riskAndManage
;
@Column
(
name
=
"point_id"
)
private
Long
pointId
;
/**
* 计划开始日期
/**
*/
* 点名称
private
String
beginTime
;
*/
@Column
(
name
=
"point_name"
)
/**
private
String
pointName
;
* 计划结束日期
*/
/**
private
String
endTime
;
* 设备编号
*/
/**
private
String
pointNo
;
* 巡检点id
*/
public
String
getPointNo
()
{
@Column
(
name
=
"point_id"
)
return
pointNo
;
private
Long
pointId
;
}
public
String
getRiskAndManage
()
{
public
void
setPointNo
(
String
pointNo
)
{
return
riskAndManage
;
this
.
pointNo
=
pointNo
;
}
}
public
void
setRiskAndManage
(
String
riskAndManage
)
{
/**
this
.
riskAndManage
=
riskAndManage
;
* 巡检备注说明
}
*/
private
String
remark
;
public
String
getBeginTime
()
{
return
beginTime
;
/**
}
* 路线编号
*/
public
void
setBeginTime
(
String
beginTime
)
{
@Column
(
name
=
"route_id"
)
this
.
beginTime
=
beginTime
;
private
Long
routeId
;
}
/**
public
String
getEndTime
()
{
* 路线名称
return
endTime
;
*/
}
@Column
(
name
=
"route_name"
)
private
String
routeName
;
public
void
setEndTime
(
String
endTime
)
{
this
.
endTime
=
endTime
;
/**
}
* 评分
*/
/**
private
int
score
;
* 点名称
*/
/**
@Column
(
name
=
"point_name"
)
* 拍照数量
private
String
pointName
;
*/
@Column
(
name
=
"shot_number"
)
/**
private
int
shotNumber
;
* 设备编号
*/
/**
private
String
pointNo
;
* 记录上传时间
*/
public
String
getPointNo
()
{
@Temporal
(
TemporalType
.
TIMESTAMP
)
return
pointNo
;
@Column
(
name
=
"upload_time"
)
}
private
Date
uploadTime
;
public
void
setPointNo
(
String
pointNo
)
{
/**
this
.
pointNo
=
pointNo
;
* 巡检人ids
}
*/
@Column
(
name
=
"user_id"
)
/**
private
String
userId
;
* 巡检备注说明
*/
/**
private
String
remark
;
* 执行人名称
*/
/**
@Column
(
name
=
"user_name"
)
* 路线编号
private
String
userName
;
*/
@Column
(
name
=
"route_id"
)
/**
private
Long
routeId
;
* 执行部门ids
*/
/**
@Column
(
name
=
"dep_id"
)
* 路线名称
private
String
depId
;
*/
/**
@Column
(
name
=
"route_name"
)
* 执行部门名称
private
String
routeName
;
*/
@Column
(
name
=
"dep_name"
)
/**
private
String
depName
;
* 评分
*/
@Column
(
name
=
"error_classify"
)
private
int
score
;
private
String
errorClassify
;
/**
/**
* 拍照数量
* 业主单位id
*/
*/
@Column
(
name
=
"shot_number"
)
private
String
ownerId
;
private
int
shotNumber
;
/**
/**
* 维保公司id
* 记录上传时间
*/
*/
private
String
companyId
;
@Temporal
(
TemporalType
.
TIMESTAMP
)
@Column
(
name
=
"upload_time"
)
/**
private
Date
uploadTime
;
* 维保公司名称
*/
/**
private
String
companyName
;
* 巡检人ids
*/
/**
@Column
(
name
=
"user_id"
)
* 安装位置:buildingName
private
String
userId
;
*/
private
String
buildingName
;
/**
* 执行人名称
/**
*/
* 设备分类
@Column
(
name
=
"user_name"
)
*/
private
String
userName
;
private
String
equipmentName
;
/**
/**
* 执行部门ids
* 计划类型
*/
*/
@Column
(
name
=
"dep_id"
)
private
String
planType
;
private
String
depId
;
/**
public
String
getBuildingName
()
{
* 执行部门名称
return
buildingName
;
*/
}
@Column
(
name
=
"dep_name"
)
private
String
depName
;
public
void
setBuildingName
(
String
buildingName
)
{
this
.
buildingName
=
buildingName
;
@Column
(
name
=
"error_classify"
)
}
private
String
errorClassify
;
public
String
getEquipmentName
()
{
/**
return
equipmentName
;
* 业主单位id
}
*/
private
String
ownerId
;
public
void
setEquipmentName
(
String
equipmentName
)
{
this
.
equipmentName
=
equipmentName
;
/**
}
* 业主单位名称
*/
public
String
getPlanType
()
{
private
String
ownerName
;
return
planType
;
}
/**
* 维保公司id
public
void
setPlanType
(
String
planType
)
{
*/
this
.
planType
=
planType
;
private
String
companyId
;
}
/**
public
String
getCompanyId
()
{
* 维保公司名称
return
companyId
;
*/
}
private
String
companyName
;
public
void
setCompanyId
(
String
companyId
)
{
/**
this
.
companyId
=
companyId
;
* 安装位置:buildingName
}
*/
private
String
buildingName
;
public
String
getCompanyName
()
{
return
companyName
;
/**
}
* 设备分类
*/
public
void
setCompanyName
(
String
companyName
)
{
private
String
equipmentName
;
this
.
companyName
=
companyName
;
}
/**
* 计划类型
*/
private
String
planType
;
public
String
getOwnerId
()
{
return
ownerId
;
public
String
getBuildingName
()
{
}
return
buildingName
;
}
public
void
setOwnerId
(
String
ownerId
)
{
this
.
ownerId
=
ownerId
;
public
void
setBuildingName
(
String
buildingName
)
{
}
this
.
buildingName
=
buildingName
;
}
private
List
<
CheckShot
>
checkShot
;
public
String
getEquipmentName
()
{
public
Check
()
{
return
equipmentName
;
}
}
public
String
getUserName
()
{
public
void
setEquipmentName
(
String
equipmentName
)
{
return
userName
;
this
.
equipmentName
=
equipmentName
;
}
}
public
void
setUserName
(
String
userName
)
{
public
String
getPlanType
()
{
this
.
userName
=
userName
;
return
planType
;
}
}
public
void
setPlanType
(
String
planType
)
{
this
.
planType
=
planType
;
}
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
public
String
getCompanyName
()
{
return
companyName
;
}
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
public
String
getOwnerName
()
{
return
ownerName
;
}
public
void
setOwnerName
(
String
ownerName
)
{
this
.
ownerName
=
ownerName
;
}
public
String
getOwnerId
()
{
return
ownerId
;
}
public
void
setOwnerId
(
String
ownerId
)
{
this
.
ownerId
=
ownerId
;
}
private
List
<
CheckShot
>
checkShot
;
public
Check
()
{
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getDepId
()
{
return
depId
;
}
public
void
setDepId
(
String
depId
)
{
this
.
depId
=
depId
;
}
public
String
getDepName
()
{
return
depName
;
}
public
void
setDepName
(
String
depName
)
{
this
.
depName
=
depName
;
}
public
long
getPlanTaskDetailId
()
{
return
planTaskDetailId
;
}
public
void
setPlanTaskDetailId
(
long
planTaskDetailId
)
{
this
.
planTaskDetailId
=
planTaskDetailId
;
}
public
String
getAddress
()
{
return
this
.
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getCheckMode
()
{
return
this
.
checkMode
;
}
public
void
setCheckMode
(
String
checkMode
)
{
this
.
checkMode
=
checkMode
;
}
public
Date
getCheckTime
()
{
return
this
.
checkTime
;
}
public
void
setCheckTime
(
Date
checkTime
)
{
this
.
checkTime
=
checkTime
;
}
public
String
getDep
Id
()
{
public
String
getDevice
Id
()
{
return
dep
Id
;
return
this
.
device
Id
;
}
}
public
void
setDepId
(
String
dep
Id
)
{
public
void
setDeviceId
(
String
device
Id
)
{
this
.
depId
=
dep
Id
;
this
.
deviceId
=
device
Id
;
}
}
public
String
getDepName
()
{
public
String
getError
()
{
return
depName
;
return
this
.
error
;
}
}
public
void
setDepName
(
String
depName
)
{
public
void
setError
(
String
error
)
{
this
.
depName
=
depName
;
this
.
error
=
error
;
}
}
public
long
getPlanTaskDetailId
()
{
public
String
getIsOk
()
{
return
planTaskDetailId
;
return
this
.
isOk
;
}
}
public
void
setPlanTaskDetailId
(
long
planTaskDetailId
)
{
public
void
setIsOk
(
String
isOk
)
{
this
.
planTaskDetailId
=
planTaskDetailId
;
this
.
isOk
=
isOk
;
}
}
public
String
getAddress
()
{
public
String
getLatitude
()
{
return
this
.
address
;
return
this
.
latitude
;
}
}
public
void
setAddress
(
String
address
)
{
public
void
setLatitude
(
String
latitude
)
{
this
.
address
=
address
;
this
.
latitude
=
latitude
;
}
}
public
String
getCheckMo
de
()
{
public
String
getLongitu
de
()
{
return
this
.
checkMo
de
;
return
this
.
longitu
de
;
}
}
public
void
setCheckMode
(
String
checkMo
de
)
{
public
void
setLongitude
(
String
longitu
de
)
{
this
.
checkMode
=
checkMo
de
;
this
.
longitude
=
longitu
de
;
}
}
public
Date
getCheckTim
e
()
{
public
String
getOrgCod
e
()
{
return
this
.
checkTim
e
;
return
this
.
orgCod
e
;
}
}
public
void
setCheckTime
(
Date
checkTim
e
)
{
public
void
setOrgCode
(
String
orgCod
e
)
{
this
.
checkTime
=
checkTim
e
;
this
.
orgCode
=
orgCod
e
;
}
}
public
String
getDevice
Id
()
{
public
long
getPlan
Id
()
{
return
this
.
device
Id
;
return
this
.
plan
Id
;
}
}
public
void
setDeviceId
(
String
device
Id
)
{
public
void
setPlanId
(
long
plan
Id
)
{
this
.
deviceId
=
device
Id
;
this
.
planId
=
plan
Id
;
}
}
public
String
getError
()
{
public
long
getPlanTaskId
()
{
return
this
.
error
;
return
this
.
planTaskId
;
}
}
public
void
setError
(
String
error
)
{
public
void
setPlanTaskId
(
long
planTaskId
)
{
this
.
error
=
error
;
this
.
planTaskId
=
planTaskId
;
}
}
public
String
getIsOk
()
{
public
long
getPointId
()
{
return
this
.
isOk
;
return
this
.
pointId
;
}
}
public
void
setIsOk
(
String
isOk
)
{
public
void
setPointId
(
long
pointId
)
{
this
.
isOk
=
isOk
;
this
.
pointId
=
pointId
;
}
}
public
String
getLatitude
()
{
public
String
getRemark
()
{
return
this
.
latitude
;
return
this
.
remark
;
}
}
public
void
setLatitude
(
String
latitude
)
{
public
void
setRemark
(
String
remark
)
{
this
.
latitude
=
latitude
;
this
.
remark
=
remark
;
}
}
public
String
getLongitude
()
{
public
long
getRouteId
()
{
return
this
.
longitude
;
return
this
.
routeId
;
}
}
public
void
setLongitude
(
String
longitude
)
{
public
void
setRouteId
(
long
routeId
)
{
this
.
longitude
=
longitude
;
this
.
routeId
=
routeId
;
}
}
public
String
getOrgCod
e
()
{
public
int
getScor
e
()
{
return
this
.
orgCod
e
;
return
this
.
scor
e
;
}
}
public
void
setOrgCode
(
String
orgCod
e
)
{
public
void
setScore
(
int
scor
e
)
{
this
.
orgCode
=
orgCod
e
;
this
.
score
=
scor
e
;
}
}
public
long
getPlanId
()
{
public
int
getShotNumber
()
{
return
this
.
planId
;
return
this
.
shotNumber
;
}
}
public
void
setPlanId
(
long
planId
)
{
public
void
setShotNumber
(
int
shotNumber
)
{
this
.
planId
=
planId
;
this
.
shotNumber
=
shotNumber
;
}
}
public
long
getPlanTaskId
()
{
public
Date
getUploadTime
()
{
return
this
.
planTaskId
;
return
this
.
uploadTime
;
}
}
public
void
setPlanTaskId
(
long
planTaskId
)
{
public
void
setUploadTime
(
Date
uploadTime
)
{
this
.
planTaskId
=
planTaskId
;
this
.
uploadTime
=
uploadTime
;
}
}
public
long
getPointId
()
{
return
this
.
pointId
;
}
public
void
setPointId
(
long
pointId
)
{
public
String
getUserId
(
)
{
this
.
pointId
=
point
Id
;
return
user
Id
;
}
}
public
String
getRemark
(
)
{
public
void
setUserId
(
String
userId
)
{
return
this
.
remark
;
this
.
userId
=
userId
;
}
}
public
void
setRemark
(
String
remark
)
{
public
String
getErrorClassify
(
)
{
this
.
remark
=
remark
;
return
errorClassify
;
}
}
public
long
getRouteId
(
)
{
public
void
setErrorClassify
(
String
errorClassify
)
{
return
this
.
routeId
;
this
.
errorClassify
=
errorClassify
;
}
}
public
void
setRouteId
(
long
routeId
)
{
@OneToMany
(
mappedBy
=
"check"
,
cascade
=
{
CascadeType
.
REMOVE
,
CascadeType
.
MERGE
,
CascadeType
.
PERSIST
})
this
.
routeId
=
routeId
;
public
List
<
CheckShot
>
getCheckShot
()
{
}
return
checkShot
;
}
public
int
getScore
(
)
{
public
void
setCheckShot
(
List
<
CheckShot
>
checkShot
)
{
return
this
.
score
;
this
.
checkShot
=
checkShot
;
}
}
public
void
setScore
(
int
score
)
{
public
String
getPlanName
(
)
{
this
.
score
=
scor
e
;
return
planNam
e
;
}
}
public
int
getShotNumber
(
)
{
public
void
setPlanName
(
String
planName
)
{
return
this
.
shotNumber
;
this
.
planName
=
planName
;
}
}
public
void
setShotNumber
(
int
shotNumber
)
{
public
String
getPointName
(
)
{
this
.
shotNumber
=
shotNumber
;
return
pointName
;
}
}
public
Date
getUploadTime
(
)
{
public
void
setPointName
(
String
pointName
)
{
return
this
.
uploadTi
me
;
this
.
pointName
=
pointNa
me
;
}
}
public
void
setUploadTime
(
Date
uploadTime
)
{
public
String
getRouteName
(
)
{
this
.
uploadTime
=
uploadTi
me
;
return
routeNa
me
;
}
}
public
void
setRouteName
(
String
routeName
)
{
public
String
getUserId
()
{
this
.
routeName
=
routeName
;
return
userId
;
}
}
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
public
String
getErrorClassify
()
{
return
errorClassify
;
}
public
void
setErrorClassify
(
String
errorClassify
)
{
this
.
errorClassify
=
errorClassify
;
}
@OneToMany
(
mappedBy
=
"check"
,
cascade
=
{
CascadeType
.
REMOVE
,
CascadeType
.
MERGE
,
CascadeType
.
PERSIST
})
public
List
<
CheckShot
>
getCheckShot
()
{
return
checkShot
;
}
public
void
setCheckShot
(
List
<
CheckShot
>
checkShot
)
{
this
.
checkShot
=
checkShot
;
}
public
String
getPlanName
()
{
return
planName
;
}
public
void
setPlanName
(
String
planName
)
{
this
.
planName
=
planName
;
}
public
String
getPointName
()
{
return
pointName
;
}
public
void
setPointName
(
String
pointName
)
{
this
.
pointName
=
pointName
;
}
public
String
getRouteName
()
{
return
routeName
;
}
public
void
setRouteName
(
String
routeName
)
{
this
.
routeName
=
routeName
;
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/dao/entity/Plan.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
maintenance
.
dao
.
entity
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
javax.persistence.*
;
import
java.sql.Time
;
import
java.sql.Time
;
import
java.util.Date
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.data.annotation.LastModifiedDate
;
/**
/**
* The persistent class for the p_plan database table.
* The persistent class for the p_plan database table.
*
*/
*/
@Entity
@Entity
@Table
(
name
=
"p_plan"
)
@Table
(
name
=
"p_plan"
)
@NamedQuery
(
name
=
"Plan.findAll"
,
query
=
"SELECT p FROM Plan p"
)
@NamedQuery
(
name
=
"Plan.findAll"
,
query
=
"SELECT p FROM Plan p"
)
public
class
Plan
extends
BasicEntity
{
public
class
Plan
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* 部门id
* 部门id
*/
*/
@Column
(
name
=
"dept_id"
)
@Column
(
name
=
"dept_id"
)
private
String
deptId
;
private
String
deptId
;
/**
/**
* 创建者
* 创建者
*/
*/
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
String
createBy
;
private
String
createBy
;
/**
/**
* 开始时间
* 开始时间
*/
*/
@Column
(
name
=
"day_begin"
)
@Column
(
name
=
"day_begin"
)
private
Time
dayBegin
;
private
Time
dayBegin
;
/**
/**
* 结束时间
* 结束时间
*/
*/
@Column
(
name
=
"day_end"
)
@Column
(
name
=
"day_end"
)
private
Time
dayEnd
;
private
Time
dayEnd
;
/**
/**
* 执行间隔(每天执行频率为多次时使用)
* 执行间隔(每天执行频率为多次时使用)
*/
*/
@Column
(
name
=
"day_interval"
)
@Column
(
name
=
"day_interval"
)
private
int
dayInterval
;
private
int
dayInterval
;
/**
/**
* 执行间隔单位:小时,分钟,秒
* 执行间隔单位:小时,分钟,秒
*/
*/
@Column
(
name
=
"day_interval_unit"
)
@Column
(
name
=
"day_interval_unit"
)
private
String
dayIntervalUnit
;
private
String
dayIntervalUnit
;
/**
/**
* 每天频率:0-一次;1-多次
* 每天频率:0-一次;1-多次
*/
*/
@Column
(
name
=
"day_rate"
)
@Column
(
name
=
"day_rate"
)
private
int
dayRate
=
-
1
;
private
int
dayRate
=
-
1
;
/**
/**
* 开始时间(执行频率为一次时,使用)
* 开始时间(执行频率为一次时,使用)
*/
*/
@Column
(
name
=
"day_time"
)
@Column
(
name
=
"day_time"
)
private
String
dayTime
;
private
String
dayTime
;
/**
/**
* 工作时长(分钟)
* 工作时长(分钟)
*/
*/
private
int
duration
;
private
int
duration
;
private
String
ownerId
;
private
String
ownerId
;
/**
/**
* 维保公司id
* 维保公司id
*/
*/
private
String
companyId
;
private
String
companyId
;
/**
/**
* 维保公司名称
* 维保公司名称
*/
*/
private
String
companyName
;
private
String
companyName
;
public
String
getCompanyId
()
{
public
String
getCompanyId
()
{
return
companyId
;
return
companyId
;
}
}
public
void
setCompanyId
(
String
companyId
)
{
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
this
.
companyId
=
companyId
;
}
}
public
String
getCompanyName
()
{
public
String
getCompanyName
()
{
return
companyName
;
return
companyName
;
}
}
public
void
setCompanyName
(
String
companyName
)
{
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
this
.
companyName
=
companyName
;
}
}
@Transient
@Transient
public
String
getOwnerId
()
{
public
String
getOwnerId
()
{
return
ownerId
;
return
ownerId
;
}
}
public
void
setOwnerId
(
String
ownerId
)
{
public
void
setOwnerId
(
String
ownerId
)
{
this
.
ownerId
=
ownerId
;
this
.
ownerId
=
ownerId
;
}
}
/**
/**
* 首次标志
* 首次标志
*/
*/
private
int
firstFlag
;
private
int
firstFlag
;
/**
/**
* 允许误差(分钟)
* 允许误差(分钟)
*/
*/
private
int
error
;
private
int
error
;
/**
/**
* 执行频率(年计划使用)
* 执行频率(年计划使用)
*/
*/
@Column
(
name
=
"execute_rate"
)
@Column
(
name
=
"execute_rate"
)
private
int
executeRate
;
private
int
executeRate
;
/**
/**
* 排序
* 排序
*/
*/
@Column
(
name
=
"in_order"
)
@Column
(
name
=
"in_order"
)
private
String
inOrder
;
private
String
inOrder
;
/**
/**
* 执行间隔
* 执行间隔
*/
*/
@Column
(
name
=
"execute_interval"
)
@Column
(
name
=
"execute_interval"
)
private
int
executeInterval
;
private
int
executeInterval
;
/**
/**
* 是否固定巡检日期:0-否;1-是
* 是否固定巡检日期:0-否;1-是
*/
*/
@Column
(
name
=
"is_fixed_date"
)
@Column
(
name
=
"is_fixed_date"
)
private
String
isFixedDate
;
private
String
isFixedDate
;
/**
/**
* 是否评分
* 是否评分
*/
*/
@Column
(
name
=
"is_score"
)
@Column
(
name
=
"is_score"
)
private
String
isScore
;
private
String
isScore
;
/**
/**
* 最近更新者
* 最近更新者
*/
*/
@Column
(
name
=
"last_upd_by"
)
@Column
(
name
=
"last_upd_by"
)
private
String
lastUpdBy
;
private
String
lastUpdBy
;
/**
/**
* 最近更新时间
* 最近更新时间
*/
*/
@LastModifiedDate
@LastModifiedDate
@Column
(
name
=
"last_upd_time"
)
@Column
(
name
=
"last_upd_time"
)
private
Date
lastUpdTime
;
private
Date
lastUpdTime
;
/**
/**
* 最少间隔
* 最少间隔
*/
*/
@Column
(
name
=
"min_space"
)
@Column
(
name
=
"min_space"
)
private
int
minSpace
;
private
int
minSpace
;
/**
/**
* 月执行类型:第,在
* 月执行类型:第,在
*/
*/
@Column
(
name
=
"month_type"
)
@Column
(
name
=
"month_type"
)
private
String
monthType
;
private
String
monthType
;
/**
/**
* 计划名称
* 计划名称
*/
*/
@Column
(
name
=
"[name]"
)
@Column
(
name
=
"[name]"
)
private
String
name
;
private
String
name
;
/**
/**
* 下次任务生成日期
* 下次任务生成日期
*/
*/
@Temporal
(
TemporalType
.
DATE
)
@Temporal
(
TemporalType
.
DATE
)
@Column
(
name
=
"next_gen_date"
)
@Column
(
name
=
"next_gen_date"
)
private
Date
nextGenDate
;
private
Date
nextGenDate
;
/**
/**
* 公司Id
* 公司Id
*/
*/
@Column
(
name
=
"org_code"
)
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
private
String
orgCode
;
/**
/**
* 计划开始日期
* 计划开始日期
*/
*/
@Temporal
(
TemporalType
.
DATE
)
@Temporal
(
TemporalType
.
DATE
)
@Column
(
name
=
"plan_begin"
)
@Column
(
name
=
"plan_begin"
)
private
String
planBegin
;
private
String
planBegin
;
/**
/**
* 计划结束日期
* 计划结束日期
*/
*/
@Temporal
(
TemporalType
.
DATE
)
@Temporal
(
TemporalType
.
DATE
)
@Column
(
name
=
"plan_end"
)
@Column
(
name
=
"plan_end"
)
private
String
planEnd
;
private
String
planEnd
;
/**
/**
* 计划类型:日,周,月,年
* 计划类型:日,周,月,年
*/
*/
@Column
(
name
=
"plan_type"
)
@Column
(
name
=
"plan_type"
)
private
String
planType
;
private
String
planType
;
/**
/**
* 备注
* 备注
*/
*/
private
String
remark
;
private
String
remark
;
/**
/**
* 备注1
* 备注1
*/
*/
private
String
remark1
;
private
String
remark1
;
/**
/**
* 备注2
* 备注2
*/
*/
private
String
remark2
;
private
String
remark2
;
/**
/**
* 路线编号
* 路线编号
*/
*/
@Column
(
name
=
"route_id"
)
@Column
(
name
=
"route_id"
)
private
long
routeId
;
private
long
routeId
;
/**
/**
* 评分计算公式
* 评分计算公式
*/
*/
@Column
(
name
=
"score_formula"
)
@Column
(
name
=
"score_formula"
)
private
String
scoreFormula
;
private
String
scoreFormula
;
/**
/**
* 状态:0-已停用;1-正常
* 状态:0-已停用;1-正常
*/
*/
@Column
(
name
=
"[status]"
)
@Column
(
name
=
"[status]"
)
private
byte
status
;
private
byte
status
;
/**
/**
* 用户编号
* 用户编号
*/
*/
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
private
String
userId
;
private
String
userId
;
/**
/**
* 用户名称(多个逗号分隔)
* 用户名称(多个逗号分隔)
*/
*/
@Column
(
name
=
"user_name"
)
@Column
(
name
=
"user_name"
)
private
String
userName
;
private
String
userName
;
public
String
getUserName
()
{
public
String
getUserName
()
{
return
userName
;
return
userName
;
}
}
public
void
setUserName
(
String
userName
)
{
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
this
.
userName
=
userName
;
}
}
/**
/**
* 开始编号
* 开始编号
*/
*/
@Column
(
name
=
"week_begin_num"
)
@Column
(
name
=
"week_begin_num"
)
private
int
weekBeginNum
;
private
int
weekBeginNum
;
/**
/**
* 周几
* 周几
*/
*/
@Column
(
name
=
"week_day"
)
@Column
(
name
=
"week_day"
)
private
int
weekDay
;
private
int
weekDay
;
/**
/**
* 结束编号
* 结束编号
*/
*/
@Column
(
name
=
"week_end_num"
)
@Column
(
name
=
"week_end_num"
)
private
int
weekEndNum
;
private
int
weekEndNum
;
/**
/**
* 哪一天
* 哪一天
*/
*/
@Column
(
name
=
"what_day"
)
@Column
(
name
=
"what_day"
)
private
String
whatDay
;
private
String
whatDay
;
/**
/**
* 第几周
* 第几周
*/
*/
@Column
(
name
=
"what_week"
)
@Column
(
name
=
"what_week"
)
private
int
whatWeek
;
private
int
whatWeek
;
/**
/**
* 是否删除:0表示未删除,1表示已删除
* 是否删除:0表示未删除,1表示已删除
*/
*/
@Column
(
name
=
"is_delete"
)
@Column
(
name
=
"is_delete"
)
private
boolean
isDelete
=
false
;
private
boolean
isDelete
=
false
;
/**
/**
* 原始字段
* 原始字段
*/
*/
@Column
(
name
=
"original_id"
,
columnDefinition
=
"varchar(50) COMMENT '原始字段'"
)
@Column
(
name
=
"original_id"
,
columnDefinition
=
"varchar(50) COMMENT '原始字段'"
)
private
String
originalId
;
private
String
originalId
;
/**
/**
*
* 任务id
* 任务id
*/
*/
@Column
(
name
=
"plan_task_id"
)
@Column
(
name
=
"plan_task_id"
)
private
Long
planTaskId
=
0L
;
private
Long
planTaskId
=
0L
;
/**
/**
* 是否单人执行
* 是否单人执行
*/
*/
@Column
(
name
=
"is_single_execution"
)
@Column
(
name
=
"is_single_execution"
)
private
boolean
isSingleExecution
=
false
;
private
boolean
isSingleExecution
=
false
;
/**
/**
* 用户部门
* 用户部门
*/
*/
@Column
(
name
=
"user_dept"
)
@Column
(
name
=
"user_dept"
)
private
String
userDept
;
private
String
userDept
;
public
String
getUserDept
()
{
public
String
getUserDept
()
{
return
userDept
;
return
userDept
;
}
}
public
void
setUserDept
(
String
userDept
)
{
public
void
setUserDept
(
String
userDept
)
{
this
.
userDept
=
userDept
;
this
.
userDept
=
userDept
;
}
}
public
Plan
()
{
public
Plan
()
{
}
}
public
String
getDeptId
()
{
return
deptId
;
}
public
void
setDeptId
(
String
deptId
)
{
this
.
deptId
=
deptId
;
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Time
getDayBegin
()
{
return
this
.
dayBegin
;
}
public
void
setDayBegin
(
Time
dayBegin
)
{
this
.
dayBegin
=
dayBegin
;
}
public
Time
getDayEnd
()
{
return
this
.
dayEnd
;
}
public
void
setDayEnd
(
Time
dayEnd
)
{
this
.
dayEnd
=
dayEnd
;
}
public
int
getDayInterval
()
{
return
this
.
dayInterval
;
}
public
void
setDayInterval
(
int
dayInterval
)
{
this
.
dayInterval
=
dayInterval
;
}
public
String
getDayIntervalUnit
()
{
return
this
.
dayIntervalUnit
;
}
public
void
setDayIntervalUnit
(
String
dayIntervalUnit
)
{
this
.
dayIntervalUnit
=
dayIntervalUnit
;
}
public
int
getDayRate
()
{
return
this
.
dayRate
;
}
public
void
setDayRate
(
int
dayRate
)
{
this
.
dayRate
=
dayRate
;
}
public
String
getDayTime
()
{
return
this
.
dayTime
;
}
public
void
setDayTime
(
String
dayTime
)
{
this
.
dayTime
=
dayTime
;
}
public
int
getDuration
()
{
return
this
.
duration
;
}
public
void
setDuration
(
int
duration
)
{
this
.
duration
=
duration
;
}
public
int
getError
()
{
return
this
.
error
;
}
public
void
setError
(
int
error
)
{
this
.
error
=
error
;
}
public
int
getExecuteRate
()
{
return
this
.
executeRate
;
}
public
void
setExecuteRate
(
int
executeRate
)
{
this
.
executeRate
=
executeRate
;
}
public
String
getInOrder
()
{
return
this
.
inOrder
;
}
public
void
setInOrder
(
String
inOrder
)
{
this
.
inOrder
=
inOrder
;
}
public
String
getIsFixedDate
()
{
return
this
.
isFixedDate
;
}
public
String
getDeptId
(
)
{
public
void
setIsFixedDate
(
String
isFixedDate
)
{
return
deptId
;
this
.
isFixedDate
=
isFixedDate
;
}
}
public
void
setDeptId
(
String
deptId
)
{
public
String
getIsScore
()
{
this
.
deptId
=
deptId
;
return
this
.
isScore
;
}
}
public
String
getCreateBy
()
{
return
this
.
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
public
void
setIsScore
(
String
isScore
)
{
this
.
createBy
=
createBy
;
this
.
isScore
=
isScore
;
}
}
public
String
getLastUpdBy
()
{
return
this
.
lastUpdBy
;
}
public
Time
getDayBegin
(
)
{
public
void
setLastUpdBy
(
String
lastUpdBy
)
{
return
this
.
dayBegin
;
this
.
lastUpdBy
=
lastUpdBy
;
}
}
public
void
setDayBegin
(
Time
dayBegin
)
{
public
Date
getLastUpdTime
(
)
{
this
.
dayBegin
=
dayBegin
;
return
this
.
lastUpdTime
;
}
}
public
Time
getDayEnd
(
)
{
public
void
setLastUpdTime
(
Date
lastUpdTime
)
{
return
this
.
dayEnd
;
this
.
lastUpdTime
=
lastUpdTime
;
}
}
public
void
setDayEnd
(
Time
dayEnd
)
{
public
int
getMinSpace
(
)
{
this
.
dayEnd
=
dayEnd
;
return
this
.
minSpace
;
}
}
public
int
getDayInterval
(
)
{
public
void
setMinSpace
(
int
minSpace
)
{
return
this
.
dayInterval
;
this
.
minSpace
=
minSpace
;
}
}
public
void
setDayInterval
(
int
dayInterval
)
{
public
String
getMonthType
(
)
{
this
.
dayInterval
=
dayInterval
;
return
this
.
monthType
;
}
}
public
String
getDayIntervalUnit
(
)
{
public
void
setMonthType
(
String
monthType
)
{
return
this
.
dayIntervalUnit
;
this
.
monthType
=
monthType
;
}
}
public
void
setDayIntervalUnit
(
String
dayIntervalUnit
)
{
public
String
getName
(
)
{
this
.
dayIntervalUnit
=
dayIntervalUnit
;
return
this
.
name
;
}
}
public
int
getDayRate
(
)
{
public
void
setName
(
String
name
)
{
return
this
.
dayRat
e
;
this
.
name
=
nam
e
;
}
}
public
void
setDayRate
(
int
dayRate
)
{
public
Date
getNextGenDate
(
)
{
this
.
dayRate
=
dayR
ate
;
return
this
.
nextGenD
ate
;
}
}
public
String
getDayTime
(
)
{
public
void
setNextGenDate
(
Date
nextGenDate
)
{
return
this
.
dayTim
e
;
this
.
nextGenDate
=
nextGenDat
e
;
}
}
public
void
setDayTime
(
String
dayTime
)
{
public
String
getOrgCode
(
)
{
this
.
dayTime
=
dayTim
e
;
return
this
.
orgCod
e
;
}
}
public
int
getDuration
(
)
{
public
void
setOrgCode
(
String
orgCode
)
{
return
this
.
duration
;
this
.
orgCode
=
orgCode
;
}
}
public
void
setDuration
(
int
duration
)
{
public
String
getPlanBegin
(
)
{
this
.
duration
=
duratio
n
;
return
this
.
planBegi
n
;
}
}
public
int
getError
(
)
{
public
void
setPlanBegin
(
String
planBegin
)
{
return
this
.
error
;
this
.
planBegin
=
planBegin
;
}
}
public
void
setError
(
int
error
)
{
public
String
getPlanEnd
(
)
{
this
.
error
=
error
;
return
this
.
planEnd
;
}
}
public
int
getExecuteRate
(
)
{
public
void
setPlanEnd
(
String
planEnd
)
{
return
this
.
executeRate
;
this
.
planEnd
=
planEnd
;
}
}
public
void
setExecuteRate
(
int
executeRate
)
{
public
String
getPlanType
(
)
{
this
.
executeRate
=
executeRat
e
;
return
this
.
planTyp
e
;
}
}
public
String
getInOrder
(
)
{
public
void
setPlanType
(
String
planType
)
{
return
this
.
inOrder
;
this
.
planType
=
planType
;
}
}
public
void
setInOrder
(
String
inOrder
)
{
public
String
getRemark
(
)
{
this
.
inOrder
=
inOrder
;
return
this
.
remark
;
}
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
long
getRouteId
()
{
return
this
.
routeId
;
}
public
void
setRouteId
(
long
routeId
)
{
this
.
routeId
=
routeId
;
}
public
String
getScoreFormula
()
{
return
this
.
scoreFormula
;
}
public
String
getIsFixedDate
(
)
{
public
void
setScoreFormula
(
String
scoreFormula
)
{
return
this
.
isFixedDate
;
this
.
scoreFormula
=
scoreFormula
;
}
}
public
void
setIsFixedDate
(
String
isFixedDate
)
{
public
byte
getStatus
(
)
{
this
.
isFixedDate
=
isFixedDate
;
return
this
.
status
;
}
}
public
String
getIsScore
(
)
{
public
void
setStatus
(
byte
status
)
{
return
this
.
isScore
;
this
.
status
=
status
;
}
}
public
void
setIsScore
(
String
isScore
)
{
public
String
getUserId
(
)
{
this
.
isScore
=
isScore
;
return
this
.
userId
;
}
}
public
String
getLastUpdBy
(
)
{
public
void
setUserId
(
String
userId
)
{
return
this
.
lastUpdBy
;
this
.
userId
=
userId
;
}
}
public
void
setLastUpdBy
(
String
lastUpdBy
)
{
public
int
getWeekBeginNum
(
)
{
this
.
lastUpdBy
=
lastUpdBy
;
return
this
.
weekBeginNum
;
}
}
public
Date
getLastUpdTime
(
)
{
public
void
setWeekBeginNum
(
int
weekBeginNum
)
{
return
this
.
lastUpdTime
;
this
.
weekBeginNum
=
weekBeginNum
;
}
}
public
void
setLastUpdTime
(
Date
lastUpdTime
)
{
public
int
getWeekDay
(
)
{
this
.
lastUpdTime
=
lastUpdTime
;
return
this
.
weekDay
;
}
}
public
int
getMinSpace
(
)
{
public
void
setWeekDay
(
int
weekDay
)
{
return
this
.
minSpace
;
this
.
weekDay
=
weekDay
;
}
}
public
void
setMinSpace
(
int
minSpace
)
{
public
int
getWeekEndNum
(
)
{
this
.
minSpace
=
minSpace
;
return
this
.
weekEndNum
;
}
}
public
String
getMonthType
(
)
{
public
void
setWeekEndNum
(
int
weekEndNum
)
{
return
this
.
monthType
;
this
.
weekEndNum
=
weekEndNum
;
}
}
public
void
setMonthType
(
String
monthType
)
{
public
String
getWhatDay
(
)
{
this
.
monthType
=
monthType
;
return
this
.
whatDay
;
}
}
public
String
getName
(
)
{
public
void
setWhatDay
(
String
whatDay
)
{
return
this
.
name
;
this
.
whatDay
=
whatDay
;
}
}
public
void
setName
(
String
name
)
{
public
int
getWhatWeek
(
)
{
this
.
name
=
name
;
return
this
.
whatWeek
;
}
}
public
Date
getNextGenDate
(
)
{
public
void
setWhatWeek
(
int
whatWeek
)
{
return
this
.
nextGenDate
;
this
.
whatWeek
=
whatWeek
;
}
}
public
void
setNextGenDate
(
Date
nextGenDate
)
{
public
String
getRemark1
(
)
{
this
.
nextGenDate
=
nextGenDate
;
return
remark1
;
}
}
public
String
getOrgCode
(
)
{
public
void
setRemark1
(
String
remark1
)
{
return
this
.
orgCode
;
this
.
remark1
=
remark1
;
}
}
public
void
setOrgCode
(
String
orgCode
)
{
public
String
getRemark2
(
)
{
this
.
orgCode
=
orgCode
;
return
remark2
;
}
}
public
String
getPlanBegin
(
)
{
public
void
setRemark2
(
String
remark2
)
{
return
this
.
planBegin
;
this
.
remark2
=
remark2
;
}
}
public
void
setPlanBegin
(
String
planBegin
)
{
public
int
getExecuteInterval
(
)
{
this
.
planBegin
=
planBegin
;
return
executeInterval
;
}
}
public
String
getPlanEnd
(
)
{
public
void
setExecuteInterval
(
int
executeInterval
)
{
return
this
.
planEnd
;
this
.
executeInterval
=
executeInterval
;
}
}
public
void
setPlanEnd
(
String
planEnd
)
{
public
int
getFirstFlag
(
)
{
this
.
planEnd
=
planEnd
;
return
firstFlag
;
}
}
public
String
getPlanType
(
)
{
public
void
setFirstFlag
(
int
firstFlag
)
{
return
this
.
planType
;
this
.
firstFlag
=
firstFlag
;
}
}
public
void
setPlanType
(
String
planType
)
{
public
boolean
getIsDelete
(
)
{
this
.
planType
=
planTyp
e
;
return
isDelet
e
;
}
}
public
String
getRemark
(
)
{
public
void
setIsDelete
(
boolean
isDelete
)
{
return
this
.
remark
;
this
.
isDelete
=
isDelete
;
}
}
public
void
setRemark
(
String
remark
)
{
public
String
getOriginalId
(
)
{
this
.
remark
=
remark
;
return
originalId
;
}
}
public
long
getRouteId
(
)
{
public
void
setOriginalId
(
String
originalId
)
{
return
this
.
route
Id
;
this
.
originalId
=
original
Id
;
}
}
public
void
setRouteId
(
long
routeId
)
{
public
Long
getPlanTaskId
(
)
{
this
.
routeId
=
route
Id
;
return
planTask
Id
;
}
}
public
String
getScoreFormula
(
)
{
public
void
setPlanTaskId
(
Long
planTaskId
)
{
return
this
.
scoreFormula
;
this
.
planTaskId
=
planTaskId
;
}
}
public
void
setScoreFormula
(
String
scoreFormula
)
{
public
boolean
getIsSingleExecution
(
)
{
this
.
scoreFormula
=
scoreFormula
;
return
isSingleExecution
;
}
}
public
byte
getStatus
()
{
public
void
setIsSingleExecution
(
boolean
isSingleExecution
)
{
return
this
.
status
;
this
.
isSingleExecution
=
isSingleExecution
;
}
}
public
void
setStatus
(
byte
status
)
{
this
.
status
=
status
;
}
public
String
getUserId
()
{
return
this
.
userId
;
}
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
public
int
getWeekBeginNum
()
{
return
this
.
weekBeginNum
;
}
public
void
setWeekBeginNum
(
int
weekBeginNum
)
{
this
.
weekBeginNum
=
weekBeginNum
;
}
public
int
getWeekDay
()
{
return
this
.
weekDay
;
}
public
void
setWeekDay
(
int
weekDay
)
{
this
.
weekDay
=
weekDay
;
}
public
int
getWeekEndNum
()
{
return
this
.
weekEndNum
;
}
public
void
setWeekEndNum
(
int
weekEndNum
)
{
this
.
weekEndNum
=
weekEndNum
;
}
public
String
getWhatDay
()
{
return
this
.
whatDay
;
}
public
void
setWhatDay
(
String
whatDay
)
{
this
.
whatDay
=
whatDay
;
}
public
int
getWhatWeek
()
{
return
this
.
whatWeek
;
}
public
void
setWhatWeek
(
int
whatWeek
)
{
this
.
whatWeek
=
whatWeek
;
}
public
String
getRemark1
()
{
return
remark1
;
}
public
void
setRemark1
(
String
remark1
)
{
this
.
remark1
=
remark1
;
}
public
String
getRemark2
()
{
return
remark2
;
}
public
void
setRemark2
(
String
remark2
)
{
this
.
remark2
=
remark2
;
}
public
int
getExecuteInterval
()
{
return
executeInterval
;
}
public
void
setExecuteInterval
(
int
executeInterval
)
{
this
.
executeInterval
=
executeInterval
;
}
public
int
getFirstFlag
()
{
return
firstFlag
;
}
public
void
setFirstFlag
(
int
firstFlag
)
{
this
.
firstFlag
=
firstFlag
;
}
public
boolean
getIsDelete
()
{
return
isDelete
;
}
public
void
setIsDelete
(
boolean
isDelete
)
{
this
.
isDelete
=
isDelete
;
}
public
String
getOriginalId
()
{
return
originalId
;
}
public
void
setOriginalId
(
String
originalId
)
{
this
.
originalId
=
originalId
;
}
public
Long
getPlanTaskId
()
{
return
planTaskId
;
}
public
void
setPlanTaskId
(
Long
planTaskId
)
{
this
.
planTaskId
=
planTaskId
;
}
public
boolean
getIsSingleExecution
()
{
return
isSingleExecution
;
}
public
void
setIsSingleExecution
(
boolean
isSingleExecution
)
{
this
.
isSingleExecution
=
isSingleExecution
;
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/dao/entity/Point.java
View file @
2fbf82de
...
@@ -268,9 +268,15 @@ public class Point extends BasicEntity {
...
@@ -268,9 +268,15 @@ public class Point extends BasicEntity {
private
String
riskSourceId
;
private
String
riskSourceId
;
/**
/**
* 所在建筑Id
*/
@Column
(
name
=
"building_id"
)
private
String
buildingId
;
/**
* 所在建筑名称
* 所在建筑名称
*/
*/
//
@Column(name="building_name")
@Column
(
name
=
"building_name"
)
private
String
buildingName
;
private
String
buildingName
;
public
String
getBuildingName
()
{
public
String
getBuildingName
()
{
...
@@ -290,12 +296,6 @@ public class Point extends BasicEntity {
...
@@ -290,12 +296,6 @@ public class Point extends BasicEntity {
}
}
/**
/**
* 所在建筑Id
*/
// @Column(name="building_id")
private
String
buildingId
;
/**
* ue4位置
* ue4位置
*/
*/
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/AlertCalledDto.java
View file @
2fbf82de
...
@@ -140,4 +140,7 @@ public class AlertCalledDto extends BaseDto {
...
@@ -140,4 +140,7 @@ public class AlertCalledDto extends BaseDto {
@ApiModelProperty
(
value
=
"结案说明"
)
@ApiModelProperty
(
value
=
"结案说明"
)
private
String
finalReason
;
private
String
finalReason
;
@ApiModelProperty
(
value
=
"是否辅屏查询"
)
private
String
isAuxiliaryScreen
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/AlertCalled.java
View file @
2fbf82de
...
@@ -217,4 +217,8 @@ public class AlertCalled extends BaseEntity {
...
@@ -217,4 +217,8 @@ public class AlertCalled extends BaseEntity {
@ApiModelProperty
(
value
=
"响应级别"
)
@ApiModelProperty
(
value
=
"响应级别"
)
private
String
responseLevel
;
private
String
responseLevel
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"是否辅屏查询"
)
private
String
isAuxiliaryScreen
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -43,8 +45,21 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
...
@@ -43,8 +45,21 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
/**
/**
* 根据查询条件返回警情记录
* 根据查询条件返回警情记录
* @param
alertCalledQueryDto
* @param
workOrderNumber
* @return
* @return
*/
*/
List
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
@Param
(
"alertCalledQueryDto"
)
AlertCalledQueryDto
alertCalledQueryDto
);
Page
<
List
<
AlertCalledQueryDto
>>
queryAlertListByQueryDto
(
IPage
<
AlertCalledQueryDto
>
page
,
String
workOrderNumber
,
String
creator
,
String
emergency
,
String
emergencyTimeStart
,
String
emergencyTimeEnd
,
String
emergencyCall
,
String
deviceId
,
String
elevatorAddress
,
String
alertType
,
String
alertSource
,
String
alertStage
,
String
alertStatus
,
String
address
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/IAlertCalledService.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
java.util.List
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
/**
/**
* 警情接警填报记录接口类
* 警情接警填报记录接口类
...
@@ -32,10 +34,22 @@ public interface IAlertCalledService {
...
@@ -32,10 +34,22 @@ public interface IAlertCalledService {
/**
/**
* 根据查询条件返回警情记录
* 根据查询条件返回警情记录
* @param
alertCalledQueryDto
* @param
workOrderNumber
* @return
* @return
*/
*/
List
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
AlertCalledQueryDto
alertCalledQueryDto
);
Page
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
IPage
<
AlertCalledQueryDto
>
page
,
@Condition
(
Operator
.
like
)
String
workOrderNumber
,
@Condition
(
Operator
.
like
)
String
creator
,
@Condition
(
Operator
.
like
)
String
emergency
,
@Condition
(
Operator
.
lt
)
String
emergencyTimeStart
,
@Condition
(
Operator
.
gt
)
String
emergencyTimeEnd
,
@Condition
(
Operator
.
like
)
String
emergencyCall
,
@Condition
(
Operator
.
like
)
String
deviceId
,
@Condition
(
Operator
.
like
)
String
elevatorAddress
,
@Condition
(
Operator
.
eq
)
String
alertType
,
@Condition
(
Operator
.
eq
)
String
alertSource
,
@Condition
(
Operator
.
eq
)
String
alertStage
,
@Condition
(
Operator
.
eq
)
String
alertStatus
);
/**
/**
* 更新警情阶段信息
* 更新警情阶段信息
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
2fbf82de
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
</if>
</if>
</select>
</select>
<select
id=
"queryAlertListByQueryDto"
resultType=
"
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
"
>
<select
id=
"queryAlertListByQueryDto"
resultType=
"
java.util.Map
"
>
SELECT
SELECT
a.work_order_number AS workOrderNumber,
a.work_order_number AS workOrderNumber,
a.rec_user_name AS creator,
a.rec_user_name AS creator,
...
@@ -170,52 +170,49 @@
...
@@ -170,52 +170,49 @@
tz_alert_called a
tz_alert_called a
LEFT JOIN tcb_elevator e ON e.rescue_code = a.device_id
LEFT JOIN tcb_elevator e ON e.rescue_code = a.device_id
WHERE 1=1
WHERE 1=1
<if
test=
"
alertCalledQueryDto.workOrderNumber != null and alertCalledQueryDto.
workOrderNumber != ''"
>
<if
test=
"
workOrderNumber != null and
workOrderNumber != ''"
>
AND a.work_order_number like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
workOrderNumber}),'%')
AND a.work_order_number like CONCAT(CONCAT('%',#{workOrderNumber}),'%')
</if>
</if>
<if
test=
"
alertCalledQueryDto.creator != null and alertCalledQueryDto.
creator != ''"
>
<if
test=
"
creator != null and
creator != ''"
>
AND a.rec_user_name like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
creator}),'%')
AND a.rec_user_name like CONCAT(CONCAT('%',#{creator}),'%')
</if>
</if>
<if
test=
"
alertCalledQueryDto.emergency != null and alertCalledQueryDto.
emergency != ''"
>
<if
test=
"
emergency != null and
emergency != ''"
>
AND a.emergency_person like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
emergency}),'%')
AND a.emergency_person like CONCAT(CONCAT('%',#{emergency}),'%')
</if>
</if>
<if
test=
"
alertCalledQueryDto.
emergencyTimeStart != null "
>
<if
test=
"emergencyTimeStart != null "
>
and #{
alertCalledQueryDto.
emergencyTimeStart}
<![CDATA[ <= ]]>
a.call_time
and #{emergencyTimeStart}
<![CDATA[ <= ]]>
a.call_time
</if>
</if>
<if
test=
"
alertCalledQueryDto.
emergencyTimeEnd != null "
>
<if
test=
"emergencyTimeEnd != null "
>
and a.call_time
<![CDATA[ <= ]]>
#{
alertCalledQueryDto.
emergencyTimeEnd}
and a.call_time
<![CDATA[ <= ]]>
#{emergencyTimeEnd}
</if>
</if>
<if
test=
"
alertCalledQueryDto.workOrderNumber != null and alertCalledQueryDto.
workOrderNumber != ''"
>
<if
test=
"
workOrderNumber != null and
workOrderNumber != ''"
>
and call_time
<![CDATA[ <= ]]>
#{endDate}
and call_time
<![CDATA[ <= ]]>
#{endDate}
</if>
</if>
<if
test=
"
alertCalledQueryDto.emergencyCall != null and alertCalledQueryDto.
emergencyCall != ''"
>
<if
test=
"
emergencyCall != null and
emergencyCall != ''"
>
AND a.emergency_call like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
emergencyCall}),'%')
AND a.emergency_call like CONCAT(CONCAT('%',#{emergencyCall}),'%')
</if>
</if>
<if
test=
"
alertCalledQueryDto.deviceId != null and alertCalledQueryDto.
deviceId != ''"
>
<if
test=
"
deviceId != null and
deviceId != ''"
>
AND a.device_id like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
deviceId}),'%')
AND a.device_id like CONCAT(CONCAT('%',#{deviceId}),'%')
</if>
</if>
<if
test=
"
alertCalledQueryDto.elevatorAddress != null and alertCalledQueryDto.
elevatorAddress != ''"
>
<if
test=
"
elevatorAddress != null and
elevatorAddress != ''"
>
AND e.address like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
elevatorAddress}),'%')
AND e.address like CONCAT(CONCAT('%',#{elevatorAddress}),'%')
</if>
</if>
<if
test=
"a
lertCalledQueryDto.address != null and alertCalledQueryDto.
address != ''"
>
<if
test=
"a
ddress != null and
address != ''"
>
AND a.region_code like CONCAT(CONCAT('%',#{a
lertCalledQueryDto.a
ddress}),'%')
AND a.region_code like CONCAT(CONCAT('%',#{address}),'%')
</if>
</if>
<if
test=
"alert
CalledQueryDto.alertType != null and alertCalledQueryDto.
alertType != ''"
>
<if
test=
"alert
Type != null and
alertType != ''"
>
AND a.alarm_type_code = #{alert
CalledQueryDto.alert
Type}
AND a.alarm_type_code = #{alertType}
</if>
</if>
<if
test=
"alert
CalledQueryDto.alertSource != null and alertCalledQueryDto.
alertSource != ''"
>
<if
test=
"alert
Source != null and
alertSource != ''"
>
AND a.alert_source_code = #{alert
CalledQueryDto.alert
Source}
AND a.alert_source_code = #{alertSource}
</if>
</if>
<if
test=
"alert
CalledQueryDto.alertStage != null and alertCalledQueryDto.
alertStage != ''"
>
<if
test=
"alert
Stage != null and
alertStage != ''"
>
AND a.alert_stage_code = #{alert
CalledQueryDto.alert
Stage}
AND a.alert_stage_code = #{alertStage}
</if>
</if>
<if
test=
"alertCalledQueryDto.alertStatus != null and alertCalledQueryDto.alertStatus != ''"
>
<if
test=
"alertStatus != null and alertStatus != ''"
>
AND a.alert_status = #{alertCalledQueryDto.alertStatus}
AND a.alert_status = #{alertStatus}
</if>
ORDER BY a.rec_date
<if
test=
"alertCalledQueryDto.pageNum != null and alertCalledQueryDto.pageSize != ''"
>
limit #{alertCalledQueryDto.pageNum},#{alertCalledQueryDto.pageSize}
</if>
</if>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
2fbf82de
...
@@ -541,12 +541,12 @@ public class CommandController extends BaseController {
...
@@ -541,12 +541,12 @@ public class CommandController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动单位分页查询"
,
notes
=
"联动单位分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动单位分页查询"
,
notes
=
"联动单位分页查询"
)
public
ResponseModel
<
Page
<
LinkageUnitDto
>>
LinkageUnitDtoQueryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
public
ResponseModel
<
Page
<
LinkageUnitDto
>>
LinkageUnitDtoQueryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
,
String
unitName
,
String
linkageUnitType
,
String
inAgreement
)
{
String
unitName
,
String
linkageUnitTypeCode
,
String
linkageUnitType
,
String
inAgreement
)
{
Page
<
LinkageUnitDto
>
page
=
new
Page
<
LinkageUnitDto
>();
Page
<
LinkageUnitDto
>
page
=
new
Page
<
LinkageUnitDto
>();
page
.
setCurrent
(
pageNum
);
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
page
.
setSize
(
pageSize
);
Page
<
LinkageUnitDto
>
linkageUnitDtoPage
=
iLinkageUnitService
.
queryForLinkageUnitPage
(
page
,
false
,
Page
<
LinkageUnitDto
>
linkageUnitDtoPage
=
iLinkageUnitService
.
queryForLinkageUnitPage
(
page
,
false
,
unitName
,
linkageUnitType
,
null
,
inAgreement
);
unitName
,
linkageUnitTypeCode
,
linkageUnitType
,
null
,
inAgreement
);
return
ResponseHelper
.
buildResponse
(
linkageUnitDtoPage
);
return
ResponseHelper
.
buildResponse
(
linkageUnitDtoPage
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FailureDetailsController.java
View file @
2fbf82de
...
@@ -145,6 +145,7 @@ public class FailureDetailsController extends BaseController {
...
@@ -145,6 +145,7 @@ public class FailureDetailsController extends BaseController {
failureDetailsDtoList
.
add
(
failureDetailsDto
);
failureDetailsDtoList
.
add
(
failureDetailsDto
);
});
});
failureDetailDTOsIPage
.
setRecords
(
failureDetailsDtoList
);
failureDetailDTOsIPage
.
setRecords
(
failureDetailsDtoList
);
failureDetailDTOsIPage
.
setTotal
(
failureDetailsIPage
.
getTotal
());
return
ResponseHelper
.
buildResponse
(
failureDetailDTOsIPage
);
return
ResponseHelper
.
buildResponse
(
failureDetailDTOsIPage
);
}
}
...
@@ -178,8 +179,8 @@ public class FailureDetailsController extends BaseController {
...
@@ -178,8 +179,8 @@ public class FailureDetailsController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程信息"
,
notes
=
"流程信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程信息"
,
notes
=
"流程信息"
)
@GetMapping
(
value
=
"/processHistory
/{sequenceNbr}
"
)
@GetMapping
(
value
=
"/processHistory"
)
public
ResponseModel
<
Object
>
selectHistoryt
(
@
PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
Object
>
selectHistoryt
(
@
RequestParam
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
getCurrentProcessHistoryTask
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
getCurrentProcessHistoryTask
(
sequenceNbr
));
}
}
...
@@ -241,4 +242,53 @@ public class FailureDetailsController extends BaseController {
...
@@ -241,4 +242,53 @@ public class FailureDetailsController extends BaseController {
}
}
}
}
/**
* Web端列表分页查询
*
* @param current 当前页
* @param size 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/weblist"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"Web端列表分页查询"
,
notes
=
"Web端列表分页查询"
)
public
ResponseModel
<
IPage
<
FailureDetailsDto
>>
queryForPageList
(
@RequestParam
(
value
=
"current"
)
Long
current
,
@RequestParam
(
value
=
"size"
)
Long
size
,
@RequestParam
(
required
=
false
)
Long
currentStatus
,
@RequestParam
(
required
=
false
)
String
submissionName
,
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
,
@RequestParam
(
required
=
false
)
Long
submissionBranchId
,
@RequestParam
(
required
=
false
)
Long
sequenceNbr
)
{
Page
<
FailureDetailsDto
>
page
=
new
Page
<>();
if
(
current
.
longValue
()
>
0
)
{
page
.
setCurrent
((
current
-
1
)
*
size
);
}
else
{
page
.
setCurrent
(
current
);
}
page
.
setSize
(
size
);
ReginParams
userInfo
=
getSelectedOrgInfo
();
IPage
<
FailureDetailsDto
>
failureDetailDTOsIPage
=
new
Page
<>();
IPage
<
FailureDetailsDto
>
failureDetailsIPage
=
failureDetailsServiceImpl
.
queryForPageList
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
submissionName
,
submissionBranchId
,
sequenceNbr
);
BeanUtils
.
copyProperties
(
failureDetailsIPage
,
FailureDetailsDto
.
class
);
List
<
FailureDetailsDto
>
records
=
failureDetailsIPage
.
getRecords
();
List
<
FailureDetailsDto
>
failureDetailsDtoList
=
new
ArrayList
<
FailureDetailsDto
>();
records
.
stream
().
forEach
(
failureDetails
->
{
FailureDetailsDto
failureDetailsDto
=
new
FailureDetailsDto
();
BeanUtils
.
copyProperties
(
failureDetails
,
failureDetailsDto
);
failureDetailsDto
.
setCurrentStatusName
(
Constants
.
currentStatusNameMap
.
get
(
failureDetails
.
getCurrentStatus
()));
failureDetailsDtoList
.
add
(
failureDetailsDto
);
});
failureDetailDTOsIPage
.
setRecords
(
failureDetailsDtoList
);
failureDetailDTOsIPage
.
setTotal
(
failureDetailsIPage
.
getTotal
());
return
ResponseHelper
.
buildResponse
(
failureDetailDTOsIPage
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FireExpertsController.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -13,20 +16,14 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...
@@ -13,20 +16,14 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireExperts
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireExperts
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
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.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
@@ -59,8 +56,7 @@ public class FireExpertsController extends BaseController {
...
@@ -59,8 +56,7 @@ public class FireExpertsController extends BaseController {
@Autowired
@Autowired
DataDictionaryServiceImpl
dataDictionaryService
;
DataDictionaryServiceImpl
dataDictionaryService
;
@Autowired
DataDictionaryMapper
dataDictionaryMapper
;
/**
/**
* 新增
* 新增
...
@@ -188,4 +184,40 @@ public class FireExpertsController extends BaseController {
...
@@ -188,4 +184,40 @@ public class FireExpertsController extends BaseController {
// 创建挂在主节点
// 创建挂在主节点
return
ResponseHelper
.
buildResponse
(
menuList
);
return
ResponseHelper
.
buildResponse
(
menuList
);
}
}
/**
*
* 导入航空器信息
*
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/ImportData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"导入消防专家"
,
notes
=
"导入消防专家"
)
public
Boolean
ImportData
(
@RequestPart
MultipartFile
multipartFile
)
{
List
<
FireExperts
>
aircraftList
=
new
ArrayList
<>();
try
{
EasyExcel
.
read
(
multipartFile
.
getInputStream
(),
FireExpertsDto
.
class
,
new
AnalysisEventListener
<
FireExpertsDto
>()
{
// 每读取一行就调用该方法
@Override
public
void
invoke
(
FireExpertsDto
data
,
AnalysisContext
context
)
{
FireExperts
fireExperts
=
new
FireExperts
();
BeanUtils
.
copyProperties
(
data
,
fireExperts
);
aircraftList
.
add
(
fireExperts
);
}
// 全部读取完成就调用该方法
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
System
.
out
.
println
(
"读取完成"
);
}
}).
sheet
().
doRead
();
fireExpertsServiceImpl
.
saveBatch
(
aircraftList
);
return
true
;
}
catch
(
Exception
e
)
{
return
false
;
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/LinkageUnitController.java
View file @
2fbf82de
...
@@ -123,12 +123,12 @@ public class LinkageUnitController extends BaseController {
...
@@ -123,12 +123,12 @@ public class LinkageUnitController extends BaseController {
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动单位分页查询"
,
notes
=
"联动单位分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动单位分页查询"
,
notes
=
"联动单位分页查询"
)
public
ResponseModel
<
Page
<
LinkageUnitDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
LinkageUnitDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
String
unitName
,
String
linkageUnitType
,
String
inAgreement
,
String
emergencyLinkageUnitCode
)
{
(
value
=
"size"
)
int
size
,
String
unitName
,
String
linkageUnitTypeCode
,
String
linkageUnitType
,
String
inAgreement
,
String
emergencyLinkageUnitCode
)
{
Page
<
LinkageUnitDto
>
page
=
new
Page
<
LinkageUnitDto
>();
Page
<
LinkageUnitDto
>
page
=
new
Page
<
LinkageUnitDto
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
Page
<
LinkageUnitDto
>
linkageUnitDtoPage
=
linkageUnitServiceImpl
.
queryForLinkageUnitPage
(
page
,
false
,
Page
<
LinkageUnitDto
>
linkageUnitDtoPage
=
linkageUnitServiceImpl
.
queryForLinkageUnitPage
(
page
,
false
,
unitName
,
linkageUnitType
,
emergencyLinkageUnitCode
,
inAgreement
);
unitName
,
linkageUnitType
Code
,
linkageUnitType
,
emergencyLinkageUnitCode
,
inAgreement
);
return
ResponseHelper
.
buildResponse
(
linkageUnitDtoPage
);
return
ResponseHelper
.
buildResponse
(
linkageUnitDtoPage
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgPersonController.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
...
@@ -37,10 +38,6 @@ import java.util.Map;
...
@@ -37,10 +38,6 @@ import java.util.Map;
public
class
OrgPersonController
{
public
class
OrgPersonController
{
@Autowired
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
EmqKeeper
emqKeeper
;
@Value
(
"${jcs.company.topic.delete}"
)
private
String
airportDeleteTopic
;
/**
/**
* 新增人员信息
* 新增人员信息
...
@@ -69,11 +66,6 @@ public class OrgPersonController {
...
@@ -69,11 +66,6 @@ public class OrgPersonController {
// 删除时,只作逻辑删除
// 删除时,只作逻辑删除
iOrgUsrService
.
update
(
new
UpdateWrapper
<
OrgUsr
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
iOrgUsrService
.
update
(
new
UpdateWrapper
<
OrgUsr
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
CommonConstant
.
IS_DELETE_01
));
CommonConstant
.
IS_DELETE_01
));
try
{
emqKeeper
.
getMqttClient
().
publish
(
airportDeleteTopic
,
String
.
valueOf
(
id
).
getBytes
(),
2
,
true
);
}
catch
(
Exception
e
)
{
e
.
getMessage
();
}
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -17,7 +18,9 @@ import io.swagger.annotations.Api;
...
@@ -17,7 +18,9 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
@@ -44,6 +47,10 @@ public class OrgUsrController extends BaseController {
...
@@ -44,6 +47,10 @@ public class OrgUsrController extends BaseController {
OrgUsrServiceImpl
iOrgUsrService
;
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
@Autowired
ESOrgUsrService
eSOrgUsrService
;
ESOrgUsrService
eSOrgUsrService
;
@Autowired
EmqKeeper
emqKeeper
;
@Value
(
"${jcs.company.topic.delete}"
)
private
String
airportDeleteTopic
;
/**
/**
...
@@ -74,12 +81,11 @@ public class OrgUsrController extends BaseController {
...
@@ -74,12 +81,11 @@ public class OrgUsrController extends BaseController {
iOrgUsrService
.
update
(
new
UpdateWrapper
<
OrgUsr
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
CommonConstant
.
IS_DELETE_01
));
iOrgUsrService
.
update
(
new
UpdateWrapper
<
OrgUsr
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
CommonConstant
.
IS_DELETE_01
));
try
{
try
{
eSOrgUsrService
.
deleteById
(
id
);
eSOrgUsrService
.
deleteById
(
id
);
emqKeeper
.
getMqttClient
().
publish
(
airportDeleteTopic
,
JSON
.
toJSONString
(
id
).
getBytes
(),
2
,
false
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
();
throw
new
RuntimeException
();
}
}
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
@@ -268,6 +274,14 @@ public class OrgUsrController extends BaseController {
...
@@ -268,6 +274,14 @@ public class OrgUsrController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
returnCompanyPerson
(
ids
));
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
returnCompanyPerson
(
ids
));
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/company/person/{amosUserId}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据amosUserId获取单位ID"
,
notes
=
"根据amosUserId获取单位ID"
)
public
ResponseModel
<
String
>
selectPersonId
(
@PathVariable
String
amosUserId
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
getParentId
(
amosUserId
));
}
/**
/**
* 根据id获取单位人员列表
* 根据id获取单位人员列表
*
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
2fbf82de
...
@@ -348,12 +348,12 @@ public class WaterResourceController extends BaseController {
...
@@ -348,12 +348,12 @@ public class WaterResourceController extends BaseController {
@RequestParam
(
value
=
"size"
)
int
size
,
String
name
,
@RequestParam
(
value
=
"size"
)
int
size
,
String
name
,
@RequestParam
(
value
=
"belongBuildingId"
,
required
=
false
)
ArrayList
<
Long
>
belongBuildingId
,
@RequestParam
(
value
=
"belongBuildingId"
,
required
=
false
)
ArrayList
<
Long
>
belongBuildingId
,
Long
belongFightingSystemId
,
Long
sequenceNbr
,
Long
belongFightingSystemId
,
Long
sequenceNbr
,
String
resourceType
)
{
String
classifyId
)
{
Page
<
WaterResourceDto
>
page
=
new
Page
<>();
Page
<
WaterResourceDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryForWaterResourcePage
(
page
,
name
,
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryForWaterResourcePage
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
));
classifyId
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
));
}
}
/**
/**
...
@@ -384,9 +384,9 @@ public class WaterResourceController extends BaseController {
...
@@ -384,9 +384,9 @@ public class WaterResourceController extends BaseController {
@GetMapping
(
value
=
"/select_list"
)
@GetMapping
(
value
=
"/select_list"
)
public
ResponseModel
<
List
<
WaterResourceDto
>>
selectList
(
String
name
,
Long
sequenceNbr
,
public
ResponseModel
<
List
<
WaterResourceDto
>>
selectList
(
String
name
,
Long
sequenceNbr
,
Long
belongFightingSystemId
,
Long
belongBuildingId
,
Long
belongFightingSystemId
,
Long
belongBuildingId
,
String
belongBuilding
,
String
resourceType
,
String
classifyId
)
{
String
belongBuilding
,
String
resourceType
)
{
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryWaterResourceList
(
true
,
name
,
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryWaterResourceList
(
true
,
name
,
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
belongBuilding
,
resourceType
,
classifyId
));
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
belongBuilding
,
resourceType
));
}
}
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureAuditServiceImpl.java
View file @
2fbf82de
...
@@ -4,6 +4,7 @@ import java.util.Date;
...
@@ -4,6 +4,7 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -44,6 +45,8 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
...
@@ -44,6 +45,8 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
@Autowired
@Autowired
FailureRepairlogServiceImpl
failureRepairlogService
;
FailureRepairlogServiceImpl
failureRepairlogService
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
/**
/**
...
@@ -62,8 +65,9 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
...
@@ -62,8 +65,9 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
int
auditResult
=
0
;
int
auditResult
=
0
;
Boolean
repairResult
=
null
;
Boolean
repairResult
=
null
;
Long
seq
=
Long
.
valueOf
(
iOrgUsrService
.
getParentId
(
userInfo
.
getUserModel
().
getUserId
()));
//根据审核的结果进行业务操作
//根据审核的结果进行业务操作
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
()
&&
userInfo
.
getDepartment
().
getSequenceNbr
()
.
equals
(
failureDetailsDto
.
getBizCode
()))
{
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
()
&&
seq
.
equals
(
failureDetailsDto
.
getBizCode
()))
{
auditResult
=
AuditResultEnum
.
AGREE
.
getCode
();
auditResult
=
AuditResultEnum
.
AGREE
.
getCode
();
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_AUDIT
,
userInfo
,
condition
);
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_AUDIT
,
userInfo
,
condition
);
}
else
if
(
condition
==
(
AuditResultEnum
.
REFUSE
.
getCode
()))
{
}
else
if
(
condition
==
(
AuditResultEnum
.
REFUSE
.
getCode
()))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureDetailsServiceImpl.java
View file @
2fbf82de
...
@@ -65,6 +65,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -65,6 +65,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
@Autowired
@Autowired
IFailureRepairlogService
failureRepairlog
;
IFailureRepairlogService
failureRepairlog
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
public
static
String
EMERGENCY_COMMAND
=
"应急指挥科"
;
public
static
String
EMERGENCY_COMMAND
=
"应急指挥科"
;
public
static
String
[]
PROCESS_NAME
=
{
"提交报修单"
,
"审核"
,
"维修"
,
"验收"
,
"维修中"
};
public
static
String
[]
PROCESS_NAME
=
{
"提交报修单"
,
"审核"
,
"维修"
,
"验收"
,
"维修中"
};
...
@@ -102,6 +104,16 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -102,6 +104,16 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
return
this
.
queryForWaitManage
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
userId
);
return
this
.
queryForWaitManage
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
userId
);
}
}
/**
* web端列表查询
*/
public
IPage
<
FailureDetailsDto
>
queryForPageList
(
Page
<
FailureDetailsDto
>
page
,
ReginParams
userInfo
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
String
submissionName
,
Long
submissionBranchId
,
Long
sequenceNbr
)
{
return
queryForPage
(
page
,
""
,
false
,
currentStatus
,
startTime
,
endTime
,
submissionName
,
submissionBranchId
,
sequenceNbr
);
}
/**
/**
* 待处理分页查询
* 待处理分页查询
...
@@ -110,7 +122,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -110,7 +122,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
String
startTime
,
String
endTime
,
Integer
userId
)
{
String
startTime
,
String
endTime
,
Integer
userId
)
{
if
(
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
0
]))
{
if
(
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
0
]))
{
IPage
<
FailureDetails
>
wxIpage
=
new
Page
<>();
IPage
<
FailureDetails
>
wxIpage
=
new
Page
<
FailureDetails
>();
List
<
FailureDetails
>
list
=
baseMapper
.
selectStatusWaitWx
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
List
<
FailureDetails
>
list
=
baseMapper
.
selectStatusWaitWx
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
wxIpage
.
setRecords
(
list
);
wxIpage
.
setRecords
(
list
);
return
wxIpage
;
return
wxIpage
;
...
@@ -222,7 +234,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -222,7 +234,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setFailureCode
(
buildOrderNo
());
failureDetailsDto
.
setFailureCode
(
buildOrderNo
());
failureDetailsDto
.
setSubmissionName
(
userInfo
.
getUserModel
().
getRealName
());
failureDetailsDto
.
setSubmissionName
(
userInfo
.
getUserModel
().
getRealName
());
failureDetailsDto
.
setBizCode
(
userInfo
.
getDepartment
().
getSequenceNbr
(
));
failureDetailsDto
.
setBizCode
(
Long
.
valueOf
(
iOrgUsrService
.
getParentId
(
userInfo
.
getUserModel
().
getUserId
())
));
model
=
this
.
createWithModel
(
failureDetailsDto
);
model
=
this
.
createWithModel
(
failureDetailsDto
);
if
(
ObjectUtils
.
isNotEmpty
(
failureDetailsDto
.
getAttachment
()))
{
if
(
ObjectUtils
.
isNotEmpty
(
failureDetailsDto
.
getAttachment
()))
{
...
@@ -234,11 +246,14 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -234,11 +246,14 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
Integer
processAuditorId
=
model
.
getSubmissionPid
();
Integer
processAuditorId
=
model
.
getSubmissionPid
();
String
processResult
=
"提交报修单"
;
String
processResult
=
"提交报修单"
;
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
();
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
();
Long
departmentId
=
userInfo
.
getDepartment
().
getSequenceNbr
();
Long
departmentId
=
failureDetailsDto
.
getBizCode
();
Date
processTime
=
model
.
getSubmissionTime
();
Date
processTime
=
model
.
getSubmissionTime
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
System
.
out
.
println
(
System
.
currentTimeMillis
());
repairlog
(
faultId
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorName
);
repairlog
(
faultId
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorName
);
if
(
excuteTask
(
instance
.
getString
(
"id"
),
userInfo
,
null
))
{
if
(
excuteTask
(
instance
.
getString
(
"id"
),
userInfo
,
null
))
{
return
true
;
return
true
;
}
else
{
}
else
{
throw
new
Exception
(
"执行流程失败"
);
throw
new
Exception
(
"执行流程失败"
);
...
@@ -266,7 +281,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -266,7 +281,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
Integer
processAuditorId
=
model
.
getSubmissionPid
();
Integer
processAuditorId
=
model
.
getSubmissionPid
();
String
processResult
=
"重新提交报修单"
;
String
processResult
=
"重新提交报修单"
;
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
();
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
();
Long
departmentId
=
userInfo
.
getDepartment
().
getSequenceNbr
();
Long
departmentId
=
failureDetailsDto
.
getBizCode
();
Date
processTime
=
model
.
getSubmissionTime
();
Date
processTime
=
model
.
getSubmissionTime
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
repairlog
(
faultId
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorName
);
repairlog
(
faultId
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorName
);
...
@@ -396,6 +411,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -396,6 +411,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
public
Map
<
String
,
Object
>
checkExcuteTaskAuthMap
(
Long
sequenceNbr
,
ReginParams
userInfo
)
{
public
Map
<
String
,
Object
>
checkExcuteTaskAuthMap
(
Long
sequenceNbr
,
ReginParams
userInfo
)
{
// 获取当前登录用户的角色
// 获取当前登录用户的角色
String
currentLoginUserRole
=
userInfo
.
getRole
().
getRoleName
();
String
currentLoginUserRole
=
userInfo
.
getRole
().
getRoleName
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"checkFlag"
,
false
);
map
.
put
(
"checkFlag"
,
false
);
...
@@ -404,7 +420,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -404,7 +420,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
Long
failureEquipmentId
=
failureDetailsDto
.
getSubmissionBranchId
();
Long
failureEquipmentId
=
failureDetailsDto
.
getSubmissionBranchId
();
FailureDetails
details
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
FailureDetails
details
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
String
procressId
=
details
.
getProcessId
();
String
procressId
=
details
.
getProcessId
();
Long
seq
=
userInfo
.
getDepartment
().
getSequenceNbr
(
);
Long
seq
=
Long
.
valueOf
(
iOrgUsrService
.
getParentId
(
userInfo
.
getUserModel
().
getUserId
())
);
JSONObject
teskObject
=
workflowFeignService
.
getTaskList
(
procressId
);
JSONObject
teskObject
=
workflowFeignService
.
getTaskList
(
procressId
);
if
(
ObjectUtils
.
isNotEmpty
(
teskObject
))
{
if
(
ObjectUtils
.
isNotEmpty
(
teskObject
))
{
JSONArray
taskDetailArray
=
teskObject
.
getJSONArray
(
"data"
);
JSONArray
taskDetailArray
=
teskObject
.
getJSONArray
(
"data"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureMaintainServiceImpl.java
View file @
2fbf82de
...
@@ -5,14 +5,9 @@ import java.util.Date;
...
@@ -5,14 +5,9 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureAudit
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,14 +15,8 @@ import org.springframework.stereotype.Service;
...
@@ -20,14 +15,8 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
...
@@ -38,8 +27,6 @@ import com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto;
...
@@ -38,8 +27,6 @@ import com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureMaintain
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureMaintain
;
import
com.yeejoin.amos.boot.module.common.api.enums.AuditResultEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureMaintainMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureMaintainMapper
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureRepairlogServiceImpl.java
View file @
2fbf82de
...
@@ -5,12 +5,10 @@ import java.util.List;
...
@@ -5,12 +5,10 @@ import java.util.List;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureAudit
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureRepairlog
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureRepairlog
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureRepairlogMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureRepairlogMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureRepairlogService
;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureRepairlogService
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/LinkageUnitServiceImpl.java
View file @
2fbf82de
...
@@ -72,10 +72,11 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
...
@@ -72,10 +72,11 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
*/
*/
@Override
@Override
public
Page
<
LinkageUnitDto
>
queryForLinkageUnitPage
(
IPage
<
LinkageUnitDto
>
page
,
public
Page
<
LinkageUnitDto
>
queryForLinkageUnitPage
(
IPage
<
LinkageUnitDto
>
page
,
@Condition
(
Operator
.
eq
)
Boolean
isDelete
,
@Condition
(
Operator
.
like
)
String
unitName
,
Boolean
isDelete
,
String
unitName
,
@Condition
(
Operator
.
eq
)
String
linkageUnitType
,
@Condition
(
Operator
.
eq
)
String
emergencyLinkageUnitCode
,
String
linkageUnitTypeCode
,
String
linkageUnitType
,
String
emergencyLinkageUnitCode
,
String
inAgreement
)
{
String
inAgreement
)
{
Page
<
List
<
LinkageUnitDto
>>
linkageUnitList
=
linkageUnitMapper
.
getEmergencyLinkageUnitList
(
page
,
unitName
,
linkageUnitType
,
emergencyLinkageUnitCode
);
Page
<
List
<
LinkageUnitDto
>>
linkageUnitList
=
linkageUnitMapper
.
getEmergencyLinkageUnitList
(
page
,
unitName
,
linkageUnitType
,
linkageUnitTypeCode
,
emergencyLinkageUnitCode
);
List
<
Map
>
linkageUnitListMap
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
linkageUnitList
.
getRecords
()),
Map
.
class
);
List
<
Map
>
linkageUnitListMap
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
linkageUnitList
.
getRecords
()),
Map
.
class
);
List
<
Map
<
String
,
Object
>>
pageList
=
dynamicFormInstanceService
.
listAll
(
getGroupCode
());
List
<
Map
<
String
,
Object
>>
pageList
=
dynamicFormInstanceService
.
listAll
(
getGroupCode
());
...
@@ -87,7 +88,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
...
@@ -87,7 +88,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
}
}
});
});
});
});
List
<
LinkageUnitDto
>
resultDtoList
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
linkageUnitList
.
getRecords
()
),
List
<
LinkageUnitDto
>
resultDtoList
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
linkageUnitList
Map
),
LinkageUnitDto
.
class
);
LinkageUnitDto
.
class
);
List
<
LinkageUnitDto
>
detaiList
=
resultDtoList
.
stream
().
map
(
item
->
{
List
<
LinkageUnitDto
>
detaiList
=
resultDtoList
.
stream
().
map
(
item
->
{
Date
now
=
new
Date
();
Date
now
=
new
Date
();
...
@@ -111,6 +112,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
...
@@ -111,6 +112,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
/**
/**
* 列表查询 示例
* 列表查询 示例
*/
*/
@Override
public
List
<
LinkageUnitDto
>
queryForLinkageUnitList
(
@Condition
(
Operator
.
eq
)
Boolean
isDelete
)
{
public
List
<
LinkageUnitDto
>
queryForLinkageUnitList
(
@Condition
(
Operator
.
eq
)
Boolean
isDelete
)
{
return
this
.
queryForList
(
""
,
false
,
isDelete
);
return
this
.
queryForList
(
""
,
false
,
isDelete
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -435,7 +436,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -435,7 +436,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsrFormDto
formDto
=
this
.
selectCompanyById
(
orgUsr
.
getSequenceNbr
());
OrgUsrFormDto
formDto
=
this
.
selectCompanyById
(
orgUsr
.
getSequenceNbr
());
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsr
.
getBizOrgType
()))
{
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsr
.
getBizOrgType
()))
{
try
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
airportAddTopic
,
formDto
.
toString
().
getBytes
(),
2
,
tru
e
);
emqKeeper
.
getMqttClient
().
publish
(
airportAddTopic
,
JSON
.
toJSONString
(
formDto
).
getBytes
(),
2
,
fals
e
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
getMessage
();
e
.
getMessage
();
}
}
...
@@ -967,6 +968,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -967,6 +968,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
this
.
queryBySeq
(
Long
.
valueOf
(
person
.
getParentId
()));
return
this
.
queryBySeq
(
Long
.
valueOf
(
person
.
getParentId
()));
}
}
public
String
getParentId
(
String
amosOrgId
)
{
List
<
OrgUsrDto
>
orgUsrDtos
=
queryForList
(
""
,
false
,
amosOrgId
);
String
parentId
=
null
;
if
(
orgUsrDtos
.
size
()
>=
1
){
parentId
=
orgUsrDtos
.
get
(
0
).
getParentId
();
}
else
{
return
null
;
}
return
parentId
;
}
public
OrgUsrDto
queryForListByParentIdAndOrgType
(
String
amosOrgId
)
{
public
OrgUsrDto
queryForListByParentIdAndOrgType
(
String
amosOrgId
)
{
return
this
.
queryModelByParams
(
amosOrgId
);
return
this
.
queryModelByParams
(
amosOrgId
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceServiceImpl.java
View file @
2fbf82de
...
@@ -56,13 +56,11 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
...
@@ -56,13 +56,11 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
*/
*/
public
Page
<
WaterResourceDto
>
queryForWaterResourcePage
(
Page
<
WaterResourceDto
>
page
,
public
Page
<
WaterResourceDto
>
queryForWaterResourcePage
(
Page
<
WaterResourceDto
>
page
,
@Condition
(
Operator
.
like
)
String
name
,
@Condition
(
Operator
.
like
)
String
name
,
@Condition
(
Operator
.
eq
)
String
resourceType
,
@Condition
(
Operator
.
eq
)
String
equipId
,
@Condition
(
Operator
.
in
)
ArrayList
<
Long
>
belongBuildingId
,
@Condition
(
Operator
.
in
)
ArrayList
<
Long
>
belongBuildingId
,
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
sequenceNbr
)
{
@Condition
(
Operator
.
eq
)
Long
sequenceNbr
)
{
// return this.queryForPage(page, null, false, name, resourceType, belongBuildingId, belongFightingSystemId,
return
this
.
waterResourceMapper
.
getWaterResourcePageByParams
(
page
,
name
,
equipId
,
belongBuildingId
,
// sequenceNbr, isDelete);
return
this
.
waterResourceMapper
.
getWaterResourcePageByParams
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
);
belongFightingSystemId
,
sequenceNbr
);
}
}
...
@@ -82,10 +80,9 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
...
@@ -82,10 +80,9 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
belongBuildingId
,
@Condition
(
Operator
.
eq
)
Long
belongBuildingId
,
@Condition
(
Operator
.
like
)
String
belongBuilding
,
@Condition
(
Operator
.
like
)
String
belongBuilding
,
@Condition
(
Operator
.
eq
)
String
resourceType
,
@Condition
(
Operator
.
eq
)
String
resourceType
)
{
@Condition
(
Operator
.
eq
)
String
equipId
)
{
return
this
.
queryForList
(
""
,
false
,
isDelete
,
name
,
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
return
this
.
queryForList
(
""
,
false
,
isDelete
,
name
,
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
belongBuilding
,
resourceType
,
equipId
);
belongBuilding
,
resourceType
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AircraftController.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.metadata.TableStyle
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.ExcelUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.api.feign.IotFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.IotFeignClient
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDtos
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
...
@@ -21,6 +31,9 @@ import io.swagger.annotations.Api;
...
@@ -21,6 +31,9 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.poi.ss.usermodel.IndexedColors
;
import
org.slf4j.Logger
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -33,7 +46,13 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -33,7 +46,13 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.util.*
;
import
java.util.*
;
...
@@ -53,10 +72,11 @@ public class AircraftController extends BaseController {
...
@@ -53,10 +72,11 @@ public class AircraftController extends BaseController {
@Autowired
@Autowired
DataSourcesImpl
dataSourcesImpl
;
DataSourcesImpl
dataSourcesImpl
;
@Autowired
@Autowired
IotFeignClient
iotFeignClient
;
IotFeignClient
iotFeignClient
;
@Autowired
@Autowired
private
AlertFormValueServiceImpl
iAlertFormValueService
;
private
AlertFormValueServiceImpl
iAlertFormValueService
;
/**
/**
* 新增航空器信息
* 新增航空器信息
*
*
...
@@ -142,12 +162,10 @@ public class AircraftController extends BaseController {
...
@@ -142,12 +162,10 @@ public class AircraftController extends BaseController {
return
ResponseHelper
.
buildResponse
(
aircraftServiceImpl
.
queryForAircraftPage
(
page
,
false
,
aircraftModel
,
return
ResponseHelper
.
buildResponse
(
aircraftServiceImpl
.
queryForAircraftPage
(
page
,
false
,
aircraftModel
,
engineTypeCode
,
fuelTypeCode
));
engineTypeCode
,
fuelTypeCode
));
}
}
/**
/**
*
* @param
*
* @param 获取航空器型号列表
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -155,59 +173,53 @@ public class AircraftController extends BaseController {
...
@@ -155,59 +173,53 @@ public class AircraftController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取航空器型号列表"
,
notes
=
"获取航空器型号列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取航空器型号列表"
,
notes
=
"获取航空器型号列表"
)
public
ResponseModel
<
List
<
AircraftListTreeDto
>>
getAircraft
()
{
public
ResponseModel
<
List
<
AircraftListTreeDto
>>
getAircraft
()
{
return
ResponseHelper
.
buildResponse
(
aircraftServiceImpl
.
getAircraft
());
return
ResponseHelper
.
buildResponse
(
aircraftServiceImpl
.
getAircraft
());
}
}
/**
/**
*
* 获取24小时内的航班号
* 获取24小时内的航班号
*
**/
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getAircraftNum"
)
@GetMapping
(
value
=
"/getAircraftNum"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取24小时内的航班号"
,
notes
=
"获取24小时内的航班号"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取24小时内的航班号"
,
notes
=
"获取24小时内的航班号"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getAircraftNum
()
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getAircraftNum
()
{
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
dataModel
=
iotFeignClient
.
findImgByFileCategory
();
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
dataModel
=
iotFeignClient
.
findImgByFileCategory
();
if
(
dataModel
!=
null
)
{
if
(
dataModel
!=
null
)
{
List
<
Map
<
String
,
Object
>>
listmap
=
dataModel
.
getResult
();
List
<
Map
<
String
,
Object
>>
listmap
=
dataModel
.
getResult
();
return
ResponseHelper
.
buildResponse
(
listmap
);
return
ResponseHelper
.
buildResponse
(
listmap
);
}
}
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
/**
/**
*
* 通过航班号,查询最新的航班信息
* 通过航班号,查询最新的航班信息
*
**/
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getAircraftDetails/{num}"
)
@GetMapping
(
value
=
"/getAircraftDetails/{num}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过航班号,查询最新的航班信息"
,
notes
=
"通过航班号,查询最新的航班信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过航班号,查询最新的航班信息"
,
notes
=
"通过航班号,查询最新的航班信息"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAircraftDetails
(
@PathVariable
String
num
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getAircraftDetails
(
@PathVariable
String
num
)
{
Map
<
String
,
Object
>
map1
=
new
HashedMap
();
Map
<
String
,
Object
>
map1
=
new
HashedMap
();
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
getDynamicFlightInfo
(
num
);
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
getDynamicFlightInfo
(
num
);
if
(
dataModel
!=
null
)
{
if
(
dataModel
!=
null
)
{
Map
<
String
,
Object
>
map
=
dataModel
.
getResult
();
Map
<
String
,
Object
>
map
=
dataModel
.
getResult
();
if
(
map
!=
null
)
{
if
(
map
!=
null
)
{
map1
.
put
(
"aircraftModel"
,
map
.
get
(
"aircraftType"
));
map1
.
put
(
"aircraftModel"
,
map
.
get
(
"aircraftType"
));
map1
.
put
(
"dynamicFlightId"
,
map
.
get
(
"dynamicFlightId"
));
map1
.
put
(
"dynamicFlightId"
,
map
.
get
(
"dynamicFlightId"
));
map1
.
put
(
"landingTime"
,
map
.
get
(
"sta"
));
map1
.
put
(
"landingTime"
,
map
.
get
(
"sta"
));
// map1.put("fuelQuantity", map.get(""));
// map1.put("fuelQuantity", map.get(""));
map1
.
put
(
"passengerCapacity"
,
map
.
get
(
"psgNumTotal"
));
map1
.
put
(
"passengerCapacity"
,
map
.
get
(
"psgNumTotal"
));
}
}
}
}
return
ResponseHelper
.
buildResponse
(
map1
);
return
ResponseHelper
.
buildResponse
(
map1
);
}
}
/**
/**
*
* 通过航班号,查询最新的航班信息
* 通过航班号,查询最新的航班信息
*
**/
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getAircraftDetailsByAlertId/{id}"
)
@GetMapping
(
value
=
"/getAircraftDetailsByAlertId/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id 查询最新的航班信息"
,
notes
=
"根据灾情id 查询最新的航班信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id 查询最新的航班信息"
,
notes
=
"根据灾情id 查询最新的航班信息"
)
...
@@ -216,22 +228,78 @@ public class AircraftController extends BaseController {
...
@@ -216,22 +228,78 @@ public class AircraftController extends BaseController {
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 警情动态表单数据
// 警情动态表单数据
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
String
num
=
null
;
String
num
=
null
;
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
for
(
AlertFormValue
alertFormValue
:
list
)
{
for
(
AlertFormValue
alertFormValue
:
list
)
{
if
(
"flightNumber"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
if
(
"flightNumber"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
num
=
alertFormValue
.
getFieldValue
();
num
=
alertFormValue
.
getFieldValue
();
}
}
}
}
}
}
Map
<
String
,
Object
>
map
=
new
HashedMap
();
Map
<
String
,
Object
>
map
=
new
HashedMap
();
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
findImgByDynamicFlightId
(
num
);
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
findImgByDynamicFlightId
(
num
);
if
(
dataModel
!=
null
)
{
if
(
dataModel
!=
null
)
{
map
=
dataModel
.
getResult
();
map
=
dataModel
.
getResult
();
}
}
return
ResponseHelper
.
buildResponse
(
map
);
return
ResponseHelper
.
buildResponse
(
map
);
}
}
}
/**
*
* 导出航空器信息
*
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/exportData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出航空器信息"
,
notes
=
"导出航空器信息"
)
public
void
exportData
(
HttpServletResponse
response
)
throws
IOException
{
String
fileName
=
"Aircraft"
;
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
addHeader
(
"Content-Disposition"
,
"attachment;filename="
+
fileName
+
".xlsx"
);
String
sheetName
=
"航空器信息"
;
ExcelWriter
writer
=
new
ExcelWriter
(
response
.
getOutputStream
(),
ExcelTypeEnum
.
XLSX
);
Sheet
sheet
=
new
Sheet
(
1
,
0
,
AircraftDtos
.
class
);
List
<
AircraftDto
>
list
=
aircraftServiceImpl
.
queryAircraftDtoForList
(
false
);
sheet
.
setSheetName
(
sheetName
);
writer
.
write
(
list
,
sheet
);
writer
.
finish
();
}
/**
*
* 导入航空器信息
*
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/ImportData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"导入航空器信息"
,
notes
=
"导入航空器信息"
)
public
Boolean
ImportData
(
@RequestPart
MultipartFile
multipartFile
)
{
List
<
Aircraft
>
aircraftList
=
new
ArrayList
<>();
try
{
// list = ExcelUtil.readFirstSheetExcel(multipartFile, AircraftDto.class, 0);
EasyExcel
.
read
(
multipartFile
.
getInputStream
(),
AircraftDto
.
class
,
new
AnalysisEventListener
<
AircraftDto
>()
{
// 每读取一行就调用该方法
@Override
public
void
invoke
(
AircraftDto
data
,
AnalysisContext
context
)
{
Aircraft
aircraft
=
new
Aircraft
();
BeanUtils
.
copyProperties
(
data
,
aircraft
);
aircraftList
.
add
(
aircraft
);
}
// 全部读取完成就调用该方法
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
System
.
out
.
println
(
"读取完成"
);
}
}).
sheet
().
doRead
();
aircraftServiceImpl
.
saveBatch
(
aircraftList
);
return
true
;
}
catch
(
Exception
e
)
{
return
false
;
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
2fbf82de
...
@@ -299,4 +299,17 @@ public class AlertCalledController extends BaseController {
...
@@ -299,4 +299,17 @@ public class AlertCalledController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
controlEquip
());
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
controlEquip
());
}
}
/**
* 警情重新定位
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/reLocate"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"警情重新定位"
,
notes
=
"警情重新定位"
)
public
ResponseModel
<
Boolean
>
reLocateById
(
@RequestParam
String
alertCalled
,
@RequestParam
String
longitude
,
@RequestParam
String
latitude
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
reLocate
(
alertCalled
,
longitude
,
latitude
));
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertLocationLogController.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertLocationLogServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertLocationLogDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
/**
*
*
* @author system_generator
* @date 2021-08-26
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/alert-location-log"
)
public
class
AlertLocationLogController
extends
BaseController
{
@Autowired
AlertLocationLogServiceImpl
alertLocationLogServiceImpl
;
/**
* 新增
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
AlertLocationLogDto
>
save
(
@RequestBody
AlertLocationLogDto
model
)
{
model
=
alertLocationLogServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
AlertLocationLogDto
>
updateBySequenceNbrAlertLocationLog
(
@RequestBody
AlertLocationLogDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
alertLocationLogServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
alertLocationLogServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
AlertLocationLogDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
alertLocationLogServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
AlertLocationLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
AlertLocationLogDto
>
page
=
new
Page
<
AlertLocationLogDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
alertLocationLogServiceImpl
.
queryForAlertLocationLogPage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
AlertLocationLogDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
alertLocationLogServiceImpl
.
queryForAlertLocationLogList
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/RallyPointController.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.RallyPointDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.RallyPoint
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.RallyPointServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
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.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
* 集结点
*
* @author system_generator
* @date 2021-08-25
*/
@RestController
@Api
(
tags
=
"集结点Api"
)
@RequestMapping
(
value
=
"/rally-point"
)
public
class
RallyPointController
extends
BaseController
{
@Autowired
RallyPointServiceImpl
rallyPointServiceImpl
;
/**
* 新增集结点
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增集结点"
,
notes
=
"新增集结点"
)
public
ResponseModel
<
RallyPointDto
>
save
(
@RequestBody
RallyPointDto
model
)
{
model
=
rallyPointServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新集结点"
,
notes
=
"根据sequenceNbr更新集结点"
)
public
ResponseModel
<
RallyPoint
>
updateBySequenceNbrRallyPoint
(
@RequestBody
RallyPointDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
RallyPoint
rallyPoint
=
new
RallyPoint
();
BeanUtils
.
copyProperties
(
model
,
rallyPoint
);
rallyPointServiceImpl
.
saveOrUpdate
(
rallyPoint
);
return
ResponseHelper
.
buildResponse
(
rallyPoint
);
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除集结点"
,
notes
=
"根据sequenceNbr删除集结点"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
rallyPointServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个集结点"
,
notes
=
"根据sequenceNbr查询单个集结点"
)
public
ResponseModel
<
RallyPointDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
rallyPointServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"集结点分页查询"
,
notes
=
"集结点分页查询"
)
public
ResponseModel
<
Page
<
RallyPointDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
RallyPointDto
>
page
=
new
Page
<
RallyPointDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
rallyPointServiceImpl
.
queryForRallyPointPage
(
page
));
}
/**
* 根据警情id查询集结点列表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id查询集结点列表"
,
notes
=
"根据警情id查询集结点列表"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
RallyPointDto
>>
selectForList
(
@RequestParam
String
alertId
)
{
return
ResponseHelper
.
buildResponse
(
rallyPointServiceImpl
.
queryForRallyPointList
(
alertId
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
2fbf82de
...
@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel;
...
@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerData
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerData
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertLocationLog
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Template
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Template
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
...
@@ -86,6 +87,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -86,6 +87,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
private
ControllerServiceImpl
controllerService
;
private
ControllerServiceImpl
controllerService
;
@Autowired
@Autowired
private
ControllerEquipServiceImpl
controllerEquipService
;
private
ControllerEquipServiceImpl
controllerEquipService
;
@Autowired
private
AlertLocationLogServiceImpl
alertLocationLogService
;
@Autowired
@Autowired
private
EmqKeeper
emqKeeper
;
private
EmqKeeper
emqKeeper
;
@Value
(
"${mqtt.topic.command.alert.notice}"
)
@Value
(
"${mqtt.topic.command.alert.notice}"
)
...
@@ -538,4 +543,34 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -538,4 +543,34 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
return
true
;
return
true
;
}
}
/**
* 警情重新定位
*
* @param alertId 警情id
* @param longitude 经度
* @param latitude 纬度
* @return
*/
public
Boolean
reLocate
(
String
alertId
,
String
longitude
,
String
latitude
)
{
try
{
// 更新警情主表
AlertCalled
alertCalled
=
this
.
baseMapper
.
selectById
(
alertId
);
alertCalled
.
setCoordinateX
(
Double
.
valueOf
(
longitude
));
alertCalled
.
setCoordinateY
(
Double
.
valueOf
(
latitude
));
this
.
updateById
(
alertCalled
);
// 插入定位日志表
AlertLocationLog
alertLocationLog
=
new
AlertLocationLog
();
alertLocationLog
.
setAlertId
(
Long
.
valueOf
(
alertId
));
alertLocationLog
.
setLongitude
(
longitude
);
alertLocationLog
.
setLatitude
(
latitude
);
alertLocationLogService
.
save
(
alertLocationLog
);
return
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
toString
());
e
.
printStackTrace
();
throw
new
RuntimeException
(
"警情定位失败!"
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertLocationLogServiceImpl.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertLocationLog
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AlertLocationLogMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertLocationLogService
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertLocationLogDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
/**
* 服务实现类
*
* @author system_generator
* @date 2021-08-26
*/
@Service
public
class
AlertLocationLogServiceImpl
extends
BaseService
<
AlertLocationLogDto
,
AlertLocationLog
,
AlertLocationLogMapper
>
implements
IAlertLocationLogService
{
/**
* 分页查询
*/
public
Page
<
AlertLocationLogDto
>
queryForAlertLocationLogPage
(
Page
<
AlertLocationLogDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
AlertLocationLogDto
>
queryForAlertLocationLogList
()
{
return
this
.
queryForList
(
""
,
false
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
View file @
2fbf82de
...
@@ -9,7 +9,7 @@ import javax.annotation.Resource;
...
@@ -9,7 +9,7 @@ import javax.annotation.Resource;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.
biz.service.impl.LinkageUnitServiceImpl
;
import
com.yeejoin.amos.boot.module.common.
api.service.ILinkageUnitService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -70,7 +70,7 @@ public class DataSourcesImpl implements DataSources {
...
@@ -70,7 +70,7 @@ public class DataSourcesImpl implements DataSources {
private
RestTemplate
restTemplate
;
private
RestTemplate
restTemplate
;
@Autowired
@Autowired
LinkageUnitServiceImpl
linkageUnitServiceImpl
;
ILinkageUnitService
linkageUnitServiceImpl
;
@Value
(
"${security.systemctl.name}"
)
@Value
(
"${security.systemctl.name}"
)
private
String
systemctl
;
private
String
systemctl
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/RallyPointServiceImpl.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.RallyPointDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.RallyPoint
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.RallyPointMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IRallyPointService
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
* 集结点服务实现类
*
* @author system_generator
* @date 2021-08-25
*/
@Service
public
class
RallyPointServiceImpl
extends
BaseService
<
RallyPointDto
,
RallyPoint
,
RallyPointMapper
>
implements
IRallyPointService
{
/**
* 分页查询
*/
public
Page
<
RallyPointDto
>
queryForRallyPointPage
(
Page
<
RallyPointDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
RallyPointDto
>
queryForRallyPointList
(
String
alertId
)
{
return
this
.
queryForList
(
""
,
false
,
alertId
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/pom.xml
View file @
2fbf82de
...
@@ -24,6 +24,10 @@
...
@@ -24,6 +24,10 @@
<groupId>
org.typroject
</groupId>
<groupId>
org.typroject
</groupId>
<artifactId>
tyboot-core-auth
</artifactId>
<artifactId>
tyboot-core-auth
</artifactId>
</exclusion>
</exclusion>
<exclusion>
<artifactId>
fastjson
</artifactId>
<groupId>
com.alibaba
</groupId>
</exclusion>
</exclusions>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
...
@@ -36,12 +40,6 @@
...
@@ -36,12 +40,6 @@
</exclusion>
</exclusion>
</exclusions>
</exclusions>
</dependency>
</dependency>
<!-- 添加fastjson 依赖包. -->
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.15
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.quartz-scheduler
</groupId>
<groupId>
org.quartz-scheduler
</groupId>
<artifactId>
quartz
</artifactId>
<artifactId>
quartz
</artifactId>
...
...
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 @
2fbf82de
...
@@ -3,8 +3,6 @@ package com.yeejoin.amos.maintenance.business.controller;
...
@@ -3,8 +3,6 @@ package com.yeejoin.amos.maintenance.business.controller;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.dto.CheckDto
;
import
com.yeejoin.amos.maintenance.business.dto.CheckDto
;
import
com.yeejoin.amos.maintenance.business.dto.CheckInputDto
;
import
com.yeejoin.amos.maintenance.business.dto.CheckShotDto
;
import
com.yeejoin.amos.maintenance.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckRecordParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckRecordParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckStatisticalParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckStatisticalParam
;
...
@@ -13,6 +11,7 @@ import com.yeejoin.amos.maintenance.business.util.*;
...
@@ -13,6 +11,7 @@ import com.yeejoin.amos.maintenance.business.util.*;
import
com.yeejoin.amos.maintenance.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.maintenance.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.maintenance.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.maintenance.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.maintenance.common.enums.CheckRecordOrderByEnum
;
import
com.yeejoin.amos.maintenance.common.enums.CheckRecordOrderByEnum
;
import
com.yeejoin.amos.maintenance.common.enums.CheckStatusEnum
;
import
com.yeejoin.amos.maintenance.core.async.AsyncTask
;
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.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
...
@@ -80,10 +79,11 @@ public class CheckController extends AbstractBaseController {
...
@@ -80,10 +79,11 @@ public class CheckController extends AbstractBaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PersonIdentify
@ApiOperation
(
value
=
"巡检记录查询"
,
notes
=
"巡检记录查询"
)
@ApiOperation
(
value
=
"巡检记录查询"
,
notes
=
"巡检记录查询"
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
qryCheckInfoPage
(
public
CommonResponse
qryCheckInfoPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"查询条件"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
String
orgCode
=
getOrgCode
(
reginParams
);
...
@@ -307,7 +307,7 @@ public class CheckController extends AbstractBaseController {
...
@@ -307,7 +307,7 @@ public class CheckController extends AbstractBaseController {
@ApiOperation
(
value
=
"维保日历-mobile"
,
notes
=
"维保日历-mobile"
)
@ApiOperation
(
value
=
"维保日历-mobile"
,
notes
=
"维保日历-mobile"
)
@GetMapping
(
value
=
"/{date}/checkCalendar"
,
produces
=
"application/json;charset=UTF-8"
)
@GetMapping
(
value
=
"/{date}/checkCalendar"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
checkCalendar
(
public
CommonResponse
checkCalendar
(
@ApiParam
(
value
=
"date,格式YYYY-MM-DD"
,
required
=
true
)
@PathVariable
String
date
)
{
@ApiParam
(
value
=
"date,格式YYYY-MM-DD"
,
required
=
true
)
@PathVariable
String
date
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
String
loginOrgCode
=
getOrgCode
(
reginParams
);
...
@@ -480,7 +480,7 @@ public class CheckController extends AbstractBaseController {
...
@@ -480,7 +480,7 @@ public class CheckController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
checkService
.
obtainLastCheckRecord
(
relationId
));
return
CommonResponseUtil
.
success
(
checkService
.
obtainLastCheckRecord
(
relationId
));
}
}
@PersonIdentify
(
isNeedIdentity
=
true
)
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保记录分页查询"
,
notes
=
"维保记录分页查询"
)
@ApiOperation
(
value
=
"维保记录分页查询"
,
notes
=
"维保记录分页查询"
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
...
@@ -492,10 +492,10 @@ public class CheckController extends AbstractBaseController {
...
@@ -492,10 +492,10 @@ public class CheckController extends AbstractBaseController {
@ApiParam
(
value
=
"开始时间"
)
@RequestParam
(
value
=
"beginTime"
,
required
=
false
)
String
beginTime
,
@ApiParam
(
value
=
"开始时间"
)
@RequestParam
(
value
=
"beginTime"
,
required
=
false
)
String
beginTime
,
@ApiParam
(
value
=
"结束时间"
)
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@ApiParam
(
value
=
"结束时间"
)
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@ApiParam
(
value
=
"维保人员"
)
@RequestParam
(
value
=
"personId"
,
required
=
false
)
String
person
,
@ApiParam
(
value
=
"维保人员"
)
@RequestParam
(
value
=
"personId"
,
required
=
false
)
String
person
,
@ApiParam
(
value
=
"业主单位"
)
@RequestParam
(
value
=
"
teamId"
,
required
=
false
)
String
team
Id
,
@ApiParam
(
value
=
"业主单位"
)
@RequestParam
(
value
=
"
companyId"
,
required
=
false
)
String
company
Id
,
@ApiParam
(
value
=
"设施Id"
)
@RequestParam
(
value
=
"equipId"
,
required
=
false
)
String
equipId
,
@ApiParam
(
value
=
"设施Id"
)
@RequestParam
(
value
=
"equipId"
,
required
=
false
)
String
equipId
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@ApiParam
(
value
=
"页大小"
)
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
throws
Exception
{
@ApiParam
(
value
=
"页大小"
)
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
throws
Exception
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
String
loginOrgCode
=
getOrgCode
(
reginParams
);
...
@@ -510,7 +510,7 @@ public class CheckController extends AbstractBaseController {
...
@@ -510,7 +510,7 @@ public class CheckController extends AbstractBaseController {
params
.
put
(
"beginTime"
,
beginTime
);
params
.
put
(
"beginTime"
,
beginTime
);
params
.
put
(
"endTime"
,
endTime
);
params
.
put
(
"endTime"
,
endTime
);
params
.
put
(
"person"
,
person
);
params
.
put
(
"person"
,
person
);
params
.
put
(
"
teamId"
,
team
Id
);
params
.
put
(
"
companyId"
,
company
Id
);
params
.
put
(
"equipId"
,
equipId
);
params
.
put
(
"equipId"
,
equipId
);
params
.
put
(
"orgCode"
,
loginOrgCode
);
params
.
put
(
"orgCode"
,
loginOrgCode
);
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
...
@@ -519,9 +519,9 @@ public class CheckController extends AbstractBaseController {
...
@@ -519,9 +519,9 @@ public class CheckController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保记录详情"
,
notes
=
"维保记录详情"
)
@ApiOperation
(
value
=
"维保记录详情"
,
notes
=
"维保记录详情"
)
@GetMapping
(
value
=
"/
detail/{id}
"
)
@GetMapping
(
value
=
"/
{id}/detail
"
)
public
CommonResponse
getCheckDetail
(
public
CommonResponse
getCheckDetail
(
@ApiParam
(
value
=
"记录Id"
)
@PathVariable
(
value
=
"id"
)
String
id
)
throws
Exception
{
@ApiParam
(
value
=
"记录Id"
,
required
=
true
)
@PathVariable
(
value
=
"id"
)
String
id
)
{
return
CommonResponseUtil
.
success
(
checkService
.
getCheckDetail
(
id
));
return
CommonResponseUtil
.
success
(
checkService
.
getCheckDetail
(
id
));
}
}
...
@@ -532,21 +532,28 @@ public class CheckController extends AbstractBaseController {
...
@@ -532,21 +532,28 @@ public class CheckController extends AbstractBaseController {
return
ResponseHelper
.
buildResponse
(
CheckRecordOrderByEnum
.
getEnumList
());
return
ResponseHelper
.
buildResponse
(
CheckRecordOrderByEnum
.
getEnumList
());
}
}
@ApiOperation
(
value
=
"/设备设施维保记录分页列表"
,
notes
=
"外部接口装备和者水源使用"
)
@ApiOperation
(
value
=
"/设备设施维保记录分页列表"
,
notes
=
"外部接口装备和者水源使用"
)
@GetMapping
(
value
=
"page/{originalId}/list"
)
@GetMapping
(
value
=
"page/{originalId}/list"
)
public
ResponseModel
getCheckListByOriginalId
(
public
ResponseModel
getCheckListByOriginalId
(
@PathVariable
String
originalId
,
@PathVariable
String
originalId
,
@RequestParam
(
value
=
"current"
)
int
pageNum
,
@RequestParam
(
value
=
"current"
)
int
pageNum
,
@RequestParam
(
value
=
"size"
)
int
pageSize
@RequestParam
(
value
=
"size"
)
int
pageSize
)
{
)
{
CommonPageable
pageable
=
new
CommonPageable
(
pageNum
,
pageSize
);
CommonPageable
pageable
=
new
CommonPageable
(
pageNum
,
pageSize
);
return
ResponseHelper
.
buildResponse
(
checkService
.
getCheckListByOriginalId
(
originalId
,
pageable
));
return
ResponseHelper
.
buildResponse
(
checkService
.
getCheckListByOriginalId
(
originalId
,
pageable
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"web端维保记录详情"
)
@ApiOperation
(
value
=
"web端维保记录详情"
)
@GetMapping
(
value
=
"input/{checkId}/detail"
)
@GetMapping
(
value
=
"input/{checkId}/detail"
)
public
ResponseModel
inputDetail
(
@ApiParam
(
value
=
"记录主表id"
)
@PathVariable
String
checkId
){
public
ResponseModel
inputDetail
(
@ApiParam
(
value
=
"记录主表id"
)
@PathVariable
String
checkId
)
{
return
ResponseHelper
.
buildResponse
(
checkService
.
getInputDetail
(
checkId
));
return
ResponseHelper
.
buildResponse
(
checkService
.
getInputDetail
(
checkId
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保检查结果下拉列表"
)
@GetMapping
(
value
=
"/isOk-list"
)
public
ResponseModel
statusList
()
{
return
ResponseHelper
.
buildResponse
(
CheckStatusEnum
.
getEnumList
());
}
}
}
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 @
2fbf82de
...
@@ -23,6 +23,7 @@ import org.slf4j.Logger;
...
@@ -23,6 +23,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
@@ -35,6 +36,9 @@ import java.util.HashMap;
...
@@ -35,6 +36,9 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
* @author DELL
*/
@RestController
@RestController
@RequestMapping
(
value
=
"/api/planTask"
)
@RequestMapping
(
value
=
"/api/planTask"
)
@Api
(
tags
=
"计划执行api"
)
@Api
(
tags
=
"计划执行api"
)
...
@@ -155,23 +159,6 @@ public class PlanTaskController extends AbstractBaseController {
...
@@ -155,23 +159,6 @@ public class PlanTaskController extends AbstractBaseController {
}
}
/**
/**
* 定时查询任务状态
*
* @return
*/
@ApiOperation
(
value
=
"定时执行任务表生成"
,
notes
=
"定时执行任务表生成"
)
@RequestMapping
(
value
=
"/queryOmission"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
pushCarData
()
{
try
{
planTaskService
.
taskExecution
(
null
);
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
();
}
}
/**
* 模拟定时任务调起服务
* 模拟定时任务调起服务
*
*
* @return
* @return
...
...
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 @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
controller
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.maintenance.business.dto.PointDto
;
import
com.yeejoin.amos.maintenance.business.dto.PointDto
;
import
com.yeejoin.amos.maintenance.business.param.PointImportParam
;
import
com.yeejoin.amos.maintenance.business.param.PointImportParam
;
import
com.yeejoin.amos.maintenance.business.param.PointImportQueryParam
;
import
com.yeejoin.amos.maintenance.business.param.PointImportQueryParam
;
...
@@ -210,7 +209,6 @@ public class PointController extends AbstractBaseController {
...
@@ -210,7 +209,6 @@ public class PointController extends AbstractBaseController {
Page
<
PointDto
>
pointList
=
iPointService
.
queryPointInfoWithItem
(
criterias
,
commonPageable
,
ownerId
);
Page
<
PointDto
>
pointList
=
iPointService
.
queryPointInfoWithItem
(
criterias
,
commonPageable
,
ownerId
);
return
CommonResponseUtil
.
success
(
pointList
);
return
CommonResponseUtil
.
success
(
pointList
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"查询巡检点信息失败"
);
return
CommonResponseUtil
.
failure
(
"查询巡检点信息失败"
);
}
}
...
@@ -636,10 +634,9 @@ public class PointController extends AbstractBaseController {
...
@@ -636,10 +634,9 @@ public class PointController extends AbstractBaseController {
public
CommonResponse
syncSavePoint
(
public
CommonResponse
syncSavePoint
(
@ApiParam
(
value
=
"同步请求参数"
)
@RequestBody
()
List
<
MaintenanceResourceData
>
list
)
{
@ApiParam
(
value
=
"同步请求参数"
)
@RequestBody
()
List
<
MaintenanceResourceData
>
list
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
AgencyUserModel
model
=
getUserInfo
();
iPointService
.
syncSavePoint
(
list
,
reginParams
);
String
orgCode
=
getOrgCode
(
reginParams
);
iPointService
.
syncSavePoint
(
list
,
orgCode
,
model
.
getUserId
());
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
}
}
}
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 @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
controller
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.maintenance.core.framework.PersonIdentify
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
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.context.RequestContext
;
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.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.param.RoutePageParam
;
import
com.yeejoin.amos.maintenance.business.param.RoutePageParam
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IRouteService
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IRouteService
;
...
@@ -35,14 +9,23 @@ import com.yeejoin.amos.maintenance.business.util.RoutePageParamUtil;
...
@@ -35,14 +9,23 @@ 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.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.common.request.RoutePointInputItemRequest
;
import
com.yeejoin.amos.maintenance.core.common.request.RoutePointInputItemRequest
;
import
com.yeejoin.amos.maintenance.core.framework.PersonIdentify
;
import
com.yeejoin.amos.maintenance.dao.entity.InputItem
;
import
com.yeejoin.amos.maintenance.dao.entity.InputItem
;
import
com.yeejoin.amos.maintenance.dao.entity.Plan
;
import
com.yeejoin.amos.maintenance.dao.entity.Route
;
import
com.yeejoin.amos.maintenance.dao.entity.Route
;
import
com.yeejoin.amos.maintenance.dao.entity.RoutePoint
;
import
com.yeejoin.amos.maintenance.dao.entity.RoutePoint
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
@RestController
@RequestMapping
(
value
=
"/api/route"
)
@RequestMapping
(
value
=
"/api/route"
)
...
@@ -122,39 +105,8 @@ public class RouteController extends AbstractBaseController {
...
@@ -122,39 +105,8 @@ public class RouteController extends AbstractBaseController {
@ApiOperation
(
value
=
"删除巡检路线"
,
notes
=
"删除巡检路线"
)
@ApiOperation
(
value
=
"删除巡检路线"
,
notes
=
"删除巡检路线"
)
@DeleteMapping
(
value
=
"/deleteRoute"
,
produces
=
"application/json;charset=UTF-8"
)
@DeleteMapping
(
value
=
"/deleteRoute"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
deleteRoute
(
@ApiParam
(
value
=
"巡检路线ID"
,
required
=
false
)
@RequestParam
List
<
Long
>
routeIds
)
{
public
CommonResponse
deleteRoute
(
@ApiParam
(
value
=
"巡检路线ID"
,
required
=
false
)
@RequestParam
List
<
Long
>
routeIds
)
{
try
{
routeService
.
delRouteById
(
routeIds
.
toArray
(
new
Long
[
0
]));
//校验1:线路上有点时返回删除失败
return
CommonResponseUtil
.
success
();
Map
<
Long
,
String
>
idNameMap
=
new
HashMap
<>();
for
(
long
id
:
routeIds
)
{
int
routePointCount
=
routeService
.
countRoutePoint
(
id
);
if
(
routePointCount
>
0
)
{
Route
route
=
routeService
.
queryRouteById
(
id
);
idNameMap
.
put
(
id
,
route
.
getName
());
}
}
if
(
idNameMap
.
size
()
>
0
)
{
return
CommonResponseUtil
.
failure
(
idNameMap
,
"删除路线失败:路线上已设置巡检点"
);
}
//校验2:计划在使用,删除失败
idNameMap
.
clear
();
for
(
long
id
:
routeIds
)
{
int
routePointCount
=
routeService
.
countRoutePoint
(
id
);
if
(
routePointCount
>
0
)
{
List
<
Plan
>
planList
=
routeService
.
queryPlanByRouteId
(
id
);
if
(
planList
!=
null
&&
planList
.
size
()
>
0
)
{
idNameMap
.
put
(
id
,
planList
.
get
(
0
).
getName
());
}
}
}
if
(
idNameMap
.
size
()
>
0
)
{
return
CommonResponseUtil
.
failure
(
idNameMap
,
"删除路线失败:计划在使用"
);
}
routeService
.
delRouteById
(
routeIds
.
toArray
(
new
Long
[
0
]));
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"删除巡检路线失败"
);
}
}
}
/**
/**
...
...
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 @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
controller
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
com.yeejoin.amos.maintenance.business.service.intfc.ISynDataService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
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.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.yeejoin.amos.maintenance.business.param.SynInputItemParam
;
import
com.yeejoin.amos.maintenance.business.param.SynPlanParam
;
import
com.yeejoin.amos.maintenance.business.param.SynPointParam
;
import
com.yeejoin.amos.maintenance.business.param.SynRouteParam
;
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
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
@RestController
@RestController
@RequestMapping
(
value
=
"/api/syn"
)
@RequestMapping
(
value
=
"/api/syn"
)
@Api
(
tags
=
"巡检同步接口api"
)
@Api
(
tags
=
"维保同步接口api"
)
@Slf4j
public
class
SynDataController
extends
AbstractBaseController
{
public
class
SynDataController
extends
AbstractBaseController
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
SynDataController
.
class
);
private
static
final
String
saveOperationType
=
"save"
;
private
static
final
String
updateOperationType
=
"update"
;
private
static
final
String
deleteOperationType
=
"delete"
;
@Autowired
@Autowired
private
ISynDataService
iSynDataService
;
private
ISynDataService
iSynDataService
;
...
@@ -48,189 +29,9 @@ public class SynDataController extends AbstractBaseController {
...
@@ -48,189 +29,9 @@ public class SynDataController extends AbstractBaseController {
* 同步巡检项
* 同步巡检项
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检项"
,
notes
=
"同步巡检项"
)
@ApiOperation
(
value
=
"同步删除维保点"
,
notes
=
"同步删除维保点"
)
@PostMapping
(
value
=
"/inputItem/{operationType}"
)
@DeleteMapping
(
value
=
"/{ids}/point"
)
public
CommonResponse
inputItem
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
public
ResponseModel
pointDelete
(
@PathVariable
String
ids
)
{
@ApiParam
(
value
=
"巡检项信息"
,
required
=
true
)
@RequestBody
SynInputItemParam
synInputItemParam
)
{
return
ResponseHelper
.
buildResponse
(
iSynDataService
.
pointDelete
(
ids
));
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
String
userId
=
getUserId
();
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
CommonResponseUtil
.
failure
(
"用户session过期"
);
}
if
(
operationType
.
equals
(
saveOperationType
))
{
return
iSynDataService
.
saveInputItem
(
synInputItemParam
,
userId
,
orgCode
);
}
if
(
operationType
.
equals
(
updateOperationType
))
{
return
iSynDataService
.
updateInputItem
(
synInputItemParam
);
}
if
(
operationType
.
equals
(
deleteOperationType
))
{
return
iSynDataService
.
deleteInputItem
(
synInputItemParam
);
}
return
CommonResponseUtil
.
failure
(
"操作类型有误"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"同步巡检项异常"
,
e
);
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
}
}
/**
* 同步巡检点
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检点"
,
notes
=
"同步巡检点"
)
@PostMapping
(
value
=
"/point/{operationType}"
)
public
CommonResponse
point
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
@ApiParam
(
value
=
"巡检点信息"
,
required
=
true
)
@RequestBody
SynPointParam
synPointParam
)
{
try
{
if
(
operationType
.
equals
(
saveOperationType
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
String
userId
=
getUserId
();
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
CommonResponseUtil
.
failure
(
"用户session过期"
);
}
return
iSynDataService
.
saveSinglePoint
(
synPointParam
,
userId
,
orgCode
);
}
if
(
operationType
.
equals
(
updateOperationType
))
{
return
iSynDataService
.
updateSinglePoint
(
synPointParam
);
}
if
(
operationType
.
equals
(
deleteOperationType
))
{
return
iSynDataService
.
deleteSinglePoint
(
synPointParam
);
}
return
CommonResponseUtil
.
failure
(
"操作类型有误"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"同步巡检点异常"
,
e
);
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
}
}
/**
* 同步巡检点和巡检项关系
*/
@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
,
@ApiParam
(
value
=
"巡检点信息"
,
required
=
true
)
@RequestBody
SynPointParam
synPointParam
)
{
try
{
/* User user = getUserInfo();
if (ObjectUtils.isEmpty(user)) {
return CommonResponseUtil.failure("用户session过期");
}*/
String
userId
=
getUserId
();
if
(
operationType
.
equals
(
saveOperationType
))
{
return
iSynDataService
.
synPointItemRelation
(
synPointParam
,
true
,
userId
);
}
if
(
operationType
.
equals
(
updateOperationType
))
{
return
iSynDataService
.
synPointItemRelation
(
synPointParam
,
false
,
userId
);
}
return
CommonResponseUtil
.
failure
(
"操作类型有误"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"同步巡检点和巡检项关系异常"
,
e
);
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
}
}
/**
* 同步巡检路线
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检路线"
,
notes
=
"同步巡检路线"
)
@PostMapping
(
value
=
"/route/{operationType}"
)
public
CommonResponse
route
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
@ApiParam
(
value
=
"巡检路线信息"
)
@RequestBody
SynRouteParam
synRouteParam
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
String
userId
=
getUserId
();
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
CommonResponseUtil
.
failure
(
"用户session过期"
);
}
// String orgCode = getLoginUserParam().getOrgCode();
if
(
operationType
.
equals
(
saveOperationType
))
{
return
iSynDataService
.
saveRoute
(
synRouteParam
,
userId
,
orgCode
);
}
if
(
operationType
.
equals
(
updateOperationType
))
{
return
iSynDataService
.
updateRoute
(
synRouteParam
,
userId
,
orgCode
);
}
return
CommonResponseUtil
.
failure
(
"操作类型有误"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"同步巡检路线异常"
,
e
);
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
}
}
/**
* 同步巡检计划
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步巡检计划"
,
notes
=
"同步巡检计划"
)
@PostMapping
(
value
=
"/plan/{operationType}"
)
public
CommonResponse
plan
(
@ApiParam
(
value
=
"操作类型(save/update/delete)"
,
required
=
true
)
@PathVariable
String
operationType
,
@ApiParam
(
value
=
"巡检计划信息"
)
@RequestBody
SynPlanParam
synPlanParam
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
String
userId
=
getUserId
();
Toke
toke
=
new
Toke
();
toke
.
setAppKey
(
getAppKey
());
toke
.
setProduct
(
getProduct
());
toke
.
setToke
(
getToken
());
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
CommonResponseUtil
.
failure
(
"用户session过期"
);
}
// String orgCode = getLoginUserParam().getOrgCode();
if
(
operationType
.
equals
(
saveOperationType
))
{
return
iSynDataService
.
savePlan
(
synPlanParam
,
userId
,
orgCode
,
toke
);
}
if
(
operationType
.
equals
(
updateOperationType
))
{
return
iSynDataService
.
updatePlan
(
synPlanParam
,
userId
,
orgCode
);
}
return
CommonResponseUtil
.
failure
(
"操作类型有误"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"同步巡检计划异常"
,
e
);
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
}
}
/**
* 停用巡检计划
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"停用巡检计划"
,
notes
=
"停用巡检计划"
)
@PostMapping
(
value
=
"/stopPlan"
)
public
CommonResponse
stopPlan
(
@ApiParam
(
value
=
"巡检计划信息"
,
required
=
true
)
@RequestParam
String
originalId
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
CommonResponseUtil
.
failure
(
"用户session过期"
);
}
iSynDataService
.
stopPlan
(
originalId
);
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"停用巡检计划异常"
,
e
);
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
}
}
/**
* 获取巡检计划已完成次数
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取巡检计划已完成次数"
,
notes
=
"获取巡检计划已完成次数"
)
@GetMapping
(
value
=
"/plan/getFinishTimes"
)
public
CommonResponse
getPlanFinishTimes
(
@ApiParam
(
value
=
"巡检计划原始编号(多个逗号隔开)"
,
required
=
true
)
@RequestParam
String
originalIds
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
CommonResponseUtil
.
failure
(
"用户session过期"
);
}
return
iSynDataService
.
getPlanFinishTimes
(
originalIds
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"获取巡检计划已完成次数异常"
,
e
);
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
}
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/mapper/CheckMapper.java
View file @
2fbf82de
...
@@ -279,7 +279,7 @@ public interface CheckMapper extends BaseMapper {
...
@@ -279,7 +279,7 @@ public interface CheckMapper extends BaseMapper {
long
getCheckCount
(
HashMap
<
String
,
Object
>
params
);
long
getCheckCount
(
HashMap
<
String
,
Object
>
params
);
List
<
Hash
Map
<
String
,
Object
>>
getChecks
(
HashMap
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
getChecks
(
HashMap
<
String
,
Object
>
params
);
Map
<
String
,
Object
>
getCheckDetail
(
@Param
(
value
=
"id"
)
String
id
);
Map
<
String
,
Object
>
getCheckDetail
(
@Param
(
value
=
"id"
)
String
id
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/entity/mybatis/PlanTaskPointInputItemBo.java
View file @
2fbf82de
...
@@ -35,6 +35,12 @@ public class PlanTaskPointInputItemBo {
...
@@ -35,6 +35,12 @@ public class PlanTaskPointInputItemBo {
* 编号
* 编号
*/
*/
private
String
pointNo
;
private
String
pointNo
;
/**
* 地址
*/
private
String
address
;
/**
/**
* 巡检任务id
* 巡检任务id
...
@@ -47,6 +53,11 @@ public class PlanTaskPointInputItemBo {
...
@@ -47,6 +53,11 @@ public class PlanTaskPointInputItemBo {
private
String
ownerId
;
private
String
ownerId
;
/**
/**
* 业主单位名称
*/
private
String
ownerName
;
/**
* 单位id
* 单位id
*/
*/
private
String
companyId
;
private
String
companyId
;
...
@@ -75,6 +86,12 @@ public class PlanTaskPointInputItemBo {
...
@@ -75,6 +86,12 @@ public class PlanTaskPointInputItemBo {
* 巡检任务详情id
* 巡检任务详情id
*/
*/
private
long
planTaskDetailId
;
private
long
planTaskDetailId
;
/**
* 风险辨识与管控措施
*/
private
String
riskAndManage
;
/**
/**
* 巡检路线
* 巡检路线
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/CheckServiceImpl.java
View file @
2fbf82de
...
@@ -33,10 +33,7 @@ import com.yeejoin.amos.maintenance.business.util.DaoCriteria;
...
@@ -33,10 +33,7 @@ import com.yeejoin.amos.maintenance.business.util.DaoCriteria;
import
com.yeejoin.amos.maintenance.business.util.ToolUtils
;
import
com.yeejoin.amos.maintenance.business.util.ToolUtils
;
import
com.yeejoin.amos.maintenance.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.maintenance.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.maintenance.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.maintenance.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.maintenance.common.enums.CheckStatusEnum
;
import
com.yeejoin.amos.maintenance.common.enums.*
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskFinishStatusEnum
;
import
com.yeejoin.amos.maintenance.common.enums.PointLevelEnum
;
import
com.yeejoin.amos.maintenance.common.enums.PointStatusEnum
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.response.*
;
import
com.yeejoin.amos.maintenance.core.common.response.*
;
import
com.yeejoin.amos.maintenance.core.enums.QueryOperatorEnum
;
import
com.yeejoin.amos.maintenance.core.enums.QueryOperatorEnum
;
...
@@ -115,6 +112,9 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -115,6 +112,9 @@ public class CheckServiceImpl implements ICheckService {
@Value
(
"${file.url}"
)
@Value
(
"${file.url}"
)
private
String
fileUrl
;
private
String
fileUrl
;
@Autowired
IRouteDao
iRouteDao
;
final
String
CHECK_UPDATE_TOPIC
=
"maintenance/date/update"
;
final
String
CHECK_UPDATE_TOPIC
=
"maintenance/date/update"
;
...
@@ -141,6 +141,7 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -141,6 +141,7 @@ public class CheckServiceImpl implements ICheckService {
//1.前置校验
//1.前置校验
this
.
checkCanFinishTask
(
mtUserSeq
,
planTask
,
recordParam
.
getPointId
());
this
.
checkCanFinishTask
(
mtUserSeq
,
planTask
,
recordParam
.
getPointId
());
Point
point
=
iPointService
.
queryPointById
(
recordParam
.
getPointId
());
Point
point
=
iPointService
.
queryPointById
(
recordParam
.
getPointId
());
Route
route
=
iRouteDao
.
findById
(
planTask
.
getRouteId
()).
orElseThrow
(()
->
new
RuntimeException
(
"路线不存在"
));
Check
check
=
new
Check
();
Check
check
=
new
Check
();
if
(
ObjectUtils
.
isEmpty
(
point
)
||
ObjectUtils
.
isEmpty
(
detail
))
{
if
(
ObjectUtils
.
isEmpty
(
point
)
||
ObjectUtils
.
isEmpty
(
detail
))
{
throw
new
Exception
(
"前置校验不通过"
);
throw
new
Exception
(
"前置校验不通过"
);
...
@@ -156,13 +157,18 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -156,13 +157,18 @@ public class CheckServiceImpl implements ICheckService {
check
.
setPointName
(
point
.
getName
());
check
.
setPointName
(
point
.
getName
());
check
.
setPointId
(
point
.
getId
());
check
.
setPointId
(
point
.
getId
());
check
.
setPointNo
(
point
.
getPointNo
());
check
.
setPointNo
(
point
.
getPointNo
());
check
.
setRiskAndManage
(
point
.
getRemark
());
check
.
setRemark
(
recordParam
.
getRemark
());
check
.
setRemark
(
recordParam
.
getRemark
());
check
.
setCheckTime
(
new
Date
());
check
.
setCheckTime
(
new
Date
());
check
.
setBeginTime
(
planTask
.
getBeginTime
());
check
.
setEndTime
(
planTask
.
getEndTime
());
check
.
setUploadTime
(
new
Date
());
check
.
setUploadTime
(
new
Date
());
check
.
setOrgCode
(
recordParam
.
getOrgCode
());
check
.
setOrgCode
(
recordParam
.
getOrgCode
());
check
.
setUserId
(
mtUserSeq
);
check
.
setUserId
(
mtUserSeq
);
check
.
setOwnerId
(
point
.
getOwnerId
());
check
.
setOwnerId
(
route
.
getOwnerId
());
check
.
setOwnerName
(
route
.
getOwnerName
());
check
.
setBuildingName
(
point
.
getBuildingName
());
check
.
setBuildingName
(
point
.
getBuildingName
());
check
.
setAddress
(
point
.
getAddress
());
check
.
setEquipmentName
(
point
.
getEquipmentName
());
check
.
setEquipmentName
(
point
.
getEquipmentName
());
check
.
setPlanType
(
detail
.
get
(
"planType"
).
toString
());
check
.
setPlanType
(
detail
.
get
(
"planType"
).
toString
());
check
.
setUserName
(
personIdentity
.
getPersonName
());
check
.
setUserName
(
personIdentity
.
getPersonName
());
...
@@ -268,8 +274,8 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -268,8 +274,8 @@ public class CheckServiceImpl implements ICheckService {
//7.返回不合格记录
//7.返回不合格记录
return
new
CheckDto
(
check
.
getId
(),
unqualifiedCheckItemList
);
return
new
CheckDto
(
check
.
getId
(),
unqualifiedCheckItemList
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
Exception
(
e
.
getMessage
(),
e
);
throw
new
Exception
(
e
.
getMessage
(),
e
);
}
}
}
}
...
@@ -445,10 +451,10 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -445,10 +451,10 @@ public class CheckServiceImpl implements ICheckService {
@Override
@Override
public
List
<
CheckInputDto
>
getInputDetail
(
String
checkId
)
{
public
List
<
CheckInputDto
>
getInputDetail
(
String
checkId
)
{
List
<
CheckInputDto
>
list
=
this
.
checkMapper
.
queryCheckInputDetail
(
checkId
,
fileUrl
);
List
<
CheckInputDto
>
list
=
this
.
checkMapper
.
queryCheckInputDetail
(
checkId
,
fileUrl
);
list
.
forEach
(
input
->
{
list
.
forEach
(
input
->
{
CheckStatusEnum
statusEnum
=
CheckStatusEnum
.
getEnum
(
input
.
getIsOk
());
CheckStatusEnum
statusEnum
=
CheckStatusEnum
.
getEnum
(
input
.
getIsOk
());
if
(
statusEnum
!=
null
)
{
if
(
statusEnum
!=
null
)
{
input
.
setIsOkDesc
(
statusEnum
.
getName
());
input
.
setIsOkDesc
(
statusEnum
.
getName
());
}
}
});
});
...
@@ -1090,8 +1096,8 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -1090,8 +1096,8 @@ public class CheckServiceImpl implements ICheckService {
}
}
@Override
@Override
public
Page
<
Hash
Map
<
String
,
Object
>>
getCheckPage
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
page
)
{
public
Page
<
Map
<
String
,
Object
>>
getCheckPage
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
page
)
{
List
<
Hash
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
long
total
=
checkMapper
.
getCheckCount
(
params
);
long
total
=
checkMapper
.
getCheckCount
(
params
);
if
(
total
==
0
)
{
if
(
total
==
0
)
{
return
new
PageImpl
<>(
content
,
page
,
total
);
return
new
PageImpl
<>(
content
,
page
,
total
);
...
@@ -1100,7 +1106,7 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -1100,7 +1106,7 @@ public class CheckServiceImpl implements ICheckService {
params
.
put
(
"pageSize"
,
page
.
getPageSize
());
params
.
put
(
"pageSize"
,
page
.
getPageSize
());
content
=
checkMapper
.
getChecks
(
params
);
content
=
checkMapper
.
getChecks
(
params
);
if
(
0
<
content
.
size
())
{
if
(
0
<
content
.
size
())
{
for
(
Hash
Map
<
String
,
Object
>
map
:
content
)
{
for
(
Map
<
String
,
Object
>
map
:
content
)
{
if
(
map
.
containsKey
(
"isOk"
))
{
if
(
map
.
containsKey
(
"isOk"
))
{
map
.
put
(
"status"
,
CheckStatusEnum
.
getEnum
(
String
.
valueOf
(
map
.
get
(
"isOk"
))).
getName
());
map
.
put
(
"status"
,
CheckStatusEnum
.
getEnum
(
String
.
valueOf
(
map
.
get
(
"isOk"
))).
getName
());
}
}
...
@@ -1110,15 +1116,23 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -1110,15 +1116,23 @@ public class CheckServiceImpl implements ICheckService {
}
}
@Override
@Override
public
Map
<
String
,
Object
>
getCheckDetail
(
String
id
)
{
public
Map
<
String
,
Object
>
getCheckDetail
(
String
checkId
)
{
Map
<
String
,
Object
>
map
=
checkMapper
.
getCheckDetail
(
id
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
if
(
map
.
containsKey
(
"isOk"
))
{
result
.
put
(
"facility"
,
this
.
buildCheckMainInfo
(
checkId
));
map
.
put
(
"status"
,
CheckStatusEnum
.
getEnum
(
String
.
valueOf
(
map
.
get
(
"isOk"
))).
getName
());
result
.
put
(
"itemList"
,
this
.
getInputDetail
(
checkId
));
return
result
;
}
private
Map
<
String
,
Object
>
buildCheckMainInfo
(
String
checkId
)
{
Map
<
String
,
Object
>
facility
=
checkMapper
.
getCheckDetail
(
checkId
);
if
(
facility
.
containsKey
(
"isOk"
))
{
facility
.
put
(
"isOkDesc"
,
CheckStatusEnum
.
getEnum
(
String
.
valueOf
(
facility
.
get
(
"isOk"
))).
getName
());
}
}
if
(
map
.
containsKey
(
"picture"
))
{
if
(
facility
.
containsKey
(
"planType"
))
{
map
.
put
(
"picture"
,
fileUrl
+
map
.
get
(
"picture"
));
PlanTypeEnum
planType
=
PlanTypeEnum
.
getEnumByCode
(
String
.
valueOf
(
facility
.
get
(
"planType"
)));
facility
.
put
(
"planTypeDesc"
,
planType
!=
null
?
planType
.
getName
()
:
"其他"
);
}
}
return
map
;
return
facility
;
}
}
@Override
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/PlanTaskServiceImpl.java
View file @
2fbf82de
...
@@ -8,10 +8,8 @@ import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskDetailMapper;
...
@@ -8,10 +8,8 @@ import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskDetailMapper;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.maintenance.business.dao.repository.*
;
import
com.yeejoin.amos.maintenance.business.dao.repository.*
;
import
com.yeejoin.amos.maintenance.business.entity.mybatis.CheckChkExListBo
;
import
com.yeejoin.amos.maintenance.business.entity.mybatis.CheckChkExListBo
;
import
com.yeejoin.amos.maintenance.business.feign.EquipFeignClient
;
import
com.yeejoin.amos.maintenance.business.param.CheckPtListPageParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckPtListPageParam
;
import
com.yeejoin.amos.maintenance.business.param.PlanTaskPageParam
;
import
com.yeejoin.amos.maintenance.business.param.PlanTaskPageParam
;
import
com.yeejoin.amos.maintenance.business.service.intfc.ICheckService
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.maintenance.business.util.PlanTaskUtil
;
import
com.yeejoin.amos.maintenance.business.util.PlanTaskUtil
;
import
com.yeejoin.amos.maintenance.business.vo.CalDateVo
;
import
com.yeejoin.amos.maintenance.business.vo.CalDateVo
;
...
@@ -57,29 +55,17 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -57,29 +55,17 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Autowired
@Autowired
IPlanDao
iplanDao
;
IPlanDao
iplanDao
;
@Autowired
@Autowired
private
ICheckDao
checkDao
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
private
RemoteSecurityService
remoteSecurityService
;
@Autowired
@Autowired
private
IPlanTaskDetailDao
planTaskDetail
;
private
IPlanTaskDetailDao
planTaskDetail
;
@Autowired
@Autowired
IRoutePointDao
iRoutePointDao
;
IRoutePointDao
iRoutePointDao
;
@Autowired
@Autowired
IJobService
jobService
;
IJobService
jobService
;
@Autowired
private
ICheckService
checkService
;
@Autowired
private
EquipFeignClient
equipFeign
;
@Autowired
@Autowired
IPointDao
iPointDao
;
IPointDao
iPointDao
;
@Autowired
@Autowired
IPlanTaskDetailDao
iPlanTaskDetailDao
;
IPlanTaskDetailDao
iPlanTaskDetailDao
;
@Autowired
@Autowired
InputItemMapper
inputItemMapper
;
InputItemMapper
inputItemMapper
;
...
@@ -301,10 +287,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -301,10 +287,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
//2.4.删除今天可能重做生成的数据(计划重做后进行了计划的编辑)
//2.4.删除今天可能重做生成的数据(计划重做后进行了计划的编辑)
if
(
iplanTaskDao
.
findById
(
plan
.
getPlanTaskId
())
!=
null
&&
plan
.
getFirstFlag
()
==
XJConstant
.
PLAN_FIRST_STATUS_YES
)
if
(
iplanTaskDao
.
findById
(
plan
.
getPlanTaskId
())
.
isPresent
()
&&
plan
.
getFirstFlag
()
==
XJConstant
.
PLAN_FIRST_STATUS_YES
)
{
if
(
iplanTaskDao
.
existsById
(
plan
.
getPlanTaskId
()))
{
if
(
iplanTaskDao
.
existsById
(
plan
.
getPlanTaskId
()))
{
iplanTaskDao
.
deleteById
(
plan
.
getPlanTaskId
());
iplanTaskDao
.
deleteById
(
plan
.
getPlanTaskId
());
}
}
}
//2.5.插入planTask及planTaskDetail
//2.5.插入planTask及planTaskDetail
insertPlanTaskAndDet
(
list
,
plan
,
XJConstant
.
SCHED_FLAG
,
now
);
insertPlanTaskAndDet
(
list
,
plan
,
XJConstant
.
SCHED_FLAG
,
now
);
...
@@ -515,12 +502,12 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -515,12 +502,12 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
Map
<
String
,
Object
>
param
)
{
public
List
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
Map
<
String
,
Object
>
param
)
{
List
<
Map
<
String
,
Object
>>
result
=
planTaskMapper
.
getPlanTaskPoints
(
param
);
List
<
Map
<
String
,
Object
>>
result
=
planTaskMapper
.
getPlanTaskPoints
(
param
);
result
.
forEach
(
r
->
{
result
.
forEach
(
r
->
{
if
(
r
.
containsKey
(
"isFinish"
))
{
if
(
r
.
containsKey
(
"isFinish"
))
{
String
isFinishDesc
=
PlanTaskDetailIsFinishEnum
.
getName
(
Integer
.
parseInt
(
r
.
get
(
"isFinish"
).
toString
()));
String
isFinishDesc
=
PlanTaskDetailIsFinishEnum
.
getName
(
Integer
.
parseInt
(
r
.
get
(
"isFinish"
).
toString
()));
r
.
put
(
"isFinishDesc"
,
isFinishDesc
);
r
.
put
(
"isFinishDesc"
,
isFinishDesc
);
}
}
});
});
return
result
;
return
result
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/PointServiceImpl.java
View file @
2fbf82de
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.InputItemMapper
;
...
@@ -35,11 +36,11 @@ import org.springframework.data.domain.*;
...
@@ -35,11 +36,11 @@ import org.springframework.data.domain.*;
import
org.springframework.data.domain.Sort.Direction
;
import
org.springframework.data.domain.Sort.Direction
;
import
org.springframework.data.domain.Sort.Order
;
import
org.springframework.data.domain.Sort.Order
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -273,7 +274,7 @@ public class PointServiceImpl implements IPointService {
...
@@ -273,7 +274,7 @@ public class PointServiceImpl implements IPointService {
public
Point
updatePoint
(
PointParam
pointParam
)
{
public
Point
updatePoint
(
PointParam
pointParam
)
{
//1.更新点
//1.更新点
long
pointId
=
pointParam
.
getPoint
().
getId
();
long
pointId
=
pointParam
.
getPoint
().
getId
();
Point
newPoint
=
iPointDao
.
findById
(
pointId
).
orElseThrow
(()
->
new
RuntimeException
(
"找不到原始数据"
));
Point
newPoint
=
iPointDao
.
findById
(
pointId
).
orElseThrow
(()
->
new
RuntimeException
(
"找不到原始数据"
));
Bean
.
copyExistPropertis
(
pointParam
.
getPoint
(),
newPoint
);
Bean
.
copyExistPropertis
(
pointParam
.
getPoint
(),
newPoint
);
newPoint
.
setLastUpdateTime
(
new
Date
());
newPoint
.
setLastUpdateTime
(
new
Date
());
iPointDao
.
save
(
newPoint
);
iPointDao
.
save
(
newPoint
);
...
@@ -1087,25 +1088,10 @@ public class PointServiceImpl implements IPointService {
...
@@ -1087,25 +1088,10 @@ public class PointServiceImpl implements IPointService {
@Override
@Override
@Async
public
void
syncSavePoint
(
List
<
MaintenanceResourceData
>
list
,
ReginParams
reginParams
)
{
public
void
syncSavePoint
(
List
<
MaintenanceResourceData
>
list
,
String
orgCode
,
String
userId
)
{
List
<
Point
>
points
=
new
ArrayList
<>();
List
<
Point
>
points
=
new
ArrayList
<>();
List
<
PointInputItem
>
inputItems
=
new
ArrayList
<>();
List
<
PointInputItem
>
inputItems
=
new
ArrayList
<>();
List
<
Long
>
ids
=
new
ArrayList
<>();
//1.创建
//1.删除已有数据
for
(
MaintenanceResourceData
x
:
list
)
{
String
pointNo
=
x
.
getFireFacilityCode
();
String
originalId
=
String
.
valueOf
(
x
.
getFireFacilityId
());
Long
id
=
iPointDao
.
findPointByEquipmentIdAndFireFacilityId
(
pointNo
,
originalId
);
if
(
null
!=
id
)
{
ids
.
add
(
id
);
}
}
if
(!
ids
.
isEmpty
())
{
Long
[]
idsArray
=
ids
.
toArray
(
new
Long
[
0
]);
delPointById
(
idsArray
);
}
//2.创建
for
(
MaintenanceResourceData
x
:
list
)
{
for
(
MaintenanceResourceData
x
:
list
)
{
Point
point
=
new
Point
();
Point
point
=
new
Point
();
String
pointNo
=
StringUtil
.
isNotEmpty
(
x
.
getFireFacilityCode
())
?
x
.
getFireFacilityCode
()
:
String
.
valueOf
(
sequence
.
nextId
());
String
pointNo
=
StringUtil
.
isNotEmpty
(
x
.
getFireFacilityCode
())
?
x
.
getFireFacilityCode
()
:
String
.
valueOf
(
sequence
.
nextId
());
...
@@ -1123,11 +1109,14 @@ public class PointServiceImpl implements IPointService {
...
@@ -1123,11 +1109,14 @@ public class PointServiceImpl implements IPointService {
point
.
setBuildingName
(
x
.
getBuildingName
());
point
.
setBuildingName
(
x
.
getBuildingName
());
point
.
setAddress
(
x
.
getArea
());
point
.
setAddress
(
x
.
getArea
());
point
.
setLevel
(
""
);
point
.
setLevel
(
""
);
point
.
setCreatorId
(
userId
);
point
.
setCreatorId
(
RequestContext
.
getExeUserId
());
point
.
setOrgCode
(
orgCode
);
//TODO BUG orgCode 取值 没值来源
point
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
point
.
setCompanyId
(
String
.
valueOf
(
x
.
getMaintenanceCompanyId
()));
point
.
setCompanyName
(
x
.
getMaintenanceCompanyName
());
points
.
add
(
point
);
points
.
add
(
point
);
iPointDao
.
save
(
point
);
iPointDao
.
save
(
point
);
List
<
InputItem
>
inputItemVos
=
inputItemMapper
.
getInputItemByEquipmentName
(
x
.
getClassifyName
(),
orgCode
);
List
<
InputItem
>
inputItemVos
=
inputItemMapper
.
getInputItemByEquipmentName
(
x
.
getClassifyName
(),
null
);
if
(
0
<
inputItemVos
.
size
())
{
if
(
0
<
inputItemVos
.
size
())
{
inputItemVos
.
forEach
(
y
->
{
inputItemVos
.
forEach
(
y
->
{
PointInputItem
inputItem
=
new
PointInputItem
();
PointInputItem
inputItem
=
new
PointInputItem
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/RouteServiceImpl.java
View file @
2fbf82de
...
@@ -76,30 +76,37 @@ public class RouteServiceImpl implements IRouteService {
...
@@ -76,30 +76,37 @@ public class RouteServiceImpl implements IRouteService {
@Override
@Override
@Transactional
@Transactional
public
Route
addRoute
(
Route
route
)
{
public
Route
addRoute
(
Route
route
)
{
String
creatorId
=
route
.
getCreatorId
();
String
creatorId
=
route
.
getCreatorId
();
String
orgCode
=
route
.
getOrgCode
();
String
orgCode
=
route
.
getOrgCode
();
//1.保存主表
route
=
iRouteDao
.
saveAndFlush
(
route
);
route
=
iRouteDao
.
saveAndFlush
(
route
);
Long
rId
=
route
.
getId
();
Long
rId
=
route
.
getId
();
List
<
RoutePoint
>
routePoints
=
route
.
getRoutePointList
();
List
<
RoutePoint
>
routePoints
=
route
.
getRoutePointList
();
//2.保存子表
routePoints
.
forEach
(
rp
->
{
routePoints
.
forEach
(
rp
->
{
rp
.
setOrgCode
(
orgCode
);
rp
.
setOrgCode
(
orgCode
);
rp
.
setRouteId
(
rId
);
rp
.
setRouteId
(
rId
);
rp
.
setCreatorId
(
creatorId
);
rp
.
setCreatorId
(
creatorId
);
List
<
RoutePointItem
>
routePointItems
=
rp
.
getRoutePointItem
();
List
<
RoutePointItem
>
routePointItems
=
rp
.
getRoutePointItem
();
//2.1保存点路线关系表
rp
=
iRoutePointDao
.
saveAndFlush
(
rp
);
rp
=
iRoutePointDao
.
saveAndFlush
(
rp
);
Long
rpId
=
rp
.
getId
();
Long
rpId
=
rp
.
getId
();
routePointItems
=
routePointItems
.
stream
().
filter
(
RoutePointItem:
:
getIsBound
).
collect
(
Collectors
.
toList
());
routePointItems
.
forEach
(
rpi
->
{
routePointItems
.
forEach
(
rpi
->
{
rpi
.
setRoutePointId
(
rpId
);
rpi
.
setRoutePointId
(
rpId
);
rpi
.
setCreatorId
(
creatorId
);
rpi
.
setCreatorId
(
creatorId
);
iRoutePointItemDao
.
saveAndFlush
(
rpi
);
});
});
//2.2保存点项关系表
if
(!
routePointItems
.
isEmpty
())
{
iRoutePointItemDao
.
saveAll
(
routePointItems
);
}
});
});
return
route
;
return
route
;
}
}
@Override
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
delRouteById
(
Long
[]
ids
)
{
public
void
delRouteById
(
Long
[]
ids
)
{
//0.删除路线
//0.删除路线
iRouteDao
.
delRouteById
(
Arrays
.
asList
(
ids
));
iRouteDao
.
delRouteById
(
Arrays
.
asList
(
ids
));
...
@@ -126,7 +133,7 @@ public class RouteServiceImpl implements IRouteService {
...
@@ -126,7 +133,7 @@ public class RouteServiceImpl implements IRouteService {
iRoutePointItemDao
.
delRoutePointItem
(
rp
.
getId
());
iRoutePointItemDao
.
delRoutePointItem
(
rp
.
getId
());
iRoutePointDao
.
deleteById
(
rp
.
getId
());
iRoutePointDao
.
deleteById
(
rp
.
getId
());
//删除p_plan_task_detail 对应点、更新p_plan_task点数量、完成数量
//删除p_plan_task_detail 对应点、更新p_plan_task点数量、完成数量
this
.
updatePlanTask
(
rp
.
getPointId
(),
finalRoute
.
getId
());
this
.
updatePlanTask
(
rp
.
getPointId
(),
finalRoute
.
getId
());
}
else
{
}
else
{
List
<
RoutePointItem
>
routePointItems
=
rp
.
getRoutePointItem
();
List
<
RoutePointItem
>
routePointItems
=
rp
.
getRoutePointItem
();
iRoutePointDao
.
saveAndFlush
(
rp
);
iRoutePointDao
.
saveAndFlush
(
rp
);
...
@@ -156,9 +163,15 @@ public class RouteServiceImpl implements IRouteService {
...
@@ -156,9 +163,15 @@ public class RouteServiceImpl implements IRouteService {
}
}
private
void
updatePlanTask
(
long
pointId
,
long
routeId
)
{
private
void
updatePlanTask
(
long
pointId
,
long
routeId
)
{
//1.查询指定路线的任务
List
<
PlanTask
>
planTaskList
=
planTaskDao
.
findByRouteId
(
routeId
);
List
<
PlanTask
>
planTaskList
=
planTaskDao
.
findByRouteId
(
routeId
);
Map
<
Long
,
PlanTask
>
planTaskMap
=
planTaskList
.
stream
().
collect
(
Collectors
.
toMap
(
BasicEntity:
:
getId
,
Function
.
identity
()));
//2.查询指定的点
List
<
PlanTaskDetail
>
planTaskDetailList
=
iPlanTaskDetailDao
.
findByPointId
(
pointId
);
List
<
PlanTaskDetail
>
planTaskDetailList
=
iPlanTaskDetailDao
.
findByPointId
(
pointId
);
Map
<
Long
,
PlanTask
>
planTaskMap
=
planTaskList
.
stream
().
collect
(
Collectors
.
toMap
(
BasicEntity:
:
getId
,
Function
.
identity
()));
//3.过滤指定父任务id的执行数据
planTaskDetailList
=
planTaskDetailList
.
stream
().
filter
(
e
->
planTaskList
.
stream
().
map
(
BasicEntity:
:
getId
).
collect
(
Collectors
.
toList
()).
contains
(
e
.
getTaskNo
())).
collect
(
Collectors
.
toList
());
//4.更新任务主表点的数量及完成数量
for
(
PlanTaskDetail
planTaskDetail
:
planTaskDetailList
)
{
for
(
PlanTaskDetail
planTaskDetail
:
planTaskDetailList
)
{
PlanTask
planTask
=
planTaskMap
.
get
(
planTaskDetail
.
getTaskNo
());
PlanTask
planTask
=
planTaskMap
.
get
(
planTaskDetail
.
getTaskNo
());
if
(
1
==
planTaskDetail
.
getIsFinish
())
{
if
(
1
==
planTaskDetail
.
getIsFinish
())
{
...
@@ -168,9 +181,9 @@ public class RouteServiceImpl implements IRouteService {
...
@@ -168,9 +181,9 @@ public class RouteServiceImpl implements IRouteService {
planTask
.
setPointNum
(
planTask
.
getPointNum
()
-
1
);
planTask
.
setPointNum
(
planTask
.
getPointNum
()
-
1
);
}
}
}
}
//更新主表完成数量,点数量
//
5.
更新主表完成数量,点数量
planTaskDao
.
saveAll
(
planTaskList
);
planTaskDao
.
saveAll
(
planTaskList
);
//删除路线下的维保点
//
6.
删除路线下的维保点
planTaskDetailMapper
.
deleteByPointIdAndRouteId
(
pointId
,
routeId
);
planTaskDetailMapper
.
deleteByPointIdAndRouteId
(
pointId
,
routeId
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/SynDataServiceImpl.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IPointDao
;
import
com.alibaba.fastjson.JSONArray
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IPointService
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.maintenance.business.dao.repository.*
;
import
com.yeejoin.amos.maintenance.business.param.*
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.maintenance.business.service.intfc.ISynDataService
;
import
com.yeejoin.amos.maintenance.business.service.intfc.ISynDataService
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.dao.entity.BasicEntity
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.maintenance.dao.entity.Point
;
import
com.yeejoin.amos.maintenance.business.util.Toke
;
import
com.yeejoin.amos.maintenance.core.util.DateUtil
;
import
com.yeejoin.amos.maintenance.dao.entity.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
java.
math.BigInteger
;
import
java.
util.Arrays
;
import
java.util.
*
;
import
java.util.
List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Service
(
"synDataService"
)
/**
* @author DELL
*/
@Service
public
class
SynDataServiceImpl
implements
ISynDataService
{
public
class
SynDataServiceImpl
implements
ISynDataService
{
@Autowired
@Autowired
private
IInputItemDao
iInputItemDao
;
IPointService
iPointService
;
@Autowired
private
IPointDao
iPointDao
;
@Autowired
private
IPointInputItemDao
iPointInputItemDao
;
@Autowired
private
IRouteDao
iRouteDao
;
@Autowired
private
IRoutePointDao
iRoutePointDao
;
@Autowired
@Autowired
private
IRoutePointItemDao
iRoutePointItemDao
;
IPointDao
iPointDao
;
@Autowired
private
IPlanDao
iPlanDao
;
@Autowired
private
IPlanTaskDao
iplanTaskDao
;
@Autowired
private
PlanTaskMapper
planTaskMapper
;
@Autowired
private
IPointClassifyDao
iPointClassifyDao
;
@Autowired
private
IPlanTaskService
iPlanTaskService
;
private
static
final
String
YYMMMMDD
=
"yyyy-MM-dd"
;
@Override
public
CommonResponse
saveInputItem
(
SynInputItemParam
synInputItemParam
,
String
userId
,
String
orgCode
)
{
InputItem
inputItem
=
iInputItemDao
.
findByOriginalId
(
synInputItemParam
.
getOriginalId
());
if
(
inputItem
==
null
)
{
if
(
StringUtils
.
isEmpty
(
synInputItemParam
.
getItemType
()))
{
return
CommonResponseUtil
.
failure
(
"请选择类型"
);
}
inputItem
=
buildSaveItemByType
(
synInputItemParam
,
userId
,
orgCode
);
iInputItemDao
.
save
(
inputItem
);
}
return
CommonResponseUtil
.
success
();
}
@Override
public
CommonResponse
updateInputItem
(
SynInputItemParam
synInputItemParam
)
{
InputItem
inputItem
=
iInputItemDao
.
findByOriginalId
(
synInputItemParam
.
getOriginalId
());
if
(
inputItem
!=
null
)
{
inputItem
.
setName
(
synInputItemParam
.
getItemName
());
inputItem
.
setBasisJson
(
JSON
.
toJSONString
(
synInputItemParam
.
getBasisJson
()));
iInputItemDao
.
save
(
inputItem
);
}
return
CommonResponseUtil
.
success
();
}
@Override
public
CommonResponse
deleteInputItem
(
SynInputItemParam
synInputItemParam
)
{
InputItem
inputItem
=
iInputItemDao
.
findByOriginalId
(
synInputItemParam
.
getOriginalId
());
if
(
inputItem
!=
null
)
{
inputItem
.
setIsDelete
(
true
);
iInputItemDao
.
save
(
inputItem
);
}
return
CommonResponseUtil
.
success
();
}
@Override
public
CommonResponse
saveSinglePoint
(
SynPointParam
synPointParam
,
String
userId
,
String
orgCode
)
{
Point
point
=
iPointDao
.
findByOriginalId
(
synPointParam
.
getOriginalId
());
if
(
point
==
null
)
{
point
=
buildSavePoint
(
synPointParam
,
userId
,
orgCode
);
iPointDao
.
save
(
point
);
}
return
CommonResponseUtil
.
success
();
}
@Override
public
CommonResponse
updateSinglePoint
(
SynPointParam
synPointParam
)
{
Point
point
=
iPointDao
.
findByOriginalId
(
synPointParam
.
getOriginalId
());
if
(
point
!=
null
)
{
point
.
setName
(
synPointParam
.
getPointName
());
point
.
setCoordinates
(
synPointParam
.
getCoordinates
());
point
.
setChargeDeptId
(
synPointParam
.
getChargeDeptId
());
point
.
setChargePersonId
(
synPointParam
.
getChargePersonId
());
point
.
setLastUpdateTime
(
new
Date
());
iPointDao
.
save
(
point
);
}
return
CommonResponseUtil
.
success
();
}
@Override
public
CommonResponse
deleteSinglePoint
(
SynPointParam
synPointParam
)
{
Point
point
=
iPointDao
.
findByOriginalId
(
synPointParam
.
getOriginalId
());
if
(
point
!=
null
)
{
point
.
setIsDelete
(
true
);
iPointDao
.
save
(
point
);
}
return
CommonResponseUtil
.
success
();
}
@Transactional
@Override
public
CommonResponse
synPointItemRelation
(
SynPointParam
synPointParam
,
Boolean
isSave
,
String
userId
)
{
Point
point
=
iPointDao
.
findByOriginalId
(
synPointParam
.
getOriginalId
());
if
(
point
!=
null
)
{
point
.
setLevel
(
synPointParam
.
getLevel
());
point
.
setLastUpdateTime
(
new
Date
());
iPointDao
.
save
(
point
);
long
pointId
=
point
.
getId
();
List
<
SynItemInfoParam
>
itemInfoList
=
synPointParam
.
getItemInfo
();
if
(!
CollectionUtils
.
isEmpty
(
itemInfoList
))
{
if
(!
isSave
)
{
List
<
Long
>
pointIds
=
Lists
.
newArrayList
(
pointId
);
iPointClassifyDao
.
deleteByPointId
(
pointIds
);
iPointInputItemDao
.
deleteByPointId
(
pointIds
);
}
Map
<
String
,
PointClassify
>
pointClassifyMap
=
Maps
.
newHashMap
();
//保存分类
List
<
SynClassifyInfoParam
>
classifyInfoParamList
=
synPointParam
.
getClassifyInfo
();
if
(!
CollectionUtils
.
isEmpty
(
classifyInfoParamList
))
{
List
<
PointClassify
>
pointClassifyList
=
Lists
.
newArrayList
();
int
classfyOrderNo
=
0
;
for
(
SynClassifyInfoParam
synClassifyInfoParam
:
classifyInfoParamList
)
{
PointClassify
pointClassify
=
new
PointClassify
();
pointClassify
.
setPointId
(
pointId
);
pointClassify
.
setName
(
synClassifyInfoParam
.
getName
());
pointClassify
.
setOrderNo
(
classfyOrderNo
);
pointClassify
.
setCreatorId
(
userId
);
pointClassify
.
setOriginalId
(
synClassifyInfoParam
.
getClassifyOriginalId
());
pointClassifyList
.
add
(
pointClassify
);
classfyOrderNo
++;
}
iPointClassifyDao
.
saveAll
(
pointClassifyList
);
pointClassifyMap
=
Maps
.
uniqueIndex
(
pointClassifyList
,
PointClassify:
:
getOriginalId
);
}
//保存点和项的关系
List
<
InputItem
>
inputItemList
=
iInputItemDao
.
listByOriginalIds
(
Lists
.
transform
(
itemInfoList
,
SynItemInfoParam:
:
getItemOriginalId
));
Map
<
String
,
InputItem
>
inputItemVoMap
=
Maps
.
uniqueIndex
(
inputItemList
,
InputItem:
:
getOriginalId
);
List
<
PointInputItem
>
pointInputItemList
=
Lists
.
newArrayList
();
int
orderNo
=
0
;
for
(
SynItemInfoParam
itemInfo
:
itemInfoList
)
{
List
<
String
>
classifyOriginalIds
=
itemInfo
.
getClassifyOriginalIds
();
String
classifyIds
=
""
;
if
(!
CollectionUtils
.
isEmpty
(
classifyOriginalIds
))
{
StringBuilder
classifyIdsBuilder
=
new
StringBuilder
();
for
(
String
classifyOriginalId
:
classifyOriginalIds
)
{
PointClassify
classify
=
pointClassifyMap
.
get
(
classifyOriginalId
);
if
(
classify
!=
null
)
{
classifyIdsBuilder
.
append
(
classify
.
getId
()).
append
(
","
);
}
}
classifyIds
=
classifyIdsBuilder
.
substring
(
0
,
classifyIdsBuilder
.
length
()
-
1
);
}
PointInputItem
pointInputItem
=
new
PointInputItem
();
pointInputItem
.
setOrderNo
(
orderNo
);
pointInputItem
.
setPointId
(
pointId
);
pointInputItem
.
setInputItemId
(
inputItemVoMap
.
get
(
itemInfo
.
getItemOriginalId
()).
getId
());
pointInputItem
.
setClassifyIds
(
classifyIds
);
pointInputItemList
.
add
(
pointInputItem
);
orderNo
++;
}
iPointInputItemDao
.
saveAll
(
pointInputItemList
);
}
}
return
CommonResponseUtil
.
success
();
}
@Transactional
@Override
public
CommonResponse
saveRoute
(
SynRouteParam
synRouteParam
,
String
userId
,
String
orgCode
)
{
String
routeOriginalId
=
synRouteParam
.
getOriginalId
();
Route
route
=
iRouteDao
.
findByOriginalId
(
routeOriginalId
);
if
(
route
==
null
)
{
route
=
buildSaveRoute
(
synRouteParam
,
orgCode
,
userId
);
iRouteDao
.
save
(
route
);
long
routeId
=
route
.
getId
();
List
<
SynRouteInfoParam
>
routeInfoList
=
synRouteParam
.
getRouteInfo
();
synRouteRelation
(
routeInfoList
,
routeId
,
true
,
userId
,
orgCode
);
}
return
CommonResponseUtil
.
success
();
}
@Transactional
@Override
public
CommonResponse
updateRoute
(
SynRouteParam
synRouteParam
,
String
userId
,
String
orgCode
)
{
String
routeOriginalId
=
synRouteParam
.
getOriginalId
();
Route
route
=
iRouteDao
.
findByOriginalId
(
routeOriginalId
);
if
(
route
!=
null
)
{
route
.
setBoss
(
synRouteParam
.
getBoss
());
route
.
setName
(
synRouteParam
.
getRouteName
());
iRouteDao
.
save
(
route
);
long
routeId
=
route
.
getId
();
List
<
SynRouteInfoParam
>
routeInfoList
=
synRouteParam
.
getRouteInfo
();
synRouteRelation
(
routeInfoList
,
routeId
,
false
,
userId
,
orgCode
);
}
return
CommonResponseUtil
.
success
();
}
@Override
@Override
public
CommonResponse
savePlan
(
SynPlanParam
synPlanParam
,
String
userId
,
String
orgCode
,
Toke
toke
)
{
public
List
<
Long
>
pointDelete
(
String
ids
)
{
Plan
plan
=
iPlanDao
.
findByOriginalId
(
synPlanParam
.
getOriginalId
());
List
<
String
>
idList
=
Arrays
.
stream
(
ids
.
split
(
","
)).
collect
(
Collectors
.
toList
());
Route
route
=
iRouteDao
.
findByOriginalId
(
synPlanParam
.
getOriginalId
());
List
<
Point
>
points
=
iPointDao
.
listByOriginalIds
(
idList
);
if
(
plan
==
null
&&
route
!=
null
)
{
List
<
Long
>
pointIds
=
points
.
stream
().
map
(
BasicEntity:
:
getId
).
collect
(
Collectors
.
toList
());
boolean
tag
=
savePlanAndRedo
(
route
,
synPlanParam
,
userId
,
orgCode
,
toke
);
Long
[]
sds
=
pointIds
.
toArray
(
new
Long
[
0
]);
if
(!
tag
)
{
if
(
sds
.
length
>
0
)
{
return
CommonResponseUtil
.
failure
(
"计划重做失败"
);
return
iPointService
.
delPointById
(
sds
);
}
}
}
return
CommonResponseUtil
.
success
();
return
pointIds
;
}
private
boolean
savePlanAndRedo
(
Route
route
,
SynPlanParam
synPlanParam
,
String
userId
,
String
orgCode
,
Toke
toke
)
{
Date
now
=
new
Date
();
Plan
plan
=
new
Plan
();
plan
.
setName
(
synPlanParam
.
getPlanName
());
plan
.
setOrgCode
(
orgCode
);
plan
.
setDeptId
(
synPlanParam
.
getDeptId
());
plan
.
setRouteId
(
route
.
getId
());
plan
.
setIsFixedDate
(
"0"
);
plan
.
setInOrder
(
"0"
);
plan
.
setPlanBegin
(
synPlanParam
.
getPlanBegin
());
plan
.
setPlanEnd
(
synPlanParam
.
getPlanEnd
());
plan
.
setDayRate
(
0
);
plan
.
setDayInterval
(
1
);
plan
.
setDayIntervalUnit
(
"1"
);
plan
.
setExecuteInterval
(
1
);
plan
.
setMonthType
(
"1"
);
plan
.
setWhatDay
(
"1"
);
plan
.
setWhatWeek
(
1
);
plan
.
setWeekDay
(
1
);
plan
.
setUserId
(
synPlanParam
.
getUserId
());
plan
.
setWeekBeginNum
(
1
);
plan
.
setWeekEndNum
(
7
);
plan
.
setMinSpace
(
0
);
plan
.
setIsScore
(
"1"
);
plan
.
setError
(
0
);
plan
.
setStatus
(
Byte
.
parseByte
(
XJConstant
.
PLAN_STATUS_START
));
plan
.
setNextGenDate
(
DateUtil
.
getIntervalDate
(
now
,
0
));
plan
.
setCreateBy
(
userId
.
toString
());
plan
.
setRemark1
(
synPlanParam
.
getRemark
());
plan
.
setFirstFlag
(
0
);
plan
.
setOriginalId
(
synPlanParam
.
getOriginalId
());
HashMap
<
String
,
Object
>
map
=
Maps
.
newHashMap
();
switch
(
synPlanParam
.
getPlanType
())
{
case
"1"
:
plan
.
setDayTime
(
"00:00:00"
);
plan
.
setDayBegin
(
DateUtil
.
formatStrToTime
(
"08:00:00"
));
plan
.
setDayEnd
(
DateUtil
.
formatStrToTime
(
"18:00:00"
));
plan
.
setDuration
(
1440
);
plan
.
setRemark
(
"每1天的00:00执行"
);
plan
.
setExecuteRate
(
1
);
plan
.
setPlanType
(
"1"
);
map
.
put
(
"beginDate"
,
DateUtil
.
formatDatrToStr
(
now
,
"yyyy-MM-dd"
));
map
.
put
(
"endDate"
,
DateUtil
.
formatDatrToStr
(
now
,
"yyyy-MM-dd"
));
break
;
case
"2"
:
plan
.
setDayTime
(
"08:00:00"
);
plan
.
setDayBegin
(
DateUtil
.
formatStrToTime
(
"00:00:00"
));
plan
.
setDayEnd
(
DateUtil
.
formatStrToTime
(
"23:59:59"
));
plan
.
setDuration
(
60
);
plan
.
setRemark
(
"执行区间:第1天00:00至第7天23:59结束"
);
plan
.
setExecuteRate
(
1
);
plan
.
setPlanType
(
"2"
);
map
.
put
(
"beginDate"
,
DateUtil
.
formatDatrToStr
(
DateUtil
.
getThisWeekMonday
(
now
),
YYMMMMDD
));
map
.
put
(
"endDate"
,
DateUtil
.
formatDatrToStr
(
now
,
YYMMMMDD
));
break
;
case
"3"
:
plan
.
setDayTime
(
"08:00:00"
);
plan
.
setDayBegin
(
DateUtil
.
formatStrToTime
(
"00:00:00"
));
plan
.
setDayEnd
(
DateUtil
.
formatStrToTime
(
"23:59:59"
));
plan
.
setDuration
(
60
);
plan
.
setRemark
(
"执行区间:开始日期所在月1号00:00至下月1号00:00"
);
plan
.
setExecuteRate
(
1
);
plan
.
setPlanType
(
"3"
);
map
.
put
(
"beginDate"
,
DateUtil
.
formatDatrToStr
(
DateUtil
.
getThisMonthFirstDay
(
now
),
YYMMMMDD
));
map
.
put
(
"endDate"
,
DateUtil
.
formatDatrToStr
(
now
,
YYMMMMDD
));
break
;
case
"4"
:
plan
.
setDayTime
(
"08:00:00"
);
plan
.
setDayBegin
(
DateUtil
.
formatStrToTime
(
"00:00:00"
));
plan
.
setDayEnd
(
DateUtil
.
formatStrToTime
(
"23:59:59"
));
plan
.
setDuration
(
60
);
plan
.
setRemark
(
"每1年执行,执行频率:1年1次"
);
plan
.
setExecuteRate
(
1
);
plan
.
setPlanType
(
"4"
);
map
.
put
(
"beginDate"
,
DateUtil
.
formatDatrToStr
(
DateUtil
.
getCurrYearFirst
(),
YYMMMMDD
));
map
.
put
(
"endDate"
,
DateUtil
.
formatDatrToStr
(
DateUtil
.
getCurrYearLast
(),
YYMMMMDD
));
break
;
case
"5"
:
plan
.
setDayTime
(
"08:00:00"
);
plan
.
setDayBegin
(
DateUtil
.
formatStrToTime
(
"00:00:00"
));
plan
.
setDayEnd
(
DateUtil
.
formatStrToTime
(
"23:59:59"
));
plan
.
setDuration
(
60
);
plan
.
setRemark
(
"每1年执行,执行频率:1年4次"
);
plan
.
setExecuteRate
(
4
);
plan
.
setPlanType
(
"4"
);
map
.
put
(
"beginDate"
,
DateUtil
.
formatDatrToStr
(
DateUtil
.
getCurrYearFirst
(),
YYMMMMDD
));
map
.
put
(
"endDate"
,
DateUtil
.
formatDatrToStr
(
DateUtil
.
getCurrYearLast
(),
YYMMMMDD
));
break
;
default
:
break
;
}
iPlanDao
.
save
(
plan
);
map
.
put
(
"planId"
,
plan
.
getId
());
map
.
put
(
"changeFlag"
,
"0"
);
try
{
iPlanTaskService
.
reGenPlanTask
(
map
);
}
catch
(
Exception
e
)
{
return
false
;
}
return
true
;
}
@Override
public
CommonResponse
updatePlan
(
SynPlanParam
synPlanParam
,
String
userId
,
String
orgCode
)
{
return
CommonResponseUtil
.
success
();
}
@Transactional
@Override
public
CommonResponse
stopPlan
(
String
originalId
)
{
Plan
plan
=
iPlanDao
.
findByOriginalId
(
originalId
);
if
(
plan
!=
null
)
{
plan
.
setStatus
(
Byte
.
parseByte
(
XJConstant
.
PLAN_STATUS_STOP
));
iPlanDao
.
save
(
plan
);
List
<
PlanTask
>
planTasks
=
iplanTaskDao
.
findByPlanId
(
plan
.
getId
());
if
(!
CollectionUtils
.
isEmpty
(
planTasks
))
{
planTasks
.
forEach
(
e
->
{
e
.
setStatus
(
Integer
.
parseInt
(
XJConstant
.
PLAN_STATUS_STOP
));
});
iplanTaskDao
.
saveAll
(
planTasks
);
}
}
return
CommonResponseUtil
.
success
();
}
@Override
public
CommonResponse
getPlanFinishTimes
(
String
originalIds
)
{
List
<
Map
<
String
,
Object
>>
list
=
Lists
.
newArrayList
();
List
<
String
>
originalIdList
=
Arrays
.
asList
(
originalIds
.
split
(
","
));
List
<
Plan
>
planList
=
iPlanDao
.
findByOriginalIds
(
originalIdList
);
if
(!
CollectionUtils
.
isEmpty
(
planList
))
{
Map
<
Long
,
Plan
>
planMap
=
Maps
.
uniqueIndex
(
planList
,
Plan:
:
getId
);
List
<
Long
>
planIds
=
Lists
.
transform
(
planList
,
Plan:
:
getId
);
list
=
planTaskMapper
.
countFinishByPlanIds
(
planIds
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
list
.
forEach
(
e
->
{
e
.
put
(
"originalId"
,
planMap
.
get
(
Long
.
valueOf
(
e
.
get
(
"planId"
).
toString
())).
getOriginalId
());
});
}
}
return
CommonResponseUtil
.
success
(
list
);
}
private
void
synRouteRelation
(
List
<
SynRouteInfoParam
>
routeInfoList
,
Long
routeId
,
Boolean
isSave
,
String
userId
,
String
orgCode
)
{
if
(!
CollectionUtils
.
isEmpty
(
routeInfoList
))
{
List
<
String
>
pointOriginalIds
=
Lists
.
newArrayList
();
for
(
SynRouteInfoParam
synRouteInfoParam
:
routeInfoList
)
{
pointOriginalIds
.
add
(
synRouteInfoParam
.
getPointOriginalId
());
}
List
<
Point
>
pointVos
=
iPointDao
.
listByOriginalIds
(
pointOriginalIds
);
List
<
Long
>
pointIds
=
Lists
.
transform
(
pointVos
,
Point:
:
getId
);
if
(!
isSave
)
{
List
<
BigInteger
>
routePointIds
=
iRoutePointDao
.
queryRoutePointByPointId
(
pointIds
);
if
(!
CollectionUtils
.
isEmpty
(
routePointIds
))
{
routePointIds
.
forEach
(
id
->
iRoutePointItemDao
.
delRoutePointItem
(
id
.
longValue
()));
}
iRoutePointDao
.
delRoutePointByRouteId
(
routeId
);
}
Map
<
String
,
Point
>
pointVoMap
=
Maps
.
uniqueIndex
(
pointVos
,
Point:
:
getOriginalId
);
int
routePointOrderNo
=
0
;
for
(
SynRouteInfoParam
synRouteInfoParam
:
routeInfoList
)
{
long
pointId
=
pointVoMap
.
get
(
synRouteInfoParam
.
getPointOriginalId
()).
getId
();
RoutePoint
routePoint
=
new
RoutePoint
();
routePoint
.
setOrgCode
(
orgCode
);
routePoint
.
setRouteId
(
routeId
);
routePoint
.
setPointId
(
pointId
);
routePoint
.
setOrderNo
(
routePointOrderNo
);
routePoint
.
setCreatorId
(
userId
);
iRoutePointDao
.
save
(
routePoint
);
routePointOrderNo
++;
List
<
SynRouteItemInfoParam
>
itemInfo
=
synRouteInfoParam
.
getItemInfo
();
List
<
String
>
itemOriginalIds
=
Lists
.
transform
(
itemInfo
,
SynRouteItemInfoParam:
:
getItemOriginalId
);
List
<
InputItem
>
inputItemVos
=
iInputItemDao
.
listByOriginalIds
(
itemOriginalIds
);
List
<
Long
>
itemIds
=
Lists
.
transform
(
inputItemVos
,
InputItem:
:
getId
);
Map
<
String
,
InputItem
>
inputItemVoMap
=
Maps
.
uniqueIndex
(
inputItemVos
,
InputItem:
:
getOriginalId
);
List
<
RoutePointItem
>
routePointItems
=
Lists
.
newArrayList
();
List
<
PointInputItem
>
pointInputItems
=
iPointInputItemDao
.
findAllPointInputItemByPointIdAndItemIds
(
pointId
,
itemIds
);
Map
<
String
,
PointInputItem
>
pointInputItemMap
=
Maps
.
uniqueIndex
(
pointInputItems
,
(
PointInputItem
i
)
->
{
if
(
i
!=
null
)
{
return
buildId
(
i
.
getPointId
(),
i
.
getInputItemId
());
}
return
""
;
});
int
routePointItemOrderNo
=
0
;
for
(
SynRouteItemInfoParam
item
:
itemInfo
)
{
Long
itemId
=
inputItemVoMap
.
get
(
item
.
getItemOriginalId
()).
getId
();
PointInputItem
pointInputItem
=
pointInputItemMap
.
get
(
buildId
(
pointId
,
itemId
));
if
(
pointInputItem
!=
null
)
{
String
classifyIds
=
pointInputItem
.
getClassifyIds
();
if
(
StringUtils
.
isEmpty
(
classifyIds
))
{
RoutePointItem
routePointItem
=
buildRoutePointItem
(
pointInputItem
,
routePoint
,
routePointItemOrderNo
,
userId
,
item
.
getBasisJson
().
toJSONString
());
routePointItems
.
add
(
routePointItem
);
routePointItemOrderNo
++;
}
else
{
List
<
Long
>
classifyIdList
=
Arrays
.
stream
(
classifyIds
.
split
(
","
)).
map
(
s
->
Long
.
parseLong
(
s
.
trim
())).
collect
(
Collectors
.
toList
());
int
orderNo
=
0
;
for
(
Long
classifyId
:
classifyIdList
)
{
RoutePointItem
routePointItem
=
buildRoutePointItem
(
pointInputItem
,
routePoint
,
orderNo
,
userId
,
item
.
getBasisJson
().
toJSONString
());
routePointItem
.
setPointClassifyId
(
classifyId
);
routePointItems
.
add
(
routePointItem
);
orderNo
++;
}
}
}
}
iRoutePointItemDao
.
saveAll
(
routePointItems
);
}
}
}
private
RoutePointItem
buildRoutePointItem
(
PointInputItem
pointInputItem
,
RoutePoint
routePoint
,
Integer
orderNo
,
String
userId
,
String
json
)
{
RoutePointItem
routePointItem
=
new
RoutePointItem
();
routePointItem
.
setRoutePointId
(
routePoint
.
getId
());
routePointItem
.
setPointInputItemId
(
pointInputItem
.
getId
());
routePointItem
.
setOrderNo
(
orderNo
);
routePointItem
.
setCreatorId
(
userId
);
routePointItem
.
setBasisJson
(
json
);
return
routePointItem
;
}
private
String
buildId
(
Long
pointId
,
Long
itemId
)
{
return
pointId
+
"_"
+
itemId
;
}
private
Route
buildSaveRoute
(
SynRouteParam
synRouteParam
,
String
orgCode
,
String
userId
)
{
Route
route
=
new
Route
();
route
.
setCreatorId
(
userId
);
route
.
setOrgCode
(
orgCode
);
route
.
setName
(
synRouteParam
.
getRouteName
());
route
.
setBoss
(
synRouteParam
.
getBoss
());
route
.
setOriginalId
(
synRouteParam
.
getOriginalId
());
return
route
;
}
private
InputItem
buildSaveItemByType
(
SynInputItemParam
synInputItemParam
,
String
userId
,
String
orgCode
)
{
InputItem
inputItem
=
new
InputItem
();
if
(
"选择"
.
equals
(
synInputItemParam
.
getItemType
()))
{
inputItem
.
setOrgCode
(
orgCode
);
inputItem
.
setName
(
synInputItemParam
.
getItemName
());
inputItem
.
setOrderNo
(
0
);
inputItem
.
setItemType
(
synInputItemParam
.
getItemType
());
inputItem
.
setIsMust
(
"否"
);
inputItem
.
setIsScore
(
"否"
);
inputItem
.
setIsMultiline
(
"否"
);
inputItem
.
setCatalogId
(
0L
);
String
dataJsonStr
=
"[{\"name\":\"通过\",\"isOk\":\"是\",\"isChecked\":\"否\",\"orderNo\":0},{\"name\":\"不通过\",\"isOk\":\"否\",\"isChecked\":\"否\",\"orderNo\":1}]"
;
JSONArray
dataJson
=
JSONArray
.
parseArray
(
dataJsonStr
);
inputItem
.
setDataJson
(
dataJson
.
toJSONString
());
String
pictureJsonStr
=
"[{\"isMust\":\"是\",\"name\":\"照片\",\"orderNo\":0}]"
;
JSONArray
pictureJson
=
JSONArray
.
parseArray
(
pictureJsonStr
);
inputItem
.
setPictureJson
(
pictureJson
.
toJSONString
());
if
(
StringUtils
.
isEmpty
(
synInputItemParam
.
getItemNo
()))
{
inputItem
.
setItemNo
(
buildRandomNum
(
synInputItemParam
.
getOriginalId
()));
}
else
{
inputItem
.
setItemNo
(
synInputItemParam
.
getItemNo
());
}
inputItem
.
setOriginalId
(
synInputItemParam
.
getOriginalId
());
inputItem
.
setCreateBy
(
userId
);
inputItem
.
setBasisJson
(
synInputItemParam
.
getBasisJson
().
toJSONString
());
}
return
inputItem
;
}
private
Point
buildSavePoint
(
SynPointParam
synPointParam
,
String
userId
,
String
orgCode
)
{
Point
point
=
new
Point
();
point
.
setName
(
synPointParam
.
getPointName
());
if
(
StringUtils
.
isEmpty
(
synPointParam
.
getPointNo
()))
{
point
.
setPointNo
(
buildRandomNum
(
synPointParam
.
getOriginalId
()));
}
else
{
point
.
setPointNo
(
synPointParam
.
getPointNo
());
}
point
.
setSaveGps
(
"0"
);
point
.
setDistance
(
0
);
point
.
setShotMinNumber
(
0
);
point
.
setShotMaxNumber
(
10
);
point
.
setFixedShot
(
10
);
point
.
setOffline
(
false
);
point
.
setIsFixed
(
"1"
);
point
.
setCatalogId
(
0L
);
point
.
setIsScore
(
"0"
);
point
.
setOrgCode
(
orgCode
);
point
.
setCoordinates
(
synPointParam
.
getCoordinates
());
point
.
setChargeDeptId
(
synPointParam
.
getChargeDeptId
());
point
.
setChargePersonId
(
synPointParam
.
getChargePersonId
());
point
.
setStatus
(
"0"
);
point
.
setIsIndoor
(
false
);
point
.
setOriginalId
(
synPointParam
.
getOriginalId
());
point
.
setCreatorId
(
userId
);
return
point
;
}
private
String
buildRandomNum
(
String
originalId
)
{
return
"SPC_"
+
(
int
)
((
Math
.
random
()
*
9
+
1
)
*
100000
)
+
"_"
+
originalId
;
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/intfc/ICheckService.java
View file @
2fbf82de
...
@@ -258,7 +258,7 @@ public interface ICheckService {
...
@@ -258,7 +258,7 @@ public interface ICheckService {
*/
*/
Map
<
String
,
CheckRecordDto
>
obtainLastCheckRecord
(
String
[]
relationId
);
Map
<
String
,
CheckRecordDto
>
obtainLastCheckRecord
(
String
[]
relationId
);
Page
<
Hash
Map
<
String
,
Object
>>
getCheckPage
(
HashMap
<
String
,
Object
>
map
,
CommonPageable
pageable
);
Page
<
Map
<
String
,
Object
>>
getCheckPage
(
HashMap
<
String
,
Object
>
map
,
CommonPageable
pageable
);
Map
<
String
,
Object
>
getCheckDetail
(
String
id
);
Map
<
String
,
Object
>
getCheckDetail
(
String
id
);
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/intfc/IPointService.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
intfc
;
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
intfc
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.dto.PointDto
;
import
com.yeejoin.amos.maintenance.business.dto.PointDto
;
import
com.yeejoin.amos.maintenance.business.param.*
;
import
com.yeejoin.amos.maintenance.business.param.*
;
import
com.yeejoin.amos.maintenance.business.util.DaoCriteria
;
import
com.yeejoin.amos.maintenance.business.util.DaoCriteria
;
...
@@ -299,7 +300,6 @@ public interface IPointService {
...
@@ -299,7 +300,6 @@ public interface IPointService {
LinkedHashMap
<
String
,
Object
>
getRegionTress
();
LinkedHashMap
<
String
,
Object
>
getRegionTress
();
void
syncSavePoint
(
List
<
MaintenanceResourceData
>
list
,
String
orgCode
,
String
userId
);
/**
/**
* 查询巡检点及点及点的项
* 查询巡检点及点及点的项
* @param queryRequests 请求参数
* @param queryRequests 请求参数
...
@@ -309,4 +309,5 @@ public interface IPointService {
...
@@ -309,4 +309,5 @@ public interface IPointService {
*/
*/
Page
<
PointDto
>
queryPointInfoWithItem
(
List
<
DaoCriteria
>
queryRequests
,
CommonPageable
commonPageable
,
Long
ownerId
);
Page
<
PointDto
>
queryPointInfoWithItem
(
List
<
DaoCriteria
>
queryRequests
,
CommonPageable
commonPageable
,
Long
ownerId
);
void
syncSavePoint
(
List
<
MaintenanceResourceData
>
list
,
ReginParams
reginParams
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/intfc/ISynDataService.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
intfc
;
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.maintenance.business.param.SynInputItemParam
;
import
java.util.List
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.Toke
;
import
com.yeejoin.amos.maintenance.business.param.SynPlanParam
;
import
com.yeejoin.amos.maintenance.business.param.SynPointParam
;
import
com.yeejoin.amos.maintenance.business.param.SynRouteParam
;
public
interface
ISynDataService
{
public
interface
ISynDataService
{
CommonResponse
saveInputItem
(
SynInputItemParam
synInputItemParam
,
String
userId
,
String
orgCode
);
/**
* 删除维保项(原巡检点)
CommonResponse
updateInputItem
(
SynInputItemParam
synInputItemParam
);
* @param ids 原ids
* @return Boolean
CommonResponse
deleteInputItem
(
SynInputItemParam
synInputItemParam
);
*/
List
<
Long
>
pointDelete
(
String
ids
);
CommonResponse
saveSinglePoint
(
SynPointParam
synPointParam
,
String
userId
,
String
orgCode
);
CommonResponse
updateSinglePoint
(
SynPointParam
synPointParam
);
CommonResponse
deleteSinglePoint
(
SynPointParam
synPointParam
);
CommonResponse
synPointItemRelation
(
SynPointParam
synPointParam
,
Boolean
isSave
,
String
userId
);
CommonResponse
saveRoute
(
SynRouteParam
synRouteParam
,
String
userId
,
String
orgCode
);
CommonResponse
updateRoute
(
SynRouteParam
synRouteParam
,
String
userId
,
String
orgCode
);
CommonResponse
savePlan
(
SynPlanParam
synPlanParam
,
String
userId
,
String
orgCode
,
Toke
toke
);
CommonResponse
updatePlan
(
SynPlanParam
synPlanParam
,
String
userId
,
String
orgCode
);
CommonResponse
stopPlan
(
String
originalId
);
CommonResponse
getPlanFinishTimes
(
String
originalIds
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/core/framework/PersonIdentifyAspect.java
View file @
2fbf82de
...
@@ -47,7 +47,7 @@ public class PersonIdentifyAspect {
...
@@ -47,7 +47,7 @@ public class PersonIdentifyAspect {
if
(
ObjectUtils
.
isEmpty
(
responseModel
.
getResult
())
||
responseModel
.
getStatus
()
!=
HTTP_OK_STATUS
)
{
if
(
ObjectUtils
.
isEmpty
(
responseModel
.
getResult
())
||
responseModel
.
getStatus
()
!=
HTTP_OK_STATUS
)
{
throw
new
RuntimeException
(
responseModel
.
getDevMessage
());
throw
new
RuntimeException
(
responseModel
.
getDevMessage
());
}
}
ReginParams
.
PersonIdentity
personIdentity
=
(
ReginParams
.
PersonIdentity
)
Bean
.
mapToBean
((
Map
<
String
,
Object
>)
responseModel
.
getResult
(),
ReginParams
.
PersonIdentity
.
class
);
ReginParams
.
PersonIdentity
personIdentity
=
(
ReginParams
.
PersonIdentity
)
Bean
.
mapToBean
((
Map
<
String
,
Object
>)
responseModel
.
getResult
(),
ReginParams
.
PersonIdentity
.
class
);
reginParam
.
setPersonIdentity
(
personIdentity
);
reginParam
.
setPersonIdentity
(
personIdentity
);
redisUtils
.
set
(
buildKey
(
RequestContext
.
getToken
()),
JSONObject
.
toJSONString
(
reginParam
));
redisUtils
.
set
(
buildKey
(
RequestContext
.
getToken
()),
JSONObject
.
toJSONString
(
reginParam
));
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/jpush/AppMessagePushService.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
jpush
;
package
com
.
yeejoin
.
amos
.
maintenance
.
jpush
;
import
cn.jpush.api.JPushClient
;
import
cn.jpush.api.push.model.PushPayload
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.param.PushMsgParam
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -7,23 +11,17 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -7,23 +11,17 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.param.PushMsgParam
;
import
cn.jpush.api.JPushClient
;
import
cn.jpush.api.push.model.PushPayload
;
@Service
@Service
public
class
AppMessagePushService
{
public
class
AppMessagePushService
{
protected
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
AppMessagePushService
.
class
);
protected
static
final
Logger
log
=
LoggerFactory
@Autowired
.
getLogger
(
AppMessagePushService
.
class
);
private
com
.
yeejoin
.
amos
.
maintenance
.
feign
.
PushFeign
PushFeign
;
@Autowired
private
com
.
yeejoin
.
amos
.
maintenance
.
feign
.
PushFeign
PushFeign
;
// private static String APP_KEY;
// private static String APP_KEY;
//
//
// private static String MASTER_SECRET;
// private static String MASTER_SECRET;
...
@@ -36,20 +34,21 @@ public class AppMessagePushService {
...
@@ -36,20 +34,21 @@ public class AppMessagePushService {
// public void setMasterSecret(String masterSecret) {
// public void setMasterSecret(String masterSecret) {
// this.MASTER_SECRET = masterSecret;
// this.MASTER_SECRET = masterSecret;
// }
// }
@Value
(
"${params.isPush}"
)
@Value
(
"${params.isPush}"
)
private
String
isPush
;
private
String
isPush
;
protected
static
final
String
APP_KEY
=
"1b3f7b961200f4b236811dfe"
;
protected
static
final
String
APP_KEY
=
"1b3f7b961200f4b236811dfe"
;
protected
static
final
String
MASTER_SECRET
=
"8b650e645fb3a43c96be02b2"
;
protected
static
final
String
MASTER_SECRET
=
"8b650e645fb3a43c96be02b2"
;
//
//
private
static
JPushClient
jpushClient
=
new
JPushClient
(
MASTER_SECRET
,
private
static
JPushClient
jpushClient
=
new
JPushClient
(
MASTER_SECRET
,
APP_KEY
);
APP_KEY
);
public
static
String
buildJpushUserKey
(
String
userId
)
{
return
XJConstant
.
JPUSH_USER_KEY
+
"_"
+
userId
;
public
static
String
buildJpushUserKey
(
String
userId
)
{
}
return
XJConstant
.
JPUSH_USER_KEY
+
"_"
+
userId
;
}
// private static JPushClient jpushClient = null;
// private static JPushClient jpushClient = null;
//
//
// public static JPushClient getJPushClient(String APP_KEY, String MASTER_SECRET) {
// public static JPushClient getJPushClient(String APP_KEY, String MASTER_SECRET) {
...
@@ -61,29 +60,29 @@ public class AppMessagePushService {
...
@@ -61,29 +60,29 @@ public class AppMessagePushService {
// }
// }
/*public void sendMessage(List<PushMsgParam> responses)
/*public void sendMessage(List<PushMsgParam> responses)
{
{
PushFeign.sendMessage(responses);
PushFeign.sendMessage(responses);
try
try
{
{
if(responses!=null && "true".equals(isPush))
if(responses!=null && "true".equals(isPush))
{
{
for(PushMsgParam response:responses)
for(PushMsgParam response:responses)
{
{
PushPayload payload = buildPushPayload(response);
PushPayload payload = buildPushPayload(response);
jpushClient.sendPush(payload);
jpushClient.sendPush(payload);
}
}
}
}
}
}
catch (Exception e){
catch (Exception e){
log.error(e.getMessage(),e);
log.error(e.getMessage(),e);
e.printStackTrace();
e.printStackTrace();
}
}
}
}
*/
*/
private
PushPayload
buildPushPayload
(
PushMsgParam
response
)
{
private
PushPayload
buildPushPayload
(
PushMsgParam
response
)
{
CommonResponse
commonResponse
=
PushFeign
.
buildPushPayload
(
response
);
CommonResponse
commonResponse
=
PushFeign
.
buildPushPayload
(
response
);
return
(
PushPayload
)
commonResponse
.
getDataList
();
return
(
PushPayload
)
commonResponse
.
getDataList
();
/*if(JPushTypeEnum.ALL.getCode().equals(response.getType())){
/*if(JPushTypeEnum.ALL.getCode().equals(response.getType())){
return PushPayload.newBuilder()
return PushPayload.newBuilder()
.setPlatform(Platform.android())
.setPlatform(Platform.android())
...
@@ -102,19 +101,19 @@ public class AppMessagePushService {
...
@@ -102,19 +101,19 @@ public class AppMessagePushService {
.build();
.build();
}*/
}*/
}
}
public
void
sendMessage
(
PushMsgParam
response
)
{
public
void
sendMessage
(
PushMsgParam
response
)
{
try
{
try
{
if
(
null
!=
response
&&
"true"
.
equals
(
isPush
))
{
if
(
null
!=
response
&&
"true"
.
equals
(
isPush
))
{
CommonResponse
commonResponse
=
PushFeign
.
sendMessageone
(
response
);
CommonResponse
commonResponse
=
PushFeign
.
sendMessageone
(
response
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/quartz/JobService.java
View file @
2fbf82de
...
@@ -198,7 +198,11 @@ public class JobService implements IJobService {
...
@@ -198,7 +198,11 @@ public class JobService implements IJobService {
check
.
setPointName
(
arg
.
getPointName
());
check
.
setPointName
(
arg
.
getPointName
());
check
.
setPointId
(
arg
.
getPointId
());
check
.
setPointId
(
arg
.
getPointId
());
check
.
setPointNo
(
arg
.
getPointNo
());
check
.
setPointNo
(
arg
.
getPointNo
());
check
.
setRiskAndManage
(
arg
.
getRiskAndManage
());
check
.
setBeginTime
(
planTask
.
getBeginTime
());
check
.
setEndTime
(
planTask
.
getEndTime
());
check
.
setBuildingName
(
arg
.
getBuildingName
());
check
.
setBuildingName
(
arg
.
getBuildingName
());
check
.
setAddress
(
arg
.
getAddress
());
check
.
setUploadTime
(
new
Date
());
check
.
setUploadTime
(
new
Date
());
check
.
setPlanId
(
arg
.
getPlanId
());
check
.
setPlanId
(
arg
.
getPlanId
());
check
.
setPlanName
(
arg
.
getPlanName
());
check
.
setPlanName
(
arg
.
getPlanName
());
...
@@ -209,6 +213,7 @@ public class JobService implements IJobService {
...
@@ -209,6 +213,7 @@ public class JobService implements IJobService {
check
.
setRouteName
(
arg
.
getRouteName
());
check
.
setRouteName
(
arg
.
getRouteName
());
check
.
setCheckTime
(
arg
.
getEndTime
());
check
.
setCheckTime
(
arg
.
getEndTime
());
check
.
setOwnerId
(
arg
.
getOwnerId
());
check
.
setOwnerId
(
arg
.
getOwnerId
());
check
.
setOwnerName
(
arg
.
getOwnerName
());
check
.
setCompanyId
(
arg
.
getCompanyId
());
check
.
setCompanyId
(
arg
.
getCompanyId
());
check
.
setCompanyName
(
arg
.
getCompanyName
());
check
.
setCompanyName
(
arg
.
getCompanyName
());
check
.
setEquipmentName
(
arg
.
getEquipmentName
());
check
.
setEquipmentName
(
arg
.
getEquipmentName
());
...
@@ -320,8 +325,7 @@ public class JobService implements IJobService {
...
@@ -320,8 +325,7 @@ public class JobService implements IJobService {
updatePlanTaskStatus
(
planTask
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
updatePlanTaskStatus
(
planTask
,
PlanTaskFinishStatusEnum
.
OVERTIME
.
getValue
());
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
"任务加到定时任务或者更新失败"
,
e
);
e
.
printStackTrace
();
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/task/PlanTaskJob.java
0 → 100644
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
maintenance
.
task
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IPlanTaskService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
/**
* @author DELL
*/
@Component
@EnableScheduling
public
class
PlanTaskJob
{
@Autowired
private
IPlanTaskService
planTaskService
;
/**
* 定时查询任务状态
*/
@Scheduled
(
cron
=
"${jobs.cron}"
)
public
void
scheduleJob
()
{
planTaskService
.
taskExecution
(
null
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/CheckController.java
View file @
2fbf82de
...
@@ -423,14 +423,12 @@ public class CheckController extends AbstractBaseController {
...
@@ -423,14 +423,12 @@ public class CheckController extends AbstractBaseController {
@ApiOperation
(
value
=
"获取巡检日历数据<font color='blue'>手机app</font>"
,
notes
=
"获取巡检日历数据<font color='blue'>手机app</font>"
)
@ApiOperation
(
value
=
"获取巡检日历数据<font color='blue'>手机app</font>"
,
notes
=
"获取巡检日历数据<font color='blue'>手机app</font>"
)
@PostMapping
(
value
=
"/checkCalendar"
,
produces
=
"application/json;charset=UTF-8"
)
@PostMapping
(
value
=
"/checkCalendar"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
checkCalendar
(
public
CommonResponse
checkCalendar
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
)
{
@ApiParam
(
value
=
"查询条件"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
)
{
try
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
String
loginOrgCode
=
getOrgCode
(
reginParams
);
String
roleTypeName
=
getRoleTypeName
(
reginParams
);
String
roleTypeName
=
getRoleTypeName
(
reginParams
);
List
<
DaoCriteria
>
daoCriterias
=
buildDaoCriterias
(
queryRequests
,
true
,
loginOrgCode
,
roleTypeName
);
List
<
DaoCriteria
>
daoCriterias
=
buildDaoCriterias
(
queryRequests
,
true
,
loginOrgCode
,
roleTypeName
);
Map
<
String
,
Object
>
map
=
checkService
.
checkCalendar
(
CheckParamUtil
.
checkCalendar
(
daoCriterias
));
Map
<
String
,
Object
>
map
=
checkService
.
checkCalendar
(
CheckParamUtil
.
checkCalendar
(
daoCriterias
));
return
CommonResponseUtil
.
success
(
map
);
return
CommonResponseUtil
.
success
(
map
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -618,9 +616,9 @@ public class CheckController extends AbstractBaseController {
...
@@ -618,9 +616,9 @@ public class CheckController extends AbstractBaseController {
public
ResponseModel
getPlanExecuteInfo
(
public
ResponseModel
getPlanExecuteInfo
(
@ApiParam
(
value
=
"计划id"
)
@RequestParam
(
value
=
"planId"
)
Long
planId
,
@ApiParam
(
value
=
"计划id"
)
@RequestParam
(
value
=
"planId"
)
Long
planId
,
@ApiParam
(
value
=
"点id"
)
@RequestParam
(
value
=
"pointId"
,
required
=
false
)
Long
pointId
,
@ApiParam
(
value
=
"点id"
)
@RequestParam
(
value
=
"pointId"
,
required
=
false
)
Long
pointId
,
@ApiParam
(
value
=
"
点id"
)
@RequestParam
(
value
=
"pointId
"
,
required
=
false
)
String
executeState
,
@ApiParam
(
value
=
"
执行状态"
)
@RequestParam
(
value
=
"executeState
"
,
required
=
false
)
String
executeState
,
@ApiParam
(
value
=
"
点id"
)
@RequestParam
(
value
=
"pointId
"
,
required
=
false
)
String
status
,
@ApiParam
(
value
=
"
状态"
)
@RequestParam
(
value
=
"status
"
,
required
=
false
)
String
status
,
@ApiParam
(
value
=
"
点id"
)
@RequestParam
(
value
=
"pointId"
,
required
=
false
)
String
teamId
,
@ApiParam
(
value
=
"
单位id"
)
@RequestParam
(
value
=
"companyName"
,
required
=
false
)
String
companyName
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@ApiParam
(
value
=
"页大小"
)
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
{
@ApiParam
(
value
=
"页大小"
)
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -628,7 +626,7 @@ public class CheckController extends AbstractBaseController {
...
@@ -628,7 +626,7 @@ public class CheckController extends AbstractBaseController {
map
.
put
(
"pointId"
,
pointId
);
map
.
put
(
"pointId"
,
pointId
);
map
.
put
(
"executeState"
,
executeState
);
map
.
put
(
"executeState"
,
executeState
);
map
.
put
(
"status"
,
status
);
map
.
put
(
"status"
,
status
);
map
.
put
(
"
teamId"
,
teamId
);
map
.
put
(
"
companyName"
,
companyName
);
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
ResponseHelper
.
buildResponse
(
checkService
.
getPlanExecuteInfo
(
map
,
pageable
));
return
ResponseHelper
.
buildResponse
(
checkService
.
getPlanExecuteInfo
(
map
,
pageable
));
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/InputItemMapper.java
View file @
2fbf82de
...
@@ -36,4 +36,6 @@ public interface InputItemMapper {
...
@@ -36,4 +36,6 @@ public interface InputItemMapper {
List
<
InputItemVo
>
getInputItemParent
(
@Param
(
"id"
)
String
id
);
List
<
InputItemVo
>
getInputItemParent
(
@Param
(
"id"
)
String
id
);
void
updatePointById
(
Map
<
String
,
Object
>
param
);
void
updatePointById
(
Map
<
String
,
Object
>
param
);
List
<
Long
>
getIds
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IPointDao.java
View file @
2fbf82de
...
@@ -27,8 +27,8 @@ public interface IPointDao extends BaseDao<Point, Long> {
...
@@ -27,8 +27,8 @@ public interface IPointDao extends BaseDao<Point, Long> {
Optional
<
Point
>
findById
(
Long
id
);
Optional
<
Point
>
findById
(
Long
id
);
@Query
(
value
=
"SELECT id FROM p_point p WHERE p.point_no = (?1)
AND p.original_id = (?2)
"
,
nativeQuery
=
true
)
@Query
(
value
=
"SELECT id FROM p_point p WHERE p.point_no = (?1)
and is_delete =0 limit 1
"
,
nativeQuery
=
true
)
Long
findPointBy
EquipmentIdAndFireFacilityId
(
String
equipmentId
,
String
specificI
d
);
Long
findPointBy
PointNoId
(
String
i
d
);
@Modifying
@Modifying
@Transactional
@Transactional
...
@@ -39,7 +39,7 @@ public interface IPointDao extends BaseDao<Point, Long> {
...
@@ -39,7 +39,7 @@ public interface IPointDao extends BaseDao<Point, Long> {
@Modifying
@Modifying
@Transactional
@Transactional
@Query
(
value
=
"UPDATE p_point SET is_delete = 1 WHERE point_no
IN
(?1)"
,
nativeQuery
=
true
)
@Query
(
value
=
"UPDATE p_point SET is_delete = 1 WHERE point_no
=
(?1)"
,
nativeQuery
=
true
)
void
delPointByPointNo
(
Long
id
);
void
delPointByPointNo
(
Long
id
);
@Query
(
value
=
"SELECT id FROM p_point p WHERE is_delete = 0 AND p.point_no = (?1)"
,
nativeQuery
=
true
)
@Query
(
value
=
"SELECT id FROM p_point p WHERE is_delete = 0 AND p.point_no = (?1)"
,
nativeQuery
=
true
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/CheckServiceImpl.java
View file @
2fbf82de
...
@@ -1156,6 +1156,7 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -1156,6 +1156,7 @@ public class CheckServiceImpl implements ICheckService {
if
(
total
==
0
)
{
if
(
total
==
0
)
{
return
new
PageImpl
<>(
content
,
page
,
total
);
return
new
PageImpl
<>(
content
,
page
,
total
);
}
}
map
.
put
(
"status"
,
PlanTaskFinishStatusEnum
.
getValue
(
String
.
valueOf
(
map
.
get
(
"status"
))));
map
.
put
(
"offset"
,
page
.
getOffset
());
map
.
put
(
"offset"
,
page
.
getOffset
());
map
.
put
(
"pageSize"
,
page
.
getPageSize
());
map
.
put
(
"pageSize"
,
page
.
getPageSize
());
content
=
checkMapper
.
getCheckItems
(
map
);
content
=
checkMapper
.
getCheckItems
(
map
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PointServiceImpl.java
View file @
2fbf82de
...
@@ -1134,6 +1134,11 @@ public class PointServiceImpl implements IPointService {
...
@@ -1134,6 +1134,11 @@ public class PointServiceImpl implements IPointService {
List
<
Long
>
ids
=
new
ArrayList
<
Long
>();
List
<
Long
>
ids
=
new
ArrayList
<
Long
>();
Point
point
=
new
Point
();
Point
point
=
new
Point
();
String
id
=
StringUtil
.
isNotEmpty
(
orgUsrFormDto
.
getSequenceNbr
())
?
String
.
valueOf
(
orgUsrFormDto
.
getSequenceNbr
())
:
String
.
valueOf
(
sequence
.
nextId
());
String
id
=
StringUtil
.
isNotEmpty
(
orgUsrFormDto
.
getSequenceNbr
())
?
String
.
valueOf
(
orgUsrFormDto
.
getSequenceNbr
())
:
String
.
valueOf
(
sequence
.
nextId
());
point
.
setPointNo
(
id
);
point
.
setShotMinNumber
(
0
);
point
.
setShotMaxNumber
(
0
);
point
.
setFixedShot
(
0
);
point
.
setLevel
(
""
);
point
.
setName
(
orgUsrFormDto
.
getBizOrgName
());
point
.
setName
(
orgUsrFormDto
.
getBizOrgName
());
point
.
setOrgCode
(
orgUsrFormDto
.
getBizOrgCode
());
point
.
setOrgCode
(
orgUsrFormDto
.
getBizOrgCode
());
point
.
setBuildingId
(
orgUsrFormDto
.
getBuildId
());
point
.
setBuildingId
(
orgUsrFormDto
.
getBuildId
());
...
@@ -1156,27 +1161,28 @@ public class PointServiceImpl implements IPointService {
...
@@ -1156,27 +1161,28 @@ public class PointServiceImpl implements IPointService {
}
}
}
}
}
}
point
.
setOrgCode
(
orgUsrFormDto
.
getAmosOrgCode
()
);
point
.
setOrgCode
(
StringUtil
.
isNotEmpty
(
orgUsrFormDto
.
getAmosOrgCode
())
?
orgUsrFormDto
.
getAmosOrgCode
()
:
""
);
Long
pointId
=
iPointDao
.
findPointBy
EquipmentIdAndFireFacilityId
(
id
,
point
.
getOriginalId
());
Long
pointId
=
iPointDao
.
findPointBy
PointNoId
(
point
.
getPointNo
());
if
(
null
!=
pointId
)
{
if
(
null
!=
pointId
)
{
ids
.
add
(
pointId
);
ids
.
add
(
pointId
);
iPointDao
.
delPointBIds
(
pointId
);
iPointDao
.
delPointBIds
(
pointId
);
}
}
iPointDao
.
save
(
point
);
iPointDao
.
save
(
point
);
List
<
InputItem
>
inputItemVos
=
inputItemMapper
.
getInputItemByEquipmentName
(
point
.
getName
()
);
List
<
Long
>
itemIds
=
inputItemMapper
.
getIds
(
);
if
(
0
<
i
nputItemVo
s
.
size
())
{
if
(
0
<
i
temId
s
.
size
())
{
i
nputItemVo
s
.
forEach
(
y
->
{
i
temId
s
.
forEach
(
y
->
{
PointInputItem
inputItem
=
new
PointInputItem
();
PointInputItem
inputItem
=
new
PointInputItem
();
inputItem
.
setPointId
(
point
.
getId
());
inputItem
.
setPointId
(
point
.
getId
());
inputItem
.
setOrderNo
(
y
.
getOrderNo
());
inputItem
.
setInputItemId
(
y
);
inputItem
.
setInputItemId
(
y
.
getId
());
inputItems
.
add
(
inputItem
);
inputItems
.
add
(
inputItem
);
});
});
}
}
if
(
0
<
ids
.
size
())
{
if
(
0
<
ids
.
size
())
{
iPointInputItemDao
.
deleteByPointId
(
ids
);
iPointInputItemDao
.
deleteByPointId
(
ids
);
}
}
iPointInputItemDao
.
saveAll
(
inputItems
);
if
(
0
<
inputItems
.
size
())
{
iPointInputItemDao
.
saveAll
(
inputItems
);
}
}
}
@Override
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/util/InputItemParamUtil.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
util
;
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
util
;
import
java.sql.PreparedStatement
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -62,6 +63,7 @@ public class InputItemParamUtil {
...
@@ -62,6 +63,7 @@ public class InputItemParamUtil {
}
}
param
.
setOrgCode
(
perMap
.
get
(
"orgCode"
).
toString
());
param
.
setOrgCode
(
perMap
.
get
(
"orgCode"
).
toString
());
if
(
commonPageable
!=
null
)
{
if
(
commonPageable
!=
null
)
{
param
.
setOffset
(
Integer
.
parseInt
(
String
.
valueOf
(
commonPageable
.
getOffset
())));
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/mqtt/AmosMqttListener.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
supervision
.
mqtt
;
package
com
.
yeejoin
.
amos
.
supervision
.
mqtt
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPointService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPointService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.json.JSONObject
;
import
org.eclipse.paho.client.mqttv3.MqttMessage
;
import
org.eclipse.paho.client.mqttv3.MqttMessage
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.emq.EmqxListener
;
import
org.typroject.tyboot.component.emq.EmqxListener
;
import
java.nio.charset.Charset
;
/**
/**
* @author keyong
* @author keyong
* @title: AmosMqttListener
* @title: AmosMqttListener
...
@@ -27,12 +29,13 @@ public class AmosMqttListener extends EmqxListener {
...
@@ -27,12 +29,13 @@ public class AmosMqttListener extends EmqxListener {
@Override
@Override
public
void
processMessage
(
String
topic
,
MqttMessage
message
)
{
public
void
processMessage
(
String
topic
,
MqttMessage
message
)
{
String
msg
=
String
.
valueOf
(
message
);
byte
[]
payload
=
message
.
getPayload
();
String
str
=
new
String
(
payload
,
Charset
.
forName
(
"GBK"
));
if
(
"jcs/company/topic/add"
.
equals
(
topic
))
{
if
(
"jcs/company/topic/add"
.
equals
(
topic
))
{
OrgUsrFormDto
usrFormDto
=
JSON
.
parseObject
(
msg
,
OrgUsrFormDto
.
class
);
OrgUsrFormDto
usrFormDto
=
JSON
.
parseObject
(
str
,
OrgUsrFormDto
.
class
);
iPointService
.
syncSavePoint
(
usrFormDto
);
iPointService
.
syncSavePoint
(
usrFormDto
);
}
else
{
}
else
{
iPointService
.
delPointByPointNo
(
Long
.
valueOf
(
msg
));
iPointService
.
delPointByPointNo
(
Long
.
valueOf
(
str
));
}
}
try
{
try
{
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/AlertCalledController.java
View file @
2fbf82de
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller;
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.BeanUtils
;
import
com.baomidou.mybatisplus.core.toolkit.SystemClock
;
import
com.baomidou.mybatisplus.core.toolkit.SystemClock
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
@@ -17,13 +16,9 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCallInfoDto;
...
@@ -17,13 +16,9 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCallInfoDto;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DutyPersonDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MaintenanceUnit
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.DispatchPaperServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.DispatchPaperServiceImpl
;
...
@@ -41,7 +36,6 @@ import org.springframework.web.bind.annotation.PathVariable;
...
@@ -41,7 +36,6 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
@@ -53,7 +47,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -53,7 +47,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -277,33 +270,87 @@ public class AlertCalledController extends BaseController {
...
@@ -277,33 +270,87 @@ public class AlertCalledController extends BaseController {
queryWrapper
.
orderByDesc
(
"call_time"
);
queryWrapper
.
orderByDesc
(
"call_time"
);
queryWrapper
.
between
(
"call_time"
,
DateUtils
.
stampToDate
(
System
.
currentTimeMillis
(),
DateUtils
.
DATE_PATTERN
),
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getIsAuxiliaryScreen
()))
{
DateUtils
.
stampToDate
(
DateUtils
.
dateAddDays
(
new
Date
(),
1
).
getTime
(),
DateUtils
.
DATE_PATTERN
));
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getCallTimeStart
())
&&
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getCallTimeEnd
()))
{
queryWrapper
.
between
(
"call_time"
,
alertCalled
.
getCallTimeStart
(),
alertCalled
.
getCallTimeEnd
().
getTime
());
}
}
else
{
queryWrapper
.
between
(
"call_time"
,
DateUtils
.
stampToDate
(
System
.
currentTimeMillis
(),
DateUtils
.
DATE_PATTERN
),
DateUtils
.
stampToDate
(
DateUtils
.
dateAddDays
(
new
Date
(),
1
).
getTime
(),
DateUtils
.
DATE_PATTERN
));
}
if
(
alertCalled
.
getIsFatherAlert
())
{
// 0:接警;1:处警
if
(
alertCalled
.
getIsFatherAlert
())
{
// 0:接警;1:处警
queryWrapper
.
isNull
(
"father_alert"
);
queryWrapper
.
isNull
(
"father_alert"
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getType
()))
{
queryWrapper
.
eq
(
"type"
,
alertCalled
.
getType
());
}
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getAlarmType
()))
{
queryWrapper
.
eq
(
"alarm_type"
,
alertCalled
.
getAlarmType
());
}
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getAlertSource
()))
{
queryWrapper
.
eq
(
"alert_source"
,
alertCalled
.
getAlertSource
());
}
return
queryWrapper
;
return
queryWrapper
;
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询警情事件记录"
,
notes
=
"查询警情事件记录"
)
@ApiOperation
(
value
=
"查询警情事件记录"
,
notes
=
"查询警情事件记录"
)
@PostMapping
(
"/selectRecord"
)
@GetMapping
(
"/selectRecord"
)
public
ResponseModel
<
Page
<
AlertCalledQueryDto
>>
queryAlertCalledByPager
(
@RequestBody
AlertCalledQueryDto
alertCalledQueryDto
)
{
public
ResponseModel
<
Page
<
AlertCalledQueryDto
>>
queryAlertCalledByPager
(
AlertCalledQueryDto
alertCalledQueryDto
,
List
<
AlertCalledQueryDto
>
list
=
iAlertCalledService
.
queryAlertListByQueryDto
(
alertCalledQueryDto
);
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
{
Page
<
AlertCalledQueryDto
>
page
=
new
Page
<
AlertCalledQueryDto
>();
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
Page
<
AlertCalledQueryDto
>
pageBean
=
iAlertCalledService
.
queryAlertListByQueryDto
(
page
,
alertCalledQueryDto
.
getWorkOrderNumber
(),
alertCalledQueryDto
.
getCreator
(),
alertCalledQueryDto
.
getEmergency
(),
alertCalledQueryDto
.
getEmergencyTimeStart
()
==
null
?
null
:
DateUtils
.
date2LongStr
(
alertCalledQueryDto
.
getEmergencyTimeStart
()),
alertCalledQueryDto
.
getEmergencyTimeEnd
()
==
null
?
null
:
DateUtils
.
date2LongStr
(
alertCalledQueryDto
.
getEmergencyTimeEnd
()),
alertCalledQueryDto
.
getEmergencyCall
(),
alertCalledQueryDto
.
getDeviceId
(),
alertCalledQueryDto
.
getElevatorAddress
(),
alertCalledQueryDto
.
getAlertType
(),
alertCalledQueryDto
.
getAlertSource
(),
alertCalledQueryDto
.
getAlertStage
(),
alertCalledQueryDto
.
getAlertStatus
());
Page
<
AlertCalledQueryDto
>
result
=
new
Page
<
AlertCalledQueryDto
>(
alertCalledQueryDto
.
getPageNum
(),
alertCalledQueryDto
.
getPageSize
());
Page
<
AlertCalledQueryDto
>
result
=
new
Page
<
AlertCalledQueryDto
>(
alertCalledQueryDto
.
getPageNum
(),
alertCalledQueryDto
.
getPageSize
());
long
totle
=
list
.
size
();
long
totle
=
pageBean
.
getTotal
();
result
.
setRecords
(
list
);
result
.
setRecords
(
pageBean
.
getRecords
()
);
result
.
setTotal
(
totle
);
result
.
setTotal
(
totle
);
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出警情事件记录"
,
notes
=
"导出警情事件记录"
)
@ApiOperation
(
value
=
"导出警情事件记录"
,
notes
=
"导出警情事件记录"
)
@PostMapping
(
"/exportSelectRecord"
)
@GetMapping
(
"/exportSelectRecord"
)
public
void
exportAlertCalled
(
@RequestBody
AlertCalledQueryDto
alertCalledQueryDto
,
HttpServletResponse
response
)
{
public
void
exportAlertCalled
(
AlertCalledQueryDto
alertCalledQueryDto
,
HttpServletResponse
response
)
{
List
<
AlertCalledQueryDto
>
list
=
iAlertCalledService
.
queryAlertListByQueryDto
(
alertCalledQueryDto
);
Page
<
AlertCalledQueryDto
>
page
=
new
Page
<
AlertCalledQueryDto
>();
Page
<
AlertCalledQueryDto
>
pageBean
=
iAlertCalledService
.
queryAlertListByQueryDto
(
page
,
alertCalledQueryDto
.
getWorkOrderNumber
(),
alertCalledQueryDto
.
getCreator
(),
alertCalledQueryDto
.
getEmergency
(),
alertCalledQueryDto
.
getEmergencyTimeStart
()
==
null
?
null
:
DateUtils
.
date2LongStr
(
alertCalledQueryDto
.
getEmergencyTimeStart
()),
alertCalledQueryDto
.
getEmergencyTimeEnd
()
==
null
?
null
:
DateUtils
.
date2LongStr
(
alertCalledQueryDto
.
getEmergencyTimeEnd
()),
alertCalledQueryDto
.
getEmergencyCall
(),
alertCalledQueryDto
.
getDeviceId
(),
alertCalledQueryDto
.
getElevatorAddress
(),
alertCalledQueryDto
.
getAlertType
(),
alertCalledQueryDto
.
getAlertSource
(),
alertCalledQueryDto
.
getAlertStage
(),
alertCalledQueryDto
.
getAlertStatus
());
List
<
AlertCalledQueryDto
>
list
=
pageBean
.
getRecords
();
String
fileName
=
"警情事件记录"
+
System
.
currentTimeMillis
();
String
fileName
=
"警情事件记录"
+
System
.
currentTimeMillis
();
ExcelUtil
.
createTemplate
(
response
,
fileName
,
"警情事件记录"
,
list
,
ExcelUtil
.
createTemplate
(
response
,
fileName
,
"警情事件记录"
,
list
,
AlertCalledQueryDto
.
class
,
null
,
false
);
AlertCalledQueryDto
.
class
,
null
,
false
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/CtiController.java
View file @
2fbf82de
...
@@ -81,10 +81,13 @@ public class CtiController extends BaseController {
...
@@ -81,10 +81,13 @@ public class CtiController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/info/{
connectI
d}"
)
@GetMapping
(
value
=
"/info/{
serviceconnectioni
d}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取通话话单详情"
,
notes
=
"获取通话话单详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取通话话单详情"
,
notes
=
"获取通话话单详情"
)
public
ResponseModel
<
JSONObject
>
getCallInfo
(
@PathVariable
String
connectId
)
{
public
ResponseModel
<
JSONObject
>
getCallInfo
(
@PathVariable
String
serviceconnectionid
)
{
JSONArray
recordInfos
=
ctiService
.
getCallInfo
(
connectId
);
JSONArray
recordInfos
=
ctiService
.
getCallInfo
(
serviceconnectionid
);
if
(
recordInfos
.
size
()
==
0
)
{
throw
new
BadRequest
(
"未找到相关通话信息"
);
}
JSONObject
recordInfo
=
recordInfos
.
getJSONObject
(
0
);
JSONObject
recordInfo
=
recordInfos
.
getJSONObject
(
0
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss.SSSZ"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss.SSSZ"
);
return
ResponseHelper
.
buildResponse
(
recordInfo
);
return
ResponseHelper
.
buildResponse
(
recordInfo
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/VoiceRecordFileController.java
View file @
2fbf82de
...
@@ -116,7 +116,7 @@ public class VoiceRecordFileController extends BaseController {
...
@@ -116,7 +116,7 @@ public class VoiceRecordFileController extends BaseController {
/**
/**
* 新增通话记录
* 新增
-
通话记录
*
*
* @return
* @return
*/
*/
...
@@ -135,13 +135,13 @@ public class VoiceRecordFileController extends BaseController {
...
@@ -135,13 +135,13 @@ public class VoiceRecordFileController extends BaseController {
}
}
JSONObject
recordInfo
=
recordInfos
.
getJSONObject
(
0
);
JSONObject
recordInfo
=
recordInfos
.
getJSONObject
(
0
);
model
.
setTel
(
recordInfo
.
getString
(
"telephone"
));
model
.
setTel
(
recordInfo
.
getString
(
"telephone"
));
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss.SSSZ"
);
Date
telStartTime
=
null
;
Date
telStartTime
=
null
;
Date
telEndTime
=
null
;
Date
telEndTime
=
null
;
try
{
try
{
telStartTime
=
sdf
.
pars
e
(
recordInfo
.
getString
(
"connectTime"
));
telStartTime
=
DateUtils
.
longStr2Dat
e
(
recordInfo
.
getString
(
"connectTime"
));
telEndTime
=
sdf
.
pars
e
(
recordInfo
.
getString
(
"hangupTime"
));
telEndTime
=
DateUtils
.
longStr2Dat
e
(
recordInfo
.
getString
(
"hangupTime"
));
}
catch
(
Parse
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"日期转换错误"
);
throw
new
BadRequest
(
"日期转换错误"
);
}
}
model
.
setTelStartTime
(
telStartTime
);
model
.
setTelStartTime
(
telStartTime
);
...
@@ -152,8 +152,13 @@ public class VoiceRecordFileController extends BaseController {
...
@@ -152,8 +152,13 @@ public class VoiceRecordFileController extends BaseController {
model
.
setFileType
(
"坐席呼出"
);
model
.
setFileType
(
"坐席呼出"
);
}
}
// 获取附件
// 获取附件 需要延时5S
Map
<
String
,
String
>
downloadFile
=
ctiService
.
downLoadRecordFile
(
model
.
getConnectId
());
try
{
Thread
.
sleep
(
5000
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
Map
<
String
,
String
>
downloadFile
=
ctiService
.
downLoadRecordFile
(
recordInfo
.
getString
(
"connectionid"
));
if
(
downloadFile
.
isEmpty
())
{
if
(
downloadFile
.
isEmpty
())
{
throw
new
BadRequest
(
"未找到附件文件"
);
throw
new
BadRequest
(
"未找到附件文件"
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
@@ -27,6 +30,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -27,6 +30,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -148,9 +153,32 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -148,9 +153,32 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
}
@Override
@Override
public
List
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
AlertCalledQueryDto
alertCalledQueryDto
)
{
public
Page
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
IPage
<
AlertCalledQueryDto
>
page
,
List
<
AlertCalledQueryDto
>
list
=
alertCalledMapper
.
queryAlertListByQueryDto
(
alertCalledQueryDto
);
@Condition
(
Operator
.
like
)
String
workOrderNumber
,
return
list
;
@Condition
(
Operator
.
like
)
String
creator
,
@Condition
(
Operator
.
like
)
String
emergency
,
@Condition
(
Operator
.
gt
)
String
emergencyTimeStart
,
@Condition
(
Operator
.
lt
)
String
emergencyTimeEnd
,
@Condition
(
Operator
.
like
)
String
emergencyCall
,
@Condition
(
Operator
.
like
)
String
deviceId
,
@Condition
(
Operator
.
like
)
String
elevatorAddress
,
@Condition
(
Operator
.
eq
)
String
alertType
,
@Condition
(
Operator
.
eq
)
String
alertSource
,
@Condition
(
Operator
.
eq
)
String
alertStage
,
@Condition
(
Operator
.
eq
)
String
alertStatus
)
{
Page
<
List
<
AlertCalledQueryDto
>>
list
=
alertCalledMapper
.
queryAlertListByQueryDto
(
page
,
workOrderNumber
,
creator
,
emergency
,
emergencyTimeStart
,
emergencyTimeEnd
,
emergencyCall
,
deviceId
,
elevatorAddress
,
alertType
,
alertSource
,
alertStage
,
alertStatus
,
null
);
Page
<
AlertCalledQueryDto
>
page1
=
new
Page
<>();
List
<
AlertCalledQueryDto
>
resultDtoList
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
list
.
getRecords
()),
AlertCalledQueryDto
.
class
);
page1
.
setCurrent
(
page
.
getCurrent
());
page1
.
setSize
(
page
.
getSize
());
page1
.
setTotal
(
list
.
getTotal
());
page1
.
setRecords
(
resultDtoList
);
return
page1
;
}
}
@Override
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/CtiServiceImpl.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.AlertCalledMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IAlertCalledService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.ICtiService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.ICtiService
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.FileInfoModel
;
import
org.apache.commons.fileupload.FileItem
;
import
org.apache.commons.fileupload.FileItemFactory
;
import
org.apache.commons.fileupload.disk.DiskFileItemFactory
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.MediaType
;
import
org.springframework.mock.web.MockMultipartFile
;
import
org.springframework.mock.web.MockMultipartFile
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.commons.CommonsMultipartFile
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.security.MessageDigest
;
import
java.security.MessageDigest
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -70,11 +36,14 @@ public class CtiServiceImpl implements ICtiService {
...
@@ -70,11 +36,14 @@ public class CtiServiceImpl implements ICtiService {
*/
*/
private
long
time
=
6000
l
;
private
long
time
=
6000
l
;
private
final
String
APP_KEY
=
"4e805006-3fef-ae43-3915-a153731007c4"
;
@Value
(
"${tzs.cti.appkey}"
)
private
String
APP_KEY
;
private
final
String
SECRET_KEY
=
"7bd29115-99ee-4f7d-1fb1-7c4719d5f43a"
;
@Value
(
"${tzs.cti.secretkey}"
)
private
String
SECRET_KEY
;
private
String
ctiUrl
=
"http://36.46.151.113:8000"
;
@Value
(
"${tzs.cti.url}"
)
private
String
ctiUrl
;
@Override
@Override
public
String
getAccessToken
()
{
public
String
getAccessToken
()
{
...
@@ -144,11 +113,11 @@ public class CtiServiceImpl implements ICtiService {
...
@@ -144,11 +113,11 @@ public class CtiServiceImpl implements ICtiService {
}
}
@Override
@Override
public
JSONArray
getCallInfo
(
String
connectionid
)
{
public
JSONArray
getCallInfo
(
String
service
connectionid
)
{
String
token
=
this
.
getAccessToken
();
String
token
=
this
.
getAccessToken
();
String
url
=
ctiUrl
+
"/onOpenAuth/cti/openApi/query
call
list1"
;
String
url
=
ctiUrl
+
"/onOpenAuth/cti/openApi/query
service
list1"
;
JSONObject
params
=
new
JSONObject
();
JSONObject
params
=
new
JSONObject
();
params
.
put
(
"
connectionid"
,
connectionid
);
params
.
put
(
"
serviceconnectionid"
,
service
connectionid
);
Map
<
String
,
String
>
header
=
new
HashMap
<>();
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
"accessToken"
,
token
);
header
.
put
(
"accessToken"
,
token
);
String
responseStr
=
HttpUtils
.
doPostWithHeader
(
url
,
params
.
toJSONString
(),
header
);
String
responseStr
=
HttpUtils
.
doPostWithHeader
(
url
,
params
.
toJSONString
(),
header
);
...
...
amos-boot-module/amos-boot-module-biz/pom.xml
View file @
2fbf82de
...
@@ -32,6 +32,12 @@
...
@@ -32,6 +32,12 @@
<groupId>
org.springframework
</groupId>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-mock
</artifactId>
<artifactId>
spring-mock
</artifactId>
<version>
2.0.8
</version>
<version>
2.0.8
</version>
<exclusions>
<exclusion>
<artifactId>
servlet-api
</artifactId>
<groupId>
javax.servlet
</groupId>
</exclusion>
</exclusions>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
2fbf82de
...
@@ -97,5 +97,62 @@
...
@@ -97,5 +97,62 @@
ADD COLUMN maintenance_period VARCHAR ( 10 ) COMMENT '维保周期';
ADD COLUMN maintenance_period VARCHAR ( 10 ) COMMENT '维保周期';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"chenhao"
id=
"2021-08-26-chenhao-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"cb_firefighters_contract"
columnName=
"start_time"
/>
</not>
</preConditions>
<comment>
modify table cb_firefighters_contract add one columns
</comment>
<sql>
ALTER TABLE `cb_firefighters_contract` ADD start_time date COMMENT '起始时间';
</sql>
</changeSet>
<changeSet
author=
"tb"
id=
"2021-08-27-tb-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"jc_rally_point"
/>
</not>
</preConditions>
<comment>
create table jc_rally_point
</comment>
<sql>
CREATE TABLE `jc_rally_point` (
`sequence_nbr` bigint(30) NOT NULL COMMENT '主键',
`name` varchar(100) DEFAULT NULL COMMENT '名称',
`address` varchar(255) DEFAULT NULL COMMENT '地址',
`alert_id` bigint(30) NOT NULL COMMENT '警情id',
`longitude` varchar(20) NOT NULL COMMENT '经度',
`latitude` varchar(20) NOT NULL COMMENT '纬度',
`rec_user_id` bigint(30) NOT NULL COMMENT '更新用户id',
`rec_user_name` varchar(30) NOT NULL COMMENT '更新用户名称',
`rec_date` datetime NOT NULL COMMENT '更新日期',
`is_delete` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除(1:删除,0:未删除)',
PRIMARY KEY (`sequence_nbr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集结点';
</sql>
</changeSet>
<changeSet
author=
"tb"
id=
"2021-08-27-tb-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"jc_alert_location_log"
/>
</not>
</preConditions>
<comment>
create table jc_alert_location_log
</comment>
<sql>
CREATE TABLE `jc_alert_location_log` (
`sequence_nbr` bigint(30) NOT NULL COMMENT '主键',
`alert_id` bigint(30) NOT NULL COMMENT '警情id',
`longitude` varchar(30) NOT NULL COMMENT '经度',
`latitude` varchar(30) NOT NULL COMMENT '纬度',
`rec_user_id` bigint(30) NOT NULL COMMENT '更新人员id',
`rec_user_name` varchar(50) NOT NULL COMMENT '更新人员名称',
`rec_date` datetime NOT NULL COMMENT '更新时间',
`is_delete` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除(1: 已删除,0:未删除)',
PRIMARY KEY (`sequence_nbr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
amos-boot-system-maintenance/src/main/java/com/yeejoin/amos/MaintenanceApplication.java
View file @
2fbf82de
package
com
.
yeejoin
.
amos
;
package
com
.
yeejoin
.
amos
;
import
java.io.IOException
;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -18,13 +13,20 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
...
@@ -18,13 +13,20 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.restful.config.JsonSerializerManage
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
java.io.IOException
;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
/**
/**
* <pre>
* <pre>
* 服务启动类
* 服务启动类
...
@@ -42,8 +44,9 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
...
@@ -42,8 +44,9 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
@EnableFeignClients
@EnableFeignClients
@EnableAsync
@EnableAsync
@EnableEurekaClient
@EnableEurekaClient
@ComponentScan
({
"org.typroject"
,
"com.yeejoin.amos"
})
@ComponentScan
(
value
=
{
"org.typroject"
,
"com.yeejoin.amos"
},
excludeFilters
=
{
@MapperScan
(
basePackages
=
{
"com.yeejoin.amos.maintenance.business.dao.mapper"
,
"org.typroject.tyboot.core.auth.face.orm.dao"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
@ComponentScan
.
Filter
(
type
=
FilterType
.
ASSIGNABLE_TYPE
,
classes
=
{
JsonSerializerManage
.
class
})})
@MapperScan
(
basePackages
=
{
"com.yeejoin.amos.maintenance.business.dao.mapper"
,
"org.typroject.tyboot.core.auth.face.orm.dao"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
public
class
MaintenanceApplication
{
public
class
MaintenanceApplication
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MaintenanceApplication
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MaintenanceApplication
.
class
);
...
@@ -61,9 +64,9 @@ public class MaintenanceApplication {
...
@@ -61,9 +64,9 @@ public class MaintenanceApplication {
* @throws IOException
* @throws IOException
* @throws URISyntaxException
* @throws URISyntaxException
*/
*/
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
logger
.
info
(
"start Service.........."
);
logger
.
info
(
"start Service.........."
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
MaintenanceApplication
.
class
,
args
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
MaintenanceApplication
.
class
,
args
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
Environment
env
=
context
.
getEnvironment
();
Environment
env
=
context
.
getEnvironment
();
String
ip
=
InetAddress
.
getLocalHost
().
getHostAddress
();
String
ip
=
InetAddress
.
getLocalHost
().
getHostAddress
();
...
...
amos-boot-system-maintenance/src/main/resources/db/changelog/mt-1.0.0.xml
View file @
2fbf82de
...
@@ -190,4 +190,48 @@
...
@@ -190,4 +190,48 @@
ALTER TABLE p_plan_task add COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '维保公司名称';
ALTER TABLE p_plan_task add COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '维保公司名称';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1630291249911-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check"
columnName=
"risk_and_manage"
/>
</not>
</preConditions>
<comment>
p_check add COLUMN risk_and_manage '风险辨识与管控措施'
</comment>
<sql>
ALTER TABLE p_check add COLUMN `risk_and_manage` varchar(255) DEFAULT NULL COMMENT '风险辨识与管控措施' after `point_no`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1630291249911-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check"
columnName=
"begin_time"
/>
</not>
</preConditions>
<comment>
p_check add COLUMN begin_time '开始时间'
</comment>
<sql>
ALTER TABLE p_check add COLUMN `begin_time` datetime DEFAULT NULL COMMENT '开始时间' after `plan_task_detail_id`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1630291249911-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check"
columnName=
"end_time"
/>
</not>
</preConditions>
<comment>
p_check add COLUMN end_time '结束时间'
</comment>
<sql>
ALTER TABLE p_check add COLUMN `end_time` datetime DEFAULT NULL COMMENT '结束时间' after `begin_time`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1630291249911-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check"
columnName=
"owner_name"
/>
</not>
</preConditions>
<comment>
p_check add COLUMN owner_name '业主单位名称'
</comment>
<sql>
ALTER TABLE p_check add COLUMN `owner_name` varchar(255) DEFAULT NULL COMMENT '业主单位名称' after `owner_id`;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
2fbf82de
...
@@ -266,7 +266,7 @@
...
@@ -266,7 +266,7 @@
ELSE
ELSE
0
0
END
END
),0) AS
"qualified"
,
),0) AS
'合格'
,
COALESCE(SUM(
COALESCE(SUM(
CASE
CASE
WHEN is_ok = '2' THEN
WHEN is_ok = '2' THEN
...
@@ -274,7 +274,7 @@
...
@@ -274,7 +274,7 @@
ELSE
ELSE
0
0
END
END
),0) AS
"unqualified"
,
),0) AS
'不合格'
,
COALESCE(SUM(
COALESCE(SUM(
CASE
CASE
WHEN is_ok = '3' THEN
WHEN is_ok = '3' THEN
...
@@ -282,8 +282,7 @@
...
@@ -282,8 +282,7 @@
ELSE
ELSE
0
0
END
END
),0) AS "omission",
),0) AS '漏检'
COUNT(id) count
FROM
FROM
p_check
p_check
<include
refid=
"calendar-where"
/>
<include
refid=
"calendar-where"
/>
...
@@ -1913,12 +1912,13 @@
...
@@ -1913,12 +1912,13 @@
pp.belong_system_name systemName,
pp.belong_system_name systemName,
pp.address address,
pp.address address,
pp.original_id equipId,
pp.original_id equipId,
CONCAT
(pp.address, pp.building_name
) buildingName,
CONCAT
_WS('',pp.building_name,pp.address
) buildingName,
pc.org_code AS orgCode
pc.org_code AS orgCode
FROM p_check pc
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_point pp ON pp.id = pc.point_id
) a
) a
<include
refid=
"mobile-check-record-where"
/>
<include
refid=
"mobile-check-record-where"
/>
order by checkDate
limit #{offset},#{pageSize}
limit #{offset},#{pageSize}
</select>
</select>
...
@@ -1948,30 +1948,30 @@
...
@@ -1948,30 +1948,30 @@
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != '' "
>
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != '' "
>
AND (
AND (
(
(
a.
beginTim
e
<![CDATA[>=]]>
#{beginTime}
a.
checkDat
e
<![CDATA[>=]]>
#{beginTime}
AND a.
endTim
e
<![CDATA[<=]]>
#{endTime}
AND a.
checkDat
e
<![CDATA[<=]]>
#{endTime}
)
)
OR (
OR (
a.
beginTim
e
<![CDATA[<=]]>
#{endTime}
a.
checkDat
e
<![CDATA[<=]]>
#{endTime}
AND a.
endTim
e
<![CDATA[>=]]>
#{endTime}
AND a.
checkDat
e
<![CDATA[>=]]>
#{endTime}
)
)
OR (
OR (
a.
beginTim
e
<![CDATA[<=]]>
#{beginTime}
a.
checkDat
e
<![CDATA[<=]]>
#{beginTime}
AND a.
endTim
e
<![CDATA[>]]>
#{beginTime}
AND a.
checkDat
e
<![CDATA[>]]>
#{beginTime}
)
)
OR (
OR (
a.
beginTim
e
<![CDATA[<=]]>
#{beginTime}
a.
checkDat
e
<![CDATA[<=]]>
#{beginTime}
AND a.
endTim
e
<![CDATA[>=]]>
#{endTime}
AND a.
checkDat
e
<![CDATA[>=]]>
#{endTime}
)
)
)
)
</if>
</if>
<choose>
<choose>
<when
test=
"identityType==1"
>
<when
test=
"identityType==1"
>
And (a.orgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.orgCode= #{orgCode} )
And (a.orgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.orgCode= #{orgCode} )
<if
test=
"companyId != null
"
>
and a.ownerId = #{team
Id}
</if>
<if
test=
"companyId != null
and companyId != ''"
>
and a.ownerId = #{company
Id}
</if>
</when>
</when>
<when
test=
"identityType==2"
>
<when
test=
"identityType==2"
>
And a.ownerId = #{
team
Id}
And a.ownerId = #{
company
Id}
</when>
</when>
</choose>
</choose>
</where>
</where>
...
@@ -2014,52 +2014,40 @@
...
@@ -2014,52 +2014,40 @@
pp.belong_system_id systemId,
pp.belong_system_id systemId,
pp.belong_system_name systemName,
pp.belong_system_name systemName,
pp.address address,
pp.address address,
CONCAT
(pp.address, pp.building_name
) buildingName,
CONCAT
_WS('',pp.building_name,pp.address
) buildingName,
pc.org_code AS orgCode
pc.org_code AS orgCode
FROM p_check pc
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_point pp ON pp.id = pc.point_id
) a
) a
<include
refid=
"mobile-check-record-where"
/>
<include
refid=
"mobile-check-record-where"
/>
</select>
</select>
<select
id=
"getCheckDetail"
resultType=
"Map"
>
<select
id=
"getCheckDetail"
resultType=
"Map"
>
SELECT
SELECT
pc.id checkId,
pc.id,
pci.is_ok isOk,
pc.point_name as pointName,
pc.point_no as pointNo,
pc.is_ok isOk,
CONCAT_WS(',',pc.building_name,pc.address) address,
pc.user_name as userName,
pc.plan_id as planId,
pc.plan_name as planName,
pc.plan_type as planType,
pc.owner_name as ownerName,
date_format(
date_format(
pc.check_time,
pc.begin_time,
'%Y-%m-%d %H:%i:%s'
'%Y-%m-%d %H:%i:%s'
) maintenanceDate,
) as beginTime,
pp.id pointId,
date_format(
pp.equipment_id equipmentId,
pc.end_time,
pp.remark remark,
'%Y-%m-%d %H:%i:%s'
pp.owner_name ownerName,
) as endTime,
pp.equipment_name equipmentName,
date_format(
pp.belong_system_id systemId,
pc.check_time,
pp.belong_system_name systemName,
'%Y-%m-%d %H:%i:%s'
CONCAT_WS(',',pp.building_name,pp.address) address,
) as checkTime,
CONCAT(date_format(
pc.risk_and_manage as riskAndManage,
ppl.plan_begin,
pc.remark
'%Y-%m-%d %H:%i:%s'
), '-', date_format(
ppl.plan_end,
'%Y-%m-%d %H:%i:%s'
)) planDate,
ppl.name planName,
pp.plan_type planType,
ppt.user_name planUser,
pci.input_name itemName,
pii.maintenance_content itemContent,
pcs.photo_data picture,
pcs.point_name pointName,
pcs.shot_type shotType
FROM p_check pc
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_plan ppl ON ppl.id = pc.plan_id
LEFT JOIN p_check_input pci ON pci.check_id = pc.id
LEFT JOIN p_input_item pii ON pii.id = pci.input_id
LEFT JOIN p_check_shot pcs ON pcs.check_id = pc.id
LEFT JOIN p_plan_task ppt ON ppt.id = pc.plan_task_id
WHERE
WHERE
pc.id = #{id}
pc.id = #{id}
</select>
</select>
...
...
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
2fbf82de
...
@@ -392,6 +392,9 @@
...
@@ -392,6 +392,9 @@
temp1.pointNo,
temp1.pointNo,
temp1.buildingName,
temp1.buildingName,
temp1.equipmentName,
temp1.equipmentName,
temp1.remark as riskAndManage,
temp1.address,
temp1.ownerName,
pii.`name` inputName,
pii.`name` inputName,
temp2.*
temp2.*
FROM
FROM
...
@@ -410,9 +413,12 @@
...
@@ -410,9 +413,12 @@
r.name as routeName,
r.name as routeName,
p.name as pointName,
p.name as pointName,
p.owner_id as ownerId,
p.owner_id as ownerId,
p.owner_name as ownerName,
p.point_no as pointNo,
p.point_no as pointNo,
p.building_name as buildingName,
p.building_name as buildingName,
p.equipment_name as equipmentName
p.equipment_name as equipmentName,
p.remark,
p.address
FROM
FROM
p_route_point_item prpi
p_route_point_item prpi
LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id
LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id
...
@@ -430,7 +436,7 @@
...
@@ -430,7 +436,7 @@
ptd.plan_id planId,
ptd.plan_id planId,
ptd.user_id AS userId,
ptd.user_id AS userId,
ptd.org_code AS orgCode,
ptd.org_code AS orgCode,
ptd.
end_time AS end
Time,
ptd.
begin_time AS begin
Time,
ptd.end_time AS endTime,
ptd.end_time AS endTime,
ptd.company_id as companyId,
ptd.company_id as companyId,
ptd.company_name as companyName,
ptd.company_name as companyName,
...
...
amos-boot-system-supervision/src/main/resources/application-dev.properties
View file @
2fbf82de
...
@@ -3,7 +3,7 @@ spring.datasource.url = jdbc:mysql://172.16.11.20:3306/amos-supervision_v1.0?use
...
@@ -3,7 +3,7 @@ spring.datasource.url = jdbc:mysql://172.16.11.20:3306/amos-supervision_v1.0?use
spring.datasource.username
=
root
spring.datasource.username
=
root
spring.datasource.password
=
root_123
spring.datasource.password
=
root_123
## eureka properties:
## eureka properties:
eureka.client.serviceUrl.defaultZone
=
http://172.16.1
0.72
:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://172.16.1
1.20
:10001/eureka/
security.password
=
a1234560
security.password
=
a1234560
security.loginId
=
jc_wjk006
security.loginId
=
jc_wjk006
...
@@ -12,10 +12,10 @@ security.productApp=STUDIO_APP_MOBILE
...
@@ -12,10 +12,10 @@ security.productApp=STUDIO_APP_MOBILE
security.appKey
=
studio_normalapp_3168830
security.appKey
=
studio_normalapp_3168830
#redis 配置
#redis 配置
spring.redis.database
=
0
spring.redis.database
=
1
spring.redis.host
=
172.16.1
0.85
spring.redis.host
=
172.16.1
1.20
spring.redis.port
=
6379
spring.redis.port
=
6379
spring.redis.password
=
amos2019Redis
spring.redis.password
=
1234560
spring.redis.jedis.pool.max-active
=
200
spring.redis.jedis.pool.max-active
=
200
spring.redis.jedis.pool.max-wait
=
-1
spring.redis.jedis.pool.max-wait
=
-1
spring.redis.jedis.pool.max-idle
=
10
spring.redis.jedis.pool.max-idle
=
10
...
@@ -45,9 +45,9 @@ linux.img.path = /
...
@@ -45,9 +45,9 @@ linux.img.path = /
## emqx
## emqx
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}-1
emqx.broker
=
tcp://172.16.1
0.85
:1883
emqx.broker
=
tcp://172.16.1
1.33
:1883
emqx.user-name
=
super
emqx.user-name
=
admin
emqx.password
=
a123456
emqx.password
=
public
emqx.max-inflight
=
1000
emqx.max-inflight
=
1000
file.url
=
http://39.98.45.134:9000/
file.url
=
http://39.98.45.134:9000/
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
2fbf82de
...
@@ -1894,7 +1894,7 @@
...
@@ -1894,7 +1894,7 @@
d.date
d.date
</select>
</select>
<select
id=
"getItemCount"
resultType=
"
Map
"
>
<select
id=
"getItemCount"
resultType=
"
long
"
>
SELECT
SELECT
count(1)
count(1)
FROM
FROM
...
@@ -1934,19 +1934,19 @@
...
@@ -1934,19 +1934,19 @@
pc.id = pci.check_id
pc.id = pci.check_id
AND pc.plan_task_detail_id = pptd.id
AND pc.plan_task_detail_id = pptd.id
AND pc.plan_id = #{planId}
AND pc.plan_id = #{planId}
<if
test=
"pointId != null and pointId != ''"
>
<if
test=
"pointId != null and pointId != ''
and pointId != -1
"
>
AND pc.point_id = #{pointId}
AND pc.point_id = #{pointId}
</if>
</if>
<if
test=
"
executeState != null and executeState
!= ''"
>
<if
test=
"
status != null and status
!= ''"
>
AND pptd.is_finish = #{
executeState
}
AND pptd.is_finish = #{
status
}
</if>
</if>
<!-- <if test="status != null and status != ''">-->
<!-- <if test="status != null and status != ''">-->
<!-- AND pc.point_id = #{status}-->
<!-- AND pc.point_id = #{status}-->
<!-- </if>-->
<!-- </if>-->
<if
test=
"
teamId != null and teamId
!= ''"
>
<if
test=
"
companyName != null and companyName
!= ''"
>
AND pc.company_
id = #{teamId
}
AND pc.company_
name = #{company_name
}
</if>
</if>
LIMIT
limit #{offset},#{pageSize}
limit #{offset},#{pageSize}
</select>
</select>
<select
id=
"getPlanExecuteTeams"
resultType=
"Map"
>
<select
id=
"getPlanExecuteTeams"
resultType=
"Map"
>
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
2fbf82de
...
@@ -119,13 +119,13 @@
...
@@ -119,13 +119,13 @@
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<
if
test=
"orgCode!=null"
>
and a.org_Code = #{orgCode}
</if
>
<
!-- <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>--
>
<if
test=
"itemClassify != null"
>
and a.item_classify = #{itemClassify}
</if>
<if
test=
"itemClassify != null"
>
and a.item_classify = #{itemClassify}
</if>
order by a.id desc
order by a.id desc
<choose>
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</choose>
</select>
</select>
<select
id=
"getInputItemListByNames"
resultMap=
"inputItemMap"
parameterType=
"String"
>
<select
id=
"getInputItemListByNames"
resultMap=
"inputItemMap"
parameterType=
"String"
>
...
@@ -296,4 +296,13 @@
...
@@ -296,4 +296,13 @@
<update
id=
"updatePointById"
parameterType=
"map"
>
<update
id=
"updatePointById"
parameterType=
"map"
>
update p_input_item SET item_start = #{itemStart} WHERE id = #{id}
update p_input_item SET item_start = #{itemStart} WHERE id = #{id}
</update>
</update>
<select
id=
"getIds"
resultType=
"long"
>
SELECT
id
FROM
p_input_item
WHERE
is_delete = 0
</select>
</mapper>
</mapper>
\ No newline at end of file
amos-boot-system-tzs/src/main/resources/application-dev.properties
View file @
2fbf82de
...
@@ -40,4 +40,8 @@ emqx.password=a123456
...
@@ -40,4 +40,8 @@ emqx.password=a123456
## redisʱʱ
## redisʱʱ
redis.cache.failure.time
=
10800
redis.cache.failure.time
=
10800
failure.work.flow.processDefinitionKey
=
malfunction_repair
failure.work.flow.processDefinitionKey
=
malfunction_repair
\ No newline at end of file
tzs.cti.appkey
=
4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey
=
7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url
=
http://36.46.151.113:8000
\ No newline at end of file
pom.xml
View file @
2fbf82de
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<springboot.version>
2.3.11.RELEASE
</springboot.version>
<springboot.version>
2.3.11.RELEASE
</springboot.version>
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<tyboot-version>
1.1.20
Ty-SNAPSHOT
</tyboot-version>
<tyboot-version>
1.1.20
</tyboot-version>
<amos.version>
1.6.0
</amos.version>
<amos.version>
1.6.0
</amos.version>
<itext.version>
7.1.1
</itext.version>
<itext.version>
7.1.1
</itext.version>
</properties>
</properties>
...
...
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