Commit 320b1972 authored by Cheng C Yang's avatar Cheng C Yang

Balance Sheet and Profit table

parent 1c0ecab1
......@@ -37,6 +37,13 @@ public class DataPreviewController extends BaseController {
return dataPreviewSerivceImpl.getPLDataForDisplay(param);
}
//TODO 利润表
@PostMapping("getPLStatementDataForDisplay")
public PageInfo<ProfitLossStatementDto> getPLStatementDataForDisplay(@RequestBody ProfitLossStatementParam param) {
logger.debug(String.format("利润表查询 Condition:%s", JSON.toJSONString(param)));
return dataPreviewSerivceImpl.getPLStatementDataForDisplay(param);
}
@PostMapping("getJEDataForDisplay")
public PageInfo<JournalEntryDto> getJEDataForDisplay(@RequestBody JournalEntryParam param) {
logger.debug(String.format("日记账查询 Condition:%s", JSON.toJSONString(param)));
......@@ -55,6 +62,12 @@ public class DataPreviewController extends BaseController {
return dataPreviewSerivceImpl.getBSDataForDisplay(param);
}
@PostMapping("getBalanceSheetDataForDisplay")
public PageInfo<BalanceSheetDto> getBalanceSheetDataForDisplay(@RequestBody BalanceSheetParam param) {
logger.debug(String.format("资产负债表查询 Condition:%s", JSON.toJSONString(param)));
return dataPreviewSerivceImpl.getBalanceSheetDataForDisplay(param);
}
@PostMapping("getIRDataForDisplay")
public PageInfo<InvoiceRecordDto> getIRDataForDisplay(@RequestBody InvoiceRecordParam param) {
logger.debug(String.format("发票记录表查询 Condition:%s", JSON.toJSONString(param)));
......@@ -88,7 +101,7 @@ public class DataPreviewController extends BaseController {
@RequestMapping(value = "exportCFData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadCFQueryData(@RequestBody CashFlowParam param, HttpServletResponse response) {
logger.debug("enter downloadCFQueryData");
String fileName="testFile";
String fileName = "testFile";
dataPreviewSerivceImpl.exportCashFlowList(response, param, fileName);
}
......@@ -112,7 +125,7 @@ public class DataPreviewController extends BaseController {
response.setStatus(SC_OK);
}
} catch (IOException e) {
logger.error(String.format("下载科目余额表-生成文件异常:%s",e.getMessage()));
logger.error(String.format("下载科目余额表-生成文件异常:%s", e.getMessage()));
}
}
......@@ -136,7 +149,7 @@ public class DataPreviewController extends BaseController {
response.setStatus(SC_OK);
}
} catch (IOException e) {
logger.error(String.format("下载科目余额表-生成文件异常:%s",e.getMessage()));
logger.error(String.format("下载科目余额表-生成文件异常:%s", e.getMessage()));
}
}
......@@ -160,7 +173,31 @@ public class DataPreviewController extends BaseController {
response.setStatus(SC_OK);
}
} catch (IOException e) {
logger.error(String.format("下载科目余额表-生成文件异常:%s",e.getMessage()));
logger.error(String.format("下载科目余额表-生成文件异常:%s", e.getMessage()));
}
}
@RequestMapping(value = "exportBalanceSheetData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadBalanceSheetQueryData(@RequestBody BalanceSheetParam paras, HttpServletResponse response) {
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.addHeader("Access-Control-Expose-Headers", "Content-Type,Content-Disposition,x-file-name");
String fileName = paras.getPeriodStart() + "-" + paras.getPeriodEnd();
response.setCharacterEncoding("UTF-8");
OutputStream os = null;
try {
response.addHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.addHeader("x-file-name", fileName);
os = response.getOutputStream();
int count = dataPreviewSerivceImpl.getBalanceSheetDownloadFilePath(paras, os);
if (count == 0) {
response.setStatus(SC_NO_CONTENT);
} else {
response.setStatus(SC_OK);
}
} catch (IOException e) {
logger.error(String.format("下载科目余额表-生成文件异常:%s", e.getMessage()));
}
}
......@@ -184,42 +221,66 @@ public class DataPreviewController extends BaseController {
response.setStatus(SC_OK);
}
} catch (IOException e) {
logger.error(String.format("下载科目余额表-生成文件异常:%s",e.getMessage()));
logger.error(String.format("下载科目余额表-生成文件异常:%s", e.getMessage()));
}
}
@RequestMapping(value = "exportPLStatementData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadPLStatementQueryData(@RequestBody ProfitLossStatementParam paras, HttpServletResponse response) {
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.addHeader("Access-Control-Expose-Headers", "Content-Type,Content-Disposition,x-file-name");
String fileName = paras.getPeriodStart() + "-" + paras.getPeriodEnd();
response.setCharacterEncoding("UTF-8");
OutputStream os = null;
try {
response.addHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.addHeader("x-file-name", fileName);
os = response.getOutputStream();
int count = dataPreviewSerivceImpl.getPLStatementDownloadFilePath(paras, os);
if (count == 0) {
response.setStatus(SC_NO_CONTENT);
} else {
response.setStatus(SC_OK);
}
} catch (IOException e) {
logger.error(String.format("下载科目余额表-生成文件异常:%s", e.getMessage()));
}
}
@RequestMapping(value = "exportIRData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadIRQueryData(@RequestBody InvoiceRecordParam param, HttpServletResponse response) {
logger.debug("enter downloadIRQueryData");
String fileName="testFile";
String fileName = "testFile";
dataPreviewSerivceImpl.exportInvoiceRecordList(response, param, fileName);
}
@RequestMapping(value = "exportCILData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadCILQueryData(@RequestBody CertifiedInvoicesListParam param, HttpServletResponse response) {
logger.debug("enter downloadCILQueryData");
String fileName="testFile";
String fileName = "testFile";
dataPreviewSerivceImpl.exportCILList(response, param, fileName);
}
@RequestMapping(value = "exportRLITData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadRLITQueryData(@RequestBody RedLetterInfoTableParam param, HttpServletResponse response) {
logger.debug("enter downloadRLITQueryData");
String fileName="testFile";
String fileName = "testFile";
dataPreviewSerivceImpl.exportRLITList(response, param, fileName);
}
@RequestMapping(value = "exportCPRData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadCPRQueryData(@RequestBody CoupaPurchasingReportParam param, HttpServletResponse response) {
logger.debug("enter downloadCPRQueryData");
String fileName="testFile";
String fileName = "testFile";
dataPreviewSerivceImpl.exportCPRList(response, param, fileName);
}
@RequestMapping(value = "exportIDData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadIDQueryData(@RequestBody InvoiceDataParam param, HttpServletResponse response) {
logger.debug("enter downloadIDQueryData");
String fileName="testFile";
String fileName = "testFile";
dataPreviewSerivceImpl.exportIDList(response, param, fileName);
}
......
......@@ -43,12 +43,18 @@ public class DataPreviewSerivceImpl extends BaseService {
@Resource
private ProfitLossStatementPrcMapper profitLossStatementPrcMapper;
@Resource
private ProfitLossStatementMapper profitLossStatementMapper;
@Resource
private JournalEntryMapper journalEntryMapper;
@Resource
private BalanceSheetPrcMapper balanceSheetPrcMapper;
@Resource
private BalanceSheetMapper balanceSheetMapper;
@Resource
private CashFlowMapper cashFlowMapper;
......@@ -87,7 +93,7 @@ public class DataPreviewSerivceImpl extends BaseService {
trialBalanceDtos.add(trialBalanceDto);
});
PageInfo<TrialBalanceDto> pageInfo =new PageInfo<>(trialBalanceDtos);
PageInfo<TrialBalanceDto> pageInfo = new PageInfo<>(trialBalanceDtos);
pageInfo.setTotal(page.getTotal());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
......@@ -108,7 +114,28 @@ public class DataPreviewSerivceImpl extends BaseService {
profitLossDtos.add(profitLossDto);
});
PageInfo<ProfitLossStatementDto> pageInfo =new PageInfo<>(profitLossDtos);
PageInfo<ProfitLossStatementDto> pageInfo = new PageInfo<>(profitLossDtos);
pageInfo.setTotal(page.getTotal());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
return pageInfo;
}
public PageInfo<ProfitLossStatementDto> getPLStatementDataForDisplay(ProfitLossStatementParam param) {
ProfitLossStatementCondition condition = beanUtil.copyProperties(param, new ProfitLossStatementCondition());
Page page = PageHelper.startPage(condition.getPageInfo().getPageIndex(), condition.getPageInfo().getPageSize());
List<ProfitLossStatement> profitLossStatements = profitLossStatementMapper.selectByCondition(condition);
List<ProfitLossStatementDto> profitLossDtos = Lists.newArrayList();
profitLossStatements.forEach(pl -> {
ProfitLossStatementDto profitLossDto = new ProfitLossStatementDto();
beanUtil.copyProperties(pl, profitLossDto);
profitLossDtos.add(profitLossDto);
});
PageInfo<ProfitLossStatementDto> pageInfo = new PageInfo<>(profitLossDtos);
pageInfo.setTotal(page.getTotal());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
......@@ -129,7 +156,7 @@ public class DataPreviewSerivceImpl extends BaseService {
beanUtil.copyProperties(cf, cashFlowDto);
cashFlowDtos.add(cashFlowDto);
});
PageInfo<CashFlowDto> pageInfo=new PageInfo<>(cashFlowDtos);
PageInfo<CashFlowDto> pageInfo = new PageInfo<>(cashFlowDtos);
pageInfo.setTotal(total);
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
return pageInfo;
......@@ -150,8 +177,8 @@ public class DataPreviewSerivceImpl extends BaseService {
beanUtil.copyProperties(cf, cashFlowDto);
cashFlowDtos.add(cashFlowDto);
});
CashFlowHeader cashFlowHeader=new CashFlowHeader();
if(cashFlowDtos.size()>0){
CashFlowHeader cashFlowHeader = new CashFlowHeader();
if (cashFlowDtos.size() > 0) {
Organization org = organizationMapper.selectByPrimaryKey(param.getOrgId());
cashFlowHeader.setCompanyNameCn(org.getName());
cashFlowHeader.setPeriodStart(param.getPeriodStart());
......@@ -185,7 +212,7 @@ public class DataPreviewSerivceImpl extends BaseService {
journalEntryDtos.add(journalEntryDto);
});
PageInfo<JournalEntryDto> pageInfo =new PageInfo<>(journalEntryDtos);
PageInfo<JournalEntryDto> pageInfo = new PageInfo<>(journalEntryDtos);
pageInfo.setTotal(page.getTotal());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
......@@ -206,7 +233,28 @@ public class DataPreviewSerivceImpl extends BaseService {
balanceSheetDtos.add(balanceSheetDto);
});
PageInfo<BalanceSheetDto> pageInfo =new PageInfo<>(balanceSheetDtos);
PageInfo<BalanceSheetDto> pageInfo = new PageInfo<>(balanceSheetDtos);
pageInfo.setTotal(page.getTotal());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
return pageInfo;
}
public PageInfo<BalanceSheetDto> getBalanceSheetDataForDisplay(BalanceSheetParam param) {
BalanceSheetCondition condition = beanUtil.copyProperties(param, new BalanceSheetCondition());
Page page = PageHelper.startPage(condition.getPageInfo().getPageIndex(), condition.getPageInfo().getPageSize());
List<BalanceSheet> bsPrcList = balanceSheetMapper.selectByCondition(condition);
List<BalanceSheetDto> balanceSheetDtos = Lists.newArrayList();
bsPrcList.forEach(bs -> {
BalanceSheetDto balanceSheetDto = new BalanceSheetDto();
beanUtil.copyProperties(bs, balanceSheetDto);
balanceSheetDtos.add(balanceSheetDto);
});
PageInfo<BalanceSheetDto> pageInfo = new PageInfo<>(balanceSheetDtos);
pageInfo.setTotal(page.getTotal());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
......@@ -228,7 +276,7 @@ public class DataPreviewSerivceImpl extends BaseService {
invoiceRecordDtos.add(balanceSheetDto);
});
PageInfo<InvoiceRecordDto> pageInfo =new PageInfo<>(invoiceRecordDtos);
PageInfo<InvoiceRecordDto> pageInfo = new PageInfo<>(invoiceRecordDtos);
pageInfo.setTotal(page.getTotal());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
......@@ -249,7 +297,7 @@ public class DataPreviewSerivceImpl extends BaseService {
redLetterInfoDtos.add(redLetterInfoDto);
});
PageInfo<RedLetterInfoTableDto> pageInfo =new PageInfo<>(redLetterInfoDtos);
PageInfo<RedLetterInfoTableDto> pageInfo = new PageInfo<>(redLetterInfoDtos);
pageInfo.setTotal(page.getTotal());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
......@@ -271,7 +319,7 @@ public class DataPreviewSerivceImpl extends BaseService {
coupaPurchasingReportDtos.add(coupaPurchasingReportDto);
});
PageInfo<CoupaPurchasingReportDto> pageInfo =new PageInfo<>(coupaPurchasingReportDtos);
PageInfo<CoupaPurchasingReportDto> pageInfo = new PageInfo<>(coupaPurchasingReportDtos);
pageInfo.setTotal(page.getTotal());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
......@@ -291,7 +339,7 @@ public class DataPreviewSerivceImpl extends BaseService {
CertifiedInvoicesListDto CertifiedInvoicesListDto = beanUtil.copyProperties(cil, new CertifiedInvoicesListDto());
certifiedInvoicesListDtos.add(CertifiedInvoicesListDto);
});
PageInfo<CertifiedInvoicesListDto> pageInfo =new PageInfo<>(certifiedInvoicesListDtos);
PageInfo<CertifiedInvoicesListDto> pageInfo = new PageInfo<>(certifiedInvoicesListDtos);
pageInfo.setTotal(page.getTotal());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
return pageInfo;
......@@ -302,8 +350,9 @@ public class DataPreviewSerivceImpl extends BaseService {
* 导入时纵向存的,因为需求是行数一般不会增加,列数可能增加。查询时90度旋转
* 后续增加列 1、添加CountTypeConstant(按列递增) 2、增加setIDValue case 3、js添加column
* [param]
* @author Gary J Li
*
* @return
* @author Gary J Li
*/
public PageInfo<InvoiceDataDto> getIDDataForDisplay(InvoiceDataParam param) {
InvoiceDataCondition condition = beanUtil.copyProperties(param, new InvoiceDataCondition());
......@@ -311,7 +360,7 @@ public class DataPreviewSerivceImpl extends BaseService {
List<InvoiceData> invoiceDatas = invoiceDataMapper.selectByCondition(condition);
List<InvoiceDataDto> invoiceDataDtos = generalIDDtoList();
generalIDDtoList(invoiceDatas, invoiceDataDtos);
PageInfo<InvoiceDataDto> pageInfo =new PageInfo<>(invoiceDataDtos);
PageInfo<InvoiceDataDto> pageInfo = new PageInfo<>(invoiceDataDtos);
pageInfo.setTotal(invoiceDataDtos.size());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
return pageInfo;
......@@ -360,6 +409,27 @@ public class DataPreviewSerivceImpl extends BaseService {
}
}
public int getPLStatementDownloadFilePath(ProfitLossStatementParam param, OutputStream os) {
try {
ProfitLossStatementCondition condition = new ProfitLossStatementCondition();
beanUtil.copyProperties(param, condition);
List<ProfitLossStatement> profitLossStatements = profitLossStatementMapper.selectByCondition(condition);
Map<String, String> header = generalPLHeader();
List<ProfitLossStatementExportDto> cellList = new ArrayList<>();
profitLossStatements.forEach(pl -> {
ProfitLossStatementExportDto d = new ProfitLossStatementExportDto();
d = beanUtil.copyProperties(pl, d);
cellList.add(d);
});
ExcelUtil.exportExcel(header, cellList, os);
return cellList.size();
} catch (Exception e) {
logger.error("利润表导出转换Excel异常: %s", e.getMessage());
return 0;
}
}
public int getJEDownloadFilePath(JournalEntryParam param, OutputStream os) {
try {
JournalEntryCondition condition = new JournalEntryCondition();
......@@ -401,6 +471,26 @@ public class DataPreviewSerivceImpl extends BaseService {
}
}
public int getBalanceSheetDownloadFilePath(BalanceSheetParam param, OutputStream os) {
try {
BalanceSheetCondition condition = new BalanceSheetCondition();
beanUtil.copyProperties(param, condition);
List<BalanceSheet> balanceSheets = balanceSheetMapper.selectByCondition(condition);
Map<String, String> header = generalBSHeader();
List<BalanceSheetExportDto> cellList = new ArrayList<>();
balanceSheets.forEach(bs -> {
BalanceSheetExportDto d = new BalanceSheetExportDto();
d = beanUtil.copyProperties(bs, d);
cellList.add(d);
});
ExcelUtil.exportExcel(header, cellList, os);
return cellList.size();
} catch (Exception e) {
logger.error("资产负债表导出转换Excel异常: %s", e.getMessage());
return 0;
}
}
public HttpServletResponse exportInvoiceRecordList(HttpServletResponse response, InvoiceRecordParam param, String fileName) {
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
String excelTemplatePathInClassPath = ExportTemplatePathConstant.INVOICES_RECORD;
......@@ -415,7 +505,7 @@ public class DataPreviewSerivceImpl extends BaseService {
try {
return responseMessageBuilder.getDownloadTmpResponseMessage(response, outputStream, fileName);
} catch (Exception e) {
logger.error(String.format("导出发票记录异常:%s",e.getMessage()));
logger.error(String.format("导出发票记录异常:%s", e.getMessage()));
}
return null;
}
......@@ -425,7 +515,7 @@ public class DataPreviewSerivceImpl extends BaseService {
String excelTemplatePathInClassPath = ExportTemplatePathConstant.CERTIFIED_INVOICES_LIST;
CertifiedInvoicesListCondition condition = beanUtil.copyProperties(param, new CertifiedInvoicesListCondition());
List<CertifiedInvoicesList> datas = certifiedInvoicesListMapper.selectByCondition(condition);
if(datas.size()<1){
if (datas.size() < 1) {
throw new ServiceException(ErrorMessage.ExportFailed);
}
CertifiedInvoicesListHeader header = new CertifiedInvoicesListHeader();
......@@ -438,11 +528,11 @@ public class DataPreviewSerivceImpl extends BaseService {
CertifiedInvoicesListDto dto = beanUtil.copyProperties(cil, new CertifiedInvoicesListDto());
dtoList.add(dto);
});
OutputStream outputStream = commonDocumentHelper.toXlsxFileUsingJxls(header,dtoList, excelTemplatePathInClassPath);
OutputStream outputStream = commonDocumentHelper.toXlsxFileUsingJxls(header, dtoList, excelTemplatePathInClassPath);
try {
return responseMessageBuilder.getDownloadTmpResponseMessage(response, outputStream, fileName);
} catch (Exception e) {
logger.error(String.format("导出已认证发票清单异常:%s",e.getMessage()));
logger.error(String.format("导出已认证发票清单异常:%s", e.getMessage()));
}
return null;
}
......@@ -452,7 +542,7 @@ public class DataPreviewSerivceImpl extends BaseService {
String excelTemplatePathInClassPath = ExportTemplatePathConstant.COUPA_PURCHASING_REPORT;
CoupaPurchasingReportCondition condition = beanUtil.copyProperties(param, new CoupaPurchasingReportCondition());
List<CoupaPurchasingReport> datas = coupaPurchasingReportMapper.selectByCondition(condition);
if(datas.size()<1){
if (datas.size() < 1) {
throw new ServiceException(ErrorMessage.ExportFailed);
}
List<CoupaPurchasingReportDto> dtos = Lists.newArrayList();
......@@ -464,7 +554,7 @@ public class DataPreviewSerivceImpl extends BaseService {
try {
return responseMessageBuilder.getDownloadTmpResponseMessage(response, outputStream, fileName);
} catch (Exception e) {
logger.error(String.format("导出Coupa发票报告异常:%s",e.getMessage()));
logger.error(String.format("导出Coupa发票报告异常:%s", e.getMessage()));
}
return null;
}
......@@ -474,7 +564,7 @@ public class DataPreviewSerivceImpl extends BaseService {
String excelTemplatePathInClassPath = ExportTemplatePathConstant.RED_LETTER_INFO_TAB;
RedLetterInfoTableCondition condition = beanUtil.copyProperties(param, new RedLetterInfoTableCondition());
List<RedLetterInfoTable> datas = redLetterInfoTableMapper.selectByCondition(condition);
if(datas.size()<1){
if (datas.size() < 1) {
throw new ServiceException(ErrorMessage.ExportFailed);
}
List<RedLetterInfoTableDto> dtos = Lists.newArrayList();
......@@ -486,7 +576,7 @@ public class DataPreviewSerivceImpl extends BaseService {
try {
return responseMessageBuilder.getDownloadTmpResponseMessage(response, outputStream, fileName);
} catch (Exception e) {
logger.error(String.format("导出红字信息表异常:%s",e.getMessage()));
logger.error(String.format("导出红字信息表异常:%s", e.getMessage()));
}
return null;
}
......@@ -496,7 +586,7 @@ public class DataPreviewSerivceImpl extends BaseService {
String excelTemplatePathInClassPath = ExportTemplatePathConstant.INVOICE_DATA;
InvoiceDataCondition condition = beanUtil.copyProperties(param, new InvoiceDataCondition());
List<InvoiceData> datas = invoiceDataMapper.selectByCondition(condition);
if(datas.size()<1){
if (datas.size() < 1) {
throw new ServiceException(ErrorMessage.ExportFailed);
}
List<InvoiceDataDto> dtos = generalIDDtoList();
......@@ -505,221 +595,219 @@ public class DataPreviewSerivceImpl extends BaseService {
try {
return responseMessageBuilder.getDownloadTmpResponseMessage(response, outputStream, fileName);
} catch (Exception e) {
logger.error(String.format("导出发票资料异常:%s",e.getMessage()));
logger.error(String.format("导出发票资料异常:%s", e.getMessage()));
}
return null;
}
private Map<String, String> generalTBHeader() {
Map<String, String> header = new LinkedHashMap<>();
header.put("Date","数据日期");
header.put("Source","来源");
header.put("Period","期间");
header.put("LedgerId","账套ID");
header.put("LedgerName","账套名称");
header.put("CurrencyCode","账套币种");
header.put("Status","关账标识");
header.put("Category","主体性质");
header.put("AccountCategory","科目性质");
header.put("AcctCode1","一级科目代码");
header.put("AcctName1","一级科目说明");
header.put("AcctName2","二级科目说明");
header.put("AcctName3","三级科目说明");
header.put("Segment1","主体代码");
header.put("Segment2","成本中心代码");
header.put("Segment3","科目代码");
header.put("Segment4","辅助科目代码");
header.put("Segment5","利润中心代码");
header.put("Segment6","产品代码");
header.put("Segment7","项目代码");
header.put("Segment8","公司间代码");
header.put("Segment9","备用1代码");
header.put("Segment10","备用2代码");
header.put("Segment1Name","主体说明");
header.put("Segment2Name","成本中心说明");
header.put("Segment3Name","科目说明");
header.put("Segment4Name","辅助科目说明");
header.put("Segment5Name","利润中心说明");
header.put("Segment6Name","产品说明");
header.put("Segment7Name","项目说明");
header.put("Segment8Name","公司间说明");
header.put("Segment9Name","备用1说明");
header.put("Segment10Name","备用2说明");
header.put("BegBal","原币本期期初余额");
header.put("PeriodDr","原币本期借方发生额");
header.put("PeriodCr","原币本期贷方发生额");
header.put("EndBal","原币本期期末余额");
header.put("QtdDr","原币本季借方发生额");
header.put("QtdCr","原币本季贷方发生额");
header.put("YtdDr","原币本年借方发生额");
header.put("YtdCr","原币本年贷方发生额");
header.put("BegBalBeq","本位币本期期初余额");
header.put("PeriodDrBeq","本位币本期借方发生额");
header.put("PeriodCrBeq","本位币本期贷方发生额");
header.put("EndBalBeq","本位币本期期末余额");
header.put("QtdDrBeq","本位币本季借方发生额");
header.put("QtdCrBeq","本位币本季贷方发生额");
header.put("YtdDrBeq","本位币本年借方发生额");
header.put("YtdCrBeq","本位币本年贷方发生额");
header.put("Date", "数据日期");
header.put("Source", "来源");
header.put("Period", "期间");
header.put("LedgerId", "账套ID");
header.put("LedgerName", "账套名称");
header.put("CurrencyCode", "账套币种");
header.put("Status", "关账标识");
header.put("Category", "主体性质");
header.put("AccountCategory", "科目性质");
header.put("AcctCode1", "一级科目代码");
header.put("AcctName1", "一级科目说明");
header.put("AcctName2", "二级科目说明");
header.put("AcctName3", "三级科目说明");
header.put("Segment1", "主体代码");
header.put("Segment2", "成本中心代码");
header.put("Segment3", "科目代码");
header.put("Segment4", "辅助科目代码");
header.put("Segment5", "利润中心代码");
header.put("Segment6", "产品代码");
header.put("Segment7", "项目代码");
header.put("Segment8", "公司间代码");
header.put("Segment9", "备用1代码");
header.put("Segment10", "备用2代码");
header.put("Segment1Name", "主体说明");
header.put("Segment2Name", "成本中心说明");
header.put("Segment3Name", "科目说明");
header.put("Segment4Name", "辅助科目说明");
header.put("Segment5Name", "利润中心说明");
header.put("Segment6Name", "产品说明");
header.put("Segment7Name", "项目说明");
header.put("Segment8Name", "公司间说明");
header.put("Segment9Name", "备用1说明");
header.put("Segment10Name", "备用2说明");
header.put("BegBal", "原币本期期初余额");
header.put("PeriodDr", "原币本期借方发生额");
header.put("PeriodCr", "原币本期贷方发生额");
header.put("EndBal", "原币本期期末余额");
header.put("QtdDr", "原币本季借方发生额");
header.put("QtdCr", "原币本季贷方发生额");
header.put("YtdDr", "原币本年借方发生额");
header.put("YtdCr", "原币本年贷方发生额");
header.put("BegBalBeq", "本位币本期期初余额");
header.put("PeriodDrBeq", "本位币本期借方发生额");
header.put("PeriodCrBeq", "本位币本期贷方发生额");
header.put("EndBalBeq", "本位币本期期末余额");
header.put("QtdDrBeq", "本位币本季借方发生额");
header.put("QtdCrBeq", "本位币本季贷方发生额");
header.put("YtdDrBeq", "本位币本年借方发生额");
header.put("YtdCrBeq", "本位币本年贷方发生额");
return header;
}
private Map<String, String> generalBSHeader() {
Map<String, String> header = new LinkedHashMap<>();
header.put("Date","数据日期");
header.put("Source","来源");
header.put("Period","期间");
header.put("Status","关账标识");
header.put("LedgerId","账套ID");
header.put("LedgerName","账套名称");
header.put("LedgerCurrencyCode","账套币种");
header.put("EntityCode","机构编码");
header.put("EntityName","机构名称");
header.put("Category","主体性质");
header.put("Frequency","频度");
header.put("ItemName","项目名称");
header.put("EndBal","期末余额");
header.put("BegBal","年初余额");
header.put("PrcFlag","是否为国外");
header.put("Date", "数据日期");
header.put("Source", "来源");
header.put("Period", "期间");
header.put("Status", "关账标识");
header.put("LedgerId", "账套ID");
header.put("LedgerName", "账套名称");
header.put("LedgerCurrencyCode", "账套币种");
header.put("EntityCode", "机构编码");
header.put("EntityName", "机构名称");
header.put("Category", "主体性质");
header.put("Frequency", "频度");
header.put("ItemName", "项目名称");
header.put("EndBal", "期末余额");
header.put("BegBal", "年初余额");
header.put("PrcFlag", "是否为国外");
return header;
}
private Map<String, String> generalPLHeader() {
Map<String, String> header = new LinkedHashMap<>();
header.put("Date","数据日期");
header.put("Source","来源");
header.put("Period","期间");
header.put("Status","关账标识");
header.put("LedgerId","账套ID");
header.put("LedgerName","账套名称");
header.put("LedgerCurrencyCode","账套币种");
header.put("EntityCode","机构编码");
header.put("EntityName","机构名称");
header.put("Category","主体性质");
header.put("Frequency","频度");
header.put("ItemName","项目名称");
header.put("PeriodAmt","本期发生额");
header.put("YtdAmt","本年累计");
header.put("PrcFlag","是否为国外");
header.put("Date", "数据日期");
header.put("Source", "来源");
header.put("Period", "期间");
header.put("Status", "关账标识");
header.put("LedgerId", "账套ID");
header.put("LedgerName", "账套名称");
header.put("LedgerCurrencyCode", "账套币种");
header.put("EntityCode", "机构编码");
header.put("EntityName", "机构名称");
header.put("Category", "主体性质");
header.put("Frequency", "频度");
header.put("ItemName", "项目名称");
header.put("PeriodAmt", "本期发生额");
header.put("YtdAmt", "本年累计");
header.put("PrcFlag", "是否为国外");
return header;
}
private Map<String, String> generalJEHeader() {
Map<String, String> header = new LinkedHashMap<>();
header.put("Date","数据日期");
header.put("Source","来源");
header.put("LedgerId","账套ID");
header.put("LedgerName","账套名称");
header.put("CurrencyCode","账套币种");
header.put("Status","关账标识");
header.put("HeaderId","日记账头ID");
header.put("LineNum","日记账行号");
header.put("ApprovalStatus","审批状态");
header.put("PostedStatus","过账");
header.put("Period","会计期间");
header.put("AccountingDate","凭证日期");
header.put("JournalSource","日记账来源");
header.put("Category","日记账类别");
header.put("Name","日记账名称");
header.put("VoucherNum","凭证编号");
header.put("Description","摘要");
header.put("Segment1","主体代码");
header.put("Segment2","成本中心");
header.put("Segment3","科目代码");
header.put("Segment4","辅助科目");
header.put("Segment5","利润中心");
header.put("Segment6","产品");
header.put("Segment7","项目");
header.put("Segment8","公司间");
header.put("Segment9","备用1");
header.put("Segment10","备用2");
header.put("Segment1Name","主体说明");
header.put("Segment2Name","成本中心说明");
header.put("Segment3Name","科目说明");
header.put("Segment4Name","辅助科目说明");
header.put("Segment5Name","利润中心说明");
header.put("Segment6Name","产品说明");
header.put("Segment7Name","项目说明");
header.put("Segment8Name","公司间说明");
header.put("Segment9Name","备用1说明");
header.put("Segment10Name","备用2说明");
header.put("JournalCurrencyCode","币种");
header.put("SobCurrencyCode","本位币币种");
header.put("AccountedDr","借方金额");
header.put("AccountedCr","贷方金额");
header.put("EnteredDr","本位币借方金额");
header.put("EnteredCr","本位币贷方金额");
header.put("CfItem","现金流量表项");
header.put("Attribute1","城市");
header.put("Attribute2","交易日期");
header.put("Attribute3","对方银行账号");
header.put("Attribute4","银行流水号");
header.put("Attribute5","供应商编号");
header.put("Attribute6","交易单号");
header.put("Attribute7","供应商名称");
header.put("Attribute8","接收编码");
header.put("Attribute9","制单人");
header.put("Attribute10","审核人");
header.put("Attribute11","成本中心部门描述1");
header.put("Attribute12","成本中心部门描述2");
header.put("Attribute13","成本中心部门描述3");
header.put("Attribute14","成本中心部门描述4");
header.put("Attribute15","成本中心部门描述5");
header.put("Attribute16","成本中心部门描述6");
header.put("CreatedBy","创建人");
header.put("CreatedDate","创建日期");
header.put("LateUpdatedBy","最后更新人");
header.put("LateUpdatedDate","最后更新日期");
header.put("tmsPeriod","税务系统期间");
header.put("Date", "数据日期");
header.put("Source", "来源");
header.put("LedgerId", "账套ID");
header.put("LedgerName", "账套名称");
header.put("CurrencyCode", "账套币种");
header.put("Status", "关账标识");
header.put("HeaderId", "日记账头ID");
header.put("LineNum", "日记账行号");
header.put("ApprovalStatus", "审批状态");
header.put("PostedStatus", "过账");
header.put("Period", "会计期间");
header.put("AccountingDate", "凭证日期");
header.put("JournalSource", "日记账来源");
header.put("Category", "日记账类别");
header.put("Name", "日记账名称");
header.put("VoucherNum", "凭证编号");
header.put("Description", "摘要");
header.put("Segment1", "主体代码");
header.put("Segment2", "成本中心");
header.put("Segment3", "科目代码");
header.put("Segment4", "辅助科目");
header.put("Segment5", "利润中心");
header.put("Segment6", "产品");
header.put("Segment7", "项目");
header.put("Segment8", "公司间");
header.put("Segment9", "备用1");
header.put("Segment10", "备用2");
header.put("Segment1Name", "主体说明");
header.put("Segment2Name", "成本中心说明");
header.put("Segment3Name", "科目说明");
header.put("Segment4Name", "辅助科目说明");
header.put("Segment5Name", "利润中心说明");
header.put("Segment6Name", "产品说明");
header.put("Segment7Name", "项目说明");
header.put("Segment8Name", "公司间说明");
header.put("Segment9Name", "备用1说明");
header.put("Segment10Name", "备用2说明");
header.put("JournalCurrencyCode", "币种");
header.put("SobCurrencyCode", "本位币币种");
header.put("AccountedDr", "借方金额");
header.put("AccountedCr", "贷方金额");
header.put("EnteredDr", "本位币借方金额");
header.put("EnteredCr", "本位币贷方金额");
header.put("CfItem", "现金流量表项");
header.put("Attribute1", "城市");
header.put("Attribute2", "交易日期");
header.put("Attribute3", "对方银行账号");
header.put("Attribute4", "银行流水号");
header.put("Attribute5", "供应商编号");
header.put("Attribute6", "交易单号");
header.put("Attribute7", "供应商名称");
header.put("Attribute8", "接收编码");
header.put("Attribute9", "制单人");
header.put("Attribute10", "审核人");
header.put("Attribute11", "成本中心部门描述1");
header.put("Attribute12", "成本中心部门描述2");
header.put("Attribute13", "成本中心部门描述3");
header.put("Attribute14", "成本中心部门描述4");
header.put("Attribute15", "成本中心部门描述5");
header.put("Attribute16", "成本中心部门描述6");
header.put("CreatedBy", "创建人");
header.put("CreatedDate", "创建日期");
header.put("LateUpdatedBy", "最后更新人");
header.put("LateUpdatedDate", "最后更新日期");
header.put("tmsPeriod", "税务系统期间");
return header;
}
private void generalIDDtoList(List<InvoiceData> invoiceDatas, List<InvoiceDataDto> invoiceDataDtos) {
if(invoiceDatas.size()>0){
if (invoiceDatas.size() > 0) {
invoiceDatas.forEach(id -> {
setIDValue(invoiceDataDtos,"专票正数发票份数",id.getCountType(),id.getSpecialInvoiceAmount1());
setIDValue(invoiceDataDtos,"专票负数发票份数",id.getCountType(),id.getSpecialInvoiceAmount2());
setIDValue(invoiceDataDtos,"专票正数废票份数",id.getCountType(),id.getSpecialInvoiceAmount3());
setIDValue(invoiceDataDtos,"专票负数废票份数",id.getCountType(),id.getSpecialInvoiceAmount4());
setIDValue(invoiceDataDtos,"专票销项正废金额",id.getCountType(),id.getSpecialInvoiceSalesAmount1());
setIDValue(invoiceDataDtos,"专票销项正数金额",id.getCountType(),id.getSpecialInvoiceSalesAmount2());
setIDValue(invoiceDataDtos,"专票销项负废金额",id.getCountType(),id.getSpecialInvoiceSalesAmount3());
setIDValue(invoiceDataDtos,"专票销项负数金额",id.getCountType(),id.getSpecialInvoiceSalesAmount4());
setIDValue(invoiceDataDtos,"专票实际销项金额",id.getCountType(),id.getSpecialInvoiceSalesAmount5());
setIDValue(invoiceDataDtos,"专票销项正废税额",id.getCountType(),id.getSpecialInvoiceTaxAmount1());
setIDValue(invoiceDataDtos,"专票销项正数税额",id.getCountType(),id.getSpecialInvoiceTaxAmount2());
setIDValue(invoiceDataDtos,"专票销项负废税额",id.getCountType(),id.getSpecialInvoiceTaxAmount3());
setIDValue(invoiceDataDtos,"专票销项负数税额",id.getCountType(),id.getSpecialInvoiceTaxAmount4());
setIDValue(invoiceDataDtos,"专票实际销项税额",id.getCountType(),id.getSpecialInvoiceTaxAmount5());
setIDValue(invoiceDataDtos,"普票正数发票份数",id.getCountType(),id.getInvoiceAmount1());
setIDValue(invoiceDataDtos,"普票负数发票份数",id.getCountType(),id.getInvoiceAmount2());
setIDValue(invoiceDataDtos,"普票正数废票份数",id.getCountType(),id.getInvoiceAmount3());
setIDValue(invoiceDataDtos,"普票负数废票份数",id.getCountType(),id.getInvoiceAmount4());
setIDValue(invoiceDataDtos,"普票销项正废金额",id.getCountType(),id.getInvoiceSalesAmount1());
setIDValue(invoiceDataDtos,"普票销项正数金额",id.getCountType(),id.getInvoiceSalesAmount2());
setIDValue(invoiceDataDtos,"普票销项负废金额",id.getCountType(),id.getInvoiceSalesAmount3());
setIDValue(invoiceDataDtos,"普票销项负数金额",id.getCountType(),id.getInvoiceSalesAmount4());
setIDValue(invoiceDataDtos,"普票实际销项金额",id.getCountType(),id.getInvoiceSalesAmount5());
setIDValue(invoiceDataDtos,"普票销项正废税额",id.getCountType(),id.getInvoiceTaxAmount1());
setIDValue(invoiceDataDtos,"普票销项正数税额",id.getCountType(),id.getInvoiceTaxAmount2());
setIDValue(invoiceDataDtos,"普票销项负废税额",id.getCountType(),id.getInvoiceTaxAmount3());
setIDValue(invoiceDataDtos,"普票销项负数税额",id.getCountType(),id.getInvoiceTaxAmount4());
setIDValue(invoiceDataDtos,"普票实际销项税额",id.getCountType(),id.getInvoiceTaxAmount5());
setIDValue(invoiceDataDtos, "专票正数发票份数", id.getCountType(), id.getSpecialInvoiceAmount1());
setIDValue(invoiceDataDtos, "专票负数发票份数", id.getCountType(), id.getSpecialInvoiceAmount2());
setIDValue(invoiceDataDtos, "专票正数废票份数", id.getCountType(), id.getSpecialInvoiceAmount3());
setIDValue(invoiceDataDtos, "专票负数废票份数", id.getCountType(), id.getSpecialInvoiceAmount4());
setIDValue(invoiceDataDtos, "专票销项正废金额", id.getCountType(), id.getSpecialInvoiceSalesAmount1());
setIDValue(invoiceDataDtos, "专票销项正数金额", id.getCountType(), id.getSpecialInvoiceSalesAmount2());
setIDValue(invoiceDataDtos, "专票销项负废金额", id.getCountType(), id.getSpecialInvoiceSalesAmount3());
setIDValue(invoiceDataDtos, "专票销项负数金额", id.getCountType(), id.getSpecialInvoiceSalesAmount4());
setIDValue(invoiceDataDtos, "专票实际销项金额", id.getCountType(), id.getSpecialInvoiceSalesAmount5());
setIDValue(invoiceDataDtos, "专票销项正废税额", id.getCountType(), id.getSpecialInvoiceTaxAmount1());
setIDValue(invoiceDataDtos, "专票销项正数税额", id.getCountType(), id.getSpecialInvoiceTaxAmount2());
setIDValue(invoiceDataDtos, "专票销项负废税额", id.getCountType(), id.getSpecialInvoiceTaxAmount3());
setIDValue(invoiceDataDtos, "专票销项负数税额", id.getCountType(), id.getSpecialInvoiceTaxAmount4());
setIDValue(invoiceDataDtos, "专票实际销项税额", id.getCountType(), id.getSpecialInvoiceTaxAmount5());
setIDValue(invoiceDataDtos, "普票正数发票份数", id.getCountType(), id.getInvoiceAmount1());
setIDValue(invoiceDataDtos, "普票负数发票份数", id.getCountType(), id.getInvoiceAmount2());
setIDValue(invoiceDataDtos, "普票正数废票份数", id.getCountType(), id.getInvoiceAmount3());
setIDValue(invoiceDataDtos, "普票负数废票份数", id.getCountType(), id.getInvoiceAmount4());
setIDValue(invoiceDataDtos, "普票销项正废金额", id.getCountType(), id.getInvoiceSalesAmount1());
setIDValue(invoiceDataDtos, "普票销项正数金额", id.getCountType(), id.getInvoiceSalesAmount2());
setIDValue(invoiceDataDtos, "普票销项负废金额", id.getCountType(), id.getInvoiceSalesAmount3());
setIDValue(invoiceDataDtos, "普票销项负数金额", id.getCountType(), id.getInvoiceSalesAmount4());
setIDValue(invoiceDataDtos, "普票实际销项金额", id.getCountType(), id.getInvoiceSalesAmount5());
setIDValue(invoiceDataDtos, "普票销项正废税额", id.getCountType(), id.getInvoiceTaxAmount1());
setIDValue(invoiceDataDtos, "普票销项正数税额", id.getCountType(), id.getInvoiceTaxAmount2());
setIDValue(invoiceDataDtos, "普票销项负废税额", id.getCountType(), id.getInvoiceTaxAmount3());
setIDValue(invoiceDataDtos, "普票销项负数税额", id.getCountType(), id.getInvoiceTaxAmount4());
setIDValue(invoiceDataDtos, "普票实际销项税额", id.getCountType(), id.getInvoiceTaxAmount5());
});
}
}
......@@ -763,35 +851,35 @@ public class DataPreviewSerivceImpl extends BaseService {
}
private void setIDValue(List<InvoiceDataDto> idDtos, String column, Integer row, Object value) {
for(InvoiceDataDto idto : idDtos){
if(idto.getProjectName().equals(column)){
for (InvoiceDataDto idto : idDtos) {
if (idto.getProjectName().equals(column)) {
switch (row) {
case CountTypeConstant.TOTAL:
idto.setTotalAmount(new BigDecimal (value.toString()));
idto.setTotalAmount(new BigDecimal(value.toString()));
break;
case CountTypeConstant.SIXTEEN_PERCENT:
idto.setAmount1(new BigDecimal (value.toString()));
idto.setAmount1(new BigDecimal(value.toString()));
break;
case CountTypeConstant.TEN_PERCENT:
idto.setAmount2(new BigDecimal (value.toString()));
idto.setAmount2(new BigDecimal(value.toString()));
break;
case CountTypeConstant.SIX_PERCENT:
idto.setAmount3(new BigDecimal (value.toString()));
idto.setAmount3(new BigDecimal(value.toString()));
break;
case CountTypeConstant.THREE_PERCENT:
idto.setAmount4(new BigDecimal (value.toString()));
idto.setAmount4(new BigDecimal(value.toString()));
break;
case CountTypeConstant.SEVENTEEN_PERCENT:
idto.setAmount5(new BigDecimal (value.toString()));
idto.setAmount5(new BigDecimal(value.toString()));
break;
case CountTypeConstant.ELEVEN_PERCENT:
idto.setAmount6(new BigDecimal (value.toString()));
idto.setAmount6(new BigDecimal(value.toString()));
break;
case CountTypeConstant.FIVE_PERCENT:
idto.setAmount7(new BigDecimal (value.toString()));
idto.setAmount7(new BigDecimal(value.toString()));
break;
case CountTypeConstant.OTHER:
idto.setOtherAmount(new BigDecimal (value.toString()));
idto.setOtherAmount(new BigDecimal(value.toString()));
break;
default:
break;
......
......@@ -612,22 +612,22 @@ var vatModule = angular.module('app.vat', ['ui.grid', 'ui.grid.selection', 'ui.g
sticky: true
});
$stateProvider.state({
name: 'vat.previewData.balanceSheet',
url: '/balanceSheet',
views: {
'@vat.previewData': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat]);
}],
template: '<vat-preview-balance-sheet></vat-preview-balance-sheet>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
deepStateRedirect: true,
sticky: true
});
// $stateProvider.state({
// name: 'vat.previewData.balanceSheet',
// url: '/balanceSheet',
// views: {
// '@vat.previewData': {
// controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.vat]);
// }],
// template: '<vat-preview-balance-sheet></vat-preview-balance-sheet>',
// }
// },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
// deepStateRedirect: true,
// sticky: true
// });
$stateProvider.state({
name: 'vat.previewData.accountVoucher',
......@@ -767,6 +767,40 @@ var vatModule = angular.module('app.vat', ['ui.grid', 'ui.grid.selection', 'ui.g
sticky: true
});
$stateProvider.state({
name: 'vat.previewData.vatPreviewProfitTable',
url: '/vatPreviewProfitTable',
views: {
'@vat.previewData': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat]);
}],
template: '<vat-preview-profit-table></vat-preview-profit-table>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'vat.previewData.vatPreviewTheBalanceSheet',
url: '/vatPreviewTheBalanceSheet',
views: {
'@vat.previewData': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat]);
}],
template: '<vat-preview-the-balance-sheet></vat-preview-the-balance-sheet>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'vat.previewData.coupaPurchasingReport',
url: '/coupaPurchasingReport',
......
......@@ -1990,5 +1990,7 @@
"InputAllMandatoryInfo": "Please Input All The Mandatory Information",
"NameShouldUniqueWarn": "Name Should Be Unique",
"ProfitTable": "Profit Table",
"~MustBeEndOneApp": "I Must be the End One, please!"
}
\ No newline at end of file
......@@ -2301,6 +2301,7 @@
"InputAllMandatoryInfo": "请输入所有必填信息",
"NameShouldUniqueWarn": "收入类型名称应当唯一",
"ProfitTable": "利润表",
"~MustBeEndOneApp": "我必须是最后一个!"
}
\ No newline at end of file
......@@ -475,9 +475,6 @@ constant.vatPermission = {
adjustmentTab: {
queryCode: '02.002.011'
},
balanceSheet: {
queryCode: '02.002.012'
},
profitLoss: {
queryCode: '02.002.013'
},
......@@ -501,7 +498,11 @@ constant.vatPermission = {
},
invoiceData: {
queryCode: '02.002.020'
},
profitTable: {
queryCode: '02.002.021'
}
},
dataManage: {
dataManageCode: '02.003',
......
......@@ -201,9 +201,15 @@
getPLDataForDisplay: function (queryParams) {
return $http.post('/dataPreview/getPLDataForDisplay', queryParams, apiConfig.createVat());
},
getPLStatementDataForDisplay: function (queryParams) {
return $http.post('/dataPreview/getPLStatementDataForDisplay', queryParams, apiConfig.createVat());
},
initExportPLData: function (queryParams) {
return $http.post('/dataPreview/exportPLData/get', queryParams, apiConfig.create({ responseType: 'arraybuffer' }));
},
initExportPLStatementData: function (queryParams) {
return $http.post('/dataPreview/exportPLStatementData/get', queryParams, apiConfig.create({ responseType: 'arraybuffer' }));
},
getJEDataForDisplay: function (queryParams) {
return $http.post('/dataPreview/getJEDataForDisplay', queryParams, apiConfig.createVat());
},
......@@ -213,9 +219,15 @@
getBSDataForDisplay: function (queryParams) {
return $http.post('/dataPreview/getBSDataForDisplay', queryParams, apiConfig.createVat());
},
getBalanceSheetDataForDisplay: function (queryParams) {
return $http.post('/dataPreview/getBalanceSheetDataForDisplay', queryParams, apiConfig.createVat());
},
initExportBSData: function (queryParams) {
return $http.post('/dataPreview/exportBSData/get', queryParams, apiConfig.create({ responseType: 'arraybuffer' }));
},
initExportBalanceSheetData: function (queryParams) {
return $http.post('/dataPreview/exportBalanceSheetData/get', queryParams, apiConfig.create({ responseType: 'arraybuffer' }));
},
getIRDataForDisplay: function (queryParams) {
return $http.post('/dataPreview/getIRDataForDisplay', queryParams, apiConfig.createVat());
},
......
......@@ -881,6 +881,9 @@
constant.vatPermission.dataPreview.redLetterInformationTable.queryCode,
constant.vatPermission.dataPreview.coupaPurchasingReport.queryCode,
constant.vatPermission.dataPreview.invoiceData.queryCode,
constant.vatPermission.dataPreview.profitTable.queryCode,
constant.vatPermission.dataPreview.balanceSheet.queryCode,
constant.vatPermission.dataManage.caculateDataCode,
constant.vatPermission.dataManage.revenueDetailCode,
......@@ -926,6 +929,10 @@
$state.go('vat.previewData.coupaPurchasingReport');
} else if (data[constant.vatPermission.dataPreview.invoiceData.queryCode]) {
$state.go('vat.previewData.invoiceData');
} else if (data[constant.vatPermission.dataPreview.profitTable.queryCode]) {
$state.go('vat.previewData.vatPreviewProfitTable');
} else if (data[constant.vatPermission.dataPreview.balanceSheet.queryCode]) {
$state.go('vat.previewData.vatPreviewTheBalanceSheet');
} else if (data[constant.vatPermission.dataManage.caculateDataCode]) {
$state.go('vat.reductionData.caculateData');
} else if (data[constant.vatPermission.dataManage.revenueDetailCode]) {
......@@ -973,36 +980,7 @@
// $state.go('vat.reductionData.goodsMapping');
// }
//TODO 删除的部分
// if (data[constant.vatPermission.dataPreview.balanceSheet.queryCode]) {
// $state.go('vat.previewData.balanceSheet');
// }
// else if (data[constant.vatPermission.dataPreview.inputInvoice.queryCode]) {
// $state.go('vat.previewData.inputInvoice');
// } else if (data[constant.vatPermission.dataPreview.outputInvoice.queryCode]) {
// $state.go('vat.previewData.outputInvoice');
// }
// else if (data[constant.vatPermission.dataManage.caculateDataCode]) {
// $state.go('vat.reductionData.caculateData');
// } else if (data[constant.vatPermission.dataManage.revenueDetailCode]) {
// $state.go('vat.reductionData.revenueDetail');
// } else if (data[constant.vatPermission.dataManage.billDetailCode]) {
// $state.go('vat.reductionData.billDetail');
// } /*else if (data[constant.vatPermission.dataManage.unbilledInvoiceCode]) {
// $state.go('vat.reductionData.unbilledInvoice');
// }*/ else if (data[constant.vatPermission.reportView.bsplCode] || data[constant.vatPermission.reportView.taxReturnCode]) {
// $state.go('vat.generateReport');
// } else if (data[constant.vatPermission.dataAnalysis.modelAnalysisCode]) {
// $state.go('vat.analyzeLayout.analyzeReport');
// } else if (data[constant.vatPermission.dataAnalysis.dashboard.dashboardCode]) {
// $state.go('analyzeOrganizeDashboard');
// }
//else if (data[constant.vatPermission.dataAnalysis.vatTaxDifferenceCode]) {
// $state.go('vat.analyzeLayout.vatTaxDifference');
//}
}
});
}
......

vatModule.controller('VatImportLayoutController', ['$scope', '$log', '$translate', '$location', 'loginContext', 'enums', 'vatSessionService', 'vatCommonService',
function ($scope, $log, $translate, $location, loginContext, enums, vatSessionService, vatCommonService) {
vatModule.controller('VatImportLayoutController', ['$scope', '$log', '$translate', '$location', 'loginContext', 'enums', 'vatSessionService', 'vatCommonService',
function ($scope, $log, $translate, $location, loginContext, enums, vatSessionService, vatCommonService) {
'use strict';
$log.debug('VatImportLayoutController.ctor()...');
......@@ -45,28 +44,49 @@ function ($scope, $log, $translate, $location, loginContext, enums, vatSessionSe
text: $translate.instant('invoiceRecord'), icon: 'fa fa-file-text-o', show: true
},
{
name: 'certifiedInvoicesList', permission: constant.vatPermission.dataPreview.certifiedInvoicesList.queryCode,
text: $translate.instant('certifiedInvoicesList'), icon: 'fa fa-file-text-o', show: true
name: 'certifiedInvoicesList',
permission: constant.vatPermission.dataPreview.certifiedInvoicesList.queryCode,
text: $translate.instant('certifiedInvoicesList'),
icon: 'fa fa-file-text-o',
show: true
},
{
name: 'redLetterInfoTab', permission: constant.vatPermission.dataPreview.redLetterInformationTable.queryCode,
text: $translate.instant('redLetterInformationTable'), icon: 'fa fa-file-text-o', show: true
name: 'redLetterInfoTab',
permission: constant.vatPermission.dataPreview.redLetterInformationTable.queryCode,
text: $translate.instant('redLetterInformationTable'),
icon: 'fa fa-file-text-o',
show: true
},
{
name: 'coupaPurchasingReport', permission: constant.vatPermission.dataPreview.coupaPurchasingReport.queryCode,
text: $translate.instant('coupaPurchasingReport'), icon: 'fa fa-file-text-o', show: true
name: 'coupaPurchasingReport',
permission: constant.vatPermission.dataPreview.coupaPurchasingReport.queryCode,
text: $translate.instant('coupaPurchasingReport'),
icon: 'fa fa-file-text-o',
show: true
},
{
name: 'invoiceData', permission: constant.vatPermission.dataPreview.invoiceData.queryCode,
text: $translate.instant('invoiceData'), icon: 'fa fa-file-text-o', show: true
},
//TODO 增加TAB
{
name: 'vatPreviewProfitTable', permission: constant.vatPermission.dataPreview.profitTable.queryCode,
text: $translate.instant('ProfitTable'), icon: 'fa fa-file-text-o', show: true
},
{
name: 'vatPreviewTheBalanceSheet', permission: constant.vatPermission.dataPreview.balanceSheet.queryCode,
text: $translate.instant('offBalanceSheet'), icon: 'fa fa-file-text-o', show: true
},
{
name: 'adjustmentTab', permission: constant.vatPermission.dataPreview.adjustmentTab.queryCode,
text: $translate.instant('adjustmentTable'), icon: 'fa fa-file-text-o', show: false
},
{
name: 'quarterlyOwnersEquityChangeTab', permission: constant.vatPermission.dataPreview.quarterlyOwnersEquityChangeTable.queryCode,
text: $translate.instant('quarterlyOwnersEquityChangeTable'), icon: 'fa fa-file-text-o', show: false
name: 'quarterlyOwnersEquityChangeTab',
permission: constant.vatPermission.dataPreview.quarterlyOwnersEquityChangeTable.queryCode,
text: $translate.instant('quarterlyOwnersEquityChangeTable'),
icon: 'fa fa-file-text-o',
show: false
},
{
name: 'balanceSheet', permission: constant.vatPermission.dataPreview.balanceSheet.queryCode,
......@@ -89,8 +109,11 @@ function ($scope, $log, $translate, $location, loginContext, enums, vatSessionSe
text: $translate.instant('offlineBilling'), icon: 'fa fa-file-text-o', show: false
},
{
name: 'directMethodCashFlowStatement', permission: constant.vatPermission.dataPreview.directMethodCashFlowStatement.queryCode,
text: $translate.instant('directMethodCashFlowStatement'), icon: 'fa fa-file-text-o', show: false
name: 'directMethodCashFlowStatement',
permission: constant.vatPermission.dataPreview.directMethodCashFlowStatement.queryCode,
text: $translate.instant('directMethodCashFlowStatement'),
icon: 'fa fa-file-text-o',
show: false
}
// ,
// {
......@@ -98,8 +121,7 @@ function ($scope, $log, $translate, $location, loginContext, enums, vatSessionSe
// text: $translate.instant('customInvoice'), icon: 'fa fa-bookmark', show: true
// }
];
}
else if ($location && $location.absUrl().indexOf('reductionData') > -1) {
} else if ($location && $location.absUrl().indexOf('reductionData') > -1) {
$scope.nodeDicKey = constant.DictionaryDictKey.DataProcess;
$scope.linkShort = enums.linkShort.ReductionData;
$scope.menus = [
......@@ -126,9 +148,8 @@ function ($scope, $log, $translate, $location, loginContext, enums, vatSessionSe
{
name: 'unbilledInvoice', permission: constant.vatPermission.dataManage.unbilledInvoiceCode,
text: $translate.instant('unbilledInvoice'), icon: 'fa fa-shield', show: true
},*/ ];
}
else {
},*/];
} else {
$scope.nodeDicKey = constant.DictionaryDictKey.DataImport;
$scope.linkShort = enums.linkShort.ImportData;
$scope.menus = [
......@@ -174,10 +195,9 @@ function ($scope, $log, $translate, $location, loginContext, enums, vatSessionSe
}
(function initialize() {
vatCommonService.isLayoutMenuShow(vatSessionService.project.id, vatSessionService.month
, $scope.nodeDicKey, $scope.linkShort, $scope.menus);
})();
}]);
\ No newline at end of file
}]);
\ 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