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 34d5144c
authored
Aug 24, 2018
by
王军业
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
12215154
1 parent
bf3fc8f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
641 additions
and
0 deletions
code/finance_serv/src/main/java/com/vion/financial/excel/ImportModel.java
code/finance_serv/src/main/java/com/vion/financial/handler/ImportHandle.java
code/finance_serv/src/main/java/com/vion/financial/excel/ImportModel.java
0 → 100644
View file @
34d5144
package
com
.
vion
.
financial
.
excel
;
import
java.util.Date
;
import
org.hibernate.validator.constraints.NotBlank
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonInclude.Include
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.vion.financial.serializer.DateYMDHMSJsonSerializer
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
@JsonInclude
(
value
=
Include
.
NON_NULL
)
public
class
ImportModel
{
@Excel
(
name
=
"合同编号"
)
@NotBlank
(
message
=
"该字段不为空"
)
private
String
contract_unid
;
@Excel
(
name
=
"签订日期"
,
importFormat
=
"yyyy-MM-dd"
,
databaseFormat
=
"yyyy-mm-dd"
,
format
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
sign_date
;
@Excel
(
name
=
"产品线类型"
)
private
String
product_line_type_name
;
@Excel
(
name
=
"销售员"
)
private
String
salesperson_name
;
@Excel
(
name
=
"省"
)
private
String
province_name
;
@Excel
(
name
=
"市"
)
private
String
city_name
;
@Excel
(
name
=
"县"
)
private
String
county_name
;
@Excel
(
name
=
"客户名称"
)
private
String
customer_name
;
@Excel
(
name
=
"项目名称"
)
private
String
project_name
;
@Excel
(
name
=
"合同金额"
)
private
Double
contract_amount
;
@Excel
(
name
=
"暂停金额"
)
private
Double
stop_amount
;
@Excel
(
name
=
"坏账金额"
)
private
Double
bad_amount
;
@Excel
(
name
=
"豁免金额"
)
private
Double
exemptions_amount
;
@Excel
(
name
=
"折扣金额"
)
private
Double
deduct_amount
;
@Excel
(
name
=
"合同状态"
)
private
String
contract_state_name
;
@Excel
(
name
=
"回款金额"
)
private
Double
reback_amount
;
@Excel
(
name
=
"回款日期"
)
private
Date
reback_date
;
@Excel
(
name
=
"回款备注"
)
private
String
reback_note
;
@Excel
(
name
=
"开票金额"
)
private
Double
receipt_amount
;
@Excel
(
name
=
"开票OA流水号"
)
private
String
oa_flow_id
;
@Excel
(
name
=
"开票备注"
)
private
String
receipt_note
;
@Excel
(
name
=
"初验"
)
private
String
pre_acceptanc
;
@Excel
(
name
=
"初验日期"
)
private
Date
pre_acceptanc_date
;
@Excel
(
name
=
"初验备注"
)
private
String
pre_acceptanc_note
;
@Excel
(
name
=
"终验"
)
private
String
end_acceptanc
;
@Excel
(
name
=
"终验日期"
)
private
Date
end_acceptanc_date
;
@Excel
(
name
=
"终验备注"
)
private
String
end_acceptanc_note
;
@Excel
(
name
=
"质保周期"
)
private
Integer
guarantee_period
;
@Excel
(
name
=
"合同性质"
)
private
String
contract_type
;
@Excel
(
name
=
"是否归档"
)
private
String
is_archive
;
@Excel
(
name
=
"确认收入金额"
)
private
Double
confirm_income_amount
;
@Excel
(
name
=
"账款状态"
)
private
String
amount_state_name
;
@Excel
(
name
=
"维保服务期开始节点"
)
private
Date
start_guarantee_date
;
@Excel
(
name
=
"维保服务期结束节点"
)
private
Date
end_guarantee_date
;
@Excel
(
name
=
"质保期开始节点"
)
private
String
mainten_start_point
;
@Excel
(
name
=
"折扣金额备注"
)
private
String
deduct_amount_note
;
@Excel
(
name
=
"暂停金额备注"
)
private
String
stop_amount_note
;
@Excel
(
name
=
"豁免金额备注"
)
private
String
exemptions_amount_note
;
@Excel
(
name
=
"坏账金额备注"
)
private
String
bad_amount_note
;
@Excel
(
name
=
"合同备注"
)
private
String
contract_note
;
@Excel
(
name
=
"预付款天数"
)
private
Integer
advance_payment_days
;
@Excel
(
name
=
"预付款比例"
)
private
Double
advance_payment_propority
;
@Excel
(
name
=
"预付款条件"
)
private
String
advance_payment_requirement
;
@Excel
(
name
=
"到货款天数"
)
private
Integer
arrival_payment_days
;
@Excel
(
name
=
"到货款比例"
)
private
Double
arrival_payment_propority
;
@Excel
(
name
=
"到货款付款条件"
)
private
String
arrival_payment_requirement
;
@Excel
(
name
=
"验收款天数"
)
private
Integer
acceptanc_payment_days
;
@Excel
(
name
=
"验收款比例"
)
private
Double
acceptanc_payment_propority
;
@Excel
(
name
=
"验收款付款条件"
)
private
String
acceptanc_payment_requirement
;
@Excel
(
name
=
"质保款天数"
)
private
Integer
mainten_payment_days
;
@Excel
(
name
=
"质保款比例"
)
private
Double
mainten_payment_propority
;
@Excel
(
name
=
"质保款付款条件"
)
private
String
mainten_payment_requirement
;
@Excel
(
name
=
"发货日期"
)
private
Date
deliver_date
;
@Excel
(
name
=
"到货验收时间"
)
private
Date
goods_acceptanc_date
;
@Excel
(
name
=
"质保款类型"
)
private
String
mainten_payment_type
;
/* @Excel(name="产品线类型")
private String product_line_type_name;
@Excel(name="销售员")
private String salesperson_name;
@Excel(name="客户名称")
private String customer_name;
@Excel(name="项目名称")
private String project_name;
@Excel(name="预付款付款条件")
private String payment_requirement;
@Excel(name="预付款比例")
private Double advance_payment_propority;
@Excel(name="到货款比例")
private Double arrival_payment_propority;
@Excel(name="验收款比例")
private Double acceptanc_payment_propority;
@Excel(name="质保款比例")
private Double mainten_payment_propority;
@Excel(name="合同备注")
private String contract_note;
@Excel(name="合同金额")
private Double contract_amount;
@Excel(name="折扣金额")
private Double deduct_amount;
@Excel(name="暂停金额")
private Double stop_amount;
@Excel(name="豁免金额")
private Double exemptions_amount;
@Excel(name="坏账金额")
private Double bad_amount;
@Excel(name="账款状态")
private String amount_state_name;
@Excel(name="合同状态")
private String contract_state_name;
@Excel(name="预付款天数")
private Double advance_payment_days;
@Excel(name="到货款天数")
private Double arrival_payment_days;
@Excel(name="验收款天数")
private Double acceptanc_payment_days;
@Excel(name="质保款天数")
private Double mainten_payment_days;
@Excel(name="发货日期")
private Date deliver_goods_date;
@Excel(name="验收日期")
private Date acceptanc_date;
@Excel(name="质保款类型 ")
private String mainten_type;*/
public
String
getContract_unid
()
{
return
contract_unid
;
}
public
void
setContract_unid
(
String
contract_unid
)
{
this
.
contract_unid
=
contract_unid
;
}
@JsonSerialize
(
using
=
DateYMDHMSJsonSerializer
.
class
)
public
Date
getSign_date
()
{
return
sign_date
;
}
@JsonSerialize
(
using
=
DateYMDHMSJsonSerializer
.
class
)
public
void
setSign_date
(
Date
sign_date
)
{
this
.
sign_date
=
sign_date
;
}
public
String
getProduct_line_type_name
()
{
return
product_line_type_name
;
}
public
void
setProduct_line_type_name
(
String
product_line_type_name
)
{
this
.
product_line_type_name
=
product_line_type_name
;
}
public
String
getSalesperson_name
()
{
return
salesperson_name
;
}
public
void
setSalesperson_name
(
String
salesperson_name
)
{
this
.
salesperson_name
=
salesperson_name
;
}
public
String
getProvince_name
()
{
return
province_name
;
}
public
void
setProvince_name
(
String
province_name
)
{
this
.
province_name
=
province_name
;
}
public
String
getCity_name
()
{
return
city_name
;
}
public
void
setCity_name
(
String
city_name
)
{
this
.
city_name
=
city_name
;
}
public
String
getCounty_name
()
{
return
county_name
;
}
public
void
setCounty_name
(
String
county_name
)
{
this
.
county_name
=
county_name
;
}
public
String
getCustomer_name
()
{
return
customer_name
;
}
public
void
setCustomer_name
(
String
customer_name
)
{
this
.
customer_name
=
customer_name
;
}
public
String
getProject_name
()
{
return
project_name
;
}
public
void
setProject_name
(
String
project_name
)
{
this
.
project_name
=
project_name
;
}
public
Double
getContract_amount
()
{
return
contract_amount
;
}
public
void
setContract_amount
(
Double
contract_amount
)
{
this
.
contract_amount
=
contract_amount
;
}
public
Double
getStop_amount
()
{
return
stop_amount
;
}
public
void
setStop_amount
(
Double
stop_amount
)
{
this
.
stop_amount
=
stop_amount
;
}
public
Double
getBad_amount
()
{
return
bad_amount
;
}
public
void
setBad_amount
(
Double
bad_amount
)
{
this
.
bad_amount
=
bad_amount
;
}
public
Double
getExemptions_amount
()
{
return
exemptions_amount
;
}
public
void
setExemptions_amount
(
Double
exemptions_amount
)
{
this
.
exemptions_amount
=
exemptions_amount
;
}
public
Double
getDeduct_amount
()
{
return
deduct_amount
;
}
public
void
setDeduct_amount
(
Double
deduct_amount
)
{
this
.
deduct_amount
=
deduct_amount
;
}
public
String
getContract_state_name
()
{
return
contract_state_name
;
}
public
void
setContract_state_name
(
String
contract_state_name
)
{
this
.
contract_state_name
=
contract_state_name
;
}
public
Double
getReback_amount
()
{
return
reback_amount
;
}
public
void
setReback_amount
(
Double
reback_amount
)
{
this
.
reback_amount
=
reback_amount
;
}
public
Date
getReback_date
()
{
return
reback_date
;
}
public
void
setReback_date
(
Date
reback_date
)
{
this
.
reback_date
=
reback_date
;
}
public
String
getReback_note
()
{
return
reback_note
;
}
public
void
setReback_note
(
String
reback_note
)
{
this
.
reback_note
=
reback_note
;
}
public
Double
getReceipt_amount
()
{
return
receipt_amount
;
}
public
void
setReceipt_amount
(
Double
receipt_amount
)
{
this
.
receipt_amount
=
receipt_amount
;
}
public
String
getOa_flow_id
()
{
return
oa_flow_id
;
}
public
void
setOa_flow_id
(
String
oa_flow_id
)
{
this
.
oa_flow_id
=
oa_flow_id
;
}
public
String
getReceipt_note
()
{
return
receipt_note
;
}
public
void
setReceipt_note
(
String
receipt_note
)
{
this
.
receipt_note
=
receipt_note
;
}
public
String
getPre_acceptanc
()
{
return
pre_acceptanc
;
}
public
void
setPre_acceptanc
(
String
pre_acceptanc
)
{
this
.
pre_acceptanc
=
pre_acceptanc
;
}
public
Date
getPre_acceptanc_date
()
{
return
pre_acceptanc_date
;
}
public
void
setPre_acceptanc_date
(
Date
pre_acceptanc_date
)
{
this
.
pre_acceptanc_date
=
pre_acceptanc_date
;
}
public
String
getPre_acceptanc_note
()
{
return
pre_acceptanc_note
;
}
public
void
setPre_acceptanc_note
(
String
pre_acceptanc_note
)
{
this
.
pre_acceptanc_note
=
pre_acceptanc_note
;
}
public
String
getEnd_acceptanc
()
{
return
end_acceptanc
;
}
public
void
setEnd_acceptanc
(
String
end_acceptanc
)
{
this
.
end_acceptanc
=
end_acceptanc
;
}
public
Date
getEnd_acceptanc_date
()
{
return
end_acceptanc_date
;
}
public
void
setEnd_acceptanc_date
(
Date
end_acceptanc_date
)
{
this
.
end_acceptanc_date
=
end_acceptanc_date
;
}
public
String
getEnd_acceptanc_note
()
{
return
end_acceptanc_note
;
}
public
void
setEnd_acceptanc_note
(
String
end_acceptanc_note
)
{
this
.
end_acceptanc_note
=
end_acceptanc_note
;
}
public
Integer
getGuarantee_period
()
{
return
guarantee_period
;
}
public
void
setGuarantee_period
(
Integer
guarantee_period
)
{
this
.
guarantee_period
=
guarantee_period
;
}
public
String
getContract_type
()
{
return
contract_type
;
}
public
void
setContract_type
(
String
contract_type
)
{
this
.
contract_type
=
contract_type
;
}
public
String
getIs_archive
()
{
return
is_archive
;
}
public
void
setIs_archive
(
String
is_archive
)
{
this
.
is_archive
=
is_archive
;
}
public
Double
getConfirm_income_amount
()
{
return
confirm_income_amount
;
}
public
void
setConfirm_income_amount
(
Double
confirm_income_amount
)
{
this
.
confirm_income_amount
=
confirm_income_amount
;
}
public
String
getAmount_state_name
()
{
return
amount_state_name
;
}
public
void
setAmount_state_name
(
String
amount_state_name
)
{
this
.
amount_state_name
=
amount_state_name
;
}
public
Date
getStart_guarantee_date
()
{
return
start_guarantee_date
;
}
public
void
setStart_guarantee_date
(
Date
start_guarantee_date
)
{
this
.
start_guarantee_date
=
start_guarantee_date
;
}
public
Date
getEnd_guarantee_date
()
{
return
end_guarantee_date
;
}
public
void
setEnd_guarantee_date
(
Date
end_guarantee_date
)
{
this
.
end_guarantee_date
=
end_guarantee_date
;
}
public
String
getMainten_start_point
()
{
return
mainten_start_point
;
}
public
void
setMainten_start_point
(
String
mainten_start_point
)
{
this
.
mainten_start_point
=
mainten_start_point
;
}
public
String
getDeduct_amount_note
()
{
return
deduct_amount_note
;
}
public
void
setDeduct_amount_note
(
String
deduct_amount_note
)
{
this
.
deduct_amount_note
=
deduct_amount_note
;
}
public
String
getStop_amount_note
()
{
return
stop_amount_note
;
}
public
void
setStop_amount_note
(
String
stop_amount_note
)
{
this
.
stop_amount_note
=
stop_amount_note
;
}
public
String
getExemptions_amount_note
()
{
return
exemptions_amount_note
;
}
public
void
setExemptions_amount_note
(
String
exemptions_amount_note
)
{
this
.
exemptions_amount_note
=
exemptions_amount_note
;
}
public
String
getBad_amount_note
()
{
return
bad_amount_note
;
}
public
void
setBad_amount_note
(
String
bad_amount_note
)
{
this
.
bad_amount_note
=
bad_amount_note
;
}
public
String
getContract_note
()
{
return
contract_note
;
}
public
void
setContract_note
(
String
contract_note
)
{
this
.
contract_note
=
contract_note
;
}
public
Integer
getAdvance_payment_days
()
{
return
advance_payment_days
;
}
public
void
setAdvance_payment_days
(
Integer
advance_payment_days
)
{
this
.
advance_payment_days
=
advance_payment_days
;
}
public
Double
getAdvance_payment_propority
()
{
return
advance_payment_propority
;
}
public
void
setAdvance_payment_propority
(
Double
advance_payment_propority
)
{
this
.
advance_payment_propority
=
advance_payment_propority
;
}
public
String
getAdvance_payment_requirement
()
{
return
advance_payment_requirement
;
}
public
void
setAdvance_payment_requirement
(
String
advance_payment_requirement
)
{
this
.
advance_payment_requirement
=
advance_payment_requirement
;
}
public
Integer
getArrival_payment_days
()
{
return
arrival_payment_days
;
}
public
void
setArrival_payment_days
(
Integer
arrival_payment_days
)
{
this
.
arrival_payment_days
=
arrival_payment_days
;
}
public
Double
getArrival_payment_propority
()
{
return
arrival_payment_propority
;
}
public
void
setArrival_payment_propority
(
Double
arrival_payment_propority
)
{
this
.
arrival_payment_propority
=
arrival_payment_propority
;
}
public
String
getArrival_payment_requirement
()
{
return
arrival_payment_requirement
;
}
public
void
setArrival_payment_requirement
(
String
arrival_payment_requirement
)
{
this
.
arrival_payment_requirement
=
arrival_payment_requirement
;
}
public
Integer
getAcceptanc_payment_days
()
{
return
acceptanc_payment_days
;
}
public
void
setAcceptanc_payment_days
(
Integer
acceptanc_payment_days
)
{
this
.
acceptanc_payment_days
=
acceptanc_payment_days
;
}
public
Double
getAcceptanc_payment_propority
()
{
return
acceptanc_payment_propority
;
}
public
void
setAcceptanc_payment_propority
(
Double
acceptanc_payment_propority
)
{
this
.
acceptanc_payment_propority
=
acceptanc_payment_propority
;
}
public
String
getAcceptanc_payment_requirement
()
{
return
acceptanc_payment_requirement
;
}
public
void
setAcceptanc_payment_requirement
(
String
acceptanc_payment_requirement
)
{
this
.
acceptanc_payment_requirement
=
acceptanc_payment_requirement
;
}
public
Integer
getMainten_payment_days
()
{
return
mainten_payment_days
;
}
public
void
setMainten_payment_days
(
Integer
mainten_payment_days
)
{
this
.
mainten_payment_days
=
mainten_payment_days
;
}
public
Double
getMainten_payment_propority
()
{
return
mainten_payment_propority
;
}
public
void
setMainten_payment_propority
(
Double
mainten_payment_propority
)
{
this
.
mainten_payment_propority
=
mainten_payment_propority
;
}
public
String
getMainten_payment_requirement
()
{
return
mainten_payment_requirement
;
}
public
void
setMainten_payment_requirement
(
String
mainten_payment_requirement
)
{
this
.
mainten_payment_requirement
=
mainten_payment_requirement
;
}
public
Date
getDeliver_date
()
{
return
deliver_date
;
}
public
void
setDeliver_date
(
Date
deliver_date
)
{
this
.
deliver_date
=
deliver_date
;
}
public
Date
getGoods_acceptanc_date
()
{
return
goods_acceptanc_date
;
}
public
void
setGoods_acceptanc_date
(
Date
goods_acceptanc_date
)
{
this
.
goods_acceptanc_date
=
goods_acceptanc_date
;
}
public
String
getMainten_payment_type
()
{
return
mainten_payment_type
;
}
public
void
setMainten_payment_type
(
String
mainten_payment_type
)
{
this
.
mainten_payment_type
=
mainten_payment_type
;
}
}
code/finance_serv/src/main/java/com/vion/financial/handler/ImportHandle.java
0 → 100644
View file @
34d5144
package
com
.
vion
.
financial
.
handler
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
com.vion.financial.excel.ImportModel
;
import
cn.afterturn.easypoi.handler.impl.ExcelDataHandlerDefaultImpl
;
public
class
ImportHandle
extends
ExcelDataHandlerDefaultImpl
<
ImportModel
>{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
ImportHandle
.
class
);
public
Object
handler
(
ImportModel
importModel
,
String
name
,
Object
value
)
{
log
.
info
(
name
+
":"
+
value
);
return
super
.
importHandler
(
importModel
,
name
,
value
);
}
}
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