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
522c3b36
Commit
522c3b36
authored
Mar 26, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补证登记添加
parent
3fb6043e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
6 deletions
+56
-6
JgCertificateReplenishServiceImpl.java
...g/biz/service/impl/JgCertificateReplenishServiceImpl.java
+56
-6
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/JgCertificateReplenishServiceImpl.java
View file @
522c3b36
...
@@ -65,6 +65,7 @@ import javax.annotation.PostConstruct;
...
@@ -65,6 +65,7 @@ import javax.annotation.PostConstruct;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.File
;
import
java.nio.file.Files
;
import
java.nio.file.Files
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.ZoneId
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.*
;
...
@@ -148,6 +149,9 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -148,6 +149,9 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
private
final
EquipmentCategoryMapper
equipmentCategoryMapper
;
private
final
EquipmentCategoryMapper
equipmentCategoryMapper
;
private
final
JgCertificateReplenishEqServiceImpl
certificateReplenishEqService
;
private
final
JgCertificateReplenishEqServiceImpl
certificateReplenishEqService
;
private
final
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
private
final
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
private
final
JgCertificateChangeRecordServiceImpl
certificateChangeRecordService
;
private
final
JgCertificateChangeRecordEqServiceImpl
certificateChangeRecordEqService
;
private
final
IdxBizJgFactoryInfoServiceImpl
idxBizJgFactoryInfoService
;
/**
/**
* 用户信息
* 用户信息
...
@@ -496,13 +500,13 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -496,13 +500,13 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
WorkflowResultDto
workflowResultDto
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
)).
get
(
0
);
WorkflowResultDto
workflowResultDto
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
)).
get
(
0
);
certRep
.
setPromoter
(
getSelectedOrgInfo
().
getUserModel
().
getUserId
());
certRep
.
setPromoter
(
getSelectedOrgInfo
().
getUserModel
().
getUserId
());
certRep
.
setProcessAdvice
(
certRep
.
getProcessAdvice
());
certRep
.
setProcessAdvice
(
certRep
.
getProcessAdvice
());
TaskV2Model
taskV2Model
;
TaskV2Model
taskV2Model
=
new
TaskV2Model
()
;
if
(
StringUtils
.
isEmpty
(
workflowResultDto
.
getNextExecutorRoleIds
()))
{
if
(
StringUtils
.
isEmpty
(
workflowResultDto
.
getNextExecutorRoleIds
()))
{
certRep
.
setApplyStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
certRep
.
setApplyStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
certRep
.
setPromoter
(
""
);
certRep
.
setPromoter
(
""
);
certRep
.
setNextTaskId
(
null
);
certRep
.
setNextTaskId
(
null
);
// 上个代办改为已办
// 上个代办改为已办
this
.
updateLastTodo
(
certRep
,
FlowStatusEnum
.
TO_BE_FINISHED
);
t
askV2Model
=
t
his
.
updateLastTodo
(
certRep
,
FlowStatusEnum
.
TO_BE_FINISHED
);
}
else
{
}
else
{
certRep
.
setNextExecuteIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
certRep
.
setNextExecuteIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
certRep
.
setPromoter
(
RequestContext
.
getExeUserId
());
certRep
.
setPromoter
(
RequestContext
.
getExeUserId
());
...
@@ -518,12 +522,51 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -518,12 +522,51 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
certRep
.
setAcceptDate
(
Date
.
from
(
today
.
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
()));
certRep
.
setAcceptDate
(
Date
.
from
(
today
.
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
()));
certRep
.
setReissueDate
(
Date
.
from
(
today
.
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
()));
certRep
.
setReissueDate
(
Date
.
from
(
today
.
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
()));
this
.
updateManageWithPass
(
certRep
);
this
.
updateManageWithPass
(
certRep
);
this
.
saveManageRecord
(
certRep
);
this
.
saveManageRecord
(
certRep
,
taskV2Model
);
return
this
.
updateById
(
certRep
)
?
certRep
:
null
;
return
this
.
updateById
(
certRep
)
?
certRep
:
null
;
}
}
public
void
saveManageRecord
(
JgCertificateReplenish
certRep
)
{
public
void
saveManageRecord
(
JgCertificateReplenish
certRep
,
TaskV2Model
taskV2Model
)
{
// todo
Long
certChangeRecordSeq
=
sequence
.
nextId
();
JgCertificateChangeRecord
changeRecord
=
new
JgCertificateChangeRecord
()
.
setApplyNo
(
certRep
.
getApplyNo
())
.
setReceiveOrgName
(
certRep
.
getReceiveOrgName
())
.
setAuditPassDate
(
certRep
.
getAcceptDate
())
.
setRegType
(
BusinessTypeEnum
.
JG_REPLACEMENT_REGISTRATION
.
getName
())
.
setRegDate
(
certRep
.
getCreateDate
())
.
setChangeContent
(
this
.
buildVoidRecordContent
(
certRep
))
// 变更内容
.
setUseRegistrationCode
(
certRep
.
getUseRegistrationCode
())
// 使用登记编号
.
setReceiveCompanyCode
(
certRep
.
getReceiveOrgCode
())
// 接收机构公司代码
.
setUseUnitCreditCode
(
certRep
.
getUseUnitCode
())
// 使用单位统一信用代码
.
setUseUnitName
(
certRep
.
getUseUnitName
())
// 使用单位名称
.
setCreateDate
(
new
Date
())
.
setRoutePath
(
taskV2Model
.
getRoutePath
())
.
setEquCategory
(
certRep
.
getEquCategoryCode
());
changeRecord
.
setSequenceNbr
(
certChangeRecordSeq
);
certificateChangeRecordService
.
save
(
changeRecord
);
List
<
JgCertificateReplenishEq
>
replenishEqs
=
certificateReplenishEqService
.
getBaseMapper
().
selectList
(
new
LambdaQueryWrapper
<
JgCertificateReplenishEq
>()
.
eq
(
JgCertificateReplenishEq:
:
getCertificateReplenishId
,
certRep
.
getSequenceNbr
()));
replenishEqs
.
forEach
(
eq
->
{
IdxBizJgFactoryInfo
factoryInfo
=
idxBizJgFactoryInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>().
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
eq
.
getEquId
()));
JgCertificateChangeRecordEq
changeRecordEq
=
new
JgCertificateChangeRecordEq
()
.
setChangeRecordId
(
String
.
valueOf
(
certChangeRecordSeq
))
// 登记证记录主键
.
setEquId
(
eq
.
getEquId
())
// 设备主键
.
setProductCode
(
factoryInfo
.
getFactoryNum
());
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
});
}
/**
* 证变更内容
*
* @param obj JgCertificateReplenish
* @return result
*/
private
String
buildVoidRecordContent
(
JgCertificateReplenish
obj
)
{
// xxx单位的xx 办理了【补证登记】 ,单号【BZDJ202407050001】,申请日期2024-07-05
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
return
obj
.
getUseUnitName
()
+
"的"
+
obj
.
getCreateUserName
()
+
"办理了【"
+
BusinessTypeEnum
.
JG_REPLACEMENT_REGISTRATION
.
getName
()
+
"】,"
+
"单号【"
+
obj
.
getApplyNo
()
+
"】,申请日期"
+
simpleDateFormat
.
format
(
obj
.
getRecDate
());
}
}
public
void
updateManageWithPass
(
JgCertificateReplenish
certRep
)
{
public
void
updateManageWithPass
(
JgCertificateReplenish
certRep
)
{
...
@@ -539,7 +582,14 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
...
@@ -539,7 +582,14 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
* @return 代办信息
* @return 代办信息
*/
*/
private
TaskV2Model
updateLastTodo
(
JgCertificateReplenish
certRep
,
FlowStatusEnum
statusEnum
)
{
private
TaskV2Model
updateLastTodo
(
JgCertificateReplenish
certRep
,
FlowStatusEnum
statusEnum
)
{
return
commonService
.
updateTaskModel
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"taskStatus"
,
statusEnum
.
getCode
()).
put
(
"taskStatusLabel"
,
statusEnum
.
getName
()).
put
(
"flowStatus"
,
statusEnum
.
getCode
()).
put
(
"flowStatusLabel"
,
statusEnum
.
getName
()).
put
(
"relationId"
,
certRep
.
getInstanceId
()).
put
(
"model"
,
certRep
).
build
());
return
commonService
.
updateTaskModel
(
MapBuilder
.<
String
,
Object
>
create
()
.
put
(
"taskStatus"
,
statusEnum
.
getCode
())
.
put
(
"taskStatusLabel"
,
statusEnum
.
getName
())
.
put
(
"flowStatus"
,
statusEnum
.
getCode
())
.
put
(
"flowStatusLabel"
,
statusEnum
.
getName
())
.
put
(
"relationId"
,
certRep
.
getInstanceId
())
.
put
(
"model"
,
certRep
)
.
build
());
}
}
/**
/**
...
...
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