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
ca3fbdf0
Commit
ca3fbdf0
authored
May 19, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG:28897,28900
parent
6b195976
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
0 deletions
+71
-0
TzsUserInfoDto.java
.../yeejoin/amos/boot/module/tcm/api/dto/TzsUserInfoDto.java
+6
-0
TzsUserInfo.java
.../yeejoin/amos/boot/module/tcm/api/entity/TzsUserInfo.java
+12
-0
TzsUserInfoVo.java
...om/yeejoin/amos/boot/module/tcm/api/vo/TzsUserInfoVo.java
+7
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+46
-0
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/dto/TzsUserInfoDto.java
View file @
ca3fbdf0
...
...
@@ -90,6 +90,12 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"任命文件"
)
private
String
appointDoc
;
@ApiModelProperty
(
value
=
"执业注册"
)
private
String
practiceRegistration
;
@ApiModelProperty
(
value
=
"劳动合同"
)
private
String
laborContract
;
@ApiModelProperty
(
value
=
"人员内部编码"
)
private
String
innerPersonCode
;
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/entity/TzsUserInfo.java
View file @
ca3fbdf0
...
...
@@ -113,6 +113,18 @@ public class TzsUserInfo extends BaseEntity {
@TableField
(
value
=
"appoint_doc"
)
private
String
appointDoc
;
/**
* 执业注册
*/
@TableField
(
value
=
"practice_registration"
)
private
String
practiceRegistration
;
/**
* 劳动合同
*/
@TableField
(
value
=
"labor_contract"
)
private
String
laborContract
;
/**
* 账户名
...
...
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 @
ca3fbdf0
...
...
@@ -167,4 +167,11 @@ public class TzsUserInfoVo {
@ApiModelProperty
(
"岗位子类型名称(多个逗号分割)"
)
private
String
subPostName
;
@ApiModelProperty
(
value
=
"执业注册"
)
private
List
practiceRegistration
;
@ApiModelProperty
(
value
=
"劳动合同"
)
private
List
laborContract
;
}
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 @
ca3fbdf0
...
...
@@ -49,6 +49,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -300,6 +301,8 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfoVo
.
setIdentification
(
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getIdentification
())
?
null
:
JSON
.
parseArray
(
tzsUserInfo
.
getIdentification
()));
tzsUserInfoVo
.
setProfile
(
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getProfile
())
?
null
:
JSON
.
parseArray
(
tzsUserInfo
.
getProfile
()));
tzsUserInfoVo
.
setAppointDoc
(
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getAppointDoc
())
?
null
:
JSON
.
parseArray
(
tzsUserInfo
.
getAppointDoc
()));
tzsUserInfoVo
.
setPracticeRegistration
(
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getPracticeRegistration
())
?
null
:
JSON
.
parseArray
(
tzsUserInfo
.
getPracticeRegistration
()));
tzsUserInfoVo
.
setLaborContract
(
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getLaborContract
())
?
null
:
JSON
.
parseArray
(
tzsUserInfo
.
getLaborContract
()));
tzsUserInfoVo
.
setOtherAccessories
(
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getOtherAccessories
())
?
null
:
JSON
.
parseArray
(
tzsUserInfo
.
getOtherAccessories
()));
String
companyType
=
getUnitType
();
tzsUserInfoVo
.
setCompanyType
(
companyType
.
contains
(
"个人主体"
)
?
"individual"
:
"no-individual"
);
...
...
@@ -1019,6 +1022,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfo
.
setPostName
(
this
.
setPostName
(
tzsUserInfo
.
getNewPost
()));
// 兼容前端只传一个值,并且非json类型的情况
JSONArray
subPostArray
=
JSONArray
.
parseArray
(
this
.
isJSONValid
(
tzsUserInfo
.
getSubPost
())
?
tzsUserInfo
.
getSubPost
()
:
"[\""
+
tzsUserInfo
.
getSubPost
()
+
"\"]"
);
this
.
subtypeIntegrityCheck
(
postArray
,
subPostArray
);
if
(
subPostArray
!=
null
)
{
tzsUserInfo
.
setSubPost
(
JSONArray
.
toJSONString
(
subPostArray
));
String
subPostNames
=
iDataDictionaryService
.
lambdaQuery
()
...
...
@@ -1037,6 +1041,47 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
return
tzsUserInfo
;
}
/**
* 子类型完整性校验
*
* @param postArray
* @param subPostArray
*/
private
void
subtypeIntegrityCheck
(
JSONArray
postArray
,
JSONArray
subPostArray
)
{
if
(
subPostArray
==
null
||
subPostArray
.
isEmpty
())
{
subPostArray
=
new
JSONArray
();
}
Set
<
String
>
postCodes
=
postArray
.
stream
()
.
map
(
String:
:
valueOf
)
.
collect
(
Collectors
.
toSet
());
Map
<
String
,
String
>
postNameMap
=
iDataDictionaryService
.
lambdaQuery
()
.
select
(
DataDictionary:
:
getCode
,
DataDictionary:
:
getName
)
.
in
(
DataDictionary:
:
getCode
,
postCodes
)
.
list
()
.
stream
()
.
collect
(
Collectors
.
toMap
(
DataDictionary:
:
getCode
,
DataDictionary:
:
getName
));
Set
<
String
>
subPostSet
=
subPostArray
.
stream
()
.
map
(
String:
:
valueOf
)
.
collect
(
Collectors
.
toSet
());
postArray
.
forEach
(
item
->
{
String
post
=
String
.
valueOf
(
item
);
String
postName
=
postNameMap
.
getOrDefault
(
post
,
"未知类型"
);
List
<
DataDictionary
>
subPostList
=
getSubPostByParentsIds
(
post
);
if
(
CollectionUtils
.
isEmpty
(
subPostList
))
return
;
boolean
hasSubtypeSelected
=
subPostList
.
stream
()
.
map
(
DataDictionary:
:
getCode
)
.
anyMatch
(
subPostSet:
:
contains
);
if
(!
hasSubtypeSelected
)
{
throw
new
BadRequest
(
String
.
format
(
"%s 未勾选子类型"
,
postName
));
}
});
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
TzsUserInfoDto
updateUserInfo
(
Long
rowId
,
TzsUserInfoDto
tzsUserInfoDto
)
{
...
...
@@ -1122,6 +1167,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
// 兼容前端只传一个值,并且非json类型的情况
JSONArray
subPostArray
=
JSONArray
.
parseArray
(
this
.
isJSONValid
(
tzsUserInfoDto
.
getSubPost
())
?
tzsUserInfoDto
.
getSubPost
()
:
"[\""
+
tzsUserInfoDto
.
getSubPost
()
+
"\"]"
);
this
.
subtypeIntegrityCheck
(
postArray
,
subPostArray
);
if
(
subPostArray
!=
null
)
{
tzsUserInfoDto
.
setSubPost
(
JSONArray
.
toJSONString
(
subPostArray
));
String
subPostNames
=
iDataDictionaryService
.
lambdaQuery
()
...
...
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