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
9af3f11b
Commit
9af3f11b
authored
Jun 27, 2025
by
yangyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
d36873d6
d1119361
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
794 additions
and
44 deletions
+794
-44
ESEquipmentInfo.java
...n/amos/boot/module/common/api/entity/ESEquipmentInfo.java
+13
-13
EsBaseEnterpriseInfo.java
...s/boot/module/common/api/entity/EsBaseEnterpriseInfo.java
+3
-3
EsUserInfo.java
...eejoin/amos/boot/module/common/api/entity/EsUserInfo.java
+4
-4
pom.xml
...os-boot-module-common/amos-boot-module-common-biz/pom.xml
+6
-0
EquipRequestParamsDto.java
...in/amos/boot/module/jg/api/dto/EquipRequestParamsDto.java
+2
-0
EquipmentInfoDto.java
...yeejoin/amos/boot/module/jg/api/dto/EquipmentInfoDto.java
+1
-0
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+5
-2
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+1
-0
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+11
-3
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+8
-3
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+2
-0
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+12
-6
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+5
-2
EquipInfoVo.java
...ejoin/amos/boot/module/statistics/api/vo/EquipInfoVo.java
+302
-0
ComprehensiveStatisticalAnalysisController.java
...ontroller/ComprehensiveStatisticalAnalysisController.java
+22
-0
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+66
-7
MinioUtils.java
...join/amos/boot/module/statistcs/biz/utils/MinioUtils.java
+30
-0
QualificationLevelConverter.java
...module/tcm/api/converter/QualificationLevelConverter.java
+42
-0
QualificationProjectConverter.java
...dule/tcm/api/converter/QualificationProjectConverter.java
+53
-0
CompanyUserImportDto.java
...in/amos/boot/module/tcm/api/dto/CompanyUserImportDto.java
+190
-0
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+8
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+7
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+0
-0
TzsUserPermissionServiceImpl.java
...le/tcm/biz/service/impl/TzsUserPermissionServiceImpl.java
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/ESEquipmentInfo.java
View file @
9af3f11b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
com.yeejoin.amos.boot.module.common.api.dto.TechParamItem
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.elasticsearch.annotations.DateFormat
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
org.springframework.data.elasticsearch.annotations.*
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -203,14 +203,14 @@ public class ESEquipmentInfo {
* 投用日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
USC_DATE
;
private
Local
Date
USC_DATE
;
/**
*
*创建日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date_hour_minute_second
)
private
Dat
e
createDate
;
private
LocalDateTim
e
createDate
;
/**
...
...
@@ -333,13 +333,13 @@ public class ESEquipmentInfo {
* 下次检验日期-冗余字段
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
NEXT_INSPECT_DATE
;
private
Local
Date
NEXT_INSPECT_DATE
;
/**
* 检验日期-冗余字段
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
INSPECT_DATE
;
private
Local
Date
INSPECT_DATE
;
/**
* 最新一条检验信息
...
...
@@ -381,7 +381,7 @@ public class ESEquipmentInfo {
private
Boolean
boolValue
;
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
dateValue
;
private
Local
Date
dateValue
;
public
TechParam
(
TechParamItem
paramItem
,
Object
rawValue
)
{
this
.
paramKey
=
paramItem
.
getParamKey
();
...
...
@@ -497,13 +497,13 @@ public class ESEquipmentInfo {
* 检验日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
inspectDate
;
private
Local
Date
inspectDate
;
/**
* 下次检验日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
nextInspectDate
;
private
Local
Date
nextInspectDate
;
/**
* 检验机构编码
...
...
@@ -545,12 +545,12 @@ public class ESEquipmentInfo {
* 维保合同开始日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
informStart
;
private
Local
Date
informStart
;
/**
* 维保合同结束日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
informEnd
;
private
Local
Date
informEnd
;
/**
* 维保负责人姓名
*/
...
...
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/EsBaseEnterpriseInfo.java
View file @
9af3f11b
...
...
@@ -7,7 +7,7 @@ import org.springframework.data.elasticsearch.annotations.Document;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.
util.
Date
;
import
java.
time.Local
Date
;
import
java.util.List
;
/**
...
...
@@ -167,7 +167,7 @@ public class EsBaseEnterpriseInfo {
* 许可到期日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
expiryDate
;
private
Local
Date
expiryDate
;
/**
* 许可项目/检验类型/设备品种(核准项目名称)
...
...
@@ -203,6 +203,6 @@ public class EsBaseEnterpriseInfo {
* 发证日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
issueDate
;
private
Local
Date
issueDate
;
}
}
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/EsUserInfo.java
View file @
9af3f11b
...
...
@@ -7,7 +7,7 @@ import org.springframework.data.elasticsearch.annotations.Document;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.
util.
Date
;
import
java.
time.Local
Date
;
import
java.util.List
;
/**
...
...
@@ -72,7 +72,7 @@ public class EsUserInfo {
* 出生日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
birthday
;
private
Local
Date
birthday
;
/**
* 学历
...
...
@@ -213,7 +213,7 @@ public class EsUserInfo {
* 有效期至
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
expiryDate
;
private
Local
Date
expiryDate
;
/**
* 发证机关
...
...
@@ -225,7 +225,7 @@ public class EsUserInfo {
* 发证日期
*/
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date
)
private
Date
issueDate
;
private
Local
Date
issueDate
;
/**
* 证书类型
...
...
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-biz/pom.xml
View file @
9af3f11b
...
...
@@ -15,5 +15,11 @@
<artifactId>
amos-boot-module-common-api
</artifactId>
<version>
${amos-boot-biz.version}
</version>
</dependency>
<dependency>
<groupId>
org.reflections
</groupId>
<artifactId>
reflections
</artifactId>
<version>
0.10.2
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/EquipRequestParamsDto.java
View file @
9af3f11b
...
...
@@ -54,4 +54,5 @@ public class EquipRequestParamsDto {
private
String
useDate
;
private
String
startLatitudeLongitude
;
private
String
endLatitudeLongitude
;
private
String
equState
;
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/EquipmentInfoDto.java
View file @
9af3f11b
...
...
@@ -23,6 +23,7 @@ public class EquipmentInfoDto {
private
String
receiveOrgCode
;
private
String
receiveOrgName
;
private
String
possession
;
private
String
equState
;
/**
* 属地监管部门:orgCode_名称
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/CommonEquipDataProcessService.java
View file @
9af3f11b
...
...
@@ -55,6 +55,8 @@ import org.elasticsearch.index.query.QueryBuilders;
import
org.elasticsearch.search.SearchHit
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.elasticsearch.search.sort.SortOrder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -117,8 +119,6 @@ public class CommonEquipDataProcessService {
private
final
RestHighLevelClient
restHighLevelClient
;
private
final
IdxBizJgProjectContraptionServiceImplService
idxBizJgProjectContraptionServiceImpl
;
private
final
JgUseRegistrationServiceImpl
jgUseRegistrationService
;
private
final
CommonServiceImpl
commonService
;
...
...
@@ -142,6 +142,9 @@ public class CommonEquipDataProcessService {
public
static
final
String
BASE_COLUMN_REC_DATE
=
"\"REC_DATE\""
;
public
static
final
String
BASE_COLUMN_REC_USERID
=
"\"REC_USER_ID\""
;
@Autowired
@Lazy
private
IdxBizJgProjectContraptionServiceImplService
idxBizJgProjectContraptionServiceImpl
;
@PostConstruct
public
void
init
()
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
9af3f11b
...
...
@@ -288,6 +288,7 @@ public class CommonServiceImpl implements ICommonService {
private
String
qrcodePrefix
;
@Autowired
@Lazy
private
RemindServiceImpl
remindServiceImpl
;
@Autowired
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DataDockServiceImpl.java
View file @
9af3f11b
...
...
@@ -374,7 +374,12 @@ public class DataDockServiceImpl {
useInfo
.
setIsNotEs
(
"1"
);
useInfo
.
setIsIntoManagement
(
Boolean
.
FALSE
);
useInfo
.
setRemark
(
remark
);
//useInfo.setEquState(EquimentEnum.ZAIYONG.getCode()+"");
if
(
Arrays
.
asList
(
"jg_his"
,
"jg_his_black"
,
"jg_his_xa"
,
"jg_his_black_pl"
,
"jg_his_pl"
).
contains
(
dataSource
)){
String
equState
=
Optional
.
ofNullable
(
equ
.
get
(
"EQU_STATE"
))
.
map
(
Object:
:
toString
)
.
orElse
(
String
.
valueOf
(
EquimentEnum
.
ZAIYONG
.
getCode
()));
useInfo
.
setEquState
(
equState
);
}
useInfo
.
setProjectContraptionId
(
Objects
.
toString
(
equ
.
get
(
"projectContraptionId"
),
""
));
useInfo
.
setIsNotXiXian
(
"0"
);
idxBizJgUseInfoService
.
save
(
useInfo
);
...
...
@@ -1859,6 +1864,7 @@ public class DataDockServiceImpl {
String
address
=
Objects
.
toString
(
equipInfo
.
get
(
"address"
),
null
);
String
usePlace
=
Objects
.
toString
(
equipInfo
.
get
(
"usePlace"
),
null
);
String
useDate
=
Objects
.
toString
(
equipInfo
.
get
(
"useDate"
),
null
);
String
equState
=
Objects
.
toString
(
equipInfo
.
get
(
"EQU_STATE"
),
null
);
return
new
EquipRequestParamsDto
().
setCompanyCode
(
company
.
getCompanyCode
().
split
(
"_"
)[
0
])
.
setProvince
(
province
)
.
setProvinceName
(
"陕西省"
)
...
...
@@ -1916,6 +1922,7 @@ public class DataDockServiceImpl {
.
setInspectUnitName
(
inspectUnitName
)
.
setStartLatitudeLongitude
(
toJSONString
(
equipInfo
.
get
(
"startLatitudeLongitude"
)))
.
setEndLatitudeLongitude
(
toJSONString
(
equipInfo
.
get
(
"endLatitudeLongitude"
)))
.
setEquState
(
equState
)
.
setEquCode
(
installationNoticeService
.
generateEquCode
(
equListCode
,
equCategoryCode
,
equDefineCode
,
new
Date
(),
receiveOrgCode
));
}
...
...
@@ -2002,7 +2009,7 @@ public class DataDockServiceImpl {
useInfo
.
setCreateDate
(
new
Date
());
useInfo
.
setDataSource
(
paramsDto
.
getDataSource
());
useInfo
.
setIsIntoManagement
(
Boolean
.
TRUE
);
useInfo
.
setEquState
(
EquimentEnum
.
ZAIYONG
.
getCode
().
toString
(
));
useInfo
.
setEquState
(
Optional
.
ofNullable
(
paramsDto
.
getEquState
()).
orElse
(
String
.
valueOf
(
EquimentEnum
.
ZAIYONG
.
getCode
())
));
useInfo
.
setUseUnitCreditCode
(
paramsDto
.
getCompanyCode
());
useInfo
.
setUseUnitName
(
paramsDto
.
getCompanyName
());
useInfo
.
setProjectContraption
(
paramsDto
.
getProjectContraption
());
...
...
@@ -2110,7 +2117,8 @@ public class DataDockServiceImpl {
esEquipmentDto
.
setEQU_DEFINE_CODE
(
paramsDto
.
getEquDefineCode
());
esEquipmentDto
.
setEQU_DEFINE
(
paramsDto
.
getEquDefineName
());
esEquipmentDto
.
setSTATUS
(
"已认领"
);
esEquipmentDto
.
setEQU_STATE
(
EquimentEnum
.
ZAIYONG
.
getCode
());
esEquipmentDto
.
setEQU_STATE
(
Optional
.
ofNullable
(
paramsDto
.
getEquState
())
.
map
(
Integer:
:
valueOf
).
orElse
(
EquimentEnum
.
ZAIYONG
.
getCode
()));
esEquipmentDto
.
setUSC_UNIT_CREDIT_CODE
(
pipeline
.
getUscUnitCreditCode
());
esEquipmentDto
.
setUSC_UNIT_NAME
(
pipeline
.
getUscUnitName
());
esEquipmentDto
.
setPROJECT_CONTRAPTION
(
paramsDto
.
getProjectContraption
());
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
View file @
9af3f11b
...
...
@@ -62,6 +62,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.sql.Timestamp
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.atomic.AtomicInteger
;
...
...
@@ -1512,13 +1513,17 @@ public class DataHandlerServiceImpl {
.
select
(
IdxBizJgFactoryInfo:
:
getRecord
,
IdxBizJgFactoryInfo:
:
getProduceUnitCreditCode
));
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
queryNewestDetailByRecord
(
record
);
IdxBizJgMaintenanceRecordInfo
lastMaintenanceRecordInfo
=
maintenanceRecordInfoService
.
queryNewestDetailByRecord
(
record
);
esEquipmentInfo
.
setINSPECT_DATE
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
inspectionDetectionInfo
.
getInspectDate
()
:
null
);
esEquipmentInfo
.
setNEXT_INSPECT_DATE
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
inspectionDetectionInfo
.
getNextInspectDate
()
:
null
);
try
{
esEquipmentInfo
.
setINSPECT_DATE
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
inspectionDetectionInfo
.
getInspectDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
:
null
);
esEquipmentInfo
.
setNEXT_INSPECT_DATE
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
inspectionDetectionInfo
.
getNextInspectDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
:
null
);
esEquipmentInfo
.
setCreateDate
(
useInfo
.
getCreateDate
()
!=
null
?
useInfo
.
getCreateDate
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDateTime
()
:
null
);
}
catch
(
Exception
e
)
{
log
.
error
(
"时区转换失败:{}"
,
record
,
e
);
}
esEquipmentInfo
.
setDesignUnitCreditCode
(
designInfo
.
getDesignUnitCreditCode
());
esEquipmentInfo
.
setMAINTAIN_UNIT
(
lastMaintenanceRecordInfo
.
getMeUnitCreditCode
());
esEquipmentInfo
.
setMAINTAIN_UNIT_NAME
(
lastMaintenanceRecordInfo
.
getMeUnitName
());
esEquipmentInfo
.
setDesignUnitName
(
designInfo
.
getDesignUnitName
());
esEquipmentInfo
.
setCreateDate
(
useInfo
.
getCreateDate
());
esEquipmentInfo
.
setProduceUnitCreditCode
(
factoryInfo
.
getProduceUnitCreditCode
());
esEquipmentInfo
.
setInspections
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
?
Collections
.
singletonList
(
BeanUtil
.
copyProperties
(
inspectionDetectionInfo
,
ESEquipmentInfo
.
Inspection
.
class
))
:
new
ArrayList
<>());
esEquipmentInfo
.
setMaintenances
(
lastMaintenanceRecordInfo
.
getSequenceNbr
()
!=
null
?
Collections
.
singletonList
(
BeanUtil
.
copyProperties
(
lastMaintenanceRecordInfo
,
ESEquipmentInfo
.
Maintenance
.
class
))
:
new
ArrayList
<>());
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgProjectContraptionServiceImplService.java
View file @
9af3f11b
...
...
@@ -38,6 +38,7 @@ import lombok.extern.slf4j.Slf4j;
import
lombok.var
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -102,6 +103,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
@Autowired
private
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
;
@Autowired
@Lazy
private
CommonServiceImpl
commonService
;
@Autowired
private
JgVehicleInformationMapper
jgVehicleInformationMapper
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
9af3f11b
...
...
@@ -3875,7 +3875,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
@Override
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
,
timeoutMills
=
6000000
)
public
Object
savePressureVesselData
(
Map
<
String
,
Object
>
paramMap
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
...
...
@@ -3950,10 +3950,15 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
useInfo
.
setCreateDate
(
new
Date
());
String
source
=
equipInfoDto
.
getDataSource
();
useInfo
.
setDataSource
(
"his"
.
equals
(
source
)
?
"jg_his"
:
"black"
.
equals
(
source
)
?
"jg_his_black"
:
"jg"
);
// 区分历史设备和新增设备
useInfo
.
setEquState
(
null
);
useInfo
.
setIsIntoManagement
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
()));
// 历史气瓶导入为已纳管设备
// 历史气瓶导入设备状态为在用
useInfo
.
setEquState
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
())
?
EquimentEnum
.
ZAIYONG
.
getCode
().
toString
()
:
EquimentEnum
.
WEIDENGJI
.
getCode
().
toString
());
String
equState
=
"his"
.
equals
(
equipInfoDto
.
getDataSource
())
?
(
Optional
.
ofNullable
(
equipInfoDto
.
getEquState
())
.
filter
(
s
->
!
s
.
isEmpty
())
.
orElse
(
String
.
valueOf
(
EquimentEnum
.
ZAIYONG
.
getCode
())))
:
String
.
valueOf
(
EquimentEnum
.
WEIDENGJI
.
getCode
());
useInfo
.
setEquState
(
equState
);
// 使用单位信息
if
(
"个人主体"
.
equals
(
company
.
getCompanyType
()))
{
useInfo
.
setUseUnitCreditCode
(
company
.
getCompanyCode
().
split
(
"_"
)[
1
]);
...
...
@@ -4085,7 +4090,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
esEquipmentDto
.
setEQU_DEFINE
(
equipInfoDto
.
getEquDefine
());
esEquipmentDto
.
setINFORMATION_SITUATION
(
otherInfo
.
getInformationSituation
());
esEquipmentDto
.
setSTATUS
(
"已认领"
);
esEquipmentDto
.
setEQU_STATE
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
())
?
EquimentEnum
.
ZAIYONG
.
getCode
()
:
EquimentEnum
.
WEIDENGJI
.
getCode
(
));
esEquipmentDto
.
setEQU_STATE
(
Integer
.
valueOf
(
equState
));
// 使用单位信息
if
(
"个人主体"
.
equals
(
company
.
getCompanyType
()))
{
...
...
@@ -4395,9 +4400,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(
"his"
.
equals
(
equipmentInfoForm
.
get
(
"DATA_SOURCE"
)))
{
dto
.
setReceiveOrgCode
(((
String
)
equipmentInfoForm
.
get
(
"RECEIVE_ORG_CODE"
)).
split
(
"_"
)[
0
]);
dto
.
setReceiveOrgName
(((
String
)
equipmentInfoForm
.
get
(
"RECEIVE_ORG_CODE"
)).
split
(
"_"
)[
1
]);
dto
.
setOrgBranchCode
(
equipmentInfoForm
.
getOrDefault
(
"orgBranchCode"
,
""
).
toString
());
dto
.
setOrgBranchCode
(
Optional
.
ofNullable
(
equipmentInfoForm
.
get
(
"orgBranchCode"
)).
map
(
Object:
:
toString
).
orElse
(
""
));
dto
.
setEquState
(
Optional
.
ofNullable
(
equipmentInfoForm
.
get
(
"EQU_STATE"
)).
map
(
Object:
:
toString
).
orElse
(
""
));
}
dto
.
setPossession
(
(
String
)
equipmentInfoForm
.
get
(
"VEHICLE_APANAGE
"
));
dto
.
setPossession
(
Optional
.
ofNullable
(
equipmentInfoForm
.
get
(
"VEHICLE_APANAGE"
)).
map
(
Object:
:
toString
).
orElse
(
"
"
));
return
dto
;
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
View file @
9af3f11b
...
...
@@ -1889,7 +1889,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
param
.
put
(
"ADDRESS"
,
dataMap
.
getOrDefault
(
"address"
,
""
));
param
.
put
(
"USE_PLACE"
,
usePlace
);
param
.
put
(
"STATUS"
,
"已认领"
);
param
.
put
(
"EQU_STATE"
,
1
);
param
.
put
(
"EQU_STATE"
,
Arrays
.
asList
(
"1"
,
"2"
).
contains
(
jgUseRegistration
.
getRegType
())
&&
useInfo
.
getEquState
()
!=
null
?
useInfo
.
getEquState
()
:
1
);
// 更新es的下次检验日期
param
.
put
(
"NEXT_INSPECT_DATE"
,
this
.
castDate2TimeStr
(
dataMap
.
getString
(
"nextInspectDate"
)));
param
.
put
(
"USE_INNER_CODE"
,
useInfo
.
getUseInnerCode
());
...
...
@@ -4279,7 +4280,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useInfo
.
setORegDate
(
String
.
valueOf
(
map
.
get
(
"oRegDate"
)));
useInfo
.
setORegUnit
(
String
.
valueOf
(
map
.
get
(
"oRegUnit"
)));
// 历史平台登记,将设备状态改为在用
useInfo
.
setEquState
(
EquimentEnum
.
ZAIYONG
.
getCode
().
toString
());
if
(!
map
.
containsKey
(
"EQU_STATE"
)){
useInfo
.
setEquState
(
EquimentEnum
.
ZAIYONG
.
getCode
().
toString
());
}
usePlace
=
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
+
"/"
+
useInfo
.
getStreetName
();
useInfoMapper
.
updateById
(
useInfo
);
}
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/vo/EquipInfoVo.java
0 → 100644
View file @
9af3f11b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yeejoin.amos.boot.module.jg.api.annotation.DictCode2DictName
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
* 设备
*/
@Data
public
class
EquipInfoVo
{
@ExcelProperty
(
"管辖机构名称"
)
private
String
ORG_BRANCH_NAME
;
@ExcelProperty
(
"使用单位名称"
)
private
String
USE_UNIT_NAME
;
@ExcelProperty
(
"使用单位统一信用代码"
)
private
String
USE_UNIT_CREDIT_CODE
;
@ExcelProperty
(
"设备种类名称"
)
private
String
EQU_LIST
;
@ExcelProperty
(
"设备类别名称"
)
private
String
EQU_CATEGORY
;
@ExcelProperty
(
"设备品种名称"
)
private
String
EQU_DEFINE
;
@ExcelProperty
(
"使用登记证编号"
)
private
String
USE_ORG_CODE
;
@ExcelProperty
(
"96333电梯码"
)
private
String
CODE96333
;
@ExcelProperty
(
"设备代码"
)
private
String
EQU_CODE
;
@ExcelProperty
(
"监管码"
)
private
String
SUPERVISORY_CODE
;
@ExcelProperty
(
"使用场所"
)
private
String
USE_PLACE
;
@ExcelProperty
(
"详细地址"
)
private
String
ADDRESS
;
@ExcelProperty
(
"设备状态"
)
private
Integer
EQU_STATE
;
@ExcelProperty
(
"认领状态"
)
private
String
STATUS
;
@ExcelProperty
(
"安全管理员"
)
private
String
SAFETY_MANAGER
;
@ExcelProperty
(
"安全管理员电话"
)
private
String
PHONE
;
@ExcelProperty
(
"维保单位统一信用代码"
)
private
String
MAINTAIN_UNIT
;
@ExcelProperty
(
"维保单位名称"
)
private
String
MAINTAIN_UNIT_NAME
;
@ExcelProperty
(
"单位内部编号"
)
private
String
USE_INNER_CODE
;
@ExcelProperty
(
"出场编号"
)
private
String
FACTORY_NUM
;
@ExcelProperty
(
"制造单位名称"
)
private
String
PRODUCE_UNIT_NAME
;
@ExcelProperty
(
"安改维单位统一信用代码"
)
private
String
USC_UNIT_CREDIT_CODE
;
@ExcelProperty
(
"安改维单位统名称"
)
private
String
USC_UNIT_NAME
;
@ExcelProperty
(
"投用日期"
)
private
Date
USC_DATE
;
@ExcelProperty
(
"产品名称"
)
private
String
PRODUCT_NAME
;
@ExcelProperty
(
"设备品牌"
)
private
String
BRAND_NAME
;
@ExcelProperty
(
"设备型号"
)
private
String
EQU_TYPE
;
@ExcelProperty
(
"制造日期"
)
private
String
PRODUCE_DATE
;
@ExcelProperty
(
"设备来源"
)
private
String
DATA_SOURCE
;
@ExcelProperty
(
"是否车用气瓶"
)
private
String
WHETHER_VEHICLE_CYLINDER
;
@ExcelProperty
(
"是否撬装式压力容器"
)
private
String
WHETHER_SKID_MOUNTED_PRESSURE_VESSEL
;
@ExcelProperty
(
"气瓶分类"
)
private
String
CYLINDER_CATEGORY
;
@ExcelProperty
(
"是否纳管"
)
private
Boolean
IS_INTO_MANAGEMENT
;
@ExcelProperty
(
"工程装置"
)
private
String
PROJECT_CONTRAPTION
;
@ExcelProperty
(
"信息化"
)
private
String
INFORMATION_SITUATION
;
@ExcelProperty
(
"工程装置id"
)
private
String
projectContraptionId
;
@ExcelProperty
(
"数据质量等级"
)
private
Integer
dataQualityScore
;
@ExcelProperty
(
"设计单位统一信用代码"
)
private
String
designUnitCreditCode
;
@ExcelProperty
(
"设计单位名称"
)
private
String
designUnitName
;
@ExcelProperty
(
"制造单位统一社会信用代码"
)
private
String
produceUnitCreditCode
;
/**
* 最新一条检验信息
*/
@ExcelProperty
(
""
)
private
List
<
Inspection
>
inspections
;
/**
* 最新一条维保信息
*/
@ExcelProperty
(
""
)
private
List
<
Maintenance
>
maintenances
;
/**
* 技术参数
*/
@ExcelProperty
(
""
)
private
List
<
TechParam
>
techParams
;
@Data
public
static
class
TechParam
{
@ExcelProperty
(
""
)
private
String
paramKey
;
@ExcelProperty
(
""
)
private
String
paramLabel
;
@ExcelProperty
(
""
)
private
String
strValue
;
@ExcelProperty
(
""
)
private
Long
longValue
;
@ExcelProperty
(
""
)
private
Double
doubleValue
;
@ExcelProperty
(
""
)
private
Boolean
boolValue
;
@ExcelProperty
(
""
)
private
Date
dateValue
;
}
@Data
public
static
class
Inspection
{
@ExcelProperty
(
""
)
private
String
sequenceNbr
;
/**
* 检验类型
*/
@ExcelProperty
(
""
)
private
String
inspectType
;
/**
* 检验机构名称
*/
@ExcelProperty
(
""
)
private
String
inspectOrgName
;
/**
* 检验人员
*/
@ExcelProperty
(
""
)
private
String
inspectStaff
;
/**
* 检验结论
*/
@ExcelProperty
(
""
)
private
String
inspectConclusion
;
/**
* 检验日期
*/
@ExcelProperty
(
""
)
private
Date
inspectDate
;
/**
* 下次检验日期
*/
@ExcelProperty
(
""
)
private
Date
nextInspectDate
;
/**
* 检验机构编码
*/
@ExcelProperty
(
""
)
private
String
inspectOrgCode
;
/**
* 报告编号
*/
@ExcelProperty
(
""
)
private
String
inspectReportNo
;
}
@Data
public
static
class
Maintenance
{
@ExcelProperty
(
""
)
private
String
sequenceNbr
;
/**
* 维保单位统一社会信用代码
*/
@ExcelProperty
(
""
)
private
String
meUnitCreditCode
;
/**
* 维保单位名称
*/
@ExcelProperty
(
""
)
private
String
meUnitName
;
/**
* 维保备案合同
*/
@ExcelProperty
(
""
)
private
String
repairInform
;
/**
* 维保合同开始日期
*/
@ExcelProperty
(
""
)
private
Date
informStart
;
/**
* 维保合同结束日期
*/
@ExcelProperty
(
""
)
private
Date
informEnd
;
/**
* 维保负责人姓名
*/
@ExcelProperty
(
""
)
private
String
meMaster
;
/**
* 维保负责人身份证
*/
@ExcelProperty
(
""
)
private
String
meMasterId
;
/**
* 紧急救援电话
*/
@ExcelProperty
(
""
)
private
String
emergencyCall
;
/**
* 维保周期
*/
@ExcelProperty
(
""
)
private
String
meCycle
;
/**
* 大修周期
*/
@ExcelProperty
(
""
)
private
String
overhaulCycle
;
/**
* 24小时维保电话
*/
@ExcelProperty
(
""
)
private
String
me24Telephone
;
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/ComprehensiveStatisticalAnalysisController.java
View file @
9af3f11b
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.RequestContextWrapper
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.ComprehensiveStatisticalAnalysisServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -15,6 +16,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
/**
* 综合统计分析API
...
...
@@ -80,5 +82,25 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryForPage
(
jsonObject
));
}
/**
* 综合统计分析接口-导出
*
* @param map 入参
* @return result
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/export"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"综合统计分析接口-导出"
,
notes
=
"综合统计分析接口-导出"
)
public
ResponseModel
<
String
>
export
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
String
uuid
=
UUID
.
randomUUID
().
toString
();
statisticalAnalysisService
.
startDownLoadMsg
(
"综合统计分析设备列表"
,
uuid
);
RequestContextWrapper
contextWrapper
=
RequestContextWrapper
.
capture
();
new
Thread
(()
->
{
contextWrapper
.
apply
();
statisticalAnalysisService
.
export
(
uuid
,
new
JSONObject
(
map
));
}).
start
();
return
ResponseHelper
.
buildResponse
(
"后台处理中,请注意下载!"
);
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
View file @
9af3f11b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.dto.TechParamItem
;
import
com.yeejoin.amos.boot.module.common.biz.utils.TechParamUtil
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.MinioUtils
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.AdvanceSearchEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.ConditionEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.StatisticalAnalysisEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.TzsCustomFilterMapper
;
import
com.yeejoin.amos.boot.module.statistics.api.vo.EquipInfoVo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -31,9 +35,13 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
...
...
@@ -53,14 +61,14 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
@Value
(
"classpath:/json/equipCategory.json"
)
private
Resource
equipCategory
;
@Autowired
private
TzsCustomFilterMapper
tzsCustomFilterMapper
;
@Autowired
private
DataDictionaryServiceImpl
dataDictionaryService
;
private
final
TzsCustomFilterMapper
tzsCustomFilterMapper
;
private
final
DataDictionaryServiceImpl
dataDictionaryService
;
private
final
EmqKeeper
emqKeeper
;
private
final
RestHighLevelClient
restHighLevelClient
;
private
final
String
DOWN_LOAD_START_TEMP
=
"{\"id\":\"%s\",\"status\":\"starting\",\"fileName\":\"%s\",\"time\":\"%s\"}"
;
private
final
String
DOWNLOAD_TOPIC
=
"/topic/download/excel/%s"
;
private
final
String
BUCKET_NAME
=
"upload"
;
private
final
String
UPLOAD_PATH
=
"/tzs/excelTempFile"
;
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
public
List
<
Map
<
String
,
Object
>>
queryEquipmentCategory
(
String
key
)
{
...
...
@@ -393,4 +401,54 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
return
result
;
}
/**
* 开始下载 发送消息
*/
public
void
startDownLoadMsg
(
String
fileName
,
String
uuid
)
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
DOWNLOAD_TOPIC
,
RequestContext
.
getToken
()),
String
.
format
(
DOWN_LOAD_START_TEMP
,
uuid
,
fileName
,
new
Date
().
getTime
()).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
}
}
/**
* 发送主题消息,给企业推送excel 结束下载提醒
*
* @param topic 主体格式为: /download/excel/${token}
* @param jsonObject 文件名称 + excel文件路径(minio)
*/
public
void
sendDownLoadExcelMsg
(
String
topic
,
JSONObject
jsonObject
)
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
topic
,
JSONObject
.
toJSONString
(
jsonObject
).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
}
}
/**
* 综合统计分析接口-导出
* @param uuid uuid
* @param filter 过滤条件
*/
public
void
export
(
String
uuid
,
JSONObject
filter
)
{
// 查询数据
JSONObject
jsonData
=
this
.
queryForPage
(
filter
);
// 类型转化
List
<
EquipInfoVo
>
exportData
=
JSONArray
.
parseArray
(
JSON
.
toJSONString
(
jsonData
.
get
(
"pageData"
)),
EquipInfoVo
.
class
);
// 转化附件
MultipartFile
templateExcelFile
=
ExcelUtil
.
createTemplateExcelFile
(
"综合统计分析设备列表数据"
,
"综合统计分析设备列表"
,
exportData
,
EquipInfoVo
.
class
,
null
,
false
);
// 上传minio服务器
String
urlString
=
MinioUtils
.
uploadExcelFile
(
templateExcelFile
,
BUCKET_NAME
,
UPLOAD_PATH
);
// 提醒下载
this
.
sendDownLoadExcelMsg
(
String
.
format
(
DOWNLOAD_TOPIC
,
RequestContext
.
getToken
()),
new
JSONObject
()
.
fluentPut
(
"id"
,
uuid
)
.
fluentPut
(
"status"
,
"done"
)
.
fluentPut
(
"fileName"
,
"综合统计分析设备列表"
)
.
fluentPut
(
"url"
,
urlString
)
.
fluentPut
(
"time"
,
new
Date
().
getTime
()));
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/utils/MinioUtils.java
0 → 100644
View file @
9af3f11b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
utils
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Map
;
public
class
MinioUtils
{
/**
* 上传excel文件到minio服务器
*
* @param templateExcelFile 文件
* @param bucketName 存储桶名称
* @param bucketName 文件名称
* @return minio文件路径
*/
public
static
String
uploadExcelFile
(
MultipartFile
templateExcelFile
,
String
bucketName
,
String
uploadPath
)
{
FeignClientResult
<
Map
<
String
,
String
>>
uploadResult
=
Systemctl
.
fileStorageClient
.
updateBucketFile
(
templateExcelFile
,
bucketName
,
uploadPath
);
String
urlString
=
""
;
if
(
uploadResult
!=
null
&&
uploadResult
.
getResult
()
!=
null
)
{
for
(
String
s
:
uploadResult
.
getResult
().
keySet
())
{
urlString
=
s
;
}
}
return
urlString
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/converter/QualificationLevelConverter.java
0 → 100644
View file @
9af3f11b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
QualificationLevelConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
CODE_MAP
=
new
HashMap
<>();
static
{
CODE_MAP
.
put
(
"检验员"
,
"JYY"
);
CODE_MAP
.
put
(
"检验师"
,
"JYS"
);
CODE_MAP
.
put
(
"高级检验师"
,
"GJJYS"
);
}
@Override
public
Class
supportJavaTypeKey
()
{
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
String
cellDataStr
=
cellData
.
getStringValue
();
return
CODE_MAP
.
get
(
cellDataStr
);
}
@Override
public
CellData
convertToExcelData
(
String
value
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/converter/QualificationProjectConverter.java
0 → 100644
View file @
9af3f11b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
QualificationProjectConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
CODE_MAP
=
new
HashMap
<>();
static
{
CODE_MAP
.
put
(
"机电类设备检验"
,
"JDG"
);
CODE_MAP
.
put
(
"承压类设备检验"
,
"CYG"
);
CODE_MAP
.
put
(
"大型游乐设施检验"
,
"YLY"
);
CODE_MAP
.
put
(
"型式试验"
,
"CXY"
);
CODE_MAP
.
put
(
"锅炉检验"
,
"GLY"
);
CODE_MAP
.
put
(
"锅炉能效测试"
,
"GNY"
);
CODE_MAP
.
put
(
"锅炉水(介)质检验"
,
"GSY"
);
CODE_MAP
.
put
(
"压力容器检验"
,
"RQY"
);
CODE_MAP
.
put
(
"气瓶检验"
,
"QPY"
);
CODE_MAP
.
put
(
"压力管道检验"
,
"GDY"
);
CODE_MAP
.
put
(
"电梯检验"
,
"DTY"
);
CODE_MAP
.
put
(
"起重机械检验"
,
"QZY"
);
CODE_MAP
.
put
(
"客运索道检验"
,
"SDY"
);
CODE_MAP
.
put
(
"场(厂)内专用机动车辆检验"
,
"CCY"
);
}
@Override
public
Class
supportJavaTypeKey
()
{
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
String
cellDataStr
=
cellData
.
getStringValue
();
return
CODE_MAP
.
get
(
cellDataStr
);
}
@Override
public
CellData
convertToExcelData
(
String
value
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/dto/CompanyUserImportDto.java
0 → 100644
View file @
9af3f11b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
dto
;
import
cn.afterturn.easypoi.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
com.alibaba.fastjson.JSONArray
;
import
com.yeejoin.amos.boot.module.tcm.api.converter.*
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.util.*
;
@Data
public
class
CompanyUserImportDto
{
@NotBlank
(
message
=
"姓名不能为空!"
)
@ExcelProperty
(
value
=
"姓名"
)
private
String
name
;
@NotBlank
(
message
=
"联系电话不能为空!"
)
@ExcelProperty
(
value
=
"联系电话"
)
private
String
phone
;
@NotBlank
(
message
=
"证件类型不能为空!"
)
@ExcelProperty
(
value
=
"证件类型"
,
converter
=
CertificateTypeConverter
.
class
)
private
String
certificateType
;
@NotBlank
(
message
=
"证件编号不能为空!"
)
@ExcelProperty
(
value
=
"证件编号"
)
private
String
certificateNum
;
@NotBlank
(
message
=
"人员类型不能为空!"
)
// @ExcelProperty(value = "人员类型", converter = PostTypeConverter.class)
@ExcelProperty
(
value
=
"人员类型"
)
private
String
post
;
@ExcelIgnore
private
String
newPost
;
// @ExcelProperty(value = "人员子类型", converter = PostTypeConverter.class)
@ExcelProperty
(
value
=
"人员子类型"
)
private
String
subPost
;
@ExcelProperty
(
value
=
"性别"
,
converter
=
GenderConverter
.
class
)
private
String
gender
;
@ExcelProperty
(
value
=
"出生日期"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
Date
birthday
;
@ExcelProperty
(
value
=
"学历"
,
converter
=
EducationConverter
.
class
)
private
String
education
;
@ExcelProperty
(
value
=
"住址"
)
private
String
address
;
@ExcelProperty
(
value
=
"邮箱"
)
private
String
email
;
@ExcelProperty
(
value
=
"职称"
)
private
String
jobTitle
;
@ExcelProperty
(
value
=
"专业"
)
private
String
speciality
;
@ExcelIgnore
()
private
JSONArray
permissionData66151
=
new
JSONArray
();
@ExcelIgnore
()
private
JSONArray
permissionData66152
=
new
JSONArray
();
@ExcelIgnore
()
private
JSONArray
permissionData6552
=
new
JSONArray
();
/**
* 检验资质信息
*/
@Data
public
static
class
InspectQualification
{
@NotBlank
(
message
=
"证件编号不能为空!"
)
@ExcelProperty
(
value
=
"证件编号"
)
private
String
certificateNum
;
@NotBlank
(
message
=
"发证机关不能为空!"
)
@ExcelProperty
(
value
=
"发证机关"
)
private
String
approvedOrgan
;
@NotBlank
(
message
=
"检验资质级别不能为空!"
)
@ExcelProperty
(
value
=
"级别"
,
converter
=
QualificationLevelConverter
.
class
)
private
String
permissionLevel
;
@NotBlank
(
message
=
"检验资质项目不能为空!"
)
@ExcelProperty
(
value
=
"项目"
,
converter
=
QualificationProjectConverter
.
class
)
private
String
permissionItem
;
@NotBlank
(
message
=
"检验资质发证日期不能为空!"
)
@ExcelProperty
(
value
=
"发证日期"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
String
issueDate
;
@NotBlank
(
message
=
"检验资质有效期不能为空!"
)
@ExcelProperty
(
value
=
"有效期"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
String
expiryDate
;
}
/**
* 检测资质信息
*/
@Data
public
static
class
TestingQualification
{
@NotBlank
(
message
=
"证件编号不能为空!"
)
@ExcelProperty
(
value
=
"证件编号"
)
private
String
certificateNum
;
@NotBlank
(
message
=
"发证机关不能为空!"
)
@ExcelProperty
(
value
=
"发证机关"
)
private
String
approvedOrgan
;
@NotBlank
(
message
=
"检测资质级别不能为空!"
)
@ExcelProperty
(
value
=
"级别"
,
converter
=
QualificationLevelConverter
.
class
)
private
String
permissionLevel
;
@NotBlank
(
message
=
"检测资质项目不能为空!"
)
@ExcelProperty
(
value
=
"项目"
,
converter
=
QualificationProjectConverter
.
class
)
private
String
permissionItem
;
@NotBlank
(
message
=
"检测资质发证日期不能为空!"
)
@ExcelProperty
(
value
=
"发证日期"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
String
issueDate
;
@NotBlank
(
message
=
"检测资质有效期不能为空!"
)
@ExcelProperty
(
value
=
"有效期"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
String
expiryDate
;
}
/**
* 作业人员资质信息
*/
@Data
public
static
class
OperatorQualifications
{
@NotBlank
(
message
=
"作业人员资质证件编号不能为空!"
)
@ExcelProperty
(
value
=
"证件编号"
)
private
String
certificateNum
;
@NotBlank
(
message
=
"作业人员资质发证机关不能为空!"
)
@ExcelProperty
(
value
=
"证书编号"
)
private
String
certNo
;
@NotBlank
(
message
=
"作业人员资质证书类型不能为空!"
)
@ExcelProperty
(
value
=
"发证机关"
)
private
String
approvedOrgan
;
@NotBlank
(
message
=
"作业人员资质证书类型不能为空!"
)
@ExcelProperty
(
value
=
"证书类型"
)
private
String
certType
;
@NotBlank
(
message
=
"作业人员资质作业项目不能为空!"
)
@ExcelProperty
(
value
=
"作业项目"
)
private
String
jobItemStr
;
@ExcelIgnore
private
JSONArray
jobItem
;
@ExcelProperty
(
value
=
"金属焊接操作-项目代号"
)
private
String
JSHJCZItemCode
;
@ExcelProperty
(
value
=
"非金属焊接操作-项目代号"
)
private
String
FJSHJCZItemCode
;
@ExcelProperty
(
value
=
"其他作业项目"
)
private
String
otherItem
;
@NotBlank
(
message
=
"检测资质发证日期不能为空!"
)
@ExcelProperty
(
value
=
"发证日期"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
String
issueDate
;
@NotBlank
(
message
=
"检测资质有效期不能为空!"
)
@ExcelProperty
(
value
=
"有效期"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
String
expiryDate
;
}
}
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 @
9af3f11b
...
...
@@ -85,6 +85,14 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
*/
ResponseModel
<?>
importUserBatch
(
MultipartFile
file
);
/**
* 企业人员导入
*
* @param file 导入的文件
* @return 失败时返回失败信息,提供时返回success
*/
ResponseModel
<?>
importCompanyUser
(
MultipartFile
file
,
ReginParams
reginParams
);
String
deletePersonSubtypeHistoricalData
();
List
<
DataDictionary
>
postByUnitType
(
CompanyBo
company
);
...
...
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 @
9af3f11b
...
...
@@ -382,6 +382,13 @@ public class TzsUserInfoController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/company/import"
)
@ApiOperation
(
value
=
"企业人员导入"
,
httpMethod
=
"POST"
,
notes
=
"企业人员导入"
)
public
ResponseModel
<?>
importCompanyUser
(
@RequestBody
MultipartFile
file
)
{
return
tzsUserInfoService
.
importCompanyUser
(
file
,
getSelectedOrgInfo
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/personnelTransferOut"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"人员转出:逻辑删除人员并删除关联的系统账号"
,
notes
=
"人员转出:逻辑删除人员并删除关联的系统账号"
)
public
ResponseModel
<
Boolean
>
personnelTransferOut
(
@RequestParam
(
value
=
"userSeqNbrs"
)
String
userSeqNbrs
)
{
...
...
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 @
9af3f11b
This diff is collapsed.
Click to expand it.
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/TzsUserPermissionServiceImpl.java
View file @
9af3f11b
...
...
@@ -109,7 +109,7 @@ public class TzsUserPermissionServiceImpl extends BaseService<TzsUserPermissionD
JSONArray
permissionData6552
=
userInfoDto
.
getPermissionData6552
();
if
(!
ValidationUtil
.
isEmpty
(
permissionData6552
))
{
permissionData6552
.
forEach
(
item
->
{
JSONObject
itempermissionData6552
=
(
JSONObject
)
item
;
JSONObject
itempermissionData6552
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
item
))
;
// 前端无法处理后端手动判断
// 作业项目中含有【金属焊接操作】,则【金属焊接操作-项目代号】必填
// 作业项目中含有【非金属焊接操作】,则【非金属焊接操作-项目代号】必填
...
...
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