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
ac42d664
Commit
ac42d664
authored
Jun 24, 2022
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into develop_dl_plan6
parents
91d4d096
53cb5759
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
517 additions
and
61 deletions
+517
-61
RuleTypeEnum.java
.../com/yeejoin/amos/boot/biz/common/enums/RuleTypeEnum.java
+1
-1
FireEquipmentSignalLog.java
...os/boot/module/ccs/api/entity/FireEquipmentSignalLog.java
+12
-0
MqttReceiveService.java
.../amos/boot/module/ccs/api/service/MqttReceiveService.java
+13
-0
MqttDataVO.java
...a/com/yeejoin/amos/boot/module/ccs/api/vo/MqttDataVO.java
+19
-0
FireEquipmentSignalLogMapper.xml
...rc/main/resources/mapper/FireEquipmentSignalLogMapper.xml
+3
-0
WaterResourceMapper.java
...os/boot/module/common/api/mapper/WaterResourceMapper.java
+1
-1
WaterResourceMapper.xml
...mon-api/src/main/resources/mapper/WaterResourceMapper.xml
+6
-0
CommonPageInfoParam.java
...yeejoin/equipmanage/common/utils/CommonPageInfoParam.java
+10
-0
CommonPageParamUtil.java
...yeejoin/equipmanage/common/utils/CommonPageParamUtil.java
+3
-1
PowerTransferMapper.xml
...jcs-api/src/main/resources/mapper/PowerTransferMapper.xml
+3
-1
pom.xml
...ule/amos-boot-module-biz/amos-boot-module-ccs-biz/pom.xml
+5
-0
CcsMqttReceiveConfig.java
...amos/boot/module/ccs/biz/config/CcsMqttReceiveConfig.java
+115
-0
FireEquipmentSignalLogServiceImpl.java
...s/biz/service/impl/FireEquipmentSignalLogServiceImpl.java
+21
-0
MqttReceiveServiceImpl.java
...t/module/ccs/biz/service/impl/MqttReceiveServiceImpl.java
+61
-0
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+3
-2
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+31
-6
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+2
-2
EquipmentAlarmController.java
...join/equipmanage/controller/EquipmentAlarmController.java
+12
-1
MaintenanceResourceController.java
...equipmanage/controller/MaintenanceResourceController.java
+2
-1
MaintenanceResourceDataController.java
...pmanage/controller/MaintenanceResourceDataController.java
+2
-1
JcsFeign.java
...src/main/java/com/yeejoin/equipmanage/fegin/JcsFeign.java
+2
-1
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+2
-2
MaintenanceResourceDataMapper.java
...oin/equipmanage/mapper/MaintenanceResourceDataMapper.java
+2
-0
IMaintenanceResourceService.java
...join/equipmanage/service/IMaintenanceResourceService.java
+1
-1
MaintenanceResourceServiceImpl.java
...ipmanage/service/impl/MaintenanceResourceServiceImpl.java
+11
-6
pom.xml
...ule/amos-boot-module-biz/amos-boot-module-jcs-biz/pom.xml
+2
-2
ElasticSearchClientConfig.java
...boot/module/jcs/biz/config/ElasticSearchClientConfig.java
+26
-4
PlanTaskController.java
...s/maintenance/business/controller/PlanTaskController.java
+9
-0
PlanTaskMapper.java
.../amos/maintenance/business/dao/mapper/PlanTaskMapper.java
+2
-0
ICheckInputDao.java
...s/maintenance/business/dao/repository/ICheckInputDao.java
+3
-0
IPlanTaskDetailDao.java
...intenance/business/dao/repository/IPlanTaskDetailDao.java
+4
-0
IRoutePointDao.java
...s/maintenance/business/dao/repository/IRoutePointDao.java
+3
-0
CheckServiceImpl.java
...s/maintenance/business/service/impl/CheckServiceImpl.java
+3
-1
PlanTaskServiceImpl.java
...aintenance/business/service/impl/PlanTaskServiceImpl.java
+29
-8
RulePlanService.java
...os/maintenance/business/service/impl/RulePlanService.java
+17
-3
IPlanTaskService.java
.../maintenance/business/service/intfc/IPlanTaskService.java
+7
-0
application-dev.properties
...-system-ccs/src/main/resources/application-dev.properties
+16
-10
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+7
-0
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+12
-0
MaintenanceResourceDataMapper.xml
...c/main/resources/mapper/MaintenanceResourceDataMapper.xml
+12
-1
check-report-template.docx
...s/src/main/resources/templates/check-report-template.docx
+0
-0
dbTemplate_plan_task.xml
...nce/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+11
-0
pom.xml
pom.xml
+11
-5
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/enums/RuleTypeEnum.java
View file @
ac42d664
...
...
@@ -15,7 +15,7 @@ public enum RuleTypeEnum {
计划审核任务
(
"计划审核"
,
"planAudit"
,
"auditPage"
,
RuleConstant
.
APP_WEB
,
RuleConstant
.
TASK
),
计划审核完成
(
"计划审核完成"
,
"planAuditAll"
,
"formulatePage"
,
RuleConstant
.
APP_WEB
,
RuleConstant
.
TASK
),
消息型计划生成
(
"计划生成"
,
"addPlanTask"
,
null
,
RuleConstant
.
APP
,
RuleConstant
.
NOTIFY
),
任务型计划生成
(
"计划生成"
,
"addPlanTask"
,
null
,
RuleConstant
.
APP
,
RuleConstant
.
TASK
),
任务型计划生成
(
"计划生成"
,
"addPlanTask"
,
"TaskDetail"
,
RuleConstant
.
APP
,
RuleConstant
.
TASK
),
计划完成
(
"计划完成"
,
"planCompleted"
,
null
,
RuleConstant
.
APP_WEB
,
RuleConstant
.
NOTIFY
),
// 隐患
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/java/com/yeejoin/amos/boot/module/ccs/api/entity/FireEquipmentSignalLog.java
View file @
ac42d664
...
...
@@ -184,4 +184,16 @@ public class FireEquipmentSignalLog extends BaseEntity {
*/
private
String
protectedObjectName
;
/**
* 上报信号标识(每次信号都有唯一的标识,与站内报警数据进行关联)
*/
@TableField
(
"signal_id"
)
private
String
signalId
;
/**
* 问题编号
*/
@TableField
(
"question_num"
)
private
String
questionNum
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/java/com/yeejoin/amos/boot/module/ccs/api/service/MqttReceiveService.java
0 → 100644
View file @
ac42d664
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
api
.
service
;
public
interface
MqttReceiveService
{
/**
* 增量数据处理
* @param topic 主题
* @param message 消息内容
*/
void
handlerMqttIncrementMessage
(
String
topic
,
String
message
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/java/com/yeejoin/amos/boot/module/ccs/api/vo/MqttDataVO.java
0 → 100644
View file @
ac42d664
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
api
.
vo
;
import
lombok.Data
;
/**
* @author keyong
* @title: IotDataVO
* <pre>
* @description: 物联系统发送的增量数据封装VO
* </pre>
* @date 2021/1/7 17:44
*/
@Data
public
class
MqttDataVO
{
private
String
key
;
private
Object
value
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/resources/mapper/FireEquipmentSignalLogMapper.xml
View file @
ac42d664
...
...
@@ -40,6 +40,9 @@
where
a.station_code = s.code
and s.status = false
<if
test=
"isAlarm != null"
>
and is_alarm = #{isAlarm}
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
and a.station_code = #{stationCode}
</if>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/WaterResourceMapper.java
View file @
ac42d664
...
...
@@ -47,7 +47,7 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
*/
Page
<
WaterResourceDto
>
getWaterResourcePageByParams
(
Page
<
WaterResourceDto
>
page
,
String
name
,
String
resourceType
,
ArrayList
<
Long
>
belongBuildingId
,
Long
belongFightingSystemId
,
Long
sequenceNbr
,
String
equipId
,
String
bizOrgCode
,
String
equipCateGoryCode
);
Long
sequenceNbr
,
String
equipId
,
String
bizOrgCode
,
String
equipCateGoryCode
,
List
<
String
>
ids
);
List
<
Map
<
String
,
Object
>>
getWaterTypeByBizOrgCode
(
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/WaterResourceMapper.xml
View file @
ac42d664
...
...
@@ -151,6 +151,12 @@
<if
test=
"belongBuildingId != null and belongBuildingId.size() > 0"
>
and find_in_set(belong_building_id, #{belongBuildingId}) > 0
</if>
<if
test=
"ids != null and ids.size()>0"
>
AND sequence_nbr NOT IN
<foreach
collection=
"ids"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and biz_org_code like concat( #{bizOrgCode}, '%')
</if>
order by cb_water_resource.rec_date desc
</select>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/CommonPageInfoParam.java
View file @
ac42d664
...
...
@@ -111,6 +111,8 @@ public class CommonPageInfoParam extends CommonPageable {
private
String
status
;
private
String
bizOrgCode
;
private
String
isRemoveShield
;
private
String
isFireAlarm
;
...
...
@@ -198,6 +200,14 @@ public class CommonPageInfoParam extends CommonPageable {
public
void
setEquipType
(
String
equipType
)
{
this
.
equipType
=
equipType
;
}
public
void
setBizOrgCode
(
String
bizOrgCode
)
{
this
.
bizOrgCode
=
bizOrgCode
;
}
public
String
getBizOrgCode
()
{
return
bizOrgCode
;
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/CommonPageParamUtil.java
View file @
ac42d664
...
...
@@ -63,7 +63,9 @@ public class CommonPageParamUtil {
param
.
setIsRemoveShield
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"isRemovedFire"
.
equals
(
name
)){
param
.
setIsRemovedFire
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
}
else
if
(
"bizOrgCode"
.
equals
(
name
)){
param
.
setBizOrgCode
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
}
if
(
commonPageable
!=
null
){
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/PowerTransferMapper.xml
View file @
ac42d664
...
...
@@ -168,12 +168,14 @@
SELECT DISTINCT
b.company_name companyName,
c.resources_name carName,
c.resources_num carNum
c.resources_num carNum,
u.amos_user_name `user`
FROM
jc_power_transfer a
LEFT JOIN jc_power_transfer_company b ON a.sequence_nbr = b.power_transfer_id
LEFT JOIN jc_power_transfer_company_resources c ON c.power_transfer_company_id = b.sequence_nbr
LEFT JOIN jc_user_car u ON c.resources_id = u.car_id
WHERE
a.alert_called_id = ${id}
</select>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/pom.xml
View file @
ac42d664
...
...
@@ -16,6 +16,11 @@
<artifactId>
amos-boot-module-ccs-api
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
5.6.3
</version>
</dependency>
</dependencies>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/config/CcsMqttReceiveConfig.java
0 → 100644
View file @
ac42d664
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
config
;
import
com.github.pagehelper.util.StringUtil
;
import
com.yeejoin.amos.boot.module.ccs.api.service.MqttReceiveService
;
import
org.eclipse.paho.client.mqttv3.MqttConnectOptions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.integration.annotation.IntegrationComponentScan
;
import
org.springframework.integration.annotation.ServiceActivator
;
import
org.springframework.integration.channel.DirectChannel
;
import
org.springframework.integration.core.MessageProducer
;
import
org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory
;
import
org.springframework.integration.mqtt.core.MqttPahoClientFactory
;
import
org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter
;
import
org.springframework.integration.mqtt.support.DefaultPahoMessageConverter
;
import
org.springframework.messaging.MessageChannel
;
import
org.springframework.messaging.MessageHandler
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author keyong
* @title: CcsMqttReceiveConfig
* <pre>
* @description: MQTT订阅模式消费类
* </pre>
* @date 2020/10/29 19:23
*/
@Configuration
@IntegrationComponentScan
public
class
CcsMqttReceiveConfig
{
@Value
(
"${emqx.user-name}"
)
private
String
userName
;
@Value
(
"${emqx.password}"
)
private
String
password
;
@Value
(
"${emqx.broker}"
)
private
String
hostUrl
;
@Value
(
"${emqx.client-id}"
)
private
String
clientId
;
@Value
(
"${mqtt.topic}"
)
private
String
defaultTopic
;
// @Value("${spring.mqtt.completionTimeout}")
// private int completionTimeout;
// 全局变量adapter
public
MqttPahoMessageDrivenChannelAdapter
adapter
;
@Autowired
public
MqttReceiveService
mqttReceiveService
;
@Bean
public
MqttConnectOptions
getMqttConnectOptions
()
{
MqttConnectOptions
mqttConnectOptions
=
new
MqttConnectOptions
();
mqttConnectOptions
.
setUserName
(
userName
);
mqttConnectOptions
.
setPassword
(
password
.
toCharArray
());
mqttConnectOptions
.
setServerURIs
(
new
String
[]{
hostUrl
});
mqttConnectOptions
.
setKeepAliveInterval
(
20
);
mqttConnectOptions
.
setAutomaticReconnect
(
true
);
// mqttConnectOptions.setConnectionTimeout(0);
return
mqttConnectOptions
;
}
@Bean
public
MqttPahoClientFactory
mqttPahoClientFactory
()
{
DefaultMqttPahoClientFactory
factory
=
new
DefaultMqttPahoClientFactory
();
factory
.
setConnectionOptions
(
getMqttConnectOptions
());
return
factory
;
}
// 接收通道
@Bean
public
MessageChannel
mqttInputChannel
()
{
return
new
DirectChannel
();
}
//配置client,监听的topic
@Bean
public
MessageProducer
inbound
()
{
adapter
=
new
MqttPahoMessageDrivenChannelAdapter
(
clientId
,
mqttPahoClientFactory
(),
defaultTopic
);
// adapter.setCompletionTimeout(completionTimeout);
adapter
.
setConverter
(
new
DefaultPahoMessageConverter
());
adapter
.
setQos
(
0
);
adapter
.
setOutputChannel
(
mqttInputChannel
());
return
adapter
;
}
//通过通道获取数据
@Bean
@ServiceActivator
(
inputChannel
=
"mqttInputChannel"
)
public
MessageHandler
handler
()
{
return
message
->
{
String
topic
=
message
.
getHeaders
().
get
(
"mqtt_receivedTopic"
).
toString
();
String
msg
=
message
.
getPayload
().
toString
();
// int endIndex = topic.lastIndexOf("/");
// if (endIndex > 0 && StringUtil.isNotEmpty(String.valueOf(message))) {
// String dataType = topic.substring(endIndex + 1);
// if (dataType.equals("property") && StringUtil.isNotEmpty(msg)) {
mqttReceiveService
.
handlerMqttIncrementMessage
(
topic
,
msg
);
// }
// }
};
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/service/impl/FireEquipmentSignalLogServiceImpl.java
View file @
ac42d664
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireEquipmentSignalLogDto
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireEquipmentSignalLog
;
import
com.yeejoin.amos.boot.module.ccs.api.mapper.FireEquipmentSignalLogMapper
;
import
com.yeejoin.amos.boot.module.ccs.api.service.IFireEquipmentSignalLogService
;
import
com.yeejoin.amos.boot.module.ccs.biz.util.RequestUtil
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -47,4 +49,22 @@ public class FireEquipmentSignalLogServiceImpl extends BaseService<FireEquipment
params
.
put
(
"stationCode"
,
stationCode
);
return
this
.
getBaseMapper
().
queryAlarmLogList
(
params
);
}
public
void
saveBatchLog
(
List
<
FireEquipmentSignalLog
>
list
)
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
this
.
saveBatch
(
list
);
}
}
//TODO 修改待补充
public
void
updateBatchLog
(
List
<
FireEquipmentSignalLog
>
list
)
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
list
.
stream
().
forEach
(
item
->
{
UpdateWrapper
<
FireEquipmentSignalLog
>
wrapper
=
new
UpdateWrapper
<>();
wrapper
.
lambda
().
eq
(
FireEquipmentSignalLog:
:
getFireEquipmentMrid
,
item
.
getFireEquipmentMrid
())
.
eq
(
FireEquipmentSignalLog:
:
getFireEquipmentIndexKey
,
item
.
getFireEquipmentIndexKey
());
});
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/service/impl/MqttReceiveServiceImpl.java
0 → 100644
View file @
ac42d664
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
service
.
impl
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.github.xiaoymin.knife4j.core.util.StrUtil
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireEquipmentSignalLog
;
import
com.yeejoin.amos.boot.module.ccs.api.service.MqttReceiveService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
@Slf4j
@Service
public
class
MqttReceiveServiceImpl
implements
MqttReceiveService
{
private
static
Boolean
bool
=
Boolean
.
FALSE
;
@Autowired
private
FireEquipmentSignalLogServiceImpl
fireEquipmentSignalLogServiceImpl
;
//TODO 逻辑待补充
@Override
public
void
handlerMqttIncrementMessage
(
String
topic
,
String
message
)
{
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<>();
try
{
list
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parseObject
(
message
,
List
.
class
);
// 将JSON字符串转换成实体类型
// List<FireEquipmentSignalLog> log = JSONUtil.toBean(message, FireEquipmentSignalLog.class);
}
catch
(
Exception
e
)
{
log
.
error
(
"解析失败"
);
throw
new
BadRequest
(
"解析失败"
);
}
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
List
<
FireEquipmentSignalLog
>
doList
=
new
ArrayList
<>();
for
(
Map
<
String
,
String
>
stringStringMap
:
list
)
{
FireEquipmentSignalLog
fireEquipmentSignalLog
=
new
FireEquipmentSignalLog
();
if
(
stringStringMap
.
containsKey
(
"objcect_type"
)
&&
StrUtil
.
isNotBlank
(
stringStringMap
.
get
(
"objcect_type"
)))
{
if
(!
stringStringMap
.
get
(
"objcect_type"
).
equals
(
"EQUIP"
))
{
continue
;
}
}
//当为告警时新增数据
doList
.
add
(
fireEquipmentSignalLog
);
//当为消除告警时修改原有数据 (根据设备编码、)
}
if
(
CollectionUtils
.
isNotEmpty
(
doList
))
{
fireEquipmentSignalLogServiceImpl
.
saveBatchLog
(
doList
);
}
}
log
.
info
(
String
.
format
(
"收到mqtt消息:%s"
,
message
));
}
}
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 @
ac42d664
...
...
@@ -433,14 +433,15 @@ public class WaterResourceController extends BaseController {
String
resourceType
,
String
classifyId
,
String
bizOrgCode
,
String
equipCateGoryCode
)
{
String
equipCateGoryCode
,
List
<
String
>
ids
)
{
Page
<
WaterResourceDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
/*bug 2913 更换保存方式 存储到公共附件表 chenzhao 2021-10-18 start*/
Page
<
WaterResourceDto
>
waterResourceDtoPage
=
waterResourceServiceImpl
.
queryForWaterResourcePage
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
,
classifyId
,
bizOrgCode
,
equipCateGoryCode
);
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
,
classifyId
,
bizOrgCode
,
equipCateGoryCode
,
ids
);
List
<
WaterResourceDto
>
records
=
waterResourceDtoPage
.
getRecords
();
records
.
forEach
(
i
->
{
Map
<
String
,
List
<
AttachmentDto
>>
attachments
=
sourceFileService
.
getAttachments
(
i
.
getSequenceNbr
());
...
...
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 @
ac42d664
...
...
@@ -598,15 +598,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
map
.
put
(
"pageNum"
,
(
pageBean
.
getCurrent
()
-
1
)
*
pageBean
.
getSize
());
map
.
put
(
"pageSize"
,
pageBean
.
getSize
());
List
<
Map
<
String
,
Object
>>
list
=
this
.
baseMapper
.
selectPersonList
(
map
);
//处理循环中的远程调用(原有逻辑不变)
List
<
String
>
amosIds
=
new
ArrayList
<>();
list
.
stream
().
forEach
(
t
->
{
// BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm
// 2021-09-16
if
(
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
FeignClientResult
<
AgencyUserModel
>
result1
=
Privilege
.
agencyUserClient
.
queryByUserId
(
t
.
get
(
"amosOrgId"
).
toString
());
if
(
null
!=
result1
.
getResult
())
{
t
.
put
(
"amosOrgCode"
,
result1
.
getResult
().
getRealName
());
}
amosIds
.
add
(
t
.
get
(
"amosOrgId"
).
toString
());
// FeignClientResult<AgencyUserModel> result1 = Privilege.agencyUserClient
// .queryByUserId(t.get("amosOrgId").toString());
// if (null != result1.getResult()) {
// t.put("amosOrgCode", result1.getResult().getRealName());
// }
String
chargePersonId
=
iOrgUsrService
.
getIdNumberByAmosId
(
t
.
get
(
"amosOrgId"
).
toString
());
t
.
put
(
"chargePersonId"
,
chargePersonId
);
}
else
{
...
...
@@ -622,6 +625,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
});
if
(
CollectionUtils
.
isNotEmpty
(
amosIds
))
{
String
join
=
String
.
join
(
","
,
amosIds
);
List
<
AgencyUserModel
>
amosUser
=
Privilege
.
agencyUserClient
.
queryByIds
(
join
,
false
).
getResult
();
Map
<
String
,
AgencyUserModel
>
collect
=
amosUser
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
t
->
t
));
list
.
stream
().
forEach
(
t
->
{
if
(
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
())
&&
collect
.
containsKey
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
t
.
put
(
"amosOrgCode"
,
collect
.
get
(
t
.
get
(
"amosOrgId"
).
toString
()).
getRealName
());
}
});
}
/* Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 结束 */
pageBean
.
setRecords
(
list
);
return
pageBean
;
...
...
@@ -1727,7 +1740,19 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
List
<
OrgMenuDto
>
companyTreeByUserAndType
(
ReginParams
reginParams
,
String
type
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"bizOrgCode"
,
reginParams
.
getPersonIdentity
().
getBizOrgCode
());
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
if
(
StringUtils
.
isNotEmpty
(
type
)
&&
type
.
equals
(
"COMPANY"
)){
//查询当前登录人所属单位/部门
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
reginParams
.
getPersonIdentity
().
getCompanyId
());
//判断登陆人是否已经是顶级节点单位
if
(
orgUsr
.
getParentId
()
!=
null
){
orgUsr
=
this
.
selectParentOrgUsr
(
orgUsr
);
bizOrgCode
=
orgUsr
.
getBizOrgCode
()
!=
null
?
orgUsr
.
getBizOrgCode
()
:
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
}
}
param
.
put
(
"bizOrgCode"
,
bizOrgCode
);
param
.
put
(
"type"
,
type
);
List
<
OrgUsr
>
list
=
orgUsrMapper
.
companyTreeByUserAndType
(
param
);
return
buildTreeParallel
(
list
);
...
...
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 @
ac42d664
...
...
@@ -87,9 +87,9 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
@Condition
(
Operator
.
eq
)
Long
sequenceNbr
,
String
equipId
,
String
bizOrgCode
,
String
equipCateGoryCode
)
{
String
equipCateGoryCode
,
List
<
String
>
ids
)
{
return
this
.
waterResourceMapper
.
getWaterResourcePageByParams
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
,
equipId
,
bizOrgCode
,
equipCateGoryCode
);
belongFightingSystemId
,
sequenceNbr
,
equipId
,
bizOrgCode
,
equipCateGoryCode
,
ids
);
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentAlarmController.java
View file @
ac42d664
...
...
@@ -7,6 +7,7 @@ import java.util.Map;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
...
...
@@ -101,6 +102,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
List
<
CommonRequest
>
queryRequests
=
new
ArrayList
<>();
CommonRequest
request
=
new
CommonRequest
();
request
.
setName
(
"beginDate"
);
...
...
@@ -124,7 +126,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
queryRequests
.
add
(
request4
);
CommonRequest
request5
=
new
CommonRequest
();
request5
.
setName
(
"orgCode"
);
request5
.
setValue
(
this
.
getOrgCode
()
);
request5
.
setValue
(
null
);
queryRequests
.
add
(
request5
);
CommonRequest
request6
=
new
CommonRequest
();
request6
.
setName
(
"handleStatus"
);
...
...
@@ -154,6 +156,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
request12
.
setName
(
"isRemoveShield"
);
request12
.
setValue
(
StringUtil
.
isNotEmpty
(
isRemoveShield
)
?
StringUtils
.
trimToNull
(
isRemoveShield
)
:
null
);
queryRequests
.
add
(
request12
);
CommonRequest
request13
=
new
CommonRequest
();
request13
.
setName
(
"bizOrgCode"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
queryRequests
.
add
(
request13
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
Map
<
String
,
Object
>>
list
=
iEquipmentSpecificAlarmService
.
listPage
(
param
);
return
CommonResponseUtil
.
success
(
list
);
...
...
@@ -220,6 +226,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam
(
value
=
"isRemovedFire"
,
required
=
false
)
String
isRemovedFire
,
CommonPageable
commonPageable
)
{
List
<
CommonRequest
>
queryRequests
=
new
ArrayList
<>();
ReginParams
reginParams
=
getSelectedOrgInfo
();
CommonRequest
request
=
new
CommonRequest
();
request
.
setName
(
"beginDate"
);
request
.
setValue
(
StringUtil
.
isNotEmpty
(
beginDate
)
?
StringUtils
.
trimToNull
(
beginDate
).
substring
(
0
,
10
)
+
" 00:00:00"
:
null
);
...
...
@@ -269,6 +276,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
request13
.
setName
(
"isRemovedFire"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
isRemovedFire
)
?
StringUtils
.
trimToNull
(
isRemovedFire
)
:
null
);
queryRequests
.
add
(
request13
);
CommonRequest
request14
=
new
CommonRequest
();
request13
.
setName
(
"bizOrgCode"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
queryRequests
.
add
(
request14
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
org
.
springframework
.
data
.
domain
.
Page
<
AlarmListDataVO
>
list
=
iEquipmentSpecificAlarmService
.
listAlarmsPage
(
param
);
return
CommonResponseUtil
.
success
(
list
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/MaintenanceResourceController.java
View file @
ac42d664
...
...
@@ -139,6 +139,7 @@ public class MaintenanceResourceController extends AbstractBaseController {
@RequestParam
(
required
=
false
)
String
fireFacilityName
,
@RequestParam
(
required
=
false
)
List
<
Long
>
buildingId
,
@RequestParam
(
required
=
false
)
Long
fireFacilityId
,
@RequestParam
(
required
=
false
)
String
maintenanceCompanyId
,
@RequestParam
(
required
=
false
)
String
classifyId
)
{
Page
page
=
new
Page
();
page
.
setCurrent
(
current
);
...
...
@@ -147,7 +148,7 @@ public class MaintenanceResourceController extends AbstractBaseController {
}
else
{
page
.
setSize
(
size
);
}
return
maintenanceResourceService
.
combineDataPage
(
page
,
fireFightSysId
,
fireFacilityId
,
fireFacilityName
,
classifyId
,
buildingId
,
getAppKey
(),
getProduct
(),
getToken
());
return
maintenanceResourceService
.
combineDataPage
(
page
,
fireFightSysId
,
fireFacilityId
,
fireFacilityName
,
classifyId
,
buildingId
,
maintenanceCompanyId
,
getAppKey
(),
getProduct
(),
getToken
());
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/MaintenanceResourceDataController.java
View file @
ac42d664
...
...
@@ -155,7 +155,6 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
public
IPage
<
MaintenanceResourceData
>
listPage
(
Integer
pageNum
,
Integer
pageSize
,
MaintenanceResourceDataVo
resourceData
)
{
MaintenanceResourceData
data
=
new
MaintenanceResourceData
();
List
<
Long
>
buildingIds
=
resourceData
.
getBuildingIds
();
Long
fireFacilityId
=
resourceData
.
getFireFacilityId
();
BeanUtils
.
copyProperties
(
resourceData
,
data
);
Page
<
MaintenanceResourceData
>
pageBean
;
QueryWrapper
<
MaintenanceResourceData
>
queryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -187,6 +186,7 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
}
catch
(
Exception
e
)
{
}
});
if
(!
CollectionUtils
.
isEmpty
(
buildingIds
))
{
queryWrapper
.
in
(
"building_id"
,
buildingIds
);
}
...
...
@@ -197,6 +197,7 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
page
=
maintenanceResourceDataService
.
page
(
pageBean
,
queryWrapper
);
page
.
getRecords
().
stream
().
forEach
(
e
->
e
.
setLocation
(
e
.
getBuildingName
()
==
null
?
""
:
e
.
getBuildingName
()+
e
.
getLocation
()
==
null
?
""
:
e
.
getLocation
())
);
return
page
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/fegin/JcsFeign.java
View file @
ac42d664
...
...
@@ -42,7 +42,8 @@ public interface JcsFeign {
@RequestParam
(
value
=
"belongBuildingId"
)
List
<
Long
>
belongBuildingId
,
@RequestParam
(
value
=
"belongFightingSystemId"
)
Long
belongFightingSystemId
,
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
,
@RequestParam
(
value
=
"classifyId"
)
String
classifyId
@RequestParam
(
value
=
"classifyId"
)
String
classifyId
,
@RequestParam
(
value
=
"classifyId"
)
List
<
String
>
ids
);
@RequestMapping
(
value
=
"/equip/fireSystem_waterResource/list"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
ac42d664
...
...
@@ -166,9 +166,9 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List
<
MaintenanceResourceData
>
getSysEquipClassifyDataList
();
IPage
<
MaintenanceResourceDataVo
>
getSysEquipClassifyDataPage
(
Page
page
,
Long
fireFightSysId
,
String
fireFacilityName
,
String
classifyId
,
Long
fireFacilityId
,
List
<
Long
>
buildingId
);
IPage
<
MaintenanceResourceDataVo
>
getSysEquipClassifyDataPage
(
Page
page
,
Long
fireFightSysId
,
String
fireFacilityName
,
String
classifyId
,
Long
fireFacilityId
,
List
<
Long
>
buildingId
,
List
<
String
>
bandWbCompany
);
IPage
<
MaintenanceResourceDataVo
>
getEquipClassifyDataPage
(
Page
page
,
Long
fireFightSysId
,
String
fireFacilityName
,
String
classifyId
,
Long
fireFacilityId
,
List
<
Long
>
buildingId
);
IPage
<
MaintenanceResourceDataVo
>
getEquipClassifyDataPage
(
Page
page
,
Long
fireFightSysId
,
String
fireFacilityName
,
String
classifyId
,
Long
fireFacilityId
,
List
<
Long
>
buildingId
,
List
<
String
>
bandWbCompany
);
List
<
UserDto
>
getEquipSpecificLocationInfo
(
Long
equipmentSpecificId
,
String
[]
fieldName
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/MaintenanceResourceDataMapper.java
View file @
ac42d664
...
...
@@ -76,6 +76,8 @@ public interface MaintenanceResourceDataMapper extends BaseMapper<MaintenanceRes
*/
List
<
String
>
getRelationKey
(
@Param
(
"list"
)
List
<
String
>
keyList
);
List
<
String
>
getBandWbCompany
(
String
maintenanceCompanyId
);
IPage
<
MaintenanceResourceDataDto
>
getClassifyPage
(
Page
page
,
Long
maintenanceCompanyId
,
Long
ownerUnitId
,
Long
fireFightSysId
,
String
expirationTimeSort
);
IPage
<
MaintenanceResourceDataDto
>
getFireFacilityPage
(
Page
page
,
Long
maintenanceCompanyId
,
Long
ownerUnitId
,
Long
fireFightSysId
,
Long
classifyId
,
List
<
Long
>
buildingId
,
String
status
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IMaintenanceResourceService.java
View file @
ac42d664
...
...
@@ -74,7 +74,7 @@ public interface IMaintenanceResourceService extends IService<MaintenanceResourc
List
<
MaintenanceResourceData
>
combineData
(
String
appKey
,
String
product
,
String
token
);
IPage
<
MaintenanceResourceDataVo
>
combineDataPage
(
Page
page
,
Long
fireFightSysId
,
Long
fireFacilityId
,
String
fireFacilityName
,
String
classifyId
,
List
<
Long
>
buildingId
,
String
appKey
,
String
product
,
String
token
);
IPage
<
MaintenanceResourceDataVo
>
combineDataPage
(
Page
page
,
Long
fireFightSysId
,
Long
fireFacilityId
,
String
fireFacilityName
,
String
classifyId
,
List
<
Long
>
buildingId
,
String
maintenanceCompanyId
,
String
appKey
,
String
product
,
String
token
);
List
<
MaintenanceResourceDto
>
selectCompanyList
(
String
appKey
,
String
product
,
String
token
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MaintenanceResourceServiceImpl.java
View file @
ac42d664
...
...
@@ -304,14 +304,16 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
}
@Override
public
IPage
<
MaintenanceResourceDataVo
>
combineDataPage
(
Page
page
,
Long
fireFightSysId
,
Long
fireFacilityId
,
String
fireFacilityName
,
String
classifyId
,
List
<
Long
>
buildingId
,
String
appKey
,
String
product
,
String
token
)
{
public
IPage
<
MaintenanceResourceDataVo
>
combineDataPage
(
Page
page
,
Long
fireFightSysId
,
Long
fireFacilityId
,
String
fireFacilityName
,
String
classifyId
,
List
<
Long
>
buildingId
,
String
maintenanceCompanyId
,
String
appKey
,
String
product
,
String
token
)
{
// 存放组合键,ID+type,数据库查看是否已关联
List
<
String
>
keyList
=
new
ArrayList
<>();
int
current
=
Integer
.
parseInt
(
String
.
valueOf
(
page
.
getCurrent
()));
long
pageSize
=
page
.
getSize
();
int
size
=
Integer
.
parseInt
(
String
.
valueOf
(
pageSize
/
2
));
page
.
setSize
(
size
);
ResponseModel
<
Page
<
WaterResourceDto
>>
pageResponseModel
=
jcsFeign
.
queryForPage
(
appKey
,
product
,
token
,
current
,
size
,
fireFacilityName
,
buildingId
,
fireFightSysId
,
fireFacilityId
,
classifyId
);
//查询非本维保单位下所有的设备id
List
<
String
>
noMyCompanyEquipId
=
maintenanceResourceDataMapper
.
getBandWbCompany
(
maintenanceCompanyId
);
ResponseModel
<
Page
<
WaterResourceDto
>>
pageResponseModel
=
jcsFeign
.
queryForPage
(
appKey
,
product
,
token
,
current
,
size
,
fireFacilityName
,
buildingId
,
fireFightSysId
,
fireFacilityId
,
classifyId
,
noMyCompanyEquipId
);
Page
<
WaterResourceDto
>
result
=
pageResponseModel
.
getResult
();
long
pages
=
result
.
getPages
();
long
total
=
result
.
getTotal
();
...
...
@@ -352,9 +354,9 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
}
IPage
<
MaintenanceResourceDataVo
>
dataPage
=
null
;
if
(
fireFightSysId
!=
null
&&
fireFightSysId
==
-
2
)
{
dataPage
=
equipmentSpecificMapper
.
getEquipClassifyDataPage
(
page
,
fireFightSysId
,
fireFacilityName
,
classifyId
,
fireFacilityId
,
buildingId
);
dataPage
=
equipmentSpecificMapper
.
getEquipClassifyDataPage
(
page
,
fireFightSysId
,
fireFacilityName
,
classifyId
,
fireFacilityId
,
buildingId
,
noMyCompanyEquipId
);
}
else
{
dataPage
=
equipmentSpecificMapper
.
getSysEquipClassifyDataPage
(
page
,
fireFightSysId
,
fireFacilityName
,
classifyId
,
fireFacilityId
,
buildingId
);
dataPage
=
equipmentSpecificMapper
.
getSysEquipClassifyDataPage
(
page
,
fireFightSysId
,
fireFacilityName
,
classifyId
,
fireFacilityId
,
buildingId
,
noMyCompanyEquipId
);
}
List
<
MaintenanceResourceDataVo
>
dataPageRecords
=
dataPage
.
getRecords
();
long
total1
=
dataPage
.
getTotal
();
...
...
@@ -388,15 +390,18 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
}
else
if
(!
CollectionUtils
.
isEmpty
(
dataPageRecords
))
{
dataPage
.
setRecords
(
dataPageRecords
);
}
// List<MaintenanceResourceDataVo> resultList = dataPage.getRecords();
// List<MaintenanceResourceDataVo> collect = resultList.stream().filter(e -> !bandWbCompany.contains(e.getFireFacilityId().toString())).collect(toList());
return
dataPage
;
}
else
{
page
.
setSize
(
pageSize
);
page
.
setCurrent
(
Math
.
abs
(
current
-
(
int
)
Math
.
ceil
(
total
/
10.0
)));
IPage
<
MaintenanceResourceDataVo
>
dataPage
=
null
;
if
(
fireFightSysId
!=
null
&&
fireFightSysId
==
-
2
)
{
dataPage
=
equipmentSpecificMapper
.
getEquipClassifyDataPage
(
page
,
fireFightSysId
,
fireFacilityName
,
classifyId
,
fireFacilityId
,
buildingId
);
dataPage
=
equipmentSpecificMapper
.
getEquipClassifyDataPage
(
page
,
fireFightSysId
,
fireFacilityName
,
classifyId
,
fireFacilityId
,
buildingId
,
noMyCompanyEquipId
);
}
else
{
dataPage
=
equipmentSpecificMapper
.
getSysEquipClassifyDataPage
(
page
,
fireFightSysId
,
fireFacilityName
,
classifyId
,
fireFacilityId
,
buildingId
);
dataPage
=
equipmentSpecificMapper
.
getSysEquipClassifyDataPage
(
page
,
fireFightSysId
,
fireFacilityName
,
classifyId
,
fireFacilityId
,
buildingId
,
noMyCompanyEquipId
);
}
List
<
MaintenanceResourceDataVo
>
records
=
dataPage
.
getRecords
();
records
.
stream
().
forEach
(
x
->
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/pom.xml
View file @
ac42d664
...
...
@@ -43,8 +43,8 @@
</dependency>
<dependency>
<groupId>
e-iceblue
</groupId>
<artifactId>
spire.doc
</artifactId>
<version>
4
.9.0
</version>
<artifactId>
spire.doc
.free
</artifactId>
<version>
3
.9.0
</version>
</dependency>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/config/ElasticSearchClientConfig.java
View file @
ac42d664
...
...
@@ -2,7 +2,12 @@ package com.yeejoin.amos.boot.module.jcs.biz.config;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.HttpHost
;
import
org.apache.http.auth.AuthScope
;
import
org.apache.http.auth.UsernamePasswordCredentials
;
import
org.apache.http.client.CredentialsProvider
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.impl.client.BasicCredentialsProvider
;
import
org.apache.http.impl.nio.client.HttpAsyncClientBuilder
;
import
org.elasticsearch.client.RestClient
;
import
org.elasticsearch.client.RestClientBuilder
;
import
org.elasticsearch.client.RestHighLevelClient
;
...
...
@@ -16,17 +21,33 @@ public class ElasticSearchClientConfig {
@Value
(
"${spring.elasticsearch.rest.uris}"
)
private
String
uris
;
@Value
(
"${elasticsearch.username}"
)
private
String
username
;
@Value
(
"${elasticsearch.password}"
)
private
String
password
;
@Bean
@Qualifier
(
"highLevelClient"
)
public
RestHighLevelClient
restHighLevelClient
()
{
try
{
final
CredentialsProvider
credentialsProvider
=
new
BasicCredentialsProvider
();
credentialsProvider
.
setCredentials
(
AuthScope
.
ANY
,
new
UsernamePasswordCredentials
(
username
,
password
));
try
{
String
url
=
uris
.
replace
(
"http://"
,
""
);
final
String
[]
parts
=
StringUtils
.
split
(
url
,
":"
);
HttpHost
httpHost
=
new
HttpHost
(
parts
[
0
],
Integer
.
parseInt
(
parts
[
1
]),
"http"
);
RestClientBuilder
builder
=
RestClient
.
builder
(
httpHost
);
builder
.
setHttpClientConfigCallback
(
new
RestClientBuilder
.
HttpClientConfigCallback
()
{
@Override
public
HttpAsyncClientBuilder
customizeHttpClient
(
HttpAsyncClientBuilder
httpClientBuilder
)
{
httpClientBuilder
.
disableAuthCaching
();
return
httpClientBuilder
.
setDefaultCredentialsProvider
(
credentialsProvider
);
}
});
builder
.
setRequestConfigCallback
(
new
RestClientBuilder
.
RequestConfigCallback
()
{
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
@Override
...
...
@@ -35,8 +56,9 @@ public class ElasticSearchClientConfig {
return
requestConfigBuilder
.
setConnectTimeout
(
5000
*
1000
)
// 连接超时(默认为1秒)
.
setSocketTimeout
(
6000
*
1000
);
// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
}
});
// 调整最大重试超时时间(默认为30秒).setMaxRetryTimeoutMillis(60000);
return
new
RestHighLevelClient
(
builder
);
}
catch
(
Exception
e
)
{
...
...
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 @
ac42d664
...
...
@@ -261,6 +261,15 @@ public class PlanTaskController extends AbstractBaseController {
return
ResponseHelper
.
buildResponse
(
planTaskService
.
getPlanTaskPoints
(
param
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据任务详情ID查信息(首页维保待办任务跳转试用)-mobile"
,
notes
=
"根据任务详情ID查信息(首页维保待办任务跳转试用)-mobile"
)
@RequestMapping
(
value
=
"/point/{planTaskDetailId}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
getByTaskDetailId
(
@ApiParam
(
value
=
"任务详情ID"
,
required
=
true
)
@PathVariable
Long
planTaskDetailId
)
{
return
ResponseHelper
.
buildResponse
(
planTaskService
.
getByTaskDetailId
(
planTaskDetailId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询维保设施,检查内容详情"
)
@GetMapping
(
value
=
"/task-point-detail"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/mapper/PlanTaskMapper.java
View file @
ac42d664
...
...
@@ -191,4 +191,6 @@ public interface PlanTaskMapper extends BaseMapper {
List
<
Plan
>
getPlanIdsByDate
(
Date
date
);
List
<
PlanTask
>
getPlanTaskList
(
Date
now
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/repository/ICheckInputDao.java
View file @
ac42d664
...
...
@@ -8,4 +8,7 @@ import com.yeejoin.amos.maintenance.dao.entity.CheckInput;
public
interface
ICheckInputDao
extends
BaseDao
<
CheckInput
,
Long
>
{
CheckInput
findByCheckIdAndInputIdAndPointClassifyId
(
Long
checkId
,
Long
inputId
,
Long
pointClassifyId
);
CheckInput
findByCheckId
(
Long
checkId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/repository/IPlanTaskDetailDao.java
View file @
ac42d664
...
...
@@ -35,4 +35,7 @@ public interface IPlanTaskDetailDao extends BaseDao<PlanTaskDetail, Long> {
List
<
PlanTaskDetail
>
findALLByPointId
(
Long
pointId
);
List
<
PlanTaskDetail
>
findByPointId
(
long
pointId
);
@Query
(
value
=
"select id FROM p_plan_task_detail WHERE task_no = ?1 limit 1"
,
nativeQuery
=
true
)
Long
findIdByTaskNo
(
Long
taskNo
);
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/repository/IRoutePointDao.java
View file @
ac42d664
...
...
@@ -27,6 +27,9 @@ public interface IRoutePointDao extends BaseDao<RoutePoint, Long> {
@Query
(
value
=
"SELECT DISTINCT point_id FROM `p_route_point` where route_id = ?1"
,
nativeQuery
=
true
)
List
<
Long
>
queryRoutePointIds
(
Long
routeId
);
@Query
(
value
=
"SELECT DISTINCT id FROM `p_route_point` where route_id = ?1 limit 1"
,
nativeQuery
=
true
)
Long
queryIdByRouteId
(
Long
routeId
);
@Modifying
@Transactional
@Query
(
value
=
"select * from p_route_point WHERE route_id = ?1 and point_id in (?2)"
,
nativeQuery
=
true
)
...
...
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 @
ac42d664
...
...
@@ -245,7 +245,9 @@ public class CheckServiceImpl implements ICheckService {
iPointDao
.
save
(
point
);
Check
finalCheck
=
check
;
//4.检查项入库
checkItemList
.
forEach
(
checkInput
->
checkInput
.
setCheckId
(
finalCheck
.
getId
()));
// checkItemList.forEach(checkInput -> checkInput.setCheckId(finalCheck.getId()));
// 提交维保任务执行记录,关联任务详情id,作为数据回显关联查询id, 修复bug:6131
checkItemList
.
forEach
(
checkInput
->
checkInput
.
setCheckId
(
recordParam
.
getPlanTaskId
()));
if
(!
checkItemList
.
isEmpty
())
{
checkInputDao
.
saveAll
(
checkItemList
);
}
...
...
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 @
ac42d664
...
...
@@ -42,6 +42,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -89,6 +90,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
JCSFeignClient
jcsFeignClient
;
@Autowired
ICheckInputDao
checkInputDao
;
@Autowired
RedisUtils
redisUtils
;
private
final
String
MAINTENANCE_PLAN_TASK_KEY
=
"MAINTENANCE_PLAN_ID:"
;
...
...
@@ -275,14 +279,17 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
now
=
DateUtil
.
str2Date
(
runDate
,
"yyyyMMdd HH:mm:ss"
);
}
List
<
Plan
>
planIdsByDate
=
planTaskMapper
.
getPlanIdsByDate
(
now
);
for
(
Plan
plan
:
planIdsByDate
)
{
if
(!
redisUtils
.
hasKey
(
MAINTENANCE_PLAN_TASK_KEY
+
plan
.
getId
()))
{
List
<
PlanTask
>
planTaskList
=
planTaskMapper
.
getPlanTaskList
(
now
);
Map
<
Long
,
Plan
>
collect
=
planIdsByDate
.
stream
().
collect
(
Collectors
.
toMap
(
Plan:
:
getId
,
t
->
t
));
for
(
PlanTask
planTask
:
planTaskList
)
{
if
(!
redisUtils
.
hasKey
(
MAINTENANCE_PLAN_TASK_KEY
+
planTask
.
getId
()))
{
try
{
sendMessage
(
plan
);
sendMessage
(
collect
.
get
(
planTask
.
getPlanId
()),
planTask
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
redisUtils
.
set
(
MAINTENANCE_PLAN_TASK_KEY
+
plan
.
getId
(),
1
,
(
long
)
plan
.
getDuration
()
*
60
);
redisUtils
.
set
(
MAINTENANCE_PLAN_TASK_KEY
+
plan
Task
.
getId
(),
1
,
(
long
)
collect
.
get
(
planTask
.
getPlanId
())
.
getDuration
()
*
60
);
}
}
}
...
...
@@ -531,7 +538,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
public
void
sendMessage
(
Plan
plan
)
throws
Exception
{
public
void
sendMessage
(
Plan
plan
,
PlanTask
planTask
)
throws
Exception
{
// 查询检查对象对应防火监督负责人id
List
<
String
>
extraUserIds
=
com
.
google
.
common
.
collect
.
Lists
.
newArrayList
();
//
...
...
@@ -539,10 +546,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
/* // 规则推送消息
rulePlanService.addPlanRule(plan, null, RuleTypeEnum.消息型计划生成, extraUserIds);*/
// NOTIFY
String
userIdString
=
plan
.
getUserId
();
String
userIdString
=
plan
Task
.
getUserId
();
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
userIdString
))
{
String
[]
userIdArr
=
userIdString
.
split
(
","
);
List
<
String
>
userIdList
=
Arrays
.
asList
(
userIdArr
);
List
<
String
>
userIdList
=
Arrays
.
asList
(
userIdArr
);
// 规则推送消息
try
{
if
(
CollectionUtils
.
isNotEmpty
(
userIdList
))
{
...
...
@@ -555,9 +562,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
if
(
CollectionUtils
.
isNotEmpty
(
extraUserIds
))
{
log
.
info
(
"接收人ID:{}"
,
extraUserIds
);
rulePlanService
.
addPlanRule
(
plan
,
null
,
RuleTypeEnum
.
任务型计划生成
,
extraUserIds
);
rulePlanService
.
addPlanRule
(
plan
,
planTask
,
RuleTypeEnum
.
任务型计划生成
,
extraUserIds
);
}
}
}
...
...
@@ -778,11 +786,24 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
PlanTask
planTask
=
iplanTaskDao
.
findById
(
planTaskDetail
.
getTaskNo
()).
orElseThrow
(()
->
new
RuntimeException
(
"主任务不存在"
));
Map
<
String
,
Object
>
facility
=
this
.
buildFacilityDetail
(
point
,
planTask
);
List
<
Map
<
String
,
Object
>>
itemList
=
this
.
buildCheckInputItem
(
routePointId
);
// 修复bug:6131
CheckInput
checkInput
=
checkInputDao
.
findByCheckId
(
Long
.
valueOf
(
planTaskDetailId
));
Map
<
String
,
Object
>
map
=
itemList
.
get
(
0
);
map
.
put
(
"inputValue"
,
ObjectUtils
.
isEmpty
(
checkInput
)
?
""
:
checkInput
.
getInputValue
());
result
.
put
(
"facility"
,
facility
);
result
.
put
(
"itemList"
,
itemList
);
return
result
;
}
@Override
public
Boolean
getByTaskDetailId
(
Long
planTaskDetailId
)
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
PlanTaskDetail
planTaskDetail
=
iPlanTaskDetailDao
.
findById
(
planTaskDetailId
).
orElseThrow
(()
->
new
RuntimeException
(
"任务不存在"
));
resultMap
.
put
(
"isFinish"
,
planTaskDetail
.
getIsFinish
());
PlanTask
planTask
=
iplanTaskDao
.
findById
(
planTaskDetail
.
getTaskNo
()).
orElseThrow
(()
->
new
RuntimeException
(
"任务不存在"
));
return
0
==
planTaskDetail
.
getIsFinish
()
&&
1
==
planTask
.
getFinishStatus
();
}
private
List
<
Map
<
String
,
Object
>>
buildCheckInputItem
(
String
routePointId
)
{
return
inputItemMapper
.
queryInputItemInRountPoint
(
routePointId
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/RulePlanService.java
View file @
ac42d664
...
...
@@ -3,10 +3,13 @@ package com.yeejoin.amos.maintenance.business.service.impl;
import
com.yeejoin.amos.boot.biz.common.constants.RuleConstant
;
import
com.yeejoin.amos.boot.biz.common.enums.RuleTypeEnum
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IPlanTaskDetailDao
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IRoutePointDao
;
import
com.yeejoin.amos.maintenance.business.dto.PlanRo
;
import
com.yeejoin.amos.maintenance.business.feign.JCSFeignClient
;
import
com.yeejoin.amos.maintenance.business.util.DateUtil
;
import
com.yeejoin.amos.maintenance.dao.entity.Plan
;
import
com.yeejoin.amos.maintenance.dao.entity.PlanTask
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -30,15 +33,21 @@ public class RulePlanService {
@Autowired
private
JCSFeignClient
jcsFeignClient
;
public
Boolean
addPlanRule
(
Plan
plan
,
List
<
String
>
userIds
,
RuleTypeEnum
ruleType
,
List
<
String
>
extraUserIds
)
throws
Exception
{
PlanRo
planRo
=
buildPlanRo
(
plan
,
userIds
,
ruleType
,
extraUserIds
);
@Autowired
IPlanTaskDetailDao
iPlanTaskDetailDao
;
@Autowired
IRoutePointDao
iRoutePointDao
;
public
Boolean
addPlanRule
(
Plan
plan
,
PlanTask
planTask
,
RuleTypeEnum
ruleType
,
List
<
String
>
extraUserIds
)
throws
Exception
{
PlanRo
planRo
=
buildPlanRo
(
plan
,
planTask
,
ruleType
,
extraUserIds
);
//触发规则
log
.
info
(
"消防维保推规则触发消息入参:{}, packageId:{} "
,
planRo
,
packageId
);
ruleTrigger
.
publish
(
planRo
,
packageId
,
new
String
[
0
]);
return
true
;
}
private
PlanRo
buildPlanRo
(
Plan
plan
,
List
<
String
>
userIds
,
RuleTypeEnum
ruleType
,
List
<
String
>
extraUserIds
)
{
private
PlanRo
buildPlanRo
(
Plan
plan
,
PlanTask
planTask
,
RuleTypeEnum
ruleType
,
List
<
String
>
extraUserIds
)
{
PlanRo
planRo
=
new
PlanRo
();
BeanUtils
.
copyProperties
(
plan
,
planRo
);
...
...
@@ -54,6 +63,11 @@ public class RulePlanService {
map
.
put
(
"url"
,
ruleType
.
getUrl
());
}
Long
routePointId
=
iRoutePointDao
.
queryIdByRouteId
(
planTask
.
getRouteId
());
Long
idByTaskNo
=
iPlanTaskDetailDao
.
findIdByTaskNo
(
planTask
.
getId
());
map
.
put
(
"planTaskDetailId"
,
String
.
valueOf
(
idByTaskNo
));
map
.
put
(
"routePointId"
,
String
.
valueOf
(
routePointId
));
if
(
RuleConstant
.
WEB
.
equals
(
ruleType
.
getTerminal
())){
planRo
.
setIsSendWeb
(
true
);
}
else
if
(
RuleConstant
.
APP
.
equals
(
ruleType
.
getTerminal
())){
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/intfc/IPlanTaskService.java
View file @
ac42d664
...
...
@@ -122,4 +122,11 @@ public interface IPlanTaskService {
* @return Map<String, Object>
*/
Map
<
String
,
Object
>
planTaskPointDetail
(
String
planTaskDetailId
,
String
routePointId
);
/**
* 根据任务详情ID查信息
* @param planTaskDetailId
* @return
*/
Boolean
getByTaskDetailId
(
Long
planTaskDetailId
);
}
amos-boot-system-ccs/src/main/resources/application-dev.properties
View file @
ac42d664
## DB properties:
spring.datasource.url
=
jdbc:mysql://172.16.1
0.85:3306/amos-ccs-
biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.url
=
jdbc:mysql://172.16.1
1.201:3306/dl_ccs_
biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.password
=
Amos2019Mysql8
spring.datasource.password
=
Yeejoin@2020
## eureka properties:
eureka.instance.hostname
=
172.16.11.20
eureka.instance.hostname
=
172.16.11.20
1
eureka.client.serviceUrl.defaultZone
=
http://${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database
=
1
spring.redis.host
=
172.16.11.20
spring.redis.host
=
172.16.11.20
1
spring.redis.port
=
6379
spring.redis.password
=
1234560
## emqx properties:
#emqx.clean-session=true
#emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
#emqx.broker=tcp://172.16.11.33:1883
#emqx.user-name=admin
#
emqx.password
=
public
\ No newline at end of file
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.password
=
public
#mqtt.scene.host=mqtt://172.16.10.201:18083/mqtt
#mqtt.client.product.id=mqtt
mqtt.topic
=
topic_mqtt
#
spring.mqtt.completionTimeout
=
3000
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
ac42d664
...
...
@@ -250,6 +250,9 @@
<if
test=
"param.isRemoveShield != null and param.isRemoveShield != ''"
>
AND
wlesal.type != 'SHIELD'
</if>
<if
test=
"param.bizOrgCode != null and param.bizOrgCode != ''"
>
AND
wles.biz_org_code like concat (#{param.bizOrgCode},'%')
</if>
</where>
ORDER BY wlesal.create_date DESC
...
...
@@ -320,6 +323,7 @@
wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment we ON wlesal.equipment_code = we.code
LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id
LEFT JOIN wl_equipment_specific wls ON wls.id = wlesal.equipment_specific_id
<where>
<choose>
<when
test=
"param.confirmType != null and param.confirmType == 0"
>
...
...
@@ -332,6 +336,9 @@
wlesal.clean_time is NULL
</when>
</choose>
<if
test=
"param.bizOrgCode != null and param.bizOrgCode != ''"
>
AND
wls.biz_org_code like concat (#{param.bizOrgCode},'%')
</if>
</where>
) d
<where>
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
ac42d664
...
...
@@ -1217,6 +1217,12 @@
#{item}
</foreach>
</if>
<if
test=
"bandWbCompany != null and bandWbCompany.size() > 0"
>
AND es.id NOT IN
<foreach
collection=
"bandWbCompany"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
GROUP BY
es.id
...
...
@@ -1262,6 +1268,12 @@
#{item}
</foreach>
</if>
<if
test=
"bandWbCompany != null and bandWbCompany.size() > 0"
>
AND es.id NOT IN
<foreach
collection=
"bandWbCompany"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
GROUP BY
es.id
...
...
amos-boot-system-equip/src/main/resources/mapper/MaintenanceResourceDataMapper.xml
View file @
ac42d664
...
...
@@ -59,7 +59,7 @@
create_date
FROM
mt_maintenance_resource_data
GROUP BY classify_id
GROUP BY
maintenance_company_id,
classify_id
</select>
<select
id=
"selectMaintenanceResourceDataList"
...
...
@@ -235,6 +235,17 @@
</choose>
</where>
</select>
<select
id=
"getBandWbCompany"
resultType=
"java.lang.String"
>
SELECT
m.fire_facility_id
FROM
mt_maintenance_resource_data m
<where>
<if
test=
"maintenanceCompanyId != null and maintenanceCompanyId != '' "
>
m.maintenance_company_id != #{maintenanceCompanyId}
</if>
</where>
</select>
<select
id=
"getClassifyPage"
resultType=
"com.yeejoin.equipmanage.common.dto.MaintenanceResourceDataDto"
>
SELECT
m.maintenance_company_id,
...
...
amos-boot-system-jcs/src/main/resources/templates/check-report-template.docx
View file @
ac42d664
No preview for this file type
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
ac42d664
...
...
@@ -894,4 +894,14 @@
group by plan_id
)
</select>
<select
id=
"getPlanTaskList"
resultType=
"com.yeejoin.amos.maintenance.dao.entity.PlanTask"
>
select *
from p_plan_task
where
begin_time
<
= #{date,jdbcType=TIMESTAMP}
and end_time
>
#{date,jdbcType=TIMESTAMP}
and finish_status in (0, 1)
and status = 0
</select>
</mapper>
\ No newline at end of file
pom.xml
View file @
ac42d664
...
...
@@ -270,6 +270,11 @@
<version>
4.4.3
</version>
</dependency>
<dependency>
<groupId>
e-iceblue
</groupId>
<artifactId>
spire.doc.free
</artifactId>
<version>
3.9.0
</version>
</dependency>
<dependency>
<groupId>
net.sf.json-lib
</groupId>
<artifactId>
json-lib
</artifactId>
<version>
2.4
</version>
...
...
@@ -287,16 +292,17 @@
<name>Snapshots</name>
<url>http://4v059425e3.zicp.vip:13535/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
</repository>-->
-->
<repository>
<id>
Releases
</id>
<name>
Releases
</name>
<url>
http://36.46.149.14:8081/nexus/content/repositories/releases/
</url>
</repository>
<repository>
<id>
com.e-iceblue
</id>
<name>
e-iceblue
</name>
<url>
https://repo.e-iceblue.com/nexus/content/groups/public/
</url>
</repository>
<repository>
<id>
Snapshots
</id>
...
...
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