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
35a32b90
Commit
35a32b90
authored
Dec 15, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jyjc):申请开通
1.开通审批通过时,按照不同的开通业务类型选择性保存资质
parent
cd53de75
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
15 deletions
+35
-15
OpenBizTypeEnumV2.java
...in/amos/boot/module/jyjc/api/enums/OpenBizTypeEnumV2.java
+20
-9
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+15
-6
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/enums/OpenBizTypeEnumV2.java
View file @
35a32b90
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
enums
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.Getter
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -9,28 +10,38 @@ import java.util.Optional;
...
@@ -9,28 +10,38 @@ import java.util.Optional;
* @author Administrator
* @author Administrator
*/
*/
@Getter
@Getter
@AllArgsConstructor
public
enum
OpenBizTypeEnumV2
{
public
enum
OpenBizTypeEnumV2
{
/**
/**
* 业务类型
* 业务类型
*/
*/
JY
(
"jy"
,
"检验机构"
,
"检验业务"
),
JY
(
"jy"
,
"检验机构"
,
"检验业务"
,
true
),
JC
(
"jc"
,
"检测机构"
,
"检测业务"
),
JC
(
"jc"
,
"检测机构"
,
"检测业务"
,
true
),
SYDW
(
"jc-sydw"
,
"使用单位"
,
"使用单位电梯检测"
),
SYDW
(
"jc-sydw"
,
"使用单位"
,
"使用单位电梯检测"
,
false
),
AGW
(
"jc-agw"
,
"安装改造维修单位"
,
"安改维电梯检测"
);
AGW
(
"jc-agw"
,
"安装改造维修单位"
,
"安改维电梯检测"
,
false
);
/**
* 唯一标识
*/
private
final
String
code
;
private
final
String
code
;
/**
* 单位类型
*/
private
final
String
unitType
;
private
final
String
unitType
;
/**
* 描述
*/
private
final
String
description
;
private
final
String
description
;
/**
* 是否需要资质
*/
private
final
boolean
needSaveLicense
;
OpenBizTypeEnumV2
(
String
code
,
String
unitType
,
String
description
)
{
this
.
code
=
code
;
this
.
unitType
=
unitType
;
this
.
description
=
description
;
}
public
static
OpenBizTypeEnumV2
getOneByCode
(
String
code
)
{
public
static
OpenBizTypeEnumV2
getOneByCode
(
String
code
)
{
Optional
<
OpenBizTypeEnumV2
>
op
=
Arrays
.
stream
(
OpenBizTypeEnumV2
.
values
()).
filter
(
e
->
e
.
getCode
().
equals
(
code
)).
findFirst
();
Optional
<
OpenBizTypeEnumV2
>
op
=
Arrays
.
stream
(
OpenBizTypeEnumV2
.
values
()).
filter
(
e
->
e
.
getCode
().
equals
(
code
)).
findFirst
();
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
35a32b90
...
@@ -39,8 +39,8 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.*;
...
@@ -39,8 +39,8 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.*;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
import
com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcOpeningApplicationVo
;
import
com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcOpeningApplicationVo
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.message.factoty.OpenAppMsgFactory
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jyjc.biz.message.factoty.OpenAppMsgFactory
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.TaskModelServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.TaskModelServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.BaseUnitLicence
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.BaseUnitLicence
;
...
@@ -341,7 +341,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -341,7 +341,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 将历史同单位类型+同机构类别的开通申请作废掉
// 将历史同单位类型+同机构类别的开通申请作废掉
for
(
Long
id
:
ids
)
{
for
(
Long
id
:
ids
)
{
JyjcInspectionHistory
historyOpened
=
inspectionHistoryService
.
getBySSeq
(
id
);
JyjcInspectionHistory
historyOpened
=
inspectionHistoryService
.
getBySSeq
(
id
);
if
(
historyOpened
!=
null
)
{
if
(
historyOpened
!=
null
)
{
JSONObject
hisDataOpened
=
historyOpened
.
getHistoryData
();
JSONObject
hisDataOpened
=
historyOpened
.
getHistoryData
();
List
<
BaseEnterpriseCertDto
>
certOpened
=
hisDataOpened
.
getJSONArray
(
BizCommonConstant
.
UNIT_LICENCE_KEY
).
toJavaList
(
BaseEnterpriseCertDto
.
class
);
List
<
BaseEnterpriseCertDto
>
certOpened
=
hisDataOpened
.
getJSONArray
(
BizCommonConstant
.
UNIT_LICENCE_KEY
).
toJavaList
(
BaseEnterpriseCertDto
.
class
);
boolean
matchHisOpened
=
certOpened
.
stream
().
anyMatch
(
c
->
agencyTypeLast
.
contains
(
c
.
getAgencyType
()));
boolean
matchHisOpened
=
certOpened
.
stream
().
anyMatch
(
c
->
agencyTypeLast
.
contains
(
c
.
getAgencyType
()));
...
@@ -472,7 +472,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -472,7 +472,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
applyStartTime
=
date
+
" 00:00:00"
;
applyStartTime
=
date
+
" 00:00:00"
;
applyEndTime
=
date
+
" 23:59:59"
;
applyEndTime
=
date
+
" 23:59:59"
;
}
}
Page
<
JyjcOpeningApplicationModel
>
result
=
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
dto
,
applyStartTime
,
currentUserId
,
applyEndTime
,
orgCode
);
Page
<
JyjcOpeningApplicationModel
>
result
=
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
dto
,
applyStartTime
,
currentUserId
,
applyEndTime
,
orgCode
);
for
(
JyjcOpeningApplicationModel
openingApplicationModel
:
result
.
getRecords
())
{
for
(
JyjcOpeningApplicationModel
openingApplicationModel
:
result
.
getRecords
())
{
openingApplicationModel
.
setIdentityType
(
dto
.
getType
());
openingApplicationModel
.
setIdentityType
(
dto
.
getType
());
openingApplicationModel
.
setOpenBizTypeName
(
this
.
getOpenBizTypeName
(
openingApplicationModel
.
getOpenBizType
()));
openingApplicationModel
.
setOpenBizTypeName
(
this
.
getOpenBizTypeName
(
openingApplicationModel
.
getOpenBizType
()));
...
@@ -547,7 +547,6 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -547,7 +547,6 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
}
private
String
getOpenBizTypeByIdentity
(
String
unitType
)
{
private
String
getOpenBizTypeByIdentity
(
String
unitType
)
{
OpenBizTypeEnumV2
bizTypeEnumV2
=
OpenBizTypeEnumV2
.
getOneByUnitType
(
unitType
);
OpenBizTypeEnumV2
bizTypeEnumV2
=
OpenBizTypeEnumV2
.
getOneByUnitType
(
unitType
);
if
(
bizTypeEnumV2
==
null
)
{
if
(
bizTypeEnumV2
==
null
)
{
...
@@ -849,7 +848,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -849,7 +848,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 更新json
// 更新json
commonService
.
saveOrUpdateHistory
(
jyjcOpeningApplication
.
getOpenBizType
(),
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
params
)),
jyjcOpeningApplication
.
getSequenceNbr
());
commonService
.
saveOrUpdateHistory
(
jyjcOpeningApplication
.
getOpenBizType
(),
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
params
)),
jyjcOpeningApplication
.
getSequenceNbr
());
// 将审批通过的资质信息写入到企业资质表
// 将审批通过的资质信息写入到企业资质表
this
.
saveLicenseData2Company
(
jyjcOpeningApplication
);
this
.
processApplication
(
jyjcOpeningApplication
);
}
}
jyjcOpeningApplicationMapper
.
updateById
(
jyjcOpeningApplication
);
jyjcOpeningApplicationMapper
.
updateById
(
jyjcOpeningApplication
);
// 已完成 作废逻辑
// 已完成 作废逻辑
...
@@ -895,6 +894,16 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -895,6 +894,16 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
return
Optional
.
ofNullable
(
OpenBizTypeEnumV2
.
getOneByCode
(
openBizType
)).
map
(
OpenBizTypeEnumV2:
:
getUnitType
).
orElse
(
null
);
return
Optional
.
ofNullable
(
OpenBizTypeEnumV2
.
getOneByCode
(
openBizType
)).
map
(
OpenBizTypeEnumV2:
:
getUnitType
).
orElse
(
null
);
}
}
/**
* 需要资质的才进行进行记录资质
*
* @param application 开通申请
*/
private
void
processApplication
(
JyjcOpeningApplication
application
)
{
Optional
.
ofNullable
(
OpenBizTypeEnumV2
.
getOneByCode
(
application
.
getOpenBizType
()))
.
filter
(
OpenBizTypeEnumV2:
:
isNeedSaveLicense
).
ifPresent
(
o
->
saveLicenseData2Company
(
application
));
}
private
void
saveLicenseData2Company
(
JyjcOpeningApplication
jyjcOpeningApplication
)
{
private
void
saveLicenseData2Company
(
JyjcOpeningApplication
jyjcOpeningApplication
)
{
JyjcInspectionHistory
history
=
inspectionHistoryService
.
getBySSeq
(
jyjcOpeningApplication
.
getSequenceNbr
());
JyjcInspectionHistory
history
=
inspectionHistoryService
.
getBySSeq
(
jyjcOpeningApplication
.
getSequenceNbr
());
JSONObject
hisData
=
history
.
getHistoryData
();
JSONObject
hisData
=
history
.
getHistoryData
();
...
@@ -933,7 +942,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -933,7 +942,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
licence
.
setAgencyTypeName
(
commonService
.
getDictName
(
Arrays
.
asList
(
"1233-1"
,
"1233-2"
),
licence
.
getAgencyType
()));
licence
.
setAgencyTypeName
(
commonService
.
getDictName
(
Arrays
.
asList
(
"1233-1"
,
"1233-2"
),
licence
.
getAgencyType
()));
licence
.
setUnitCode
(
jyjcOpeningApplication
.
getUnitCode
());
licence
.
setUnitCode
(
jyjcOpeningApplication
.
getUnitCode
());
licence
.
setUnitName
(
jyjcOpeningApplication
.
getUnitCodeName
());
licence
.
setUnitName
(
jyjcOpeningApplication
.
getUnitCodeName
());
licence
.
setLicenceType
(
LicenceTypeEnum
.
JY_JC
.
getCode
());
licence
.
setLicenceType
(
LicenceTypeEnum
.
JY_JC
.
getCode
());
licence
.
setEnterpriseCertSeq
(
cert
.
getSequenceNbr
().
toString
());
licence
.
setEnterpriseCertSeq
(
cert
.
getSequenceNbr
().
toString
());
licences
.
add
(
licence
);
licences
.
add
(
licence
);
});
});
...
...
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