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
d1d2375a
Commit
d1d2375a
authored
May 13, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(大编辑):代码重构
1.公共编辑接口 2.公共详情接口
parent
96b228a1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
205 additions
and
94 deletions
+205
-94
BaseChangeDataDto.java
...eejoin/amos/boot/module/jg/api/dto/BaseChangeDataDto.java
+2
-1
BizDataChangeController.java
...oot/module/jg/biz/controller/BizDataChangeController.java
+10
-10
InstallNoticeDataChangeHandler.java
...ess/biz/installNotice/InstallNoticeDataChangeHandler.java
+2
-1
IBizDataChangeHandleStrategy.java
...it/process/biz/strategy/IBizDataChangeHandleStrategy.java
+1
-2
UseRegisterDataChangeHandler.java
...process/biz/useRegister/UseRegisterDataChangeHandler.java
+2
-1
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+53
-2
EquipChangeDataUpdateServiceImpl.java
.../edit/process/equip/EquipChangeDataUpdateServiceImpl.java
+90
-1
SingleCylinderChangeProcess.java
...g/biz/edit/process/equip/SingleCylinderChangeProcess.java
+0
-52
SingleEquipChangeProcess.java
...e/jg/biz/edit/process/equip/SingleEquipChangeProcess.java
+0
-0
IdxBizJgDesignInfo.java
...n/amos/boot/module/ymt/api/entity/IdxBizJgDesignInfo.java
+18
-1
IdxBizJgFactoryInfo.java
.../amos/boot/module/ymt/api/entity/IdxBizJgFactoryInfo.java
+2
-1
IdxBizJgOtherInfo.java
...in/amos/boot/module/ymt/api/entity/IdxBizJgOtherInfo.java
+2
-1
IdxBizJgRegisterInfo.java
...amos/boot/module/ymt/api/entity/IdxBizJgRegisterInfo.java
+2
-1
EquipmentClassifityEnum.java
...os/boot/module/ymt/api/enums/EquipmentClassifityEnum.java
+21
-20
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/BaseChangeDataDto.java
View file @
d1d2375a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
@Data
@Data
public
class
BaseChangeDataDto
implements
Serializable
{
public
class
BaseChangeDataDto
implements
Serializable
,
IBaseChangeData
{
private
String
changeId
;
private
String
changeId
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/BizDataChangeController.java
View file @
d1d2375a
...
@@ -56,20 +56,20 @@ public class BizDataChangeController {
...
@@ -56,20 +56,20 @@ public class BizDataChangeController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/v2/{bizType}/detail"
)
@GetMapping
(
value
=
"/v2/{bizType}/detail"
)
@ApiOperation
(
value
=
"编辑一级页面详情查询--通用"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"编辑一级页面详情查询--通用"
,
httpMethod
=
"GET"
)
public
ResponseModel
<
IPage
<?>>
getDetailV2
(
@RequestParam
String
applyNo
,
public
ResponseModel
<
IPage
<?>>
getDetailV2
(
@
ApiParam
(
value
=
"单据编号或者设备装置唯一标识"
)
@
RequestParam
String
applyNo
,
@PathVariable
String
bizType
,
@
ApiParam
(
value
=
"业务类型"
)
@
PathVariable
String
bizType
,
@RequestParam
DetailType
type
,
@
ApiParam
(
value
=
"详情类型:设备、装置列表"
)
@
RequestParam
DetailType
type
,
@RequestParam
JSONObject
searchParams
)
{
@
ApiParam
(
value
=
"查询参数"
)
@
RequestParam
JSONObject
searchParams
)
{
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
queryDetail
(
applyNo
,
bizType
,
type
,
searchParams
));
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
queryDetail
(
applyNo
,
bizType
,
type
,
searchParams
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/v2/{bizType}/sub-detail"
)
@GetMapping
(
value
=
"/v2/{bizType}/sub-detail"
)
@ApiOperation
(
value
=
"编辑二级页面详情查询--通用"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"编辑二级页面详情查询--通用"
,
httpMethod
=
"GET"
)
public
ResponseModel
<
Map
<
String
,
?>>
getSubDetailV2
(
@RequestParam
String
bizId
,
public
ResponseModel
<
Map
<
String
,
?>>
getSubDetailV2
(
@
ApiParam
(
value
=
"设备或者装置唯一标识"
)
@
RequestParam
String
bizId
,
@RequestParam
(
required
=
false
)
String
applyNo
,
@
ApiParam
(
value
=
"单据编号"
)
@
RequestParam
(
required
=
false
)
String
applyNo
,
@RequestParam
DetailType
type
,
@
ApiParam
(
value
=
"详情类型:设备、装置"
)
@
RequestParam
DetailType
type
,
@PathVariable
String
bizType
)
{
@
ApiParam
(
value
=
"业务类型"
)
@
PathVariable
String
bizType
)
{
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
querySubDetail
(
applyNo
,
bizId
,
bizType
,
type
));
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
querySubDetail
(
applyNo
,
bizId
,
bizType
,
type
));
}
}
...
@@ -89,8 +89,8 @@ public class BizDataChangeController {
...
@@ -89,8 +89,8 @@ public class BizDataChangeController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/v2/{bizType}/change-logs"
)
@GetMapping
(
value
=
"/v2/{bizType}/change-logs"
)
@ApiOperation
(
value
=
"编辑二级页面详情查询--通用"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"编辑二级页面详情查询--通用"
,
httpMethod
=
"GET"
)
public
ResponseModel
<
IPage
<?>>
getChangeLogPage
(
@RequestParam
String
bizId
,
public
ResponseModel
<
IPage
<?>>
getChangeLogPage
(
@
ApiParam
(
value
=
"设备或者装置唯一标识"
)
@
RequestParam
String
bizId
,
@PathVariable
String
bizType
)
{
@
ApiParam
(
required
=
true
,
value
=
"业务类型"
)
@
PathVariable
String
bizType
)
{
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
getChangeLogPage
(
bizId
,
bizType
));
return
ResponseHelper
.
buildResponse
(
bizDataChangeService
.
getChangeLogPage
(
bizId
,
bizType
));
}
}
}
}
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/biz/installNotice/InstallNoticeDataChangeHandler.java
View file @
d1d2375a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
installNotice
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
biz
.
installNotice
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
...
@@ -20,7 +21,7 @@ public class InstallNoticeDataChangeHandler extends DefaultBizDataChangeHandler<
...
@@ -20,7 +21,7 @@ public class InstallNoticeDataChangeHandler extends DefaultBizDataChangeHandler<
@Override
@Override
public
String
canHandleBizType
()
{
public
String
canHandleBizType
()
{
return
"installationNotice"
;
return
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
name
()
;
}
}
@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/biz/strategy/IBizDataChangeHandleStrategy.java
View file @
d1d2375a
...
@@ -63,8 +63,7 @@ public interface IBizDataChangeHandleStrategy {
...
@@ -63,8 +63,7 @@ public interface IBizDataChangeHandleStrategy {
*/
*/
enum
ModelType
{
enum
ModelType
{
singleProject
,
singleProject
,
singleEquip
,
singleEquip
singleCylinder
}
}
void
doSave
(
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
);
void
doSave
(
String
applyNo
,
ModelType
model
,
Map
<
String
,
Object
>
changeData
);
...
...
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/biz/useRegister/UseRegisterDataChangeHandler.java
View file @
d1d2375a
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.controller.BizDataChangeController
;
import
com.yeejoin.amos.boot.module.jg.biz.controller.BizDataChangeController
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.core.RouterEventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.event.BaseBizDataChangeEvent
;
...
@@ -31,7 +32,7 @@ public class UseRegisterDataChangeHandler extends DefaultBizDataChangeHandler<Ba
...
@@ -31,7 +32,7 @@ public class UseRegisterDataChangeHandler extends DefaultBizDataChangeHandler<Ba
@Override
@Override
public
String
canHandleBizType
()
{
public
String
canHandleBizType
()
{
return
"useRegistration"
;
return
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
name
()
;
}
}
...
...
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 @
d1d2375a
...
@@ -29,6 +29,7 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgDesignInfoMapper;
...
@@ -29,6 +29,7 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgDesignInfoMapper;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgFactoryInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgFactoryInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -66,6 +67,7 @@ import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgCertificateRepl
...
@@ -66,6 +67,7 @@ import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgCertificateRepl
@Component
@Component
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
@Getter
public
class
CommonEquipDataProcessService
{
public
class
CommonEquipDataProcessService
{
private
final
IdxBizJgDesignInfoMapper
idxBizJgDesignInfoMapper
;
private
final
IdxBizJgDesignInfoMapper
idxBizJgDesignInfoMapper
;
...
@@ -104,6 +106,7 @@ public class CommonEquipDataProcessService {
...
@@ -104,6 +106,7 @@ public class CommonEquipDataProcessService {
private
final
JgUseRegistrationServiceImpl
jgUseRegistrationService
;
private
final
JgUseRegistrationServiceImpl
jgUseRegistrationService
;
@PostConstruct
@PostConstruct
public
void
init
()
{
public
void
init
()
{
Set
<
Class
<?
extends
IBaseChangeData
>>
subClasses
=
getAllSubClasses
();
Set
<
Class
<?
extends
IBaseChangeData
>>
subClasses
=
getAllSubClasses
();
...
@@ -148,6 +151,24 @@ public class CommonEquipDataProcessService {
...
@@ -148,6 +151,24 @@ public class CommonEquipDataProcessService {
}
}
}
}
public
void
checkValidField2
(
String
record
,
IBaseChangeData
changeDataDto
,
String
equList
,
String
equCategory
,
String
equDefine
)
{
// 注册信息
if
(
changeDataDto
instanceof
IdxBizJgRegisterInfo
)
{
IdxBizJgRegisterInfo
registerChangeDataDto
=
(
IdxBizJgRegisterInfo
)
changeDataDto
;
equipChangeDataUpdateServiceImpl
.
checkRegisterChangeData
(
record
,
registerChangeDataDto
);
}
// 制造信息
if
(
changeDataDto
instanceof
IdxBizJgFactoryInfo
)
{
IdxBizJgFactoryInfo
equipFactoryChangeDataDto
=
(
IdxBizJgFactoryInfo
)
changeDataDto
;
equipChangeDataUpdateServiceImpl
.
checkFactoryChangeData
(
record
,
equipFactoryChangeDataDto
,
equList
,
equCategory
,
equDefine
);
}
// 设计信息
if
(
changeDataDto
instanceof
IdxBizJgDesignInfo
)
{
IdxBizJgDesignInfo
equipDesignChangeDataDto
=
(
IdxBizJgDesignInfo
)
changeDataDto
;
equipChangeDataUpdateServiceImpl
.
checkDesignChangeData
(
record
,
equipDesignChangeDataDto
);
}
}
public
void
buildChangeFields
(
String
record
,
EquipDesignChangeDataDto
equipDesignChangeDataDto
,
EquipFactoryChangeDataDto
equipFactoryChangeDataDto
,
EquipRegisterChangeDataDto
registerChangeDataDto
,
EquipOtherInfoChangeDataDto
otherInfoChangeDataDto
,
EquipUseInfoChangeDataDto
useInfoChangeDataDto
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
public
void
buildChangeFields
(
String
record
,
EquipDesignChangeDataDto
equipDesignChangeDataDto
,
EquipFactoryChangeDataDto
equipFactoryChangeDataDto
,
EquipRegisterChangeDataDto
registerChangeDataDto
,
EquipOtherInfoChangeDataDto
otherInfoChangeDataDto
,
EquipUseInfoChangeDataDto
useInfoChangeDataDto
,
List
<
FieldChangeMeta
>
allChangeColumns
)
{
// 构造新对象行转列
// 构造新对象行转列
...
@@ -191,6 +212,7 @@ public class CommonEquipDataProcessService {
...
@@ -191,6 +212,7 @@ public class CommonEquipDataProcessService {
allChangeColumns
.
addAll
(
mergeChangeFields
(
useInfoChangeNew
,
useInfoOld
));
allChangeColumns
.
addAll
(
mergeChangeFields
(
useInfoChangeNew
,
useInfoOld
));
}
}
/**
/**
* 业务处理-业务对象
* 业务处理-业务对象
*
*
...
@@ -319,8 +341,8 @@ public class CommonEquipDataProcessService {
...
@@ -319,8 +341,8 @@ public class CommonEquipDataProcessService {
}
}
void
updateTechParamInfo
(
EquipRegisterChangeDataDto
equipRegisterChangeDataDto
,
String
record
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChange
)
{
void
updateTechParamInfo
(
String
equListCode
,
String
record
,
Map
<
String
,
Object
>
changeData
,
List
<
FieldChangeMeta
>
allChange
)
{
EquipmentClassifityEnum
equipmentClassifityEnum
=
EquipmentClassifityEnum
.
getOne
(
equ
ipRegisterChangeDataDto
.
getEquList
()
);
EquipmentClassifityEnum
equipmentClassifityEnum
=
EquipmentClassifityEnum
.
getOne
(
equ
ListCode
);
switch
(
Objects
.
requireNonNull
(
equipmentClassifityEnum
))
{
switch
(
Objects
.
requireNonNull
(
equipmentClassifityEnum
))
{
case
GL:
case
GL:
// 锅炉
// 锅炉
...
@@ -861,4 +883,33 @@ public class CommonEquipDataProcessService {
...
@@ -861,4 +883,33 @@ public class CommonEquipDataProcessService {
}
}
return
pageList
;
return
pageList
;
}
}
public
void
updateEsDataOfEquip
(
String
record
,
IBaseChangeData
changeDataDto
)
{
// 注册信息
if
(
changeDataDto
instanceof
IdxBizJgRegisterInfo
)
{
IdxBizJgRegisterInfo
registerChangeDataDto
=
(
IdxBizJgRegisterInfo
)
changeDataDto
;
equipChangeDataUpdateServiceImpl
.
updateRegisterEsData
(
record
,
registerChangeDataDto
);
}
// 制造信息
if
(
changeDataDto
instanceof
IdxBizJgFactoryInfo
)
{
IdxBizJgFactoryInfo
equipFactoryChangeDataDto
=
(
IdxBizJgFactoryInfo
)
changeDataDto
;
equipChangeDataUpdateServiceImpl
.
updateFactoryEsData
(
record
,
equipFactoryChangeDataDto
);
}
// 设计信息
if
(
changeDataDto
instanceof
IdxBizJgDesignInfo
)
{
IdxBizJgDesignInfo
equipDesignChangeDataDto
=
(
IdxBizJgDesignInfo
)
changeDataDto
;
equipChangeDataUpdateServiceImpl
.
checkDesignChangeData
(
record
,
equipDesignChangeDataDto
);
}
// 使用信息
if
(
changeDataDto
instanceof
IdxBizJgUseInfo
)
{
IdxBizJgUseInfo
equipUseInfoChangeDataDto
=
(
IdxBizJgUseInfo
)
changeDataDto
;
equipChangeDataUpdateServiceImpl
.
updateUseInfoEsData
(
record
,
equipUseInfoChangeDataDto
);
}
// 检验信息
if
(
changeDataDto
instanceof
IdxBizJgInspectionDetectionInfo
)
{
IdxBizJgInspectionDetectionInfo
equipUseInfoChangeDataDto
=
(
IdxBizJgInspectionDetectionInfo
)
changeDataDto
;
equipChangeDataUpdateServiceImpl
.
updateInspectInfoEs
(
record
,
equipUseInfoChangeDataDto
);
}
}
}
}
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 @
d1d2375a
...
@@ -119,8 +119,52 @@ public class EquipChangeDataUpdateServiceImpl {
...
@@ -119,8 +119,52 @@ public class EquipChangeDataUpdateServiceImpl {
}
}
}
}
public
void
updateFactoryEsData
(
String
record
,
IdxBizJgFactoryInfo
equipFactoryChangeDataDto
)
{
// es 数据更新
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
record
);
if
(
optional
.
isPresent
())
{
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
optional
.
get
();
esEquipmentCategoryDto
.
setPRODUCE_DATE
(
DateUtil
.
formatDate
(
equipFactoryChangeDataDto
.
getProduceDate
()));
esEquipmentCategoryDto
.
setFACTORY_NUM
(
equipFactoryChangeDataDto
.
getFactoryNum
());
esEquipmentCategoryDto
.
setPRODUCE_UNIT_NAME
(
equipFactoryChangeDataDto
.
getProduceUnitName
());
esEquipmentCategory
.
save
(
esEquipmentCategoryDto
);
}
}
public
void
updateRegisterEsData
(
String
record
,
EquipRegisterChangeDataDto
registerChangeDataDto
)
{
// es 数据更新
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
record
);
if
(
optional
.
isPresent
())
{
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
optional
.
get
();
esEquipmentCategoryDto
.
setPRODUCT_NAME
(
registerChangeDataDto
.
getProductName
());
esEquipmentCategoryDto
.
setEQU_CODE
(
registerChangeDataDto
.
getEquCode
());
esEquipmentCategoryDto
.
setEQU_TYPE
(
registerChangeDataDto
.
getEquType
());
esEquipmentCategoryDto
.
setEQU_CATEGORY_CODE
(
registerChangeDataDto
.
getEquCategory
());
esEquipmentCategoryDto
.
setEQU_DEFINE_CODE
(
registerChangeDataDto
.
getEquDefine
());
// 冗余设备类别名称
if
(
StringUtils
.
isEmpty
(
registerChangeDataDto
.
getEquCategory
()))
{
esEquipmentCategoryDto
.
setEQU_CATEGORY
(
null
);
}
else
{
EquipmentCategory
category
=
getEquipmentCategory
(
registerChangeDataDto
.
getEquCategory
());
if
(
category
!=
null
)
{
esEquipmentCategoryDto
.
setEQU_CATEGORY
(
category
.
getName
());
}
}
// 冗余设备品种名称
if
(
StringUtils
.
isEmpty
(
registerChangeDataDto
.
getEquDefine
()))
{
esEquipmentCategoryDto
.
setEQU_DEFINE
(
null
);
}
else
{
EquipmentCategory
category
=
getEquipmentCategory
(
registerChangeDataDto
.
getEquDefine
());
if
(
category
!=
null
)
{
esEquipmentCategoryDto
.
setEQU_DEFINE
(
category
.
getName
());
}
}
esEquipmentCategory
.
save
(
esEquipmentCategoryDto
);
}
}
p
rivate
void
updateRegisterEsData
(
String
record
,
EquipRegisterChangeDataDt
o
registerChangeDataDto
)
{
p
ublic
void
updateRegisterEsData
(
String
record
,
IdxBizJgRegisterInf
o
registerChangeDataDto
)
{
// es 数据更新
// es 数据更新
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
record
);
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
record
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
...
@@ -189,6 +233,16 @@ public class EquipChangeDataUpdateServiceImpl {
...
@@ -189,6 +233,16 @@ public class EquipChangeDataUpdateServiceImpl {
}
}
}
}
public
void
checkFactoryChangeData
(
String
record
,
IdxBizJgFactoryInfo
equipFactoryChangeDataDto
,
String
equList
,
String
equCategory
,
String
equDefine
)
{
// 气瓶时检验出厂编号-普通气瓶,车用气瓶不再此范围内
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategory
)
&&
StringUtils
.
isNotEmpty
(
equipFactoryChangeDataDto
.
getFactoryNum
()))
{
boolean
isUsed
=
this
.
checkFactoryNumUnique
(
equipFactoryChangeDataDto
.
getFactoryNum
(),
record
,
equipFactoryChangeDataDto
.
getProduceUnitCreditCode
());
if
(
isUsed
)
{
throw
new
BadRequest
(
"出厂编号/产品编码在该企业中已存在!"
);
}
}
}
/**
/**
* 普通气瓶检验-同制造单位下唯一
* 普通气瓶检验-同制造单位下唯一
*
*
...
@@ -211,6 +265,16 @@ public class EquipChangeDataUpdateServiceImpl {
...
@@ -211,6 +265,16 @@ public class EquipChangeDataUpdateServiceImpl {
}
}
}
}
public
void
checkRegisterChangeData
(
String
record
,
IdxBizJgRegisterInfo
registerChangeDataDto
)
{
// 自行输入时,检验设备代码的全局唯一性
if
(
registerChangeDataDto
.
getEquCodeType
().
equals
(
EquCodeTypeEnum
.
INPUT
.
getCode
())
&&
StringUtils
.
isNotEmpty
(
registerChangeDataDto
.
getEquCode
()))
{
Boolean
isUsed
=
this
.
checkEquCodeUniqueness
(
registerChangeDataDto
.
getEquCode
(),
record
);
if
(
isUsed
)
{
throw
new
BadRequest
(
"设备代码:"
+
registerChangeDataDto
.
getEquCode
()
+
"在系统中已存在!"
);
}
}
}
private
Boolean
checkEquCodeUniqueness
(
String
equCode
,
String
record
)
{
private
Boolean
checkEquCodeUniqueness
(
String
equCode
,
String
record
)
{
// 根据设备代码检查唯一性
// 根据设备代码检查唯一性
...
@@ -220,6 +284,9 @@ public class EquipChangeDataUpdateServiceImpl {
...
@@ -220,6 +284,9 @@ public class EquipChangeDataUpdateServiceImpl {
public
void
checkDesignChangeData
(
String
record
,
EquipDesignChangeDataDto
equipDesignChangeDataDto
)
{
public
void
checkDesignChangeData
(
String
record
,
EquipDesignChangeDataDto
equipDesignChangeDataDto
)
{
}
}
public
void
checkDesignChangeData
(
String
record
,
IdxBizJgDesignInfo
equipDesignChangeDataDto
)
{
}
public
void
updatePieLineDesignData
(
String
record
,
PieLineDesignChangeDataDto
equipDesignChangeDataDto
)
{
public
void
updatePieLineDesignData
(
String
record
,
PieLineDesignChangeDataDto
equipDesignChangeDataDto
)
{
LambdaUpdateWrapper
<
IdxBizJgDesignInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgDesignInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
);
updateWrapper
.
eq
(
IdxBizJgDesignInfo:
:
getRecord
,
record
);
...
@@ -238,6 +305,18 @@ public class EquipChangeDataUpdateServiceImpl {
...
@@ -238,6 +305,18 @@ public class EquipChangeDataUpdateServiceImpl {
this
.
updateUseInfoEsData
(
record
,
equipUseInfoChangeDataDto
);
this
.
updateUseInfoEsData
(
record
,
equipUseInfoChangeDataDto
);
}
}
public
void
updateUseInfoEsData
(
String
record
,
IdxBizJgUseInfo
equipUseInfoChangeDataDto
)
{
// es 数据更新
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
record
);
if
(
optional
.
isPresent
())
{
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
optional
.
get
();
esEquipmentCategoryDto
.
setUSE_UNIT_CREDIT_CODE
(
equipUseInfoChangeDataDto
.
getUseUnitCreditCode
());
esEquipmentCategoryDto
.
setUSC_UNIT_NAME
(
equipUseInfoChangeDataDto
.
getUseUnitName
());
esEquipmentCategoryDto
.
setUSE_INNER_CODE
(
equipUseInfoChangeDataDto
.
getUseInnerCode
());
esEquipmentCategory
.
save
(
esEquipmentCategoryDto
);
}
}
private
void
updateUseInfoEsData
(
String
record
,
EquipUseInfoChangeDataDto
equipUseInfoChangeDataDto
)
{
private
void
updateUseInfoEsData
(
String
record
,
EquipUseInfoChangeDataDto
equipUseInfoChangeDataDto
)
{
// es 数据更新
// es 数据更新
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
record
);
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
record
);
...
@@ -278,6 +357,16 @@ public class EquipChangeDataUpdateServiceImpl {
...
@@ -278,6 +357,16 @@ public class EquipChangeDataUpdateServiceImpl {
}
}
}
}
public
void
updateInspectInfoEs
(
String
record
,
IdxBizJgInspectionDetectionInfo
equipUseInfoChangeDataDto
)
{
// es 数据更新
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
record
);
if
(
optional
.
isPresent
())
{
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
optional
.
get
();
esEquipmentCategoryDto
.
setNEXT_INSPECT_DATE
(
DateUtil
.
parse
(
DateUtil
.
format
(
equipUseInfoChangeDataDto
.
getNextInspectDate
(),
DatePattern
.
NORM_DATE_PATTERN
)).
getTime
());
esEquipmentCategory
.
save
(
esEquipmentCategoryDto
);
}
}
public
void
updateOtherInfoChangeData
(
String
record
,
EquipOtherInfoChangeDataDto
otherInfoChangeDataDto
)
{
public
void
updateOtherInfoChangeData
(
String
record
,
EquipOtherInfoChangeDataDto
otherInfoChangeDataDto
)
{
LambdaUpdateWrapper
<
IdxBizJgOtherInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgOtherInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
);
updateWrapper
.
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
);
...
...
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/SingleCylinderChangeProcess.java
deleted
100644 → 0
View file @
96b228a1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
process
.
equip
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.DefaultBizDataChangeHandler
;
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.IEquipChangeDataProcessStrategy
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* 批量维护气瓶-策略实现类
*/
@Component
@RequiredArgsConstructor
public
class
SingleCylinderChangeProcess
implements
IEquipChangeDataProcessStrategy
{
private
final
CommonEquipDataProcessService
commonEquipDataProcessService
;
@Override
public
List
<
FieldChangeMeta
>
handle
(
Map
<
String
,
Object
>
changeData
,
String
record
)
{
List
<
FieldChangeMeta
>
allChangeColumns
=
new
ArrayList
<>();
// 新数据解析
EquipRegisterChangeDataDto
registerChangeDataDto
=
CommonEquipDataProcessService
.
castMap2Bean
(
changeData
,
EquipRegisterChangeDataDto
.
class
);
EquipFactoryChangeDataDto
factoryChangeDataDto
=
CommonEquipDataProcessService
.
castMap2Bean
(
changeData
,
EquipFactoryChangeDataDto
.
class
);
EquipDesignChangeDataDto
designChangeDataDto
=
CommonEquipDataProcessService
.
castMap2Bean
(
changeData
,
EquipDesignChangeDataDto
.
class
);
EquipUseInfoChangeDataDto
useInfoChangeDataDto
=
CommonEquipDataProcessService
.
castMap2Bean
(
changeData
,
EquipUseInfoChangeDataDto
.
class
);
commonEquipDataProcessService
.
buildChangeFields
(
record
,
designChangeDataDto
,
factoryChangeDataDto
,
registerChangeDataDto
,
useInfoChangeDataDto
,
allChangeColumns
);
// 前置校验
commonEquipDataProcessService
.
checkValidField
(
record
,
registerChangeDataDto
,
null
,
null
,
null
);
commonEquipDataProcessService
.
checkValidField
(
record
,
factoryChangeDataDto
,
registerChangeDataDto
.
getEquList
(),
registerChangeDataDto
.
getEquCategory
(),
registerChangeDataDto
.
getEquDefine
());
commonEquipDataProcessService
.
checkValidField
(
record
,
designChangeDataDto
,
registerChangeDataDto
.
getEquList
(),
registerChangeDataDto
.
getEquCategory
(),
registerChangeDataDto
.
getEquDefine
());
// 设备制造、设计、注册信息业务处理落库
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
registerChangeDataDto
);
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
factoryChangeDataDto
);
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
designChangeDataDto
);
commonEquipDataProcessService
.
dealBizDataForEquip
(
record
,
useInfoChangeDataDto
);
// 设备技术参数入库处理
commonEquipDataProcessService
.
updateTechParamInfo
(
registerChangeDataDto
,
record
,
changeData
,
allChangeColumns
);
return
allChangeColumns
;
}
@Override
public
IBizDataChangeHandleStrategy
.
ModelType
canHandleMode
()
{
return
DefaultBizDataChangeHandler
.
ModelType
.
singleCylinder
;
}
}
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 @
d1d2375a
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgDesignInfo.java
View file @
d1d2375a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
entity
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
entity
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
@@ -18,7 +22,8 @@ import java.util.Date;
...
@@ -18,7 +22,8 @@ import java.util.Date;
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"idx_biz_jg_design_info"
)
@TableName
(
"idx_biz_jg_design_info"
)
public
class
IdxBizJgDesignInfo
extends
TzsBaseEntity
{
@Group
(
value
=
"idx_biz_jg_design_info"
)
public
class
IdxBizJgDesignInfo
extends
TzsBaseEntity
implements
IBaseChangeData
{
...
@@ -44,72 +49,84 @@ public class IdxBizJgDesignInfo extends TzsBaseEntity {
...
@@ -44,72 +49,84 @@ public class IdxBizJgDesignInfo extends TzsBaseEntity {
*
*
*/
*/
@TableField
(
"\"DESIGN_UNIT_CREDIT_CODE\""
)
@TableField
(
"\"DESIGN_UNIT_CREDIT_CODE\""
)
@FieldDisplayDefine
(
value
=
"设计单位统一社会信用代码"
)
private
String
designUnitCreditCode
;
private
String
designUnitCreditCode
;
/**
/**
*
*
*/
*/
@TableField
(
"\"DESIGN_UNIT_NAME\""
)
@TableField
(
"\"DESIGN_UNIT_NAME\""
)
@FieldDisplayDefine
(
value
=
"设计单位名称"
)
private
String
designUnitName
;
private
String
designUnitName
;
/**
/**
*
*
*/
*/
@TableField
(
"\"DESIGN_LICENSE_NUM\""
)
@TableField
(
"\"DESIGN_LICENSE_NUM\""
)
@FieldDisplayDefine
(
value
=
"设计许可编号"
)
private
String
designLicenseNum
;
private
String
designLicenseNum
;
/**
/**
*
*
*/
*/
@TableField
(
"\"DESIGN_USE_DATE\""
)
@TableField
(
"\"DESIGN_USE_DATE\""
)
@FieldDisplayDefine
(
value
=
"设计使用年限"
)
private
String
designUseDate
;
private
String
designUseDate
;
/**
/**
*
*
*/
*/
@TableField
(
"\"DESIGN_DATE\""
)
@TableField
(
"\"DESIGN_DATE\""
)
@FieldDisplayDefine
(
value
=
"设计日期"
)
private
Date
designDate
;
private
Date
designDate
;
/**
/**
*
*
*/
*/
@TableField
(
"\"DRAWING_DO\""
)
@TableField
(
"\"DRAWING_DO\""
)
@FieldDisplayDefine
(
value
=
"总图图号"
)
private
String
drawingDo
;
private
String
drawingDo
;
/**
/**
*
*
*/
*/
@TableField
(
"\"DESIGN_DOC\""
)
@TableField
(
"\"DESIGN_DOC\""
)
@FieldDisplayDefine
(
value
=
"设计文件"
,
type
=
JSON
.
class
)
private
String
designDoc
;
private
String
designDoc
;
/**
/**
*
*
*/
*/
@TableField
(
"\"APPRAISAL_UNIT\""
)
@TableField
(
"\"APPRAISAL_UNIT\""
)
@FieldDisplayDefine
(
value
=
"设计文件鉴定单位"
)
private
String
appraisalUnit
;
private
String
appraisalUnit
;
/**
/**
*
*
*/
*/
@TableField
(
"\"APPRAISAL_DATE\""
)
@TableField
(
"\"APPRAISAL_DATE\""
)
@FieldDisplayDefine
(
value
=
"设计文件鉴定日期"
)
private
String
appraisalDate
;
private
String
appraisalDate
;
/**
/**
*
*
*/
*/
@TableField
(
"\"DESIGN_STANDARD\""
)
@TableField
(
"\"DESIGN_STANDARD\""
)
@FieldDisplayDefine
(
value
=
"设计规范"
,
type
=
JSON
.
class
)
private
String
designStandard
;
private
String
designStandard
;
/**
/**
*其他附件
*其他附件
*/
*/
@TableField
(
"\"OTHER_ACCESSORIES_DES\""
)
@TableField
(
"\"OTHER_ACCESSORIES_DES\""
)
@FieldDisplayDefine
(
value
=
"其他附件"
,
type
=
JSON
.
class
)
private
String
otherAccessoriesDes
;
private
String
otherAccessoriesDes
;
/**
/**
* 资料是否完整齐全:1-齐全;2-不齐全【历史无证设备需要】
* 资料是否完整齐全:1-齐全;2-不齐全【历史无证设备需要】
*/
*/
@TableField
(
"\"DESIGN_IS_COMPLETE\""
)
@TableField
(
"\"DESIGN_IS_COMPLETE\""
)
@FieldDisplayDefine
(
value
=
"设计资料是否完整齐全"
)
private
String
designIsComplete
;
private
String
designIsComplete
;
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgFactoryInfo.java
View file @
d1d2375a
...
@@ -11,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
...
@@ -11,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
@@ -29,7 +30,7 @@ import java.util.Date;
...
@@ -29,7 +30,7 @@ import java.util.Date;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"idx_biz_jg_factory_info"
)
@TableName
(
"idx_biz_jg_factory_info"
)
@Group
(
value
=
"idx_biz_jg_factory_info"
)
@Group
(
value
=
"idx_biz_jg_factory_info"
)
public
class
IdxBizJgFactoryInfo
extends
TzsBaseEntity
{
public
class
IdxBizJgFactoryInfo
extends
TzsBaseEntity
implements
IBaseChangeData
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgOtherInfo.java
View file @
d1d2375a
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
@@ -19,7 +20,7 @@ import java.util.Date;
...
@@ -19,7 +20,7 @@ import java.util.Date;
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"idx_biz_jg_other_info"
)
@TableName
(
"idx_biz_jg_other_info"
)
public
class
IdxBizJgOtherInfo
extends
TzsBaseEntity
{
public
class
IdxBizJgOtherInfo
extends
TzsBaseEntity
implements
IBaseChangeData
{
/**
/**
*
*
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/IdxBizJgRegisterInfo.java
View file @
d1d2375a
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.annotation.Group
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
@@ -21,7 +22,7 @@ import lombok.experimental.Accessors;
...
@@ -21,7 +22,7 @@ import lombok.experimental.Accessors;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"idx_biz_jg_register_info"
)
@TableName
(
"idx_biz_jg_register_info"
)
@Group
(
value
=
"idx_biz_jg_register_info"
)
@Group
(
value
=
"idx_biz_jg_register_info"
)
public
class
IdxBizJgRegisterInfo
extends
TzsBaseEntity
{
public
class
IdxBizJgRegisterInfo
extends
TzsBaseEntity
implements
IBaseChangeData
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/enums/EquipmentClassifityEnum.java
View file @
d1d2375a
...
@@ -11,29 +11,30 @@ import java.util.Map;
...
@@ -11,29 +11,30 @@ import java.util.Map;
public
enum
EquipmentClassifityEnum
{
public
enum
EquipmentClassifityEnum
{
/**
/**
*
*设备分类
*
*设备分类
*/
*/
GL
(
"锅炉"
,
"1000"
),
GL
(
"锅炉"
,
"1000"
),
YLRQ
(
"压力容器"
,
"2000"
),
YLRQ
(
"压力容器"
,
"2000"
),
DT
(
"电梯"
,
"3000"
),
DT
(
"电梯"
,
"3000"
),
QZJX
(
"起重机械"
,
"4000"
),
QZJX
(
"起重机械"
,
"4000"
),
CC
(
"场(厂)内专用机动车辆"
,
"5000"
),
CC
(
"场(厂)内专用机动车辆"
,
"5000"
),
YLSS
(
"大型游乐设施"
,
"6000"
),
YLSS
(
"大型游乐设施"
,
"6000"
),
YLGDYJ
(
"压力管道元件"
,
"7000"
),
YLGDYJ
(
"压力管道元件"
,
"7000"
),
YLGD
(
"压力管道"
,
"8000"
),
YLGD
(
"压力管道"
,
"8000"
),
KYSD
(
"客运索道"
,
"9000"
),
KYSD
(
"客运索道"
,
"9000"
),
//树类型
//树类型
//设备认领状态
//设备认领状态
SBRLZT
(
"设备认领状态"
,
"rlzt"
),
SBRLZT
(
"设备认领状态"
,
"rlzt"
),
BDLS
(
"八大类树"
,
"eightCategory"
),
BDLS
(
"八大类树"
,
"eightCategory"
),
RENLING
(
"其他"
,
"other"
);
RENLING
(
"其他"
,
"other"
);
private
String
name
;
private
String
name
;
private
String
code
;
private
String
code
;
public
static
Map
<
String
,
String
>
getName
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getName
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getCode
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getCode
=
new
HashMap
<>();
static
{
static
{
for
(
EquipmentClassifityEnum
e
:
EquipmentClassifityEnum
.
values
()){
for
(
EquipmentClassifityEnum
e
:
EquipmentClassifityEnum
.
values
())
{
getName
.
put
(
e
.
code
,
e
.
name
);
getName
.
put
(
e
.
code
,
e
.
name
);
getCode
.
put
(
e
.
name
,
e
.
code
);
getCode
.
put
(
e
.
name
,
e
.
code
);
}
}
...
@@ -41,18 +42,18 @@ public enum EquipmentClassifityEnum {
...
@@ -41,18 +42,18 @@ public enum EquipmentClassifityEnum {
}
}
public
static
String
getNameByCode
(
String
code
){
public
static
String
getNameByCode
(
String
code
)
{
for
(
EquipmentClassifityEnum
value
:
EquipmentClassifityEnum
.
values
())
{
for
(
EquipmentClassifityEnum
value
:
EquipmentClassifityEnum
.
values
())
{
if
(
value
.
getCode
().
equals
(
code
)){
if
(
value
.
getCode
().
equals
(
code
))
{
return
value
.
getName
();
return
value
.
getName
();
}
}
}
}
return
""
;
return
""
;
}
}
public
static
EquipmentClassifityEnum
getOne
(
String
code
){
public
static
EquipmentClassifityEnum
getOne
(
String
code
)
{
for
(
EquipmentClassifityEnum
value
:
EquipmentClassifityEnum
.
values
())
{
for
(
EquipmentClassifityEnum
value
:
EquipmentClassifityEnum
.
values
())
{
if
(
value
.
getCode
().
equals
(
code
)){
if
(
value
.
getCode
().
equals
(
code
))
{
return
value
;
return
value
;
}
}
}
}
...
...
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