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
fa1ac393
Commit
fa1ac393
authored
Sep 23, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
```
feat(openapi): 气瓶对接调整优化 - 重构 CylinderFilling与 CylinderFillingCheck 实体类,继承自公共基类 CylinderFillingBaseEntity - 扩展 tz_cylinder_filling 表及 tz_cylinder_filling_record 表字段,新增多个安全检查项和充装信息
parent
bf240d8e
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
2832 additions
and
821 deletions
+2832
-821
CylinderFieldValidationExample.java
CylinderFieldValidationExample.java
+204
-0
CylinderField.java
...ava/com/yeejoin/amos/api/openapi/enums/CylinderField.java
+107
-0
CylinderType.java
...java/com/yeejoin/amos/api/openapi/enums/CylinderType.java
+34
-0
CylinderTypeFieldValidation.java
...n/amos/api/openapi/enums/CylinderTypeFieldValidation.java
+224
-0
AbstractBaseModel.java
...eejoin/amos/api/openapi/face/model/AbstractBaseModel.java
+20
-17
BizTokenModel.java
...om/yeejoin/amos/api/openapi/face/model/BizTokenModel.java
+5
-0
CylinderAbstractBaseModel.java
...mos/api/openapi/face/model/CylinderAbstractBaseModel.java
+32
-0
TmCylinderFillingCheckModel.java
...s/api/openapi/face/model/TmCylinderFillingCheckModel.java
+64
-38
TmCylinderFillingModel.java
...n/amos/api/openapi/face/model/TmCylinderFillingModel.java
+147
-24
TmCylinderFillingRecordModel.java
.../api/openapi/face/model/TmCylinderFillingRecordModel.java
+63
-16
ESCylinderFillingInfoRepository.java
...openapi/face/orm/dao/ESCylinderFillingInfoRepository.java
+11
-0
MidEquipRegistrationInfoMapper.java
.../openapi/face/orm/dao/MidEquipRegistrationInfoMapper.java
+1
-0
AbstractBaseEntity.java
.../amos/api/openapi/face/orm/entity/AbstractBaseEntity.java
+20
-14
CylinderAbstractBaseEntity.java
...i/openapi/face/orm/entity/CylinderAbstractBaseEntity.java
+32
-0
TmCylinderFilling.java
...n/amos/api/openapi/face/orm/entity/TmCylinderFilling.java
+151
-41
TmCylinderFillingCheck.java
...s/api/openapi/face/orm/entity/TmCylinderFillingCheck.java
+65
-34
TmCylinderFillingRecord.java
.../api/openapi/face/orm/entity/TmCylinderFillingRecord.java
+64
-32
CylinderDateInfoService.java
...mos/api/openapi/face/service/CylinderDateInfoService.java
+2
-13
CylinderFillingDataValidationService.java
...pi/face/service/CylinderFillingDataValidationService.java
+158
-151
CylinderService.java
...eejoin/amos/api/openapi/face/service/CylinderService.java
+116
-32
OpenapiBizTokenService.java
...amos/api/openapi/face/service/OpenapiBizTokenService.java
+2
-1
SyncCylinderDataService.java
...mos/api/openapi/face/service/SyncCylinderDataService.java
+8
-57
TmCylinderFillingCheckService.java
...i/openapi/face/service/TmCylinderFillingCheckService.java
+9
-6
TmCylinderFillingRecordService.java
.../openapi/face/service/TmCylinderFillingRecordService.java
+9
-11
TmCylinderFillingService.java
...os/api/openapi/face/service/TmCylinderFillingService.java
+5
-1
FieldValidation.java
.../yeejoin/amos/api/openapi/validation/FieldValidation.java
+11
-0
CylinderFillingMessage.java
.../boot/module/cylinder/api/dto/CylinderFillingMessage.java
+2
-1
CylinderFillingMessageModel.java
.../module/cylinder/api/dto/CylinderFillingMessageModel.java
+2
-1
ESCylinderFillingInfoDto.java
.../module/cylinder/api/entity/ESCylinderFillingInfoDto.java
+522
-0
CylinderFilling.java
.../boot/module/cylinder/flc/api/entity/CylinderFilling.java
+122
-43
CylinderFillingBaseEntity.java
...le/cylinder/flc/api/entity/CylinderFillingBaseEntity.java
+65
-0
CylinderFillingCheck.java
.../module/cylinder/flc/api/entity/CylinderFillingCheck.java
+44
-35
CylinderFillingRecord.java
...module/cylinder/flc/api/entity/CylinderFillingRecord.java
+38
-36
CylinderInfoMapper.java
...ot/module/cylinder/flc/api/mapper/CylinderInfoMapper.java
+3
-0
CylCylinderFillingCheckMapper.xml
...c/main/resources/mapper/CylCylinderFillingCheckMapper.xml
+256
-90
CylinderFillingCheckMapper.xml
.../src/main/resources/mapper/CylinderFillingCheckMapper.xml
+93
-42
CylinderInfoMapper.xml
...nder-api/src/main/resources/mapper/CylinderInfoMapper.xml
+35
-0
CylSyncServiceImpl.java
...ule/cylinder/flc/biz/service/impl/CylSyncServiceImpl.java
+86
-85
No files found.
CylinderFieldValidationExample.java
0 → 100644
View file @
fa1ac393
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 通用气瓶字段校验枚举示例
* 支持多种气瓶类型,每种类型可以有不同的必填和唯一性要求
*/
public
class
CylinderFieldValidationExample
{
/**
* 字段校验接口
*/
public
interface
FieldValidation
{
boolean
isRequired
();
boolean
isUnique
();
String
getFieldName
();
}
/**
* 通用气瓶字段枚举
*/
public
enum
CylinderField
implements
FieldValidation
{
// 通用字段
SEQUENCE_CODE
(
"sequenceCode"
,
true
,
true
),
CREDIT_CODE
(
"creditCode"
,
true
,
false
),
FILLING_UNIT_NAME
(
"fillingUnitName"
,
true
,
false
),
INSPECTOR_USER
(
"inspectorUser"
,
true
,
false
),
INSPECTION_DATE
(
"inspectionDate"
,
true
,
false
),
IS_VALID
(
"isValid"
,
false
,
false
),
IS_SAME
(
"same"
,
false
,
false
),
IS_REGULATIONS
(
"isRegulations"
,
false
,
false
),
IS_COMPLIANCE_WITH_GBT
(
"isComplianceWithGBT"
,
false
,
false
),
HAVE_STILL_PRESSURE
(
"haveStillPressure"
,
false
,
false
),
IS_COMPLETE
(
"isComplete"
,
false
,
false
),
HAVE_SECURITY_DOCUMENTS
(
"haveSecurityDocuments"
,
false
,
false
),
FILL_BEFORE_ITEM
(
"fillBeforeItem"
,
false
,
false
),
CHECK_RESULTS
(
"checkResults"
,
false
,
false
),
NONCONFORMANCES
(
"nonconformances"
,
false
,
false
),
SYNC_DATE
(
"syncDate"
,
false
,
false
),
SYNC_STATE
(
"syncState"
,
false
,
false
);
private
final
String
fieldName
;
private
final
boolean
required
;
private
final
boolean
unique
;
CylinderField
(
String
fieldName
,
boolean
required
,
boolean
unique
)
{
this
.
fieldName
=
fieldName
;
this
.
required
=
required
;
this
.
unique
=
unique
;
}
@Override
public
boolean
isRequired
()
{
return
required
;
}
@Override
public
boolean
isUnique
()
{
return
unique
;
}
@Override
public
String
getFieldName
()
{
return
fieldName
;
}
public
static
List
<
String
>
getRequiredFields
()
{
return
Arrays
.
stream
(
values
())
.
filter
(
FieldValidation:
:
isRequired
)
.
map
(
FieldValidation:
:
getFieldName
)
.
collect
(
Collectors
.
toList
());
}
public
static
List
<
String
>
getUniqueFields
()
{
return
Arrays
.
stream
(
values
())
.
filter
(
FieldValidation:
:
isUnique
)
.
map
(
FieldValidation:
:
getFieldName
)
.
collect
(
Collectors
.
toList
());
}
}
/**
* 气瓶类型枚举
*/
public
enum
CylinderType
{
INDUSTRIAL_GAS_CYLINDER
(
"工业气瓶"
),
LIQUEFIED_GAS_CYLINDER
(
"液化石油气瓶"
),
OTHER_CYLINDER
(
"其他气瓶"
);
private
final
String
description
;
CylinderType
(
String
description
)
{
this
.
description
=
description
;
}
public
String
getDescription
()
{
return
description
;
}
}
/**
* 特定气瓶类型的字段校验枚举
* 通过组合模式支持不同类型气瓶的特殊要求
*/
public
enum
CylinderTypeFieldValidation
{
// 工业气瓶特殊要求
INDUSTRIAL_CYLINDER_UNIQUE_FIELD
(
CylinderType
.
INDUSTRIAL_GAS_CYLINDER
,
"manufactureDate"
,
false
,
true
),
INDUSTRIAL_CYLINDER_REQUIRED_FIELD
(
CylinderType
.
INDUSTRIAL_GAS_CYLINDER
,
"materialType"
,
true
,
false
),
// 液化石油气瓶特殊要求
LIQUEFIED_GAS_CYLINDER_UNIQUE_FIELD
(
CylinderType
.
LIQUEFIED_GAS_CYLINDER
,
"volume"
,
false
,
true
),
LIQUEFIED_GAS_CYLINDER_REQUIRED_FIELD
(
CylinderType
.
LIQUEFIED_GAS_CYLINDER
,
"wallThickness"
,
true
,
false
),
// 其他气瓶特殊要求
OTHER_CYLINDER_UNIQUE_FIELD
(
CylinderType
.
OTHER_CYLINDER
,
"customId"
,
false
,
true
),
OTHER_CYLINDER_REQUIRED_FIELD
(
CylinderType
.
OTHER_CYLINDER
,
"specification"
,
true
,
false
);
private
final
CylinderType
cylinderType
;
private
final
String
fieldName
;
private
final
boolean
required
;
private
final
boolean
unique
;
CylinderTypeFieldValidation
(
CylinderType
cylinderType
,
String
fieldName
,
boolean
required
,
boolean
unique
)
{
this
.
cylinderType
=
cylinderType
;
this
.
fieldName
=
fieldName
;
this
.
required
=
required
;
this
.
unique
=
unique
;
}
public
CylinderType
getCylinderType
()
{
return
cylinderType
;
}
public
String
getFieldName
()
{
return
fieldName
;
}
public
boolean
isRequired
()
{
return
required
;
}
public
boolean
isUnique
()
{
return
unique
;
}
/**
* 获取指定气瓶类型的所有必填字段
* @param type 气瓶类型
* @return 必填字段列表
*/
public
static
List
<
String
>
getRequiredFieldsForType
(
CylinderType
type
)
{
// 先获取通用必填字段
List
<
String
>
requiredFields
=
CylinderField
.
getRequiredFields
();
// 再添加特定类型必填字段
requiredFields
.
addAll
(
Arrays
.
stream
(
values
())
.
filter
(
validation
->
validation
.
cylinderType
==
type
)
.
filter
(
CylinderTypeFieldValidation:
:
isRequired
)
.
map
(
CylinderTypeFieldValidation:
:
getFieldName
)
.
collect
(
Collectors
.
toList
()));
return
requiredFields
;
}
/**
* 获取指定气瓶类型的所有唯一字段
* @param type 气瓶类型
* @return 唯一字段列表
*/
public
static
List
<
String
>
getUniqueFieldsForType
(
CylinderType
type
)
{
// 先获取通用唯一字段
List
<
String
>
uniqueFields
=
CylinderField
.
getUniqueFields
();
// 再添加特定类型唯一字段
uniqueFields
.
addAll
(
Arrays
.
stream
(
values
())
.
filter
(
validation
->
validation
.
cylinderType
==
type
)
.
filter
(
CylinderTypeFieldValidation:
:
isUnique
)
.
map
(
CylinderTypeFieldValidation:
:
getFieldName
)
.
collect
(
Collectors
.
toList
()));
return
uniqueFields
;
}
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"=== 通用气瓶字段校验 ==="
);
System
.
out
.
println
(
"通用必填字段: "
+
CylinderField
.
getRequiredFields
());
System
.
out
.
println
(
"通用唯一字段: "
+
CylinderField
.
getUniqueFields
());
System
.
out
.
println
(
"\n=== 工业气瓶字段校验 ==="
);
System
.
out
.
println
(
"必填字段: "
+
CylinderTypeFieldValidation
.
getRequiredFieldsForType
(
CylinderType
.
INDUSTRIAL_GAS_CYLINDER
));
System
.
out
.
println
(
"唯一字段: "
+
CylinderTypeFieldValidation
.
getUniqueFieldsForType
(
CylinderType
.
INDUSTRIAL_GAS_CYLINDER
));
System
.
out
.
println
(
"\n=== 液化石油气瓶字段校验 ==="
);
System
.
out
.
println
(
"必填字段: "
+
CylinderTypeFieldValidation
.
getRequiredFieldsForType
(
CylinderType
.
LIQUEFIED_GAS_CYLINDER
));
System
.
out
.
println
(
"唯一字段: "
+
CylinderTypeFieldValidation
.
getUniqueFieldsForType
(
CylinderType
.
LIQUEFIED_GAS_CYLINDER
));
System
.
out
.
println
(
"\n=== 其他气瓶字段校验 ==="
);
System
.
out
.
println
(
"必填字段: "
+
CylinderTypeFieldValidation
.
getRequiredFieldsForType
(
CylinderType
.
OTHER_CYLINDER
));
System
.
out
.
println
(
"唯一字段: "
+
CylinderTypeFieldValidation
.
getUniqueFieldsForType
(
CylinderType
.
OTHER_CYLINDER
));
}
}
\ No newline at end of file
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/enums/CylinderField.java
0 → 100644
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
enums
;
import
com.yeejoin.amos.api.openapi.validation.FieldValidation
;
import
lombok.Getter
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 通用气瓶字段枚举
*/
@Getter
public
enum
CylinderField
implements
FieldValidation
{
// 通用字段
sequenceCode
(
new
String
[]{
FillStage
.
ALL
.
getCode
()},
"sequenceCode"
,
true
,
true
,
"气瓶唯一标识码"
),
cylinderType
(
new
String
[]{
FillStage
.
ALL
.
getCode
()},
"cylinderType"
,
true
,
false
,
"气瓶类型"
),
fillingBeforeId
(
new
String
[]{
FillStage
.
ALL
.
getCode
()},
"fillingBeforeId"
,
true
,
true
,
"充装前检查Id"
),
inspectorUserNum
(
new
String
[]{
FillStage
.
ALL
.
getCode
()},
"inspectorUserNum"
,
true
,
false
,
"作业人员证书编号"
),
inspectorUser
(
new
String
[]{
FillStage
.
ALL
.
getCode
()},
"inspectorUser"
,
true
,
false
,
"作业人员姓名"
),
inspectionDate
(
new
String
[]{
FillStage
.
BEFORE
.
getCode
(),
FillStage
.
AFTER
.
getCode
()},
"inspectionDate"
,
true
,
false
,
"检测时间"
),
gunNumber
(
new
String
[]{
FillStage
.
FILLING
.
getCode
()},
"gunNumber"
,
true
,
false
,
"充装枪编号"
),
fillingStartTime
(
new
String
[]{
FillStage
.
FILLING
.
getCode
()},
"fillingStartTime"
,
true
,
false
,
"充装开始时间"
),
fillingEndTime
(
new
String
[]{
FillStage
.
FILLING
.
getCode
()},
"fillingEndTime"
,
true
,
false
,
"充装结束时间"
);
@Getter
public
enum
FillStage
{
BEFORE
(
"before"
,
"充装前"
),
FILLING
(
"filling"
,
"充装中"
),
AFTER
(
"after"
,
"充装后"
),
ALL
(
"all"
,
"所有"
);
private
final
String
code
;
private
final
String
desc
;
FillStage
(
String
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
}
private
final
String
[]
stage
;
private
final
String
fieldName
;
private
final
boolean
required
;
private
final
boolean
unique
;
private
final
String
desc
;
CylinderField
(
String
[]
stage
,
String
fieldName
,
boolean
required
,
boolean
unique
,
String
desc
)
{
this
.
stage
=
stage
;
this
.
fieldName
=
fieldName
;
this
.
required
=
required
;
this
.
unique
=
unique
;
this
.
desc
=
desc
;
}
@Override
public
boolean
isRequired
()
{
return
required
;
}
@Override
public
boolean
isUnique
()
{
return
unique
;
}
@Override
public
String
getFieldName
()
{
return
fieldName
;
}
public
static
List
<
String
>
getRequiredFields
(
String
stage
)
{
return
Arrays
.
stream
(
values
())
.
filter
(
field
->
(
Arrays
.
asList
(
field
.
stage
).
contains
(
stage
)
||
Arrays
.
stream
(
field
.
stage
).
anyMatch
(
s
->
s
.
equals
(
FillStage
.
ALL
.
getCode
()))))
.
filter
(
FieldValidation:
:
isRequired
)
.
map
(
FieldValidation:
:
getFieldName
)
.
collect
(
Collectors
.
toList
());
}
public
static
List
<
String
>
getRequiredFields
()
{
return
Arrays
.
stream
(
values
())
.
filter
(
FieldValidation:
:
isRequired
)
.
map
(
FieldValidation:
:
getFieldName
)
.
collect
(
Collectors
.
toList
());
}
public
static
List
<
String
>
getUniqueFields
(
String
stage
)
{
return
Arrays
.
stream
(
values
())
.
filter
(
field
->
(
Arrays
.
asList
(
field
.
stage
).
contains
(
stage
)
||
Arrays
.
stream
(
field
.
stage
).
anyMatch
(
s
->
s
.
equals
(
FillStage
.
ALL
.
getCode
()))))
.
filter
(
FieldValidation:
:
isUnique
)
.
map
(
FieldValidation:
:
getFieldName
)
.
collect
(
Collectors
.
toList
());
}
public
static
List
<
String
>
getUniqueFields
()
{
return
Arrays
.
stream
(
values
())
.
filter
(
FieldValidation:
:
isUnique
)
.
map
(
FieldValidation:
:
getFieldName
)
.
collect
(
Collectors
.
toList
());
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
CylinderField
.
getRequiredFields
(
FillStage
.
BEFORE
.
code
));
System
.
out
.
println
(
CylinderField
.
getRequiredFields
(
FillStage
.
AFTER
.
code
));
System
.
out
.
println
(
CylinderField
.
getUniqueFields
(
FillStage
.
AFTER
.
code
));
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/enums/CylinderType.java
0 → 100644
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
enums
;
import
lombok.Getter
;
/**
* 气瓶类型枚举
*/
@Getter
public
enum
CylinderType
{
VEHICLE_CNG_LNG_H2
(
"VEHICLE_CNG_LNG_H2"
,
"车用气瓶(CNG/LNG/氢气)"
),
LIQUEFIED_GAS_LPG
(
"LIQUEFIED_GAS_LPG"
,
"液化石油气瓶"
),
COMPRESSED_GAS
(
"COMPRESSED_GAS"
,
"压缩气体气瓶"
),
DISSOLVED_ACETYLENE
(
"DISSOLVED_ACETYLENE"
,
"溶解乙炔气瓶"
),
MIXED_GAS
(
"MIXED_GAS"
,
"混合气体气瓶"
),
CRYOGENIC_INSULATED
(
"CRYOGENIC_INSULATED"
,
"低温绝热气瓶"
),
LIQUEFIED_GAS_EXCLUDING_LPG
(
"LIQUEFIED_GAS_EXCLUDING_LPG"
,
"液化气体(LPG除外)气瓶"
);
private
final
String
code
;
private
final
String
name
;
CylinderType
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
CylinderType
getByCode
(
String
code
)
{
for
(
CylinderType
cylinderType
:
CylinderType
.
values
())
{
if
(
cylinderType
.
code
.
equals
(
code
))
{
return
cylinderType
;
}
}
return
null
;
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/enums/CylinderTypeFieldValidation.java
0 → 100644
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
enums
;
import
lombok.Getter
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Getter
public
enum
CylinderTypeFieldValidation
{
// 车用气瓶(CNG/LNG/氢气)特殊要求
carNumber
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"carNumber"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"车牌号码"
),
isCylinderGasConsistent
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"isCylinderGasConsistent"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"充装气体与气瓶允许充装气体一致"
),
fillingMedium
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"fillingMedium"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"充装介质"
),
hasSevereExternalDamage
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"hasSevereExternalDamage"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶外表面有划伤、裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷"
),
hasResidualPressure
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"hasResidualPressure"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶内有剩余压力"
),
isGasLeak
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"isGasLeak"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"无气体泄漏"
),
areAccessoriesCompleteAndSafe
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"areAccessoriesCompleteAndSafe"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶附件齐全并符合安全要求"
),
fillingAmount
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"fillingAmount"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"充装量"
),
pressure
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"pressure"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"压力"
),
ambientTemperature
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"ambientTemperature"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"室温"
),
isNoAbnormalTemperatureRise
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"isNoAbnormalTemperatureRise"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"瓶体温度无异常升高"
),
abnormalConditions
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"abnormalConditions"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"异常情况"
),
isNoBulgingOrLeakage
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"isNoBulgingOrLeakage"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶体未出现鼓包变形或泄漏等严重缺陷"
),
isPressureNormal
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"isPressureNormal"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶内压力正常"
),
isTemperatureNormal
(
CylinderType
.
VEHICLE_CNG_LNG_H2
,
"isTemperatureNormal"
,
false
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"温度正常"
),
// 液化石油气瓶
excludeOverdueRefurbishedScrappedCylinders
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"excludeOverdueRefurbishedScrappedCylinders"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"排除超期未检气瓶、非法改装或翻新及报废气瓶"
),
isWarningLabelGasNameConsistentWithStamp
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"isWarningLabelGasNameConsistentWithStamp"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致"
),
isColorMarkingCompliant
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"isColorMarkingCompliant"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶外表面的颜色标志是否符合规定"
),
valveCompliesGB7512
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"valveCompliesGB7512"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"瓶阀符合GB7512规定"
),
hasResidualPressure2
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"hasResidualPressure"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶内有剩余压力"
),
hasNoSevereExternalDamage
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"hasNoSevereExternalDamage"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶外表面无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷"
),
areAccessoriesCompleteAndSafe2
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"areAccessoriesCompleteAndSafe"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶附件齐全并符合安全要求"
),
isNewOrInspectedOk
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"isNewOrInspectedOk"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"新投入使用气瓶或经检验后首次投入使用气瓶,充装前按照规定先置换瓶内空气,并经分析合格后方可充气"
),
fillingAmount2
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"fillingAmount"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"充装量"
),
abnormalConditions2
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"abnormalConditions"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"异常情况"
),
valveSealIsGood
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"valveSealIsGood"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶阀及其与瓶口连接的密封良好"
),
isNoBulgingOrLeakage2
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"isNoBulgingOrLeakage"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶体未出现鼓包变形或泄漏等严重缺陷"
),
isTemperatureNormal2
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"isTemperatureNormal"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶体温度没有异常升高的迹象"
),
hasWarningAndFillingLabels
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"hasWarningAndFillingLabels"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"气瓶粘贴警示标签和充装标签)"
),
reweighedWithinLimit
(
CylinderType
.
LIQUEFIED_GAS_LPG
,
"hasWarningAndFillingLabels"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"充装量复秤未超重"
),
// 压缩气体气瓶 COMPRESSED_GAS
isFillingMediumConsistentWithStamp
(
CylinderType
.
COMPRESSED_GAS
,
"isFillingMediumConsistentWithStamp"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"充装介质与气瓶钢印标志气体名称是否一致"
),
outletThreadTypeCompliesGB15383
(
CylinderType
.
COMPRESSED_GAS
,
"outletThreadTypeCompliesGB15383"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶瓶阀的出气口螺纹型式是符合GB/T15383的规定"
),
isNewOrInspectedOk3
(
CylinderType
.
COMPRESSED_GAS
,
"isNewOrInspectedOk"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"新投入使用气瓶或经检验后首次投入使用气瓶,充装前按照规定先抽真空或置换瓶内空气"
),
isVacuumProcessed
(
CylinderType
.
COMPRESSED_GAS
,
"isVacuumProcessed"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"充装可燃、氧化性气体,如无余压保持阀,重复充装前应先进行抽真空处理"
),
hasNoSevereCorrosion
(
CylinderType
.
COMPRESSED_GAS
,
"hasNoSevereCorrosion"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶外表面无严重腐蚀"
),
hasNoSurfaceDefects
(
CylinderType
.
COMPRESSED_GAS
,
"hasNoSurfaceDefects"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶外表面无损伤缺陷"
),
hasResidualPressure3
(
CylinderType
.
COMPRESSED_GAS
,
"hasResidualPressure"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶内有剩余压力"
),
isWarningLabelGasNameConsistentWithStamp3
(
CylinderType
.
COMPRESSED_GAS
,
"isWarningLabelGasNameConsistentWithStamp"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"警示标签上的气体名称与气瓶钢印标志一致"
),
colorMeetsGB7144
(
CylinderType
.
COMPRESSED_GAS
,
"colorMeetsGB7144"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶外表面的颜色标志符合GB/T 7144的规定、且清晰易认"
),
hasNoCracks
(
CylinderType
.
COMPRESSED_GAS
,
"hasNoCracks"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶外表面无裂纹"
),
hasNoObviousDeformation
(
CylinderType
.
COMPRESSED_GAS
,
"hasNoObviousDeformation"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶外表面无明显变形"
),
noOilOrFlammableSubstances
(
CylinderType
.
COMPRESSED_GAS
,
"noOilOrFlammableSubstances"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"瓶体、瓶阀无沾染油脂或其他可燃物"
),
areAccessoriesCompleteAndSafe3
(
CylinderType
.
COMPRESSED_GAS
,
"areAccessoriesCompleteAndSafe"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶附件齐全并符合安全要求"
),
fillingPressure
(
CylinderType
.
COMPRESSED_GAS
,
"fillingPressure"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"充装压力"
),
ambientTemperature3
(
CylinderType
.
COMPRESSED_GAS
,
"ambientTemperature"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"室温"
),
temperatureConsistent
(
CylinderType
.
COMPRESSED_GAS
,
"temperatureConsistent"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"瓶体温度一致"
),
noAbnormalSoundInside
(
CylinderType
.
COMPRESSED_GAS
,
"noAbnormalSoundInside"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"瓶内无异常音响"
),
valveSealedWell
(
CylinderType
.
COMPRESSED_GAS
,
"valveSealedWell"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"瓶阀及各连接部位的密封良好"
),
abnormalConditions3
(
CylinderType
.
COMPRESSED_GAS
,
"abnormalConditions"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"异常情况"
),
pressureAndMassMeetRegulations
(
CylinderType
.
COMPRESSED_GAS
,
"pressureAndMassMeetRegulations"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶内压力(充装量)及质量符合安全技术规范及相关标准的要求"
),
isNoBulgingOrLeakage3
(
CylinderType
.
COMPRESSED_GAS
,
"isNoBulgingOrLeakage"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"未出现鼓包变形或泄漏等严重缺陷"
),
capsAndLabelsAreIntact
(
CylinderType
.
COMPRESSED_GAS
,
"capsAndLabelsAreIntact"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶帽、充装标签、警示标签完整"
),
valveSealedWell2
(
CylinderType
.
COMPRESSED_GAS
,
"valveSealedWell"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶阀出气口螺纹及其密封面良好"
),
isTemperatureNormal3
(
CylinderType
.
COMPRESSED_GAS
,
"isTemperatureNormal"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶体的温度无异常升高的迹象"
),
// 溶解乙炔气瓶 DISSOLVED_ACETYLENE
meetsGB13076AndMechanicalDamage
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"meetsGB13076AndMechanicalDamage"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"瓶体无腐蚀、机械损伤等表面缺陷、是否满足GB13076 标准报废"
),
fusiblePlugUndamaged
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"fusiblePlugUndamaged"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"易熔合金无融熔、流失、损伤的"
),
colorMeetsGB71444
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"colorMeetsGB7144"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"颜色标记符合GB7144规定或不存在表面漆色脱落严重的"
),
stampMarkingsClearAndComplete
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"stampMarkingsClearAndComplete"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"钢印标记完整且能够识别"
),
accessoriesCompleteAndConforming
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"accessoriesCompleteAndConforming"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"附件完整且符合规定"
),
noCarbonBlackOrTarAtValvePort
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"noCarbonBlackOrTarAtValvePort"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"瓶阀侧接嘴处积无炭黑或焦油等异物"
),
fillerAndSolventQualityOK
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"fillerAndSolventQualityOK"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"瓶内的填料、溶剂的质量没有问题"
),
noOtherSafetyAffectingDefects
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"noOtherSafetyAffectingDefects"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"无其他影响安全使用缺陷的"
),
fillingRoomTemperature
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"fillingRoomTemperature"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"充装间温度"
),
residualPressure
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"residualPressure"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"剩余压力"
),
acetoneSupplementAmount
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"acetoneSupplementAmount"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"丙酮补加量"
),
fillingPressureLessThan
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"fillingPressureLessThan"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"充装压力≤2.5 MPa"
),
acetyleneFillingAmount
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"acetyleneFillingAmount"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"乙炔充装量"
),
pressureAfterRestingComplies
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"pressureAfterRestingComplies"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"静置后压力符合规定"
),
noLeakageIssuesDetected
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"noLeakageIssuesDetected"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"气瓶未发生泄漏等问题"
),
isTreatmentResultQualified
(
CylinderType
.
DISSOLVED_ACETYLENE
,
"isTreatmentResultQualified"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"处理结果是否合格"
),
// 混合气体气瓶 MIXED_GAS
isStampAndLabelConsistentWithMedium
(
CylinderType
.
MIXED_GAS
,
"isStampAndLabelConsistentWithMedium"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"钢印、警示标签与待充介质名称一致"
),
externalColorMarkingCompliant
(
CylinderType
.
MIXED_GAS
,
"externalColorMarkingCompliant"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"外表面颜色标志符合规定"
),
valveOutletThreadComplies
(
CylinderType
.
MIXED_GAS
,
"valveOutletThreadComplies"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"瓶阀出气口螺纹符合要求"
),
hasNoSevereSurfaceDefects
(
CylinderType
.
MIXED_GAS
,
"hasNoSevereSurfaceDefects"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"外表面无严重损伤缺陷"
),
cylinderAccessoriesMeetRequirements
(
CylinderType
.
MIXED_GAS
,
"cylinderAccessoriesMeetRequirements"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶附件符合要求"
),
oxidizingGasCylinderFreeOfOil
(
CylinderType
.
MIXED_GAS
,
"oxidizingGasCylinderFreeOfOil"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"氧化性混合气体的瓶体、瓶阀未沾染油脂"
),
preTreatedSuccessfully
(
CylinderType
.
MIXED_GAS
,
"preTreatedSuccessfully"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶经预处理(抽真空、烘干、置换或组合)合格"
),
fillingPressure5
(
CylinderType
.
MIXED_GAS
,
"fillingPressureLessThan"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"充装压力"
),
fillingAmount5
(
CylinderType
.
MIXED_GAS
,
"fillingAmount"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"充装量"
),
componentContents
(
CylinderType
.
MIXED_GAS
,
"componentContents"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"各组分含量"
),
abnormalConditions5
(
CylinderType
.
MIXED_GAS
,
"abnormalConditions"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"异常情况"
),
fillingAmountMeetsRequirement
(
CylinderType
.
MIXED_GAS
,
"fillingAmountMeetsRequirement"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"充装量(压力或质量)符合要求"
),
sealsIntactNoLeakage
(
CylinderType
.
MIXED_GAS
,
"sealsIntactNoLeakage"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"密封良好无泄漏"
),
noDeformationOrDefects
(
CylinderType
.
MIXED_GAS
,
"noDeformationOrDefects"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"气瓶无变形等缺陷"
),
temperatureRiseNormal
(
CylinderType
.
MIXED_GAS
,
"temperatureRiseNormal"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶体温升无异常"
),
cylinderAccessoriesComplete
(
CylinderType
.
MIXED_GAS
,
"cylinderAccessoriesComplete"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"气瓶附件完整齐全"
),
// 低温气体气瓶 CRYOGENIC_INSULATED
isStampAndLabelConsistentWithMedium6
(
CylinderType
.
CRYOGENIC_INSULATED
,
"isStampAndLabelConsistentWithMedium"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"钢印、警示标签与待充介质名称一致"
),
surfaceFreeOfOilAndDamage
(
CylinderType
.
CRYOGENIC_INSULATED
,
"surfaceFreeOfOilAndDamage"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶表面无油污、无严重损伤"
),
valveInGoodConditionCleanConnection
(
CylinderType
.
CRYOGENIC_INSULATED
,
"valveInGoodConditionCleanConnection"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"瓶阀完好、接头洁净无水或冰"
),
emptyPressureCylinderPurgedWithCleanGas
(
CylinderType
.
CRYOGENIC_INSULATED
,
"emptyPressureCylinderPurgedWithCleanGas"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"无余压的瓶用洁净的待充气体吹扫(易燃的先用液氮置换)"
),
tareWeightNominal
(
CylinderType
.
CRYOGENIC_INSULATED
,
"tareWeightNominal"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"标称皮重"
),
filledWeight
(
CylinderType
.
CRYOGENIC_INSULATED
,
"filledWeight"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"充装后质量"
),
actualFillingAmount
(
CylinderType
.
CRYOGENIC_INSULATED
,
"actualFillingAmount"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"实际充装量"
),
abnormalConditions6
(
CylinderType
.
CRYOGENIC_INSULATED
,
"abnormalConditions"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"异常情况"
),
reweighedWithinLimit6
(
CylinderType
.
CRYOGENIC_INSULATED
,
"reweighedWithinLimit"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"复秤未超重"
),
valveClosedNoLeakageInPipingAndAccessories
(
CylinderType
.
CRYOGENIC_INSULATED
,
"valveClosedNoLeakageInPipingAndAccessories"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"阀门已关闭,管路及各附件无漏气"
),
noFrostOrCondensationOnCylinder
(
CylinderType
.
CRYOGENIC_INSULATED
,
"noFrostOrCondensationOnCylinder"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"气瓶外观无结霜、结露"
),
// 液化气体(LPG除外)气瓶 LIQUEFIED_GAS_EXCLUDING_LPG
isStampAndLabelConsistentWithMedium7
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"isStampAndLabelConsistentWithMedium"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"钢印、警示标签与待充介质名称一致"
),
externalColorMarkingCompliant7
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"externalColorMarkingCompliant"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶外表面颜色标志符合规定"
),
valveOutletInternalThreadLeftHanded
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"valveOutletInternalThreadLeftHanded"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"瓶阀出气口为内螺纹(左旋) "
),
qualitativeTestPassedForResidualGas
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"qualitativeTestPassedForResidualGas"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"有余压的经定性鉴别且与待充介质一致"
),
internalValveInspectionPassed
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"internalValveInspectionPassed"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"无余压的经卸阀内检合格"
),
hasNoSevereSurfaceDefects7
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"hasNoSevereSurfaceDefects"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶外表面无严重损伤缺陷"
),
safetyAccessoriesCompleteAndSafe
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"safetyAccessoriesCompleteAndSafe"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"气瓶安全附件齐全并符合安全要求"
),
newCylinderAirReplacedBeforeFirstUse
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"newCylinderAirReplacedBeforeFirstUse"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
BEFORE
.
getCode
()},
"首充气瓶已置换瓶内空气"
),
tareWeightIncludingResidualGas
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"tareWeightIncludingResidualGas"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"含余气皮重"
),
filledWeight7
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"filledWeight"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"充装后质量"
),
actualFillingAmount7
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"actualFillingAmount"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"实际充装量"
),
abnormalConditions7
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"abnormalConditions"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
FILLING
.
getCode
()},
"异常情况"
),
reweighedWithinLimit7
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"reweighedWithinLimit"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"复秤未超重"
),
sealsIntactNoLeakage7
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"sealsIntactNoLeakage"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"密封良好无泄漏"
),
noDeformationOrDefects7
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"noDeformationOrDefects"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"气瓶无变形等缺陷"
),
temperatureRiseNormal7
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
"temperatureRiseNormal"
,
true
,
false
,
new
String
[]{
CylinderField
.
FillStage
.
AFTER
.
getCode
()},
"瓶体温升无异常"
),
;
private
final
CylinderType
cylinderType
;
private
final
String
fieldName
;
private
final
boolean
required
;
private
final
boolean
unique
;
// 阶段(充装前、中、后)
private
final
String
[]
stage
;
// 描述
private
final
String
desc
;
CylinderTypeFieldValidation
(
CylinderType
cylinderType
,
String
fieldName
,
boolean
required
,
boolean
unique
,
String
[]
stage
,
String
desc
)
{
this
.
cylinderType
=
cylinderType
;
this
.
fieldName
=
fieldName
;
this
.
required
=
required
;
this
.
unique
=
unique
;
this
.
stage
=
stage
;
this
.
desc
=
desc
;
}
/**
* 获取指定气瓶类型的所有必填字段
* @param type 气瓶类型
* @return 必填字段列表
*/
public
static
List
<
String
>
getRequiredFieldsForType
(
CylinderType
type
,
String
stage
)
{
// 先获取通用必填字段
List
<
String
>
requiredFields
=
CylinderField
.
getRequiredFields
(
stage
);
// 再添加特定类型必填字段
requiredFields
.
addAll
(
Arrays
.
stream
(
values
())
.
filter
(
validation
->
validation
.
cylinderType
==
type
)
.
filter
(
validation
->
Arrays
.
asList
(
validation
.
stage
).
contains
(
stage
))
.
filter
(
CylinderTypeFieldValidation:
:
isRequired
)
.
map
(
CylinderTypeFieldValidation:
:
getFieldName
)
.
collect
(
Collectors
.
toList
()));
return
requiredFields
;
}
/**
* 获取指定气瓶类型的所有唯一字段
* @param type 气瓶类型
* @return 唯一字段列表
*/
public
static
List
<
String
>
getUniqueFieldsForType
(
CylinderType
type
,
String
stage
)
{
// 先获取通用唯一字段
List
<
String
>
uniqueFields
=
CylinderField
.
getUniqueFields
();
// 再添加特定类型唯一字段
uniqueFields
.
addAll
(
Arrays
.
stream
(
values
())
.
filter
(
validation
->
validation
.
cylinderType
==
type
)
.
filter
(
validation
->
Arrays
.
asList
(
validation
.
stage
).
contains
(
stage
))
.
filter
(
CylinderTypeFieldValidation:
:
isUnique
)
.
map
(
CylinderTypeFieldValidation:
:
getFieldName
)
.
collect
(
Collectors
.
toList
()));
return
uniqueFields
;
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
getRequiredFieldsForType
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
CylinderField
.
FillStage
.
FILLING
.
getCode
()));
System
.
out
.
println
(
getUniqueFieldsForType
(
CylinderType
.
LIQUEFIED_GAS_EXCLUDING_LPG
,
CylinderField
.
FillStage
.
FILLING
.
getCode
()));
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/model/AbstractBaseModel.java
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
model
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.typroject.tyboot.core.rdbms.model.BaseModel
;
...
...
@@ -8,22 +9,24 @@ import java.util.Date;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
abstract
class
AbstractBaseModel
extends
BaseModel
{
/**
*
*/
public
abstract
class
AbstractBaseModel
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
protected
Date
syncDate
;
//同步时间 yyyy-MM-dd HH24:mi:ss
protected
int
syncState
;
//同步状态(0-新增 1-更新 2-删除)
/**
* 对接公司编码
*/
protected
String
appId
;
/**
* 对接接口版本
*/
protected
String
version
=
"v1"
;
@ApiModelProperty
(
value
=
"同步时间 yyyy-MM-dd HH24:mi:ss"
)
private
Date
syncDate
;
@ApiModelProperty
(
value
=
"0-新增 1-更新 2-删除"
)
private
Integer
syncState
;
@ApiModelProperty
(
value
=
"对接公司编码"
)
private
String
appId
;
@ApiModelProperty
(
value
=
"数据完整度"
)
private
Double
integrity
;
@ApiModelProperty
(
value
=
"对接接口版本"
)
private
String
version
=
"v1"
;
@ApiModelProperty
(
value
=
"更新人员"
)
private
String
recUserName
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/model/BizTokenModel.java
View file @
fa1ac393
...
...
@@ -35,4 +35,9 @@ public class BizTokenModel implements Serializable{
* 对接公司编码
*/
private
String
apiCompanyCode
;
/**
* 对接公司名称
*/
private
String
apiCompanyName
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/model/CylinderAbstractBaseModel.java
0 → 100644
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
model
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
abstract
class
CylinderAbstractBaseModel
extends
AbstractBaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"气瓶唯一标识码,制造单位统一信用代码-出厂编号"
)
private
String
sequenceCode
;
@ApiModelProperty
(
value
=
"气瓶类型"
)
private
String
cylinderType
;
@ApiModelProperty
(
value
=
"充装前检查Id"
)
private
String
fillingBeforeId
;
@ApiModelProperty
(
value
=
"作业人员证书编号"
)
private
String
inspectorUserNum
;
@ApiModelProperty
(
value
=
"作业人员姓名"
)
private
String
inspectorUser
;
@ApiModelProperty
(
value
=
"充装企业名称"
)
private
String
fillingUnitName
;
@ApiModelProperty
(
value
=
"充装企业统一社会信用代码"
)
private
String
fillingUnitCreditCode
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/model/TmCylinderFillingCheckModel.java
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
model
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
TmCylinderFillingCheckModel
extends
AbstractBaseModel
{
/**
*
*/
public
class
TmCylinderFillingCheckModel
extends
CylinderAbstractBaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
sequenceCode
;
//气瓶唯一标识码*
private
String
fillingCheckId
;
//充装后复查ID
private
int
withinScope
;
//充装量在规定范围内*
private
int
sealedState
;
//瓶阀及其与瓶口连接的密封良好*
private
int
defective
;
//瓶体未出现鼓包变形或泄露等严重缺陷*
private
int
abnormalTemperature
;
//瓶体温度没有异常升高的迹象*
private
int
warningSign
;
//气瓶粘贴警示标签和充装标签*
private
String
compliance
;
//液化气瓶充装量符合有关规定,充装后逐瓶称重
private
String
inspector
;
//检查人员姓名*
private
String
inspectionDate
;
//检查时间*
private
String
checkResults
;
private
String
nonconformances
;
/**
* 对接文档已发布字段,需要将此字段赋值给系统数据库中的字段:abnormalTemperature
*/
private
int
abnormaLTemperature
;
public
int
getAbnormaLTemperature
()
{
return
abnormalTemperature
;
}
public
void
setAbnormaLTemperature
(
int
abnormaLTemperature
)
{
this
.
abnormalTemperature
=
abnormaLTemperature
;
}
public
int
getAbnormalTemperature
()
{
return
abnormalTemperature
;
}
public
void
setAbnormalTemperature
(
int
abnormalTemperature
)
{
this
.
abnormalTemperature
=
abnormalTemperature
;
}
@ApiModelProperty
(
value
=
"检查时间"
)
private
Date
inspectionDate
;
@ApiModelProperty
(
value
=
"瓶体未出现鼓包变形或泄漏等严重缺陷"
)
private
String
isNoBulgingOrLeakage
;
@ApiModelProperty
(
value
=
"瓶内压力正常"
)
private
String
isPressureNormal
;
@ApiModelProperty
(
value
=
"瓶体温度没有异常升高的迹象"
)
private
String
isTemperatureNormal
;
@ApiModelProperty
(
value
=
"瓶阀及其与瓶口连接的密封良好"
)
private
String
valveSealIsGood
;
@ApiModelProperty
(
value
=
"气瓶粘贴警示标签和充装标签)"
)
private
String
hasWarningAndFillingLabels
;
@ApiModelProperty
(
value
=
"充装量复秤未超重"
)
private
String
reweighedWithinLimit
;
@ApiModelProperty
(
value
=
"瓶内压力(充装量)及质量符合安全技术规范及相关标准的要求"
)
private
String
pressureAndMassMeetRegulations
;
@ApiModelProperty
(
value
=
"瓶帽、充装标签、警示标签完整"
)
private
String
capsAndLabelsAreIntact
;
@ApiModelProperty
(
value
=
"瓶阀出气口螺纹及其密封面良好"
)
private
String
valveSealedWell
;
@ApiModelProperty
(
value
=
"静置后压力符合规定"
)
private
String
pressureAfterRestingComplies
;
@ApiModelProperty
(
value
=
"气瓶未发生泄漏等问题"
)
private
String
noLeakageIssuesDetected
;
@ApiModelProperty
(
value
=
"处理结果是否合格"
)
private
String
isTreatmentResultQualified
;
@ApiModelProperty
(
value
=
"充装量(压力或质量)符合要求"
)
private
String
fillingAmountMeetsRequirement
;
@ApiModelProperty
(
value
=
"密封良好无泄漏"
)
private
String
sealsIntactNoLeakage
;
@ApiModelProperty
(
value
=
"气瓶无变形等缺陷"
)
private
String
noDeformationOrDefects
;
@ApiModelProperty
(
value
=
"瓶体温升无异常"
)
private
String
temperatureRiseNormal
;
@ApiModelProperty
(
value
=
"气瓶附件完整齐全"
)
private
String
cylinderAccessoriesComplete
;
@ApiModelProperty
(
value
=
"阀门已关闭,管路及各附件无漏气"
)
private
String
valveClosedNoLeakageInPipingAndAccessories
;
@ApiModelProperty
(
value
=
"气瓶外观无结霜、结露"
)
private
String
noFrostOrCondensationOnCylinder
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/model/TmCylinderFillingModel.java
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
model
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
TmCylinderFillingModel
extends
AbstractBaseModel
{
/**
*
*/
public
class
TmCylinderFillingModel
extends
CylinderAbstractBaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
sequenceCode
;
//气瓶唯一标识码*
private
String
fillingUnitName
;
//充装企业名称*
private
String
inspectorUser
;
//检查人员姓名*
private
String
inspectionDate
;
//检查时间*
private
String
creditCode
;
//统一社会信用代码
private
String
isValid
;
//是否在检验有效期以内,严禁充装超期未检气瓶、非法改装或翻新及报废气瓶
private
int
same
;
//警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致*
private
int
isRegulations
;
//气瓶外表面的颜色标志是否符合规定*
@JSONField
(
name
=
"isComplianceWithGBT"
)
private
int
isComplianceWithgbt
;
//气瓶瓶阀的出气口螺纹型式是否符合GB/T15383的规定,即可燃气体用的瓶阀,出口螺纹应是内螺纹(左旋)*
private
int
haveStillPressure
;
//气瓶内有无剩余压力*
private
int
isComplete
;
//气瓶外表面有无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷*
private
int
haveSecurityDocuments
;
//气瓶的安全附件齐全并符合安全要求
private
String
fillBeforeItem
;
// 新投入使用气瓶或经检验后首次投入使用气瓶,充装前应按照规定先置换瓶内空气,并经分析合格后方可充气
private
String
checkResults
;
//检查结果
private
String
nonconformances
;
//不合格项
/**
* 充装前检查id
*/
private
String
fillingBeforeId
;
@ApiModelProperty
(
value
=
"检查时间"
)
private
Date
inspectionDate
;
@ApiModelProperty
(
value
=
"车牌号码"
)
private
String
carNumber
;
@ApiModelProperty
(
value
=
"充装气体与气瓶允许充装气体一致"
)
private
String
isCylinderGasConsistent
;
@ApiModelProperty
(
value
=
"充装介质"
)
private
String
fillingMedium
;
@ApiModelProperty
(
value
=
"气瓶外表面有划伤、裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷"
)
private
String
hasSevereExternalDamage
;
@ApiModelProperty
(
value
=
"气瓶内有剩余压力"
)
private
String
hasResidualPressure
;
@ApiModelProperty
(
value
=
"无气体泄漏"
)
private
String
isGasLeak
;
@ApiModelProperty
(
value
=
"气瓶附件齐全并符合安全要求"
)
private
String
areAccessoriesCompleteAndSafe
;
@ApiModelProperty
(
value
=
"排除超期未检气瓶、非法改装或翻新及报废气瓶"
)
private
String
excludeOverdueRefurbishedScrappedCylinders
;
@ApiModelProperty
(
value
=
"警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致"
)
private
String
isWarningLabelGasNameConsistentWithStamp
;
@ApiModelProperty
(
value
=
"气瓶外表面的颜色标志是否符合规定"
)
private
String
isColorMarkingCompliant
;
@ApiModelProperty
(
value
=
"瓶阀符合GB7512规定"
)
@JSONField
(
name
=
"valveCompliesGB7512"
)
private
String
valveCompliesGB7512
;
@ApiModelProperty
(
value
=
"气瓶外表面无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷"
)
private
String
hasNoSevereExternalDamage
;
@ApiModelProperty
(
value
=
"新投入使用气瓶或经检验后首次投入使用气瓶,充装前按照规定先置换瓶内空气,并经分析合格后方可充气"
)
private
String
isNewOrInspectedOk
;
@ApiModelProperty
(
value
=
"充装介质与气瓶钢印标志气体名称是否一致"
)
private
String
isFillingMediumConsistentWithStamp
;
@ApiModelProperty
(
value
=
"气瓶瓶阀的出气口螺纹型式是符合GB/T15383的规定"
)
@JSONField
(
name
=
"outletThreadTypeCompliesGB15383"
)
private
String
outletThreadTypeCompliesGB15383
;
@ApiModelProperty
(
value
=
"充装可燃、氧化性气体,如无余压保持阀,重复充装前应先进行抽真空处理"
)
private
String
isVacuumProcessed
;
@ApiModelProperty
(
value
=
"气瓶外表面无严重腐蚀"
)
private
String
hasNoSevereCorrosion
;
@ApiModelProperty
(
value
=
"气瓶外表面无损伤缺陷"
)
private
String
hasNoSurfaceDefects
;
@ApiModelProperty
(
value
=
"气瓶外表面的颜色标志符合GB/T7144的规定、且清晰易认"
)
@JSONField
(
name
=
"colorMeetsGB7144"
)
private
String
colorMeetsGB7144
;
@ApiModelProperty
(
value
=
"气瓶外表面无裂纹"
)
private
String
hasNoCracks
;
@ApiModelProperty
(
value
=
"气瓶外表面无明显变形"
)
private
String
hasNoObviousDeformation
;
@ApiModelProperty
(
value
=
"瓶体、瓶阀无沾染油脂或其他可燃物"
)
private
String
noOilOrFlammableSubstances
;
@ApiModelProperty
(
value
=
"瓶体无腐蚀、机械损伤等表面缺陷、是否满足GB13076标准报废"
)
@JSONField
(
name
=
"meetsGB13076AndMechanicalDamage"
)
private
String
meetsGB13076AndMechanicalDamage
;
@ApiModelProperty
(
value
=
"易熔合金无融熔、流失、损伤的"
)
private
String
fusiblePlugUndamaged
;
@ApiModelProperty
(
value
=
"钢印标记完整且能够识别"
)
private
String
stampMarkingsClearAndComplete
;
@ApiModelProperty
(
value
=
"附件完整且符合规定"
)
private
String
accessoriesCompleteAndConforming
;
@ApiModelProperty
(
value
=
"瓶阀侧接嘴处积无炭黑或焦油等异物"
)
private
String
noCarbonBlackOrTarAtValvePort
;
@ApiModelProperty
(
value
=
"瓶内的填料、溶剂的质量没有问题"
)
private
String
fillerAndSolventQualityOK
;
@ApiModelProperty
(
value
=
"无其他影响安全使用缺陷的"
)
private
String
noOtherSafetyAffectingDefects
;
@ApiModelProperty
(
value
=
"充装间温度"
)
private
Double
fillingRoomTemperature
;
@ApiModelProperty
(
value
=
"剩余压力"
)
private
Double
residualPressure
;
@ApiModelProperty
(
value
=
"丙酮补加量"
)
private
Double
acetoneSupplementAmount
;
@ApiModelProperty
(
value
=
"钢印、警示标签与待充介质名称一致"
)
private
String
isStampAndLabelConsistentWithMedium
;
@ApiModelProperty
(
value
=
"外表面颜色标志符合规定"
)
private
String
externalColorMarkingCompliant
;
@ApiModelProperty
(
value
=
"瓶阀出气口螺纹符合要求"
)
private
String
valveOutletThreadComplies
;
@ApiModelProperty
(
value
=
"外表面无严重损伤缺陷"
)
private
String
hasNoSevereSurfaceDefects
;
@ApiModelProperty
(
value
=
"气瓶附件符合要求"
)
private
String
cylinderAccessoriesMeetRequirements
;
@ApiModelProperty
(
value
=
"氧化性混合气体的瓶体、瓶阀未沾染油脂"
)
private
String
oxidizingGasCylinderFreeOfOil
;
@ApiModelProperty
(
value
=
"气瓶经预处理(抽真空、烘干、置换或组合)合格"
)
private
String
preTreatedSuccessfully
;
@ApiModelProperty
(
value
=
"气瓶表面无油污、无严重损伤"
)
private
String
surfaceFreeOfOilAndDamage
;
@ApiModelProperty
(
value
=
"瓶阀完好、接头洁净无水或冰"
)
private
String
valveInGoodConditionCleanConnection
;
@ApiModelProperty
(
value
=
"无余压的瓶用洁净的待充气体吹扫(易燃的先用液氮置换)"
)
private
String
emptyPressureCylinderPurgedWithCleanGas
;
@ApiModelProperty
(
value
=
"瓶阀出气口为内螺纹(左旋)"
)
private
String
valveOutletInternalThreadLeftHanded
;
@ApiModelProperty
(
value
=
"有余压的经定性鉴别且与待充介质一致"
)
private
String
qualitativeTestPassedForResidualGas
;
@ApiModelProperty
(
value
=
"无余压的经卸阀内检合格"
)
private
String
internalValveInspectionPassed
;
@ApiModelProperty
(
value
=
"气瓶安全附件齐全并符合安全要求"
)
private
String
safetyAccessoriesCompleteAndSafe
;
@ApiModelProperty
(
value
=
"首充气瓶已置换瓶内空气"
)
private
String
newCylinderAirReplacedBeforeFirstUse
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/model/TmCylinderFillingRecordModel.java
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
model
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
TmCylinderFillingRecordModel
extends
AbstractBaseModel
{
/**
*
*/
public
class
TmCylinderFillingRecordModel
extends
CylinderAbstractBaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
sequenceCode
;
//气瓶唯一标识码*
private
String
fillingRecordId
;
//充装记录Id*
private
String
fillingStartTime
;
//充装开始时间*
private
String
fillingEndTime
;
//充装结束时间*
private
String
fillingUser
;
//充装人员姓名*
private
double
fillingQuantity
;
//充装量(Kg)*
private
double
temperature
;
//室温*
private
int
abnormal
;
//异常情况*
private
String
inspectorName
;
// 检查人员姓名
private
String
fillingBeforeId
;
// 充装信息审核ID
private
String
fillingCheckId
;
// 充装后复查ID
private
String
fillingExamineId
;
// 充装信息审核ID
@ApiModelProperty
(
value
=
"充装枪编号"
)
private
String
gunNumber
;
@ApiModelProperty
(
value
=
"充装开始时间"
)
@TableField
(
"filling_start_time"
)
private
Date
fillingStartTime
;
@ApiModelProperty
(
value
=
"充装结束时间"
)
@TableField
(
"filling_end_time"
)
private
Date
fillingEndTime
;
@ApiModelProperty
(
value
=
"充装量m3/(kg)"
)
private
Double
fillingAmount
;
@ApiModelProperty
(
value
=
"压力"
)
private
Double
pressure
;
@ApiModelProperty
(
value
=
"室温"
)
private
Double
ambientTemperature
;
@ApiModelProperty
(
value
=
"异常情况"
)
private
String
abnormalConditions
;
@ApiModelProperty
(
value
=
"瓶体温度无异常升高"
)
private
String
isNoAbnormalTemperatureRise
;
@ApiModelProperty
(
value
=
"充装压力"
)
private
Double
fillingPressure
;
@ApiModelProperty
(
value
=
"瓶体温度一致"
)
private
String
temperatureConsistent
;
@ApiModelProperty
(
value
=
"瓶内无异常音响"
)
private
String
noAbnormalSoundInside
;
@ApiModelProperty
(
value
=
"瓶阀及各连接部位的密封良好"
)
private
String
valveSealedWell
;
@ApiModelProperty
(
value
=
"充装压力≤2.5 MPa"
)
private
String
fillingPressureLessThan
;
@ApiModelProperty
(
value
=
"乙炔充装量"
)
private
Double
acetyleneFillingAmount
;
@ApiModelProperty
(
value
=
"各组分含量"
)
private
Double
componentContents
;
@ApiModelProperty
(
value
=
"标称皮重"
)
private
Double
tareWeightNominal
;
@ApiModelProperty
(
value
=
"充装后质量"
)
private
Double
filledWeight
;
@ApiModelProperty
(
value
=
"实际充装量"
)
private
Double
actualFillingAmount
;
@ApiModelProperty
(
value
=
"含余气皮重"
)
private
Double
tareWeightIncludingResidualGas
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/orm/dao/ESCylinderFillingInfoRepository.java
0 → 100644
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
orm
.
dao
;
import
com.yeejoin.amos.boot.module.cylinder.api.entity.ESCylinderFillingInfoDto
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
ESCylinderFillingInfoRepository
extends
PagingAndSortingRepository
<
ESCylinderFillingInfoDto
,
Long
>
{
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/orm/dao/MidEquipRegistrationInfoMapper.java
View file @
fa1ac393
...
...
@@ -24,6 +24,7 @@ public interface MidEquipRegistrationInfoMapper extends BaseMapper<MidEquipRegis
"(SELECT concat ( fi.\"PRODUCE_UNIT_CREDIT_CODE\", '-', fi.\"FACTORY_NUM\" ) sequenceCode "
+
"FROM idx_biz_jg_factory_info fi, idx_biz_jg_other_info oi "
+
"WHERE oi.\"RECORD\" = fi.\"RECORD\" "
+
" AND oi.\"SUPERVISORY_CODE\" IS NOT NULL "
+
" AND oi.\"CLAIM_STATUS\" = '已认领' "
+
" AND fi.\"PRODUCE_UNIT_CREDIT_CODE\" IS NOT NULL "
+
" AND fi.\"FACTORY_NUM\" IS NOT NULL) WHERE sequenceCode in "
+
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/orm/entity/AbstractBaseEntity.java
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
orm
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
...
...
@@ -8,19 +8,25 @@ import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import
java.util.Date
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
abstract
class
AbstractBaseEntity
extends
BaseEntity
{
public
abstract
class
AbstractBaseEntity
extends
BaseEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@TableField
(
"sync_date"
)
protected
Date
syncDate
;
//同步时间 yyyy-MM-dd HH24:mi:ss
@TableField
(
"sync_state"
)
protected
int
syncState
;
//同步状态(0-新增 1-更新 2-删除)
/**
* 对接公司编码
*/
@TableField
(
"app_Id"
)
protected
String
appId
;
@ApiModelProperty
(
value
=
"同步时间 yyyy-MM-dd HH24:mi:ss"
)
private
Date
syncDate
;
@ApiModelProperty
(
value
=
"0-新增 1-更新 2-删除"
)
private
Integer
syncState
;
@ApiModelProperty
(
value
=
"对接公司编码"
)
private
String
appId
;
@ApiModelProperty
(
value
=
"数据完整度"
)
private
Double
integrity
;
@ApiModelProperty
(
value
=
"对接接口版本"
)
private
String
version
=
"v1"
;
@ApiModelProperty
(
value
=
"更新人员"
)
private
String
recUserName
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/orm/entity/CylinderAbstractBaseEntity.java
0 → 100644
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
orm
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
abstract
class
CylinderAbstractBaseEntity
extends
AbstractBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"气瓶唯一标识码,制造单位统一信用代码-出厂编号"
)
private
String
sequenceCode
;
@ApiModelProperty
(
value
=
"气瓶类型"
)
private
String
cylinderType
;
@ApiModelProperty
(
value
=
"充装前检查Id"
)
private
String
fillingBeforeId
;
@ApiModelProperty
(
value
=
"作业人员证书编号"
)
private
String
inspectorUserNum
;
@ApiModelProperty
(
value
=
"作业人员姓名"
)
private
String
inspectorUser
;
@ApiModelProperty
(
value
=
"充装企业名称"
)
private
String
fillingUnitName
;
@ApiModelProperty
(
value
=
"充装企业统一社会信用代码"
)
private
String
fillingUnitCreditCode
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/orm/entity/TmCylinderFilling.java
View file @
fa1ac393
...
...
@@ -2,10 +2,12 @@ package com.yeejoin.amos.api.openapi.face.orm.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 气瓶充装信息--充装前检查
* @author kinky
...
...
@@ -14,46 +16,154 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@TableName
(
"tm_cylinder_filling"
)
public
class
TmCylinderFilling
extends
AbstractBaseEntity
{
/**
*
*/
public
class
TmCylinderFilling
extends
CylinderAbstractBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@TableField
(
"credit_code"
)
private
String
creditCode
;
@TableField
(
"filling_unit_name"
)
private
String
fillingUnitName
;
//充装企业名称*
@TableField
(
"fill_before_item"
)
private
String
fillBeforeItem
;
@TableField
(
"sequence_code"
)
private
String
sequenceCode
;
//气瓶唯一标识码*
@TableField
(
"is_valid"
)
private
String
isValid
;
//是否在检验有效期以内,严禁充装超期未检气瓶、非法改装或翻新及报废气瓶
@TableField
(
"same"
)
private
int
same
;
//警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致*
@TableField
(
"is_regulations"
)
private
int
isRegulations
;
//气瓶外表面的颜色标志是否符合规定*
@TableField
(
"is_compliance_withGBT"
)
private
int
isComplianceWithGBT
;
//气瓶瓶阀的出气口螺纹型式是否符合GB/T15383的规定,即可燃气体用的瓶阀,出口螺纹应是内螺纹(左旋)*
@TableField
(
"have_still_pressure"
)
private
int
haveStillPressure
;
//气瓶内有无剩余压力*
@TableField
(
"is_complete"
)
private
int
isComplete
;
//气瓶外表面有无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷*
@TableField
(
"have_security_documents"
)
private
int
haveSecurityDocuments
;
//气瓶的安全附件齐全并符合安全要求
@TableField
(
"inspector_user"
)
private
String
inspectorUser
;
//检查人员姓名*
@TableField
(
"inspection_date"
)
private
String
inspectionDate
;
//检查时间*
@TableField
(
"nonconformances"
)
private
String
nonconformances
;
@TableField
(
"check_results"
)
private
String
checkResults
;
/**
* 充装前检查id
*/
@TableField
(
"filling_before_id"
)
private
String
fillingBeforeId
;
@ApiModelProperty
(
value
=
"对接接口版本"
)
protected
String
version
=
"v1"
;
@ApiModelProperty
(
value
=
"检查时间"
)
private
Date
inspectionDate
;
@ApiModelProperty
(
value
=
"车牌号码"
)
private
String
carNumber
;
@ApiModelProperty
(
value
=
"充装气体与气瓶允许充装气体一致"
)
private
String
isCylinderGasConsistent
;
@ApiModelProperty
(
value
=
"充装介质"
)
private
String
fillingMedium
;
@ApiModelProperty
(
value
=
"气瓶外表面有划伤、裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷"
)
private
String
hasSevereExternalDamage
;
@ApiModelProperty
(
value
=
"气瓶内有剩余压力"
)
private
String
hasResidualPressure
;
@ApiModelProperty
(
value
=
"无气体泄漏"
)
private
String
isGasLeak
;
@ApiModelProperty
(
value
=
"气瓶附件齐全并符合安全要求"
)
private
String
areAccessoriesCompleteAndSafe
;
@ApiModelProperty
(
value
=
"排除超期未检气瓶、非法改装或翻新及报废气瓶"
)
private
String
excludeOverdueRefurbishedScrappedCylinders
;
@ApiModelProperty
(
value
=
"警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致"
)
private
String
isWarningLabelGasNameConsistentWithStamp
;
@ApiModelProperty
(
value
=
"气瓶外表面的颜色标志是否符合规定"
)
private
String
isColorMarkingCompliant
;
@ApiModelProperty
(
value
=
"瓶阀符合GB7512规定"
)
@TableField
(
value
=
"valve_complies_gb7512"
)
private
String
valveCompliesGB7512
;
@ApiModelProperty
(
value
=
"气瓶外表面无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷"
)
private
String
hasNoSevereExternalDamage
;
@ApiModelProperty
(
value
=
"新投入使用气瓶或经检验后首次投入使用气瓶,充装前按照规定先置换瓶内空气,并经分析合格后方可充气"
)
private
String
isNewOrInspectedOk
;
@ApiModelProperty
(
value
=
"充装介质与气瓶钢印标志气体名称是否一致"
)
private
String
isFillingMediumConsistentWithStamp
;
@ApiModelProperty
(
value
=
"气瓶瓶阀的出气口螺纹型式是符合GB/T15383的规定"
)
@TableField
(
value
=
"outlet_thread_type_complies_gb15383"
)
private
String
outletThreadTypeCompliesGB15383
;
@ApiModelProperty
(
value
=
"充装可燃、氧化性气体,如无余压保持阀,重复充装前应先进行抽真空处理"
)
private
String
isVacuumProcessed
;
@ApiModelProperty
(
value
=
"气瓶外表面无严重腐蚀"
)
private
String
hasNoSevereCorrosion
;
@ApiModelProperty
(
value
=
"气瓶外表面无损伤缺陷"
)
private
String
hasNoSurfaceDefects
;
@ApiModelProperty
(
value
=
"气瓶外表面的颜色标志符合GB/T7144的规定、且清晰易认"
)
@TableField
(
value
=
"color_meets_gb7144"
)
private
String
colorMeetsGB7144
;
@ApiModelProperty
(
value
=
"气瓶外表面无裂纹"
)
private
String
hasNoCracks
;
@ApiModelProperty
(
value
=
"气瓶外表面无明显变形"
)
private
String
hasNoObviousDeformation
;
@ApiModelProperty
(
value
=
"瓶体、瓶阀无沾染油脂或其他可燃物"
)
private
String
noOilOrFlammableSubstances
;
@ApiModelProperty
(
value
=
"瓶体无腐蚀、机械损伤等表面缺陷、是否满足GB13076标准报废"
)
@TableField
(
value
=
"meets_gb13076_and_mechanical_damage"
)
private
String
meetsGB13076AndMechanicalDamage
;
@ApiModelProperty
(
value
=
"易熔合金无融熔、流失、损伤的"
)
private
String
fusiblePlugUndamaged
;
@ApiModelProperty
(
value
=
"钢印标记完整且能够识别"
)
private
String
stampMarkingsClearAndComplete
;
@ApiModelProperty
(
value
=
"附件完整且符合规定"
)
private
String
accessoriesCompleteAndConforming
;
@ApiModelProperty
(
value
=
"瓶阀侧接嘴处积无炭黑或焦油等异物"
)
private
String
noCarbonBlackOrTarAtValvePort
;
@ApiModelProperty
(
value
=
"瓶内的填料、溶剂的质量没有问题"
)
private
String
fillerAndSolventQualityOk
;
@ApiModelProperty
(
value
=
"无其他影响安全使用缺陷的"
)
private
String
noOtherSafetyAffectingDefects
;
@ApiModelProperty
(
value
=
"充装间温度"
)
private
Double
fillingRoomTemperature
;
@ApiModelProperty
(
value
=
"剩余压力"
)
private
Double
residualPressure
;
@ApiModelProperty
(
value
=
"丙酮补加量"
)
private
Double
acetoneSupplementAmount
;
@ApiModelProperty
(
value
=
"钢印、警示标签与待充介质名称一致"
)
private
String
isStampAndLabelConsistentWithMedium
;
@ApiModelProperty
(
value
=
"外表面颜色标志符合规定"
)
private
String
externalColorMarkingCompliant
;
@ApiModelProperty
(
value
=
"瓶阀出气口螺纹符合要求"
)
private
String
valveOutletThreadComplies
;
@ApiModelProperty
(
value
=
"外表面无严重损伤缺陷"
)
private
String
hasNoSevereSurfaceDefects
;
@ApiModelProperty
(
value
=
"气瓶附件符合要求"
)
private
String
cylinderAccessoriesMeetRequirements
;
@ApiModelProperty
(
value
=
"氧化性混合气体的瓶体、瓶阀未沾染油脂"
)
private
String
oxidizingGasCylinderFreeOfOil
;
@ApiModelProperty
(
value
=
"气瓶经预处理(抽真空、烘干、置换或组合)合格"
)
private
String
preTreatedSuccessfully
;
@ApiModelProperty
(
value
=
"气瓶表面无油污、无严重损伤"
)
private
String
surfaceFreeOfOilAndDamage
;
@ApiModelProperty
(
value
=
"瓶阀完好、接头洁净无水或冰"
)
private
String
valveInGoodConditionCleanConnection
;
@ApiModelProperty
(
value
=
"无余压的瓶用洁净的待充气体吹扫(易燃的先用液氮置换)"
)
private
String
emptyPressureCylinderPurgedWithCleanGas
;
@ApiModelProperty
(
value
=
"瓶阀出气口为内螺纹(左旋)"
)
private
String
valveOutletInternalThreadLeftHanded
;
@ApiModelProperty
(
value
=
"有余压的经定性鉴别且与待充介质一致"
)
private
String
qualitativeTestPassedForResidualGas
;
@ApiModelProperty
(
value
=
"无余压的经卸阀内检合格"
)
private
String
internalValveInspectionPassed
;
@ApiModelProperty
(
value
=
"气瓶安全附件齐全并符合安全要求"
)
private
String
safetyAccessoriesCompleteAndSafe
;
@ApiModelProperty
(
value
=
"首充气瓶已置换瓶内空气"
)
private
String
newCylinderAirReplacedBeforeFirstUse
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/orm/entity/TmCylinderFillingCheck.java
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
orm
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
*
液化气体
气瓶充装信息-充装后复查
* 气瓶充装信息-充装后复查
* @author kinky
*
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@TableName
(
"tm_cylinder_filling_check"
)
public
class
TmCylinderFillingCheck
extends
AbstractBaseEntity
{
/**
*
*/
public
class
TmCylinderFillingCheck
extends
CylinderAbstractBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@TableField
(
"sequence_code"
)
private
String
sequenceCode
;
//气瓶唯一标识码*
@TableField
(
"filling_check_id"
)
private
String
fillingCheckId
;
//充装后复查ID
@TableField
(
"within_scope"
)
private
int
withinScope
;
//充装量在规定范围内*
@TableField
(
"sealed_state"
)
private
int
sealedState
;
//瓶阀及其与瓶口连接的密封良好*
@TableField
(
"defective"
)
private
int
defective
;
//瓶体未出现鼓包变形或泄露等严重缺陷*
@TableField
(
"abnormal_temperature"
)
private
int
abnormalTemperature
;
//瓶体温度没有异常升高的迹象*
@TableField
(
"warning_sign"
)
private
int
warningSign
;
//气瓶粘贴警示标签和充装标签*
@TableField
(
"compliance"
)
private
String
compliance
;
//液化气瓶充装量符合有关规定,充装后逐瓶称重
@TableField
(
"inspector"
)
private
String
inspector
;
//检查人员姓名*
@TableField
(
"inspection_date"
)
private
String
inspectionDate
;
//检查时间*
@TableField
(
"check_results"
)
private
String
checkResults
;
@TableField
(
"nonconformances"
)
private
String
nonconformances
;
@ApiModelProperty
(
value
=
"对接接口版本"
)
protected
String
version
=
"v1"
;
@ApiModelProperty
(
value
=
"检查时间"
)
private
Date
inspectionDate
;
@ApiModelProperty
(
value
=
"瓶体未出现鼓包变形或泄漏等严重缺陷"
)
private
String
isNoBulgingOrLeakage
;
@ApiModelProperty
(
value
=
"瓶内压力正常"
)
private
String
isPressureNormal
;
@ApiModelProperty
(
value
=
"瓶体温度没有异常升高的迹象"
)
private
String
isTemperatureNormal
;
@ApiModelProperty
(
value
=
"瓶阀及其与瓶口连接的密封良好"
)
private
String
valveSealIsGood
;
@ApiModelProperty
(
value
=
"气瓶粘贴警示标签和充装标签)"
)
private
String
hasWarningAndFillingLabels
;
@ApiModelProperty
(
value
=
"充装量复秤未超重"
)
private
String
reweighedWithinLimit
;
@ApiModelProperty
(
value
=
"瓶内压力(充装量)及质量符合安全技术规范及相关标准的要求"
)
private
String
pressureAndMassMeetRegulations
;
@ApiModelProperty
(
value
=
"瓶帽、充装标签、警示标签完整"
)
private
String
capsAndLabelsAreIntact
;
@ApiModelProperty
(
value
=
"瓶阀出气口螺纹及其密封面良好"
)
private
String
valveSealedWell
;
@ApiModelProperty
(
value
=
"静置后压力符合规定"
)
private
String
pressureAfterRestingComplies
;
@ApiModelProperty
(
value
=
"气瓶未发生泄漏等问题"
)
private
String
noLeakageIssuesDetected
;
@ApiModelProperty
(
value
=
"处理结果是否合格"
)
private
String
isTreatmentResultQualified
;
@ApiModelProperty
(
value
=
"充装量(压力或质量)符合要求"
)
private
String
fillingAmountMeetsRequirement
;
@ApiModelProperty
(
value
=
"密封良好无泄漏"
)
private
String
sealsIntactNoLeakage
;
@ApiModelProperty
(
value
=
"气瓶无变形等缺陷"
)
private
String
noDeformationOrDefects
;
@ApiModelProperty
(
value
=
"瓶体温升无异常"
)
private
String
temperatureRiseNormal
;
@ApiModelProperty
(
value
=
"气瓶附件完整齐全"
)
private
String
cylinderAccessoriesComplete
;
@ApiModelProperty
(
value
=
"阀门已关闭,管路及各附件无漏气"
)
private
String
valveClosedNoLeakageInPipingAndAccessories
;
@ApiModelProperty
(
value
=
"气瓶外观无结霜、结露"
)
private
String
noFrostOrCondensationOnCylinder
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/orm/entity/TmCylinderFillingRecord.java
View file @
fa1ac393
...
...
@@ -2,47 +2,79 @@ package com.yeejoin.amos.api.openapi.face.orm.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 液化气体气瓶充装信息-充装记录
* @author kinky
*
* @author kinky
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@TableName
(
"tm_cylinder_filling_record"
)
public
class
TmCylinderFillingRecord
extends
AbstractBaseEntity
{
/**
*
*/
public
class
TmCylinderFillingRecord
extends
CylinderAbstractBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@TableField
(
"sequence_code"
)
private
String
sequenceCode
;
//气瓶唯一标识码*
@TableField
(
"filling_record_id"
)
private
String
fillingRecordId
;
//充装记录Id*
@TableField
(
"filling_starttime"
)
private
String
fillingStartTime
;
//充装开始时间*
@TableField
(
"filling_endtime"
)
private
String
fillingEndTime
;
//充装结束时间*
@TableField
(
"filling_user"
)
private
String
fillingUser
;
//充装人员姓名*
@TableField
(
"filling_quantity"
)
private
double
fillingQuantity
;
//充装量(Kg)*
@TableField
(
"temperature"
)
private
double
temperature
;
//室温*
@TableField
(
"abnormal"
)
private
int
abnormal
;
//异常情况*
@TableField
(
"inspector_name"
)
private
String
inspectorName
;
@TableField
(
"filling_before_id"
)
private
String
fillingBeforeId
;
@TableField
(
"filling_check_id"
)
private
String
fillingCheckId
;
@TableField
(
"filling_examine_id"
)
private
String
fillingExamineId
;
@ApiModelProperty
(
value
=
"对接接口版本"
)
protected
String
version
=
"v1"
;
@ApiModelProperty
(
value
=
"充装枪编号"
)
private
String
gunNumber
;
@ApiModelProperty
(
value
=
"充装开始时间"
)
@TableField
(
"filling_start_time"
)
private
Date
fillingStartTime
;
@ApiModelProperty
(
value
=
"充装结束时间"
)
@TableField
(
"filling_end_time"
)
private
Date
fillingEndTime
;
@ApiModelProperty
(
value
=
"充装量m3/(kg)"
)
private
Double
fillingAmount
;
@ApiModelProperty
(
value
=
"压力"
)
private
Double
pressure
;
@ApiModelProperty
(
value
=
"室温"
)
private
Double
ambientTemperature
;
@ApiModelProperty
(
value
=
"异常情况"
)
private
String
abnormalConditions
;
@ApiModelProperty
(
value
=
"瓶体温度无异常升高"
)
private
String
isNoAbnormalTemperatureRise
;
@ApiModelProperty
(
value
=
"充装压力"
)
private
Double
fillingPressure
;
@ApiModelProperty
(
value
=
"瓶体温度一致"
)
private
String
temperatureConsistent
;
@ApiModelProperty
(
value
=
"瓶内无异常音响"
)
private
String
noAbnormalSoundInside
;
@ApiModelProperty
(
value
=
"瓶阀及各连接部位的密封良好"
)
private
String
valveSealedWell
;
@ApiModelProperty
(
value
=
"充装压力≤2.5 MPa"
)
private
String
fillingPressureLessThan
;
@ApiModelProperty
(
value
=
"乙炔充装量"
)
private
Double
acetyleneFillingAmount
;
@ApiModelProperty
(
value
=
"各组分含量"
)
private
Double
componentContents
;
@ApiModelProperty
(
value
=
"标称皮重"
)
private
Double
tareWeightNominal
;
@ApiModelProperty
(
value
=
"充装后质量"
)
private
Double
filledWeight
;
@ApiModelProperty
(
value
=
"实际充装量"
)
private
Double
actualFillingAmount
;
@ApiModelProperty
(
value
=
"含余气皮重"
)
private
Double
tareWeightIncludingResidualGas
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/CylinderDateInfoService.java
View file @
fa1ac393
...
...
@@ -7,21 +7,10 @@ import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import
com.yeejoin.amos.api.openapi.face.model.CylinderDateInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.CylinderTableModel
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderDateInfoMapper
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderDateInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFilling
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingCheck
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingExamine
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingRecord
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderInspection
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderTags
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderUnit
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.OpenapiBizToken
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -415,7 +404,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
@Scheduled
(
cron
=
"0 0 2 * * ?"
)
//每天凌晨两点执行
//
@Scheduled(cron = "0 0 2 * * ?") //每天凌晨两点执行
public
void
fixedDelayJob
(){
// 每天更新或者添加昨天的数据
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/CylinderFillingDataValidationService.java
View file @
fa1ac393
...
...
@@ -2,10 +2,12 @@ package com.yeejoin.amos.api.openapi.face.service;
import
cn.hutool.core.collection.ConcurrentHashSet
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.api.openapi.enums.*
;
import
com.yeejoin.amos.api.openapi.face.model.*
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipRegistrationInfoMapper
;
import
com.yeejoin.amos.boot.module.cylinder.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.cylinder.api.entity.CylinderFillingMessageEntity
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONNull
;
import
net.sf.json.JSONObject
;
...
...
@@ -31,23 +33,29 @@ public class CylinderFillingDataValidationService {
@Autowired
MidEquipRegistrationInfoMapper
registrationInfoMapper
;
@Autowired
TmCylinderInfoService
cylinderInfoService
;
@Autowired
TmCylinderFillingMessageService
cylinderFillingMessageService
;
/**
* 企业信息校验
*
* @param unitData
*/
public
void
validateCylinderUnit
(
List
<
TmCylinderUnitModel
>
unitData
)
{
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
unitData
);
// 1.必填校验
List
<
String
>
errorRows
=
validateRequired
(
CylinderUnitFieldEnum
.
getAllRequireKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"必填字段不能为空:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
}
// 2.本次上传数据唯一性校验
errorRows
=
validateUnique
(
CylinderUnitFieldEnum
.
getAllUniqueKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
}
//
JSONArray jsonArray = JSONArray.fromObject(unitData);
//
// 1.必填校验
//
List<String> errorRows = validateRequired(CylinderUnitFieldEnum.getAllRequireKeys(), jsonArray);
//
if (!ObjectUtils.isEmpty(errorRows)) {
//
throw new BadRequest(JSONArray.fromObject( errorRows.stream().map(e -> "必填字段不能为空:" + e).collect(Collectors.toList())).toString());
//
}
//
// 2.本次上传数据唯一性校验
// errorRows = validateUnique(CylinderUnitFieldEnum.getAllUniqueKeys(), jsonArray, errorCylinderSet
);
//
if (!ObjectUtils.isEmpty(errorRows)) {
//
throw new BadRequest(JSONArray.fromObject( errorRows.stream().map(e -> "上传数据重复:" + e).collect(Collectors.toList())).toString());
//
}
// // 3.检查企业统一社会信用代码是否存在
// Set<String> creditCodes = getAllData(FillingBeforeFieldEnum.creditCode.name(), jsonArray);
// errorRows = getNotExistEnterpriseInfoByCreditCode(creditCodes);
...
...
@@ -63,17 +71,17 @@ public class CylinderFillingDataValidationService {
* @param infoData
*/
public
void
validateCylinderInfo
(
List
<
TmCylinderInfoModel
>
infoData
)
{
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
infoData
);
// 1.必填校验
List
<
String
>
errorRows
=
validateRequired
(
CylinderInfoFieldEnum
.
getAllRequireKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"必填字段不能为空:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
}
// 2.本次上传数据唯一性校验
errorRows
=
validateUnique
(
CylinderInfoFieldEnum
.
getAllUniqueKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
}
//
JSONArray jsonArray = JSONArray.fromObject(infoData);
//
// 1.必填校验
//
List<String> errorRows = validateRequired(CylinderInfoFieldEnum.getAllRequireKeys(), jsonArray);
//
if (!ObjectUtils.isEmpty(errorRows)) {
//
throw new BadRequest(JSONArray.fromObject( errorRows.stream().map(e -> "必填字段不能为空:" + e).collect(Collectors.toList())).toString());
//
}
//
// 2.本次上传数据唯一性校验
// errorRows = validateUnique(CylinderInfoFieldEnum.getAllUniqueKeys(), jsonArray, errorCylinderSet
);
//
if (!ObjectUtils.isEmpty(errorRows)) {
//
throw new BadRequest(JSONArray.fromObject( errorRows.stream().map(e -> "上传数据重复:" + e).collect(Collectors.toList())).toString());
//
}
// // 3.检查气瓶唯一标识码是否存在
// Set<String> sequenceCodes = getAllData(FillingBeforeFieldEnum.sequenceCode.name(), jsonArray);
// errorRows = getNotExistSequenceCodes(sequenceCodes);
...
...
@@ -94,18 +102,18 @@ public class CylinderFillingDataValidationService {
* @param tagData
*/
public
void
validateCylinderTag
(
List
<
TmCylinderTagsModel
>
tagData
)
{
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
tagData
);
// 1.必填校验
List
<
String
>
errorRows
=
validateRequired
(
CylinderTagFieldEnum
.
getAllRequireKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"必填字段不能为空:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
}
// 2.本次上传数据唯一性校验
errorRows
=
validateUnique
(
CylinderTagFieldEnum
.
getAllUniqueKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
}
//
JSONArray jsonArray = JSONArray.fromObject(tagData);
//
// 1.必填校验
//
List<String> errorRows = validateRequired(CylinderTagFieldEnum.getAllRequireKeys(), jsonArray);
//
if (!ObjectUtils.isEmpty(errorRows)) {
//
throw new BadRequest(JSONArray.fromObject( errorRows.stream().map(e -> "必填字段不能为空:" + e).collect(Collectors.toList())).toString());
//
}
//
//
// 2.本次上传数据唯一性校验
// errorRows = validateUnique(CylinderTagFieldEnum.getAllUniqueKeys(), jsonArray, errorCylinderSet
);
//
if (!ObjectUtils.isEmpty(errorRows)) {
//
throw new BadRequest(JSONArray.fromObject( errorRows.stream().map(e -> "上传数据重复:" + e).collect(Collectors.toList())).toString());
//
}
// 3.检查气瓶唯一标识码是否存在
// Set<String> sequenceCodes = getAllData(FillingBeforeFieldEnum.sequenceCode.name(), jsonArray);
// errorRows = getNotExistSequenceCodes(sequenceCodes);
...
...
@@ -120,18 +128,18 @@ public class CylinderFillingDataValidationService {
* @param inspectionData
*/
public
void
validateCylinderInspection
(
List
<
TmCylinderInspectionModel
>
inspectionData
)
{
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
inspectionData
);
// 1.必填校验
List
<
String
>
errorRows
=
validateRequired
(
CylinderInspectionFieldEnum
.
getAllRequireKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"必填字段不能为空:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
}
// 2.本次上传数据唯一性校验
errorRows
=
validateUnique
(
CylinderInspectionFieldEnum
.
getAllUniqueKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
}
//
JSONArray jsonArray = JSONArray.fromObject(inspectionData);
//
// 1.必填校验
//
List<String> errorRows = validateRequired(CylinderInspectionFieldEnum.getAllRequireKeys(), jsonArray);
//
if (!ObjectUtils.isEmpty(errorRows)) {
//
throw new BadRequest(JSONArray.fromObject( errorRows.stream().map(e -> "必填字段不能为空:" + e).collect(Collectors.toList())).toString());
//
}
//
//
// 2.本次上传数据唯一性校验
// errorRows = validateUnique(CylinderInspectionFieldEnum.getAllUniqueKeys(), jsonArray, errorCylinderSet
);
//
if (!ObjectUtils.isEmpty(errorRows)) {
//
throw new BadRequest(JSONArray.fromObject( errorRows.stream().map(e -> "上传数据重复:" + e).collect(Collectors.toList())).toString());
//
}
// 3.检查气瓶唯一标识码是否存在
// Set<String> sequenceCodes = getAllData(FillingBeforeFieldEnum.sequenceCode.name(), jsonArray);
// errorRows = getNotExistSequenceCodes(sequenceCodes);
...
...
@@ -147,18 +155,18 @@ public class CylinderFillingDataValidationService {
* @param inspectionData
*/
public
void
validateCylinderFillingExamineModel
(
List
<
TmCylinderFillingExamineModel
>
inspectionData
)
{
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
inspectionData
);
// 1.必填校验
List
<
String
>
errorRows
=
validateRequired
(
CylinderFillingAuditFieldEnum
.
getAllRequireKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"必填字段不能为空:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
}
// 2.本次上传数据唯一性校验
errorRows
=
validateUnique
(
CylinderFillingAuditFieldEnum
.
getAllUniqueKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
}
//
JSONArray jsonArray = JSONArray.fromObject(inspectionData);
//
// 1.必填校验
//
List<String> errorRows = validateRequired(CylinderFillingAuditFieldEnum.getAllRequireKeys(), jsonArray);
//
if (!ObjectUtils.isEmpty(errorRows)) {
//
throw new BadRequest(JSONArray.fromObject( errorRows.stream().map(e -> "必填字段不能为空:" + e).collect(Collectors.toList())).toString());
//
}
//
//
// 2.本次上传数据唯一性校验
// errorRows = validateUnique(CylinderFillingAuditFieldEnum.getAllUniqueKeys(), jsonArray, errorCylinderSet
);
//
if (!ObjectUtils.isEmpty(errorRows)) {
//
throw new BadRequest(JSONArray.fromObject( errorRows.stream().map(e -> "上传数据重复:" + e).collect(Collectors.toList())).toString());
//
}
// 3.检查气瓶唯一标识码是否存在
// Set<String> sequenceCodes = getAllData(FillingBeforeFieldEnum.sequenceCode.name(), jsonArray);
// errorRows = getNotExistSequenceCodes(sequenceCodes);
...
...
@@ -226,16 +234,13 @@ public class CylinderFillingDataValidationService {
return
validateFillingAfterData
(
fillingAfter
,
afterErrorCylinderSet
);
});
/**
* 等待校验结果
*/
// 等待校验结果
CompletableFuture
.
allOf
(
beforeFuture
,
recordFuture
,
afterFuture
);
result
.
setBeforeErrorData
(
beforeFuture
.
get
());
result
.
setRecordErrorData
(
recordFuture
.
get
());
result
.
setAfterErrorData
(
afterFuture
.
get
());
result
.
setCylinderNumber
(
cylinderCodeSet
.
size
());
result
.
setBeforeErrorCylinderNumber
(
beforeErrorCylinderSet
.
size
());
result
.
setRecordErrorCylinderNumber
(
recordErrorCylinderSet
.
size
());
result
.
setAfterErrorCylinderNumber
(
afterErrorCylinderSet
.
size
());
...
...
@@ -260,37 +265,12 @@ public class CylinderFillingDataValidationService {
* @return List 异常数据
*/
public
List
<
String
>
validateFillingBeforeData
(
JSONArray
jsonArray
,
Set
<
String
>
errorCylinderSet
)
{
List
<
String
>
errorRows
=
Lists
.
newArrayList
();
// 1.必填校验
List
<
String
>
errorRows
=
validateRequired
(
FillingBeforeFieldEnum
.
getAllRequireKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
errorRows
.
stream
().
forEach
(
json
->
{
String
sequenceCode
=
JSONObject
.
fromObject
(
json
).
getString
(
"sequenceCode"
);
errorCylinderSet
.
add
(
sequenceCode
);
});
return
errorRows
.
stream
().
map
(
e
->
"必填字段不能为空:"
+
e
).
collect
(
Collectors
.
toList
());
}
errorRows
.
addAll
(
validateRequiredByStage
(
CylinderField
.
FillStage
.
BEFORE
,
jsonArray
,
errorCylinderSet
));
// 2.本次上传数据唯一性校验
errorRows
=
validateUnique
(
FillingBeforeFieldEnum
.
getAllUniqueKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
errorRows
.
stream
().
forEach
(
json
->
{
String
sequenceCode
=
JSONObject
.
fromObject
(
json
).
getString
(
"sequenceCode"
);
errorCylinderSet
.
add
(
sequenceCode
);
});
return
errorRows
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
());
}
// // 3.检查气瓶唯一标识码是否存在
// Set<String> sequenceCodes = getAllData(FillingBeforeFieldEnum.sequenceCode.name(), jsonArray);
// errorRows = getNotExistSequenceCodes(sequenceCodes);
// if (!ObjectUtils.isEmpty(errorRows)) {
// return errorRows.stream().map(e -> "气瓶唯一标识码不存在:" + e).collect(Collectors.toList());
// }
// // 4.检查企业统一社会信用代码是否存在
// Set<String> creditCodes = getAllData(FillingBeforeFieldEnum.creditCode.name(), jsonArray);
// errorRows = getNotExistEnterpriseInfoByCreditCode(creditCodes);
// if (!ObjectUtils.isEmpty(errorRows)) {
// return errorRows.stream().map(e -> "企业统一社会信用代码不存在:" + e).collect(Collectors.toList());
// }
return
null
;
errorRows
.
addAll
(
validateUniqueByStage
(
CylinderField
.
FillStage
.
BEFORE
,
jsonArray
,
errorCylinderSet
));
return
errorRows
;
}
/**
...
...
@@ -299,37 +279,12 @@ public class CylinderFillingDataValidationService {
* @return List 异常数据
*/
public
List
<
String
>
validateFillingRecordData
(
JSONArray
jsonArray
,
Set
<
String
>
errorCylinderSet
)
{
List
<
String
>
errorRows
=
Lists
.
newArrayList
();
// 1.必填校验
List
<
String
>
errorRows
=
validateRequired
(
FillingRecordFieldEnum
.
getAllRequireKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
errorRows
.
stream
().
forEach
(
json
->
{
String
sequenceCode
=
JSONObject
.
fromObject
(
json
).
getString
(
"sequenceCode"
);
errorCylinderSet
.
add
(
sequenceCode
);
});
return
errorRows
.
stream
().
map
(
e
->
"必填字段不能为空::"
+
e
).
collect
(
Collectors
.
toList
());
}
errorRows
.
addAll
(
validateRequiredByStage
(
CylinderField
.
FillStage
.
FILLING
,
jsonArray
,
errorCylinderSet
));
// 2.本次上传数据唯一性校验
errorRows
=
validateUnique
(
FillingRecordFieldEnum
.
getAllUniqueKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
errorRows
.
stream
().
forEach
(
json
->
{
String
sequenceCode
=
JSONObject
.
fromObject
(
json
).
getString
(
"sequenceCode"
);
errorCylinderSet
.
add
(
sequenceCode
);
});
return
errorRows
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
());
}
// // 3.检查气瓶唯一标识码是否存在
// Set<String> sequenceCodes = getAllData(FillingBeforeFieldEnum.sequenceCode.name(), jsonArray);
// errorRows = getNotExistSequenceCodes(sequenceCodes);
// if (!ObjectUtils.isEmpty(errorRows)) {
// return errorRows.stream().map(e -> "气瓶唯一标识码不存在:" + e).collect(Collectors.toList());
// }
// // 4.检查企业统一社会信用代码是否存在
// Set<String> creditCodes = getAllData(FillingBeforeFieldEnum.creditCode.name(), jsonArray);
// errorRows = getNotExistEnterpriseInfoByCreditCode(creditCodes);
// if (!ObjectUtils.isEmpty(errorRows)) {
// return errorRows.stream().map(e -> "企业统一社会信用代码不存在:" + e).collect(Collectors.toList());
// }
return
null
;
errorRows
.
addAll
(
validateUniqueByStage
(
CylinderField
.
FillStage
.
FILLING
,
jsonArray
,
errorCylinderSet
));
return
errorRows
;
}
/**
...
...
@@ -338,38 +293,80 @@ public class CylinderFillingDataValidationService {
* @return List 异常数据
*/
public
List
<
String
>
validateFillingAfterData
(
JSONArray
jsonArray
,
Set
<
String
>
errorCylinderSet
)
{
List
<
String
>
errorRows
=
Lists
.
newArrayList
();
// 1.必填校验
List
<
String
>
errorRows
=
validateRequired
(
FillingAfterFieldEnum
.
getAllRequireKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
errorRows
.
stream
().
forEach
(
json
->
{
errorRows
.
addAll
(
validateRequiredByStage
(
CylinderField
.
FillStage
.
AFTER
,
jsonArray
,
errorCylinderSet
));
// 2.本次上传数据唯一性校验
errorRows
.
addAll
(
validateUniqueByStage
(
CylinderField
.
FillStage
.
AFTER
,
jsonArray
,
errorCylinderSet
));
return
errorRows
;
}
/**
* 必填校验
* @param jsonArray 被校验数据
* @param errorCylinderSet 错误气瓶集合
* @return 校验结果 通过为 true,不通过为false
*/
public
List
<
String
>
validateRequiredByStage
(
CylinderField
.
FillStage
stage
,
JSONArray
jsonArray
,
Set
<
String
>
errorCylinderSet
)
{
List
<
String
>
errorList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
row
=
jsonArray
.
getJSONObject
(
i
);
CylinderType
type
=
CylinderType
.
getByCode
(
row
.
getString
(
"cylinderType"
));
List
<
String
>
keys
=
CylinderTypeFieldValidation
.
getRequiredFieldsForType
(
type
,
stage
.
getCode
());
for
(
String
key
:
keys
)
{
if
(!
row
.
containsKey
(
key
)
||
ObjectUtils
.
isEmpty
(
row
.
get
(
key
))
||
row
.
get
(
key
).
equals
(
JSONNull
.
getInstance
()))
{
errorList
.
add
(
row
.
toString
());
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
errorList
))
{
errorList
.
forEach
(
json
->
{
String
sequenceCode
=
JSONObject
.
fromObject
(
json
).
getString
(
"sequenceCode"
);
errorCylinderSet
.
add
(
sequenceCode
);
});
return
errorRows
.
stream
().
map
(
e
->
"必填字段不能为空::"
+
e
).
collect
(
Collectors
.
toList
());
JSONObject
result
=
new
JSONObject
();
result
.
put
(
"result"
,
"必填字段不能为空"
);
return
errorList
.
stream
().
map
(
e
->
{
result
.
put
(
"errorData"
,
e
);
return
result
.
toString
();
}).
collect
(
Collectors
.
toList
());
}
// 2.本次上传数据唯一性校验
errorRows
=
validateUnique
(
FillingAfterFieldEnum
.
getAllUniqueKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
errorRows
.
stream
().
forEach
(
json
->
{
return
errorList
;
}
/**
* 数据唯一性校验
*
* @param jsonArray 被校验数据
* @param errorCylinderSet 错误气瓶集合
* @return 校验结果 通过为 true,不通过为false
*/
public
List
<
String
>
validateUniqueByStage
(
CylinderField
.
FillStage
stage
,
JSONArray
jsonArray
,
Set
<
String
>
errorCylinderSet
)
{
Map
<
String
,
Set
<
Object
>>
valuesMap
=
new
HashMap
<>();
List
<
String
>
errorList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
row
=
jsonArray
.
getJSONObject
(
i
);
CylinderType
type
=
CylinderType
.
getByCode
(
row
.
getString
(
"cylinderType"
));
List
<
String
>
keys
=
CylinderTypeFieldValidation
.
getUniqueFieldsForType
(
type
,
stage
.
getCode
());
for
(
String
key
:
keys
)
{
if
(!
valuesMap
.
containsKey
(
key
))
{
valuesMap
.
put
(
key
,
new
HashSet
<>());
}
if
(
valuesMap
.
get
(
key
).
contains
(
row
.
get
(
key
)))
{
errorList
.
add
(
row
.
toString
());
}
valuesMap
.
get
(
key
).
add
(
row
.
get
(
key
));
}
}
if
(!
ObjectUtils
.
isEmpty
(
errorList
))
{
errorList
.
forEach
(
json
->
{
String
sequenceCode
=
JSONObject
.
fromObject
(
json
).
getString
(
"sequenceCode"
);
errorCylinderSet
.
add
(
sequenceCode
);
});
return
error
Rows
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
());
return
error
List
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
());
}
// // 3.检查气瓶唯一标识码是否存在
// Set<String> sequenceCodes = getAllData(FillingBeforeFieldEnum.sequenceCode.name(), jsonArray);
// errorRows = getNotExistSequenceCodes(sequenceCodes);
// if (!ObjectUtils.isEmpty(errorRows)) {
// return errorRows.stream().map(e -> "气瓶唯一标识码不存在:" + e).collect(Collectors.toList());
// }
// // 4.检查企业统一社会信用代码是否存在
// Set<String> creditCodes = getAllData(FillingBeforeFieldEnum.creditCode.name(), jsonArray);
// errorRows = getNotExistEnterpriseInfoByCreditCode(creditCodes);
// if (!ObjectUtils.isEmpty(errorRows)) {
// return errorRows.stream().map(e -> "企业统一社会信用代码不存在:" + e).collect(Collectors.toList());
// }
return
null
;
return
errorList
;
}
/**
...
...
@@ -389,11 +386,16 @@ public class CylinderFillingDataValidationService {
}
}
if
(!
ObjectUtils
.
isEmpty
(
errorList
))
{
return
errorList
.
stream
().
map
(
e
->
"必填字段不能为空:"
+
e
).
collect
(
Collectors
.
toList
());
}
return
errorList
;
}
/**
* 数据唯一性校验
*
* @param keys 需要校验的key
* @param jsonArray 被校验数据
* @return 校验结果 通过为 true,不通过为false
...
...
@@ -414,6 +416,10 @@ public class CylinderFillingDataValidationService {
}
}
if
(!
ObjectUtils
.
isEmpty
(
errorList
))
{
return
errorList
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
());
}
return
errorList
;
}
...
...
@@ -465,22 +471,23 @@ public class CylinderFillingDataValidationService {
* @param offloadingData 卸液量数据
*/
public
void
validateCylinderOffloadingData
(
List
<
TmCylinderOffloadingModel
>
offloadingData
)
{
CylinderFillingMessageEntity
logMessage
=
new
CylinderFillingMessageEntity
();
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
offloadingData
);
// 1.必填校验
List
<
String
>
errorRows
=
validateRequired
(
CylinderOffloadingFieldEnum
.
getAllRequireKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"必填字段不能为空:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
String
errorMsg
=
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"必填字段不能为空:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
();
logMessage
.
setMessage
(
errorMsg
);
cylinderFillingMessageService
.
save
(
logMessage
);
throw
new
BadRequest
(
errorMsg
);
}
// 2.本次上传数据唯一性校验
errorRows
=
validateUnique
(
CylinderOffloadingFieldEnum
.
getAllUniqueKeys
(),
jsonArray
);
if
(!
ObjectUtils
.
isEmpty
(
errorRows
))
{
throw
new
BadRequest
(
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
());
String
errorMsg
=
JSONArray
.
fromObject
(
errorRows
.
stream
().
map
(
e
->
"上传数据重复:"
+
e
).
collect
(
Collectors
.
toList
())).
toString
();
logMessage
.
setMessage
(
errorMsg
);
cylinderFillingMessageService
.
save
(
logMessage
);
throw
new
BadRequest
(
errorMsg
);
}
// // 3.检查企业统一社会信用代码是否存在
// Set<String> creditCodes = getAllData(FillingBeforeFieldEnum.creditCode.name(), jsonArray);
// errorRows = getNotExistEnterpriseInfoByCreditCode(creditCodes);
// if (!ObjectUtils.isEmpty(errorRows)) {
// throw new BadRequest(JSONArray.fromObject(errorRows.stream().map(e -> "企业统一社会信用代码不存在:" + e).collect(Collectors.toList())).toString());
// }
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/CylinderService.java
View file @
fa1ac393
...
...
@@ -3,9 +3,12 @@ package com.yeejoin.amos.api.openapi.face.service;
import
com.baomidou.dynamic.datasource.annotation.DSTransactional
;
import
com.yeejoin.amos.api.openapi.constant.Constant
;
import
com.yeejoin.amos.api.openapi.enums.CylinderType
;
import
com.yeejoin.amos.api.openapi.face.model.*
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.ESCylinderFillingInfoRepository
;
import
com.yeejoin.amos.boot.module.cylinder.api.dto.CylinderFillingMessage
;
import
com.yeejoin.amos.boot.module.cylinder.api.dto.CylinderFillingMessageModel
;
import
com.yeejoin.amos.boot.module.cylinder.api.entity.ESCylinderFillingInfoDto
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
net.sf.json.JSONArray
;
...
...
@@ -14,7 +17,6 @@ import org.apache.logging.log4j.LogManager;
import
org.apache.logging.log4j.Logger
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -26,13 +28,12 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
javax.annotation.PostConstruct
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.*
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.stream.Collectors
;
/**
* 气瓶service
...
...
@@ -42,7 +43,6 @@ public class CylinderService {
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
CylinderService
.
class
);
@Autowired
private
final
RedisTemplate
redisTemplate
;
private
final
CylinderFillingDataValidationService
cylinderFillingDataValidationService
;
private
final
TmCylinderFillingMessageService
cylinderFillingMessageService
;
...
...
@@ -51,11 +51,15 @@ public class CylinderService {
private
final
TmCylinderFillingRecordService
cylinderFillingRecordService
;
private
final
TmCylinderFillingService
cylinderFillingService
;
private
final
ESCylinderFillingInfoRepository
esCylinderFillingInfoRepository
;
private
final
SyncCylinderDataService
syncCylinderDataService
;
private
final
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
private
final
BlockingQueue
<
CylinderFillingMessageModel
>
blockingQueue
=
new
LinkedBlockingQueue
<>();
public
CylinderService
(
RedisTemplate
redisTemplate
,
CylinderFillingDataValidationService
cylinderFillingDataValidationService
,
TmCylinderFillingMessageService
cylinderFillingMessageService
,
EmqKeeper
emqKeeper
,
TmCylinderFillingCheckService
cylinderFillingCheckService
,
TmCylinderFillingRecordService
cylinderFillingRecordService
,
TmCylinderFillingService
cylinderFillingService
)
{
public
CylinderService
(
RedisTemplate
redisTemplate
,
CylinderFillingDataValidationService
cylinderFillingDataValidationService
,
TmCylinderFillingMessageService
cylinderFillingMessageService
,
EmqKeeper
emqKeeper
,
TmCylinderFillingCheckService
cylinderFillingCheckService
,
TmCylinderFillingRecordService
cylinderFillingRecordService
,
TmCylinderFillingService
cylinderFillingService
,
ESCylinderFillingInfoRepository
esCylinderFillingInfoRepository
,
SyncCylinderDataService
syncCylinderDataService
)
{
this
.
redisTemplate
=
redisTemplate
;
this
.
cylinderFillingDataValidationService
=
cylinderFillingDataValidationService
;
this
.
cylinderFillingMessageService
=
cylinderFillingMessageService
;
...
...
@@ -63,6 +67,8 @@ public class CylinderService {
this
.
cylinderFillingCheckService
=
cylinderFillingCheckService
;
this
.
cylinderFillingRecordService
=
cylinderFillingRecordService
;
this
.
cylinderFillingService
=
cylinderFillingService
;
this
.
esCylinderFillingInfoRepository
=
esCylinderFillingInfoRepository
;
this
.
syncCylinderDataService
=
syncCylinderDataService
;
}
@DSTransactional
...
...
@@ -76,10 +82,18 @@ public class CylinderService {
CylinderFillingMessage
cylinderFillingMessage
=
new
CylinderFillingMessage
();
cylinderFillingMessage
.
setTime
(
simpleDateFormat
.
format
(
new
Date
()));
cylinderFillingMessage
.
setFillingCompanyName
(
me
.
getCompanys
().
get
(
0
).
getCompanyName
());
cylinderFillingMessage
.
set
OrgCode
(
me
.
getCompanys
().
get
(
0
).
getOrg
Code
());
cylinderFillingMessage
.
set
FillingCompanyCode
(
me
.
getCompanys
().
get
(
0
).
getCompany
Code
());
cylinderFillingMessage
.
setAppId
(
bizTokenModel
.
getAppId
());
cylinderFillingMessage
.
setRawData
(
fillingData
);
// 校验充装记录信息
JSONArray
validateResult
=
validateFillingData
(
jsonobject
,
cylinderFillingMessage
);
// 有问题的充装数据记录日志
CylinderFillingMessageModel
cylinderFillingMessageModel
=
new
CylinderFillingMessageModel
();
BeanUtils
.
copyProperties
(
cylinderFillingMessage
,
cylinderFillingMessageModel
);
blockingQueue
.
add
(
cylinderFillingMessageModel
);
if
(!
validateResult
.
isEmpty
())
{
throw
new
BadRequest
(
validateResult
.
toString
());
}
...
...
@@ -89,21 +103,92 @@ public class CylinderService {
List
<
TmCylinderFillingModel
>
fillingBeforeList
=
cylinderFillingModelList
.
getFillingBefore
();
List
<
TmCylinderFillingRecordModel
>
fillingList
=
cylinderFillingModelList
.
getFilling
();
List
<
TmCylinderFillingCheckModel
>
fillingAfterList
=
cylinderFillingModelList
.
getFillingAfter
();
if
(
ValidationUtil
.
isEmpty
(
fillingBeforeList
)
&&
ValidationUtil
.
isEmpty
(
fillingList
)
&&
ValidationUtil
.
isEmpty
(
fillingAfterList
))
{
throw
new
BadRequest
(
"液化气体气瓶充装信息-充装前检查信息、液化气体气瓶充装信息-充装记录信息、液化气体气瓶充装信息-充装后复查信息为空."
);
}
cylinderFillingService
.
createCylinderFillingBefore
(
fillingBeforeList
);
cylinderFillingRecordService
.
createCylinderFilling
(
fillingList
);
cylinderFillingCheckService
.
createCylinderFillingAfter
(
fillingAfterList
);
CylinderFillingMessageModel
cylinderFillingMessageModel
=
new
CylinderFillingMessageModel
();
BeanUtils
.
copyProperties
(
cylinderFillingMessage
,
cylinderFillingMessageModel
);
cylinderFillingMessageModel
.
setAppId
(
bizTokenModel
.
getAppId
());
cylinderFillingMessageService
.
createWithModel
(
cylinderFillingMessageModel
);
emqKeeper
.
getMqttClient
().
publish
(
"openapi/cylinder/filling"
,
JSONObject
.
fromObject
(
cylinderFillingMessage
).
toString
().
getBytes
(),
2
,
false
);
// 处理同步到气瓶es索引 cylinder_filling_info
createCylinderFillingInfo2es
(
bizTokenModel
,
fillingBeforeList
,
fillingList
,
fillingAfterList
);
}
private
void
createCylinderFillingInfo2es
(
BizTokenModel
bizTokenModel
,
List
<
TmCylinderFillingModel
>
fillingBeforeList
,
List
<
TmCylinderFillingRecordModel
>
fillingList
,
List
<
TmCylinderFillingCheckModel
>
fillingAfterList
)
{
if
(
ValidationUtil
.
isEmpty
(
fillingList
))
{
logger
.
info
(
"气瓶充装信息对接--->没有充装数据"
);
}
Map
<
String
,
List
<
TmCylinderFillingModel
>>
before
=
fillingBeforeList
.
stream
().
collect
(
Collectors
.
groupingBy
((
TmCylinderFillingModel:
:
getFillingBeforeId
),
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
list
->
{
list
.
sort
(
Comparator
.
comparing
(
TmCylinderFillingModel:
:
getInspectionDate
).
reversed
());
return
list
;
}
)));
Map
<
String
,
List
<
TmCylinderFillingRecordModel
>>
filling
=
fillingList
.
stream
().
collect
(
Collectors
.
groupingBy
((
TmCylinderFillingRecordModel:
:
getFillingBeforeId
),
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
list
->
{
list
.
sort
(
Comparator
.
comparing
(
TmCylinderFillingRecordModel:
:
getFillingStartTime
).
reversed
());
return
list
;
}
)));
Map
<
String
,
List
<
TmCylinderFillingCheckModel
>>
after
=
fillingAfterList
.
stream
().
collect
(
Collectors
.
groupingBy
((
TmCylinderFillingCheckModel:
:
getFillingBeforeId
),
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
list
->
{
list
.
sort
(
Comparator
.
comparing
(
TmCylinderFillingCheckModel:
:
getInspectionDate
).
reversed
());
return
list
;
}
)));
List
<
ESCylinderFillingInfoDto
>
esCylinderFillingInfoList
=
new
ArrayList
<>();
Set
<
String
>
sequenceCodeList
=
fillingList
.
stream
().
map
(
TmCylinderFillingRecordModel:
:
getSequenceCode
).
collect
(
Collectors
.
toSet
());
// 查询气瓶的基础信息
List
<
Map
<
String
,
String
>>
cylinderInfoList
=
syncCylinderDataService
.
queryTzsCylinderInfo
(
sequenceCodeList
);
filling
.
forEach
((
key
,
value
)
->
{
ESCylinderFillingInfoDto
esCylinderFillingInfo
=
new
ESCylinderFillingInfoDto
();
TmCylinderFillingModel
beforeInfo
=
ValidationUtil
.
isEmpty
(
before
.
get
(
key
))
?
null
:
before
.
get
(
key
).
get
(
0
);
TmCylinderFillingRecordModel
fillingInfo
=
value
.
get
(
0
);
TmCylinderFillingCheckModel
afterInfo
=
ValidationUtil
.
isEmpty
(
after
.
get
(
key
))
?
null
:
after
.
get
(
key
).
get
(
0
);
// 充装信息
BeanUtils
.
copyProperties
(
fillingInfo
,
esCylinderFillingInfo
);
esCylinderFillingInfo
.
setCylinderTypeName
(
Objects
.
requireNonNull
(
CylinderType
.
getByCode
(
fillingInfo
.
getCylinderType
())).
getName
());
esCylinderFillingInfo
.
setAppId
(
bizTokenModel
.
getAppId
());
esCylinderFillingInfo
.
setFillingUnitName
(
bizTokenModel
.
getApiCompanyName
());
esCylinderFillingInfo
.
setFillingUnitCreditCode
(
bizTokenModel
.
getApiCompanyCode
());
Map
<
String
,
String
>
cylinder
=
cylinderInfoList
.
stream
().
filter
(
cylinderInfo
->
cylinderInfo
.
get
(
"sequenceCode"
).
equals
(
fillingInfo
.
getSequenceCode
())).
findFirst
().
orElse
(
new
HashMap
<>());
esCylinderFillingInfo
.
setDefineCode
(
cylinder
.
get
(
"equDefine"
));
esCylinderFillingInfo
.
setDefineName
(
cylinder
.
get
(
"equDefineName"
));
esCylinderFillingInfo
.
setFactoryNum
(
cylinder
.
get
(
"factoryNum"
));
esCylinderFillingInfo
.
setOrgBranchCode
(
cylinder
.
get
(
"orgBranchCode"
));
esCylinderFillingInfo
.
setOrgBranchName
(
cylinder
.
get
(
"orgBranchName"
));
esCylinderFillingInfo
.
setEstateUnitName
(
cylinder
.
get
(
"estateUnitName"
));
esCylinderFillingInfo
.
setCylinderStatus
(
cylinder
.
get
(
"cylinderStatus"
));
esCylinderFillingInfo
.
setCylinderStatusName
(
cylinder
.
get
(
"cylinderStatusName"
));
// 充装前检查信息
if
(
beforeInfo
!=
null
)
{
ESCylinderFillingInfoDto
.
BeforeCheck
beforeCheck
=
new
ESCylinderFillingInfoDto
.
BeforeCheck
();
BeanUtils
.
copyProperties
(
beforeInfo
,
beforeCheck
);
esCylinderFillingInfo
.
setBeforeCheck
(
beforeCheck
);
}
// 充装后复查信息
if
(
afterInfo
!=
null
)
{
ESCylinderFillingInfoDto
.
AfterCheck
afterCheck
=
new
ESCylinderFillingInfoDto
.
AfterCheck
();
BeanUtils
.
copyProperties
(
afterInfo
,
afterCheck
);
esCylinderFillingInfo
.
setAfterCheck
(
afterCheck
);
}
esCylinderFillingInfoList
.
add
(
esCylinderFillingInfo
);
});
esCylinderFillingInfoRepository
.
saveAll
(
esCylinderFillingInfoList
);
}
// @Transactional
public
JSONArray
validateFillingData
(
JSONObject
jsonobject
,
CylinderFillingMessage
cylinderFillingLogMessage
)
throws
MqttException
{
CylinderFillingDataValidationResultModel
validateResult
=
null
;
...
...
@@ -111,7 +196,7 @@ public class CylinderService {
validateResult
=
cylinderFillingDataValidationService
.
validateFilling
(
jsonobject
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"
液化气体
气瓶充装信息上报,数据校验失败"
);
logger
.
error
(
"气瓶充装信息上报,数据校验失败"
);
cylinderFillingLogMessage
.
setMessage
(
e
.
getMessage
());
}
...
...
@@ -119,51 +204,50 @@ public class CylinderService {
if
(!
ObjectUtils
.
isEmpty
(
validateResult
))
{
cylinderFillingLogMessage
.
setCylinderNumber
(
validateResult
.
getCylinderNumber
());
List
<
String
>
m
essage
=
new
ArrayList
<>();
List
<
String
>
logM
essage
=
new
ArrayList
<>();
int
errorNumber
=
0
;
JSONObject
error
=
new
JSONObject
();
if
(!
ObjectUtils
.
isEmpty
(
validateResult
.
getBeforeErrorData
()))
{
errorNumber
+=
validateResult
.
getBeforeErrorData
().
size
();
error
.
put
(
"充装前检查错误数据:"
,
validateResult
.
getBeforeErrorData
());
message
.
add
(
"充装前检查数据异常气瓶数:"
+
validateResult
.
getBeforeErrorCylinderNumber
());
errorData
.
add
(
error
);
logMessage
.
add
(
"充装前检查数据异常气瓶数:"
+
validateResult
.
getBeforeErrorCylinderNumber
());
}
if
(!
ObjectUtils
.
isEmpty
(
validateResult
.
getRecordErrorData
()))
{
errorNumber
+=
validateResult
.
getRecordErrorData
().
size
();
error
.
put
(
"充装错误数据:"
,
validateResult
.
getRecordErrorData
());
message
.
add
(
"充装记录数据异常气瓶数:"
+
validateResult
.
getRecordErrorCylinderNumber
());
errorData
.
add
(
error
);
logMessage
.
add
(
"充装记录数据异常气瓶数:"
+
validateResult
.
getRecordErrorCylinderNumber
());
}
if
(!
ObjectUtils
.
isEmpty
(
validateResult
.
getAfterErrorData
()))
{
errorNumber
+=
validateResult
.
getAfterErrorData
().
size
();
error
.
put
(
"充装后错误数据:"
,
validateResult
.
getAfterErrorData
());
message
.
add
(
"充装后复查数据异常气瓶数:"
+
validateResult
.
getAfterErrorCylinderNumber
());
errorData
.
add
(
error
);
logMessage
.
add
(
"充装后复查数据异常气瓶数:"
+
validateResult
.
getAfterErrorCylinderNumber
());
}
if
(!
ObjectUtils
.
isEmpty
(
validateResult
.
getSeqCodeErrorData
()))
{
errorNumber
+=
validateResult
.
getSeqCodeErrorData
().
size
();
error
.
put
(
"气瓶信息不存在:"
,
validateResult
.
getSeqCodeErrorData
());
message
.
add
(
"气瓶信息不存在数量:"
+
validateResult
.
getSeqCodeErrorData
().
size
()
+
"个"
);
errorData
.
add
(
error
);
logMessage
.
add
(
"气瓶信息不存在数量:"
+
validateResult
.
getSeqCodeErrorData
().
size
()
+
"个"
);
}
if
(
errorNumber
<=
0
)
{
cylinderFillingLogMessage
.
setMessage
(
"
液化气体气瓶充装信息成功数:"
+
validateResult
.
getSuccessCylinderNumber
()
+
"条
"
);
cylinderFillingLogMessage
.
setMessage
(
"
气瓶充装信息校验成功的气瓶数:"
+
validateResult
.
getSuccessCylinderNumber
()
+
"个
"
);
}
else
{
cylinderFillingLogMessage
.
setMessage
(
String
.
join
(
"条; "
,
message
));
// cylinderFillingMessageService.createWithModel(cylinderFillingMessageModel);
emqKeeper
.
getMqttClient
().
publish
(
"openapi/cylinder/filling"
,
JSONObject
.
fromObject
(
cylinderFillingLogMessage
).
toString
().
getBytes
(),
2
,
false
);
cylinderFillingLogMessage
.
setMessage
(
String
.
join
(
"条; "
,
logMessage
));
}
CylinderFillingMessageModel
cylinderFillingMessageModel
=
new
CylinderFillingMessageModel
();
BeanUtils
.
copyProperties
(
cylinderFillingLogMessage
,
cylinderFillingMessageModel
);
// 充装信息概览放入blockingQueue
blockingQueue
.
add
(
cylinderFillingMessageModel
);
}
else
{
errorData
.
add
(
new
JSONObject
().
put
(
"数据校验失败"
,
"数据校验失败"
));
JSONObject
error
=
new
JSONObject
();
error
.
put
(
"数据校验失败"
,
"上传数据不能为空"
);
errorData
.
add
(
error
);
}
return
errorData
;
}
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/OpenapiBizTokenService.java
View file @
fa1ac393
...
...
@@ -56,7 +56,8 @@ public class OpenapiBizTokenService extends BaseService<OpenapiBizTokenModel, Op
bizTokenModel
.
setToken
(
token
);
RequestContext
.
setToken
(
token
);
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
bizTokenModel
.
setApiCompanyCode
(
user
.
getCompanys
().
get
(
0
).
getOrgCode
());
bizTokenModel
.
setApiCompanyCode
(
user
.
getCompanys
().
get
(
0
).
getCompanyCode
());
// 当前一个人只能有一个单位
bizTokenModel
.
setApiCompanyName
(
user
.
getCompanys
().
get
(
0
).
getCompanyName
());
// 当前一个人只能有一个单位
String
tokenKey
=
Redis
.
genKey
(
Constant
.
TOKEN_PREFIX
,
token
);
this
.
redisTemplate
.
opsForValue
().
set
(
tokenKey
,
bizTokenModel
);
return
token
;
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/SyncCylinderDataService.java
View file @
fa1ac393
...
...
@@ -27,6 +27,7 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Slf4j
@Component
...
...
@@ -117,9 +118,6 @@ public class SyncCylinderDataService {
public
void
syncCylinderFillingRecord
(
List
<
TmCylinderFillingRecordModel
>
cylinderFillingRecordDtos
)
{
List
<
CylinderFillingRecord
>
cylinderFillingRecordList
=
Bean
.
toModels
(
cylinderFillingRecordDtos
,
CylinderFillingRecord
.
class
);
cylinderFillingRecordList
.
forEach
(
cylinderFillingRecord
->
{
cylinderFillingRecord
.
setAbnormal
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFillingRecord
.
getAbnormal
(),
CylDictEnum
.
abnormal_0
.
getKey
())).
getSeqNbr
());
});
cylCylinderFillingCheckMapper
.
batchInsertOrUpdate
(
cylinderFillingRecordList
);
}
...
...
@@ -139,38 +137,11 @@ public class SyncCylinderDataService {
public
void
syncCylinderFillingBefore
(
List
<
TmCylinderFillingModel
>
cylinderFillingDtos
)
{
List
<
CylinderFilling
>
cylinderFillingList
=
Bean
.
toModels
(
cylinderFillingDtos
,
CylinderFilling
.
class
);
cylinderFillingList
.
forEach
(
cylinderFilling
->
{
cylinderFilling
.
setIsValid
(
String
.
valueOf
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
Integer
.
valueOf
(
cylinderFilling
.
getIsValid
()),
CylDictEnum
.
isValid_0
.
getKey
()))));
cylinderFilling
.
setSame
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFilling
.
getSame
(),
CylDictEnum
.
same_0
.
getKey
())).
getSeqNbr
());
cylinderFilling
.
setIsRegulations
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFilling
.
getIsRegulations
(),
CylDictEnum
.
isRegulations_0
.
getKey
())).
getSeqNbr
());
cylinderFilling
.
setIsComplianceWithgbt
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFilling
.
getIsComplianceWithgbt
(),
CylDictEnum
.
isComplianceWithGBT_0
.
getKey
())).
getSeqNbr
());
cylinderFilling
.
setHaveStillPressure
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFilling
.
getHaveStillPressure
(),
CylDictEnum
.
haveStillPressure_0
.
getKey
())).
getSeqNbr
());
cylinderFilling
.
setIsComplete
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFilling
.
getIsComplete
(),
CylDictEnum
.
isComplete_0
.
getKey
())).
getSeqNbr
());
cylinderFilling
.
setHaveSecurityDocuments
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFilling
.
getHaveSecurityDocuments
(),
CylDictEnum
.
SecurityDocuments_0
.
getKey
())).
getSeqNbr
());
});
cylCylinderFillingCheckMapper
.
saveAndBatchInsert
(
cylinderFillingList
);
}
public
void
syncCylinderFillingAfter
(
List
<
TmCylinderFillingCheckModel
>
cylinderFillingCheckDtos
)
{
List
<
CylinderFillingCheck
>
cylinderFillingChecList
=
Bean
.
toModels
(
cylinderFillingCheckDtos
,
CylinderFillingCheck
.
class
);
cylinderFillingChecList
.
forEach
(
cylinderFillingCheck
->
{
cylinderFillingCheck
.
setAbnormalTemperature
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFillingCheck
.
getAbnormalTemperature
(),
CylDictEnum
.
abnormalTemperature_0
.
getKey
())).
getSeqNbr
());
cylinderFillingCheck
.
setSealedState
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFillingCheck
.
getSealedState
(),
CylDictEnum
.
sealedState_0
.
getKey
())).
getSeqNbr
());
cylinderFillingCheck
.
setWarningSign
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFillingCheck
.
getWarningSign
(),
CylDictEnum
.
warningSign_0
.
getKey
())).
getSeqNbr
());
cylinderFillingCheck
.
setDefective
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFillingCheck
.
getDefective
(),
CylDictEnum
.
defective_0
.
getKey
())).
getSeqNbr
());
cylinderFillingCheck
.
setWithinScope
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
cylinderFillingCheck
.
getWithinScope
(),
CylDictEnum
.
withinScope_0
.
getKey
())).
getSeqNbr
());
});
cylinderFillingCheckMapper
.
saveOrUpdateByCondition
(
cylinderFillingChecList
);
}
...
...
@@ -178,33 +149,6 @@ public class SyncCylinderDataService {
@DS
(
"tzs"
)
public
void
createCylinderFillingRecord
(
List
<
ESCylinderFillingRecordDto
>
cylinderFillingRecord
)
{
if
(!
ObjectUtils
.
isEmpty
(
cylinderFillingRecord
))
{
// List<String> appIds = cylinderFillingRecord.stream().map(ESCylinderFillingRecordDto::getAppId).collect(Collectors.toList());
// List<String> sequenceCodeS = cylinderFillingRecord.stream().map(ESCylinderFillingRecordDto::getSequenceCode).collect(Collectors.toList());
// List<ESCylinderFillingRecordDto> cylinderFillingRecordInfo = cylinderFillingRecordMapper.getCylinderFillingRecordInfo(appIds, sequenceCodeS);
// cylinderFillingRecord.stream().map(item -> {
// List<ESCylinderFillingRecordDto> collect = cylinderFillingRecordInfo.stream().filter(e -> item.getAppIdAndSequenceCode().equals(e.getAppIdAndSequenceCode())).collect(Collectors.toList());
// if (!ObjectUtils.isEmpty(collect)) {
// item.setSequenceNbr(collect.get(0).getSequenceNbr());
// item.setUnitName(collect.get(0).getUnitName());
// item.setFactoryNum(collect.get(0).getFactoryNum());
// item.setCylinderVariety(collect.get(0).getCylinderVariety());
// item.setCylinderVarietyName(collect.get(0).getCylinderVarietyName());
// item.setUnitInnerCode(collect.get(0).getUnitInnerCode());
// item.setSequenceCode(collect.get(0).getSequenceCode());
// item.setQrCode(collect.get(0).getQrCode());
// item.setElectronicLabelCode(collect.get(0).getElectronicLabelCode());
// item.setAppId(collect.get(0).getAppId());
// item.setCreditCode(collect.get(0).getCreditCode());
// item.setRegionCode(collect.get(0).getRegionCode());
// try {
// item.setInspectionDateMs(ObjectUtils.isEmpty(item.getFillingStartTime()) ? 0L : DateUtils.dateParseWithPattern(item.getFillingStartTime()).getTime());
// item.setInspectionDateAfterMS(ObjectUtils.isEmpty(item.getFillingEndTime()) ? 0L : DateUtils.dateParseWithPattern(item.getFillingEndTime()).getTime());
// } catch (ParseException e) {
// throw new RuntimeException(e);
// }
// }
// return item;
// });
cylinderFillingRecord
.
forEach
(
item
->
{
String
sequenceCode
=
item
.
getSequenceCode
();
System
.
out
.
println
(
"Processing sequenceCode: "
+
sequenceCode
);
...
...
@@ -311,4 +255,11 @@ public class SyncCylinderDataService {
List
<
CylinderOffloading
>
cylinderOffloadingList
=
Bean
.
toModels
(
tmCylinderOffloadingList
,
CylinderOffloading
.
class
);
cylinderOffloadingMapper
.
saveOrUpdateBatch
(
cylinderOffloadingList
);
}
public
List
<
Map
<
String
,
String
>>
queryTzsCylinderInfo
(
Set
<
String
>
sequenceCodeList
)
{
// 将sequenceCodeList按-分割成两个列表
Set
<
String
>
produceUnitCreditCodes
=
sequenceCodeList
.
stream
().
map
(
sequenceCode
->
sequenceCode
.
split
(
"-"
,
2
)[
0
]).
collect
(
Collectors
.
toSet
());
Set
<
String
>
factoryNums
=
sequenceCodeList
.
stream
().
map
(
sequenceCode
->
sequenceCode
.
split
(
"-"
,
2
)[
1
]).
collect
(
Collectors
.
toSet
());
return
cylinderInfoMapper
.
queryTzsCylinderInfo
(
produceUnitCreditCodes
,
factoryNums
);
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TmCylinderFillingCheckService.java
View file @
fa1ac393
...
...
@@ -8,9 +8,9 @@ import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderFillingCheckMapper;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingCheck
;
import
com.yeejoin.amos.api.openapi.service.MyBaseServiceImpl
;
import
com.yeejoin.amos.api.openapi.util.MultiFieldKey
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
java.util.Date
;
...
...
@@ -20,7 +20,7 @@ import java.util.List;
/**
*
* <pre>
*
液化气体
气瓶充装信息-充装后复查 服务类
* 气瓶充装信息-充装后复查 服务类
* </pre>
*
* @author gwb
...
...
@@ -32,12 +32,15 @@ public class TmCylinderFillingCheckService extends MyBaseServiceImpl<TmCylinderF
@Autowired
private
SyncCylinderDataService
syncCylinderDataService
;
@Autowired
private
SnowflakeIdUtil
sequence
;
@DSTransactional
public
void
createCylinderFillingAfter
(
List
<
TmCylinderFillingCheckModel
>
model
)
{
String
appId
=
getAppId
();
Date
now
=
new
Date
();
for
(
TmCylinderFillingCheckModel
cylinderFillingCheckModel
:
model
)
{
cylinderFillingCheckModel
.
setSequenceNbr
(
null
);
cylinderFillingCheckModel
.
setSequenceNbr
(
sequence
.
nextId
()
);
cylinderFillingCheckModel
.
setRecDate
(
now
);
cylinderFillingCheckModel
.
setAppId
(
appId
);
}
...
...
@@ -50,11 +53,11 @@ public class TmCylinderFillingCheckService extends MyBaseServiceImpl<TmCylinderF
tmCylinderFillingCheck
->
new
LambdaQueryWrapper
<
TmCylinderFillingCheck
>()
.
eq
(
TmCylinderFillingCheck:
:
getAppId
,
tmCylinderFillingCheck
.
getAppId
())
.
eq
(
TmCylinderFillingCheck:
:
getSequenceCode
,
tmCylinderFillingCheck
.
getSequenceCode
())
.
eq
(
TmCylinderFillingCheck:
:
getFilling
CheckId
,
tmCylinderFillingCheck
.
getFillingCheck
Id
()),
entity
->
new
MultiFieldKey
(
entity
.
get
FillingCheck
Id
()),
.
eq
(
TmCylinderFillingCheck:
:
getFilling
BeforeId
,
tmCylinderFillingCheck
.
getFillingBefore
Id
()),
entity
->
new
MultiFieldKey
(
entity
.
get
AppId
(),
entity
.
getSequenceCode
(),
entity
.
getFillingBefore
Id
()),
"appId"
,
"sequenceCode"
,
"fill
ingCheck
Id"
);
"fill
Before
Id"
);
}
private
void
syncCylinderFillingAfter
(
List
<
TmCylinderFillingCheckModel
>
model
)
{
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TmCylinderFillingRecordService.java
View file @
fa1ac393
...
...
@@ -10,15 +10,12 @@ import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderFillingRecordMapper;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingRecord
;
import
com.yeejoin.amos.api.openapi.service.MyBaseServiceImpl
;
import
com.yeejoin.amos.api.openapi.util.MultiFieldKey
;
import
com.yeejoin.amos.boot.
module.cylinder.api.entity.ESCylinderFillingRecordDto
;
import
com.yeejoin.amos.boot.
biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylinderFillingRecordMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -34,8 +31,6 @@ import java.util.List;
*/
@Component
public
class
TmCylinderFillingRecordService
extends
MyBaseServiceImpl
<
TmCylinderFillingRecordModel
,
TmCylinderFillingRecord
,
TmCylinderFillingRecordMapper
>
{
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
CylinderFillingRecordMapper
cylinderFillingRecordMapper
;
...
...
@@ -46,12 +41,15 @@ public class TmCylinderFillingRecordService extends MyBaseServiceImpl<TmCylinder
@Autowired
private
SyncCylinderDataService
syncCylinderDataService
;
@Autowired
private
SnowflakeIdUtil
sequence
;
@DSTransactional
public
void
createCylinderFilling
(
List
<
TmCylinderFillingRecordModel
>
model
)
{
Date
now
=
new
Date
();
String
appId
=
getAppId
();
for
(
TmCylinderFillingRecordModel
cylinderFillingRecordModel
:
model
)
{
cylinderFillingRecordModel
.
setSequenceNbr
(
null
);
cylinderFillingRecordModel
.
setSequenceNbr
(
sequence
.
nextId
()
);
cylinderFillingRecordModel
.
setRecDate
(
now
);
cylinderFillingRecordModel
.
setAppId
(
appId
);
}
...
...
@@ -64,8 +62,8 @@ public class TmCylinderFillingRecordService extends MyBaseServiceImpl<TmCylinder
tmCylinderFillingRecord
->
new
LambdaQueryWrapper
<
TmCylinderFillingRecord
>()
.
eq
(
TmCylinderFillingRecord:
:
getAppId
,
tmCylinderFillingRecord
.
getAppId
())
.
eq
(
TmCylinderFillingRecord:
:
getSequenceCode
,
tmCylinderFillingRecord
.
getSequenceCode
())
.
eq
(
TmCylinderFillingRecord:
:
getFilling
RecordId
,
tmCylinderFillingRecord
.
getFillingRecord
Id
()),
entity
->
new
MultiFieldKey
(
entity
.
getAppId
(),
entity
.
getSequenceCode
(),
entity
.
getFilling
Record
Id
()),
.
eq
(
TmCylinderFillingRecord:
:
getFilling
BeforeId
,
tmCylinderFillingRecord
.
getFillingBefore
Id
()),
entity
->
new
MultiFieldKey
(
entity
.
getAppId
(),
entity
.
getSequenceCode
(),
entity
.
getFilling
Before
Id
()),
"appId"
,
"sequenceCode"
,
"fillingRecordId"
...
...
@@ -76,8 +74,8 @@ public class TmCylinderFillingRecordService extends MyBaseServiceImpl<TmCylinder
public
void
syncCylinderFilling
(
List
<
TmCylinderFillingRecordModel
>
model
)
{
syncCylinderDataService
.
syncCylinderFillingRecord
(
model
);
ArrayList
<
ESCylinderFillingRecordDto
>
models
=
Bean
.
toModels
(
model
,
ESCylinderFillingRecordDto
.
class
);
syncCylinderDataService
.
createCylinderFillingRecord
(
models
);
//
ArrayList<ESCylinderFillingRecordDto> models = Bean.toModels(model, ESCylinderFillingRecordDto.class);
//
syncCylinderDataService.createCylinderFillingRecord(models);
}
public
List
<
String
>
getDateList
()
{
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TmCylinderFillingService.java
View file @
fa1ac393
...
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderFillingMapper;
import
com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFilling
;
import
com.yeejoin.amos.api.openapi.service.MyBaseServiceImpl
;
import
com.yeejoin.amos.api.openapi.util.MultiFieldKey
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
...
@@ -33,6 +34,9 @@ public class TmCylinderFillingService extends MyBaseServiceImpl<TmCylinderFillin
@Autowired
private
TmCylinderFillingService
self
;
@Autowired
private
SnowflakeIdUtil
sequence
;
public
TmCylinderFillingService
(
SyncCylinderDataService
syncCylinderDataService
)
{
this
.
syncCylinderDataService
=
syncCylinderDataService
;
}
...
...
@@ -42,7 +46,7 @@ public class TmCylinderFillingService extends MyBaseServiceImpl<TmCylinderFillin
Date
now
=
new
Date
();
String
appId
=
getAppId
();
for
(
TmCylinderFillingModel
cylinderFillingModel
:
model
)
{
cylinderFillingModel
.
setSequenceNbr
(
null
);
cylinderFillingModel
.
setSequenceNbr
(
sequence
.
nextId
()
);
cylinderFillingModel
.
setRecDate
(
now
);
cylinderFillingModel
.
setAppId
(
appId
);
}
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/validation/FieldValidation.java
0 → 100644
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
validation
;
/**
* 描述: 字段校验接口
*
*/
public
interface
FieldValidation
{
boolean
isRequired
();
boolean
isUnique
();
String
getFieldName
();
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/api/dto/CylinderFillingMessage.java
View file @
fa1ac393
...
...
@@ -9,5 +9,6 @@ public class CylinderFillingMessage {
private
Integer
cylinderNumber
;
private
String
message
;
private
String
appId
;
private
String
orgCode
;
private
String
fillingCompanyCode
;
private
String
rawData
;
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/api/dto/CylinderFillingMessageModel.java
View file @
fa1ac393
...
...
@@ -10,6 +10,7 @@ public class CylinderFillingMessageModel extends BaseModel {
private
Integer
cylinderNumber
;
private
String
message
;
private
String
appId
;
private
String
org
Code
;
private
String
fillingCompany
Code
;
private
String
useUnitCode
;
private
String
rawData
;
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/api/entity/ESCylinderFillingInfoDto.java
0 → 100644
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
boot
.
module
.
cylinder
.
api
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.elasticsearch.annotations.DateFormat
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.util.Date
;
@Data
@Accessors
(
chain
=
true
)
@Document
(
indexName
=
"cylinder_filling_info"
,
shards
=
6
,
replicas
=
2
)
public
class
ESCylinderFillingInfoDto
{
@Id
private
Long
sequenceNbr
;
// 充装单位
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装单位名称"
)
private
String
fillingUnitName
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装企业统一社会信用代码"
)
private
String
fillingUnitCreditCode
;
// 出厂编号
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"出厂编号"
)
private
String
factoryNum
;
// 气瓶品种code
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶品种代码"
)
private
String
defineCode
;
// 气瓶品种名称
@Field
(
type
=
FieldType
.
Text
)
@ApiModelProperty
(
value
=
"气瓶品种名称"
)
private
String
defineName
;
// 二维码编号
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"二维码编号"
)
private
String
qrCode
;
// 电子标签编号
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"电子标签编号"
)
private
String
electronicLabelCode
;
// 气瓶唯一标识
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶唯一标识"
)
private
String
sequenceCode
;
// 单位内部编号
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"单位内部编号"
)
private
String
unitInnerCode
;
// 产权单位名称
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"产权单位名称"
)
private
String
estateUnitName
;
//气瓶状态code
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶状态代码"
)
private
String
cylinderStatus
;
//气瓶状态名称
@Field
(
type
=
FieldType
.
Text
)
@ApiModelProperty
(
value
=
"气瓶状态名称"
)
private
String
cylinderStatusName
;
// 气瓶类型 code
@Field
(
type
=
FieldType
.
Text
)
@ApiModelProperty
(
value
=
"气瓶类型"
)
private
String
cylinderTypeName
;
// 气瓶类型
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶类型代码"
)
private
String
cylinderType
;
// 充装开始时间
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date_hour_minute_second
)
@ApiModelProperty
(
value
=
"充装开始时间"
)
private
String
fillingStartTime
;
// 充装结束时间
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date_hour_minute_second
)
@ApiModelProperty
(
value
=
"充装结束时间"
)
private
String
fillingEndTime
;
// 充装前检查Id
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装前检查Id"
)
private
String
fillingBeforeId
;
// 作业人员证书编号
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"作业人员证书编号"
)
private
String
inspectorUserNum
;
// 充装前检查人员姓名
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装前检查人员姓名"
)
private
String
inspectorUser
;
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date_hour_minute_second
)
@ApiModelProperty
(
value
=
"同步时间"
)
private
Date
syncDate
;
// 同步状态0-新增 1-更新 2-删除
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"同步状态0-新增 1-更新 2-删除"
)
private
Integer
syncState
;
// 对接公司编码appid
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"对接公司编码appid"
)
private
String
appId
;
//行政区划代码
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"行政区划代码"
)
private
String
regionCode
;
// 气瓶属地监管部门代码
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶属地监管部门代码"
)
private
String
orgBranchCode
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶属地监管部门"
)
private
String
orgBranchName
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装枪编号"
)
private
String
gunNumber
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"充装量m³/(kg)"
)
private
Double
fillingAmount
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"压力"
)
private
Double
pressure
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"室温"
)
private
Double
ambientTemperature
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"异常情况"
)
private
String
abnormalConditions
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶体温度无异常升高"
)
private
String
isNoAbnormalTemperatureRise
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"充装压力"
)
private
Double
fillingPressure
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶体温度一致"
)
private
String
temperatureConsistent
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶内无异常音响"
)
private
String
noAbnormalSoundInside
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶阀及各连接部位的密封良好"
)
private
String
valveSealedWell
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装压力≤2.5 MPa"
)
private
String
fillingPressureLessThan
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"乙炔充装量"
)
private
Double
acetyleneFillingAmount
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"各组分含量"
)
private
Double
componentContents
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"标称皮重"
)
private
Double
tareWeightNominal
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"充装后质量"
)
private
Double
filledWeight
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"实际充装量"
)
private
Double
actualFillingAmount
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"含余气皮重"
)
private
Double
tareWeightIncludingResidualGas
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"上传数据完整度"
)
private
Double
integrity
;
// 充装前检查信息
@Field
(
type
=
FieldType
.
Nested
)
private
BeforeCheck
beforeCheck
;
// 充装后复查信息
@Field
(
type
=
FieldType
.
Nested
)
private
AfterCheck
afterCheck
;
@Data
public
static
class
BeforeCheck
{
@Field
(
type
=
FieldType
.
Long
)
private
Long
sequenceNbr
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"作业人员证书编号"
)
private
String
inspectorUserNum
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"作业人员姓名"
)
private
String
inspectorUser
;
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date_hour_minute_second
)
@ApiModelProperty
(
value
=
"检查时间"
)
private
Date
inspectionDate
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"车牌号码"
)
private
String
carNumber
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装气体与气瓶允许充装气体一致"
)
private
String
isCylinderGasConsistent
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装介质"
)
private
String
fillingMedium
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶外表面有划伤、裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷"
)
private
String
hasSevereExternalDamage
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶内有剩余压力"
)
private
String
hasResidualPressure
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"无气体泄漏"
)
private
String
isGasLeak
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶附件齐全并符合安全要求"
)
private
String
areAccessoriesCompleteAndSafe
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"排除超期未检气瓶、非法改装或翻新及报废气瓶"
)
private
String
excludeOverdueRefurbishedScrappedCylinders
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致"
)
private
String
isWarningLabelGasNameConsistentWithStamp
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶外表面的颜色标志是否符合规定"
)
private
String
isColorMarkingCompliant
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶阀符合GB7512规定"
)
private
String
valveCompliesGB7512
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶外表面无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷"
)
private
String
hasNoSevereExternalDamage
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"新投入使用气瓶或经检验后首次投入使用气瓶,充装前按照规定先置换瓶内空气,并经分析合格后方可充气"
)
private
String
isNewOrInspectedOk
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装介质与气瓶钢印标志气体名称是否一致"
)
private
String
isFillingMediumConsistentWithStamp
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶瓶阀的出气口螺纹型式是符合GB/T15383的规定"
)
private
String
outletThreadTypeCompliesGB15383
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装可燃、氧化性气体,如无余压保持阀,重复充装前应先进行抽真空处理"
)
private
String
isVacuumProcessed
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶外表面无严重腐蚀"
)
private
String
hasNoSevereCorrosion
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶外表面无损伤缺陷"
)
private
String
hasNoSurfaceDefects
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶外表面的颜色标志符合GB/T7144的规定、且清晰易认"
)
private
String
colorMeetsGB7144
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶外表面无裂纹"
)
private
String
hasNoCracks
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶外表面无明显变形"
)
private
String
hasNoObviousDeformation
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶体、瓶阀无沾染油脂或其他可燃物"
)
private
String
noOilOrFlammableSubstances
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶体无腐蚀、机械损伤等表面缺陷、是否满足GB13076标准报废"
)
private
String
meetsGB13076AndMechanicalDamage
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"易熔合金无融熔、流失、损伤的"
)
private
String
fusiblePlugUndamaged
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"钢印标记完整且能够识别"
)
private
String
stampMarkingsClearAndComplete
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"附件完整且符合规定"
)
private
String
accessoriesCompleteAndConforming
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶阀侧接嘴处积无炭黑或焦油等异物"
)
private
String
noCarbonBlackOrTarAtValvePort
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶内的填料、溶剂的质量没有问题"
)
private
String
fillerAndSolventQualityOK
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"无其他影响安全使用缺陷的"
)
private
String
noOtherSafetyAffectingDefects
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"充装间温度"
)
private
Double
fillingRoomTemperature
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"剩余压力"
)
private
Double
residualPressure
;
@Field
(
type
=
FieldType
.
Double
)
@ApiModelProperty
(
value
=
"丙酮补加量"
)
private
Double
acetoneSupplementAmount
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"钢印、警示标签与待充介质名称一致"
)
private
String
isStampAndLabelConsistentWithMedium
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"外表面颜色标志符合规定"
)
private
String
externalColorMarkingCompliant
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶阀出气口螺纹符合要求"
)
private
String
valveOutletThreadComplies
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"外表面无严重损伤缺陷"
)
private
String
hasNoSevereSurfaceDefects
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶附件符合要求"
)
private
String
cylinderAccessoriesMeetRequirements
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"氧化性混合气体的瓶体、瓶阀未沾染油脂"
)
private
String
oxidizingGasCylinderFreeOfOil
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶经预处理(抽真空、烘干、置换或组合)合格"
)
private
String
preTreatedSuccessfully
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶表面无油污、无严重损伤"
)
private
String
surfaceFreeOfOilAndDamage
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶阀完好、接头洁净无水或冰"
)
private
String
valveInGoodConditionCleanConnection
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"无余压的瓶用洁净的待充气体吹扫(易燃的先用液氮置换)"
)
private
String
emptyPressureCylinderPurgedWithCleanGas
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶阀出气口为内螺纹(左旋)"
)
private
String
valveOutletInternalThreadLeftHanded
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"有余压的经定性鉴别且与待充介质一致"
)
private
String
qualitativeTestPassedForResidualGas
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"无余压的经卸阀内检合格"
)
private
String
internalValveInspectionPassed
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶安全附件齐全并符合安全要求"
)
private
String
safetyAccessoriesCompleteAndSafe
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"首充气瓶已置换瓶内空气"
)
private
String
newCylinderAirReplacedBeforeFirstUse
;
}
@Data
public
static
class
AfterCheck
{
@Field
(
type
=
FieldType
.
Long
)
private
Long
sequenceNbr
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"作业人员证书编号"
)
private
String
inspectorUserNum
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"作业人员姓名"
)
private
String
inspectorUser
;
@Field
(
type
=
FieldType
.
Date
,
format
=
DateFormat
.
date_hour_minute_second
)
@ApiModelProperty
(
value
=
"检查时间"
)
private
Date
inspectionDate
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶体未出现鼓包变形或泄漏等严重缺陷"
)
private
String
isNoBulgingOrLeakage
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶内压力正常"
)
private
String
isPressureNormal
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶体温度没有异常升高的迹象"
)
private
String
isTemperatureNormal
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶阀及其与瓶口连接的密封良好"
)
private
String
valveSealIsGood
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶粘贴警示标签和充装标签)"
)
private
String
hasWarningAndFillingLabels
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装量复秤未超重"
)
private
String
reweighedWithinLimit
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶内压力(充装量)及质量符合安全技术规范及相关标准的要求"
)
private
String
pressureAndMassMeetRegulations
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶帽、充装标签、警示标签完整"
)
private
String
capsAndLabelsAreIntact
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶阀出气口螺纹及其密封面良好"
)
private
String
valveSealedWell
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"静置后压力符合规定"
)
private
String
pressureAfterRestingComplies
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶未发生泄漏等问题"
)
private
String
noLeakageIssuesDetected
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"处理结果是否合格"
)
private
String
isTreatmentResultQualified
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"充装量(压力或质量)符合要求"
)
private
String
fillingAmountMeetsRequirement
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"密封良好无泄漏"
)
private
String
sealsIntactNoLeakage
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶无变形等缺陷"
)
private
String
noDeformationOrDefects
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"瓶体温升无异常"
)
private
String
temperatureRiseNormal
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶附件完整齐全"
)
private
String
cylinderAccessoriesComplete
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"阀门已关闭,管路及各附件无漏气"
)
private
String
valveClosedNoLeakageInPipingAndAccessories
;
@Field
(
type
=
FieldType
.
Keyword
)
@ApiModelProperty
(
value
=
"气瓶外观无结霜、结露"
)
private
String
noFrostOrCondensationOnCylinder
;
}
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/entity/CylinderFilling.java
View file @
fa1ac393
...
...
@@ -7,7 +7,6 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
java.util.Date
;
...
...
@@ -22,76 +21,156 @@ import java.util.Date;
@Accessors
(
chain
=
true
)
@TableName
(
"tz_cylinder_filling"
)
@ApiModel
(
value
=
"TzCylinderFilling对象"
,
description
=
"气瓶充装信息--充装前检查"
)
public
class
CylinderFilling
extends
BaseEntity
{
public
class
CylinderFilling
extends
CylinderFilling
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"检查时间"
)
private
Date
inspectionDate
;
@ApiModelProperty
(
value
=
"车牌号码"
)
@TableField
(
value
=
"car_number"
)
private
String
carNumber
;
@ApiModelProperty
(
value
=
"充装气体与气瓶允许充装气体一致"
)
private
String
isCylinderGasConsistent
;
@ApiModelProperty
(
value
=
"充装介质"
)
private
String
fillingMedium
;
@ApiModelProperty
(
value
=
"气瓶外表面有划伤、裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷"
)
private
String
hasSevereExternalDamage
;
@ApiModelProperty
(
value
=
"
充装前检查Id
"
)
private
String
fillingBeforeId
;
@ApiModelProperty
(
value
=
"
气瓶内有剩余压力
"
)
private
String
hasResidualPressure
;
@ApiModelProperty
(
value
=
"
充装企业名称
"
)
private
String
fillingUnitName
;
@ApiModelProperty
(
value
=
"
无气体泄漏
"
)
private
String
isGasLeak
;
@ApiModelProperty
(
value
=
"气瓶
唯一标识码
"
)
private
String
sequenceCod
e
;
@ApiModelProperty
(
value
=
"气瓶
附件齐全并符合安全要求
"
)
private
String
areAccessoriesCompleteAndSaf
e
;
@ApiModelProperty
(
value
=
"
是否在检验有效期以内
"
)
private
String
isValid
;
@ApiModelProperty
(
value
=
"
排除超期未检气瓶、非法改装或翻新及报废气瓶
"
)
private
String
excludeOverdueRefurbishedScrappedCylinders
;
@ApiModelProperty
(
value
=
"警示标签上印有的瓶装气体的名称及化学分子式应与气瓶钢印标志是否一致"
)
private
Integer
same
;
private
String
isWarningLabelGasNameConsistentWithStamp
;
@ApiModelProperty
(
value
=
"气瓶外表面的颜色标志是否符合规定"
)
private
Integer
isRegulations
;
private
String
isColorMarkingCompliant
;
@ApiModelProperty
(
value
=
"
气瓶瓶阀的出气口螺纹型式是否符合GB/T15383
"
)
@TableField
(
"is_compliance_withGBT
"
)
private
Integer
isComplianceWithgbt
;
@ApiModelProperty
(
value
=
"
瓶阀符合GB7512规定
"
)
@TableField
(
value
=
"valve_complies_gb7512
"
)
private
String
valveCompliesGB7512
;
@ApiModelProperty
(
value
=
"气瓶
内有无剩余压力
"
)
private
Integer
haveStillPressur
e
;
@ApiModelProperty
(
value
=
"气瓶
外表面无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷
"
)
private
String
hasNoSevereExternalDamag
e
;
@ApiModelProperty
(
value
=
"
气瓶外表面有无裂纹、严重腐蚀、明显变形及其他严重外部损伤缺陷
"
)
private
Integer
isComplete
;
@ApiModelProperty
(
value
=
"
新投入使用气瓶或经检验后首次投入使用气瓶,充装前按照规定先置换瓶内空气,并经分析合格后方可充气
"
)
private
String
isNewOrInspectedOk
;
@ApiModelProperty
(
value
=
"
气瓶的安全附件齐全并符合安全要求
"
)
private
Integer
haveSecurityDocuments
;
@ApiModelProperty
(
value
=
"
充装介质与气瓶钢印标志气体名称是否一致
"
)
private
String
isFillingMediumConsistentWithStamp
;
@ApiModelProperty
(
value
=
"检查人员姓名"
)
private
String
inspectorUser
;
@ApiModelProperty
(
value
=
"气瓶瓶阀的出气口螺纹型式是符合GB/T15383的规定"
)
@TableField
(
value
=
"outlet_thread_type_complies_gb15383"
)
private
String
outletThreadTypeCompliesGB15383
;
@ApiModelProperty
(
value
=
"检查时间"
)
private
String
inspectionDate
;
@ApiModelProperty
(
value
=
"充装可燃、氧化性气体,如无余压保持阀,重复充装前应先进行抽真空处理"
)
private
String
isVacuumProcessed
;
@ApiModelProperty
(
value
=
"气瓶外表面无严重腐蚀"
)
private
String
hasNoSevereCorrosion
;
@ApiModelProperty
(
value
=
"气瓶外表面无损伤缺陷"
)
private
String
hasNoSurfaceDefects
;
@ApiModelProperty
(
value
=
"气瓶外表面的颜色标志符合GB/T7144的规定、且清晰易认"
)
@TableField
(
value
=
"color_meets_gb7144"
)
private
String
colorMeetsGB7144
;
@ApiModelProperty
(
value
=
"气瓶外表面无裂纹"
)
private
String
hasNoCracks
;
@ApiModelProperty
(
value
=
"气瓶外表面无明显变形"
)
private
String
hasNoObviousDeformation
;
@ApiModelProperty
(
value
=
"瓶体、瓶阀无沾染油脂或其他可燃物"
)
private
String
noOilOrFlammableSubstances
;
@ApiModelProperty
(
value
=
"瓶体无腐蚀、机械损伤等表面缺陷、是否满足GB13076标准报废"
)
@TableField
(
value
=
"meets_gb13076_and_mechanical_damage"
)
private
String
meetsGB13076AndMechanicalDamage
;
@ApiModelProperty
(
value
=
"易熔合金无融熔、流失、损伤的"
)
private
String
fusiblePlugUndamaged
;
@ApiModelProperty
(
value
=
"钢印标记完整且能够识别"
)
private
String
stampMarkingsClearAndComplete
;
@ApiModelProperty
(
value
=
"附件完整且符合规定"
)
private
String
accessoriesCompleteAndConforming
;
@ApiModelProperty
(
value
=
"瓶阀侧接嘴处积无炭黑或焦油等异物"
)
private
String
noCarbonBlackOrTarAtValvePort
;
@ApiModelProperty
(
value
=
"瓶内的填料、溶剂的质量没有问题"
)
private
String
fillerAndSolventQualityOk
;
@ApiModelProperty
(
value
=
"无其他影响安全使用缺陷的"
)
private
String
noOtherSafetyAffectingDefects
;
@ApiModelProperty
(
value
=
"充装间温度"
)
private
Double
fillingRoomTemperature
;
@ApiModelProperty
(
value
=
"剩余压力"
)
private
Double
residualPressure
;
@ApiModelProperty
(
value
=
"丙酮补加量"
)
private
Double
acetoneSupplementAmount
;
@ApiModelProperty
(
value
=
"钢印、警示标签与待充介质名称一致"
)
private
String
isStampAndLabelConsistentWithMedium
;
@ApiModelProperty
(
value
=
"外表面颜色标志符合规定"
)
private
String
externalColorMarkingCompliant
;
@ApiModelProperty
(
value
=
"瓶阀出气口螺纹符合要求"
)
private
String
valveOutletThreadComplies
;
@ApiModelProperty
(
value
=
"外表面无严重损伤缺陷"
)
private
String
hasNoSevereSurfaceDefects
;
@ApiModelProperty
(
value
=
"气瓶附件符合要求"
)
private
String
cylinderAccessoriesMeetRequirements
;
@ApiModelProperty
(
value
=
"氧化性混合气体的瓶体、瓶阀未沾染油脂"
)
private
String
oxidizingGasCylinderFreeOfOil
;
@ApiModelProperty
(
value
=
"
同步时间 yyyy-MM-dd HH24:mi:ss
"
)
private
Date
syncDate
;
@ApiModelProperty
(
value
=
"
气瓶经预处理(抽真空、烘干、置换或组合)合格
"
)
private
String
preTreatedSuccessfully
;
@ApiModelProperty
(
value
=
"
0-新增 1-更新 2-删除
"
)
private
Integer
syncStat
e
;
@ApiModelProperty
(
value
=
"
气瓶表面无油污、无严重损伤
"
)
private
String
surfaceFreeOfOilAndDamag
e
;
@ApiModelProperty
(
value
=
"
对接公司编码
"
)
private
String
appId
;
@ApiModelProperty
(
value
=
"
瓶阀完好、接头洁净无水或冰
"
)
private
String
valveInGoodConditionCleanConnection
;
@ApiModelProperty
(
value
=
"
数据完整度
"
)
private
Double
integrity
;
@ApiModelProperty
(
value
=
"
无余压的瓶用洁净的待充气体吹扫(易燃的先用液氮置换)
"
)
private
String
emptyPressureCylinderPurgedWithCleanGas
;
@ApiModelProperty
(
value
=
"
统一社会信用代码
"
)
private
String
creditCode
;
@ApiModelProperty
(
value
=
"
瓶阀出气口为内螺纹(左旋)
"
)
private
String
valveOutletInternalThreadLeftHanded
;
@ApiModelProperty
(
value
=
"
新投入使用气瓶或经检验后首次投入使用气瓶,充装前应按照规定先置换瓶内空气,并经分析合格后方可充气
"
)
private
String
fillBeforeItem
;
@ApiModelProperty
(
value
=
"
有余压的经定性鉴别且与待充介质一致
"
)
private
String
qualitativeTestPassedForResidualGas
;
@ApiModelProperty
(
value
=
"
检查结果
"
)
private
String
checkResults
;
@ApiModelProperty
(
value
=
"
无余压的经卸阀内检合格
"
)
private
String
internalValveInspectionPassed
;
@ApiModelProperty
(
value
=
"
不合格项
"
)
private
String
nonconformances
;
@ApiModelProperty
(
value
=
"
气瓶安全附件齐全并符合安全要求
"
)
private
String
safetyAccessoriesCompleteAndSafe
;
@ApiModelProperty
(
value
=
"
对接接口版本
"
)
private
String
version
=
"v1"
;
@ApiModelProperty
(
value
=
"
首充气瓶已置换瓶内空气
"
)
private
String
newCylinderAirReplacedBeforeFirstUse
;
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/entity/CylinderFillingBaseEntity.java
0 → 100644
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
boot
.
module
.
cylinder
.
flc
.
api
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
java.util.Date
;
/**
* 气瓶充装信息--充装前检查
*
* @author duanwei
* @date 2022-08-11
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
public
class
CylinderFillingBaseEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"气瓶唯一标识码,制造单位统一信用代码-出厂编号"
)
private
String
sequenceCode
;
@ApiModelProperty
(
value
=
"气瓶类型"
)
private
String
cylinderType
;
@ApiModelProperty
(
value
=
"充装前检查Id"
)
private
String
fillingBeforeId
;
@ApiModelProperty
(
value
=
"作业人员证书编号"
)
private
String
inspectorUserNum
;
@ApiModelProperty
(
value
=
"作业人员姓名"
)
private
String
inspectorUser
;
@ApiModelProperty
(
value
=
"充装企业名称"
)
private
String
fillingUnitName
;
@ApiModelProperty
(
value
=
"同步时间 yyyy-MM-dd HH24:mi:ss"
)
private
Date
syncDate
;
@ApiModelProperty
(
value
=
"0-新增 1-更新 2-删除"
)
private
Integer
syncState
;
@ApiModelProperty
(
value
=
"对接公司编码"
)
private
String
appId
;
@ApiModelProperty
(
value
=
"数据完整度"
)
private
Double
integrity
;
@ApiModelProperty
(
value
=
"充装企业统一社会信用代码"
)
private
String
fillingUnitCreditCode
;
@ApiModelProperty
(
value
=
"对接接口版本"
)
private
String
version
=
"v1"
;
@ApiModelProperty
(
value
=
"更新人员"
)
private
String
recUserName
;
@ApiModelProperty
(
value
=
"是否删除"
)
private
boolean
isDelete
;
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/entity/CylinderFillingCheck.java
View file @
fa1ac393
...
...
@@ -6,7 +6,6 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
java.util.Date
;
...
...
@@ -21,58 +20,68 @@ import java.util.Date;
@Accessors
(
chain
=
true
)
@TableName
(
"tz_cylinder_filling_check"
)
@ApiModel
(
value
=
"TzCylinderFillingCheck对象"
,
description
=
"液化气体气瓶充装信息-充装后复查"
)
public
class
CylinderFillingCheck
extends
BaseEntity
{
public
class
CylinderFillingCheck
extends
CylinderFilling
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"气瓶唯一标识码"
)
private
String
sequenceCode
;
@ApiModelProperty
(
value
=
"检查时间"
)
private
Date
inspectionDate
;
@ApiModelProperty
(
value
=
"瓶体未出现鼓包变形或泄漏等严重缺陷"
)
private
String
isNoBulgingOrLeakage
;
@ApiModelProperty
(
value
=
"
充装后复查ID
"
)
private
String
fillingCheckId
;
@ApiModelProperty
(
value
=
"
瓶内压力正常
"
)
private
String
isPressureNormal
;
@ApiModelProperty
(
value
=
"
充装量在规定范围内
"
)
private
Integer
withinScope
;
@ApiModelProperty
(
value
=
"
瓶体温度没有异常升高的迹象
"
)
private
String
isTemperatureNormal
;
@ApiModelProperty
(
value
=
"瓶阀及其与瓶口连接的密封良好"
)
private
Integer
sealedState
;
private
String
valveSealIsGood
;
@ApiModelProperty
(
value
=
"
瓶体未出现鼓包变形或泄露等严重缺陷
"
)
private
Integer
defective
;
@ApiModelProperty
(
value
=
"
气瓶粘贴警示标签和充装标签)
"
)
private
String
hasWarningAndFillingLabels
;
@ApiModelProperty
(
value
=
"
瓶体温度没有异常升高的迹象
"
)
private
Integer
abnormalTemperature
;
@ApiModelProperty
(
value
=
"
充装量复秤未超重
"
)
private
String
reweighedWithinLimit
;
@ApiModelProperty
(
value
=
"
气瓶粘贴警示标签和充装标签
"
)
private
Integer
warningSign
;
@ApiModelProperty
(
value
=
"
瓶内压力(充装量)及质量符合安全技术规范及相关标准的要求
"
)
private
String
pressureAndMassMeetRegulations
;
@ApiModelProperty
(
value
=
"
液化气瓶充装量符合有关规定,充装后逐瓶称重
"
)
private
String
c
ompliance
;
@ApiModelProperty
(
value
=
"
瓶帽、充装标签、警示标签完整
"
)
private
String
c
apsAndLabelsAreIntact
;
@ApiModelProperty
(
value
=
"
检查人员姓名
"
)
private
String
inspector
;
@ApiModelProperty
(
value
=
"
瓶阀出气口螺纹及其密封面良好
"
)
private
String
valveSealedWell
;
@ApiModelProperty
(
value
=
"检查时间"
)
private
String
inspectionDate
;
@ApiModelProperty
(
value
=
"静置后压力符合规定"
)
private
String
pressureAfterRestingComplies
;
@ApiModelProperty
(
value
=
"气瓶未发生泄漏等问题"
)
private
String
noLeakageIssuesDetected
;
@ApiModelProperty
(
value
=
"处理结果是否合格"
)
private
String
isTreatmentResultQualified
;
@ApiModelProperty
(
value
=
"充装量(压力或质量)符合要求"
)
private
String
fillingAmountMeetsRequirement
;
@ApiModelProperty
(
value
=
"
同步时间 yyyy-MM-dd HH24:mi:ss
"
)
private
Date
syncDat
e
;
@ApiModelProperty
(
value
=
"
密封良好无泄漏
"
)
private
String
sealsIntactNoLeakag
e
;
@ApiModelProperty
(
value
=
"
0-新增 1-更新 2-删除
"
)
private
Integer
syncState
;
@ApiModelProperty
(
value
=
"
气瓶无变形等缺陷
"
)
private
String
noDeformationOrDefects
;
@ApiModelProperty
(
value
=
"
对接公司编码
"
)
private
String
appId
;
@ApiModelProperty
(
value
=
"
瓶体温升无异常
"
)
private
String
temperatureRiseNormal
;
@ApiModelProperty
(
value
=
"
数据完整度
"
)
private
Double
integrity
;
@ApiModelProperty
(
value
=
"
气瓶附件完整齐全
"
)
private
String
cylinderAccessoriesComplete
;
@ApiModelProperty
(
value
=
"
检查结果
"
)
private
String
checkResult
s
;
@ApiModelProperty
(
value
=
"
阀门已关闭,管路及各附件无漏气
"
)
private
String
valveClosedNoLeakageInPipingAndAccessorie
s
;
@ApiModelProperty
(
value
=
"
不合格项
"
)
private
String
no
nconformances
;
@ApiModelProperty
(
value
=
"
气瓶外观无结霜、结露
"
)
private
String
no
FrostOrCondensationOnCylinder
;
@ApiModelProperty
(
value
=
"对接接口版本"
)
private
String
version
=
"v1"
;
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/entity/CylinderFillingRecord.java
View file @
fa1ac393
...
...
@@ -7,7 +7,6 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
java.util.Date
;
...
...
@@ -22,63 +21,66 @@ import java.util.Date;
@Accessors
(
chain
=
true
)
@TableName
(
"tz_cylinder_filling_record"
)
@ApiModel
(
value
=
"TzCylinderFillingRecord对象"
,
description
=
"液化气体气瓶充装信息-充装记录"
)
public
class
CylinderFillingRecord
extends
BaseEntity
{
public
class
CylinderFillingRecord
extends
CylinderFilling
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"充装
记录Id
"
)
private
String
fillingRecordId
;
@ApiModelProperty
(
value
=
"充装
枪编号
"
)
private
String
gunNumber
;
@ApiModelProperty
(
value
=
"充装开始时间"
)
@TableField
(
"filling_starttime"
)
private
String
fillingStartt
ime
;
@TableField
(
"filling_start
_
time"
)
private
Date
fillingStartT
ime
;
@ApiModelProperty
(
value
=
"充装结束时间"
)
@TableField
(
"filling_endtime"
)
private
String
fillingEndt
ime
;
@TableField
(
"filling_end
_
time"
)
private
Date
fillingEndT
ime
;
@ApiModelProperty
(
value
=
"充装
人员姓名
"
)
private
String
fillingUser
;
@ApiModelProperty
(
value
=
"充装
量m3/(kg)
"
)
private
Double
fillingAmount
;
@ApiModelProperty
(
value
=
"
充装量(Kg)
"
)
private
Double
fillingQuantity
;
@ApiModelProperty
(
value
=
"
压力
"
)
private
Double
pressure
;
@ApiModelProperty
(
value
=
"室温"
)
private
Double
t
emperature
;
private
Double
ambientT
emperature
;
@ApiModelProperty
(
value
=
"异常情况"
)
private
Integer
abnormal
;
private
String
abnormalConditions
;
@ApiModelProperty
(
value
=
"
同步时间 yyyy-MM-dd HH24:mi:ss
"
)
private
Date
syncDat
e
;
@ApiModelProperty
(
value
=
"
瓶体温度无异常升高
"
)
private
String
isNoAbnormalTemperatureRis
e
;
@ApiModelProperty
(
value
=
"
1初次同步数据 2上层系统已同步数据 0已删除数据
"
)
private
Integer
syncStat
e
;
@ApiModelProperty
(
value
=
"
充装压力
"
)
private
Double
fillingPressur
e
;
@ApiModelProperty
(
value
=
"
对接公司编码
"
)
private
String
appId
;
@ApiModelProperty
(
value
=
"
瓶体温度一致
"
)
private
String
temperatureConsistent
;
@ApiModelProperty
(
value
=
"
数据完整度
"
)
private
Double
integrity
;
@ApiModelProperty
(
value
=
"
瓶内无异常音响
"
)
private
String
noAbnormalSoundInside
;
@ApiModelProperty
(
value
=
"
不能与充装人员姓名相同
"
)
private
String
inspectorName
;
@ApiModelProperty
(
value
=
"
瓶阀及各连接部位的密封良好
"
)
private
String
valveSealedWell
;
@ApiModelProperty
(
value
=
"充装
前检查Id
"
)
private
String
filling
BeforeId
;
@ApiModelProperty
(
value
=
"充装
压力≤2.5 MPa
"
)
private
String
filling
PressureLessThan
;
@ApiModelProperty
(
value
=
"
充装后复查ID
"
)
private
String
fillingCheckId
;
@ApiModelProperty
(
value
=
"
乙炔充装量
"
)
private
Double
acetyleneFillingAmount
;
@ApiModelProperty
(
value
=
"
充装信息审核ID
"
)
private
String
fillingExamineId
;
@ApiModelProperty
(
value
=
"
各组分含量
"
)
private
Double
componentContents
;
@ApiModelProperty
(
value
=
"
是否保存到es(1标识已经保存过)
"
)
private
String
isNotEs
;
@ApiModelProperty
(
value
=
"
标称皮重
"
)
private
Double
tareWeightNominal
;
@ApiModelProperty
(
value
=
"
气瓶唯一标识码
"
)
private
String
sequenceCode
;
@ApiModelProperty
(
value
=
"
充装后质量
"
)
private
Double
filledWeight
;
@ApiModelProperty
(
value
=
"对接接口版本"
)
private
String
version
=
"v1"
;
@ApiModelProperty
(
value
=
"实际充装量"
)
private
Double
actualFillingAmount
;
@ApiModelProperty
(
value
=
"含余气皮重"
)
private
Double
tareWeightIncludingResidualGas
;
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/mapper/CylinderInfoMapper.java
View file @
fa1ac393
...
...
@@ -9,6 +9,7 @@ import org.apache.ibatis.annotations.Param;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
/**
* 气瓶基本信息 Mapper 接口
...
...
@@ -126,5 +127,7 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
List
<
CylinderFillingRecordStatisticsDto
>
queryFillingRecordByOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"startTime"
)
String
startTime
);
List
<
CylinderFillingRecordStatisticsDto
>
queryoffloadingByOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"startTime"
)
String
startTime
);
List
<
Map
<
String
,
String
>>
queryTzsCylinderInfo
(
@Param
(
"produceUnitCreditCodes"
)
Set
<
String
>
produceUnitCreditCodes
,
@Param
(
"factoryNums"
)
Set
<
String
>
factoryNums
);
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/resources/mapper/CylCylinderFillingCheckMapper.xml
View file @
fa1ac393
...
...
@@ -141,31 +141,73 @@
LIMIT 1000
</select>
<insert
id=
"saveAndBatchInsert"
parameterType=
"com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderFillingRecord"
>
<insert
id=
"saveAndBatchInsert"
parameterType=
"com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderFillingRecord"
>
INSERT INTO "amos_tzs_biz".tz_cylinder_filling( sequence_nbr,
filling_before_id,
filling_unit_name,
sequence_code,
is_valid,
same,
is_regulations,
is_compliance_withgbt,
have_still_pressure,
is_complete,
have_security_documents,
inspector_user,
inspection_date,
rec_date,
rec_user_id,
car_number,
is_cylinder_gas_consistent,
filling_medium,
has_severe_external_damage,
has_residual_pressure,
is_gas_leak,
are_accessories_complete_and_safe,
exclude_overdue_refurbished_scrapped_cylinders,
is_warning_label_gas_name_consistent_with_stamp,
is_color_marking_compliant,
valve_complies_gb7512,
has_no_severe_external_damage,
is_new_or_inspected_ok,
is_filling_medium_consistent_with_stamp,
outlet_thread_type_complies_gb15383,
is_vacuum_processed,
has_no_severe_corrosion,
has_no_surface_defects,
color_meets_gb7144,
has_no_cracks,
has_no_obvious_deformation,
no_oil_or_flammable_substances,
meets_gb13076_and_mechanical_damage,
fusible_plug_undamaged,
stamp_markings_clear_and_complete,
accessories_complete_and_conforming,
no_carbon_black_or_tar_at_valve_port,
filler_and_solvent_quality_ok,
no_other_safety_affecting_defects,
filling_room_temperature,
residual_pressure,
acetone_supplement_amount,
is_stamp_and_label_consistent_with_medium,
external_color_marking_compliant,
valve_outlet_thread_complies,
has_no_severe_surface_defects,
cylinder_accessories_meet_requirements,
oxidizing_gas_cylinder_free_of_oil,
pre_treated_successfully,
surface_free_of_oil_and_damage,
valve_in_good_condition_clean_connection,
empty_pressure_cylinder_purged_with_clean_gas,
valve_outlet_internal_thread_left_handed,
qualitative_test_passed_for_residual_gas,
internal_valve_inspection_passed,
safety_accessories_complete_and_safe,
new_cylinder_air_replaced_before_first_use,
cylinder_type,
inspector_user_num,
inspector_user,
sync_date,
sync_state,
app_id,
integrity,
credit_code,
fill_before_item,
check_results,
nonconformances,
version
filling_unit_credit_code,
version,
rec_date,
rec_user_id,
rec_user_name,
is_delete
) VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
...
...
@@ -173,53 +215,135 @@
#{item.fillingBeforeId},
#{item.fillingUnitName},
#{item.sequenceCode},
#{item.isValid},
#{item.same},
#{item.isRegulations},
#{item.isComplianceWithgbt},
#{item.haveStillPressure},
#{item.isComplete},
#{item.haveSecurityDocuments},
#{item.inspectorUser},
#{item.inspectionDate},
#{item.recDate},
#{item.recUserId},
#{item.carNumber},
#{item.isCylinderGasConsistent},
#{item.fillingMedium},
#{item.hasSevereExternalDamage},
#{item.hasResidualPressure},
#{item.isGasLeak},
#{item.areAccessoriesCompleteAndSafe},
#{item.excludeOverdueRefurbishedScrappedCylinders},
#{item.isWarningLabelGasNameConsistentWithStamp},
#{item.isColorMarkingCompliant},
#{item.valveCompliesGB7512},
#{item.hasNoSevereExternalDamage},
#{item.isNewOrInspectedOk},
#{item.isFillingMediumConsistentWithStamp},
#{item.outletThreadTypeCompliesGB15383},
#{item.isVacuumProcessed},
#{item.hasNoSevereCorrosion},
#{item.hasNoSurfaceDefects},
#{item.colorMeetsGB7144},
#{item.hasNoCracks},
#{item.hasNoObviousDeformation},
#{item.noOilOrFlammableSubstances},
#{item.meetsGB13076AndMechanicalDamage},
#{item.fusiblePlugUndamaged},
#{item.stampMarkingsClearAndComplete},
#{item.accessoriesCompleteAndConforming},
#{item.noCarbonBlackOrTarAtValvePort},
#{item.fillerAndSolventQualityOk},
#{item.noOtherSafetyAffectingDefects},
#{item.fillingRoomTemperature},
#{item.residualPressure},
#{item.acetoneSupplementAmount},
#{item.isStampAndLabelConsistentWithMedium},
#{item.externalColorMarkingCompliant},
#{item.valveOutletThreadComplies},
#{item.hasNoSevereSurfaceDefects},
#{item.cylinderAccessoriesMeetRequirements},
#{item.oxidizingGasCylinderFreeOfOil},
#{item.preTreatedSuccessfully},
#{item.surfaceFreeOfOilAndDamage},
#{item.valveInGoodConditionCleanConnection},
#{item.emptyPressureCylinderPurgedWithCleanGas},
#{item.valveOutletInternalThreadLeftHanded},
#{item.qualitativeTestPassedForResidualGas},
#{item.internalValveInspectionPassed},
#{item.safetyAccessoriesCompleteAndSafe},
#{item.newCylinderAirReplacedBeforeFirstUse},
#{item.cylinderType},
#{item.inspectorUserNum},
#{item.inspectorUser},
#{item.syncDate},
'3'
,
#{item.syncState}
,
#{item.appId},
#{item.integrity},
#{item.creditCode},
#{item.fillBeforeItem},
#{item.checkResults},
#{item.nonconformances},
#{item.version}
#{item.fillingUnitCreditCode},
#{item.version},
#{item.recDate},
#{item.recUserId},
#{item.recUserName},
#{item.isDelete}
)
</foreach>
on conflict (app_id, filling_before_id,sequence_code) do update set
on conflict (app_id, filling_before_id,
sequence_code) do update set
sequence_nbr = EXCLUDED.sequence_nbr,
filling_before_id = EXCLUDED.filling_before_id,
filling_unit_name = EXCLUDED.filling_unit_name,
sequence_code = EXCLUDED.sequence_code,
is_valid = EXCLUDED.is_valid,
same = EXCLUDED.same,
is_regulations = EXCLUDED.is_regulations,
is_compliance_withgbt = EXCLUDED.is_compliance_withgbt,
have_still_pressure = EXCLUDED.have_still_pressure,
is_complete = EXCLUDED.is_complete,
have_security_documents = EXCLUDED.have_security_documents,
inspector_user = EXCLUDED.inspector_user,
inspection_date = EXCLUDED.inspection_date,
rec_date = EXCLUDED.rec_date,
rec_user_id = EXCLUDED.rec_user_id,
car_number = EXCLUDED.car_number,
is_cylinder_gas_consistent = EXCLUDED.is_cylinder_gas_consistent,
filling_medium = EXCLUDED.filling_medium,
has_severe_external_damage = EXCLUDED.has_severe_external_damage,
has_residual_pressure = EXCLUDED.has_residual_pressure,
is_gas_leak = EXCLUDED.is_gas_leak,
are_accessories_complete_and_safe = EXCLUDED.are_accessories_complete_and_safe,
exclude_overdue_refurbished_scrapped_cylinders = EXCLUDED.exclude_overdue_refurbished_scrapped_cylinders,
is_warning_label_gas_name_consistent_with_stamp = EXCLUDED.is_warning_label_gas_name_consistent_with_stamp,
is_color_marking_compliant = EXCLUDED.is_color_marking_compliant,
valve_complies_gb7512 = EXCLUDED.valve_complies_gb7512,
has_no_severe_external_damage = EXCLUDED.has_no_severe_external_damage,
is_new_or_inspected_ok = EXCLUDED.is_new_or_inspected_ok,
is_filling_medium_consistent_with_stamp = EXCLUDED.is_filling_medium_consistent_with_stamp,
outlet_thread_type_complies_gb15383 = EXCLUDED.outlet_thread_type_complies_gb15383,
is_vacuum_processed = EXCLUDED.is_vacuum_processed,
has_no_severe_corrosion = EXCLUDED.has_no_severe_corrosion,
has_no_surface_defects = EXCLUDED.has_no_surface_defects,
color_meets_gb7144 = EXCLUDED.color_meets_gb7144,
has_no_cracks = EXCLUDED.has_no_cracks,
has_no_obvious_deformation = EXCLUDED.has_no_obvious_deformation,
no_oil_or_flammable_substances = EXCLUDED.no_oil_or_flammable_substances,
meets_gb13076_and_mechanical_damage = EXCLUDED.meets_gb13076_and_mechanical_damage,
fusible_plug_undamaged = EXCLUDED.fusible_plug_undamaged,
stamp_markings_clear_and_complete = EXCLUDED.stamp_markings_clear_and_complete,
accessories_complete_and_conforming = EXCLUDED.accessories_complete_and_conforming,
no_carbon_black_or_tar_at_valve_port = EXCLUDED.no_carbon_black_or_tar_at_valve_port,
filler_and_solvent_quality_ok = EXCLUDED.filler_and_solvent_quality_ok,
no_other_safety_affecting_defects = EXCLUDED.no_other_safety_affecting_defects,
filling_room_temperature = EXCLUDED.filling_room_temperature,
residual_pressure = EXCLUDED.residual_pressure,
acetone_supplement_amount = EXCLUDED.acetone_supplement_amount,
is_stamp_and_label_consistent_with_medium = EXCLUDED.is_stamp_and_label_consistent_with_medium,
external_color_marking_compliant = EXCLUDED.external_color_marking_compliant,
valve_outlet_thread_complies = EXCLUDED.valve_outlet_thread_complies,
has_no_severe_surface_defects = EXCLUDED.has_no_severe_surface_defects,
cylinder_accessories_meet_requirements = EXCLUDED.cylinder_accessories_meet_requirements,
oxidizing_gas_cylinder_free_of_oil = EXCLUDED.oxidizing_gas_cylinder_free_of_oil,
pre_treated_successfully = EXCLUDED.pre_treated_successfully,
surface_free_of_oil_and_damage = EXCLUDED.surface_free_of_oil_and_damage,
valve_in_good_condition_clean_connection = EXCLUDED.valve_in_good_condition_clean_connection,
empty_pressure_cylinder_purged_with_clean_gas = EXCLUDED.empty_pressure_cylinder_purged_with_clean_gas,
valve_outlet_internal_thread_left_handed = EXCLUDED.valve_outlet_internal_thread_left_handed,
qualitative_test_passed_for_residual_gas = EXCLUDED.qualitative_test_passed_for_residual_gas,
internal_valve_inspection_passed = EXCLUDED.internal_valve_inspection_passed,
safety_accessories_complete_and_safe = EXCLUDED.safety_accessories_complete_and_safe,
new_cylinder_air_replaced_before_first_use = EXCLUDED.new_cylinder_air_replaced_before_first_use,
cylinder_type = EXCLUDED.cylinder_type,
inspector_user_num = EXCLUDED.inspector_user_num,
inspector_user = EXCLUDED.inspector_user,
sync_date = EXCLUDED.sync_date,
sync_state = EXCLUDED.sync_state,
app_id = EXCLUDED.app_id,
integrity = EXCLUDED.integrity,
credit_code = EXCLUDED.credit_code,
fill_before_item = EXCLUDED.fill_before_item,
check_results = EXCLUDED.check_results,
nonconformances = EXCLUDED.nonconformances,
version = EXCLUDED.version
filling_unit_credit_code = EXCLUDED.filling_unit_credit_code,
version = EXCLUDED.version,
rec_date = EXCLUDED.rec_date,
rec_user_id = EXCLUDED.rec_user_id,
rec_user_name = EXCLUDED.rec_user_name,
is_delete = EXCLUDED.is_delete
</insert>
<select
id=
"selectCountTotal"
resultType=
"java.lang.Long"
>
SELECT
...
...
@@ -243,74 +367,116 @@
</select>
<insert
id=
"batchInsertOrUpdate"
>
<insert
id=
"batchInsertOrUpdate"
>
INSERT INTO "amos_tzs_biz".tz_cylinder_filling_record (sequence_nbr,
filling_record_id,
filling_starttime,
filling_endtime,
filling_user,
filling_quantity,
temperature,
abnormal,
filling_start_time,
filling_end_time,
filling_amount,
pressure,
ambient_temperature,
abnormal_conditions,
is_no_abnormal_temperature_rise,
filling_pressure,
temperature_consistent,
no_abnormal_sound_inside,
valve_sealed_well,
filling_pressure_less_than,
acetylene_filling_amount,
component_contents,
tare_weight_nominal,
filled_weight,
actual_filling_amount,
tare_weight_including_residual_gas,
gun_number,
rec_date,
rec_user_id,
rec_user_name,
sync_date,
sync_state,
app_id,
integrity,
inspector_name,
filling_before_id,
filling_check_id,
filling_examine_id,
is_not_es,
sequence_code,
version)
cylinder_type,
inspector_user_num,
inspector_user,
filling_unit_name,
filling_unit_credit_code,
version,
is_delete)
VALUES
<foreach
collection =
"list"
item=
"item"
index=
"index"
separator
=
","
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator
=
","
>
(#{item.sequenceNbr},
#{item.fillingRecordId},
#{item.fillingStarttime},
#{item.fillingEndtime},
#{item.fillingUser},
#{item.fillingQuantity},
#{item.temperature},
#{item.abnormal},
#{item.fillingStartTime},
#{item.fillingEndTime},
#{item.fillingAmount},
#{item.pressure},
#{item.ambientTemperature},
#{item.abnormalConditions},
#{item.isNoAbnormalTemperatureRise},
#{item.fillingPressure},
#{item.temperatureConsistent},
#{item.noAbnormalSoundInside},
#{item.valveSealedWell},
#{item.fillingPressureLessThan},
#{item.acetyleneFillingAmount},
#{item.componentContents},
#{item.tareWeightNominal},
#{item.filledWeight},
#{item.actualFillingAmount},
#{item.tareWeightIncludingResidualGas},
#{item.gunNumber},
#{item.recDate},
#{item.recUserId},
#{item.recUserName},
#{item.syncDate},
#{item.syncState},
#{item.appId},
#{item.integrity},
#{item.inspectorName},
#{item.fillingBeforeId},
#{item.fillingCheckId},
#{item.fillingExamineId},
null,
#{item.sequenceCode},
#{item.version})
#{item.cylinderType},
#{item.inspectorUserNum},
#{item.inspectorUser},
#{item.fillingUnitName},
#{item.fillingUnitCreditCode},
#{item.version},
#{item.isDelete})
</foreach>
on conflict (app_id, sequence_code, filling_record
_id) do update set
on conflict (app_id, sequence_code, filling_before
_id) do update set
sequence_nbr = EXCLUDED.sequence_nbr,
filling_record_id = EXCLUDED.filling_record_id,
filling_starttime = EXCLUDED.filling_starttime,
filling_endtime = EXCLUDED.filling_endtime,
filling_user = EXCLUDED.filling_user,
filling_quantity = EXCLUDED.filling_quantity,
temperature = EXCLUDED.temperature,
abnormal = EXCLUDED.abnormal,
filling_start_time = EXCLUDED.filling_start_time,
filling_end_time = EXCLUDED.filling_end_time,
filling_amount = EXCLUDED.filling_amount,
pressure = EXCLUDED.pressure,
ambient_temperature = EXCLUDED.ambient_temperature,
abnormal_conditions = EXCLUDED.abnormal_conditions,
is_no_abnormal_temperature_rise = EXCLUDED.is_no_abnormal_temperature_rise,
filling_pressure = EXCLUDED.filling_pressure,
temperature_consistent = EXCLUDED.temperature_consistent,
no_abnormal_sound_inside = EXCLUDED.no_abnormal_sound_inside,
valve_sealed_well = EXCLUDED.valve_sealed_well,
filling_pressure_less_than = EXCLUDED.filling_pressure_less_than,
acetylene_filling_amount = EXCLUDED.acetylene_filling_amount,
component_contents = EXCLUDED.component_contents,
tare_weight_nominal = EXCLUDED.tare_weight_nominal,
filled_weight = EXCLUDED.filled_weight,
actual_filling_amount = EXCLUDED.actual_filling_amount,
tare_weight_including_residual_gas = EXCLUDED.tare_weight_including_residual_gas,
gun_number = EXCLUDED.gun_number,
rec_date = EXCLUDED.rec_date,
rec_user_id = EXCLUDED.rec_user_id,
rec_user_name = EXCLUDED.rec_user_name,
sync_date = EXCLUDED.sync_date,
sync_state = EXCLUDED.sync_state,
app_id = EXCLUDED.app_id,
integrity = EXCLUDED.integrity,
inspector_name = EXCLUDED.inspector_name,
filling_before_id = EXCLUDED.filling_before_id,
filling_check_id = EXCLUDED.filling_check_id,
filling_examine_id = EXCLUDED.filling_examine_id,
is_not_es = null,
sequence_code = EXCLUDED.sequence_code,
version = EXCLUDED.version
cylinder_type = EXCLUDED.cylinder_type,
inspector_user_num = EXCLUDED.inspector_user_num,
inspector_user = EXCLUDED.inspector_user,
filling_unit_name = EXCLUDED.filling_unit_name,
filling_unit_credit_code = EXCLUDED.filling_unit_credit_code,
version = EXCLUDED.version,
is_delete = EXCLUDED.is_delete
</insert>
<update
id=
"updateSyncState"
>
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/resources/mapper/CylinderFillingCheckMapper.xml
View file @
fa1ac393
...
...
@@ -4,75 +4,126 @@
<insert
id=
"saveOrUpdateByCondition"
>
INSERT INTO "amos_tzs_biz"."tz_cylinder_filling_check" (
"sequence_nbr",
"filling_check_id",
"within_scope",
"sealed_state",
"defective",
"abnormal_temperature",
"warning_sign",
"compliance",
"inspector",
"inspection_date",
"rec_date",
"rec_user_id",
"rec_user_name",
"is_delete",
"sequence_code",
"cylinder_type",
"filling_before_id",
"inspector_user_num",
"inspector_user",
"filling_unit_name",
"sync_date",
"sync_state",
"app_id",
"integrity",
"check_results",
"nonconformances",
"sequence_code",
"version"
"filling_unit_credit_code",
"version",
"inspection_date",
"is_no_bulging_or_leakage",
"is_pressure_normal",
"is_temperature_normal",
"valve_seal_is_good",
"has_warning_and_filling_labels",
"reweighed_within_limit",
"pressure_and_mass_meet_regulations",
"caps_and_labels_are_intact",
"valve_sealed_well",
"pressure_after_resting_complies",
"no_leakage_issues_detected",
"is_treatment_result_qualified",
"filling_amount_meets_requirement",
"seals_intact_no_leakage",
"no_deformation_or_defects",
"temperature_rise_normal",
"cylinder_accessories_complete",
"valve_closed_no_leakage_in_piping_and_accessories",
"no_frost_or_condensation_on_cylinder"
)
VALUES
<foreach
collection =
"list"
item=
"item"
index=
"index"
separator =
","
>
(
#{item.sequenceNbr},
#{item.fillingCheckId},
#{item.withinScope},
#{item.sealedState},
#{item.defective},
#{item.abnormalTemperature},
#{item.warningSign},
#{item.compliance},
#{item.inspector},
#{item.inspectionDate},
#{item.recDate},
#{item.recUserId},
#{item.recUserName},
#{item.isDelete},
#{item.sequenceCode},
#{item.cylinderType},
#{item.fillingBeforeId},
#{item.inspectorUserNum},
#{item.inspectorUser},
#{item.fillingUnitName},
#{item.syncDate},
#{item.syncState},
#{item.appId},
#{item.integrity},
#{item.checkResults},
#{item.nonconformances},
#{item.sequenceCode},
#{item.version}
#{item.fillingUnitCreditCode},
#{item.version},
#{item.inspectionDate},
#{item.isNoBulgingOrLeakage},
#{item.isPressureNormal},
#{item.isTemperatureNormal},
#{item.valveSealIsGood},
#{item.hasWarningAndFillingLabels},
#{item.reweighedWithinLimit},
#{item.pressureAndMassMeetRegulations},
#{item.capsAndLabelsAreIntact},
#{item.valveSealedWell},
#{item.pressureAfterRestingComplies},
#{item.noLeakageIssuesDetected},
#{item.isTreatmentResultQualified},
#{item.fillingAmountMeetsRequirement},
#{item.sealsIntactNoLeakage},
#{item.noDeformationOrDefects},
#{item.temperatureRiseNormal},
#{item.cylinderAccessoriesComplete},
#{item.valveClosedNoLeakageInPipingAndAccessories},
#{item.noFrostOrCondensationOnCylinder}
)
</foreach>
ON conflict (app_id, sequence_code
, filling_check_id
) DO
ON conflict (app_id, sequence_code) DO
UPDATE
SET "sequence_nbr" = EXCLUDED."sequence_nbr",
"filling_check_id" = EXCLUDED."filling_check_id",
"within_scope" = EXCLUDED."within_scope",
"sealed_state" = EXCLUDED."sealed_state",
"defective" = EXCLUDED."defective",
"abnormal_temperature" = EXCLUDED."abnormal_temperature",
"warning_sign" = EXCLUDED."warning_sign",
"compliance" = EXCLUDED."compliance",
"inspector" = EXCLUDED."inspector",
"inspection_date" = EXCLUDED."inspection_date",
"rec_date" = EXCLUDED."rec_date",
SET "rec_date" = EXCLUDED."rec_date",
"rec_user_id" = EXCLUDED."rec_user_id",
"rec_user_name" = EXCLUDED."rec_user_name",
"is_delete" = EXCLUDED."is_delete",
"sequence_code" = EXCLUDED."sequence_code",
"cylinder_type" = EXCLUDED."cylinder_type",
"filling_before_id" = EXCLUDED."filling_before_id",
"inspector_user_num" = EXCLUDED."inspector_user_num",
"inspector_user" = EXCLUDED."inspector_user",
"filling_unit_name" = EXCLUDED."filling_unit_name",
"sync_date" = EXCLUDED."sync_date",
"sync_state" = EXCLUDED."sync_state",
"app_id" = EXCLUDED."app_id",
"integrity" = EXCLUDED."integrity",
"check_results" = EXCLUDED."check_results",
"nonconformances" = EXCLUDED."nonconformances",
"sequence_code" = EXCLUDED."sequence_code",
"version" = EXCLUDED."version"
"filling_unit_credit_code" = EXCLUDED."filling_unit_credit_code",
"version" = EXCLUDED."version",
"inspection_date" = EXCLUDED."inspection_date",
"is_no_bulging_or_leakage" = EXCLUDED."is_no_bulging_or_leakage",
"is_pressure_normal" = EXCLUDED."is_pressure_normal",
"is_temperature_normal" = EXCLUDED."is_temperature_normal",
"valve_seal_is_good" = EXCLUDED."valve_seal_is_good",
"has_warning_and_filling_labels" = EXCLUDED."has_warning_and_filling_labels",
"reweighed_within_limit" = EXCLUDED."reweighed_within_limit",
"pressure_and_mass_meet_regulations" = EXCLUDED."pressure_and_mass_meet_regulations",
"caps_and_labels_are_intact" = EXCLUDED."caps_and_labels_are_intact",
"valve_sealed_well" = EXCLUDED."valve_sealed_well",
"pressure_after_resting_complies" = EXCLUDED."pressure_after_resting_complies",
"no_leakage_issues_detected" = EXCLUDED."no_leakage_issues_detected",
"is_treatment_result_qualified" = EXCLUDED."is_treatment_result_qualified",
"filling_amount_meets_requirement" = EXCLUDED."filling_amount_meets_requirement",
"seals_intact_no_leakage" = EXCLUDED."seals_intact_no_leakage",
"no_deformation_or_defects" = EXCLUDED."no_deformation_or_defects",
"temperature_rise_normal" = EXCLUDED."temperature_rise_normal",
"cylinder_accessories_complete" = EXCLUDED."cylinder_accessories_complete",
"valve_closed_no_leakage_in_piping_and_accessories" = EXCLUDED."valve_closed_no_leakage_in_piping_and_accessories",
"no_frost_or_condensation_on_cylinder" = EXCLUDED."no_frost_or_condensation_on_cylinder"
</insert>
<select
id=
"queryIntegirtyByAppId"
resultType=
"java.lang.Double"
>
SELECT AVG(integrity) AS score_avg FROM tz_cylinder_filling_check t where t.app_id = #{appId} AND
DATE_SUB(CURDATE(), INTERVAL 30 DAY)
<![CDATA[ <= ]]>
date_format(t.sync_date,'%Y-%M-%d');
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/resources/mapper/CylinderInfoMapper.xml
View file @
fa1ac393
...
...
@@ -647,4 +647,39 @@
ORDER BY
filling_time DESC
</select>
<select
id=
"queryTzsCylinderInfo"
resultType=
"java.util.Map"
>
SELECT
ui."RECORD" record,
ui."ESTATE_UNIT_NAME" estateUnitName,
ui."EQU_STATE" cylinderStatus,
(select name from cb_data_dictionary where type = 'SHZT' and code = ui."EQU_STATE") cylinderStatusName,
ri."USE_ORG_CODE" useOrgCode,
ri."EQU_DEFINE" equDefine,
(select name from tz_equipment_category where code = ri."EQU_DEFINE") equDefineName,
ui."USE_INNER_CODE" unitInnerCode,
fi."FACTORY_NUM" factoryNum,
oi."ORG_BRANCH_CODE" orgBranchCode,
oi."ORG_BRANCH_NAME" orgBranchName,
concat ( fi."PRODUCE_UNIT_CREDIT_CODE", '-', fi."FACTORY_NUM" ) sequenceCode
FROM
idx_biz_jg_use_info ui
LEFT JOIN idx_biz_jg_factory_info fi ON fi."RECORD" = ui."RECORD"
LEFT JOIN idx_biz_jg_register_info ri ON ri."RECORD" = ui."RECORD"
LEFT JOIN idx_biz_jg_supervision_info oi ON oi."RECORD" = ui."RECORD"
WHERE
ri."EQU_CATEGORY" = '2300'
and ri."USE_ORG_CODE" is not null
and fi."PRODUCE_UNIT_CREDIT_CODE" = ANY(ARRAY[
<foreach
collection=
"produceUnitCreditCodes"
item=
"code"
index=
"index"
separator=
","
>
#{code}
</foreach>
])
and fi."FACTORY_NUM" = ANY(ARRAY[
<foreach
collection=
"factoryNums"
item=
"num"
index=
"index"
separator=
","
>
#{num}
</foreach>
])
and ui."IS_INTO_MANAGEMENT" = true
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/service/impl/CylSyncServiceImpl.java
View file @
fa1ac393
package
com
.
yeejoin
.
amos
.
boot
.
module
.
cylinder
.
flc
.
biz
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.boot.module.cylinder.api.enums.CylDictEnum
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderFilling
;
...
...
@@ -19,7 +18,9 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.StopWatch
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.*
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
@Service
...
...
@@ -38,7 +39,7 @@ public class CylSyncServiceImpl {
@Autowired
private
CylCylinderFillingCheckMapper
cylCylinderFillingCheckMapper
;
@Scheduled
(
cron
=
"0 0 1 * * ?"
)
//
@Scheduled(cron = "0 0 1 * * ?")
@SchedulerLock
(
name
=
"syncFillingCheckInfo"
,
lockAtMostFor
=
"PT10H"
,
lockAtLeastFor
=
"PT60M"
)
public
void
syncFillingCheckInfo
()
{
// Integer totalSize = sourceFillingCheckServiceImpl.getFillCheckListTotal();
...
...
@@ -64,21 +65,21 @@ public class CylSyncServiceImpl {
if
(!
ValidationUtil
.
isEmpty
(
fillingChecks
))
{
HashSet
<
String
>
fillingCheckIdList
=
Sets
.
newHashSet
();
HashSet
<
String
>
appIdList
=
Sets
.
newHashSet
();
fillingChecks
.
forEach
(
e
->
{
e
.
setAbnormalTemperature
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
e
.
getAbnormalTemperature
(),
CylDictEnum
.
abnormalTemperature_0
.
getKey
())).
getSeqNbr
());
e
.
setWithinScope
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
e
.
getWithinScope
(),
CylDictEnum
.
withinScope_0
.
getKey
())).
getSeqNbr
());
e
.
setWarningSign
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
e
.
getWarningSign
(),
CylDictEnum
.
warningSign_0
.
getKey
())).
getSeqNbr
());
e
.
setSealedState
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
e
.
getSealedState
(),
CylDictEnum
.
sealedState_0
.
getKey
())).
getSeqNbr
());
e
.
setDefective
(
Objects
.
requireNonNull
(
CylDictEnum
.
getEnum
(
e
.
getDefective
(),
CylDictEnum
.
defective_0
.
getKey
())).
getSeqNbr
());
fillingCheckIdList
.
add
(
e
.
getFillingCheckId
());
appIdList
.
add
(
e
.
getAppId
());
});
//
fillingChecks.forEach(e -> {
//
e.setAbnormalTemperature(Objects.requireNonNull(CylDictEnum.getEnum(e.getAbnormalTemperature(),
//
CylDictEnum.abnormalTemperature_0.getKey())).getSeqNbr());
//
e.setWithinScope(Objects.requireNonNull(CylDictEnum.getEnum(e.getWithinScope(),
//
CylDictEnum.withinScope_0.getKey())).getSeqNbr());
//
e.setWarningSign(Objects.requireNonNull(CylDictEnum.getEnum(e.getWarningSign(),
//
CylDictEnum.warningSign_0.getKey())).getSeqNbr());
//
e.setSealedState(Objects.requireNonNull(CylDictEnum.getEnum(e.getSealedState(),
//
CylDictEnum.sealedState_0.getKey())).getSeqNbr());
//
e.setDefective(Objects.requireNonNull(CylDictEnum.getEnum(e.getDefective(),
//
CylDictEnum.defective_0.getKey())).getSeqNbr());
//
//
fillingCheckIdList.add(e.getFillingCheckId());
//
appIdList.add(e.getAppId());
//
});
// List<CylinderFillingCheck> clearList = Lists.newArrayList();
// fillingChecks.stream().collect(Collectors.groupingBy(item -> item.getAppId() + "-" + item.getFillingCheckId(), Collectors.maxBy(Comparator.comparing(CylinderFillingCheck::getSyncDate))).forEach((k,v) -> {
// clearList.add(v.get());
...
...
@@ -156,67 +157,67 @@ public class CylSyncServiceImpl {
// List<String> fillingBeforeIds = new ArrayList<>();
// List<String> sequenceCodes = new ArrayList<>();
List
<
Long
>
ids
=
data
.
stream
().
map
(
CylinderFilling:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
data
.
forEach
(
e
->
{
// appIds.add(e.getAppId());
// fillingBeforeIds.add(e.getFillingBeforeId());
// sequenceCodes.add(e.getSequenceCode());
String
isValid
=
e
.
getIsValid
();
if
(!
ObjectUtil
.
isEmpty
(
isValid
)
&&
(
"1"
.
equals
(
isValid
)
||
"0"
.
equals
(
isValid
)))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
Integer
.
valueOf
(
isValid
),
CylDictEnum
.
isValid_0
.
getKey
());
if
(
cylDictEnum
!=
null
)
{
e
.
setIsValid
(
cylDictEnum
.
getSeqNbr
().
toString
());
}
}
Integer
same
=
e
.
getSame
();
if
(!
ObjectUtil
.
isEmpty
(
same
)
&&
(
1
==
same
||
0
==
same
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
same
,
CylDictEnum
.
same_0
.
getKey
());
if
(
cylDictEnum
!=
null
)
{
e
.
setSame
(
cylDictEnum
.
getSeqNbr
());
}
}
Integer
isRegulations
=
e
.
getIsRegulations
();
if
(!
ObjectUtil
.
isEmpty
(
isRegulations
)
&&
(
1
==
isRegulations
||
0
==
isRegulations
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
isRegulations
,
CylDictEnum
.
isRegulations_0
.
getKey
());
if
(
cylDictEnum
!=
null
)
{
e
.
setIsRegulations
(
cylDictEnum
.
getSeqNbr
());
}
}
Integer
isComplianceWithgbt
=
e
.
getIsComplianceWithgbt
();
if
(!
ObjectUtil
.
isEmpty
(
isComplianceWithgbt
)
&&
(
1
==
isComplianceWithgbt
||
0
==
isComplianceWithgbt
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
isComplianceWithgbt
,
CylDictEnum
.
isComplianceWithGBT_0
.
getKey
());
if
(
cylDictEnum
!=
null
)
{
e
.
setIsComplianceWithgbt
(
cylDictEnum
.
getSeqNbr
());
}
}
Integer
haveStillPressure
=
e
.
getHaveStillPressure
();
if
(!
ObjectUtil
.
isEmpty
(
haveStillPressure
)
&&
(
1
==
haveStillPressure
||
0
==
haveStillPressure
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
haveStillPressure
,
CylDictEnum
.
haveStillPressure_0
.
getKey
());
if
(
cylDictEnum
!=
null
)
{
e
.
setHaveStillPressure
(
cylDictEnum
.
getSeqNbr
());
}
}
Integer
isComplete
=
e
.
getIsComplete
();
if
(!
ObjectUtil
.
isEmpty
(
isComplete
)
&&
(
1
==
isComplete
||
0
==
isComplete
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
isComplete
,
CylDictEnum
.
isComplete_0
.
getKey
());
if
(
cylDictEnum
!=
null
)
{
e
.
setIsComplete
(
cylDictEnum
.
getSeqNbr
());
}
}
Integer
haveSecurityDocuments
=
e
.
getHaveSecurityDocuments
();
if
(!
ObjectUtil
.
isEmpty
(
haveSecurityDocuments
)
&&
(
1
==
haveSecurityDocuments
||
0
==
haveSecurityDocuments
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
haveSecurityDocuments
,
CylDictEnum
.
SecurityDocuments_0
.
getKey
());
if
(
cylDictEnum
!=
null
)
{
e
.
setHaveSecurityDocuments
(
cylDictEnum
.
getSeqNbr
());
}
}
});
//
data.forEach(e -> {
//
//
appIds.add(e.getAppId());
//
//
fillingBeforeIds.add(e.getFillingBeforeId());
//
//
sequenceCodes.add(e.getSequenceCode());
//
String isValid = e.getIsValid();
//
if (!ObjectUtil.isEmpty(isValid) && ("1".equals(isValid) || "0".equals(isValid))) {
//
CylDictEnum cylDictEnum = CylDictEnum.getEnum(Integer.valueOf(isValid), CylDictEnum.isValid_0.getKey());
//
if (cylDictEnum != null) {
//
e.setIsValid(cylDictEnum.getSeqNbr().toString());
//
}
//
}
//
//
Integer same = e.getSame();
//
if (!ObjectUtil.isEmpty(same) && (1 == same || 0 == same)) {
//
CylDictEnum cylDictEnum = CylDictEnum.getEnum(same, CylDictEnum.same_0.getKey());
//
if (cylDictEnum != null) {
//
e.setSame(cylDictEnum.getSeqNbr());
//
}
//
}
//
//
Integer isRegulations = e.getIsRegulations();
//
if (!ObjectUtil.isEmpty(isRegulations) && (1 == isRegulations || 0 == isRegulations)) {
//
CylDictEnum cylDictEnum = CylDictEnum.getEnum(isRegulations, CylDictEnum.isRegulations_0.getKey());
//
if (cylDictEnum != null) {
//
e.setIsRegulations(cylDictEnum.getSeqNbr());
//
}
//
}
//
//
Integer isComplianceWithgbt = e.getIsComplianceWithgbt();
//
if (!ObjectUtil.isEmpty(isComplianceWithgbt) && (1 == isComplianceWithgbt || 0 == isComplianceWithgbt)) {
//
CylDictEnum cylDictEnum = CylDictEnum.getEnum(isComplianceWithgbt, CylDictEnum.isComplianceWithGBT_0.getKey());
//
if (cylDictEnum != null) {
//
e.setIsComplianceWithgbt(cylDictEnum.getSeqNbr());
//
}
//
}
//
//
Integer haveStillPressure = e.getHaveStillPressure();
//
if (!ObjectUtil.isEmpty(haveStillPressure) && (1 == haveStillPressure || 0 == haveStillPressure)) {
//
CylDictEnum cylDictEnum = CylDictEnum.getEnum(haveStillPressure, CylDictEnum.haveStillPressure_0.getKey());
//
if (cylDictEnum != null) {
//
e.setHaveStillPressure(cylDictEnum.getSeqNbr());
//
}
//
}
//
//
Integer isComplete = e.getIsComplete();
//
if (!ObjectUtil.isEmpty(isComplete) && (1 == isComplete || 0 == isComplete)) {
//
CylDictEnum cylDictEnum = CylDictEnum.getEnum(isComplete, CylDictEnum.isComplete_0.getKey());
//
if (cylDictEnum != null) {
//
e.setIsComplete(cylDictEnum.getSeqNbr());
//
}
//
}
//
//
Integer haveSecurityDocuments = e.getHaveSecurityDocuments();
//
if (!ObjectUtil.isEmpty(haveSecurityDocuments) && (1 == haveSecurityDocuments || 0 == haveSecurityDocuments)) {
//
CylDictEnum cylDictEnum = CylDictEnum.getEnum(haveSecurityDocuments, CylDictEnum.SecurityDocuments_0.getKey());
//
if (cylDictEnum != null) {
//
e.setHaveSecurityDocuments(cylDictEnum.getSeqNbr());
//
}
//
}
//
//
});
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
cylCylinderFillingCheckMapper
.
saveAndBatchInsert
(
data
);
...
...
@@ -231,7 +232,7 @@ public class CylSyncServiceImpl {
}
@Scheduled
(
cron
=
"0 0 1 * * ?"
)
//
@Scheduled(cron = "0 0 1 * * ?")
@SchedulerLock
(
name
=
"fillingRecordSync"
,
lockAtMostFor
=
"PT10H"
,
lockAtLeastFor
=
"PT60M"
)
public
String
fillingRecordSync
()
{
// StopWatch stopWatch = new StopWatch();
...
...
@@ -243,7 +244,7 @@ public class CylSyncServiceImpl {
}
@Transactional
String
fillingRecordMessage
(){
public
String
fillingRecordMessage
(){
// Long times = 0L;
// if (count != 0) {
// times = count / 1000;
...
...
@@ -262,10 +263,10 @@ public class CylSyncServiceImpl {
stopWatch
.
stop
();
System
.
out
.
println
(
"查询1000条记录耗时:"
+
stopWatch
.
getTotalTimeSeconds
());
if
(!
ObjectUtils
.
isEmpty
(
cylinderFillingRecords
)){
cylinderFillingRecords
.
forEach
(
item
->
{
item
.
setAbnormal
(
item
.
getAbnormal
()
==
1
?
3140
:
3139
);
item
.
setSyncState
(
3
);
});
//
cylinderFillingRecords.forEach(item -> {
//
item.setAbnormal(item.getAbnormal() == 1 ? 3140 : 3139);
//
item.setSyncState(3);
//
});
// List<String> appIds = cylinderFillingRecords.stream().map(CylinderFillingRecord::getAppId).collect(Collectors.toList());
// List<String> records = cylinderFillingRecords.stream().map(CylinderFillingRecord::getFillingRecordId).collect(Collectors.toList());
List
<
Long
>
ids
=
cylinderFillingRecords
.
stream
().
map
(
CylinderFillingRecord:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
...
...
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