Commit 2258f171 authored by eddie.woo's avatar eddie.woo

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

parents e820f312 f78ff302
......@@ -10,7 +10,6 @@ import pwc.taxtech.atms.invoice.OutputInvoiceDetailMapper;
import pwc.taxtech.atms.invoice.OutputInvoiceMapper;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.entity.OutputInvoiceDetail;
//用来获取spring托管的bean
@Component
......@@ -55,6 +54,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public static AccountMappingMapper accountMappingMapper;
public static TrialBalanceMapper trialBalanceMapper;
public static AdjustmentTableMapper adjustmentTableMapper;
public static TrialBalanceFinalMapper trialBalanceFinalMapper;
/**
* 获取bean
......@@ -110,5 +110,6 @@ public class SpringContextUtil implements ApplicationContextAware {
glBalanceMapper = webApplicationContext.getBean(GlBalanceMapper.class);
trialBalanceMapper = webApplicationContext.getBean(TrialBalanceMapper.class);
adjustmentTableMapper = webApplicationContext.getBean(AdjustmentTableMapper.class);
trialBalanceFinalMapper = webApplicationContext.getBean(TrialBalanceFinalMapper.class);
}
}
......@@ -2,12 +2,13 @@ package pwc.taxtech.atms.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.ebsdto.JEqueryDto;
import pwc.taxtech.atms.dto.ebsdto.*;
import pwc.taxtech.atms.service.EbsApiService;
import javax.annotation.Resource;
......@@ -18,13 +19,14 @@ import java.util.List;
@RequestMapping("/ebs/api/v1/dd")
public class EbsApiController {
private static final Logger logger= LoggerFactory.getLogger(EbsApiController.class);
private static final Logger logger = LoggerFactory.getLogger(EbsApiController.class);
@Resource
private EbsApiService ebsApiService;
@RequestMapping(value = "/queryRemoteServerThenUpdateJE", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateJE(@RequestBody List<JEqueryDto> items) {
if (items!=null&&!items.isEmpty()) {
public ApiResultDto queryRemoteServerThenUpdateJE(@RequestBody List<JournalEntryQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateJE return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
......@@ -36,5 +38,109 @@ public class EbsApiController {
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdateTB", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateTB(@RequestBody List<TrialBalanceQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateTB return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateTB(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateTB error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdateCF", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateCF(@RequestBody List<CashFlowQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateCF return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateCF(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateCF error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdateBS", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateBS(@RequestBody List<BalanceSheetQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateBS return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateBS(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateBS error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdatePL", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdatePL(@RequestBody List<ProfitLossStatementQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdatePL return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdatePL(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdatePL error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdateBSprc", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateBSprc(@RequestBody List<BalanceSheetPrcQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateBSprc return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateBSprc(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateBSprc error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdatePLprc", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdatePLprc(@RequestBody List<ProfitLossStatementPrcQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdatePL return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdatePLprc(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdatePLprc error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdateOAR", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateOAR(@RequestBody List<OrganizationAccountingRateQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateOAR return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateOAR(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateOAR error.", e);
}
return ApiResultDto.fail();
}
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.ebsdto.JEqueryDto;
import pwc.taxtech.atms.dto.ebsdto.*;
import java.util.List;
......@@ -8,7 +8,57 @@ public interface EbsApiService {
/**
* EBS 日记账同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateJE(List<JEqueryDto> items);
void queryRemoteServerThenUpdateJE(List<JournalEntryQueryDto> items);
/**
* ebs 科目余额表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateTB(List<TrialBalanceQueryDto> items);
/**
* ebs 现金流量表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateCF(List<CashFlowQueryDto> items);
/**
* ebs 资产负债表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateBS(List<BalanceSheetQueryDto> items);
/**
* ebs 资产负债表PRC同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateBSprc(List<BalanceSheetPrcQueryDto> items);
/**
* ebs 利润表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdatePL(List<ProfitLossStatementQueryDto> items);
/**
* ebs 利润表PRC同步更新
*
* @param items
*/
void queryRemoteServerThenUpdatePLprc(List<ProfitLossStatementPrcQueryDto> items);
/**
* ebs 汇率表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateOAR(List<OrganizationAccountingRateQueryDto> items);
}
......@@ -41,7 +41,12 @@
<property name="rootInterface" value="pwc.taxtech.atms.MyVatMapper" />
</javaClientGenerator>
<table tableName="certified_invoices_list" domainObjectName="CertifiedInvoicesList">
<table tableName="trial_balance_final" domainObjectName="TrialBalanceFinal">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<!--<table tableName="certified_invoices_list" domainObjectName="CertifiedInvoicesList">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
......@@ -51,7 +56,7 @@
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<!--<table tableName="revenue_config" domainObjectName="RevenueConfig">
<table tableName="revenue_config" domainObjectName="RevenueConfig">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="account_type" javaType="java.lang.Integer" jdbcType="TINYINT"/>
......
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.TrialBalanceFinal;
import pwc.taxtech.atms.vat.entity.TrialBalanceFinalExample;
@Mapper
public interface TrialBalanceFinalMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
long countByExample(TrialBalanceFinalExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
int deleteByExample(TrialBalanceFinalExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
int insert(TrialBalanceFinal record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
int insertSelective(TrialBalanceFinal record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
List<TrialBalanceFinal> selectByExampleWithRowbounds(TrialBalanceFinalExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
List<TrialBalanceFinal> selectByExample(TrialBalanceFinalExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
TrialBalanceFinal selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") TrialBalanceFinal record, @Param("example") TrialBalanceFinalExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
int updateByExample(@Param("record") TrialBalanceFinal record, @Param("example") TrialBalanceFinalExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(TrialBalanceFinal record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_final
*
* @mbg.generated
*/
int updateByPrimaryKey(TrialBalanceFinal record);
}
\ No newline at end of file
vatModule.controller('VatPreviewCashFlowController', ['$scope', '$log', '$translate', '$timeout', 'SweetAlert', '$q', 'uiGridConstants', '$interval', 'vatPreviewService', 'browserService', 'vatSessionService', 'region', 'enums', 'vatExportService',
function ($scope, $log, $translate, $timeout, SweetAlert, $q, uiGridConstants, $interval, vatPreviewService, browserService, vatSessionService, region, enums, vatExportService) {
vatModule.controller('VatPreviewCashFlowController', ['$scope', '$log', '$translate', '$timeout', 'SweetAlert', '$q', 'uiGridConstants', '$interval', 'vatPreviewService', 'browserService', 'vatSessionService', 'region', 'enums', 'vatExportService','$filter',
function ($scope, $log, $translate, $timeout, SweetAlert, $q, uiGridConstants, $interval, vatPreviewService, browserService, vatSessionService, region, enums, vatExportService,$filter) {
'use strict';
$scope.startDate = new Date(vatSessionService.project.year, 0, 1);
......@@ -195,7 +195,8 @@
//导出进项发票数据
$scope.downloadCashFlow = function () {
var fileName="cash_flow"
var localDate=$filter('date')(new Date(), 'yyyyMMddHHmmss');
var fileName="cash_flow_"+localDate;
vatPreviewService.initExportCFData($scope.queryParams,fileName).then(function (data) {
if (data) {
ackMessageBox.success(translate('FileExportSuccess'));
......
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