Commit 125dc3ef authored by gary's avatar gary

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

# Conflicts:
#	atms-api/src/main/java/pwc/taxtech/atms/service/impl/MenuServiceImpl.java
parents ec479c4f d06e561c
...@@ -42,6 +42,9 @@ public class POIUtil { ...@@ -42,6 +42,9 @@ public class POIUtil {
} }
Row targetRow = targetSheet.createRow(r); Row targetRow = targetSheet.createRow(r);
for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) { for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) {
if(c < 0 ){
continue;
}
Cell cell = row.getCell(c); Cell cell = row.getCell(c);
if (null == cell) { if (null == cell) {
continue; continue;
......
...@@ -91,6 +91,9 @@ public class TemplateController extends BaseController { ...@@ -91,6 +91,9 @@ public class TemplateController extends BaseController {
for (int r = sheet.getFirstRowNum(); r <= sheet.getLastRowNum(); r++) { for (int r = sheet.getFirstRowNum(); r <= sheet.getLastRowNum(); r++) {
Row row = sheet.getRow(r); Row row = sheet.getRow(r);
for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) { for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) {
if(c < 0){
continue;
}
Cell cell = row.getCell(c); Cell cell = row.getCell(c);
if (cell != null && !cell.getCellStyle().getLocked()) { if (cell != null && !cell.getCellStyle().getLocked()) {
cell.setCellValue(StringUtils.EMPTY); cell.setCellValue(StringUtils.EMPTY);
......
...@@ -457,6 +457,11 @@ public class CitAssetsListDto implements Serializable { ...@@ -457,6 +457,11 @@ public class CitAssetsListDto implements Serializable {
*/ */
private BigDecimal disposalTaxBenefit; private BigDecimal disposalTaxBenefit;
BigDecimal totalAccountAcquisitionValue;
BigDecimal totalAccountYearDepreciationAmount;
BigDecimal totalTaxCurrentYearDepreciationAmount;
BigDecimal totalYearDifferenceAmount;
public BigDecimal getDisposalProfitAndLoss() { public BigDecimal getDisposalProfitAndLoss() {
return disposalProfitAndLoss; return disposalProfitAndLoss;
} }
...@@ -1393,5 +1398,35 @@ public class CitAssetsListDto implements Serializable { ...@@ -1393,5 +1398,35 @@ public class CitAssetsListDto implements Serializable {
this.compensationSaleAmount = compensationSaleAmount; this.compensationSaleAmount = compensationSaleAmount;
} }
public BigDecimal getTotalAccountAcquisitionValue() {
return totalAccountAcquisitionValue;
}
public void setTotalAccountAcquisitionValue(BigDecimal totalAccountAcquisitionValue) {
this.totalAccountAcquisitionValue = totalAccountAcquisitionValue;
}
public BigDecimal getTotalAccountYearDepreciationAmount() {
return totalAccountYearDepreciationAmount;
}
public void setTotalAccountYearDepreciationAmount(BigDecimal totalAccountYearDepreciationAmount) {
this.totalAccountYearDepreciationAmount = totalAccountYearDepreciationAmount;
}
public BigDecimal getTotalTaxCurrentYearDepreciationAmount() {
return totalTaxCurrentYearDepreciationAmount;
}
public void setTotalTaxCurrentYearDepreciationAmount(BigDecimal totalTaxCurrentYearDepreciationAmount) {
this.totalTaxCurrentYearDepreciationAmount = totalTaxCurrentYearDepreciationAmount;
}
public BigDecimal getTotalYearDifferenceAmount() {
return totalYearDifferenceAmount;
}
public void setTotalYearDifferenceAmount(BigDecimal totalYearDifferenceAmount) {
this.totalYearDifferenceAmount = totalYearDifferenceAmount;
}
} }
\ No newline at end of file
...@@ -18,6 +18,7 @@ import pwc.taxtech.atms.dao.AssetDetailGroupMapper; ...@@ -18,6 +18,7 @@ import pwc.taxtech.atms.dao.AssetDetailGroupMapper;
import pwc.taxtech.atms.dao.AssetGroupMapper; import pwc.taxtech.atms.dao.AssetGroupMapper;
import pwc.taxtech.atms.dao.CitAssetGroupResultMapper; import pwc.taxtech.atms.dao.CitAssetGroupResultMapper;
import pwc.taxtech.atms.dao.CitAssetsListMapper; import pwc.taxtech.atms.dao.CitAssetsListMapper;
import pwc.taxtech.atms.dpo.CitAssetSumDataDto;
import pwc.taxtech.atms.dto.*; import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.entity.*; import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.vat.entity.AssetsList; import pwc.taxtech.atms.vat.entity.AssetsList;
...@@ -101,10 +102,15 @@ public class AssetListServiceImpl extends BaseService { ...@@ -101,10 +102,15 @@ public class AssetListServiceImpl extends BaseService {
} }
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());
List<CitAssetsListDto> citAssetsListDtos = new ArrayList<>(); List<CitAssetsListDto> citAssetsListDtos = new ArrayList<>();
for (CitAssetsList citAssetsList:citAssetsLists){ for (CitAssetsList citAssetsList:citAssetsLists){
CitAssetsListDto temp = new CitAssetsListDto(); CitAssetsListDto temp = new CitAssetsListDto();
BeanUtils.copyProperties(citAssetsList,temp); BeanUtils.copyProperties(citAssetsList,temp);
temp.setTotalYearDifferenceAmount(sumData.getTotalYearDifferenceAmount());
temp.setTotalAccountYearDepreciationAmount(sumData.getTotalAccountYearDepreciationAmount());
temp.setTotalTaxCurrentYearDepreciationAmount(sumData.getTotalTaxCurrentYearDepreciationAmount());
temp.setTotalAccountAcquisitionValue(sumData.getTotalAccountAcquisitionValue());
citAssetsListDtos.add(temp); citAssetsListDtos.add(temp);
} }
...@@ -114,6 +120,10 @@ public class AssetListServiceImpl extends BaseService { ...@@ -114,6 +120,10 @@ public class AssetListServiceImpl extends BaseService {
return pageInfo; return pageInfo;
} }
public void getSumData(){
}
public List<CitAssetGroupResultDto> getAssetGroupResultData(String projectId) throws Exception { public List<CitAssetGroupResultDto> getAssetGroupResultData(String projectId) throws Exception {
logger.debug("根据projectId获取该资产类别相关数据"); logger.debug("根据projectId获取该资产类别相关数据");
CitAssetGroupResultExample assetGroupResultExample = new CitAssetGroupResultExample(); CitAssetGroupResultExample assetGroupResultExample = new CitAssetGroupResultExample();
......
...@@ -4,7 +4,6 @@ import org.slf4j.Logger; ...@@ -4,7 +4,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import pwc.taxtech.atms.common.CommonConstants; import pwc.taxtech.atms.common.CommonConstants;
import pwc.taxtech.atms.common.CommonUtils; import pwc.taxtech.atms.common.CommonUtils;
...@@ -14,12 +13,10 @@ import pwc.taxtech.atms.dao.RolePermissionMapper; ...@@ -14,12 +13,10 @@ import pwc.taxtech.atms.dao.RolePermissionMapper;
import pwc.taxtech.atms.dao.UserRoleMapper; import pwc.taxtech.atms.dao.UserRoleMapper;
import pwc.taxtech.atms.dto.MenuDisplayDto; import pwc.taxtech.atms.dto.MenuDisplayDto;
import pwc.taxtech.atms.dto.MenuDto; import pwc.taxtech.atms.dto.MenuDto;
import pwc.taxtech.atms.dto.navtree.DevTreeDto;
import pwc.taxtech.atms.entity.*; import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.exception.ApplicationException; import pwc.taxtech.atms.exception.ApplicationException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
......
...@@ -406,6 +406,9 @@ public class TemplateGroupServiceImpl extends AbstractService { ...@@ -406,6 +406,9 @@ public class TemplateGroupServiceImpl extends AbstractService {
for (int r = sheet.getFirstRowNum(); r <= sheet.getLastRowNum(); r++) { for (int r = sheet.getFirstRowNum(); r <= sheet.getLastRowNum(); r++) {
Row row = sheet.getRow(r); Row row = sheet.getRow(r);
for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) { for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) {
if(c<0){
continue;
}
Cell cell = row.getCell(c); Cell cell = row.getCell(c);
if (cell == null) { if (cell == null) {
continue;//todo cell == null 如何处理 continue;//todo cell == null 如何处理
......
...@@ -365,7 +365,8 @@ public class ReportServiceImpl extends BaseService { ...@@ -365,7 +365,8 @@ public class ReportServiceImpl extends BaseService {
} }
@Transactional @Transactional
public void assemblePeriodTemplate(Template template, Workbook workbook, String projectId, Integer period, Integer addRowIndex) throws ServiceException { public void assemblePeriodTemplate(Template template, Workbook workbook, String projectId, Integer period, List<Long> configIds) throws ServiceException {
int addRowIndex = configIds.size();
List<Integer> hasHandDatas = Arrays.asList( List<Integer> hasHandDatas = Arrays.asList(
TaxesCalculateReportEnum.Column.Column_5.getIndex(), TaxesCalculateReportEnum.Column.Column_5.getIndex(),
TaxesCalculateReportEnum.Column.Column_6.getIndex(), TaxesCalculateReportEnum.Column.Column_6.getIndex(),
...@@ -394,7 +395,27 @@ public class ReportServiceImpl extends BaseService { ...@@ -394,7 +395,27 @@ public class ReportServiceImpl extends BaseService {
} }
if (r <= addRowIndex+1) { if (r <= addRowIndex+1) {
String cellId = projectId+template.getId()+period+r+c; String cellId = projectId+template.getId()+period+r+c;
if((r-1)>=0&&(r-1)<configIds.size()){
cellId += configIds.get(configIds.size()-r);
}
Long cellTemplateId = Long.valueOf(cellId.hashCode()); Long cellTemplateId = Long.valueOf(cellId.hashCode());
cellTemplateId = cellTemplateId<0?cellTemplateId:(cellTemplateId*-1);
//更新手工数据源
PeriodDataSourceExample delExample = new PeriodDataSourceExample();
delExample.createCriteria().andProjectIdEqualTo(projectId)
.andPeriodEqualTo(period).andTypeEqualTo(10).andColumnIndexEqualTo(c).andRowIndexEqualTo(r);
PeriodDataSource dataSource = new DataSourceExtendDto();
dataSource.setColumnIndex(999);
dataSource.setRowIndex(999);
periodDataSourceMapper.updateByExampleSelective(dataSource, delExample);
PeriodDataSourceExample updateExample = new PeriodDataSourceExample();
updateExample.createCriteria().andProjectIdEqualTo(projectId)
.andPeriodEqualTo(period).andTypeEqualTo(10).andCellTemplateIdEqualTo(cellTemplateId);
dataSource = new DataSourceExtendDto();
dataSource.setColumnIndex(c);
dataSource.setRowIndex(r);
periodDataSourceMapper.updateByExampleSelective(dataSource,updateExample);
PeriodCellTemplate cellTemplate = new PeriodCellTemplate(); PeriodCellTemplate cellTemplate = new PeriodCellTemplate();
cellTemplate.setPeriod(period); cellTemplate.setPeriod(period);
cellTemplate.setRowName(POIUtil.getCellFormulaString(cell)); cellTemplate.setRowName(POIUtil.getCellFormulaString(cell));
...@@ -728,6 +749,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -728,6 +749,7 @@ public class ReportServiceImpl extends BaseService {
String queryDate = project.getYear()+"-"+(period>=10?period:("0"+period)); String queryDate = project.getYear()+"-"+(period>=10?period:("0"+period));
example.createCriteria().andOrgIdEqualTo(project.getOrganizationId()). example.createCriteria().andOrgIdEqualTo(project.getOrganizationId()).
andStartDateLessThanOrEqualTo(queryDate).andEndDateGreaterThanOrEqualTo(queryDate).andStatusEqualTo(0); andStartDateLessThanOrEqualTo(queryDate).andEndDateGreaterThanOrEqualTo(queryDate).andStatusEqualTo(0);
example.setOrderByClause(" create_time ");
List<RevenueConfig> dataList = revenueConfigMapper.selectByExample(example); List<RevenueConfig> dataList = revenueConfigMapper.selectByExample(example);
//合计项map //合计项map
Map<Integer,List<String>> sumMap = new HashMap<>(); Map<Integer,List<String>> sumMap = new HashMap<>();
...@@ -736,14 +758,17 @@ public class ReportServiceImpl extends BaseService { ...@@ -736,14 +758,17 @@ public class ReportServiceImpl extends BaseService {
sumMap.put(TaxesCalculateReportEnum.Column.Column_7.getIndex(),new ArrayList<>()); sumMap.put(TaxesCalculateReportEnum.Column.Column_7.getIndex(),new ArrayList<>());
sumMap.put(TaxesCalculateReportEnum.Column.Column_8.getIndex(),new ArrayList<>()); sumMap.put(TaxesCalculateReportEnum.Column.Column_8.getIndex(),new ArrayList<>());
sumMap.put(TaxesCalculateReportEnum.Column.Column_10.getIndex(),new ArrayList<>()); sumMap.put(TaxesCalculateReportEnum.Column.Column_10.getIndex(),new ArrayList<>());
List<Long> configIds = new ArrayList<>();
if (CollectionUtils.isNotEmpty(dataList)) { if (CollectionUtils.isNotEmpty(dataList)) {
int rowIndex = 1; int rowIndex = 1;
Row sourceRow = sheet.getRow(3); Row sourceRow = sheet.getRow(3);
for (RevenueConfig config : dataList) { for (RevenueConfig config : dataList) {
configIds.add(config.getId());
Row row = POIUtil.createAndCloneRow(tWorkbook, sheet, 1, sourceRow); Row row = POIUtil.createAndCloneRow(tWorkbook, sheet, 1, sourceRow);
row.getCell(TaxesCalculateReportEnum.Column.Column_1.getIndex()).setCellValue("1-" + rowIndex); row.getCell(TaxesCalculateReportEnum.Column.Column_1.getIndex()).setCellValue("1-" + (dataList.size()+1-rowIndex));
row.getCell(TaxesCalculateReportEnum.Column.Column_2.getIndex()).setCellValue(config.getName()); row.getCell(TaxesCalculateReportEnum.Column.Column_2.getIndex()).setCellValue(config.getName());
row.getCell(TaxesCalculateReportEnum.Column.Column_3.getIndex()).setCellValue(""); row.getCell(TaxesCalculateReportEnum.Column.Column_3.getIndex()).setCellValue("");
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue("PC(\"FilterDate1\",2)"); row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue("PC(\"FilterDate1\",2)");
...@@ -764,13 +789,13 @@ public class ReportServiceImpl extends BaseService { ...@@ -764,13 +789,13 @@ public class ReportServiceImpl extends BaseService {
if (1 == config.getTaxBase()) {//账载 if (1 == config.getTaxBase()) {//账载
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"E\")"); row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"E\")");
} else if (2 == config.getTaxBase()) {//开票收入 } else if (2 == config.getTaxBase()) {//开票收入
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"F\")+"
+"WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"G\")");
} else if (3 == config.getTaxBase()) {//手工录入 } else if (3 == config.getTaxBase()) {//手工录入
} else if (4 == config.getTaxBase()) {//借方发生额 } else if (4 == config.getTaxBase()) {//借方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,,)"); row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,,)");
} else if (5 == config.getTaxBase()) {//贷方发生额 } else if (5 == config.getTaxBase()) {//贷方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,,)"); row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,,)");
}else{ }else{
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue(""); row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("");
...@@ -791,7 +816,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -791,7 +816,7 @@ public class ReportServiceImpl extends BaseService {
//组装合计项数据 //组装合计项数据
assembleSumRow(sheet.getRow(rowIndex),sumMap); assembleSumRow(sheet.getRow(rowIndex),sumMap);
} }
assemblePeriodTemplate(template, tWorkbook, projectId, period, dataList.size()); assemblePeriodTemplate(template, tWorkbook, projectId, period, configIds);
return tWorkbook; return tWorkbook;
} }
......
...@@ -229,8 +229,10 @@ public class FunctionBase { ...@@ -229,8 +229,10 @@ public class FunctionBase {
List<PeriodDataSource> dss = agent.queryManualDataSource(cellTemplateId, formulaContext.getProjectId(), formulaContext.getPeriod()); List<PeriodDataSource> dss = agent.queryManualDataSource(cellTemplateId, formulaContext.getProjectId(), formulaContext.getPeriod());
if (eval instanceof ErrorEval || eval == null || eval instanceof BlankEval) { if (eval instanceof ErrorEval || eval == null || eval instanceof BlankEval) {
if(eval !=null && eval instanceof ErrorEval){
LOGGER.warn("[Formula_Exception] error eval for cell {} and error code {} and error String {}", cellTemplateId, LOGGER.warn("[Formula_Exception] error eval for cell {} and error code {} and error String {}", cellTemplateId,
((ErrorEval) eval).getErrorCode(), ((ErrorEval) eval).getErrorString()); ((ErrorEval) eval).getErrorCode(), ((ErrorEval) eval).getErrorString());
}
if (!dss.isEmpty()) return dss.get(0).getAmount(); if (!dss.isEmpty()) return dss.get(0).getAmount();
} else { } else {
String evalStr = OperandResolver.coerceValueToString(eval); String evalStr = OperandResolver.coerceValueToString(eval);
......
package pwc.taxtech.atms.vat.service.impl.report.functions; package pwc.taxtech.atms.vat.service.impl.report.functions;
import com.google.common.collect.Lists;
import org.apache.commons.collections.CollectionUtils; 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;
...@@ -20,6 +19,7 @@ import pwc.taxtech.atms.vat.entity.RevenueTypeMapping; ...@@ -20,6 +19,7 @@ import pwc.taxtech.atms.vat.entity.RevenueTypeMapping;
import pwc.taxtech.atms.vat.entity.RevenueTypeMappingExample; import pwc.taxtech.atms.vat.entity.RevenueTypeMappingExample;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -42,17 +42,17 @@ public class KPSR extends FunctionBase implements FreeRefFunction { ...@@ -42,17 +42,17 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
Integer billType = getIntParam(args[1], ec);//发票类型 Integer billType = getIntParam(args[1], ec);//发票类型
String formulaExpression = "KPSR(\"" + revenueTypeName + "\","+billType+")"; String formulaExpression = "KPSR(\"" + revenueTypeName + "\","+billType+")";
logger.debug(formulaExpression); logger.debug(formulaExpression);
List<OutputInvoiceDataSourceDto> dataSource = Lists.newArrayList(); List<OutputInvoiceDataSourceDto> dataSource = new ArrayList<>();
double result = assembleData(revenueTypeName,dataSource,billType,ec);
double result = countForTrialBalance(revenueTypeName,dataSource,billType,ec); Long dataSoureId = saveDataSource(ec, Collections.singletonList(dataSource), FormulaDataSourceDetailType.OutputInvoiceDataSourceDto, new BigDecimal(result), formulaContext.getPeriod(),
Long dataSoureId = saveDataSource(ec, Collections.singletonList(dataSource), FormulaDataSourceDetailType.InputInvoiceDataSourceDto, new BigDecimal(result), formulaContext.getPeriod(),
formulaContext.getReportTemplateGroupId(), formulaContext.getProjectId()); formulaContext.getReportTemplateGroupId(), formulaContext.getProjectId());
saveFormulaBlock(formulaContext.getPeriod(), ec, formulaExpression, new BigDecimal(result), dataSoureId, formulaContext.getProjectId()); saveFormulaBlock(formulaContext.getPeriod(), ec, formulaExpression, new BigDecimal(result), dataSoureId, formulaContext.getProjectId());
return new NumberEval(result); return new NumberEval(result);
} }
private double countForTrialBalance(String revenueTypeName, List<OutputInvoiceDataSourceDto> contain, Integer billType,OperationEvaluationContext ec) { private double assembleData(String revenueTypeName, List<OutputInvoiceDataSourceDto> contain, Integer billType,OperationEvaluationContext ec) {
String queryDate = formulaContext.getYear()+(formulaContext.getPeriod()<10?("0"+formulaContext.getPeriod()):(formulaContext.getPeriod()+"")); String queryDate = formulaContext.getYear()+(formulaContext.getPeriod()<10?("0"+formulaContext.getPeriod()):(formulaContext.getPeriod()+""));
RevenueTypeMappingExample typeMappingExample = new RevenueTypeMappingExample(); RevenueTypeMappingExample typeMappingExample = new RevenueTypeMappingExample();
typeMappingExample.createCriteria().andOrgIdEqualTo(formulaContext.getOrganizationId()) typeMappingExample.createCriteria().andOrgIdEqualTo(formulaContext.getOrganizationId())
......
...@@ -70,7 +70,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction { ...@@ -70,7 +70,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
throw e; throw e;
} finally { } finally {
LOGGER.warn("[BB_Exception] error for bb cacls for {}", bo.toString()); LOGGER.warn("[BB_Exception] error for bb cacls for {}", bo.toString());
Long dataSourceId = saveDataSource(ec, dataSource, FormulaDataSourceType.Other,FormulaDataSourceDetailType.TaxCellDataSourceDto, Long dataSourceId = saveDataSource(ec, dataSource, FormulaDataSourceType.Report,FormulaDataSourceDetailType.ReportCellDataSourceDto,
cellValue, formulaContext.getPeriod(), cellValue, formulaContext.getPeriod(),
formulaContext.getReportTemplateGroupId(), cellTemplateData.getColumnIndex(), cellTemplateData.getRowIndex(), formulaContext.getReportTemplateGroupId(), cellTemplateData.getColumnIndex(), cellTemplateData.getRowIndex(),
formulaContext.getProjectId()); formulaContext.getProjectId());
......
...@@ -7,6 +7,7 @@ import org.apache.ibatis.session.RowBounds; ...@@ -7,6 +7,7 @@ import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper; import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.CitAssetDetailResultDto; import pwc.taxtech.atms.dpo.CitAssetDetailResultDto;
import pwc.taxtech.atms.dpo.CitAssetEamMappingDto; import pwc.taxtech.atms.dpo.CitAssetEamMappingDto;
import pwc.taxtech.atms.dpo.CitAssetSumDataDto;
import pwc.taxtech.atms.entity.CitAssetsList; import pwc.taxtech.atms.entity.CitAssetsList;
import pwc.taxtech.atms.entity.CitAssetsListExample; import pwc.taxtech.atms.entity.CitAssetsListExample;
...@@ -120,4 +121,6 @@ public interface CitAssetsListMapper extends MyMapper { ...@@ -120,4 +121,6 @@ public interface CitAssetsListMapper extends MyMapper {
List<CitAssetDetailResultDto> getCitAssetDetialResult(@Param("assetType") Integer assetType, List<CitAssetDetailResultDto> getCitAssetDetialResult(@Param("assetType") Integer assetType,
@Param("assetDetailType") Integer assetDetailType); @Param("assetDetailType") Integer assetDetailType);
CitAssetSumDataDto getSumData(@Param("projectId") String projectId);
} }
\ No newline at end of file
package pwc.taxtech.atms.dpo;
import pwc.taxtech.atms.entity.AssetDetailGroup;
import pwc.taxtech.atms.entity.CitAssetsList;
import java.math.BigDecimal;
public class CitAssetSumDataDto {
BigDecimal totalAccountAcquisitionValue;
BigDecimal totalAccountYearDepreciationAmount;
BigDecimal totalTaxCurrentYearDepreciationAmount;
BigDecimal totalYearDifferenceAmount;
public BigDecimal getTotalAccountAcquisitionValue() {
return totalAccountAcquisitionValue;
}
public void setTotalAccountAcquisitionValue(BigDecimal totalAccountAcquisitionValue) {
this.totalAccountAcquisitionValue = totalAccountAcquisitionValue;
}
public BigDecimal getTotalAccountYearDepreciationAmount() {
return totalAccountYearDepreciationAmount;
}
public void setTotalAccountYearDepreciationAmount(BigDecimal totalAccountYearDepreciationAmount) {
this.totalAccountYearDepreciationAmount = totalAccountYearDepreciationAmount;
}
public BigDecimal getTotalTaxCurrentYearDepreciationAmount() {
return totalTaxCurrentYearDepreciationAmount;
}
public void setTotalTaxCurrentYearDepreciationAmount(BigDecimal totalTaxCurrentYearDepreciationAmount) {
this.totalTaxCurrentYearDepreciationAmount = totalTaxCurrentYearDepreciationAmount;
}
public BigDecimal getTotalYearDifferenceAmount() {
return totalYearDifferenceAmount;
}
public void setTotalYearDifferenceAmount(BigDecimal totalYearDifferenceAmount) {
this.totalYearDifferenceAmount = totalYearDifferenceAmount;
}
}
...@@ -277,6 +277,7 @@ ...@@ -277,6 +277,7 @@
</association> </association>
</resultMap> </resultMap>
<select id="getCitAssetDetialResult" resultMap="citAssetDetailResultDto"> <select id="getCitAssetDetialResult" resultMap="citAssetDetailResultDto">
SELECT SELECT
assets_list.id AS id, assets_list.id AS id,
...@@ -336,4 +337,15 @@ ...@@ -336,4 +337,15 @@
AND asset_detail_group.detail_group_type = #{assetDetailType,jdbcType=INTEGER} AND asset_detail_group.detail_group_type = #{assetDetailType,jdbcType=INTEGER}
</select> </select>
<select id="getSumData" resultType="pwc.taxtech.atms.dpo.CitAssetSumDataDto">
select
sum(account_acquisition_value) as totalAccountAcquisitionValue,
sum(account_year_depreciation_amount) as totalAccountYearDepreciationAmount,
sum(tax_current_year_depreciation_amount) as totalTaxCurrentYearDepreciationAmount,
sum(if(is_retain=1, year_difference_amount,0)) as totalYearDifferenceAmount
from assets_list
where status = 1
and project_id = #{projectId,jdbcType=VARCHAR}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -340,26 +340,26 @@ function ($scope, $rootScope, $location, $q, $log, $timeout, $state, $translate, ...@@ -340,26 +340,26 @@ function ($scope, $rootScope, $location, $q, $log, $timeout, $state, $translate,
}); });
} }
if (data[constant.citPermission.dataAnalysis.modelAnalysisCode]) { // if (data[constant.citPermission.dataAnalysis.modelAnalysisCode]) {
$scope.menus.push({ // $scope.menus.push({
name: 'analyzeReport', state: 'analyzeLayout', num: 5, // name: 'analyzeReport', state: 'analyzeLayout', num: 5,
permission: constant.citPermission.dataAnalysis.dataAnalysisCode, url: '#/cit/citAnalyzeLayout' // permission: constant.citPermission.dataAnalysis.dataAnalysisCode, url: '#/cit/citAnalyzeLayout'
}); // });
subMenus.push({ // subMenus.push({
name: 'analyzeLayout.analyzeReport', state: 'analyzeLayout.analyzeReport', num: 5, // name: 'analyzeLayout.analyzeReport', state: 'analyzeLayout.analyzeReport', num: 5,
permission: constant.citPermission.dataAnalysis.modelAnalysisCode, url: '#/cit/citAnalyzeLayout/citAnalyzeReport' // permission: constant.citPermission.dataAnalysis.modelAnalysisCode, url: '#/cit/citAnalyzeLayout/citAnalyzeReport'
}); // });
} // }
else if (data[constant.citPermission.dataAnalysis.dashboard.dashboardCode]) { // else if (data[constant.citPermission.dataAnalysis.dashboard.dashboardCode]) {
$scope.menus.push({ // $scope.menus.push({
name: 'analyzeReport', state: 'analyzeLayout', num: 5, // name: 'analyzeReport', state: 'analyzeLayout', num: 5,
permission: constant.citPermission.dataAnalysis.dataAnalysisCode, url: '#/cit/citAnalyzeLayout' // permission: constant.citPermission.dataAnalysis.dataAnalysisCode, url: '#/cit/citAnalyzeLayout'
}); // });
subMenus.push({ // subMenus.push({
name: 'analyzeLayout.analyzeOrganizeDashboard', state: 'analyzeLayout.analyzeOrganizeDashboard', num: 5, // name: 'analyzeLayout.analyzeOrganizeDashboard', state: 'analyzeLayout.analyzeOrganizeDashboard', num: 5,
permission: constant.citPermission.dataAnalysis.dashboard.dashboardCode, url: '#/cit/citAnalyzeLayout/citOrganizeDashboard' // permission: constant.citPermission.dataAnalysis.dashboard.dashboardCode, url: '#/cit/citAnalyzeLayout/citOrganizeDashboard'
}); // });
} // }
} }
}); });
...@@ -562,7 +562,8 @@ function ($scope, $rootScope, $location, $q, $log, $timeout, $state, $translate, ...@@ -562,7 +562,8 @@ function ($scope, $rootScope, $location, $q, $log, $timeout, $state, $translate,
} }
$rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams, options) { $rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams, options) {
var mainMenu = ['cit.importData', 'cit.previewData', 'cit.reductionData', 'cit.citAnalyzeLayout']; // var mainMenu = ['cit.importData', 'cit.previewData', 'cit.reductionData', 'cit.citAnalyzeLayout'];
var mainMenu = ['cit.importData', 'cit.previewData', 'cit.reductionData'];
if (citSessionService.dataChanged) { if (citSessionService.dataChanged) {
event.preventDefault(); event.preventDefault();
SweetAlert.swal(msgboxOptions, function (isConfirm) { SweetAlert.swal(msgboxOptions, function (isConfirm) {
......
...@@ -12,110 +12,26 @@ ...@@ -12,110 +12,26 @@
</div> </div>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><span translate="AccountCode"></span></td> <td><span translate="AssetGroupName"></span></td>
<td> <td><input class="form-control " type="text" id="assetGroupName" placeholder=""
<div class="input-group"> ng-model="filterData.assetGroupName"></td>
<input class="form-control " type="text" id="accountCode" placeholder=""
ng-model="filterData.accountCode">
<a class="input-group-addon btn btn-sm" ng-click="popTheParentCode()"><i
class="fa fa-columns" aria-hidden="true"></i></a>
</div>
</td>
</tr> </tr>
<tr> <tr>
<td><span translate="AccountName"></span></td> <td><span translate="DepreciationPeriod"></span></td>
<td><input class="form-control " type="text" id="accountName" placeholder=""
ng-model="filterData.accountName"></td>
</tr>
<tr>
<td><span translate="DebitOpeningBalance"></span></td>
<td> <td>
<div> <div class="input-group">
<input class="form-control input-width-small" style="width: 115px; text-align: right;" <input class="form-control " type="text" id="depreciationPeriod" placeholder=""
type="text" id="debitOpeningBalanceFrom" ng-keyup="PWC.inputNumberFormat(this);" ng-model="filterData.depreciationPeriod">
placeholder="" ng-model="filterData.debitOpeningBalanceFrom">
-
<input class="form-control input-width-small" style="width: 115px; text-align: right; "
type="text" id="debitOpeningBalanceTo" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.debitOpeningBalanceTo">
</div>
</td>
</tr>
<tr>
<td><span translate="CreditOpeningBalance"></span></td>
<td>
<div>
<input class="form-control input-width-small" style="width: 115px; text-align: right; "
type="text" id="creditOpeningBalanceFrom" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.creditOpeningBalanceFrom">
-
<input class="form-control input-width-small" style="width: 115px; text-align: right; "
type="text" id="creditOpeningBalanceTo" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.creditOpeningBalanceTo">
</div>
</td>
</tr>
<tr>
<td><span translate="AccumulatedDebitAmount"></span></td>
<td>
<div>
<input class="form-control input-width-small" style="width: 115px; text-align: right; "
type="text" id="accumulatedDebitAmountFrom" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.accumulatedDebitAmountFrom">
-
<input class="form-control input-width-small" style="width: 115px; text-align: right; "
type="text" id="accumulatedDebitAmountTo" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.accumulatedDebitAmountTo">
</div>
</td>
</tr>
<tr>
<td><span translate="AccumulatedCreditAmount"></span></td>
<td>
<div>
<input class="form-control input-width-small" style="width: 115px; text-align: right; "
type="text" id="accumulatedCreditAmountFrom" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.accumulatedCreditAmountFrom">
-
<input class="form-control input-width-small" style="width: 115px; text-align: right; "
type="text" id="accumulatedCreditAmountTo" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.accumulatedCreditAmountTo">
</div>
</td>
</tr>
<tr>
<td><span translate="DebitClosingBalance"></span></td>
<td>
<div>
<input class="form-control input-width-small" style="width: 115px; text-align: right; "
type="text" id="debitClosingBalanceFrom" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.debitClosingBalanceFrom">
-
<input class="form-control input-width-small" style="width: 115px; text-align: right; "
type="text" id="debitClosingBalanceTo" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.debitClosingBalanceTo">
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><span translate="CreditClosingBalance"></span></td> <td><span translate="TaxGroupType"></span></td>
<td> <td><input class="form-control " type="text" id="taxGroupType" placeholder=""
<div> ng-model="filterData.taxGroupType"></td>
<input class="form-control input-width-small" style="width: 115px; text-align: right;"
type="text" id="creditClosingBalanceFrom" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.creditClosingBalanceFrom">
-
<input class="form-control input-width-small" style="width: 115px; text-align: right; "
type="text" id="creditClosingBalanceTo" ng-keyup="PWC.inputNumberFormat(this);"
placeholder="" ng-model="filterData.creditClosingBalanceTo">
</div>
</td>
</tr> </tr>
</table> </table>
......
...@@ -266,21 +266,25 @@ ...@@ -266,21 +266,25 @@
var data = assetListData.data.list; var data = assetListData.data.list;
if (data) { if (data) {
var index = 1; var index = 1;
data.forEach(function (v) { // data.forEach(function (v) {
v.index = index++; // v.index = index++;
$scope.TotalAccountAcquisitionValue += v.accountAcquisitionValue; // $scope.TotalAccountAcquisitionValue += v.accountAcquisitionValue;
$scope.TotalAccountYearDepreciationAmount += v.accountYearDepreciationAmount; // $scope.TotalAccountYearDepreciationAmount += v.accountYearDepreciationAmount;
$scope.TotalTaxCurrentYearDepreciationAmount += v.taxCurrentYearDepreciationAmount; // $scope.TotalTaxCurrentYearDepreciationAmount += v.taxCurrentYearDepreciationAmount;
if(v.isRetain == 1){ // if(v.isRetain == 1){
$scope.TotalYearDifferenceAmount += v.yearDifferenceAmount; // $scope.TotalYearDifferenceAmount += v.yearDifferenceAmount;
} // }
}); // });
$scope.assetsResultData = data; $scope.assetsResultData = data;
// $scope.TotalCount = data.length; $scope.TotalCount = data.total;
$scope.TotalAccountAcquisitionValue = PWC.round($scope.TotalAccountAcquisitionValue, 2); // $scope.TotalAccountAcquisitionValue = PWC.round($scope.TotalAccountAcquisitionValue, 2);
$scope.TotalAccountYearDepreciationAmount = PWC.round($scope.TotalAccountYearDepreciationAmount, 2); // $scope.TotalAccountYearDepreciationAmount = PWC.round($scope.TotalAccountYearDepreciationAmount, 2);
$scope.TotalTaxCurrentYearDepreciationAmount = PWC.round($scope.TotalTaxCurrentYearDepreciationAmount, 2); // $scope.TotalTaxCurrentYearDepreciationAmount = PWC.round($scope.TotalTaxCurrentYearDepreciationAmount, 2);
$scope.TotalYearDifferenceAmount = PWC.round($scope.TotalYearDifferenceAmount, 2); // $scope.TotalYearDifferenceAmount = PWC.round($scope.TotalYearDifferenceAmount, 2);
$scope.TotalAccountAcquisitionValue = PWC.round(data[0].totalAccountAcquisitionValue, 2);
$scope.TotalAccountYearDepreciationAmount = PWC.round(data[0].totalAccountYearDepreciationAmount, 2);
$scope.TotalTaxCurrentYearDepreciationAmount = PWC.round(data[0].totalTaxCurrentYearDepreciationAmount, 2);
$scope.TotalYearDifferenceAmount = PWC.round(data[0].totalYearDifferenceAmount, 2);
} }
$scope.pagingOptions.totalItems = assetListData.data.total; $scope.pagingOptions.totalItems = assetListData.data.total;
}); });
...@@ -976,16 +980,11 @@ ...@@ -976,16 +980,11 @@
(function initialize() { (function initialize() {
//分页的设置 //分页的设置
debugger; debugger;
//分页的设置
$scope.pagingOptions = { $scope.pagingOptions = {
pageIndex: 1, //当前页码 pageIndex: 1, //当前页码
pageSize: constant.page.pageSizeArrary[3], //每页多少条数据
totalItems: 0, //总数据 totalItems: 0, //总数据
totalPages: 0,//总页数 pageSize: 100, //每页多少条数据
pageSizeString: constant.page.pageSizeArrary[3].toString(),
firstPage: '<<', //$translate.instant('PagingFirstPage'),
previousPage: '<', //$translate.instant('PagingPreviousPage'),
nextPage:'>',// $translate.instant('PagingNextPage'),
lastPage: '>>' //$translate.instant('PagingLastPage'),
}; };
/**************************************** function start*************************************************/ /**************************************** function start*************************************************/
$scope.displayType = 2; $scope.displayType = 2;
...@@ -996,6 +995,8 @@ ...@@ -996,6 +995,8 @@
$scope.initIncomeInvoiceTotalColumnsIndex = []; $scope.initIncomeInvoiceTotalColumnsIndex = [];
$scope.changeSheet = changeSheet; $scope.changeSheet = changeSheet;
debugger; debugger;
function init(){
initColumns(); initColumns();
initDxGrid(); initDxGrid();
initAssetResultDxGrid(); initAssetResultDxGrid();
...@@ -1004,6 +1005,8 @@ ...@@ -1004,6 +1005,8 @@
getGroupList(); getGroupList();
getGroupDetailList(); getGroupDetailList();
getUserPermission(); getUserPermission();
}
init();
// $scope.$watch('fileNameWrapper', function (newValue, oldValue) { // $scope.$watch('fileNameWrapper', function (newValue, oldValue) {
// if (newValue != null && newValue !== oldValue) { // if (newValue != null && newValue !== oldValue) {
// //设置上传文件名 // //设置上传文件名
......
...@@ -78,10 +78,10 @@ function ($scope, $q, $log, $translate, $location, loginContext, enums, vatSessi ...@@ -78,10 +78,10 @@ function ($scope, $q, $log, $translate, $location, loginContext, enums, vatSessi
name: 'caculateData', permission: constant.citPermission.dataManage.caculateDataCode, name: 'caculateData', permission: constant.citPermission.dataManage.caculateDataCode,
text: $translate.instant('caculateData'), icon: 'fa fa-random' text: $translate.instant('caculateData'), icon: 'fa fa-random'
}, },
{ // {
name: 'accountMapping', permission: constant.citPermission.dataManage.accountMappingCode, // name: 'accountMapping', permission: constant.citPermission.dataManage.accountMappingCode,
text: $translate.instant('accountMapping'), icon: 'fa fa-map' // text: $translate.instant('accountMapping'), icon: 'fa fa-map'
}, // },
{ {
name: 'assetEamMapping', permission: constant.citPermission.dataManage.assetEamMapping, name: 'assetEamMapping', permission: constant.citPermission.dataManage.assetEamMapping,
text: $translate.instant('AssetEamMapping'), icon: 'fa fa-map' text: $translate.instant('AssetEamMapping'), icon: 'fa fa-map'
......
...@@ -597,7 +597,7 @@ debugger; ...@@ -597,7 +597,7 @@ debugger;
if($scope.timer){ if($scope.timer){
$interval.cancel($scope.timer); $interval.cancel($scope.timer);
vatCommonService.setProjectStatus(vatSessionService.project.id, vatSessionService.month, constant.ProjectStatusEnum.Generated vatCommonService.setProjectStatus(vatSessionService.project.id, -1, constant.ProjectStatusEnum.Generated
, constant.DictionaryDictKey.WFDataProcess, enums.FinishStatusEnum.Finished); , constant.DictionaryDictKey.WFDataProcess, enums.FinishStatusEnum.Finished);
} }
}else if(job.jobStatus=='Running'|| job.jobStatus=='Error'){ }else if(job.jobStatus=='Running'|| job.jobStatus=='Error'){
......
...@@ -59,6 +59,7 @@ controller('editTemplategroupModalController', ['$scope', '$log', '$translate', ...@@ -59,6 +59,7 @@ controller('editTemplategroupModalController', ['$scope', '$log', '$translate',
// 获取sheet列表 // 获取sheet列表
getSheetList: function() { getSheetList: function() {
debugger;
if (!$scope.editModel || !$scope.editModel.file) { if (!$scope.editModel || !$scope.editModel.file) {
return; return;
} }
...@@ -544,12 +545,26 @@ controller('editTemplategroupModalController', ['$scope', '$log', '$translate', ...@@ -544,12 +545,26 @@ controller('editTemplategroupModalController', ['$scope', '$log', '$translate',
// 修改报表名称 // 修改报表名称
$scope.saveUpdateTemplateGroupName = function () { $scope.saveUpdateTemplateGroupName = function () {
debugger;
$scope.validateName(); $scope.validateName();
if ($scope.editModel.nameError) { if ($scope.editModel.nameError) {
return; return;
} }
templateGroupService.addTemplateGroupWithoutTemplate($scope.editModel).success(function (ret) { //此处报错(Converting circular structure to JSON),因时间关系采取快捷方案
var addTemplateGroupModel = {
groupType: $scope.editModel.groupType,
industryIds: $scope.editModel.industryIDs,
name: $scope.editModel.name,
nameError: $scope.editModel.nameError,
reportType: $scope.editModel.reportType,
serviceTypeId: $scope.editModel.serviceTypeID,
title:$scope.editModel.title
};
templateGroupService.addTemplateGroupWithoutTemplate(addTemplateGroupModel).success(function (ret) {
debugger;
if (ret.result) { if (ret.result) {
// 添加成功 // 添加成功
modalInstance.close($scope.editModel); modalInstance.close($scope.editModel);
...@@ -607,7 +622,7 @@ controller('editTemplategroupModalController', ['$scope', '$log', '$translate', ...@@ -607,7 +622,7 @@ controller('editTemplategroupModalController', ['$scope', '$log', '$translate',
// 修改TemplateGroupName // 修改TemplateGroupName
var updateTemplateName = function(model) { var updateTemplateName = function(model) {
debugger;
$scope.validateName(); $scope.validateName();
if ($scope.editModel.nameError) { if ($scope.editModel.nameError) {
return; return;
...@@ -635,7 +650,7 @@ controller('editTemplategroupModalController', ['$scope', '$log', '$translate', ...@@ -635,7 +650,7 @@ controller('editTemplategroupModalController', ['$scope', '$log', '$translate',
// 修改报表名称 // 修改报表名称
$scope.saveUpdateTemplateGroupName = function() { $scope.saveUpdateTemplateGroupName = function() {
// thisDataService.saveFindAdd(modalInstance) // thisDataService.saveFindAdd(modalInstance)
debugger;
var model = { var model = {
id: $scope.editModel.id, id: $scope.editModel.id,
name: $scope.editModel.name, name: $scope.editModel.name,
......
...@@ -171,11 +171,12 @@ ...@@ -171,11 +171,12 @@
}, },
__RequestVerificationToken: token, __RequestVerificationToken: token,
withCredentials: true withCredentials: true
}).then(function(resp) { }).then(function(data) {
var resp = data.data;
debugger; debugger;
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (resp.result || resp.data) { if (resp.result) {
debugger; debugger;
logDto.UpdateState = $translate.instant('ImportSuccess'); logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
...@@ -183,7 +184,7 @@ ...@@ -183,7 +184,7 @@
} else { } else {
debugger; debugger;
if (resp.resultMsg && resp.resultMsg.length > 0) { if (resp.resultMsg && resp.resultMsg.length > 0) {
SweetAlert.warning($translate.instant(resp.resultMsg)); SweetAlert.warning(resp.resultMsg);
}else{ }else{
SweetAlert.error($translate.instant('ImportFailed')); SweetAlert.error($translate.instant('ImportFailed'));
} }
......
...@@ -696,14 +696,22 @@ ...@@ -696,14 +696,22 @@
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(precition)); + '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(precition));
} }
else { // For 报表数据源 and BSPL数据源 else { // For 报表数据源 and BSPL数据源
if ($scope.detail.dataGridSource && $scope.detail.dataGridSource.length > 0) { if ($scope.detail.dataGridSource && $scope.detail.dataGridSource.length > 0) {
//判断是否是动态生成sheet
if(new Number($scope.detail.cellTemplateId)<0){
$("#dataGridFooterSummary").html("");
}else{
evalVal = _.reduce($scope.detail.dataGridSource, function (memo, x) { evalVal = _.reduce($scope.detail.dataGridSource, function (memo, x) {
return memo + x.cellValue; return memo + x.cellValue;
}, 0); }, 0);
$("#dataGridFooterSummary").html($translate.instant('Conclusion') + $("#dataGridFooterSummary").html($translate.instant('Conclusion') +
'&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(precition)); '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(precition));
} }
}
else { else {
var summaryExp = ''; var summaryExp = '';
if (isShowCellNameSummary && !_.isEmpty($scope.detail.summaryExp) if (isShowCellNameSummary && !_.isEmpty($scope.detail.summaryExp)
...@@ -1209,13 +1217,13 @@ ...@@ -1209,13 +1217,13 @@
alignment: 'left', alignment: 'left',
width: '16%' width: '16%'
}, },
{dataField: 'project', caption: $translate.instant('Project'), alignment: 'left', width: '25%'}, // {dataField: 'project', caption: $translate.instant('Project'), alignment: 'left', width: '25%'},
{ // {
dataField: 'reportColumn', // dataField: 'reportColumn',
caption: $translate.instant('TaxReportColumn'), // caption: $translate.instant('TaxReportColumn'),
alignment: 'left', // alignment: 'left',
width: '17%' // width: '17%'
}, // },
{ {
dataField: 'cellName', dataField: 'cellName',
caption: $translate.instant('CellColumn'), caption: $translate.instant('CellColumn'),
......
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
<label class="cell-info-subject-label">{{'CellColumn' | translate}}:</label> <label class="cell-info-subject-label">{{'CellColumn' | translate}}:</label>
{{numToExcelChar(detail.rowIndex, detail.columnIndex)}} {{numToExcelChar(detail.rowIndex, detail.columnIndex)}}
</div> </div>
<div class="cell-info-subject"> <!--<div class="cell-info-subject">-->
<label class="cell-info-subject-label">{{'RowName' | translate}}:</label> <!--<label class="cell-info-subject-label">{{'RowName' | translate}}:</label>-->
{{detail.cellInfo.project}} <!--{{detail.cellInfo.project}}-->
</div> <!--</div>-->
<div class="cell-info-subject"> <!--<div class="cell-info-subject">-->
<label class="cell-info-subject-label">{{'ColumnName' | translate}}:</label> <!--<label class="cell-info-subject-label">{{'ColumnName' | translate}}:</label>-->
{{detail.cellInfo.column}} <!--{{detail.cellInfo.column}}-->
</div> <!--</div>-->
<div class="cell-info-subject"> <div class="cell-info-subject">
<label class="cell-info-subject-label">{{'Formula' | translate}}</label> <label class="cell-info-subject-label">{{'Formula' | translate}}</label>
<formula-translator formula-list="formulaList" key-value-list="keyValueList" include-optional="false" <formula-translator formula-list="formulaList" key-value-list="keyValueList" include-optional="false"
...@@ -210,14 +210,14 @@ ...@@ -210,14 +210,14 @@
<label class="cell-info-subject-label">{{'CellColumn' | translate}}:</label> <label class="cell-info-subject-label">{{'CellColumn' | translate}}:</label>
{{numToExcelChar(detail.rowIndex, detail.columnIndex)}} {{numToExcelChar(detail.rowIndex, detail.columnIndex)}}
</div> </div>
<div class="cell-info-subject"> <!--<div class="cell-info-subject">-->
<label class="cell-info-subject-label">{{'RowName' | translate}}:</label> <!--<label class="cell-info-subject-label">{{'RowName' | translate}}:</label>-->
{{detail.cellInfo.project}} <!--{{detail.cellInfo.project}}-->
</div> <!--</div>-->
<div class="cell-info-subject"> <!--<div class="cell-info-subject">-->
<label class="cell-info-subject-label">{{'ColumnName' | translate}}:</label> <!--<label class="cell-info-subject-label">{{'ColumnName' | translate}}:</label>-->
{{detail.cellInfo.column}} <!--{{detail.cellInfo.column}}-->
</div> <!--</div>-->
<div class="cell-info-subject"> <div class="cell-info-subject">
<label class="cell-info-subject-label">{{'Formula' | translate}}</label> <label class="cell-info-subject-label">{{'Formula' | translate}}</label>
<formula-translator formula-list="formulaList" key-value-list="keyValueList" <formula-translator formula-list="formulaList" key-value-list="keyValueList"
......
...@@ -620,12 +620,12 @@ ...@@ -620,12 +620,12 @@
//todo: according to element to get the detail data //todo: according to element to get the detail data
var outItems; var outItems;
var convert = false; var convert = false;
if (element.items.length === 1) { // if (element.items.length === 1) {
outItems = JSON.parse(element.items[0]); // outItems = JSON.parse(element.items[0]);
} else { // } else {
outItems = element.items; outItems = element.items;
convert = true; convert = true;
} // }
//todo: according to element to get the detail data //todo: according to element to get the detail data
angular.forEach(outItems, function (jsonData) { angular.forEach(outItems, function (jsonData) {
......
...@@ -695,19 +695,19 @@ constant.citPermission = { ...@@ -695,19 +695,19 @@ constant.citPermission = {
reviewCode: '03.004.005.004', reviewCode: '03.004.005.004',
}, },
}, },
dataAnalysis: { // dataAnalysis: {
dataAnalysisCode: '03.005', // dataAnalysisCode: '03.005',
modelAnalysisCode: '03.005.001', // modelAnalysisCode: '03.005.001',
modelAnalysis: { // modelAnalysis: {
queryCode: '03.005.001.001', // queryCode: '03.005.001.001',
filterCode: '03.005.001.005' // filterCode: '03.005.001.005'
}, // },
dashboard: { // dashboard: {
dashboardCode: '03.005.002', // dashboardCode: '03.005.002',
querySummaryDashboardCode: '03.005.002.001', // querySummaryDashboardCode: '03.005.002.001',
singleOrgIndexDashboardCode: '03.005.002.002', // singleOrgIndexDashboardCode: '03.005.002.002',
} // }
}, // },
}; };
// 权限代码 // 权限代码
...@@ -929,7 +929,7 @@ constant.citMenuList = [ ...@@ -929,7 +929,7 @@ constant.citMenuList = [
constant.citPermission.dataPreview.assetsList.queryCode, constant.citPermission.dataPreview.assetsList.queryCode,
constant.citPermission.dataPreview.salaryAdvance.queryCode, constant.citPermission.dataPreview.salaryAdvance.queryCode,
constant.citPermission.dataPreview.eamDisposal.queryCode, constant.citPermission.dataPreview.eamDisposal.queryCode,
constant.citPermission.dataManage.accountMappingCode, // constant.citPermission.dataManage.accountMappingCode,
constant.citPermission.dataManage.caculateDataCode, constant.citPermission.dataManage.caculateDataCode,
constant.citPermission.reportView.bsplCode, constant.citPermission.reportView.bsplCode,
...@@ -937,8 +937,8 @@ constant.citMenuList = [ ...@@ -937,8 +937,8 @@ constant.citMenuList = [
constant.citPermission.reportView.workingPaperTypeCode, constant.citPermission.reportView.workingPaperTypeCode,
constant.citPermission.reportView.taxReturnCode, constant.citPermission.reportView.taxReturnCode,
constant.citPermission.reportView.otherReportCode, constant.citPermission.reportView.otherReportCode,
constant.citPermission.dataAnalysis.modelAnalysisCode, // constant.citPermission.dataAnalysis.modelAnalysisCode,
constant.citPermission.dataAnalysis.dashboard.dashboardCode, // constant.citPermission.dataAnalysis.dashboard.dashboardCode,
]; ];
constant.basicDataUrl = { constant.basicDataUrl = {
......
...@@ -205,9 +205,9 @@ ...@@ -205,9 +205,9 @@
<img src="{{result.finalStatus}}" /> <img src="{{result.finalStatus}}" />
</div> </div>
<div class="body-name"> <div class="body-name">
<div class="org-name"><span>{{'TaxBurdenRatio' | translate}}: </span><span>{{result.taxRate}}%</span></div> <!--<div class="org-name"><span>{{'TaxBurdenRatio' | translate}}: </span><span>{{result.taxRate}}%</span></div>-->
<!--<div class="org-name" ng-show="serviceTypeId ==='6'"><span>预缴额: </span><span>{{result.prepadidTaxAmount | number}}元</span></div>--> <!--<div class="org-name" ng-show="serviceTypeId ==='6'"><span>预缴额: </span><span>{{result.prepadidTaxAmount | number}}元</span></div>-->
<div class="org-name"><span>{{'TaxPayment' | translate}}: </span><span>{{result.taxAmount | number}}{{'Yuan' | translate}}</span></div> <!--<div class="org-name"><span>{{'TaxPayment' | translate}}: </span><span>{{result.taxAmount | number}}{{'Yuan' | translate}}</span></div>-->
<div class="org-name"><span>{{'ProjectPeriod' | translate}}: </span><span> {{result.periodDate}}</span></div> <div class="org-name"><span>{{'ProjectPeriod' | translate}}: </span><span> {{result.periodDate}}</span></div>
</div> </div>
......
...@@ -385,14 +385,14 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer ...@@ -385,14 +385,14 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
} }
if (data[constant.vatPermission.dataAnalysis.modelAnalysisCode]) { if (data[constant.vatPermission.dataAnalysis.modelAnalysisCode]) {
$scope.menus.push({ // $scope.menus.push({
name: 'analyzeLayout', state: 'analyzeLayout', num: 5, // name: 'analyzeLayout', state: 'analyzeLayout', num: 5,
permission: constant.vatPermission.dataAnalysis.dataAnalysisCode, url: '#/vat/analyzeLayout' // permission: constant.vatPermission.dataAnalysis.dataAnalysisCode, url: '#/vat/analyzeLayout'
}); // });
subMenus.push({ // subMenus.push({
name: 'analyzeLayout.analyzeReport', state: 'analyzeLayout.analyzeReport', num: 5, // name: 'analyzeLayout.analyzeReport', state: 'analyzeLayout.analyzeReport', num: 5,
permission: constant.vatPermission.dataAnalysis.modelAnalysisCode, url: '#/vat/analyzeLayout/analyzeReport' // permission: constant.vatPermission.dataAnalysis.modelAnalysisCode, url: '#/vat/analyzeLayout/analyzeReport'
}); // });
} }
//else if (data[constant.vatPermission.dataAnalysis.dashboard.dashboardCode]) { //else if (data[constant.vatPermission.dataAnalysis.dashboard.dashboardCode]) {
// $scope.menus.push({ // $scope.menus.push({
...@@ -406,14 +406,14 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer ...@@ -406,14 +406,14 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
//} //}
else { else {
//data[constant.vatPermission.dataAnalysis.vatTaxDifferenceCode] //data[constant.vatPermission.dataAnalysis.vatTaxDifferenceCode]
$scope.menus.push({ // $scope.menus.push({
name: 'analyzeLayout', state: 'analyzeLayout', num: 5, // name: 'analyzeLayout', state: 'analyzeLayout', num: 5,
permission: constant.vatPermission.dataAnalysis.dataAnalysisCode, url: '#/vat/analyzeLayout' // permission: constant.vatPermission.dataAnalysis.dataAnalysisCode, url: '#/vat/analyzeLayout'
}); // });
subMenus.push({ // subMenus.push({
name: 'analyzeLayout.vatTaxDifference', state: 'analyzeLayout.vatTaxDifference', num: 5, // name: 'analyzeLayout.vatTaxDifference', state: 'analyzeLayout.vatTaxDifference', num: 5,
permission: constant.vatPermission.dataAnalysis.vatTaxDifferenceCode, url: '#/analyzeLayout/vatTaxDifference' // permission: constant.vatPermission.dataAnalysis.vatTaxDifferenceCode, url: '#/analyzeLayout/vatTaxDifference'
}); // });
} }
} }
}); });
......
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