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
0ee02718
Commit
0ee02718
authored
May 11, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.需求A062
A069 A070 A075 A083 A064 A074 A079 A081-9开发
parent
20858eff
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
201 additions
and
111 deletions
+201
-111
JyjcOpeningApplicationModel.java
...ot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
+34
-37
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+77
-27
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
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+0
-12
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+4
-14
application-dev.properties
...ule-tcm-biz/src/main/resources/application-dev.properties
+4
-4
TzsUserInfoDto.java
.../yeejoin/amos/boot/module/ymt/api/dto/TzsUserInfoDto.java
+6
-0
TzsUserInfo.java
.../yeejoin/amos/boot/module/ymt/api/entity/TzsUserInfo.java
+18
-0
TzsUserInfoVo.java
...om/yeejoin/amos/boot/module/ymt/api/vo/TzsUserInfoVo.java
+33
-17
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
View file @
0ee02718
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
model
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.ymt.api.
dto.TzsUserInfoDt
o
;
import
com.yeejoin.amos.boot.module.ymt.api.
vo.TzsUserInfoV
o
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.typroject.tyboot.core.rdbms.model.BaseModel
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -23,61 +20,61 @@ import java.util.List;
* @date 2023-12-13
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"JyjcOpeningApplicationModel"
,
description
=
""
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"JyjcOpeningApplicationModel"
,
description
=
""
)
public
class
JyjcOpeningApplicationModel
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"单位编码"
)
@ApiModelProperty
(
value
=
"单位编码"
)
private
String
unitCode
;
@ApiModelProperty
(
value
=
"单位地址"
)
@ApiModelProperty
(
value
=
"单位地址"
)
private
String
unitAddress
;
@ApiModelProperty
(
value
=
"单位编码Name"
)
@ApiModelProperty
(
value
=
"单位编码Name"
)
private
String
unitCodeName
;
@ApiModelProperty
(
value
=
"检测区域编码"
)
@ApiModelProperty
(
value
=
"检测区域编码"
)
@TableField
(
value
=
"detection_region"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
detectionRegion
;
@ApiModelProperty
(
value
=
"检测区域名称(冗余)"
)
@ApiModelProperty
(
value
=
"检测区域名称(冗余)"
)
private
String
detectionRegionName
;
@ApiModelProperty
(
value
=
"申请单号"
)
@ApiModelProperty
(
value
=
"申请单号"
)
private
String
applicationSeq
;
@ApiModelProperty
(
value
=
"检验结果方式"
)
@ApiModelProperty
(
value
=
"检验结果方式"
)
private
String
resultType
;
@ApiModelProperty
(
value
=
"有效期至"
)
@ApiModelProperty
(
value
=
"有效期至"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
expiryDate
;
@ApiModelProperty
(
value
=
"受理日期(接收日期)"
)
@ApiModelProperty
(
value
=
"受理日期(接收日期)"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
acceptDate
;
@ApiModelProperty
(
value
=
"状态"
)
@ApiModelProperty
(
value
=
"状态"
)
private
String
status
;
@ApiModelProperty
(
value
=
"状态Name"
)
@ApiModelProperty
(
value
=
"状态Name"
)
private
String
statusName
;
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"申请时间"
)
@ApiModelProperty
(
value
=
"申请时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
applyTime
;
@ApiModelProperty
(
value
=
"工作流执行角色"
)
@ApiModelProperty
(
value
=
"工作流执行角色"
)
private
String
workflowRole
;
@ApiModelProperty
(
value
=
"工作流实例ID"
)
@ApiModelProperty
(
value
=
"工作流实例ID"
)
private
String
workflowProstanceId
;
@ApiModelProperty
(
value
=
"工作流节点"
)
@ApiModelProperty
(
value
=
"工作流节点"
)
private
String
workflowActiveKey
;
@ApiModelProperty
(
value
=
"下一执行节点ids"
)
...
...
@@ -90,44 +87,44 @@ public class JyjcOpeningApplicationModel extends BaseModel {
private
String
createUserId
;
@ApiModelProperty
(
value
=
"企业资质信息"
)
@ApiModelProperty
(
value
=
"企业资质信息"
)
List
<
TzBaseUnitLicenceDto
>
baseUnitLicences
;
@ApiModelProperty
(
value
=
"检验人员信息"
)
List
<
TzsUserInfo
Dt
o
>
userInfos
;
@ApiModelProperty
(
value
=
"检验人员信息"
)
List
<
TzsUserInfo
V
o
>
userInfos
;
@ApiModelProperty
(
value
=
"使用单位联系人"
)
@ApiModelProperty
(
value
=
"使用单位联系人"
)
private
String
useContact
;
@ApiModelProperty
(
value
=
"联系人联系电话"
)
@ApiModelProperty
(
value
=
"联系人联系电话"
)
private
String
contactPhone
;
@ApiModelProperty
(
value
=
"行业主管部门"
)
@ApiModelProperty
(
value
=
"行业主管部门"
)
private
String
industrySupervisor
;
@ApiModelProperty
(
value
=
"单位地理坐标经度"
)
@ApiModelProperty
(
value
=
"单位地理坐标经度"
)
private
String
longitude
;
@ApiModelProperty
(
value
=
"单位地理坐标纬度"
)
@ApiModelProperty
(
value
=
"单位地理坐标纬度"
)
private
String
latitude
;
@ApiModelProperty
(
value
=
"单位地理坐标"
)
@ApiModelProperty
(
value
=
"单位地理坐标"
)
private
JyjcGeographicModel
geographic
;
@ApiModelProperty
(
"企业营业执照"
)
@ApiModelProperty
(
"企业营业执照"
)
private
List
<
AttachmentDto
>
unitBusinessLicense
;
@ApiModelProperty
(
"下个任务id"
)
@ApiModelProperty
(
"下个任务id"
)
private
String
nextTaskId
;
@ApiModelProperty
(
"下个任务执行人ids"
)
@ApiModelProperty
(
"下个任务执行人ids"
)
private
String
nextExecuteUserIds
;
@ApiModelProperty
(
"是否监管"
)
@ApiModelProperty
(
"是否监管"
)
private
String
identityType
;
@ApiModelProperty
(
"转办人"
)
@ApiModelProperty
(
"转办人"
)
private
String
transferToUserIds
;
@ApiModelProperty
(
"对接单位code"
)
...
...
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/JyjcOpeningApplicationServiceImpl.java
View file @
0ee02718
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -31,13 +32,16 @@ import com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.TaskModelServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.vo.TzsUserInfoVo
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
...
...
@@ -52,13 +56,13 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -121,8 +125,21 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
@Autowired
DataDictionaryMapper
dataDictionaryMapper
;
private
final
String
INDUSTRY_SUPERVISOR_DICT_TYPE
=
"HYZGBM"
;
private
static
Map
<
String
,
DictionarieValueModel
>
permissionLevelMap
;
private
static
List
<
DictionarieValueModel
>
permissionItemList
;
private
final
static
String
INDUSTRY_SUPERVISOR_DICT_TYPE
=
"HYZGBM"
;
/**
* 人员级别字典KEY
*/
private
final
static
String
RYJB_JYJC_DICT_KEY
=
"RYJB_JYJC"
;
/**
* 所有人员资质检验检测项目key
*/
private
final
static
String
ZZXM_JYJC_DICT_KEY
=
"ZZXM_JYJC_ALL"
;
...
...
@@ -312,7 +329,6 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
/**
* 获取详情跳转
*
...
...
@@ -334,7 +350,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 设置检验、检测资质信息
setBaseUnitLicences
(
unitCode
,
jyjcOpeningApplicationModel
,
true
);
// 设置检验、检测人员信息
setJYJCUserList
(
unitCode
,
jyjcOpeningApplicationModel
,
true
);
setJYJCUserList
(
unitCode
,
jyjcOpeningApplicationModel
,
true
);
}
else
{
jyjcOpeningApplicationModel
=
new
JyjcOpeningApplicationModel
();
jyjcOpeningApplicationModel
.
setResultType
(
"input"
);
...
...
@@ -362,7 +378,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
jyjcOpeningApplicationModel
.
setContactPhone
(
baseUnitLicenceEntity
.
getContactPhone
());
jyjcOpeningApplicationModel
.
setUnitAddress
(
baseUnitLicenceEntity
.
getAddress
());
if
(
StringUtils
.
isNotBlank
(
baseUnitLicenceEntity
.
getIndustrySupervisor
()))
{
DataDictionary
dict
=
dataDictionaryMapper
.
getByCode
(
baseUnitLicenceEntity
.
getIndustrySupervisor
(),
INDUSTRY_SUPERVISOR_DICT_TYPE
);
DataDictionary
dict
=
dataDictionaryMapper
.
getByCode
(
baseUnitLicenceEntity
.
getIndustrySupervisor
(),
INDUSTRY_SUPERVISOR_DICT_TYPE
);
if
(
dict
!=
null
)
{
jyjcOpeningApplicationModel
.
setIndustrySupervisor
(
dict
.
getName
());
}
else
{
...
...
@@ -379,17 +395,17 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
private
void
setDefaultExpiryDate
(
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
)
{
Optional
<
TzBaseUnitLicenceDto
>
op
=
jyjcOpeningApplicationModel
.
getBaseUnitLicences
().
stream
().
filter
(
l
->
l
.
getCertTypeCode
().
equals
(
jyjcOpeningApplicationModel
.
getOpenBizType
())).
min
(
Comparator
.
comparing
(
TzBaseUnitLicenceDto:
:
getExpiryDate
));
Optional
<
TzBaseUnitLicenceDto
>
op
=
jyjcOpeningApplicationModel
.
getBaseUnitLicences
().
stream
().
filter
(
l
->
l
.
getCertTypeCode
().
equals
(
jyjcOpeningApplicationModel
.
getOpenBizType
())).
min
(
Comparator
.
comparing
(
TzBaseUnitLicenceDto:
:
getExpiryDate
));
op
.
ifPresent
(
licenceDto
->
jyjcOpeningApplicationModel
.
setExpiryDate
(
licenceDto
.
getExpiryDate
()));
}
private
void
setBaseUnitLicences
(
String
unitCode
,
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
,
boolean
isNeedFilter
)
{
List
<
TzBaseUnitLicenceDto
>
baseUnitLicences
=
baseMapper
.
selectBaseUnitLicenceList
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"unitCode"
,
unitCode
).
put
(
"licenceType"
,
"jyjc"
).
build
());
baseUnitLicences
.
forEach
(
licenceDto
->
{
baseUnitLicences
.
forEach
(
licenceDto
->
{
licenceDto
.
setCertTypeCode
(
this
.
castCode2Str
(
licenceDto
.
getCertTypeCode
()));
});
if
(
isNeedFilter
)
{
baseUnitLicences
=
baseUnitLicences
.
stream
().
filter
(
u
->
u
.
getCertTypeCode
().
equals
(
jyjcOpeningApplicationModel
.
getOpenBizType
())).
collect
(
Collectors
.
toList
());
if
(
isNeedFilter
)
{
baseUnitLicences
=
baseUnitLicences
.
stream
().
filter
(
u
->
u
.
getCertTypeCode
().
equals
(
jyjcOpeningApplicationModel
.
getOpenBizType
())).
collect
(
Collectors
.
toList
());
jyjcOpeningApplicationModel
.
setBaseUnitLicences
(
baseUnitLicences
);
}
else
{
jyjcOpeningApplicationModel
.
setBaseUnitLicences
(
baseUnitLicences
);
...
...
@@ -398,11 +414,11 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private
String
castCode2Str
(
String
certTypeCode
)
{
// 新注册逻辑,逻辑在1处维护,便于代码维护【jy、jc对应前端的业务类型】
if
(
jcCertTypeCode
.
equals
(
certTypeCode
))
{
if
(
jcCertTypeCode
.
equals
(
certTypeCode
))
{
// 检测类型资质
return
"jc"
;
}
if
(
jyCertTypeCode
.
equals
(
certTypeCode
))
{
if
(
jyCertTypeCode
.
equals
(
certTypeCode
))
{
// 检验类型资质
return
"jy"
;
}
...
...
@@ -419,34 +435,68 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
List
<
TzsUserInfo
>
userInfos
=
userInfoMapper
.
selectList
(
userInfoQueryWrapper
);
if
(!
ValidationUtil
.
isEmpty
(
userInfos
))
{
List
<
TzsUserInfoDto
>
userInfoDtos
=
userInfos
.
stream
().
map
(
o
->
{
TzsUserInfoDto
dto
=
new
TzsUserInfoDto
();
Bean
.
toModel
(
o
,
dto
);
return
dto
;
}).
filter
(
o
->
o
.
getPost
()
!=
null
&&
(
o
.
getPost
().
contains
(
jyUserPost
)
||
o
.
getPost
().
contains
(
jcUserPost
))).
peek
(
u
->{
List
<
TzsUserInfoVo
>
tzsUserInfoVos
=
userInfos
.
stream
().
map
(
userInfo
->
{
TzsUserInfoVo
vo
=
new
TzsUserInfoVo
();
BeanUtils
.
copyProperties
(
userInfo
,
vo
,
"identification"
,
"profile"
,
"permissionItem"
,
"appointDoc"
);
if
(!
ObjectUtils
.
isEmpty
(
userInfo
.
getPermissionItem
()))
{
vo
.
setPermissionItem
(
JSON
.
parseArray
(
userInfo
.
getPermissionItem
()));
vo
.
setPermissionItemName
(
this
.
castItemCode2Name
(
userInfo
.
getPermissionItem
()));
}
if
(!
ObjectUtils
.
isEmpty
(
userInfo
.
getPost
()))
{
vo
.
setPost
(
JSON
.
parseArray
(
userInfo
.
getPost
()));
}
if
(!
ObjectUtils
.
isEmpty
(
userInfo
.
getAppointDoc
()))
{
vo
.
setAppointDoc
(
JSON
.
parseArray
(
userInfo
.
getAppointDoc
()));
}
vo
.
setPermissionLevelName
(
this
.
getDictNameByCode
(
userInfo
.
getPermissionLevel
()));
return
vo
;
}).
filter
(
o
->
o
.
getPost
()
!=
null
&&
(
o
.
getPost
().
contains
(
jyUserPost
)
||
o
.
getPost
().
contains
(
jcUserPost
))).
peek
(
u
->
{
// 设置岗位类型,逻辑在1端处理,便于代码维护,前端直接使用即可【jy、jc对应前端的业务类型】
if
(
u
.
getPost
().
contains
(
jyUserPost
)
&&
u
.
getPost
().
contains
(
jcUserPost
))
{
if
(
u
.
getPost
().
contains
(
jyUserPost
)
&&
u
.
getPost
().
contains
(
jcUserPost
))
{
// 即时检验又是检测人员
u
.
setPost
(
"jy,jc"
);
u
.
set
Str
Post
(
"jy,jc"
);
}
if
(
u
.
getPost
().
contains
(
jyUserPost
)
&&
!
u
.
getPost
().
contains
(
jcUserPost
))
{
if
(
u
.
getPost
().
contains
(
jyUserPost
)
&&
!
u
.
getPost
().
contains
(
jcUserPost
))
{
// 检验人员
u
.
setPost
(
"jy"
);
u
.
set
Str
Post
(
"jy"
);
}
if
(!
u
.
getPost
().
contains
(
jyUserPost
)
&&
u
.
getPost
().
contains
(
jcUserPost
))
{
if
(!
u
.
getPost
().
contains
(
jyUserPost
)
&&
u
.
getPost
().
contains
(
jcUserPost
))
{
// 检测人员
u
.
setPost
(
"jc"
);
u
.
set
Str
Post
(
"jc"
);
}
}).
collect
(
Collectors
.
toList
());
if
(
isNeedFilter
)
{
userInfoDtos
=
userInfoDtos
.
stream
().
filter
(
u
->
u
.
getPost
().
contains
(
jyjcOpeningApplicationModel
.
getOpenBizType
())).
collect
(
Collectors
.
toList
());
jyjcOpeningApplicationModel
.
setUserInfos
(
userInfoDt
os
);
if
(
isNeedFilter
)
{
tzsUserInfoVos
=
tzsUserInfoVos
.
stream
().
filter
(
u
->
u
.
getPost
().
contains
(
jyjcOpeningApplicationModel
.
getOpenBizType
())).
collect
(
Collectors
.
toList
());
jyjcOpeningApplicationModel
.
setUserInfos
(
tzsUserInfoV
os
);
}
else
{
jyjcOpeningApplicationModel
.
setUserInfos
(
userInfoDt
os
);
jyjcOpeningApplicationModel
.
setUserInfos
(
tzsUserInfoV
os
);
}
}
}
private
String
castItemCode2Name
(
String
permissionItem
)
{
if
(
permissionItemList
==
null
){
FeignClientResult
<
List
<
DictionarieValueModel
>>
itemDicts
=
Systemctl
.
dictionarieClient
.
dictValues
(
ZZXM_JYJC_DICT_KEY
);
permissionItemList
=
itemDicts
.
getResult
();
}
return
permissionItemList
.
stream
().
filter
(
i
->
permissionItem
.
contains
(
i
.
getDictDataKey
())).
map
(
this
::
buildItemWithCode
).
collect
(
Collectors
.
joining
(
","
));
}
private
String
buildItemWithCode
(
DictionarieValueModel
d
)
{
return
String
.
format
(
"%s[%s]"
,
d
.
getDictDataValue
(),
d
.
getDictDataKey
());
}
private
String
getDictNameByCode
(
String
permissionLevel
)
{
if
(
StringUtils
.
isEmpty
(
permissionLevel
)){
return
""
;
}
if
(
permissionLevelMap
==
null
){
FeignClientResult
<
List
<
DictionarieValueModel
>>
levelDicts
=
Systemctl
.
dictionarieClient
.
dictValues
(
RYJB_JYJC_DICT_KEY
);
permissionLevelMap
=
levelDicts
.
getResult
().
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
Function
.
identity
(),(
k1
,
k2
)->
k2
));
}
return
Optional
.
ofNullable
(
permissionLevelMap
.
get
(
permissionLevel
).
getDictDataValue
()).
orElse
(
""
);
}
/**
* 接收/驳回通知检验单
...
...
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 @
0ee02718
...
...
@@ -89,4 +89,10 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"人员内部编码"
)
private
String
innerPersonCode
;
@ApiModelProperty
(
value
=
"验检验专用-级别"
)
private
String
permissionLevel
;
@ApiModelProperty
(
value
=
"验检验专用-资质项目"
)
private
String
permissionItem
;
}
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 @
0ee02718
...
...
@@ -162,4 +162,16 @@ public class TzsUserInfo extends BaseEntity {
@TableField
(
value
=
"other_accessories"
)
private
String
otherAccessories
;
/**
* 验检验专用-级别
*/
@TableField
(
value
=
"permission_level"
)
private
String
permissionLevel
;
/**
* 验检验专用-资质项目
*/
@TableField
(
value
=
"permission_item"
)
private
String
permissionItem
;
}
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 @
0ee02718
...
...
@@ -144,4 +144,11 @@ public class TzsUserInfoVo {
* 单位类型
* */
private
String
companyType
;
@ApiModelProperty
(
value
=
"验检验专用-级别"
)
private
String
permissionLevel
;
@ApiModelProperty
(
value
=
"验检验专用-资质项目"
)
private
JSONArray
permissionItem
;
}
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 @
0ee02718
...
...
@@ -92,14 +92,8 @@ public class TzsUserInfoController extends BaseController {
tzsUserInfo
.
setUnitCode
(
companyModel
.
getCompanyCode
());
tzsUserInfo
.
setAppointDoc
(
tzsUserInfo
.
getAppointDoc
());
tzsUserInfo
.
setRecDate
(
new
Date
());
// Map<String, Object> qualificationsInfo = (Map<String, Object>)map.get("qualificationsInfo");
// Object subForm = qualificationsInfo.get("subForm");
// List<TzsUserQualifications> list = JSON.parseArray(JSON.toJSONString(subForm), TzsUserQualifications.class);
tzsUserInfo
.
setPostName
(
tzsUserInfoServiceImpl
.
setPostName
(
tzsUserInfo
.
getPost
()));
tzsUserInfo
=
tzsUserInfoServiceImpl
.
createWithModel
(
tzsUserInfo
);
// if (!ObjectUtils.isEmpty(list)){
// tzsUserInfoService.addQualificationsMessage(String.valueOf(tzsUserInfo.getSequenceNbr()),list);
// }
return
ResponseHelper
.
buildResponse
(
tzsUserInfo
);
}
...
...
@@ -150,9 +144,6 @@ public class TzsUserInfoController extends BaseController {
tzsUserInfo
.
setUnitName
(
companyModel
.
getCompanyName
());
tzsUserInfo
.
setUnitCode
(
companyModel
.
getCompanyCode
());
// Map<String, Object> qualificationsInfo = (Map<String, Object>)map.get("qualificationsInfo");
// Object subForm = qualificationsInfo.get("subForm");
// List<TzsUserQualifications> list = JSON.parseArray(JSON.toJSONString(subForm), TzsUserQualifications.class);
tzsUserInfo
.
setSequenceNbr
(
rowId
);
tzsUserInfo
.
setRecDate
(
new
Date
());
String
postName
=
tzsUserInfoServiceImpl
.
setPostName
(
tzsUserInfo
.
getPost
());
...
...
@@ -169,9 +160,6 @@ public class TzsUserInfoController extends BaseController {
}
}
tzsUserInfoServiceImpl
.
updateById
(
tzsUserInfo
);
// if (!ObjectUtils.isEmpty(list)){
// tzsUserInfoService.updateQualificationsMessage(String.valueOf(tzsUserInfo.getSequenceNbr()),list);
// }
return
ResponseHelper
.
buildResponse
(
tzsUserInfo
);
}
...
...
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 @
0ee02718
...
...
@@ -207,13 +207,16 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
Map
<
String
,
Object
>
maps
=
new
HashMap
<>();
TzsUserInfo
tzsUserInfo
=
tzsUserInfoMapper
.
selectById
(
id
);
TzsUserInfoVo
tzsUserInfoVo
=
new
TzsUserInfoVo
();
BeanUtils
.
copyProperties
(
tzsUserInfo
,
tzsUserInfoVo
,
"identification"
,
"profile"
,
"post"
);
BeanUtils
.
copyProperties
(
tzsUserInfo
,
tzsUserInfoVo
,
"identification"
,
"profile"
,
"post"
,
"permissionItem"
,
"appointDoc"
);
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getPost
()))
{
tzsUserInfoVo
.
setPost
(
JSON
.
parseArray
(
tzsUserInfo
.
getPost
()));
}
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getEquipType
()))
{
tzsUserInfoVo
.
setEquipType
(
JSON
.
parseArray
(
tzsUserInfo
.
getEquipType
()));
}
if
(!
ObjectUtils
.
isEmpty
(
tzsUserInfo
.
getPermissionItem
()))
{
tzsUserInfoVo
.
setPermissionItem
(
JSON
.
parseArray
(
tzsUserInfo
.
getPermissionItem
()));
}
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
()));
...
...
@@ -221,19 +224,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
String
companyType
=
getUnitType
();
tzsUserInfoVo
.
setCompanyType
(
companyType
.
contains
(
"个人主体"
)
?
"individual"
:
"no-individual"
);
maps
.
put
(
"userInfo"
,
tzsUserInfoVo
);
// LambdaQueryWrapper<TzsUserQualifications> lambda = new QueryWrapper<TzsUserQualifications>().lambda();
// lambda.eq(TzsUserQualifications::getUserInfoId, id);
// ArrayList<TzsUserQualificationsVo> tzsUserQualificationsVos = new ArrayList<>();
// List<TzsUserQualifications> list = tzsUserQualificationsService.getBaseMapper().selectList(lambda);
// list.forEach(item -> {
// TzsUserQualificationsVo vo = new TzsUserQualificationsVo();
// BeanUtils.copyProperties(item, vo, "file");
// vo.setFile(ObjectUtils.isEmpty(item.getFile()) ? new ArrayList() : JSON.parseArray(item.getFile()));
// tzsUserQualificationsVos.add(vo);
// });
// HashMap<String, Object> subForm = new HashMap<>();
// subForm.put("subForm", tzsUserQualificationsVos);
// maps.put("qualificationsInfo", subForm);
return
maps
;
}
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/resources/application-dev.properties
View file @
0ee02718
...
...
@@ -6,11 +6,11 @@ eureka.client.service-url.defaultZone=http://172.16.10.243:10001/eureka/
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url
=
http://172.16.
10.243
:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.health-check-url
=
http://172.16.
3.20
:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url
=
http://172.16.
10.243
:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://172.16.
10.243
:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address
=
172.16.
10.243
eureka.instance.status-page-url
=
http://172.16.
3.20
:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://172.16.
3.20
:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address
=
172.16.
3.20
## ES properties:
elasticsearch.username
=
elastic
elasticsearch.password
=
a123456
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/dto/TzsUserInfoDto.java
View file @
0ee02718
...
...
@@ -73,4 +73,10 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"人员内部编码"
)
private
String
innerPersonCode
;
@ApiModelProperty
(
value
=
"验检验专用-级别"
)
private
String
permissionLevel
;
@ApiModelProperty
(
value
=
"验检验专用-资质项目"
)
private
String
permissionItem
;
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/TzsUserInfo.java
View file @
0ee02718
...
...
@@ -129,4 +129,22 @@ public class TzsUserInfo extends BaseEntity {
*/
@TableField
(
"inner_person_code"
)
private
String
innerPersonCode
;
/**
* 验检验专用-级别
*/
@TableField
(
value
=
"permission_level"
)
private
String
permissionLevel
;
/**
* 验检验专用-资质项目
*/
@TableField
(
value
=
"permission_item"
)
private
String
permissionItem
;
/**
* 证件照片
*/
@TableField
(
value
=
"appoint_doc"
)
private
String
appointDoc
;
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/vo/TzsUserInfoVo.java
View file @
0ee02718
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
vo
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
lombok.Data
;
import
java.util.Date
;
...
...
@@ -13,98 +12,115 @@ public class TzsUserInfoVo {
/**
* 姓名
*/
@TableField
(
"name"
)
private
String
name
;
/**
* 证件类型
*/
@TableField
(
"certificate_type"
)
private
String
certificateType
;
/**
* 证件编号
*/
@TableField
(
"certificate_num"
)
private
String
certificateNum
;
/**
* 性别
*/
@TableField
(
"gender"
)
private
String
gender
;
/**
* 岗位
*/
@TableField
(
"post"
)
private
JSONArray
post
;
private
String
strPost
;
/**
* 联系电话
*/
@TableField
(
"phone"
)
private
String
phone
;
/**
* 出生日期
*/
@TableField
(
"birthday"
)
private
Date
birthday
;
/**
* 学历
*/
@TableField
(
"education"
)
private
String
education
;
/**
* 专业
*/
@TableField
(
"speciality"
)
private
String
speciality
;
/**
* 邮箱
*/
@TableField
(
"email"
)
private
String
email
;
/**
* 住址
*/
@TableField
(
"address"
)
private
String
address
;
/**
* 证件照片
*/
@TableField
(
value
=
"identification"
)
private
List
identification
;
/**
* 账户名
*/
@TableField
(
"amos_user_name"
)
private
String
amosUserName
;
/**
* 单位名称
*/
@TableField
(
"unit_name"
)
private
String
unitName
;
/**
* 头像
*/
@TableField
(
value
=
"profile"
)
private
List
profile
;
/**
* 平台账号id
*/
@TableField
(
"amos_user_id"
)
private
String
amosUserId
;
/**
* 验检验专用-级别
*/
private
String
permissionLevel
;
/**
* 验检验专用-级别-名称
*/
private
String
permissionLevelName
;
/**
* 验检验专用-资质项目
*/
private
JSONArray
permissionItem
;
/**
* 验检验专用-资质项目名称多个用逗号分割
*/
private
String
permissionItemName
;
/**
* 内部人员编码
*/
private
String
innerPersonCode
;
/**
* 证件照片
*/
private
JSONArray
appointDoc
;
}
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