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
90baee5c
Commit
90baee5c
authored
May 09, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):使用登记个人筛选
parent
cb1baca7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+14
-13
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/JgUseRegistrationServiceImpl.java
View file @
90baee5c
...
@@ -21,10 +21,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
...
@@ -21,10 +21,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService
;
...
@@ -348,8 +345,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -348,8 +345,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private
List
<
Map
<
String
,
Object
>>
handleUseRegistration
(
JSONObject
map
)
{
private
List
<
Map
<
String
,
Object
>>
handleUseRegistration
(
JSONObject
map
)
{
try
{
try
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
// 提交时进行校验设备是否在流程中使用(并发及同时打开多个相同的页面时才会出现此种情况)
// 提交时进行校验设备是否在流程中使用(并发及同时打开多个相同的页面时才会出现此种情况)
checkForRepeatUsedEquip
(
map
,
reginParams
);
checkForRepeatUsedEquip
(
map
,
company
);
// 使用登记信息
// 使用登记信息
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
jgUseRegistration
.
setRegDate
(
new
Date
());
jgUseRegistration
.
setRegDate
(
new
Date
());
...
@@ -358,8 +356,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -358,8 +356,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
jgUseRegistration
.
setSupervisoryCode
(
supervisoryCode
);
jgUseRegistration
.
setSupervisoryCode
(
supervisoryCode
);
jgUseRegistration
.
setUseUnitName
(
String
.
valueOf
(
map
.
get
(
"useUnitName"
)));
jgUseRegistration
.
setUseUnitCreditCode
(
String
.
valueOf
(
map
.
get
(
"useUnitCreditCode"
)));
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"otherAccessories"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"otherAccessories"
)))
{
jgUseRegistration
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
map
.
get
(
"otherAccessories"
)));
jgUseRegistration
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
map
.
get
(
"otherAccessories"
)));
}
}
...
@@ -378,7 +375,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -378,7 +375,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
map
.
put
(
"safetyManagerName"
,
data
[
1
]);
map
.
put
(
"safetyManagerName"
,
data
[
1
]);
}
}
// 使用单位提交
// 使用单位提交
jgUseRegistration
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgUseRegistration
.
setUseUnitName
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyName
().
split
(
"_"
)[
1
]
:
company
.
getCompanyName
());
jgUseRegistration
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
jgUseRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
jgUseRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
)))
{
jgUseRegistration
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
jgUseRegistration
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
...
@@ -525,10 +525,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -525,10 +525,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
});
});
}
}
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
ReginParams
reginParams
)
{
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
CompanyBo
company
)
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
// 流程中或已完成
// 流程中或已完成
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
"useRegister"
).
equipRepeatUsedCheck
(
map
.
get
(
"equipId"
).
toString
(),
reginParams
.
getCompany
()
.
getCompanyCode
());
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
"useRegister"
).
equipRepeatUsedCheck
(
map
.
get
(
"equipId"
).
toString
(),
company
.
getCompanyCode
());
}
}
}
}
...
@@ -579,9 +579,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -579,9 +579,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useRegistration
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
useRegistration
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
useRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
useRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
// 使用单位信息
// 使用单位信息
useRegistration
.
setUseUnitName
(
company
.
getCompanyName
());
useRegistration
.
setUseUnitName
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
useRegistration
.
setUseUnitCreditCode
(
company
.
getCompanyCode
());
company
.
getCompanyName
().
split
(
"_"
)[
1
]
:
company
.
getCompanyName
());
List
<
LinkedHashMap
>
tree
=
commonService
.
getCreatTree
();
useRegistration
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
// 接收单位信息
// 接收单位信息
Optional
.
ofNullable
(
useRegistration
.
getReceiveOrgCode
())
Optional
.
ofNullable
(
useRegistration
.
getReceiveOrgCode
())
.
filter
(
code
->
code
.
contains
(
"_"
))
.
filter
(
code
->
code
.
contains
(
"_"
))
...
...
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