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
e271d8b1
Commit
e271d8b1
authored
Jul 14, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):历史平台登记功能修改
parent
7e0bb270
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
17 deletions
+50
-17
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+14
-2
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+2
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+30
-13
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+4
-2
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/controller/CommonController.java
View file @
e271d8b1
...
@@ -297,6 +297,18 @@ public class CommonController extends BaseController {
...
@@ -297,6 +297,18 @@ public class CommonController extends BaseController {
}
}
/**
/**
* 历史平台登记业务发起公共接口
*
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/saveOrUpdateHistory"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"历史平台登记业务发起公共接口"
,
notes
=
"历史平台登记业务发起公共接口"
)
public
ResponseModel
<
Object
>
saveOrUpdateHistory
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
result
=
commonService
.
invokeBusinessType
(
map
);
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 根据公司id获取公司下人员
* 根据公司id获取公司下人员
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -589,8 +601,8 @@ public class CommonController extends BaseController {
...
@@ -589,8 +601,8 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getLatestJgUseRegistrationManage"
)
@GetMapping
(
value
=
"/getLatestJgUseRegistrationManage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取单位下的使用登记证编号"
,
notes
=
"按照类型查询车载气瓶相关的字典值"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取单位下的使用登记证编号"
,
notes
=
"按照类型查询车载气瓶相关的字典值"
)
public
ResponseModel
<
JgUseRegistrationManage
>
getLatestJgUseRegistrationManage
(
@RequestParam
(
value
=
"equ
CategoryCode"
)
String
equCategory
Code
)
{
public
ResponseModel
<
JgUseRegistrationManage
>
getLatestJgUseRegistrationManage
(
@RequestParam
(
value
=
"equ
DefineCode"
)
String
equDefine
Code
)
{
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
return
ResponseHelper
.
buildResponse
(
commonService
.
getLatestJgUseRegistrationManage
(
company
.
getCompanyCode
(),
equ
Category
Code
));
return
ResponseHelper
.
buildResponse
(
commonService
.
getLatestJgUseRegistrationManage
(
company
.
getCompanyCode
(),
equ
Define
Code
));
}
}
}
}
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 @
e271d8b1
...
@@ -67,6 +67,8 @@ public interface ICommonService {
...
@@ -67,6 +67,8 @@ public interface ICommonService {
Object
invokeBusinessProcess
(
String
submitType
,
Map
<
String
,
Object
>
obj
,
ReginParams
reginParams
);
Object
invokeBusinessProcess
(
String
submitType
,
Map
<
String
,
Object
>
obj
,
ReginParams
reginParams
);
Object
invokeBusinessType
(
Map
<
String
,
Object
>
obj
);
Object
getCompanyUser
(
Long
companyId
);
Object
getCompanyUser
(
Long
companyId
);
Object
transfer
(
Map
<
String
,
Object
>
obj
);
Object
transfer
(
Map
<
String
,
Object
>
obj
);
...
...
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 @
e271d8b1
...
@@ -1231,6 +1231,24 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -1231,6 +1231,24 @@ public class CommonServiceImpl implements ICommonService {
}
}
@Override
@Override
public
Object
invokeBusinessType
(
Map
<
String
,
Object
>
map
)
{
Map
<
String
,
Object
>
basicObj
=
(
Map
<
String
,
Object
>)
map
.
get
(
basic
);
Map
<
String
,
Object
>
noticeObj
=
(
Map
<
String
,
Object
>)
map
.
get
(
notice
);
String
type
=
(
String
)
basicObj
.
get
(
"type"
);
noticeObj
.
put
(
"businessCode"
,
type
);
if
(
type
.
equals
(
ApplicationFormTypeEnum
.
SYDJ
.
getBusinessCode
()))
{
String
businessScenarios
=
(
String
)
basicObj
.
get
(
"businessScenarios"
);
String
code
=
(
String
)
basicObj
.
get
(
"code"
);
noticeObj
.
put
(
"receiveOrgCode"
,
!
ObjectUtils
.
isEmpty
(
basicObj
.
get
(
"receiveOrgCreditCode"
))
?
String
.
valueOf
(
basicObj
.
get
(
"receiveOrgCreditCode"
))
:
String
.
valueOf
(
basicObj
.
get
(
"receiveOrgCreditCode1"
)));
JSONObject
jsonObject
=
new
JSONObject
(
noticeObj
);
return
"1"
.
equals
(
businessScenarios
)
&&
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
code
)
?
jgVehicleInformationService
.
saveOrUpdateHisData
(
jsonObject
)
:
jgUseRegistrationServiceImpl
.
handleHistoryEquip
(
jsonObject
);
}
return
null
;
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Object
transfer
(
Map
<
String
,
Object
>
map
)
{
public
Object
transfer
(
Map
<
String
,
Object
>
map
)
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"nextTaskId"
))
||
map
.
get
(
"nextTaskId"
)
==
null
)
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"nextTaskId"
))
||
map
.
get
(
"nextTaskId"
)
==
null
)
{
...
@@ -2072,20 +2090,18 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -2072,20 +2090,18 @@ public class CommonServiceImpl implements ICommonService {
* 获取最新的使用登记证书
* 获取最新的使用登记证书
*
*
* @param useUnitCreditCode 使用单位统一信用代码
* @param useUnitCreditCode 使用单位统一信用代码
* @param equ
Category
Code 设备类别编码
* @param equ
Define
Code 设备类别编码
* @return
* @return
JgUseRegistrationManage
*/
*/
@Override
@Override
public
JgUseRegistrationManage
getLatestJgUseRegistrationManage
(
String
useUnitCreditCode
,
String
equCategoryCode
)
{
public
JgUseRegistrationManage
getLatestJgUseRegistrationManage
(
String
useUnitCreditCode
,
String
equDefineCode
)
{
LambdaQueryWrapper
<
JgUseRegistrationManage
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
JgUseRegistrationManage
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
JgUseRegistrationManage:
:
getUseUnitCreditCode
,
useUnitCreditCode
);
queryWrapper
.
eq
(
JgUseRegistrationManage:
:
getUseUnitCreditCode
,
useUnitCreditCode
)
lambdaQueryWrapper
.
eq
(
JgUseRegistrationManage:
:
getEquCategoryCode
,
equCategoryCode
);
.
eq
(
JgUseRegistrationManage:
:
getEquDefineCode
,
equDefineCode
)
lambdaQueryWrapper
.
eq
(
JgUseRegistrationManage:
:
getCertificateStatus
,
CertificateStatusEnum
.
YIDENGJI
.
getName
());
.
eq
(
JgUseRegistrationManage:
:
getCertificateStatus
,
CertificateStatusEnum
.
YIDENGJI
.
getName
())
lambdaQueryWrapper
.
orderByDesc
(
JgUseRegistrationManage:
:
getCertificateNo
);
.
orderByDesc
(
JgUseRegistrationManage:
:
getCertificateNo
);
List
<
JgUseRegistrationManage
>
jgUseRegistrationManages
=
jgUseRegistrationManageMapper
.
selectList
(
lambdaQueryWrapper
);
return
jgUseRegistrationManageMapper
.
selectList
(
queryWrapper
).
stream
()
if
(!
CollectionUtils
.
isEmpty
(
jgUseRegistrationManages
)
&&
jgUseRegistrationManages
.
size
()
>
0
)
{
.
findFirst
()
return
jgUseRegistrationManages
.
get
(
0
);
.
orElse
(
null
);
}
return
null
;
}
}
}
}
\ No newline at end of file
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 @
e271d8b1
...
@@ -880,11 +880,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -880,11 +880,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
String
useRegistrationCode
=
null
;
String
useRegistrationCode
=
null
;
Boolean
flag
=
Boolean
.
FALSE
;
Boolean
flag
=
Boolean
.
FALSE
;
String
equCategoryCode
=
String
.
valueOf
(
mapData
.
get
(
"EQU_CATEGORY_CODE"
));
String
equCategoryCode
=
String
.
valueOf
(
mapData
.
get
(
"EQU_CATEGORY_CODE"
));
String
equDefineCode
=
String
.
valueOf
(
mapData
.
get
(
"EQU_DEFINE_CODE"
));
//如果是气瓶或工业管道判断之前是否已经做过使用登记
//如果是气瓶或工业管道判断之前是否已经做过使用登记
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategoryCode
)
||
PipelineEnum
.
INDUSTRIAL_PIPELINE
.
getCode
().
equals
(
equCategoryCode
))
{
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategoryCode
)
||
PipelineEnum
.
INDUSTRIAL_PIPELINE
.
getCode
().
equals
(
equCategoryCode
))
{
// 获取最新的使用登记记录
// 获取最新的使用登记记录
String
useUnitCreditCode
=
jgUseRegistration
.
getUseUnitCreditCode
();
String
useUnitCreditCode
=
jgUseRegistration
.
getUseUnitCreditCode
();
JgUseRegistrationManage
jgUseRegistrationManage
=
commonServiceImpl
.
getLatestJgUseRegistrationManage
(
useUnitCreditCode
,
equ
Category
Code
);
JgUseRegistrationManage
jgUseRegistrationManage
=
commonServiceImpl
.
getLatestJgUseRegistrationManage
(
useUnitCreditCode
,
equ
Define
Code
);
useRegistrationCode
=
ObjectUtils
.
isEmpty
(
jgUseRegistrationManage
)
?
useRegistrationCode
:
jgUseRegistrationManage
.
getUseRegistrationCode
();
useRegistrationCode
=
ObjectUtils
.
isEmpty
(
jgUseRegistrationManage
)
?
useRegistrationCode
:
jgUseRegistrationManage
.
getUseRegistrationCode
();
flag
=
ObjectUtils
.
isEmpty
(
useRegistrationCode
)
?
flag
:
Boolean
.
TRUE
;
flag
=
ObjectUtils
.
isEmpty
(
useRegistrationCode
)
?
flag
:
Boolean
.
TRUE
;
}
}
...
@@ -2448,7 +2449,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2448,7 +2449,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
* @param map
* @param map
* @return
* @return
*/
*/
private
List
<
Map
<
String
,
Object
>>
handleHistoryEquip
(
JSONObject
map
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Map
<
String
,
Object
>>
handleHistoryEquip
(
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
();
CompanyBo
company
=
reginParams
.
getCompany
();
...
...
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