Commit c749160c by lzxry

关闭导入入口

parent 7d44be2b
...@@ -474,10 +474,10 @@ public class ContractController { ...@@ -474,10 +474,10 @@ public class ContractController {
} }
@RequestMapping(value = "/upload", method = RequestMethod.POST) //@RequestMapping(value = "/upload", method = RequestMethod.POST)
@ResponseBody //@ResponseBody
public ResultModel fileUpload2(@RequestParam("file") MultipartFile file, @PathVariable String platform) { public ResultModel fileUpload2(@RequestParam("file") MultipartFile file, @PathVariable String platform,@CurrentAccount User loginAccount) {
return service.uploadBatchInfo(file, platform); return service.uploadBatchInfo(file, platform,loginAccount);
} }
@RequestMapping(value = "/upload/tempurl", method = RequestMethod.GET) @RequestMapping(value = "/upload/tempurl", method = RequestMethod.GET)
......
...@@ -75,7 +75,7 @@ public interface ContractService { ...@@ -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); 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(); Object getBarrioCities();
} }
\ No newline at end of file
...@@ -12,13 +12,10 @@ import net.sf.json.JSONArray; ...@@ -12,13 +12,10 @@ import net.sf.json.JSONArray;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.Days; import org.joda.time.Days;
import org.joda.time.format.DateTimeFormat;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; 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.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -44,10 +41,7 @@ import java.lang.reflect.InvocationTargetException; ...@@ -44,10 +41,7 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Function;
...@@ -2487,7 +2481,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -2487,7 +2481,7 @@ public class ContractServiceImpl implements ContractService {
@Override @Override
public ResultModel uploadBatchInfo(MultipartFile file, String platform) { public ResultModel uploadBatchInfo(MultipartFile file, String platform, User loginAccount) {
InputStream stream = null; InputStream stream = null;
try { try {
int row_length; int row_length;
...@@ -2504,7 +2498,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -2504,7 +2498,7 @@ public class ContractServiceImpl implements ContractService {
// while (sheetIter.hasNext()) { // while (sheetIter.hasNext()) {
// Sheet sheet = sheetIter.next(); // Sheet sheet = sheetIter.next();
// } // }
return saveDataBySheet(workbook.getSheetAt(0), row_length, platform); return saveDataBySheet(workbook.getSheetAt(0), row_length, platform,loginAccount);
} catch (Exception ex) { } catch (Exception ex) {
logger.error("批量上传合同错误", ex); logger.error("批量上传合同错误", ex);
...@@ -2526,7 +2520,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -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(); String sheetName = sheet.getSheetName();
if (!SHEET_NAMES.containsKey(sheetName)) { if (!SHEET_NAMES.containsKey(sheetName)) {
return ResultModel.ERROR("模板标签页名称错误"); return ResultModel.ERROR("模板标签页名称错误");
...@@ -2915,7 +2909,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -2915,7 +2909,7 @@ public class ContractServiceImpl implements ContractService {
s_data[row_already + 8] = ds; s_data[row_already + 8] = ds;
// create_account,create_name,extra_flow,relation_contract,invoice_money,first_back_id // create_account,create_name,extra_flow,relation_contract,invoice_money,first_back_id
s_data[row_already + 9] = 0; s_data[row_already + 9] = 0;
s_data[row_already + 10] = "导入"; s_data[row_already + 10] = "导入-" + loginAccount.getName();
if ("tkio".equals(platform)) { if ("tkio".equals(platform)) {
s_data[row_already + 11] = -1; s_data[row_already + 11] = -1;
s_data[row_already + 12] = 0; s_data[row_already + 12] = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment