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 bfac863f
authored
Aug 28, 2018
by
谢明辉
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' of
http://192.168.9.26/platform/finance_serv
into develop
2 parents
77c6d4c5
b7238acd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
7 deletions
code/finance_serv/src/main/java/com/vion/financial/excel/ImportModel.java
code/finance_serv/src/main/java/com/vion/financial/handler/ImportExcel.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/ContractServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/excel/ImportModel.java
View file @
bfac863
...
...
@@ -25,6 +25,7 @@ public class ImportModel {
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
sign_date
;
@Excel
(
name
=
"产品线类型"
)
// @Pattern(regexp="[\\u667a\\u6167\\u57ce\\u5e02,\\u667a\\u6167\\u5546\\u4e1a,\\u5176\\u5b83]")
// @Pattern(regexp="[智慧城市,智慧商业,其它]")
private
String
product_line_type_name
;
@Excel
(
name
=
"销售员"
)
...
...
@@ -40,6 +41,7 @@ public class ImportModel {
@Excel
(
name
=
"项目名称"
)
private
String
project_name
;
@Excel
(
name
=
"合同金额"
)
//@Pattern(regexp="[^[0-9]+(.[0-9]{2})]")
private
Double
contract_amount
;
@Excel
(
name
=
"暂停金额"
)
private
Double
stop_amount
;
...
...
@@ -50,6 +52,7 @@ public class ImportModel {
@Excel
(
name
=
"折扣金额"
)
private
Double
deduct_amount
;
@Excel
(
name
=
"合同状态"
)
// @Pattern(regexp="[\\u5df2\\u5b8c\\u6210,\\u8fdb\\u884c\\u4e2d]")
// @Pattern(regexp="[已完成,进行中]")
private
String
contract_state_name
;
@Excel
(
name
=
"回款金额"
)
...
...
@@ -79,6 +82,7 @@ public class ImportModel {
@Excel
(
name
=
"质保周期"
)
private
Integer
guarantee_period
;
@Excel
(
name
=
"合同性质"
)
// @Pattern(regexp="[\\u4f9b\\u8d27,\\u96c6\\u6210]")
// @Pattern(regexp="[供货,集成]")
private
String
contract_type
;
@Excel
(
name
=
"是否归档"
)
...
...
@@ -86,7 +90,8 @@ public class ImportModel {
@Excel
(
name
=
"确认收入金额"
)
private
Double
confirm_income_amount
;
@Excel
(
name
=
"账款状态"
)
// @Pattern(regexp="[正常验收款,正常维保,正常预付款,正常到货款,正常质保款,逾期预付款,逾期到货款,逾期验收款,逾期质保款]")
// @Pattern(regexp="[\\u6b63\\u5e38\\u9a8c\\u6536\\u6b3e,\\u6b63\\u5e38\\u7ef4\\u4fdd,\\u6b63\\u5e38\\u9884\\u4ed8\\u6b3e,\\u6b63\\u5e38\\u5230\\u8d27\\u6b3e,\\u6b63\\u5e38\\u8d28\\u4fdd\\u6b3e,\\u903e\\u671f\\u9884\\u4ed8\\u6b3e,\\u903e\\u671f\\u5230\\u8d27\\u6b3e,\\u903e\\u671f\\u9a8c\\u6536\\u6b3e,\\u903e\\u671f\\u8d28\\u4fdd\\u6b3e]")
// @Pattern(regexp="[\\u4e00-\\u9fa5][正常验收款,正常维保,正常预付款,正常到货款,正常质保款,逾期预付款,逾期到货款,逾期验收款,逾期质保款]")
private
String
amount_state_name
;
@Excel
(
name
=
"维保服务期开始节点"
)
private
Date
start_guarantee_date
;
...
...
code/finance_serv/src/main/java/com/vion/financial/handler/ImportExcel.java
View file @
bfac863
...
...
@@ -28,7 +28,7 @@ public class ImportExcel {
List
<
ImportModel
>
successList
=
result
.
getList
();
List
<
ImportModel
>
failList
=
result
.
getFailList
();
List
<
List
<
ImportModel
>>
list
=
new
ArrayList
<
List
<
ImportModel
>>();
List
<
List
<
ImportModel
>>
list
=
new
ArrayList
<
List
<
ImportModel
>>(
2
);
list
.
add
(
successList
);
list
.
add
(
failList
);
log
.
info
(
list
.
get
(
0
).
size
()+
""
);
...
...
code/finance_serv/src/main/java/com/vion/financial/service/imp/ContractServiceImpl.java
View file @
bfac863
...
...
@@ -4,6 +4,7 @@ import java.io.IOException;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
com.vion.financial.handler.DownLoad
;
...
...
@@ -621,8 +622,14 @@ public class ContractServiceImpl implements ContractService {
logger
.
info
(
s
);
}
boolean
is_repeat
=
true
;
String
authorization
=
""
;
List
<
String
>
repeatListId
=
new
ArrayList
<
String
>();
if
(
list
.
get
(
1
).
size
()==
0
)
{
List
<
Map
>
list_data
=
null
;
String
url
=
financeConfig
.
getAuthurl
();
String
result
=
HttpNetClient
.
doGet
(
url
,
null
);
Map
map
=
JavaBean2Json
.
Json2JavaBean
(
result
,
Map
.
class
);
list_data
=
(
List
<
Map
>)
map
.
get
(
"list_data"
);
ContractVo
contractVo
=
null
;
ReturnInfo
returnInfo
=
null
;
Receipt
receipt
=
null
;
...
...
@@ -673,11 +680,6 @@ public class ContractServiceImpl implements ContractService {
break
;
}
}
List
<
Map
>
list_data
=
null
;
String
url
=
financeConfig
.
getAuthurl
();
String
result
=
HttpNetClient
.
doGet
(
url
,
null
);
Map
map
=
JavaBean2Json
.
Json2JavaBean
(
result
,
Map
.
class
);
list_data
=
(
List
<
Map
>)
map
.
get
(
"list_data"
);
if
(
list_data
!=
null
&&
list_data
.
size
()
>
0
)
{
for
(
Map
_map:
list_data
)
{
if
(
importModel
.
getSalesperson_name
()!=
null
&&
importModel
.
getSalesperson_name
().
equals
(
_map
.
get
(
"name"
)))
{
...
...
@@ -685,6 +687,16 @@ public class ContractServiceImpl implements ContractService {
}
}
}
if
(
contractVo
.
getSalesperson_unid
()==
null
)
{
Map
tempMap
=
new
HashMap
();
tempMap
.
put
(
"norm_type"
,
"employee"
);
tempMap
.
put
(
"username"
,
importModel
.
getSalesperson_name
());
tempMap
.
put
(
"name"
,
importModel
.
getSalesperson_name
());
tempMap
.
put
(
"password"
,
"0000"
);
String
addResult
=
HttpNetClient
.
doPost
(
url
,
JavaBean2Json
.
javaBean2Json
(
tempMap
),
authorization
);
Map
resultMap
=
JavaBean2Json
.
Json2JavaBean
(
addResult
,
Map
.
class
);
contractVo
.
setSalesperson_unid
(
resultMap
.
get
(
"user_unid"
).
toString
());
}
contractVo
.
setProvince_name
(
importModel
.
getProvince_name
());
contractVo
.
setCity_name
(
importModel
.
getCity_name
());
contractVo
.
setCounty_name
(
importModel
.
getCounty_name
());
...
...
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