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
5f18841d
Commit
5f18841d
authored
Nov 29, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):新增历史设备(车用气瓶)时追加使用登记证和车辆VIN码
parent
de0c7898
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
5 deletions
+34
-5
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+9
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+0
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+25
-4
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
5f18841d
...
...
@@ -228,4 +228,13 @@ public interface ICommonService {
* @return
*/
Boolean
checkEquCodeUniqueness
(
String
equCode
);
/**
* 检查使用登记证号全局唯一
*
* @param useRegistrationCode 使用登记证号
* @param equipId 设备record
* @return
*/
Boolean
useRegistrationCertificateAccountUnique
(
String
useRegistrationCode
,
String
equipId
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
5f18841d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.codec.Base64Decoder
;
import
cn.hutool.core.codec.Base64Encoder
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DatePattern
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
5f18841d
...
...
@@ -398,6 +398,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
check96333Code
(
equipmentInfoForm
);
// 气瓶 校验制造单位统一信用代码与出场编码唯一
checkFactoryNumUniqueWithGasCylinder
(
equipmentInfoForm
,
record
);
// 历史(车用气瓶)设备校验使用登记证编号全库唯一
hisEquCheckUseRegistrationCodeUniqueness
(
equipmentInfoForm
);
// 检测是否三环系统中的车用气瓶数据 不让三环系统数据通过设备新增方式进来
// checkIsSanHanData(equipmentInfoForm);
}
catch
(
Exception
e
)
{
...
...
@@ -510,6 +512,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
private
void
hisEquCheckUseRegistrationCodeUniqueness
(
LinkedHashMap
<?,
?>
equipmentInfoForm
)
{
// 历史(车用气瓶)设备校验使用登记证编号全库唯一
String
dataSource
=
(
String
)
equipmentInfoForm
.
get
(
DATA_SOURCE
);
String
record
=
(
String
)
equipmentInfoForm
.
get
(
RECORD
);
String
useRegistrationCode
=
(
String
)
equipmentInfoForm
.
get
(
"useRegistrationCode"
);
if
(!
ValidationUtil
.
isEmpty
(
dataSource
)
&&
dataSource
.
contains
(
"his"
))
{
Boolean
unique
=
commonService
.
useRegistrationCertificateAccountUnique
(
useRegistrationCode
,
ValidationUtil
.
isEmpty
(
record
)
?
null
:
record
);
if
(
unique
)
{
throw
new
BadRequest
(
"使用登记证编号已存在,请重新输入!"
);
}
}
}
private
void
checkFactoryNumUnique
(
String
factoryNum
,
String
produceUnitCreditCode
,
StringBuilder
result
)
{
// 车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)
if
(
commonMapper
.
checkFactoryNumUnique
(
factoryNum
,
null
,
produceUnitCreditCode
)
>
0
)
{
...
...
@@ -615,9 +630,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
ValidationUtil
.
isEmpty
(
equIpClassMap
))
{
resultMap
.
put
(
EQUIP_CLASS_FORM_ID
,
equIpClassMap
);
}
if
(!
ValidationUtil
.
isEmpty
(
equipInfoMap
))
{
resultMap
.
put
(
EQUIP_INFO_FORM_ID
,
equipInfoMap
);
}
// 设备参数
if
(
equIpClassMap
.
containsKey
(
EQU_LIST
)
&&
!
ValidationUtil
.
isEmpty
(
equIpClassMap
.
get
(
EQU_LIST
).
toString
()))
{
Map
<
String
,
Object
>
equipParamsMap
=
this
.
getEquipParamsMap
(
record
,
""
,
equIpClassMap
.
get
(
EQU_LIST
).
toString
());
...
...
@@ -629,6 +641,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
equipParamsMap
.
put
(
EQU_DEFINE
,
String
.
valueOf
(
equIpClassMap
.
get
(
EQU_DEFINE
)));
resultMap
.
put
(
EQUIP_PARAMS_FORM_ID
,
equipParamsMap
);
}
equipInfoMap
.
put
(
"identificationCode"
,
equipParamsMap
.
get
(
"VIN"
));
}
if
(!
ValidationUtil
.
isEmpty
(
equipInfoMap
))
{
resultMap
.
put
(
EQUIP_INFO_FORM_ID
,
equipInfoMap
);
}
// 处理复制设备信息
...
...
@@ -1072,6 +1089,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
objMap
.
put
(
"useRegistrationCode"
,
registerInfo
.
getUseOrgCode
());
}
// 维保备案【一对多,暂时只取最新一条数据】
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
=
iIdxBizJgMaintenanceRecordInfoService
.
queryNewestDetailByRecord
(
record
);
...
...
@@ -2495,7 +2513,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 补丁:saveOrUpdate在update数据时不会更新字段为null的字段,但是编辑设备的代码时,从有改成无,equCode解析成null,但是此时需要将equcode删掉
registerInfo
.
setEquCode
(
ObjectUtils
.
isEmpty
(
registerInfo
.
getEquCode
())
?
""
:
registerInfo
.
getEquCode
());
// copy设备 =》 使用登记证号置空
registerInfo
.
setUseOrgCode
(
isCopy
?
""
:
registerInfo
.
getUseOrgCode
());
String
useOrgCode
=
ValidationUtil
.
isEmpty
(
equipmentInfoForm
.
get
(
"useRegistrationCode"
))
?
""
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"useRegistrationCode"
));
registerInfo
.
setUseOrgCode
(
isCopy
?
""
:
useOrgCode
);
this
.
saveOrUpdate
(
registerInfo
);
// 监督管理
...
...
@@ -2604,6 +2623,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
ValidationUtil
.
isEmpty
(
vessel
))
{
vessel
.
setRecord
(
record
);
vessel
.
setRecDate
(
date
);
String
VIN
=
ValidationUtil
.
isEmpty
(
equipmentInfoForm
.
get
(
"identificationCode"
))
?
""
:
(
String
)
equipmentInfoForm
.
get
(
"identificationCode"
);
vessel
.
setVin
(
VIN
);
vessel
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentParamsForm
.
get
(
"VESSEL_SEQ"
)));
iIdxBizJgTechParamsVesselService
.
saveOrUpdateData
(
vessel
);
}
...
...
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