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
42e451f6
Commit
42e451f6
authored
Aug 19, 2021
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:新增获取用户单位归属接口
parent
192065d7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
228 additions
and
155 deletions
+228
-155
UserUnitDto.java
.../yeejoin/amos/boot/module/common/api/dto/UserUnitDto.java
+29
-0
UserUnitTypeEnum.java
...n/amos/boot/module/common/api/enums/UserUnitTypeEnum.java
+15
-0
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+2
-0
IOrgUsrService.java
...n/amos/boot/module/common/api/service/IOrgUsrService.java
+160
-153
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+22
-2
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+0
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+0
-0
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/dto/UserUnitDto.java
0 → 100644
View file @
42e451f6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 单位归属
*
* @author gaojianqiang
* @date 2021-08-19
*/
@Data
@ApiModel
(
value
=
"UserUnitDto"
,
description
=
"用户单位归属"
)
public
class
UserUnitDto
{
@ApiModelProperty
(
value
=
"人员类型1-维保公司;2-业主单位"
)
private
String
identityType
;
@ApiModelProperty
(
value
=
"人员id"
)
private
String
personSeq
;
@ApiModelProperty
(
value
=
"人员名称"
)
private
String
personName
;
@ApiModelProperty
(
value
=
"公司id"
)
private
String
companyId
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/UserUnitTypeEnum.java
0 → 100644
View file @
42e451f6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
UserUnitTypeEnum
{
MAINTENANCE_COMPANY
(
"1"
,
"维保公司"
),
OWNER_UNIT
(
"2"
,
"业主单位"
);
private
String
value
;
private
String
name
;
}
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 @
42e451f6
...
...
@@ -68,4 +68,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
* 查询单位基本信息列表和单位下所有的重点部位数量。
*/
List
<
OrgUsrTreeDto
>
getCompanyAndKeySite
(
Long
companyId
);
List
<
UserUnitDto
>
getUserUnit
(
String
id
,
String
type
,
String
code
);
}
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 @
42e451f6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
service
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
/**
* 机构/部门/人员表 服务类
...
...
@@ -18,163 +16,172 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
* @date 2021-06-18
*/
public
interface
IOrgUsrService
{
/**
* 查询上级单位
* @param parent_id
* @return
*/
/**
* 查询上级单位
*
* @param parent_id
* @return
*/
String
selectUpUnitByParam
(
String
parent_id
);
/**
* 获取父级
* @param topId
* @param entityList
* @param packageURL
* @param IDMethodName
* @param IDHierarchy
* @param NAMEMethodName
* @param PARENTIDMethodName
* @param OrgTypeMethodName
* @return
* @throws Exception
*/
List
<
OrgMenuDto
>
getTree
(
Long
topId
,
Collection
entityList
,
String
packageURL
,
String
IDMethodName
,
int
IDHierarchy
,
String
NAMEMethodName
,
String
PARENTIDMethodName
,
String
OrgTypeMethodName
)
throws
Exception
;
/**
* 获取父级
*
* @param topId
* @param entityList
* @param packageURL
* @param IDMethodName
* @param IDHierarchy
* @param NAMEMethodName
* @param PARENTIDMethodName
* @param OrgTypeMethodName
* @return
* @throws Exception
*/
List
<
OrgMenuDto
>
getTree
(
Long
topId
,
Collection
entityList
,
String
packageURL
,
String
IDMethodName
,
int
IDHierarchy
,
String
NAMEMethodName
,
String
PARENTIDMethodName
,
String
OrgTypeMethodName
)
throws
Exception
;
/**
* 获取子数据集合
*
* @param topId
* @param entityList
* @param packageURL
* @param IDMethodName
* @param IDHierarchy
* @param NAMEMethodName
* @param PARENTIDMethodName
* @param OrgTypeMethodName
* @return
* @throws Exception
*/
List
<
OrgMenuDto
>
getSub
(
Long
topId
,
Collection
entityList
,
String
packageURL
,
String
IDMethodName
,
int
IDHierarchy
,
String
NAMEMethodName
,
String
PARENTIDMethodName
,
String
OrgTypeMethodName
)
throws
Exception
;
/**
* 组装融合调度单位人员信息
*
* @param ids
* @return
* @throws Exception
*/
List
<
Map
<
String
,
Object
>>
returnCompanyPersonMsg
(
List
<
Long
>
ids
)
throws
Exception
;
/**
* 获取动态表单数据
*
* @param id
* @return
* @throws Exception
*/
List
<
FormValue
>
getFormValue
(
Long
id
)
throws
Exception
;
/**
* 保存 机构/部门/人员基本信息
*
* @param
* @throws Exception
*/
void
saveOrgUsr
(
OrgUsr
orgUsr
,
OrgUsr
oriOrgUsr
)
throws
Exception
;
/**
* 新增机构/部门/人员基本信息和动态表单数据
*
* @param orgUsr
* @param alertFromValuelist
*/
void
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
throws
Exception
;
/**
* 更新机构/部门/人员基本信息和动态表单数据
*
* @param instanceId 实例id
* @param fromValueList 动态表单数据列表
* @throws Exception
*/
void
updateDynamicFormInstance
(
Long
instanceId
,
List
<
DynamicFormInstance
>
fromValueList
)
throws
Exception
;
/**
* @param id
* @throws Exception
*/
Map
<
String
,
Object
>
selectForShowById
(
OrgUsr
orgUsr
,
Long
id
)
throws
Exception
;
List
<
OrgUsr
>
selectCompanyDepartmentMsg
();
void
saveOrgUsr
(
OrgUsrDto
OrgUsrDto
)
throws
Exception
;
void
saveOrgPerson
(
OrgPersonDto
OrgPersonDto
)
throws
Exception
;
void
updateByIdOrgUsr
(
OrgUsrDto
OrgUsrDto
,
Long
id
)
throws
Exception
;
void
updateByIdOrgPerson
(
OrgPersonDto
OrgPersonDto
,
Long
id
)
throws
Exception
;
OrgUsrFormDto
selectCompanyById
(
Long
id
)
throws
Exception
;
IPage
bizOrgTypeListPage
(
String
pageNum
,
String
pageSize
,
String
bizOrgType
)
throws
Exception
;
void
saveDepartment
(
List
<
OrgDepartmentDto
>
OrgDepartmentDto
,
Long
id
)
throws
Exception
;
void
saveCompany
(
List
<
OrgUsrDto
>
OrgUsrDto
)
throws
Exception
;
OrgPersonFormDto
selectPersonById
(
Long
id
)
throws
Exception
;
OrgPersonFormDto
selectPersonByIdDetail
(
Long
id
)
throws
Exception
;
List
<
OrgMenuDto
>
selectPersonTree
()
throws
Exception
;
void
savePersonList
(
List
<
OrgPersonDto
>
OrgPersonDto
)
throws
Exception
;
void
saveOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
)
throws
Exception
;
void
updateByIdOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
,
Long
id
)
throws
Exception
;
OrgDepartmentFormDto
selectDepartmentById
(
Long
id
)
throws
Exception
;
List
<
Map
<
String
,
Object
>>
selectForShowByListId
(
List
<
Long
>
ids
)
throws
Exception
;
/**
* * @param null
*
* @return <PRE>
* author tw
* date 2021/7/20
* </PRE>
* 列表
*/
List
<
CompanyDto
>
listContractDto
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
requestData
);
/**
* 获取子数据集合
* @param topId
* @param entityList
* @param packageURL
* @param IDMethodName
* @param IDHierarchy
* @param NAMEMethodName
* @param PARENTIDMethodName
* @param OrgTypeMethodName
* @return
* @throws Exception
*/
List
<
OrgMenuDto
>
getSub
(
Long
topId
,
Collection
entityList
,
String
packageURL
,
String
IDMethodName
,
int
IDHierarchy
,
String
NAMEMethodName
,
String
PARENTIDMethodName
,
String
OrgTypeMethodName
)
throws
Exception
;
/**
* * @param null
*
* @return <PRE>
* author tw
* date 2021/7/20
* </PRE>
* 统计
*/
Integer
listContractDtoCount
(
RequestData
par
);
/**
* 组装融合调度单位人员信息
* @param ids
* @return
* @throws Exception
*/
List
<
Map
<
String
,
Object
>>
returnCompanyPersonMsg
(
List
<
Long
>
ids
)
throws
Exception
;
/**
* * @param null
*
* @return <PRE>
* author tw
* date 2021/7/26
* </PRE>
*/
/**
* 获取动态表单数据
* @param id
* @return
* @throws Exception
*/
List
<
FormValue
>
getFormValue
(
Long
id
)
throws
Exception
;
List
<
OrgUsrzhDto
>
getOrgUsrzhDto
(
String
name
);
/**
* 保存 机构/部门/人员基本信息
* @param
* @throws Exception
*/
void
saveOrgUsr
(
OrgUsr
orgUsr
,
OrgUsr
oriOrgUsr
)
throws
Exception
;
List
<
ESOrgUsrDto
>
selectByIddata
(
String
name
);
/**
* 新增机构/部门/人员基本信息和动态表单数据
* @param orgUsr
* @param alertFromValuelist
*/
void
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
throws
Exception
;
List
<
Map
<
String
,
Object
>>
getparent
();
/**
* 更新机构/部门/人员基本信息和动态表单数据
*
* @param instanceId 实例id
* @param fromValueList 动态表单数据列表
* @throws Exception
*/
void
updateDynamicFormInstance
(
Long
instanceId
,
List
<
DynamicFormInstance
>
fromValueList
)
throws
Exception
;
List
<
OrgUsrExcelDto
>
exportToExcel
();
/**
*
* @param id
* @throws Exception
*/
Map
<
String
,
Object
>
selectForShowById
(
OrgUsr
orgUsr
,
Long
id
)
throws
Exception
;
List
<
OrgUsr
>
selectCompanyDepartmentMsg
();
void
saveOrgUsr
(
OrgUsrDto
OrgUsrDto
)
throws
Exception
;
void
saveOrgPerson
(
OrgPersonDto
OrgPersonDto
)
throws
Exception
;
void
updateByIdOrgUsr
(
OrgUsrDto
OrgUsrDto
,
Long
id
)
throws
Exception
;
void
updateByIdOrgPerson
(
OrgPersonDto
OrgPersonDto
,
Long
id
)
throws
Exception
;
OrgUsrFormDto
selectCompanyById
(
Long
id
)
throws
Exception
;
IPage
bizOrgTypeListPage
(
String
pageNum
,
String
pageSize
,
String
bizOrgType
)
throws
Exception
;
void
saveDepartment
(
List
<
OrgDepartmentDto
>
OrgDepartmentDto
,
Long
id
)
throws
Exception
;
void
saveCompany
(
List
<
OrgUsrDto
>
OrgUsrDto
)
throws
Exception
;
OrgPersonFormDto
selectPersonById
(
Long
id
)
throws
Exception
;
OrgPersonFormDto
selectPersonByIdDetail
(
Long
id
)
throws
Exception
;
List
<
OrgMenuDto
>
selectPersonTree
()
throws
Exception
;
void
savePersonList
(
List
<
OrgPersonDto
>
OrgPersonDto
)
throws
Exception
;
void
saveOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
)
throws
Exception
;
void
updateByIdOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
,
Long
id
)
throws
Exception
;
OrgDepartmentFormDto
selectDepartmentById
(
Long
id
)
throws
Exception
;
List
<
Map
<
String
,
Object
>>
selectForShowByListId
(
List
<
Long
>
ids
)
throws
Exception
;
/**
* * @param null
* @return
* <PRE>
* author tw
* date 2021/7/20
* </PRE>
* 列表
*/
List
<
CompanyDto
>
listContractDto
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
requestData
);
/**
* * @param null
* @return
* <PRE>
* author tw
* date 2021/7/20
* </PRE>
* 统计
*/
Integer
listContractDtoCount
(
RequestData
par
);
/**
* * @param null
* @return
* <PRE>
* author tw
* date 2021/7/26
* </PRE>
*/
List
<
OrgUsrzhDto
>
getOrgUsrzhDto
(
String
name
);
List
<
ESOrgUsrDto
>
selectByIddata
(
String
name
);
List
<
Map
<
String
,
Object
>>
getparent
();
List
<
OrgUsrExcelDto
>
exportToExcel
();
UserUnitDto
getUserUnit
(
String
id
,
String
type
,
String
code
);
/**
* 根据登陆人获取公司部门人员树
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
42e451f6
...
...
@@ -307,8 +307,28 @@ LEFT JOIN (
FROM important_companys
</select>
<select
id=
"getUserUnit"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.UserUnitDto"
>
SELECT
u.sequence_nbr AS personSeq,
u.biz_org_name AS personName,
'2' AS identityType,
IFNULL( LEFT ( u.biz_org_code, 6 ), '' ) AS companyId
FROM
`cb_org_usr` u
<where>
<if
test=
"id != null and id != ''"
>
u.amos_org_id = #{id}
</if>
<if
test=
"type != null and type != ''"
>
AND u.biz_org_type = #{type}
</if>
<if
test=
"code != null and code != ''"
>
AND u.biz_org_code LIKE CONCAT(#{code}, '%')
</if>
</where>
ORDER BY
u.sequence_nbr DESC
</select>
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto"
>
select
a.biz_org_name bizOrgName,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
42e451f6
This diff is collapsed.
Click to expand it.
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 @
42e451f6
This diff is collapsed.
Click to expand it.
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