Commit 4ab5fa76 authored by zhkwei's avatar zhkwei

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 66363940 ca1a6046
package pwc.taxtech.atms.common;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/**
* author kevin
* target : Solve ThousandConvert
* version 1.0
*/
public class ThousandConvert extends JsonSerializer<BigDecimal> {
@Override
public void serialize(BigDecimal value, JsonGenerator jgen, SerializerProvider arg2)
throws IOException {
jgen.writeString(NumberFormat.getIntegerInstance(Locale.getDefault()).format(value));
}
}
...@@ -37,6 +37,8 @@ public class SystemConfig { ...@@ -37,6 +37,8 @@ public class SystemConfig {
private String tableauAustralianTax; private String tableauAustralianTax;
@Value("${tableau_brazilian_tax}") @Value("${tableau_brazilian_tax}")
private String tableauBrazilianTax; private String tableauBrazilianTax;
@Value("${tableau_dashboard}")
private String tableauDashboard;
public String getLongiApiBasicUser() { public String getLongiApiBasicUser() {
return this.longiApiBasicUser; return this.longiApiBasicUser;
...@@ -157,4 +159,12 @@ public class SystemConfig { ...@@ -157,4 +159,12 @@ public class SystemConfig {
public void setTableauBrazilianTax(String tableauBrazilianTax) { public void setTableauBrazilianTax(String tableauBrazilianTax) {
this.tableauBrazilianTax = tableauBrazilianTax; this.tableauBrazilianTax = tableauBrazilianTax;
} }
public String getTableauDashboard() {
return this.tableauDashboard;
}
public void setTableauDashboard(String tableauDashboard) {
this.tableauDashboard = tableauDashboard;
}
} }
...@@ -83,4 +83,10 @@ public class TableauController extends BaseController { ...@@ -83,4 +83,10 @@ public class TableauController extends BaseController {
return ApiResultDto.success(tableauService.getBrazilianTax().orElse(StringUtils.EMPTY)); return ApiResultDto.success(tableauService.getBrazilianTax().orElse(StringUtils.EMPTY));
} }
@ResponseBody
@GetMapping("dashboard")
public ApiResultDto getDashboard() {
return ApiResultDto.success(tableauService.getBrazilianTax().orElse(StringUtils.EMPTY));
}
} }
...@@ -9,14 +9,18 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -9,14 +9,18 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.DateUtil; import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.POIUtil;
import pwc.taxtech.atms.common.PageResultVo; import pwc.taxtech.atms.common.PageResultVo;
import pwc.taxtech.atms.common.util.DateUtils; import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.FileUploadEnum; import pwc.taxtech.atms.constant.enums.FileUploadEnum;
...@@ -24,6 +28,7 @@ import pwc.taxtech.atms.dpo.OrgSelectDto; ...@@ -24,6 +28,7 @@ import pwc.taxtech.atms.dpo.OrgSelectDto;
import pwc.taxtech.atms.dto.TaxDocumentDto; import pwc.taxtech.atms.dto.TaxDocumentDto;
import pwc.taxtech.atms.entity.TaxDocument; import pwc.taxtech.atms.entity.TaxDocument;
import pwc.taxtech.atms.service.impl.DidiFileUploadService; import pwc.taxtech.atms.service.impl.DidiFileUploadService;
import pwc.taxtech.atms.service.impl.HttpFileService;
import pwc.taxtech.atms.service.impl.OrganizationServiceImpl; import pwc.taxtech.atms.service.impl.OrganizationServiceImpl;
import pwc.taxtech.atms.service.impl.TaxDocumentServiceImpl; import pwc.taxtech.atms.service.impl.TaxDocumentServiceImpl;
import pwc.taxtech.atms.thirdparty.ExcelUtil; import pwc.taxtech.atms.thirdparty.ExcelUtil;
...@@ -48,6 +53,8 @@ public class TaxDocumentController { ...@@ -48,6 +53,8 @@ public class TaxDocumentController {
private DidiFileUploadService didiFileUploadService; private DidiFileUploadService didiFileUploadService;
@Autowired @Autowired
private OrganizationServiceImpl organizationService; private OrganizationServiceImpl organizationService;
@Autowired
HttpFileService httpFileService;
@PostMapping("selectList") @PostMapping("selectList")
@ResponseBody @ResponseBody
public PageResultVo<TaxDocument> selectTaxDocumentList(@RequestBody TaxDocumentDto taxDocumentDto) { public PageResultVo<TaxDocument> selectTaxDocumentList(@RequestBody TaxDocumentDto taxDocumentDto) {
...@@ -394,4 +401,38 @@ public class TaxDocumentController { ...@@ -394,4 +401,38 @@ public class TaxDocumentController {
dataArray.add(sheetJson); dataArray.add(sheetJson);
} }
} }
@RequestMapping(value = "/convertExcel", method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public void convertExcel(HttpServletResponse response,String url){
InputStream is = null;
Workbook tWorkbook = null;
Workbook workbook = new XSSFWorkbook();
OutputStream ouputStream = null;
try{
is = httpFileService.getUserTemplate(url);
tWorkbook = WorkbookFactory.create(is);
for(int i = 1;i<tWorkbook.getNumberOfSheets();i++){
POIUtil.cloneSheet(tWorkbook.getSheetAt(i), workbook.createSheet(tWorkbook.getSheetAt(i).getSheetName()));
}
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("test.xlsx".getBytes("GB2312"), "ISO-8859-1"));
ouputStream = response.getOutputStream();
workbook.write(ouputStream);
}catch (Exception e){
e.printStackTrace();
}finally {
try {
if (ouputStream != null) {
ouputStream.close();
}
if(is!=null){
is.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
} }
package pwc.taxtech.atms.dto.analysis; package pwc.taxtech.atms.dto.analysis;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.ThousandConvert;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
...@@ -11,16 +14,17 @@ public class AnalysisTaxDto { ...@@ -11,16 +14,17 @@ public class AnalysisTaxDto {
private String companyName; private String companyName;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment1; private BigDecimal segment1;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment2; private BigDecimal segment2;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment3; private BigDecimal segment3;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment4; private BigDecimal segment4;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment5; private BigDecimal segment5;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment6; private BigDecimal segment6;
public String getCompanyName() { public String getCompanyName() {
......
...@@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
...@@ -197,18 +198,19 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -197,18 +198,19 @@ public class AnalysisServiceImpl extends BaseService {
} }
public OperationResultDto importDomesitcExcelFile(MultipartFile file, String periodDate, Integer type) { public OperationResultDto importDomesitcExcelFile(MultipartFile file, String periodDate, Integer type) {
StringBuilder notOrgMatch = new StringBuilder();
switch (type) { switch (type) {
case 0: case 0:
importAnalysisTaxExcelFile(file, periodDate); notOrgMatch = importAnalysisTaxExcelFile(file, periodDate);
break; break;
case 1: case 1:
importAnalysisReturnTaxExcelFile(file, periodDate); notOrgMatch = importAnalysisReturnTaxExcelFile(file, periodDate);
break; break;
case 2: case 2:
importAnalysisGMVSubsidyExcelFile(file, periodDate); importAnalysisGMVSubsidyExcelFile(file, periodDate);
break; break;
case 3: case 3:
importAnalysisEmployeeNumExcelFile(file, periodDate); notOrgMatch = importAnalysisEmployeeNumExcelFile(file, periodDate);
break; break;
case 4: case 4:
importAnalysisDriverNumExcelFile(file, periodDate); importAnalysisDriverNumExcelFile(file, periodDate);
...@@ -216,7 +218,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -216,7 +218,7 @@ public class AnalysisServiceImpl extends BaseService {
default: default:
break; break;
} }
return OperationResultDto.success(); return OperationResultDto.success(notOrgMatch);
} }
public OperationResultDto importInterNationalExcelFile(MultipartFile file, String periodDate, Integer type, public OperationResultDto importInterNationalExcelFile(MultipartFile file, String periodDate, Integer type,
...@@ -237,7 +239,9 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -237,7 +239,9 @@ public class AnalysisServiceImpl extends BaseService {
private String[] headerArr = null; private String[] headerArr = null;
private void importAnalysisTaxExcelFile(MultipartFile file, String periodDate) { private StringBuilder importAnalysisTaxExcelFile(MultipartFile file, String periodDate) {
StringBuilder notMatchOrg = new StringBuilder();
List orgNotList = Lists.newArrayList();
try { try {
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream); Workbook workbook = WorkbookFactory.create(inputStream);
...@@ -263,7 +267,8 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -263,7 +267,8 @@ public class AnalysisServiceImpl extends BaseService {
example.createCriteria().andNameEqualTo(companyName); example.createCriteria().andNameEqualTo(companyName);
List<Organization> orgs = organizationMapper.selectByExample(example); List<Organization> orgs = organizationMapper.selectByExample(example);
if (orgs.isEmpty()) { if (orgs.isEmpty()) {
break; orgNotList.add(j + 1);
continue;
} }
for (int k = 1; k < sheet.getRow(0).getLastCellNum(); k++) { for (int k = 1; k < sheet.getRow(0).getLastCellNum(); k++) {
AnalysisTax model = getAnalysisTax(selectedPer, sheet, k, j, orgs.get(0)); AnalysisTax model = getAnalysisTax(selectedPer, sheet, k, j, orgs.get(0));
...@@ -284,6 +289,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -284,6 +289,7 @@ public class AnalysisServiceImpl extends BaseService {
} catch (Exception e) { } catch (Exception e) {
throw new ServiceException(e); throw new ServiceException(e);
} }
return notMatchOrg.append(orgNotList + "机构匹配失败");
} }
private AnalysisTax getAnalysisTax(Integer period, Sheet sheet, int k, int j, Organization org) { private AnalysisTax getAnalysisTax(Integer period, Sheet sheet, int k, int j, Organization org) {
...@@ -326,7 +332,9 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -326,7 +332,9 @@ public class AnalysisServiceImpl extends BaseService {
} }
private void importAnalysisReturnTaxExcelFile(MultipartFile file, String periodDate) { private StringBuilder importAnalysisReturnTaxExcelFile(MultipartFile file, String periodDate) {
StringBuilder notMatchOrg = new StringBuilder();
List orgNotList = Lists.newArrayList();
try { try {
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream); Workbook workbook = WorkbookFactory.create(inputStream);
...@@ -351,7 +359,8 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -351,7 +359,8 @@ public class AnalysisServiceImpl extends BaseService {
example.createCriteria().andNameEqualTo(companyName); example.createCriteria().andNameEqualTo(companyName);
List<Organization> orgs = organizationMapper.selectByExample(example); List<Organization> orgs = organizationMapper.selectByExample(example);
if (orgs.isEmpty()) { if (orgs.isEmpty()) {
break; orgNotList.add(j + 1);
continue;
} }
for (int k = 1; k < sheet.getRow(0).getLastCellNum(); k++) { for (int k = 1; k < sheet.getRow(0).getLastCellNum(); k++) {
AnalysisActualTaxReturn model = getAnalysisActualTaxReturn(selectedPer, sheet, k, j, orgs.get(0)); AnalysisActualTaxReturn model = getAnalysisActualTaxReturn(selectedPer, sheet, k, j, orgs.get(0));
...@@ -373,6 +382,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -373,6 +382,7 @@ public class AnalysisServiceImpl extends BaseService {
} catch (Exception e) { } catch (Exception e) {
throw new ServiceException(e); throw new ServiceException(e);
} }
return notMatchOrg.append(orgNotList + "行匹配失败");
} }
private AnalysisActualTaxReturn getAnalysisActualTaxReturn(Integer period, Sheet sheet, int k, int j, Organization org) { private AnalysisActualTaxReturn getAnalysisActualTaxReturn(Integer period, Sheet sheet, int k, int j, Organization org) {
...@@ -387,7 +397,9 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -387,7 +397,9 @@ public class AnalysisServiceImpl extends BaseService {
return model; return model;
} }
private void importAnalysisEmployeeNumExcelFile(MultipartFile file, String periodDate) { private StringBuilder importAnalysisEmployeeNumExcelFile(MultipartFile file, String periodDate) {
StringBuilder notMatchOrg = new StringBuilder();
List orgNotList = Lists.newArrayList();
try { try {
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream); Workbook workbook = WorkbookFactory.create(inputStream);
...@@ -409,7 +421,17 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -409,7 +421,17 @@ public class AnalysisServiceImpl extends BaseService {
if (null == cell1 || StringUtils.isEmpty(getCellStringValue(cell1))) { if (null == cell1 || StringUtils.isEmpty(getCellStringValue(cell1))) {
continue; continue;
} }
model.setCompanyName(getCellStringValue(sheet.getRow(j).getCell(0)));
//进行机构验证
String companyName = getCellStringValue(sheet.getRow(j).getCell(0));
OrganizationExample example1 = new OrganizationExample();
example1.createCriteria().andNameEqualTo(companyName);
List<Organization> orgs = organizationMapper.selectByExample(example1);
if (orgs.isEmpty()) {
orgNotList.add(j + 1);
continue;
}
model.setCompanyName(companyName);
try { try {
model.setSeqNo(getSeqNoByPeriod(getOrgByCompanyName(getCellStringValue(sheet.getRow(j).getCell(0))).getId(), selectedPer)); model.setSeqNo(getSeqNoByPeriod(getOrgByCompanyName(getCellStringValue(sheet.getRow(j).getCell(0))).getId(), selectedPer));
} catch (Exception e) { } catch (Exception e) {
...@@ -447,9 +469,11 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -447,9 +469,11 @@ public class AnalysisServiceImpl extends BaseService {
e.printStackTrace(); e.printStackTrace();
throw new ServiceException(e); throw new ServiceException(e);
} }
return notMatchOrg.append(orgNotList + "行匹配失败");
} }
private void importAnalysisGMVSubsidyExcelFile(MultipartFile file, String periodDate) { private void importAnalysisGMVSubsidyExcelFile(MultipartFile file, String periodDate) {
try { try {
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream); Workbook workbook = WorkbookFactory.create(inputStream);
...@@ -719,7 +743,6 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -719,7 +743,6 @@ public class AnalysisServiceImpl extends BaseService {
public HttpServletResponse downloadDomesticFile(HttpServletResponse response, AnalysisDomesticlParam param, String fileName) { public HttpServletResponse downloadDomesticFile(HttpServletResponse response, AnalysisDomesticlParam param, String fileName) {
String excelTemplatePathInClassPath = EnumAnalysisExpTempPath.getPath(param.getType()); String excelTemplatePathInClassPath = EnumAnalysisExpTempPath.getPath(param.getType());
List<Object> datas = displayAnalysisImportData(param); List<Object> datas = displayAnalysisImportData(param);
try { try {
if (datas.size() < 1) { if (datas.size() < 1) {
throw new Exception("无可导出的数据"); throw new Exception("无可导出的数据");
......
...@@ -113,4 +113,10 @@ public class TableauService extends BaseService { ...@@ -113,4 +113,10 @@ public class TableauService extends BaseService {
return optional.map(s -> String.format(systemConfig.getTableauBrazilianTax(), return optional.map(s -> String.format(systemConfig.getTableauBrazilianTax(),
getTicket(s).orElse(StringUtils.EMPTY))); getTicket(s).orElse(StringUtils.EMPTY)));
} }
public Optional<String> getDashboard() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauDashboard(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
} }
...@@ -311,16 +311,9 @@ public class TaxDocumentServiceImpl { ...@@ -311,16 +311,9 @@ public class TaxDocumentServiceImpl {
public boolean editFilesType(TaxDocument taxDocument) { public boolean editFilesType(TaxDocument taxDocument) {
try { try {
//更新上传时间和文件名称
TaxDocumentExample taxDocumentExample = new TaxDocumentExample();
taxDocumentExample.createCriteria().andFileNameEqualTo(taxDocument.getFileName());
List<TaxDocument> list = taxDocumentMapper.selectByExample(taxDocumentExample);
if (list.size() > 0) {
return false;
}
taxDocument.setUpdateTime(new Date()); taxDocument.setUpdateTime(new Date());
taxDocument.setUploadTime(new Date());
int num = taxDocumentMapper.updateByPrimaryKey(taxDocument); int num = taxDocumentMapper.updateByPrimaryKey(taxDocument);
if (num > 0) { if (num > 0) {
OperationLogTaxDocument actionEntity = buildOperationLogTaxDocument(); OperationLogTaxDocument actionEntity = buildOperationLogTaxDocument();
......
...@@ -231,8 +231,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -231,8 +231,7 @@ public class ReportServiceImpl extends BaseService {
return operationResult; return operationResult;
} }
private void clearPeriodData(String projectId, Integer period, List<Long> templateIds, boolean isMergeManualData) { private void clearPeriodData(String projectId, Integer period, boolean isMergeManualData) {
if (templateIds.isEmpty()) templateIds.add(Long.MAX_VALUE);
PeriodFormulaBlockExample periodFormulaBlockExample = new PeriodFormulaBlockExample(); PeriodFormulaBlockExample periodFormulaBlockExample = new PeriodFormulaBlockExample();
periodFormulaBlockExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period); periodFormulaBlockExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodFormulaBlockMapper.deleteByExample(periodFormulaBlockExample); periodFormulaBlockMapper.deleteByExample(periodFormulaBlockExample);
...@@ -242,15 +241,15 @@ public class ReportServiceImpl extends BaseService { ...@@ -242,15 +241,15 @@ public class ReportServiceImpl extends BaseService {
periodTaxRuleSettingMapper.deleteByExample(periodTaxRuleSettingExample); periodTaxRuleSettingMapper.deleteByExample(periodTaxRuleSettingExample);
PeriodCellTemplateExample periodCellTemplateExample = new PeriodCellTemplateExample(); PeriodCellTemplateExample periodCellTemplateExample = new PeriodCellTemplateExample();
periodCellTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andReportTemplateIdNotIn(templateIds); periodCellTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodCellTemplateMapper.deleteByExample(periodCellTemplateExample); periodCellTemplateMapper.deleteByExample(periodCellTemplateExample);
PeriodCellTemplateConfigExample periodCellTemplateConfigExample = new PeriodCellTemplateConfigExample(); PeriodCellTemplateConfigExample periodCellTemplateConfigExample = new PeriodCellTemplateConfigExample();
periodCellTemplateConfigExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andReportTemplateIdNotIn(templateIds); periodCellTemplateConfigExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodCellTemplateConfigMapper.deleteByExample(periodCellTemplateConfigExample); periodCellTemplateConfigMapper.deleteByExample(periodCellTemplateConfigExample);
PeriodTemplateExample periodTemplateExample = new PeriodTemplateExample(); PeriodTemplateExample periodTemplateExample = new PeriodTemplateExample();
periodTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andTemplateIdNotIn(templateIds); periodTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodTemplateMapper.deleteByExample(periodTemplateExample); periodTemplateMapper.deleteByExample(periodTemplateExample);
PeriodTaxPayerReportRuleExample periodTaxPayerReportRuleExample = new PeriodTaxPayerReportRuleExample(); PeriodTaxPayerReportRuleExample periodTaxPayerReportRuleExample = new PeriodTaxPayerReportRuleExample();
...@@ -304,12 +303,13 @@ public class ReportServiceImpl extends BaseService { ...@@ -304,12 +303,13 @@ public class ReportServiceImpl extends BaseService {
} }
private void updateConfig(String projectId, Integer period, Boolean isMergeManualData, List<Template> templates, PeriodJob job) { private void updateConfig(String projectId, Integer period, Boolean isMergeManualData, List<Template> templates, PeriodJob job) {
List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate(); //财务报表不删除,这个逻辑用不到,先注释掉
// List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate();
//根据收入类型映射生成开票记录关联数据 //根据收入类型映射生成开票记录关联数据
assembleInvoiceRecord(projectId, period, isMergeManualData); assembleInvoiceRecord(projectId, period, isMergeManualData);
//生成trial_balance_final数据 //生成trial_balance_final数据
assembleTrialBalanceFinal(projectId, period); assembleTrialBalanceFinal(projectId, period);
clearPeriodData(projectId, period, exceptTemplateIds, isMergeManualData); clearPeriodData(projectId, period, isMergeManualData);
copyTemplateAndConfigFromAdmin(projectId, templates, period); copyTemplateAndConfigFromAdmin(projectId, templates, period);
setStatus(job, STATUS_END); setStatus(job, STATUS_END);
periodJobMapper.updateByPrimaryKey(job); periodJobMapper.updateByPrimaryKey(job);
...@@ -373,8 +373,10 @@ public class ReportServiceImpl extends BaseService { ...@@ -373,8 +373,10 @@ public class ReportServiceImpl extends BaseService {
destRecord.setRevenueCofId(map.get(mapping.getContent())); destRecord.setRevenueCofId(map.get(mapping.getContent()));
InvoiceRecordExample recordExample = new InvoiceRecordExample(); InvoiceRecordExample recordExample = new InvoiceRecordExample();
recordExample.createCriteria().andProjectIdEqualTo(projectId) recordExample.createCriteria().andProjectIdEqualTo(projectId)
.andOrganizationIdEqualTo(mapping.getOrgId()).andBillingContentEqualTo(mapping.getContent()). .andOrganizationIdEqualTo(mapping.getOrgId()).andBillingContentEqualTo(mapping.getContent())
andPeriodEqualTo(Integer.valueOf(queryDate.replace("-", ""))); .andTaxRateEqualTo(mapping.getTaxRate())
.andDepartmentEqualTo(mapping.getOuName())
.andPeriodEqualTo(Integer.valueOf(queryDate.replace("-", "")));
invoiceRecordMapper.updateByExampleSelective(destRecord, recordExample); invoiceRecordMapper.updateByExampleSelective(destRecord, recordExample);
} }
} }
...@@ -875,8 +877,8 @@ public class ReportServiceImpl extends BaseService { ...@@ -875,8 +877,8 @@ public class ReportServiceImpl extends BaseService {
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue(0.00); row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue(0.00);
} else if (1 == config.getAccountType()) {//科目 } else if (1 == config.getAccountType()) {//科目
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue( row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue(
"DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")-" "DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",3,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")-"
+ "JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")"); + "JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",3,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")");
} else if (2 == config.getAccountType()) {//手工输入 } else if (2 == config.getAccountType()) {//手工输入
} else { } else {
...@@ -894,9 +896,9 @@ public class ReportServiceImpl extends BaseService { ...@@ -894,9 +896,9 @@ public class ReportServiceImpl extends BaseService {
} else if (3 == config.getTaxBase()) {//手工录入 } else if (3 == config.getTaxBase()) {//手工录入
} else if (4 == config.getTaxBase()) {//借方发生额 } else if (4 == config.getTaxBase()) {//借方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("JFFS(\"" + config.getBaseDrCode() + "\"," + project.getYear() + "," + period + ",1,,)"); row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("JFFS(\"" + config.getBaseDrCode() + "\"," + project.getYear() + "," + period + ",3,,)");
} else if (5 == config.getTaxBase()) {//贷方发生额 } else if (5 == config.getTaxBase()) {//贷方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("DFFS(\"" + config.getBaseCrCode() + "\"," + project.getYear() + "," + period + ",1,,)"); row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("DFFS(\"" + config.getBaseCrCode() + "\"," + project.getYear() + "," + period + ",3,,)");
} else { } else {
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue(""); row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("");
} }
...@@ -932,7 +934,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -932,7 +934,7 @@ public class ReportServiceImpl extends BaseService {
sumStr += cellNum + ","; sumStr += cellNum + ",";
} }
sumStr += "\")"; sumStr += "\")";
sumStr = sumStr.replace(",\")", "\")"); // sumStr = sumStr.replace(",\")", "\")");
sumRow.getCell(entry.getKey()).setCellValue(sumStr); sumRow.getCell(entry.getKey()).setCellValue(sumStr);
} }
......
...@@ -186,13 +186,13 @@ public class DFFS extends FunctionBase implements FreeRefFunction { ...@@ -186,13 +186,13 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
for (TrialBalanceFinal balance : temp) { for (TrialBalanceFinal balance : temp) {
ReportCellDataSourceDto dto = new ReportCellDataSourceDto(); ReportCellDataSourceDto dto = new ReportCellDataSourceDto();
dto.setAmount(balance.getPeriodCr()); dto.setAmount(balance.getPeriodCrBeq());
dto.setPeriod(period); dto.setPeriod(period);
dto.setIsOnlyManualInput(Boolean.FALSE); dto.setIsOnlyManualInput(Boolean.FALSE);
dto.setName(Constant.DataSourceName.ReportDataSource); dto.setName(Constant.DataSourceName.ReportDataSource);
dto.setType(FormulaDataSourceType.Report.getCode()); dto.setType(FormulaDataSourceType.Report.getCode());
contain.add(dto); contain.add(dto);
} }
return temp.stream().mapToDouble(a -> a.getPeriodCr().doubleValue()).sum(); return temp.stream().mapToDouble(a -> a.getPeriodCrBeq().doubleValue()).sum();
} }
} }
...@@ -183,13 +183,13 @@ public class JFFS extends FunctionBase implements FreeRefFunction { ...@@ -183,13 +183,13 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
for (TrialBalanceFinal balance : temp) { for (TrialBalanceFinal balance : temp) {
ReportCellDataSourceDto dto = new ReportCellDataSourceDto(); ReportCellDataSourceDto dto = new ReportCellDataSourceDto();
dto.setAmount(balance.getPeriodDr()); dto.setAmount(balance.getPeriodDrBeq());
dto.setPeriod(period); dto.setPeriod(period);
dto.setIsOnlyManualInput(Boolean.FALSE); dto.setIsOnlyManualInput(Boolean.FALSE);
dto.setName(Constant.DataSourceName.ReportDataSource); dto.setName(Constant.DataSourceName.ReportDataSource);
dto.setType(FormulaDataSourceType.Report.getCode()); dto.setType(FormulaDataSourceType.Report.getCode());
contain.add(dto); contain.add(dto);
} }
return temp.stream().mapToDouble(a -> a.getPeriodDr().doubleValue()).sum(); return temp.stream().mapToDouble(a -> a.getPeriodDrBeq().doubleValue()).sum();
} }
} }
...@@ -52,51 +52,63 @@ public class KPSR extends FunctionBase implements FreeRefFunction { ...@@ -52,51 +52,63 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
private double assembleData(String revenueTypeName, List<OutputInvoiceDataSourceDto> contain, Integer billType, Integer amountType, OperationEvaluationContext ec) { private double assembleData(String revenueTypeName, List<OutputInvoiceDataSourceDto> contain, Integer billType, Integer amountType, OperationEvaluationContext ec) {
String queryDate = formulaContext.getYear() + (formulaContext.getPeriod() < 10 ? ("0" + formulaContext.getPeriod()) : (formulaContext.getPeriod() + "")); String queryDate = formulaContext.getYear() + (formulaContext.getPeriod() < 10 ? ("0" + formulaContext.getPeriod()) : (formulaContext.getPeriod() + ""));
// RevenueTypeMappingExample typeMappingExample = new RevenueTypeMappingExample();
// typeMappingExample.createCriteria().andOrgIdEqualTo(formulaContext.getOrganizationId())
// .andRevenueTypeNameEqualTo(revenueTypeName).andStartDateLessThanOrEqualTo(queryDate)
// .andEndDateGreaterThanOrEqualTo(queryDate);
// List<RevenueTypeMapping> typeMappingList = SpringContextUtil.revenueTypeMappingMapper.selectByExample(typeMappingExample);
// if (CollectionUtils.isEmpty(typeMappingList)) {
// return 0.0;
// }
// List<String> revenueTypes = typeMappingList.stream() // List<String> revenueTypes = typeMappingList.stream()
// .map(o -> o.getRevenueTypeName()).collect(Collectors.toList()); // .map(o -> o.getRevenueTypeName()).collect(Collectors.toList());
RevenueConfigExample configExample = new RevenueConfigExample(); RevenueConfigExample configExample = new RevenueConfigExample();
configExample.createCriteria().andOrgIdEqualTo(formulaContext.getOrganizationId()).andStartDateLessThanOrEqualTo(queryDate) configExample.createCriteria().andOrgIdEqualTo(formulaContext.getOrganizationId()).andStartDateLessThanOrEqualTo(queryDate)
.andEndDateGreaterThanOrEqualTo(queryDate).andNameEqualTo(revenueTypeName); .andEndDateGreaterThanOrEqualTo(queryDate).andNameEqualTo(revenueTypeName).andStatusEqualTo(0);
List<RevenueConfig> configDatas = SpringContextUtil.revenueConfigMapper.selectByExample(configExample); List<RevenueConfig> configDatas = SpringContextUtil.revenueConfigMapper.selectByExample(configExample);
if (CollectionUtils.isEmpty(configDatas)) { if (CollectionUtils.isEmpty(configDatas)) {
return 0.0; return 0.0;
} }
RevenueTypeMappingExample typeMappingExample = new RevenueTypeMappingExample();
typeMappingExample.createCriteria().andOrgIdEqualTo(formulaContext.getOrganizationId())
.andRevenueTypeNameEqualTo(revenueTypeName).andStartDateLessThanOrEqualTo(queryDate)
.andEndDateGreaterThanOrEqualTo(queryDate).andStatusEqualTo(0);
List<RevenueTypeMapping> typeMappingList = SpringContextUtil.revenueTypeMappingMapper.selectByExample(typeMappingExample);
if (CollectionUtils.isEmpty(typeMappingList)) {
return 0.0;
}
List<Long> revenueTypeIds = configDatas.stream() List<Long> revenueTypeIds = configDatas.stream()
.map(o -> o.getId()).collect(Collectors.toList()); .map(o -> o.getId()).collect(Collectors.toList());
List<InvoiceRecord> billDetails = new ArrayList<>(); List<InvoiceRecord> billDetails = new ArrayList<>();
InvoiceRecordExample invoiceRecordExample = null;
InvoiceRecordExample invoiceRecordExample = new InvoiceRecordExample(); for(RevenueTypeMapping typeMapping:typeMappingList){
invoiceRecordExample.createCriteria().andRevenueCofIdIn(revenueTypeIds) invoiceRecordExample = new InvoiceRecordExample();
.andProjectIdEqualTo(formulaContext.getProjectId()) invoiceRecordExample.createCriteria().andRevenueCofIdIn(revenueTypeIds)
.andPeriodEqualTo(Integer.valueOf(queryDate)) .andProjectIdEqualTo(formulaContext.getProjectId())
.andInvoiceTypeEqualTo(InvoiceRecordEnum.InvoiceType.MAPPING.get(billType)); .andPeriodEqualTo(Integer.valueOf(queryDate))
List<InvoiceRecord> billDetails1 = SpringContextUtil.invoiceRecordMapper.selectByExample(invoiceRecordExample); .andTaxRateEqualTo(typeMapping.getTaxRate())
if(CollectionUtils.isNotEmpty(billDetails1)){ .andDepartmentEqualTo(typeMapping.getOuName())
Iterator<InvoiceRecord> iterator = billDetails1.iterator(); .andInvoiceTypeEqualTo(InvoiceRecordEnum.InvoiceType.MAPPING.get(billType));
while (iterator.hasNext()){ List<InvoiceRecord> billDetails1 = SpringContextUtil.invoiceRecordMapper.selectByExample(invoiceRecordExample);
if(iterator.next().getModifyRevenueCofId()!=null){ if(CollectionUtils.isNotEmpty(billDetails1)){
iterator.remove(); Iterator<InvoiceRecord> iterator = billDetails1.iterator();
while (iterator.hasNext()){
if(iterator.next().getModifyRevenueCofId()!=null){
iterator.remove();
}
} }
billDetails.addAll(billDetails1);
}
invoiceRecordExample = new InvoiceRecordExample();
invoiceRecordExample.createCriteria().andModifyRevenueCofIdIn(revenueTypeIds)
.andProjectIdEqualTo(formulaContext.getProjectId())
.andPeriodEqualTo(Integer.valueOf(queryDate))
.andTaxRateEqualTo(typeMapping.getTaxRate())
.andDepartmentEqualTo(typeMapping.getOuName())
.andInvoiceTypeEqualTo(InvoiceRecordEnum.InvoiceType.MAPPING.get(billType));
List<InvoiceRecord> billDetails2 = SpringContextUtil.invoiceRecordMapper.selectByExample(invoiceRecordExample);
if(CollectionUtils.isNotEmpty(billDetails2)){
billDetails.addAll(billDetails2);
} }
billDetails.addAll(billDetails1);
}
invoiceRecordExample = new InvoiceRecordExample();
invoiceRecordExample.createCriteria().andModifyRevenueCofIdIn(revenueTypeIds)
.andProjectIdEqualTo(formulaContext.getProjectId())
.andPeriodEqualTo(Integer.valueOf(queryDate))
.andInvoiceTypeEqualTo(InvoiceRecordEnum.InvoiceType.MAPPING.get(billType));
List<InvoiceRecord> billDetails2 = SpringContextUtil.invoiceRecordMapper.selectByExample(invoiceRecordExample);
if(CollectionUtils.isNotEmpty(billDetails2)){
billDetails.addAll(billDetails2);
} }
for (InvoiceRecord invoiceRecord : billDetails) { for (InvoiceRecord invoiceRecord : billDetails) {
OutputInvoiceDataSourceDto outputInvoiceDataSourceDto = new OutputInvoiceDataSourceDto(); OutputInvoiceDataSourceDto outputInvoiceDataSourceDto = new OutputInvoiceDataSourceDto();
outputInvoiceDataSourceDto.setAmount(FormulaHelper.roundValue(invoiceRecord.getInvoiceAmount(), outputInvoiceDataSourceDto.setAmount(FormulaHelper.roundValue(invoiceRecord.getInvoiceAmount(),
......
package pwc.taxtech.atms.vat.service.impl.report.functions; package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.OperationEvaluationContext; import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.NumberEval; import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.StringEval; import org.apache.poi.ss.formula.eval.StringEval;
...@@ -156,7 +157,10 @@ public class PSUM extends FunctionBase implements FreeRefFunction { ...@@ -156,7 +157,10 @@ public class PSUM extends FunctionBase implements FreeRefFunction {
String[] list = listStr.split(","); String[] list = listStr.split(",");
List<PCell> pCells = new ArrayList<>(list.length); List<PCell> pCells = new ArrayList<>(list.length);
for (String s : list) { for (String s : list) {
pCells.add(getColumnIndex(s)); if(StringUtils.isNotBlank(s)){
pCells.add(getColumnIndex(s));
}
} }
return pCells; return pCells;
} }
......
...@@ -80,4 +80,5 @@ tableau_doc_situation=${tableau_doc_situation} ...@@ -80,4 +80,5 @@ tableau_doc_situation=${tableau_doc_situation}
tableau_global_overview=${tableau_global_overview} tableau_global_overview=${tableau_global_overview}
tableau_mexican_tax=${tableau_mexican_tax} tableau_mexican_tax=${tableau_mexican_tax}
tableau_australian_tax=${tableau_australian_tax} tableau_australian_tax=${tableau_australian_tax}
tableau_brazilian_tax=${tableau_brazilian_tax} tableau_brazilian_tax=${tableau_brazilian_tax}
\ No newline at end of file tableau_dashboard=${tableau_dashboard}
\ No newline at end of file
...@@ -70,3 +70,4 @@ tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_2019 ...@@ -70,3 +70,4 @@ tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_2019
tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_australian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_brazilian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
...@@ -74,3 +74,5 @@ tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_2019 ...@@ -74,3 +74,5 @@ tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_2019
tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_australian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_brazilian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
...@@ -69,3 +69,5 @@ tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_2019 ...@@ -69,3 +69,5 @@ tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_2019
tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_australian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_brazilian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
...@@ -74,4 +74,5 @@ tableau_global_overview=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/ ...@@ -74,4 +74,5 @@ tableau_global_overview=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/
tableau_mexican_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_mexican_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_australian_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_brazilian_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
class="mx-auto d-block" class="mx-auto d-block"
size="130" size="130"
> >
<img src="https://demos.creative-tim.com/vue-material-dashboard/img/marc.aba54d65.jpg"> <img src="../assets/dts-mine.png">
</v-avatar> </v-avatar>
<v-card-text class="text-xs-center"> <v-card-text class="text-xs-center">
<h6 class="category text-gray font-weight-thin mb-9"></h6> <h6 class="category text-gray font-weight-thin mb-9"></h6>
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
clipped-right clipped-right
height="90" height="90"
color="#ffffff" color="#ffffff"
style="border-bottom: 1px solid #dddddd"
> >
<!--<v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon> <!--<v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon>
<v-toolbar-title></v-toolbar-title> <v-toolbar-title></v-toolbar-title>
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
> >
<svg class="icon" aria-hidden="true" ><use <svg class="icon" aria-hidden="true" ><use
:xlink:href="selectedItem.iconName"></use></svg> :xlink:href="selectedItem.iconName"></use></svg>
<span style="vertical-align: middle; margin-left: 10px; font-size:27px" v-text="selectedItem.title"></span> <span style="vertical-align: middle; margin-left: 10px;font-weight:normal; font-size:26px" v-text="selectedItem.title"></span>
<v-icon style="vertical-align: middle;margin-top:5px;float:right;height:28px;width:28px;color:#333333;">menu</v-icon> <v-icon style="vertical-align: middle;margin-top:5px;float:right;height:28px;width:28px;color:#333333;">menu</v-icon>
</span> </span>
......
...@@ -1905,5 +1905,22 @@ var analysisModule = angular.module('app.analysis', ['ui.grid', 'ui.router','ui. ...@@ -1905,5 +1905,22 @@ var analysisModule = angular.module('app.analysis', ['ui.grid', 'ui.router','ui.
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis), resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true sticky: true
}); });
$stateProvider.state({
name: 'analysisDashboard',
url: "/analysis/analysisDashboard",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<analysis-dashboard></analysis-dashboard>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
}]); }]);
\ No newline at end of file
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<!--@Html.AntiForgeryToken()--> <!--@Html.AntiForgeryToken()-->
<div class="wrapper"> <div class="wrapper">
<app-nav></app-nav> <app-nav></app-nav>
<div class="page-wrapper" style="position:relative;overflow-x:hidden;overflow-y:auto;margin-top:55px"> <div class="page-wrapper" style="position:relative;overflow-x:hidden;margin-top:55px">
<div class="main-contents" ui-view></div> <div class="main-contents" ui-view></div>
<div class="data-import-contents" ui-view="importContent"></div><!--style="display: none"--> <div class="data-import-contents" ui-view="importContent"></div><!--style="display: none"-->
</div> </div>
......
{ {
"DocumentAttr":"DocumentAttr", "Document Attribute":"Document Attribute",
"DocumentType":"DocumentType", "Document Type":"Document Type",
"DocumentName":"DocumentName", "Document Name":"Document Name",
"IsRequired":"Is Required", "IsRequired":"Is Required",
"PleaseChecksRequired":"Please Checks Required", "PleaseChecksRequired":"Please Checks Required",
"BusinessLine":"BusinessLine", "Business Line":"Business Line",
"CorporationName":"CorporationName", "Company Name":"Company Name",
"AvailabilityDate":"AvailabilityDate", "Effective_Date":"Effective_Date",
"Duration":"Duration", "Period":"Period",
"DueDate":"DueDate", "Due Date":"Due Date",
"TaxType":"TaxType", "Tax Type":"Tax Type",
"EntityIndex":"EntityIndex", "Storage Index":"Storage Index",
"EntityStorageLocation":"EntityStorageLocation", "Storage Location":"Storage Location",
"EntityCustodian":"EntityCustodian", "Custodian":"Custodian",
"ApprovalStatus":"ApprovalStatus", "Approval Status":"Approval Status",
"ApprovalPass":"ApprovalPass", "ApprovalPass":"ApprovalPass",
"ApprovalReject":"ApprovalReject", "ApprovalReject":"ApprovalReject",
"ApprovalStandby":"ApprovalStandby", "ApprovalStandby":"ApprovalStandby",
"UploadDate":"UploadDate", "Upload Date":"Upload Date",
"Creator":"Creator", "Creator":"Creator",
"Remarks":"Remarks", "Remarks":"Remarks",
"MoreFields":"MoreFields", "More":"More",
"LessFields":"LessFields", "Less":"Less",
"Search":"Search", "Search":"Search",
"Reset":"Reset", "Reset":"Reset",
"Preview":"Preview", "Preview":"Preview",
"DelRecord":"DelRecord", "Delete Record":"Delete Record",
"CreateRecord":"CreateRecord", "Create Record":"Create Record",
"ExportTable":"ExportTable", "Export Record":"Export Record",
"DownloadAttachment":"DownloadAttachment", "Download Attachment":"Download Attachment",
"Log":"Log", "Log":"Log",
"MultiUpload":"MultiUpload", "Multiple File Upload":"Multiple File Upload",
"MultiUploadFailList":"MultiUploadFailList", "MultiUploadFailList":"MultiUploadFailList",
"UnFile":"UnFile", "UnFile":"UnFile",
"UnRecord":"UnRecord", "UnRecord":"UnRecord",
...@@ -44,18 +44,20 @@ ...@@ -44,18 +44,20 @@
"Edited":"Edited", "Edited":"Edited",
"Created":"Created", "Created":"Created",
"CoverConfirm":"CoverConfirm", "CoverConfirm":"CoverConfirm",
"NoData":"NoData", "No Data":"No Data",
"PleaseSelected":"PleaseSelected", "Please Select":"Please Select",
"PleaseType":"PleaseType", "Please Type":"Please Type",
"Tips":"Tips", "Tips":"Tips",
"EntityStorageDescription":"EntityStorageDescription", "EntityStorageDescription":"EntityStorageDescription",
"multiUpload":"multiUpload", "multiUpload":"multiUpload",
"UploadAttach":"UploadAttach", "UploadAttach":"UploadAttach",
"Edit":"Edit", "Edit":"Edit",
"DocumentPath":"DocumentPath", "Document Path":"Document Path",
"PreviewFile":"PreviewFile", "PreviewFile":"PreviewFile",
"UploadSuccessCount":"UploadSuccessCount", "UploadSuccessCount":"UploadSuccessCount",
"UploadFailCount":"UploadFailCount", "UploadFailCount":"UploadFailCount",
"DeleteConfirm":"DeleteConfirm", "Confirm delete":"Confirm delete",
"FileTimeDateRangeError":"FileTimeDateRangeError" "FileTimeDateRangeError":"FileTimeDateRangeError",
"Warning":"Warning",
"Page {0} of {1} ({2} items)":"Page {0} of {1} ({2} items)"
} }
\ No newline at end of file
...@@ -896,17 +896,18 @@ ...@@ -896,17 +896,18 @@
"InternationalDataImport":"国际税数据", "InternationalDataImport":"国际税数据",
"TBEBITForm":"TP EBIT 表格", "TBEBITForm":"TP EBIT 表格",
"ClickEnsureTip": "请点击确定按钮!", "ClickEnsureTip": "请点击确定按钮!",
"MenuUnreturnedTax": "未返还税金分析", "MenuUnreturnedTax": "税负分析",
"MenuTaxComparison": "未返还/返还后税金比较", "MenuTaxComparison": "返还情况",
"MenuCostAnalysis": "费用分析", "MenuCostAnalysis": "费用分析",
"MenuProfitAndLoss": "利润/亏损分析", "MenuProfitAndLoss": "利润分析",
"MenuOtherDomesticData": "其他国内数据", "MenuOtherDomesticData": "个税分析",
"MenuDocSituation": "档案归档情况", "MenuDocSituation": "档案归档情况",
"MenuGlobalOverview": "全球概览", "MenuGlobalOverview": "全球概览",
"MenuMexicanTax": "墨西哥税务分析", "MenuMexicanTax": "墨西哥税务分析",
"MenuAustralianTax": "澳洲税务分析", "MenuAustralianTax": "澳洲税务分析",
"MenuBrazilianTax": "巴西税务分析", "MenuBrazilianTax": "巴西税务分析",
"MenuOtherCountries": "其他国家税务分析", "MenuOtherCountries": "其他国家税务分析",
"MenuDashboard": "Dashboard",
"ApproveCommitted":"审核中", "ApproveCommitted":"审核中",
"ApproveAgreed":"通过", "ApproveAgreed":"通过",
......
{ {
"DocumentAttr":"档案属性", "Document Attribute":"档案属性",
"Document":"档案", "Document":"档案",
"IsRequired":"为必填字段,不能为空,请检查", "IsRequired":"为必填字段,不能为空,请检查",
"PleaseChecksRequired":"请检查必填字段", "PleaseChecksRequired":"请检查必填字段",
"DocumentType":"档案类型", "Document Type":"档案类型",
"DocumentName":"档案名称", "Document Name":"档案名称",
"BusinessLine":"业务线", "Business Line":"业务线",
"CorporationName":"公司名称", "Company Name":"公司名称",
"AvailabilityDate":"文件生效日期", "Effective_Date":"文件生效日期",
"Duration":"所属期间", "Period":"所属期间",
"DueDate":"到期日", "Due Date":"到期日",
"TaxType":"税种", "Tax Type":"税种",
"EntityIndex":"实物索引号", "Storage Index":"实物索引号",
"EntityStorageLocation":"实物存放地点", "Storage Location":"实物存放地点",
"EntityCustodian":"保管人", "Custodian":"保管人",
"ApprovalStatus":"审批状态", "Approval Status":"审批状态",
"ApprovalPass":"审批通过", "ApprovalPass":"审批通过",
"ApprovalReject":"拒绝审批", "ApprovalReject":"拒绝审批",
"ApprovalStandby":"待审批", "ApprovalStandby":"待审批",
"UploadDate":"上传日期", "Upload Date":"上传日期",
"Creator":"创建人", "Creator":"创建人",
"Remarks":"档案备注", "Remarks":"档案备注",
"MoreFields":"查看更多", "More":"查看更多",
"LessFields":"收起", "Less":"收起",
"Search":"查询", "Search":"查询",
"Reset":"重置", "Reset":"重置",
"Preview":"预览", "Preview":"预览",
"DelRecord":"删除记录", "Delete Record":"删除记录",
"CreateRecord":"新建记录", "Create Record":"新建记录",
"ExportTable":"导出列表", "Export Record":"导出列表",
"DownloadAttachment":"下载附件", "Download Attachment":"下载附件",
"Log":"日志", "Log":"日志",
"MultiUpload":"批量上传", "Multiple File Upload":"批量上传",
"MultiUploadFailList":"批量上传失败列表", "MultiUploadFailList":"批量上传失败列表",
"UnFile":"未支持的文件类型", "UnFile":"未支持的文件类型",
"UnRecord":"当前记录没有附件信息", "UnRecord":"当前记录没有附件信息",
...@@ -46,17 +46,19 @@ ...@@ -46,17 +46,19 @@
"Created":"新建成功", "Created":"新建成功",
"CoverConfirm":"当前记录已经存在,是否进行覆盖?", "CoverConfirm":"当前记录已经存在,是否进行覆盖?",
"NoData":"当前无数据可下载", "NoData":"当前无数据可下载",
"PleaseSelected":"请选择", "Please Select":"请选择",
"PleaseType":"请输入", "Please Type":"请输入",
"Tips":"提示讯息", "Tips":"提示讯息",
"EntityStorageDescription":"请将实物档案存放地址精确到某个档案柜", "EntityStorageDescription":"请将实物档案存放地址精确到某个档案柜",
"multiUpload":"批量上传", "multiUpload":"批量上传",
"UploadAttach":"上传附件", "UploadAttach":"上传附件",
"Edit":"编辑", "Edit":"编辑",
"DocumentPath":"档案路径", "Document Path":"档案路径",
"PreviewFile":"预览文件", "PreviewFile":"预览文件",
"UploadSuccessCount":"个档案上传成功:", "UploadSuccessCount":"个档案上传成功:",
"UploadFailCount":"个档案上传失败:", "UploadFailCount":"个档案上传失败:",
"DeleteConfirm":"是否确认删除记录?", "Confirm delete":"是否确认删除记录?",
"FileTimeDateRangeError": "'到期日'不能早于'文件生效日期'" "FileTimeDateRangeError": "'到期日'不能早于'文件生效日期'",
"Warning":"提示",
"Page {0} of {1} ({2} items)":"当前 {0}页 /共 {1}页 ({2} 项)"
} }
\ No newline at end of file
...@@ -780,6 +780,7 @@ ...@@ -780,6 +780,7 @@
"ImportShipmentList": "导入发车清单", "ImportShipmentList": "导入发车清单",
"ImportShipmentListGd": "导入发车清单-GD", "ImportShipmentListGd": "导入发车清单-GD",
"ImportSuccess": "导入成功", "ImportSuccess": "导入成功",
"ImportSuccessCount": "导入成功,验证失败:",
"ImportTrialBalance": "导入试算平衡表", "ImportTrialBalance": "导入试算平衡表",
"ImportTypeTip": "需要清除本月导入的财务数据,是否确认?", "ImportTypeTip": "需要清除本月导入的财务数据,是否确认?",
"Import_AccountMapping": "科目对应", "Import_AccountMapping": "科目对应",
......
analysisModule.controller('AnalysisDashboardController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/dashboard', apiConfig.createVat())
.success(function (res) {
if (res && 0 === res.code) {
var placeholderDiv = document.getElementById('vizContainer');
var url = res.data;
var options = {
onFirstInteractive: function() {
// The viz is now ready and can be safely used.
console.log("Run this code when the viz has finished loading.");
}
};
try{
new tableau.Viz(placeholderDiv, url, options);
}catch (e) {
}
}else {
SweetAlert.error($translate.instant('SystemError'));
}
});
}
init();
(function initialize() {
})();
}
]);
\ No newline at end of file
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('analysisDashboard', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/dashboard/dashboard.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'AnalysisDashboardController',
link: function (scope, element) {
$('.main-contents')[0].style.width = "260px";
$('.data-import-contents')[0].style.display = "block";
$('.main-contents')[0].style.float = "left";
$('.main-contents')[0].style.styleFloat = "left";
$('.main-contents')[0].style.cssFloat = "left";
}
};
}
]);
\ No newline at end of file
@import "~/app-resources/less/theme.less";
\ No newline at end of file
...@@ -71,7 +71,9 @@ ...@@ -71,7 +71,9 @@
</div> </div>
</div> </div>
</form> </form>
<div id="progress">
<div id="progressBarStatus" dx-progress-bar="progressBarOptions"></div>
</div>
<div class="dt-init-wrapper"> <div class="dt-init-wrapper">
<div class="dx-viewport grid-container"> <div class="dx-viewport grid-container">
<div id="taxGridContainer" dx-data-grid="taxGridOptions" <div id="taxGridContainer" dx-data-grid="taxGridOptions"
......
...@@ -206,6 +206,7 @@ ...@@ -206,6 +206,7 @@
withCredentials: true withCredentials: true
}).then(function (resp) { }).then(function (resp) {
var ret = resp.data; var ret = resp.data;
$scope.fileName = '';
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (ret.result) { if (ret.result) {
...@@ -640,6 +641,7 @@ ...@@ -640,6 +641,7 @@
$scope.selectType = i.type; $scope.selectType = i.type;
$scope.showInternationalBUDataGrid = false; $scope.showInternationalBUDataGrid = false;
$scope.showInternationalTaxDataGrid = false; $scope.showInternationalTaxDataGrid = false;
$scope.fileName='';
switch (i.code) { switch (i.code) {
case 100: case 100:
$scope.showInternationalBUDataGrid = true; $scope.showInternationalBUDataGrid = true;
......
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
__RequestVerificationToken: token, __RequestVerificationToken: token,
withCredentials: true withCredentials: true
}).then(function(data) { }).then(function(data) {
$scope.fileName=''; $scope.fileNameShow=false;
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
var resp = data.data; var resp = data.data;
deferred.resolve(); deferred.resolve();
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<i class="fa fa-calendar imp-subheader red-color" style="width:20px;"></i> <i class="fa fa-calendar imp-subheader red-color" style="width:20px;"></i>
</div> </div>
</div> </div>
<div ng-show="fileName" style="display:inline-block"> <div ng-show="fileNameShow" style="display:inline-block">
<span title="{{fileName}}">{{'FileName' | translate}}{{fileName | limitString:20}}</span> <span title="{{fileName}}">{{'FileName' | translate}}{{fileName | limitString:20}}</span>
</div> </div>
<div class="form-group"> <div class="form-group">
......
...@@ -192,6 +192,7 @@ ...@@ -192,6 +192,7 @@
withCredentials: true withCredentials: true
}).then(function(resp) { }).then(function(resp) {
var ret = resp.data; var ret = resp.data;
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (ret.result) { if (ret.result) {
......
...@@ -210,7 +210,6 @@ ...@@ -210,7 +210,6 @@
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
} }
getImportRLITStatus(); getImportRLITStatus();
}, function(resp) { }, function(resp) {
deferred.resolve(); deferred.resolve();
if (resp.statusText === 'HttpRequestValidationException') { if (resp.statusText === 'HttpRequestValidationException') {
......
...@@ -133,7 +133,6 @@ ...@@ -133,7 +133,6 @@
//todo:注册之后这里去掉注释 //todo:注册之后这里去掉注释
//var sheet = spread.getActiveSheet(); //var sheet = spread.getActiveSheet();
var sheet; var sheet;
if (constant.regesterInformation.active) { if (constant.regesterInformation.active) {
sheet = spread.getActiveSheet(); sheet = spread.getActiveSheet();
......
...@@ -1234,6 +1234,5 @@ ...@@ -1234,6 +1234,5 @@
_.extend(scope.selectOrgOptions, exp); _.extend(scope.selectOrgOptions, exp);
}; };
/*-----------------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------------*/
})(window) })(window)
\ No newline at end of file
...@@ -78,7 +78,7 @@ frameworkModule.controller('appUsrOperateLogController', ...@@ -78,7 +78,7 @@ frameworkModule.controller('appUsrOperateLogController',
}, },
pager: { pager: {
allowedPageSizes: 5, allowedPageSizes: 5,
infoText: "当前 {0}页 /共 {1}页 ({2} 项)", infoText:$translate.instant('Page {0} of {1} ({2} items)'),
showInfo: true, showInfo: true,
showNavigationButtons: true, showNavigationButtons: true,
showPageSizeSelector: true, showPageSizeSelector: true,
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<button class="btn log-export-btn" ng-click="exportTableData()"> <button class="btn log-export-btn" ng-click="exportTableData()">
<i class="fa fa-file-excel-o"></i> <i class="fa fa-file-excel-o"></i>
<span translate="ExportTable"></span> <span translate="Export Record"></span>
</button> </button>
<div dx-data-grid="dataGridOptions"></div> <div dx-data-grid="dataGridOptions"></div>
</div> </div>
......
...@@ -134,7 +134,21 @@ taxDocumentManageModule.factory('taxDocumentListService', ...@@ -134,7 +134,21 @@ taxDocumentManageModule.factory('taxDocumentListService',
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/previewExcelToJson', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/previewExcelToJson', params);
}, },
readPDF:function(params){ readPDF:function(params){
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/previewPDF', params); $('#busy-indicator-container').show();
var defer = $q.defer();
var xhr = new XMLHttpRequest();
xhr.onload = function(result) {
if (this.status == 200) {
var blob = this.response;
defer.resolve(blob,xhr.status,xhr.getAllResponseHeaders());
}
};
xhr.open("post", apiInterceptor.webApiHostUrl + "/taxDoc/previewPDF", true);
xhr.setRequestHeader("Authorization", apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken());
xhr.setRequestHeader("Content-Type", 'application/json;charset=UTF-8');
xhr.responseType="blob";
xhr.send(JSON.stringify(params));
return defer.promise;
}, },
getBinaryData:function(url){ getBinaryData:function(url){
var defer = $q.defer(); var defer = $q.defer();
...@@ -169,12 +183,17 @@ taxDocumentManageModule.factory('taxDocumentListService', ...@@ -169,12 +183,17 @@ taxDocumentManageModule.factory('taxDocumentListService',
return defer.promise; return defer.promise;
}, },
viewExcelBySpread:function (url) { viewExcelBySpread:function (fileType,url) {
var deferred = $q.defer(); var deferred = $q.defer();
var promise = deferred.promise; var promise = deferred.promise;
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.open('GET', url, true); // 也可以使用POST方式,根据接口 if("xls"==fileType){
xhr.open('POST', apiInterceptor.webApiHostUrl + '/taxDoc/convertExcel', true);
xhr.setRequestHeader("Authorization", apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken());
}else{
xhr.open('GET', url, true);
}
xhr.responseType = "blob"; // 返回类型blob xhr.responseType = "blob"; // 返回类型blob
// 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑 // 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑
xhr.onload = function () { xhr.onload = function () {
...@@ -193,7 +212,9 @@ taxDocumentManageModule.factory('taxDocumentListService', ...@@ -193,7 +212,9 @@ taxDocumentManageModule.factory('taxDocumentListService',
} }
}; };
// 发送ajax请求 // 发送ajax请求
xhr.send(); var data=new FormData();
data.append("url",url);
xhr.send(data);
return promise; return promise;
} }
}; };
......
.color_active[data-v-1ced4d0d]{color:red!important}.head[data-v-0817fb63]{height:90px;background-color:red}.icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.color_active{color:red!important}
\ No newline at end of file
.color_active[data-v-1ced4d0d]{color:red!important}.head[data-v-579027fe]{height:90px;background-color:red}.icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}
\ No newline at end of file
...@@ -49,4 +49,4 @@ ...@@ -49,4 +49,4 @@
//send 发送 //send 发送
xmlhttp.send(); xmlhttp.send();
}*/</script><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href=font_roboto.css><link rel=stylesheet href=font_material.css><link href=js/about.17654e8a.js rel=prefetch><link href=css/app.8f5ac7e7.css rel=preload as=style><link href=css/chunk-vendors.ce5e3dd4.css rel=preload as=style><link href=js/app.cf3691a6.js rel=preload as=script><link href=js/chunk-vendors.670ff040.js rel=preload as=script><link href=css/chunk-vendors.ce5e3dd4.css rel=stylesheet><link href=css/app.8f5ac7e7.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.670ff040.js></script><script src=js/app.cf3691a6.js></script></body></html> }*/</script><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href=font_roboto.css><link rel=stylesheet href=font_material.css><link href=js/about.17654e8a.js rel=prefetch><link href=css/app.e87f05ce.css rel=preload as=style><link href=css/chunk-vendors.ce5e3dd4.css rel=preload as=style><link href=js/app.6ae9ce65.js rel=preload as=script><link href=js/chunk-vendors.670ff040.js rel=preload as=script><link href=css/chunk-vendors.ce5e3dd4.css rel=stylesheet><link href=css/app.e87f05ce.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.670ff040.js></script><script src=js/app.6ae9ce65.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
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