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
4621beaa
Commit
4621beaa
authored
Sep 15, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_register
parents
95cd3508
85a3950d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
706 additions
and
253 deletions
+706
-253
CommonRegionDto.java
...com/yeejoin/amos/boot/biz/common/dto/CommonRegionDto.java
+27
-0
CommonVideoDto.java
.../com/yeejoin/amos/boot/biz/common/dto/CommonVideoDto.java
+4
-0
TzsAppController.java
...boot/module/elevator/biz/controller/TzsAppController.java
+10
-10
dbte.app.yml
...mos-boot-module-96333-biz/src/main/resources/dbte.app.yml
+29
-0
BaseEnterpriseVideoServiceImpl.java
...mmon/biz/service/impl/BaseEnterpriseVideoServiceImpl.java
+0
-0
TzsAppController.java
...boot/module/cylinder/biz/controller/TzsAppController.java
+10
-10
TzsAppController.java
...mos/boot/module/jczs/biz/controller/TzsAppController.java
+10
-10
EquipInfoCylinderExcelDto.java
...mos/boot/module/jg/api/dto/EquipInfoCylinderExcelDto.java
+35
-29
IsIntoManagementEnum.java
...n/amos/boot/module/jg/api/enums/IsIntoManagementEnum.java
+29
-0
JgUseRegistrationManageMapper.java
...t/module/jg/api/mapper/JgUseRegistrationManageMapper.java
+2
-0
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+9
-8
JgMaintenanceContractMapper.xml
...src/main/resources/mapper/JgMaintenanceContractMapper.xml
+0
-5
JgUseRegistrationManageMapper.xml
...c/main/resources/mapper/JgUseRegistrationManageMapper.xml
+96
-5
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+0
-0
SafetyProblemTracingMapper.xml
.../src/main/resources/mapper/SafetyProblemTracingMapper.xml
+50
-26
ChangeEquipImpactCertListener.java
...iz/edit/event/listener/ChangeEquipImpactCertListener.java
+17
-2
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+15
-1
EquipChangeDataUpdateServiceImpl.java
.../edit/process/equip/EquipChangeDataUpdateServiceImpl.java
+4
-1
SingleEquipChangeProcess.java
...e/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
+6
-2
SingleProjectEquipChangeProcess.java
...z/edit/process/equip/SingleProjectEquipChangeProcess.java
+5
-6
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+2
-0
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+18
-11
JgChangeVehicleRegistrationUnitServiceImpl.java
...vice/impl/JgChangeVehicleRegistrationUnitServiceImpl.java
+1
-1
JgUseRegistrationManageServiceImpl.java
.../biz/service/impl/JgUseRegistrationManageServiceImpl.java
+14
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+3
-2
WordTemplateUtils.java
...join/amos/boot/module/jg/biz/utils/WordTemplateUtils.java
+15
-0
EquipAdvanceSearchEnum.java
...t/module/statistics/api/enums/EquipAdvanceSearchEnum.java
+2
-0
ZLDPStatisticsController.java
...le/statistcs/biz/controller/ZLDPStatisticsController.java
+1
-2
AQZSDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
+2
-2
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+4
-0
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+17
-7
JYJCDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/JYJCDPStatisticsServiceImpl.java
+1
-1
ZLDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
+3
-0
TzBaseEnterpriseInfoDto.java
...amos/boot/module/tcm/api/dto/TzBaseEnterpriseInfoDto.java
+3
-0
CompanyLevelEnum.java
...join/amos/boot/module/tcm/api/enums/CompanyLevelEnum.java
+2
-9
TzBaseEnterpriseInfoMapper.java
...oot/module/tcm/api/mapper/TzBaseEnterpriseInfoMapper.java
+4
-0
ITzBaseEnterpriseInfoService.java
.../module/tcm/api/service/ITzBaseEnterpriseInfoService.java
+1
-1
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+36
-3
HistoryDataDealController.java
.../module/tcm/biz/controller/HistoryDataDealController.java
+7
-1
TzsAppController.java
...amos/boot/module/tcm/biz/controller/TzsAppController.java
+10
-10
PlatformUserTopicMessage.java
...oot/module/tcm/biz/listener/PlatformUserTopicMessage.java
+1
-1
HistoryDataDealServiceImpl.java
...dule/tcm/biz/service/impl/HistoryDataDealServiceImpl.java
+88
-6
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+25
-26
TzsBaseIndividualityServiceImpl.java
...tcm/biz/service/impl/TzsBaseIndividualityServiceImpl.java
+1
-0
TzsBaseInstitutionServiceImpl.java
...e/tcm/biz/service/impl/TzsBaseInstitutionServiceImpl.java
+1
-16
RegUnitInfoServiceImpl.java
...dule/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+25
-26
IdxBizJgProjectContraption.java
...oot/module/ymt/api/entity/IdxBizJgProjectContraption.java
+5
-2
EquipmentCategoryMapper.java
...s/boot/module/ymt/api/mapper/EquipmentCategoryMapper.java
+1
-0
IEquipmentCategoryService.java
...oot/module/ymt/api/service/IEquipmentCategoryService.java
+2
-0
EquipmentCategoryMapper.xml
...api/src/main/resources/mapper/EquipmentCategoryMapper.xml
+11
-0
IdxBizJgProjectContraptionMapper.xml
...ain/resources/mapper/IdxBizJgProjectContraptionMapper.xml
+0
-0
EquipmentCategoryController.java
...odule/ymt/biz/controller/EquipmentCategoryController.java
+12
-0
TzsAppController.java
...amos/boot/module/ymt/biz/controller/TzsAppController.java
+10
-10
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+20
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/dto/CommonRegionDto.java
0 → 100644
View file @
4621beaa
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
/**
* @author Administrator
*/
@Data
@ApiModel
(
value
=
"CommonRegionDto"
,
description
=
"通用区域信息"
)
public
class
CommonRegionDto
{
/**
* 区域代码
*/
private
String
indexCode
;
/**
* 父级区域代码
*/
private
String
parentIndexCode
;
/**
* 区域代码(摄像头所属企业统一信用代码)
*/
private
String
useUnitCode
;
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/dto/CommonVideoDto.java
View file @
4621beaa
...
@@ -40,4 +40,8 @@ public class CommonVideoDto {
...
@@ -40,4 +40,8 @@ public class CommonVideoDto {
*/
*/
private
Integer
quality
;
private
Integer
quality
;
/**
* 设备所属使用登记证编号
*/
private
String
useRegistrationCode
;
}
}
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/controller/TzsAppController.java
View file @
4621beaa
...
@@ -90,16 +90,16 @@ public class TzsAppController {
...
@@ -90,16 +90,16 @@ public class TzsAppController {
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipInfoBySuperviseCode
(
supervisoryCode
));
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipInfoBySuperviseCode
(
supervisoryCode
));
}
}
/**
//
/**
* 登录
//
* 登录
* @return
//
* @return
*/
//
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
//
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping
(
value
=
"/mobile/login"
)
//
@PostMapping(value = "/mobile/login")
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"小程序登录"
,
notes
=
"小程序登录"
)
//
@ApiOperation(httpMethod = "POST", value = "小程序登录", notes = "小程序登录")
public
ResponseModel
<
Map
<
String
,
Object
>>
login
(
@RequestBody
MobileLoginParam
param
)
{
//
public ResponseModel<Map<String, Object>> login(@RequestBody MobileLoginParam param) {
return
ResponseHelper
.
buildResponse
(
appService
.
login
(
param
));
//
return ResponseHelper.buildResponse(appService.login(param));
}
//
}
/**
/**
* 小程序企业详情
* 小程序企业详情
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/resources/dbte.app.yml
0 → 100644
View file @
4621beaa
channals
:
id
:
name
:
zookeeper
auth
:
ADF248A492D2E89B943B3626DE32DB7E6619CD10B5BCA9502AC76AFA624104D4A5AAF320B865300FCF49E88D433564312E4B387931E4E14F5EE60A1CCCE3C9BF41C7500CE9E199DA134FD99355A628B1
host
:
192.169.82.2
path
:
/688ca77ef14c054d94cb8e19/metadata/logic_db/rule
port
:
'
2281'
scheme
:
digest
keys
:
configSignature
:
14666B5866B08058360FB75FF264B4143EBDFC8FCF9888C9CAAFD6B1EBADF02EA1CD85E696A0697D1760BDAD53CF29B668A47713B6C3EF106F736812A647955E
logMacKey
:
4B2701E612E5A376E7B9980722105EF9BEE8F494F81E666A0AEC70BCA18FEF2C
sm2PrvKey
:
B79F0CB80D6C5D18CC254DA9817B86EEA662A3EFE0A3B3BDA5C1C155564FC6EDFC342D511AD50C9030DD7DB5A9D122AB
sm2PubKey
:
046AE3DE41488D7BE1AA5A7C98ADB320B0ECD392DB295A30B5A1A0BB6320FBC9296775BF14319FFB0A6690060DC370EB33C983F43C37E50A196705D371CBA8D68E
userPIN
:
3517382078297947681464213757066358386295150902737251965376941307
userPINCtx
:
sdkconfig
:
invokeMode
:
local
timeInterval
:
6000
tracing
:
host
:
port
:
scheme
:
unionServer
:
applicationID
:
688ca77e4e31c23383e1ab3e
applicationKey
:
3BA3D34E2192A53163B08236C17FD77543EE707C2C94559BE08E9B12D8B2B80264967D0AFAEBDE7A26D0E696A1619727
clientId
:
IcFjcOgrSkWoTxun
clientSecret
:
uOKWDyGd1KVjG9JTxF59WrOAuFz9EN0i
serverCloudCipherIp
:
172.30.42.218
serverCloudCipherKeyPort
:
'
5443'
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/BaseEnterpriseVideoServiceImpl.java
View file @
4621beaa
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/biz/controller/TzsAppController.java
View file @
4621beaa
...
@@ -90,16 +90,16 @@ public class TzsAppController {
...
@@ -90,16 +90,16 @@ public class TzsAppController {
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipInfoBySuperviseCode
(
supervisoryCode
));
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipInfoBySuperviseCode
(
supervisoryCode
));
}
}
/**
//
/**
* 登录
//
* 登录
* @return
//
* @return
*/
//
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
//
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping
(
value
=
"/mobile/login"
)
//
@PostMapping(value = "/mobile/login")
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"小程序登录"
,
notes
=
"小程序登录"
)
//
@ApiOperation(httpMethod = "POST", value = "小程序登录", notes = "小程序登录")
public
ResponseModel
<
Map
<
String
,
Object
>>
login
(
@RequestBody
MobileLoginParam
param
)
{
//
public ResponseModel<Map<String, Object>> login(@RequestBody MobileLoginParam param) {
return
ResponseHelper
.
buildResponse
(
appService
.
login
(
param
));
//
return ResponseHelper.buildResponse(appService.login(param));
}
//
}
/**
/**
* 小程序企业详情
* 小程序企业详情
...
...
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-biz/src/main/java/com/yeejoin/amos/boot/module/jczs/biz/controller/TzsAppController.java
View file @
4621beaa
...
@@ -90,16 +90,16 @@ public class TzsAppController {
...
@@ -90,16 +90,16 @@ public class TzsAppController {
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipInfoBySuperviseCode
(
supervisoryCode
));
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipInfoBySuperviseCode
(
supervisoryCode
));
}
}
/**
//
/**
* 登录
//
* 登录
* @return
//
* @return
*/
//
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
//
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping
(
value
=
"/mobile/login"
)
//
@PostMapping(value = "/mobile/login")
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"小程序登录"
,
notes
=
"小程序登录"
)
//
@ApiOperation(httpMethod = "POST", value = "小程序登录", notes = "小程序登录")
public
ResponseModel
<
Map
<
String
,
Object
>>
login
(
@RequestBody
MobileLoginParam
param
)
{
//
public ResponseModel<Map<String, Object>> login(@RequestBody MobileLoginParam param) {
return
ResponseHelper
.
buildResponse
(
appService
.
login
(
param
));
//
return ResponseHelper.buildResponse(appService.login(param));
}
//
}
/**
/**
* 小程序企业详情
* 小程序企业详情
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/EquipInfoCylinderExcelDto.java
View file @
4621beaa
...
@@ -160,128 +160,134 @@ public class EquipInfoCylinderExcelDto extends BaseDto {
...
@@ -160,128 +160,134 @@ public class EquipInfoCylinderExcelDto extends BaseDto {
@DateTimeFormat
(
"yyyy-MM-dd"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
String
inspectDate
;
private
String
inspectDate
;
@ApiModelProperty
(
value
=
"下次检验日期"
)
@ExcelProperty
(
value
=
"下次检验日期"
,
index
=
27
)
@NotBlank
(
message
=
"下次检验日期不能为空"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
String
nextInspectDate
;
@ApiModelProperty
(
value
=
"检验报告编号"
)
@ApiModelProperty
(
value
=
"检验报告编号"
)
@ExcelProperty
(
value
=
"检验报告编号"
,
index
=
2
7
)
@ExcelProperty
(
value
=
"检验报告编号"
,
index
=
2
8
)
private
String
inspectReportNo
;
private
String
inspectReportNo
;
//技术参数
//技术参数
@ExcelProperty
(
value
=
"额定质量(kg)"
,
index
=
2
8
)
@ExcelProperty
(
value
=
"额定质量(kg)"
,
index
=
2
9
)
@ApiModelProperty
(
value
=
"额定质量(kg)"
)
@ApiModelProperty
(
value
=
"额定质量(kg)"
)
private
String
ratedQuality
;
private
String
ratedQuality
;
@ExcelProperty
(
value
=
"使用环境温度(℃)"
,
index
=
29
)
@ExcelProperty
(
value
=
"使用环境温度(℃)"
,
index
=
30
)
@ApiModelProperty
(
value
=
"使用环境温度(℃)"
)
@ApiModelProperty
(
value
=
"使用环境温度(℃)"
)
private
String
ambientTemperature
;
private
String
ambientTemperature
;
@ExcelProperty
(
value
=
"单瓶容积(m3)"
,
index
=
3
0
)
@ExcelProperty
(
value
=
"单瓶容积(m3)"
,
index
=
3
1
)
@ApiModelProperty
(
value
=
"单瓶容积(m3)"
)
@ApiModelProperty
(
value
=
"单瓶容积(m3)"
)
@NotBlank
(
message
=
"单瓶容积(m3)不能为空"
)
@NotBlank
(
message
=
"单瓶容积(m3)不能为空"
)
private
String
singleBottleVolume
;
private
String
singleBottleVolume
;
@ExcelProperty
(
value
=
"型号"
,
index
=
3
1
)
@ExcelProperty
(
value
=
"型号"
,
index
=
3
2
)
@ApiModelProperty
(
value
=
"型号"
)
@ApiModelProperty
(
value
=
"型号"
)
private
String
modelNumber
;
private
String
modelNumber
;
@ExcelProperty
(
value
=
"充装介质"
,
index
=
3
2
)
@ExcelProperty
(
value
=
"充装介质"
,
index
=
3
3
)
@ApiModelProperty
(
value
=
"充装介质"
)
@ApiModelProperty
(
value
=
"充装介质"
)
@NotBlank
(
message
=
"充装介质不能为空"
)
@NotBlank
(
message
=
"充装介质不能为空"
)
private
String
chargingMedium
;
private
String
chargingMedium
;
@ExcelProperty
(
value
=
"规格"
,
index
=
3
3
)
@ExcelProperty
(
value
=
"规格"
,
index
=
3
4
)
@ApiModelProperty
(
value
=
"规格"
)
@ApiModelProperty
(
value
=
"规格"
)
private
String
specification
;
private
String
specification
;
@ExcelProperty
(
value
=
"外径"
,
index
=
3
4
)
@ExcelProperty
(
value
=
"外径"
,
index
=
3
5
)
@ApiModelProperty
(
value
=
"外径"
)
@ApiModelProperty
(
value
=
"外径"
)
private
String
outsideDiameter
;
private
String
outsideDiameter
;
@ExcelProperty
(
value
=
"壁厚"
,
index
=
3
5
)
@ExcelProperty
(
value
=
"壁厚"
,
index
=
3
6
)
@ApiModelProperty
(
value
=
"壁厚"
)
@ApiModelProperty
(
value
=
"壁厚"
)
private
String
wallThickness
;
private
String
wallThickness
;
@ExcelProperty
(
value
=
"长度"
,
index
=
3
6
)
@ExcelProperty
(
value
=
"长度"
,
index
=
3
7
)
@ApiModelProperty
(
value
=
"长度"
)
@ApiModelProperty
(
value
=
"长度"
)
private
String
length
;
private
String
length
;
@ExcelProperty
(
value
=
"公称工作压力(MPa)"
,
index
=
3
7
)
@ExcelProperty
(
value
=
"公称工作压力(MPa)"
,
index
=
3
8
)
@ApiModelProperty
(
value
=
"公称工作压力(MPa)"
)
@ApiModelProperty
(
value
=
"公称工作压力(MPa)"
)
@NotBlank
(
message
=
"公称工作压力(MPa)不能为空"
)
@NotBlank
(
message
=
"公称工作压力(MPa)不能为空"
)
private
String
nominalWorkingPressure
;
private
String
nominalWorkingPressure
;
@ExcelProperty
(
value
=
"材料(管路)"
,
index
=
3
8
)
@ExcelProperty
(
value
=
"材料(管路)"
,
index
=
3
9
)
@ApiModelProperty
(
value
=
"材料(管路)"
)
@ApiModelProperty
(
value
=
"材料(管路)"
)
private
String
piping
;
private
String
piping
;
@ExcelProperty
(
value
=
"无损检测方法(气瓶)"
,
index
=
39
,
converter
=
NondestructConverter
.
class
)
@ExcelProperty
(
value
=
"无损检测方法(气瓶)"
,
index
=
40
,
converter
=
NondestructConverter
.
class
)
@ApiModelProperty
(
value
=
"无损检测方法(气瓶)"
)
@ApiModelProperty
(
value
=
"无损检测方法(气瓶)"
)
private
String
qpLossless
;
//5988
private
String
qpLossless
;
//5988
@ExcelProperty
(
value
=
"材料(瓶体)"
,
index
=
4
0
)
@ExcelProperty
(
value
=
"材料(瓶体)"
,
index
=
4
1
)
@ApiModelProperty
(
value
=
"材料(瓶体)"
)
@ApiModelProperty
(
value
=
"材料(瓶体)"
)
private
String
bottleBody
;
private
String
bottleBody
;
@ExcelProperty
(
value
=
"材料(端塞)"
,
index
=
4
1
)
@ExcelProperty
(
value
=
"材料(端塞)"
,
index
=
4
2
)
@ApiModelProperty
(
value
=
"材料(端塞)"
)
@ApiModelProperty
(
value
=
"材料(端塞)"
)
private
String
endPlug
;
private
String
endPlug
;
@ExcelProperty
(
value
=
"无损检测比例(管路)(%)"
,
index
=
4
2
)
@ExcelProperty
(
value
=
"无损检测比例(管路)(%)"
,
index
=
4
3
)
@ApiModelProperty
(
value
=
"无损检测比例(管路)(%)"
)
@ApiModelProperty
(
value
=
"无损检测比例(管路)(%)"
)
private
String
glRatio
;
private
String
glRatio
;
@ExcelProperty
(
value
=
"无损检测比例(气瓶)(%)"
,
index
=
4
3
)
@ExcelProperty
(
value
=
"无损检测比例(气瓶)(%)"
,
index
=
4
4
)
@ApiModelProperty
(
value
=
"无损检测比例(气瓶)(%)"
)
@ApiModelProperty
(
value
=
"无损检测比例(气瓶)(%)"
)
private
String
qpRatio
;
private
String
qpRatio
;
@ExcelProperty
(
value
=
"无损检测方法(管路)"
,
index
=
4
4
,
converter
=
NondestructConverter
.
class
)
@ExcelProperty
(
value
=
"无损检测方法(管路)"
,
index
=
4
5
,
converter
=
NondestructConverter
.
class
)
@ApiModelProperty
(
value
=
"无损检测方法(管路)"
)
@ApiModelProperty
(
value
=
"无损检测方法(管路)"
)
private
String
glLossless
;
private
String
glLossless
;
@ExcelProperty
(
value
=
"耐压实验压力(气瓶)(Mpa)"
,
index
=
4
5
)
@ExcelProperty
(
value
=
"耐压实验压力(气瓶)(Mpa)"
,
index
=
4
6
)
@ApiModelProperty
(
value
=
"耐压实验压力(气瓶)(Mpa)"
)
@ApiModelProperty
(
value
=
"耐压实验压力(气瓶)(Mpa)"
)
private
String
qpPressure
;
private
String
qpPressure
;
@ExcelProperty
(
value
=
"耐压实验压力(管路)(Mpa)"
,
index
=
4
6
)
@ExcelProperty
(
value
=
"耐压实验压力(管路)(Mpa)"
,
index
=
4
7
)
@ApiModelProperty
(
value
=
"耐压实验压力(管路)(Mpa)"
)
@ApiModelProperty
(
value
=
"耐压实验压力(管路)(Mpa)"
)
private
String
glPressure
;
private
String
glPressure
;
@ExcelProperty
(
value
=
"气密性试验压力(气瓶)(Mpa)"
,
index
=
4
7
)
@ExcelProperty
(
value
=
"气密性试验压力(气瓶)(Mpa)"
,
index
=
4
8
)
@ApiModelProperty
(
value
=
"气密性试验压力(气瓶)(Mpa)"
)
@ApiModelProperty
(
value
=
"气密性试验压力(气瓶)(Mpa)"
)
private
String
qpAirTightness
;
private
String
qpAirTightness
;
@ExcelProperty
(
value
=
"气体置换后压力(MPa)"
,
index
=
4
8
)
@ExcelProperty
(
value
=
"气体置换后压力(MPa)"
,
index
=
4
9
)
@ApiModelProperty
(
value
=
"气体置换后压力(MPa)"
)
@ApiModelProperty
(
value
=
"气体置换后压力(MPa)"
)
private
String
displacementPressure
;
private
String
displacementPressure
;
@ExcelProperty
(
value
=
"热处理方式"
,
index
=
49
)
@ExcelProperty
(
value
=
"热处理方式"
,
index
=
50
)
@ApiModelProperty
(
value
=
"热处理方式"
)
@ApiModelProperty
(
value
=
"热处理方式"
)
private
String
heatTreatmentMethod
;
private
String
heatTreatmentMethod
;
@ExcelProperty
(
value
=
"气密性实验压力(管路)(MPa)"
,
index
=
5
0
)
@ExcelProperty
(
value
=
"气密性实验压力(管路)(MPa)"
,
index
=
5
1
)
@ApiModelProperty
(
value
=
"气密性实验压力(管路)(MPa)"
)
@ApiModelProperty
(
value
=
"气密性实验压力(管路)(MPa)"
)
private
String
glAirTightness
;
private
String
glAirTightness
;
@ExcelProperty
(
value
=
"气瓶安装位置"
,
index
=
5
1
)
@ExcelProperty
(
value
=
"气瓶安装位置"
,
index
=
5
2
)
@ApiModelProperty
(
value
=
"气瓶安装位置"
)
@ApiModelProperty
(
value
=
"气瓶安装位置"
)
private
String
installationPosition
;
private
String
installationPosition
;
@ExcelProperty
(
value
=
"瓶体内含氧量(%)"
,
index
=
5
2
)
@ExcelProperty
(
value
=
"瓶体内含氧量(%)"
,
index
=
5
3
)
@ApiModelProperty
(
value
=
"瓶体内含氧量(%)"
)
@ApiModelProperty
(
value
=
"瓶体内含氧量(%)"
)
private
String
oxygen
;
private
String
oxygen
;
@ExcelProperty
(
value
=
"热处理温度(℃)"
,
index
=
5
3
)
@ExcelProperty
(
value
=
"热处理温度(℃)"
,
index
=
5
4
)
@ApiModelProperty
(
value
=
"热处理温度(℃)"
)
@ApiModelProperty
(
value
=
"热处理温度(℃)"
)
private
String
qpHeatTreatmentTemperature
;
private
String
qpHeatTreatmentTemperature
;
/**
/**
* 信息化管理字段-信息化管理情况
* 信息化管理字段-信息化管理情况
*/
*/
@ExcelProperty
(
value
=
"信息化管理情况"
,
index
=
5
4
,
converter
=
InformationSituationConverter
.
class
)
@ExcelProperty
(
value
=
"信息化管理情况"
,
index
=
5
5
,
converter
=
InformationSituationConverter
.
class
)
private
String
informationSituation
;
private
String
informationSituation
;
/**
/**
* 信息化管理字段-二维码或者电子标签编号
* 信息化管理字段-二维码或者电子标签编号
*/
*/
@ExcelProperty
(
value
=
"二维码或者电子标签编号"
,
index
=
5
5
)
@ExcelProperty
(
value
=
"二维码或者电子标签编号"
,
index
=
5
6
)
private
String
informationManageCode
;
private
String
informationManageCode
;
@ExcelIgnore
@ExcelIgnore
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/IsIntoManagementEnum.java
0 → 100644
View file @
4621beaa
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.Arrays
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Getter
@AllArgsConstructor
public
enum
IsIntoManagementEnum
{
FALSE
(
"未纳管"
,
false
),
TRUE
(
"已纳管"
,
true
);
private
final
String
name
;
private
final
boolean
code
;
private
static
final
Map
<
Boolean
,
String
>
CODE_NAME_MAP
=
Arrays
.
stream
(
values
())
.
collect
(
Collectors
.
toMap
(
IsIntoManagementEnum:
:
isCode
,
IsIntoManagementEnum:
:
getName
));
/**
* 根据 code获取枚举对应的 name
*/
public
static
String
getName
(
boolean
code
)
{
return
CODE_NAME_MAP
.
get
(
code
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationManageMapper.java
View file @
4621beaa
...
@@ -53,4 +53,6 @@ public interface JgUseRegistrationManageMapper extends BaseMapper<JgUseRegistrat
...
@@ -53,4 +53,6 @@ public interface JgUseRegistrationManageMapper extends BaseMapper<JgUseRegistrat
JgUseRegistrationManage
getLatestJgUseRegistrationManage
(
@Param
(
"useUnitCreditCode"
)
String
useUnitCreditCode
,
@Param
(
"equDefineCode"
)
String
equDefineCode
);
JgUseRegistrationManage
getLatestJgUseRegistrationManage
(
@Param
(
"useUnitCreditCode"
)
String
useUnitCreditCode
,
@Param
(
"equDefineCode"
)
String
equDefineCode
);
Integer
checkUseRegCertInBusiness
(
@Param
(
"useRegistrationCode"
)
String
useRegistrationCode
);
Integer
checkUseRegCertInBusiness
(
@Param
(
"useRegistrationCode"
)
String
useRegistrationCode
);
Page
<
JgUseRegistrationManageDto
>
queryUseRegistrationManagePage
(
@Param
(
"page"
)
Page
<
JgUseRegistrationManageDto
>
page
,
@Param
(
"dto"
)
JgUseRegistrationManageDto
dto
,
@Param
(
"sort"
)
SortVo
sortMap
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
4621beaa
...
@@ -2528,16 +2528,17 @@
...
@@ -2528,16 +2528,17 @@
)
)
</select>
</select>
<update
id=
"updateTechParamDynamic"
>
<update
id=
"updateTechParamDynamic"
>
<if
test=
"columns != null and columns.size > 0"
>
update ${tableName}
update
<set>
${tableName}
<foreach
collection=
"columns"
item=
"column"
separator=
","
>
set
<if
test=
"column.columnValue != null and column.columnValue != ''"
>
<foreach
collection=
"columns"
item=
"column"
separator=
","
>
${column.columnName} = #{column.columnValue}
${column.columnName} = #{column.columnValue}
</foreach>
</if>
where record = #{record}
</foreach>
</if>
</set>
where record = #{record}
</update>
</update>
<select
id=
"countBizNumAfterUseReg"
resultType=
"java.lang.Long"
>
<select
id=
"countBizNumAfterUseReg"
resultType=
"java.lang.Long"
>
select
select
sum(inUseNumber)
sum(inUseNumber)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintenanceContractMapper.xml
View file @
4621beaa
...
@@ -91,8 +91,6 @@
...
@@ -91,8 +91,6 @@
<if
test=
"contractDto.createDate != null"
>
<if
test=
"contractDto.createDate != null"
>
AND tjmc.create_date LIKE concat(DATE_FORMAT(#{contractDto.createDate},'%Y-%m-%d'),'%')
AND tjmc.create_date LIKE concat(DATE_FORMAT(#{contractDto.createDate},'%Y-%m-%d'),'%')
</if>
</if>
-- 数据过滤开始 ----------------------------------------------------
-- 只有使用单位或者维保单位用,或者都没有
<if
test=
"contractDto.useUnitCodeFilter != '' and contractDto.useUnitCodeFilter != null"
>
<if
test=
"contractDto.useUnitCodeFilter != '' and contractDto.useUnitCodeFilter != null"
>
and (tjmc.use_unit_code = #{contractDto.useUnitCodeFilter}
and (tjmc.use_unit_code = #{contractDto.useUnitCodeFilter}
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
...
@@ -102,13 +100,11 @@
...
@@ -102,13 +100,11 @@
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
and (tjmc.instance_id
<![CDATA[<>]]>
'')
and (tjmc.instance_id
<![CDATA[<>]]>
'')
</if>
</if>
-- 接受机构用
<if
test=
"contractDto.receiveOrgCodeFilter != '' and contractDto.receiveOrgCodeFilter != null"
>
<if
test=
"contractDto.receiveOrgCodeFilter != '' and contractDto.receiveOrgCodeFilter != null"
>
and (tjmc.receive_org_code = #{contractDto.receiveOrgCodeFilter}
and (tjmc.receive_org_code = #{contractDto.receiveOrgCodeFilter}
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
and (tjmc.instance_id
<![CDATA[<>]]>
'')
and (tjmc.instance_id
<![CDATA[<>]]>
'')
</if>
</if>
-- 监管单位用
<if
test=
"contractDto.orgBranchCode != '' and contractDto.orgBranchCode != null"
>
<if
test=
"contractDto.orgBranchCode != '' and contractDto.orgBranchCode != null"
>
and tjmc.instance_id
<![CDATA[<>]]>
''
and tjmc.instance_id
<![CDATA[<>]]>
''
HAVING (
HAVING (
...
@@ -118,7 +114,6 @@
...
@@ -118,7 +114,6 @@
WHERE ede.equip_transfer_id = tjmc.sequence_nbr
WHERE ede.equip_transfer_id = tjmc.sequence_nbr
) LIKE concat('%', #{contractDto.orgBranchCode}, '%')
) LIKE concat('%', #{contractDto.orgBranchCode}, '%')
</if>
</if>
-- 数据过滤结束 ----------------------------------------------------
</where>
</where>
ORDER BY
ORDER BY
<if
test=
"sort != null"
>
<if
test=
"sort != null"
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationManageMapper.xml
View file @
4621beaa
...
@@ -79,11 +79,7 @@
...
@@ -79,11 +79,7 @@
</where>
</where>
</select>
</select>
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto"
>
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto"
>
<include
refid=
"page_list"
/>
,
<include
refid=
"page_list"
/>
(SELECT ei.sequence_nbr from idx_biz_jg_use_info ui
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = ui.record
LEFT JOIN tz_base_enterprise_info ei ON ei.use_unit_code = ui.ESTATE_UNIT_CREDIT_CODE
WHERE ri.USE_ORG_CODE = tjurm.use_registration_code ORDER BY ui.REC_DATE DESC limit 1) AS estateUnitName
FROM tzs_jg_use_registration_manage tjurm
FROM tzs_jg_use_registration_manage tjurm
<where>
<where>
tjurm.is_delete = 0
tjurm.is_delete = 0
...
@@ -593,4 +589,99 @@
...
@@ -593,4 +589,99 @@
ORDER BY tjur.certificate_no DESC
ORDER BY tjur.certificate_no DESC
LIMIT 1
LIMIT 1
</select>
</select>
<select
id=
"queryUseRegistrationManagePage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto"
>
<include
refid=
"page_list"
/>
,estate.sequence_nbr AS estateUnitName
FROM tzs_jg_use_registration_manage tjurm
LEFT JOIN (
SELECT DISTINCT ON (ri.use_org_code)
ri.use_org_code, ei.sequence_nbr
FROM idx_biz_jg_register_info ri
JOIN idx_biz_jg_use_info ui ON ui.record = ri.record
JOIN tz_base_enterprise_info ei ON ei.use_unit_code = ui.ESTATE_UNIT_CREDIT_CODE
ORDER BY ri.use_org_code, ui.rec_date DESC
) estate ON estate.use_org_code = tjurm.use_registration_code
<where>
tjurm.is_delete = 0
<if
test=
"dto.equList != null and dto.equList != ''"
>
and tjurm.equ_list = #{dto.equList}
</if>
<if
test=
"dto.equListCode != null and dto.equListCode != ''"
>
and tjurm.equ_list_code = #{dto.equListCode}
</if>
<if
test=
"dto.equCategory != null and dto.equCategory != ''"
>
and tjurm.equ_category = #{dto.equCategory}
</if>
<if
test=
"dto.equCategoryCode != null and dto.equCategoryCode != ''"
>
and tjurm.equ_category_code = #{dto.equCategoryCode}
</if>
<if
test=
"dto.equDefine != null and dto.equDefine != ''"
>
and tjurm.equ_define = #{dto.equDefine}
</if>
<if
test=
"dto.equDefineCode != null and dto.equDefineCode != ''"
>
and tjurm.equ_define_code = #{dto.equDefineCode}
</if>
-- 使用登记证编号
<if
test=
"dto.useRegistrationCode != null and dto.useRegistrationCode != ''"
>
and tjurm.use_registration_code like concat('%',#{dto.useRegistrationCode},'%')
</if>
-- 申请单号
<if
test=
"dto.applyNo != null and dto.applyNo != ''"
>
and tjurm.apply_no like concat('%',#{dto.applyNo},'%')
</if>
-- 登记证书唯一码
<if
test=
"dto.certificateNo != null and dto.certificateNo != ''"
>
and tjurm.certificate_no = #{dto.certificateNo}
</if>
<if
test=
"dto.auditPassDate != null and dto.auditPassDate != ''"
>
and tjurm.audit_pass_date like concat('%',DATE_FORMAT(#{dto.auditPassDate},'%Y-%m-%d'),'%')
</if>
<if
test=
"dto.certificateStatus != null and dto.certificateStatus != ''"
>
and tjurm.certificate_status = #{dto.certificateStatus}
</if>
<if
test=
"dto.useUnitCreditCodeForSearch != null and dto.useUnitCreditCodeForSearch != ''"
>
and tjurm.use_unit_credit_code = #{dto.useUnitCreditCodeForSearch}
</if>
<if
test=
"dto.useUnitCreditNameForSearch != null and dto.useUnitCreditNameForSearch != ''"
>
and tjurm.use_unit_name like concat ('%',#{dto.useUnitCreditNameForSearch},'%')
</if>
<if
test=
"dto.receiveCompanyCode != null and dto.receiveCompanyCode != ''"
>
and (tjurm.receive_company_code = #{dto.receiveCompanyCode}
or tjurm.receive_company_code is null or tjurm.receive_company_code = '')
</if>
-- 企业根据企业统一信用代码匹配
<if
test=
"dto.dataType == 'company' "
>
AND tjurm.use_unit_credit_code = #{dto.useUnitCreditCode}
</if>
-- 监管单位根据接受机构匹配
<if
test=
"dto.dataType == 'supervision' "
>
AND tjurm.receive_company_code = #{dto.receiveCompanyCode}
</if>
-- 是否车用气瓶(whetherVehicleCylinder)= 1 ,过滤出车用气瓶使用登记证数据
<if
test=
"dto.whetherVehicleCylinder != null and dto.whetherVehicleCylinder == 1 "
>
AND tjurm.reg_type = '车用气瓶登记'
</if>
<if
test=
"dto.isScrap != null and dto.isScrap != ''"
>
and tjurm.is_scrap = #{dto.isScrap}
</if>
<if
test=
"dto.isDoBusiness != null and dto.isDoBusiness != ''"
>
and tjurm.is_do_business = #{dto.isDoBusiness}
</if>
<if
test=
"dto.cityName != null and dto.cityName != ''"
>
and tjurm.equ_use_address LIKE CONCAT('%', #{dto.cityName}, '%')
</if>
<if
test=
"dto.carNumber != null and dto.carNumber != ''"
>
and tjurm.car_number LIKE CONCAT('%', #{dto.carNumber}, '%')
</if>
<if
test=
"dto.certInBusinessFlag != null and dto.certInBusinessFlag != '' and dto.certInBusinessFlag == 'false'"
>
and NOT EXISTS (
<include
refid=
"useRegCertInBusiness"
/>
)
</if>
ORDER BY
<if
test=
"sort != null"
>
tjurm.${sort.field} ${sort.sortType},
</if>
tjurm.create_date DESC
</where>
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
4621beaa
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/SafetyProblemTracingMapper.xml
View file @
4621beaa
...
@@ -4,72 +4,96 @@
...
@@ -4,72 +4,96 @@
<select
id=
"queryForSafetyProblemTracingPage"
<select
id=
"queryForSafetyProblemTracingPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.SafetyProblemTracingDto"
>
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.SafetyProblemTracingDto"
>
select
spt.*,
SELECT
case when spt."problem_status_code" = '0' then '红'
spt.*,
else '绿' end hiddenDangersLevel,
CASE
(select extend::json->>'pic' from cb_data_dictionary where type = 'ISSUE_TYPE' and code = spt.problem_type_code) problemTypePic
WHEN spt.problem_status_code = '0' THEN '红'
from tzs_safety_problem_tracing spt
ELSE '绿'
END AS hiddenDangersLevel,
cdd.extend::json ->> 'pic' AS problemTypePic
FROM tzs_safety_problem_tracing spt
LEFT JOIN cb_data_dictionary cdd
ON cdd.type = 'ISSUE_TYPE'
AND cdd.code = spt.problem_type_code
<where>
<where>
spt.is_delete = false
spt.is_delete = FALSE
<if
test=
"problemModel.problemNum != null and problemModel.problemNum != ''"
>
<if
test=
"problemModel.problemNum != null and problemModel.problemNum != ''"
>
and spt.problem_num =
LIKE CONCAT('%', #{problemModel.problemNum}, '%')
AND spt.problem_num
LIKE CONCAT('%', #{problemModel.problemNum}, '%')
</if>
</if>
<if
test=
"problemModel.problemStatus != null and problemModel.problemStatus != ''"
>
<if
test=
"problemModel.problemStatus != null and problemModel.problemStatus != ''"
>
and
spt.problem_status = #{problemModel.problemStatus}
AND
spt.problem_status = #{problemModel.problemStatus}
</if>
</if>
<if
test=
"problemModel.equipListCode != null and problemModel.equipListCode != ''"
>
<if
test=
"problemModel.equipListCode != null and problemModel.equipListCode != ''"
>
and
spt.equip_list_code = #{problemModel.equipListCode}
AND
spt.equip_list_code = #{problemModel.equipListCode}
</if>
</if>
<if
test=
"problemModel.equCategoryCode != null and problemModel.equCategoryCode != ''"
>
<if
test=
"problemModel.equCategoryCode != null and problemModel.equCategoryCode != ''"
>
and
spt.equ_category_code = #{problemModel.equCategoryCode}
AND
spt.equ_category_code = #{problemModel.equCategoryCode}
</if>
</if>
<if
test=
"problemModel.sourceTypeCode != null and problemModel.sourceTypeCode != ''"
>
<if
test=
"problemModel.sourceTypeCode != null and problemModel.sourceTypeCode != ''"
>
and
spt.source_type_code = #{problemModel.sourceTypeCode}
AND
spt.source_type_code = #{problemModel.sourceTypeCode}
</if>
</if>
<if
test=
"problemModel.problemLevelCode != null and problemModel.problemLevelCode != ''"
>
<if
test=
"problemModel.problemLevelCode != null and problemModel.problemLevelCode != ''"
>
and
spt.problem_level_code = #{problemModel.problemLevelCode}
AND
spt.problem_level_code = #{problemModel.problemLevelCode}
</if>
</if>
<if
test=
"problemModel.problemTypeCode != null and problemModel.problemTypeCode != ''"
>
<if
test=
"problemModel.problemTypeCode != null and problemModel.problemTypeCode != ''"
>
and
spt.problem_type_code = #{problemModel.problemTypeCode}
AND
spt.problem_type_code = #{problemModel.problemTypeCode}
</if>
</if>
<if
test=
"problemModel.problemTimeRange != null and problemModel.problemTimeRange.beginDate != null"
>
<if
test=
"problemModel.problemTimeRange != null and problemModel.problemTimeRange.beginDate != null"
>
and
to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[>=]]>
AND
to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[>=]]>
to_char(#{problemModel.problemTimeRange.beginDate}::timestamp, 'YYYY-MM-DD')
to_char(#{problemModel.problemTimeRange.beginDate}::timestamp, 'YYYY-MM-DD')
</if>
</if>
<if
test=
"problemModel.problemTimeRange != null and problemModel.problemTimeRange.endDate != null"
>
<if
test=
"problemModel.problemTimeRange != null and problemModel.problemTimeRange.endDate != null"
>
and
to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[<=]]>
AND
to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[<=]]>
to_char(#{problemModel.problemTimeRange.endDate}::timestamp, 'YYYY-MM-DD')
to_char(#{problemModel.problemTimeRange.endDate}::timestamp, 'YYYY-MM-DD')
</if>
</if>
<if
test=
"problemModel.problemDesc != null and problemModel.problemDesc != ''"
>
<if
test=
"problemModel.problemDesc != null and problemModel.problemDesc != ''"
>
and spt.problem_desc like
CONCAT('%', #{problemModel.problemDesc}, '%')
AND spt.problem_desc LIKE
CONCAT('%', #{problemModel.problemDesc}, '%')
</if>
</if>
<if
test=
"problemModel.sourceId != null and problemModel.sourceId != ''"
>
<if
test=
"problemModel.sourceId != null and problemModel.sourceId != ''"
>
and
spt.source_id = #{problemModel.sourceId}
AND
spt.source_id = #{problemModel.sourceId}
</if>
</if>
<if
test=
"problemModel.governingBodyOrgCode != null and problemModel.governingBodyOrgCode != ''"
>
<if
test=
"problemModel.governingBodyOrgCode != null and problemModel.governingBodyOrgCode != ''"
>
and spt.governing_body_org_code like
CONCAT(#{problemModel.governingBodyOrgCode}, '%')
AND spt.governing_body_org_code LIKE
CONCAT(#{problemModel.governingBodyOrgCode}, '%')
</if>
</if>
<if
test=
"problemModel.governingBodyCode != null and problemModel.governingBodyCode != ''"
>
<if
test=
"problemModel.governingBodyCode != null and problemModel.governingBodyCode != ''"
>
and
spt.governing_body_code = #{problemModel.governingBodyCode}
AND
spt.governing_body_code = #{problemModel.governingBodyCode}
</if>
</if>
<if
test=
"problemModel.principalUnit != null and problemModel.principalUnit != ''"
>
<if
test=
"problemModel.principalUnit != null and problemModel.principalUnit != ''"
>
and spt.principal_unit like
CONCAT('%', #{problemModel.principalUnit}, '%')
AND spt.principal_unit LIKE
CONCAT('%', #{problemModel.principalUnit}, '%')
</if>
</if>
<if
test=
"problemModel.principalUnitType != null and problemModel.principalUnitType != ''"
>
<if
test=
"problemModel.principalUnitType != null and problemModel.principalUnitType != ''"
>
and spt.principal_unit_type like
CONCAT('%', #{problemModel.principalUnitType}, '%')
AND spt.principal_unit_type LIKE
CONCAT('%', #{problemModel.principalUnitType}, '%')
</if>
</if>
<if
test=
"problemModel.hiddenDangersLevel != null and problemModel.hiddenDangersLevel != ''"
>
<if
test=
"problemModel.hiddenDangersLevel != null and problemModel.hiddenDangersLevel != ''"
>
and
spt.problem_status_code = #{problemModel.hiddenDangersLevel}
AND
spt.problem_status_code = #{problemModel.hiddenDangersLevel}
</if>
</if>
<if
test=
"problemModel.regionCode != null and problemModel.regionCode != ''"
>
<if
test=
"problemModel.regionCode != null and problemModel.regionCode != ''"
>
and spt.region_code like CONCAT('%',
#{problemModel.regionCode}, '%')
AND spt.region_code LIKE CONCAT('%',
#{problemModel.regionCode}, '%')
</if>
</if>
<if
test=
"problemModel.problemStatusCode != null and problemModel.problemStatusCode != ''"
>
<if
test=
"problemModel.problemStatusCode != null and problemModel.problemStatusCode != ''"
>
and
spt.problem_status_code = #{problemModel.problemStatusCode}
AND
spt.problem_status_code = #{problemModel.problemStatusCode}
</if>
</if>
</where>
</where>
order by spt.create_date desc
ORDER BY spt.create_date DESC
</select>
</select>
<select
id=
"queryEquipListByProblemId"
resultType=
"java.util.Map"
>
<select
id=
"queryEquipListByProblemId"
resultType=
"java.util.Map"
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/event/listener/ChangeEquipImpactCertListener.java
View file @
4621beaa
...
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
...
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.event.TransactionalEventListener
;
import
org.springframework.transaction.event.TransactionalEventListener
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.BlockingQueue
;
...
@@ -335,9 +336,23 @@ public class ChangeEquipImpactCertListener {
...
@@ -335,9 +336,23 @@ public class ChangeEquipImpactCertListener {
log
.
info
(
"处理 handleNewProjectEdit 类型逻辑"
);
log
.
info
(
"处理 handleNewProjectEdit 类型逻辑"
);
IdxBizJgProjectContraption
projectContraption
=
jgProjectContraptionService
.
getById
(
projectContraptionId
);
IdxBizJgProjectContraption
projectContraption
=
jgProjectContraptionService
.
getById
(
projectContraptionId
);
JSONObject
certificatePrintTag
=
Optional
.
ofNullable
(
projectContraption
.
getCertificatePrintTag
())
JSONObject
certificatePrintTag
=
Optional
.
ofNullable
(
projectContraption
.
getCertificatePrintTag
())
.
map
(
JSONObject:
:
parseObject
).
orElse
(
new
JSONObject
());
.
map
(
JSONObject:
:
parseObject
)
.
orElseGet
(
JSONObject:
:
new
);
JSONObject
tagJson
=
this
.
handleFieldChangeProject
(
fieldChangeMetaList
,
certificatePrintTag
);
JSONObject
tagJson
=
this
.
handleFieldChangeProject
(
fieldChangeMetaList
,
certificatePrintTag
);
projectContraption
.
setCertificatePrintTag
(
JSONObject
.
toJSONString
(
tagJson
));
projectContraption
.
setCertificatePrintTag
(
tagJson
.
toJSONString
(
));
jgProjectContraptionService
.
updateById
(
projectContraption
);
jgProjectContraptionService
.
updateById
(
projectContraption
);
String
useOrgCode
=
fieldChangeMetaList
.
stream
()
.
filter
(
meta
->
"useRegistrationCode"
.
equals
(
meta
.
getColumnKey
()))
.
map
(
FieldChangeMeta:
:
getColumnOldValue
)
.
findFirst
()
.
orElse
(
null
);
if
(!
ValidationUtil
.
isEmpty
(
useOrgCode
))
{
JgUseRegistrationManage
jgUseRegistrationManage
=
jgUseRegistrationManageService
.
lambdaQuery
()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useOrgCode
)
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
)
.
one
();
this
.
handleFieldChange
(
fieldChangeMetaList
,
jgUseRegistrationManage
);
}
}
}
}
}
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 @
4621beaa
...
@@ -61,6 +61,7 @@ import org.springframework.stereotype.Component;
...
@@ -61,6 +61,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -1142,4 +1143,16 @@ public class CommonEquipDataProcessService {
...
@@ -1142,4 +1143,16 @@ public class CommonEquipDataProcessService {
this
.
updateUseOrgCode2NewPipeline
(
e
,
useRegistrationCode
);
this
.
updateUseOrgCode2NewPipeline
(
e
,
useRegistrationCode
);
});
});
}
}
}
public
void
beforeCheckForUseOrgCode
(
ProjectContraptionChangeDataDto
dto
)
{
LambdaQueryWrapper
<
IdxBizJgProjectContraption
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
dto
.
getUseRegistrationCode
())
.
ne
(
BaseEntity:
:
getSequenceNbr
,
dto
.
getProjectContraptionId
());
if
(
idxBizJgProjectContraptionServiceImpl
.
count
(
queryWrapper
)
>
0
)
{
throw
new
BadRequest
(
"使用登记证编号已存在!"
);
}
if
(!
ValidationUtil
.
isEmpty
(
dto
.
getUseRegistrationCode
())){
jgRegisterInfoService
.
checkUseRegistrationCode
(
dto
.
getUseRegistrationCode
(),
"unit"
);
}
}
}
\ No newline at end of file
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/EquipChangeDataUpdateServiceImpl.java
View file @
4621beaa
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
equip
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
equip
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
...
@@ -224,7 +225,9 @@ public class EquipChangeDataUpdateServiceImpl {
...
@@ -224,7 +225,9 @@ public class EquipChangeDataUpdateServiceImpl {
return
columnDto
;
return
columnDto
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
// sql 动态构建入库
// sql 动态构建入库
commonMapper
.
updateTechParamDynamic
(
tableName
,
record
,
columns
);
if
(
CollUtil
.
isNotEmpty
(
columns
))
{
commonMapper
.
updateTechParamDynamic
(
tableName
,
record
,
columns
);
}
}
}
public
void
checkFactoryChangeData
(
String
record
,
EquipFactoryChangeDataDto
equipFactoryChangeDataDto
,
String
equList
,
String
equCategory
,
String
equDefine
)
{
public
void
checkFactoryChangeData
(
String
record
,
EquipFactoryChangeDataDto
equipFactoryChangeDataDto
,
String
equList
,
String
equCategory
,
String
equDefine
)
{
...
...
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/SingleEquipChangeProcess.java
View file @
4621beaa
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChange
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChange
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.strategy.IBizDataChangeHandleStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.HandleResult
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.HandleResult
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -28,6 +29,7 @@ import org.elasticsearch.index.query.QueryBuilders;
...
@@ -28,6 +29,7 @@ import org.elasticsearch.index.query.QueryBuilders;
import
org.elasticsearch.search.SearchHit
;
import
org.elasticsearch.search.SearchHit
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -52,6 +54,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -52,6 +54,7 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
private
final
RestHighLevelClient
restHighLevelClient
;
private
final
RestHighLevelClient
restHighLevelClient
;
private
final
EsEquipmentDao
esEquipmentDao
;
private
final
EsEquipmentDao
esEquipmentDao
;
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoServiceImpl
;
@Override
@Override
...
@@ -265,7 +268,6 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -265,7 +268,6 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
return
orgCode
;
return
orgCode
;
}
}
private
void
beforeCheckForUseOrgCode
(
IdxBizJgUseInfo
useInfoOld
,
IdxBizJgRegisterInfo
registerInfoNew
)
{
private
void
beforeCheckForUseOrgCode
(
IdxBizJgUseInfo
useInfoOld
,
IdxBizJgRegisterInfo
registerInfoNew
)
{
// 1.使用登记证编辑时重复性校验
// 1.使用登记证编辑时重复性校验
if
(!
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
registerInfoNew
.
getEquCategory
()))
{
// 非气瓶逻辑,所有设备不能重复
if
(!
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
registerInfoNew
.
getEquCategory
()))
{
// 非气瓶逻辑,所有设备不能重复
...
@@ -286,7 +288,9 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
...
@@ -286,7 +288,9 @@ public class SingleEquipChangeProcess implements IEquipChangeDataProcessStrategy
}
}
}
}
}
}
if
(!
ValidationUtil
.
isEmpty
(
registerInfoNew
.
getUseOrgCode
())){
idxBizJgRegisterInfoServiceImpl
.
checkUseRegistrationCode
(
registerInfoNew
.
getUseOrgCode
(),
"unit"
);
}
}
}
@Override
@Override
...
...
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/SingleProjectEquipChangeProcess.java
View file @
4621beaa
...
@@ -19,15 +19,11 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.HandleRes
...
@@ -19,15 +19,11 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.HandleRes
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.equip.strategy.IEquipChangeDataProcessStrategy
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.PieLineLevelTypeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.PieLineLevelTypeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.function.Function
;
...
@@ -76,7 +72,10 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
...
@@ -76,7 +72,10 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
// 2.装置基本信息校验、保存(前端返回的装置信息为大写 需注意)
// 2.装置基本信息校验、保存(前端返回的装置信息为大写 需注意)
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
=
CommonEquipDataProcessService
.
castMap2Bean
(
changeData
,
ProjectContraptionChangeDataDto
.
class
);
ProjectContraptionChangeDataDto
projectContraptionChangeDataDto
=
CommonEquipDataProcessService
.
castMap2Bean
(
changeData
,
ProjectContraptionChangeDataDto
.
class
);
this
.
setNameForDictKey
(
projectContraptionChangeDataDto
);
this
.
setNameForDictKey
(
projectContraptionChangeDataDto
);
// 校验使用登记证编号是否重复
if
(
Objects
.
toString
(
projectContraptionChangeDataDto
.
getDataSource
(),
""
).
startsWith
(
"jg_his"
))
{
commonEquipDataProcessService
.
beforeCheckForUseOrgCode
(
projectContraptionChangeDataDto
);
}
pieLineDataChangeService
.
update
(
projectContraptionChangeDataDto
,
allChangeColumns
);
pieLineDataChangeService
.
update
(
projectContraptionChangeDataDto
,
allChangeColumns
);
Boolean
isRequireTemporarySave
=
data
.
getBoolean
(
DefaultBizDataChangeHandler
.
IS_REQUIRES_TEMPORARY_SAVE
);
Boolean
isRequireTemporarySave
=
data
.
getBoolean
(
DefaultBizDataChangeHandler
.
IS_REQUIRES_TEMPORARY_SAVE
);
JSONArray
oldPieLineJSONArray
=
data
.
getJSONArray
(
DefaultBizDataChangeHandler
.
TEMPORARY_PIPELINES_DATA
);
JSONArray
oldPieLineJSONArray
=
data
.
getJSONArray
(
DefaultBizDataChangeHandler
.
TEMPORARY_PIPELINES_DATA
);
...
...
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 @
4621beaa
...
@@ -28,6 +28,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.EquipRequestParamsDto;
...
@@ -28,6 +28,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.EquipRequestParamsDto;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.IsIntoManagementEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper
;
...
@@ -400,6 +401,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -400,6 +401,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
record
.
setCompanyType
(
companyType2
);
record
.
setCompanyType
(
companyType2
);
// 来源类型:前端控制编辑按钮显示隐藏
// 来源类型:前端控制编辑按钮显示隐藏
record
.
setRegType
(
CommonServiceImpl
.
genRegTypeByDataSource
(
record
.
getDataSource
()));
record
.
setRegType
(
CommonServiceImpl
.
genRegTypeByDataSource
(
record
.
getDataSource
()));
record
.
setIsIntoManagementName
(
IsIntoManagementEnum
.
getName
(
record
.
getIsIntoManagement
()));
// 设置是否发生过后续业务::前端控制编辑按钮显示隐藏
// 设置是否发生过后续业务::前端控制编辑按钮显示隐藏
record
.
setHappenAfterBiz
(
projectContraptionUseMap
.
getOrDefault
(
record
.
getSequenceNbr
()
+
""
,
false
));
record
.
setHappenAfterBiz
(
projectContraptionUseMap
.
getOrDefault
(
record
.
getSequenceNbr
()
+
""
,
false
));
});
});
...
...
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 @
4621beaa
...
@@ -147,6 +147,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -147,6 +147,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
public
static
final
String
WHETHER_SKID_MOUNTED_PRESSURE_VESSEL
=
"WHETHER_SKID_MOUNTED_PRESSURE_VESSEL"
;
public
static
final
String
WHETHER_SKID_MOUNTED_PRESSURE_VESSEL
=
"WHETHER_SKID_MOUNTED_PRESSURE_VESSEL"
;
// 设备纳管 纳管:true 未纳管:false
// 设备纳管 纳管:true 未纳管:false
public
static
final
String
IS_INTO_MANAGEMENT
=
"IS_INTO_MANAGEMENT"
;
public
static
final
String
IS_INTO_MANAGEMENT
=
"IS_INTO_MANAGEMENT"
;
public
static
final
String
IS_INTO_MANAGEMENT_NAME
=
"IS_INTO_MANAGEMENT_NAME"
;
public
static
final
String
IS_DO_BUSINESS
=
"IS_DO_BUSINESS"
;
public
static
final
String
IS_DO_BUSINESS
=
"IS_DO_BUSINESS"
;
// 设备来源 jg:新设备录入 jg_his:历史数据录入
// 设备来源 jg:新设备录入 jg_his:历史数据录入
public
static
final
String
DATA_SOURCE
=
"DATA_SOURCE"
;
public
static
final
String
DATA_SOURCE
=
"DATA_SOURCE"
;
...
@@ -3014,6 +3015,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -3014,6 +3015,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
dto2
.
put
(
DATA_SOURCE
,
s
);
dto2
.
put
(
DATA_SOURCE
,
s
);
dto2
.
put
(
DATA_SOURCE_NAME
,
EquipSourceEnum
.
getDataSourceName
(
s
));
dto2
.
put
(
DATA_SOURCE_NAME
,
EquipSourceEnum
.
getDataSourceName
(
s
));
}
}
dto2
.
computeIfPresent
(
IS_INTO_MANAGEMENT
,
(
k
,
v
)
->
{
dto2
.
put
(
IS_INTO_MANAGEMENT_NAME
,
IsIntoManagementEnum
.
getName
(
Boolean
.
parseBoolean
(
v
.
toString
())));
return
v
;
});
dto2
.
put
(
"record"
,
dto2
.
get
(
SEQUENCE_NBR
));
dto2
.
put
(
"record"
,
dto2
.
get
(
SEQUENCE_NBR
));
list
.
add
(
dto2
);
list
.
add
(
dto2
);
}
}
...
@@ -4439,17 +4444,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -4439,17 +4444,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
inspectionDetectionInfo
.
setInspectType
(
"ZZJDJY"
);
inspectionDetectionInfo
.
setInspectType
(
"ZZJDJY"
);
inspectionDetectionInfo
.
setInspectConclusion
(
"6040"
);
// 默认合格
inspectionDetectionInfo
.
setInspectConclusion
(
"6040"
);
// 默认合格
// 根据条件确定增加的年数
inspectionDetectionInfo
.
setInspectDate
(
DateUtil
.
parse
(
data
.
getInspectDate
(),
"yyyy-MM-dd"
));
Optional
.
ofNullable
(
data
.
getInspectDate
())
inspectionDetectionInfo
.
setNextInspectDate
(
DateUtil
.
parse
(
data
.
getNextInspectDate
(),
"yyyy-MM-dd"
));
.
filter
(
s
->
!
s
.
trim
().
isEmpty
())
// 根据条件确定增加的年数(杨生元说监管让去掉,企业自己输入)
.
map
(
dateStr
->
LocalDate
.
parse
(
dateStr
,
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)))
// Optional.ofNullable(data.getInspectDate())
.
ifPresent
(
inspectDate
->
{
// .filter(s -> !s.trim().isEmpty())
inspectionDetectionInfo
.
setInspectDate
(
Date
.
from
(
inspectDate
.
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
()));
// .map(dateStr -> LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd")))
// 计算下次检测日期(加 3 年或 4 年)
// .ifPresent(inspectDate -> {
int
plusYears
=
SPECIAL_CYLINDER
.
getCode
().
equals
(
equipInfoDto
.
getEquDefineCode
())
?
3
:
4
;
// inspectionDetectionInfo.setInspectDate(Date.from(inspectDate.atStartOfDay(ZoneId.systemDefault()).toInstant()));
LocalDate
nextInspectDate
=
inspectDate
.
plusYears
(
plusYears
);
// // 计算下次检测日期(加 3 年或 4 年)
inspectionDetectionInfo
.
setNextInspectDate
(
Date
.
from
(
nextInspectDate
.
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
()));
// int plusYears = SPECIAL_CYLINDER.getCode().equals(equipInfoDto.getEquDefineCode()) ? 3 : 4;
});
// LocalDate nextInspectDate = inspectDate.plusYears(plusYears);
// inspectionDetectionInfo.setNextInspectDate(Date.from(nextInspectDate.atStartOfDay(ZoneId.systemDefault()).toInstant()));
// });
inspectionDetectionInfoList
.
add
(
inspectionDetectionInfo
);
inspectionDetectionInfoList
.
add
(
inspectionDetectionInfo
);
// 其他信息
// 其他信息
...
...
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/JgChangeVehicleRegistrationUnitServiceImpl.java
View file @
4621beaa
...
@@ -815,7 +815,7 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
...
@@ -815,7 +815,7 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
public
Page
<
JgUseRegistrationManageDto
>
getUseRegistrationCodeData
(
Page
<
JgUseRegistrationManageDto
>
page
,
public
Page
<
JgUseRegistrationManageDto
>
getUseRegistrationCodeData
(
Page
<
JgUseRegistrationManageDto
>
page
,
JgUseRegistrationManageDto
dto
)
{
JgUseRegistrationManageDto
dto
)
{
return
jgUseRegistrationManageService
.
query
ForJg
UseRegistrationManagePage
(
page
,
dto
,
null
);
return
jgUseRegistrationManageService
.
queryUseRegistrationManagePage
(
page
,
dto
,
null
);
}
}
public
Map
<
String
,
Object
>
getEquList
(
String
useRegistrationCode
)
{
public
Map
<
String
,
Object
>
getEquList
(
String
useRegistrationCode
)
{
...
...
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/JgUseRegistrationManageServiceImpl.java
View file @
4621beaa
...
@@ -330,6 +330,20 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
...
@@ -330,6 +330,20 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
return
jgUseRegistrationManageMapper
.
queryForPage
(
page
,
dto
,
sortMap
);
return
jgUseRegistrationManageMapper
.
queryForPage
(
page
,
dto
,
sortMap
);
}
}
/**
* 分页查询证管理表-选择证使用,添加产权单位id
*/
public
Page
<
JgUseRegistrationManageDto
>
queryUseRegistrationManagePage
(
Page
<
JgUseRegistrationManageDto
>
page
,
JgUseRegistrationManageDto
dto
,
String
sort
)
{
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversion
(
sort
);
if
(
ApplicationFormTypeEnum
.
BF
.
getBusinessCode
().
equals
(
dto
.
getApplyType
())
&&
(!
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
dto
.
getEquCategoryCode
())
||
dto
.
getRegType
().
equals
(
BusinessTypeEnum
.
JG_VEHICLE_GAS_APPLICATION
.
getName
()))){
dto
.
setCertificateStatus
(
null
);
dto
.
setIsScrap
(
"0"
);
}
return
jgUseRegistrationManageMapper
.
queryUseRegistrationManagePage
(
page
,
dto
,
sortMap
);
}
public
Page
<
JgUseRegistrationManageDto
>
queryForJgUseRegistrationManagePageForJG
(
JgUseRegistrationManageDto
dto
,
String
sort
,
int
current
,
int
size
)
{
public
Page
<
JgUseRegistrationManageDto
>
queryForJgUseRegistrationManagePageForJG
(
JgUseRegistrationManageDto
dto
,
String
sort
,
int
current
,
int
size
)
{
Page
<
JgUseRegistrationManageDto
>
page
=
new
Page
<
JgUseRegistrationManageDto
>();
Page
<
JgUseRegistrationManageDto
>
page
=
new
Page
<
JgUseRegistrationManageDto
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
...
...
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 @
4621beaa
...
@@ -359,13 +359,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -359,13 +359,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversionNoToUnderline
(
sort
);
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversionNoToUnderline
(
sort
);
// 统计查询时间
// 统计查询时间
long
startTime
=
System
.
currentTimeMillis
();
long
startTime
=
System
.
currentTimeMillis
();
long
total
=
this
.
baseMapper
.
getListPageCount
(
sortMap
,
dto
,
roleIds
,
client
);
logger
.
info
(
"使用登记单据-列表查询"
);
logger
.
info
(
"使用登记单据-列表查询"
);
List
<
Map
<
String
,
Object
>>
resultRecords
=
this
.
baseMapper
.
getListPage1
(
page
.
getSize
(),
page
.
getSize
()
*
(
page
.
getCurrent
()
-
1
),
sortMap
,
dto
,
roleIds
,
client
);
List
<
Map
<
String
,
Object
>>
resultRecords
=
this
.
baseMapper
.
getListPage1
(
page
.
getSize
(),
Long
.
min
(
page
.
getSize
()
*
(
page
.
getCurrent
()
-
1
),
total
),
sortMap
,
dto
,
roleIds
,
client
);
logger
.
info
(
"使用登记单据-列表查询耗时:{}毫秒"
,
(
System
.
currentTimeMillis
()
-
startTime
));
logger
.
info
(
"使用登记单据-列表查询耗时:{}毫秒"
,
(
System
.
currentTimeMillis
()
-
startTime
));
page
.
setRecords
(
resultRecords
);
page
.
setRecords
(
resultRecords
);
logger
.
info
(
"使用登记单据-列表总数查询"
);
logger
.
info
(
"使用登记单据-列表总数查询"
);
startTime
=
System
.
currentTimeMillis
();
startTime
=
System
.
currentTimeMillis
();
page
.
setTotal
(
t
his
.
baseMapper
.
getListPageCount
(
sortMap
,
dto
,
roleIds
,
client
)
);
page
.
setTotal
(
t
otal
);
logger
.
info
(
"使用登记单据-列表总数查询耗时:{}毫秒"
,
(
System
.
currentTimeMillis
()
-
startTime
));
logger
.
info
(
"使用登记单据-列表总数查询耗时:{}毫秒"
,
(
System
.
currentTimeMillis
()
-
startTime
));
return
page
;
return
page
;
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/utils/WordTemplateUtils.java
View file @
4621beaa
...
@@ -287,6 +287,7 @@ public class WordTemplateUtils {
...
@@ -287,6 +287,7 @@ public class WordTemplateUtils {
if
(
value
==
null
)
{
if
(
value
==
null
)
{
return
null
;
return
null
;
}
}
value
=
removeControlCharsManual
(
value
);
return
value
.
replace
(
"&"
,
"&"
)
return
value
.
replace
(
"&"
,
"&"
)
.
replace
(
"<"
,
"<"
)
.
replace
(
"<"
,
"<"
)
.
replace
(
">"
,
">"
)
.
replace
(
">"
,
">"
)
...
@@ -296,4 +297,18 @@ public class WordTemplateUtils {
...
@@ -296,4 +297,18 @@ public class WordTemplateUtils {
.
replace
(
")"
,
")"
);
.
replace
(
")"
,
")"
);
}
}
public
static
String
removeControlCharsManual
(
String
input
)
{
if
(
input
==
null
)
return
""
;
StringBuilder
sb
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
input
.
length
();
i
++)
{
char
c
=
input
.
charAt
(
i
);
// 只保留允许的字符
if
(
c
>
31
||
c
==
'\t'
||
c
==
'\n'
||
c
==
'\r'
)
{
sb
.
append
(
c
);
}
}
return
sb
.
toString
();
}
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/EquipAdvanceSearchEnum.java
View file @
4621beaa
...
@@ -40,6 +40,8 @@ public enum EquipAdvanceSearchEnum {
...
@@ -40,6 +40,8 @@ public enum EquipAdvanceSearchEnum {
AZUSC_UNIT_NAME
(
"安装改造维修单位名称"
,
"USC_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
AZUSC_UNIT_NAME
(
"安装改造维修单位名称"
,
"USC_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
CODE96333
(
"96333识别码"
,
"CODE96333"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
CODE96333
(
"96333识别码"
,
"CODE96333"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
SUPERVISORY_CODE
(
"监管码"
,
"SUPERVISORY_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
SUPERVISORY_CODE
(
"监管码"
,
"SUPERVISORY_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
EQU_CODE
(
"设备代码"
,
"EQU_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
FACTORY_NUM
(
"出厂编号"
,
"FACTORY_NUM"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
EQU_TYPE
(
"设备型号"
,
"EQU_TYPE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
EQU_TYPE
(
"设备型号"
,
"EQU_TYPE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
PRODUCE_DATE
(
"制造日期"
,
"PRODUCE_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
PRODUCE_DATE
(
"制造日期"
,
"PRODUCE_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
designDate
(
"设计日期"
,
"designDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
designDate
(
"设计日期"
,
"designDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/ZLDPStatisticsController.java
View file @
4621beaa
...
@@ -19,7 +19,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -19,7 +19,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -193,6 +192,6 @@ public class ZLDPStatisticsController {
...
@@ -193,6 +192,6 @@ public class ZLDPStatisticsController {
@GetMapping
(
value
=
"/getTree"
)
@GetMapping
(
value
=
"/getTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询监管部门树"
,
notes
=
"查询监管部门树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询监管部门树"
,
notes
=
"查询监管部门树"
)
public
ResponseModel
<
Object
>
getTree
(){
public
ResponseModel
<
Object
>
getTree
(){
return
ResponseHelper
.
buildResponse
(
Collections
.
singletonList
(
statisticsService
.
getRegulatorUnitTree
()
));
return
ResponseHelper
.
buildResponse
(
statisticsService
.
getAllRegulatorUnitTree
(
));
}
}
}
}
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/AQZSDPStatisticsServiceImpl.java
View file @
4621beaa
...
@@ -910,7 +910,7 @@ public class AQZSDPStatisticsServiceImpl {
...
@@ -910,7 +910,7 @@ public class AQZSDPStatisticsServiceImpl {
result
.
put
(
"total"
,
hasSupervisoryCodeEquipCount
);
result
.
put
(
"total"
,
hasSupervisoryCodeEquipCount
);
//2.压力管道长度统计
//2.压力管道长度统计
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode,true, false);
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode,true, false);
jgDPStatisticsService
.
staticsCenterMapCountPipLine
(
result
,
orgCode
);
jgDPStatisticsService
.
staticsCenterMapCountPipLine
(
result
,
orgCode
,
true
);
//3.单位数量统计
//3.单位数量统计
// 单位统计修改为查询es
// 单位统计修改为查询es
// this.staticsCenterMapCountDataForCompany(result, orgCode, dpFilterParamDto.getCityCode());
// this.staticsCenterMapCountDataForCompany(result, orgCode, dpFilterParamDto.getCityCode());
...
@@ -1024,7 +1024,7 @@ public class AQZSDPStatisticsServiceImpl {
...
@@ -1024,7 +1024,7 @@ public class AQZSDPStatisticsServiceImpl {
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
true
,
true
,
false
);
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
true
,
true
,
false
);
// 2. 压力管道长度统计
// 2. 压力管道长度统计
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode,true, false);
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode,true, false);
jgDPStatisticsService
.
staticsCenterMapCountPipLine
(
result
,
orgCode
);
jgDPStatisticsService
.
staticsCenterMapCountPipLine
(
result
,
orgCode
,
true
);
//3.单位数量统计
//3.单位数量统计
// 单位统计修改为查询es
// 单位统计修改为查询es
// this.staticsCenterMapCountDataForCompany(result, orgCode, dpFilterParamDto.getCityCode());
// this.staticsCenterMapCountDataForCompany(result, orgCode, dpFilterParamDto.getCityCode());
...
...
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 @
4621beaa
...
@@ -1211,6 +1211,10 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1211,6 +1211,10 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"SAFETY_MANAGER.keyword"
,
"*"
+
fuzzyValue
+
"*"
));
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"SAFETY_MANAGER.keyword"
,
"*"
+
fuzzyValue
+
"*"
));
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_NAME"
,
"*"
+
fuzzyValue
+
"*"
));
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_NAME"
,
"*"
+
fuzzyValue
+
"*"
));
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"MAINTAIN_UNIT_NAME"
,
"*"
+
fuzzyValue
+
"*"
));
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"MAINTAIN_UNIT_NAME"
,
"*"
+
fuzzyValue
+
"*"
));
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"FACTORY_NUM"
,
"*"
+
fuzzyValue
+
"*"
));
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"EQU_CODE"
,
"*"
+
fuzzyValue
+
"*"
));
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"CODE96333"
,
"*"
+
fuzzyValue
+
"*"
));
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
"SUPERVISORY_CODE"
,
"*"
+
fuzzyValue
+
"*"
));
queryBuilder
.
minimumShouldMatch
(
1
);
queryBuilder
.
minimumShouldMatch
(
1
);
boolMust
.
must
(
queryBuilder
);
boolMust
.
must
(
queryBuilder
);
}
else
if
(
k
.
equals
(
"WHETHER_VEHICLE_CYLINDER"
))
{
}
else
if
(
k
.
equals
(
"WHETHER_VEHICLE_CYLINDER"
))
{
...
...
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/JGDPStatisticsServiceImpl.java
View file @
4621beaa
...
@@ -34,6 +34,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.*;
...
@@ -34,6 +34,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.*;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.QueryBuilderUtils
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.QueryBuilderUtils
;
import
com.yeejoin.amos.boot.module.statistcs.factory.EnhancedDynamicQueryBuilder
;
import
com.yeejoin.amos.boot.module.statistics.api.dto.*
;
import
com.yeejoin.amos.boot.module.statistics.api.dto.*
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.RegulatoryUnitLevelEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.RegulatoryUnitLevelEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.StatisticalAnalysisEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.StatisticalAnalysisEnum
;
...
@@ -396,7 +397,7 @@ public class JGDPStatisticsServiceImpl {
...
@@ -396,7 +397,7 @@ public class JGDPStatisticsServiceImpl {
//2.压力管道长度统计
//2.压力管道长度统计
// 修改为查询es
// 修改为查询es
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode, true, false);
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode, true, false);
this
.
staticsCenterMapCountPipLine
(
result
,
orgCode
);
this
.
staticsCenterMapCountPipLine
(
result
,
orgCode
,
true
);
//3.单位数量统计
//3.单位数量统计
this
.
staticsCenterMapCountDataForCompany
(
result
,
orgCode
,
dpFilterParamDto
.
getCityCode
());
this
.
staticsCenterMapCountDataForCompany
(
result
,
orgCode
,
dpFilterParamDto
.
getCityCode
());
//4.人员数量统计
//4.人员数量统计
...
@@ -415,7 +416,8 @@ public class JGDPStatisticsServiceImpl {
...
@@ -415,7 +416,8 @@ public class JGDPStatisticsServiceImpl {
//1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
//1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
false
,
true
,
false
);
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
false
,
true
,
false
);
//2.压力管道长度统计
//2.压力管道长度统计
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
,
false
,
false
);
this
.
staticsCenterMapCountPipLine
(
result
,
orgCode
,
false
);
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode, false, false);
return
result
;
return
result
;
}
}
...
@@ -432,7 +434,7 @@ public class JGDPStatisticsServiceImpl {
...
@@ -432,7 +434,7 @@ public class JGDPStatisticsServiceImpl {
// 2. 压力管道长度统计
// 2. 压力管道长度统计
// 修改为查询es
// 修改为查询es
//stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode, true, false);
//stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode, true, false);
this
.
staticsCenterMapCountPipLine
(
result
,
orgCode
);
this
.
staticsCenterMapCountPipLine
(
result
,
orgCode
,
true
);
// 3. 人员数量统计
// 3. 人员数量统计
this
.
staticsCenterMapCountDataForPerson
(
result
,
dpFilterParamDto
,
orgCode
);
this
.
staticsCenterMapCountDataForPerson
(
result
,
dpFilterParamDto
,
orgCode
);
return
result
;
return
result
;
...
@@ -490,7 +492,7 @@ public class JGDPStatisticsServiceImpl {
...
@@ -490,7 +492,7 @@ public class JGDPStatisticsServiceImpl {
}
}
public
void
staticsCenterMapCountPipLine
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
public
void
staticsCenterMapCountPipLine
(
Map
<
String
,
Object
>
result
,
String
orgCode
,
Boolean
isMatchSupervisoryCode
)
{
SearchRequest
request
=
new
SearchRequest
();
SearchRequest
request
=
new
SearchRequest
();
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
request
.
indices
(
StatisticalAnalysisEnum
.
equip
.
getKey
());
request
.
indices
(
StatisticalAnalysisEnum
.
equip
.
getKey
());
...
@@ -498,8 +500,16 @@ public class JGDPStatisticsServiceImpl {
...
@@ -498,8 +500,16 @@ public class JGDPStatisticsServiceImpl {
BoolQueryBuilder
pipeLengthQuery
=
new
BoolQueryBuilder
();
BoolQueryBuilder
pipeLengthQuery
=
new
BoolQueryBuilder
();
pipeLengthQuery
.
must
(
QueryBuilders
.
prefixQuery
(
"ORG_BRANCH_CODE"
,
orgCode
));
pipeLengthQuery
.
must
(
QueryBuilders
.
prefixQuery
(
"ORG_BRANCH_CODE"
,
orgCode
));
pipeLengthQuery
.
must
(
QueryBuilders
.
existsQuery
(
"pipeLength"
));
pipeLengthQuery
.
must
(
QueryBuilders
.
existsQuery
(
"pipeLength"
));
pipeLengthQuery
.
must
(
existsQuery
(
"SUPERVISORY_CODE"
));
pipeLengthQuery
.
must
(
QueryBuilders
.
prefixQuery
(
"ORG_BRANCH_CODE"
,
orgCode
));
pipeLengthQuery
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
""
));
if
(
isMatchSupervisoryCode
)
{
pipeLengthQuery
.
must
(
existsQuery
(
"SUPERVISORY_CODE"
));
pipeLengthQuery
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
""
));
}
else
{
EnhancedDynamicQueryBuilder
enhancedDynamicQueryBuilder
=
new
EnhancedDynamicQueryBuilder
();
enhancedDynamicQueryBuilder
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
existsQuery
(
"SUPERVISORY_CODE"
)),
"or"
);
enhancedDynamicQueryBuilder
.
add
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
""
),
"or"
);
pipeLengthQuery
.
must
(
enhancedDynamicQueryBuilder
.
build
());
}
pipeLengthQuery
.
mustNot
(
QueryBuilders
.
termsQuery
(
"STATUS"
,
Arrays
.
asList
(
"草稿"
,
"已拒领"
,
"待认领"
)));
pipeLengthQuery
.
mustNot
(
QueryBuilders
.
termsQuery
(
"STATUS"
,
Arrays
.
asList
(
"草稿"
,
"已拒领"
,
"待认领"
)));
SumAggregationBuilder
pipeLengthAgg
=
AggregationBuilders
.
sum
(
"pipeLengthSum"
).
field
(
"pipeLength"
).
missing
(
0
);
SumAggregationBuilder
pipeLengthAgg
=
AggregationBuilders
.
sum
(
"pipeLengthSum"
).
field
(
"pipeLength"
).
missing
(
0
);
builder
.
query
(
pipeLengthQuery
);
builder
.
query
(
pipeLengthQuery
);
...
@@ -1834,7 +1844,7 @@ public class JGDPStatisticsServiceImpl {
...
@@ -1834,7 +1844,7 @@ public class JGDPStatisticsServiceImpl {
result
.
put
(
"total"
,
hasSupervisoryCodeEquipCount
);
result
.
put
(
"total"
,
hasSupervisoryCodeEquipCount
);
// 2.压力管道长度统计
// 2.压力管道长度统计
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode, true, false);
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode, true, false);
this
.
staticsCenterMapCountPipLine
(
result
,
orgCode
);
this
.
staticsCenterMapCountPipLine
(
result
,
orgCode
,
true
);
// 3.已纳管设备总数
// 3.已纳管设备总数
this
.
staticsCenterMapCountDataForEquipIsManage
(
result
);
this
.
staticsCenterMapCountDataForEquipIsManage
(
result
);
// 4.登记证总数
// 4.登记证总数
...
...
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/JYJCDPStatisticsServiceImpl.java
View file @
4621beaa
...
@@ -548,7 +548,7 @@ public class JYJCDPStatisticsServiceImpl {
...
@@ -548,7 +548,7 @@ public class JYJCDPStatisticsServiceImpl {
result
.
put
(
"total"
,
hasSupervisoryCodeEquipCount
);
result
.
put
(
"total"
,
hasSupervisoryCodeEquipCount
);
// 3.压力管道统计
// 3.压力管道统计
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode,true, false);
// stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode,true, false);
jgDPStatisticsService
.
staticsCenterMapCountPipLine
(
result
,
orgCode
);
jgDPStatisticsService
.
staticsCenterMapCountPipLine
(
result
,
orgCode
,
true
);
// 4.报检数量统计
// 4.报检数量统计
this
.
staticsCenterMapCountDataReporting
(
result
,
dpFilterParamDto
);
this
.
staticsCenterMapCountDataReporting
(
result
,
dpFilterParamDto
);
// 5.检验检测临期设备数数量统计
// 5.检验检测临期设备数数量统计
...
...
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/ZLDPStatisticsServiceImpl.java
View file @
4621beaa
...
@@ -1278,5 +1278,8 @@ public class ZLDPStatisticsServiceImpl {
...
@@ -1278,5 +1278,8 @@ public class ZLDPStatisticsServiceImpl {
return
null
;
return
null
;
}
}
public
List
<
LinkedHashMap
>
getAllRegulatorUnitTree
()
{
return
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"REGULATOR_UNIT_TREE"
);
}
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/dto/TzBaseEnterpriseInfoDto.java
View file @
4621beaa
...
@@ -347,6 +347,9 @@ public class TzBaseEnterpriseInfoDto extends BaseDto {
...
@@ -347,6 +347,9 @@ public class TzBaseEnterpriseInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
protected
Date
createDateEnd
;
protected
Date
createDateEnd
;
@ApiModelProperty
(
value
=
"创建时间"
)
protected
String
createDate
;
/**
/**
* 单位类型集合
* 单位类型集合
*/
*/
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/enums/CompanyLevelEnum.java
View file @
4621beaa
...
@@ -19,24 +19,17 @@ public enum CompanyLevelEnum {
...
@@ -19,24 +19,17 @@ public enum CompanyLevelEnum {
HEADQUARTER
(
"headquarter"
,
"省级"
),
HEADQUARTER
(
"headquarter"
,
"省级"
),
PREFECTURE_LEVEL
(
"prefecture-level"
,
"地市级"
),
PREFECTURE_LEVEL
(
"prefecture-level"
,
"地市级"
),
COUNTY
(
"county"
,
"区县级"
),
COUNTY
(
"county"
,
"区县级"
),
ORGANIZATION
(
"organization"
,
"基层机构"
);
ORGANIZATION
(
"organization"
,
"基层机构"
),
COMPANY
(
"company"
,
"企业"
);
private
String
code
;
private
String
code
;
private
String
name
;
private
String
name
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
this
.
code
=
code
;
}
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/mapper/TzBaseEnterpriseInfoMapper.java
View file @
4621beaa
...
@@ -102,4 +102,8 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
...
@@ -102,4 +102,8 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
void
updateRedundantSupervisionOrgCodeStatistics
(
String
newOrgCode
,
String
oldOrgCode
);
void
updateRedundantSupervisionOrgCodeStatistics
(
String
newOrgCode
,
String
oldOrgCode
);
void
updateEquipmentSupervisionOrgCode
(
String
newOrgCode
,
String
newSupervisionName
,
List
<
String
>
equipmentList
);
void
updateEquipmentSupervisionOrgCode
(
String
newOrgCode
,
String
newSupervisionName
,
List
<
String
>
equipmentList
);
List
<
Map
<
String
,
String
>>
getIndividualUserId
();
List
<
Map
<
String
,
String
>>
selectOnlyHasBaseInfoAppId
();
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ITzBaseEnterpriseInfoService.java
View file @
4621beaa
...
@@ -61,6 +61,6 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI
...
@@ -61,6 +61,6 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI
void
refreshCompanyInfo
(
JSONObject
dataResult
,
String
method
);
void
refreshCompanyInfo
(
JSONObject
dataResult
,
String
method
);
void
refresh
Company
OrgCode
(
JSONObject
dataResult
,
String
newOrgCode
,
String
oldOrgCode
);
void
refresh
Supervision
OrgCode
(
JSONObject
dataResult
,
String
newOrgCode
,
String
oldOrgCode
);
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
4621beaa
...
@@ -36,8 +36,15 @@
...
@@ -36,8 +36,15 @@
<select
id=
"page"
<select
id=
"page"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto"
>
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto"
>
SELECT
SELECT "sequence_nbr","use_unit_code","supervise_code","use_unit_certificate","unit_type","use_code","use_unit","supervise_org_code",
*,
"supervise_org_name","key_unit","class_places","province","city","district","street","community",
"address","legal_person","legal_phone","use_contact","contact_phone","safety_one","safety_one_id","safety_one_phone",
"safety_two","safety_two_id","safety_two_phone","longitude","latitude","sync_date","sync_state","app_id","rec_date","rec_user_id",
"governing_body","data_sources","industry","registration_authority","approval_time","operating_status","mainten_person","mainten_telephone",
"sqa","quality_person","quality_telephone","technical_person","is_delete","rec_user_name","equip_category","unit_business_license","unit_exequatur",
"safety_two_photo","safety_one_photo","sqa_phone","qr_code","industry_supervisor","regulatory_labels",
"register_type","other_accessories","status" ,"org_code","office_region","office_address",
DATE_FORMAT(create_date,'%Y-%m-%d') as createDate,
CONCAT(province,'/',city,'/',district) AS region,
CONCAT(province,'/',city,'/',district) AS region,
CONCAT(street,'/',address) AS full_address
CONCAT(street,'/',address) AS full_address
FROM
FROM
...
@@ -84,7 +91,15 @@
...
@@ -84,7 +91,15 @@
</select>
</select>
<select
id=
"pageList"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto"
>
<select
id=
"pageList"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto"
>
SELECT *,
SELECT "sequence_nbr","use_unit_code","supervise_code","use_unit_certificate","unit_type","use_code","use_unit","supervise_org_code",
"supervise_org_name","key_unit","class_places","province","city","district","street","community",
"address","legal_person","legal_phone","use_contact","contact_phone","safety_one","safety_one_id","safety_one_phone",
"safety_two","safety_two_id","safety_two_phone","longitude","latitude","sync_date","sync_state","app_id","rec_date","rec_user_id",
"governing_body","data_sources","industry","registration_authority","approval_time","operating_status","mainten_person","mainten_telephone",
"sqa","quality_person","quality_telephone","technical_person","is_delete","rec_user_name","equip_category","unit_business_license","unit_exequatur",
"safety_two_photo","safety_one_photo","sqa_phone","qr_code","industry_supervisor","regulatory_labels",
"register_type","other_accessories","status" ,"org_code","office_region","office_address",
DATE_FORMAT(create_date,'%Y-%m-%d') as createDate,
CONCAT(province,'/',city,'/',district) AS region,
CONCAT(province,'/',city,'/',district) AS region,
CONCAT(street,'/',address) AS full_address
CONCAT(street,'/',address) AS full_address
FROM tz_base_enterprise_info
FROM tz_base_enterprise_info
...
@@ -441,4 +456,22 @@
...
@@ -441,4 +456,22 @@
#{record}
#{record}
</foreach>
</foreach>
</update>
</update>
<select
id=
"getIndividualUserId"
resultType=
"java.util.Map"
>
SELECT
pc.company_code companyCode, uor.user_id adminUserId
FROM
privilege_company pc
LEFT JOIN privilege_user_org_role uor ON uor.company_seq = pc.sequence_nbr
WHERE
pc.is_deleted = 0
AND pc.company_code IN ( SELECT use_code FROM "tz_base_enterprise_info" WHERE unit_type = '个人主体' AND is_delete = 0 AND app_id is null)
AND uor.role_seq = 1697171841505849345
</select>
<select
id=
"selectOnlyHasBaseInfoAppId"
resultType=
"java.util.Map"
>
select use_unit_code useUnitCode, app_id appId from tz_base_enterprise_info WHERE app_id is not null
except
select unit_code useUnitCode, app_id appId from tz_flc_reg_unit_info WHERE app_id is not null
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/HistoryDataDealController.java
View file @
4621beaa
...
@@ -50,9 +50,15 @@ public class HistoryDataDealController {
...
@@ -50,9 +50,15 @@ public class HistoryDataDealController {
@Deprecated
@Deprecated
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/handleCompanyHisOrgCode"
)
@PostMapping
(
value
=
"/handleCompanyHisOrgCode"
)
@ApiOperation
(
httpMethod
=
"P
U
T"
,
value
=
"监管单位层级调整后,业务表(企业、设备、统计等)冗余的所有旧orgCode替换为新orgCode,不更新平台表"
,
notes
=
"监管单位层级调整后,业务表(企业、设备、统计等)冗余的所有旧orgCode替换为新orgCode,不更新平台表"
)
@ApiOperation
(
httpMethod
=
"P
OS
T"
,
value
=
"监管单位层级调整后,业务表(企业、设备、统计等)冗余的所有旧orgCode替换为新orgCode,不更新平台表"
,
notes
=
"监管单位层级调整后,业务表(企业、设备、统计等)冗余的所有旧orgCode替换为新orgCode,不更新平台表"
)
public
ResponseModel
<
String
>
handleCompanyHisOrgCode
(
@RequestBody
List
<
Map
<
String
,
Object
>>
orgCodeMap
)
{
public
ResponseModel
<
String
>
handleCompanyHisOrgCode
(
@RequestBody
List
<
Map
<
String
,
Object
>>
orgCodeMap
)
{
return
ResponseHelper
.
buildResponse
(
historyDataDealService
.
handleCompanyHisOrgCode
(
orgCodeMap
));
return
ResponseHelper
.
buildResponse
(
historyDataDealService
.
handleCompanyHisOrgCode
(
orgCodeMap
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/handleCompanyAppId"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修复未生成appId的旧企业数据"
,
notes
=
"修复未生成appId的旧企业数据"
)
public
ResponseModel
<
String
>
handleCompanyAppId
(
@RequestBody
(
required
=
false
)
List
<
String
>
useUnitCodes
)
{
return
ResponseHelper
.
buildResponse
(
historyDataDealService
.
handleCompanyAppId
(
useUnitCodes
));
}
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsAppController.java
View file @
4621beaa
...
@@ -90,16 +90,16 @@ public class TzsAppController {
...
@@ -90,16 +90,16 @@ public class TzsAppController {
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipInfoBySuperviseCode
(
supervisoryCode
));
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipInfoBySuperviseCode
(
supervisoryCode
));
}
}
/**
//
/**
* 登录
//
* 登录
* @return
//
* @return
*/
//
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
//
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping
(
value
=
"/mobile/login"
)
//
@PostMapping(value = "/mobile/login")
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"小程序登录"
,
notes
=
"小程序登录"
)
//
@ApiOperation(httpMethod = "POST", value = "小程序登录", notes = "小程序登录")
public
ResponseModel
<
Map
<
String
,
Object
>>
login
(
@RequestBody
MobileLoginParam
param
)
{
//
public ResponseModel<Map<String, Object>> login(@RequestBody MobileLoginParam param) {
return
ResponseHelper
.
buildResponse
(
appService
.
login
(
param
));
//
return ResponseHelper.buildResponse(appService.login(param));
}
//
}
/**
/**
* 小程序企业详情
* 小程序企业详情
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/listener/PlatformUserTopicMessage.java
View file @
4621beaa
...
@@ -87,7 +87,7 @@ public class PlatformUserTopicMessage extends EmqxListener {
...
@@ -87,7 +87,7 @@ public class PlatformUserTopicMessage extends EmqxListener {
JSONObject
jsonObject
=
JSON
.
parseObject
(
message
.
toString
());
JSONObject
jsonObject
=
JSON
.
parseObject
(
message
.
toString
());
String
newOrgCode
=
jsonObject
.
getString
(
"newOrgCode"
);
String
newOrgCode
=
jsonObject
.
getString
(
"newOrgCode"
);
String
oldOrgCode
=
jsonObject
.
getString
(
"oldOrgCode"
);
String
oldOrgCode
=
jsonObject
.
getString
(
"oldOrgCode"
);
tzBaseEnterpriseInfoService
.
refresh
Company
OrgCode
(
jsonObject
,
newOrgCode
,
oldOrgCode
);
tzBaseEnterpriseInfoService
.
refresh
Supervision
OrgCode
(
jsonObject
,
newOrgCode
,
oldOrgCode
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"处理平台推送组织架构层级变动消息失败:{}"
,
e
.
getMessage
());
log
.
info
(
"处理平台推送组织架构层级变动消息失败:{}"
,
e
.
getMessage
());
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
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/HistoryDataDealServiceImpl.java
View file @
4621beaa
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tcm.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tcm.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
@@ -9,7 +10,11 @@ import com.yeejoin.amos.boot.module.common.api.constant.TZSCommonConstant;
...
@@ -9,7 +10,11 @@ import com.yeejoin.amos.boot.module.common.api.constant.TZSCommonConstant;
import
com.yeejoin.amos.boot.module.common.api.entity.TzsUserPermission
;
import
com.yeejoin.amos.boot.module.common.api.entity.TzsUserPermission
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.entity.RegUnitInfo
;
import
com.yeejoin.amos.boot.module.tcm.flc.biz.service.impl.RegUnitInfoServiceImpl
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -18,6 +23,7 @@ import org.springframework.util.StopWatch;
...
@@ -18,6 +23,7 @@ import org.springframework.util.StopWatch;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
* @author Administrator
* @author Administrator
...
@@ -32,10 +38,13 @@ public class HistoryDataDealServiceImpl {
...
@@ -32,10 +38,13 @@ public class HistoryDataDealServiceImpl {
private
TzBaseEnterpriseInfoServiceImpl
baseEnterpriseInfoService
;
private
TzBaseEnterpriseInfoServiceImpl
baseEnterpriseInfoService
;
public
HistoryDataDealServiceImpl
(
TzsUserInfoServiceImpl
userInfoService
,
TzsUserPermissionServiceImpl
userPermissionService
,
TzBaseEnterpriseInfoServiceImpl
baseEnterpriseInfoService
)
{
private
RegUnitInfoServiceImpl
regUnitInfoService
;
public
HistoryDataDealServiceImpl
(
TzsUserInfoServiceImpl
userInfoService
,
TzsUserPermissionServiceImpl
userPermissionService
,
TzBaseEnterpriseInfoServiceImpl
baseEnterpriseInfoService
,
RegUnitInfoServiceImpl
regUnitInfoService
)
{
this
.
userInfoService
=
userInfoService
;
this
.
userInfoService
=
userInfoService
;
this
.
userPermissionService
=
userPermissionService
;
this
.
userPermissionService
=
userPermissionService
;
this
.
baseEnterpriseInfoService
=
baseEnterpriseInfoService
;
this
.
baseEnterpriseInfoService
=
baseEnterpriseInfoService
;
this
.
regUnitInfoService
=
regUnitInfoService
;
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -142,15 +151,88 @@ public class HistoryDataDealServiceImpl {
...
@@ -142,15 +151,88 @@ public class HistoryDataDealServiceImpl {
orgCodeMap
.
forEach
(
map
->
{
orgCodeMap
.
forEach
(
map
->
{
String
newOrgCode
=
map
.
get
(
"newOrgCode"
).
toString
();
String
newOrgCode
=
map
.
get
(
"newOrgCode"
).
toString
();
String
oldOrgCode
=
map
.
get
(
"oldOrgCode"
).
toString
();
String
oldOrgCode
=
map
.
get
(
"oldOrgCode"
).
toString
();
//1.
处理平台旧orgCode本身错误数据
//1.
查询新orgCode对应的监管单位信息
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
HashMap
<
String
,
Object
>
platformCompanyInfo
=
(
HashMap
<
String
,
Object
>)
Privilege
.
companyClient
.
queryByOrgcode
(
old
OrgCode
).
getResult
();
HashMap
<
String
,
Object
>
platformCompanyInfo
=
(
HashMap
<
String
,
Object
>)
Privilege
.
companyClient
.
queryByOrgcode
(
new
OrgCode
).
getResult
();
CompanyModel
parentModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
platformCompanyInfo
.
get
(
TZSCommonConstant
.
PLATFORM_FEIGN_RESULT_KEY_COMPANY
)),
CompanyModel
.
class
);
CompanyModel
parentModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
platformCompanyInfo
.
get
(
TZSCommonConstant
.
PLATFORM_FEIGN_RESULT_KEY_COMPANY
)),
CompanyModel
.
class
);
parentModel
.
setOrgCode
(
newOrgCode
);
JSONObject
modelMap
=
new
JSONObject
(
);
Privilege
.
companyClient
.
update
(
parentModel
,
parentModel
.
getSequenceNbr
(
));
modelMap
.
put
(
"newModel"
,
JSON
.
toJSON
(
parentModel
));
//2. 处理业务表旧orgCode错误数据
//2. 处理业务表旧orgCode错误数据
baseEnterpriseInfoService
.
refresh
CompanyOrgCode
(
null
,
newOrgCode
,
oldOrgCode
);
baseEnterpriseInfoService
.
refresh
SupervisionOrgCode
(
modelMap
,
newOrgCode
,
oldOrgCode
);
});
});
return
"success"
;
return
"success"
;
}
}
public
String
handleCompanyAppId
(
List
<
String
>
useUnitCodes
)
{
log
.
info
(
"为没有appId的企业生成appId开始"
);
List
<
TzBaseEnterpriseInfo
>
unitListWithOutAppId
;
if
(!
ValidationUtil
.
isEmpty
(
useUnitCodes
))
{
unitListWithOutAppId
=
baseEnterpriseInfoService
.
getBaseMapper
().
selectList
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>().
in
(
TzBaseEnterpriseInfo:
:
getUseUnitCode
,
useUnitCodes
).
isNull
(
TzBaseEnterpriseInfo:
:
getAppId
));
}
else
{
unitListWithOutAppId
=
baseEnterpriseInfoService
.
getBaseMapper
().
selectList
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>().
isNull
(
TzBaseEnterpriseInfo:
:
getAppId
));
}
if
(!
ValidationUtil
.
isEmpty
(
unitListWithOutAppId
))
{
// 处理企业未生成appId
List
<
TzBaseEnterpriseInfo
>
companyListWithOutAppId
;
companyListWithOutAppId
=
unitListWithOutAppId
.
stream
().
filter
(
unit
->
!
UnitTypeEnum
.
grzt
.
getName
().
equals
(
unit
.
getUnitType
())).
collect
(
Collectors
.
toList
());
if
(!
ValidationUtil
.
isEmpty
(
companyListWithOutAppId
))
{
List
<
RegUnitInfo
>
regUnitInfoList
=
regUnitInfoService
.
list
(
new
LambdaQueryWrapper
<
RegUnitInfo
>().
in
(
RegUnitInfo:
:
getUnitCode
,
companyListWithOutAppId
.
stream
().
map
(
TzBaseEnterpriseInfo:
:
getUseUnitCode
).
collect
(
Collectors
.
toList
())));
if
(!
ValidationUtil
.
isEmpty
(
regUnitInfoList
))
{
regUnitInfoList
.
forEach
(
regUnitInfo
->
{
if
(
ValidationUtil
.
isEmpty
(
regUnitInfo
.
getAppId
()))
{
AgencyUserModel
user
=
new
AgencyUserModel
();
user
.
setUserId
(
regUnitInfo
.
getAdminUserId
());
try
{
regUnitInfo
.
setAppId
(
regUnitInfoService
.
createAppId
(
user
));
}
catch
(
Exception
e
)
{
log
.
error
(
"为没有appId的企业生成appId异常"
,
e
);
throw
new
RuntimeException
(
e
);
}
}
companyListWithOutAppId
.
stream
().
filter
(
company
->
company
.
getUseUnitCode
().
equals
(
regUnitInfo
.
getUnitCode
())).
forEach
(
company
->
company
.
setAppId
(
regUnitInfo
.
getAppId
()));
});
baseEnterpriseInfoService
.
updateBatchById
(
companyListWithOutAppId
);
regUnitInfoService
.
updateBatchById
(
regUnitInfoList
);
}
}
List
<
TzBaseEnterpriseInfo
>
individualListWithOutAppId
=
unitListWithOutAppId
.
stream
().
filter
(
unit
->
UnitTypeEnum
.
grzt
.
getName
().
equals
(
unit
.
getUnitType
())).
collect
(
Collectors
.
toList
());;
// 处理个人主体未生成appId
List
<
Map
<
String
,
String
>>
individualUserId
=
baseEnterpriseInfoService
.
getBaseMapper
().
getIndividualUserId
();
if
(!
ValidationUtil
.
isEmpty
(
individualUserId
))
{
individualUserId
.
forEach
(
map
->
{
AgencyUserModel
user
=
new
AgencyUserModel
();
user
.
setUserId
(
map
.
get
(
"adminUserId"
));
try
{
map
.
put
(
"appId"
,
regUnitInfoService
.
createAppId
(
user
));
}
catch
(
Exception
e
)
{
log
.
error
(
"为没有appId的企业生成appId异常"
,
e
);
throw
new
RuntimeException
(
e
);
}
});
}
if
(!
ValidationUtil
.
isEmpty
(
individualListWithOutAppId
))
{
individualListWithOutAppId
.
forEach
(
individual
->
{
Optional
<
Map
<
String
,
String
>>
firstMap
=
individualUserId
.
stream
().
filter
(
map
->
map
.
get
(
"companyCode"
).
equals
(
individual
.
getUseCode
())).
findFirst
();
firstMap
.
ifPresent
(
stringMap
->
individual
.
setAppId
(
stringMap
.
get
(
"appId"
)));
});
baseEnterpriseInfoService
.
updateBatchById
(
individualListWithOutAppId
);
}
}
// 处理baseInfo表有appId,但是regUnitInfo表没有appId的
List
<
Map
<
String
,
String
>>
onlyHasBaseInfoAppId
=
baseEnterpriseInfoService
.
getBaseMapper
().
selectOnlyHasBaseInfoAppId
();
if
(!
ValidationUtil
.
isEmpty
(
onlyHasBaseInfoAppId
))
{
List
<
RegUnitInfo
>
regUnitInfoList
=
regUnitInfoService
.
list
(
new
LambdaQueryWrapper
<
RegUnitInfo
>().
isNull
(
RegUnitInfo:
:
getAppId
).
in
(
RegUnitInfo:
:
getUnitCode
,
onlyHasBaseInfoAppId
.
stream
().
map
(
e
->
e
.
get
(
"useUnitCode"
)).
collect
(
Collectors
.
toList
())));
if
(!
ValidationUtil
.
isEmpty
(
regUnitInfoList
))
{
regUnitInfoList
.
forEach
(
regUnitInfo
->
{
Optional
<
Map
<
String
,
String
>>
firstMap
=
onlyHasBaseInfoAppId
.
stream
().
filter
(
map
->
map
.
get
(
"useUnitCode"
).
equals
(
regUnitInfo
.
getUnitCode
())).
findFirst
();
firstMap
.
ifPresent
(
stringMap
->
regUnitInfo
.
setAppId
(
stringMap
.
get
(
"appId"
)));
});
regUnitInfoService
.
updateBatchById
(
regUnitInfoList
);
}
}
log
.
info
(
"为没有appId的企业生成appId结束"
);
return
"success"
;
}
}
}
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/TzBaseEnterpriseInfoServiceImpl.java
View file @
4621beaa
...
@@ -1466,38 +1466,37 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -1466,38 +1466,37 @@ public class TzBaseEnterpriseInfoServiceImpl
@Override
@Override
@Transactional
@Transactional
@Async
@Async
public
void
refresh
Company
OrgCode
(
JSONObject
dataResult
,
String
newOrgCode
,
String
oldOrgCode
)
{
public
void
refresh
Supervision
OrgCode
(
JSONObject
dataResult
,
String
newOrgCode
,
String
oldOrgCode
)
{
log
.
info
(
"开始刷新单位orgCode:{}"
,
dataResult
);
log
.
info
(
"开始刷新
监管
单位orgCode:{}"
,
dataResult
);
try
{
try
{
if
(!
ValidationUtil
.
isEmpty
(
newOrgCode
)
&&
!
ValidationUtil
.
isEmpty
(
oldOrgCode
)
&&
!
newOrgCode
.
equals
(
oldOrgCode
))
{
if
(!
ValidationUtil
.
isEmpty
(
newOrgCode
)
&&
!
ValidationUtil
.
isEmpty
(
oldOrgCode
)
&&
!
newOrgCode
.
equals
(
oldOrgCode
))
{
JSONObject
newModel
=
(
JSONObject
)
dataResult
.
get
(
"newModel"
);
JSONObject
newModel
=
(
JSONObject
)
dataResult
.
get
(
"newModel"
);
// 1. 查询旧属地监管部门orgCode对应所有的公司
String
companyLevel
=
newModel
.
getString
(
"level"
);
List
<
String
>
companySeqList
=
tzBaseEnterpriseInfoMapper
.
selectCompanyBySupervisionOrgCode
(
oldOrgCode
);
log
.
info
(
"监管单位信息:{}"
,
newModel
);
// 2. 查询旧属地监管部门orgCode对应的所有设备
if
(!
CompanyLevelEnum
.
COMPANY
.
getCode
().
equals
(
companyLevel
))
{
// 只处理监管单位,企业的orgCode变更在refreshCompanyInfo中处理
List
<
String
>
equipmentRecordList
=
tzBaseEnterpriseInfoMapper
.
selectEquipmentBySupervisionOrgCode
(
oldOrgCode
);
// 1. 查询旧属地监管部门orgCode对应所有的公司
log
.
info
(
"start-查询旧属地监管部门orgCode对应的所有设备equipmentRecordList:{},companySeqList:{}"
,
equipmentRecordList
.
size
(),
companySeqList
.
size
());
List
<
String
>
companySeqList
=
tzBaseEnterpriseInfoMapper
.
selectCompanyBySupervisionOrgCode
(
oldOrgCode
);
// 3. 3.1 更新单位及业务表的监管单位orgCode
// 2. 查询旧属地监管部门orgCode对应的所有设备
tzBaseEnterpriseInfoMapper
.
updateRedundantSupervisionOrgCodeUnit
(
newModel
.
getString
(
"companyName"
),
newOrgCode
,
oldOrgCode
);
List
<
String
>
equipmentRecordList
=
tzBaseEnterpriseInfoMapper
.
selectEquipmentBySupervisionOrgCode
(
oldOrgCode
);
// 3.2 更新业务表统计表冗余的监管单位orgCode
log
.
info
(
"start-查询旧属地监管部门orgCode对应的所有设备equipmentRecordList:{},companySeqList:{}"
,
equipmentRecordList
.
size
(),
companySeqList
.
size
());
tzBaseEnterpriseInfoMapper
.
updateRedundantSupervisionOrgCodeStatistics
(
newOrgCode
,
oldOrgCode
);
// 3. 3.1 更新单位及业务表的监管单位orgCode
log
.
info
(
"end-查询旧属地监管部门orgCode对应的所有设备equipmentRecordList:{},companySeqList:{}"
,
equipmentRecordList
.
size
(),
companySeqList
.
size
());
tzBaseEnterpriseInfoMapper
.
updateRedundantSupervisionOrgCodeUnit
(
newModel
.
getString
(
"companyName"
),
newOrgCode
,
oldOrgCode
);
// 4. 更新idx_biz_view_jg_all es设备信息
// 3.2 更新业务表统计表冗余的监管单位orgCode
updateEquipmentJgAllEs
(
newOrgCode
,
oldOrgCode
,
equipmentRecordList
,
newModel
.
getString
(
"companyName"
));
tzBaseEnterpriseInfoMapper
.
updateRedundantSupervisionOrgCodeStatistics
(
newOrgCode
,
oldOrgCode
);
// 5. 更新idx_biz_enterprise_info es企业信息
log
.
info
(
"end-查询旧属地监管部门orgCode对应的所有设备equipmentRecordList:{},companySeqList:{}"
,
equipmentRecordList
.
size
(),
companySeqList
.
size
());
updateEnterpriseInfoEs
(
newOrgCode
,
oldOrgCode
,
companySeqList
);
// 4. 更新idx_biz_view_jg_all es设备信息
// 6. 更新idx_biz_equipment_info es设备信息
updateEquipmentJgAllEs
(
newOrgCode
,
oldOrgCode
,
equipmentRecordList
,
newModel
.
getString
(
"companyName"
));
updateEquipmentInfoEs
(
newOrgCode
,
oldOrgCode
,
equipmentRecordList
);
// 5. 更新idx_biz_enterprise_info es企业信息
// // 5. 发送数据刷新事件 - 内存分页处理
updateEnterpriseInfoEs
(
newOrgCode
,
oldOrgCode
,
companySeqList
);
// // 处理企业数据
// 6. 更新idx_biz_equipment_info es设备信息
// publishDataRefreshEvents(companySeqList, DataRefreshEvent.DataType.enterprise, 1000);
updateEquipmentInfoEs
(
newOrgCode
,
oldOrgCode
,
equipmentRecordList
);
// // 处理设备数据
}
// publishDataRefreshEvents(equipmentRecordList, DataRefreshEvent.DataType.equipment, 1000);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
willInfo
(
"refresh
Company
OrgCode"
,
dataResult
,
"orgCodeUpdate"
,
e
);
willInfo
(
"refresh
Supervision
OrgCode"
,
dataResult
,
"orgCodeUpdate"
,
e
);
log
.
error
(
"刷新单位orgCode发生异常"
,
e
);
log
.
error
(
"刷新
监管
单位orgCode发生异常"
,
e
);
}
}
log
.
info
(
"刷新单位orgCode结束"
);
log
.
info
(
"刷新
监管
单位orgCode结束"
);
}
}
private
void
updateEquipmentInfoEs
(
String
newOrgCode
,
String
oldOrgCode
,
List
<
String
>
equipmentRecordList
)
{
private
void
updateEquipmentInfoEs
(
String
newOrgCode
,
String
oldOrgCode
,
List
<
String
>
equipmentRecordList
)
{
...
...
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/TzsBaseIndividualityServiceImpl.java
View file @
4621beaa
...
@@ -101,6 +101,7 @@ public class TzsBaseIndividualityServiceImpl extends BaseService<TzsBaseIndividu
...
@@ -101,6 +101,7 @@ public class TzsBaseIndividualityServiceImpl extends BaseService<TzsBaseIndividu
dto
.
setAdminUserId
(
user
.
getUserId
());
dto
.
setAdminUserId
(
user
.
getUserId
());
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
BeanUtils
.
copyProperties
(
dto
,
regUnitInfoDto
);
BeanUtils
.
copyProperties
(
dto
,
regUnitInfoDto
);
regUnitInfoDto
.
setAppId
(
regUnitInfoService
.
createAppId
(
user
));
baseEnterpriseInfo
=
regUnitInfoService
.
createBaseEnterpriseInfo
(
regUnitInfoDto
,
EnterpriseEnums
.
GR_ZT
.
getType
());
baseEnterpriseInfo
=
regUnitInfoService
.
createBaseEnterpriseInfo
(
regUnitInfoDto
,
EnterpriseEnums
.
GR_ZT
.
getType
());
TzsBaseIndividuality
tzsBaseIndividuality
=
new
TzsBaseIndividuality
();
TzsBaseIndividuality
tzsBaseIndividuality
=
new
TzsBaseIndividuality
();
BeanUtils
.
copyProperties
(
dto
,
tzsBaseIndividuality
);
BeanUtils
.
copyProperties
(
dto
,
tzsBaseIndividuality
);
...
...
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/TzsBaseInstitutionServiceImpl.java
View file @
4621beaa
...
@@ -20,7 +20,6 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
...
@@ -20,7 +20,6 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -38,9 +37,6 @@ import java.util.List;
...
@@ -38,9 +37,6 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
flc
.
biz
.
service
.
impl
.
RegUnitInfoServiceImpl
.
DEFAULT_PASSWORD
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
flc
.
biz
.
service
.
impl
.
RegUnitInfoServiceImpl
.
SECRETKEY
;
/**
/**
* 服务实现类
* 服务实现类
*
*
...
@@ -118,7 +114,7 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
...
@@ -118,7 +114,7 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
dto
.
setAdminUserId
(
user
.
getUserId
());
dto
.
setAdminUserId
(
user
.
getUserId
());
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
RegUnitInfoDto
regUnitInfoDto
=
new
RegUnitInfoDto
();
BeanUtils
.
copyProperties
(
dto
,
regUnitInfoDto
);
BeanUtils
.
copyProperties
(
dto
,
regUnitInfoDto
);
this
.
createAppId
(
user
,
regUnitInfoDto
);
regUnitInfoDto
.
setAppId
(
regUnitInfoService
.
createAppId
(
user
)
);
baseEnterpriseInfo
=
regUnitInfoService
.
createBaseEnterpriseInfo
(
regUnitInfoDto
,
EnterpriseEnums
.
SY_DW
.
getType
());
baseEnterpriseInfo
=
regUnitInfoService
.
createBaseEnterpriseInfo
(
regUnitInfoDto
,
EnterpriseEnums
.
SY_DW
.
getType
());
TzsBaseInstitution
tzsBaseInstitution
=
new
TzsBaseInstitution
();
TzsBaseInstitution
tzsBaseInstitution
=
new
TzsBaseInstitution
();
BeanUtils
.
copyProperties
(
dto
.
getRegUnitMessage
(),
tzsBaseInstitution
);
BeanUtils
.
copyProperties
(
dto
.
getRegUnitMessage
(),
tzsBaseInstitution
);
...
@@ -182,17 +178,6 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
...
@@ -182,17 +178,6 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
baseEnterpriseInfo
.
getSequenceNbr
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
publisher
.
publish
(
new
DataRefreshEvent
(
this
,
Collections
.
singletonList
(
baseEnterpriseInfo
.
getSequenceNbr
()
+
""
),
DataRefreshEvent
.
DataType
.
enterprise
.
name
(),
DataRefreshEvent
.
Operation
.
INSERT
));
}
}
private
void
createAppId
(
AgencyUserModel
user
,
RegUnitInfoDto
regUnitInfoDto
)
throws
Exception
{
AgencyUserModel
shadowUser
=
new
AgencyUserModel
();
shadowUser
.
setUserId
(
user
.
getUserId
());
String
appId
=
DesUtil
.
encode
(
user
.
getUserId
(),
SECRETKEY
);
shadowUser
.
setUserName
(
appId
);
shadowUser
.
setPassword
(
DEFAULT_PASSWORD
);
Privilege
.
agencyUserClient
.
createLoginInfoAppId
(
shadowUser
);
regUnitInfoDto
.
setAppId
(
appId
);
}
private
String
dealNull2EmptyString
(
String
t
)
{
private
String
dealNull2EmptyString
(
String
t
)
{
return
StringUtils
.
isEmpty
(
t
)
?
""
:
t
;
return
StringUtils
.
isEmpty
(
t
)
?
""
:
t
;
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
View file @
4621beaa
...
@@ -51,6 +51,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
...
@@ -51,6 +51,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.LoginInfoModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
...
@@ -841,36 +842,12 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -841,36 +842,12 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
if
(
userResult
==
null
||
userResult
.
getResult
()
==
null
)
{
if
(
userResult
==
null
||
userResult
.
getResult
()
==
null
)
{
throw
new
BadRequest
(
"单位注册失败"
);
throw
new
BadRequest
(
"单位注册失败"
);
}
}
// //同步创建为当前注册管理员添加两员配备人员信息
// if (userResult.getStatus() == 200) {
// TzsUserInfo tzsUserInfo = new TzsUserInfo();
// tzsUserInfo.setName(regUnitInfo.getAdminName());
// tzsUserInfo.setCertificateType("344");
// tzsUserInfo.setLockStatus("UNLOCK");
// tzsUserInfo.setCertificateNum(regUnitInfo.getAdminIdNumber());
// tzsUserInfo.setUnitName(regUnitInfo.getName());
// tzsUserInfo.setUnitCode(regUnitInfo.getUnitCode());
// tzsUserInfo.setPhone(regUnitInfo.getAdminTel());
// tzsUserInfo.setAmosUserId(userResult.getResult().getUserId());
// tzsUserInfo.setAmosUserName(regUnitInfo.getAdminLoginName());
// tzsUserInfoService.save(tzsUserInfo);
// }
// 生成用户id
// 生成用户id
String
adminUserId
=
userResult
.
getResult
().
getUserId
();
String
adminUserId
=
userResult
.
getResult
().
getUserId
();
// 省内充装单位1231:生成对接数据账号
// 所有企业均生成appId
// if (Arrays.asList(units).contains(FILLING_UNIT_TYPE) && (ValidationUtil.isEmpty(regUnitInfo.getIsNationwide()) || "0".equals(regUnitInfo.getIsNationwide()))) {
regUnitInfo
.
setAppId
(
this
.
createAppId
(
userResult
.
getResult
()));
// 20250701 改为全部企业类型生成对接数据账号@tianbo
// if (ValidationUtil.isEmpty(regUnitInfo.getIsNationwide()) || "0".equals(regUnitInfo.getIsNationwide())) {
AgencyUserModel
shadowUser
=
new
AgencyUserModel
();
shadowUser
.
setUserId
(
adminUserId
);
String
appId
=
DesUtil
.
encode
(
adminUserId
,
SECRETKEY
);
shadowUser
.
setUserName
(
appId
);
shadowUser
.
setPassword
(
DEFAULT_PASSWORD
);
Privilege
.
agencyUserClient
.
createLoginInfoAppId
(
shadowUser
);
regUnitInfo
.
setAppId
(
appId
);
// }
regUnitInfo
.
setAdminUserId
(
adminUserId
);
regUnitInfo
.
setAdminUserId
(
adminUserId
);
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
().
toString
());
regUnitInfo
.
setAmosCompanySeq
(
companyInfo
.
getSequenceNbr
().
toString
());
...
@@ -1195,4 +1172,25 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -1195,4 +1172,25 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
public
void
updateBySeq
(
RegUnitInfo
regUnitInfo
)
{
public
void
updateBySeq
(
RegUnitInfo
regUnitInfo
)
{
this
.
updateById
(
regUnitInfo
);
this
.
updateById
(
regUnitInfo
);
}
}
public
String
createAppId
(
AgencyUserModel
user
)
throws
Exception
{
AgencyUserModel
shadowUser
=
new
AgencyUserModel
();
shadowUser
.
setUserId
(
user
.
getUserId
());
String
appId
=
DesUtil
.
encode
(
user
.
getUserId
(),
SECRETKEY
);
FeignClientResult
<
LoginInfoModel
>
result
=
Privilege
.
agencyUserClient
.
getLoginInfo
(
appId
);
// 如果已经存在appId登录方式则用查询到的appId直接返回
if
(!
ValidationUtil
.
isEmpty
(
result
)
&&
!
ValidationUtil
.
isEmpty
(
result
.
getResult
()))
{
appId
=
result
.
getResult
().
getLoginId
();
return
appId
;
}
shadowUser
.
setUserName
(
appId
);
shadowUser
.
setPassword
(
DEFAULT_PASSWORD
);
// 查询有没有为该userId创建过账号,没有则跳过。历史错误数据会执行
FeignClientResult
<
AgencyUserModel
>
userResult
=
Privilege
.
agencyUserClient
.
queryByUserId
(
user
.
getUserId
());
if
(
ValidationUtil
.
isEmpty
(
userResult
)
||
ValidationUtil
.
isEmpty
(
userResult
.
getResult
()))
{
return
null
;
}
Privilege
.
agencyUserClient
.
createLoginInfoAppId
(
shadowUser
);
return
appId
;
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgProjectContraption.java
View file @
4621beaa
...
@@ -332,6 +332,9 @@ public class IdxBizJgProjectContraption extends BaseEntity {
...
@@ -332,6 +332,9 @@ public class IdxBizJgProjectContraption extends BaseEntity {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
regType
;
private
String
regType
;
/**
* 是否是否纳管中文返回
*/
@TableField
(
exist
=
false
)
private
String
isIntoManagementName
;
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/EquipmentCategoryMapper.java
View file @
4621beaa
...
@@ -133,5 +133,6 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
...
@@ -133,5 +133,6 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
@Select
(
"select * from biz_jg_supervisory_code where supervisory_code = #{supervisoryCode} ORDER BY supervisory_code"
)
@Select
(
"select * from biz_jg_supervisory_code where supervisory_code = #{supervisoryCode} ORDER BY supervisory_code"
)
SupervisoryCodeInfo
searchSupervisoryBySupervisoryCode
(
@Param
(
"supervisoryCode"
)
String
supervisoryCode
);
SupervisoryCodeInfo
searchSupervisoryBySupervisoryCode
(
@Param
(
"supervisoryCode"
)
String
supervisoryCode
);
List
<
Map
<
String
,
String
>>
selectError96333Code
();
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/service/IEquipmentCategoryService.java
View file @
4621beaa
...
@@ -52,4 +52,6 @@ public interface IEquipmentCategoryService {
...
@@ -52,4 +52,6 @@ public interface IEquipmentCategoryService {
String
handleErrorElevatorCode
(
String
supervisorCode
,
String
elevatorCode
);
String
handleErrorElevatorCode
(
String
supervisorCode
,
String
elevatorCode
);
JSONObject
batchHandlerCode96333
();
JSONObject
batchHandlerCode96333
();
String
handleError96333Code
();
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/EquipmentCategoryMapper.xml
View file @
4621beaa
...
@@ -728,4 +728,15 @@
...
@@ -728,4 +728,15 @@
</where>
</where>
ORDER BY parent_id
ORDER BY parent_id
</select>
</select>
<select
id=
"selectError96333Code"
resultType=
"java.util.Map"
>
SELECT v1."SUPERVISORY_CODE" as supervisoryCode,
v1."CODE96333" as code,
v2.REC_DATE
FROM "idx_biz_jg_other_info" v1
LEFT JOIN "biz_jg_supervisory_code" v2 on v1.SUPERVISORY_CODE = v2.SUPERVISORY_CODE
WHERE v1."SUPERVISORY_CODE" ~ 'X31' AND v1."CODE96333" ~ '^32'
AND v2.create_status = '1'
ORDER BY v2."REC_DATE" DESC
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/IdxBizJgProjectContraptionMapper.xml
View file @
4621beaa
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/controller/EquipmentCategoryController.java
View file @
4621beaa
...
@@ -702,4 +702,16 @@ public class EquipmentCategoryController extends BaseController {
...
@@ -702,4 +702,16 @@ public class EquipmentCategoryController extends BaseController {
public
ResponseModel
<
JSONObject
>
batchHandlerCode96333
()
{
public
ResponseModel
<
JSONObject
>
batchHandlerCode96333
()
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
batchHandlerCode96333
());
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
batchHandlerCode96333
());
}
}
/**
* 处理西咸生成96333超31成32 问题
*
* @return s
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/handleError96333Code"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"处理西咸生成96333超31成32 问题"
,
notes
=
"处理西咸生成96333超31成32 问题"
)
public
ResponseModel
<
String
>
handleError96333Code
()
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
handleError96333Code
());
}
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/controller/TzsAppController.java
View file @
4621beaa
...
@@ -90,16 +90,16 @@ public class TzsAppController {
...
@@ -90,16 +90,16 @@ public class TzsAppController {
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipInfoBySuperviseCode
(
supervisoryCode
));
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipInfoBySuperviseCode
(
supervisoryCode
));
}
}
/**
//
/**
* 登录
//
* 登录
* @return
//
* @return
*/
//
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
//
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping
(
value
=
"/mobile/login"
)
//
@PostMapping(value = "/mobile/login")
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"小程序登录"
,
notes
=
"小程序登录"
)
//
@ApiOperation(httpMethod = "POST", value = "小程序登录", notes = "小程序登录")
public
ResponseModel
<
Map
<
String
,
Object
>>
login
(
@RequestBody
MobileLoginParam
param
)
{
//
public ResponseModel<Map<String, Object>> login(@RequestBody MobileLoginParam param) {
return
ResponseHelper
.
buildResponse
(
appService
.
login
(
param
));
//
return ResponseHelper.buildResponse(appService.login(param));
}
//
}
/**
/**
* 小程序企业详情
* 小程序企业详情
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
4621beaa
...
@@ -835,8 +835,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -835,8 +835,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
param
.
put
(
"CODE96333"
,
elevatorCode
);
param
.
put
(
"CODE96333"
,
elevatorCode
);
objMap
.
put
(
otherInfo
.
getRecord
(),
param
);
objMap
.
put
(
otherInfo
.
getRecord
(),
param
);
this
.
commonUpdateEsDataByIds
(
objMap
);
this
.
commonUpdateEsDataByIds
(
objMap
);
}
Optional
<
ESEquipmentInfo
>
equipmentDaoById
=
esEquipmentDao
.
findById
(
otherInfo
.
getRecord
());
equipmentDaoById
.
ifPresent
(
data
->
{
data
.
setCODE96333
(
elevatorCode
);
esEquipmentDao
.
save
(
data
);
});
}
return
"96333码修复成功!"
;
return
"96333码修复成功!"
;
}
}
...
@@ -2746,6 +2751,20 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -2746,6 +2751,20 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
.
fluentPut
(
"异常数据,需手动处理:"
,
JSONObject
.
toJSONString
(
manualProcessData
));
.
fluentPut
(
"异常数据,需手动处理:"
,
JSONObject
.
toJSONString
(
manualProcessData
));
}
}
@Override
public
String
handleError96333Code
()
{
List
<
Map
<
String
,
String
>>
exceptionData
=
equipmentCategoryMapper
.
selectError96333Code
();
exceptionData
.
stream
()
.
map
(
data
->
data
.
get
(
"supervisoryCode"
))
.
filter
(
Objects:
:
nonNull
)
.
forEach
(
supervisoryCode
->
{
String
elevatorCode
=
createElevatorCode
(
"31"
);
handleErrorElevatorCode
(
supervisoryCode
,
elevatorCode
);
});
return
String
.
format
(
"修复96333码成功,共处理 %d 条"
,
exceptionData
.
size
());
}
private
void
saveCode96333ForEs
(
String
record
,
String
code96333
)
{
private
void
saveCode96333ForEs
(
String
record
,
String
code96333
)
{
// idx_biz_view_jg_all
// idx_biz_view_jg_all
Optional
<
ESEquipmentCategoryDto
>
esEquipmentCategoryDto
=
esEquipmentCategory
.
findById
(
record
);
Optional
<
ESEquipmentCategoryDto
>
esEquipmentCategoryDto
=
esEquipmentCategory
.
findById
(
record
);
...
...
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