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
9fe86dcc
Commit
9fe86dcc
authored
May 31, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.开通拆分方法后部分字段丢失
parent
4be8a541
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
7 deletions
+42
-7
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+42
-7
No files found.
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 @
9fe86dcc
...
...
@@ -16,7 +16,6 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
...
...
@@ -103,8 +102,6 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
@Value
(
"classpath:/json/bizTypeInfo.json"
)
private
org
.
springframework
.
core
.
io
.
Resource
bizTypeInfo
;
@Autowired
private
RedisUtils
redisUtils
;
@Autowired
private
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
;
...
...
@@ -149,6 +146,11 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
*/
private
final
static
String
ZZXM_JYJC_DICT_KEY
=
"ZZXM_JYJC_ALL"
;
/**
* 编辑、工作台暂存逻辑
* @param model 对象
* @return JyjcOpeningApplicationModel
*/
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
public
JyjcOpeningApplicationModel
saveOrUpdate
(
JyjcOpeningApplicationModel
model
)
{
if
(
model
.
getSequenceNbr
()
!=
null
)
{
...
...
@@ -173,10 +175,15 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
return
this
.
updateWithModel
(
model
);
}
/**
* 提交、保存并提交逻辑
* @param model 对象
* @return JyjcOpeningApplicationModel
*/
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
public
JyjcOpeningApplicationModel
submitApplication
(
JyjcOpeningApplicationModel
model
)
{
model
.
setApplyTime
(
new
Date
());
String
instanceId
=
model
.
getWorkflowProstanceId
();
this
.
setDefaultFieldValue
(
model
);
if
(
StringUtils
.
isBlank
(
instanceId
))
{
// 未开启过工作流则进行开启 startProcess
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
...
...
@@ -199,17 +206,45 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
model
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
model
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
// 首次提交时删除暂存的待办
t
askModelService
.
deleteTaskModel
(
model
.
getSequenceNbr
()
+
""
);
t
his
.
deleteDraftTask
(
model
);
// 创建代办
buildTask
(
model
,
workflowResultDto
);
saveModel
(
model
);
// 缓存流程数据
commonService
.
saveExecuteFlowData2Redis
(
workflowResultDto
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
model
));
return
this
.
updateWithModel
(
model
)
;
return
model
;
}
else
{
// 首次提交时删除暂存的待办
t
askModelService
.
deleteTaskModel
(
model
.
getSequenceNbr
()
+
""
);
t
his
.
deleteDraftTask
(
model
);
// 存在流程,执行
executeOneStep
(
model
);
saveModel
(
model
);
return
model
;
}
}
private
void
deleteDraftTask
(
JyjcOpeningApplicationModel
model
)
{
if
(
model
.
getSequenceNbr
()
!=
null
)
{
taskModelService
.
deleteTaskModel
(
model
.
getSequenceNbr
()
+
""
);
}
}
private
void
setDefaultFieldValue
(
JyjcOpeningApplicationModel
model
)
{
CompanyBo
companyBo
=
commonService
.
getReginParamsOfCurrentUser
().
getCompany
();
model
.
setApplyTime
(
new
Date
());
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
if
(
model
.
getSequenceNbr
()
==
null
)
{
model
.
setCreateUserId
(
RequestContext
.
getExeUserId
());
List
<
String
>
codes
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
).
getResult
();
model
.
setApplicationSeq
(
codes
.
get
(
0
));
}
}
private
JyjcOpeningApplicationModel
saveModel
(
JyjcOpeningApplicationModel
model
)
{
if
(
model
.
getSequenceNbr
()
==
null
)
{
return
this
.
createWithModel
(
model
);
}
else
{
return
this
.
updateWithModel
(
model
);
}
}
...
...
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