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
8838bfc4
Commit
8838bfc4
authored
Nov 09, 2022
by
limei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备管理页面接口修改
parent
c9ee68e2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
8 deletions
+60
-8
CompanyDto.java
.../com/yeejoin/amos/boot/module/ugp/api/dto/CompanyDto.java
+3
-0
Company.java
.../com/yeejoin/amos/boot/module/ugp/api/entity/Company.java
+3
-0
EquipmentMapper.java
...join/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
+2
-1
EquipmentMapper.xml
...ule-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
+6
-2
EquipmentController.java
...s/boot/module/ugp/biz/controller/EquipmentController.java
+1
-1
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+45
-4
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/CompanyDto.java
View file @
8838bfc4
...
...
@@ -88,4 +88,7 @@ public class CompanyDto extends BaseDto {
@ApiModelProperty
(
value
=
"用户密码"
)
private
String
adminLoginPwd
;
@ApiModelProperty
(
value
=
"组织机构代码"
)
private
String
regionCode
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/Company.java
View file @
8838bfc4
...
...
@@ -89,4 +89,7 @@ public class Company extends BaseEntity {
@TableField
(
"admin_login_pwd"
)
private
String
adminLoginPwd
;
@TableField
(
"region_code"
)
private
String
regionCode
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
View file @
8838bfc4
...
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
import
java.util.Set
;
/**
* 设备信息表 Mapper 接口
...
...
@@ -18,6 +19,6 @@ import java.util.List;
*/
@Mapper
public
interface
EquipmentMapper
extends
BaseMapper
<
Equipment
>
{
IPage
<
EquipmentDto
>
queryEquipmentPage
(
IPage
<
EquipmentDto
>
page
,
Equipment
equipment
);
IPage
<
EquipmentDto
>
queryEquipmentPage
(
IPage
<
EquipmentDto
>
page
,
Equipment
equipment
,
Set
<
String
>
companyIds
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
View file @
8838bfc4
...
...
@@ -14,9 +14,13 @@
<if
test=
"equipment.verifyStatus != '' and equipment.verifyStatus != null"
>
and `verify_status` like concat('%',#{equipment.verifyStatus},'%')
</if>
<if
test=
"equipment.companyId != '' and equipment.companyId != null"
>
and `company_id` like concat('%',#{equipment.companyId},'%')
<if
test=
"companyIds != null "
>
and `company_id` in
<foreach
collection=
"companyIds"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</where>
</select>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/EquipmentController.java
View file @
8838bfc4
...
...
@@ -142,7 +142,7 @@ public class EquipmentController extends BaseController {
IPage
<
EquipmentDto
>
page
=
new
Page
<>();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
equipment
.
setCompanyId
(
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
());
//
equipment.setCompanyId(orgService.getReginParams().getBusinessInfo().getCompanySequenceNbr());
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
queryEquipmentPage
(
page
,
equipment
));
}
...
...
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 @
8838bfc4
...
...
@@ -6,10 +6,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IEquipmentService
;
...
...
@@ -22,7 +22,9 @@ import org.springframework.stereotype.Service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
/**
* 设备信息表服务实现类
...
...
@@ -43,6 +45,12 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
@Autowired
OrgServiceImpl
orgService
;
@Autowired
SuperviseRuleServiceImpl
superviseRuleService
;
@Autowired
CompanyServiceImpl
companyService
;
/**
* 分页查询
...
...
@@ -181,8 +189,41 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
}
//设备模糊筛选
@BusinessIdentify
public
IPage
<
EquipmentDto
>
queryEquipmentPage
(
IPage
<
EquipmentDto
>
page
,
Equipment
equipment
)
{
return
equipmentMapper
.
queryEquipmentPage
(
page
,
equipment
);
ReginParams
reginParams
=
orgService
.
getReginParams
();
ReginParams
.
BusinessInfo
businessInfo
=
reginParams
.
getBusinessInfo
();
String
companyId
=
String
.
valueOf
(
businessInfo
.
getCompanySequenceNbr
());
String
roleName
=
reginParams
.
getRole
().
getRoleName
();
Set
<
String
>
companyIds
=
new
HashSet
<>();
if
(
OrgEnum
.
监检机构
.
getName
().
equals
(
roleName
)){
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companyId
);
List
<
SuperviseRule
>
superviseRules
=
superviseRuleService
.
list
(
wrapper
);
for
(
SuperviseRule
superviseRule
:
superviseRules
){
LambdaQueryWrapper
<
Company
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
Company:
:
getRegionCode
,
superviseRule
.
getAdminRegionCode
());
List
<
Company
>
companyList
=
companyService
.
list
(
wrapper1
);
for
(
Company
company
:
companyList
){
companyIds
.
add
(
String
.
valueOf
(
company
.
getSequenceNbr
()));
}
}
}
else
if
(
OrgEnum
.
监察部门
.
getName
().
equals
(
roleName
)){
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companyId
);
List
<
SuperviseRule
>
superviseRules
=
superviseRuleService
.
list
(
wrapper
);
for
(
SuperviseRule
superviseRule
:
superviseRules
){
LambdaQueryWrapper
<
Company
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
Company:
:
getRegionCode
,
superviseRule
.
getAdminRegionCode
());
List
<
Company
>
companyList
=
companyService
.
list
(
wrapper1
);
for
(
Company
company
:
companyList
){
companyIds
.
add
(
String
.
valueOf
(
company
.
getSequenceNbr
()));
}
}
}
companyIds
.
add
(
companyId
);
// equipment.setCompanyId(orgService.getReginParams().getBusinessInfo().getCompanySequenceNbr());
return
equipmentMapper
.
queryEquipmentPage
(
page
,
equipment
,
companyIds
);
}
...
...
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