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 51830c7a
authored
Aug 30, 2018
by
王军业
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【更改导入模板相关】
1 parent
573d464b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
16 deletions
code/finance_serv/src/main/java/com/vion/financial/service/imp/ContractServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/ContractServiceImpl.java
View file @
51830c7
...
...
@@ -5,6 +5,7 @@ import java.text.SimpleDateFormat;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
com.vion.financial.handler.DownLoad
;
...
...
@@ -14,6 +15,7 @@ import com.vion.financial.handler.ImportHandle;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -26,6 +28,7 @@ import org.springframework.web.multipart.MultipartFile;
import
com.vion.financial.config.FinanceConfig
;
import
com.vion.financial.entity.Appendix
;
import
com.vion.financial.entity.Contract
;
import
com.vion.financial.entity.Customer
;
import
com.vion.financial.entity.DeliverGoods
;
import
com.vion.financial.entity.PaymentAgree
;
...
...
@@ -89,7 +92,7 @@ public class ContractServiceImpl implements ContractService {
ReceiptMapper
receiptMapper
;
@Autowired
ProjectAcceptancMapper
P
rojectAcceptancMapper
;
ProjectAcceptancMapper
p
rojectAcceptancMapper
;
@Autowired
DeliverGoodsMapper
deliverGoodsMapper
;
...
...
@@ -623,7 +626,7 @@ public class ContractServiceImpl implements ContractService {
}
boolean
is_repeat
=
true
;
String
authorization
=
""
;
List
<
String
>
repeatListId
=
new
ArrayLis
t
<
String
>();
Set
<
String
>
repeatListId
=
new
HashSe
t
<
String
>();
if
(
list
.
get
(
1
).
size
()==
0
)
{
List
<
Map
>
list_data
=
null
;
String
url
=
financeConfig
.
getAuthurl
();
...
...
@@ -885,20 +888,21 @@ public class ContractServiceImpl implements ContractService {
projectAcceptanc_end
.
setAcceptanc_date
(
importModel
.
getEnd_acceptanc_date
());
projectAcceptanc_end
.
setAcceptanc_note
(
importModel
.
getEnd_acceptanc_note
());
}
if
(
contractMapper
.
queryOne
(
contractVo
.
getContract_unid
())==
null
&&
importModel
.
getSalesperson_name
()!=
null
)
{
ContractVo
contracto
=
contractMapper
.
queryOne
(
contractVo
.
getContract_unid
());
if
(
contracto
==
null
)
{
contractMapper
.
addOne
(
contractVo
);
if
(
paymentAgreeMapper
.
queryPaymentAgree
(
importModel
.
getContract_unid
()).
size
()==
0
)
{
//
if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ) {
if
(
returnInfo
.
getReback_date
()!=
null
||
returnInfo
.
getActual_reback_amount
()!=
null
||
returnInfo
.
getReback_note
()!=
null
)
{
returnInfoMapper
.
addReturnInfo
(
returnInfo
);
}
if
(
receipt
.
getReceipt_amount
()!=
null
||
receipt
.
getOa_flow_id
()!=
null
||
receipt
.
getReceipt_note
()!=
null
)
{
receiptMapper
.
addReceipt
(
receipt
);
}
if
(
projectAcceptanc_pre
.
getContract_unid
()
!=
null
)
{
P
rojectAcceptancMapper
.
addProjectAcceptanc
(
projectAcceptanc_pre
);
if
(
projectAcceptanc_pre
.
getContract_unid
()
!=
null
&&
(
projectAcceptanc_pre
.
getAcceptanc_date
()!=
null
||
projectAcceptanc_pre
.
getAcceptanc_note
()!=
null
||
projectAcceptanc_pre
.
getAcceptanc_type
()!=
null
)
)
{
p
rojectAcceptancMapper
.
addProjectAcceptanc
(
projectAcceptanc_pre
);
}
if
(
projectAcceptanc_end
.
getContract_unid
()
!=
null
)
{
P
rojectAcceptancMapper
.
addProjectAcceptanc
(
projectAcceptanc_end
);
if
(
projectAcceptanc_end
.
getContract_unid
()
!=
null
&&
(
projectAcceptanc_end
.
getAcceptanc_date
()!=
null
||
projectAcceptanc_end
.
getAcceptanc_note
()!=
null
||
projectAcceptanc_end
.
getAcceptanc_type
()!=
null
)
)
{
p
rojectAcceptancMapper
.
addProjectAcceptanc
(
projectAcceptanc_end
);
}
if
(
pre_aymentAgree
.
getPayment_propority
()!=
null
||
pre_aymentAgree
.
getPayment_requirement
()!=
null
||
pre_aymentAgree
.
getDays
()!=
null
)
{
paymentAgreeMapper
.
addPaymentAgree
(
pre_aymentAgree
);
...
...
@@ -915,20 +919,53 @@ public class ContractServiceImpl implements ContractService {
if
(
deliverGoods
.
getDeliver_goods_date
()!=
null
||
deliverGoods
.
getGoods_acceptanc_date
()!=
null
)
{
deliverGoodsMapper
.
addDeliverGoods
(
deliverGoods
);
}
continue
;
//}
}
else
{
if
(
importModel
.
getSalesperson_name
()!=
null
&&
contracto
!=
null
)
{
is_repeat
=
false
;
repeatListId
.
add
(
contractVo
.
getContract_unid
());
}
}
else
if
(
paymentAgreeMapper
.
queryPaymentAgree
(
importModel
.
getContract_unid
()).
size
()==
0
){
}
//else {} if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ){
if
(
returnInfoMapper
.
queryReturnInfo
(
importModel
.
getContract_unid
()).
size
()==
0
)
{
if
(
returnInfo
.
getReback_date
()!=
null
||
returnInfo
.
getActual_reback_amount
()!=
null
||
returnInfo
.
getReback_note
()!=
null
)
{
returnInfoMapper
.
addReturnInfo
(
returnInfo
);
}
}
else
{
if
(
importModel
.
getReback_date
()!=
null
||
importModel
.
getReback_amount
()!=
null
||
importModel
.
getReback_note
()!=
null
)
{
is_repeat
=
false
;
repeatListId
.
add
(
contractVo
.
getContract_unid
());
}
}
if
(
receiptMapper
.
queryReceipt
(
importModel
.
getContract_unid
()).
size
()==
0
)
{
if
(
receipt
.
getReceipt_amount
()!=
null
||
receipt
.
getOa_flow_id
()!=
null
||
receipt
.
getReceipt_note
()!=
null
)
{
receiptMapper
.
addReceipt
(
receipt
);
}
if
(
projectAcceptanc_pre
.
getContract_unid
()
!=
null
)
{
ProjectAcceptancMapper
.
addProjectAcceptanc
(
projectAcceptanc_pre
);
}
else
{
if
(
importModel
.
getReceipt_amount
()!=
null
||
importModel
.
getOa_flow_id
()!=
null
||
importModel
.
getReceipt_note
()!=
null
)
{
is_repeat
=
false
;
repeatListId
.
add
(
contractVo
.
getContract_unid
());
}
if
(
projectAcceptanc_end
.
getContract_unid
()
!=
null
)
{
ProjectAcceptancMapper
.
addProjectAcceptanc
(
projectAcceptanc_end
);
}
if
(
/*projectAcceptanc_pre.getContract_unid() != null && projectAcceptanc_end.getContract_unid() != null &&*/
projectAcceptancMapper
.
queryProjectAcceptanc
(
importModel
.
getContract_unid
()).
size
()==
0
)
{
if
(
projectAcceptanc_pre
.
getAcceptanc_date
()!=
null
||
projectAcceptanc_pre
.
getAcceptanc_note
()!=
null
||
projectAcceptanc_pre
.
getAcceptanc_type
()!=
null
)
{
projectAcceptancMapper
.
addProjectAcceptanc
(
projectAcceptanc_pre
);
}
if
(
projectAcceptanc_end
.
getAcceptanc_date
()!=
null
||
projectAcceptanc_end
.
getAcceptanc_note
()!=
null
||
projectAcceptanc_end
.
getAcceptanc_type
()!=
null
)
{
projectAcceptancMapper
.
addProjectAcceptanc
(
projectAcceptanc_end
);
}
}
else
{
if
(
importModel
.
getPre_acceptanc_date
()!=
null
||
importModel
.
getPre_acceptanc_note
()!=
null
||
importModel
.
getPre_acceptanc
()!=
null
||
importModel
.
getEnd_acceptanc_date
()!=
null
||
importModel
.
getEnd_acceptanc_note
()!=
null
||
importModel
.
getEnd_acceptanc
()!=
null
)
{
is_repeat
=
false
;
repeatListId
.
add
(
contractVo
.
getContract_unid
());
}
}
/* if(projectAcceptanc_end.getContract_unid() != null && projectAcceptancMapper.queryProjectAcceptanc(importModel.getContract_unid()).size()==0) {
projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_end);
}*/
if
(
paymentAgreeMapper
.
queryPaymentAgree
(
importModel
.
getContract_unid
()).
size
()==
0
)
{
if
(
pre_aymentAgree
.
getPayment_propority
()!=
null
||
pre_aymentAgree
.
getPayment_requirement
()!=
null
||
pre_aymentAgree
.
getDays
()!=
null
)
{
paymentAgreeMapper
.
addPaymentAgree
(
pre_aymentAgree
);
}
...
...
@@ -941,14 +978,45 @@ public class ContractServiceImpl implements ContractService {
if
(
mainten_aymentAgree
.
getPayment_propority
()!=
null
||
mainten_aymentAgree
.
getPayment_requirement
()!=
null
||
mainten_aymentAgree
.
getDays
()!=
null
)
{
paymentAgreeMapper
.
addPaymentAgree
(
mainten_aymentAgree
);
}
if
(
deliverGoods
.
getDeliver_goods_date
()!=
null
||
deliverGoods
.
getGoods_acceptanc_date
()!=
null
)
{
deliverGoodsMapper
.
addDeliverGoods
(
deliverGoods
);
}
else
{
if
(
importModel
.
getAdvance_payment_propority
()!=
null
||
importModel
.
getAdvance_payment_requirement
()!=
null
||
importModel
.
getAdvance_payment_days
()!=
null
||
importModel
.
getArrival_payment_propority
()!=
null
||
importModel
.
getArrival_payment_requirement
()!=
null
||
importModel
.
getArrival_payment_days
()!=
null
||
importModel
.
getAcceptanc_payment_propority
()!=
null
||
importModel
.
getAcceptanc_payment_requirement
()!=
null
||
importModel
.
getAcceptanc_payment_days
()!=
null
||
importModel
.
getMainten_payment_propority
()!=
null
||
importModel
.
getMainten_payment_requirement
()!=
null
||
importModel
.
getMainten_payment_days
()!=
null
)
{
is_repeat
=
false
;
repeatListId
.
add
(
contractVo
.
getContract_unid
());
}
}
/* if(pre_aymentAgree.getPayment_propority()!=null ||pre_aymentAgree.getPayment_requirement()!=null||pre_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(pre_aymentAgree);
}
if(arrival_aymentAgree.getPayment_propority()!=null ||arrival_aymentAgree.getPayment_requirement()!=null||arrival_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(arrival_aymentAgree);
}
if(acceptanc_aymentAgree.getPayment_propority()!=null ||acceptanc_aymentAgree.getPayment_requirement()!=null||acceptanc_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(acceptanc_aymentAgree);
}
if(mainten_aymentAgree.getPayment_propority()!=null ||mainten_aymentAgree.getPayment_requirement()!=null||mainten_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(mainten_aymentAgree);
}*/
/* if(deliverGoods.getDeliver_goods_date()!=null || deliverGoods.getGoods_acceptanc_date()!=null) {
deliverGoodsMapper.addDeliverGoods(deliverGoods);
}*/
if
(
deliverGoodsMapper
.
queryDeliverGoods
(
importModel
.
getContract_unid
()).
size
()==
0
)
{
if
(
deliverGoods
.
getDeliver_goods_date
()!=
null
||
deliverGoods
.
getGoods_acceptanc_date
()!=
null
)
{
deliverGoodsMapper
.
addDeliverGoods
(
deliverGoods
);
}
else
{
}
else
{
if
(
importModel
.
getDeliver_date
()!=
null
||
importModel
.
getGoods_acceptanc_date
()!=
null
)
{
is_repeat
=
false
;
repeatListId
.
add
(
contractVo
.
getContract_unid
());
}
}
//}
/* else {
is_repeat=false;
repeatListId.add(contractVo.getContract_unid());
}*/
}
if
(!
is_repeat
)
{
return
repeatListId
;
}
else
{
...
...
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