Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-plan
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-plan
Commits
cc3a5d29
Commit
cc3a5d29
authored
Oct 09, 2024
by
wei
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同终止接口。科研类国防科技口收入合同创建即发布状态
parent
e342e9d7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
19 deletions
+80
-19
Constants.java
...n/java/com/yonde/dcs/plan/common/constants/Constants.java
+12
-0
ExtExpenditureContractController.java
...lan/core/controller/ExtExpenditureContractController.java
+6
-0
ExtInComeContractController.java
...dcs/plan/core/controller/ExtInComeContractController.java
+6
-0
ExtExpenditureContractService.java
.../dcs/plan/core/service/ExtExpenditureContractService.java
+2
-1
ExtInComeContractService.java
...yonde/dcs/plan/core/service/ExtInComeContractService.java
+2
-0
ExtExpenditureContractServiceImpl.java
.../core/service/impl/ExtExpenditureContractServiceImpl.java
+12
-0
ExtInComeContractServiceImpl.java
.../plan/core/service/impl/ExtInComeContractServiceImpl.java
+40
-18
No files found.
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/constants/Constants.java
View file @
cc3a5d29
...
...
@@ -150,6 +150,14 @@ public class Constants {
* 已发布
*/
public
static
final
String
PBULISHED
=
"published"
;
/**
* 已发布
*/
public
static
final
String
RELEASE
=
"release"
;
/**
* 已终止
*/
public
static
final
String
TERMINATION
=
"Termination"
;
/**
* 已过时
*/
...
...
@@ -410,6 +418,10 @@ public class Constants {
* 外部技术联系单
*/
public
static
final
String
EXT_CONTACT
=
"ExtContactList"
;
/**
* 科研类国防科技口收入合同
*/
public
static
final
String
EXT_D_T_INCOME_CONTRACT
=
"ExtDtIncomeContract"
;
/**
* excel 操作符
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtExpenditureContractController.java
View file @
cc3a5d29
...
...
@@ -38,6 +38,12 @@ public class ExtExpenditureContractController<V extends ExtExpenditureContractVO
return
ApiResult
.
ok
(
extExpenditureContractService
.
startWorkflow
(
id
),
"操作完成"
);
}
@ApiOperation
(
"合同终止"
)
@PostMapping
(
value
=
"/termination"
)
public
ApiResult
termination
(
@RequestParam
(
"id"
)
Long
id
)
{
return
ApiResult
.
ok
(
extExpenditureContractService
.
termination
(
id
),
"操作完成"
);
}
@ApiOperation
(
value
=
"生成word签字"
,
notes
=
"生成word签字"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/generateContractWordSign"
)
public
void
generateContractWordSign
(
@RequestParam
(
"documentId"
)
Long
contractId
,
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtInComeContractController.java
View file @
cc3a5d29
...
...
@@ -38,6 +38,12 @@ public class ExtInComeContractController<V extends ExtInComeContractVO, S extend
return
ApiResult
.
ok
(
extInComeContractService
.
startWorkflow
(
id
),
"操作完成"
);
}
@ApiOperation
(
"合同终止"
)
@PostMapping
(
value
=
"/termination"
)
public
ApiResult
termination
(
@RequestParam
(
"id"
)
Long
id
)
{
return
ApiResult
.
ok
(
extInComeContractService
.
termination
(
id
),
"操作完成"
);
}
@ApiOperation
(
value
=
"生成word签字"
,
notes
=
"生成word签字"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/generateContractWordSign"
)
public
void
generateContractWordSign
(
@RequestParam
(
"documentId"
)
Long
contractId
,
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtExpenditureContractService.java
View file @
cc3a5d29
...
...
@@ -4,7 +4,6 @@ import com.yonde.dcs.plan.common.vo.ExtExpenditureContractVO;
import
com.yonde.dcs.plan.core.service.shadow.ExtExpenditureContractServiceShadow
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.List
;
...
...
@@ -44,4 +43,6 @@ public interface ExtExpenditureContractService<V extends ExtExpenditureContractV
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
String
getEndDate
(
List
<
DxWfProcessTaskVO
>
dxWfProcessTaskVO
,
String
activityName
);
ExtExpenditureContractVO
termination
(
Long
id
);
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtInComeContractService.java
View file @
cc3a5d29
...
...
@@ -18,4 +18,6 @@ public interface ExtInComeContractService<V extends ExtInComeContractVO> extends
ExtInComeContractVO
findExtInComeContractObjFileLinks
(
Long
contractId
);
List
<
ExtInComeContractVO
>
getResearchCategory
(
String
subTypeName
);
ExtInComeContractVO
termination
(
Long
id
);
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtExpenditureContractServiceImpl.java
View file @
cc3a5d29
...
...
@@ -261,6 +261,18 @@ public class ExtExpenditureContractServiceImpl<V extends ExtExpenditureContractV
return
" "
;
}
@Override
public
ExtExpenditureContractVO
termination
(
Long
id
)
{
ExtExpenditureContractVO
extExpenditureContractVO
=
this
.
get
(
id
);
if
(
extExpenditureContractVO
==
null
)
{
throw
new
DxBusinessException
(
"500"
,
"获取不到对象"
);
}
if
(!
extExpenditureContractVO
.
getState
().
equals
(
Constants
.
RELEASE
))
{
throw
new
DxBusinessException
(
"500"
,
"该对象不是已发布状态"
);
}
return
this
.
changeStatus
(
extExpenditureContractVO
.
getId
(),
Constants
.
TERMINATION
,
true
);
}
/**
* 获取用户名称及用户id(4.1新)
*/
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtInComeContractServiceImpl.java
View file @
cc3a5d29
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
import
com.google.common.collect.Lists
;
import
com.yonde.dcs.plan.common.vo.ExtExpenditureContractVO
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dcs.plan.common.vo.ExtInComeContractVO
;
import
com.yonde.dcs.plan.core.repository.ExtInComeContractRepository
;
import
com.yonde.dcs.plan.core.service.ExtInComeContractService
;
import
com.yonde.dcs.plan.entity.po.ExtInComeContract
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.dao.service.DxDaoPluginExpander
;
import
com.yonde.dex.dao.service.util.DxPageUtils
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.
ArrayList
;
import
java.util.
Collection
;
import
java.util.List
;
import
com.yonde.dcs.plan.common.vo.ExtInComeContractVO
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dcs.plan.core.service.ExtInComeContractService
;
import
com.yonde.dcs.plan.core.repository.ExtInComeContractRepository
;
import
com.yonde.dcs.plan.entity.po.ExtInComeContract
;
import
javax.annotation.Resource
;
/**
* @description: ExtInComeContract-ServiceImpl
* @author: dexadmin
* @version: V
* @date: 2024-9-24 16:48:58
**/
* @description: ExtInComeContract-ServiceImpl
* @author: dexadmin
* @version: V
* @date: 2024-9-24 16:48:58
**/
@Slf4j
@Service
(
ExtInComeContractServiceImpl
.
BEAN_NAME
)
public
class
ExtInComeContractServiceImpl
<
V
extends
ExtInComeContractVO
>
implements
ExtInComeContractService
<
V
>{
public
class
ExtInComeContractServiceImpl
<
V
extends
ExtInComeContractVO
>
implements
ExtInComeContractService
<
V
>,
DxDaoPluginExpander
<
V
>
{
public
static
final
String
BEAN_NAME
=
"extInComeContractServiceImpl"
;
...
...
@@ -44,6 +42,18 @@ public class ExtInComeContractServiceImpl<V extends ExtInComeContractVO> impleme
@Autowired
private
WfcProcessFeign
wfcProcessFeign
;
@Override
public
void
postSave
(
Collection
<
V
>
target
)
{
// 科研类国防科技口收入合同 直接改为已发布
for
(
V
v
:
target
)
{
String
subTypeName
=
v
.
getSubTypeName
();
if
(
Constants
.
EXT_D_T_INCOME_CONTRACT
.
equals
(
subTypeName
))
{
// 改为已发布
this
.
changeStatus
(
v
.
getId
(),
Constants
.
RELEASE
,
true
);
}
}
}
@Override
public
ExtInComeContractVO
startWorkflow
(
Long
id
)
{
ExtInComeContractVO
extInComeContractVO
=
this
.
get
(
id
);
...
...
@@ -90,6 +100,18 @@ public class ExtInComeContractServiceImpl<V extends ExtInComeContractVO> impleme
}
return
Lists
.
newArrayList
();
}
@Override
public
ExtInComeContractVO
termination
(
Long
id
)
{
ExtInComeContractVO
extInComeContractVO
=
this
.
get
(
id
);
if
(
extInComeContractVO
==
null
)
{
throw
new
DxBusinessException
(
"500"
,
"获取不到对象"
);
}
if
(!
extInComeContractVO
.
getState
().
equals
(
Constants
.
RELEASE
))
{
throw
new
DxBusinessException
(
"500"
,
"该对象不是已发布状态"
);
}
return
this
.
changeStatus
(
extInComeContractVO
.
getId
(),
Constants
.
TERMINATION
,
true
);
}
}
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