Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
finance_serv
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit aa39888f
authored
Sep 11, 2018
by
王军业
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【加入部分注解】
1 parent
c45d7db8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
4 deletions
code/finance_serv/src/main/java/com/vion/financial/config/FinanceConfig.java
code/finance_serv/src/main/java/com/vion/financial/controller/AppendixController.java
code/finance_serv/src/main/java/com/vion/financial/controller/ContractController.java
code/finance_serv/src/main/java/com/vion/financial/config/FinanceConfig.java
View file @
aa39888
...
@@ -3,6 +3,11 @@ package com.vion.financial.config;
...
@@ -3,6 +3,11 @@ package com.vion.financial.config;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
/**
* 读取配置文件类
* @author Administrator
*
*/
@Component
@Component
@ConfigurationProperties
(
prefix
=
"finance"
)
@ConfigurationProperties
(
prefix
=
"finance"
)
public
class
FinanceConfig
{
public
class
FinanceConfig
{
...
...
code/finance_serv/src/main/java/com/vion/financial/controller/AppendixController.java
View file @
aa39888
...
@@ -22,7 +22,11 @@ import com.vion.financial.service.AppendixService;
...
@@ -22,7 +22,11 @@ import com.vion.financial.service.AppendixService;
import
com.vion.financial.vo.AppendixVo
;
import
com.vion.financial.vo.AppendixVo
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.SuccessCode
;
import
com.vion.financial.vo.SuccessCode
;
/**
* 附件controller层
* @author WJY
*
*/
@RestController
@RestController
public
class
AppendixController
extends
BaseController
{
public
class
AppendixController
extends
BaseController
{
...
@@ -36,14 +40,22 @@ public class AppendixController extends BaseController{
...
@@ -36,14 +40,22 @@ public class AppendixController extends BaseController{
AppendixService
AppendixService
;
AppendixService
AppendixService
;
//新增
/**
* 上传附件
* @param appendixVo
* @return
*/
@PostMapping
(
value
=
"/{contract_unid}/upload/appendixes"
)
@PostMapping
(
value
=
"/{contract_unid}/upload/appendixes"
)
@ResponseBody
@ResponseBody
public
Object
upload
(
AppendixVo
appendixVo
)
{
public
Object
upload
(
AppendixVo
appendixVo
)
{
return
AppendixService
.
upload
(
appendixVo
);
return
AppendixService
.
upload
(
appendixVo
);
}
}
//修改
/**
* 修改附件
* @param appendix
* @return
*/
@PutMapping
(
value
=
"/{contract_unid}/upload/appendixes"
)
@PutMapping
(
value
=
"/{contract_unid}/upload/appendixes"
)
@ResponseBody
@ResponseBody
public
Object
update
(
@RequestBody
Appendix
appendix
)
{
public
Object
update
(
@RequestBody
Appendix
appendix
)
{
...
...
code/finance_serv/src/main/java/com/vion/financial/controller/ContractController.java
View file @
aa39888
...
@@ -23,19 +23,34 @@ public class ContractController extends BaseController {
...
@@ -23,19 +23,34 @@ public class ContractController extends BaseController {
@Resource
@Resource
ContractService
contractService
;
ContractService
contractService
;
/**
*新增合同
* @param vontractVo
* @return
*/
@PostMapping
@PostMapping
@ResponseBody
@ResponseBody
public
Object
addContract
(
@RequestBody
ContractVo
vontractVo
)
{
public
Object
addContract
(
@RequestBody
ContractVo
vontractVo
)
{
return
contractService
.
addOne
(
vontractVo
);
return
contractService
.
addOne
(
vontractVo
);
}
}
/**
* 查询合同
* @param contract_unid
* @return
*/
@GetMapping
(
value
=
"/{contract_unid}"
)
@GetMapping
(
value
=
"/{contract_unid}"
)
@ResponseBody
@ResponseBody
public
Object
queryOne
(
@PathVariable
String
contract_unid
)
{
public
Object
queryOne
(
@PathVariable
String
contract_unid
)
{
return
contractService
.
queryOne
(
contract_unid
);
return
contractService
.
queryOne
(
contract_unid
);
}
}
/**
* 修改合同
* @param contract_unid
* @param vontractVo
* @return
*/
@PutMapping
(
value
=
"/{contract_unid}"
)
@PutMapping
(
value
=
"/{contract_unid}"
)
@ResponseBody
@ResponseBody
public
Object
updateOne
(
@PathVariable
String
contract_unid
,
@RequestBody
ContractVo
vontractVo
)
{
public
Object
updateOne
(
@PathVariable
String
contract_unid
,
@RequestBody
ContractVo
vontractVo
)
{
...
@@ -43,18 +58,32 @@ public class ContractController extends BaseController {
...
@@ -43,18 +58,32 @@ public class ContractController extends BaseController {
return
contractService
.
updateOne
(
vontractVo
);
return
contractService
.
updateOne
(
vontractVo
);
}
}
/**
* 删除合同
* @param contract_unid
* @return
*/
@DeleteMapping
(
value
=
"/{contract_unid}"
)
@DeleteMapping
(
value
=
"/{contract_unid}"
)
@ResponseBody
@ResponseBody
public
Object
deleteOne
(
@PathVariable
String
contract_unid
)
{
public
Object
deleteOne
(
@PathVariable
String
contract_unid
)
{
return
contractService
.
deleteOne
(
contract_unid
);
return
contractService
.
deleteOne
(
contract_unid
);
}
}
/**
* 查询批量合同号
* @return
*/
@GetMapping
(
value
=
"codes"
)
@GetMapping
(
value
=
"codes"
)
@ResponseBody
@ResponseBody
public
Object
queryList
()
{
public
Object
queryList
()
{
return
contractService
.
queryList
();
return
contractService
.
queryList
();
}
}
/**
* 按条件查询符合条件的合同
* @param selectVo
* @return
*/
@GetMapping
()
@GetMapping
()
@ResponseBody
@ResponseBody
public
Object
queryByCondition
(
SelectVo
selectVo
)
{
public
Object
queryByCondition
(
SelectVo
selectVo
)
{
...
@@ -62,12 +91,22 @@ public class ContractController extends BaseController {
...
@@ -62,12 +91,22 @@ public class ContractController extends BaseController {
}
}
/**
* 导出合同的excel表格
* @param selectVo
* @param response
*/
@GetMapping
(
value
=
"/export"
)
@GetMapping
(
value
=
"/export"
)
@ResponseBody
@ResponseBody
public
void
downLoadExcel
(
SelectVo
selectVo
,
HttpServletResponse
response
)
{
public
void
downLoadExcel
(
SelectVo
selectVo
,
HttpServletResponse
response
)
{
contractService
.
exportExcel
(
selectVo
,
response
);
contractService
.
exportExcel
(
selectVo
,
response
);
}
}
/**
* 导入合同的excel表格
* @param file
* @return
*/
@PostMapping
(
value
=
"/import"
)
@PostMapping
(
value
=
"/import"
)
@ResponseBody
@ResponseBody
public
Object
importExcel
(
@RequestParam
(
"file"
)
MultipartFile
file
)
{
public
Object
importExcel
(
@RequestParam
(
"file"
)
MultipartFile
file
)
{
...
...
Write
Preview
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