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
c4601204
Commit
c4601204
authored
Sep 25, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):修改使用登记作废-气瓶导入作废,修改气瓶导入
parent
5e8fe742
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+28
-28
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/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
c4601204
...
@@ -43,10 +43,7 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
...
@@ -43,10 +43,7 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.OtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
...
@@ -273,6 +270,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -273,6 +270,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
SafetyProblemTracingMapper
safetyProblemTracingMapper
;
private
SafetyProblemTracingMapper
safetyProblemTracingMapper
;
@Autowired
@Autowired
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
@Autowired
private
TzBaseEnterpriseInfoMapper
baseEnterpriseInfoMapper
;
/**
/**
* 将对象的属性由驼峰转为纯大写下划线格式
* 将对象的属性由驼峰转为纯大写下划线格式
...
@@ -1781,7 +1780,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -1781,7 +1780,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 转化施工类型
// 转化施工类型
String
constructionType
=
dto2
.
get
(
CONSTRUCTIONTYPE
).
toString
();
String
constructionType
=
dto2
.
get
(
CONSTRUCTIONTYPE
).
toString
();
if
(!
ValidationUtil
.
isEmpty
(
constructionType
))
{
if
(!
ValidationUtil
.
isEmpty
(
constructionType
))
{
List
<
String
>
constructionTypeList
=
Arrays
.
asList
(
constructionType
.
split
(
","
)
);
String
[]
constructionTypeList
=
constructionType
.
split
(
","
);
List
<
String
>
statusList
=
new
ArrayList
<>();
List
<
String
>
statusList
=
new
ArrayList
<>();
for
(
String
cType
:
constructionTypeList
)
{
for
(
String
cType
:
constructionTypeList
)
{
Integer
integer
=
Integer
.
valueOf
(
cType
);
Integer
integer
=
Integer
.
valueOf
(
cType
);
...
@@ -2452,7 +2451,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -2452,7 +2451,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
otherInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"OTHERINFO_SEQ"
)));
otherInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"OTHERINFO_SEQ"
)));
if
(
isCopy
)
{
if
(
isCopy
)
{
// 复制且有无96333识别码选择 无 96333码置空
// 复制且有无96333识别码选择 无 96333码置空
if
(
"2"
.
equals
(
otherInfo
.
getCode96333Type
()))
{
if
(
"2"
.
equals
(
otherInfo
.
getCode96333Type
()))
{
otherInfo
.
setCode96333
(
""
);
otherInfo
.
setCode96333
(
""
);
}
}
// 监管码置空
// 监管码置空
...
@@ -2462,7 +2461,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -2462,7 +2461,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
otherInfo
.
setInformationManageCode
(
""
);
otherInfo
.
setInformationManageCode
(
""
);
}
}
// 编辑时,如果选择<无96333识别码>,则把已经入库的数据清除掉
// 编辑时,如果选择<无96333识别码>,则把已经入库的数据清除掉
if
(
OPERATEEDIT
.
equals
(
operateType
)
&&
"2"
.
equals
(
otherInfo
.
getCode96333Type
()))
{
if
(
OPERATEEDIT
.
equals
(
operateType
)
&&
"2"
.
equals
(
otherInfo
.
getCode96333Type
()))
{
otherInfo
.
setCode96333
(
""
);
otherInfo
.
setCode96333
(
""
);
}
}
iIdxBizJgOtherInfoService
.
saveOrUpdateData
(
otherInfo
);
iIdxBizJgOtherInfoService
.
saveOrUpdateData
(
otherInfo
);
...
@@ -2860,19 +2859,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -2860,19 +2859,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
List
<
String
>
prefixes
=
Collections
.
unmodifiableList
(
Arrays
.
asList
(
"容"
,
"锅"
,
"管"
,
"瓶"
,
"梯"
,
"起"
,
"索"
,
"游"
,
"车"
));
List
<
String
>
prefixes
=
Collections
.
unmodifiableList
(
Arrays
.
asList
(
"容"
,
"锅"
,
"管"
,
"瓶"
,
"梯"
,
"起"
,
"索"
,
"游"
,
"车"
));
//容15鲁G00302(12)
//容15鲁G00302(12)
if
(
useRegistrationCode
.
length
()
==
14
&&
prefixes
.
stream
().
anyMatch
(
key:
:
startsWith
))
{
if
(
useRegistrationCode
.
length
()
==
14
&&
prefixes
.
stream
().
anyMatch
(
key:
:
startsWith
))
{
if
(
redisUtils
.
hasKey
(
useRegistrationCode
.
substring
(
0
,
5
))){
// 如果 prefix 不等于 "瓶31" 或 "瓶32" 则继续执行逻辑
String
prefix
=
useRegistrationCode
.
substring
(
0
,
3
);
ValueOperations
<
String
,
String
>
valueOps
=
redisTemplate
.
opsForValue
(
);
// 如果 prefix 不等于 "瓶31" 或 "瓶32" 则继续执行逻辑
String
currentSequenceStr
=
valueOps
.
get
(
key
);
ValueOperations
<
String
,
String
>
valueOps
=
redisTemplate
.
opsForValue
(
);
String
extractedValue
=
useRegistrationCode
.
substring
(
5
,
10
);
String
currentSequenceStr
=
valueOps
.
get
(
key
);
String
extractedYearStr
=
useRegistrationCode
.
substring
(
useRegistrationCode
.
indexOf
(
'('
)
+
1
,
useRegistrationCode
.
indexOf
(
')'
)
);
if
(
Stream
.
of
(
"瓶31"
,
"瓶32"
).
noneMatch
(
prefix:
:
equals
)
&&
currentSequenceStr
!=
null
)
{
int
currentYearLastTwoDigits
=
LocalDate
.
now
().
getYear
()
%
100
;
String
extractedValue
=
useRegistrationCode
.
substring
(
5
,
10
);
// 提取年份
String
extractedYearStr
=
useRegistrationCode
.
substring
(
useRegistrationCode
.
indexOf
(
'('
)
+
1
,
useRegistrationCode
.
indexOf
(
')'
)
);
int
extractedYear
=
Integer
.
parseInt
(
extractedYearStr
);
int
currentYearLastTwoDigits
=
LocalDate
.
now
().
getYear
()
%
100
;
if
(
currentYearLastTwoDigits
==
extractedYear
)
{
try
{
if
(
redisUtils
.
hasKey
(
useRegistrationCode
.
substring
(
0
,
5
)))
{
// 提取年份
String
prefix
=
useRegistrationCode
.
substring
(
0
,
3
);
int
extractedYear
=
Integer
.
parseInt
(
extractedYearStr
);
if
(
Stream
.
of
(
"瓶31"
,
"瓶32"
).
noneMatch
(
prefix:
:
equals
)
&&
currentSequenceStr
!=
null
)
{
if
(
currentYearLastTwoDigits
==
extractedYear
)
{
try
{
if
(
Character
.
isLetter
(
extractedValue
.
charAt
(
0
)))
{
if
(
Character
.
isLetter
(
extractedValue
.
charAt
(
0
)))
{
// 提取字母部分并比较
// 提取字母部分并比较
char
extractedLetter
=
extractedValue
.
charAt
(
0
);
char
extractedLetter
=
extractedValue
.
charAt
(
0
);
...
@@ -2882,7 +2881,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -2882,7 +2881,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
char
redisLetter
=
currentSequenceStr
.
charAt
(
0
);
char
redisLetter
=
currentSequenceStr
.
charAt
(
0
);
//redis中不是字母开头,输入的是字母开头
//redis中不是字母开头,输入的是字母开头
if
(!
Character
.
isLetter
(
redisLetter
)
)
{
if
(!
Character
.
isLetter
(
redisLetter
))
{
throw
new
BadRequest
(
"登记证编号不能使用系统还未生成编号!"
);
throw
new
BadRequest
(
"登记证编号不能使用系统还未生成编号!"
);
}
}
int
redisNumber
=
Integer
.
parseInt
(
currentSequenceStr
.
substring
(
1
));
int
redisNumber
=
Integer
.
parseInt
(
currentSequenceStr
.
substring
(
1
));
...
@@ -2897,13 +2896,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -2897,13 +2896,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
throw
new
BadRequest
(
"登记证编号不能使用系统还未生成编号!"
);
throw
new
BadRequest
(
"登记证编号不能使用系统还未生成编号!"
);
}
}
}
}
}
catch
(
NumberFormatException
e
)
{
throw
new
BadRequest
(
"数据格式错误"
);
}
}
}
catch
(
NumberFormatException
e
)
{
throw
new
BadRequest
(
"数据格式错误"
);
}
}
}
else
{
throw
new
BadRequest
(
"登记证编号不能使用系统还未生成编号!"
);
}
}
}
else
{
throw
new
BadRequest
(
"登记证编号不能使用系统还未生成编号!"
);
}
}
}
}
}
}
...
@@ -3229,11 +3228,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -3229,11 +3228,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
jgUseRegistrationManage
.
setIsDelete
(
Boolean
.
FALSE
);
jgUseRegistrationManage
.
setIsDelete
(
Boolean
.
FALSE
);
jgUseRegistrationManage
.
setEquUseAddress
(
""
);
jgUseRegistrationManage
.
setEquUseAddress
(
""
);
jgUseRegistrationManage
.
setManageType
(
"unit"
);
jgUseRegistrationManage
.
setManageType
(
"unit"
);
jgUseRegistrationManage
.
setUseUnitAddress
(
company
.
getAddress
()
);
jgUseRegistrationManage
.
setUseUnitAddress
(
!
ValidationUtil
.
isEmpty
(
baseEnterpriseInfoMapper
.
selectByUseUnit
(
company
.
getCompanyName
()))
?
baseEnterpriseInfoMapper
.
selectByUseUnit
(
company
.
getCompanyName
()).
getAddress
()
:
""
);
jgUseRegistrationManage
.
setUseRegistrationCode
(
equipInfoDto
.
getUseOrgCode
());
jgUseRegistrationManage
.
setUseRegistrationCode
(
equipInfoDto
.
getUseOrgCode
());
jgUseRegistrationManage
.
setUseUnitName
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyName
().
split
(
"_"
)[
1
]
:
company
.
getCompanyName
());
jgUseRegistrationManage
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
jgUseRegistrationManage
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
jgUseRegistrationManage
.
setUseUnitName
(
company
.
getCompanyName
());
jgUseRegistrationManage
.
setReceiveCompanyCode
(
equipInfoDto
.
getReceiveOrgCode
());
jgUseRegistrationManage
.
setReceiveCompanyCode
(
equipInfoDto
.
getReceiveOrgCode
());
jgUseRegistrationManage
.
setCertificateNo
(
generateCertificateNo
(
equipInfoDto
,
new
Date
(),
equipInfoDto
.
getReceiveOrgCode
()));
jgUseRegistrationManage
.
setCertificateNo
(
generateCertificateNo
(
equipInfoDto
,
new
Date
(),
equipInfoDto
.
getReceiveOrgCode
()));
jgUseRegistrationManageService
.
save
(
jgUseRegistrationManage
);
jgUseRegistrationManageService
.
save
(
jgUseRegistrationManage
);
...
@@ -3349,7 +3349,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -3349,7 +3349,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
checkNotBlank
(
data
.
getCylinderCategory
(),
"气瓶分类不能为空;"
,
result
);
checkNotBlank
(
data
.
getCylinderCategory
(),
"气瓶分类不能为空;"
,
result
);
checkFactoryNumUnique
(
data
.
getFactoryNum
(),
company
.
getCompanyCode
(),
result
);
checkFactoryNumUnique
(
data
.
getFactoryNum
(),
company
.
getCompanyCode
(),
result
);
}
else
{
}
else
{
checkFactoryNumUniquenessForVehicleCylinder
(
data
.
getFactoryNum
(),
result
);
checkFactoryNumUniquenessForVehicleCylinder
(
data
.
getFactoryNum
(),
result
);
}
}
checkNotBlank
(
data
.
getProduceDate
(),
"制造日期不能为空;"
,
result
);
checkNotBlank
(
data
.
getProduceDate
(),
"制造日期不能为空;"
,
result
);
...
...
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