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
6759745d
Commit
6759745d
authored
Jun 23, 2020
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0388261e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
47 deletions
+9
-47
ContractController.java
src/main/java/common/controller/ContractController.java
+9
-47
No files found.
src/main/java/common/controller/ContractController.java
View file @
6759745d
...
@@ -116,16 +116,16 @@ public class ContractController {
...
@@ -116,16 +116,16 @@ public class ContractController {
.
append
(
c
.
getEndDate
()).
append
(
","
)
.
append
(
c
.
getEndDate
()).
append
(
","
)
.
append
(
c
.
getPriceLevelName
()).
append
(
","
)
.
append
(
c
.
getPriceLevelName
()).
append
(
","
)
.
append
(
c
.
getMoney
()).
append
(
","
)
.
append
(
c
.
getMoney
()).
append
(
","
)
.
append
(
c
.
getPayMoney
()).
append
(
","
)
//
.append(c.getPayMoney()).append(",")
.
append
(
CONTRACT_STATUS
.
get
(
c
.
getContractType
())).
append
(
","
)
.
append
(
CONTRACT_STATUS
.
get
(
c
.
getContractType
())).
append
(
","
)
.
append
(
CONTRACT_STATUS
.
get
(
c
.
getStatus
())).
append
(
","
)
.
append
(
CONTRACT_STATUS
.
get
(
c
.
getStatus
())).
append
(
","
)
.
append
(
c
.
getRelationCode
()).
append
(
","
)
.
append
(
c
.
getRelationCode
()
==
null
?
""
:
c
.
getRelationCode
()
).
append
(
","
)
.
append
(
"\r\n"
);
.
append
(
"\r\n"
);
}
}
}
}
String
fileName
=
"合同管理
(
"
+
new
DateTime
(
startDate
).
toString
(
"yyyyMMdd"
)
String
fileName
=
"合同管理
_
"
+
new
DateTime
(
startDate
).
toString
(
"yyyyMMdd"
)
+
"_"
+
new
DateTime
(
endDate
).
toString
(
"yyyyMMdd"
)
+
"
)
.csv"
;
+
"_"
+
new
DateTime
(
endDate
).
toString
(
"yyyyMMdd"
)
+
".csv"
;
this
.
exportWrite
(
fileName
,
sb
.
toString
(),
"合同管理"
,
response
);
this
.
exportWrite
(
fileName
,
sb
.
toString
(),
"合同管理"
,
response
);
// InputStream in = new ByteArrayInputStream(sb.toString().getBytes());
// InputStream in = new ByteArrayInputStream(sb.toString().getBytes());
...
@@ -189,22 +189,9 @@ public class ContractController {
...
@@ -189,22 +189,9 @@ public class ContractController {
titlebuffer
.
append
(
"汇总, - , - , - , - , - , - ,"
).
append
(
parseSum
).
append
(
" , - \r\n"
);
titlebuffer
.
append
(
"汇总, - , - , - , - , - , - ,"
).
append
(
parseSum
).
append
(
" , - \r\n"
);
titlebuffer
.
append
(
sb
);
titlebuffer
.
append
(
sb
);
String
fileName
=
"收款开票("
+
new
DateTime
(
startDate
).
toString
(
"yyyyMMdd"
)
String
fileName
=
"收款开票_"
+
new
DateTime
(
startDate
).
toString
(
"yyyyMMdd"
)
+
"_"
+
new
DateTime
(
endDate
).
toString
(
"yyyyMMdd"
)
+
").csv"
;
+
"_"
+
new
DateTime
(
endDate
).
toString
(
"yyyyMMdd"
)
+
".csv"
;
this
.
exportWrite
(
fileName
,
sb
.
toString
(),
"收款开票"
,
response
);
this
.
exportWrite
(
fileName
,
titlebuffer
.
toString
(),
"收款开票"
,
response
);
// InputStream in = new ByteArrayInputStream(titlebuffer.toString().getBytes());
// try {
// content = IOUtils.toByteArray(in);
// } catch (IOException e) {
// e.printStackTrace();
// }
// HttpHeaders headers = new HttpHeaders();
// response.setHeader("filename", "contract_pay.csv");
// response.setHeader("content-disposition", "attachment; filename=contract_pay.csv");
// // response.setHeader("Content-Type", "application/octet-stream;charset=UTF-8");
// response.setHeader("Content-Type", "text/csv");
// response.setContentType("APPLICATION/OCTET-STREAM");
NewUserLogThread
userlog
=
new
NewUserLogThread
(
loginAccount
.
getEmail
(),
loginAccount
.
getName
(),
OperateObjectTypeEnum
.
CUSTOMER
.
getKey
(),
platform
,
"导出收款开票"
,
startDate
,
endDate
,
request
,
platform
);
NewUserLogThread
userlog
=
new
NewUserLogThread
(
loginAccount
.
getEmail
(),
loginAccount
.
getName
(),
OperateObjectTypeEnum
.
CUSTOMER
.
getKey
(),
platform
,
"导出收款开票"
,
startDate
,
endDate
,
request
,
platform
);
userlog
.
start
();
userlog
.
start
();
...
@@ -487,35 +474,10 @@ public class ContractController {
...
@@ -487,35 +474,10 @@ public class ContractController {
.
append
(
"\r\n"
);
.
append
(
"\r\n"
);
}
}
}
}
String
fileName
=
"分摊收入报表_"
+
new
DateTime
(
startDate
).
toString
(
"yyyyMMdd"
)
+
"_"
+
new
DateTime
(
endDate
).
toString
(
"yyyyMMdd"
)
+
".csv"
;
String
fileName
=
"分摊收入报表("
+
new
DateTime
(
startDate
).
toString
(
"yyyyMMdd"
)
+
"_"
+
new
DateTime
(
endDate
).
toString
(
"yyyyMMdd"
)
+
").csv"
;
this
.
exportWrite
(
fileName
,
sb
.
toString
(),
"分摊收入报表"
,
response
);
this
.
exportWrite
(
fileName
,
sb
.
toString
(),
"分摊收入报表"
,
response
);
// OutputStream os = null;
// try {
// fileName = URLEncoder.encode(fileName, "UTF-8");
// response.setHeader("filename", fileName);
// response.setHeader("content-disposition", "attachment; filename=" + fileName);
// response.setHeader("Content-Type", "text/csv");
// response.setContentType("APPLICATION/OCTET-STREAM");
// response.setCharacterEncoding("UTF-8");
// os = response.getOutputStream();
// os.write(new byte[]{(byte) 0xEF, (byte) 0xBB, (byte) 0xBF});
// os.write(sb.toString().getBytes("UTF-8"));
// os.flush();
// } catch (Exception e) {
// logger.error("导出分摊收入报错", e);
// } finally {
// if (os != null) {
// try {
// os.close();
// } catch (IOException e) {
// logger.error("导出分摊收入关闭流报错", e);
// }
// }
// }
}
}
private
void
exportWrite
(
String
fileName
,
String
text
,
String
exportName
,
HttpServletResponse
response
)
{
private
void
exportWrite
(
String
fileName
,
String
text
,
String
exportName
,
HttpServletResponse
response
)
{
...
...
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