Commit 839e2e84 authored by kevin's avatar kevin

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

parents 66278509 13c71b3b
package pwc.taxtech.atms.constant.enums; package pwc.taxtech.atms.constant.enums;
import java.util.HashMap;
import java.util.Map;
public enum EnumInvoiceType { public enum EnumInvoiceType {
VATInvoice(1, "增值税专票"), VATInvoice(1, "增值税专票"),
FreightTransport(2, "货运发票"), FreightTransport(2, "货运发票"),
...@@ -9,7 +12,8 @@ public enum EnumInvoiceType { ...@@ -9,7 +12,8 @@ public enum EnumInvoiceType {
private int code; private int code;
private String name; private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>();
public static final Map<String, Integer> NAME_MAPPING = new HashMap<>();
EnumInvoiceType(int code, String name) { EnumInvoiceType(int code, String name) {
this.code = code; this.code = code;
this.name = name; this.name = name;
...@@ -22,4 +26,11 @@ public enum EnumInvoiceType { ...@@ -22,4 +26,11 @@ public enum EnumInvoiceType {
public String getName() { public String getName() {
return name; return name;
} }
static {
for (EnumInvoiceType invoiceType : EnumInvoiceType.values()) {
MAPPING.put(invoiceType.getCode(), invoiceType.getName());
NAME_MAPPING.put(invoiceType.getName(), invoiceType.getCode());
}
}
} }
...@@ -9,8 +9,8 @@ public class InvoiceRecordEnum { ...@@ -9,8 +9,8 @@ public class InvoiceRecordEnum {
* 发票类型 * 发票类型
*/ */
public enum InvoiceType { public enum InvoiceType {
ORDINARY(1, "增值税普票"), ORDINARY(1, "增值税普通发票"),
SPECIAL(2, "增值税专票"); SPECIAL(2, "增值税专用发票");
private Integer code; private Integer code;
private String name; private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>(); public static final Map<Integer, String> MAPPING = new HashMap<>();
......
package pwc.taxtech.atms.dto.vatdto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.util.PwCIdSerialize;
import pwc.taxtech.atms.vat.entity.PeriodFormulaBlock;
public class FormulaFormlaBlockDto extends PeriodFormulaBlock {
@JsonSerialize(using = PwCIdSerialize.class)
private Long id;
@JsonSerialize(using = PwCIdSerialize.class)
private Long reportId;
@JsonSerialize(using = PwCIdSerialize.class)
private Long cellTemplateId;
@JsonSerialize(using = PwCIdSerialize.class)
private Long dataSourceId;
@Override
public Long getId() {
return id;
}
@Override
public void setId(Long id) {
this.id = id;
}
@Override
public Long getReportId() {
return reportId;
}
@Override
public void setReportId(Long reportId) {
this.reportId = reportId;
}
@Override
public Long getCellTemplateId() {
return cellTemplateId;
}
@Override
public void setCellTemplateId(Long cellTemplateId) {
this.cellTemplateId = cellTemplateId;
}
@Override
public Long getDataSourceId() {
return dataSourceId;
}
@Override
public void setDataSourceId(Long dataSourceId) {
this.dataSourceId = dataSourceId;
}
}
package pwc.taxtech.atms.dto.vatdto; package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.vat.entity.PeriodFormulaBlock;
import java.util.List; import java.util.List;
public class ReportDataDto { public class ReportDataDto {
private List<CellDataDto> cellData; private List<CellDataDto> cellData;
private List<PeriodFormulaBlock> formulaBlocks; private List<FormulaFormlaBlockDto> formulaBlocks;
private List<DataSourceDtoExtend> manualDataSources; private List<DataSourceDtoExtend> manualDataSources;
private EbitDataDto ebitData; private EbitDataDto ebitData;
...@@ -26,11 +24,11 @@ public class ReportDataDto { ...@@ -26,11 +24,11 @@ public class ReportDataDto {
this.cellData = cellData; this.cellData = cellData;
} }
public List<PeriodFormulaBlock> getFormulaBlocks() { public List<FormulaFormlaBlockDto> getFormulaBlocks() {
return this.formulaBlocks; return this.formulaBlocks;
} }
public void setFormulaBlocks(List<PeriodFormulaBlock> formulaBlocks) { public void setFormulaBlocks(List<FormulaFormlaBlockDto> formulaBlocks) {
this.formulaBlocks = formulaBlocks; this.formulaBlocks = formulaBlocks;
} }
......
...@@ -100,6 +100,15 @@ public class AssetListServiceImpl extends BaseService { ...@@ -100,6 +100,15 @@ public class AssetListServiceImpl extends BaseService {
if(citAssetsListDto.getTaxAccountCompare() != 2){ if(citAssetsListDto.getTaxAccountCompare() != 2){
criteria.andTaxAccountCompareEqualTo(citAssetsListDto.getTaxAccountCompare()); criteria.andTaxAccountCompareEqualTo(citAssetsListDto.getTaxAccountCompare());
} }
if(citAssetsListDto.getAssetGroupName() != null){
criteria.andAssetGroupNameLike(citAssetsListDto.getAssetGroupName()+"%");
}
if(citAssetsListDto.getDepreciationPeriod() != null){
criteria.andDepreciationPeriodEqualTo(citAssetsListDto.getDepreciationPeriod());
}
if(citAssetsListDto.getTaxGroupName() != null){
criteria.andTaxGroupNameLike(citAssetsListDto.getTaxGroupName()+"%");
}
Page page = PageHelper.startPage(citAssetsListDto.getPageInfo().getPageIndex(),citAssetsListDto.getPageInfo().getPageSize()); Page page = PageHelper.startPage(citAssetsListDto.getPageInfo().getPageIndex(),citAssetsListDto.getPageInfo().getPageSize());
List<CitAssetsList> citAssetsLists = assetListMapper.selectByExample(assetListExample); List<CitAssetsList> citAssetsLists = assetListMapper.selectByExample(assetListExample);
CitAssetSumDataDto sumData = assetListMapper.getSumData(citAssetsListDto.getProjectId()); CitAssetSumDataDto sumData = assetListMapper.getSumData(citAssetsListDto.getProjectId());
......
...@@ -883,7 +883,8 @@ public class CitReportServiceImpl extends BaseService { ...@@ -883,7 +883,8 @@ public class CitReportServiceImpl extends BaseService {
*/ */
List<PeriodFormulaBlock> formulaBlocks = periodFormulaBlockMapper.selectByExample(periodFormulaBlockExample); List<PeriodFormulaBlock> formulaBlocks = periodFormulaBlockMapper.selectByExample(periodFormulaBlockExample);
dataDto.setFormulaBlocks(formulaBlocks); dataDto.setFormulaBlocks(formulaBlocks.stream()
.map(o -> beanUtil.copyProperties(o, new FormulaFormlaBlockDto())).collect(Collectors.toList()));
//todo: 关键字数据源稍后再加 //todo: 关键字数据源稍后再加
// 获取通过KeyValueDataId关联的数据源,即公式数据源 // 获取通过KeyValueDataId关联的数据源,即公式数据源
......
...@@ -116,11 +116,10 @@ public class ReportFileUploadService extends BaseService { ...@@ -116,11 +116,10 @@ public class ReportFileUploadService extends BaseService {
data.setCreator(user.getUserName()); data.setCreator(user.getUserName());
data.setUid(CommonUtils.getUUID()); data.setUid(CommonUtils.getUUID());
data.setCreateTime(new Date()); data.setCreateTime(new Date());
data.setReportFileName(file.getOriginalFilename()); if(StringUtils.isBlank(data.getReportFileName())){
if (StringUtils.isBlank(data.getFileUploadId())) { data.setReportFileName(file.getOriginalFilename());
FileUpload fileUpload = didiFileUploadService.uploadFile(file, file.getOriginalFilename(), FileUploadEnum.BizSource.REPORT_UPLOAD.name());
data.setFileUploadId(fileUpload.getUid());
} }
if (StringUtils.isBlank(data.getProjectId()) && StringUtils.isNotBlank(data.getOrgId()) && data.getPeriod() != null) { if (StringUtils.isBlank(data.getProjectId()) && StringUtils.isNotBlank(data.getOrgId()) && data.getPeriod() != null) {
ProjectExample projectExample = new ProjectExample(); ProjectExample projectExample = new ProjectExample();
String year = String.valueOf(data.getPeriod()).substring(0,4); String year = String.valueOf(data.getPeriod()).substring(0,4);
...@@ -131,7 +130,10 @@ public class ReportFileUploadService extends BaseService { ...@@ -131,7 +130,10 @@ public class ReportFileUploadService extends BaseService {
}else{ }else{
return; return;
} }
if (StringUtils.isBlank(data.getFileUploadId())) {
FileUpload fileUpload = didiFileUploadService.uploadFile(file, file.getOriginalFilename(), FileUploadEnum.BizSource.REPORT_UPLOAD.name());
data.setFileUploadId(fileUpload.getUid());
}
}else { }else {
Project project = projectMapper.selectByPrimaryKey(data.getProjectId()); Project project = projectMapper.selectByPrimaryKey(data.getProjectId());
data.setOrgId(project.getOrganizationId()); data.setOrgId(project.getOrganizationId());
...@@ -143,7 +145,7 @@ public class ReportFileUploadService extends BaseService { ...@@ -143,7 +145,7 @@ public class ReportFileUploadService extends BaseService {
taxDocument.setEnable("T"); taxDocument.setEnable("T");
taxDocument.setOwnTime(data.getPeriod()); taxDocument.setOwnTime(data.getPeriod());
taxDocument.setFileType(data.getReportType()); taxDocument.setFileType(data.getReportType());
taxDocument.setFileName(data.getReportFileName());
FileTypesExample example = new FileTypesExample(); FileTypesExample example = new FileTypesExample();
example.createCriteria().andFileTypeEqualTo(data.getReportType()); example.createCriteria().andFileTypeEqualTo(data.getReportType());
List<FileTypes> dataList = fileTypesMapper.selectByExample(example); List<FileTypes> dataList = fileTypesMapper.selectByExample(example);
...@@ -151,6 +153,15 @@ public class ReportFileUploadService extends BaseService { ...@@ -151,6 +153,15 @@ public class ReportFileUploadService extends BaseService {
taxDocument.setFileAttr(dataList.get(0).getFileAttr()); taxDocument.setFileAttr(dataList.get(0).getFileAttr());
taxDocument.setFileTypeId(dataList.get(0).getId()); taxDocument.setFileTypeId(dataList.get(0).getId());
} }
//重新命名
String fileName = taxDocument.getCompanyName()+"_"+taxDocument.getFileType()+"_"+taxDocument.getOwnTime();
fileName+=file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
if (StringUtils.isBlank(data.getFileUploadId())) {
FileUpload fileUpload = didiFileUploadService.uploadFile(file, fileName, FileUploadEnum.BizSource.REPORT_UPLOAD.name());
data.setFileUploadId(fileUpload.getUid());
data.setReportFileName(fileName);
}
taxDocument.setFileName(fileName);
taxDocumentService.addTaxDocumentList(file,taxDocument); taxDocumentService.addTaxDocumentList(file,taxDocument);
} }
ReportFileUploadExample example = new ReportFileUploadExample(); ReportFileUploadExample example = new ReportFileUploadExample();
......
...@@ -169,10 +169,15 @@ public class TaxDocumentServiceImpl { ...@@ -169,10 +169,15 @@ public class TaxDocumentServiceImpl {
try { try {
//上传文件 //上传文件
if(StringUtils.isBlank(taxDocument.getFileUploadId())){ if(StringUtils.isBlank(taxDocument.getFileUploadId())){
FileUpload fileUpload = didiFileUploadService.uploadFile(file,file.getOriginalFilename(), FileUploadEnum.BizSource.RECORD_UPLOAD.name());
taxDocument.setFileUploadId(fileUpload.getUid());
taxDocument.setFilePositionUrl(fileUpload.getViewHttpUrl());
if(ReportFileUploadEnum.ReportType.MAPPING.containsKey(taxDocument.getFileType())){ if(ReportFileUploadEnum.ReportType.MAPPING.containsKey(taxDocument.getFileType())){
//重新命名
String fileName = taxDocument.getCompanyName()+"_"+taxDocument.getFileType()+"_"+taxDocument.getOwnTime();
fileName+=file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
FileUpload fileUpload = didiFileUploadService.uploadFile(file,fileName, FileUploadEnum.BizSource.RECORD_UPLOAD.name());
taxDocument.setFileUploadId(fileUpload.getUid());
taxDocument.setFilePositionUrl(fileUpload.getViewHttpUrl());
taxDocument.setFileName(fileName);
ReportFileUpload reportFileUpload = new ReportFileUpload(); ReportFileUpload reportFileUpload = new ReportFileUpload();
reportFileUpload.setOrgId(taxDocument.getCompanyId()); reportFileUpload.setOrgId(taxDocument.getCompanyId());
reportFileUpload.setSourceType(ReportFileUploadEnum.SuorceType.RECORD.name()); reportFileUpload.setSourceType(ReportFileUploadEnum.SuorceType.RECORD.name());
...@@ -180,7 +185,12 @@ public class TaxDocumentServiceImpl { ...@@ -180,7 +185,12 @@ public class TaxDocumentServiceImpl {
reportFileUpload.setPeriod(Integer.valueOf(period)); reportFileUpload.setPeriod(Integer.valueOf(period));
reportFileUpload.setFileUploadId(fileUpload.getUid()); reportFileUpload.setFileUploadId(fileUpload.getUid());
reportFileUpload.setReportType(taxDocument.getFileType()); reportFileUpload.setReportType(taxDocument.getFileType());
reportFileUpload.setReportFileName(fileName);
reportFileUploadService.saveData(file,reportFileUpload); reportFileUploadService.saveData(file,reportFileUpload);
}else{
FileUpload fileUpload = didiFileUploadService.uploadFile(file,file.getOriginalFilename(), FileUploadEnum.BizSource.RECORD_UPLOAD.name());
taxDocument.setFileUploadId(fileUpload.getUid());
taxDocument.setFilePositionUrl(fileUpload.getViewHttpUrl());
} }
} }
//设置创建人 创建时间信息 设置年份区分 //设置创建人 创建时间信息 设置年份区分
......
...@@ -1252,7 +1252,9 @@ public class ReportServiceImpl extends BaseService { ...@@ -1252,7 +1252,9 @@ public class ReportServiceImpl extends BaseService {
*/ */
List<PeriodFormulaBlock> formulaBlocks = periodFormulaBlockMapper.selectByExample(periodFormulaBlockExample); List<PeriodFormulaBlock> formulaBlocks = periodFormulaBlockMapper.selectByExample(periodFormulaBlockExample);
dataDto.setFormulaBlocks(formulaBlocks);
dataDto.setFormulaBlocks(formulaBlocks.stream()
.map(o -> beanUtil.copyProperties(o, new FormulaFormlaBlockDto())).collect(Collectors.toList()));
//todo: 关键字数据源稍后再加 //todo: 关键字数据源稍后再加
// 获取通过KeyValueDataId关联的数据源,即公式数据源 // 获取通过KeyValueDataId关联的数据源,即公式数据源
......
...@@ -6,6 +6,7 @@ import org.apache.poi.ss.formula.eval.ValueEval; ...@@ -6,6 +6,7 @@ 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 pwc.taxtech.atms.common.util.SpringContextUtil; import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant; import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.EnumInvoiceType;
import pwc.taxtech.atms.constant.enums.EnumOperationType; import pwc.taxtech.atms.constant.enums.EnumOperationType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType; import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.KeyValueConfigResultType; import pwc.taxtech.atms.constant.enums.KeyValueConfigResultType;
...@@ -53,7 +54,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction { ...@@ -53,7 +54,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
int resultType = getIntParam(args[3], ec); int resultType = getIntParam(args[3], ec);
int period = getIntParam(args[4], ec); int period = getIntParam(args[4], ec);
// 客户情况只计算增值税专票 // 客户情况只计算增值税专票
String invoiceType = "004"; // String invoiceType = "004";
String formulaExpression = "JXFP(" + certificationPeriod + "," + invoiceTypeParam + "," String formulaExpression = "JXFP(" + certificationPeriod + "," + invoiceTypeParam + ","
+ authenticationType + "," + resultType + "," + period + ")"; + authenticationType + "," + resultType + "," + period + ")";
...@@ -81,22 +82,22 @@ public class JXFP extends FunctionBase implements FreeRefFunction { ...@@ -81,22 +82,22 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
List<CertifiedInvoicesList> inputInvoices; List<CertifiedInvoicesList> inputInvoices;
if (authenticationType == 1 && formulaContext.getIsYear()) { if (authenticationType == 1 && formulaContext.getIsYear()) {
inputInvoices = getInvoice(null, invoiceType, inputInvoices = getInvoice(null, invoiceTypeParam,
Constant.InputInvoiceCertificationResult.CheckPass, Constant.InputInvoiceCertificationResult.ScanPass, Constant.InputInvoiceCertificationResult.CheckPass, Constant.InputInvoiceCertificationResult.ScanPass,
null); null);
} else if (authenticationType == 1) { } else if (authenticationType == 1) {
inputInvoices =getInvoice(period, invoiceType, inputInvoices =getInvoice(period, invoiceTypeParam,
Constant.InputInvoiceCertificationResult.CheckPass, Constant.InputInvoiceCertificationResult.ScanPass, Constant.InputInvoiceCertificationResult.CheckPass, Constant.InputInvoiceCertificationResult.ScanPass,
null); null);
} }
// 认证未通过与未认证暂认为是同一个意思 // 认证未通过与未认证暂认为是同一个意思
else if (authenticationType == 2 && formulaContext.getIsYear()) { else if (authenticationType == 2 && formulaContext.getIsYear()) {
inputInvoices = getInvoice(null, invoiceType, inputInvoices = getInvoice(null, invoiceTypeParam,
null, null, Constant.InputInvoiceCertificationResult.NotPass); null, null, Constant.InputInvoiceCertificationResult.NotPass);
} }
// 认证未通过与未认证暂认为是同一个意思 // 认证未通过与未认证暂认为是同一个意思
else if (authenticationType == 0 || authenticationType == 2) { else if (authenticationType == 0 || authenticationType == 2) {
inputInvoices =getInvoice(period, invoiceType, null, inputInvoices =getInvoice(period, invoiceTypeParam, null,
null, Constant.InputInvoiceCertificationResult.NotPass); null, Constant.InputInvoiceCertificationResult.NotPass);
} else { } else {
saveFormulaBlock(period, ec, formulaExpression, new BigDecimal("0.0"), 0L, formulaContext.getProjectId()); saveFormulaBlock(period, ec, formulaExpression, new BigDecimal("0.0"), 0L, formulaContext.getProjectId());
...@@ -141,7 +142,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction { ...@@ -141,7 +142,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
inputInvoiceDataSourceDto.setCertificationDate(x.getCertifiedDate()); inputInvoiceDataSourceDto.setCertificationDate(x.getCertifiedDate());
inputInvoiceDataSourceDto.setInvoiceCode(x.getInvoiceCode()); inputInvoiceDataSourceDto.setInvoiceCode(x.getInvoiceCode());
inputInvoiceDataSourceDto.setInvoiceNumber(x.getInvoiceNum()); inputInvoiceDataSourceDto.setInvoiceNumber(x.getInvoiceNum());
inputInvoiceDataSourceDto.setInvoiceType(Integer.parseInt(x.getInvoiceType())); inputInvoiceDataSourceDto.setInvoiceType(EnumInvoiceType.NAME_MAPPING.get(x.getInvoiceType()));
inputInvoiceDataSourceDto.setPeriod(period); inputInvoiceDataSourceDto.setPeriod(period);
inputInvoiceDataSourceDto.setSellerTaxNumber(x.getSalesTaxNum()); inputInvoiceDataSourceDto.setSellerTaxNumber(x.getSalesTaxNum());
inputInvoiceDataSourceDto.setName(Constant.DataSourceName.InputDetailInvoiceDataSource); inputInvoiceDataSourceDto.setName(Constant.DataSourceName.InputDetailInvoiceDataSource);
...@@ -194,20 +195,17 @@ public class JXFP extends FunctionBase implements FreeRefFunction { ...@@ -194,20 +195,17 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
return strtodate; return strtodate;
} }
public List<CertifiedInvoicesList> getInvoice(Integer period, String invoiceType, String checkPass, String scanPass, String notPass) { public List<CertifiedInvoicesList> getInvoice(Integer period, Integer invoiceType, String checkPass, String scanPass, String notPass) {
CertifiedInvoicesListExample example = new CertifiedInvoicesListExample(); CertifiedInvoicesListExample example = new CertifiedInvoicesListExample();
CertifiedInvoicesListExample.Criteria criteria = example.createCriteria(); CertifiedInvoicesListExample.Criteria criteria = example.createCriteria();
if (period != null) { if (period != null) {
Calendar date = Calendar.getInstance(); criteria.andPeriodEqualTo(Integer.valueOf(formulaContext.getYear() + (period > 9 ? period.toString() : "0" + period.toString())));
String year = String.valueOf(date.get(Calendar.YEAR));
//认证期间
criteria.andPeriodEqualTo(Integer.valueOf(year + (period > 9 ? period.toString() : "0" + period.toString())));
} }
if (invoiceType != null) { if (invoiceType != null) {
//发票类型 //发票类型
criteria.andInvoiceTypeEqualTo(String.valueOf(invoiceType)); criteria.andInvoiceTypeEqualTo(EnumInvoiceType.MAPPING.get(invoiceType));
// criteria1.andFPLXEqualTo(String.valueOf(invoiceType)); // criteria1.andFPLXEqualTo(String.valueOf(invoiceType));
} }
...@@ -223,7 +221,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction { ...@@ -223,7 +221,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
//// example.or(criteria1); //// example.or(criteria1);
// } // }
//发票状态 //发票状态
criteria.andInvoiceTypeEqualTo("1"); // 过滤作废状态 criteria.andInvoiceStatusEqualTo("正常"); // 过滤作废状态
// List<InputInvoice> list = inputInvoiceMapper.selectByExample(example).stream().filter(x -> { // List<InputInvoice> list = inputInvoiceMapper.selectByExample(example).stream().filter(x -> {
// return x.getRZSQ().endsWith("-" + (period.intValue() > 9 ? period.toString() : "0" + period.toString())); // return x.getRZSQ().endsWith("-" + (period.intValue() > 9 ? period.toString() : "0" + period.toString()));
......
...@@ -52,5 +52,6 @@ ...@@ -52,5 +52,6 @@
"DocumentPath":"DocumentPath", "DocumentPath":"DocumentPath",
"PreviewFile":"PreviewFile", "PreviewFile":"PreviewFile",
"UploadSuccessCount":"UploadSuccessCount", "UploadSuccessCount":"UploadSuccessCount",
"UploadFailCount":"UploadFailCount" "UploadFailCount":"UploadFailCount",
"DeleteConfirm":"DeleteConfirm"
} }
\ No newline at end of file
...@@ -52,5 +52,6 @@ ...@@ -52,5 +52,6 @@
"DocumentPath":"档案路径", "DocumentPath":"档案路径",
"PreviewFile":"预览文件", "PreviewFile":"预览文件",
"UploadSuccessCount":"个档案上传成功", "UploadSuccessCount":"个档案上传成功",
"UploadFailCount":"个档案上传失败" "UploadFailCount":"个档案上传失败",
"DeleteConfirm":"是否确认删除记录?"
} }
\ No newline at end of file
...@@ -1457,6 +1457,7 @@ ...@@ -1457,6 +1457,7 @@
"SelectCheck": "请至少选择一项", "SelectCheck": "请至少选择一项",
"SelectColumnError": "列名对应错误", "SelectColumnError": "列名对应错误",
"SelectExportReport": "选择导出报表", "SelectExportReport": "选择导出报表",
"SelectUploadReport": "选择保存版本",
"SelectFile": "选择文件...", "SelectFile": "选择文件...",
"SelectFileTitle": "选择文件", "SelectFileTitle": "选择文件",
"SelectFileToUpload": "上传文件...", "SelectFileToUpload": "上传文件...",
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<div> <div>
<table class=" table table-responsive"> <table class=" table table-responsive">
<tr> <tr>
<td><span translate="TaxAccountDifference"></span></td> <td style="vertical-align: middle"><span translate="TaxAccountDifference"></span></td>
<td> <td>
<!--税会差异的选择--> <!--税会差异的选择-->
<div class="input-group"> <div class="input-group" style="width: 100%">
<div class="option"> <div class="option">
<div id="taxAccountDifferenceButton" dx-select-box="taxAccountDifferenceOptions"></div> <div id="taxAccountDifferenceButton" dx-select-box="taxAccountDifferenceOptions" style="width: 100%"></div>
</div> </div>
</div> </div>
</td> </td>
...@@ -16,22 +16,20 @@ ...@@ -16,22 +16,20 @@
<tr> <tr>
<td><span translate="AssetGroupName"></span></td> <td><span translate="AssetGroupName"></span></td>
<td><input class="form-control " type="text" id="assetGroupName" placeholder="" <td><input class="form-control " type="text" id="assetGroupName" placeholder=""
ng-model="filterData.assetGroupName"></td> ng-model="citAssetsListDto.assetGroupName"></td>
</tr> </tr>
<tr> <tr>
<td><span translate="DepreciationPeriod"></span></td> <td><span translate="DepreciationPeriod"></span></td>
<td> <td>
<div class="input-group">
<input class="form-control " type="text" id="depreciationPeriod" placeholder="" <input class="form-control " type="text" id="depreciationPeriod" placeholder=""
ng-model="filterData.depreciationPeriod"> ng-model="citAssetsListDto.depreciationPeriod">
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><span translate="TaxGroupType"></span></td> <td><span translate="TaxGroupType"></span></td>
<td><input class="form-control " type="text" id="taxGroupType" placeholder="" <td><input class="form-control " type="text" id="taxGroupType" placeholder=""
ng-model="filterData.taxGroupType"></td> ng-model="citAssetsListDto.taxGroupType"></td>
</tr> </tr>
</table> </table>
......
...@@ -57,7 +57,10 @@ ...@@ -57,7 +57,10 @@
}, },
assetType : 1, assetType : 1,
projectId : projectId, projectId : projectId,
taxAccountCompare : 2 taxAccountCompare : 2,
assetGroupName:'',
depreciationPeriod:'',
taxGroupType:''
}; };
$scope.refreshAssetResultListGrid = function () { $scope.refreshAssetResultListGrid = function () {
debugger; debugger;
...@@ -976,6 +979,31 @@ ...@@ -976,6 +979,31 @@
}); });
}; };
var initParamFilter = function(){
$scope.citAssetsListDto.taxAccountCompare =2;
$scope.citAssetsListDto.assetGroupName =2;
$scope.citAssetsListDto.depreciationPeriod =2;
$scope.citAssetsListDto.taxGroupType =2;
};
var doDataFilter = function () {
debugger;
// initParamFilter();
getAssetResultList($scope.citAssetsListDto.assetType);
}
var doDataFilterReset = function () {
debugger;
// initParamFilter();
$scope.citAssetsListDto.taxAccountCompare =2;
$scope.citAssetsListDto.assetGroupName = null;
$scope.citAssetsListDto.depreciationPeriod = null;
$scope.citAssetsListDto.taxGroupType = null;
getAssetResultList($scope.citAssetsListDto.assetType);
};
//开始 //开始
(function initialize() { (function initialize() {
//分页的设置 //分页的设置
...@@ -994,6 +1022,8 @@ ...@@ -994,6 +1022,8 @@
$scope.incomeInvoiceTotalColumns = []; $scope.incomeInvoiceTotalColumns = [];
$scope.initIncomeInvoiceTotalColumnsIndex = []; $scope.initIncomeInvoiceTotalColumnsIndex = [];
$scope.changeSheet = changeSheet; $scope.changeSheet = changeSheet;
$scope.doDataFilter = doDataFilter;
$scope.doDataFilterReset = doDataFilterReset;
debugger; debugger;
function init(){ function init(){
......
...@@ -412,12 +412,12 @@ ...@@ -412,12 +412,12 @@
} }
.popover { .popover {
min-width: 370px; min-width: 370px;
.arrow { .arrow {
left: 0px; left: 0px !important;
} }
} }
.popover-content { .popover-content {
td { td {
......
...@@ -910,6 +910,12 @@ ...@@ -910,6 +910,12 @@
//打开导出文件弹出框 //打开导出文件弹出框
$scope.openExportPop = function (evenType) { $scope.openExportPop = function (evenType) {
$scope.evenType = evenType; $scope.evenType = evenType;
if ('export' == $scope.evenType) {
$scope.viewTitle = $translate.instant('SelectExportReport');
}
if ('upload' == $scope.evenType) {
$scope.viewTitle = $translate.instant('SelectUploadReport');
}
var grp = _.find($scope.$parent.$parent.groups, function (g) { var grp = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'TaxReturnType'; return g.name == 'TaxReturnType';
}); });
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<div id="exportReportFilesContainer"> <div id="exportReportFilesContainer">
<script type="text/ng-template" class="content" id="exportReport.html"> <script type="text/ng-template" class="content" id="exportReport.html">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title" style="float: left;width: 70%;">{{'SelectExportReport' | translate}}</h4> <h4 class="modal-title" style="float: left;width: 70%;">{{viewTitle}}</h4>
<span ng-click="$dismiss();" style="width: 20px; float: right; cursor: pointer;">x</span> <span ng-click="$dismiss();" style="width: 20px; float: right; cursor: pointer;">x</span>
</div> </div>
<div class="modal-body process-bar-container"> <div class="modal-body process-bar-container">
......
...@@ -656,7 +656,7 @@ constant.citPermission = { ...@@ -656,7 +656,7 @@ constant.citPermission = {
queryCode: '03.003.001.001', queryCode: '03.003.001.001',
importCode: '03.003.001.002' importCode: '03.003.001.002'
}, },
caculateDataCode: '03.003.002', caculateDataCode: '03.003.004',
}, },
reportView: { reportView: {
reportViewCode: '03.004', reportViewCode: '03.004',
......
...@@ -9,7 +9,13 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -9,7 +9,13 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope.queryFieldModel = {}; $scope.queryFieldModel = {};
$scope.editFieldModel = {}; $scope.editFieldModel = {};
$scope.pagingOptions = {}; //分页的设置
$scope.pagingOptions = {
pageIndex: 1, //当前页码
totalItems: 0, //总数据
pageSize: 10, //每页多少条数据
pageSizeString: '10',
};
$scope.localData = null; $scope.localData = null;
$scope.loadMainData = function () { $scope.loadMainData = function () {
...@@ -414,11 +420,11 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -414,11 +420,11 @@ taxDocumentManageModule.controller('taxDocumentListController',
if(params[key] === undefined || params[key] === null) params[key] = ""; if(params[key] === undefined || params[key] === null) params[key] = "";
}); });
params.ownTime = $scope.queryOwnTime(params.ownTime, "int"); params.ownTime = $scope.queryOwnTime(params.ownTime, "int");
params.effectiveTime = $scope.getQueryDate(params.effectiveTime, "/"); params.effectiveTime ? params.effectiveTime = $scope.getQueryDate(params.effectiveTime, "/") : delete params.effectiveTime;
params.fileTime = $scope.getQueryDate(params.fileTime, "/"); params.fileTime ? params.fileTime = $scope.getQueryDate(params.fileTime, "/") : delete params.fileTime;
params.createTime = $scope.getQueryDate(params.createTime, "/"); params.createTime ? params.createTime = $scope.getQueryDate(params.createTime, "/") : delete params.createTime;
params.updateTime = $scope.getQueryDate(params.updateTime, "/"); params.updateTime ? params.updateTime = $scope.getQueryDate(params.updateTime, "/") : delete params.updateTime;
params.uploadTime = $scope.getQueryDate(params.uploadTime, "/"); params.uploadTime ? params.uploadTime = $scope.getQueryDate(params.uploadTime, "/") : delete params.uploadTime;
params.filePositionUrl = encodeURIComponent(params.filePositionUrl); params.filePositionUrl = encodeURIComponent(params.filePositionUrl);
params.auditStatus = $scope.transformAuditStatusToServer(params.auditStatus); params.auditStatus = $scope.transformAuditStatusToServer(params.auditStatus);
taxDocumentListService.editRecord(params).then(function (data) { taxDocumentListService.editRecord(params).then(function (data) {
...@@ -474,21 +480,39 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -474,21 +480,39 @@ taxDocumentManageModule.controller('taxDocumentListController',
delIDs.push(cellId); delIDs.push(cellId);
} }
}); });
taxDocumentListService.delFileRecordItems({ if(delIDs.length ==0){
"ids":delIDs return;
}).then(function (data) { }
if (data) { SweetAlert.swal({
SweetAlert.swal({ title: '提示',
title: $translate.instant("Deleted"), text: $translate.instant("DeleteConfirm"),
type: "success", type: "warning",
confirmButtonText: $translate.instant('Confirm'), showCancelButton: true,
closeOnConfirm: true confirmButtonColor: "#DD6B55",
}, confirmButtonText: $translate.instant('Confirm'),
function (isConfirm) { cancelButtonText: $translate.instant('Cancel'),
if (isConfirm) $scope.loadMainData(); closeOnConfirm: true,
closeOnCancel: true
},
function (isConfirm) {
if (isConfirm) {
taxDocumentListService.delFileRecordItems({
"ids":delIDs
}).then(function (data) {
if (data) {
SweetAlert.swal({
title: $translate.instant("Deleted"),
type: "success",
confirmButtonText: $translate.instant('Confirm'),
closeOnConfirm: true
},
function (isConfirm) {
if (isConfirm) $scope.loadMainData();
});
}
}); });
} }
}); })
}; };
(function initialize() { (function initialize() {
......
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