Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
ms-data-circulation-portal-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ff9873a9
authored
2025-02-17 11:01:46 +0800
by
肖初晴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【DAOP-1.0】数据需求
【功能点】测试问题处理
1 parent
8e5d6d76
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
109 deletions
src/main/java/com/csbr/qingcloud/portal/service/impl/DemandServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/service/impl/ServicerMaintainServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/service/impl/DemandServiceImpl.java
View file @
ff9873a
...
...
@@ -184,44 +184,14 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
MfDemand
entity
=
convertToEntity
(
rqVO
);
// 发起审批流程或保存草稿
AddApprovalDTO
approvalDTO
=
getAddApprovalDTO
(
entity
);
super
.
restartWorkFlow
(
rqVO
,
rqVO
.
getBizApproveState
(),
approvalDTO
,
null
,
oldEntity:
:
setBizApproveState
);
if
(
rqVO
.
getIsRestart
())
{
// 重新提交
againSubmitFlow
(
entity
,
rqVO
,
approvalDTO
);
}
else
{
// 修改业务数据
boolean
flag
=
mfDemandService
.
updateById
(
entity
);
if
(!
flag
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_UPDATE_ERROR
,
rqVO
.
getImmediateApprove
()
?
messageSourceUtil
.
submitMessage
(
FUNCTION_NAME
)
:
messageSourceUtil
.
updateMessage
(
FUNCTION_NAME
));
}
afterUpdate
(
entity
,
rqVO
);
}
}
/**
* 重新提交数据需求
* @author xcq
* @date 2024-12-31 18:46
* @param entity
* @param rqVO
* @param approvalDTO
* @return void
*/
private
void
againSubmitFlow
(
MfDemand
entity
,
DemandRQVO
rqVO
,
AddApprovalDTO
approvalDTO
)
{
// 重新提交的数据重置相关字段
entity
.
setGuid
(
CommonUtil
.
newGuid
());
mfDemandService
.
csbrBaseEntity
(
entity
);
// 保存新数据
boolean
flag
=
mfDemandService
.
save
(
entity
);
super
.
restartWorkFlow
(
rqVO
,
oldEntity
.
getBizApproveState
(),
approvalDTO
,
this
::
saveDemand
,
entity:
:
setBizApproveState
);
// 修改业务数据
boolean
flag
=
mfDemandService
.
updateById
(
entity
);
if
(!
flag
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_ADD_ERROR
,
messageSourceUtil
.
addMessage
(
String
.
format
(
"重新提交%s"
,
FUNCTION_NAME
)));
throw
new
CsbrSystemException
(
SystemError
.
DATA_UPDATE_ERROR
,
rqVO
.
getImmediateApprove
()
?
messageSourceUtil
.
submitMessage
(
FUNCTION_NAME
)
:
messageSourceUtil
.
updateMessage
(
FUNCTION_NAME
));
}
// 发起新的流程
approvalDTO
.
setGuid
(
entity
.
getGuid
());
approvalDTO
.
setBizGuid
(
entity
.
getGuid
());
approvalFlowUtil
.
addApproval
(
approvalDTO
);
afterSave
(
entity
,
rqVO
);
afterUpdate
(
entity
,
rqVO
);
}
/**
...
...
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
View file @
ff9873a
...
...
@@ -318,48 +318,19 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
public
void
updateEnterprise
(
FlowRQBaseVO
flowBaseVO
)
{
EnterpriseRQVO
rqVO
=
(
EnterpriseRQVO
)
flowBaseVO
;
// 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行
//
MfEnterprise oldEntity = mfEnterpriseService.getById(rqVO.getGuid());
MfEnterprise
oldEntity
=
mfEnterpriseService
.
getById
(
rqVO
.
getGuid
());
beforeUpdate
(
rqVO
);
MfEnterprise
entity
=
convertToEntity
(
rqVO
);
// 发起审批流程或保存草稿
AddApprovalDTO
approvalDTO
=
getAddApprovalDTO
(
entity
);
super
.
restartWorkFlow
(
rqVO
,
rqVO
.
getBizApproveState
(),
approvalDTO
,
null
,
entity:
:
setBizApproveState
);
if
(
rqVO
.
getIsRestart
())
{
// 重新提交
againSubmitFlow
(
entity
,
rqVO
,
approvalDTO
);
}
else
{
// 修改业务数据
boolean
flag
=
mfEnterpriseService
.
updateById
(
entity
);
if
(!
flag
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_UPDATE_ERROR
,
rqVO
.
getImmediateApprove
()
?
messageSourceUtil
.
submitMessage
(
FUNCTION_NAME
)
:
messageSourceUtil
.
updateMessage
(
FUNCTION_NAME
));
}
afterUpdate
(
entity
,
rqVO
);
}
}
/**
* 重新提交企业信息
* @author xcq
* @date 2024-12-26 16:18
* @param entity
* @param rqVO
* @param approvalDTO
* @return void
*/
private
void
againSubmitFlow
(
MfEnterprise
entity
,
EnterpriseRQVO
rqVO
,
AddApprovalDTO
approvalDTO
)
{
// 重新提交的数据重置相关字段
entity
.
setGuid
(
CommonUtil
.
newGuid
());
mfEnterpriseService
.
csbrBaseEntity
(
entity
);
// 保存新数据
boolean
flag
=
mfEnterpriseService
.
save
(
entity
);
super
.
restartWorkFlow
(
rqVO
,
oldEntity
.
getBizApproveState
(),
approvalDTO
,
this
::
saveEnterprise
,
entity:
:
setBizApproveState
);
// 修改业务数据
boolean
flag
=
mfEnterpriseService
.
updateById
(
entity
);
if
(!
flag
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_ADD_ERROR
,
messageSourceUtil
.
addMessage
(
String
.
format
(
"重新提交%s"
,
FUNCTION_NAME
)));
throw
new
CsbrSystemException
(
SystemError
.
DATA_UPDATE_ERROR
,
rqVO
.
getImmediateApprove
()
?
messageSourceUtil
.
submitMessage
(
FUNCTION_NAME
)
:
messageSourceUtil
.
updateMessage
(
FUNCTION_NAME
));
}
// 发起新的流程
approvalDTO
.
setGuid
(
entity
.
getGuid
());
approvalFlowUtil
.
addApproval
(
approvalDTO
);
afterSave
(
entity
,
rqVO
);
afterUpdate
(
entity
,
rqVO
);
}
/**
...
...
src/main/java/com/csbr/qingcloud/portal/service/impl/ServicerMaintainServiceImpl.java
View file @
ff9873a
...
...
@@ -161,7 +161,7 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser
public
void
updateServicerMaintain
(
FlowRQBaseVO
flowBaseVO
)
{
ServicerMaintainRQVO
rqVO
=
(
ServicerMaintainRQVO
)
flowBaseVO
;
// 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行
//
MfServicerMaintain oldEntity = mfServicerMaintainService.getById(rqVO.getGuid());
MfServicerMaintain
oldEntity
=
mfServicerMaintainService
.
getById
(
rqVO
.
getGuid
());
beforeUpdate
(
rqVO
);
MfServicerMaintain
entity
=
convertToEntity
(
rqVO
);
if
(
"Y"
.
equals
(
rqVO
.
getBizApproveState
())){
...
...
@@ -176,45 +176,16 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser
else
{
// 发起审批流程或保存草稿
AddApprovalDTO
approvalDTO
=
getAddApprovalDTO
(
entity
);
super
.
restartWorkFlow
(
rqVO
,
rqVO
.
getBizApproveState
(),
approvalDTO
,
null
,
entity:
:
setBizApproveState
);
if
(
rqVO
.
getIsRestart
())
{
// 重新提交
againSubmitFlow
(
entity
,
rqVO
,
approvalDTO
);
}
else
{
// 修改业务数据
boolean
flag
=
mfServicerMaintainService
.
updateById
(
entity
);
if
(!
flag
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_UPDATE_ERROR
,
rqVO
.
getImmediateApprove
()
?
messageSourceUtil
.
submitMessage
(
FUNCTION_NAME
)
:
messageSourceUtil
.
updateMessage
(
FUNCTION_NAME
));
}
afterUpdate
(
entity
,
rqVO
);
super
.
restartWorkFlow
(
rqVO
,
oldEntity
.
getBizApproveState
(),
approvalDTO
,
this
::
saveServicerMaintain
,
entity:
:
setBizApproveState
);
// 修改业务数据
boolean
flag
=
mfServicerMaintainService
.
updateById
(
entity
);
if
(!
flag
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_UPDATE_ERROR
,
rqVO
.
getImmediateApprove
()
?
messageSourceUtil
.
submitMessage
(
FUNCTION_NAME
)
:
messageSourceUtil
.
updateMessage
(
FUNCTION_NAME
));
}
afterUpdate
(
entity
,
rqVO
);
}
}
/**
* 重新提交服务商维护
* @author xcq
* @date 2024-12-31 18:49
* @param entity
* @param rqVO
* @param approvalDTO
* @return void
*/
private
void
againSubmitFlow
(
MfServicerMaintain
entity
,
ServicerMaintainRQVO
rqVO
,
AddApprovalDTO
approvalDTO
)
{
// 重新提交的数据重置相关字段
entity
.
setGuid
(
CommonUtil
.
newGuid
());
mfServicerMaintainService
.
csbrBaseEntity
(
entity
);
// 保存新数据
boolean
flag
=
mfServicerMaintainService
.
save
(
entity
);
if
(!
flag
)
{
throw
new
CsbrSystemException
(
SystemError
.
DATA_ADD_ERROR
,
messageSourceUtil
.
addMessage
(
String
.
format
(
"重新提交%s"
,
FUNCTION_NAME
)));
}
// 发起新的流程
approvalDTO
.
setGuid
(
entity
.
getGuid
());
approvalFlowUtil
.
addApproval
(
approvalDTO
);
afterSave
(
entity
,
rqVO
);
}
/**
* 服务商维护数据删除、并有相关的处理操作
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment