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 b680583d
authored
Aug 01, 2018
by
王军业
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[更新]
1 parent
9413c051
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
649 additions
and
683 deletions
code/finance_serv/src/main/java/com/vion/financial/controller/AppendixController.java
code/finance_serv/src/main/java/com/vion/financial/mapper/ReturnInfoMapper.java
code/finance_serv/src/main/java/com/vion/financial/mapping/AppendixMapper.xml
code/finance_serv/src/main/java/com/vion/financial/service/imp/AppendixServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/ContractServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/DeliverGoodsServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/PaymentAgreeServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/ProjectAcceptancServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/ProjectServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/ReceiptServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/ReturnInfoServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/vo/FailCode.java
code/finance_serv/src/main/resources/generator/eneratorConfig.xml
code/finance_serv/src/main/resources/generator/generatorConfig.xml
code/finance_serv/src/main/java/com/vion/financial/controller/AppendixController.java
View file @
b680583
package
com
.
vion
.
financial
.
controller
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.vion.financial.entity.Appendix
;
import
com.vion.financial.service.AppendixService
;
import
com.vion.financial.vo.AppendixVo
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.SuccessCode
;
@RestController
public
class
AppendixController
extends
BaseController
{
@Autowired
SuccessCode
successCode
;
@Autowired
FailCode
failCode
;
@Resource
AppendixService
AppendixService
;
@PostMapping
(
value
=
"/{contract_unid}/upload/appendixes"
)
@ResponseBody
public
Object
upload
(
AppendixVo
appendixVo
)
{
try
{
Appendix
appendix
=
null
;
List
<
Appendix
>
list
=
new
ArrayList
<
Appendix
>
();
MultipartFile
[]
appendix_files
=
appendixVo
.
getAppendix_files
();
for
(
MultipartFile
multipartFile
:
appendix_files
)
{
appendix
=
new
Appendix
();
appendix
.
setAppendix_name
(
multipartFile
.
getOriginalFilename
());
appendix
.
setBusiness_table
(
appendixVo
.
getBusiness_table
());
String
suffix
=
appendix
.
getAppendix_name
().
substring
(
appendix
.
getAppendix_name
().
lastIndexOf
(
"."
)
+
1
);
appendix
.
setAppendix_type
(
suffix
);
appendix
.
setAppendix_url
(
"E:\\"
+
multipartFile
.
getOriginalFilename
());
AppendixService
.
addAppendix
(
appendix
);
list
.
add
(
appendix
);
InputStream
inputStream
=
multipartFile
.
getInputStream
();
File
file
=
new
File
(
"E:\\"
+
multipartFile
.
getOriginalFilename
());
OutputStream
os
=
new
FileOutputStream
(
file
);
byte
[]
read
=
new
byte
[
2048
];
int
off
=
0
;
while
((
off
=
inputStream
.
read
(
read
))
!=
-
1
)
{
os
.
write
(
read
);
}
os
.
flush
();
os
.
close
();
inputStream
.
close
();
}
return
list
;
}
catch
(
Exception
e
)
{
// TODO: handle exception
e
.
printStackTrace
();
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"上传异常"
);
return
failCode
;
}
}
}
package
com
.
vion
.
financial
.
controller
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.vion.financial.entity.Appendix
;
import
com.vion.financial.service.AppendixService
;
import
com.vion.financial.vo.AppendixVo
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.SuccessCode
;
@RestController
public
class
AppendixController
extends
BaseController
{
@Autowired
SuccessCode
successCode
;
@Autowired
FailCode
failCode
;
@Resource
AppendixService
AppendixService
;
@PostMapping
(
value
=
"/{contract_unid}/upload/appendixes"
)
@ResponseBody
public
Object
upload
(
AppendixVo
appendixVo
)
{
try
{
Appendix
appendix
=
null
;
List
<
Appendix
>
list
=
new
ArrayList
<
Appendix
>
();
MultipartFile
[]
appendix_files
=
appendixVo
.
getAppendix_files
();
for
(
MultipartFile
multipartFile
:
appendix_files
)
{
appendix
=
new
Appendix
();
appendix
.
setAppendix_name
(
multipartFile
.
getOriginalFilename
());
appendix
.
setBusiness_table
(
appendixVo
.
getBusiness_table
());
String
suffix
=
appendix
.
getAppendix_name
().
substring
(
appendix
.
getAppendix_name
().
lastIndexOf
(
"."
)
+
1
);
appendix
.
setAppendix_type
(
suffix
);
appendix
.
setAppendix_url
(
"E:\\"
+
multipartFile
.
getOriginalFilename
());
AppendixService
.
addAppendix
(
appendix
);
list
.
add
(
appendix
);
InputStream
inputStream
=
multipartFile
.
getInputStream
();
File
file
=
new
File
(
"E:\\"
+
multipartFile
.
getOriginalFilename
());
OutputStream
os
=
new
FileOutputStream
(
file
);
byte
[]
read
=
new
byte
[
2048
];
int
off
=
0
;
while
((
off
=
inputStream
.
read
(
read
))
!=
-
1
)
{
os
.
write
(
read
);
}
os
.
flush
();
os
.
close
();
inputStream
.
close
();
}
return
list
;
}
catch
(
Exception
e
)
{
// TODO: handle exception
e
.
printStackTrace
();
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"上传异常"
);
return
failCode
;
}
}
}
code/finance_serv/src/main/java/com/vion/financial/mapper/ReturnInfoMapper.java
View file @
b680583
package
com
.
vion
.
financial
.
mapper
;
import
com.vion.financial.entity.ReturnInfo
;
public
interface
ReturnInfoMapper
{
public
void
addReturnInfo
(
ReturnInfo
returnInfo
);
public
ReturnInfo
queryReturnInfo
(
String
s
);
public
void
updateReturnInfo
(
ReturnInfo
returnInfo
);
public
void
deleteReturnInfo
(
int
n
);
}
package
com
.
vion
.
financial
.
mapper
;
import
java.util.List
;
import
com.vion.financial.entity.ReturnInfo
;
public
interface
ReturnInfoMapper
{
public
void
addReturnInfo
(
ReturnInfo
returnInfo
);
public
List
<
ReturnInfo
>
queryReturnInfo
(
String
s
);
public
void
updateReturnInfo
(
ReturnInfo
returnInfo
);
public
void
deleteReturnInfo
(
int
n
);
}
code/finance_serv/src/main/java/com/vion/financial/mapping/AppendixMapper.xml
View file @
b680583
...
...
@@ -78,13 +78,13 @@
<delete
id=
"deleteAppendix"
parameterType=
"com.vion.financial.entity.Appendix"
>
delete from tb_appendix where 1=1
<if
test=
"business_table"
>
business_table = #{business_table} and
and business_table = #{business_table}
</if>
<if
test=
"business_unid"
>
business_unid = #{business_unid} and
and business_unid = #{business_unid}
</if>
<if
test=
"appendix_unid"
>
appendix_unid=#{appendix_unid}
a
nd a
ppendix_unid=#{appendix_unid}
</if>
</delete>
</mapper>
\ No newline at end of file
code/finance_serv/src/main/java/com/vion/financial/service/imp/AppendixServiceImpl.java
View file @
b680583
package
com
.
vion
.
financial
.
service
.
imp
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.vion.financial.entity.Appendix
;
import
com.vion.financial.mapper.AppendixMapper
;
import
com.vion.financial.service.AppendixService
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.SuccessCode
;
@Service
public
class
AppendixServiceImpl
implements
AppendixService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
AppendixServiceImpl
.
class
);
@Autowired
AppendixMapper
appendixMapper
;
@Autowired
FailCode
failCode
;
@Autowired
SuccessCode
successCode
;
@Override
public
Object
queryAppendixList
(
Appendix
appendix
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"====================查询附件start======================"
);
return
appendixMapper
.
queryAppendixList
(
appendix
);
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"查询附件异常"
+
e
.
getLocalizedMessage
(),
e
);
e
.
printStackTrace
();
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"附件查询异常"
);
return
failCode
;
}
}
@Override
public
Object
addAppendix
(
Appendix
appendix
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"====================增加附件start======================="
);
return
appendixMapper
.
addAppendix
(
appendix
);
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"增加附件异常"
+
e
.
getLocalizedMessage
(),
e
);
e
.
printStackTrace
();
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"附件增加异常"
);
return
failCode
;
}
}
@Override
public
Object
updateAppendix
(
Appendix
appendix
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"========================修改附件start===================="
);
appendixMapper
.
updateAppendix
(
appendix
);
return
successCode
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除附件异常"
+
e
.
getLocalizedMessage
(),
e
);
// TODO: handle exception
e
.
printStackTrace
();
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"附件修改异常"
);
return
failCode
;
}
}
@Override
public
Object
deleteAppendix
(
Appendix
appendix
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"=======================删除附件start===================="
);
appendixMapper
.
deleteAppendix
(
appendix
);
return
successCode
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除附件异常"
+
e
.
getLocalizedMessage
(),
e
);
// TODO: handle exception
e
.
printStackTrace
();
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"附件删除异常"
);
return
failCode
;
}
}
}
package
com
.
vion
.
financial
.
service
.
imp
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.vion.financial.entity.Appendix
;
import
com.vion.financial.mapper.AppendixMapper
;
import
com.vion.financial.service.AppendixService
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.SuccessCode
;
@Service
public
class
AppendixServiceImpl
implements
AppendixService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
AppendixServiceImpl
.
class
);
@Autowired
AppendixMapper
appendixMapper
;
@Autowired
FailCode
failCode
;
@Autowired
SuccessCode
successCode
;
@Override
public
Object
queryAppendixList
(
Appendix
appendix
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"====================查询附件start======================"
);
return
appendixMapper
.
queryAppendixList
(
appendix
);
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"查询附件异常"
+
e
.
getLocalizedMessage
(),
e
);
e
.
printStackTrace
();
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"附件查询异常"
);
return
failCode
;
}
}
@Override
public
Object
addAppendix
(
Appendix
appendix
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"====================增加附件start======================="
);
return
appendixMapper
.
addAppendix
(
appendix
);
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"增加附件异常"
+
e
.
getLocalizedMessage
(),
e
);
e
.
printStackTrace
();
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"附件增加异常"
);
return
failCode
;
}
}
@Override
public
Object
updateAppendix
(
Appendix
appendix
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"========================修改附件start===================="
);
appendixMapper
.
updateAppendix
(
appendix
);
return
successCode
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除附件异常"
+
e
.
getLocalizedMessage
(),
e
);
// TODO: handle exception
e
.
printStackTrace
();
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"附件修改异常"
);
return
failCode
;
}
}
@Override
public
Object
deleteAppendix
(
Appendix
appendix
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"=======================删除附件start===================="
);
appendixMapper
.
deleteAppendix
(
appendix
);
return
successCode
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除附件异常"
+
e
.
getLocalizedMessage
(),
e
);
// TODO: handle exception
e
.
printStackTrace
();
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"附件删除异常"
);
return
failCode
;
}
}
}
code/finance_serv/src/main/java/com/vion/financial/service/imp/ContractServiceImpl.java
View file @
b680583
...
...
@@ -60,8 +60,8 @@ public class ContractServiceImpl implements ContractService {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"增加合同异常:"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"增加异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"增加异常"
);
return
failCode
;
}
}
...
...
@@ -82,8 +82,8 @@ public class ContractServiceImpl implements ContractService {
/* return failCode;*/
logger
.
error
(
"查询合同异常"
+
e
.
getLocalizedMessage
(),
e
);
e
.
printStackTrace
();
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"查询异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"查询异常"
);
return
failCode
;
}
}
...
...
@@ -105,8 +105,8 @@ public class ContractServiceImpl implements ContractService {
// TODO: handle exception
logger
.
error
(
"修改合同异常"
+
e
.
getLocalizedMessage
(),
e
);
e
.
printStackTrace
();
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"修改异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"修改异常"
);
return
failCode
;
}
}
...
...
@@ -121,8 +121,8 @@ public class ContractServiceImpl implements ContractService {
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除合同异常"
+
e
.
getLocalizedMessage
(),
e
);
e
.
printStackTrace
();
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"删除异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"删除异常"
);
return
failCode
;
}
}
...
...
@@ -141,8 +141,8 @@ public class ContractServiceImpl implements ContractService {
// TODO: handle exception
logger
.
error
(
"查询合同列表异常"
+
e
.
getLocalizedMessage
(),
e
);
e
.
printStackTrace
();
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"查询异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"查询异常"
);
return
failCode
;
}
}
...
...
@@ -161,8 +161,8 @@ public class ContractServiceImpl implements ContractService {
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"筛选合同列表异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"筛选异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"筛选异常"
);
return
failCode
;
}
}
...
...
code/finance_serv/src/main/java/com/vion/financial/service/imp/DeliverGoodsServiceImpl.java
View file @
b680583
...
...
@@ -53,15 +53,15 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
}
return
successCode
;
}
else
{
failCode
.
setE
n
ode
(
"100"
);
failCode
.
setEno
d
e
(
"合同已删除"
);
failCode
.
setE
c
ode
(
"100"
);
failCode
.
setEno
t
e
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"增加发货信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"增加异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"增加异常"
);
return
failCode
;
}
}
...
...
@@ -85,16 +85,16 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
}
}
else
{
failCode
.
setE
n
ode
(
"100"
);
failCode
.
setEno
d
e
(
"合同已删除"
);
failCode
.
setE
c
ode
(
"100"
);
failCode
.
setEno
t
e
(
"合同已删除"
);
return
failCode
;
}
return
deliverGoodsVo
;
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"查询发货信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"查询异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"查询异常"
);
return
failCode
;
}
}
...
...
@@ -112,19 +112,21 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
for
(
int
n:
deliverGoods
.
getAppendix_unids
())
{
appendix
=
new
Appendix
();
appendix
.
setAppendix_unid
(
n
);
appendixService
.
deleteAppendix
(
appendix
);
appendix
.
setBusiness_table
(
"tb_deliver_goods"
);
appendix
.
setBusiness_unid
(
String
.
valueOf
(
deliverGoods
.
getDeliver_unid
()));
appendixService
.
updateAppendix
(
appendix
);
}
}
return
successCode
;
}
else
{
failCode
.
setE
n
ode
(
"100"
);
failCode
.
setEno
d
e
(
"合同已删除"
);
failCode
.
setE
c
ode
(
"100"
);
failCode
.
setEno
t
e
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"更新发货信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"更新异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"更新异常"
);
return
failCode
;
// TODO: handle exception
}
...
...
@@ -135,22 +137,25 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
// TODO Auto-generated method stub
try
{
logger
.
info
(
"=========================删除合同发货信息======================="
);
Appendix
appendix
=
null
;
if
(
contractService
.
isDelete
(
s
))
{
for
(
int
receiptUnid
:
deliverGoodsVo
.
getDeliver_unids
())
{
deliverGoodsMapper
.
deleteDeliverGoods
(
receiptUnid
);
for
(
int
deliverUnid
:
deliverGoodsVo
.
getDeliver_unids
())
{
deliverGoodsMapper
.
deleteDeliverGoods
(
deliverUnid
);
appendix
=
new
Appendix
();
appendix
.
setBusiness_unid
(
String
.
valueOf
(
deliverUnid
));
appendixService
.
deleteAppendix
(
appendix
);
}
return
successCode
;
}
else
{
failCode
.
setE
n
ode
(
"100"
);
failCode
.
setE
c
ode
(
"100"
);
failCode
.
setEnote
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除发货信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"删除异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"删除异常"
);
return
failCode
;
}
}
...
...
code/finance_serv/src/main/java/com/vion/financial/service/imp/PaymentAgreeServiceImpl.java
View file @
b680583
package
com
.
vion
.
financial
.
service
.
imp
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.vion.financial.entity.PaymentAgree
;
import
com.vion.financial.mapper.PaymentAgreeMapper
;
import
com.vion.financial.service.PaymentAgreeService
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.PaymentAgreeVo
;
import
com.vion.financial.vo.SuccessCode
;
@Service
public
class
PaymentAgreeServiceImpl
implements
PaymentAgreeService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
PaymentAgreeServiceImpl
.
class
);
@Autowired
PaymentAgreeMapper
paymentAgreeMapper
;
@Autowired
FailCode
failCode
;
@Autowired
ContractServiceImpl
contractServiceImpl
;
@Autowired
SuccessCode
SuccessCode
;
@Override
public
Object
addPaymentAgree
(
PaymentAgreeVo
paymentAgreeVo
,
String
s
)
{
try
{
logger
.
info
(
"==============增加付款约定信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
PaymentAgree
>
list
=
paymentAgreeVo
.
getList_payment_data
();
for
(
PaymentAgree
paymentAgree:
list
)
{
paymentAgree
.
setContract_unid
(
s
);
paymentAgreeMapper
.
addPaymentAgree
(
paymentAgree
);
}
return
SuccessCode
;
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEno
de
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"增加付款预定信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"增加异常"
);
return
failCode
;
}
}
@Override
public
Object
queryPaymentAgree
(
String
s
)
{
try
{
logger
.
info
(
"===============查询付款约定信息start====================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
return
paymentAgreeMapper
.
queryPaymentAgree
(
s
);
}
failCode
.
setE
node
(
"100"
);
failCode
.
setEno
de
(
"合同已删除"
);
return
failCode
;
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"查询付款约定信息异常:"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"查询异常"
);
return
failCode
;
}
}
@Override
public
Object
updatePaymentAgree
(
PaymentAgreeVo
paymentAgreeVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"==============修改付款约定信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
PaymentAgree
>
list
=
paymentAgreeVo
.
getList_payment_data
();
for
(
PaymentAgree
paymentAgree:
list
)
{
paymentAgree
.
setContract_unid
(
s
);
paymentAgreeMapper
.
updatePaymentAgree
(
paymentAgree
);
}
return
SuccessCode
;
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEno
de
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"修改付款预定信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"修改异常"
);
return
failCode
;
}
}
@Override
public
Object
deletePaymentAgree
(
PaymentAgreeVo
paymentAgreeVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"==============删除付款约定信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
PaymentAgree
>
list
=
paymentAgreeVo
.
getList_payment_data
();
for
(
PaymentAgree
paymentAgree:
list
)
{
paymentAgree
.
setContract_unid
(
s
);
paymentAgreeMapper
.
deletePaymentAgree
(
paymentAgree
.
getPayment_unid
());
}
return
SuccessCode
;
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEno
de
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"删除付款预定信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"删除异常"
);
return
failCode
;
}
}
}
package
com
.
vion
.
financial
.
service
.
imp
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.vion.financial.entity.PaymentAgree
;
import
com.vion.financial.mapper.PaymentAgreeMapper
;
import
com.vion.financial.service.PaymentAgreeService
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.PaymentAgreeVo
;
import
com.vion.financial.vo.SuccessCode
;
@Service
public
class
PaymentAgreeServiceImpl
implements
PaymentAgreeService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
PaymentAgreeServiceImpl
.
class
);
@Autowired
PaymentAgreeMapper
paymentAgreeMapper
;
@Autowired
FailCode
failCode
;
@Autowired
ContractServiceImpl
contractServiceImpl
;
@Autowired
SuccessCode
SuccessCode
;
@Override
public
Object
addPaymentAgree
(
PaymentAgreeVo
paymentAgreeVo
,
String
s
)
{
try
{
logger
.
info
(
"==============增加付款约定信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
PaymentAgree
>
list
=
paymentAgreeVo
.
getList_payment_data
();
for
(
PaymentAgree
paymentAgree:
list
)
{
paymentAgree
.
setContract_unid
(
s
);
paymentAgreeMapper
.
addPaymentAgree
(
paymentAgree
);
}
return
SuccessCode
;
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEno
te
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"增加付款预定信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"增加异常"
);
return
failCode
;
}
}
@Override
public
Object
queryPaymentAgree
(
String
s
)
{
try
{
logger
.
info
(
"===============查询付款约定信息start====================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
return
paymentAgreeMapper
.
queryPaymentAgree
(
s
);
}
failCode
.
setE
code
(
"100"
);
failCode
.
setEno
te
(
"合同已删除"
);
return
failCode
;
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"查询付款约定信息异常:"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"查询异常"
);
return
failCode
;
}
}
@Override
public
Object
updatePaymentAgree
(
PaymentAgreeVo
paymentAgreeVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"==============修改付款约定信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
PaymentAgree
>
list
=
paymentAgreeVo
.
getList_payment_data
();
for
(
PaymentAgree
paymentAgree:
list
)
{
paymentAgree
.
setContract_unid
(
s
);
paymentAgreeMapper
.
updatePaymentAgree
(
paymentAgree
);
}
return
SuccessCode
;
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEno
te
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"修改付款预定信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"修改异常"
);
return
failCode
;
}
}
@Override
public
Object
deletePaymentAgree
(
PaymentAgreeVo
paymentAgreeVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"==============删除付款约定信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
PaymentAgree
>
list
=
paymentAgreeVo
.
getList_payment_data
();
for
(
PaymentAgree
paymentAgree:
list
)
{
paymentAgree
.
setContract_unid
(
s
);
paymentAgreeMapper
.
deletePaymentAgree
(
paymentAgree
.
getPayment_unid
());
}
return
SuccessCode
;
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEno
te
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"删除付款预定信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"删除异常"
);
return
failCode
;
}
}
}
code/finance_serv/src/main/java/com/vion/financial/service/imp/ProjectAcceptancServiceImpl.java
View file @
b680583
...
...
@@ -53,15 +53,15 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
}
return
successCode
;
}
else
{
failCode
.
setE
n
ode
(
"100"
);
failCode
.
setEno
d
e
(
"合同已删除"
);
failCode
.
setE
c
ode
(
"100"
);
failCode
.
setEno
t
e
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"增加合同验收信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"增加异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"增加异常"
);
return
failCode
;
}
}
...
...
@@ -86,16 +86,16 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
}
}
else
{
failCode
.
setE
n
ode
(
"100"
);
failCode
.
setEno
d
e
(
"合同已删除"
);
failCode
.
setE
c
ode
(
"100"
);
failCode
.
setEno
t
e
(
"合同已删除"
);
return
failCode
;
}
return
projectAcceptancVo
;
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"查询合同验收信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"查询异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"查询异常"
);
return
failCode
;
}
}
...
...
@@ -105,22 +105,30 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
// TODO Auto-generated method stub
try
{
logger
.
info
(
"===========================修改合同验收信息==========================="
);
Appendix
appendix
=
null
;
if
(
contractService
.
isDelete
(
s
))
{
List
<
ProjectAcceptanc
>
list
=
projectAcceptancVo
.
getList_check_data
();
for
(
ProjectAcceptanc
projectAcceptanc:
list
)
{
projectAcceptanc
.
setContract_unid
(
s
);
projectAcceptancMapper
.
updateProjectAcceptanc
(
projectAcceptanc
);
for
(
int
n:
projectAcceptanc
.
getAppendix_unids
())
{
appendix
=
new
Appendix
();
appendix
.
setAppendix_unid
(
n
);
appendix
.
setBusiness_table
(
"tb_project_acceptanc"
);
appendix
.
setBusiness_unid
(
String
.
valueOf
(
projectAcceptanc
.
getAcceptanc_unid
()));
appendixService
.
updateAppendix
(
appendix
);
}
}
return
successCode
;
}
else
{
failCode
.
setE
n
ode
(
"100"
);
failCode
.
setEno
d
e
(
"合同已删除"
);
failCode
.
setE
c
ode
(
"100"
);
failCode
.
setEno
t
e
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"更新合同验收信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"更新异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"更新异常"
);
return
failCode
;
// TODO: handle exception
}
...
...
@@ -142,15 +150,15 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
}
return
successCode
;
}
else
{
failCode
.
setE
n
ode
(
"100"
);
failCode
.
setEno
d
e
(
"合同已删除"
);
failCode
.
setE
c
ode
(
"100"
);
failCode
.
setEno
t
e
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"删除合同验收信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setEno
d
e
(
"删除异常"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEno
t
e
(
"删除异常"
);
return
failCode
;
}
}
...
...
code/finance_serv/src/main/java/com/vion/financial/service/imp/ProjectServiceImpl.java
View file @
b680583
...
...
@@ -37,7 +37,7 @@ public class ProjectServiceImpl implements ProjectService {
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"增加合同信息出错"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEnote
(
"Fail"
);
return
failCode
;
}
...
...
@@ -52,7 +52,7 @@ public class ProjectServiceImpl implements ProjectService {
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"查询合同信息出错"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEnote
(
"Fail"
);
return
failCode
;
}
...
...
@@ -70,7 +70,7 @@ public class ProjectServiceImpl implements ProjectService {
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"更新合同信息出错"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEnote
(
"Fail"
);
return
failCode
;
}
...
...
@@ -88,7 +88,7 @@ public class ProjectServiceImpl implements ProjectService {
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"删除合同信息出错"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
n
ode
(
"500"
);
failCode
.
setE
c
ode
(
"500"
);
failCode
.
setEnote
(
"Fail"
);
return
failCode
;
}
...
...
code/finance_serv/src/main/java/com/vion/financial/service/imp/ReceiptServiceImpl.java
View file @
b680583
package
com
.
vion
.
financial
.
service
.
imp
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.vion.financial.entity.Receipt
;
import
com.vion.financial.mapper.ReceiptMapper
;
import
com.vion.financial.service.ReceiptService
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.ReceiptVo
;
import
com.vion.financial.vo.SuccessCode
;
@Service
public
class
ReceiptServiceImpl
implements
ReceiptService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
ReceiptServiceImpl
.
class
);
@Autowired
ReceiptMapper
receiptMapper
;
@Autowired
SuccessCode
successCode
;
@Autowired
FailCode
failCode
;
@Autowired
ContractServiceImpl
contractServiceImpl
;
@Override
public
Object
addReceipt
(
ReceiptVo
receiptVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"=====================增加合同开票信息====================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
Receipt
>
list
=
receiptVo
.
getList_receipt_data
();
for
(
Receipt
receipt:
list
)
{
receipt
.
setContract_unid
(
s
);
receiptMapper
.
addReceipt
(
receipt
);
}
return
successCode
;
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEnote
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"增加开票信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"增加异常"
);
return
failCode
;
}
}
@Override
public
Object
queryReceipt
(
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"========================查询合同开票信息======================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
return
receiptMapper
.
queryReceipt
(
s
);
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEnote
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询开票信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"查询异常"
);
return
failCode
;
}
}
@Override
public
Object
updateReceipt
(
ReceiptVo
receiptVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"===================修改合同开票信息========================"
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
Receipt
>
list
=
receiptVo
.
getList_receipt_data
();
for
(
Receipt
receipt:
list
)
{
receipt
.
setContract_unid
(
s
);
receiptMapper
.
updateReceipt
(
receipt
);
}
return
successCode
;
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEnote
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"修改开票信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"修改异常"
);
return
failCode
;
}
}
@Override
public
Object
deleteReceipt
(
ReceiptVo
receiptVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"=========================删除合同开票信息======================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
Receipt
>
list
=
receiptVo
.
getReceipt_unids
();
for
(
Receipt
receiptUnid
:
list
)
{
receiptMapper
.
deleteReceipt
(
receiptUnid
.
getReceipt_unid
());
}
return
successCode
;
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEnote
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除开票信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"删除异常"
);
return
failCode
;
}
}
}
package
com
.
vion
.
financial
.
service
.
imp
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.vion.financial.entity.Receipt
;
import
com.vion.financial.mapper.ReceiptMapper
;
import
com.vion.financial.service.ReceiptService
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.ReceiptVo
;
import
com.vion.financial.vo.SuccessCode
;
@Service
public
class
ReceiptServiceImpl
implements
ReceiptService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
ReceiptServiceImpl
.
class
);
@Autowired
ReceiptMapper
receiptMapper
;
@Autowired
SuccessCode
successCode
;
@Autowired
FailCode
failCode
;
@Autowired
ContractServiceImpl
contractServiceImpl
;
@Override
public
Object
addReceipt
(
ReceiptVo
receiptVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"=====================增加合同开票信息====================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
Receipt
>
list
=
receiptVo
.
getList_receipt_data
();
for
(
Receipt
receipt:
list
)
{
receipt
.
setContract_unid
(
s
);
receiptMapper
.
addReceipt
(
receipt
);
}
return
successCode
;
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEnote
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"增加开票信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"增加异常"
);
return
failCode
;
}
}
@Override
public
Object
queryReceipt
(
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"========================查询合同开票信息======================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
return
receiptMapper
.
queryReceipt
(
s
);
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEnote
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询开票信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"查询异常"
);
return
failCode
;
}
}
@Override
public
Object
updateReceipt
(
ReceiptVo
receiptVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"===================修改合同开票信息========================"
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
Receipt
>
list
=
receiptVo
.
getList_receipt_data
();
for
(
Receipt
receipt:
list
)
{
receipt
.
setContract_unid
(
s
);
receiptMapper
.
updateReceipt
(
receipt
);
}
return
successCode
;
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEnote
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"修改开票信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"修改异常"
);
return
failCode
;
}
}
@Override
public
Object
deleteReceipt
(
ReceiptVo
receiptVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"=========================删除合同开票信息======================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
Receipt
>
list
=
receiptVo
.
getReceipt_unids
();
for
(
Receipt
receiptUnid
:
list
)
{
receiptMapper
.
deleteReceipt
(
receiptUnid
.
getReceipt_unid
());
}
return
successCode
;
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEnote
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除开票信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"删除异常"
);
return
failCode
;
}
}
}
code/finance_serv/src/main/java/com/vion/financial/service/imp/ReturnInfoServiceImpl.java
View file @
b680583
package
com
.
vion
.
financial
.
service
.
imp
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.vion.financial.entity.ReturnInfo
;
import
com.vion.financial.mapper.ReturnInfoMapper
;
import
com.vion.financial.service.ReturnInfoService
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.ReturnInfoVo
;
import
com.vion.financial.vo.SuccessCode
;
@Service
public
class
ReturnInfoServiceImpl
implements
ReturnInfoService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
ReturnInfoServiceImpl
.
class
);
@Autowired
ReturnInfoMapper
returnInfoMapper
;
@Autowired
FailCode
failCode
;
@Autowired
ContractServiceImpl
contractServiceImpl
;
@Autowired
SuccessCode
SuccessCode
;
@Override
public
Object
addReturnInfo
(
ReturnInfoVo
returnInfoVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"==============增加合同回款信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
ReturnInfo
>
list
=
returnInfoVo
.
getList_reback_data
();
for
(
ReturnInfo
returnInfo:
list
)
{
returnInfo
.
setContract_unid
(
s
);
returnInfoMapper
.
addReturnInfo
(
returnInfo
);
}
return
SuccessCode
;
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEno
de
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"增加回款信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"增加异常"
);
return
failCode
;
}
}
@Override
public
Object
queryReturnInfo
(
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"===============查询回款信息====================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
)){
return
returnInfoMapper
.
queryReturnInfo
(
s
);
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEno
de
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"查询回款信息异常:"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"查询异常"
);
return
failCode
;
}
}
@Override
public
Object
updateReturnInfo
(
ReturnInfoVo
returnInfoVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"==============修改回款信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
ReturnInfo
>
list
=
returnInfoVo
.
getList_reback_data
();
for
(
ReturnInfo
returnInfo:
list
)
{
returnInfo
.
setContract_unid
(
s
);
returnInfoMapper
.
updateReturnInfo
(
returnInfo
);
}
return
SuccessCode
;
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEno
de
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"修改回款信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"修改异常"
);
return
failCode
;
}
}
@Override
public
Object
deleteReturn
(
ReturnInfoVo
paymentAgreeVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"==============删除回款信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
ReturnInfo
>
list
=
paymentAgreeVo
.
getReback_unids
();
for
(
ReturnInfo
returnInfo:
list
)
{
returnInfo
.
setContract_unid
(
s
);
returnInfoMapper
.
deleteReturnInfo
(
returnInfo
.
getReback_unid
());
}
return
SuccessCode
;
}
else
{
failCode
.
setE
node
(
"100"
);
failCode
.
setEno
de
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"删除回款信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
node
(
"500"
);
failCode
.
setEno
de
(
"删除异常"
);
return
failCode
;
}
}
}
package
com
.
vion
.
financial
.
service
.
imp
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.vion.financial.entity.ReturnInfo
;
import
com.vion.financial.mapper.ReturnInfoMapper
;
import
com.vion.financial.service.ReturnInfoService
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.ReturnInfoVo
;
import
com.vion.financial.vo.SuccessCode
;
@Service
public
class
ReturnInfoServiceImpl
implements
ReturnInfoService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
ReturnInfoServiceImpl
.
class
);
@Autowired
ReturnInfoMapper
returnInfoMapper
;
@Autowired
FailCode
failCode
;
@Autowired
ContractServiceImpl
contractServiceImpl
;
@Autowired
SuccessCode
SuccessCode
;
@Override
public
Object
addReturnInfo
(
ReturnInfoVo
returnInfoVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"==============增加合同回款信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
ReturnInfo
>
list
=
returnInfoVo
.
getList_reback_data
();
for
(
ReturnInfo
returnInfo:
list
)
{
returnInfo
.
setContract_unid
(
s
);
returnInfoMapper
.
addReturnInfo
(
returnInfo
);
}
return
SuccessCode
;
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEno
te
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"增加回款信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"增加异常"
);
return
failCode
;
}
}
@Override
public
Object
queryReturnInfo
(
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"===============查询回款信息====================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
)){
return
returnInfoMapper
.
queryReturnInfo
(
s
);
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEno
te
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"查询回款信息异常:"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"查询异常"
);
return
failCode
;
}
}
@Override
public
Object
updateReturnInfo
(
ReturnInfoVo
returnInfoVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"==============修改回款信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
ReturnInfo
>
list
=
returnInfoVo
.
getList_reback_data
();
for
(
ReturnInfo
returnInfo:
list
)
{
returnInfo
.
setContract_unid
(
s
);
returnInfoMapper
.
updateReturnInfo
(
returnInfo
);
}
return
SuccessCode
;
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEno
te
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"修改回款信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"修改异常"
);
return
failCode
;
}
}
@Override
public
Object
deleteReturn
(
ReturnInfoVo
paymentAgreeVo
,
String
s
)
{
// TODO Auto-generated method stub
try
{
logger
.
info
(
"==============删除回款信息==================="
);
if
((
boolean
)
contractServiceImpl
.
isDelete
(
s
))
{
List
<
ReturnInfo
>
list
=
paymentAgreeVo
.
getReback_unids
();
for
(
ReturnInfo
returnInfo:
list
)
{
returnInfo
.
setContract_unid
(
s
);
returnInfoMapper
.
deleteReturnInfo
(
returnInfo
.
getReback_unid
());
}
return
SuccessCode
;
}
else
{
failCode
.
setE
code
(
"100"
);
failCode
.
setEno
te
(
"合同已删除"
);
return
failCode
;
}
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"删除回款信息异常"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setE
code
(
"500"
);
failCode
.
setEno
te
(
"删除异常"
);
return
failCode
;
}
}
}
code/finance_serv/src/main/java/com/vion/financial/vo/FailCode.java
View file @
b680583
package
com
.
vion
.
financial
.
vo
;
import
org.springframework.stereotype.Component
;
@Component
public
class
FailCode
{
private
String
e
node
=
"400"
;
private
String
enote
=
"FAIL"
;
public
String
getE
node
()
{
return
e
node
;
}
public
void
setE
node
(
String
enode
)
{
this
.
e
node
=
enode
;
}
public
String
getEnote
()
{
return
enote
;
}
public
void
setEnote
(
String
enote
)
{
this
.
enote
=
enote
;
}
}
package
com
.
vion
.
financial
.
vo
;
import
org.springframework.stereotype.Component
;
@Component
public
class
FailCode
{
private
String
e
code
=
"400"
;
private
String
enote
=
"FAIL"
;
public
String
getE
code
()
{
return
e
code
;
}
public
void
setE
code
(
String
enode
)
{
this
.
e
code
=
enode
;
}
public
String
getEnote
()
{
return
enote
;
}
public
void
setEnote
(
String
enote
)
{
this
.
enote
=
enote
;
}
}
code/finance_serv/src/main/resources/generator/eneratorConfig.xml
deleted
100644 → 0
View file @
9413c05
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<context
id=
"context1"
>
<jdbcConnection
connectionURL=
"jdbc:postgresql://localhost:5432/financial_serv"
driverClass=
"org.postgresql.Driver"
password=
"vion"
userId=
"postgres"
/>
<javaModelGenerator
targetPackage=
"com.vion.financial.entity"
targetProject=
"/FinancialSystem/src/main/java"
/>
<sqlMapGenerator
targetPackage=
"com.vion.financial.mapping"
targetProject=
"/FinancialSystem/src/main/java"
/>
<javaClientGenerator
targetPackage=
"com.vion.financial.mapper"
targetProject=
"/FinancialSystem/src/main/java"
type=
"XMLMAPPER"
/>
<table
schema=
"???"
tableName=
"???"
>
<columnOverride
column=
"???"
property=
"???"
/>
</table>
</context>
</generatorConfiguration>
\ No newline at end of file
code/finance_serv/src/main/resources/generator/generatorConfig.xml
deleted
100644 → 0
View file @
9413c05
<!-- <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
数据库驱动:选择你的本地硬盘上面的数据库驱动包
<classPathEntry location="E:\developer\mybatis-generator-core-1.3.2\lib\mysql-connector-java-5.1.25-bin.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="true"/>
是否去除自动生成的注释 true:是 : false:否
<property name="suppressAllComments" value="true"/>
</commentGenerator>
数据库链接URL,用户名、密码
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://127.0.0.1/mytest" userId="root" password="root">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
生成模型的包名和位置
<javaModelGenerator targetPackage="com.winter.model" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
生成映射文件的包名和位置
<sqlMapGenerator targetPackage="mapping" targetProject="src/main/resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
生成DAO的包名和位置
<javaClientGenerator type="XMLMAPPER" targetPackage="com.winter.mapper" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名
<table tableName="t_user" domainObjectName="User" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration> -->
\ No newline at end of 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