Commit 4ef494ac authored by gary's avatar gary

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

parents f7c56fc2 4da82e2b
......@@ -10,6 +10,10 @@ import pwc.taxtech.atms.invoice.OutputInvoiceDetailMapper;
import pwc.taxtech.atms.invoice.OutputInvoiceMapper;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.entity.BalanceSheet;
import java.util.HashMap;
import java.util.Map;
//用来获取spring托管的bean
@Component
......@@ -55,6 +59,23 @@ public class SpringContextUtil implements ApplicationContextAware {
public static TrialBalanceMapper trialBalanceMapper;
public static AdjustmentTableMapper adjustmentTableMapper;
public static TrialBalanceFinalMapper trialBalanceFinalMapper;
public static ProfitLossStatementMapper profitLossStatementMapper;
public static CashFlowMapper cashFlowMapper;
public static BalanceSheetManualMapper balanceSheetManualMapper;
public static ProfitLossStatementManualMapper profitLossStatementManualMapper;
public static CashFlowManualMapper cashFlowManualMapper;
public static BalanceSheetFinalMapper balanceSheetFinalMapper;
public static CashFlowFinalMapper cashFlowFinalMapper;
public static CitBalanceSheetPrcAdjustMapper citBalanceSheetPrcAdjustMapper;
public static CitProfitPrcAdjustMapper citProfitPrcAdjustMapper;
public static BalanceSheetMapper balanceSheetMapper;
public static Map map = new HashMap<String, Object>();
/**
* 获取bean
......@@ -111,5 +132,34 @@ public class SpringContextUtil implements ApplicationContextAware {
trialBalanceMapper = webApplicationContext.getBean(TrialBalanceMapper.class);
adjustmentTableMapper = webApplicationContext.getBean(AdjustmentTableMapper.class);
trialBalanceFinalMapper = webApplicationContext.getBean(TrialBalanceFinalMapper.class);
profitLossStatementMapper = webApplicationContext.getBean(ProfitLossStatementMapper.class);
cashFlowMapper = webApplicationContext.getBean(CashFlowMapper.class);
balanceSheetManualMapper = webApplicationContext.getBean(BalanceSheetManualMapper.class);
profitLossStatementManualMapper = webApplicationContext.getBean(ProfitLossStatementManualMapper.class);
cashFlowManualMapper = webApplicationContext.getBean(CashFlowManualMapper.class);
balanceSheetFinalMapper = webApplicationContext.getBean(BalanceSheetFinalMapper.class);
cashFlowFinalMapper = webApplicationContext.getBean(CashFlowFinalMapper.class);
citBalanceSheetPrcAdjustMapper = webApplicationContext.getBean(CitBalanceSheetPrcAdjustMapper.class);
citProfitPrcAdjustMapper = webApplicationContext.getBean(CitProfitPrcAdjustMapper.class);
balanceSheetMapper = webApplicationContext.getBean(BalanceSheetMapper.class);
/* map.put("balance_sheet", balanceMapper);
map.put("profit_loss_statement",profitLossStatementMapper);
map.put("cash_flow", cashFlowMapper);
map.put("balance_sheet_manual", balanceSheetManualMapper);
map.put("profit_loss_statement_manual", profitLossStatementManualMapper);
map.put("cash_flow_manual", cashFlowManualMapper);
map.put("balance_sheet_final", balanceSheetFinalMapper);
map.put("profit_loss_statement_final", profitLossStatementManualMapper);
map.put("cash_flow_final", cashFlowFinalMapper);
map.put("cit_balance_sheet_prc_adjust", citBalanceSheetPrcAdjustMapper);
map.put("cit_profit_prc_adjust", citProfitPrcAdjustMapper);*/
}
}
package pwc.taxtech.atms.common.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @ClassName StringUtil
* Description TODO
* @Author pwc kevin
* @Date 3/11/2019 5:29 PM
* Version 1.0
**/
public class StringUtil {
/**
* 下划线转驼峰法(默认小驼峰)
*
* @param line
* 源字符串
* @param smallCamel
* 大小驼峰,是否为小驼峰(驼峰,第一个字符是大写还是小写)
* @return 转换后的字符串
*/
public static String underline2Camel(String line, boolean ... smallCamel) {
if (line == null || "".equals(line)) {
return "";
}
StringBuffer sb = new StringBuffer();
Pattern pattern = Pattern.compile("([A-Za-z\\d]+)(_)?");
Matcher matcher = pattern.matcher(line);
//匹配正则表达式
while (matcher.find()) {
String word = matcher.group();
//当是true 或则是空的情况
if((smallCamel.length ==0 || smallCamel[0] ) && matcher.start()==0){
sb.append(Character.toLowerCase(word.charAt(0)));
}else{
sb.append(Character.toUpperCase(word.charAt(0)));
}
int index = word.lastIndexOf('_');
if (index > 0) {
sb.append(word.substring(1, index).toLowerCase());
} else {
sb.append(word.substring(1).toLowerCase());
}
}
return sb.toString();
}
/**
* 驼峰法转下划线
*
* @param line
* 源字符串
* @return 转换后的字符串
*/
public static String camel2Underline(String line) {
if (line == null || "".equals(line)) {
return "";
}
line = String.valueOf(line.charAt(0)).toUpperCase()
.concat(line.substring(1));
StringBuffer sb = new StringBuffer();
Pattern pattern = Pattern.compile("[A-Z]([a-z\\d]+)?");
Matcher matcher = pattern.matcher(line);
while (matcher.find()) {
String word = matcher.group();
sb.append(word.toUpperCase());
sb.append(matcher.end() == line.length() ? "" : "_");
}
return sb.toString();
}
/* public static void main(String[] args) {
String line = "are_you_dou_bi_yellowcong";
//下划线转驼峰(大驼峰)
//AreYouDouBiYellowcong
String camel = underline2Camel(line, true);
System.out.println(camel);
//下划线转驼峰(小驼峰)
//areYouDouBiYellowcong
camel = underline2Camel(line);
System.out.println(camel);
//驼峰转下划线
//ARE_YOU_DOU_BI_YELLOWCONG
System.out.println(camel2Underline(camel));
}*/
}
......@@ -4,15 +4,12 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dto.LoginOutputDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.user.UserPasswordDto;
import pwc.taxtech.atms.service.impl.UserAccountServiceImpl;
import pwc.taxtech.atms.vat.service.impl.FormulaAgent;
@RestController
@RequestMapping("/api/v1/Account/")
......@@ -37,4 +34,5 @@ public class AccountController {
logger.debug("enter forgetPassword");
return userAccountService.forgetPassword(mail);
}
}
......@@ -50,8 +50,7 @@ public class TaxDocumentController {
@PostMapping("add")
@ResponseBody
public boolean addTaxDocument(@RequestBody TaxDocument taxDocument,
@RequestPart("file") MultipartFile file,
@RequestParam(required = false) String modual) {
@RequestParam MultipartFile file) {
return taxDocumentService.addTaxDocumentList(file,taxDocument);
}
......
package pwc.taxtech.atms.dto;
import java.util.HashMap;
import java.util.Map;
/**
* @ClassName DataTablesEnum
* Description TODO
* @Author pwc kevin
* @Date 3/11/2019 2:30 PM
* Version 1.0
**/
public class TableRule {
public static Map<String, String> map = new HashMap<String, String>();
static {
map.put("EBSZCFZB", "balance_sheet");
map.put("EBSLRB", "profit_loss_statement");
map.put("EBSXJLLB", "cash_flow");
map.put("RGDRZCFZB", "balance_sheet_manual");
map.put("RGDRLRB", "profit_loss_statement_manual");
map.put("RGDRXJLLB", "cash_flow_manual");
map.put("ZXZCFZB", "balance_sheet_final");
map.put("ZXLLB", "profit_loss_statement_final");
map.put("ZXXJLLB", "cash_flow_final");
map.put("CITZCFZB", "cit_balance_sheet_prc_adjust");
map.put("CITLRB", "cit_profit_prc_adjust");
}
}
......@@ -58,7 +58,7 @@ public class CitReportServiceImpl extends BaseService {
private final static Logger logger = LoggerFactory.getLogger(CitReportServiceImpl.class);
private final static String[] functions = {"SGSR", "FSJZ", "ND", "BB", "XXFP", "GZSD", "PC", "JXFPMX",
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR","WPNAME","WPTYPE"};
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR","WPNAME","WPTYPE", "SUM2", "SUM", "RSUMIF", "TABLESUM2"};
@Autowired
private OrganizationServiceTemplateGroupMapper orgServiceTemplateGroupMapper;
......
......@@ -53,9 +53,13 @@ public class TaxDocumentServiceImpl {
if(CollectionUtils.isNotEmpty(uploadDetail.getList())){
urlMap = uploadDetail.getList().stream().collect(Collectors.toMap(DidiFileUploadDetailResult::getUid, didiFileUploadDetailResult -> didiFileUploadDetailResult.getViewHttpUrl()));
}
for(TaxDocument data:dataList){
data.setFilePositionUrl(urlMap.get(data.getFileUploadId()));
if(urlMap!=null){
for(TaxDocument data:dataList){
data.setFilePositionUrl(urlMap.get(data.getFileUploadId()));
}
}
return dataList;
}
......@@ -87,7 +91,7 @@ public class TaxDocumentServiceImpl {
}
//档案名称 fileName
if (StringUtils.isNotBlank(taxDocumentDto.getFileName())) {
criteria.andFileNameEqualTo(taxDocumentDto.getFileName());
criteria.andFileNameLike(taxDocumentDto.getFileName());
}
//业务线 businessLine
if (StringUtils.isNotBlank(taxDocumentDto.getBusinessLine())) {
......
package pwc.taxtech.atms.vat.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.common.util.StringUtil;
import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dao.FormulaAdminMapper;
import pwc.taxtech.atms.dao.ProjectServiceTypeMapper;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.dpo.GroupId;
import pwc.taxtech.atms.dto.TableRule;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.entity.ProjectServiceType;
import pwc.taxtech.atms.entity.ProjectServiceTypeExample;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.dao.CellDataMapper;
import pwc.taxtech.atms.vat.dao.PeriodCellDataMapper;
import pwc.taxtech.atms.vat.dao.PeriodDataSourceMapper;
import pwc.taxtech.atms.vat.dao.PeriodReportMapper;
import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaContext;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import static pwc.taxtech.atms.constant.Constant.FIRST_OR_DEFAULT;
......@@ -59,6 +63,7 @@ public class FormulaAgent {
/**
* 根据收入类型配置及列index查询报表模板
*
* @param templateGroupId
* @param code
* @param rowColumnIndex
......@@ -85,7 +90,7 @@ public class FormulaAgent {
String orgId,
String startDate,
String endDate) {
return adminMp.getCellTemplateByTypeAndIndex(templateGroupId, projectId,code, rowColumnIndex, taxRate, revenueType, taxType, columnIndex, period, orgId, startDate, endDate);
return adminMp.getCellTemplateByTypeAndIndex(templateGroupId, projectId, code, rowColumnIndex, taxRate, revenueType, taxType, columnIndex, period, orgId, startDate, endDate);
}
public Project getFixedProject(String projectId, Integer year) {
......@@ -132,11 +137,75 @@ public class FormulaAgent {
return cellData;
}
public List<CellTemplatePerGroupDto> getCellDataByPos(Long templateId, Integer period, String cellRow, String cellCol, String projectId){
return adminMp.getCellDataByPos(templateId, period, cellRow, cellCol, projectId);
public List<CellTemplatePerGroupDto> getCellDataByPos(Long templateId, Integer period, String cellRow, String cellCol, String projectId) {
return adminMp.getCellDataByPos(templateId, period, cellRow, cellCol, projectId);
}
public List<CellTemplatePerGroupDto> getTableData(String tableName, String getField, String selectFilter, String year, String selectPeriod) {
return adminMp.getTableData(tableName, getField, selectFilter, year, selectPeriod);
}
public static String buildSql(String tableName, String getField, String filter, String filterValue, Integer period, String year, FormulaContext formulaContext) {
String sql = "";
String[] split = filterValue.split(" ");
String para3 = null;
if (split[0].indexOf(">=") != -1) {
filterValue = "> " + split[1] + "and" + filter + " =" + split[1];
}
if (split[0].indexOf("<=") != -1) {
filterValue = "< " + split[1] + "and" + filter + " =" + split[1];
}
if ("CITZCFZB".equals(tableName) || ("CITLRB".equals(tableName))) {
return _buildSql(getField, tableName, filter, filterValue, period, formulaContext, year, false);
}
return _buildSql(getField, tableName, filter, filterValue, period, formulaContext, year, true);
}
public static String _buildSql(String getField, String tableName, String filter, String filterValue, Integer period, FormulaContext formulaContext, String year, boolean bool) {
String sql = "select " + getField + " from " + tableName + " where 1=1 and " + filter + filterValue;
String _p = "";
if (formulaContext.getPeriod() - period < 10) {
_p = year + "'0" + (formulaContext.getPeriod() - period) + "'";
} else {
_p = year + (formulaContext.getPeriod() - period);
}
if (period == 0) {
sql += " and tms-period = " + formulaContext.getPeriod();
} else if (period == -99) {
sql += "and tms-period between '" + year + "01' and " + (formulaContext.getPeriod() - 1);
} else if (period == 99) {
sql += "and tms-period between '" + year + "01' and " + (formulaContext.getPeriod());
} else {
sql += "and tms-period between " + _p + "and " + (formulaContext.getPeriod() - 1);
}
if (bool) {
sql += " and period = '" + year + period + "'";
}
return sql;
}
@Autowired
JdbcTemplate jdbcTemplate;
public static void main(String[] args) {
System.out.println(buildSql("balance_sheet", "end_bal", "beg_bal", "> 0.00", 201810, "2", null));
;
}
public Long getTableDataByName(String tableName, String getField, String filter, String filterValue, Integer period, String year, FormulaContext formulaContext) {
List<Map<String, Object>> stringObjectMap = jdbcTemplate.queryForList(buildSql(TableRule.map.get(tableName), getField, filter, filterValue, period, year, formulaContext));
Long rev = 0L;
for (int i = 0, j = stringObjectMap.size(); i < j; i++) {
if (i == 1) {
rev = Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
} else {
rev = rev + Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
}
}
return rev;
}
}
......@@ -512,7 +512,8 @@ public class ReportGeneratorImpl {
FreeRefFunction[] functionImpls = {new SGSR(formulaContext), new FSJZ(formulaContext), new ND(formulaContext),
new BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext)
, new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext),new WPNAME(formulaContext),new WPTYPE(formulaContext)};
new JFFS(formulaContext), new WPSR(formulaContext),new WPNAME(formulaContext),new WPTYPE(formulaContext), new SUM2(formulaContext),
new SUM(formulaContext), new RSUMIF(formulaContext), new TABLESUMIF(formulaContext)};
UDFFinder udfs = new DefaultUDFFinder(functions, functionImpls);
UDFFinder udfToolpack = new AggregatingUDFFinder(udfs);
workbook.addToolPack(udfToolpack);
......
......@@ -30,7 +30,7 @@ import static pwc.taxtech.atms.common.util.FormulaUtil.resolverString;
public class RSUMIF extends FunctionBase implements FreeRefFunction {
final static ValueEval defaultEval = new StringEval("0");
static final Logger LOGGER = LoggerFactory.getLogger(BB.class);
static final Logger LOGGER = LoggerFactory.getLogger(RSUMIF.class);
String tableName;
String getField;//取值列字段
Map<String, String> fileterMap = new HashMap<String, String>();
......@@ -53,7 +53,6 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
} catch (Exception e) {
if (e instanceof FormulaException)
LOGGER.warn("Formula Exception || {}", e.getMessage());
e.printStackTrace();
return defaultEval;
}
......@@ -99,7 +98,6 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
fileterMap.put(resolverString(args, ec, i), resolverString(args, ec, i + 1));
}
}
if (period == 0) {
selectPeriod = "t.period = " + formulaContext.getPeriod();
} else if (period == -99) {
......
package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.EvaluationException;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.TableRule;
import pwc.taxtech.atms.exception.Exceptions;
import java.util.HashMap;
import java.util.Map;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverInteger;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverString;
/**
* @ClassName TABLESUMIF
* Description TODO
* @Author pwc kevin
* @Date 3/11/2019 2:52 PM
* Version 1.0
**/
public class TABLESUMIF extends FunctionBase implements FreeRefFunction {
private String tableName;
public TABLESUMIF(FormulaContext formulaContext) {
super(formulaContext);
}
//进行参数验证
public void parameterCheck(ValueEval[] args, OperationEvaluationContext ec) {
argsLength = args.length;
if (argsLength != 6) //参数小于当做异常处理, 最后俩参数可以取默认值
throw Exceptions.parameterError;
try {
tableName = resolverString(args, ec, 0);
Map<String, String> map = TableRule.map;
if (!map.containsKey(tableName))
throw Exceptions.parameterError;
} catch (EvaluationException e) {
e.printStackTrace();
}
}
Integer argsLength;
String getField;
Integer period;
String year;
@Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
parameterCheck(args, ec);
try {
tableName = resolverString(args, ec, 0);
getField = resolverString(args, ec, 1);
String filter = resolverString(args, ec, 2);
String filterValue =resolverString(args, ec, 3);
period = resolverInteger(args, ec, 4);//会计期间
year = resolverString(args, ec, 5);//会计年度
new NumberEval(agent.getTableDataByName(tableName, getField,filter,filterValue, period, year, formulaContext));
} catch (EvaluationException e) {
e.printStackTrace();
return new NumberEval(0.00);
}
return new NumberEval(0.00);
}
}
......@@ -355,6 +355,7 @@
<div class="TDL-query-val">
<select ng-model="queryFieldModel.companyName" class="form-control radius3"
title="{{queryFieldModel.companyName}}" required placeholder="{{'PleaseSelected' | translate}}">
<option selected></option>
<option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-click="queryFieldModel.companyId = key"
value="{{companyName}}">{{companyName}}</option>
......@@ -614,7 +615,7 @@
{{'Duration' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:320px;"
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:320px;"
class="form-control" ng-model="editFieldModel.ownTime" required
data-min-view="2"/>
</div>
......@@ -624,7 +625,7 @@
{{'AvailabilityDate' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:320px;"
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:320px;"
class="form-control" ng-model="editFieldModel.fileTime"
data-min-view="2"/>
</div>
......@@ -632,7 +633,7 @@
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="DueDate"></label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:320px;"
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:320px;"
class="form-control" ng-model="editFieldModel.effectiveTime"
data-min-view="2"/>
</div>
......@@ -821,7 +822,7 @@
{{'Duration' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:280px;"
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:280px;"
class="form-control" ng-model="editFieldItem.ownTime" required
data-min-view="2"/>
</div>
......@@ -831,7 +832,7 @@
{{'AvailabilityDate' | translate}}
</label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:280px;"
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:280px;"
class="form-control" ng-model="editFieldItem.fileTime"
data-min-view="2"/>
</div>
......@@ -839,7 +840,7 @@
<div class="col-sm-6 form-group">
<label class="col-sm-3 control-label" translate="DueDate"></label>
<div class="col-sm-11" style="width:61.67%">
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy-mm-dd" style="width:280px;"
<input type='text' placeholder="{{'PleaseSelected' | translate}}" date-time-picker data-date-format="yyyy/mm/dd" style="width:280px;"
class="form-control" ng-model="editFieldItem.effectiveTime"
data-min-view="2"/>
</div>
......@@ -903,7 +904,7 @@
<div class="modal-content">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideFilePreviewPop()">×</span>
<div class="modal-title">{{fileName}}</div>
<div class="modal-title">{{currentSheetName}}</div>
</div>
<div class="modal-body">
<div class="dx-viewport demo-container" id="preview_dataGrid">
......@@ -911,6 +912,37 @@
</div>
</div>
<button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-prev" ng-click="prevPaging_xls()" title="上一页">&lt;</button>
<button class="TDL-pdf-paging-btn TDL-pdf-paging-btn-next" ng-click="nextPaging_xls()" title="下一页">&gt;</button>
</div>
</div>
<div class="modal fade" id="uploadResultPop" tabindex="-1" role="dialog" aria-labelledby="myModal" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width:80%;" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title">提示讯息</div>
</div>
<div class="modal-body">
<p ng-if="multiUploadSuccessItems.length">{{multiUploadSuccessItems.length}}个档案上传成功</p>
<ul>
<li ng-repeat="item in multiUploadSuccessItems">
<span>{{item._file.name}}</span>
</li>
</ul>
<p ng-if="multiUploadErrorItems.length">{{multiUploadErrorItems.length}}个档案上传失败</p>
<ul>
<li ng-repeat="item in multiUploadErrorItems">
<span>{{item._file.name}}</span>
</li>
</ul>
</div>
<div class="modal-footer">
<button class="btn btn-primary" translate="Confirm" ng-click="confirmUploadResult()"></button>
<!--<button type="button" class="btn btn-third" data-dismiss="modal" translate="Cancel"></button>-->
</div>
</div>
</div>
</div>
......
......@@ -2,8 +2,8 @@
* Created by Administrator on 2019/3/1 0001.
*/
taxDocumentManageModule.factory('taxDocumentListService',
['$q', 'apiConfig', 'jqFetch','apiInterceptor',
function ($q, apiConfig, jqFetch,apiInterceptor) {
['$q', 'apiConfig', 'jqFetch', 'apiInterceptor',
function ($q, apiConfig, jqFetch, apiInterceptor) {
'use strict';
return {
fetchMainList: function (params) {
......@@ -15,33 +15,35 @@ taxDocumentManageModule.factory('taxDocumentListService',
editRecord: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/edit', params);
},
verifyDuplicate:function(params){
verifyDuplicate: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/queryWhetherData', params);
},
getFileInfoOptions:function(params){
getFileInfoOptions: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/query4SelectionBox', params);
},
getCompanyNameOptions:function(params){
getCompanyNameOptions: function (params) {
return jqFetch.get(apiInterceptor.webApiHostUrl + '/org/getMyOrgList', params);
},
delFileRecordItems:function(params){
delFileRecordItems: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/batchDelete', params);
},
getBinaryData:function(url){
getBinaryData: function (url) {
var defer = $q.defer();
var oReq = new XMLHttpRequest();
oReq.onload = function(e) {
oReq.onload = function (e) {
var arraybuffer = oReq.response;
console.info("arraybuffer:",arraybuffer);
console.info("arraybuffer:", arraybuffer);
defer.resolve(arraybuffer);
};
// oReq.open("GET", 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=', true);
oReq.open("GET", url, true);
oReq.responseType = "arraybuffer";
oReq.send();
// return jqFetch.get(url,{},'arraybuffer');
return defer.promise;
}
};
}]);
\ No newline at end of file
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