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
65a9b1aa
Commit
65a9b1aa
authored
Aug 02, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加fegin接口
parent
52d141d5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
4 deletions
+48
-4
ExtIncomeContractController.java
...dcs/plan/core/controller/ExtIncomeContractController.java
+2
-4
ExtIncomeContractServiceImpl.java
.../plan/core/service/impl/ExtIncomeContractServiceImpl.java
+10
-0
ExtDistributeRecordServiceFeign.java
...yonde/dcs/plan/feign/ExtDistributeRecordServiceFeign.java
+26
-0
ExtIncomeContractServiceFeign.java
...m/yonde/dcs/plan/feign/ExtIncomeContractServiceFeign.java
+10
-0
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/controller/ExtIncomeContractController.java
View file @
65a9b1aa
...
...
@@ -42,10 +42,8 @@ public class ExtIncomeContractController<V extends ExtIncomeContractVO, S extend
@ApiOperation
(
value
=
"xxx年到款计算"
,
notes
=
"xxx年到款计算"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/calculateIncome"
)
public
ApiResult
calculateIncomeByYear
(
@RequestParam
Long
id
,
String
year
)
{
ExtIncomeContractVO
extIncomeContractVO
=
extIncomeContractService
.
findRecursionExtIncomeContractVO
(
id
);
//通过收入基本属性id获取多个收入信息
extIncomeContractService
.
calculateIncomeByYear
(
id
,
year
,
extIncomeContractVO
);
return
ApiResult
.
ok
(
extIncomeContractVO
);
//todo wq:因为service继承了feign接口,所以要service接口必须实现feign接口,故将逻辑代码放入service中
return
ApiResult
.
ok
(
extIncomeContractService
.
calculateIncomeByYear
(
id
,
year
));
}
}
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtIncomeContractServiceImpl.java
View file @
65a9b1aa
...
...
@@ -8,9 +8,11 @@ import com.yonde.dcs.plan.core.service.ExtPaymentDetailsService;
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.api.ApiResult
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.dao.service.util.DxPageUtils
;
import
lombok.val
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -86,6 +88,14 @@ public class ExtIncomeContractServiceImpl<V extends ExtIncomeContractVO> impleme
return
extIncomeContractVO1
;
}
@Override
public
ExtIncomeContractVO
calculateIncomeByYear
(
Long
id
,
String
year
)
{
ExtIncomeContractVO
extIncomeContractVO
=
this
.
findRecursionExtIncomeContractVO
(
id
);
//通过收入基本属性id获取多个收入信息
this
.
calculateIncomeByYear
(
id
,
year
,
extIncomeContractVO
);
return
extIncomeContractVO
;
}
/**
* 深度查询收入合同
...
...
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/ExtDistributeRecordServiceFeign.java
View file @
65a9b1aa
package
com
.
yonde
.
dcs
.
plan
.
feign
;
import
com.yonde.dcs.plan.common.vo.ExtDistributeRecordVO
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
com.yonde.dex.user.common.vo.DxOrganizationVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dcs.plan.feign.shadow.ExtDistributeRecordServiceFeignShadow
;
import
java.util.List
;
/**
* @description: ExtDistributeRecord-Feign
* @author: dexadmin
...
...
@@ -16,4 +21,25 @@ import com.yonde.dcs.plan.feign.shadow.ExtDistributeRecordServiceFeignShadow;
@FeignClient
(
value
=
"${dcs.feign.INET-PLAN}"
,
path
=
"/ExtDistributeRecord"
)
public
interface
ExtDistributeRecordServiceFeign
<
V
extends
ExtDistributeRecordVO
>
extends
ExtDistributeRecordServiceFeignShadow
<
V
>
{
/**
* 收发记录接口
*
* @param id
* @return
*/
@ApiOperation
(
"获取收发记录接口"
)
@GetMapping
(
"/getDisRecord"
)
List
<
ExtDistributeRecordVO
>
getDisRecord
(
@RequestParam
(
"id"
)
Long
id
);
/**
* 通过用户id和code查询组织
*
* @param userId
* @param code
* @return
*/
@ApiOperation
(
"通过用户id和code查询组织"
)
@GetMapping
(
"/searchOrgByUserId"
)
List
<
DxOrganizationVO
>
searchOrgNameByUserId
(
@RequestParam
(
"userId"
)
Long
userId
,
@RequestParam
(
"code"
)
String
code
);
}
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/ExtIncomeContractServiceFeign.java
View file @
65a9b1aa
package
com
.
yonde
.
dcs
.
plan
.
feign
;
import
com.yonde.dcs.plan.common.vo.ExtIncomeContractVO
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
com.yonde.dcs.plan.feign.shadow.ExtIncomeContractServiceFeignShadow
;
...
...
@@ -16,4 +18,12 @@ import com.yonde.dcs.plan.feign.shadow.ExtIncomeContractServiceFeignShadow;
@FeignClient
(
value
=
"${dcs.feign.INET-PLAN}"
,
path
=
"/ExtIncomeContract"
)
public
interface
ExtIncomeContractServiceFeign
<
V
extends
ExtIncomeContractVO
>
extends
ExtIncomeContractServiceFeignShadow
<
V
>
{
@ApiOperation
(
value
=
"合同收入计算"
,
notes
=
"合同收入计算"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/calculateIncome/{id}"
)
ExtIncomeContractVO
calculateIncome
(
@PathVariable
Long
id
);
@ApiOperation
(
value
=
"xxx年到款计算"
,
notes
=
"xxx年到款计算"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/calculateIncome"
)
ExtIncomeContractVO
calculateIncomeByYear
(
@RequestParam
Long
id
,
String
year
);
}
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