Commit 838b9b65 authored by kevin's avatar kevin

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents 6b1094d2 08ba7683
...@@ -94,6 +94,24 @@ public class AnalysisController extends BaseController { ...@@ -94,6 +94,24 @@ public class AnalysisController extends BaseController {
} }
} }
@ResponseBody
@RequestMapping(value = "InternationalExcelFile", method = RequestMethod.POST)
public OperationResultDto importDomesitcExcelFile(@RequestParam MultipartFile file, @RequestParam String period,
@RequestParam Integer type,@RequestParam String companyName,@RequestParam String country) {
try {
String valMsg = valParameter(file,period,type);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return analysisServiceImpl.importInterNationalExcelFile(file,period, type,companyName,country);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("importDomesitcExcelFile error.", e);
return OperationResultDto.error(ErrorMessage.SystemError);
}
}
private String valParameter(MultipartFile file,String periodDate,Integer type){ private String valParameter(MultipartFile file,String periodDate,Integer type){
if (null == file) { if (null == file) {
return ErrorMessage.NoFile; return ErrorMessage.NoFile;
......
...@@ -7,6 +7,8 @@ public class ErrorMessageCN { ...@@ -7,6 +7,8 @@ public class ErrorMessageCN {
public static final String InconsistentPeriod = "单表中期间不一致"; public static final String InconsistentPeriod = "单表中期间不一致";
public static final String DoNotSelectPeriod = "未选择期间"; public static final String DoNotSelectPeriod = "未选择期间";
public static final String DoNotSelectCompany = "非选定主体"; public static final String DoNotSelectCompany = "非选定主体";
public static final String DoNotExistProject = "项目未开启";
public static final String DoNotInputPeriod = "缺少期间字段";
public static final String StrctureRepeat = "层级重复!"; public static final String StrctureRepeat = "层级重复!";
public static final String BusinssUnitRepeat = "事业部重复!"; public static final String BusinssUnitRepeat = "事业部重复!";
public static final String BusinssUnitUpdateFailed = "未对事业部名称或状态进行修改!"; public static final String BusinssUnitUpdateFailed = "未对事业部名称或状态进行修改!";
......
...@@ -109,7 +109,6 @@ public class DateUtils { ...@@ -109,7 +109,6 @@ public class DateUtils {
return dateString; return dateString;
} }
/** /**
* 将短时间格式字符串转换为区间格式 yyyyMM * 将短时间格式字符串转换为区间格式 yyyyMM
* *
...@@ -117,12 +116,13 @@ public class DateUtils { ...@@ -117,12 +116,13 @@ public class DateUtils {
* @return * @return
*/ */
public static Integer dateToPeriod(java.util.Date dateDate) { public static Integer dateToPeriod(java.util.Date dateDate) {
if(dateDate==null){
return null;
}
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMM"); SimpleDateFormat formatter = new SimpleDateFormat("yyyyMM");
Integer period = Integer.valueOf(formatter.format(dateDate)); return Integer.valueOf(formatter.format(dateDate));
return period;
} }
/** /**
* 将yyyy-mm yyyy - mm等字符串转换为区间格式 yyyyMM * 将yyyy-mm yyyy - mm等字符串转换为区间格式 yyyyMM
* *
...@@ -217,6 +217,19 @@ public class DateUtils { ...@@ -217,6 +217,19 @@ public class DateUtils {
return strtodate; return strtodate;
} }
/**
* 将短时间格式字符串转换为时间 yyyy-MM
*
* @param strDate
* @return
*/
public static Date strToDate5(String strDate) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
ParsePosition pos = new ParsePosition(0);
Date strtodate = formatter.parse(strDate, pos);
return strtodate;
}
/** /**
* 得到现在时间 * 得到现在时间
* *
......
...@@ -201,11 +201,20 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -201,11 +201,20 @@ public class AnalysisServiceImpl extends BaseService {
case 4: case 4:
importAnalysisDriverNumExcelFile(file,periodDate); importAnalysisDriverNumExcelFile(file,periodDate);
break; break;
default:
break;
}
return OperationResultDto.success();
}
public OperationResultDto importInterNationalExcelFile(MultipartFile file, String periodDate, Integer type,
String companyName,String country) {
switch (type){
case 100: case 100:
importAnalysisInterBuDataExcelFile(file,periodDate); importAnalysisInterBuDataExcelFile(file,periodDate,companyName,country);
break; break;
case 101: case 101:
importAnalysisInterTaxDataExcelFile(file,periodDate); importAnalysisInterTaxDataExcelFile(file,periodDate,companyName,country);
break; break;
default: default:
break; break;
...@@ -221,12 +230,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -221,12 +230,7 @@ public class AnalysisServiceImpl extends BaseService {
throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod); throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod);
} }
// 文件上的期间 // 文件上的期间
String filePeriod = file.getOriginalFilename().split("_")[1];
Integer filePer = DateUtils.strToPeriod2(filePeriod);
Integer selectedPer = DateUtils.strToPeriod(periodDate); Integer selectedPer = DateUtils.strToPeriod(periodDate);
if (!filePer.equals(selectedPer)) {
throw new ServiceException(ErrorMessageCN.ExistDataPeriodsError);
}
for (int i = 0; i < workbook.getNumberOfSheets(); i++) { for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
Sheet sheet = workbook.getSheetAt(i); Sheet sheet = workbook.getSheetAt(i);
if (isSheetEmpty(sheet)) continue; if (isSheetEmpty(sheet)) continue;
...@@ -275,13 +279,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -275,13 +279,7 @@ public class AnalysisServiceImpl extends BaseService {
if (StringUtils.isBlank(periodDate) || "null".equals(periodDate)) { if (StringUtils.isBlank(periodDate) || "null".equals(periodDate)) {
throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod); throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod);
} }
// 文件上的期间
String filePeriod = file.getOriginalFilename().split("_")[1];
Integer filePer = DateUtils.strToPeriod2(filePeriod);
Integer selectedPer = DateUtils.strToPeriod(periodDate); Integer selectedPer = DateUtils.strToPeriod(periodDate);
if (!filePer.equals(selectedPer)) {
throw new ServiceException(ErrorMessageCN.ExistDataPeriodsError);
}
for (int i = 0; i < workbook.getNumberOfSheets(); i++) { for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
Sheet sheet = workbook.getSheetAt(i); Sheet sheet = workbook.getSheetAt(i);
if (isSheetEmpty(sheet)) continue; if (isSheetEmpty(sheet)) continue;
...@@ -330,13 +328,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -330,13 +328,7 @@ public class AnalysisServiceImpl extends BaseService {
if (StringUtils.isBlank(periodDate) || "null".equals(periodDate)) { if (StringUtils.isBlank(periodDate) || "null".equals(periodDate)) {
throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod); throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod);
} }
// 文件上的期间
String filePeriod = file.getOriginalFilename().split("_")[1];
Integer filePer = DateUtils.strToPeriod2(filePeriod);
Integer selectedPer = DateUtils.strToPeriod(periodDate); Integer selectedPer = DateUtils.strToPeriod(periodDate);
if(!filePer.equals(selectedPer)){
throw new ServiceException(ErrorMessageCN.ExistDataPeriodsError);
}
for (int i = 0; i < workbook.getNumberOfSheets(); i++) { for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
Sheet sheet = workbook.getSheetAt(i); Sheet sheet = workbook.getSheetAt(i);
if (isSheetEmpty(sheet)) continue; if (isSheetEmpty(sheet)) continue;
...@@ -381,13 +373,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -381,13 +373,7 @@ public class AnalysisServiceImpl extends BaseService {
if (StringUtils.isBlank(periodDate) || "null".equals(periodDate)) { if (StringUtils.isBlank(periodDate) || "null".equals(periodDate)) {
throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod); throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod);
} }
// 文件上的期间
String filePeriod = file.getOriginalFilename().split("_")[1];
Integer filePer = DateUtils.strToPeriod2(filePeriod);
Integer selectedPer = DateUtils.strToPeriod(periodDate); Integer selectedPer = DateUtils.strToPeriod(periodDate);
if(!filePer.equals(selectedPer)){
throw new ServiceException(ErrorMessageCN.ExistDataPeriodsError);
}
for (int i = 0; i < workbook.getNumberOfSheets(); i++) { for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
Sheet sheet = workbook.getSheetAt(i); Sheet sheet = workbook.getSheetAt(i);
if (isSheetEmpty(sheet)) continue; if (isSheetEmpty(sheet)) continue;
...@@ -432,13 +418,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -432,13 +418,7 @@ public class AnalysisServiceImpl extends BaseService {
if (StringUtils.isBlank(periodDate) || "null".equals(periodDate)) { if (StringUtils.isBlank(periodDate) || "null".equals(periodDate)) {
throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod); throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod);
} }
// 文件上的期间
String filePeriod = file.getOriginalFilename().split("_")[1];
Integer filePer = DateUtils.strToPeriod2(filePeriod);
Integer selectedPer = DateUtils.strToPeriod(periodDate); Integer selectedPer = DateUtils.strToPeriod(periodDate);
if(!filePer.equals(selectedPer)){
throw new ServiceException(ErrorMessageCN.ExistDataPeriodsError);
}
for (int i = 0; i < workbook.getNumberOfSheets(); i++) { for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
Sheet sheet = workbook.getSheetAt(i); Sheet sheet = workbook.getSheetAt(i);
if (isSheetEmpty(sheet)) continue; if (isSheetEmpty(sheet)) continue;
...@@ -475,7 +455,8 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -475,7 +455,8 @@ public class AnalysisServiceImpl extends BaseService {
} }
} }
private void importAnalysisInterTaxDataExcelFile(MultipartFile file, String periodDate) { private void importAnalysisInterTaxDataExcelFile(MultipartFile file, String periodDate,
String companyName,String country) {
try{ try{
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream); Workbook workbook = WorkbookFactory.create(inputStream);
...@@ -483,14 +464,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -483,14 +464,7 @@ public class AnalysisServiceImpl extends BaseService {
throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod); throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod);
} }
// 文件上的期间 // 文件上的期间
String fileCountry = file.getOriginalFilename().split("_")[1];
String fileCompany = file.getOriginalFilename().split("_")[2];
String filePeriod = file.getOriginalFilename().split("_")[3];
Integer filePer = DateUtils.strToPeriod2(filePeriod);
Integer selectedPer = DateUtils.strToPeriod(periodDate); Integer selectedPer = DateUtils.strToPeriod(periodDate);
if(!filePer.equals(selectedPer)){
throw new ServiceException(ErrorMessageCN.ExistDataPeriodsError);
}
for (int i = 0; i < workbook.getNumberOfSheets(); i++) { for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
Sheet sheet = workbook.getSheetAt(i); Sheet sheet = workbook.getSheetAt(i);
if (isSheetEmpty(sheet)) continue; if (isSheetEmpty(sheet)) continue;
...@@ -503,8 +477,8 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -503,8 +477,8 @@ public class AnalysisServiceImpl extends BaseService {
AnalysisInternationalTaxData model = new AnalysisInternationalTaxData(); AnalysisInternationalTaxData model = new AnalysisInternationalTaxData();
model.setId(idService.nextId()); model.setId(idService.nextId());
model.setPeriod(selectedPer); model.setPeriod(selectedPer);
model.setCompanyName(fileCompany); model.setCompanyName(companyName);
model.setCountry(fileCountry); model.setCountry(country);
model.setTaxCategory(getCellStringValue(sheet.getRow(j).getCell(0))); model.setTaxCategory(getCellStringValue(sheet.getRow(j).getCell(0)));
model.setTaxType(getCellStringValue(sheet.getRow(j).getCell(1))); model.setTaxType(getCellStringValue(sheet.getRow(j).getCell(1)));
model.setTaxAmount(getCellBigDecimalValue(sheet.getRow(j).getCell(2))); model.setTaxAmount(getCellBigDecimalValue(sheet.getRow(j).getCell(2)));
...@@ -526,7 +500,8 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -526,7 +500,8 @@ public class AnalysisServiceImpl extends BaseService {
} }
} }
private void importAnalysisInterBuDataExcelFile(MultipartFile file, String periodDate) { private void importAnalysisInterBuDataExcelFile(MultipartFile file, String periodDate,
String companyName,String country) {
try{ try{
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream); Workbook workbook = WorkbookFactory.create(inputStream);
...@@ -534,14 +509,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -534,14 +509,7 @@ public class AnalysisServiceImpl extends BaseService {
throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod); throw new ServiceException(ErrorMessageCN.DoNotSelectPeriod);
} }
// 文件上的期间 // 文件上的期间
String fileCountry = file.getOriginalFilename().split("_")[1];
String fileCompany = file.getOriginalFilename().split("_")[2];
String filePeriod = file.getOriginalFilename().split("_")[3];
Integer filePer = DateUtils.strToPeriod2(filePeriod);
Integer selectedPer = DateUtils.strToPeriod(periodDate); Integer selectedPer = DateUtils.strToPeriod(periodDate);
if(!filePer.equals(selectedPer)){
throw new ServiceException(ErrorMessageCN.ExistDataPeriodsError);
}
for (int i = 0; i < workbook.getNumberOfSheets(); i++) { for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
Sheet sheet = workbook.getSheetAt(i); Sheet sheet = workbook.getSheetAt(i);
if (isSheetEmpty(sheet)) continue; if (isSheetEmpty(sheet)) continue;
...@@ -550,8 +518,8 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -550,8 +518,8 @@ public class AnalysisServiceImpl extends BaseService {
AnalysisInternationalBusinessData model = new AnalysisInternationalBusinessData(); AnalysisInternationalBusinessData model = new AnalysisInternationalBusinessData();
model.setId(idService.nextId()); model.setId(idService.nextId());
model.setPeriod(selectedPer); model.setPeriod(selectedPer);
model.setCompanyName(fileCompany); model.setCompanyName(companyName);
model.setCountry(fileCountry); model.setCountry(country);
Cell cell1 = sheet.getRow(j).getCell(0); Cell cell1 = sheet.getRow(j).getCell(0);
if (null == cell1 || StringUtils.isEmpty(getCellStringValue(cell1))) { if (null == cell1 || StringUtils.isEmpty(getCellStringValue(cell1))) {
continue; continue;
......
...@@ -273,9 +273,9 @@ public class DataImportService extends BaseService { ...@@ -273,9 +273,9 @@ public class DataImportService extends BaseService {
taxPayerId = StringUtils.isNotEmpty(organizations.get(0).getLegalCode()) ? taxPayerId = StringUtils.isNotEmpty(organizations.get(0).getLegalCode()) ?
organizations.get(0).getLegalCode() : organizations.get(0).getTaxPayerNumber(); organizations.get(0).getLegalCode() : organizations.get(0).getTaxPayerNumber();
} }
String periodStr = sheet.getRow(2).getCell(2).getStringCellValue().substring(3); String periodStr = getCellStringValue(sheet.getRow(2).getCell(2)).substring(3);
String companyName = sheet.getRow(4).getCell(1).getStringCellValue(); String companyName = getCellStringValue(sheet.getRow(4).getCell(1));
String fileType = sheet.getRow(0).getCell(2).getStringCellValue(); String fileType = getCellStringValue(sheet.getRow(0).getCell(2));
Integer period = DateUtils.strToPeriod(periodStr); Integer period = DateUtils.strToPeriod(periodStr);
Integer tmsPeriod = DateUtils.strToPeriod(periodDate); Integer tmsPeriod = DateUtils.strToPeriod(periodDate);
...@@ -295,6 +295,13 @@ public class DataImportService extends BaseService { ...@@ -295,6 +295,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片 // 根据机构ID和年份获取卡片
String projId = getProjId(orgId, tmsPeriod); String projId = getProjId(orgId, tmsPeriod);
if (StringUtils.isEmpty(projId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotExistProject);
dataImportLogs.add(dataImportLog);
continue;
}
if (!orgIds.contains(orgId)) { if (!orgIds.contains(orgId)) {
dataImportLog.setImportResult(false); dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany); dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
...@@ -441,8 +448,8 @@ public class DataImportService extends BaseService { ...@@ -441,8 +448,8 @@ public class DataImportService extends BaseService {
taxPayerId = StringUtils.isNotEmpty(organizations.get(0).getLegalCode()) ? taxPayerId = StringUtils.isNotEmpty(organizations.get(0).getLegalCode()) ?
organizations.get(0).getLegalCode() : organizations.get(0).getTaxPayerNumber(); organizations.get(0).getLegalCode() : organizations.get(0).getTaxPayerNumber();
} }
String periodStr = sheet.getRow(2).getCell(2).getStringCellValue().substring(3); String periodStr = getCellStringValue(sheet.getRow(2).getCell(2)).substring(3);
String fileType = sheet.getRow(0).getCell(2).getStringCellValue(); String fileType = getCellStringValue(sheet.getRow(0).getCell(2));
Integer period = DateUtils.strToPeriod(periodStr); Integer period = DateUtils.strToPeriod(periodStr);
Integer tmsPeriod = DateUtils.strToPeriod(periodDate); Integer tmsPeriod = DateUtils.strToPeriod(periodDate);
...@@ -461,6 +468,13 @@ public class DataImportService extends BaseService { ...@@ -461,6 +468,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片 // 根据机构ID和年份获取卡片
String projId = getProjId(orgId, tmsPeriod); String projId = getProjId(orgId, tmsPeriod);
if (StringUtils.isEmpty(projId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotExistProject);
dataImportLogs.add(dataImportLog);
continue;
}
if (!orgIds.contains(orgId)) { if (!orgIds.contains(orgId)) {
dataImportLog.setImportResult(false); dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany); dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
...@@ -581,8 +595,8 @@ public class DataImportService extends BaseService { ...@@ -581,8 +595,8 @@ public class DataImportService extends BaseService {
taxPayerId = StringUtils.isNotEmpty(organizations.get(0).getLegalCode()) ? taxPayerId = StringUtils.isNotEmpty(organizations.get(0).getLegalCode()) ?
organizations.get(0).getLegalCode() : organizations.get(0).getTaxPayerNumber(); organizations.get(0).getLegalCode() : organizations.get(0).getTaxPayerNumber();
} }
String periodStr = sheet.getRow(4).getCell(8).getStringCellValue(); String periodStr = getCellStringValue(sheet.getRow(4).getCell(8));
String fileType = sheet.getRow(0).getCell(0).getStringCellValue(); String fileType = getCellStringValue(sheet.getRow(0).getCell(0));
Date dataDate = DateUtils.strToDate2(sheet.getRow(4).getCell(10).getStringCellValue()); Date dataDate = DateUtils.strToDate2(sheet.getRow(4).getCell(10).getStringCellValue());
Integer period = DateUtils.strToPeriod(periodStr); Integer period = DateUtils.strToPeriod(periodStr);
...@@ -602,6 +616,13 @@ public class DataImportService extends BaseService { ...@@ -602,6 +616,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片 // 根据机构ID和年份获取卡片
String projId = getProjId(orgId, tmsPeriod); String projId = getProjId(orgId, tmsPeriod);
if (StringUtils.isEmpty(projId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotExistProject);
dataImportLogs.add(dataImportLog);
continue;
}
if (!orgIds.contains(orgId)) { if (!orgIds.contains(orgId)) {
dataImportLog.setImportResult(false); dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany); dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
...@@ -744,6 +765,13 @@ public class DataImportService extends BaseService { ...@@ -744,6 +765,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片 // 根据机构ID和年份获取卡片
String projId = getProjId(orgId, tmsPeriod); String projId = getProjId(orgId, tmsPeriod);
if (StringUtils.isEmpty(projId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotExistProject);
dataImportLogs.add(dataImportLog);
continue;
}
if (!orgIds.contains(orgId)) { if (!orgIds.contains(orgId)) {
dataImportLog.setImportResult(false); dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany); dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
...@@ -948,6 +976,13 @@ public class DataImportService extends BaseService { ...@@ -948,6 +976,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片 // 根据机构ID和年份获取卡片
String projId = getProjId(orgId, tmsPeriod); String projId = getProjId(orgId, tmsPeriod);
if (StringUtils.isEmpty(projId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotExistProject);
dataImportLogs.add(dataImportLog);
return;
}
if(!orgIds.contains(orgId)){ if(!orgIds.contains(orgId)){
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany); dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
dataImportLog.setImportResult(false); dataImportLog.setImportResult(false);
...@@ -1042,6 +1077,13 @@ public class DataImportService extends BaseService { ...@@ -1042,6 +1077,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片 // 根据机构ID和年份获取卡片
String projId = getProjId(orgId, tmsPeriod); String projId = getProjId(orgId, tmsPeriod);
if (StringUtils.isEmpty(projId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotExistProject);
dataImportLogs.add(dataImportLog);
return;
}
if(!orgIds.contains(orgId)){ if(!orgIds.contains(orgId)){
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany); dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
dataImportLog.setImportResult(false); dataImportLog.setImportResult(false);
...@@ -1139,6 +1181,13 @@ public class DataImportService extends BaseService { ...@@ -1139,6 +1181,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片 // 根据机构ID和年份获取卡片
String projId = getProjId(orgId, tmsPeriod); String projId = getProjId(orgId, tmsPeriod);
if (StringUtils.isEmpty(projId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotExistProject);
dataImportLogs.add(dataImportLog);
return;
}
if(!orgIds.contains(orgId)){ if(!orgIds.contains(orgId)){
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany); dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
dataImportLog.setImportResult(false); dataImportLog.setImportResult(false);
...@@ -1214,8 +1263,8 @@ public class DataImportService extends BaseService { ...@@ -1214,8 +1263,8 @@ public class DataImportService extends BaseService {
orgId = organizations.get(0).getId(); orgId = organizations.get(0).getId();
companyCode = organizations.get(0).getCode(); companyCode = organizations.get(0).getCode();
} }
String periodStr = sheet.getRow(1).getCell(4).getStringCellValue(); String periodStr = getCellStringValue(sheet.getRow(1).getCell(4));
String fileType = sheet.getRow(0).getCell(0).getStringCellValue(); String fileType = getCellStringValue(sheet.getRow(0).getCell(0));
Integer period = DateUtils.strToPeriod2(periodStr); Integer period = DateUtils.strToPeriod2(periodStr);
Integer tmsPeriod = DateUtils.strToPeriod(periodDate); Integer tmsPeriod = DateUtils.strToPeriod(periodDate);
...@@ -1234,6 +1283,13 @@ public class DataImportService extends BaseService { ...@@ -1234,6 +1283,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片 // 根据机构ID和年份获取卡片
String projId = getProjId(orgId, tmsPeriod); String projId = getProjId(orgId, tmsPeriod);
if (StringUtils.isEmpty(projId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotExistProject);
dataImportLogs.add(dataImportLog);
continue;
}
if (!orgIds.contains(orgId)) { if (!orgIds.contains(orgId)) {
dataImportLog.setImportResult(false); dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany); dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
...@@ -1370,7 +1426,7 @@ public class DataImportService extends BaseService { ...@@ -1370,7 +1426,7 @@ public class DataImportService extends BaseService {
private void processIrs(String billingBody, List<InvoiceRecord> irs,List<String> orgIds, private void processIrs(String billingBody, List<InvoiceRecord> irs,List<String> orgIds,
Integer tmsPeriod, Integer importType,List<DataImportLog> dataImportLogs) { Integer tmsPeriod, Integer importType,List<DataImportLog> dataImportLogs) {
OrganizationExample organizationExample = new OrganizationExample(); OrganizationExample organizationExample = new OrganizationExample();
organizationExample.createCriteria().andCodeEqualTo(billingBody); organizationExample.createCriteria().andNameEqualTo(billingBody);
List<Organization> orgs = organizationMapper.selectByExample(organizationExample); List<Organization> orgs = organizationMapper.selectByExample(organizationExample);
DataImportLog dataImportLog = generalDataImportLog(irs.get(0).getBillingBody(),"", "", DataImportLog dataImportLog = generalDataImportLog(irs.get(0).getBillingBody(),"", "",
...@@ -1390,6 +1446,13 @@ public class DataImportService extends BaseService { ...@@ -1390,6 +1446,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片 // 根据机构ID和年份获取卡片
String projId = getProjId(orgId, tmsPeriod); String projId = getProjId(orgId, tmsPeriod);
if (StringUtils.isEmpty(projId)) {
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotExistProject);
dataImportLogs.add(dataImportLog);
return;
}
if(!orgIds.contains(orgId)){ if(!orgIds.contains(orgId)){
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany); dataImportLog.setErrorMsg(ErrorMessageCN.DoNotSelectCompany);
dataImportLog.setImportResult(false); dataImportLog.setImportResult(false);
...@@ -1407,6 +1470,13 @@ public class DataImportService extends BaseService { ...@@ -1407,6 +1470,13 @@ public class DataImportService extends BaseService {
boolean validateRes = true; boolean validateRes = true;
for (InvoiceRecord ir : irs) { for (InvoiceRecord ir : irs) {
// 校验该主体导入所有记录区间是否一致 // 校验该主体导入所有记录区间是否一致
if(null==ir.getPeriod()){
dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.DoNotInputPeriod);
validateRes = false;
break;
}
if (!ir.getPeriod().equals(period1)) { if (!ir.getPeriod().equals(period1)) {
dataImportLog.setImportResult(false); dataImportLog.setImportResult(false);
dataImportLog.setErrorMsg(ErrorMessageCN.InconsistentPeriod); dataImportLog.setErrorMsg(ErrorMessageCN.InconsistentPeriod);
...@@ -1484,7 +1554,7 @@ public class DataImportService extends BaseService { ...@@ -1484,7 +1554,7 @@ public class DataImportService extends BaseService {
ir.setApplicationDate(row.getCell(11).getDateCellValue()); ir.setApplicationDate(row.getCell(11).getDateCellValue());
ir.setBillingDate(row.getCell(12).getDateCellValue()); ir.setBillingDate(row.getCell(12).getDateCellValue());
ir.setPeriod(DateUtils.dateToPeriod(ir.getBillingDate())); ir.setPeriod(DateUtils.dateToPeriod(ir.getBillingDate()));
ir.setBillingMonth(row.getCell(13).getDateCellValue()); ir.setBillingMonth(DateUtils.strToDate5(getCellStringValue(row.getCell(13))));
ir.setInvoiceCode(getCellStringValue(row.getCell(14))); ir.setInvoiceCode(getCellStringValue(row.getCell(14)));
ir.setInvoiceNum(getCellStringValue(row.getCell(15))); ir.setInvoiceNum(getCellStringValue(row.getCell(15)));
ir.setRemarks(getCellStringValue(row.getCell(16))); ir.setRemarks(getCellStringValue(row.getCell(16)));
...@@ -1589,6 +1659,9 @@ public class DataImportService extends BaseService { ...@@ -1589,6 +1659,9 @@ public class DataImportService extends BaseService {
} }
private String getCellStringValue(Cell cell) { private String getCellStringValue(Cell cell) {
if(null==cell){
return "";
}
if (cell.getCellTypeEnum().equals(CellType.STRING)) { if (cell.getCellTypeEnum().equals(CellType.STRING)) {
return cell.getStringCellValue(); return cell.getStringCellValue();
} else if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) { } else if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) {
...@@ -1600,6 +1673,9 @@ public class DataImportService extends BaseService { ...@@ -1600,6 +1673,9 @@ public class DataImportService extends BaseService {
} }
private Boolean getCellBolleanValue(Cell cell) { private Boolean getCellBolleanValue(Cell cell) {
if(null==cell){
return false;
}
if (cell.getCellTypeEnum().equals(CellType.STRING)) { if (cell.getCellTypeEnum().equals(CellType.STRING)) {
switch (cell.getStringCellValue()) { switch (cell.getStringCellValue()) {
case "TRUE": case "TRUE":
...@@ -1621,6 +1697,9 @@ public class DataImportService extends BaseService { ...@@ -1621,6 +1697,9 @@ public class DataImportService extends BaseService {
} }
private Integer getCellIntegerValue(Cell cell) { private Integer getCellIntegerValue(Cell cell) {
if(null==cell){
return null;
}
if (cell.getCellTypeEnum().equals(CellType.STRING)) { if (cell.getCellTypeEnum().equals(CellType.STRING)) {
return Integer.valueOf(cell.getStringCellValue()); return Integer.valueOf(cell.getStringCellValue());
} else if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) { } else if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) {
...@@ -1631,6 +1710,9 @@ public class DataImportService extends BaseService { ...@@ -1631,6 +1710,9 @@ public class DataImportService extends BaseService {
} }
private BigDecimal getCellBigDecimalValue(Cell cell) { private BigDecimal getCellBigDecimalValue(Cell cell) {
if(null==cell){
return null;
}
if (cell.getCellTypeEnum().equals(CellType.STRING)) { if (cell.getCellTypeEnum().equals(CellType.STRING)) {
return new BigDecimal(cell.getStringCellValue()); return new BigDecimal(cell.getStringCellValue());
} else if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) { } else if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) {
...@@ -1641,6 +1723,9 @@ public class DataImportService extends BaseService { ...@@ -1641,6 +1723,9 @@ public class DataImportService extends BaseService {
} }
private Long getCellLongDecimalValue(Cell cell) { private Long getCellLongDecimalValue(Cell cell) {
if(null==cell){
return null;
}
if (cell.getCellTypeEnum().equals(CellType.STRING)) { if (cell.getCellTypeEnum().equals(CellType.STRING)) {
return Long.valueOf(cell.getStringCellValue()); return Long.valueOf(cell.getStringCellValue());
} else if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) { } else if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) {
......
...@@ -47,7 +47,7 @@ file_upload_query_url=http://47.94.233.173:11006/resource/erp_tax_system ...@@ -47,7 +47,7 @@ file_upload_query_url=http://47.94.233.173:11006/resource/erp_tax_system
#ϵַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/ #ϵַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
check_ticket=false check_ticket=false
get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/ get_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
app_id=2500 app_id=2500
app_key=983258e7fd04d7fa0534735f7b1c33f3 app_key=983258e7fd04d7fa0534735f7b1c33f3
cookie.maxAgeSeconds=86400 cookie.maxAgeSeconds=86400
......
...@@ -45,7 +45,7 @@ file_upload_query_url=http://47.94.233.173:11006/resource/erp_tax_system ...@@ -45,7 +45,7 @@ file_upload_query_url=http://47.94.233.173:11006/resource/erp_tax_system
#ϵַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/ #ϵַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
check_ticket=false check_ticket=false
get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/ get_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
app_id=2500 app_id=2500
app_key=983258e7fd04d7fa0534735f7b1c33f3 app_key=983258e7fd04d7fa0534735f7b1c33f3
cookie.maxAgeSeconds=86400 cookie.maxAgeSeconds=86400
......
...@@ -406,7 +406,7 @@ public class DataInitTest extends CommonIT { ...@@ -406,7 +406,7 @@ public class DataInitTest extends CommonIT {
*/ */
String input = ""; String input = "";
try { try {
File targetFile = new File("src/main/resources/orgImport/ddOrgJson2.json"); File targetFile = new File("src/main/resources/orgImport/ddOrgJson3.json");
// File targetFile = new File("src/main/resources/orgImport/failedJson.json"); // File targetFile = new File("src/main/resources/orgImport/failedJson.json");
input = FileUtils.readFileToString(targetFile, "UTF-8"); input = FileUtils.readFileToString(targetFile, "UTF-8");
} catch (Exception e) { } catch (Exception e) {
......
...@@ -857,6 +857,30 @@ public class Organization extends BaseEntity implements Serializable { ...@@ -857,6 +857,30 @@ public class Organization extends BaseEntity implements Serializable {
this.pLevel = pLevel; this.pLevel = pLevel;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.p_level
*
* @return the value of organization.p_level
*
* @mbg.generated
*/
public Integer getPLevel() {
return pLevel;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.p_level
*
* @param pLevel the value for organization.p_level
*
* @mbg.generated
*/
public void setPLevel(Integer pLevel) {
this.pLevel = pLevel;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.create_time * This method returns the value of the database column organization.create_time
......
...@@ -208,7 +208,7 @@ public class AccountController { ...@@ -208,7 +208,7 @@ public class AccountController {
response.addCookie(ddTicketCookie); response.addCookie(ddTicketCookie);
response.addCookie(ddJumptoCookie); response.addCookie(ddJumptoCookie);
// todo 这里写死为DD的登出地址了 // todo 这里写死为DD的登出地址了
response.sendRedirect("http://mis.diditaxi.com.cn/auth/ldap/logout?app_id=2500"); response.sendRedirect("http://mis.diditaxi.com.cn/auth/ldap/logout?app_id=2500&jumpto=http://dts.erp.didichuxing.com:9001/sso/accept");
} catch (Exception e) { } catch (Exception e) {
logger.error("登出失败", e); logger.error("登出失败", e);
} }
......
...@@ -93,26 +93,44 @@ public class IndexController { ...@@ -93,26 +93,44 @@ public class IndexController {
return "redirect:Account/LogOn"; return "redirect:Account/LogOn";
} }
@RequestMapping(value = {"/sso/callback"}, method = RequestMethod.GET) @RequestMapping(value = {"/sso/callback"})
public String ddSSOCallback(@RequestParam(value = "jumpto") String jumpto, public void ddSSOCallback(@RequestParam(value = "jumpto") String jumpto,
@RequestParam(value = "code") String code, @RequestParam(value = "code") String code,
HttpServletResponse response) throws IOException, ServletException { HttpServletResponse response) throws IOException, ServletException {
try{ try{
String ticketStr = getTicket(code); String ticketStr = getTicket(code);
response.sendRedirect(jumpto+"?code="+code+"&ticketStr="+ticketStr);
}catch (Exception e){
logger.error("ddSSOCallback error",e);
}
}
/**
* 18/03/2019 20:46
* 跨站cookie的问题,所以做了一次跳转
* [code, ticketStr, request, response]
* @author Gary J Li
* @return
*/
@RequestMapping(value = {"/sso/accept"})
public String accept(@RequestParam(value = "code") String code,
@RequestParam(value = "ticketStr") String ticketStr,HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
StringBuffer url = request.getRequestURL();
String tempContextUrl = url.delete(url.length() - request.getRequestURI().length(), url.length()).append("/").toString();
try{
Cookie codeCookie = new Cookie("ddCode",URLEncoder.encode(code, "UTF-8")); Cookie codeCookie = new Cookie("ddCode",URLEncoder.encode(code, "UTF-8"));
codeCookie.setPath("/"); codeCookie.setPath("/");
codeCookie.setMaxAge(18000);
Cookie ddTicket = new Cookie("ddTicket",URLEncoder.encode(ticketStr, "UTF-8")); Cookie ddTicket = new Cookie("ddTicket",URLEncoder.encode(ticketStr, "UTF-8"));
ddTicket.setPath("/"); ddTicket.setPath("/");
Cookie jumptoCookie = new Cookie("ddJumpto",URLEncoder.encode(jumpto, "UTF-8")); ddTicket.setMaxAge(18000);
jumptoCookie.setPath("/");
response.addCookie(codeCookie); response.addCookie(codeCookie);
response.addCookie(jumptoCookie);
response.addCookie(ddTicket); response.addCookie(ddTicket);
}catch (Exception e){ }catch (Exception e){
logger.error("ddSSOCallback error",e); logger.error("ddSSOCallback error",e);
} }
return "redirect:"+tempContextUrl+"Account/LogOn";
return "redirect:/Account/LogOn";
} }
@RequestMapping(value = {"/admin", "/admin.html"}, method = RequestMethod.GET) @RequestMapping(value = {"/admin", "/admin.html"}, method = RequestMethod.GET)
......
...@@ -9,7 +9,7 @@ log.level=DEBUG ...@@ -9,7 +9,7 @@ log.level=DEBUG
#didi-config #didi-config
check_ticket=false check_ticket=false
get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/ get_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
app_id=2500 app_id=2500
app_key=983258e7fd04d7fa0534735f7b1c33f3 app_key=983258e7fd04d7fa0534735f7b1c33f3
cookie.maxAgeSeconds=86400 cookie.maxAgeSeconds=86400
\ No newline at end of file
...@@ -10,6 +10,6 @@ jwt.refreshSecond=600 ...@@ -10,6 +10,6 @@ jwt.refreshSecond=600
log.level=DEBUG log.level=DEBUG
#didi-config #didi-config
check_ticket=false check_ticket=false
get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/ get_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
app_id=2500 app_id=2500
app_key=983258e7fd04d7fa0534735f7b1c33f3 app_key=983258e7fd04d7fa0534735f7b1c33f3
...@@ -373,11 +373,11 @@ ...@@ -373,11 +373,11 @@
"InvestmentAmount": "投资金额", "InvestmentAmount": "投资金额",
"InvestmentCurrency": "投资金额币种", "InvestmentCurrency": "投资金额币种",
"InvestmentRadio": "投资比例", "InvestmentRadio": "投资比例",
"PayableShareholderName": "实缴股东名称", "PayableShareholderName": "实缴投资方信息",
"PayableShareholderIdNum": "实缴股东证件编号", "PayableShareholderIdNum": "证件编号",
"PayableCapitalContributionAmount": "实缴出资金额", "PayableCapitalContributionAmount": "实缴投资方金额",
"PayableCapitalContributionCurrency": "实缴出资币种", "PayableCapitalContributionCurrency": "实缴投资方币种",
"PayableContributionProportion": "实缴出资比例", "PayableContributionProportion": "实缴投资方出资比例",
"TotalInvestment": "出资总额", "TotalInvestment": "出资总额",
"HoldingInstitution": "控股机构", "HoldingInstitution": "控股机构",
"TaxRegistrationInformation": "税务登记信息", "TaxRegistrationInformation": "税务登记信息",
......
...@@ -2979,9 +2979,11 @@ ...@@ -2979,9 +2979,11 @@
orgTotal: data.length, orgTotal: data.length,
amountTotal: amountTotal, amountTotal: amountTotal,
proportionTotal: proportionTotal proportionTotal: proportionTotal
} };
if($scope.EquitySumInfo.proportionTotal!==100){ if($scope.EquitySumInfo.proportionTotal!==100){
$scope.isNotHundred=true; $scope.isNotHundred=true;
}else{
$scope.isNotHundred=false;
} }
} else { } else {
SweetAlert.warning($translate.instant('NoEquityInfo')); SweetAlert.warning($translate.instant('NoEquityInfo'));
......
...@@ -30,11 +30,11 @@ ...@@ -30,11 +30,11 @@
$scope.showTotalSecondRow = false; $scope.showTotalSecondRow = false;
$scope.importExcelFileUrlList = { $scope.importExcelFileUrlList = {
taxData : apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile', taxData : apiInterceptor.webApiHostUrl + '/Analysis/InternationalExcelFile',
returnTax : apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile', returnTax : apiInterceptor.webApiHostUrl + '/Analysis/InternationalExcelFile',
gmvSubsidy : apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile', gmvSubsidy : apiInterceptor.webApiHostUrl + '/Analysis/InternationalExcelFile',
employeeNum : apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile', employeeNum : apiInterceptor.webApiHostUrl + '/Analysis/InternationalExcelFile',
driverNum : apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile' driverNum : apiInterceptor.webApiHostUrl + '/Analysis/InternationalExcelFile'
}; };
$scope.maxTitleLength = constant.maxButtonTitleLength; $scope.maxTitleLength = constant.maxButtonTitleLength;
...@@ -205,6 +205,8 @@ ...@@ -205,6 +205,8 @@
Upload.upload({ Upload.upload({
url: url, url: url,
data: { data: {
companyName :$scope.selectCompany,
country : $scope.selectCountry,
period: period, period: period,
type: $scope.importType type: $scope.importType
}, },
......
...@@ -33,6 +33,7 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', ' ...@@ -33,6 +33,7 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', '
// 保存股权 // 保存股权
$scope.saveEquity = function () { $scope.saveEquity = function () {
$scope.equityControlForm.$setSubmitted();
var rows = $scope.equityListInstance.getVisibleRows(); var rows = $scope.equityListInstance.getVisibleRows();
var updateEquity = []; var updateEquity = [];
for (var i = 0; i < rows.length; i++) { for (var i = 0; i < rows.length; i++) {
......
...@@ -113,8 +113,8 @@ webservices.factory('dataImportService', ['$http', 'apiConfig', function ($http, ...@@ -113,8 +113,8 @@ webservices.factory('dataImportService', ['$http', 'apiConfig', function ($http,
/***************************************cit services end**************************************************************/ /***************************************cit services end**************************************************************/
/***************************************call ApiServices start**************************************************************/ /***************************************call ApiServices start**************************************************************/
callExtractFinancialData: function (orgIds, period,dataTypes) { callExtractFinancialData: function (param) {
return $http.post('/DataImport/callExtractFinancialData',{ orgIds: orgIds, period: period,dataTypes:dataTypes }, apiConfig.create()); return $http.post('/DataImport/callExtractFinancialData',param, apiConfig.create());
}, },
callExtractInvoiceData: function (orgIds, period,dataTypes) { callExtractInvoiceData: function (orgIds, period,dataTypes) {
return $http.post('/DataImport/callExtractInvoiceData', { orgIds: orgIds, period: period,dataTypes:dataTypes }, apiConfig.create()); return $http.post('/DataImport/callExtractInvoiceData', { orgIds: orgIds, period: period,dataTypes:dataTypes }, apiConfig.create());
......
...@@ -107,7 +107,13 @@ ...@@ -107,7 +107,13 @@
//导入事件 //导入事件
var callFinancialApi = function () { var callFinancialApi = function () {
var periodStr = $scope.UploadPeriodTime; var periodStr = $scope.UploadPeriodTime;
dataImportService.callExtractFinancialData($scope.checkedCompanyCodeList,periodStr,$scope.checkedFileCodeList).success(function (data) { var param = {
orgIds: $scope.checkedCompanyCodeList,
period: periodStr,
dataTypes: $scope.checkedFileCodeList
};
dataImportService.callExtractFinancialData(param).success(function (data) {
if (data) { if (data) {
getFinancialDataStatus(); getFinancialDataStatus();
} }
......
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