Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-doc-expand
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
INET-TWO
server
dcs-doc-expand
Commits
5caa6483
Commit
5caa6483
authored
Aug 13, 2024
by
xuzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feat][DOC]迁移类缺失问题修改
parent
1cb95188
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
633 additions
and
636 deletions
+633
-636
DocBeforeCreateEvent.java
.../java/com/yonde/dcs/core/events/DocBeforeCreateEvent.java
+256
-256
DocTransactionEvent.java
...n/java/com/yonde/dcs/core/events/DocTransactionEvent.java
+88
-88
ProcessDataUtils.java
...main/java/com/yonde/dcs/core/events/ProcessDataUtils.java
+135
-135
ValidateSecretListener.java
...ava/com/yonde/dcs/core/events/ValidateSecretListener.java
+138
-138
ExtAutoTaskServiceImpl.java
...m/yonde/dcs/core/service/impl/ExtAutoTaskServiceImpl.java
+16
-19
No files found.
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/events/DocBeforeCreateEvent.java
View file @
5caa6483
This diff is collapsed.
Click to expand it.
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/events/DocTransactionEvent.java
View file @
5caa6483
package
com
.
yonde
.
dcs
.
core
.
events
;
//
package com.yonde.dcs.core.events;
//
//
import
com.yonde.dcs.common.vo.ExtIncomeDetailVO
;
//
import com.yonde.dcs.common.vo.ExtIncomeDetailVO;
import
com.yonde.dcs.core.service.ExtDocService
;
//
import com.yonde.dcs.core.service.ExtDocService;
import
com.yonde.dcs.core.util.ExtDocUtil
;
//
import com.yonde.dcs.core.util.ExtDocUtil;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
//
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import
com.yonde.dcs.document.core.service.DocumentService
;
//
import com.yonde.dcs.document.core.service.DocumentService;
import
com.yonde.dcs.plan.common.vo.ExtSpendingDetailVO
;
//
import com.yonde.dcs.plan.common.vo.ExtSpendingDetailVO;
import
com.yonde.dcs.plan.feign.ExtIncomeContractServiceFeign
;
//
import com.yonde.dcs.plan.feign.ExtIncomeContractServiceFeign;
import
com.yonde.dcs.plan.feign.ExtSpendingContractServiceFeign
;
//
import com.yonde.dcs.plan.feign.ExtSpendingContractServiceFeign;
import
com.yonde.dex.dao.service.BaseService
;
//
import com.yonde.dex.dao.service.BaseService;
import
lombok.extern.slf4j.Slf4j
;
//
import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Qualifier
;
//
import org.springframework.beans.factory.annotation.Qualifier;
import
org.springframework.stereotype.Component
;
//
import org.springframework.stereotype.Component;
import
org.springframework.transaction.event.TransactionPhase
;
//
import org.springframework.transaction.event.TransactionPhase;
import
org.springframework.transaction.event.TransactionalEventListener
;
//
import org.springframework.transaction.event.TransactionalEventListener;
//
/**
/
//
**
* @program: inet-pdm-service
//
* @program: inet-pdm-service
* @description: 文档事务事件
//
* @description: 文档事务事件
* @author: dang wei
//
* @author: dang wei
* @create: 2021-11-23 14:23
//
* @create: 2021-11-23 14:23
*/
//
*/
@Component
//
@Component
@Slf4j
//
@Slf4j
public
class
DocTransactionEvent
{
//
public class DocTransactionEvent {
//
@Autowired
//
@Autowired
private
ExtDocService
extDocService
;
//
private ExtDocService extDocService;
//
@Autowired
//
@Autowired
@Qualifier
(
"documentServiceImpl"
)
//
@Qualifier("documentServiceImpl")
DocumentService
documentService
;
//
DocumentService documentService;
@Autowired
//
@Autowired
private
ExtIncomeContractServiceFeign
extIncomeContractService
;
//
private ExtIncomeContractServiceFeign extIncomeContractService;
@Autowired
//
@Autowired
private
ExtSpendingContractServiceFeign
extSpendingContractService
;
//
private ExtSpendingContractServiceFeign extSpendingContractService;
@Autowired
//
@Autowired
private
ExtDocUtil
extDocUtil
;
//
private ExtDocUtil extDocUtil;
//
@TransactionalEventListener
(
phase
=
TransactionPhase
.
AFTER_COMMIT
)
//
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
public
void
afterCommit
(
BaseService
.
DataChangeEvent
event
)
{
//
public void afterCommit(BaseService.DataChangeEvent event) {
final
String
eventType
=
event
.
getEventType
();
//
final String eventType = event.getEventType();
final
BaseService
.
ChangeType
changeType
=
BaseService
.
ChangeType
.
valueOf
(
eventType
);
//
final BaseService.ChangeType changeType = BaseService.ChangeType.valueOf(eventType);
if
(
changeType
==
BaseService
.
ChangeType
.
POST_CREATE
||
changeType
==
BaseService
.
ChangeType
.
POST_UPDATE
||
changeType
==
BaseService
.
ChangeType
.
POST_DELETE
)
{
//
if (changeType == BaseService.ChangeType.POST_CREATE || changeType == BaseService.ChangeType.POST_UPDATE || changeType == BaseService.ChangeType.POST_DELETE) {
event
.
getEventTargets
().
forEach
(
t
->
{
//
event.getEventTargets().forEach(t -> {
DxDocumentVO
doc
=
new
DxDocumentVO
();
//
DxDocumentVO doc = new DxDocumentVO();
if
(
t
instanceof
ExtIncomeDetailVO
)
{
//
if (t instanceof ExtIncomeDetailVO) {
//刷新收入合同相关金额
//
//刷新收入合同相关金额
ExtIncomeDetailVO
extIncomeDetailVO
=
(
ExtIncomeDetailVO
)
t
;
//
ExtIncomeDetailVO extIncomeDetailVO = (ExtIncomeDetailVO) t;
this
.
refreshInContractAmount
(
extIncomeDetailVO
.
getExtIncomeContractId
());
//
this.refreshInContractAmount(extIncomeDetailVO.getExtIncomeContractId());
}
else
if
(
t
instanceof
ExtSpendingDetailVO
)
{
//
} else if (t instanceof ExtSpendingDetailVO) {
//刷新支出合同相关金额
//
//刷新支出合同相关金额
ExtSpendingDetailVO
spendingDetailVO
=
(
ExtSpendingDetailVO
)
t
;
//
ExtSpendingDetailVO spendingDetailVO = (ExtSpendingDetailVO) t;
this
.
refreshSpeContractAmount
(
spendingDetailVO
.
getExtSpendingContractId
());
//
this.refreshSpeContractAmount(spendingDetailVO.getExtSpendingContractId());
}
//
}
});
//
});
}
//
}
}
//
}
//
//
/**
//
/**
* 刷新收入合同金额
//
* 刷新收入合同金额
*
//
*
* @param contractId
//
* @param contractId
*/
//
*/
private
void
refreshInContractAmount
(
Long
contractId
)
{
//
private void refreshInContractAmount(Long contractId) {
//已到款
//
//已到款
//待拨付
//
//待拨付
extIncomeContractService
.
calculateIncome
(
contractId
);
//
extIncomeContractService.calculateIncome(contractId);
//XXX年到款
//
//XXX年到款
extIncomeContractService
.
reCalculIncomeById
(
contractId
);
//
extIncomeContractService.reCalculIncomeById(contractId);
}
//
}
//
/**
//
/**
* 刷新支出合同金额
//
* 刷新支出合同金额
*
//
*
* @param contractId
//
* @param contractId
*/
//
*/
private
void
refreshSpeContractAmount
(
Long
contractId
)
{
//
private void refreshSpeContractAmount(Long contractId) {
//已付金额
//
//已付金额
//未付金额
//
//未付金额
//付款比例
//
//付款比例
extSpendingContractService
.
calculateSpending
(
contractId
);
//
extSpendingContractService.calculateSpending(contractId);
}
//
}
}
//
}
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/events/ProcessDataUtils.java
View file @
5caa6483
This diff is collapsed.
Click to expand it.
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/events/ValidateSecretListener.java
View file @
5caa6483
This diff is collapsed.
Click to expand it.
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/service/impl/ExtAutoTaskServiceImpl.java
View file @
5caa6483
...
@@ -7,13 +7,13 @@ import cn.hutool.core.io.FileUtil;
...
@@ -7,13 +7,13 @@ import cn.hutool.core.io.FileUtil;
import
cn.hutool.extra.spring.SpringUtil
;
import
cn.hutool.extra.spring.SpringUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yonde.dcs.common.vo.*
;
import
com.yonde.dcs.common.vo.*
;
import
com.yonde.dcs.core.constants.SignConstants
;
import
com.yonde.dcs.core.events.DocBeforeCreateEvent
;
import
com.yonde.dcs.core.events.ProcessDataUtils
;
import
com.yonde.dcs.core.factory.NCRSCUtils
;
import
com.yonde.dcs.core.factory.NCRSCUtils
;
import
com.yonde.dcs.core.factory.TechnicalFileUtils
;
import
com.yonde.dcs.core.factory.TechnicalFileUtils
;
import
com.yonde.dcs.core.service.*
;
import
com.yonde.dcs.core.service.*
;
import
com.yonde.dcs.core.util.*
;
import
com.yonde.dcs.core.util.ExtDocUtil
;
import
com.yonde.dcs.core.util.ExtWfcUtil
;
import
com.yonde.dcs.core.util.SearchUtil
;
import
com.yonde.dcs.core.util.WorkFlowUtil
;
import
com.yonde.dcs.core.word.ImportWordService
;
import
com.yonde.dcs.core.word.ImportWordService
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.document.core.service.DocumentService
;
import
com.yonde.dcs.document.core.service.DocumentService
;
...
@@ -27,10 +27,8 @@ import com.yonde.dcs.plan.feign.ExtPlanServiceFeign;
...
@@ -27,10 +27,8 @@ import com.yonde.dcs.plan.feign.ExtPlanServiceFeign;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.api.CustomMultipartFile
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.entity.jackson.JsonUtils
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.basedata.utils.obj.DxEntityUtils
;
import
com.yonde.dex.basedata.utils.obj.DxEntityUtils
;
import
com.yonde.dex.dao.service.util.DxPageUtils
;
import
com.yonde.dex.dao.service.util.DxPageUtils
;
...
@@ -43,19 +41,16 @@ import com.yonde.dex.user.common.vo.DxUserInfoVO;
...
@@ -43,19 +41,16 @@ import com.yonde.dex.user.common.vo.DxUserInfoVO;
import
com.yonde.dex.user.feign.DxOrganizationFeign
;
import
com.yonde.dex.user.feign.DxOrganizationFeign
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.user.feign.SwitchUserService
;
import
com.yonde.dex.user.feign.SwitchUserService
;
import
com.yonde.dex.utils.common.utils.DxFileUtils
;
import
com.yonde.dex.wfc.common.vo.DxWfParticipantInfoVO
;
import
com.yonde.dex.wfc.common.vo.*
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
import
com.yonde.dex.wfc.common.vo.DxWfTaskContext
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
import
com.yonde.dex.wfc.feign.api.WfcTaskFeign
;
import
com.yonde.dex.wfc.feign.api.WfcTaskFeign
;
import
feign.form.ContentType
;
import
lombok.SneakyThrows
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.client.utils.CloneUtils
;
import
org.joda.time.LocalDate
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
...
@@ -66,7 +61,9 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -66,7 +61,9 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.*
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.InputStream
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -115,8 +112,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
...
@@ -115,8 +112,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
private
SwitchUserService
switchUserService
;
private
SwitchUserService
switchUserService
;
@Autowired
@Autowired
private
ExtInterfaceInfoLinkService
interfaceInfoLinkService
;
private
ExtInterfaceInfoLinkService
interfaceInfoLinkService
;
@Autowired
//
@Autowired
private
DocBeforeCreateEvent
docBeforeCreateEvent
;
//
private DocBeforeCreateEvent docBeforeCreateEvent;
@Autowired
@Autowired
private
FileManagerFeignService
fileManagerFeignService
;
private
FileManagerFeignService
fileManagerFeignService
;
@Autowired
@Autowired
...
@@ -135,8 +132,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
...
@@ -135,8 +132,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
private
TechnicalFileUtils
technicalFileUtils
;
private
TechnicalFileUtils
technicalFileUtils
;
@Autowired
@Autowired
private
WorkFlowUtil
workFlowUtil
;
private
WorkFlowUtil
workFlowUtil
;
@Autowired
//
@Autowired
private
ProcessDataUtils
processDataUtils
;
//
private ProcessDataUtils processDataUtils;
@Autowired
@Autowired
ExtApplicantService
extApplicantService
;
ExtApplicantService
extApplicantService
;
@Autowired
@Autowired
...
@@ -1026,8 +1023,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
...
@@ -1026,8 +1023,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
*/
*/
@Override
@Override
public
void
generateWordByAutoMethod
(
DxDocumentVO
documentVo
)
{
public
void
generateWordByAutoMethod
(
DxDocumentVO
documentVo
)
{
DxDocumentVO
dxDocumentVO
=
docBeforeCreateEvent
.
processCreateData
(
documentVo
);
//
DxDocumentVO dxDocumentVO = docBeforeCreateEvent.processCreateData(documentVo);
documentService
.
saveRecursion
(
dxDocumentVO
);
//
documentService.saveRecursion(dxDocumentVO);
}
}
/**
/**
...
...
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