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
ae582231
Commit
ae582231
authored
Dec 15, 2023
by
yangyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
edde39e0
9052b78c
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
150 additions
and
33 deletions
+150
-33
ControllerAop.java
...a/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
+11
-4
JyjcInspectionApplicationMapper.java
...dule/jyjc/api/mapper/JyjcInspectionApplicationMapper.java
+5
-0
JyjcInspectionApplicationModel.java
...module/jyjc/api/model/JyjcInspectionApplicationModel.java
+7
-1
JyjcInspectionApplicationMapper.xml
...main/resources/mapper/JyjcInspectionApplicationMapper.xml
+12
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+8
-3
PersonManageRoleEnum.java
.../amos/boot/module/tcm/api/enums/PersonManageRoleEnum.java
+34
-0
TzsUserInfoMapper.java
...in/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
+4
-0
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+18
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+5
-4
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+45
-20
pom.xml
pom.xml
+1
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
View file @
ae582231
...
@@ -12,10 +12,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...
@@ -12,10 +12,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.*
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -41,10 +38,12 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -41,10 +38,12 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
/**
/**
* controller层切面 用于用户数据缓存 供 sql自动填充使用 (使用粒度过大的Aop会创建大量代理对象,影响性能,占用内存,考虑使用
* controller层切面 用于用户数据缓存 供 sql自动填充使用 (使用粒度过大的Aop会创建大量代理对象,影响性能,占用内存,考虑使用
...
@@ -283,6 +282,14 @@ public class ControllerAop {
...
@@ -283,6 +282,14 @@ public class ControllerAop {
stopWatch5
.
stop
();
stopWatch5
.
stop
();
logger
.
info
(
"获取用户信息====>{}s"
,
stopWatch5
.
getTotalTimeSeconds
());
logger
.
info
(
"获取用户信息====>{}s"
,
stopWatch5
.
getTotalTimeSeconds
());
List
<
String
>
appCodes
=
new
ArrayList
<>();
try
{
List
<
ApplicationModel
>
applicationModelList
=
Privilege
.
agencyUserClient
.
listApps
(
userList
.
get
(
0
).
getUserId
()).
getResult
();
appCodes
=
applicationModelList
.
stream
().
map
(
ApplicationModel:
:
getAppCode
).
collect
(
Collectors
.
toList
());
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"获取listApps失败"
);
}
userList
.
get
(
0
).
setAppCodes
(
appCodes
);
ReginParams
regionParams
=
new
ReginParams
();
ReginParams
regionParams
=
new
ReginParams
();
regionParams
.
setCompany
(
company
);
regionParams
.
setCompany
(
company
);
regionParams
.
setRole
(
role
);
regionParams
.
setRole
(
role
);
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcInspectionApplicationMapper.java
View file @
ae582231
...
@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.data.repository.query.Param
;
import
java.util.Map
;
/**
/**
* Mapper 接口
* Mapper 接口
*
*
...
@@ -18,4 +21,6 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
...
@@ -18,4 +21,6 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
public
Page
<
JyjcInspectionApplication
>
queryForDataList
(
Page
<
JyjcInspectionApplication
>
page
,
String
applicationNo
,
String
inspectionClassify
,
String
applicationUnitCode
,
String
applicationUnitName
,
String
equipClassify
,
String
inspectionUnitCode
,
String
inspectionUnitName
,
String
applicationDate
,
String
acceptDate
,
String
inspectionChargePerson
,
String
status
,
String
bizType
);
public
Page
<
JyjcInspectionApplication
>
queryForDataList
(
Page
<
JyjcInspectionApplication
>
page
,
String
applicationNo
,
String
inspectionClassify
,
String
applicationUnitCode
,
String
applicationUnitName
,
String
equipClassify
,
String
inspectionUnitCode
,
String
inspectionUnitName
,
String
applicationDate
,
String
acceptDate
,
String
inspectionChargePerson
,
String
status
,
String
bizType
);
Page
<
JyjcInspectionApplicationEquipModel
>
listByCategory
(
Page
<
JyjcInspectionApplicationEquipModel
>
page
,
@Param
(
"equipClassify"
)
String
equipClassify
);
Page
<
JyjcInspectionApplicationEquipModel
>
listByCategory
(
Page
<
JyjcInspectionApplicationEquipModel
>
page
,
@Param
(
"equipClassify"
)
String
equipClassify
);
JyjcInspectionApplicationModel
selectDataBySeq
(
Long
sequenceNbr
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionApplicationModel.java
View file @
ae582231
...
@@ -66,6 +66,12 @@ public class JyjcInspectionApplicationModel extends BaseModel {
...
@@ -66,6 +66,12 @@ public class JyjcInspectionApplicationModel extends BaseModel {
@ApiModelProperty
(
value
=
"报检单位编号"
)
@ApiModelProperty
(
value
=
"报检单位编号"
)
private
String
applicationUnitCode
;
private
String
applicationUnitCode
;
@ApiModelProperty
(
value
=
"报检单位名称"
)
private
String
applicationUnitName
;
@ApiModelProperty
(
value
=
"报检单位地址"
)
private
String
address
;
@ApiModelProperty
(
value
=
"监管单位名称"
)
private
String
superviseOrgName
;
@ApiModelProperty
(
value
=
"包含设备数量(冗余)"
)
@ApiModelProperty
(
value
=
"包含设备数量(冗余)"
)
private
Integer
numberOfEquip
;
private
Integer
numberOfEquip
;
...
@@ -96,7 +102,7 @@ public class JyjcInspectionApplicationModel extends BaseModel {
...
@@ -96,7 +102,7 @@ public class JyjcInspectionApplicationModel extends BaseModel {
@ApiModelProperty
(
value
=
"操作类型 0 新增 2 编辑 1 暂存"
)
@ApiModelProperty
(
value
=
"操作类型 0 新增 2 编辑 1 暂存"
)
private
String
workflowNode
;
private
String
workflowNode
;
@ApiModelProperty
(
value
=
"告知书"
)
@ApiModelProperty
(
value
=
"告知书"
)
private
List
<
Map
<
String
,
Object
>>
gzs
;
private
List
<
Map
<
String
,
Object
>>
gzs
;
@ApiModelProperty
(
value
=
"产品质量证明书"
)
@ApiModelProperty
(
value
=
"产品质量证明书"
)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionApplicationMapper.xml
View file @
ae582231
...
@@ -89,4 +89,16 @@
...
@@ -89,4 +89,16 @@
</if>
</if>
</where>
</where>
</select>
</select>
<select
id=
"selectDataBySeq"
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel"
>
SELECT
tzjia.*,
tbei.supervise_org_name AS superviseOrgName,
tbei.use_unit AS applicationUnitName,
tbei.address AS address
FROM
tz_jyjc_inspection_application AS tzjia
LEFT JOIN tz_base_enterprise_info tbei ON tzjia.application_unit_code = tbei.use_code
WHERE
tzjia.sequence_nbr = #{sequenceNbr}
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
ae582231
...
@@ -3,10 +3,13 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
...
@@ -3,10 +3,13 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.map.MapBuilder
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.enums.WorkFlowEnum
;
import
com.yeejoin.amos.boot.biz.common.enums.WorkFlowEnum
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplicationAttachment
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplicationAttachment
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplicationEquip
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplicationEquip
;
...
@@ -206,12 +209,14 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -206,12 +209,14 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
public
Map
<
String
,
Object
>
selectBySeq
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
selectBySeq
(
Long
sequenceNbr
)
{
JyjcInspectionApplicationModel
model
=
this
.
queryBySeq
(
sequenceNbr
);
JyjcInspectionApplicationModel
model
=
this
.
getBaseMapper
().
selectDataBySeq
(
sequenceNbr
);
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
model
);
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
model
);
List
<
Map
<
String
,
Object
>>
dataByApplicationSeq
=
jyjcInspectionApplicationAttachmentService
.
getBaseMapper
().
getDataByApplicationSeq
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
dataByApplicationSeq
=
jyjcInspectionApplicationAttachmentService
.
getBaseMapper
().
getDataByApplicationSeq
(
sequenceNbr
);
Map
<
String
,
Object
>
attMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
attMap
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
maps
:
dataByApplicationSeq
)
{
for
(
Map
<
String
,
Object
>
maps
:
dataByApplicationSeq
)
{
attMap
.
put
(
maps
.
get
(
"attachment_type"
).
toString
(),
maps
.
get
(
"attachment_url"
));
List
<
AttachmentDto
>
data
=
JSONArray
.
parseArray
(
maps
.
get
(
"attachment_url"
).
toString
(),
AttachmentDto
.
class
);
attMap
.
put
(
maps
.
get
(
"attachment_type"
).
toString
(),
data
);
}
}
map
.
putAll
(
attMap
);
map
.
putAll
(
attMap
);
return
map
;
return
map
;
...
@@ -312,7 +317,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -312,7 +317,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
public
void
doRollback
(
String
instanceId
)
{
public
void
doRollback
(
String
instanceId
)
{
try
{
try
{
// 撤回流程
// 撤回流程
FeignClientResult
feignClientResult
=
Workflow
.
taskV2Client
.
rollBack
(
instanceId
);
FeignClientResult
feignClientResult
=
new
FeignClientResult
(
);
if
(
ObjectUtils
.
isEmpty
(
feignClientResult
))
{
if
(
ObjectUtils
.
isEmpty
(
feignClientResult
))
{
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/enums/PersonManageRoleEnum.java
0 → 100644
View file @
ae582231
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.HashMap
;
import
java.util.Map
;
@AllArgsConstructor
@Getter
public
enum
PersonManageRoleEnum
{
/**
* 人员管理角色枚举
*/
code
(
"人员管理角色字典code"
,
6616L
),
use
(
"使用单位"
,
1735591519093547010L
),
agw
(
"安装改造维修单位"
,
1735591458058035201L
),
jyjc
(
"检验检测机构"
,
1735590873120399362L
);
String
name
;
Long
id
;
public
static
Map
<
Long
,
String
>
getName
=
new
HashMap
<>();
public
static
Map
<
String
,
Long
>
getId
=
new
HashMap
<>();
static
{
for
(
PersonManageRoleEnum
e
:
PersonManageRoleEnum
.
values
())
{
getName
.
put
(
e
.
id
,
e
.
name
);
getId
.
put
(
e
.
name
,
e
.
id
);
}
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
View file @
ae582231
...
@@ -31,4 +31,8 @@ public interface TzsUserInfoMapper extends BaseMapper<TzsUserInfo> {
...
@@ -31,4 +31,8 @@ public interface TzsUserInfoMapper extends BaseMapper<TzsUserInfo> {
List
<
GroupAndPersonInfoDto
>
getUnitInfoByUserId
(
Long
groupId
);
List
<
GroupAndPersonInfoDto
>
getUnitInfoByUserId
(
Long
groupId
);
String
selectPostNameByUserId
(
String
userId
);
String
selectPostNameByUserId
(
String
userId
);
List
<
Map
<
String
,
Object
>>
getUserTypeList
(
@Param
(
value
=
"typeList"
)
List
<
String
>
typeList
);
String
selectCompanyTypeById
(
Long
companySeq
);
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
ae582231
...
@@ -211,4 +211,21 @@
...
@@ -211,4 +211,21 @@
<select
id=
"selectPostNameByUserId"
resultType=
"java.lang.String"
>
<select
id=
"selectPostNameByUserId"
resultType=
"java.lang.String"
>
SELECT post_name FROM "tzs_user_info" WHERE amos_user_id = #{userId}
SELECT post_name FROM "tzs_user_info" WHERE amos_user_id = #{userId}
</select>
</select>
<select
id=
"getUserTypeList"
resultType=
"java.util.Map"
>
SELECT
*
FROM
"cb_data_dictionary"
WHERE
type in
<foreach
collection=
"typeList"
separator=
","
item=
"type"
open=
"("
close=
")"
>
#{type}
</foreach>
</select>
<select
id=
"selectCompanyTypeById"
resultType=
"java.lang.String"
>
select company_type from privilege_company where sequence_nbr = #{companySeq}
</select>
</mapper>
</mapper>
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsUserInfoController.java
View file @
ae582231
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
@@ -82,7 +83,7 @@ public class TzsUserInfoController extends BaseController {
...
@@ -82,7 +83,7 @@ public class TzsUserInfoController extends BaseController {
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
null
;
return
null
;
}
}
Company
Model
companyModel
=
reginParams
.
getUserModel
().
getCompanys
().
get
(
0
);
Company
Bo
companyModel
=
reginParams
.
getCompany
(
);
if
(
ObjectUtils
.
isEmpty
(
companyModel
)){
if
(
ObjectUtils
.
isEmpty
(
companyModel
)){
throw
new
BadRequest
(
"未指定人员归属单位信息"
);
throw
new
BadRequest
(
"未指定人员归属单位信息"
);
}
}
...
@@ -218,11 +219,11 @@ public class TzsUserInfoController extends BaseController {
...
@@ -218,11 +219,11 @@ public class TzsUserInfoController extends BaseController {
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
null
;
return
null
;
}
}
Company
Model
companyModel
=
reginParams
.
getUserModel
().
getCompanys
().
get
(
0
);
Company
Bo
company
=
reginParams
.
getCompany
(
);
if
(
ObjectUtils
.
isEmpty
(
company
Model
)){
if
(
ObjectUtils
.
isEmpty
(
company
)){
throw
new
BadRequest
(
"未指定人员归属单位信息"
);
throw
new
BadRequest
(
"未指定人员归属单位信息"
);
}
}
dto
.
setUnitCode
(
company
Model
.
getCompanyCode
());
dto
.
setUnitCode
(
company
.
getCompanyCode
());
Page
<
TzsUserInfoDto
>
page
=
new
Page
<>();
Page
<
TzsUserInfoDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
Long
.
parseLong
(
current
));
page
.
setCurrent
(
Long
.
parseLong
(
current
));
page
.
setSize
(
Long
.
parseLong
(
size
));
page
.
setSize
(
Long
.
parseLong
(
size
));
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
ae582231
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
...
@@ -15,6 +16,7 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto;
...
@@ -15,6 +16,7 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.*
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.*
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.PersonManageRoleEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.TwoStipulateGroupEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.TwoStipulateGroupEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserEquipMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserEquipMapper
;
...
@@ -262,6 +264,22 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -262,6 +264,22 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
});
});
//添加人员管理角色
TzsUserInfo
tzsUserInfo
=
tzsUserInfoMapper
.
selectById
(
sequenceNbr
);
String
post
=
tzsUserInfo
.
getPost
();
if
(
post
.
contains
(
PersonManageRoleEnum
.
code
.
getId
().
toString
())){
String
companyType
=
tzsUserInfoMapper
.
selectCompanyTypeById
(
companySeq
);
if
(
companyType
.
contains
(
PersonManageRoleEnum
.
jyjc
.
getName
())){
roleIds
.
add
(
PersonManageRoleEnum
.
jyjc
.
getId
());
}
if
(
companyType
.
contains
(
PersonManageRoleEnum
.
use
.
getName
())){
roleIds
.
add
(
PersonManageRoleEnum
.
use
.
getId
());
}
if
(
companyType
.
contains
(
PersonManageRoleEnum
.
agw
.
getName
())){
roleIds
.
add
(
PersonManageRoleEnum
.
agw
.
getId
());
}
}
Map
<
Long
,
List
<
Long
>>
roleSeqMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
Long
>>
roleSeqMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
roleSeqMap
.
put
(
companySeq
,
roleIds
);
roleSeqMap
.
put
(
companySeq
,
roleIds
);
...
@@ -271,7 +289,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -271,7 +289,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
if
(
userResult
.
getStatus
()
==
200
)
{
if
(
userResult
.
getStatus
()
==
200
)
{
TzsUserInfo
tzsUserInfo
=
tzsUserInfoMapper
.
selectById
(
sequenceNbr
);
tzsUserInfo
.
setAmosUserId
(
userResult
.
getResult
().
getUserId
());
tzsUserInfo
.
setAmosUserId
(
userResult
.
getResult
().
getUserId
());
tzsUserInfo
.
setAmosUserName
(
userResult
.
getResult
().
getUserName
());
tzsUserInfo
.
setAmosUserName
(
userResult
.
getResult
().
getUserName
());
tzsUserInfo
.
setLockStatus
(
status
);
tzsUserInfo
.
setLockStatus
(
status
);
...
@@ -284,7 +302,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -284,7 +302,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
Privilege
.
groupUserClient
.
create
(
Long
.
valueOf
(
roleGroup
.
getExtend
()),
userIds
);
Privilege
.
groupUserClient
.
create
(
Long
.
valueOf
(
roleGroup
.
getExtend
()),
userIds
);
}
}
//绑定两个规定用户组
//绑定两个规定用户组
String
post
=
tzsUserInfo
.
getPost
();
post
=
post
.
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replace
(
"\""
,
""
);
post
=
post
.
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replace
(
"\""
,
""
);
for
(
String
code
:
post
.
split
(
","
))
{
for
(
String
code
:
post
.
split
(
","
))
{
DataDictionary
groupId
=
iDataDictionaryService
DataDictionary
groupId
=
iDataDictionaryService
...
@@ -366,6 +383,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -366,6 +383,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
boolean
productCompany
=
false
;
boolean
productCompany
=
false
;
boolean
useCompany
=
false
;
boolean
useCompany
=
false
;
boolean
installCompany
=
false
;
boolean
installCompany
=
false
;
boolean
inspectionCompany
=
false
;
for
(
CompanyModel
companyModel
:
companyModels
)
{
for
(
CompanyModel
companyModel
:
companyModels
)
{
String
companyType
=
companyModel
.
getCompanyType
();
String
companyType
=
companyModel
.
getCompanyType
();
if
(
companyType
.
contains
(
"使用单位"
)
||
companyType
.
contains
(
"个人主体"
))
{
if
(
companyType
.
contains
(
"使用单位"
)
||
companyType
.
contains
(
"个人主体"
))
{
...
@@ -377,19 +395,23 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -377,19 +395,23 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if
(
companyType
.
contains
(
"安装改造维修单位"
)){
if
(
companyType
.
contains
(
"安装改造维修单位"
)){
installCompany
=
true
;
installCompany
=
true
;
}
}
if
(
companyType
.
contains
(
"检验检测机构"
)){
inspectionCompany
=
true
;
}
}
}
String
companyType
=
null
;
String
Builder
companyType
=
new
StringBuilder
()
;
if
(
useCompany
)
{
if
(
useCompany
)
{
companyType
=
"use"
;
companyType
.
append
(
"use-"
)
;
}
}
if
(
productCompany
)
{
if
(
productCompany
)
{
companyType
=
"pro"
;
companyType
.
append
(
"pro-"
);
}
if
(
useCompany
&&
productCompany
)
{
companyType
=
"useAndPro"
;
}
}
if
(
installCompany
)
{
if
(
installCompany
)
{
companyType
=
companyType
+
"AndInstall"
;
companyType
.
append
(
"install-"
);
}
if
(
inspectionCompany
)
{
companyType
.
append
(
"inspection"
);
}
}
result
.
put
(
"companyType"
,
companyType
);
result
.
put
(
"companyType"
,
companyType
);
return
result
;
return
result
;
...
@@ -526,18 +548,21 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -526,18 +548,21 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getUserType
(
String
unitType
)
{
public
List
<
Map
<
String
,
Object
>>
getUserType
(
String
unitType
)
{
if
(
unitType
.
equals
(
"pro"
))
{
List
<
String
>
type
=
new
ArrayList
<>();
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SCDW"
,
null
);
type
.
add
(
"QYRYGW"
);
}
else
if
(
unitType
.
equals
(
"use"
))
{
if
(
unitType
.
contains
(
"use"
))
{
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SYDW"
,
null
);
type
.
add
(
"QYRYGW-SYDW"
);
}
else
if
(
unitType
.
equals
(
"useAndInstall"
)){
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SYDW"
,
"QYRYGW-INSTALL"
);
}
else
if
(
unitType
.
equals
(
"proAndInstall"
)){
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SCDW"
,
"QYRYGW-INSTALL"
);
}
else
{
return
tzsUserInfoMapper
.
getUserType
(
null
,
null
);
}
}
if
(
unitType
.
contains
(
"pro"
))
{
type
.
add
(
"QYRYGW-SCDW"
);
}
if
(
unitType
.
contains
(
"install"
))
{
type
.
add
(
"QYRYGW-INSTALL"
);
}
if
(
unitType
.
contains
(
"inspection"
))
{
type
.
add
(
"QYRYGW-INSPECTION"
);
}
return
tzsUserInfoMapper
.
getUserTypeList
(
type
);
}
}
public
List
<
LinkedHashMap
>
screenData
(
List
<
LinkedHashMap
>
result
,
List
<
LinkedHashMap
>
data
,
String
id
)
{
public
List
<
LinkedHashMap
>
screenData
(
List
<
LinkedHashMap
>
result
,
List
<
LinkedHashMap
>
data
,
String
id
)
{
...
...
pom.xml
View file @
ae582231
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<tyboot-version>
1.1.23-SNAPSHOT
</tyboot-version>
<tyboot-version>
1.1.23-SNAPSHOT
</tyboot-version>
<amos.version>
1.
7.10-SNAPSHOT
</amos.version>
<amos.version>
1.
8.6
</amos.version>
<itext.version>
7.1.1
</itext.version>
<itext.version>
7.1.1
</itext.version>
<elasticsearch.version>
7.15.2
</elasticsearch.version>
<elasticsearch.version>
7.15.2
</elasticsearch.version>
</properties>
</properties>
...
...
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