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
60968472
Commit
60968472
authored
Jan 15, 2022
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
8c84f881
92a6efb4
Show whitespace changes
Inline
Side-by-side
Showing
81 changed files
with
1517 additions
and
521 deletions
+1517
-521
TemplateCellWriteHandlerDate.java
...s/boot/biz/common/excel/TemplateCellWriteHandlerDate.java
+1
-1
PermissionInterceptor.java
...s/boot/biz/common/interceptors/PermissionInterceptor.java
+5
-0
DutyPersonShiftMapper.java
.../boot/module/common/api/mapper/DutyPersonShiftMapper.java
+8
-1
IDutyCommonService.java
...os/boot/module/common/api/service/IDutyCommonService.java
+8
-1
DutyPersonShiftMapper.xml
...n-api/src/main/resources/mapper/DutyPersonShiftMapper.xml
+71
-2
DynamicFormInstanceMapper.xml
...i/src/main/resources/mapper/DynamicFormInstanceMapper.xml
+2
-0
EquipmentSpecificAlarmLog.java
.../equipmanage/common/entity/EquipmentSpecificAlarmLog.java
+4
-0
BuildingVideoVO.java
...yeejoin/equipmanage/common/entity/vo/BuildingVideoVO.java
+2
-1
EquipmentAlarmBySystemIdOrSourceIdVO.java
...ommon/entity/vo/EquipmentAlarmBySystemIdOrSourceIdVO.java
+2
-0
AlarmListDataVO.java
...va/com/yeejoin/equipmanage/common/vo/AlarmListDataVO.java
+5
-0
VideoOnEquipmentSpecificVo.java
...oin/equipmanage/common/vo/VideoOnEquipmentSpecificVo.java
+29
-0
AlertSubmittedMapper.xml
...cs-api/src/main/resources/mapper/AlertSubmittedMapper.xml
+2
-2
AuditEnum.java
...com/yeejoin/amos/latentdanger/common/enums/AuditEnum.java
+65
-0
LatentDanger.java
...om/yeejoin/amos/latentdanger/dao/entity/LatentDanger.java
+1
-1
ExecuteStateEnum.java
...om/yeejoin/amos/patrol/common/enums/ExecuteStateEnum.java
+1
-0
LatentDangerExcuteTypeEnum.java
.../amos/patrol/common/enums/LatentDangerExcuteTypeEnum.java
+1
-1
IEquipmentAssociatedService.java
...dule/tzs/flc/api/service/IEquipmentAssociatedService.java
+3
-0
DutyCarController.java
.../boot/module/common/biz/controller/DutyCarController.java
+14
-0
DutyFireFightingController.java
...ule/common/biz/controller/DutyFireFightingController.java
+14
-1
DutyFirstAidController.java
.../module/common/biz/controller/DutyFirstAidController.java
+9
-1
DutyPersonController.java
...ot/module/common/biz/controller/DutyPersonController.java
+22
-2
OrgPersonController.java
...oot/module/common/biz/controller/OrgPersonController.java
+1
-1
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+50
-2
ContractServiceImpl.java
...t/module/common/biz/service/impl/ContractServiceImpl.java
+15
-17
DutyCarServiceImpl.java
...ot/module/common/biz/service/impl/DutyCarServiceImpl.java
+13
-35
DutyCommonServiceImpl.java
...module/common/biz/service/impl/DutyCommonServiceImpl.java
+123
-0
DutyFireFightingServiceImpl.java
.../common/biz/service/impl/DutyFireFightingServiceImpl.java
+12
-15
DutyFirstAidServiceImpl.java
...dule/common/biz/service/impl/DutyFirstAidServiceImpl.java
+38
-25
DutyPersonServiceImpl.java
...module/common/biz/service/impl/DutyPersonServiceImpl.java
+42
-1
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+1
-0
FailureVerifyServiceImpl.java
...ule/common/biz/service/impl/FailureVerifyServiceImpl.java
+6
-1
MaintenanceCompanyServiceImpl.java
...ommon/biz/service/impl/MaintenanceCompanyServiceImpl.java
+10
-10
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+80
-48
EquipmentAlarmController.java
...join/equipmanage/controller/EquipmentAlarmController.java
+5
-0
EquipmentSpecificController.java
...n/equipmanage/controller/EquipmentSpecificController.java
+29
-30
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+1
-1
IndustryController.java
...om/yeejoin/equipmanage/controller/IndustryController.java
+3
-0
VideoEquipmentSpecificMapper.java
...join/equipmanage/mapper/VideoEquipmentSpecificMapper.java
+4
-0
IEquipmentSpecificSerivce.java
...eejoin/equipmanage/service/IEquipmentSpecificSerivce.java
+17
-11
IVideoEquipmentSpecificService.java
...n/equipmanage/service/IVideoEquipmentSpecificService.java
+9
-0
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+4
-0
CarServiceImpl.java
.../com/yeejoin/equipmanage/service/impl/CarServiceImpl.java
+1
-0
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+1
-0
EquipmentDetailServiceImpl.java
.../equipmanage/service/impl/EquipmentDetailServiceImpl.java
+1
-1
EquipmentSpecificAlarmServiceImpl.java
...anage/service/impl/EquipmentSpecificAlarmServiceImpl.java
+2
-0
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+63
-102
MaintenanceResourceServiceImpl.java
...ipmanage/service/impl/MaintenanceResourceServiceImpl.java
+2
-2
VideoEquipmentSpecificImpl.java
.../equipmanage/service/impl/VideoEquipmentSpecificImpl.java
+10
-0
AircraftServiceImpl.java
...boot/module/jcs/biz/service/impl/AircraftServiceImpl.java
+4
-0
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+12
-4
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+38
-18
PowerTransferServiceImpl.java
...module/jcs/biz/service/impl/PowerTransferServiceImpl.java
+6
-5
JcsFeignClient.java
...join/amos/latentdanger/business/feign/JcsFeignClient.java
+10
-0
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+69
-28
RuleDangerService.java
...latentdanger/business/service/impl/RuleDangerService.java
+35
-7
CheckController.java
...amos/supervision/business/controller/CheckController.java
+12
-0
CheckMapper.java
...oin/amos/supervision/business/dao/mapper/CheckMapper.java
+11
-0
JCSFeignClient.java
...ejoin/amos/supervision/business/feign/JCSFeignClient.java
+10
-0
CheckReportServiceImpl.java
...rvision/business/service/impl/CheckReportServiceImpl.java
+19
-9
CheckServiceImpl.java
...s/supervision/business/service/impl/CheckServiceImpl.java
+6
-3
HiddenDangerServiceImpl.java
...vision/business/service/impl/HiddenDangerServiceImpl.java
+10
-6
PlanServiceImpl.java
...os/supervision/business/service/impl/PlanServiceImpl.java
+1
-1
PlanTaskServiceImpl.java
...upervision/business/service/impl/PlanTaskServiceImpl.java
+2
-1
RulePlanService.java
...os/supervision/business/service/impl/RulePlanService.java
+62
-4
ICheckService.java
...mos/supervision/business/service/intfc/ICheckService.java
+2
-0
CheckVo.java
...ava/com/yeejoin/amos/supervision/business/vo/CheckVo.java
+4
-1
JobService.java
.../java/com/yeejoin/amos/supervision/quartz/JobService.java
+8
-0
EquipmentAssociatedController.java
...tzs/flc/biz/controller/EquipmentAssociatedController.java
+60
-0
EquipmentController.java
...ot/module/tzs/flc/biz/controller/EquipmentController.java
+1
-1
EquipmentAssociatedServiceImpl.java
.../flc/biz/service/impl/EquipmentAssociatedServiceImpl.java
+7
-0
EquipmentInformServiceImpl.java
.../tzs/flc/biz/service/impl/EquipmentInformServiceImpl.java
+0
-2
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+141
-22
ConfirmAlarmMapper.xml
...em-equip/src/main/resources/mapper/ConfirmAlarmMapper.xml
+3
-1
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+20
-3
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+12
-3
VideoEquipmentSpecificMapper.xml
...rc/main/resources/mapper/VideoEquipmentSpecificMapper.xml
+23
-0
LatentDangerMapper.xml
...anger/src/main/resources/db/mapper/LatentDangerMapper.xml
+4
-1
HiddenDangerMapper.xml
...ision/src/main/resources/db/mapper/HiddenDangerMapper.xml
+2
-2
dbTemplate_check.xml
...rvision/src/main/resources/db/mapper/dbTemplate_check.xml
+108
-83
dbTemplate_plan.xml
...ervision/src/main/resources/db/mapper/dbTemplate_plan.xml
+2
-0
dbTemplate_plan_task.xml
...ion/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+1
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/excel/TemplateCellWriteHandlerDate.java
View file @
60968472
...
...
@@ -67,7 +67,7 @@ public class TemplateCellWriteHandlerDate implements SheetWriteHandler {
// 设置下拉单元格的首行 末行 首列 末列
CellRangeAddressList
rangeList
=
new
CellRangeAddressList
(
1
,
65536
,
k
,
k
);
// 如果下拉值总数大于100,则使用一个新sheet存储,避免生成的导入模板下拉值获取不到
if
(
v
.
length
>
LIMIT_NUMBER
)
{
if
(
v
.
length
>
0
)
{
//定义sheet的名称
//1.创建一个隐藏的sheet 名称为 hidden + k
String
sheetName
=
"hidden"
+
k
;
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/interceptors/PermissionInterceptor.java
View file @
60968472
...
...
@@ -104,7 +104,12 @@ public class PermissionInterceptor implements Interceptor {
BoundSql
boundSql
=
(
BoundSql
)
metaObject
.
getValue
(
"delegate.boundSql"
);
String
sql
=
boundSql
.
getSql
();
// 将权限规则拼接到原始sql
try
{
sql
=
processSelectSql
(
sql
,
dataAuthorization
,
reginParam
,
boundSql
);
}
catch
(
Exception
e
)
{
PermissionInterceptorContext
.
clean
();
logger
.
debug
(
e
.
getMessage
());
}
metaObject
.
setValue
(
"delegate.boundSql.sql"
,
sql
);
PermissionInterceptorContext
.
clean
();
return
invocation
.
proceed
();
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/DutyPersonShiftMapper.java
View file @
60968472
...
...
@@ -61,7 +61,10 @@ public interface DutyPersonShiftMapper extends BaseMapper<DutyPersonShift> {
@Param
(
"groupCode"
)
String
groupCode
);
List
<
Map
<
String
,
Object
>>
newStationViewData
(
@Param
(
"dutyDate"
)
String
dutyDate
,
@Param
(
"groupCode"
)
String
groupCode
);
/**
* 利用mysql 生成连续时间区间
*
...
...
@@ -137,4 +140,8 @@ public interface DutyPersonShiftMapper extends BaseMapper<DutyPersonShift> {
List
<
Map
<
String
,
Object
>>
queryByCompanyId
(
@Param
(
value
=
"bizNames"
)
List
<
String
>
bizNames
);
List
<
Map
<
String
,
Object
>>
queryByCompanyNew
(
String
bizOrgName
);
List
<
Map
<
String
,
Object
>>
getNewEquipmentForSpecifyDate
(
String
dutyDate
,
String
groupCode
,
String
equipmentId
,
String
equipmentName
,
String
groupByName
);
String
getFirstAidCompanyId
();
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IDutyCommonService.java
View file @
60968472
...
...
@@ -30,7 +30,14 @@ public interface IDutyCommonService {
* @return ResponseModel
*/
List
<
Map
<
String
,
Object
>>
statisticsDay
(
String
beginDate
,
String
endDate
)
throws
ParseException
;
/**
* 新值班月视图
* @param beginDate
* @param endDate
* @return
* @throws ParseException
*/
List
<
Map
<
String
,
Object
>>
newStatisticsDay
(
String
beginDate
,
String
endDate
)
throws
ParseException
;
/**
* 不分页查询
*
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/DutyPersonShiftMapper.xml
View file @
60968472
...
...
@@ -87,6 +87,21 @@
and i.group_code =#{groupCode}
GROUP BY i.field_value
</select>
<select
id=
"newStationViewData"
resultType=
"java.util.Map"
>
select
i.field_value as postTypeName,
count(1) as total
from
cb_duty_person_shift s,
cb_dynamic_form_instance i
where
s.instance_id = i.instance_id
and i.field_code = 'postTypeName'
AND s.duty_date = #{dutyDate}
AND s.shift_id is not null
and i.group_code =#{groupCode}
GROUP BY i.field_value
</select>
<select
id=
"genRangeDate"
resultType=
"map"
>
SELECT
DATE_FORMAT(DATE( DATE_ADD( #{beginDate}, INTERVAL @s DAY )),'%Y-%m-%d') AS date,
...
...
@@ -187,6 +202,50 @@ select * from (
group by ${groupByName}
</if>
</select>
<select
id=
'getNewEquipmentForSpecifyDate'
resultType=
'map'
>
select * from (
SELECT
MAX(
CASE
WHEN cd.FIELD_CODE = #{equipmentId} THEN
cd.FIELD_VALUE
END
) AS #{equipmentId},
MAX(
CASE
WHEN cd.FIELD_CODE = 'userName' THEN
cd.FIELD_VALUE
END
) AS 'userName',
MAX(
CASE
WHEN cd.FIELD_CODE = #{equipmentName} THEN
cd.FIELD_VALUE
END
) AS #{equipmentName}
FROM
cb_dynamic_form_instance cd
LEFT JOIN (
SELECT
dp.instance_id,
ds.`name`
FROM
cb_duty_person_shift dp
LEFT JOIN cb_duty_shift ds ON dp.shift_id = ds.sequence_nbr
WHERE
dp.duty_date = #{dutyDate} and dp.is_delete=0
) cds ON cd.instance_id = cds.instance_id
where cd.group_code =#{groupCode} and cds.instance_id is not null and
cd.is_delete=0
group by cd.instance_id
) result
<if
test=
"groupByName != null and groupByName!='' "
>
group by ${groupByName}
</if>
</select>
<select
id=
'getInstanceIdForSpecifyDateAndEquipment'
resultType=
'map'
>
SELECT
...
...
@@ -288,7 +347,7 @@ FROM
GROUP BY
cd.instance_id
) ss
LEFT JOIN (
<!--
LEFT JOIN (
SELECT
dp.instance_id,
ds.`name`
...
...
@@ -301,7 +360,7 @@ LEFT JOIN (
AND NAME IS NOT NULL
) cds ON ss.instance_id = cds.instance_id
WHERE
cds.NAME =#{duty}
cds.NAME =#{duty}
-->
GROUP BY
ss.postTypeName
</select>
...
...
@@ -331,6 +390,16 @@ WHERE
</select>
<select
id=
'getFirstAidCompanyId'
resultType=
"string"
>
SELECT
sequence_nbr
FROM
cb_org_usr a
WHERE
a.is_delete = 0
AND
a.biz_org_name = '消防救援保障部'
</select>
<select
id=
'getFirstAidForTypeCodeAndCompanyId'
resultType=
"map"
>
SELECT
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/DynamicFormInstanceMapper.xml
View file @
60968472
...
...
@@ -519,7 +519,9 @@ AND instance_id = (
jc_user_car
WHERE
car_id = #{carId}
and is_delete = 0
)
and is_delete = 0
) and field_code='telephone'
) ss
LEFT JOIN cb_org_usr cou ON ss.instance_id = cou.sequence_nbr
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificAlarmLog.java
View file @
60968472
...
...
@@ -184,4 +184,8 @@ public class EquipmentSpecificAlarmLog extends BaseEntity {
@TableField
(
"clean_time"
)
@ApiModelProperty
(
value
=
"消除时间"
)
private
Date
cleanTime
;
@ApiModelProperty
(
value
=
"消除状态"
)
@TableField
(
exist
=
false
)
private
String
cleanStatus
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/BuildingVideoVO.java
View file @
60968472
...
...
@@ -43,5 +43,6 @@ public class BuildingVideoVO {
@ApiModelProperty
(
"详细地址"
)
private
String
presetPosition
;
@ApiModelProperty
(
"视频转码"
)
private
String
vedioFormat
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/EquipmentAlarmBySystemIdOrSourceIdVO.java
View file @
60968472
...
...
@@ -28,4 +28,6 @@ public class EquipmentAlarmBySystemIdOrSourceIdVO {
* 告警类型
*/
private
String
type
;
private
Integer
cleanStatus
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/vo/AlarmListDataVO.java
View file @
60968472
...
...
@@ -23,6 +23,8 @@ public class AlarmListDataVO {
private
String
alarmEquip
;
private
String
type
;
private
String
alarmType
;
private
String
alarmInfo
;
...
...
@@ -34,4 +36,6 @@ public class AlarmListDataVO {
private
String
alarmTypeCode
;
private
String
cleanStatus
;
private
String
cleanStatusVal
;
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/vo/VideoOnEquipmentSpecificVo.java
0 → 100644
View file @
60968472
package
com
.
yeejoin
.
equipmanage
.
common
.
vo
;
import
lombok.Data
;
import
java.util.List
;
/**
* @ProjectName: amos-biz-boot
* @Package: com.yeejoin.equipmanage.common.vo
* @ClassName: VideoOnEquipmentSpecificVo
* @Author: Jianqiang Gao
* @Description: 摄像头绑定设备
* @Date: 2022/1/7 17:35
* @Version: 1.0
*/
@Data
public
class
VideoOnEquipmentSpecificVo
{
/**
* 设备ID
*/
private
Long
equipmentSpecificId
;
/**
* 摄像头Id集合
*/
private
List
<
Long
>
videoIdList
;
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertSubmittedMapper.xml
View file @
60968472
...
...
@@ -161,9 +161,9 @@
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
where a.sequence_nbr
=
(select sequence_nbr from jc_power_transfer where alert_called_id
where a.sequence_nbr
in (select sequence_nbr from
(select sequence_nbr from jc_power_transfer where alert_called_id
= #{alertId}
order by rec_date asc limit 1,100)
order by rec_date asc limit 1,100)
as t )
</select>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-latentdanger-api/src/main/java/com/yeejoin/amos/latentdanger/common/enums/AuditEnum.java
0 → 100644
View file @
60968472
package
com
.
yeejoin
.
amos
.
latentdanger
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
enum
AuditEnum
{
AUDIT
(
"待审核"
,
"audit"
),
REVIEW
(
"待复核"
,
"review"
);
/**
* 名称,描述
*/
private
String
name
;
/**
* 编码
*/
private
String
code
;
AuditEnum
(
String
name
,
String
code
){
this
.
name
=
name
;
this
.
code
=
code
;
}
public
static
AuditEnum
getEnum
(
String
code
)
{
AuditEnum
auditEnum
=
null
;
for
(
AuditEnum
type:
AuditEnum
.
values
())
{
if
(
type
.
getCode
().
equals
(
code
))
{
auditEnum
=
type
;
break
;
}
}
return
auditEnum
;
}
public
static
List
<
Map
<
String
,
String
>>
getEnumList
()
{
List
<
Map
<
String
,
String
>>
nameList
=
new
ArrayList
<>();
for
(
AuditEnum
c:
AuditEnum
.
values
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"name"
,
c
.
getName
());
map
.
put
(
"code"
,
c
.
getCode
());
nameList
.
add
(
map
);
}
return
nameList
;
}
public
String
getName
()
{
return
name
;
}
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-latentdanger-api/src/main/java/com/yeejoin/amos/latentdanger/dao/entity/LatentDanger.java
View file @
60968472
...
...
@@ -90,7 +90,7 @@ public class LatentDanger extends BasicEntity {
/**
* 限制时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
,
timezone
=
"GMT+8"
)
private
Date
reformLimitDate
;
private
Integer
overtimeState
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-patrol-api/src/main/java/com/yeejoin/amos/patrol/common/enums/ExecuteStateEnum.java
View file @
60968472
...
...
@@ -5,6 +5,7 @@ public enum ExecuteStateEnum {
未执行
(
"未执行"
,
1
,
""
),
通过
(
"通过"
,
2
,
"{\"action\": \"complete\",\"variables\": [{\"name\": \"rejected\",\"value\": false}]}"
),
完毕
(
"完毕"
,
2
,
"{\"action\": \"complete\",\"variables\": [{\"name\": \"rejected\",\"value\": false}]}"
),
驳回
(
"驳回"
,
3
,
"{\"action\": \"complete\",\"variables\": [{\"name\": \"rejected\",\"value\": true}]}"
),
已确认
(
"已确认"
,
4
,
""
),
停止执行
(
"停止执行"
,
5
,
""
),
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-patrol-api/src/main/java/com/yeejoin/amos/patrol/common/enums/LatentDangerExcuteTypeEnum.java
View file @
60968472
...
...
@@ -7,7 +7,7 @@ public enum LatentDangerExcuteTypeEnum {
"{\"reviewResult\": \"通过\"}"
),
隐患评审拒绝
(
"隐患评审拒绝"
,
3
,
ExecuteStateEnum
.
驳回
,
LatentDangerStateEnum
.
已撤销
,
"{\"reviewResult\": \"不通过\"}"
),
隐患常规治理
(
"隐患常规治理"
,
4
,
ExecuteStateEnum
.
通过
,
LatentDangerStateEnum
.
待验证
,
隐患常规治理
(
"隐患常规治理"
,
4
,
ExecuteStateEnum
.
完毕
,
LatentDangerStateEnum
.
待验证
,
"{\"rectifyResult\": \"常规整改\"}"
),
隐患安措计划
(
"隐患安措计划"
,
5
,
ExecuteStateEnum
.
通过
,
LatentDangerStateEnum
.
安措计划中
,
"{\"action\": \"complete\",\"variables\": [{\"name\": \"rectification\",\"value\": \"plan\"}]}"
),
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/service/IEquipmentAssociatedService.java
View file @
60968472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
api
.
service
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentAssociatedDto
;
/**
* 配套设备/设施/部件接口类
*
...
...
@@ -9,4 +11,5 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
*/
public
interface
IEquipmentAssociatedService
{
EquipmentAssociatedDto
updateAssociated
(
EquipmentAssociatedDto
model
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyCarController.java
View file @
60968472
...
...
@@ -94,6 +94,20 @@ public class DutyCarController extends BaseController {
}
/**
* 值班月视图
*
* @return ResponseModel
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
"/new-statistics-day"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyCarService
.
newStatisticsDay
(
beginDate
,
endDate
));
}
/**
* 调班
*
* @return ResponseModel
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyFireFightingController.java
View file @
60968472
...
...
@@ -92,7 +92,20 @@ public class DutyFireFightingController extends BaseController{
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyFireFightingService
.
statisticsDay
(
beginDate
,
endDate
));
}
/**
* 新值班月视图
*
* @return ResponseModel
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
"/new-statistics-day"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyFireFightingService
.
newStatisticsDay
(
beginDate
,
endDate
));
}
/**
* 调班
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyFirstAidController.java
View file @
60968472
...
...
@@ -84,7 +84,15 @@ public class DutyFirstAidController extends BaseController{
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyFirstAidService
.
statisticsDay
(
beginDate
,
endDate
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
"/new-statistics-day"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyFirstAidService
.
newStatisticsDay
(
beginDate
,
endDate
));
}
/**
* 调班
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyPersonController.java
View file @
60968472
...
...
@@ -93,7 +93,20 @@ public class DutyPersonController extends BaseController {
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
statisticsDay
(
beginDate
,
endDate
));
}
/**
* 值班月视图
*
* @return ResponseModel
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
"/new-duty-detail"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
newStatisticsDay
(
beginDate
,
endDate
));
}
/**
* 调班
...
...
@@ -168,7 +181,14 @@ public class DutyPersonController extends BaseController {
@ApiParam
(
value
=
"岗位"
)
@RequestParam
(
required
=
false
)
String
postType
)
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
dayDutyPersonList
(
dutyDay
,
shiftId
,
postType
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"新查询指定日期值班人信息列表"
)
@GetMapping
(
"/new-person/{dutyDay}/list"
)
public
ResponseModel
newListDutyPerson
(
@ApiParam
(
value
=
"值班日期"
,
required
=
true
)
@PathVariable
String
dutyDay
,
@ApiParam
(
value
=
"班次id"
)
@RequestParam
(
required
=
false
)
Long
shiftId
,
@ApiParam
(
value
=
"岗位"
)
@RequestParam
(
required
=
false
)
String
postType
)
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
getSchedulingDutyForSpecifyDate
(
dutyDay
,
shiftId
,
postType
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"查询当前值班人信息列表"
)
@GetMapping
(
"/person/on_duty/list"
)
...
...
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 @
60968472
...
...
@@ -91,7 +91,7 @@ public class OrgPersonController {
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新
单位数据"
,
notes
=
"更新单位
数据"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新
人员数据"
,
notes
=
"更新人员
数据"
)
public
ResponseModel
<?>
updateByIdOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgPersonDto
OrgPersonVo
,
@PathVariable
Long
id
)
throws
Exception
{
OrgPersonVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
...
...
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 @
60968472
...
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
...
...
@@ -264,6 +265,55 @@ public class OrgUsrController extends BaseController {
page
=
iOrgUsrService
.
page
(
pageBean
,
orgUsrQueryWrapper
);
return
page
;
}
/**
* 列表分页查询
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/new-list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新列表分页查询---只查询当前登录人本单位下的对应数据信息"
,
notes
=
"新列表分页查询---只查询当前登录人本单位下的对应数据信息"
)
public
IPage
<
OrgUsr
>
newlistPage
(
String
pageNum
,
String
pageSize
,
OrgUsr
orgUsr
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
companyIdString
=
reginParams
.
getPersonIdentity
().
getCompanyId
();
orgUsr
.
setParentId
(
companyIdString
);
Page
<
OrgUsr
>
pageBean
;
QueryWrapper
<
OrgUsr
>
orgUsrQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
OrgUsr
>
aClass
=
orgUsr
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
orgUsr
);
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
orgUsr
);
orgUsrQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
orgUsr
);
orgUsrQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
orgUsr
);
orgUsrQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
orgUsr
);
orgUsrQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
}
});
orgUsrQueryWrapper
.
eq
(
"is_delete"
,
0
);
IPage
<
OrgUsr
>
page
;
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
page
=
iOrgUsrService
.
page
(
pageBean
,
orgUsrQueryWrapper
);
return
page
;
}
/**
* 导入部门信息
...
...
@@ -586,5 +636,4 @@ public class OrgUsrController extends BaseController {
public
ResponseModel
<
Object
>
getOrgUserByAmosUserId
(
@RequestParam
String
amosUserId
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
getOrgUserByAmosUserId
(
amosUserId
));
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/ContractServiceImpl.java
View file @
60968472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.ContractDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.Contract
;
import
com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany
;
import
com.yeejoin.amos.boot.module.common.api.entity.SourceFile
;
import
com.yeejoin.amos.boot.module.common.api.mapper.ContractMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IContractService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.FileInfoModel
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -23,10 +16,17 @@ import org.typroject.tyboot.core.rdbms.annotation.Operator;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.DataNotFound
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.ContractDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.Contract
;
import
com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany
;
import
com.yeejoin.amos.boot.module.common.api.entity.SourceFile
;
import
com.yeejoin.amos.boot.module.common.api.mapper.ContractMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IContractService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.FileInfoModel
;
/**
* 维保合同服务实现类
...
...
@@ -53,8 +53,6 @@ public class ContractServiceImpl extends BaseService<ContractDto, Contract, Cont
MaintenanceCompany
company
=
maintenanceCompanyService
.
getMaintenanceCompany
(
amosUserId
);
companyId
=
company
.
getSequenceNbr
();
}
//
Page
<
ContractDto
>
resultPage
=
queryForContractPageByParam
(
page
,
isDelete
,
companyId
,
signedCompanyId
,
name
,
typeCode
,
signedDate
);
List
<
ContractDto
>
resultContractDtos
=
resultPage
.
getRecords
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyCarServiceImpl.java
View file @
60968472
...
...
@@ -170,21 +170,23 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
if
(
StringUtils
.
isNotBlank
(
instanceId
))
{
String
[]
instanceIds
=
instanceId
.
split
(
","
);
List
<
Map
<
String
,
Object
>>
dutyList
=
dutyPersonShiftMapper
.
getDutyForSpecifyDate
(
dutyDay
);
if
(
dutyList
!=
null
&&
dutyList
.
size
()>
0
)
{
for
(
Map
<
String
,
Object
>
dutyDetail
:
dutyList
)
{
if
(!
dutyDetail
.
containsKey
(
"name"
))
{
continue
;
}
//
List<Map<String, Object>> dutyList = dutyPersonShiftMapper.getDutyForSpecifyDate(dutyDay);
//
if(dutyList!=null && dutyList.size()>0) {
//
for (Map<String, Object> dutyDetail : dutyList) {
//
if(!dutyDetail.containsKey("name")) {
//
continue;
//
}
// 获取当前装备ID下的排版数据
List
<
Map
<
String
,
Object
>>
specifyDateList
=
dutyPersonShiftMapper
.
getPositionStaffDutyForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
instanceIds
,
dutyDetail
.
get
(
"name"
).
toString
()
);
this
.
getGroupCode
(),
instanceIds
,
null
);
if
(
specifyDateList
==
null
||
specifyDateList
.
size
()
<
1
||
specifyDateList
.
get
(
0
)==
null
)
{
continue
;
}
LinkedHashMap
<
String
,
Object
>
infoMap_1
=
new
LinkedHashMap
<
String
,
Object
>();
infoMap_1
.
put
(
dutyDetail
.
get
(
"name"
).
toString
(),
""
);
resultList
.
add
(
infoMap_1
);
//取消掉班次的显示---2022-01-16 by chenhao ---start
//infoMap_1.put(dutyDetail.get("name").toString(), "");
//resultList.add(infoMap_1);
//取消掉班次的显示---2022-01-16 by chenhao ---end
for
(
Map
<
String
,
Object
>
specify
:
specifyDateList
)
{
LinkedHashMap
<
String
,
Object
>
infoMap_2
=
new
LinkedHashMap
<
String
,
Object
>();
// infoMap_2.put(specify.get("postTypeName").toString(),specify.get("userName").toString());
...
...
@@ -194,32 +196,8 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
resultList
.
add
(
infoMap_2
);
}
}
}
}
// 获取当前装备ID下的排版数据
// List<Map<String, Object>> specifyDateList = dutyPersonShiftMapper.getSpecifyDateList(dutyDay,
// this.getGroupCode(), instanceIds,null);
// for (Map<String, Object> specify : specifyDateList) {
//
// if(!specify.containsKey("name") || specify.get("name").toString()==null) {
// continue;
// }
// LinkedHashMap<String, Object> infoMap_1 =new LinkedHashMap<String, Object>();
// infoMap_1.put(specify.get("name").toString(), "");
// resultList.add(infoMap_1);
// Map<String, Object> equipmentOperatorMap = dutyPersonShiftMapper.getEquipmentOperator(dutyDay,
// this.getGroupCode(), instanceIds, "消防车驾驶员", specify.get("name").toString());
// String operator =null;
// if (equipmentOperatorMap!=null && equipmentOperatorMap.containsKey("userName")) {
// operator = equipmentOperatorMap.get("equipmentOperatorMap").toString();
// }
// LinkedHashMap<String, Object> infoMap_2 =new LinkedHashMap<String, Object>();
// infoMap_2.put("驾驶员", operator!=null?operator:"");
// resultList.add(infoMap_2);
// LinkedHashMap<String, Object> infoMap_3 =new LinkedHashMap<String, Object>();
// infoMap_3.put("战斗员",specify.get("value").toString());
// resultList.add(infoMap_3);
// }
// }
//}
}
detailList
.
add
(
resultList
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyCommonServiceImpl.java
View file @
60968472
...
...
@@ -46,6 +46,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.enums.DutyViewTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.mapper.DutyPersonShiftMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyCommonService
;
/**
...
...
@@ -76,6 +77,9 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
@Autowired
OrgUsrServiceImpl
orgUsrService
;
@Autowired
DutyPersonShiftMapper
dutyPersonShiftMapper
;
/**
* 每天单个班次执勤人数全部小于等于3人
*/
...
...
@@ -214,6 +218,125 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
/*bug2468 值班排班,日历视图单班次执勤人数满足≤3且班次≤2时,值班显示方式错误 陈召 结束*/
}
public
List
<
Map
<
String
,
Object
>>
newStatisticsDay
(
String
beginDate
,
String
endDate
)
throws
ParseException
{
Date
dateBegin
=
DateUtils
.
dateParse
(
beginDate
,
DateUtils
.
DATE_PATTERN
);
String
timeStart
=
DateUtils
.
dateTimeToDateString
(
dateBegin
);
Date
dateEnd
=
DateUtils
.
dateParse
(
endDate
,
DateUtils
.
DATE_PATTERN
);
String
timeEnd
=
DateUtils
.
dateTimeToDateString
(
dateEnd
);
List
<
String
>
betweenDate
=
getBetweenDate
(
timeStart
,
timeEnd
);
//拿到每一天的视图展示
String
beginTime
=
null
;
String
endTime
=
null
;
List
<
Map
<
String
,
Object
>>
viewTypeResult
=
new
ArrayList
<>();
for
(
String
time
:
betweenDate
)
{
beginTime
=
time
+
" 00:00:00"
;
endTime
=
time
+
" 23:59:59"
;
Map
<
String
,
Object
>
viewTypeMap
=
new
HashMap
<>();
viewTypeMap
.
put
(
"date"
,
time
);
viewTypeResult
.
add
(
viewTypeMap
);
}
List
<
Map
<
String
,
Object
>>
rangeDate
=
dutyPersonShiftService
.
getBaseMapper
().
genRangeDate
(
beginDate
,
endDate
);
List
<
Map
<
String
,
Object
>>
resultMap
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
stringObjectMap
:
viewTypeResult
)
{
for
(
Map
<
String
,
Object
>
objectMap
:
rangeDate
)
{
if
(
stringObjectMap
.
get
(
"date"
).
equals
(
objectMap
.
get
(
"date"
))){
Map
<
String
,
Object
>
result
=
new
LinkedHashMap
<>();
result
.
put
(
"key"
,
objectMap
.
get
(
"date"
));
String
dateString
=
objectMap
.
get
(
"date"
).
toString
();
if
(
this
.
getGroupCode
().
equals
(
"dutyPerson"
))
{
result
.
put
(
"data"
,
getPersonPostTypeNameAndCount
(
dateString
));
}
else
if
(
this
.
getGroupCode
().
equals
(
"dutyCar"
))
{
result
.
put
(
"data"
,
getCarPostTypeNameAndCount
(
dateString
));
}
else
if
(
this
.
getGroupCode
().
equals
(
"dutyFireFighting"
))
{
result
.
put
(
"data"
,
getFireFightingPostTypeNameAndCount
(
dateString
));
}
else
if
(
this
.
getGroupCode
().
equals
(
"dutyFirstAid"
))
{
result
.
put
(
"data"
,
getFirstAidPostTypeNameAndCount
(
dateString
));
}
resultMap
.
add
(
result
);
}
}
}
return
resultMap
;
}
/**
* 排班值班人员的统计类型为:
* 岗位: 岗位人员数量
* @param dutyDate
* @return
*/
public
Object
getPersonPostTypeNameAndCount
(
String
dutyDate
)
{
return
dutyPersonShiftService
.
getBaseMapper
().
newStationViewData
(
dutyDate
,
this
.
getGroupCode
());
}
/**
* 车辆值班人员左侧的统计: 只有几辆车
* @param dutyDate
* @return
*/
public
Object
getCarPostTypeNameAndCount
(
String
dutyDate
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
int
station
=
0
;
int
person
=
0
;
List
<
Map
<
String
,
Object
>>
equipmentList
=
dutyPersonShiftMapper
.
getEquipmentForSpecifyDate
(
dutyDate
,
this
.
getGroupCode
(),
"carId"
,
"carName"
,
"teamName"
,
"result.carId"
);
if
(
equipmentList
==
null
||
equipmentList
.
size
()<
1
||
equipmentList
.
get
(
0
)==
null
)
{
station
=
0
;
}
else
{
station
=
equipmentList
.
size
();
}
map
.
put
(
"station"
,
station
);
List
<
Map
<
String
,
Object
>>
list
=
dutyPersonShiftService
.
getBaseMapper
().
newStationViewData
(
dutyDate
,
this
.
getGroupCode
());
for
(
Map
<
String
,
Object
>
map2
:
list
)
{
person
=
person
+
Integer
.
parseInt
(
map2
.
get
(
"total"
).
toString
());
}
map
.
put
(
"person"
,
person
);
return
map
;
}
public
Object
getFireFightingPostTypeNameAndCount
(
String
dutyDate
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
int
station
=
0
;
int
person
=
0
;
List
<
Map
<
String
,
Object
>>
equipmentList
=
dutyPersonShiftMapper
.
getEquipmentForSpecifyDate
(
dutyDate
,
this
.
getGroupCode
(),
"fireFightingId"
,
"fireFighting"
,
"teamName"
,
"result.fireFightingId"
);
if
(
equipmentList
==
null
||
equipmentList
.
size
()<
1
||
equipmentList
.
get
(
0
)==
null
)
{
station
=
0
;
}
else
{
station
=
equipmentList
.
size
();
}
map
.
put
(
"station"
,
station
);
List
<
Map
<
String
,
Object
>>
list
=
dutyPersonShiftService
.
getBaseMapper
().
newStationViewData
(
dutyDate
,
this
.
getGroupCode
());
for
(
Map
<
String
,
Object
>
map2
:
list
)
{
person
=
person
+
Integer
.
parseInt
(
map2
.
get
(
"total"
).
toString
());
}
map
.
put
(
"person"
,
person
);
return
map
;
}
public
Object
getFirstAidPostTypeNameAndCount
(
String
dutyDate
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
int
station
=
0
;
int
person
=
0
;
List
<
Map
<
String
,
Object
>>
equipmentList
=
dutyPersonShiftMapper
.
getEquipmentForSpecifyDate
(
dutyDate
,
this
.
getGroupCode
(),
"firstAidId"
,
"firstAid"
,
"teamName"
,
"result.firstAidId"
);
if
(
equipmentList
==
null
||
equipmentList
.
size
()<
1
||
equipmentList
.
get
(
0
)==
null
)
{
station
=
0
;
}
else
{
station
=
equipmentList
.
size
();
}
map
.
put
(
"station"
,
station
);
List
<
Map
<
String
,
Object
>>
list
=
dutyPersonShiftService
.
getBaseMapper
().
newStationViewData
(
dutyDate
,
this
.
getGroupCode
());
for
(
Map
<
String
,
Object
>
map2
:
list
)
{
person
=
person
+
Integer
.
parseInt
(
map2
.
get
(
"total"
).
toString
());
}
map
.
put
(
"person"
,
person
);
return
map
;
}
private
Object
buildViewData
(
DutyViewTypeEnum
viewTypeEnum
,
String
dutyDate
,
String
appKey
)
{
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
switch
(
viewTypeEnum
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyFireFightingServiceImpl.java
View file @
60968472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
static
org
.
hamcrest
.
CoreMatchers
.
nullValue
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
...
...
@@ -15,7 +13,6 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
com.itextpdf.text.pdf.PdfStructTreeController.returnType
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyFireFightingDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireStationDto
;
...
...
@@ -85,29 +82,29 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement
if
(
StringUtils
.
isNotBlank
(
instanceId
))
{
String
[]
instanceIds
=
instanceId
.
split
(
","
);
List
<
Map
<
String
,
Object
>>
dutyList
=
dutyPersonShiftMapper
.
getDutyForSpecifyDate
(
dutyDay
);
if
(
dutyList
!=
null
&&
dutyList
.
size
()>
0
)
{
for
(
Map
<
String
,
Object
>
dutyDetail
:
dutyList
)
{
if
(!
dutyDetail
.
containsKey
(
"name"
))
{
continue
;
}
//
List<Map<String, Object>> dutyList = dutyPersonShiftMapper.getDutyForSpecifyDate(dutyDay);
//
if(dutyList!=null && dutyList.size()>0) {
//
for (Map<String, Object> dutyDetail : dutyList) {
//
if(!dutyDetail.containsKey("name")) {
//
continue;
//
}
// 获取当前装备ID下的排版数据
List
<
Map
<
String
,
Object
>>
specifyDateList
=
dutyPersonShiftMapper
.
getPositionStaffDutyForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
instanceIds
,
dutyDetail
.
get
(
"name"
).
toString
()
);
this
.
getGroupCode
(),
instanceIds
,
null
);
if
(
specifyDateList
==
null
||
specifyDateList
.
size
()
<
1
||
specifyDateList
.
get
(
0
)==
null
)
{
continue
;
}
LinkedHashMap
<
String
,
Object
>
infoMap_1
=
new
LinkedHashMap
<
String
,
Object
>();
infoMap_1
.
put
(
dutyDetail
.
get
(
"name"
).
toString
(),
""
);
resultList
.
add
(
infoMap_1
);
//
LinkedHashMap<String, Object> infoMap_1 =new LinkedHashMap<String, Object>();
//
infoMap_1.put(dutyDetail.get("name").toString(), "");
//
resultList.add(infoMap_1);
for
(
Map
<
String
,
Object
>
specify
:
specifyDateList
)
{
LinkedHashMap
<
String
,
Object
>
infoMap_2
=
new
LinkedHashMap
<
String
,
Object
>();
if
(
specify
.
containsKey
(
"postTypeName"
)&&
specify
.
get
(
"postTypeName"
)!=
null
&&
specify
.
containsKey
(
"userName"
)&&
specify
.
get
(
"userName"
)!=
null
)
{
infoMap_2
.
put
(
specify
.
get
(
"postTypeName"
).
toString
(),
specify
.
get
(
"userName"
).
toString
());
resultList
.
add
(
infoMap_2
);
}
}
}
//
}
//
}
}
}
detailList
.
add
(
resultList
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyFirstAidServiceImpl.java
View file @
60968472
...
...
@@ -7,6 +7,7 @@ import java.util.List;
import
java.util.Map
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.velocity.runtime.directive.Break
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
...
@@ -18,8 +19,6 @@ import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import
com.yeejoin.amos.boot.module.common.api.mapper.DutyPersonShiftMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyFirstAidService
;
import
ch.qos.logback.core.joran.conditional.IfAction
;
@Service
public
class
DutyFirstAidServiceImpl
extends
DutyCommonServiceImpl
implements
IDutyFirstAidService
{
...
...
@@ -67,15 +66,15 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
}
List
<
Object
>
detailList
=
new
ArrayList
<
Object
>();
for
(
Map
<
String
,
Object
>
map
:
equipmentList
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<
Map
<
String
,
Object
>
>();
LinkedHashMap
<
String
,
Object
>
titleMap_1
=
new
LinkedHashMap
<
String
,
Object
>();
titleMap_1
.
put
(
"120急救站"
,
map
.
get
(
"firstAid"
).
toString
());
resultList
.
add
(
titleMap_1
);
LinkedHashMap
<
String
,
Object
>
titleMap_2
=
new
LinkedHashMap
<
String
,
Object
>();
if
(
map
.
containsKey
(
"teamName"
)
&&
map
.
get
(
"teamName"
)
!=
null
){
titleMap_2
.
put
(
"单位/部门"
,
map
.
get
(
"teamName"
).
toString
());
}
resultList
.
add
(
titleMap_2
);
List
<
Object
>
resultList
=
new
ArrayList
<
Object
>();
//
LinkedHashMap<String, Object> titleMap_1 = new LinkedHashMap<String, Object>();
//
titleMap_1.put("120急救站", map.get("firstAid").toString());
resultList
.
add
(
map
.
get
(
"firstAid"
).
toString
()
);
//
LinkedHashMap<String, Object> titleMap_2 = new LinkedHashMap<String, Object>();
//
if(map.containsKey("teamName") && map.get("teamName") != null){
//
titleMap_2.put("单位/部门", map.get("teamName").toString());
//
}
//
resultList.add(titleMap_2);
String
carId
=
map
.
get
(
"firstAidId"
).
toString
();
Map
<
String
,
Object
>
instanceMap
=
dutyPersonShiftMapper
.
getInstanceIdForSpecifyDateAndEquipment
(
dutyDay
,
this
.
getGroupCode
(),
carId
);
...
...
@@ -86,22 +85,22 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
if
(
StringUtils
.
isNotBlank
(
instanceId
))
{
String
[]
instanceIds
=
instanceId
.
split
(
","
);
List
<
Map
<
String
,
Object
>>
dutyList
=
dutyPersonShiftMapper
.
getDutyForSpecifyDate
(
dutyDay
);
if
(
dutyList
!=
null
&&
dutyList
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
dutyDetail
:
dutyList
)
{
if
(!
dutyDetail
.
containsKey
(
"name"
))
{
continue
;
}
//
List<Map<String, Object>> dutyList = dutyPersonShiftMapper.getDutyForSpecifyDate(dutyDay);
//
if (dutyList != null && dutyList.size() > 0) {
//
for (Map<String, Object> dutyDetail : dutyList) {
//
if (!dutyDetail.containsKey("name")) {
//
continue;
//
}
// 获取当前装备ID下的排版数据
List
<
Map
<
String
,
Object
>>
specifyDateList
=
dutyPersonShiftMapper
.
getPositionStaffDutyForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
instanceIds
,
dutyDetail
.
get
(
"name"
).
toString
()
);
null
);
if
(
specifyDateList
==
null
||
specifyDateList
.
size
()
<
1
||
specifyDateList
.
get
(
0
)
==
null
)
{
continue
;
}
LinkedHashMap
<
String
,
Object
>
infoMap_1
=
new
LinkedHashMap
<
String
,
Object
>();
infoMap_1
.
put
(
dutyDetail
.
get
(
"name"
).
toString
(),
""
);
resultList
.
add
(
infoMap_1
);
//
LinkedHashMap<String, Object> infoMap_1 = new LinkedHashMap<String, Object>();
//
infoMap_1.put(dutyDetail.get("name").toString(), "");
//
resultList.add(infoMap_1);
for
(
Map
<
String
,
Object
>
specify
:
specifyDateList
)
{
LinkedHashMap
<
String
,
Object
>
infoMap_2
=
new
LinkedHashMap
<
String
,
Object
>();
// infoMap_2.put(specify.get("postTypeName").toString(), specify.get("userName").toString());
...
...
@@ -110,9 +109,9 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
infoMap_2
.
put
(
specify
.
get
(
"postTypeName"
).
toString
(),
specify
.
get
(
"userName"
).
toString
());
resultList
.
add
(
infoMap_2
);
}
}
}
//
}
//
//
}
}
}
detailList
.
add
(
resultList
);
...
...
@@ -125,6 +124,11 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<
Map
<
String
,
Object
>>();
List
<
String
>
userNameList
=
new
ArrayList
<
String
>();
String
firstAidCompanyId
=
dutyPersonShiftMapper
.
getFirstAidCompanyId
();
if
(
firstAidCompanyId
!=
""
&&
firstAidCompanyId
!=
null
){
ids
.
add
(
firstAidCompanyId
);
}
List
<
String
>
firstAidSimpleList
=
new
ArrayList
<
String
>();
List
<
String
>
companyNameList
=
new
ArrayList
<
String
>();
String
typeString
=
"JJZ"
;
...
...
@@ -160,7 +164,16 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
}
resultList
.
add
(
detailMap
);
});
result
.
add
(
resultList
.
get
(
0
));
for
(
int
i
=
0
;
i
<
resultList
.
size
();
i
++)
{
if
(
resultList
.
get
(
i
).
size
()
==
4
){
result
.
add
(
resultList
.
get
(
i
));
}
if
(
result
.
size
()>
0
){
break
;
}
}
return
result
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyPersonServiceImpl.java
View file @
60968472
...
...
@@ -304,7 +304,48 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
}
public
Object
getSchedulingDutyForSpecifyDate
(
String
dutyDay
,
Long
shiftId
,
String
postType
)
{
List
<
Map
<
String
,
Object
>>
equipmentList
=
dutyPersonShiftMapper
.
getNewEquipmentForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
"deptId"
,
"deptName"
,
"result.deptId"
);
if
(
equipmentList
==
null
||
equipmentList
.
size
()
<
1
||
equipmentList
.
get
(
0
)
==
null
)
{
return
null
;
}
List
<
Object
>
detailList
=
new
ArrayList
<
Object
>();
for
(
Map
<
String
,
Object
>
map
:
equipmentList
)
{
List
<
Object
>
resultList
=
new
ArrayList
<
Object
>();
LinkedHashMap
<
String
,
Object
>
titleMap_2
=
new
LinkedHashMap
<
String
,
Object
>();
if
(
map
.
containsKey
(
"deptName"
)
&&
map
.
get
(
"deptName"
)
!=
null
){
resultList
.
add
(
map
.
get
(
"deptName"
).
toString
());
}
String
carId
=
map
.
get
(
"deptId"
).
toString
();
Map
<
String
,
Object
>
instanceMap
=
dutyPersonShiftMapper
.
getInstanceIdForSpecifyDateAndEquipment
(
dutyDay
,
this
.
getGroupCode
(),
carId
);
if
(
instanceMap
==
null
)
{
continue
;
}
String
instanceId
=
instanceMap
.
get
(
"instanceIds"
).
toString
();
if
(
StringUtils
.
isNotBlank
(
instanceId
))
{
String
[]
instanceIds
=
instanceId
.
split
(
","
);
// 获取当前装备ID下的排版数据
List
<
Map
<
String
,
Object
>>
specifyDateList
=
dutyPersonShiftMapper
.
getPositionStaffDutyForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
instanceIds
,
null
);
if
(
specifyDateList
==
null
||
specifyDateList
.
size
()
<
1
||
specifyDateList
.
get
(
0
)
==
null
)
{
continue
;
}
for
(
Map
<
String
,
Object
>
specify
:
specifyDateList
)
{
LinkedHashMap
<
String
,
Object
>
infoMap_2
=
new
LinkedHashMap
<
String
,
Object
>();
if
(
specify
.
containsKey
(
"postTypeName"
)&&
specify
.
get
(
"postTypeName"
)!=
null
&&
specify
.
containsKey
(
"userName"
)&&
specify
.
get
(
"userName"
)!=
null
)
{
infoMap_2
.
put
(
specify
.
get
(
"postTypeName"
).
toString
(),
specify
.
get
(
"userName"
).
toString
());
resultList
.
add
(
infoMap_2
);
}
}
}
detailList
.
add
(
resultList
);
}
return
detailList
;
}
...
...
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 @
60968472
...
...
@@ -323,6 +323,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
// 发起主表流程 并添加至报修日志
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
WAITING_AUDIT
.
getCode
());
FailureDetailsDto
model
=
this
.
updateWithModel
(
failureDetailsDto
);
if
(
ObjectUtils
.
isNotEmpty
(
failureDetailsDto
.
getAttachment
()))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureVerifyServiceImpl.java
View file @
60968472
...
...
@@ -85,10 +85,15 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
List
<
FailureVerify
>
byfaultId
=
findByfaultId
(
failureDetailsDto
.
getSequenceNbr
());
if
(
byfaultId
.
size
()
!=
0
)
{
if
(
byfaultId
.
size
()
!=
0
&&
status
.
getCode
().
equals
(
FailureStatuEnum
.
FINISH
.
getCode
())
)
{
failureDetailsDto
.
setCurrentStatus
(
status
.
getCode
());
}
if
(
condition
==
AuditResultEnum
.
REFUSE
.
getCode
()){
failureDetailsDto
.
setCurrentStatus
(
status
.
getCode
());
}
failureDetailsDto
.
setSequenceNbr
(
model
.
getFaultId
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/MaintenanceCompanyServiceImpl.java
View file @
60968472
...
...
@@ -643,7 +643,7 @@ public class MaintenanceCompanyServiceImpl
MaintenanceCompany
maintenanceCompany
=
new
MaintenanceCompany
();
if
(
ValidationUtil
.
isEmpty
(
seq
))
{
maintenanceCompany
=
getMaintenanceCompany
(
amosUserId
);
seq
=
maintenanceCompany
.
get
ParentId
();
seq
=
maintenanceCompany
.
get
SequenceNbr
();
}
// 机场单位列表基本信息
if
(
pageNum
==
-
1
||
pageSize
==
-
1
)
{
...
...
@@ -675,11 +675,11 @@ public class MaintenanceCompanyServiceImpl
LambdaQueryWrapper
<
MaintenanceCompany
>
wrapper
=
new
LambdaQueryWrapper
<
MaintenanceCompany
>();
wrapper
.
eq
(
MaintenanceCompany:
:
getIsDelete
,
false
);
wrapper
.
eq
(
MaintenanceCompany:
:
getAmosId
,
amosUserId
);
MaintenanceCompany
maintenance
Company
=
this
.
baseMapper
.
selectOne
(
wrapper
);
MaintenanceCompany
maintenance
Person
=
this
.
baseMapper
.
selectOne
(
wrapper
);
// DynamicFormInstance dyFormInstance = dynamicFormInstanceService.getOne(
// new LambdaQueryWrapper<DynamicFormInstance>().eq(DynamicFormInstance::getFieldCode, "amosAccount")
// .eq(DynamicFormInstance::getFieldValue, amosUserId));
if
(
ValidationUtil
.
isEmpty
(
maintenance
Company
))
{
if
(
ValidationUtil
.
isEmpty
(
maintenance
Person
))
{
throw
new
BadRequest
(
"维保账号不存在或未关联系统账号."
);
}
// MaintenanceCompany person = this.getOne(new LambdaQueryWrapper<MaintenanceCompany>()
...
...
@@ -687,11 +687,11 @@ public class MaintenanceCompanyServiceImpl
// if (ValidationUtil.isEmpty(person)) {
// throw new BadRequest("维保账号不存在或未关联系统账号.");
// }
//
maintenanceCompany = this.getOne(new LambdaQueryWrapper<MaintenanceCompany>()
// .eq(MaintenanceCompany::getSequenceNbr, p
erson.getParentId()));
//
if (ValidationUtil.isEmpty(maintenanceCompany)) {
// throw new BadRequest("维保账号
不存在或未关联系统账号.");
//
}
MaintenanceCompany
maintenanceCompany
=
this
.
getOne
(
new
LambdaQueryWrapper
<
MaintenanceCompany
>()
.
eq
(
MaintenanceCompany:
:
getSequenceNbr
,
maintenanceP
erson
.
getParentId
()));
if
(
ValidationUtil
.
isEmpty
(
maintenanceCompany
))
{
throw
new
BadRequest
(
"维保公司
不存在或未关联系统账号."
);
}
return
maintenanceCompany
;
}
...
...
@@ -818,7 +818,7 @@ public class MaintenanceCompanyServiceImpl
// 查询公司下人列表
List
<
MaintenanceCompany
>
personList
=
list
(
new
LambdaQueryWrapper
<
MaintenanceCompany
>()
.
eq
(
MaintenanceCompany:
:
getIsDelete
,
false
).
eq
(
MaintenanceCompany:
:
getType
,
PERSON
)
.
likeRight
(
MaintenanceCompany:
:
getCode
,
company
.
getCode
()));
.
eq
(
MaintenanceCompany:
:
getParentId
,
company
.
getParentId
()));
List
<
Long
>
instanceIdList
=
Lists
.
transform
(
personList
,
MaintenanceCompany:
:
getInstanceId
);
// 查询手机号
List
<
DynamicFormInstance
>
dynamicFormInstanceList
=
dynamicFormInstanceService
...
...
@@ -831,7 +831,7 @@ public class MaintenanceCompanyServiceImpl
Map
<
String
,
Object
>
map
=
Maps
.
newHashMap
();
map
.
put
(
"sequenceNbr"
,
person
.
getSequenceNbr
());
map
.
put
(
"name"
,
person
.
getName
());
map
.
put
(
"tel"
,
dyMap
.
get
(
person
.
getInstanceId
())
.
get
(
0
).
getFieldValue
()
);
map
.
put
(
"tel"
,
dyMap
.
get
(
person
.
getInstanceId
())
!=
null
?
dyMap
.
get
(
person
.
getInstanceId
()).
get
(
0
).
getFieldValue
()
:
null
);
resultList
.
add
(
map
);
});
return
resultList
;
...
...
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 @
60968472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.io.Serializable
;
import
java.lang.reflect.Method
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
javax.annotation.Resource
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -40,6 +11,7 @@ import com.google.common.collect.Lists;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.dto.CheckObjectDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyDto
;
...
...
@@ -76,6 +48,36 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
javax.annotation.Resource
;
import
java.io.Serializable
;
import
java.lang.reflect.Method
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* 机构/部门/人员表 服务实现类
...
...
@@ -511,8 +513,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
@Override
public
OrgUsrDto
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
throws
Exception
{
public
OrgUsrDto
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
{
orgUsr
.
setRecDate
(
new
Date
());
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
orgUsr
.
setRecUserName
(
user
.
getRealName
());
...
...
@@ -533,19 +534,14 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
});
// 保存动态表单数据
alertFormValueServiceImpl
.
saveBatch
(
alertFromValuelist
);
OrgUsrFormDto
formDto
=
this
.
selectCompanyById
(
orgUsrDto
.
getSequenceNbr
());
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsrDto
.
getBizOrgType
()))
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
airportAddTopic
,
JSON
.
toJSONString
(
formDto
).
getBytes
(),
2
,
false
);
}
catch
(
Exception
e
)
{
e
.
getMessage
();
}
}
return
model
;
}
@Override
public
void
updateDynamicFormInstance
(
Long
instanceId
,
List
<
DynamicFormInstance
>
fromValueList
)
{
if
(
ValidationUtil
.
isEmpty
(
fromValueList
))
{
return
;
}
// 填充主键
fromValueList
.
forEach
(
alertFromValue
->
{
alertFromValue
.
setInstanceId
(
instanceId
);
...
...
@@ -697,6 +693,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
* 同步保存ES
*/
eSOrgUsrService
.
saveAlertCalledToES
(
orgUsr
);
syncCompany2Supervision
(
Lists
.
newArrayList
(
orgUsrDto
.
getSequenceNbr
()));
return
orgUsrDto
;
}
...
...
@@ -738,17 +736,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
saveOrgUsrDynamicFormInstance
(
orgUsr
,
OrgPersonVo
.
getDynamicFormValue
());
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
OrgUsrDto
updateByIdOrgUsr
(
OrgUsrDto
O
rgUsrVo
,
Long
id
)
throws
Exception
{
public
OrgUsrDto
updateByIdOrgUsr
(
OrgUsrDto
o
rgUsrVo
,
Long
id
)
throws
Exception
{
// 修改单位信息
OrgUsr
orgUsr
=
new
OrgUsr
();
OrgUsr
oriOrgUsr
=
getById
(
id
);
BeanUtils
.
copyProperties
(
O
rgUsrVo
,
orgUsr
);
BeanUtils
.
copyProperties
(
o
rgUsrVo
,
orgUsr
);
// 判断是否修改所属单位
if
(!(
oriOrgUsr
.
getParentId
()
!=
null
?
oriOrgUsr
.
getParentId
()
:
""
).
equals
(
O
rgUsrVo
.
getParentId
()))
{
if
(!(
oriOrgUsr
.
getParentId
()
!=
null
?
oriOrgUsr
.
getParentId
()
:
""
).
equals
(
o
rgUsrVo
.
getParentId
()))
{
/* 单位编辑后 code值也应做出修改 2021-09-09 陈召 开始 */
OrgUsr
parent
=
getById
(
O
rgUsrVo
.
getParentId
());
OrgUsr
parent
=
getById
(
o
rgUsrVo
.
getParentId
());
if
(
parent
!=
null
)
{
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
}
...
...
@@ -770,13 +769,15 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// saveOrgUsr(orgUsr, oriOrgUsr);
// 保存动态表单数据
updateDynamicFormInstance
(
orgUsr
.
getSequenceNbr
(),
O
rgUsrVo
.
getDynamicFormValue
());
updateDynamicFormInstance
(
orgUsr
.
getSequenceNbr
(),
o
rgUsrVo
.
getDynamicFormValue
());
/**
* 同步保存ES
*/
eSOrgUsrService
.
saveAlertCalledToES
(
orgUsr
);
OrgUsrVo
.
setBizOrgCode
(
orgUsr
.
getBizOrgCode
());
return
OrgUsrVo
;
orgUsrVo
.
setBizOrgCode
(
orgUsr
.
getBizOrgCode
());
syncCompany2Supervision
(
Lists
.
newArrayList
(
orgUsr
.
getSequenceNbr
()));
return
orgUsrVo
;
}
@Override
...
...
@@ -888,13 +889,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
@Override
public
void
saveCompany
(
List
<
OrgUsrDto
>
OrgUsrVo
)
throws
Exception
{
public
void
saveCompany
(
List
<
OrgUsrDto
>
OrgUsrVo
)
{
List
<
Long
>
companyIdList
=
Lists
.
newArrayList
();
for
(
int
i
=
0
;
i
<
OrgUsrVo
.
size
();
i
++)
{
OrgUsr
orgUsr
=
new
OrgUsr
();
BeanUtils
.
copyProperties
(
OrgUsrVo
.
get
(
i
),
orgUsr
);
orgUsr
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
saveOrgUsrDynamicFormInstance
(
orgUsr
,
OrgUsrVo
.
get
(
i
).
getDynamicFormValue
());
OrgUsrDto
orgUsrDto
=
saveOrgUsrDynamicFormInstance
(
orgUsr
,
OrgUsrVo
.
get
(
i
).
getDynamicFormValue
());
companyIdList
.
add
(
orgUsrDto
.
getSequenceNbr
());
}
syncCompany2Supervision
(
companyIdList
);
}
@Override
...
...
@@ -2065,4 +2069,32 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
wrapper
.
like
(
StringUtils
.
isNotBlank
(
amosUserId
),
OrgUsr:
:
getAmosOrgId
,
amosUserId
);
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
/**
* 同步单位信息到防火监督point表
*
* @param companyIdList
*/
protected
void
syncCompany2Supervision
(
List
<
Long
>
companyIdList
)
{
if
(
ValidationUtil
.
isEmpty
(
companyIdList
))
{
return
;
}
String
token
=
RequestContext
.
getToken
();
String
appKey
=
RequestContext
.
getAppKey
();
String
product
=
RequestContext
.
getProduct
();
new
Thread
(()
->
companyIdList
.
forEach
(
id
->
{
try
{
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setToken
(
token
);
RequestContext
.
setProduct
(
product
);
OrgUsrFormDto
formDto
=
this
.
selectCompanyById
(
id
);
if
(!
ValidationUtil
.
isEmpty
(
formDto
)
&&
OrgPersonEnum
.
公司
.
getKey
().
equals
(
formDto
.
getBizOrgType
()))
{
emqKeeper
.
getMqttClient
().
publish
(
airportAddTopic
,
JSON
.
toJSONString
(
formDto
).
getBytes
(),
2
,
false
);
}
}
catch
(
Exception
e
)
{
logger
.
debug
(
"syncCompany2Supervision error:"
,
e
.
getMessage
());
e
.
printStackTrace
();
}
})).
start
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentAlarmController.java
View file @
60968472
...
...
@@ -211,6 +211,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam
(
value
=
"buildId"
,
required
=
false
)
String
buildId
,
// @RequestParam(value = "equipmentCode", required = false) String equipmentCode,
@RequestParam
(
value
=
"id"
,
required
=
false
)
String
id
,
@RequestParam
(
value
=
"cleanStatus"
,
required
=
false
)
String
cleanStatus
,
CommonPageable
commonPageable
)
{
List
<
CommonRequest
>
queryRequests
=
new
ArrayList
<>();
CommonRequest
request
=
new
CommonRequest
();
...
...
@@ -250,6 +251,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
request10
.
setName
(
"id"
);
request10
.
setValue
(
StringUtil
.
isNotEmpty
(
id
)
?
StringUtils
.
trimToNull
(
id
)
:
null
);
queryRequests
.
add
(
request10
);
CommonRequest
request11
=
new
CommonRequest
();
request11
.
setName
(
"cleanStatus"
);
request11
.
setValue
(
StringUtil
.
isNotEmpty
(
cleanStatus
)
?
StringUtils
.
trimToNull
(
cleanStatus
)
:
null
);
queryRequests
.
add
(
request11
);
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/EquipmentSpecificController.java
View file @
60968472
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
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.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto
;
import
com.yeejoin.equipmanage.common.entity.EquipmentDetail
;
...
...
@@ -29,16 +7,28 @@ import com.yeejoin.equipmanage.common.entity.EquipmentSpecific;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.SourceNameListDTO
;
import
com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO
;
import
com.yeejoin.equipmanage.common.entity.vo.DetailPaneVO
;
import
com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.common.vo.EquipmentOnCarVo
;
import
com.yeejoin.equipmanage.common.vo.VideoOnEquipmentSpecificVo
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.service.IEquipmentDetailService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author ZeHua Li
...
...
@@ -153,8 +143,8 @@ public class EquipmentSpecificController extends AbstractBaseController {
@RequestMapping
(
value
=
"/getOneCard"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"组装组态使用装备卡片数据"
)
public
Object
getOneCard
(
Long
id
,
String
type
)
{
return
equipmentSpecificSerivce
.
getOneCard
(
id
,
type
);
public
Object
getOneCard
(
Long
id
,
String
type
)
{
return
equipmentSpecificSerivce
.
getOneCard
(
id
,
type
);
}
/**
...
...
@@ -240,29 +230,31 @@ public class EquipmentSpecificController extends AbstractBaseController {
/**
* 根据specificId删除装备相关数据
*
* @param specificId id
* @return ResponseModel
*/
@DeleteMapping
(
value
=
"/delEquipmentBySpecificId"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除装备相关所有数据"
,
notes
=
"删除装备相关所有数据"
)
@ApiOperation
(
value
=
"删除装备相关所有数据"
,
notes
=
"删除装备相关所有数据"
)
public
ResponseModel
delEquipmentBySpecificId
(
@RequestParam
Long
specificId
)
{
return
CommonResponseUtil
.
success
(
equipmentSpecificSerivce
.
delEquipmentBySpecificId
(
specificId
));
}
/**
* 根据specificIds删除装备相关数据
*
* @param specificIds id
* @return ResponseModel
*/
@DeleteMapping
(
value
=
"/delAllEquipmentBySpecificIds"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"批量删除装备相关所有数据"
,
notes
=
"批量删除装备相关所有数据"
)
@ApiOperation
(
value
=
"批量删除装备相关所有数据"
,
notes
=
"批量删除装备相关所有数据"
)
public
ResponseModel
delEquipmentBySpecificId
(
@RequestBody
List
<
Long
>
specificIds
)
{
if
(
ObjectUtils
.
isEmpty
(
specificIds
))
{
if
(
ObjectUtils
.
isEmpty
(
specificIds
))
{
return
CommonResponseUtil
.
failure
(
"参数为空"
);
}
specificIds
.
forEach
(
specificId
->
{
specificIds
.
forEach
(
specificId
->
{
equipmentSpecificSerivce
.
delEquipmentBySpecificId
(
specificId
);
});
return
CommonResponseUtil
.
success
();
...
...
@@ -274,4 +266,11 @@ public class EquipmentSpecificController extends AbstractBaseController {
public
ResponseModel
getFessIndexDetails
()
{
return
CommonResponseUtil
.
success
(
equipmentSpecificSerivce
.
getFessIndexDetails
());
}
@RequestMapping
(
value
=
"/videoOnEquipmentSpecific"
,
method
=
RequestMethod
.
POST
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"摄像头绑定设备"
,
notes
=
"摄像头绑定设备"
)
public
ResponseModel
videoOnEquipmentSpecific
(
@RequestBody
VideoOnEquipmentSpecificVo
videoOnEquipmentSpecificVo
)
{
return
CommonResponseUtil
.
success
(
equipmentSpecificSerivce
.
videoOnEquipmentSpecific
(
videoOnEquipmentSpecificVo
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
60968472
...
...
@@ -485,7 +485,7 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"按照组态格式获取系统报警,或者建筑报警列表"
,
notes
=
"按照组态格式获取系统报警,或者建筑报警列表"
)
@GetMapping
(
value
=
"/getEquipmentAlarmBySystemIdOrSourceIdVO/{Systemtype}/{id}"
)
public
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
getEquipmentAlarmBySystemIdOrSourceIdVO
(
int
pageSize
,
int
current
,
Integer
confirmType
,
String
createDate
,
String
type
,
@PathVariable
String
Systemtype
,
@PathVariable
Long
id
)
{
public
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
getEquipmentAlarmBySystemIdOrSourceIdVO
(
Integer
pageSize
,
Integer
current
,
Integer
confirmType
,
String
createDate
,
String
type
,
@PathVariable
String
Systemtype
,
@PathVariable
Long
id
)
{
Page
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
page
=
new
Page
();
page
.
setCurrent
(
current
);
page
.
setSize
(
pageSize
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/IndustryController.java
View file @
60968472
...
...
@@ -11,6 +11,8 @@ import com.yeejoin.equipmanage.common.entity.Industry;
import
com.yeejoin.equipmanage.service.IIndustryService
;
import
io.swagger.annotations.Api
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
@RestController
@Api
(
tags
=
"行业分类Industry"
)
...
...
@@ -20,6 +22,7 @@ public class IndustryController {
IIndustryService
industryService
;
@GetMapping
(
value
=
"/list"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
List
<
Industry
>
listAll
()
{
return
industryService
.
list
();
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/VideoEquipmentSpecificMapper.java
View file @
60968472
...
...
@@ -3,6 +3,9 @@ package com.yeejoin.equipmanage.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.equipmanage.common.entity.VideoEquipmentSpecific
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author ZeHua Li
...
...
@@ -11,4 +14,5 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public
interface
VideoEquipmentSpecificMapper
extends
BaseMapper
<
VideoEquipmentSpecific
>
{
List
<
VideoEquipmentSpecific
>
findBySpecificIdAndVideoIdIn
(
@Param
(
"equipmentSpecificId"
)
Long
equipmentSpecificId
,
@Param
(
"list"
)
List
<
Long
>
videoIdList
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificSerivce.java
View file @
60968472
package
com
.
yeejoin
.
equipmanage
.
service
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
...
@@ -16,14 +12,13 @@ import com.yeejoin.equipmanage.common.entity.EquipmentSpecific;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO
;
import
com.yeejoin.equipmanage.common.entity.vo.DetailPaneVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO
;
import
com.yeejoin.equipmanage.common.vo.
EquipFor3DVO
;
import
com.yeejoin.equipmanage.common.vo.EquipmentDate
;
import
com.yeejoin.equipmanage.common.vo.EquipmentDetailVo
;
import
com.yeejoin.equipmanage.common.vo.EquipmentOnCarVo
;
import
com.yeejoin.equipmanage.common.vo.EquipmentSpecific3dVo
;
import
com.yeejoin.equipmanage.common.vo.
*
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author ZeHua Li
...
...
@@ -168,6 +163,7 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
/**
* 根据specificId删除相关数据
*
* @param specificId specificId
* @return Boolean
*/
...
...
@@ -175,23 +171,33 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
/**
* 集成页面刷新,发送数据时调用
*
* @param systemTypeCode
*/
void
integrationPageSysDataRefresh
(
String
systemTypeCode
);
/**
* 更新设备表实时指标状态
*
* @param indexs
*/
void
updateEquipmentSpecIndexRealtimeData
(
List
<
EquipmentSpecificIndex
>
indexs
);
List
<
EquipmentSpecificVo
>
getEquipAndCarIotcodeByIotcode
(
String
iotCode
);
/**
* 获取中州环境监测指标详情
*
* @return
*/
Map
<
String
,
List
<
Map
<
String
,
String
>>>
getFessIndexDetails
();
/**
* 设备绑定摄像头
*
* @param videoOnEquipmentSpecificVo
* @return
*/
Boolean
videoOnEquipmentSpecific
(
VideoOnEquipmentSpecificVo
videoOnEquipmentSpecificVo
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IVideoEquipmentSpecificService.java
View file @
60968472
...
...
@@ -3,10 +3,19 @@ package com.yeejoin.equipmanage.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.equipmanage.common.entity.VideoEquipmentSpecific
;
import
java.util.List
;
/**
* @author ZeHua Li
* @date 2020/11/23 15:42
* @since v2.0
*/
public
interface
IVideoEquipmentSpecificService
extends
IService
<
VideoEquipmentSpecific
>
{
/**
* 获取设备或摄像头ID绑定集合
* @param equipmentSpecificId
* @param videoIdList
* @return
*/
List
<
VideoEquipmentSpecific
>
findBySpecificIdAndVideoIdIn
(
Long
equipmentSpecificId
,
List
<
Long
>
videoIdList
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
60968472
...
...
@@ -115,6 +115,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Value
(
"${systemctl.sync.switch}"
)
private
Boolean
syncSwitch
;
@Value
(
"${window.vedioFormat}"
)
private
String
vedioFormat
;
@Autowired
private
SourceSceneMapper
sourceSceneMapper
;
...
...
@@ -763,6 +766,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
x
.
setLocation
(
x
.
getAddress
());
}
}
x
.
setVedioFormat
(
vedioFormat
);
x
.
setUrl
(
videoService
.
getVideoUrl
(
x
.
getName
(),
x
.
getPresetPosition
(),
x
.
getUrl
(),
x
.
getCode
()));
});
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/CarServiceImpl.java
View file @
60968472
...
...
@@ -1236,6 +1236,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
carInfoVo
.
setEquipmentName
(
equipment
!=
null
?
equipment
.
getName
()
:
""
);
carInfoVo
.
setCategoryId
(
equipment
!=
null
?
equipment
.
getCategoryId
()
:
null
);
carInfoVo
.
setCategoryName
(
categoryMap
.
get
(
carInfoVo
.
getCategoryId
()));
carInfoVo
.
setName
(
car
.
getName
()+
"("
+
car
.
getCarNum
()+
")"
);
if
(
car
.
getImg
()
!=
null
){
List
<
String
>
img
=
new
ArrayList
<>();
img
.
add
(
car
.
getImg
().
get
(
0
).
getUrl
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
60968472
...
...
@@ -123,6 +123,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
videoBySpeId
.
forEach
(
action
->
{
action
.
setVedioFormat
(
vedioFormat
);
action
.
setUrl
(
videoService
.
getVideoUrl
(
action
.
getName
(),
action
.
getPresetPosition
(),
action
.
getUrl
(),
action
.
getCode
()));
});
res
.
put
(
"data"
,
specificAlarm
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentDetailServiceImpl.java
View file @
60968472
...
...
@@ -119,7 +119,7 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
equipmentDetail
.
setEquPropertyList
(
equPropertyList
);
ManufacturerInfo
manufacturerInfo
=
manufacturerInfoMapper
.
selectById
(
equipmentDetail
.
getManufacturerId
());
if
(
manufacturerInfo
!=
null
)
{
manufacturerInfo
.
setImg
(
fileServer
+
manufacturerInfo
.
getImg
());
manufacturerInfo
.
setImg
(
manufacturerInfo
.
getImg
());
}
equipmentDetail
.
setManufacturerInfo
(
manufacturerInfo
);
equipmentDetail
.
setImg
(
getEquipFileList
(
id
,
FileTypeEnum
.
image
.
toString
()));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmServiceImpl.java
View file @
60968472
...
...
@@ -208,11 +208,13 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
||
AlarmTypeEnum
.
PB
.
getCode
().
equals
(
type
))
{
dataVO
.
setAlarmType
(
AlarmTypeEnum
.
getTypeByCode
(
String
.
valueOf
(
type
)));
}
dataVO
.
setType
(
String
.
valueOf
(
x
.
get
(
"type"
)));
dataVO
.
setAlarmInfo
(
x
.
get
(
"fireEquipmentName"
)
+
dataVO
.
getAlarmType
());
dataVO
.
setEquipSpeId
(
Long
.
valueOf
(
String
.
valueOf
(
x
.
get
(
"fireEquipmentId"
))));
dataVO
.
setAlarmId
(
Long
.
valueOf
(
String
.
valueOf
(
x
.
get
(
"alarmId"
))));
dataVO
.
setAlarmTypeCode
(
String
.
valueOf
(
x
.
get
(
"fireEquipmentSpecificIndexKey"
)));
dataVO
.
setCleanStatus
(
String
.
valueOf
(
x
.
get
(
"cleanStatus"
)));
dataVO
.
setCleanStatusVal
(
String
.
valueOf
(
x
.
get
(
"cleanStatusVal"
)));
res
.
add
(
dataVO
);
});
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
60968472
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -39,84 +16,34 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
com.yeejoin.equipmanage.common.datasync.entity.FireEquipment
;
import
com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto
;
import
com.yeejoin.equipmanage.common.dto.UserDto
;
import
com.yeejoin.equipmanage.common.entity.EquProperty
;
import
com.yeejoin.equipmanage.common.entity.Equipment
;
import
com.yeejoin.equipmanage.common.entity.EquipmentCategory
;
import
com.yeejoin.equipmanage.common.entity.EquipmentDetail
;
import
com.yeejoin.equipmanage.common.entity.EquipmentIndex
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecific
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarm
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSystemSourceStatistics
;
import
com.yeejoin.equipmanage.common.entity.Stock
;
import
com.yeejoin.equipmanage.common.entity.StockBill
;
import
com.yeejoin.equipmanage.common.entity.StockBillDetail
;
import
com.yeejoin.equipmanage.common.entity.StockDetail
;
import
com.yeejoin.equipmanage.common.entity.UploadFile
;
import
com.yeejoin.equipmanage.common.entity.Video
;
import
com.yeejoin.equipmanage.common.entity.Warehouse
;
import
com.yeejoin.equipmanage.common.entity.WarehouseStructure
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.AlarmInfoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.AlarmVO
;
import
com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO
;
import
com.yeejoin.equipmanage.common.entity.vo.CurrAlaramVO
;
import
com.yeejoin.equipmanage.common.entity.vo.DetailPaneVO
;
import
com.yeejoin.equipmanage.common.entity.vo.DevInfoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.DevOverviewVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSecificDetailVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.entity.vo.ManufacturerVO
;
import
com.yeejoin.equipmanage.common.entity.vo.PartDetailVO
;
import
com.yeejoin.equipmanage.common.entity.vo.ProductInfoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO
;
import
com.yeejoin.equipmanage.common.entity.vo.SurrVideoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.TechInfoListVO
;
import
com.yeejoin.equipmanage.common.entity.vo.TechInfoVO
;
import
com.yeejoin.equipmanage.common.entity.vo.VideoVO
;
import
com.yeejoin.equipmanage.common.enums.BillContentEnum
;
import
com.yeejoin.equipmanage.common.enums.BitmapEnum
;
import
com.yeejoin.equipmanage.common.enums.EquipmentRiskTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.FileTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.StockBillTypeEnum
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.enums.*
;
import
com.yeejoin.equipmanage.common.exception.BaseException
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.utils.QRCodeUtil
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.vo.EquipFor3DVO
;
import
com.yeejoin.equipmanage.common.vo.EquipmentDate
;
import
com.yeejoin.equipmanage.common.vo.EquipmentDetailVo
;
import
com.yeejoin.equipmanage.common.vo.EquipmentOnCarVo
;
import
com.yeejoin.equipmanage.common.vo.EquipmentSpecific3dVo
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.config.EquipmentIotMqttReceiveConfig
;
import
com.yeejoin.equipmanage.fegin.VideoFeignClient
;
import
com.yeejoin.equipmanage.mapper.EquipmentIndexMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.mapper.UploadFileMapper
;
import
com.yeejoin.equipmanage.mapper.VideoMapper
;
import
com.yeejoin.equipmanage.service.IEquPropertyService
;
import
com.yeejoin.equipmanage.service.IEquipmentCategoryService
;
import
com.yeejoin.equipmanage.service.IEquipmentDetailService
;
import
com.yeejoin.equipmanage.service.IEquipmentIndexService
;
import
com.yeejoin.equipmanage.service.IEquipmentService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificIndexSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSystemSourceStatisticsService
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
com.yeejoin.equipmanage.service.IStockBillDetailService
;
import
com.yeejoin.equipmanage.service.IStockBillService
;
import
com.yeejoin.equipmanage.service.IStockDetailService
;
import
com.yeejoin.equipmanage.service.IStockService
;
import
com.yeejoin.equipmanage.service.ISyncDataService
;
import
com.yeejoin.equipmanage.service.ISystemDicService
;
import
com.yeejoin.equipmanage.service.IUploadFileService
;
import
com.yeejoin.equipmanage.service.IVideoService
;
import
com.yeejoin.equipmanage.service.IWarehouseService
;
import
com.yeejoin.equipmanage.service.IWarehouseStructureService
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.utils.RelationRedisUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @author ZeHua Li
...
...
@@ -184,6 +111,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Autowired
private
IVideoService
videoService
;
@Autowired
private
IVideoEquipmentSpecificService
videoEquipmentSpecificService
;
@Value
(
"${systemctl.dict.iot-core-param}"
)
private
String
iotCoreParam
;
...
...
@@ -471,7 +401,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
SimpleDateFormat
stf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
// @TableField(updateStrategy = FieldStrategy.IGNORED) 置空不生效 为空单独设置 by kongfm 2021-09-10
this
.
update
(
new
LambdaUpdateWrapper
<
EquipmentSpecific
>().
set
(
EquipmentSpecific:
:
getAgencyId
,
equipmentSpecific
.
getAgencyId
()).
set
(
EquipmentSpecific:
:
getTeamId
,
equipmentSpecific
.
getTeamId
()).
eq
(
EquipmentSpecific:
:
getId
,
equipmentSpecific
.
getId
()));
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
equipmentSpecific
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
}
boolean
updateById
=
this
.
updateById
(
equipmentSpecific
);
...
...
@@ -1063,17 +993,17 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Override
public
Object
getOneCard
(
Long
id
,
String
type
)
{
if
(
BitmapEnum
.
video
.
getKey
().
equals
(
type
))
{
if
(
BitmapEnum
.
video
.
getKey
().
equals
(
type
))
{
AlamVideoVO
video
=
videoMapper
.
getVideoById
(
id
);
if
(!
ObjectUtils
.
isEmpty
(
video
))
{
if
(!
ObjectUtils
.
isEmpty
(
video
))
{
video
.
setUrl
(
videoService
.
getVideoUrl
(
video
.
getName
().
toString
(),
video
.
getPresetPosition
(),
video
.
getUrl
(),
video
.
getCode
()));
video
.
setId
(
id
);
}
return
video
;
}
else
{
}
else
{
DetailPaneVO
detailPaneVO
=
new
DetailPaneVO
();
Map
<
String
,
String
>
map
=
this
.
baseMapper
.
getQrCodeAndPic
(
id
);
if
(
ObjectUtils
.
isEmpty
(
map
))
{
if
(
ObjectUtils
.
isEmpty
(
map
))
{
return
detailPaneVO
;
}
detailPaneVO
.
setQrCode
(
map
.
get
(
"qrCode"
));
...
...
@@ -1232,7 +1162,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentSpecific
.
setEquipmentDetailId
(
equipmentDetail
.
getId
());
equipmentSpecific
.
setQrCode
(
qrCode
);
equipmentSpecific
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
equipmentSpecific
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
}
boolean
save
=
this
.
save
(
equipmentSpecific
);
...
...
@@ -1310,7 +1240,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentSpecificBatch
.
setQrCode
(
list
.
get
(
i
));
equipmentSpecificBatch
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
equipmentSpecificBatch
.
setEquipmentDetailId
(
equipmentDetails
.
get
(
i
).
getId
());
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
equipmentSpecificBatch
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
}
equipmentSpecifics
.
add
(
equipmentSpecificBatch
);
...
...
@@ -1418,7 +1348,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentSpecific
.
setOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
equipmentSpecific
.
setEquipmentDetailId
(
equipmentDetail
.
getId
());
equipmentSpecific
.
setCreateDate
(
new
Date
());
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
if
(
equipmentSpecific
.
getStockDetail
()
!=
null
&&
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
()
!=
null
)
{
equipmentSpecific
.
setWarehouseStructureId
(
equipmentSpecific
.
getStockDetail
().
getWarehouseStructureId
());
}
//插入设备数据
...
...
@@ -1659,4 +1589,35 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
map
.
put
(
"tropics"
,
tropicsIndexDetails
);
return
map
;
}
@Override
public
Boolean
videoOnEquipmentSpecific
(
VideoOnEquipmentSpecificVo
videoOnEquipmentSpecificVo
)
{
Long
equipmentSpecificId
=
videoOnEquipmentSpecificVo
.
getEquipmentSpecificId
();
List
<
Long
>
videoIdList
=
videoOnEquipmentSpecificVo
.
getVideoIdList
();
if
(
equipmentSpecificId
!=
null
)
{
EquipmentSpecific
equipmentSpecific
=
this
.
baseMapper
.
selectById
(
equipmentSpecificId
);
if
(!
ObjectUtils
.
isEmpty
(
equipmentSpecific
))
{
QueryWrapper
<
VideoEquipmentSpecific
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"equipment_specific_id"
,
equipmentSpecificId
);
boolean
remove
=
videoEquipmentSpecificService
.
remove
(
queryWrapper
);
if
(
remove
)
{
List
<
VideoEquipmentSpecific
>
videoSpecificList
=
new
ArrayList
<>();
videoIdList
.
parallelStream
().
forEach
(
x
->
{
VideoEquipmentSpecific
videoEquipmentSpecific
=
new
VideoEquipmentSpecific
();
videoEquipmentSpecific
.
setVideoId
(
x
);
videoEquipmentSpecific
.
setEquipmentSpecificId
(
equipmentSpecificId
);
videoSpecificList
.
add
(
videoEquipmentSpecific
);
});
videoEquipmentSpecificService
.
saveBatch
(
videoSpecificList
);
return
Boolean
.
TRUE
;
}
else
{
throw
new
RuntimeException
(
"移除设备摄像头绑定关系失败!"
);
}
}
else
{
throw
new
RuntimeException
(
"未获取到此设备!"
);
}
}
else
{
throw
new
RuntimeException
(
"设备ID为空!"
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MaintenanceResourceServiceImpl.java
View file @
60968472
...
...
@@ -179,8 +179,8 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
public
List
<
MaintenanceResourceDto
>
findTreeById
(
Long
id
)
{
List
<
MaintenanceResourceDto
>
list
=
maintenanceResourceMapper
.
findTreeById
(
id
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
List
<
MaintenanceResourceDto
>
dtoList
=
TreeNodeUtil
.
assembleTreeNotFilter
(
list
);
List
<
MaintenanceResourceDto
>
collect
=
dtoList
.
stream
().
filter
(
x
->
!
MaintenanceResourceEnum
.
CLASSIFY
.
getValue
().
equals
(
x
.
getType
())).
collect
(
Collectors
.
toList
());
List
<
MaintenanceResourceDto
>
dtoList
=
TreeNodeUtil
.
assembleTreeNotFilter
(
list
);
//&& x.getId().equals(Long.toString(id)) 这一段用于生成树之后并没有把树子节点数据从list列表删除造成的脏数据的问题 by chenhao 2022-01-12
List
<
MaintenanceResourceDto
>
collect
=
dtoList
.
stream
().
filter
(
x
->
!
MaintenanceResourceEnum
.
CLASSIFY
.
getValue
().
equals
(
x
.
getType
())
&&
x
.
getId
().
equals
(
Long
.
toString
(
id
))
).
collect
(
Collectors
.
toList
());
return
collect
;
}
return
Lists
.
newArrayList
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/VideoEquipmentSpecificImpl.java
View file @
60968472
...
...
@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yeejoin.equipmanage.common.entity.VideoEquipmentSpecific
;
import
com.yeejoin.equipmanage.mapper.VideoEquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.service.IVideoEquipmentSpecificService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author ZeHua Li
* @date 2020/11/23 15:43
...
...
@@ -13,4 +16,11 @@ import org.springframework.stereotype.Service;
*/
@Service
public
class
VideoEquipmentSpecificImpl
extends
ServiceImpl
<
VideoEquipmentSpecificMapper
,
VideoEquipmentSpecific
>
implements
IVideoEquipmentSpecificService
{
@Autowired
private
VideoEquipmentSpecificMapper
videoEquipmentSpecificMapper
;
@Override
public
List
<
VideoEquipmentSpecific
>
findBySpecificIdAndVideoIdIn
(
Long
equipmentSpecificId
,
List
<
Long
>
videoIdList
)
{
return
videoEquipmentSpecificMapper
.
findBySpecificIdAndVideoIdIn
(
equipmentSpecificId
,
videoIdList
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AircraftServiceImpl.java
View file @
60968472
...
...
@@ -121,8 +121,12 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
String
aircraft
=
""
;
List
<
AlertFormValue
>
list1
=
list
.
stream
().
filter
(
formValue
->
formValue
.
getFieldCode
().
equals
(
"aircraft"
)
||
formValue
.
getFieldCode
().
equals
(
"aircraftModel"
)).
collect
(
Collectors
.
toList
());
if
(
list1
.
size
()
>
0
)
{
if
(!
ValidationUtil
.
isEmpty
(
list1
.
get
(
0
).
getFieldValue
()))
{
aircraft
=
list1
.
get
(
0
).
getFieldValue
();
}
else
{
aircraft
=
list1
.
get
(
0
).
getFieldValueCode
();
}
}
LambdaQueryWrapper
<
Aircraft
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
Aircraft:
:
getAircraftModel
,
aircraft
);
...
...
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 @
60968472
...
...
@@ -640,11 +640,19 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
/*
* if(null == valueCode) { valueCode = alertFormValue.getFieldValue(); }
*/
// if("flightNumber".equals(alertFormValue.getFieldCode()) || "aircraftModel".equals(alertFormValue.getFieldCode())) {
// listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), alertFormValue.getFieldValueCode()));
// } else {
if
(
"flightNumber"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
listdate
.
add
(
new
KeyValueLabel
(
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldValueCode
()));
}
else
{
if
(
"aircraftModel"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
if
(
ValidationUtil
.
isEmpty
(
valueCode
))
{
listdate
.
add
(
new
KeyValueLabel
(
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldValueCode
()));
}
else
{
listdate
.
add
(
new
KeyValueLabel
(
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldCode
(),
valueCode
));
// }
}
}
else
{
listdate
.
add
(
new
KeyValueLabel
(
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldCode
(),
valueCode
));
}
}
});
map
.
put
(
"data"
,
listdate
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
View file @
60968472
...
...
@@ -35,7 +35,10 @@ import org.apache.poi.xwpf.usermodel.XWPFTable;
import
org.apache.poi.xwpf.usermodel.XWPFTableRow
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttPersistenceException
;
import
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc
;
import
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr
;
import
org.openxmlformats.schemas.wordprocessingml.x2006.main.STJc.Enum
;
import
org.openxmlformats.schemas.wordprocessingml.x2006.main.STVerticalJc
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -434,7 +437,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
// 突发事件救援 // 漏油现场安全保障 // 专机保障 // 其他
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
HKJY
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
LYXC
.
getCode
())
if
(
alertTypeCode
.
equals
(
AlertStageEnums
.
TFSJ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
LYXC
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
ZJBZ
.
getCode
())
||
alertTypeCode
.
equals
(
AlertStageEnums
.
QTJQ
.
getCode
()))
{
if
(
e
.
containsKey
(
"onDuty"
))
{
List
<
Map
<
String
,
Object
>>
mapList
=
iDutyPersonService
.
queryByCompanyNew
(
e
.
get
(
"name"
).
toString
());
...
...
@@ -834,7 +837,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
List
<
Map
<
String
,
Object
>>
first
=
alertSubmittedMapper
.
getFirst
(
alertCalled
.
getSequenceNbr
());
// 查询后续调派
List
<
Map
<
String
,
Object
>>
other
=
alertSubmittedMapper
.
get
First
(
alertCalled
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
other
=
alertSubmittedMapper
.
get
Other
(
alertCalled
.
getSequenceNbr
());
LinkedList
<
AlertCalledPowerInfoDto
>
list
=
new
LinkedList
<>();
for
(
int
i
=
0
;
i
<
first
.
size
();
i
++)
{
...
...
@@ -858,8 +861,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
for
(
int
i
=
0
;
i
<
other
.
size
();
i
++)
{
AlertCalledPowerInfoDto
dto
=
new
AlertCalledPowerInfoDto
();
handleFunc
(
dto
,
first
.
get
(
i
));
LocalDateTime
dateTime
=
(
LocalDateTime
)
first
.
get
(
i
).
get
(
"recDate"
);
handleFunc
(
dto
,
other
.
get
(
i
));
LocalDateTime
dateTime
=
(
LocalDateTime
)
other
.
get
(
i
).
get
(
"recDate"
);
Date
date
=
Date
.
from
(
dateTime
.
toInstant
(
ZoneOffset
.
of
(
"+8"
)));
dto
.
setArriveTime
((
DateUtils
.
dateFormat
(
date
,
DateUtils
.
HOUR_PATTERN
)));
...
...
@@ -1101,6 +1104,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(!
ValidationUtil
.
isEmpty
(
dangerList
))
{
firstSize
=
dangerList
.
get
(
0
).
getCellDatas
().
get
(
5
).
getRenderData
().
getText
();
int
fSizs
=
Integer
.
parseInt
(
firstSize
);
dangerList
.
get
(
0
).
getCellDatas
().
get
(
5
).
getRenderData
().
setText
(
""
);
// 表格渲染和列表数据下标相反,需要翻转一下列表
List
<
RowRenderData
>
reverseList
=
Lists
.
reverse
(
dangerList
);
...
...
@@ -1109,10 +1113,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
int
listLength
=
dangerList
.
size
();
for
(
int
i
=
0
;
i
<
fSizs
;
i
++)
{
if
(
i
==
0
)
{
TableStyle
tableStyle
=
new
TableStyle
();
tableStyle
.
setAlign
(
Enum
.
forInt
(
2
));
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
setCellStyle
(
tableStyle
);
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
getRenderData
().
setText
(
"增\n援\n力\n量"
);
Style
style
=
new
Style
();
style
.
setFontFamily
(
"宋体"
);
style
.
setFontSize
(
12
);
...
...
@@ -1132,23 +1132,43 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
MiniTableRenderPolicy
.
Helper
.
renderRow
(
table
,
dangerListDataStartRow
,
reverseList
.
get
(
i
));
}
for
(
int
i
=
fSizs
;
i
<
listLength
;
i
++)
{
reverseList
.
get
(
i
).
getCellDatas
().
forEach
(
cellRenderData
->
{
TableStyle
tableStyle
=
new
TableStyle
();
tableStyle
.
setAlign
(
Enum
.
forInt
(
2
));
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
setCellStyle
(
tableStyle
);
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
getRenderData
().
setText
(
"增\n援\n力\n量"
);
Style
style
=
new
Style
();
style
.
setFontFamily
(
"仿宋
"
);
style
.
setFontFamily
(
"宋体
"
);
style
.
setFontSize
(
12
);
cellRenderData
.
getRenderData
().
setStyle
(
style
);
});
style
.
setBold
(
true
);
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
getRenderData
().
setStyle
(
style
);
// reverseList.get(i).getCellDatas().forEach(cellRenderData -> {
// Style style = new Style();
// style.setFontFamily("仿宋");
// style.setFontSize(12);
// cellRenderData.getRenderData().setStyle(style);
// });
XWPFTableRow
insertNewTableRow
=
table
.
insertNewTableRow
(
dangerListDataStartRow
);
IntStream
.
range
(
5
,
14
).
forEach
(
j
->
insertNewTableRow
.
createCell
());
MiniTableRenderPolicy
.
Helper
.
renderRow
(
table
,
dangerListDataStartRow
,
reverseList
.
get
(
i
));
}
TableTools
.
mergeCellsVertically
(
table
,
0
,
0
,
fSizs
+
1
);
TableTools
.
mergeCellsVertically
(
table
,
0
,
0
,
fSizs
+
1
);
if
(
listLength
-
fSizs
>
1
)
{
TableTools
.
mergeCellsVertically
(
table
,
0
,
fSizs
+
2
,
listLength
+
1
);
if
(
fSizs
==
1
&&
(
listLength
-
fSizs
>
1
)
)
{
TableTools
.
mergeCellsVertically
(
table
,
0
,
fSizs
+
2
,
fSizs
+
2
+
(
listLength
-
fSizs
-
1
)
);
}
if
(
fSizs
>
1
&&
(
listLength
-
fSizs
>
1
))
{
TableTools
.
mergeCellsVertically
(
table
,
0
,
fSizs
+
2
,
fSizs
+
2
+
(
listLength
-
fSizs
-
1
));
}
XWPFTableRow
xwpfTableRow
=
table
.
getRows
().
get
(
fSizs
+
2
);
CTTc
ctTc
=
xwpfTableRow
.
getTableCells
().
get
(
0
).
getCTTc
();
CTTcPr
ctTcPr
=
ctTc
.
addNewTcPr
();
ctTcPr
.
addNewVAlign
().
setVal
(
STVerticalJc
.
CENTER
);
}
}
...
...
@@ -1491,7 +1511,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(
designatedDriver
)
{
// 发送单个车辆的信息数据到客户
smsParams
.
put
(
"resourcesNum"
,
resourcesNum
.
toString
()
.
substring
(
resourcesNum
.
toString
().
length
()
-
2
)
);
resourcesNum
.
toString
());
List
<
AlertSubmittedObject
>
alertSubmittedObjectListSub
=
Lists
.
newArrayList
();
Map
<
String
,
Object
>
map
=
dynamicFormInstanceMapper
.
getCurentCarIsUserPhone
(
Long
.
parseLong
(
i
.
getResourcesId
()));
...
...
@@ -1525,7 +1545,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
alertSubmittedObjectListSub
.
add
(
alertSubmittedObjectSub
);
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectListSub);
// 调用短信发送接口
alertCalledAction
.
sendAlertCalleCmd
(
sCode
,
mobile
,
smsParams
);
alertCalledAction
.
sendAlertCalleCmd
(
s
ms
Code
,
mobile
,
smsParams
);
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
besidesMap
.
put
(
"responseLevelString"
,
responseLevelString
);
besidesMap
.
put
(
"alterId"
,
alertCalledId
);
...
...
@@ -1548,7 +1568,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
userList
.
add
(
i
.
get
(
"amosId"
).
toString
());
}
});
smsParams
.
put
(
"resourcesNum"
,
resourcesNumStr
.
substring
(
resourcesNumStr
.
length
()
-
2
)
);
smsParams
.
put
(
"resourcesNum"
,
resourcesNumStr
);
// 短信报送对象
// alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList);
// 发送任务消息
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferServiceImpl.java
View file @
60968472
...
...
@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.validation.ValidationUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
...
@@ -543,10 +544,10 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
responseLevel
=
list1
.
get
(
0
).
getFieldValue
();
}
definitions
.
put
(
"rescueGrid"
,
alertCalled
.
getAddress
());
definitions
.
put
(
"rescueGrid"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getAddress
()
)
?
""
:
alertCalled
.
getAddress
());
definitions
.
put
(
"type"
,
alertCalled
.
getAlertType
());
definitions
.
put
(
"contactUser"
,
alertCalled
.
getContactUser
());
definitions
.
put
(
"contactPhone"
,
alertCalled
.
getContactPhone
());
definitions
.
put
(
"contactUser"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
()
)
?
""
:
alertCalled
.
getContactUser
());
definitions
.
put
(
"contactPhone"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
()
)
?
""
:
alertCalled
.
getContactPhone
());
definitions
.
put
(
"replaceContent"
,
replaceContent
);
definitions
.
put
(
"responseLevel"
,
responseLevel
);
definitions
.
put
(
"callTime"
,
...
...
@@ -865,13 +866,13 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
double
agentCountAll
=
totalCarList
.
stream
().
mapToDouble
(
car
->
car
.
get
(
"resourceList"
)
!=
null
?
((
List
<
Map
<
String
,
Object
>>)
car
.
get
(
"resourceList"
)).
stream
()
.
filter
(
res
->
equipType
.
equals
(
res
.
get
(
"equipType"
)))
.
mapToDouble
(
c
->
(
double
)
c
.
get
(
"equipCount"
)).
sum
()
:
0
)
.
mapToDouble
(
c
->
Double
.
parseDouble
(
ValidationUtil
.
isEmpty
(
c
.
get
(
"equipCount"
)
)
?
"0"
:
c
.
get
(
"equipCount"
).
toString
()
)).
sum
()
:
0
)
.
sum
();
double
agentCountArrived
=
arrivedCarList
.
stream
().
mapToDouble
(
car
->
car
.
get
(
"resourceList"
)
!=
null
?
((
List
<
Map
<
String
,
Object
>>)
car
.
get
(
"resourceList"
)).
stream
()
.
filter
(
res
->
equipType
.
equals
(
res
.
get
(
"equipType"
)))
.
mapToDouble
(
c
->
(
double
)
c
.
get
(
"equipCount"
)).
sum
()
:
0
)
.
mapToDouble
(
c
->
Double
.
parseDouble
(
ValidationUtil
.
isEmpty
(
c
.
get
(
"equipCount"
)
)
?
"0"
:
c
.
get
(
"equipCount"
).
toString
()
)).
sum
()
:
0
)
.
sum
();
JSONObject
jsonObject
=
new
JSONObject
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/feign/JcsFeignClient.java
View file @
60968472
package
com
.
yeejoin
.
amos
.
latentdanger
.
business
.
feign
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
...
@@ -10,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
/**
* 机场服务feign
*
...
...
@@ -28,8 +31,15 @@ public interface JcsFeignClient {
/**
* 查询用户单位信息
*
* @return ResponseModel<ReginParams.PersonIdentity>
*/
@GetMapping
(
value
=
"/org-usr/getLoginUserDetails"
)
FeignClientResult
getJcsUser
();
/**
* 根据id获取单位人员列表
*/
@GetMapping
(
value
=
"/company/{ids}/person"
)
FeignClientResult
<
List
<
CompanyPerson
>>
selectCompanyPerson
(
@PathVariable
List
<
Long
>
ids
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
60968472
...
...
@@ -53,6 +53,7 @@ import com.yeejoin.amos.latentdanger.business.vo.DangerTimeAxisVo;
import
com.yeejoin.amos.latentdanger.business.vo.LatentDangerDetailRiskVo
;
import
com.yeejoin.amos.latentdanger.business.vo.LatentDangerDetailVo
;
import
com.yeejoin.amos.latentdanger.business.vo.LatentDangerListVo
;
import
com.yeejoin.amos.latentdanger.common.enums.AuditEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.DangerHandleStateEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.DictTypeEnum
;
import
com.yeejoin.amos.latentdanger.common.enums.ExecuteStateEnum
;
...
...
@@ -97,17 +98,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
com
.
yeejoin
.
amos
.
latentdanger
.
business
.
util
.
RandomUtil
.
buildOrderNo
;
...
...
@@ -251,7 +242,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if
(
ValidationUtil
.
isEmpty
(
dangerTypeEnum
))
{
throw
new
Exception
(
"检查类型参数有误"
);
}
Date
endTime
=
this
.
GetTargetEndTime
(
param
.
getReformLimitDate
());
param
.
setReformLimitDate
(
endTime
);
// 保存隐患
LatentDanger
latentDanger
=
saveLatentDanger
(
param
,
userId
,
departmentId
,
businessKey
,
orgCode
,
dangerTypeEnum
);
...
...
@@ -326,6 +318,16 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// riskFactorMapper.updateControlStatus(riskFactorBo);
// }
public
static
Date
GetTargetEndTime
(
Date
target
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
target
);
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
23
);
calendar
.
set
(
Calendar
.
MINUTE
,
59
);
calendar
.
set
(
Calendar
.
SECOND
,
59
);
Date
end
=
calendar
.
getTime
();
return
end
;
}
// TODO 使用远程调用替换
private
void
updateCheckInputDangerState
(
Long
id
,
int
code
)
{
latentDangerMapper
.
updateCheckInputDangerState
(
id
,
code
);
...
...
@@ -369,18 +371,18 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
Bean
.
copyExistPropertis
(
dangerDto
,
latentDanger
);
if
(
ValidationUtil
.
isEmpty
(
dangerDto
.
getId
()))
{
// 新增
latentDanger
.
setBusinessKey
(
businessKey
==
null
?
""
:
businessKey
);
latentDanger
.
setDiscovererDepartmentId
(
departmentId
==
null
?
""
:
departmentId
);
latentDanger
.
setDiscovererUserId
(
userId
==
null
?
""
:
userId
);
latentDanger
.
setOrgCode
(
orgCode
==
null
?
""
:
orgCode
);
latentDanger
.
setDangerType
(
dangerTypeEnum
.
getCode
()
==
null
?
""
:
dangerTypeEnum
.
getCode
());
latentDanger
.
setDangerTypeName
(
dangerTypeEnum
.
getName
()
==
null
?
""
:
dangerTypeEnum
.
getName
());
latentDanger
.
setBusinessKey
(
businessKey
==
null
?
""
:
businessKey
);
latentDanger
.
setDiscovererDepartmentId
(
departmentId
==
null
?
""
:
departmentId
);
latentDanger
.
setDiscovererUserId
(
userId
==
null
?
""
:
userId
);
latentDanger
.
setOrgCode
(
orgCode
==
null
?
""
:
orgCode
);
latentDanger
.
setDangerType
(
dangerTypeEnum
.
getCode
()
==
null
?
""
:
dangerTypeEnum
.
getCode
());
latentDanger
.
setDangerTypeName
(
dangerTypeEnum
.
getName
()
==
null
?
""
:
dangerTypeEnum
.
getName
());
if
(
LatentDangerBizTypeEnum
.
防火监督
.
getCode
().
equals
(
bizType
))
{
latentDanger
.
setDangerState
(
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getCode
()
==
null
?
""
:
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getCode
()
);
latentDanger
.
setDangerStateName
(
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getName
()
==
null
?
""
:
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getName
());
latentDanger
.
setDangerState
(
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getCode
()
==
null
?
""
:
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getCode
()
);
latentDanger
.
setDangerStateName
(
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getName
()
==
null
?
""
:
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getName
());
}
else
if
(
LatentDangerBizTypeEnum
.
巡检
.
getCode
().
equals
(
bizType
))
{
latentDanger
.
setDangerState
(
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
.
getCode
()
==
null
?
""
:
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
.
getCode
());
latentDanger
.
setDangerStateName
(
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
.
getName
()
==
null
?
""
:
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
.
getName
()
);
latentDanger
.
setDangerState
(
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
.
getCode
()
==
null
?
""
:
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
.
getCode
());
latentDanger
.
setDangerStateName
(
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
.
getName
()
==
null
?
""
:
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
.
getName
()
);
}
if
(
ValidationUtil
.
isEmpty
(
dangerDto
.
getDangerName
()))
{
latentDanger
.
setDangerName
(
dangerDto
.
getInputItemName
());
...
...
@@ -408,6 +410,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
record
.
setExecuteState
(
executeState
);
record
.
setExecuteResult
(
executeResult
);
record
.
setActionFlag
(
dangerState
);
record
.
setRemark
(
remark
);
if
(!
ValidationUtil
.
isEmpty
(
flowJson
))
{
record
.
setFlowJson
(
flowJson
.
toJSONString
());
record
.
setRemark
(
ValidationUtil
.
isEmpty
(
remark
)
?
flowJson
.
getString
(
"remark"
)
:
remark
);
...
...
@@ -1267,6 +1270,20 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
return
executeSubmitDto
;
}
// 当隐患当前节点状态是现场确认,在执行完节点后需要将检查组长设置为下个节点执行人
if
(
LatentDangerState
.
SupervisionDangerStateEnum
.
现场确认
.
getCode
().
equals
(
latentDanger
.
getDangerState
())
&&
!
ValidationUtil
.
isEmpty
(
latentDanger
.
getInstanceId
())
&&
ExecuteTypeEnum
.
驳回
.
getCode
().
equals
(
preRecord
.
getExecuteState
()))
{
// 在检查组长驳回后再现场确认需要将检查组长id设置为下个节点执行人
Object
resultObj
=
workflowExecuteService
.
setTaskAssign
(
latentDanger
.
getInstanceId
(),
checkLeaderId
);
executeSubmitDto
.
setCheckLeaderId
(
userModel
.
getUserId
());
if
(!(
Boolean
)
resultObj
)
{
executeSubmitDto
.
setIsOk
(
false
);
executeSubmitDto
.
setMsg
(
"设置节点执行人失败"
);
return
executeSubmitDto
;
}
}
String
nextState
=
""
;
String
nextStateName
=
""
;
if
(
ExecuteTypeEnum
.
通过
.
getCode
().
equals
(
param
.
getExecuteType
()))
{
...
...
@@ -1295,18 +1312,32 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
nextStateName
=
LatentDangerState
.
SupervisionDangerStateEnum
.
整改完毕
.
getName
();
}
executeResultMsg
=
currentStateEnum
.
getName
()
+
ExecuteTypeEnum
.
通过
.
getName
();
}
else
{
}
else
{
// 审核驳回
LatentDangerState
.
SupervisionDangerStateEnum
nextStateEnum
=
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumByCode
(
currentStateEnum
.
getRejectNext
());
nextState
=
nextStateEnum
.
getCode
();
nextStateName
=
nextStateEnum
.
getName
();
executeResultMsg
=
currentStateEnum
.
getName
()
+
ExecuteTypeEnum
.
驳回
.
getName
();
// 驳回到提交整改资料节点需重新设置工作流节点执行人为整改责任人
if
(
nextStateEnum
==
LatentDangerState
.
SupervisionDangerStateEnum
.
提交整改资料
)
{
JSONObject
reformJson
=
latentDanger
.
getReformJson
();
AgencyUserModel
checkLeader
=
jcsFeignClient
.
getAmosIdByUserId
((
String
)
reformJson
.
get
(
"reformLeaderId"
)).
getResult
();
Object
result
=
workflowExecuteService
.
setTaskAssign
(
processInstanceId
,
checkLeader
.
getUserName
());
if
(!(
Boolean
)
result
)
{
executeSubmitDto
.
setIsOk
(
false
);
executeResultMsg
=
"设置节点执行人失败"
;
executeSubmitDto
.
setMsg
(
executeResultMsg
);
return
executeSubmitDto
;
}
}
}
latentDanger
.
setDangerState
(
nextState
);
latentDanger
.
setDangerStateName
(
nextStateName
);
// 当隐患状态当前节点是整改任务分配时,在执行完节点后需要将整改分配责任人设置为下个节点执行人
//
TODO
整改责任人需要保存(如果下一步审核驳回,需要能获取到这个指定的整改责任人)
// 整改责任人需要保存(如果下一步审核驳回,需要能获取到这个指定的整改责任人)
if
(
LatentDangerState
.
SupervisionDangerStateEnum
.
整改任务分配
.
getCode
().
equals
(
currentStateEnum
.
getCode
()))
{
if
(
ValidationUtil
.
isEmpty
(
param
.
getReformLeaderId
()))
{
executeSubmitDto
.
setIsOk
(
false
);
...
...
@@ -1857,13 +1888,15 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
dangerIdList
=
Lists
.
newArrayList
(
idsStr
.
split
(
","
));
}
if
(
OwerEnum
.
MY
.
getCode
().
equals
(
pageParam
.
get
(
"my"
)))
{
//
不指定隐患id-我
的任务
//
查询工作流待登录人执行
的任务
JSONObject
allTaskResult
=
workflowFeignService
.
getCurrentUserAllTaskList
(
workflowProcessDefinitionKey
);
allTaskList
=
(
List
)
allTaskResult
.
get
(
"data"
);
// 待执行任务对应instanceId列表
List
<
String
>
instanceIdList
=
Lists
.
newArrayList
();
List
<
LatentDanger
>
dangers
;
if
(!
ValidationUtil
.
isEmpty
(
allTaskList
))
{
allTaskList
.
forEach
(
m
->
instanceIdList
.
add
(((
Map
)
m
).
get
(
"processInstanceId"
).
toString
()));
// 查询对应instanceId的隐患数据
dangers
=
this
.
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
LatentDanger
>().
in
(
LatentDanger:
:
getInstanceId
,
instanceIdList
));
List
<
String
>
finalDangerIdList
=
dangerIdList
;
...
...
@@ -1878,6 +1911,10 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
pageParam
.
put
(
"dangerState"
,
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
.
getCode
());
}
}
// app待审核隐患须加上“提交隐患”状态的数据
if
(
AuditEnum
.
AUDIT
.
getCode
().
equals
(
pageParam
.
get
(
"type"
)))
{
pageParam
.
put
(
"submitDangerState"
,
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getCode
());
}
}
// 获取隐患地点的子节点
Object
structureId
=
pageParam
.
get
(
"structureId"
);
...
...
@@ -2169,7 +2206,11 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
throw
new
Exception
(
"隐患不存"
);
}
latentDangerDto
.
setDangerPosition
(
null
);
Bean
.
copyExistPropertis
(
latentDangerDto
,
latentDanger
);
//以下方法存在bug会将数值类型的默认值0拷贝到对象上造成数据覆盖
//Bean.copyExistPropertis(latentDangerDto, latentDanger);
latentDanger
.
setId
(
latentDangerDto
.
getId
());
latentDanger
.
setFlowJson
(
latentDangerDto
.
getFlowJson
());
if
(!
ValidationUtil
.
isEmpty
(
latentDangerDto
.
getPhotoUrl
()))
{
latentDanger
.
setPhotoUrls
(
Joiner
.
on
(
","
).
join
(
latentDangerDto
.
getPhotoUrl
()));
}
...
...
@@ -2202,7 +2243,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
@Override
public
IPage
<
LatentDanger
>
reviewListDanger
(
PageParam
pageParam
)
throws
Exception
{
String
type
=
pageParam
.
get
(
"type"
).
toString
();
if
(
"audit"
.
equals
(
type
))
{
if
(
AuditEnum
.
AUDIT
.
getCode
()
.
equals
(
type
))
{
List
<
LatentDangerState
.
SupervisionDangerStateEnum
>
stateEnums
=
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumListByProcessState
(
LatentDangerProcessStateEnum
.
待审核
.
getCode
());
List
<
String
>
dangerState
=
stateEnums
.
stream
().
map
(
stateEnum
->
stateEnum
!=
null
?
...
...
@@ -2210,7 +2251,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
dangerState
.
add
(
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getCode
());
// 审核状态
pageParam
.
put
(
"dangerState"
,
Joiner
.
on
(
","
).
join
(
dangerState
));
}
else
if
(
"review"
.
equals
(
type
))
{
}
else
if
(
AuditEnum
.
REVIEW
.
getCode
()
.
equals
(
type
))
{
List
<
LatentDangerState
.
SupervisionDangerStateEnum
>
stateEnums
=
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumListByProcessState
(
LatentDangerProcessStateEnum
.
待复核
.
getCode
());
List
<
String
>
dangerState
=
stateEnums
.
stream
().
map
(
stateEnum
->
stateEnum
!=
null
?
stateEnum
.
getCode
()
:
null
).
collect
(
Collectors
.
toList
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/RuleDangerService.java
View file @
60968472
package
com
.
yeejoin
.
amos
.
latentdanger
.
business
.
service
.
impl
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.boot.biz.common.constants.RuleConstant
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.latentdanger.business.dto.LatentDangerRo
;
import
com.yeejoin.amos.latentdanger.business.feign.JcsFeignClient
;
import
com.yeejoin.amos.latentdanger.business.util.DateUtil
;
import
com.yeejoin.amos.latentdanger.common.enums.LatentDangerState
;
import
com.yeejoin.amos.latentdanger.dao.entity.LatentDanger
;
...
...
@@ -14,11 +20,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.function.Consumer
;
import
java.util.function.Predicate
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* @Author: xl
...
...
@@ -33,6 +39,8 @@ public class RuleDangerService {
@Autowired
private
RuleTrigger
ruleTrigger
;
@Autowired
private
JcsFeignClient
jcsFeignClient
;
public
Boolean
addLatentDangerRule
(
LatentDanger
latentDanger
,
String
ruleType
,
String
roleName
)
throws
Exception
{
LatentDangerRo
latentDangerRo
=
buildLatentDangerRo
(
latentDanger
,
ruleType
);
...
...
@@ -40,7 +48,27 @@ public class RuleDangerService {
List
<
RoleModel
>
result
=
Privilege
.
roleClient
.
queryRoleList
(
roleName
,
null
).
getResult
();
if
(
result
.
size
()
>
0
)
{
List
<
AgencyUserModel
>
userModels
=
Privilege
.
agencyUserClient
.
queryByRoleId
(
String
.
valueOf
(
result
.
get
(
0
).
getSequenceNbr
()),
null
).
getResult
();
List
<
String
>
userIds
=
userModels
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
//只发送给本部门的人员
Long
pointId
=
latentDanger
.
getBizInfo
().
getLong
(
"pointId"
);
if
(
pointId
==
null
||
pointId
==
0
)
{
return
false
;
}
FeignClientResult
<
List
<
CompanyPerson
>>
companyPersons
=
jcsFeignClient
.
selectCompanyPerson
(
Collections
.
singletonList
(
pointId
));
if
(
companyPersons
.
getStatus
()
!=
200
)
{
return
false
;
}
//本部门的人员列表
List
<
CompanyPerson
>
personList
=
companyPersons
.
getResult
();
List
<
OrgUsrDto
>
OrgUsrDtos
=
new
ArrayList
<>();
personList
.
forEach
(
companyPerson
->
OrgUsrDtos
.
addAll
(
companyPerson
.
getPersons
()));
//角色人员列表与本部门的人员列表取交集
List
<
AgencyUserModel
>
userModelList
=
userModels
.
stream
().
filter
(
agencyUserModel
->
OrgUsrDtos
.
stream
().
anyMatch
(
orgUsrDto
->
agencyUserModel
.
getUserId
().
equals
(
orgUsrDto
.
getAmosOrgId
())
)
).
collect
(
Collectors
.
toList
());
List
<
String
>
userIds
=
userModelList
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
latentDangerRo
.
setRecivers
(
userIds
);
}
//触发规则
...
...
@@ -64,7 +92,7 @@ public class RuleDangerService {
return
true
;
}
private
LatentDangerRo
buildLatentDangerRo
(
LatentDanger
latentDanger
,
String
ruleType
)
{
private
LatentDangerRo
buildLatentDangerRo
(
LatentDanger
latentDanger
,
String
ruleType
)
{
LatentDangerRo
latentDangerRo
=
new
LatentDangerRo
();
BeanUtils
.
copyProperties
(
latentDanger
,
latentDangerRo
);
latentDangerRo
.
setMsgType
(
msgType
);
...
...
@@ -86,7 +114,7 @@ public class RuleDangerService {
}
}
if
(!
ValidationUtil
.
isEmpty
(
type
)){
if
(!
ValidationUtil
.
isEmpty
(
type
))
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"type"
,
type
);
map
.
put
(
"id"
,
String
.
valueOf
(
latentDanger
.
getId
()));
...
...
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 @
60968472
...
...
@@ -586,4 +586,16 @@ public class CheckController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
page
);
}
/**
* 根据检查记录查询照片
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据检查记录查询照片"
,
notes
=
"根据检查记录查询照片"
)
@RequestMapping
(
value
=
"/getPictureByCheckId"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPictureByCheckId
(
@ApiParam
(
value
=
"检查记录ID"
)
@RequestParam
String
checkId
,
@ApiParam
(
value
=
"检查项ID"
)
@RequestParam
String
id
)
{
List
<
String
>
pictures
=
checkService
.
getPictureByCheckId
(
checkId
,
id
);
return
CommonResponseUtil
.
success
(
pictures
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/CheckMapper.java
View file @
60968472
...
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.supervision.business.vo.CheckInfoVo;
import
com.yeejoin.amos.supervision.business.vo.CheckVo
;
import
com.yeejoin.amos.supervision.core.common.response.PointCheckInfoBusinessRespone
;
import
com.yeejoin.amos.supervision.core.common.response.PointCheckInfoRespone
;
import
com.yeejoin.amos.supervision.dao.entity.Check
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.HashMap
;
...
...
@@ -295,4 +296,14 @@ public interface CheckMapper extends BaseMapper {
long
queryPageCount
(
CheckPageParam
param
);
List
<
CheckVo
>
queryPage
(
CheckPageParam
param
);
/**
* 根据任务id获取相关检查记录
*
* @param id
* @return
*/
List
<
Check
>
getCheckListByTaskId
(
@Param
(
value
=
"planTaskId"
)
long
id
);
List
<
String
>
getPictureByCheckId
(
String
checkId
,
String
id
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/feign/JCSFeignClient.java
View file @
60968472
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
feign
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -54,4 +55,13 @@ public interface JCSFeignClient {
*/
@RequestMapping
(
value
=
"jcs/org-usr/getUnit/{id}"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
<
Map
<
String
,
Object
>>
getCompanyById
(
@PathVariable
(
"id"
)
String
companyId
);
/**
* 根据机场单位id获取单位人员列表
*
* @param companyId 机场单位id
* @return
*/
@RequestMapping
(
value
=
"jcs/org-usr/{companyId}/person/list"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
<
List
<
OrgUsrFormDto
>>
getPersonListByCompanyId
(
@PathVariable
(
"companyId"
)
String
companyId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/CheckReportServiceImpl.java
View file @
60968472
...
...
@@ -41,17 +41,18 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
import
java.io.BufferedOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.text.ParseException
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -160,17 +161,26 @@ public class CheckReportServiceImpl extends BaseService<CheckReportDto, CheckRep
// 获取隐患信息
Map
<
String
,
String
>
dangerParamMap
=
Maps
.
newHashMap
();
// 本次隐患id
List
<
String
>
dangerIdList
=
Arrays
.
asList
(
checkReportDto
.
getDangerIds
().
split
(
","
));
List
<
String
>
dangerIdList
=
Lists
.
newArrayList
();
if
(!
ValidationUtil
.
isEmpty
(
checkReportDto
.
getDangerIds
()))
{
dangerIdList
=
Arrays
.
asList
(
checkReportDto
.
getDangerIds
().
split
(
","
));
}
// 复核隐患id
List
<
String
>
reviewDangerIdList
=
Arrays
.
asList
(
checkReportDto
.
getReviewDangerIds
().
split
(
","
));
List
<
String
>
reviewDangerIdList
=
Lists
.
newArrayList
();
if
(!
ValidationUtil
.
isEmpty
(
checkReportDto
.
getReviewDangerIds
()))
{
reviewDangerIdList
=
Arrays
.
asList
(
checkReportDto
.
getReviewDangerIds
().
split
(
","
));
}
Set
<
String
>
allDangerIdSet
=
Sets
.
newHashSet
();
allDangerIdSet
.
addAll
(
dangerIdList
);
allDangerIdSet
.
addAll
(
reviewDangerIdList
);
if
(!
ValidationUtil
.
isEmpty
(
allDangerIdSet
))
{
dangerParamMap
.
put
(
"dangerIds"
,
Joiner
.
on
(
","
).
join
(
allDangerIdSet
));
List
<
DangerDto
>
dangerDtoList
=
dangerFeignClient
.
listAll
(
dangerParamMap
).
getResult
();
List
<
CheckReportDangerDto
>
dangerList
=
Lists
.
newArrayList
();
List
<
CheckReportDangerDto
>
reviewDangerList
=
Lists
.
newArrayList
();
if
(!
ValidationUtil
.
isEmpty
(
dangerDtoList
))
{
List
<
String
>
finalDangerIdList
=
dangerIdList
;
List
<
String
>
finalReviewDangerIdList
=
reviewDangerIdList
;
dangerDtoList
.
forEach
(
dangerDto
->
{
CheckReportDangerDto
checkReportDangerDto
=
new
CheckReportDangerDto
();
BeanUtils
.
copyProperties
(
dangerDto
,
checkReportDangerDto
);
...
...
@@ -178,19 +188,19 @@ public class CheckReportServiceImpl extends BaseService<CheckReportDto, CheckRep
checkReportDangerDto
.
setCompanyId
(
bizInfo
.
get
(
"pointId"
));
checkReportDangerDto
.
setCompanyName
(
bizInfo
.
get
(
"pointName"
));
if
(
d
angerIdList
.
contains
(
dangerDto
.
getId
().
toString
()))
{
if
(
finalD
angerIdList
.
contains
(
dangerDto
.
getId
().
toString
()))
{
dangerList
.
add
(
checkReportDangerDto
);
}
if
(
r
eviewDangerIdList
.
contains
(
dangerDto
.
getId
().
toString
()))
{
if
(
finalR
eviewDangerIdList
.
contains
(
dangerDto
.
getId
().
toString
()))
{
checkReportDangerDto
.
setReviewUser
(
dangerDto
.
getExecuteUserName
());
reviewDangerList
.
add
(
checkReportDangerDto
);
}
});
}
checkReportDto
.
setCheckDangerList
(
dangerList
);
checkReportDto
.
setReviewDangerList
(
reviewDangerList
);
}
}
return
checkReportDto
;
}
...
...
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 @
60968472
...
...
@@ -1577,8 +1577,8 @@ public class CheckServiceImpl implements ICheckService {
Plan
plan
=
planService
.
queryPlanById
(
planTask
.
getPlanId
());
// 计划完成,规则推送消息
if
(
PlanStatusEnum
.
COMPLETED
.
getValue
()
==
plan
.
getStatus
()){
rulePlanService
.
addPlanRule
(
plan
,
null
,
RuleTypeEnum
.
计划完成
);
if
(
PlanStatusEnum
.
COMPLETED
.
getValue
()
==
plan
.
getStatus
())
{
rulePlanService
.
addPlanRule
(
plan
,
null
,
RuleTypeEnum
.
计划完成
,
null
);
}
// p_plan_task_detail更新隐患个数
...
...
@@ -1685,5 +1685,8 @@ public class CheckServiceImpl implements ICheckService {
return
result
;
}
@Override
public
List
<
String
>
getPictureByCheckId
(
String
checkId
,
String
id
)
{
return
checkMapper
.
getPictureByCheckId
(
checkId
,
id
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/HiddenDangerServiceImpl.java
View file @
60968472
...
...
@@ -38,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.DataNotFound
;
...
...
@@ -207,14 +208,15 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
//组织业务基本数据 对应bizInfo
HiddenDangerDto
hiddenDangerDto
=
new
HiddenDangerDto
();
hiddenDangerDto
.
setPlanId
(
planId
);
hiddenDangerDto
.
setPointId
(
pointArray
.
length
>
1
?
Long
.
parseLong
(
pointArray
[
1
])
:
null
);
hiddenDangerDto
.
setPointId
(
pointArray
.
length
>
1
?
Long
.
parseLong
(
StringUtils
.
trimAllWhitespace
(
pointArray
[
1
]))
:
null
);
hiddenDangerDto
.
setPointName
(
pointArray
.
length
>
1
?
pointArray
[
0
]
:
null
);
hiddenDangerDto
.
setCheckInputId
(
seq
);
hiddenDangerDto
.
setDangerType
(
DangerHandleTypeEnum
.
SELF
.
getCode
());
try
{
dangerDto
.
setBizInfo
(
this
.
buildBizInfo
(
hiddenDangerDto
));
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
RuntimeException
(
"组织数据失败
"
);
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
RuntimeException
(
"组织数据失败
!"
+
e
.
getMessage
()
);
}
return
dangerDto
;
}).
collect
(
Collectors
.
toList
());
...
...
@@ -273,6 +275,8 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
Point
point
=
new
Point
();
if
(!
ObjectUtils
.
isEmpty
(
hiddenDangerDto
.
getPointId
()))
{
point
=
iPointDao
.
findById
(
hiddenDangerDto
.
getPointId
()).
orElseThrow
(()
->
new
RuntimeException
(
"单位不存在"
));
}
else
{
throw
new
RuntimeException
(
"单位不存在"
);
}
//检查级别
DangerCheckTypeLevelEnum
dangerCheckTypeLevelEnum
=
DangerCheckTypeLevelEnum
.
getEumByCode
(
plan
.
getCheckLevel
());
...
...
@@ -288,8 +292,8 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
result
.
put
(
"bizId"
,
hiddenDangerDto
.
getCheckInputId
());
result
.
put
(
"bizName"
,
hiddenDangerDto
.
getInputItemName
());
result
.
put
(
"routeId"
,
plan
.
getRouteId
());
result
.
put
(
"checkUnitId"
,
plan
.
getCheckUnitId
());
// 检查人所在单位id逗号隔开
result
.
put
(
"checkUnitName"
,
plan
.
getCheckUnitName
());
// 检查人所在单位名称逗号隔开
result
.
put
(
"checkUnitId"
,
plan
.
getCheckUnitId
());
// 检查人所在单位id逗号隔开
result
.
put
(
"checkUnitName"
,
plan
.
getCheckUnitName
());
// 检查人所在单位名称逗号隔开
result
.
put
(
"leadPeopleId"
,
plan
.
getLeadPeopleIds
());
// 牵头人id
result
.
put
(
"leadPeopleName"
,
plan
.
getLeadPeopleNames
());
// 牵头人名称
result
.
put
(
"makerUserId"
,
plan
.
getMakerUserId
());
// 计划制定人id
...
...
@@ -314,7 +318,7 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
result
.
put
(
"checkUserId"
,
checkInput
.
getUserId
());
// 任务执行人id
result
.
put
(
"checkUserName"
,
checkInput
.
getUserName
());
// 任务执行人名称
result
.
put
(
"accompanyingUserId"
,
checkInput
.
getAccompanyUserId
());
// 检查陪同人id
result
.
put
(
"accompanyingUserName"
,
checkInput
.
getAccompanyUserName
());
// 检查陪同人名称
result
.
put
(
"accompanyingUserName"
,
checkInput
.
getAccompanyUserName
());
// 检查陪同人名称
result
.
put
(
"planExecuteTime"
,
checkInput
.
getCreateDate
());
// 计划任务执行时间
result
.
put
(
"checkPhotoUrl"
,
shotList
.
stream
().
map
(
CheckShot:
:
getPhotoData
).
collect
(
Collectors
.
joining
(
","
)));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanServiceImpl.java
View file @
60968472
...
...
@@ -237,7 +237,7 @@ public class PlanServiceImpl implements IPlanService {
}
try
{
if
(
ValidationUtil
.
isEmpty
(
status
)){
rulePlanService
.
addPlanRule
(
plan
,
userIds
,
RuleTypeEnum
.
计划提交
);
// 计划提交
rulePlanService
.
addPlanRule
(
plan
,
userIds
,
RuleTypeEnum
.
计划提交
,
null
);
// 计划提交
}
else
{
if
(
PlanStatusEnum
.
EXAMINE_THREE
.
getValue
()
!=
status
){
rulePlanService
.
addPlanAuditRule
(
plan
,
userIds
,
RuleTypeEnum
.
计划审核
,
ExecuteStateNameEnum
.
getNameByCode
(
excuteState
));
// 计划审核
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanTaskServiceImpl.java
View file @
60968472
...
...
@@ -536,8 +536,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
// 2.保存执行数据明细表
planTaskDetail
.
saveAndFlush
(
planTaskDetailInstance
);
// 规则推送消息
rulePlanService
.
addPlanRule
(
plan
,
null
,
RuleTypeEnum
.
计划生成
);
rulePlanService
.
addPlanRule
(
plan
,
null
,
RuleTypeEnum
.
计划生成
,
pointId
.
longValue
()
);
}
// 定时任务监控
jobService
.
planTaskAddJob
(
planTask
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/RulePlanService.java
View file @
60968472
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.gson.JsonObject
;
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.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.supervision.business.dto.PlanRo
;
import
com.yeejoin.amos.supervision.business.feign.JCSFeignClient
;
import
com.yeejoin.amos.supervision.business.util.DateUtil
;
import
com.yeejoin.amos.supervision.business.util.Toke
;
import
com.yeejoin.amos.supervision.dao.entity.Plan
;
import
com.yeejoin.amos.supervision.dao.entity.Point
;
import
com.yeejoin.amos.supervision.feign.RemoteSecurityService
;
import
org.bouncycastle.cert.ocsp.Req
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.Date
;
...
...
@@ -28,28 +43,47 @@ public class RulePlanService {
private
final
String
packageId
=
"消息/addPlanRule"
;
private
final
String
msgType
=
"supervision"
;
@Value
(
"${supervision.person.charger.role:Person_charge_unit_fire_protection_supervision_inspection}"
)
private
String
supervisionPersonChargerRole
;
@Autowired
private
RuleTrigger
ruleTrigger
;
@Autowired
private
JCSFeignClient
jcsFeignClient
;
public
Boolean
addPlanRule
(
Plan
plan
,
List
<
String
>
userIds
,
RuleTypeEnum
ruleType
)
throws
Exception
{
PlanRo
planRo
=
buildPlanRo
(
plan
,
userIds
,
ruleType
);
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Autowired
private
PointServiceImpl
pointService
;
@Async
public
Boolean
addPlanRule
(
Plan
plan
,
List
<
String
>
userIds
,
RuleTypeEnum
ruleType
,
Long
pointId
)
throws
Exception
{
PlanRo
planRo
=
buildPlanRo
(
plan
,
userIds
,
ruleType
,
pointId
);
//触发规则
ruleTrigger
.
publish
(
planRo
,
packageId
,
new
String
[
0
]);
return
true
;
}
@Async
public
Boolean
addPlanAuditRule
(
Plan
plan
,
List
<
String
>
userIds
,
RuleTypeEnum
ruleType
,
String
excuteStateName
)
throws
Exception
{
PlanRo
planRo
=
buildPlanRo
(
plan
,
userIds
,
ruleType
);
PlanRo
planRo
=
buildPlanRo
(
plan
,
userIds
,
ruleType
,
null
);
planRo
.
setExcuteStateName
(
excuteStateName
);
//触发规则
ruleTrigger
.
publish
(
planRo
,
packageId
,
new
String
[
0
]);
return
true
;
}
private
PlanRo
buildPlanRo
(
Plan
plan
,
List
<
String
>
userIds
,
RuleTypeEnum
ruleType
)
{
private
PlanRo
buildPlanRo
(
Plan
plan
,
List
<
String
>
userIds
,
RuleTypeEnum
ruleType
,
Long
pointId
)
{
// 设置token
if
(
ValidationUtil
.
isEmpty
(
RequestContext
.
getToken
()))
{
Toke
tokenObj
=
remoteSecurityService
.
getServerToken
();
RequestContext
.
setProduct
(
tokenObj
.
getProduct
());
RequestContext
.
setAppKey
(
tokenObj
.
getAppKey
());
RequestContext
.
setToken
(
tokenObj
.
getToke
());
}
PlanRo
planRo
=
new
PlanRo
();
BeanUtils
.
copyProperties
(
plan
,
planRo
);
planRo
.
setMsgType
(
msgType
);
...
...
@@ -74,11 +108,35 @@ public class RulePlanService {
}
if
(
ValidationUtil
.
isEmpty
(
userIds
))
{
// 计划牵头责任人
String
leadPeopleIds
=
plan
.
getLeadPeopleIds
();
if
(!
ValidationUtil
.
isEmpty
(
plan
.
getUserId
())
&&
!
leadPeopleIds
.
contains
(
plan
.
getUserId
()))
{
leadPeopleIds
+=
","
+
plan
.
getUserId
();
}
userIds
=
(
List
<
String
>)
jcsFeignClient
.
getAmosIdListByUserIds
(
leadPeopleIds
).
getResult
();
// pointId是被检查单位id
if
(!
ValidationUtil
.
isEmpty
(
pointId
))
{
List
<
String
>
userIdList
=
Lists
.
newArrayList
();
Point
point
=
pointService
.
queryPointById
(
pointId
);
List
<
OrgUsrFormDto
>
personList
=
jcsFeignClient
.
getPersonListByCompanyId
(
point
.
getOriginalId
()).
getResult
();
List
<
String
>
personIdList
=
Lists
.
transform
(
personList
,
OrgUsrFormDto:
:
getAmosOrgId
);
List
<
RoleModel
>
roleList
=
Privilege
.
roleClient
.
queryRoleList
(
supervisionPersonChargerRole
,
null
).
getResult
();
if
(!
ValidationUtil
.
isEmpty
(
roleList
))
{
List
<
AgencyUserModel
>
agencyUserModelList
=
Privilege
.
agencyUserClient
.
queryByRoleId
(
String
.
valueOf
(
roleList
.
get
(
0
).
getSequenceNbr
()),
null
).
getResult
();
if
(!
ValidationUtil
.
isEmpty
(
agencyUserModelList
))
{
List
<
String
>
finalUserIds
=
userIds
;
agencyUserModelList
.
forEach
(
userModel
->
{
if
(
personIdList
.
contains
(
userModel
.
getUserId
())
&&
!
finalUserIds
.
contains
(
userModel
.
getUserId
()))
{
finalUserIds
.
add
(
userModel
.
getUserId
());
}
});
userIds
=
finalUserIds
;
}
}
}
}
planRo
.
setSendTime
(
DateUtil
.
date2LongStr
(
new
Date
()));
planRo
.
setRecivers
(
userIds
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/ICheckService.java
View file @
60968472
...
...
@@ -282,4 +282,6 @@ public interface ICheckService {
int
checkHasRecord
(
Long
planTaskId
,
Long
pointId
);
Page
<
CheckVo
>
queryPage
(
CheckPageParam
criterias
);
List
<
String
>
getPictureByCheckId
(
String
checkId
,
String
id
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/vo/CheckVo.java
View file @
60968472
...
...
@@ -9,7 +9,10 @@ import java.util.Date;
*/
@Data
public
class
CheckVo
{
/**
* checkId
*/
private
Long
checkId
;
/**
* 主键id
*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/quartz/JobService.java
View file @
60968472
...
...
@@ -43,10 +43,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
(
"jobService"
)
public
class
JobService
implements
IJobService
{
...
...
@@ -215,7 +217,13 @@ public class JobService implements IJobService {
private
void
createOmissionCheckRecord
(
PlanTask
planTask
)
{
List
<
PlanTaskPointInputItemBo
>
planTaskPointInputItems
=
planTaskMapper
.
getPlanTaskPointInputItemByPlanTaskId
(
planTask
.
getId
(),
PlanTaskDetailStatusEnum
.
OMISSION
.
getValue
());
List
<
Check
>
checkList
=
checkMapper
.
getCheckListByTaskId
(
planTask
.
getId
());
Map
<
Long
,
Check
>
checkMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
checkList
))
{
checkList
.
stream
().
collect
(
Collectors
.
groupingBy
(
Check:
:
getPointId
)).
forEach
((
e
,
v
)
->
{
checkMap
.
put
(
e
,
v
.
get
(
0
));
});
}
Set
<
Long
>
checkIds
=
new
HashSet
<
Long
>();
//查询用户名字
for
(
PlanTaskPointInputItemBo
arg
:
planTaskPointInputItems
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/EquipmentAssociatedController.java
View file @
60968472
...
...
@@ -2,19 +2,25 @@ package com.yeejoin.amos.boot.module.tzs.flc.biz.controller;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.Equipment
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentAssociated
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
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.ArrayList
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.EquipmentAssociatedServiceImpl
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -48,10 +54,64 @@ public class EquipmentAssociatedController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增配套设备设施部件"
,
notes
=
"新增配套设备设施部件"
)
public
ResponseModel
<
EquipmentAssociatedDto
>
save
(
@RequestBody
EquipmentAssociatedDto
model
)
{
model
.
setIsDelete
(
false
);
model
=
equipmentAssociatedServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr删除
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除配套设施"
,
notes
=
"删除配套设施"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
Boolean
flag
=
equipmentAssociatedServiceImpl
.
update
(
new
LambdaUpdateWrapper
<
EquipmentAssociated
>().
eq
(
EquipmentAssociated:
:
getSequenceNbr
,
sequenceNbr
).
set
(
EquipmentAssociated:
:
getIsDelete
,
true
));
return
ResponseHelper
.
buildResponse
(
flag
);
}
/**
* 根据sequenceNbr更新
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/updateAssociated"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新配套设备设施部件"
,
notes
=
"根据sequenceNbr配套设备设施部件"
)
public
ResponseModel
<
EquipmentAssociatedDto
>
updateAssociated
(
@RequestBody
EquipmentAssociatedDto
model
)
{
if
(
ValidationUtil
.
isEmpty
(
model
)
||
ValidationUtil
.
isEmpty
(
model
.
getSequenceNbr
()))
{
throw
new
BadRequest
(
"参数校验失败."
);
}
model
=
equipmentAssociatedServiceImpl
.
updateAssociated
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 新增配套设备/设施/部件
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据设备id返回配套设施信息"
,
notes
=
"根据设备id返回配套设施信息"
)
public
ResponseModel
<
List
<
EquipmentAssociatedDto
>>
getAssociatedByEquipmentId
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
List
<
EquipmentAssociated
>
entity
=
equipmentAssociatedServiceImpl
.
list
(
new
LambdaQueryWrapper
<
EquipmentAssociated
>().
eq
(
EquipmentAssociated:
:
getIsDelete
,
false
).
eq
(
EquipmentAssociated:
:
getEquipmentId
,
sequenceNbr
));
List
<
EquipmentAssociatedDto
>
result
=
new
ArrayList
<>();
entity
.
stream
().
forEach
(
t
->
{
EquipmentAssociatedDto
temp
=
new
EquipmentAssociatedDto
();
BeanUtils
.
copyProperties
(
t
,
temp
);
result
.
add
(
temp
);
});
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/EquipmentController.java
View file @
60968472
...
...
@@ -96,7 +96,7 @@ public class EquipmentController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/updateEquipment"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新装备信息表"
,
notes
=
"根据sequenceNbr更新装备信息表"
)
public
ResponseModel
<
EquipmentDto
>
update
BySequenceNbrEquip
ment
(
@RequestBody
EquipmentDto
model
)
{
public
ResponseModel
<
EquipmentDto
>
update
Equip20
ment
(
@RequestBody
EquipmentDto
model
)
{
if
(
ValidationUtil
.
isEmpty
(
model
)
||
ValidationUtil
.
isEmpty
(
model
.
getSequenceNbr
()))
{
throw
new
BadRequest
(
"参数校验失败."
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/EquipmentAssociatedServiceImpl.java
View file @
60968472
...
...
@@ -30,4 +30,10 @@ public class EquipmentAssociatedServiceImpl extends BaseService<EquipmentAssocia
public
List
<
EquipmentAssociatedDto
>
queryForEquipmentAssociatedList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Override
public
EquipmentAssociatedDto
updateAssociated
(
EquipmentAssociatedDto
model
)
{
this
.
updateWithModel
(
model
);
return
model
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/EquipmentInformServiceImpl.java
View file @
60968472
...
...
@@ -209,7 +209,6 @@ public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,E
// 接收告知书 更新告知书状态
Boolean
flag
=
false
;
EquipmentInform
inform
=
this
.
getById
(
sequenceNbr
);
inform
.
setInformStatus
(
"9"
);
flag
=
this
.
updateById
(
inform
);
if
(
flag
)
{
// 更新设备相关参数
...
...
@@ -383,7 +382,6 @@ public class EquipmentInformServiceImpl extends BaseService<EquipmentInformDto,E
@Transactional
public
Boolean
acceptInform
(
Long
sequenceNbr
,
ReginParams
userInfo
)
throws
Exception
{
EquipmentInformDto
model
=
this
.
queryBySeq
(
sequenceNbr
);
model
.
setInformStatus
(
"9"
);
InformWorkFlowEnum
submit
=
InformWorkFlowEnum
.
接收方接收告知书
;
model
.
setProcessStatus
(
submit
.
getProcessStatus
());
// 流程流转
...
...
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
60968472
...
...
@@ -632,23 +632,18 @@ ORDER BY
-- ----------------------------
DROP
VIEW
IF
EXISTS
`v_equip_alarm_today_statistics`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_equip_alarm_today_statistics`
AS
SELECT
count
(
`confirm_type`
)
AS
`confirmed`
,
(
count
(
1
)
-
count
(
`clean_time`
)
)
AS
`unCleaned`
,
(
count
(
1
)
-
count
(
`confirm_type`
)
)
AS
`pending`
FROM
`wl_equipment_specific_alarm_log`
WHERE
(
cast
(
now
()
AS
date
)
=
cast
(
`create_date`
AS
date
)
);
`wl_equipment_specific_alarm_log`
;
-- ----------------------------
-- View structure for v_equip_fire_control_water
...
...
@@ -674,10 +669,8 @@ SELECT
`sal`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sal`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sal`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
sal
.
equipment_specific_name
,
sal
.
equipment_specific_index_name
)
AS
alamReason
,
IF
(
`sal`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sal`
.
`iot_code`
AS
`iotCode`
,
date_format
(
`sal`
.
`create_date`
,
...
...
@@ -5794,27 +5787,153 @@ CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_equip
-- 火灾报警系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_alarm`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_alarm`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'029026401813010000000016'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_alarm`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'029026401813010000000016'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- CAFS系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_cafs`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_cafs`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'029026401813010000000023'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_cafs`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'029026401813010000000023'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- 预混泡沫灭火系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_foam`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_foam`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'029026401813010000000054'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_foam`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'029026401813010000000054'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- 细水雾涡扇炮系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_foam_mist`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_foam_mist`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'011023306003010000000082'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_foam_mist`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'011023306003010000000082'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- 排油系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_ONL`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_onl`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'029026401813010000000030'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_onl`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_onl`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'029026401813010000000030'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- 消防给水系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_water`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_water`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'029026401813010000000047'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_water`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'029026401813010000000047'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- 消防人员视图
DROP
VIEW
IF
EXISTS
`v_fire_fighter`
;
...
...
amos-boot-system-equip/src/main/resources/mapper/ConfirmAlarmMapper.xml
View file @
60968472
...
...
@@ -44,7 +44,9 @@
confirm_user,
confirm_user_name,
confirm_date,
(SELECT GROUP_CONCAT(fem.name) FROM `f_fire_fighting_system` fem WHERE find_in_set(fem.id,spe.system_id)) as systemName
(SELECT GROUP_CONCAT(fem.name) FROM `f_fire_fighting_system` fem WHERE find_in_set(fem.id,spe.system_id)) as systemName,
if(ala.clean_time is null, '未清除', '已清除') AS cleanStatus,
ala.clean_time
from
wl_equipment_specific_alarm_log as ala
left join wl_equipment_specific as spe on spe.id = ala.equipment_specific_id
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
60968472
...
...
@@ -181,7 +181,7 @@
concat(wlesal.equipment_specific_name,wlesal.equipment_specific_index_name) as alamContent,
if(confirm_type is null,'未处理','已处理') handleStatus,
IF (
wlesal.clean_time
<![CDATA[<>]]>
''
,
wlesal.clean_time
IS NOT NULL
,
'已消除',
'未消除'
) cleanStatus,
...
...
@@ -307,10 +307,15 @@
'去确认'
) handleStatus,
IF (
wlesal.clean_time
<![CDATA[<>]]>
''
,
wlesal.clean_time
IS NOT NULL
,
'已消除',
'未消除'
) cleanStatus,
IF (
wlesal.clean_time IS NOT NULL,
'1',
'2'
) cleanStatusVal,
wlesal.confirm_type AS handleType,
wlesal.system_codes AS systemCodes,
wlesal.equipment_index_id AS fireEquipmentIndexId,
...
...
@@ -361,10 +366,16 @@
<when
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 0"
>
AND d.handleType IS NULL
</when>
<when
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 2"
>
AND d.cleanStatus = '未消除'
</when>
<when
test=
"param.confirmType != null and param.confirmType != '' and param.confirmType == 3"
>
AND d.cleanStatus = '已消除'
</when>
</choose>
<if
test=
"param.beginDate!=null"
>
AND d.createDate
<![CDATA[>=]]>
#{param.beginDate}
</if>
<if
test=
"param.endDate!=null"
>
AND d.createDate
<![CDATA[<=]]>
#{param.endDate}
</if>
<if
test=
"param.alarmType
== 'BREAKDOWN' or param.alarmType == 'FIREALARM
'"
>
AND d.type = #{param.alarmType}
</if>
<if
test=
"param.alarmType
!= null and param.alarmType != '
'"
>
AND d.type = #{param.alarmType}
</if>
<if
test=
"param.systemCode != null and param.systemCode != ''"
>
AND find_in_set(#{param.systemCode},d.systemCodes)
</if>
...
...
@@ -375,6 +386,12 @@
</if>
<if
test=
"param.id!=null and param.id!=''"
>
AND d.fireEquipmentId = #{param.id}
</if>
<if
test=
"param.status!=null and param.status!=3"
>
AND d.status = #{param.status}
</if>
<if
test=
"param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 1"
>
AND
d.cleanStatus = '已消除'
</if>
<if
test=
"param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2"
>
AND
d.cleanStatus = '未消除'
</if>
ORDER BY d.createDate DESC
</select>
<select
id=
"getAlarmList"
resultType=
"java.util.HashMap"
>
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
60968472
...
...
@@ -480,8 +480,10 @@
d.fireEquipmentName,
d.warehouseStructureName,
d.fireEquipmentSpecificIndexName,
d.createDate,d.confirmType,
d.type
d.createDate,
d.confirmType,
d.type,
d.cleanStatus
FROM
(
SELECT
...
...
@@ -492,7 +494,8 @@
wlesal.equipment_index_id AS fireEquipmentIndexId,
wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
wlesal.equipment_specific_index_name AS fireEquipmentSpecificIndexName,
if(wlesal.confirm_type IS NULL,0,1) AS confirmType,
if(wlesal.confirm_type IS NULL, 0, 1) AS confirmType,
if(wlesal.clean_time IS NULL, 0, 1) AS cleanStatus,
CASE
wlesal.equipment_specific_index_value
WHEN 'true' THEN
...
...
@@ -540,6 +543,12 @@
<if
test=
'confirmType != null and confirmType == 1'
>
and wlesal.confirm_type IS NOT NULL
</if>
<if
test=
'confirmType != null and confirmType == 2'
>
and wlesal.clean_time IS NULL
</if>
<if
test=
'confirmType != null and confirmType == 3'
>
and wlesal.clean_time IS NOT NULL
</if>
</where>
) d
<where>
...
...
amos-boot-system-equip/src/main/resources/mapper/VideoEquipmentSpecificMapper.xml
0 → 100644
View file @
60968472
<?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.equipmanage.mapper.VideoEquipmentSpecificMapper"
>
<select
id=
"findBySpecificIdAndVideoIdIn"
resultType=
"com.yeejoin.equipmanage.common.entity.VideoEquipmentSpecific"
>
SELECT
v.id,
v.equipment_specific_id AS equipmentSpecificId,
v.video_id AS videoId
FROM
`wl_video_equipment_specific` v
<where>
<if
test=
"equipmentSpecificId != null"
>
v.equipment_specific_id = #{equipmentSpecificId}
</if>
<if
test=
"list != null and list.size() >0"
>
AND v.video_id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
amos-boot-system-latentdanger/src/main/resources/db/mapper/LatentDangerMapper.xml
View file @
60968472
...
...
@@ -967,10 +967,13 @@
and a.biz_type = #{value}
</if>
<if
test=
"key == 'dangerIds' and value != null"
>
and a.id IN
and
(
a.id IN
<foreach
collection=
"value"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
<if
test=
"paramMap['my'] == 0"
>
or a.danger_state = #{paramMap[submitDangerState]}
</if>
)
</if>
<if
test=
"key == 'dangerState' and value != null and !value.isEmpty()"
>
and a.danger_state IN
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/HiddenDangerMapper.xml
View file @
60968472
...
...
@@ -9,10 +9,10 @@
ci.input_name as inputItemName,
ci.user_name as checkUserName,
ci.create_date as checkTime,
c.point_n
ame
pp.name as pointN
ame
FROM `p_hidden_danger` phd
left join p_check_input ci on phd.check_input_id = ci.id
left join p_
check c on c.id = phd.check
_id
left join p_
point pp on pp.id = phd.point
_id
<where>
<if
test=
"planId !=null and planId != ''"
>
and phd.plan_id=#{planId}
</if>
<if
test=
"pointId !=null and pointId != ''"
>
and phd.point_id=#{pointId}
</if>
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
60968472
...
...
@@ -51,7 +51,7 @@
<if
test=
"catalogId!=null"
>
and b.Catalog_Id = #{catalogId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"pointId!=null"
>
and a.point_id = #{pointId}
</if>
<if
test=
"departmentId!=null and departmentId!='-1'"
>
and find_in_set(#{departmentId}, a.dep_id) > 0
</if>
<if
test=
"departmentId!=null and departmentId!='-1'"
>
and find_in_set(#{departmentId}, a.dep_id) > 0
</if>
<choose>
<when
test=
"finishStatus == 0"
>
and (`a`.`plan_task_detail_id` = 0 OR `a`.`plan_task_detail_id` is
null)
...
...
@@ -109,7 +109,8 @@
LEFT JOIN `p_route` `d` ON `a`.`route_id` = `d`.`id`
LEFT JOIN `p_plan` `e` ON `a`.`plan_id` = `e`.`id`
<if
test=
"dangerId != null and dangerId != ''"
>
LEFT JOIN ( SELECT check_id, GROUP_CONCAT( latent_danger_id ) dangerIds FROM p_latent_danger_patrol GROUP BY check_id ) t ON t.check_id = a.id
LEFT JOIN ( SELECT check_id, GROUP_CONCAT( latent_danger_id ) dangerIds FROM p_latent_danger_patrol GROUP BY
check_id ) t ON t.check_id = a.id
</if>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"beginDate!=null and endDate!=null"
>
and a.check_time BETWEEN #{beginDate} and #{endDate}
</if>
...
...
@@ -127,7 +128,7 @@
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"pointId!=null"
>
and a.point_id = #{pointId}
</if>
<if
test=
"checkTime!=null"
>
and TO_DAYS(a.check_time) = TO_DAYS('${checkTime}')
</if>
<if
test=
"departmentId!=null and departmentId!='-1'"
>
and find_in_set(#{departmentId}, a.dep_id) > 0
</if>
<if
test=
"departmentId!=null and departmentId!='-1'"
>
and find_in_set(#{departmentId}, a.dep_id) > 0
</if>
<if
test=
"checkType == '计划检查'"
>
and a.plan_task_id
>
0
</if>
<if
test=
"checkType == '无计划检查'"
>
and a.plan_task_id
<
= 0
</if>
<choose>
...
...
@@ -211,7 +212,8 @@
order by ci.order_no
</select>
<select
id=
"findCheckPointInputItem"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
<select
id=
"findCheckPointInputItem"
resultType=
"com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo"
parameterType=
"long"
>
SELECT
pp.id pointId,
...
...
@@ -250,16 +252,16 @@
order by pci.order_no
</select>
<!-- <select id="checkHasRecord" resultType="int">-->
<!-- SELECT-->
<!-- count(1) num-->
<!-- FROM-->
<!-- p_check c-->
<!-- WHERE-->
<!-- is_ok in (1,2)-->
<!-- and c.point_id = #{pointId}-->
<!-- and c.plan_task_id = #{planTaskId}-->
<!-- </select>-->
<!-- <select id="checkHasRecord" resultType="int">-->
<!-- SELECT-->
<!-- count(1) num-->
<!-- FROM-->
<!-- p_check c-->
<!-- WHERE-->
<!-- is_ok in (1,2)-->
<!-- and c.point_id = #{pointId}-->
<!-- and c.plan_task_id = #{planTaskId}-->
<!-- </select>-->
<select
id=
"pieChartData"
resultType=
"Map"
>
SELECT
...
...
@@ -475,7 +477,7 @@
<when
test=
"finishStatus == 1"
>
and (`a`.`plan_task_detail_id` != 0 AND `a`.`is_ok` != 3)
</when>
<when
test=
"finishStatus == 2"
>
and `a`.`is_ok` = 3
</when>
</choose>
<if
test=
"departmentId!=null"
>
and find_in_set(#{departmentId},a.dep_id)>0
</if>
<if
test=
"departmentId!=null"
>
and find_in_set(#{departmentId},a.dep_id)>0
</if>
</trim>
</select>
...
...
@@ -795,12 +797,13 @@
FROM
p_point_classify classify
<where>
classify.id IN ( SELECT pci.point_classify_id FROM p_check_input pci WHERE
<if
test=
"checkID != null"
>
pci.check_id = #{checkID}
</if>
)
classify.id IN ( SELECT pci.point_classify_id FROM p_check_input pci WHERE
<if
test=
"checkID != null"
>
pci.check_id = #{checkID}
</if>
)
</where>
</select>
<!-- 根据巡检记录ID和巡检点ID获取巡检项信息 -->
<select
id=
"getCheckInputByCheckId"
resultMap=
"checkInputResultMap"
>
SELECT
...
...
@@ -856,7 +859,8 @@
FROM p_check_input pci WHERE
<if
test=
"pointID != null"
>
pci.check_id = #{checkID}
</if>
)
</if>
)
</select>
<!-- 根据巡检记录ID和巡检点ID获取巡检项信息 -->
<select
id=
"getEquipInputByCheckId"
resultType=
"java.util.HashMap"
>
...
...
@@ -1092,7 +1096,8 @@
<!-- 风险点最新巡检信息查询,3d屏使用 -->
<resultMap
id=
"planRoutePointResultMap"
type=
"com.yeejoin.amos.supervision.business.entity.mybatis.PlanRoutePointBo"
>
<resultMap
id=
"planRoutePointResultMap"
type=
"com.yeejoin.amos.supervision.business.entity.mybatis.PlanRoutePointBo"
>
<result
property=
"routeName"
column=
"route_name"
/>
<result
property=
"planName"
column=
"plan_name"
/>
<result
property=
"deptName"
column=
"department_name"
/>
...
...
@@ -1189,7 +1194,7 @@
) sa
<where>
c.plan_id = sa.id
<if
test=
"userId != null"
>
AND find_in_set(#{userId}, sa.user_id) >0
</if>
<if
test=
"userId != null"
>
AND find_in_set(#{userId}, sa.user_id) >0
</if>
<if
test=
"checkDate != null"
>
AND DATE_FORMAT(c.check_time, '%Y%m%d') = DATE_FORMAT(#{checkDate}, '%Y%m%d')
</if>
</where>
...
...
@@ -1235,7 +1240,7 @@
) sa
WHERE
d.plan_id = sa.planID
<if
test=
"userId != null"
>
AND find_in_set(#{userId},
sa.userID)>0
</if>
<if
test=
"userId != null"
>
AND find_in_set(#{userId},
sa.userID)>0
</if>
<if
test=
"checkDate != null"
>
AND DATE_FORMAT(d.check_time, '%y%m%d') = #{checkDate}
</if>
ORDER BY d.id DESC
) temp_row
...
...
@@ -1685,7 +1690,7 @@
ADDDATE(#{startTime} , INTERVAL @d DAY)
<![CDATA[ < ]]>
DATE_FORMAT(#{endTime}, '%Y-%m-%d')
) d LEFT JOIN p_check c ON DATE_FORMAT(c.check_time, '%Y-%m-%d') = d.date
<if
test=
" orgCode != null and orgCode != '' "
>
and position( #{orgCode} in c.org_code )
</if>
<if
test=
" userId != null and userId != '' "
>
and find_in_set(#{userId}, c.user_id)>0
</if>
<if
test=
" userId != null and userId != '' "
>
and find_in_set(#{userId}, c.user_id)>0
</if>
<if
test=
"type == 1"
>
and c.is_ok != #{param}
</if>
<if
test=
"type == 2"
>
and c.plan_id != #{param}
</if>
<if
test=
"type == 3"
>
and c.is_ok = #{param}
</if>
...
...
@@ -1698,50 +1703,50 @@
</select>
<!-- 巡检记录查询 -->
<!-- <select id="getCheckInfoList1" resultMap="CheckInfoResultMap">-->
<!-- select * from (-->
<!-- SELECT-->
<!-- DATE_FORMAT(c.check_time, '%Y-%m-%d %T') as checkTime,-->
<!-- c.user_id as UserID,-->
<!-- c.point_id as PointID,-->
<!-- c.id as CheckID,-->
<!-- c.is_ok as IsOK,-->
<!-- c.error as ErrorMsg,-->
<!-- c.plan_task_id as ErrorID,-->
<!-- p.name as pointName,-->
<!-- c.dep_name as NAME,-->
<!-- c.dep_id as GroupID,-->
<!-- c.user_name as RealName,-->
<!-- (SELECT-->
<!-- GROUP_CONCAT(-->
<!-- IFNULL(case when u.mobile = '' or u.mobile is null then null else u.mobile END,u.telephone)-->
<!-- )-->
<!-- FROM-->
<!-- s_user u-->
<!-- WHERE-->
<!-- find_in_set(u.id,c.user_id)>0) as LoginName,-->
<!-- c.org_code as orgCode-->
<!-- FROM-->
<!-- p_check c,-->
<!-- p_point p-->
<!-- where-->
<!-- p.id =c.point_id ) as a-->
<!-- <trim prefix="WHERE" prefixOverrides="AND ">-->
<!-- <if test="pointID!=null">AND a.PointID = #{pointID}</if>-->
<!-- <if test="checkTime!=null">AND DATE_FORMAT(a.CheckTime, '%Y%m%d') = #{checkTime}</if>-->
<!-- <if test="userID!=null and userID!=-1 ">AND find_in_set(#{userID}, a.userID)>0 </if>-->
<!-- <if test="status!=null">AND a.IsOK = #{status}</if>-->
<!-- <if test="userName!=null">AND a.RealName LIKE concat(concat("%",#{userName}),"%")</if>-->
<!-- <if test="groupId!=null">AND find_in_set(#{groupId}, a.GroupID)>0</if>-->
<!-- <if test="pointName!=null">AND a.pointName LIKE concat(concat("%",#{pointName}),"%")</if>-->
<!-- <if test="orgCode!=null">AND a.orgCode LIKE #{orgCode}</if>-->
<!-- </trim>-->
<!-- <choose>-->
<!-- <when test="pageSize==-1"></when>-->
<!-- <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>-->
<!-- </choose>-->
<!-- </select>!–>-->
<!-- <select id="getCheckInfoList1" resultMap="CheckInfoResultMap">-->
<!-- select * from (-->
<!-- SELECT-->
<!-- DATE_FORMAT(c.check_time, '%Y-%m-%d %T') as checkTime,-->
<!-- c.user_id as UserID,-->
<!-- c.point_id as PointID,-->
<!-- c.id as CheckID,-->
<!-- c.is_ok as IsOK,-->
<!-- c.error as ErrorMsg,-->
<!-- c.plan_task_id as ErrorID,-->
<!-- p.name as pointName,-->
<!-- c.dep_name as NAME,-->
<!-- c.dep_id as GroupID,-->
<!-- c.user_name as RealName,-->
<!-- (SELECT-->
<!-- GROUP_CONCAT(-->
<!-- IFNULL(case when u.mobile = '' or u.mobile is null then null else u.mobile END,u.telephone)-->
<!-- )-->
<!-- FROM-->
<!-- s_user u-->
<!-- WHERE-->
<!-- find_in_set(u.id,c.user_id)>0) as LoginName,-->
<!-- c.org_code as orgCode-->
<!-- FROM-->
<!-- p_check c,-->
<!-- p_point p-->
<!-- where-->
<!-- p.id =c.point_id ) as a-->
<!-- <trim prefix="WHERE" prefixOverrides="AND ">-->
<!-- <if test="pointID!=null">AND a.PointID = #{pointID}</if>-->
<!-- <if test="checkTime!=null">AND DATE_FORMAT(a.CheckTime, '%Y%m%d') = #{checkTime}</if>-->
<!-- <if test="userID!=null and userID!=-1 ">AND find_in_set(#{userID}, a.userID)>0 </if>-->
<!-- <if test="status!=null">AND a.IsOK = #{status}</if>-->
<!-- <if test="userName!=null">AND a.RealName LIKE concat(concat("%",#{userName}),"%")</if>-->
<!-- <if test="groupId!=null">AND find_in_set(#{groupId}, a.GroupID)>0</if>-->
<!-- <if test="pointName!=null">AND a.pointName LIKE concat(concat("%",#{pointName}),"%")</if>-->
<!-- <if test="orgCode!=null">AND a.orgCode LIKE #{orgCode}</if>-->
<!-- </trim>-->
<!-- <choose>-->
<!-- <when test="pageSize==-1"></when>-->
<!-- <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>-->
<!-- </choose>-->
<!-- </select>!–>-->
<select
id=
"getCheckInfoList1"
resultType=
"Map"
>
select
...
...
@@ -1763,7 +1768,7 @@
where c.point_id = p.id
<if
test=
"pointID!=null"
>
AND c.point_id = #{pointID}
</if>
<if
test=
"checkTime!=null"
>
AND DATE_FORMAT(c.check_time, '%Y%m%d') = #{checkTime}
</if>
<if
test=
"userID!=null and userID!=-1 "
>
AND find_in_set(#{userID}, c.user_id)>0
</if>
<if
test=
"userID!=null and userID!=-1 "
>
AND find_in_set(#{userID}, c.user_id)>0
</if>
<if
test=
"status!=null"
>
AND c.is_ok = #{status}
</if>
<if
test=
"userName!=null"
>
AND c.error LIKE concat(concat("%",#{userName}),"%")
</if>
<if
test=
"groupId!=null"
>
AND find_in_set(#{groupId}, c.dep_id)>0
</if>
...
...
@@ -1788,7 +1793,7 @@
where c.point_id = p.id
<if
test=
"pointID!=null"
>
AND c.point_id = #{pointID}
</if>
<if
test=
"checkTime!=null"
>
AND DATE_FORMAT(c.check_time, '%Y%m%d') = #{checkTime}
</if>
<if
test=
"userID!=null and userID!=-1 "
>
AND find_in_set(#{userID}, c.user_id)>0
</if>
<if
test=
"userID!=null and userID!=-1 "
>
AND find_in_set(#{userID}, c.user_id)>0
</if>
<if
test=
"status!=null"
>
AND c.is_ok = #{status}
</if>
<if
test=
"userName!=null"
>
AND c.user_name LIKE concat(concat("%",#{userName}),"%")
</if>
<if
test=
"groupId!=null"
>
AND find_in_set(#{groupId}, c.dep_id)>0
</if>
...
...
@@ -1886,8 +1891,8 @@
AND (c.org_code=#{orgCode} or c.org_code like CONCAT(#{orgCode},'-%'))
</if>
WHERE 1=1
<if
test=
"startTime !=null and startTime!= '' "
>
AND d.date
<![CDATA[ >= ]]>
#{startTime}
</if>
<if
test=
"endTime !=null and endTime!='' "
>
AND d.date
<![CDATA[ < ]]>
#{endTime}
</if>
<if
test=
"startTime !=null and startTime!= '' "
>
AND d.date
<![CDATA[ >= ]]>
#{startTime}
</if>
<if
test=
"endTime !=null and endTime!='' "
>
AND d.date
<![CDATA[ < ]]>
#{endTime}
</if>
GROUP BY
d.date
ORDER BY
...
...
@@ -1955,12 +1960,12 @@
<if
test=
"teamId != null and teamId != ''"
>
AND pp.original_id = #{teamId}
</if>
<!-- <if test="status != null and status != ''">-->
<!-- AND pc.point_id = #{status}-->
<!-- </if>-->
<!-- <if test="companyName != null and companyName != ''">-->
<!-- AND pc.company_name = #{company_name}-->
<!-- </if>-->
<!-- <if test="status != null and status != ''">-->
<!-- AND pc.point_id = #{status}-->
<!-- </if>-->
<!-- <if test="companyName != null and companyName != ''">-->
<!-- AND pc.company_name = #{company_name}-->
<!-- </if>-->
limit #{offset},#{pageSize}
</select>
...
...
@@ -1999,13 +2004,14 @@
<if
test=
"pointId != null and pointId != -1"
>
AND pp.id = #{pointId}
</if>
<!-- <if test="orgCode != null">-->
<!-- AND c.org_code = #{orgCode}-->
<!-- </if>-->
<!-- <if test="orgCode != null">-->
<!-- AND c.org_code = #{orgCode}-->
<!-- </if>-->
</where>
</select>
<select
id=
"queryPage"
resultType=
"com.yeejoin.amos.supervision.business.vo.CheckVo"
>
SELECT
c.id checkId,
i.id,
i.`name` inputItemName,
ci.safety_danger_num,
...
...
@@ -2015,7 +2021,6 @@
ci.accompany_user_name,
pp.original_id,
pp.name companyName,
IF
( c.check_time IS NULL, 0, 1 ) AS ext
FROM
...
...
@@ -2033,9 +2038,9 @@
<if
test=
"pointId != null and pointId != -1"
>
AND pp.id = #{pointId}
</if>
<!-- <if test="orgCode != null">-->
<!-- AND c.org_code = #{orgCode}-->
<!-- </if>-->
<!-- <if test="orgCode != null">-->
<!-- AND c.org_code = #{orgCode}-->
<!-- </if>-->
ORDER BY c.check_time DESC
<choose>
<when
test=
"pageSize==-1"
></when>
...
...
@@ -2043,4 +2048,23 @@
</choose>
</where>
</select>
<select
id=
"getCheckListByTaskId"
resultType=
"com.yeejoin.amos.supervision.dao.entity.Check"
>
select * from p_check where plan_task_id = #{planTaskId}
</select>
<select
id=
"getPictureByCheckId"
resultType=
"java.lang.String"
>
SELECT
photo_data
FROM
p_check_shot a
LEFT JOIN
p_check_input b
ON
a.check_input_id=b.id
WHERE
a.check_id = #{checkId}
AND
b.input_id= #{id}
</select>
</mapper>
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_plan.xml
View file @
60968472
...
...
@@ -118,6 +118,7 @@
p_route b
WHERE
a.route_Id = b.id and a.is_delete = 0
and (a.status > 0 or a.maker_user_id = #{loginUserId})
<if
test=
"planName!=null"
>
and a.name like concat(concat("%",#{planName}),"%")
</if>
<if
test=
"checkTypeId!=null and checkTypeId != '' "
>
and a.check_type_id = #{checkTypeId}
</if>
<if
test=
"leadPerson!=null and leadPerson != '' "
>
and a.lead_people_ids = #{leadPerson}
</if>
...
...
@@ -167,6 +168,7 @@
p_route b
WHERE
a.route_Id = b.id and a.is_delete = 0
and (a.status > 0 or a.maker_user_id = #{loginUserId})
<if
test=
"planName!=null"
>
and a.name like concat(concat("%",#{planName}),"%")
</if>
<if
test=
"checkTypeId!=null and checkTypeId != '' "
>
and a.check_type_id = #{checkTypeId}
</if>
<if
test=
"leadPerson!=null and leadPerson != '' "
>
and a.lead_people_ids = #{leadPerson}
</if>
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
60968472
...
...
@@ -361,6 +361,7 @@
p.id pointId,
p.point_no pointNO,
p.offline,
p.original_id originalId,
ptd.status,
ptd.is_finish finish,
p.is_fixed isFixed,
...
...
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