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
b9e15fae
Commit
b9e15fae
authored
Sep 05, 2024
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
9807969a
7fce6cc0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
4 deletions
+68
-4
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+3
-0
TzsUserInfoVo.java
...om/yeejoin/amos/boot/module/tcm/api/vo/TzsUserInfoVo.java
+6
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+8
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+51
-4
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ITzsUserInfoService.java
View file @
b9e15fae
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tcm.api.service;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tcm.api.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.GroupAndPersonInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.GroupAndPersonInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzIndividualityDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzIndividualityDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto
;
...
@@ -35,6 +36,8 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
...
@@ -35,6 +36,8 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
Map
<
String
,
Object
>
getCompanyType
();
Map
<
String
,
Object
>
getCompanyType
();
Map
<
String
,
Object
>
getCompanyTypeForRedis
(
ReginParams
selectedOrgInfo
);
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
);
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
);
Boolean
equipBind
(
String
type
,
String
userSeq
,
String
creditCode
,
Map
<
String
,
Object
>
map
);
Boolean
equipBind
(
String
type
,
String
userSeq
,
String
creditCode
,
Map
<
String
,
Object
>
map
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/vo/TzsUserInfoVo.java
View file @
b9e15fae
...
@@ -43,6 +43,12 @@ public class TzsUserInfoVo {
...
@@ -43,6 +43,12 @@ public class TzsUserInfoVo {
private
JSONArray
post
;
private
JSONArray
post
;
/**
/**
* 岗位 (后期post迁移数组至此)
*/
@TableField
(
"new_post"
)
private
JSONArray
newPost
;
/**
* 联系电话
* 联系电话
*/
*/
@TableField
(
"phone"
)
@TableField
(
"phone"
)
...
...
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 @
b9e15fae
...
@@ -181,6 +181,14 @@ public class TzsUserInfoController extends BaseController {
...
@@ -181,6 +181,14 @@ public class TzsUserInfoController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCompanyTypeForRedis"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"从redis获取当前登录用户单位类型获取,避免多角色的单位获取到多个单位类型"
,
notes
=
"从redis获取当前登录用户单位类型获取,避免多角色的单位获取到多个单位类型"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getCompanyTypeForRedis
()
{
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
getCompanyTypeForRedis
(
selectedOrgInfo
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserType"
)
@GetMapping
(
value
=
"/getUserType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据单位类型获取人员类型"
,
notes
=
"根据单位类型获取人员类型"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据单位类型获取人员类型"
,
notes
=
"根据单位类型获取人员类型"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUserType
(
@RequestParam
(
value
=
"unitType"
)
String
unitType
)
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUserType
(
@RequestParam
(
value
=
"unitType"
)
String
unitType
)
{
...
...
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 @
b9e15fae
...
@@ -247,6 +247,9 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -247,6 +247,9 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getPost
()))
{
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getPost
()))
{
tzsUserInfoVo
.
setPost
(
JSON
.
parseArray
(
tzsUserInfo
.
getPost
()));
tzsUserInfoVo
.
setPost
(
JSON
.
parseArray
(
tzsUserInfo
.
getPost
()));
}
}
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getNewPost
()))
{
tzsUserInfoVo
.
setNewPost
(
JSON
.
parseArray
(
tzsUserInfo
.
getNewPost
()));
}
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getEquipType
()))
{
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getEquipType
()))
{
tzsUserInfoVo
.
setEquipType
(
JSON
.
parseArray
(
tzsUserInfo
.
getEquipType
()));
tzsUserInfoVo
.
setEquipType
(
JSON
.
parseArray
(
tzsUserInfo
.
getEquipType
()));
}
}
...
@@ -477,6 +480,50 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -477,6 +480,50 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
@Override
@Override
public
Map
<
String
,
Object
>
getCompanyTypeForRedis
(
ReginParams
selectedOrgInfo
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"companyType"
,
null
);
CompanyBo
company
=
selectedOrgInfo
.
getCompany
();
if
(
ObjectUtils
.
isEmpty
(
company
))
{
return
result
;
}
result
.
put
(
"creditCode"
,
company
.
getCompanyCode
());
boolean
productCompany
=
false
;
boolean
useCompany
=
false
;
boolean
installCompany
=
false
;
boolean
inspectionCompany
=
false
;
String
companyType
=
company
.
getCompanyType
();
if
(
companyType
.
contains
(
"使用单位"
)
||
companyType
.
contains
(
"个人主体"
))
{
useCompany
=
true
;
}
if
(
companyType
.
contains
(
"充装单位"
)
||
companyType
.
contains
(
"安装改造维修单位"
)
||
companyType
.
contains
(
"制造单位"
)
||
companyType
.
contains
(
"设计单位"
))
{
productCompany
=
true
;
}
if
(
companyType
.
contains
(
"安装改造维修单位"
))
{
installCompany
=
true
;
}
if
(
companyType
.
contains
(
"检验检测机构"
))
{
inspectionCompany
=
true
;
}
StringBuilder
companyTypeStr
=
new
StringBuilder
();
if
(
useCompany
)
{
companyTypeStr
.
append
(
"use-"
);
}
if
(
productCompany
)
{
companyTypeStr
.
append
(
"pro-"
);
}
if
(
installCompany
)
{
companyTypeStr
.
append
(
"install-"
);
}
if
(
inspectionCompany
)
{
companyTypeStr
.
append
(
"inspection"
);
}
result
.
put
(
"companyType"
,
companyTypeStr
);
return
result
;
}
@Override
public
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
)
{
public
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
)
{
List
<
CompanyModel
>
companyModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
companyClient
.
queryListByChild
(
RequestContext
.
getExeUserId
()));
List
<
CompanyModel
>
companyModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
companyClient
.
queryListByChild
(
RequestContext
.
getExeUserId
()));
if
(
companyModels
.
isEmpty
())
{
if
(
companyModels
.
isEmpty
())
{
...
@@ -779,7 +826,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -779,7 +826,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfo
.
setAppointDoc
(
tzsUserInfo
.
getAppointDoc
());
tzsUserInfo
.
setAppointDoc
(
tzsUserInfo
.
getAppointDoc
());
tzsUserInfo
.
setRecDate
(
new
Date
());
tzsUserInfo
.
setRecDate
(
new
Date
());
// 兼容前端只传一个值,并且非json类型的情况
// 兼容前端只传一个值,并且非json类型的情况
JSONArray
postArray
=
JSONArray
.
parseArray
(
this
.
isJSONValid
(
tzsUserInfo
.
get
Post
())
?
tzsUserInfo
.
getPost
()
:
"[\""
+
tzsUserInfo
.
get
Post
()
+
"\"]"
);
JSONArray
postArray
=
JSONArray
.
parseArray
(
this
.
isJSONValid
(
tzsUserInfo
.
get
NewPost
())
?
tzsUserInfo
.
getNewPost
()
:
"[\""
+
tzsUserInfo
.
getNew
Post
()
+
"\"]"
);
tzsUserInfo
.
setNewPost
(
JSONArray
.
toJSONString
(
postArray
));
tzsUserInfo
.
setNewPost
(
JSONArray
.
toJSONString
(
postArray
));
// 兼容 人员类型为【作业人员】且 【作业项目】含有【电梯修理】项目的为【维保人员】post为“6618”
// 兼容 人员类型为【作业人员】且 【作业项目】含有【电梯修理】项目的为【维保人员】post为“6618”
JSONArray
permissionData6552
=
tzsUserInfo
.
getPermissionData6552
();
JSONArray
permissionData6552
=
tzsUserInfo
.
getPermissionData6552
();
...
@@ -791,7 +838,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -791,7 +838,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
}
}
tzsUserInfo
.
setPost
(
JSONArray
.
toJSONString
(
postArray
));
tzsUserInfo
.
setPost
(
JSONArray
.
toJSONString
(
postArray
));
tzsUserInfo
.
setPostName
(
this
.
setPostName
(
tzsUserInfo
.
getPost
()));
tzsUserInfo
.
setPostName
(
this
.
setPostName
(
tzsUserInfo
.
get
New
Post
()));
tzsUserInfo
=
this
.
createWithModel
(
tzsUserInfo
);
tzsUserInfo
=
this
.
createWithModel
(
tzsUserInfo
);
// 保存资质
// 保存资质
tzsUserPermissionServiceImpl
.
savePermissionData
(
tzsUserInfo
);
tzsUserPermissionServiceImpl
.
savePermissionData
(
tzsUserInfo
);
...
@@ -842,7 +889,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -842,7 +889,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfoDto
.
setSequenceNbr
(
rowId
);
tzsUserInfoDto
.
setSequenceNbr
(
rowId
);
tzsUserInfoDto
.
setRecDate
(
new
Date
());
tzsUserInfoDto
.
setRecDate
(
new
Date
());
// 兼容前端只传一个值,并且非json类型的情况
// 兼容前端只传一个值,并且非json类型的情况
JSONArray
postArray
=
JSONArray
.
parseArray
(
this
.
isJSONValid
(
tzsUserInfoDto
.
get
Post
())
?
tzsUserInfoDto
.
getPost
()
:
"[\""
+
tzsUserInfoDto
.
get
Post
()
+
"\"]"
);
JSONArray
postArray
=
JSONArray
.
parseArray
(
this
.
isJSONValid
(
tzsUserInfoDto
.
get
NewPost
())
?
tzsUserInfoDto
.
getNewPost
()
:
"[\""
+
tzsUserInfoDto
.
getNew
Post
()
+
"\"]"
);
tzsUserInfoDto
.
setNewPost
(
JSONArray
.
toJSONString
(
postArray
));
tzsUserInfoDto
.
setNewPost
(
JSONArray
.
toJSONString
(
postArray
));
// 兼容 人员类型为【作业人员】且 【作业项目】含有【电梯修理】项目的为【维保人员】post为“6618”
// 兼容 人员类型为【作业人员】且 【作业项目】含有【电梯修理】项目的为【维保人员】post为“6618”
JSONArray
permissionData6552
=
tzsUserInfoDto
.
getPermissionData6552
();
JSONArray
permissionData6552
=
tzsUserInfoDto
.
getPermissionData6552
();
...
@@ -854,7 +901,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -854,7 +901,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
}
}
tzsUserInfoDto
.
setPost
(
JSONArray
.
toJSONString
(
postArray
));
tzsUserInfoDto
.
setPost
(
JSONArray
.
toJSONString
(
postArray
));
String
postName
=
this
.
setPostName
(
tzsUserInfoDto
.
getPost
());
String
postName
=
this
.
setPostName
(
tzsUserInfoDto
.
get
New
Post
());
tzsUserInfoDto
.
setPostName
(
postName
);
tzsUserInfoDto
.
setPostName
(
postName
);
if
(!
ObjectUtils
.
isEmpty
(
selectOne
.
getAmosUserId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
selectOne
.
getAmosUserId
()))
{
// 添加新的人员与组的关系
// 添加新的人员与组的关系
...
...
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