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
ccb3c897
Commit
ccb3c897
authored
Nov 30, 2022
by
DESKTOP-BQLVS7A\admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化焊工弹窗统计接口(权限)
parent
d8ac863a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
17 deletions
+52
-17
WelderMapper.java
...yeejoin/amos/boot/module/ugp/api/mapper/WelderMapper.java
+4
-1
WelderMapper.xml
...module-ugp-api/src/main/resources/mapper/WelderMapper.xml
+8
-1
WelderController.java
...amos/boot/module/ugp/biz/controller/WelderController.java
+1
-1
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+10
-12
WelderServiceImpl.java
...s/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
+29
-2
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/WelderMapper.java
View file @
ccb3c897
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.context.annotation.Bean
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
public
interface
WelderMapper
extends
BaseMapper
{
public
interface
WelderMapper
extends
BaseMapper
{
List
<
Map
>
welderStatistics
(
String
bizOrg
Code
);
List
<
Map
>
welderStatistics
(
@Param
(
"personCode"
)
Set
<
String
>
person
Code
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/WelderMapper.xml
View file @
ccb3c897
...
@@ -8,7 +8,14 @@
...
@@ -8,7 +8,14 @@
FROM
FROM
cb_org_usr AS ou
cb_org_usr AS ou
LEFT JOIN cb_dynamic_form_instance AS fi ON ou.sequence_nbr = fi.instance_id and fi.field_code = "licensedProject"
LEFT JOIN cb_dynamic_form_instance AS fi ON ou.sequence_nbr = fi.instance_id and fi.field_code = "licensedProject"
WHERE ou.org_expand_attr1 = "WELDER" AND ou.biz_org_type="PERSON" AND ou.biz_org_code LIKE CONCAT("%",#{bizOrgCode},"%")
WHERE ou.org_expand_attr1 = "WELDER" AND ou.biz_org_type="PERSON"
<if
test=
"personCode!=null and personCode.size>0"
>
AND (
<foreach
collection=
"personCode"
index=
"index"
item=
"item"
close=
""
open=
""
separator=
"or"
>
ou.biz_org_code LIKE CONCAT("%",#{item},"%")
</foreach>
)
</if>
GROUP BY fi.field_value
GROUP BY fi.field_value
</select>
</select>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/WelderController.java
View file @
ccb3c897
...
@@ -258,7 +258,7 @@ public class WelderController extends BaseController {
...
@@ -258,7 +258,7 @@ public class WelderController extends BaseController {
* 焊工持证项目统计
* 焊工持证项目统计
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊工持证项目统计"
,
notes
=
"焊工持证项目统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊工持证项目统计"
,
notes
=
"焊工持证项目统计"
)
@GetMapping
(
value
=
"/welderStatistics"
)
@GetMapping
(
value
=
"/welderStatistics"
)
public
ResponseModel
<
List
<
Map
>>
welderStatistics
()
{
public
ResponseModel
<
List
<
Map
>>
welderStatistics
()
{
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
View file @
ccb3c897
...
@@ -250,15 +250,12 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
...
@@ -250,15 +250,12 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
//设备管理->信息统计
//设备管理->信息统计
@BusinessIdentify
@BusinessIdentify
public
List
<
Map
<
String
,
Long
>>
informationStatistics
()
{
public
List
<
Map
<
String
,
Long
>>
informationStatistics
()
{
// List<Map<String,Long>> D = new ArrayList<>();
Set
<
String
>
companyIds
=
new
HashSet
<>();
// Map<String,Long> w = new HashMap<>();
Set
<
String
>
strings
=
new
HashSet
<>();
Long
companySequenceNbr
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
Long
companySequenceNbr
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
if
(
companyMapper
.
selectById
(
companySequenceNbr
).
getType
().
equals
(
OrgEnum
.
安装单位
.
getKey
())){
String
companyKey
=
companyMapper
.
selectById
(
companySequenceNbr
).
getType
();
LambdaQueryWrapper
<
Equipment
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(
companyKey
.
equals
(
OrgEnum
.
安装单位
.
getKey
())){
wrapper
.
eq
(
Equipment:
:
getSequenceNbr
,
companySequenceNbr
);
companyIds
.
add
(
String
.
valueOf
(
companySequenceNbr
));
strings
.
add
(
String
.
valueOf
(
companySequenceNbr
));
}
else
if
(
companyKey
.
equals
(
OrgEnum
.
监检机构
.
getKey
()))
{
}
else
if
(
companyMapper
.
selectById
(
companySequenceNbr
).
getType
().
equals
(
OrgEnum
.
监检机构
.
getKey
()))
{
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companySequenceNbr
);
wrapper
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companySequenceNbr
);
List
<
SuperviseRule
>
inspectionLists
=
superviseRuleMapper
.
selectList
(
wrapper
);
List
<
SuperviseRule
>
inspectionLists
=
superviseRuleMapper
.
selectList
(
wrapper
);
...
@@ -267,11 +264,11 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
...
@@ -267,11 +264,11 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
wrapper1
.
eq
(
Company:
:
getRegionCode
,
inspectionList
.
getAdminRegionCode
());
wrapper1
.
eq
(
Company:
:
getRegionCode
,
inspectionList
.
getAdminRegionCode
());
List
<
Company
>
codeLists
=
companyMapper
.
selectList
(
wrapper1
);
List
<
Company
>
codeLists
=
companyMapper
.
selectList
(
wrapper1
);
for
(
Company
codeList
:
codeLists
){
for
(
Company
codeList
:
codeLists
){
string
s
.
add
(
String
.
valueOf
(
codeList
.
getSequenceNbr
()));
companyId
s
.
add
(
String
.
valueOf
(
codeList
.
getSequenceNbr
()));
}
}
}
}
}
else
if
(
company
Mapper
.
selectById
(
companySequenceNbr
).
getType
()
.
equals
(
OrgEnum
.
监察部门
.
getKey
()))
{
}
else
if
(
company
Key
.
equals
(
OrgEnum
.
监察部门
.
getKey
()))
{
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companySequenceNbr
);
wrapper
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companySequenceNbr
);
List
<
SuperviseRule
>
superviseLists
=
superviseRuleMapper
.
selectList
(
wrapper
);
List
<
SuperviseRule
>
superviseLists
=
superviseRuleMapper
.
selectList
(
wrapper
);
...
@@ -280,12 +277,12 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
...
@@ -280,12 +277,12 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
wrapper1
.
eq
(
Company:
:
getRegionCode
,
inspectionList
.
getAdminRegionCode
());
wrapper1
.
eq
(
Company:
:
getRegionCode
,
inspectionList
.
getAdminRegionCode
());
List
<
Company
>
codeLists
=
companyMapper
.
selectList
(
wrapper1
);
List
<
Company
>
codeLists
=
companyMapper
.
selectList
(
wrapper1
);
for
(
Company
codeList
:
codeLists
)
{
for
(
Company
codeList
:
codeLists
)
{
string
s
.
add
(
String
.
valueOf
(
codeList
.
getSequenceNbr
()));
companyId
s
.
add
(
String
.
valueOf
(
codeList
.
getSequenceNbr
()));
}
}
}
}
}
}
return
equipmentMapper
.
informationStatistics
(
string
s
);
return
equipmentMapper
.
informationStatistics
(
companyId
s
);
}
}
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
View file @
ccb3c897
...
@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum;
...
@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WelderMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WelderMapper
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
...
@@ -47,6 +48,11 @@ public class WelderServiceImpl {
...
@@ -47,6 +48,11 @@ public class WelderServiceImpl {
@Autowired
@Autowired
WelderMapper
welderMapper
;
WelderMapper
welderMapper
;
@Autowired
CompanyMapper
companyMapper
;
/**
/**
* 获取当前登录所在单位下的项目中的所有焊工列表
* 获取当前登录所在单位下的项目中的所有焊工列表
* @return
* @return
...
@@ -167,7 +173,28 @@ public class WelderServiceImpl {
...
@@ -167,7 +173,28 @@ public class WelderServiceImpl {
@BusinessIdentify
@BusinessIdentify
public
List
<
Map
>
welderStatistics
()
{
public
List
<
Map
>
welderStatistics
()
{
String
bizOrgCode
=
orgUsrService
.
getById
(
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
()).
getBizOrgCode
();
Set
<
String
>
personCode
=
new
HashSet
<>();
return
welderMapper
.
welderStatistics
(
bizOrgCode
);
Long
companyIds
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
String
bizOrgCode
=
orgUsrService
.
getById
(
companyIds
).
getBizOrgCode
();
String
companyKey
=
companyMapper
.
selectById
(
companyIds
).
getType
();
if
(
companyKey
.
equals
(
OrgEnum
.
安装单位
.
getKey
())){
personCode
.
add
(
String
.
valueOf
(
bizOrgCode
));
}
else
if
(
companyKey
.
equals
(
OrgEnum
.
监检机构
.
getKey
()))
{
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr:
:
getBizOrgCode
,
orgUsrService
.
getById
(
companyIds
).
getBizOrgCode
());
List
<
OrgUsr
>
selectCodes
=
orgUsrService
.
list
(
wrapper
);
for
(
OrgUsr
selectCode
:
selectCodes
){
personCode
.
add
(
String
.
valueOf
(
selectCode
.
getBizOrgCode
()));
}
}
else
if
(
companyKey
.
equals
(
OrgEnum
.
监察部门
.
getKey
()))
{
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr:
:
getSequenceNbr
,
orgUsrService
.
getById
(
companyIds
).
getParentId
());
List
<
OrgUsr
>
selectCodes
=
orgUsrService
.
list
(
wrapper
);
for
(
OrgUsr
selectCode
:
selectCodes
){
personCode
.
add
(
String
.
valueOf
(
selectCode
.
getBizOrgCode
()));
}
}
return
welderMapper
.
welderStatistics
(
personCode
);
}
}
}
}
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