Commit 867bf355 authored by zhkwei's avatar zhkwei

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

parents d78e0abc 07b735d8
...@@ -94,15 +94,15 @@ public class TaxDocumentController { ...@@ -94,15 +94,15 @@ public class TaxDocumentController {
headers.put("CompanyName", "公司名称"); headers.put("CompanyName", "公司名称");
headers.put("TaxType", "税种"); headers.put("TaxType", "税种");
headers.put("FileTime", "文件生效日期"); headers.put("FileTime", "文件生效日期");
headers.put("EffectiveTime", "有效日期"); headers.put("OwnTime", "所属期间");
headers.put("Creator", "创建人"); headers.put("EffectiveTime", "到期日");
headers.put("CreateTime", "创建时间"); headers.put("AuditStatus", "审批状态");
headers.put("UploadTime", "上传日期"); headers.put("PhysicalIndexNumber", "实物索引号");
headers.put("StorageArea", "实物存放地点"); headers.put("StorageArea", "实物存放地点");
headers.put("Keeper", "保管人"); headers.put("Keeper", "保管人");
headers.put("UploadTime", "上传日期");
headers.put("Creator", "创建人");
headers.put("Remark", "档案备注"); headers.put("Remark", "档案备注");
headers.put("FilePositionUrl", "文件存储的位置");
headers.put("OwnTime", "所属期间");
List<TaxDocument> TaxDocument = taxDocumentService.selectTaxDocumentList(taxDocumentDto); List<TaxDocument> TaxDocument = taxDocumentService.selectTaxDocumentList(taxDocumentDto);
response.setContentType("multipart/form-data"); response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("taxDocument.xlsx".getBytes("GB2312"), "ISO-8859-1")); response.setHeader("Content-Disposition", "attachment;fileName=" + new String("taxDocument.xlsx".getBytes("GB2312"), "ISO-8859-1"));
......
...@@ -20,8 +20,8 @@ public class CurrentPeriodBo { ...@@ -20,8 +20,8 @@ public class CurrentPeriodBo {
public static CurrentPeriodBo getPeriod(int parameterPeriod, int periodContent) { public static CurrentPeriodBo getPeriod(int parameterPeriod, int periodContent) {
int yearOffset = 0; int yearOffset = 0;
if (parameterPeriod == -99) { if (parameterPeriod == 99) {
return new CurrentPeriodBo(parameterPeriod); return new CurrentPeriodBo(periodContent);
} else if (parameterPeriod <= -1) { } else if (parameterPeriod <= -1) {
Integer period = parameterPeriod + periodContent; Integer period = parameterPeriod + periodContent;
while (period <= 0) { while (period <= 0) {
......
package pwc.taxtech.atms.security.dd; package pwc.taxtech.atms.security.dd;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -6,12 +7,8 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -6,12 +7,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import pwc.taxtech.atms.exception.ServiceException; import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.service.impl.ProjectServiceImpl; import pwc.taxtech.atms.service.impl.ProjectServiceImpl;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
//import org.apache.tomcat.util.codec.binary.Base64;
import javax.crypto.Cipher; import javax.crypto.Cipher;
import java.security.KeyFactory; import java.security.KeyFactory;
import java.security.PublicKey; import java.security.PublicKey;
import java.security.spec.X509EncodedKeySpec; import java.security.spec.X509EncodedKeySpec;
...@@ -20,6 +17,7 @@ import java.text.SimpleDateFormat; ...@@ -20,6 +17,7 @@ import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.TimeZone; import java.util.TimeZone;
/** /**
* @Auther: Gary J Li * @Auther: Gary J Li
* @Date: 20/03/2019 20:41 * @Date: 20/03/2019 20:41
...@@ -47,11 +45,9 @@ public class DtsTokenService { ...@@ -47,11 +45,9 @@ public class DtsTokenService {
* @throws * @throws
*/ */
public String encryptInput(){ public String encryptInput(){
BASE64Encoder base64 = new BASE64Encoder();
BASE64Decoder base64Decoder = new BASE64Decoder();
byte[] encodeData; byte[] encodeData;
try { try {
byte[] publicKey = base64Decoder.decodeBuffer(pubKey); byte[] publicKey = Base64.decodeBase64(pubKey);
String nonce = generateNonce(); String nonce = generateNonce();
String sDate = generateDate(); String sDate = generateDate();
long rNum = generateRandomNumber(); long rNum = generateRandomNumber();
...@@ -59,12 +55,12 @@ public class DtsTokenService { ...@@ -59,12 +55,12 @@ public class DtsTokenService {
byte[] data1 = inputStr1.getBytes(); byte[] data1 = inputStr1.getBytes();
logger.debug("原文:" + inputStr1); logger.debug("原文:" + inputStr1);
encodeData = encryptByPublicKey(data1, publicKey); encodeData = encryptByPublicKey(data1, publicKey);
logger.debug("公钥加密后:" + base64.encode(encodeData)); logger.debug("公钥加密后:" + Base64.encodeBase64String(encodeData));
} catch (Exception ex) { } catch (Exception ex) {
throw new ServiceException("cus" + ex); throw new ServiceException("cus" + ex);
} }
return base64.encode(encodeData); return Base64.encodeBase64String(encodeData);
} }
......
...@@ -474,8 +474,10 @@ public class TaxDocumentServiceImpl { ...@@ -474,8 +474,10 @@ public class TaxDocumentServiceImpl {
throw new RuntimeException("传入参数错误:空参数数组"); throw new RuntimeException("传入参数错误:空参数数组");
} }
criteria.andIdIn(ids); criteria.andIdIn(ids);
//查询出根据条件过滤后需要下载的附件数据信息
List<TaxDocument> taxDocuments = taxDocumentMapper.selectByExample(example); List<TaxDocument> taxDocuments = taxDocumentMapper.selectByExample(example);
//新建一个空集合,记录下载的名字,并用于判断是否重名,重名则修改名字为(n)
List<String> fileNameList = new ArrayList<>();
for (TaxDocument item : taxDocuments) { for (TaxDocument item : taxDocuments) {
//文件url //文件url
String urlPath = item.getFilePositionUrl(); String urlPath = item.getFilePositionUrl();
...@@ -483,10 +485,23 @@ public class TaxDocumentServiceImpl { ...@@ -483,10 +485,23 @@ public class TaxDocumentServiceImpl {
if (StringUtils.isBlank(urlPath)) { if (StringUtils.isBlank(urlPath)) {
throw new RuntimeException("文件url为空,id为:" + item.getId()); throw new RuntimeException("文件url为空,id为:" + item.getId());
} }
//文件名称(带后缀) 文件名前+7位uuid截取码以防文件名相同 //检查文件名是否有重复
String fileName = StringUtils.isBlank(item.getFileName()) int fileNameRepeatTimes = 0;
if (fileNameList.size()>0){
fileNameRepeatTimes = Collections.frequency(fileNameList, item.getFileName());
}
String fileName;
if (fileNameRepeatTimes > 0) {
fileName = StringUtils.isBlank(item.getFileName())
? "未知文件(请修改后缀名).xlsx"
: "(" + fileNameRepeatTimes + ")" + item.getFileName();
} else {
//文件名称(带后缀
fileName = StringUtils.isBlank(item.getFileName())
? "未知文件(请修改后缀名).xlsx" ? "未知文件(请修改后缀名).xlsx"
: item.getFileName(); : item.getFileName();
}
fileNameList.add(item.getFileName());
InputStream is = null; InputStream is = null;
BufferedInputStream in = null; BufferedInputStream in = null;
byte[] buffer = new byte[1024]; byte[] buffer = new byte[1024];
......
package pwc.taxtech.atms.vat.service.impl.report.functions; package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.poi.ss.formula.OperationEvaluationContext; import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.WorkbookEvaluator; import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.*; import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction; import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -18,7 +19,6 @@ import pwc.taxtech.atms.exception.FormulaException; ...@@ -18,7 +19,6 @@ import pwc.taxtech.atms.exception.FormulaException;
import pwc.taxtech.atms.vat.entity.PeriodCellData; import pwc.taxtech.atms.vat.entity.PeriodCellData;
import pwc.taxtech.atms.vat.entity.PeriodDataSource; import pwc.taxtech.atms.vat.entity.PeriodDataSource;
import java.lang.reflect.Field;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -76,14 +76,14 @@ public class BB extends FunctionBase implements FreeRefFunction { ...@@ -76,14 +76,14 @@ public class BB extends FunctionBase implements FreeRefFunction {
nullCellDto.fixedWithGroup(cellTemplateData); nullCellDto.fixedWithGroup(cellTemplateData);
// todo: fix datasource name by templateList(neo) // todo: fix datasource name by templateList(neo)
if (curPeriod.getCurPeriod() == -99) { if (bo.getPeriod().intValue() == 99) {
dataSource.clear(); dataSource.clear();
BigDecimal returnEval = defaultBigDecimal; BigDecimal returnEval = defaultBigDecimal;
if (formulaContext.getPeriod() <= 1) { if (formulaContext.getPeriod() <= 1) {
return defaultBigDecimal; return defaultBigDecimal;
} }
//如果是当年取到当期截至,往年取12期
for (int p = 1; p < formulaContext.getPeriod(); p++) { for (int p = 1; p < (curPeriod.getCurYear()==formulaContext.getYear()?formulaContext.getPeriod():12); p++) {
try { try {
returnEval = returnEval.add(bb(new BBParasBo(bo, p, curPeriod.getCurYear()), ec, dataSource, bo)); returnEval = returnEval.add(bb(new BBParasBo(bo, p, curPeriod.getCurYear()), ec, dataSource, bo));
} catch (Exception e) { } catch (Exception e) {
...@@ -94,7 +94,8 @@ public class BB extends FunctionBase implements FreeRefFunction { ...@@ -94,7 +94,8 @@ public class BB extends FunctionBase implements FreeRefFunction {
} }
return returnEval; return returnEval;
} else if (bo.getPeriod().intValue() == 0) { }
if (bo.getPeriod().intValue() == 0 && bo.getYear().intValue() == 0) {
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode()); int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
cellValue = getCellValue(index, ec, formulaContext, agent, bo.getRowIndex() - 1, bo.getColumnIndex() - 1, cellValue = getCellValue(index, ec, formulaContext, agent, bo.getRowIndex() - 1, bo.getColumnIndex() - 1,
Long.parseLong(cellTemplateData.getCellTemplateId())); Long.parseLong(cellTemplateData.getCellTemplateId()));
......
...@@ -41,7 +41,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction { ...@@ -41,7 +41,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
segment5 = getStringParam(args[4], ec);//利润中心代码 segment5 = getStringParam(args[4], ec);//利润中心代码
} }
String segment6 = null; String segment6 = null;
if(!(args[4] instanceof MissingArgEval)){ if(!(args[5] instanceof MissingArgEval)){
segment6 = getStringParam(args[5], ec);//产品代码 segment6 = getStringParam(args[5], ec);//产品代码
} }
String formulaExpression = "DFFS(\"" + code + "\"," + year + "," + period + "," String formulaExpression = "DFFS(\"" + code + "\"," + year + "," + period + ","
...@@ -103,7 +103,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction { ...@@ -103,7 +103,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5); c1.andSegment5EqualTo(segment5);
} }
if(StringUtils.isNotBlank(segment6)){ if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6); c1.andSegment6EqualTo(segment6);
} }
List<TrialBalance> list = SpringContextUtil.trialBalanceMapper.selectByExample(glBalanceExample); List<TrialBalance> list = SpringContextUtil.trialBalanceMapper.selectByExample(glBalanceExample);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
...@@ -138,7 +138,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction { ...@@ -138,7 +138,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5); c1.andSegment5EqualTo(segment5);
} }
if(StringUtils.isNotBlank(segment6)){ if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6); c1.andSegment6EqualTo(segment6);
} }
List<AdjustmentTable> list = SpringContextUtil.adjustmentTableMapper.selectByExample(glBalanceExample); List<AdjustmentTable> list = SpringContextUtil.adjustmentTableMapper.selectByExample(glBalanceExample);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
...@@ -173,7 +173,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction { ...@@ -173,7 +173,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5); c1.andSegment5EqualTo(segment5);
} }
if(StringUtils.isNotBlank(segment6)){ if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6); c1.andSegment6EqualTo(segment6);
} }
List<TrialBalanceFinal> list = SpringContextUtil.trialBalanceFinalMapper.selectByExample(glBalanceExample); List<TrialBalanceFinal> list = SpringContextUtil.trialBalanceFinalMapper.selectByExample(glBalanceExample);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
......
...@@ -41,7 +41,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction { ...@@ -41,7 +41,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
segment5 = getStringParam(args[4], ec);//利润中心代码 segment5 = getStringParam(args[4], ec);//利润中心代码
} }
String segment6 = null; String segment6 = null;
if(!(args[4] instanceof MissingArgEval)){ if(!(args[5] instanceof MissingArgEval)){
segment6 = getStringParam(args[5], ec);//产品代码 segment6 = getStringParam(args[5], ec);//产品代码
} }
...@@ -102,7 +102,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction { ...@@ -102,7 +102,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5); c1.andSegment5EqualTo(segment5);
} }
if(StringUtils.isNotBlank(segment6)){ if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6); c1.andSegment6EqualTo(segment6);
} }
List<TrialBalance> list = SpringContextUtil.trialBalanceMapper.selectByExample(example); List<TrialBalance> list = SpringContextUtil.trialBalanceMapper.selectByExample(example);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
...@@ -136,7 +136,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction { ...@@ -136,7 +136,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5); c1.andSegment5EqualTo(segment5);
} }
if(StringUtils.isNotBlank(segment6)){ if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6); c1.andSegment6EqualTo(segment6);
} }
List<AdjustmentTable> list = SpringContextUtil.adjustmentTableMapper.selectByExample(example); List<AdjustmentTable> list = SpringContextUtil.adjustmentTableMapper.selectByExample(example);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
...@@ -170,7 +170,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction { ...@@ -170,7 +170,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
c1.andSegment5EqualTo(segment5); c1.andSegment5EqualTo(segment5);
} }
if(StringUtils.isNotBlank(segment6)){ if(StringUtils.isNotBlank(segment6)){
c1.andSegment5EqualTo(segment6); c1.andSegment6EqualTo(segment6);
} }
List<TrialBalanceFinal> list = SpringContextUtil.trialBalanceFinalMapper.selectByExample(example); List<TrialBalanceFinal> list = SpringContextUtil.trialBalanceFinalMapper.selectByExample(example);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
......
package pwc.taxtech.atms.vat.service.impl.report.functions; package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.commons.collections.CollectionUtils;
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;
...@@ -7,13 +8,11 @@ import org.apache.poi.ss.formula.eval.ValueEval; ...@@ -7,13 +8,11 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction; import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType; import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType; import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto; import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.dto.vatdto.TaxCellDataSourceDto; import pwc.taxtech.atms.dto.vatdto.TaxCellDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.WPNAMEParasBo; import pwc.taxtech.atms.dto.vatdto.WPNAMEParasBo;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.FormulaException; import pwc.taxtech.atms.exception.FormulaException;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -57,7 +56,10 @@ public class WPNAME extends FunctionBase implements FreeRefFunction { ...@@ -57,7 +56,10 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
//根据目标列+名称定位数据行,再根据参数列+数据行定位sheet单元格 //根据目标列+名称定位数据行,再根据参数列+数据行定位sheet单元格
cellTemplateDataList = agent.getCellTemplateByNameAndIndex(formulaContext.getReportTemplateGroupId(), cellTemplateDataList = agent.getCellTemplateByNameAndIndex(formulaContext.getReportTemplateGroupId(),
formulaContext.getProjectId(), bo.getReportCode(), bo.getRowColumnIndex()-1,bo.getRowName(), bo.getColumnIndex() - 1, formulaContext.getPeriod()); formulaContext.getProjectId(), bo.getReportCode(), bo.getRowColumnIndex()-1,bo.getRowName(), bo.getColumnIndex() - 1, formulaContext.getPeriod());
MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL); // MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
if(CollectionUtils.isEmpty(cellTemplateDataList)){
return cellValue;
}
cellTemplateData = cellTemplateDataList.get(0); cellTemplateData = cellTemplateDataList.get(0);
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode()); int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), bo.getColumnIndex()-1, cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), bo.getColumnIndex()-1,
......
...@@ -8,17 +8,14 @@ import org.apache.poi.ss.formula.eval.ValueEval; ...@@ -8,17 +8,14 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction; import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType; import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto; import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto; import pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.WPTYPEParasBo; import pwc.taxtech.atms.dto.vatdto.WPTYPEParasBo;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.FormulaException; import pwc.taxtech.atms.exception.FormulaException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
public class WPTYPE extends FunctionBase implements FreeRefFunction { public class WPTYPE extends FunctionBase implements FreeRefFunction {
...@@ -61,7 +58,10 @@ public class WPTYPE extends FunctionBase implements FreeRefFunction { ...@@ -61,7 +58,10 @@ public class WPTYPE extends FunctionBase implements FreeRefFunction {
cellTemplateDataList = agent.getCellTemplateGroupDto(formulaContext.getReportTemplateGroupId(), cellTemplateDataList = agent.getCellTemplateGroupDto(formulaContext.getReportTemplateGroupId(),
formulaContext.getProjectId(), bo.getReportCode(), ec.getRowIndex(), ec.getColumnIndex(), formulaContext.getPeriod()); formulaContext.getProjectId(), bo.getReportCode(), ec.getRowIndex(), ec.getColumnIndex(), formulaContext.getPeriod());
} }
MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL); // MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
if(CollectionUtils.isEmpty(cellTemplateDataList)){
return cellValue;
}
for (CellTemplatePerGroupDto cellTemplateData : cellTemplateDataList) { for (CellTemplatePerGroupDto cellTemplateData : cellTemplateDataList) {
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode()); int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
BigDecimal curCellVal = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), bo.getColumnIndex() - 1, BigDecimal curCellVal = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), bo.getColumnIndex() - 1,
......
...@@ -45,8 +45,8 @@ log.level=INFO ...@@ -45,8 +45,8 @@ log.level=INFO
log.debug=false log.debug=false
env_type=pub env_type=pub
file_upload_post_url=http://100.69.238.155:8000/resource/erp_tax_system file_upload_post_url=http://10.88.128.214:8000/resource/erp_tax_system
file_upload_query_url=http://100.69.238.155:8001/resource/erp_tax_system file_upload_query_url=http://10.88.128.214:8001/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=true check_ticket=true
...@@ -59,18 +59,18 @@ org_sync_token=174af08f ...@@ -59,18 +59,18 @@ org_sync_token=174af08f
dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ== dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ==
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts ebs_call_url=http://172.20.3.109:8020/ebs-proxy-test/dts
#tableau config #tableau config
tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s
tableau_unreturned_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_unreturned_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_tax_comparison=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_other_countries=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Others?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_cost_analysis=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_profit_and_loss=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_other_domestic_data=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_doc_situation=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet40?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/InternationalOverview?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/sheet8?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/sheet8?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/sheet8?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
...@@ -2,7 +2,6 @@ package pwc.taxtech.atms.service.impl; ...@@ -2,7 +2,6 @@ package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.assertj.core.util.Lists; import org.assertj.core.util.Lists;
import org.junit.Test; import org.junit.Test;
...@@ -12,7 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -12,7 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import pwc.taxtech.atms.CommonIT; import pwc.taxtech.atms.CommonIT;
import pwc.taxtech.atms.common.AuthUserHelper; import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.common.schedule.OrgSyncJob;
import pwc.taxtech.atms.common.util.BaseThreadFactory; import pwc.taxtech.atms.common.util.BaseThreadFactory;
import pwc.taxtech.atms.common.util.DateUtils; import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.common.util.HttpUtil; import pwc.taxtech.atms.common.util.HttpUtil;
...@@ -30,8 +28,6 @@ import pwc.taxtech.atms.entity.*; ...@@ -30,8 +28,6 @@ import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.exception.ServiceException; import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.security.dd.DtsTokenService; import pwc.taxtech.atms.security.dd.DtsTokenService;
import pwc.taxtech.atms.service.EbsApiService; import pwc.taxtech.atms.service.EbsApiService;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.crypto.Cipher; import javax.crypto.Cipher;
...@@ -712,11 +708,9 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -712,11 +708,9 @@ public class EbsApiServiceImplTest extends CommonIT {
public String encryptInput(){ public String encryptInput(){
BASE64Encoder base64 = new BASE64Encoder();
BASE64Decoder base64Decoder = new BASE64Decoder();
byte[] encodeData; byte[] encodeData;
try { try {
byte[] publicKey = base64Decoder.decodeBuffer("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ=="); byte[] publicKey = org.apache.commons.codec.binary.Base64.decodeBase64("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ==");
String nonce = generateNonce(); String nonce = generateNonce();
String sDate = generateDate(); String sDate = generateDate();
long rNum = generateRandomNumber(); long rNum = generateRandomNumber();
...@@ -724,12 +718,11 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -724,12 +718,11 @@ public class EbsApiServiceImplTest extends CommonIT {
byte[] data1 = inputStr1.getBytes(); byte[] data1 = inputStr1.getBytes();
logger.debug("原文:" + inputStr1); logger.debug("原文:" + inputStr1);
encodeData = encryptByPublicKey(data1, publicKey); encodeData = encryptByPublicKey(data1, publicKey);
logger.debug("公钥加密后:" + base64.encode(encodeData));
} catch (Exception ex) { } catch (Exception ex) {
throw new ServiceException("cus" + ex); throw new ServiceException("cus" + ex);
} }
return base64.encode(encodeData); return org.apache.commons.codec.binary.Base64.encodeBase64String(encodeData);
} }
...@@ -737,7 +730,7 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -737,7 +730,7 @@ public class EbsApiServiceImplTest extends CommonIT {
private String generateNonce() throws Exception { private String generateNonce() throws Exception {
String dateTimeString = Long.toString(System.currentTimeMillis()); String dateTimeString = Long.toString(System.currentTimeMillis());
byte[] nonceByte = dateTimeString.getBytes(); byte[] nonceByte = dateTimeString.getBytes();
return Base64.encodeBase64String(nonceByte); return Base64.getEncoder().encodeToString(nonceByte);
} }
private String generateDate() throws Exception { private String generateDate() throws Exception {
......
...@@ -11,7 +11,6 @@ import java.lang.annotation.Target; ...@@ -11,7 +11,6 @@ import java.lang.annotation.Target;
/** /**
* The <code>ExcelCell</code><br> * The <code>ExcelCell</code><br>
* 数值型的栏位只能使用Double * 数值型的栏位只能使用Double
* @see {@link pwc.taxtech.atms.thirdparty.sargeraswang.util.ExcelUtil.ExcelUtil#exportExcel}
* @author sargeras.wang * @author sargeras.wang
* @version 1.0, Created at 2013年9月14日 * @version 1.0, Created at 2013年9月14日
* @version 1.1, Updated at 2013年10月20日 ,添加了专用于验证的子注解:Valid * @version 1.1, Updated at 2013年10月20日 ,添加了专用于验证的子注解:Valid
...@@ -83,5 +82,14 @@ public @interface ExcelCell { ...@@ -83,5 +82,14 @@ public @interface ExcelCell {
* @return le * @return le
*/ */
double le() default Double.NaN; double le() default Double.NaN;
} }
/**
* 如果有状态 或 int类型转换为String
* 可通过此注解转换为String
* 格式: 中间用逗号 , 隔开
* 例 0:待审核,1:审核通过,-1:已拒绝
* @return
*/
String isStatus() default StringUtils.EMPTY;
} }
...@@ -147,7 +147,7 @@ public class FileTypes implements Serializable { ...@@ -147,7 +147,7 @@ public class FileTypes implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=9) @ExcelCell(index=9,isStatus = "0:停用,1:启用")
private String status; private String status;
/** /**
......
...@@ -140,7 +140,7 @@ public class TaxDocument implements Serializable { ...@@ -140,7 +140,7 @@ public class TaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=9) @ExcelCell(index=10)
private Date effectiveTime; private Date effectiveTime;
/** /**
...@@ -152,7 +152,7 @@ public class TaxDocument implements Serializable { ...@@ -152,7 +152,7 @@ public class TaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=17) @ExcelCell(index=9)
private Integer ownTime; private Integer ownTime;
/** /**
...@@ -173,7 +173,7 @@ public class TaxDocument implements Serializable { ...@@ -173,7 +173,7 @@ public class TaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=10) @ExcelCell(index=16)
private String creator; private String creator;
/** /**
...@@ -183,7 +183,6 @@ public class TaxDocument implements Serializable { ...@@ -183,7 +183,6 @@ public class TaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=11)
private Date createTime; private Date createTime;
/** /**
...@@ -204,7 +203,7 @@ public class TaxDocument implements Serializable { ...@@ -204,7 +203,7 @@ public class TaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=12) @ExcelCell(index=15)
private Date uploadTime; private Date uploadTime;
/** /**
...@@ -249,6 +248,7 @@ public class TaxDocument implements Serializable { ...@@ -249,6 +248,7 @@ public class TaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=12)
private String physicalIndexNumber; private String physicalIndexNumber;
/** /**
...@@ -260,7 +260,7 @@ public class TaxDocument implements Serializable { ...@@ -260,7 +260,7 @@ public class TaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=15) @ExcelCell(index=17)
private String remark; private String remark;
/** /**
...@@ -283,7 +283,6 @@ public class TaxDocument implements Serializable { ...@@ -283,7 +283,6 @@ public class TaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=16)
private String filePositionUrl; private String filePositionUrl;
/** /**
...@@ -317,6 +316,7 @@ public class TaxDocument implements Serializable { ...@@ -317,6 +316,7 @@ public class TaxDocument implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
@ExcelCell(index=11,isStatus = "0:未审核,1:审核通过,-1:审核不通过")
private Integer auditStatus; private Integer auditStatus;
/** /**
......
...@@ -33,7 +33,12 @@ ...@@ -33,7 +33,12 @@
<insert id="insertBatch" parameterType="java.util.List"> <insert id="insertBatch" parameterType="java.util.List">
insert into invoice_record insert into invoice_record
(<include refid="Base_Column_List"/>) (id, organization_id, project_id, tms_period, period, seq_no, `source`, billing_body,
customer_company_name, invoice_type, billing_content, invoice_amount, applicant,
oa_application_num, contract_no, contract_amount, department, application_date, billing_date,
billing_month, invoice_code, invoice_num, invoices_amount, customer_company_tax_num,
contract_source_system, tax_rate, tax_amount, invoice_status, remarks, create_time,
update_time)
values values
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
......
...@@ -850,5 +850,7 @@ ...@@ -850,5 +850,7 @@
"TBEBITForm":"TB EBIT Form", "TBEBITForm":"TB EBIT Form",
"ClickEnsureTip": "Click Ensure Button!", "ClickEnsureTip": "Click Ensure Button!",
"ConditionColumnNum": "Search Condition Column Num",
"Condition": "Search Condition",
"RevenueTypeConfiguration":"Revenue Type Config" "RevenueTypeConfiguration":"Revenue Type Config"
} }
...@@ -909,6 +909,7 @@ ...@@ -909,6 +909,7 @@
"true": "是", "true": "是",
"false": "否", "false": "否",
"ConditionColumnNum": "条件列",
"Condition": "查询条件",
"~MustBeEndOneApp": "I Must be the End One, please!" "~MustBeEndOneApp": "I Must be the End One, please!"
} }
...@@ -8,6 +8,7 @@ frameworkModule.controller('appUsrOperateLogController', ...@@ -8,6 +8,7 @@ frameworkModule.controller('appUsrOperateLogController',
// thisTitle:"@", // thisTitle:"@",
// thisParams:"=", // thisParams:"=",
$scope.localData = null; $scope.localData = null;
$scope.loadMainData = function () { $scope.loadMainData = function () {
$scope.thisModuleId = $scope.thisModuleId ? $scope.thisModuleId : []; $scope.thisModuleId = $scope.thisModuleId ? $scope.thisModuleId : [];
var config = { var config = {
...@@ -23,7 +24,17 @@ frameworkModule.controller('appUsrOperateLogController', ...@@ -23,7 +24,17 @@ frameworkModule.controller('appUsrOperateLogController',
$scope.dataGridUpdate(data); $scope.dataGridUpdate(data);
}) })
}; };
// $scope.sniffHelpPopRadio = function(){
// taxDocumentListService.getDocumentsAttrAndType({params: {}}).then(function (data) {
// $scope.FileAttrAndTypeCache = data.items;
// //根据文件属性来匹配出 文件类型下拉列表
// $scope.syncFileType($scope.editFieldModel.fileAttr);
// $scope.editFieldModel.fileType = checkedItem.getAttribute("data-fileType");
// $scope.syncRequiredFields($scope.editFieldModel);
// });
//
// $("#helpPopDialog").modal("hide");
// };
// comment: "767" // comment: "767"
// createTime: "2019-01-28T11:38:31.000+08:00" // createTime: "2019-01-28T11:38:31.000+08:00"
// id: "1" // id: "1"
...@@ -88,6 +99,19 @@ frameworkModule.controller('appUsrOperateLogController', ...@@ -88,6 +99,19 @@ frameworkModule.controller('appUsrOperateLogController',
dataField: "id", dataField: "id",
caption: $translate.instant('LogIndex'), caption: $translate.instant('LogIndex'),
allowHeaderFiltering: true, allowHeaderFiltering: true,
cellTemplate: function (container, options) {
var target = $('<span data-name="logCheckedItem" type="checkbox" ' +
'data-id="' + options.data.id + '" ' +
'>' + options.data.id + '</span>');
container.append(target);
var table = $("#appUsrLogTable").find("table");
$(table).off("click").on("click",function(e){
var target = $(e.target);
if(target.parents("tr").length)
target.parents("tr").find("td").toggleClass('log-export-checked-item');
})
}
}, },
{ {
dataField: "createTime", dataField: "createTime",
...@@ -173,8 +197,19 @@ frameworkModule.directive('usrLogExportPlugin',function(){ ...@@ -173,8 +197,19 @@ frameworkModule.directive('usrLogExportPlugin',function(){
function($scope,SweetAlert,$translate,usrOperateLogService,$q,$log){ function($scope,SweetAlert,$translate,usrOperateLogService,$q,$log){
$scope.exportTableData = function () $scope.exportTableData = function ()
{ {
var checkedItems = $(".log-export-checked-item");
usrOperateLogService[$scope.thisModuleName + "Export"]().then(function (data, status, headers) { var ids = [];
if(checkedItems.length)
checkedItems.find("span[data-name='logCheckedItem']")
.each(function(index,checkedItem){
var idLike = checkedItem.getAttribute('data-id');
if(idLike || idLike == 0){
ids.push(idLike);
}
});
usrOperateLogService[$scope.thisModuleName + "Export"]({
"ids":ids
}).then(function (data, status, headers) {
if(status===204){ if(status===204){
SweetAlert.warning("没有数据可以下载"); SweetAlert.warning("没有数据可以下载");
return; return;
......
...@@ -10,6 +10,12 @@ ...@@ -10,6 +10,12 @@
.log-export-btn:hover{ .log-export-btn:hover{
background: #E6E6E6; background: #E6E6E6;
} }
/*事件样式,只发生在事件触发期间,用important影响不大*/
td.log-export-checked-item{
background: #337ab7 !important;
color: #fff !important;
}
</style> </style>
<button class="btn btn-not-important" ng-click="openUsrOperateLogPop()"><i class="material-icons">description</i><span translate="log">日志</span></button> <button class="btn btn-not-important" ng-click="openUsrOperateLogPop()"><i class="material-icons">description</i><span translate="log">日志</span></button>
<script type="text/html" id="usrOperateLogPopContainer"> <script type="text/html" id="usrOperateLogPopContainer">
...@@ -30,7 +36,7 @@ ...@@ -30,7 +36,7 @@
<!--</div>--> <!--</div>-->
<!--<div ui-grid="operateLogGridOptions" ui-grid-selection style="width:1140px; height:510px;margin:0px;"></div>--> <!--<div ui-grid="operateLogGridOptions" ui-grid-selection style="width:1140px; height:510px;margin:0px;"></div>-->
<div class="dx-viewport demo-container"> <div class="dx-viewport demo-container" id="appUsrLogTable">
<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>
......
...@@ -12,22 +12,22 @@ frameworkModule.factory('usrOperateLogService', ...@@ -12,22 +12,22 @@ frameworkModule.factory('usrOperateLogService',
docManageListLog: function (params) { docManageListLog: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/operLogTaxDoc/selectListForLog', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/operLogTaxDoc/selectListForLog', params);
}, },
docManageListLogExport:function(){ docManageListLogExport:function(params){
$('#busy-indicator-container').show(); $('#busy-indicator-container').show();
return exportFn(apiInterceptor.webApiHostUrl + '/operLogTaxDoc/exportExcel'); return exportFn(apiInterceptor.webApiHostUrl + '/operLogTaxDoc/exportExcel',params);
}, },
docManageTypeLogExport:function(){ docManageTypeLogExport:function(params){
$('#busy-indicator-container').show(); $('#busy-indicator-container').show();
return exportFn(apiInterceptor.webApiHostUrl + '/operLogFileTypes/exportExcel'); return exportFn(apiInterceptor.webApiHostUrl + '/operLogFileTypes/exportExcel',params);
// http://etms.longi-silicon.com:8180//api/v1/operLogFileTypes/exportExcel // http://etms.longi-silicon.com:8180//api/v1/operLogFileTypes/exportExcel
} }
}; };
function exportFn(url) { function exportFn(url,params) {
var defer = $q.defer(); var defer = $q.defer();
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
...@@ -41,7 +41,7 @@ frameworkModule.factory('usrOperateLogService', ...@@ -41,7 +41,7 @@ frameworkModule.factory('usrOperateLogService',
xhr.setRequestHeader("Authorization", apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()); xhr.setRequestHeader("Authorization", apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken());
xhr.setRequestHeader("Content-Type", 'application/json;charset=UTF-8'); xhr.setRequestHeader("Content-Type", 'application/json;charset=UTF-8');
xhr.responseType = "arraybuffer"; xhr.responseType = "arraybuffer";
xhr.send(); xhr.send(JSON.stringify(params));
return defer.promise; return defer.promise;
} }
......
...@@ -1610,11 +1610,15 @@ taxDocumentManageModule.directive('tempModule', function () { ...@@ -1610,11 +1610,15 @@ taxDocumentManageModule.directive('tempModule', function () {
} }
}); });
taxDocumentListService.getCompanyNameOptions().then(function (data) { taxDocumentListService.getCompanyNameOptions().then(function(res){
// console.log(data); if (res && 0 === res.code) {
if (data) { angular.forEach(res.data, function (item) {
$scope.companyNameOptionsMap = data; $scope.companyNameOptionsMap[item.id]=item.name;
});
} else {
SweetAlert.error($translate.instant('RevenueGetOrgError'));
} }
}); });
}; };
$scope.loadSelectMap(); $scope.loadSelectMap();
......
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