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
b2fd9ae7
Commit
b2fd9ae7
authored
Oct 14, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6_temp
parents
c0e29fee
d35e8513
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
769 additions
and
142 deletions
+769
-142
misc.xml
.idea/misc.xml
+2
-0
DataDictionaryController.java
.../boot/biz/common/controller/DataDictionaryController.java
+20
-1
DataDictionaryMapper.java
...amos/boot/biz/common/dao/mapper/DataDictionaryMapper.java
+2
-1
DataDictionaryMapper.xml
...common/src/main/resources/mapper/DataDictionaryMapper.xml
+1
-0
PeopleInfoDto.java
...eejoin/amos/boot/module/common/api/dto/PeopleInfoDto.java
+1
-0
OrgUsrAgencyUser.java
.../amos/boot/module/common/api/entity/OrgUsrAgencyUser.java
+9
-0
EquipmentSpecificAlarmLog.java
.../equipmanage/common/entity/EquipmentSpecificAlarmLog.java
+4
-0
FireExpertsController.java
...t/module/common/biz/controller/FireExpertsController.java
+18
-4
LinkageUnitController.java
...t/module/common/biz/controller/LinkageUnitController.java
+15
-1
OrgUsrAgencyUserController.java
...ule/common/biz/controller/OrgUsrAgencyUserController.java
+21
-0
FirefightersServiceImpl.java
...dule/common/biz/service/impl/FirefightersServiceImpl.java
+4
-1
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+8
-6
EquipmentAlarmController.java
...join/equipmanage/controller/EquipmentAlarmController.java
+5
-0
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+25
-13
SupervisionVideoMapper.java
...om/yeejoin/equipmanage/mapper/SupervisionVideoMapper.java
+2
-2
ISupervisionVideoService.java
...yeejoin/equipmanage/service/ISupervisionVideoService.java
+2
-1
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+31
-8
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+19
-16
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+15
-54
SupervisionVideoServiceImpl.java
...equipmanage/service/impl/SupervisionVideoServiceImpl.java
+16
-18
wl-3.6.0.xml
...ot-system-equip/src/main/resources/changelog/wl-3.6.0.xml
+12
-0
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+6
-1
SupervisionVideoMapper.xml
...quip/src/main/resources/mapper/SupervisionVideoMapper.xml
+9
-3
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+23
-0
ModelTreeDto.java
...om/yeejoin/amos/boot/module/tdc/api/dto/ModelTreeDto.java
+16
-0
CheckModel.java
...m/yeejoin/amos/boot/module/tdc/api/entity/CheckModel.java
+3
-0
ModeNameProjectIdEnum.java
...amos/boot/module/tdc/api/enums/ModeNameProjectIdEnum.java
+51
-0
ModelNameEnum.java
...yeejoin/amos/boot/module/tdc/api/enums/ModelNameEnum.java
+43
-0
IdxFeignService.java
...ejoin/amos/boot/module/tdc/api/feign/IdxFeignService.java
+5
-0
PrivilegeFeignService.java
...amos/boot/module/tdc/api/feign/PrivilegeFeignService.java
+19
-0
UruleFeignService.java
...oin/amos/boot/module/tdc/api/feign/UruleFeignService.java
+20
-0
CheckModelMapper.java
...oin/amos/boot/module/tdc/api/mapper/CheckModelMapper.java
+9
-0
CheckModelService.java
...n/amos/boot/module/tdc/api/service/CheckModelService.java
+14
-0
CheckResultService.java
.../amos/boot/module/tdc/api/service/CheckResultService.java
+2
-1
SubjectTreeVo.java
...om/yeejoin/amos/boot/module/tdc/api/vo/SubjectTreeVo.java
+19
-0
CheckModelMapper.xml
...le-tdc-api/src/main/resources/mapper/CheckModelMapper.xml
+7
-1
WebSecurityConfig.java
...in/amos/boot/module/tdc/biz/config/WebSecurityConfig.java
+26
-0
CheckModelController.java
.../boot/module/tdc/biz/controller/CheckModelController.java
+55
-1
CheckResultController.java
...boot/module/tdc/biz/controller/CheckResultController.java
+8
-4
CheckModelImpl.java
...amos/boot/module/tdc/biz/service/impl/CheckModelImpl.java
+187
-0
CheckResultImpl.java
...mos/boot/module/tdc/biz/service/impl/CheckResultImpl.java
+8
-4
application.properties
...-module-tdc-biz/src/main/resources/application.properties
+6
-0
pom.xml
pom.xml
+1
-1
No files found.
.idea/misc.xml
View file @
b2fd9ae7
...
...
@@ -8,6 +8,8 @@
</option>
<option
name=
"ignoredFiles"
>
<set>
<option
value=
"D:/Sanwei/developer/amos-boot-system-ugp/amos-boot-module-ugp-api/pom.xml"
/>
<option
value=
"D:/Sanwei/developer/amos-boot-system-ugp/amos-boot-module-ugp-biz/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-data/amos-boot-data-accessapi/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-module/amos-boot-module-api/amos-boot-module-kgd-api/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-module/amos-boot-module-biz/amos-boot-module-kgd-biz/pom.xml"
/>
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/DataDictionaryController.java
View file @
b2fd9ae7
...
...
@@ -8,12 +8,15 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -345,7 +348,14 @@ public class DataDictionaryController extends BaseController {
Collection
<
DataDictionary
>
list
=
null
;
List
<
Menu
>
menus
=
null
;
if
(
"YJLDDW"
.
equals
(
type
))
{
list
=
dataDictionaryMapper
.
getNoInLinkUnit
();
String
bizOrgCode
=
""
;
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
null
!=
reginParam
)
{
bizOrgCode
=
reginParam
.
getPersonIdentity
().
getBizOrgCode
();
}
list
=
dataDictionaryMapper
.
getNoInLinkUnit
(
bizOrgCode
);
// 数据字典生成树方法 原先通过getCode做主键 现修改为 getSequenceNbr 后期数据字典parent字段保存id 而不要保存code by
// kongfm 2021-09-08
// 数据字典还原 by kongfm 2021-09-09
...
...
@@ -435,4 +445,13 @@ public class DataDictionaryController extends BaseController {
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserGroupByType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型type查询字典列表"
,
notes
=
"根据字典类型type查询字典列表"
)
public
ResponseModel
<
List
<
DataDictionary
>>
getUserGroupByType
(
@RequestParam
(
value
=
"type"
)
String
type
){
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
type
);
List
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/dao/mapper/DataDictionaryMapper.java
View file @
b2fd9ae7
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
org.apache.ibatis.annotations.Param
;
/**
* 数据字典 Mapper 接口
...
...
@@ -21,7 +22,7 @@ public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
* 获取包含联动单位的联动单位树信息
* @return
*/
public
List
<
DataDictionary
>
getNoInLinkUnit
();
public
List
<
DataDictionary
>
getNoInLinkUnit
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
/**
* 根据code值查询
...
...
amos-boot-biz-common/src/main/resources/mapper/DataDictionaryMapper.xml
View file @
b2fd9ae7
...
...
@@ -44,6 +44,7 @@ GROUP BY
FROM
cb_linkage_unit
WHERE is_delete = 0
and biz_org_code like concat(#{bizOrgCode}, '%')
GROUP BY
emergency_linkage_unit_code
) elink ON elink.emergency_linkage_unit_code = cbb.`code`
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/PeopleInfoDto.java
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.module.common.api.entity.Firefighters
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersContacts
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsrAgencyUser
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/OrgUsrAgencyUser.java
View file @
b2fd9ae7
...
...
@@ -3,10 +3,13 @@ package com.yeejoin.amos.boot.module.common.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
/**
* 单位人员平台人员关系表
*
...
...
@@ -64,4 +67,10 @@ public class OrgUsrAgencyUser extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
upAmosUser
;
@TableField
(
exist
=
false
)
private
List
<
String
>
groupIdsCode
;
@TableField
(
exist
=
false
)
private
List
<
DataDictionary
>
dataDictionaryList
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificAlarmLog.java
View file @
b2fd9ae7
...
...
@@ -219,4 +219,8 @@ public class EquipmentSpecificAlarmLog extends BaseEntity {
*/
@TableField
(
value
=
"emergency_level_describe"
)
private
String
emergencyLevelDescribe
;
@ApiModelProperty
(
value
=
"是否是缺陷提交确认"
,
notes
=
"是否是缺陷提交确认"
)
@TableField
(
exist
=
false
)
private
boolean
addDefect
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FireExpertsController.java
View file @
b2fd9ae7
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -11,10 +12,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.*
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireExperts
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
...
...
@@ -23,11 +21,13 @@ import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -181,6 +181,13 @@ public class FireExpertsController extends BaseController {
public
ResponseModel
<
IPage
<
FireExpertsDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
FireExpertsDto
fireExpertsDto
)
throws
Exception
{
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
null
==
reginParam
||
StringUtils
.
isEmpty
(
reginParam
.
getPersonIdentity
().
getBizOrgCode
()))
{
return
ResponseHelper
.
buildResponse
(
null
);
}
fireExpertsDto
.
setBizOrgCode
(
reginParam
.
getPersonIdentity
().
getBizOrgCode
());
Page
<
FireExpertsDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
...
...
@@ -233,6 +240,13 @@ public class FireExpertsController extends BaseController {
// queryWrapper.eq("type", type);
// queryWrapper.orderByAsc("sort_num");
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
null
==
reginParam
||
StringUtils
.
isEmpty
(
reginParam
.
getPersonIdentity
().
getBizOrgCode
()))
{
return
ResponseHelper
.
buildResponse
(
null
);
}
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
bizOrgCode
=
reginParam
.
getPersonIdentity
().
getBizOrgCode
();
}
Collection
<
DataDictionary
>
list
=
dataDictionaryService
.
getDataDictionaryAndCount
(
bizOrgCode
);
list
.
forEach
(
i
->{
i
.
setName
(
i
.
getName
()+
" ("
+
i
.
getCount
()+
")"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/LinkageUnitController.java
View file @
b2fd9ae7
...
...
@@ -2,7 +2,10 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
import
java.util.List
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper
;
import
org.apache.commons.lang3.ObjectUtils
;
...
...
@@ -17,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -53,6 +57,9 @@ public class LinkageUnitController extends BaseController {
@Autowired
private
OrgUsrMapper
orgUsrMapper
;
@Autowired
RedisUtils
redisUtils
;
/**
* 新增联动单位
*
...
...
@@ -148,12 +155,19 @@ public class LinkageUnitController extends BaseController {
(
value
=
"size"
)
int
size
,
String
unitName
,
String
linkageUnitTypeCode
,
String
linkageUnitType
,
String
inAgreement
,
String
emergencyLinkageUnitCode
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
required
=
false
)
String
companyCode
)
{
if
(
StringUtils
.
isNotEmpty
(
companyCode
))
{
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
null
==
reginParam
||
StringUtils
.
isEmpty
(
reginParam
.
getPersonIdentity
().
getBizOrgCode
()))
{
return
ResponseHelper
.
buildResponse
(
null
);
}
if
(
StringUtils
.
isNotEmpty
(
companyCode
)
&&
StringUtils
.
isEmpty
(
bizOrgCode
))
{
OrgUsr
orgUsr
=
orgUsrMapper
.
queryByCompanyCode
(
companyCode
);
if
(
ObjectUtils
.
isNotEmpty
(
orgUsr
))
{
bizOrgCode
=
orgUsr
.
getBizOrgCode
();
}
}
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
bizOrgCode
=
reginParam
.
getPersonIdentity
().
getBizOrgCode
();
}
Page
<
LinkageUnitDto
>
page
=
new
Page
<
LinkageUnitDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrAgencyUserController.java
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsrAgencyUser
;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrAgencyUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
...
...
@@ -16,6 +20,10 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 部门信息修改
*
...
...
@@ -30,6 +38,8 @@ public class OrgUsrAgencyUserController extends BaseController {
@Autowired
IOrgUsrAgencyUserService
orgUsrAgencyUserService
;
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
/**
* 查询关联的amos账号信息
...
...
@@ -46,6 +56,16 @@ public class OrgUsrAgencyUserController extends BaseController {
orgUsrAgencyUser
.
setUpAmosUser
(
"0"
);
return
ResponseHelper
.
buildResponse
(
orgUsrAgencyUser
);
}
if
(!
StringUtils
.
isEmpty
(
agencyUser
.
getGroupIds
()))
{
List
<
String
>
list1
=
Arrays
.
asList
(
agencyUser
.
getGroupIds
().
split
(
","
));
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
in
(
"type"
,
list1
);
queryWrapper
.
eq
(
"code"
,
"CB_USER_GROUP"
);
List
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
orgUsrAgencyUser
.
setDataDictionaryList
(
list
);
List
<
String
>
collect
=
list
.
stream
().
map
(
DataDictionary:
:
getCode
).
collect
(
Collectors
.
toList
());
orgUsrAgencyUser
.
setGroupIdsCode
(
collect
);
}
return
ResponseHelper
.
buildResponse
(
agencyUser
);
}
}
\ 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/FirefightersServiceImpl.java
View file @
b2fd9ae7
...
...
@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import
com.yeejoin.amos.component.feign.model.Page
;
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.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -241,7 +242,9 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
//删除之前所在用户组
OrgUsrAgencyUser
orgUsrAgencyUser
=
orgUsrAgencyUserMapper
.
selectOne
(
new
QueryWrapper
<
OrgUsrAgencyUser
>().
eq
(
"org_usr_id"
,
id
));
if
(!
ValidationUtil
.
isEmpty
(
orgUsrAgencyUser
)
&&
amosUser
!=
null
)
{
String
groupIds
=
orgUsrAgencyUser
.
getGroupIds
();
List
<
String
>
groupIdsList
=
peopleInfoDto
.
getOrgUsrAgencyUser
().
getDataDictionaryList
().
stream
().
map
(
DataDictionary:
:
getCode
).
distinct
().
collect
(
Collectors
.
toList
());
String
groupIds
=
String
.
join
(
","
,
groupIdsList
);
if
(!
""
.
equals
(
groupIds
)
&&
null
!=
groupIds
)
{
String
[]
ids
=
groupIds
.
split
(
","
);
for
(
String
gId
:
ids
)
{
...
...
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 @
b2fd9ae7
...
...
@@ -3042,10 +3042,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
FeignClientResult
<
List
<
RoleModel
>>
roleListResult
=
Privilege
.
roleClient
.
queryRoleList
(
null
,
null
);
List
<
RoleModel
>
allRoleList
=
roleListResult
.
getResult
();
DataDictionary
unitType
=
dataDictionaryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
DataDictionary
>().
eq
(
DataDictionary:
:
getCode
,
"default"
));
List
<
RoleModel
>
userRoleList
=
allRoleList
.
stream
().
filter
(
r
->
r
.
getRoleName
().
equals
(
unitType
.
getName
()))
List
<
String
>
groupIdsList
=
peopleInfoDto
.
getOrgUsrAgencyUser
().
getDataDictionaryList
().
stream
().
map
(
DataDictionary:
:
getCode
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
roleNameList
=
peopleInfoDto
.
getOrgUsrAgencyUser
().
getDataDictionaryList
().
stream
().
map
(
DataDictionary:
:
getExtend
).
distinct
().
collect
(
Collectors
.
toList
());
String
groupIdsString
=
String
.
join
(
","
,
groupIdsList
);
String
roleNameString
=
String
.
join
(
","
,
roleNameList
);
List
<
RoleModel
>
userRoleList
=
allRoleList
.
stream
().
filter
(
r
->
roleNameString
.
contains
(
r
.
getRoleName
()))
.
collect
(
Collectors
.
toList
());
String
appCode
=
unitType
.
getTypeDesc
()
!=
null
?
unitType
.
getTypeDesc
()
:
""
;
String
appCode
=
""
;
String
[]
appCodes
=
appCode
.
split
(
","
);
Collections
.
addAll
(
appCodesSet
,
appCodes
);
userRoleList
.
forEach
(
r
->
{
...
...
@@ -3091,10 +3094,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
userResult
=
Privilege
.
agencyUserClient
.
update
(
agencyUserModel
,
peopleInfoDto
.
getOrgUsrAgencyUser
().
getAmosUserId
()).
getResult
();
}
//绑定用户组
String
groupIds
=
peopleInfoDto
.
getOrgUsrAgencyUser
().
getGroupIds
();
if
(!
""
.
equals
(
groupIds
)
&&
null
!=
groupIds
)
{
if
(!
""
.
equals
(
groupIdsString
)
&&
null
!=
groupIdsString
)
{
String
[]
userIds
=
{
userResult
.
getUserId
()};
String
[]
ids
=
groupIds
.
split
(
","
);
String
[]
ids
=
groupIds
String
.
split
(
","
);
for
(
String
id
:
ids
)
{
Long
groupId
=
Long
.
valueOf
(
id
);
Privilege
.
groupUserClient
.
create
(
groupId
,
Arrays
.
asList
(
userIds
)).
getResult
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentAlarmController.java
View file @
b2fd9ae7
...
...
@@ -91,6 +91,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam
(
value
=
"equipCode"
,
required
=
false
)
String
equipCode
,
@RequestParam
(
value
=
"handleStatus"
,
required
=
false
)
String
handleStatus
,
@RequestParam
(
value
=
"system"
,
required
=
false
)
String
system
,
@RequestParam
(
value
=
"systemCode"
,
required
=
false
)
String
systemCode
,
@RequestParam
(
value
=
"alarmType"
,
required
=
false
)
String
alarmType
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"buildIds"
,
required
=
false
)
List
<
String
>
buildIds
,
...
...
@@ -155,6 +156,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
request12
.
setName
(
"isRemoveShield"
);
request12
.
setValue
(
StringUtil
.
isNotEmpty
(
isRemoveShield
)
?
StringUtils
.
trimToNull
(
isRemoveShield
)
:
null
);
queryRequests
.
add
(
request12
);
CommonRequest
request14
=
new
CommonRequest
();
request14
.
setName
(
"systemCode"
);
request14
.
setValue
(
StringUtil
.
isNotEmpty
(
systemCode
)
?
StringUtils
.
trimToNull
(
systemCode
)
:
null
);
queryRequests
.
add
(
request14
);
if
(
equioEnabled
)
{
if
(!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
()))
{
CommonRequest
request13
=
new
CommonRequest
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
b2fd9ae7
...
...
@@ -221,12 +221,14 @@ public class SupervisionConfigureController extends AbstractBaseController {
@RequestMapping
(
value
=
"/alarmTrend"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"报警类型趋势"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"报警类型趋势"
)
public
ResponseModel
alarmTrend
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
ResponseModel
alarmTrend
()
{
String
bizOrgCode
=
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
null
);
}
}
return
CommonResponseUtil
.
success
(
equipmentSpecificAlarmService
.
alarmTrend
(
bizOrgCode
));
...
...
@@ -331,7 +333,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
if
(
diffMinute
<=
5
)
{
time
=
true
;
}
item
.
put
(
"upTime"
,
diffMinute
);
item
.
put
(
"upTime"
,
diffMinute
);
}
}
item
.
put
(
"stateDesc"
,
Integer
.
parseInt
(
String
.
valueOf
(
item
.
get
(
"isAlarm"
)))
==
0
&&
time
?
"正常"
:
"异常"
);
...
...
@@ -366,13 +368,15 @@ public class SupervisionConfigureController extends AbstractBaseController {
@PersonIdentify
@RequestMapping
(
value
=
"/replaceVideo"
,
method
=
RequestMethod
.
POST
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加视频"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"添加视频"
)
public
ResponseModel
replaceVideo
(
@RequestBody
String
ids
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"替换视频"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"替换视频"
)
public
ResponseModel
replaceVideo
(
@RequestBody
Map
<
String
,
String
>
ids
)
{
String
bizOrgCode
=
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
null
);
}
}
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
replaceVideo
(
ids
,
bizOrgCode
));
...
...
@@ -382,12 +386,18 @@ public class SupervisionConfigureController extends AbstractBaseController {
@RequestMapping
(
value
=
"/queryVideoList"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询视频列表"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"查询视频列表"
)
public
ResponseModel
queryVideoList
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
ResponseModel
queryVideoList
()
{
String
bizOrgCode
=
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
)
)
{
if
(
personIdentity
.
getCompanyBizOrgCode
()
==
null
)
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
else
{
bizOrgCode
=
personIdentity
.
getCompanyBizOrgCode
();
}
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
null
);
}
}
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
queryVideoList
(
bizOrgCode
));
...
...
@@ -397,12 +407,14 @@ public class SupervisionConfigureController extends AbstractBaseController {
@RequestMapping
(
value
=
"/queryVideoAllId"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询对应站下所有视频id"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"根据id查询视频"
)
public
ResponseModel
queryVideoAllId
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
ResponseModel
queryVideoAllId
()
{
String
bizOrgCode
=
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
null
);
}
}
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
queryVideoAllId
(
bizOrgCode
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/SupervisionVideoMapper.java
View file @
b2fd9ae7
...
...
@@ -2,17 +2,17 @@ package com.yeejoin.equipmanage.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
public
interface
SupervisionVideoMapper
extends
BaseMapper
<
SupervisionVideo
>
{
List
<
Map
<
String
,
Object
>
>
getVideoByCompany
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
AlamVideoVO
>
getVideoByCompany
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
String
>
queryVideoAllId
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/ISupervisionVideoService.java
View file @
b2fd9ae7
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author ZeHua Li
...
...
@@ -14,7 +15,7 @@ public interface ISupervisionVideoService extends IService<SupervisionVideo> {
List
queryVideoList
(
String
bizOrgCode
);
boolean
replaceVideo
(
String
ids
,
String
bizOrgCode
);
boolean
replaceVideo
(
Map
<
String
,
String
>
ids
,
String
bizOrgCode
);
List
<
String
>
queryVideoAllId
(
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
b2fd9ae7
...
...
@@ -34,6 +34,7 @@ import org.springframework.util.ObjectUtils;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
@Service
...
...
@@ -223,15 +224,37 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
ent
.
setUpdateDate
(
new
Date
());
ent
.
setConfirmDate
(
new
Date
());
int
i
=
0
;
if
(
ent
.
getIsBatch
()
==
0
){
i
=
equipmentSpecificAlarmLogMapper
.
updateById
(
ent
);
}
else
{
LambdaUpdateWrapper
<
EquipmentSpecificAlarmLog
>
updateWrapper
=
new
LambdaUpdateWrapper
<
EquipmentSpecificAlarmLog
>().
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificId
,
ent
.
getEquipmentSpecificId
()).
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificIndexKey
,
ent
.
getEquipmentSpecificIndexKey
())
.
isNull
(
EquipmentSpecificAlarmLog:
:
getConfirmDate
);
i
=
equipmentSpecificAlarmLogMapper
.
update
(
ent
,
updateWrapper
);
ent
.
setConfirmTypeName
(
ConfirmAlamEnum
.
getTypeByCode
(
ent
.
getConfirmType
()));
if
(!
ent
.
isAddDefect
())
{
if
(
ent
.
getIsBatch
()
==
0
){
i
=
equipmentSpecificAlarmLogMapper
.
updateById
(
ent
);
}
else
{
LambdaUpdateWrapper
<
EquipmentSpecificAlarmLog
>
updateWrapper
=
new
LambdaUpdateWrapper
<
EquipmentSpecificAlarmLog
>().
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificId
,
ent
.
getEquipmentSpecificId
()).
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificIndexKey
,
ent
.
getEquipmentSpecificIndexKey
())
.
isNull
(
EquipmentSpecificAlarmLog:
:
getConfirmDate
);
i
=
equipmentSpecificAlarmLogMapper
.
update
(
ent
,
updateWrapper
);
}
}
else
{
// 自动确警处理
EquipmentSpecific
specific
=
equipmentSpecificMapper
.
selectById
(
ent
.
getEquipmentSpecificId
());
Date
date
=
new
Date
();
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
dateString
=
formatter
.
format
(
date
);
ent
.
setTraceId
(
null
);
String
equipmentName
=
StringUtil
.
isNotEmpty
(
specific
.
getCode
())
?
specific
.
getName
()
+
"("
+
specific
.
getCode
()
+
")"
:
specific
.
getName
();
if
(
ent
.
getConfirmType
().
equals
(
AlarmTypeEnum
.
PB
.
getCode
()))
{
ent
.
setAlarmReason
(
equipmentName
+
"频繁故障/误报,将设备报警信息屏蔽。"
);
}
else
{
ent
.
setAlarmReason
(
equipmentName
+
"引起设备报警"
);
}
ent
.
setResolveResult
(
dateString
+
"系统收到设备复归(已消除)信号,系统自动处理。"
);
ent
.
setConfirmUser
(
""
);
ent
.
setConfirmUserName
(
"系统自动处理"
);
ent
.
setConfirmDate
(
date
);
equipmentSpecificAlarmLogService
.
updateById
(
ent
);
}
//int i = confirmAlarmMapper.confirmAlam(ent);
if
(
i
>
0
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
b2fd9ae7
...
...
@@ -1883,22 +1883,25 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
List
<
Map
<
String
,
Object
>>
equipSpecificScrap
=
equipmentSpecificIndexMapper
.
getEquipSpecificScrap
();
equipSpecificScrap
.
forEach
(
e
->{
try
{
int
year
=
e
.
get
(
"weExpiry"
)
!=
null
?
Integer
.
parseInt
(
e
.
get
(
"weExpiry"
).
toString
())
:
Integer
.
parseInt
(
e
.
get
(
"wesExpiry"
).
toString
());
Date
productDate
=
DateUtils
.
dateParse
(
e
.
get
(
"product"
).
toString
(),
"yyyy-MM-dd'T'HH:mm"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
productDate
);
calendar
.
add
(
Calendar
.
YEAR
,
year
);
Date
now
=
new
Date
();
String
scrapTime
=
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
calendar
.
getTime
());
int
i
=
-
1
;
while
(
now
.
after
(
calendar
.
getTime
()))
{
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
1
);
i
++;
}
if
(
i
<
Integer
.
parseInt
(
equipmentScrapDay
)
&&
i
>
-
1
)
{
syncSystemctlMsg
(
e
,
scrapTime
,
i
);
if
(
e
.
get
(
"wesExpiry"
)
!=
null
)
{
int
year
=
Integer
.
parseInt
(
e
.
get
(
"wesExpiry"
).
toString
());
Date
productDate
=
DateUtils
.
dateParse
(
e
.
get
(
"product"
).
toString
(),
"yyyy-MM-dd'T'HH:mm"
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
productDate
);
calendar
.
add
(
Calendar
.
YEAR
,
year
);
Date
now
=
new
Date
();
String
scrapTime
=
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
calendar
.
getTime
());
long
time1
=
calendar
.
getTimeInMillis
();
calendar
.
setTime
(
now
);
long
time2
=
calendar
.
getTimeInMillis
();
long
between_days
=(
time2
-
time1
)/(
10003600
*
24
);
int
day
=
Integer
.
parseInt
(
String
.
valueOf
(
between_days
));
if
(
day
<
Integer
.
parseInt
(
equipmentScrapDay
)
&&
day
>
-
1
)
{
syncSystemctlMsg
(
e
,
scrapTime
,
day
);
}
}
}
catch
(
ParseException
parseException
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
b2fd9ae7
...
...
@@ -593,71 +593,32 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
public
void
afterCommit
()
{
// 组态大屏消息推送,设备表实时指标修改
// intePageSysDataRefresh(equipmentSpecificIndexList, topicEntity);
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQXXTJ
.
getTopic
(),
""
);
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQXXTJ
.
getTopic
(),
String
.
valueOf
(
System
.
currentTimeMillis
())
);
}
});
}
public
static
List
<
EquipmentSpecificAlarmLog
>
upAlarmLogStatus
(
String
iotCode
,
String
equipmentSpecificIndexKey
,
String
traceId
,
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
,
boolean
flag
)
{
String
traceId
,
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
,
boolean
flag
)
{
LambdaQueryWrapper
<
EquipmentSpecificAlarmLog
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
eq
(
EquipmentSpecificAlarmLog:
:
getIotCode
,
iotCode
);
queryWrapper
.
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificIndexKey
,
equipmentSpecificIndexKey
);
queryWrapper
.
ne
(
EquipmentSpecificAlarmLog:
:
getStatus
,
AlarmStatusEnum
.
HF
.
getCode
());
List
<
EquipmentSpecificAlarmLog
>
logs
=
equipmentSpecificAlarmLogService
.
getBaseMapper
()
.
selectList
(
queryWrapper
);
if
(
0
<
logs
.
size
())
{
EquipmentSpecificAlarmLog
log
=
logs
.
get
(
0
);
String
cleanType
=
equipmentSpecificMapper
.
getEquipmentBySpecificId
(
log
.
getEquipmentSpecificId
());
EquipmentSpecific
specific
=
equipmentSpecificMapper
.
selectById
(
log
.
getEquipmentSpecificId
());
Date
date
=
new
Date
();
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
dateString
=
formatter
.
format
(
date
);
logs
.
forEach
(
x
->
{
x
.
setCleanTime
(
new
Date
());
x
.
setStatus
(
AlarmStatusEnum
.
HF
.
getCode
());
x
.
setEquipmentSpecificIndexValue
(
TrueOrFalseEnum
.
fake
.
value
);
if
(!
StringUtils
.
isEmpty
(
traceId
))
{
x
.
setTraceId
(
traceId
);
}
// 自动确警处理
if
(
StringUtil
.
isNotEmpty
(
cleanType
)
&&
AlarmCleanTypeEnum
.
ZDXC
.
getCode
().
equals
(
cleanType
)){
x
.
setConfirmType
(
x
.
getType
());
x
.
setConfirmTypeName
(
ConfirmAlamEnum
.
getTypeByCode
(
x
.
getType
()));
String
equipmentName
=
StringUtil
.
isNotEmpty
(
specific
.
getCode
())
?
specific
.
getName
()
+
"("
+
specific
.
getCode
()
+
")"
:
specific
.
getName
();
if
(
x
.
getType
().
equals
(
AlarmTypeEnum
.
PB
.
getCode
()))
{
x
.
setAlarmReason
(
equipmentName
+
"频繁故障/误报,将设备报警信息屏蔽。"
);
}
else
{
x
.
setAlarmReason
(
equipmentName
+
"引起设备报警"
);
}
x
.
setResolveResult
(
dateString
+
"系统收到设备复归(已消除)信号,系统自动处理。"
);
x
.
setConfirmUser
(
""
);
x
.
setConfirmUserName
(
"系统自动处理"
);
x
.
setConfirmDate
(
date
);
}
});
if
(
jcsSwitch
&&
AlarmTypeEnum
.
HZGJ
.
getCode
().
equals
(
log
.
getType
()))
{
Token
token
=
remoteSecurityService
.
getServerToken
();
String
toke
=
token
.
getToke
();
String
appKey
=
token
.
getAppKey
();
String
product
=
token
.
getProduct
();
String
userId
=
remoteSecurityService
.
getAgencyUser
().
getUserId
();
// 确警消息发送
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
userId
))
{
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
ConfirmAlarmServiceImpl
.
sendIotSystemAlarm
(
log
,
userId
,
appKey
,
product
,
toke
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}).
start
();
}
List
<
EquipmentSpecificAlarmLog
>
logs
=
equipmentSpecificAlarmLogService
.
getBaseMapper
().
selectList
(
queryWrapper
);
logs
.
forEach
(
x
->
{
x
.
setCleanTime
(
new
Date
());
x
.
setStatus
(
AlarmStatusEnum
.
HF
.
getCode
());
x
.
setEquipmentSpecificIndexValue
(
TrueOrFalseEnum
.
fake
.
value
);
if
(!
StringUtils
.
isEmpty
(
traceId
))
{
x
.
setTraceId
(
traceId
);
}
});
if
(!
logs
.
isEmpty
())
{
equipmentSpecificAlarmLogService
.
updateBatchById
(
logs
);
}
if
(
flag
)
{
List
<
EquipmentSpecificIndex
>
indexList
=
equipmentSpecificIndexService
.
getEquipmentSpeIndexBySpeIotCode
(
iotCode
);
publishDataToCanvas
(
indexList
);
...
...
@@ -1198,7 +1159,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
*/
public
void
intePageSysDataRefresh
(
List
<
EquipmentSpecificIndex
>
equipmentSpecificIndexList
,
TopicEntityVo
topicEntity
)
{
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQXXTJ
.
getTopic
(),
""
);
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQXXTJ
.
getTopic
(),
String
.
valueOf
(
System
.
currentTimeMillis
())
);
iEquipmentSpecificSerivce
.
integrationPageSysDataRefresh
(
topicEntity
.
getCode
());
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SupervisionVideoServiceImpl.java
View file @
b2fd9ae7
...
...
@@ -3,10 +3,13 @@ package com.yeejoin.equipmanage.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO
;
import
com.yeejoin.equipmanage.mapper.SupervisionVideoMapper
;
import
com.yeejoin.equipmanage.service.ISupervisionVideoService
;
import
com.yeejoin.equipmanage.service.IVideoService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
...
...
@@ -22,32 +25,27 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
@Autowired
SupervisionVideoMapper
supervisionVideoMapper
;
@Value
(
"${window.vedioFormat}"
)
String
vedioFormat
;
@Autowired
private
IVideoService
videoService
;
@Override
public
List
<
List
<
Map
<
String
,
Object
>>>
queryVideoList
(
String
bizOrgCode
)
{
List
<
List
<
Map
<
String
,
Object
>>>
resList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
list
=
supervisionVideoMapper
.
getVideoByCompany
(
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
if
(
list
.
size
()
>
1
&&
(
i
/
2
)
-
1
!=
0
&&
i
!=
0
)
{
mapList
.
add
(
list
.
get
(
i
));
resList
.
add
(
mapList
);
mapList
=
new
ArrayList
<>();
}
else
{
mapList
.
add
(
list
.
get
(
i
));
if
(
i
==
list
.
size
()
-
1
)
{
resList
.
add
(
mapList
);
}
}
}
return
resList
;
public
List
<
AlamVideoVO
>
queryVideoList
(
String
bizOrgCode
)
{
List
<
AlamVideoVO
>
list
=
supervisionVideoMapper
.
getVideoByCompany
(
bizOrgCode
);
list
.
forEach
(
action
->
{
action
.
setVedioFormat
(
vedioFormat
);
action
.
setUrl
(
videoService
.
getVideoUrl
(
action
.
getName
(),
action
.
getPresetPosition
(),
action
.
getUrl
(),
action
.
getCode
()));
});
return
list
;
}
@Override
public
boolean
replaceVideo
(
String
ids
,
String
bizOrgCode
)
{
public
boolean
replaceVideo
(
Map
<
String
,
String
>
map
,
String
bizOrgCode
)
{
supervisionVideoMapper
.
delete
(
new
QueryWrapper
<
SupervisionVideo
>().
eq
(
"biz_org_code"
,
bizOrgCode
));
List
<
SupervisionVideo
>
list
=
new
ArrayList
<>();
String
ids
=
map
.
get
(
"ids"
);
for
(
String
s
:
ids
.
split
(
","
))
{
SupervisionVideo
supervisionVideo
=
new
SupervisionVideo
();
supervisionVideo
.
setCameraId
(
s
);
...
...
amos-boot-system-equip/src/main/resources/changelog/wl-3.6.0.xml
View file @
b2fd9ae7
...
...
@@ -251,4 +251,15 @@
REPLACE INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`, `create_date`) VALUES (133000000356, 'maxFlow', '最高报警流量(L/S)', 'inputNumber', 132828674827, 'eq', b'0', '92010700', 2581805, '2022-10-09 09:24:40');
</sql>
</changeSet>
<changeSet
author=
"tym"
id=
"202210131720"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_water_resource_pool"
/>
</preConditions>
<comment>
修改液位显示装置id和name字段长度
</comment>
<sql>
ALTER TABLE `cb_water_resource_pool`
MODIFY COLUMN `level_device_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '水池液位显示装置id',
MODIFY COLUMN `level_device_name` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '水池液位显示装置名称';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
b2fd9ae7
...
...
@@ -247,6 +247,9 @@
<if
test=
"param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 1"
>
AND
wlesal.clean_time IS NOT NULL
</if>
<if
test=
"param.systemCode != null and param.systemCode != ''"
>
AND
wlesal.system_codes = #{systemCode}
</if>
<if
test=
"param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2"
>
AND
wlesal.clean_time IS NULL
</if>
...
...
@@ -1332,6 +1335,7 @@
<select
id=
"fireAlarmLogPage"
resultType=
"java.util.HashMap"
>
SELECT
`wlesal`.id as alarmLogId,
equipment_specific_index_name,
equipment_specific_name,
DATE_FORMAT(`wlesal`.`create_date`,'%m-%d %H:%i:%s') alarm_time,
...
...
@@ -1484,6 +1488,6 @@
`d`.`click_date` = `result`.`click_date`
)))
ORDER BY
`result`.`click_date`
DESC
`result`.`click_date`
</select>
</mapper>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/SupervisionVideoMapper.xml
View file @
b2fd9ae7
...
...
@@ -2,10 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.equipmanage.mapper.SupervisionVideoMapper"
>
<select
id=
"getVideoByCompany"
resultType=
"java.util.Map"
>
select wv.*
<select
id=
"getVideoByCompany"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO"
>
select
wv.id,
wv.token,
wv.name as name,
wv.url,
wv.code,
wv.preset_position as presetPosition
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code
= #{bizOrgCode}
where wsv.biz_org_code
like concat(#{bizOrgCode},'%');
</select>
<select
id=
"queryVideoAllId"
resultType=
"java.lang.String"
>
...
...
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
b2fd9ae7
...
...
@@ -3606,5 +3606,28 @@
ALTER TABLE `cb_water_resource_pool` MODIFY COLUMN `level_device_id` varchar(255) NULL DEFAULT NULL COMMENT '水池液位显示装置id';
</sql>
</changeSet>
<changeSet
author=
"tym"
id=
"202210131748"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_water_resource_pool"
/>
</preConditions>
<comment>
修改液位显示装置id和name字段长度
</comment>
<sql>
ALTER TABLE `cb_water_resource_pool`
MODIFY COLUMN `level_device_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '水池液位显示装置id',
MODIFY COLUMN `level_device_name` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '水池液位显示装置名称';
</sql>
</changeSet>
<changeSet
author=
"zs"
id=
"202210131517"
>
<preConditions
onFail=
"MARK_RAN"
>
<sqlCheck
expectedResult=
"0"
>
select count(*) from cb_data_dictionary where sequence_nbr = 1800
</sqlCheck>
</preConditions>
<comment>
add data_dictionary 角色用户租
</comment>
<sql>
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `extend`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1800, '1580450171962032130', '管理员', 'CB_USER_GROUP', '治理人,验证人,延期治理审批人,延迟治理人,隐患填报人,default', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `extend`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1801, '1569613155653419009', '运维人员', 'CB_USER_GROUP', '治理人,验证人,延期治理审批人,延迟治理人,隐患填报人,default', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `extend`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1802, '1580479144087552002', '专职消防队', 'CB_USER_GROUP', '治理人,验证人,延期治理审批人,延迟治理人,隐患填报人,default', NULL, NULL, NULL, NULL, NULL, b'0', 1);
</sql>
</changeSet>
</databaseChangeLog>
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/dto/ModelTreeDto.java
View file @
b2fd9ae7
...
...
@@ -17,11 +17,27 @@ public class ModelTreeDto {
private
String
name
;
private
String
key
;
private
String
path
;
private
String
packageId
;
private
String
version
;
private
String
tableName
;
private
String
amosOrgName
;
private
String
modelId
;
private
String
projectId
;
private
String
projectName
;
private
List
<
ModelTreeDto
>
tables
;
private
List
<
Map
<
String
,
Object
>>
children
;
private
List
<
Map
<
String
,
Object
>>
resourceItems
;
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/entity/CheckModel.java
View file @
b2fd9ae7
...
...
@@ -58,4 +58,7 @@ public class CheckModel {
@ApiModelProperty
(
value
=
"模型校验项数量"
)
private
int
checkItemAmount
;
@ApiModelProperty
(
value
=
"模型文件地址"
)
private
String
ModelFile
;
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/enums/ModeNameProjectIdEnum.java
0 → 100644
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
enums
;
import
java.util.HashMap
;
import
java.util.Map
;
public
enum
ModeNameProjectIdEnum
{
白鹤滩换流站
(
"白鹤滩换流站"
,
"d2528788-b8d5-4170-ae62-edf153fddc59"
),
锦屏换流站
(
"锦屏换流站"
,
"edf153fddc59"
);
String
amosOrgName
;
String
projectId
;
ModeNameProjectIdEnum
(
String
amosOrgName
,
String
projectId
)
{
this
.
amosOrgName
=
amosOrgName
;
this
.
projectId
=
projectId
;
}
public
String
getAmosOrgName
()
{
return
amosOrgName
;
}
public
void
setAmosOrgName
(
String
amosOrgName
)
{
this
.
amosOrgName
=
amosOrgName
;
}
public
String
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
String
projectId
)
{
this
.
projectId
=
projectId
;
}
public
static
Map
<
String
,
String
>
map
=
new
HashMap
<>();
public
static
String
getStateValue
(
String
modelName
){
return
map
.
get
(
modelName
);
}
static
{
for
(
ModeNameProjectIdEnum
ModeNameProjectIdEnum:
ModeNameProjectIdEnum
.
values
()){
map
.
put
(
ModeNameProjectIdEnum
.
getAmosOrgName
(),
ModeNameProjectIdEnum
.
getProjectId
());
}
}
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/enums/ModelNameEnum.java
0 → 100644
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
enums
;
import
java.util.HashMap
;
import
java.util.Map
;
public
enum
ModelNameEnum
{
amosOrgCode1
(
"50*110"
,
"白鹤滩换流站"
),
amosOrgCode2
(
"50*111"
,
"锦屏换流站"
);
String
amosOrgCode
;
String
amosOrgName
;
ModelNameEnum
(
String
amosOrgCode
,
String
amosOrgName
)
{
this
.
amosOrgCode
=
amosOrgCode
;
this
.
amosOrgName
=
amosOrgName
;
}
public
String
getAmosOrgCode
()
{
return
amosOrgCode
;
}
public
void
setAmosOrgCode
(
String
amosOrgCode
)
{
this
.
amosOrgCode
=
amosOrgCode
;
}
public
String
getAmosOrgName
()
{
return
amosOrgName
;
}
public
void
setAmosOrgName
(
String
amosOrgName
)
{
this
.
amosOrgName
=
amosOrgName
;
}
public
static
Map
<
String
,
String
>
map
=
new
HashMap
<>();
static
{
for
(
ModelNameEnum
ModelNameEnum
:
ModelNameEnum
.
values
()){
map
.
put
(
ModelNameEnum
.
getAmosOrgCode
(),
ModelNameEnum
.
getAmosOrgName
());
}
}
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/feign/IdxFeignService.java
View file @
b2fd9ae7
...
...
@@ -39,4 +39,9 @@ public interface IdxFeignService {
@RequestMapping
(
value
=
"/dimensionTable/treeView"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
JSONObject
>
getDimensionTable
(
@RequestParam
(
"id"
)
String
id
);
@RequestMapping
(
value
=
"/v1/subject-tree"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
>
dataTree
();
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/feign/PrivilegeFeignService.java
0 → 100644
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
feign
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
@FeignClient
(
value
=
"AMOS-API-PRIVILEGE"
,
path
=
"privilege"
)
public
interface
PrivilegeFeignService
{
@RequestMapping
(
value
=
"/v1/company/tree"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
>
getCompanyName
();
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/feign/UruleFeignService.java
0 → 100644
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
feign
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
@FeignClient
(
value
=
"AMOS-API-RULE"
,
path
=
"urule"
)
public
interface
UruleFeignService
{
@RequestMapping
(
value
=
"/v1/packageeditor/loadPackages"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
>
getRule
(
@RequestParam
(
"project"
)
String
project
);
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/mapper/CheckModelMapper.java
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
mapper
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -7,6 +8,9 @@ import com.yeejoin.amos.boot.module.tdc.api.dto.CheckModelDto;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel
;
import
org.mapstruct.Mapper
;
import
java.util.List
;
import
java.util.Map
;
/**
* Mapper接口
* @author xxz
...
...
@@ -15,4 +19,9 @@ import org.mapstruct.Mapper;
public
interface
CheckModelMapper
extends
BaseMapper
<
CheckModel
>
{
IPage
<
CheckModelDto
>
selectByOrgCode
(
Page
page
,
String
amosOrgCode
);
String
saveModel
(
JSONObject
jsonObject
);
Boolean
modifyModel
(
JSONObject
jsonObject
);
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/service/CheckModelService.java
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
service
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckModelDto
;
...
...
@@ -55,5 +57,17 @@ public interface CheckModelService extends IService<CheckModel> {
String
getOrgCode
(
String
companyName
);
JSONArray
getDataTree
();
List
<
Object
>
getRule
(
String
project
);
List
<
Object
>
getCompanyName
();
String
saveModel
(
JSONObject
jsonObject
);
Boolean
modifyModel
(
JSONObject
jsonObject
);
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/service/CheckResultService.java
View file @
b2fd9ae7
...
...
@@ -20,7 +20,7 @@ public interface CheckResultService extends IService<CheckResult> {
List
<
CheckResult
>
selectCheckResult
(
String
batchNo
);
Map
<
String
,
Object
>
selectTotal
(
String
batchNo
);
Map
<
String
,
Object
>
selectTotal
(
String
batchNo
);
List
<
CheckResultDto
>
selectStatistion
(
String
batchNo
,
String
amosOrgCode
);
...
...
@@ -57,4 +57,5 @@ public interface CheckResultService extends IService<CheckResult> {
Integer
selectItemNo
(
String
batchNo
,
Long
modelId
);
List
<
DimensionTableDto
>
getDimensionTable
(
String
id
);
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/vo/SubjectTreeVo.java
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
vo
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.ModelTreeDto
;
import
lombok.Data
;
import
java.util.List
;
...
...
@@ -20,6 +21,24 @@ public class SubjectTreeVo {
private
String
key
;
private
String
columns
;
private
String
id
;
private
String
name
;
private
String
project
;
private
String
createDate
;
private
String
path
;
private
String
packageId
;
private
String
version
;
private
List
<
SubjectTreeVo
>
tables
;
private
List
<
TableColumnsVo
>
tableCols
;
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/resources/mapper/CheckModelMapper.xml
View file @
b2fd9ae7
...
...
@@ -5,10 +5,16 @@
<select
id=
"selectByOrgCode"
resultType=
"com.yeejoin.amos.boot.module.tdc.api.dto.CheckModelDto"
>
select `*`,'●' as circle from tdc_model
<where>
<if
test =
"amosOrgCode != null and amosOrgCode != ''"
>
<if
test =
"amosOrgCode != null and amosOrgCode != ''
and amosOrgCode != 50
"
>
and amos_org_code=#{amosOrgCode}
</if>
</where>
</select>
<update
id=
"modifyModel"
>
update tdc_model set model_name=#{model_name},amos_org_code=#{amos_org_code},idx_table_name=#{idx_table_name},
model_rule=#{modelRule} where sequence_nbr=#{sequenceNbr}
</update>
</mapper>
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/config/WebSecurityConfig.java
0 → 100644
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
biz
.
config
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
@Configuration
@EnableWebSecurity
public
class
WebSecurityConfig
extends
WebSecurityConfigurerAdapter
{
// 授权
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
csrf
().
disable
()
.
headers
()
.
frameOptions
()
.
disable
()
.
and
()
.
authorizeRequests
()
.
regexMatchers
(
"^(?!/actuator).*$"
).
permitAll
()
.
regexMatchers
(
"/actuator/health"
).
permitAll
()
.
regexMatchers
(
"/actuator/info"
).
permitAll
()
.
anyRequest
().
authenticated
().
and
()
.
formLogin
();
}
}
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/controller/CheckModelController.java
View file @
b2fd9ae7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckModelDto
;
...
...
@@ -14,8 +16,10 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
sun.reflect.generics.tree.VoidDescriptor
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author xxz
...
...
@@ -44,6 +48,17 @@ public class CheckModelController extends BaseController {
* return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"selectBySequenceNbr"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据amosOrgCode查询模型列表"
,
notes
=
"根据amosOrgCode查询模型列表"
)
public
ResponseModel
<
CheckModel
>
selectBySequenceNbr
(
String
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
checkModelService
.
getById
(
sequenceNbr
));
}
/**
* 根据amosOrgCode查询
* return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"selectOneByDate"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据code查询最后一次校验模型"
,
notes
=
"查询code最后一次校验模型"
)
public
ResponseModel
<
CheckModel
>
selectOneByDate
(
String
amosOrgCode
)
{
...
...
@@ -76,7 +91,46 @@ public class CheckModelController extends BaseController {
@GetMapping
(
value
=
"/companyTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"下拉框选项"
,
notes
=
"下拉框选项"
)
public
ResponseModel
<
String
>
getOrgCode
(
String
companyName
){
return
ResponseHelper
.
buildResponse
(
checkModelService
.
getOrgCode
(
companyName
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getDataTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"关联表单"
,
notes
=
"关联表单"
)
public
ResponseModel
<
JSONArray
>
getDataTree
()
{
return
ResponseHelper
.
buildResponse
(
checkModelService
.
getDataTree
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getRule"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"关联规则"
,
notes
=
"关联规则"
)
public
ResponseModel
<
List
<
Object
>>
getRule
(
String
project
)
{
return
ResponseHelper
.
buildResponse
(
checkModelService
.
getRule
(
project
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getCompanyName"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"所属机构"
,
notes
=
"所属机构"
)
public
ResponseModel
<
List
<
Object
>>
getCompanyName
()
{
return
ResponseHelper
.
buildResponse
(
checkModelService
.
getCompanyName
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/saveModel"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"存模型表"
,
notes
=
"存模型表"
)
public
ResponseModel
<
String
>
saveModel
(
@RequestBody
JSONObject
jsonObject
){
return
ResponseHelper
.
buildResponse
(
checkModelService
.
saveModel
(
jsonObject
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/modifyModel"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据sequenceNbr修改模型校验表单"
,
notes
=
"根据sequenceNbr修改模型校验表单"
)
public
ResponseModel
<
Boolean
>
modifyModel
(
@RequestBody
JSONObject
jsonObject
)
{
// checkModelService.updateById(checkModel);
return
ResponseHelper
.
buildResponse
(
checkModelService
.
modifyModel
(
jsonObject
));
}
}
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/controller/CheckResultController.java
View file @
b2fd9ae7
...
...
@@ -47,22 +47,26 @@ public class CheckResultController extends BaseController {
}
/**
* 根据
amosOrgCode、modelId
查询不合格项
* 根据
batchNo
查询不合格项
* return
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectCheckResult"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
查询最后一次校验模型"
,
notes
=
"查询最后一次校验模型
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
根据batchNo查询不合格项"
,
notes
=
"根据batchNo查询不合格项
"
)
public
ResponseModel
<
List
<
CheckResult
>>
selectCheckResult
(
String
batchNo
)
{
return
ResponseHelper
.
buildResponse
(
checkResultService
.
selectCheckResult
(
batchNo
));
}
/**
* 根据batchNo统计校验项和不合格项
* return
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectTotal"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
result"
,
notes
=
"result
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
根据batchNo统计校验项和不合格项"
,
notes
=
"根据batchNo统计校验项和不合格项
"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
selectTotal
(
String
batchNo
)
{
return
ResponseHelper
.
buildResponse
(
checkResultService
.
selectTotal
(
batchNo
));
}
...
...
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/service/impl/CheckModelImpl.java
View file @
b2fd9ae7
...
...
@@ -2,15 +2,22 @@ package com.yeejoin.amos.boot.module.tdc.biz.service.impl;
import
com.alibaba.excel.util.CollectionUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckModelDto
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult
;
import
com.yeejoin.amos.boot.module.tdc.api.enums.ModeNameProjectIdEnum
;
import
com.yeejoin.amos.boot.module.tdc.api.enums.ModelNameEnum
;
import
com.yeejoin.amos.boot.module.tdc.api.feign.IdxFeignService
;
import
com.yeejoin.amos.boot.module.tdc.api.feign.PrivilegeFeignService
;
import
com.yeejoin.amos.boot.module.tdc.api.feign.UruleFeignService
;
import
com.yeejoin.amos.boot.module.tdc.api.mapper.CheckModelMapper
;
import
com.yeejoin.amos.boot.module.tdc.api.mapper.CheckResultMapper
;
import
com.yeejoin.amos.boot.module.tdc.api.service.CheckModelService
;
...
...
@@ -47,8 +54,18 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
IdxFeignService
idxFeignService
;
@Autowired
UruleFeignService
uruleFeignService
;
@Autowired
CheckModelService
checkModelService
;
@Autowired
PrivilegeFeignService
privilegeFeignService
;
@Autowired
RuleTrigger
ruleTrigger
;
@Override
public
IPage
<
CheckModelDto
>
selectByOrgCode
(
int
current
,
int
size
,
String
amosOrgCode
)
{
Page
page
=
new
Page
(
current
,
size
);
...
...
@@ -81,6 +98,8 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
}
@Override
public
void
checkAllMode
(
String
amosOrgCode
,
AgencyUserModel
userInfo
)
{
String
userName
=
userInfo
.
getUserName
();
...
...
@@ -108,6 +127,7 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
}
}
@Override
public
CheckModel
selectCheckModelByNameCode
(
String
modelName
,
String
amosOrgCode
)
{
LambdaQueryWrapper
<
CheckModel
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -164,7 +184,174 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
Iterator
<
CompanyModel
>
iterator
=
companyModelCollection
.
iterator
();
CompanyModel
companyModel
=
iterator
.
next
();
return
companyModel
.
getOrgCode
();
}
@Override
public
JSONArray
getDataTree
()
{
ResponseModel
<
List
>
listResponseModel
=
idxFeignService
.
dataTree
();
List
result
=
listResponseModel
.
getResult
();
JSONArray
jsonArray
=
new
JSONArray
();
for
(
Object
object:
result
){
jsonArray
=
JSONArray
.
parseArray
(
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
object
)).
getString
(
"tables"
));
}
JSONArray
jsonArray1
=
new
JSONArray
();
for
(
Object
object:
jsonArray
){
JSONObject
ob
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
object
));
String
tableId
=
ob
.
getString
(
"tableId"
);
String
tableName
=
ob
.
getString
(
"tableName"
);
String
url
=
tableId
+
"$"
+
tableName
;
ob
.
put
(
"url"
,
url
);
jsonArray1
.
add
(
ob
);
}
return
jsonArray1
;
}
@Override
public
List
<
Object
>
getRule
(
String
project
)
{
List
result
=
uruleFeignService
.
getRule
(
project
).
getResult
();
List
<
Object
>
objectList
=
new
ArrayList
<>();
for
(
Object
object:
result
){
JSONArray
array
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
object
)).
getJSONArray
(
"resourceItems"
);
for
(
Object
object1:
array
){
objectList
.
add
(
object1
);
}
}
return
objectList
;
}
@Override
public
List
<
Object
>
getCompanyName
()
{
List
result
=
privilegeFeignService
.
getCompanyName
().
getResult
();
List
<
Object
>
objectList
=
new
ArrayList
<>();
for
(
Object
object:
result
){
JSONArray
array
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
object
)).
getJSONArray
(
"children"
);
for
(
Object
object1:
array
){
// JSONObject ob = JSONObject.parseObject(JSON.toJSONString(object1));
// String companyName = ob.getString("companyName");
// String orgCode = ob.getString("orgCode");
// String text = orgCode + "$" + companyName;
// ob.put("text",text);
objectList
.
add
(
object1
);
}
}
return
objectList
;
}
@Override
public
String
saveModel
(
JSONObject
jsonObject
){
List
<
CheckModel
>
checkModelList
=
new
ArrayList
<>();
String
modelName
=
jsonObject
.
getString
(
"model_name"
);
// String text = jsonObject.getString("text");
// 截取$之前的所有字符串
// String amosOrgCode = text.substring(0,text.indexOf("$"));
// 截取$之后的所有字符串
// String amosOrgName = text.substring(text.indexOf("$")+1);
String
url
=
jsonObject
.
getString
(
"idx_table_name"
);
// 截取$之前的所有字符串
String
tableId
=
url
.
substring
(
0
,
url
.
indexOf
(
"$"
));
// 截取$之后的所有字符串
String
idxTableName
=
url
.
substring
(
url
.
indexOf
(
"$"
)+
1
);
JSONArray
modelPictureUrl
=
jsonObject
.
getJSONArray
(
"model_picture_url"
);
String
pictureUrl
=
""
;
if
(!
ValidationUtil
.
isEmpty
(
modelPictureUrl
)){
for
(
Object
o
:
modelPictureUrl
)
{
JSONObject
jo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
pictureUrl
=
jo
.
getString
(
"url"
);
break
;
}
}
String
modelRule
=
jsonObject
.
getString
(
"model_rule"
);
if
(!
ValidationUtil
.
isEmpty
(
modelRule
)){
modelRule
=
modelRule
.
substring
(
modelRule
.
indexOf
(
"/"
),
modelRule
.
indexOf
(
"."
));
}
JSONArray
modelFile
=
jsonObject
.
getJSONArray
(
"model_file"
);
String
fileUrl
=
""
;
Iterator
iterator
=
modelFile
.
iterator
();
if
(
iterator
.
hasNext
()){
Object
o
=
iterator
.
next
();
JSONObject
jo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
fileUrl
=
fileUrl
+
jo
.
getString
(
"url"
);
if
(
iterator
.
hasNext
()){
fileUrl
=
fileUrl
+
","
;
}
}
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"amos_org_code"
);
for
(
Object
o:
jsonArray
){
CheckModel
checkModel
=
new
CheckModel
();
checkModel
.
setAmosOrgName
(
ModelNameEnum
.
map
.
get
(
String
.
valueOf
(
o
)));
// checkModel.setAmosOrgCode(amosOrgCode);
// checkModel.setAmosOrgName(amosOrgName);
checkModel
.
setProjectId
(
ModeNameProjectIdEnum
.
map
.
get
(
ModelNameEnum
.
map
.
get
(
String
.
valueOf
(
o
))));
checkModel
.
setModelName
(
modelName
);
checkModel
.
setIdxTableName
(
idxTableName
);
checkModel
.
setModelPictureUrl
(
pictureUrl
);
checkModel
.
setModelRule
(
modelRule
);
checkModel
.
setTableId
(
tableId
);
checkModel
.
setModelFile
(
fileUrl
);
checkModel
.
setAmosOrgCode
(
String
.
valueOf
(
o
));
checkModelList
.
add
(
checkModel
);
}
checkModelService
.
saveBatch
(
checkModelList
);
// .saveBatch(checkModelList);
return
null
;
}
@Override
public
Boolean
modifyModel
(
JSONObject
jsonObject
){
String
modelName
=
jsonObject
.
getString
(
"model_name"
);
String
url
=
jsonObject
.
getString
(
"idx_table_name"
);
String
tableId
=
url
.
substring
(
0
,
url
.
indexOf
(
"$"
));
// 截取$之后的所有字符串
String
idxTableName
=
url
.
substring
(
url
.
indexOf
(
"$"
)+
1
);
String
modelPictureUrl
=
jsonObject
.
getString
(
"model_picture_url"
);
String
modelRule
=
jsonObject
.
getString
(
"model_rule"
);
if
(!
ValidationUtil
.
isEmpty
(
modelRule
)){
modelRule
=
modelRule
.
substring
(
modelRule
.
indexOf
(
"/"
),
modelRule
.
indexOf
(
"."
));
}
String
modelFile
=
jsonObject
.
getString
(
"model_file"
);
String
amosOrgCode
=
jsonObject
.
getString
(
"amos_org_code"
);
CheckModel
checkModel
=
this
.
getById
(
jsonObject
.
getString
(
"sequenceNbr"
));
checkModel
.
setAmosOrgCode
(
amosOrgCode
);
checkModel
.
setModelName
(
modelName
);
checkModel
.
setIdxTableName
(
idxTableName
);
checkModel
.
setModelPictureUrl
(
modelPictureUrl
);
checkModel
.
setModelRule
(
modelRule
);
checkModel
.
setModelFile
(
modelFile
);
checkModel
.
setTableId
(
tableId
);
checkModel
.
setAmosOrgName
(
ModelNameEnum
.
map
.
get
(
amosOrgCode
));
checkModel
.
setProjectId
(
ModeNameProjectIdEnum
.
map
.
get
(
ModelNameEnum
.
map
.
get
(
amosOrgCode
)));
checkModelService
.
updateById
(
checkModel
);
return
null
;
// checkModelMapper.modifyModel(jsonObject);
}
}
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/service/impl/CheckResultImpl.java
View file @
b2fd9ae7
...
...
@@ -70,10 +70,8 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
public
IPage
<
CheckResultDto
>
selectResult
(
int
current
,
int
size
,
String
code
)
{
Page
page
=
new
Page
(
current
,
size
);
return
checkResultMapper
.
selectResult
(
page
,
code
);
}
@Override
public
List
<
CheckResult
>
selectCheckResult
(
String
batchNo
)
{
LambdaQueryWrapper
<
CheckResult
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -83,11 +81,14 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
return
baseMapper
.
selectList
(
wrapper
);
}
//统计不合格项和校验项接口
@Override
public
Map
<
String
,
Object
>
selectTotal
(
String
batchNo
)
{
return
checkResultMapper
.
selectTotal
(
batchNo
);
}
@Override
public
List
<
CheckResultDto
>
selectStatistion
(
String
batchNo
,
String
amosOrgCode
)
{
return
checkResultMapper
.
selectStatistion
(
batchNo
,
amosOrgCode
);
...
...
@@ -105,10 +106,12 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
LambdaQueryWrapper
<
CheckModel
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
CheckModel:
:
getAmosOrgCode
,
amosOrgCode
);
List
<
CheckModel
>
checkModels
=
checkModelMapper
.
selectList
(
wrapper
);
checkModels
.
forEach
(
checkModel
->
{
ModelTreeDto
modelTreeDto
=
selectDataTree
(
String
.
valueOf
(
checkModel
.
getSequenceNbr
()));
modelTreeDtoList
.
add
(
modelTreeDto
);
});
// ResponseModel<List<JSONObject>> listResponseModel = idxFeignService.subjectTree("d2528788-b8d5-4170-ae62-edf153fddc59");
// List<JSONObject> result = listResponseModel.getResult();
// result.forEach(obj ->{
...
...
@@ -123,6 +126,8 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
return
modelTreeDtoList
;
}
private
ModelTreeDto
selectDataTree
(
String
modelId
)
{
ModelTreeDto
modelTreeDto
=
new
ModelTreeDto
();
LambdaQueryWrapper
<
CheckModel
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -159,6 +164,7 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
return
modelTreeDto
;
}
@Override
public
List
<
ModelTreeDto
>
getModelDataTree
(
String
modelId
)
{
List
<
ModelTreeDto
>
modelTreeDtoList
=
new
ArrayList
<>();
...
...
@@ -281,7 +287,6 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
filepdf
.
delete
();
}
}
return
pdfUrlString
;
}
...
...
@@ -317,7 +322,6 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
checkReport
.
setName
(
name
.
concat
(
""
+
"三维校验"
));
checkReport
.
setCheckPeopleName
(
userName
);
checkReportService
.
save
(
checkReport
);
return
null
;
}
...
...
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/resources/application.properties
View file @
b2fd9ae7
...
...
@@ -38,8 +38,14 @@ spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
## redis失效时间
redis.cache.failure.time
=
10800
#校验完成发送消息
mqtt.topic.check.complete
=
/tdc/check/complete
pom.xml
View file @
b2fd9ae7
...
...
@@ -27,7 +27,7 @@
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<tyboot-version>
1.1.23-SNAPSHOT
</tyboot-version>
<amos.version>
1.7.1
0
-SNAPSHOT
</amos.version>
<amos.version>
1.7.1
3
-SNAPSHOT
</amos.version>
<rule.version>
1.7.9-SNAPSHOT
</rule.version>
<itext.version>
7.1.1
</itext.version>
<elasticsearch.version>
7.15.2
</elasticsearch.version>
...
...
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