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
c749160c
Commit
c749160c
authored
4 years ago
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关闭导入入口
parent
7d44be2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
15 deletions
+10
-15
ContractController.java
src/main/java/common/controller/ContractController.java
+4
-4
ContractService.java
src/main/java/common/service/ContractService.java
+2
-1
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+4
-10
No files found.
src/main/java/common/controller/ContractController.java
View file @
c749160c
...
...
@@ -474,10 +474,10 @@ public class ContractController {
}
@RequestMapping
(
value
=
"/upload"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
ResultModel
fileUpload2
(
@RequestParam
(
"file"
)
MultipartFile
file
,
@PathVariable
String
platform
)
{
return
service
.
uploadBatchInfo
(
file
,
platform
);
//
@RequestMapping(value = "/upload", method = RequestMethod.POST)
//
@ResponseBody
public
ResultModel
fileUpload2
(
@RequestParam
(
"file"
)
MultipartFile
file
,
@PathVariable
String
platform
,
@CurrentAccount
User
loginAccount
)
{
return
service
.
uploadBatchInfo
(
file
,
platform
,
loginAccount
);
}
@RequestMapping
(
value
=
"/upload/tempurl"
,
method
=
RequestMethod
.
GET
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/service/ContractService.java
View file @
c749160c
...
...
@@ -75,7 +75,7 @@ public interface ContractService {
List
<
ContractMoney
>
findPayAll
(
User
loginAccount
,
String
startDate
,
String
endDate
,
String
platform
,
String
moneyType
,
String
packageType
,
String
money_ids
);
ResultModel
uploadBatchInfo
(
MultipartFile
file
,
String
platform
);
ResultModel
uploadBatchInfo
(
MultipartFile
file
,
String
platform
,
User
loginAccount
);
Object
getBarrioCities
();
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
c749160c
...
...
@@ -12,13 +12,10 @@ import net.sf.json.JSONArray;
import
org.apache.poi.ss.usermodel.*
;
import
org.joda.time.DateTime
;
import
org.joda.time.Days
;
import
org.joda.time.format.DateTimeFormat
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.jdbc.core.RowMapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -44,10 +41,7 @@ import java.lang.reflect.InvocationTargetException;
import
java.lang.reflect.Method
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.text.DateFormat
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.function.Function
;
...
...
@@ -2487,7 +2481,7 @@ public class ContractServiceImpl implements ContractService {
@Override
public
ResultModel
uploadBatchInfo
(
MultipartFile
file
,
String
platform
)
{
public
ResultModel
uploadBatchInfo
(
MultipartFile
file
,
String
platform
,
User
loginAccount
)
{
InputStream
stream
=
null
;
try
{
int
row_length
;
...
...
@@ -2504,7 +2498,7 @@ public class ContractServiceImpl implements ContractService {
// while (sheetIter.hasNext()) {
// Sheet sheet = sheetIter.next();
// }
return
saveDataBySheet
(
workbook
.
getSheetAt
(
0
),
row_length
,
platform
);
return
saveDataBySheet
(
workbook
.
getSheetAt
(
0
),
row_length
,
platform
,
loginAccount
);
}
catch
(
Exception
ex
)
{
logger
.
error
(
"批量上传合同错误"
,
ex
);
...
...
@@ -2526,7 +2520,7 @@ public class ContractServiceImpl implements ContractService {
}
public
ResultModel
saveDataBySheet
(
Sheet
sheet
,
int
row_length
,
String
platformexcl
)
{
public
ResultModel
saveDataBySheet
(
Sheet
sheet
,
int
row_length
,
String
platformexcl
,
User
loginAccount
)
{
String
sheetName
=
sheet
.
getSheetName
();
if
(!
SHEET_NAMES
.
containsKey
(
sheetName
))
{
return
ResultModel
.
ERROR
(
"模板标签页名称错误"
);
...
...
@@ -2915,7 +2909,7 @@ public class ContractServiceImpl implements ContractService {
s_data
[
row_already
+
8
]
=
ds
;
// create_account,create_name,extra_flow,relation_contract,invoice_money,first_back_id
s_data
[
row_already
+
9
]
=
0
;
s_data
[
row_already
+
10
]
=
"导入
"
;
s_data
[
row_already
+
10
]
=
"导入
-"
+
loginAccount
.
getName
()
;
if
(
"tkio"
.
equals
(
platform
))
{
s_data
[
row_already
+
11
]
=
-
1
;
s_data
[
row_already
+
12
]
=
0
;
...
...
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