Commit 3c8008dd authored by gary's avatar gary

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

parents be885e65 2258f171
......@@ -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);
}
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