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
3da3c3df
Commit
3da3c3df
authored
Aug 10, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
f4eb2dd1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
148 additions
and
8 deletions
+148
-8
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+4
-0
IOrgUsrService.java
...n/amos/boot/module/common/api/service/IOrgUsrService.java
+4
-0
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+110
-5
OrgPersonController.java
...oot/module/common/biz/controller/OrgPersonController.java
+14
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+16
-3
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/OrgUsrMapper.java
View file @
3da3c3df
...
...
@@ -36,6 +36,10 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List
<
OrgUsr
>
selectCompanyDepartmentMsg
();
List
<
Map
<
String
,
Object
>>
selectStaticFire
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
selectStaticYw
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
selectPersonAllList
(
Map
<
String
,
Object
>
map
);
List
<
OrgUsr
>
queryOrgUsrListByBizOrgCode
(
String
bizOrgCode
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IOrgUsrService.java
View file @
3da3c3df
...
...
@@ -115,6 +115,10 @@ public interface IOrgUsrService {
void
updateDynamicFormInstance
(
Long
instanceId
,
List
<
DynamicFormInstance
>
fromValueList
)
throws
Exception
;
/**
* @throws Exception
*/
List
<
Map
<
String
,
Object
>>
selectStatic
(
String
bizOrgCode
,
String
type
);
/**
* @param id
* @throws Exception
*/
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
3da3c3df
...
...
@@ -42,6 +42,7 @@
max(case v.field_code when 'administrativePositionCode' then IFNULL(v.field_value_label,v.field_value) end) administrativePositionCode,
max(case v.field_code when 'internalPositionCode' then IFNULL(v.field_value_label,v.field_value) end) internalPositionCode,
max(case v.field_code when 'fireManagementPostCode' then IFNULL(v.field_value_label,v.field_value) end) fireManagementPostCode,
max(case v.field_code when 'fireManagementPostCode' then v.field_value end) fireManagementPost,
max(case v.field_code when 'positionType' then IFNULL(v.field_value,v.field_value_label) end) positionType,
max(case v.field_code when 'certificateType' then IFNULL(v.field_value_label,v.field_value) end) certificateType,
max(case v.field_code when 'holdingTime' then IFNULL(v.field_value_label,v.field_value) end) holdingTime,
...
...
@@ -84,6 +85,12 @@
<if
test=
"map.peopleType != null and map.peopleType != ''"
>
AND g.peopleType = #{map.peopleType}
</if>
<if
test=
"map.fireManagementPost != null"
>
AND g.fireManagementPost IN
<foreach
item=
"item"
index=
"index"
collection=
"map.fireManagementPost"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
...
...
@@ -130,7 +137,9 @@
max(case v.field_code when 'internalPositionCode' then IFNULL(v.field_value_label,v.field_value) end) internalPositionCode,
max(case v.field_code when 'fireManagementPostCode' then IFNULL(v.field_value_label,v.field_value) end) fireManagementPostCode,
max(case v.field_code when 'fireManagementPostCode' then v.field_value end) fireManagementPost,
max(case v.field_code when 'fireManagementPostCode' then IFNULL(v.field_value_label,'其他') end) fireManagementPostName,
max(case v.field_code when 'positionType' then IFNULL(v.field_value,v.field_value_label) end) positionType,
max(case v.field_code when 'positionType' then IFNULL(v.field_value_label,'其他') end) positionTypeName,
max(case v.field_code when 'certificateType' then IFNULL(v.field_value_label,v.field_value) end) certificateType,
max(case v.field_code when 'holdingTime' then IFNULL(v.field_value_label,v.field_value) end) holdingTime,
max(case v.field_code when 'auditCycle' then IFNULL(v.field_value_label,v.field_value) end) auditCycle,
...
...
@@ -170,12 +179,9 @@
AND FIND_IN_SET(#{map.positionType},g.positionType)
</if>
<if
test=
"map.peopleType != null and map.peopleType != ''"
>
AND g.peopleType IN
<foreach
item=
"item"
index=
"index"
collection=
"map.peopleType"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
AND g.peopleType = #{map.peopleType}
</if>
<if
test=
"map.fireManagementPost != null
and map.fireManagementPost != ''
"
>
<if
test=
"map.fireManagementPost != null"
>
AND g.fireManagementPost IN
<foreach
item=
"item"
index=
"index"
collection=
"map.fireManagementPost"
open=
"("
separator=
","
close=
")"
>
#{item}
...
...
@@ -1307,5 +1313,104 @@ LEFT JOIN (
)a where a.sequenceNbr is not null
LIMIT #{map.pageNum}, #{map.pageSize}
</select>
<select
id=
"selectStaticFire"
resultType=
"java.util.Map"
>
SELECT ( count( postName )/( SELECT count(*) AS count FROM cb_org_usr a WHERE is_delete = 0 AND biz_org_type = 'PERSON'
AND biz_org_code like concat(#{bizOrgCode}, '%')
))* 100 AS percent, postName
FROM
(
SELECT
a.*,
IFNULL( b.NAME, '其他' ) AS postName
FROM
(
SELECT DISTINCT
u.sequence_nbr sequenceNbr,
g.*
FROM
cb_org_usr u
LEFT JOIN (
SELECT
v.`instance_id`,
max( CASE v.field_code WHEN 'fireManagementPostCode' THEN IFNULL( v.field_value_label, v.field_value ) END ) fireManagementPostCode,
max( CASE v.field_code WHEN 'fireManagementPostCode' THEN v.field_value END ) fireManagementPost,
max( CASE v.field_code WHEN 'fireManagementPostCode' THEN v.field_value_label END ) fireManagementPostName,
max( CASE v.field_code WHEN 'positionType' THEN IFNULL( v.field_value, v.field_value_label ) END ) positionType,
max( CASE v.field_code WHEN 'positionType' THEN v.field_value_label END ) positionTypeName,
max( CASE v.field_code WHEN 'peopleType' THEN v.field_value END ) peopleType
FROM
`cb_dynamic_form_instance` v
WHERE
v.group_code = 246
GROUP BY
v.`instance_id`
) g ON u.sequence_nbr = g.instance_id
WHERE
u.biz_org_type = 'person'
AND g.peopleType = '1601'
AND u.is_delete = 0
AND u.biz_org_code like concat(#{bizOrgCode}, '%')
GROUP BY
u.sequence_nbr,
u.biz_org_name,
u.biz_org_code
ORDER BY
u.rec_date DESC
) a
LEFT JOIN ( SELECT * FROM cb_data_dictionary WHERE type = 'XFGLGW' ) b ON LOCATE( b.CODE, a.fireManagementPost ) != 0
WHERE
a.sequenceNbr IS NOT NULL
) a
GROUP BY
postName
</select>
<select
id=
"selectStaticYw"
resultType=
"java.util.Map"
>
SELECT ( count( postName )/( SELECT count(*) AS count FROM cb_org_usr a WHERE is_delete = 0 AND biz_org_type = 'PERSON'
AND biz_org_code like concat(#{bizOrgCode}, '%')
))* 100 AS percent, postName
FROM
(
SELECT
a.*,
IFNULL( b.NAME, '其他' ) AS postName
FROM
(
SELECT DISTINCT
u.sequence_nbr sequenceNbr,
g.*
FROM
cb_org_usr u
LEFT JOIN (
SELECT
v.`instance_id`,
max( CASE v.field_code WHEN 'positionType' THEN v.field_value END ) positionType,
max( CASE v.field_code WHEN 'positionType' THEN v.field_value_label END ) positionTypeName,
max( CASE v.field_code WHEN 'peopleType' THEN v.field_value END ) peopleType
FROM
`cb_dynamic_form_instance` v
WHERE
v.group_code = 246
GROUP BY
v.`instance_id`
) g ON u.sequence_nbr = g.instance_id
WHERE
u.biz_org_type = 'PERSON'
AND g.peopleType = '1602'
AND u.biz_org_code like concat(#{bizOrgCode}, '%')
AND u.is_delete = 0
GROUP BY
u.sequence_nbr,
u.biz_org_name,
u.biz_org_code
ORDER BY
u.rec_date DESC
) a
LEFT JOIN ( SELECT * FROM cb_data_dictionary WHERE type = 'GWMC' ) b ON LOCATE( b.CODE, a.positionType ) != 0
WHERE
a.sequenceNbr IS NOT NULL
) a
GROUP BY
postName
</select>
</mapper>
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 @
3da3c3df
...
...
@@ -179,6 +179,20 @@ public class OrgPersonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 消防资源监管,驻站消防员,运维人员环状态图统计接口
*
* @param bizOrgCode type
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getStaticByFire"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防资源监管,驻站消防员,运维人员环状态图统计接口"
,
notes
=
"消防资源监管,驻站消防员,运维人员环状态图统计接口"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectStatic
(
String
bizOrgCode
,
String
type
)
throws
Exception
{
List
<
Map
<
String
,
Object
>>
result
=
iOrgUsrService
.
selectStatic
(
bizOrgCode
,
type
);
return
ResponseHelper
.
buildResponse
(
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/OrgUsrServiceImpl.java
View file @
3da3c3df
...
...
@@ -600,10 +600,12 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
map
.
put
(
"positionType"
,
positionType
);
}
String
fireManagementPost
=
""
;
List
<
String
>
fireManagementPost
;
if
(
req
.
containsKey
(
"fireManagementPost"
))
{
fireManagementPost
=
req
.
get
(
"fireManagementPost"
).
toString
();
map
.
put
(
"fireManagementPost"
,
fireManagementPost
);
if
(
StringUtils
.
isNotEmpty
(
req
.
get
(
"fireManagementPost"
).
toString
()))
{
fireManagementPost
=
Arrays
.
asList
(
req
.
get
(
"fireManagementPost"
).
toString
().
split
(
","
));
map
.
put
(
"fireManagementPost"
,
fireManagementPost
);
}
}
String
peopleType
=
""
;
...
...
@@ -915,6 +917,17 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
@Override
public
List
<
Map
<
String
,
Object
>>
selectStatic
(
String
bizOrgCode
,
String
type
)
{
List
<
Map
<
String
,
Object
>>
listMap
;
if
(
"1601"
.
equals
(
type
))
{
listMap
=
this
.
baseMapper
.
selectStaticFire
(
bizOrgCode
);
}
else
{
listMap
=
this
.
baseMapper
.
selectStaticYw
(
bizOrgCode
);
}
return
listMap
;
}
@Override
public
Map
<
String
,
Object
>
selectForShowById
(
OrgUsr
orgUsr
,
Long
id
)
throws
Exception
{
QueryWrapper
<
DynamicFormColumn
>
queryWrapper
=
new
QueryWrapper
<
DynamicFormColumn
>();
queryWrapper
.
eq
(
"group_code"
,
OrgPersonEnum
.
人员
.
getCode
());
...
...
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