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
ac0b0a6f
Commit
ac0b0a6f
authored
Dec 16, 2022
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改显隐规则
parent
388affa8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
11 deletions
+64
-11
ESAlertCalledService.java
...oot/module/tzs/biz/service/impl/ESAlertCalledService.java
+1
-1
ProjectDto.java
.../com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
+4
-0
ProjectMapper.xml
...odule-ugp-api/src/main/resources/mapper/ProjectMapper.xml
+14
-8
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+45
-2
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/ESAlertCalledService.java
View file @
ac0b0a6f
...
@@ -196,7 +196,7 @@ public class ESAlertCalledService {
...
@@ -196,7 +196,7 @@ public class ESAlertCalledService {
tempQb
.
must
(
tempQb1
);
tempQb
.
must
(
tempQb1
);
boolMust
.
should
(
tempQb
);
boolMust
.
should
(
tempQb
);
}
}
// 使用单位名称一致;&& ②警情类别一致;&& ③
报警时间:距离当前时间不超过两小时的
// 使用单位名称一致;&& ②警情类别一致;&& ③
完成状态:未完成
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUseUnit
())
&&
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getAlarmTypeCode
())
)
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUseUnit
())
&&
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getAlarmTypeCode
())
)
{
flag
=
false
;
flag
=
false
;
BoolQueryBuilder
qb0
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
qb0
=
QueryBuilders
.
boolQuery
();
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
View file @
ac0b0a6f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
...
@@ -126,4 +127,7 @@ public class ProjectDto extends BaseDto {
...
@@ -126,4 +127,7 @@ public class ProjectDto extends BaseDto {
*/
*/
@TableField
(
"latitude"
)
@TableField
(
"latitude"
)
private
String
latitude
;
private
String
latitude
;
private
String
userId
;
private
String
context
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectMapper.xml
View file @
ac0b0a6f
...
@@ -19,33 +19,39 @@
...
@@ -19,33 +19,39 @@
</select>
</select>
<select
id=
"queryProjectPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto"
>
<select
id=
"queryProjectPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto"
>
select * from tz_ugp_project
select
pt.*,
pg.context AS context
from tz_ugp_project pt
left join
tz_ugp_project_initiation_log pg
on pt.instance_id=pg.instance_id
<where>
<where>
<if
test=
"roleName == '建设单位'"
>
<if
test=
"roleName == '建设单位'"
>
and construction_unit_id = #{companyId}
and
pt.
construction_unit_id = #{companyId}
</if>
</if>
<if
test=
"roleName == '安装单位'"
>
<if
test=
"roleName == '安装单位'"
>
and installation_unit_id = #{companyId}
and
pt.
installation_unit_id = #{companyId}
</if>
</if>
<if
test=
"roleName == '设计单位'"
>
<if
test=
"roleName == '设计单位'"
>
and design_unit_id = #{companyId}
and
pt.
design_unit_id = #{companyId}
</if>
</if>
<if
test=
"codes != null and codes.size > 0"
>
<if
test=
"codes != null and codes.size > 0"
>
<if
test=
"roleName == '监察部门' or roleName == '监检机构'"
>
<if
test=
"roleName == '监察部门' or roleName == '监检机构'"
>
and install_region_code in
and
pt.
install_region_code in
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
</if>
</if>
<if
test=
"project.name != '' and project.name != null"
>
<if
test=
"project.name != '' and project.name != null"
>
and `name` like concat('%',#{project.name},'%')
and
pt.
`name` like concat('%',#{project.name},'%')
</if>
</if>
<if
test=
"project.constructionUnit != '' and project.constructionUnit != null"
>
<if
test=
"project.constructionUnit != '' and project.constructionUnit != null"
>
and `construction_Unit` like concat('%',#{project.constructionUnit},'%')
and
pt.
`construction_Unit` like concat('%',#{project.constructionUnit},'%')
</if>
</if>
</where>
</where>
order by rec_date desc
order by
pt.
rec_date desc
</select>
</select>
<select
id=
"projectScheduleSuperviseName"
resultType=
"String"
>
<select
id=
"projectScheduleSuperviseName"
resultType=
"String"
>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
View file @
ac0b0a6f
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
...
@@ -19,6 +20,9 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper;
...
@@ -19,6 +20,9 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectService
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -351,11 +355,50 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -351,11 +355,50 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
List
<
ProjectDto
>
projects
=
page
.
getRecords
();
List
<
ProjectDto
>
projects
=
page
.
getRecords
();
for
(
ProjectDto
projectDto:
projects
){
for
(
ProjectDto
projectDto:
projects
){
getProjectState
(
projectDto
);
getProjectState
(
projectDto
);
}
}
List
<
ProjectDto
>
projectDtoList
=
getPage
(
projects
);
page
.
setRecords
(
projectDtoList
);
return
page
;
return
page
;
}
}
public
List
<
ProjectDto
>
getPage
(
List
<
ProjectDto
>
projects
){
ArrayList
<
ProjectDto
>
list
=
Lists
.
newArrayList
();
for
(
ProjectDto
projectDto:
projects
){
if
(
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
projectDto
.
getStatus
()))
{
if
(!
ValidationUtil
.
isEmpty
(
projectDto
.
getContext
())
&&
JSONObject
.
parseObject
(
projectDto
.
getContext
()).
containsKey
(
"insDepId"
))
{
String
insDepId
=
JSONObject
.
parseObject
(
projectDto
.
getContext
()).
getString
(
"insDepId"
);
if
(!
ValidationUtil
.
isEmpty
(
insDepId
))
{
Map
map
=
orgService
.
getdetialInfo
(
insDepId
);
String
fieldValue
=
(
String
)
map
.
get
(
"charge"
);
OrgUsr
orgUsr
=
orgService
.
getOrgUsrById
(
fieldValue
);
FeignClientResult
<
List
<
AgencyUserModel
>>
listFeignClientResult
=
Privilege
.
agencyUserClient
.
queryByRealName
(
orgUsr
.
getBizOrgName
());
List
<
AgencyUserModel
>
resultList
=
listFeignClientResult
.
getResult
();
for
(
AgencyUserModel
agencyUserModel
:
resultList
)
{
String
userId
=
agencyUserModel
.
getUserId
();
projectDto
.
setUserId
(
userId
);
}
}
}
list
.
add
(
projectDto
);
}
else
if
(!
ValidationUtil
.
isEmpty
(
projectDto
.
getContext
())
&&
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
projectDto
.
getStatus
()))
{
if
(
JSONObject
.
parseObject
(
projectDto
.
getContext
()).
containsKey
(
"insPerson"
))
{
String
insPerson
=
JSONObject
.
parseObject
(
projectDto
.
getContext
()).
getString
(
"insPerson"
);
if
(!
ValidationUtil
.
isEmpty
(
insPerson
))
{
FeignClientResult
<
List
<
AgencyUserModel
>>
listFeignClientResult
=
Privilege
.
agencyUserClient
.
queryByRealName
(
insPerson
);
List
<
AgencyUserModel
>
resultList
=
listFeignClientResult
.
getResult
();
for
(
AgencyUserModel
agencyUserModel
:
resultList
)
{
String
userId
=
agencyUserModel
.
getUserId
();
projectDto
.
setUserId
(
userId
);
}
}
}
list
.
add
(
projectDto
);
}
else
{
list
.
add
(
projectDto
);
}
}
return
list
;
}
@BusinessIdentify
@BusinessIdentify
public
List
<
Map
<
String
,
String
>>
projectSchedule
()
{
public
List
<
Map
<
String
,
String
>>
projectSchedule
()
{
List
<
Project
>
projectList
=
projectResourceService
.
getProjectList
();
List
<
Project
>
projectList
=
projectResourceService
.
getProjectList
();
...
...
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