Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
reyun
manager
Commits
55363bff
Commit
55363bff
authored
4 years ago
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tkio增加俩字段
总点击次数(万次)--修改文案并增加--合同流量(万次) 赠送流量(万次) 位置:tkio-合同管理-套餐类型后
parent
aed59087
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
22 deletions
+33
-22
ContractController.java
src/main/java/common/controller/ContractController.java
+22
-15
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+11
-7
合同模板-tkio.xlsx
src/main/webapp/upload/合同模板-tkio.xlsx
+0
-0
No files found.
src/main/java/common/controller/ContractController.java
View file @
55363bff
...
@@ -31,10 +31,7 @@ import java.io.*;
...
@@ -31,10 +31,7 @@ import java.io.*;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* Created by mxq on 17/12/21.
* Created by mxq on 17/12/21.
...
@@ -135,10 +132,13 @@ public class ContractController {
...
@@ -135,10 +132,13 @@ public class ContractController {
//创建工作表的行
//创建工作表的行
HSSFRow
row
=
sheet
.
createRow
(
0
);
HSSFRow
row
=
sheet
.
createRow
(
0
);
List
<
String
>
title
=
Arrays
.
asList
(
"录入时间,合同编号,客户账号,我方签约主体,签约方,行政区域,隶属集团,行业分类,销售,开始日期,结束日期,套餐类型,合同金额,签约类型,合同状态,回款状态,关联合同"
List
<
String
>
title
;
.
split
(
","
));
if
(
platform
.
equals
(
"tkio"
)){
if
(
platform
.
equals
(
"tkio"
)){
title
.
add
(
"总点击次数(万次)"
);
title
=
Arrays
.
asList
(
"录入时间,合同编号,客户账号,我方签约主体,签约方,行政区域,隶属集团,行业分类,销售,开始日期,结束日期,套餐类型,合同流量(万次),赠送流量(万次),合同金额,签约类型,合同状态,回款状态,关联合同"
.
split
(
","
));
}
else
{
title
=
Arrays
.
asList
(
"录入时间,合同编号,客户账号,我方签约主体,签约方,行政区域,隶属集团,行业分类,销售,开始日期,结束日期,套餐类型,合同金额,签约类型,合同状态,回款状态,关联合同"
.
split
(
","
));
}
}
int
lineSize
=
title
.
size
();
int
lineSize
=
title
.
size
();
for
(
int
i
=
0
;
i
<
lineSize
;
i
++)
{
for
(
int
i
=
0
;
i
<
lineSize
;
i
++)
{
...
@@ -160,14 +160,21 @@ public class ContractController {
...
@@ -160,14 +160,21 @@ public class ContractController {
rowBody
.
createCell
(
9
).
setCellValue
(
contract
.
getStartDate
());
rowBody
.
createCell
(
9
).
setCellValue
(
contract
.
getStartDate
());
rowBody
.
createCell
(
10
).
setCellValue
(
contract
.
getEndDate
());
rowBody
.
createCell
(
10
).
setCellValue
(
contract
.
getEndDate
());
rowBody
.
createCell
(
11
).
setCellValue
(
contract
.
getPriceLevelName
());
rowBody
.
createCell
(
11
).
setCellValue
(
contract
.
getPriceLevelName
());
rowBody
.
createCell
(
12
).
setCellValue
(
contract
.
getMoney
());
rowBody
.
createCell
(
13
).
setCellValue
(
CONTRACT_STATUS
.
get
(
contract
.
getContractType
()));
rowBody
.
createCell
(
14
).
setCellValue
(
CONTRACT_STATUS
.
get
(
contract
.
getStatus
()));
rowBody
.
createCell
(
15
).
setCellValue
(
CONTRACT_STATUS
.
get
(
contract
.
getBackStatus
()
+
"_back"
));
rowBody
.
createCell
(
16
).
setCellValue
(
contract
.
getRelationCode
()
==
null
?
""
:
contract
.
getRelationCode
());
if
(
platform
.
equals
(
"tkio"
)){
rowBody
.
createCell
(
17
).
setCellValue
(
contract
.
getTrackFlow
());
if
(
platform
.
equals
(
"tkio"
)){
rowBody
.
createCell
(
12
).
setCellValue
(
contract
.
getTrackFlow
());
rowBody
.
createCell
(
13
).
setCellValue
(
contract
.
getExtraFlow
());
rowBody
.
createCell
(
14
).
setCellValue
(
contract
.
getMoney
());
rowBody
.
createCell
(
15
).
setCellValue
(
CONTRACT_STATUS
.
get
(
contract
.
getContractType
()));
rowBody
.
createCell
(
16
).
setCellValue
(
CONTRACT_STATUS
.
get
(
contract
.
getStatus
()));
rowBody
.
createCell
(
17
).
setCellValue
(
CONTRACT_STATUS
.
get
(
contract
.
getBackStatus
()
+
"_back"
));
rowBody
.
createCell
(
18
).
setCellValue
(
contract
.
getRelationCode
()
==
null
?
""
:
contract
.
getRelationCode
());
}
else
{
rowBody
.
createCell
(
12
).
setCellValue
(
contract
.
getMoney
());
rowBody
.
createCell
(
13
).
setCellValue
(
CONTRACT_STATUS
.
get
(
contract
.
getContractType
()));
rowBody
.
createCell
(
14
).
setCellValue
(
CONTRACT_STATUS
.
get
(
contract
.
getStatus
()));
rowBody
.
createCell
(
15
).
setCellValue
(
CONTRACT_STATUS
.
get
(
contract
.
getBackStatus
()
+
"_back"
));
rowBody
.
createCell
(
16
).
setCellValue
(
contract
.
getRelationCode
()
==
null
?
""
:
contract
.
getRelationCode
());
}
}
}
}
...
@@ -622,7 +629,7 @@ public class ContractController {
...
@@ -622,7 +629,7 @@ public class ContractController {
//创建工作表的行
//创建工作表的行
HSSFRow
row
=
sheet
.
createRow
(
0
);
HSSFRow
row
=
sheet
.
createRow
(
0
);
List
<
String
>
title
=
Arrays
.
asList
(
"我方签约主体,签约方,合同编号,行政区域,隶属集团,合同开始日期,合同截止日期,合同状态,合同金额(元),
总点击次数
(万次),单价(元/万次),区间点击数(万次),区间分摊收入(元),区间调整金额(元),区间总收入(元),累计总收入(元),赠送点击量(万次)"
List
<
String
>
title
=
Arrays
.
asList
(
"我方签约主体,签约方,合同编号,行政区域,隶属集团,合同开始日期,合同截止日期,合同状态,合同金额(元),
合同流量
(万次),单价(元/万次),区间点击数(万次),区间分摊收入(元),区间调整金额(元),区间总收入(元),累计总收入(元),赠送点击量(万次)"
.
split
(
","
));
.
split
(
","
));
int
lineSize
=
title
.
size
();
int
lineSize
=
title
.
size
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
55363bff
...
@@ -86,7 +86,8 @@ public class ContractServiceImpl implements ContractService {
...
@@ -86,7 +86,8 @@ public class ContractServiceImpl implements ContractService {
put
(
"隶属集团"
,
"belong_group"
);
put
(
"隶属集团"
,
"belong_group"
);
put
(
"行业分类"
,
"trade_type"
);
put
(
"行业分类"
,
"trade_type"
);
put
(
"合同金额"
,
"money"
);
put
(
"合同金额"
,
"money"
);
put
(
"总点击次数"
,
"track_flow"
);
put
(
"合同流量"
,
"track_flow"
);
put
(
"赠送流量"
,
"extra_flow"
);
put
(
"客户主账号"
,
"email"
);
put
(
"客户主账号"
,
"email"
);
put
(
"合同编号"
,
"contract_code"
);
put
(
"合同编号"
,
"contract_code"
);
put
(
"签约类型"
,
"contract_type"
);
put
(
"签约类型"
,
"contract_type"
);
...
@@ -104,7 +105,8 @@ public class ContractServiceImpl implements ContractService {
...
@@ -104,7 +105,8 @@ public class ContractServiceImpl implements ContractService {
put
(
"belong_group"
,
"隶属集团"
);
put
(
"belong_group"
,
"隶属集团"
);
put
(
"trade_type"
,
"行业分类"
);
put
(
"trade_type"
,
"行业分类"
);
put
(
"money"
,
"合同金额"
);
put
(
"money"
,
"合同金额"
);
put
(
"track_flow"
,
"总点击次数"
);
put
(
"track_flow"
,
"合同流量"
);
put
(
"extra_flow"
,
"赠送流量"
);
put
(
"email"
,
"客户主账号"
);
put
(
"email"
,
"客户主账号"
);
put
(
"contract_code"
,
"合同编号"
);
put
(
"contract_code"
,
"合同编号"
);
put
(
"contract_type"
,
"签约类型"
);
put
(
"contract_type"
,
"签约类型"
);
...
@@ -521,7 +523,7 @@ public class ContractServiceImpl implements ContractService {
...
@@ -521,7 +523,7 @@ public class ContractServiceImpl implements ContractService {
resource
.
setDs
(
DateUtil
.
getBeforeDays
(
0
));
resource
.
setDs
(
DateUtil
.
getBeforeDays
(
0
));
this
.
saveIncrementFlow
(
resource
,
extraFlow
);
//
this.saveIncrementFlow(resource, extraFlow);
this
.
dealContractStatus
(
resource
,
loginUser
,
"save"
);
this
.
dealContractStatus
(
resource
,
loginUser
,
"save"
);
...
@@ -640,7 +642,7 @@ public class ContractServiceImpl implements ContractService {
...
@@ -640,7 +642,7 @@ public class ContractServiceImpl implements ContractService {
IncrementFlow
flow
=
new
IncrementFlow
();
IncrementFlow
flow
=
new
IncrementFlow
();
Account
account
=
accountRepository
.
findByEmail
(
resource
.
getEmail
());
Account
account
=
accountRepository
.
findByEmail
(
resource
.
getEmail
());
flow
.
setAccount
(
account
.
getId
());
flow
.
setAccount
(
account
.
getId
());
flow
.
setFlow
(
extraFlow
);
flow
.
setFlow
(
extraFlow
*
10000
);
flow
.
setEndDate
(
resource
.
getEndDate
());
flow
.
setEndDate
(
resource
.
getEndDate
());
flow
.
setStartDate
(
resource
.
getStartDate
());
flow
.
setStartDate
(
resource
.
getStartDate
());
flow
.
setContractCode
(
resource
.
getContractCode
());
flow
.
setContractCode
(
resource
.
getContractCode
());
...
@@ -713,7 +715,7 @@ public class ContractServiceImpl implements ContractService {
...
@@ -713,7 +715,7 @@ public class ContractServiceImpl implements ContractService {
IncrementFlow
flow
=
new
IncrementFlow
();
IncrementFlow
flow
=
new
IncrementFlow
();
Account
account
=
accountRepository
.
findByEmail
(
resource
.
getEmail
());
Account
account
=
accountRepository
.
findByEmail
(
resource
.
getEmail
());
flow
.
setAccount
(
account
.
getId
());
flow
.
setAccount
(
account
.
getId
());
flow
.
setFlow
(
extraFlow
);
flow
.
setFlow
(
extraFlow
*
10000
);
flow
.
setEndDate
(
resource
.
getEndDate
());
flow
.
setEndDate
(
resource
.
getEndDate
());
flow
.
setStartDate
(
resource
.
getStartDate
());
flow
.
setStartDate
(
resource
.
getStartDate
());
flow
.
setContractCode
(
resource
.
getContractCode
());
flow
.
setContractCode
(
resource
.
getContractCode
());
...
@@ -2305,7 +2307,7 @@ public class ContractServiceImpl implements ContractService {
...
@@ -2305,7 +2307,7 @@ public class ContractServiceImpl implements ContractService {
try
{
try
{
int
row_length
;
int
row_length
;
if
(
platform
.
equals
(
"tkio"
)){
if
(
platform
.
equals
(
"tkio"
)){
row_length
=
1
4
;
row_length
=
1
5
;
}
else
{
}
else
{
row_length
=
13
;
row_length
=
13
;
}
}
...
@@ -2383,8 +2385,10 @@ public class ContractServiceImpl implements ContractService {
...
@@ -2383,8 +2385,10 @@ public class ContractServiceImpl implements ContractService {
return
ResultModel
.
ERROR
(
ResultStatus
.
FORMAT_FILE_ERRO
);
return
ResultModel
.
ERROR
(
ResultStatus
.
FORMAT_FILE_ERRO
);
}
}
if
(!
platform
.
equals
(
"tkio"
)){
if
(!
platform
.
equals
(
"tkio"
)){
titleKey
.
remove
(
"
总点击次数
"
);
titleKey
.
remove
(
"
合同流量
"
);
titleKey
.
remove
(
"track_flow"
);
titleKey
.
remove
(
"track_flow"
);
titleKey
.
remove
(
"赠送流量"
);
titleKey
.
remove
(
"extra_flow"
);
}
}
int
row_already
=
titleKey
.
size
();
int
row_already
=
titleKey
.
size
();
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/upload/合同模板-tkio.xlsx
View file @
55363bff
No preview for this file type
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment