Commit 1c7bd322 authored by Ken you's avatar Ken you

update ebs api ---Ken

parent 2ec1a50e
......@@ -23,13 +23,13 @@ public class EbsApiController {
@RequestMapping(value = "/updateJE", method = RequestMethod.POST)
public @ResponseBody
ApiResultDto updateJE(@RequestBody List<JournalEntryQueryDto> items) {
ApiResultDto updateJE(@RequestParam(value="id",defaultValue = "123123123") Long id,@RequestBody List<JournalEntryQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateJE return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateJE(items);
ebsApiService.queryRemoteServerThenUpdateJE(id,items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("updateJE error.", e);
......@@ -38,13 +38,13 @@ public class EbsApiController {
}
@RequestMapping(value = "/updateTB", method = RequestMethod.POST)
public @ResponseBody ApiResultDto updateTB(@RequestBody List<TrialBalanceQueryDto> items) {
public @ResponseBody ApiResultDto updateTB(@RequestParam("id") Long id,@RequestBody List<TrialBalanceQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateTB return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateTB(items);
ebsApiService.queryRemoteServerThenUpdateTB(id,items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("updateTB error.", e);
......@@ -53,13 +53,13 @@ public class EbsApiController {
}
@RequestMapping(value = "/updateCF", method = RequestMethod.POST)
public @ResponseBody ApiResultDto updateCF(@RequestBody List<CashFlowQueryDto> items) {
public @ResponseBody ApiResultDto updateCF(@RequestParam("id") Long id,@RequestBody List<CashFlowQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateCF return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateCF(items);
ebsApiService.queryRemoteServerThenUpdateCF(id,items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("updateCF error.", e);
......@@ -68,13 +68,13 @@ public class EbsApiController {
}
@RequestMapping(value = "/updateBS", method = RequestMethod.POST)
public @ResponseBody ApiResultDto updateBS(@RequestBody List<BalanceSheetQueryDto> items) {
public @ResponseBody ApiResultDto updateBS(@RequestParam("id") Long id,@RequestBody List<BalanceSheetQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateBS return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateBS(items);
ebsApiService.queryRemoteServerThenUpdateBS(id,items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("updateBS error.", e);
......@@ -83,13 +83,13 @@ public class EbsApiController {
}
@RequestMapping(value = "/updatePL", method = RequestMethod.POST)
public @ResponseBody ApiResultDto updatePL(@RequestBody List<ProfitLossStatementQueryDto> items) {
public @ResponseBody ApiResultDto updatePL(@RequestParam("id") Long id,@RequestBody List<ProfitLossStatementQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the updatePL return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdatePL(items);
ebsApiService.queryRemoteServerThenUpdatePL(id,items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("updatePL error.", e);
......@@ -98,13 +98,13 @@ public class EbsApiController {
}
@RequestMapping(value = "/updateBSprc", method = RequestMethod.POST)
public @ResponseBody ApiResultDto updateBSprc(@RequestBody List<BalanceSheetPrcQueryDto> items) {
public @ResponseBody ApiResultDto updateBSprc(@RequestParam("id") Long id,@RequestBody List<BalanceSheetPrcQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateBSprc return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateBSprc(items);
ebsApiService.queryRemoteServerThenUpdateBSprc(id,items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("updateBSprc error.", e);
......@@ -113,13 +113,13 @@ public class EbsApiController {
}
@RequestMapping(value = "/updatePLprc", method = RequestMethod.POST)
public @ResponseBody ApiResultDto updatePLprc(@RequestBody List<ProfitLossStatementPrcQueryDto> items) {
public @ResponseBody ApiResultDto updatePLprc(@RequestParam("id") Long id,@RequestBody List<ProfitLossStatementPrcQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the updatePLprc return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdatePLprc(items);
ebsApiService.queryRemoteServerThenUpdatePLprc(id,items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("updatePLprc error.", e);
......@@ -128,13 +128,13 @@ public class EbsApiController {
}
@RequestMapping(value = "/updateOAR", method = RequestMethod.POST)
public @ResponseBody ApiResultDto updateOAR(@RequestBody List<OrganizationAccountingRateQueryDto> items) {
public @ResponseBody ApiResultDto updateOAR(@RequestParam("id") Long id,@RequestBody List<OrganizationAccountingRateQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateOAR return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateOAR(items);
ebsApiService.queryRemoteServerThenUpdateOAR(id,items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("updateOAR error.", e);
......
package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
public class BalanceSheetPrcQueryDto {
......@@ -13,7 +16,8 @@ public class BalanceSheetPrcQueryDto {
*
* @mbg.generated
*/
private String date;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/**
* Database Column Remarks:
......@@ -35,7 +39,7 @@ public class BalanceSheetPrcQueryDto {
*
* @mbg.generated
*/
private Integer period;
private String period;
/**
* Database Column Remarks:
......@@ -46,7 +50,7 @@ public class BalanceSheetPrcQueryDto {
*
* @mbg.generated
*/
private Boolean status;
private String status;
/**
* Database Column Remarks:
......@@ -158,14 +162,6 @@ public class BalanceSheetPrcQueryDto {
*/
private BigDecimal begBal;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getSource() {
return source;
}
......@@ -174,19 +170,27 @@ public class BalanceSheetPrcQueryDto {
this.source = source;
}
public Integer getPeriod() {
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getPeriod() {
return period;
}
public void setPeriod(Integer period) {
public void setPeriod(String period) {
this.period = period;
}
public Boolean getStatus() {
public String getStatus() {
return status;
}
public void setStatus(Boolean status) {
public void setStatus(String status) {
this.status = status;
}
......
package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
public class BalanceSheetQueryDto {
/**
......@@ -12,7 +15,8 @@ public class BalanceSheetQueryDto {
*
* @mbg.generated
*/
private String date;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/**
* Database Column Remarks:
......@@ -34,7 +38,7 @@ public class BalanceSheetQueryDto {
*
* @mbg.generated
*/
private Integer period;
private String period;
/**
* Database Column Remarks:
......@@ -45,7 +49,7 @@ public class BalanceSheetQueryDto {
*
* @mbg.generated
*/
private Boolean status;
private String status;
/**
* Database Column Remarks:
......@@ -157,14 +161,6 @@ public class BalanceSheetQueryDto {
*/
private BigDecimal begBal;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getSource() {
return source;
}
......@@ -173,19 +169,27 @@ public class BalanceSheetQueryDto {
this.source = source;
}
public Integer getPeriod() {
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getPeriod() {
return period;
}
public void setPeriod(Integer period) {
public void setPeriod(String period) {
this.period = period;
}
public Boolean getStatus() {
public String getStatus() {
return status;
}
public void setStatus(Boolean status) {
public void setStatus(String status) {
this.status = status;
}
......
package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
public class CashFlowQueryDto {
/**
......@@ -12,7 +15,8 @@ public class CashFlowQueryDto {
*
* @mbg.generated
*/
private String date;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/**
* Database Column Remarks:
......@@ -34,7 +38,7 @@ public class CashFlowQueryDto {
*
* @mbg.generated
*/
private Integer period;
private String period;
/**
* Database Column Remarks:
......@@ -45,7 +49,7 @@ public class CashFlowQueryDto {
*
* @mbg.generated
*/
private Boolean status;
private String status;
/**
* Database Column Remarks:
......@@ -169,11 +173,11 @@ public class CashFlowQueryDto {
*/
private BigDecimal ytdAmt;
public String getDate() {
public Date getDate() {
return date;
}
public void setDate(String date) {
public void setDate(Date date) {
this.date = date;
}
......@@ -185,19 +189,19 @@ public class CashFlowQueryDto {
this.source = source;
}
public Integer getPeriod() {
public String getPeriod() {
return period;
}
public void setPeriod(Integer period) {
public void setPeriod(String period) {
this.period = period;
}
public Boolean getStatus() {
public String getStatus() {
return status;
}
public void setStatus(Boolean status) {
public void setStatus(String status) {
this.status = status;
}
......
package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
public class JournalEntryQueryDto {
......@@ -13,7 +16,8 @@ public class JournalEntryQueryDto {
*
* @mbg.generated
*/
private String date;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/**
* Database Column Remarks:
......@@ -68,7 +72,7 @@ public class JournalEntryQueryDto {
*
* @mbg.generated
*/
private Boolean status;
private String status;
/**
* Database Column Remarks:
......@@ -123,7 +127,7 @@ public class JournalEntryQueryDto {
*
* @mbg.generated
*/
private Integer period;
private String period;
/**
* Database Column Remarks:
......@@ -134,7 +138,8 @@ public class JournalEntryQueryDto {
*
* @mbg.generated
*/
private String accountingDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date accountingDate;
/**
* Database Column Remarks:
......@@ -508,7 +513,8 @@ public class JournalEntryQueryDto {
*
* @mbg.generated
*/
private String attribute2;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date attribute2;
/**
* Database Column Remarks:
......@@ -684,7 +690,8 @@ public class JournalEntryQueryDto {
*
* @mbg.generated
*/
private String createdDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date createdDate;
/**
* Database Column Remarks:
......@@ -706,13 +713,14 @@ public class JournalEntryQueryDto {
*
* @mbg.generated
*/
private String lateUpdatedDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date lateUpdatedDate;
public String getDate() {
public Date getDate() {
return date;
}
public void setDate(String date) {
public void setDate(Date date) {
this.date = date;
}
......@@ -748,11 +756,11 @@ public class JournalEntryQueryDto {
this.currencyCode = currencyCode;
}
public Boolean getStatus() {
public String getStatus() {
return status;
}
public void setStatus(Boolean status) {
public void setStatus(String status) {
this.status = status;
}
......@@ -788,19 +796,19 @@ public class JournalEntryQueryDto {
this.postedStatus = postedStatus;
}
public Integer getPeriod() {
public String getPeriod() {
return period;
}
public void setPeriod(Integer period) {
public void setPeriod(String period) {
this.period = period;
}
public String getAccountingDate() {
public Date getAccountingDate() {
return accountingDate;
}
public void setAccountingDate(String accountingDate) {
public void setAccountingDate(Date accountingDate) {
this.accountingDate = accountingDate;
}
......@@ -1068,11 +1076,11 @@ public class JournalEntryQueryDto {
this.attribute1 = attribute1;
}
public String getAttribute2() {
public Date getAttribute2() {
return attribute2;
}
public void setAttribute2(String attribute2) {
public void setAttribute2(Date attribute2) {
this.attribute2 = attribute2;
}
......@@ -1196,11 +1204,11 @@ public class JournalEntryQueryDto {
this.createdBy = createdBy;
}
public String getCreatedDate() {
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(String createdDate) {
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
......@@ -1212,11 +1220,11 @@ public class JournalEntryQueryDto {
this.lateUpdatedBy = lateUpdatedBy;
}
public String getLateUpdatedDate() {
public Date getLateUpdatedDate() {
return lateUpdatedDate;
}
public void setLateUpdatedDate(String lateUpdatedDate) {
public void setLateUpdatedDate(Date lateUpdatedDate) {
this.lateUpdatedDate = lateUpdatedDate;
}
}
package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
public class OrganizationAccountingRateQueryDto {
private String date;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/**
* Database Column Remarks:
* 期间
......@@ -13,7 +17,7 @@ public class OrganizationAccountingRateQueryDto {
*
* @mbg.generated
*/
private Integer period;
private String period;
/**
* Database Column Remarks:
......@@ -69,19 +73,19 @@ public class OrganizationAccountingRateQueryDto {
*/
private String invalidDate;
public String getDate() {
public Date getDate() {
return date;
}
public void setDate(String date) {
public void setDate(Date date) {
this.date = date;
}
public Integer getPeriod() {
public String getPeriod() {
return period;
}
public void setPeriod(Integer period) {
public void setPeriod(String period) {
this.period = period;
}
......
package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
public class ProfitLossStatementPrcQueryDto {
/**
......@@ -12,7 +15,8 @@ public class ProfitLossStatementPrcQueryDto {
*
* @mbg.generated
*/
private String date;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/**
* Database Column Remarks:
......@@ -34,7 +38,7 @@ public class ProfitLossStatementPrcQueryDto {
*
* @mbg.generated
*/
private Integer period;
private String period;
/**
* Database Column Remarks:
......@@ -45,7 +49,7 @@ public class ProfitLossStatementPrcQueryDto {
*
* @mbg.generated
*/
private Boolean status;
private String status;
/**
* Database Column Remarks:
......@@ -157,14 +161,6 @@ public class ProfitLossStatementPrcQueryDto {
*/
private BigDecimal ytdAmt;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getSource() {
return source;
}
......@@ -173,19 +169,27 @@ public class ProfitLossStatementPrcQueryDto {
this.source = source;
}
public Integer getPeriod() {
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getPeriod() {
return period;
}
public void setPeriod(Integer period) {
public void setPeriod(String period) {
this.period = period;
}
public Boolean getStatus() {
public String getStatus() {
return status;
}
public void setStatus(Boolean status) {
public void setStatus(String status) {
this.status = status;
}
......
package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
public class ProfitLossStatementQueryDto {
/**
......@@ -12,7 +15,8 @@ public class ProfitLossStatementQueryDto {
*
* @mbg.generated
*/
private String date;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/**
* Database Column Remarks:
......@@ -34,7 +38,7 @@ public class ProfitLossStatementQueryDto {
*
* @mbg.generated
*/
private Integer period;
private String period;
/**
* Database Column Remarks:
......@@ -45,7 +49,7 @@ public class ProfitLossStatementQueryDto {
*
* @mbg.generated
*/
private Boolean status;
private String status;
/**
* Database Column Remarks:
......@@ -157,14 +161,6 @@ public class ProfitLossStatementQueryDto {
*/
private BigDecimal ytdAmt;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getSource() {
return source;
}
......@@ -173,19 +169,27 @@ public class ProfitLossStatementQueryDto {
this.source = source;
}
public Integer getPeriod() {
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getPeriod() {
return period;
}
public void setPeriod(Integer period) {
public void setPeriod(String period) {
this.period = period;
}
public Boolean getStatus() {
public String getStatus() {
return status;
}
public void setStatus(Boolean status) {
public void setStatus(String status) {
this.status = status;
}
......
package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
public class TrialBalanceQueryDto {
/**
......@@ -12,7 +15,8 @@ public class TrialBalanceQueryDto {
*
* @mbg.generated
*/
private String date;
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/**
* Database Column Remarks:
......@@ -34,7 +38,7 @@ public class TrialBalanceQueryDto {
*
* @mbg.generated
*/
private Integer period;
private String period;
/**
* Database Column Remarks:
......@@ -78,7 +82,7 @@ public class TrialBalanceQueryDto {
*
* @mbg.generated
*/
private Boolean status;
private String status;
/**
* Database Column Remarks:
......@@ -542,11 +546,11 @@ public class TrialBalanceQueryDto {
*/
private BigDecimal ytdCrBeq;
public String getDate() {
public Date getDate() {
return date;
}
public void setDate(String date) {
public void setDate(Date date) {
this.date = date;
}
......@@ -558,11 +562,11 @@ public class TrialBalanceQueryDto {
this.source = source;
}
public Integer getPeriod() {
public String getPeriod() {
return period;
}
public void setPeriod(Integer period) {
public void setPeriod(String period) {
this.period = period;
}
......@@ -590,11 +594,11 @@ public class TrialBalanceQueryDto {
this.currencyCode = currencyCode;
}
public Boolean getStatus() {
public String getStatus() {
return status;
}
public void setStatus(Boolean status) {
public void setStatus(String status) {
this.status = status;
}
......
......@@ -11,56 +11,56 @@ public interface EbsApiService {
*
* @param items
*/
void queryRemoteServerThenUpdateJE(List<JournalEntryQueryDto> items);
void queryRemoteServerThenUpdateJE(Long id,List<JournalEntryQueryDto> items);
/**
* ebs 科目余额表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateTB(List<TrialBalanceQueryDto> items);
void queryRemoteServerThenUpdateTB(Long id,List<TrialBalanceQueryDto> items);
/**
* ebs 现金流量表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateCF(List<CashFlowQueryDto> items);
void queryRemoteServerThenUpdateCF(Long id,List<CashFlowQueryDto> items);
/**
* ebs 资产负债表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateBS(List<BalanceSheetQueryDto> items);
void queryRemoteServerThenUpdateBS(Long id,List<BalanceSheetQueryDto> items);
/**
* ebs 资产负债表PRC同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateBSprc(List<BalanceSheetPrcQueryDto> items);
void queryRemoteServerThenUpdateBSprc(Long id,List<BalanceSheetPrcQueryDto> items);
/**
* ebs 利润表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdatePL(List<ProfitLossStatementQueryDto> items);
void queryRemoteServerThenUpdatePL(Long id ,List<ProfitLossStatementQueryDto> items);
/**
* ebs 利润表PRC同步更新
*
* @param items
*/
void queryRemoteServerThenUpdatePLprc(List<ProfitLossStatementPrcQueryDto> items);
void queryRemoteServerThenUpdatePLprc(Long id,List<ProfitLossStatementPrcQueryDto> items);
/**
* ebs 汇率表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateOAR(List<OrganizationAccountingRateQueryDto> items);
void queryRemoteServerThenUpdateOAR(Long id,List<OrganizationAccountingRateQueryDto> items);
/**
* ebs 机构信息表同步更新
......
package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import org.junit.Test;
import pwc.taxtech.atms.CommonIT;
import pwc.taxtech.atms.dto.ebsdto.*;
......@@ -31,7 +30,7 @@ public class EbsApiServiceImplTest extends CommonIT {
}
@Test
public void queryRemoteServerThenUpdateOrg(){
List<OrganizationQueryDto> items = new ArrayList();
List<OrganizationQueryDto> items =new ArrayList<>();
for(int i=0;i<2;i++){
OrganizationQueryDto dto = new OrganizationQueryDto();
dto.setTaxPayerNumber("sadsafsdf3232");
......@@ -72,7 +71,7 @@ public class EbsApiServiceImplTest extends CommonIT {
journalEntryQueryDto.setLineNum("日记账行号");
journalEntryQueryDto.setApprovalStatus("审批状态");
journalEntryQueryDto.setPostedStatus("过账");
journalEntryQueryDto.setPeriod(20180102+i);
// journalEntryQueryDto.setPeriod(20180102+i);
journalEntryQueryDto.setJournalSource("日记账来源");
journalEntryQueryDto.setCategory("日记账类别");
journalEntryQueryDto.setName("日记账名称");
......@@ -134,10 +133,10 @@ public class EbsApiServiceImplTest extends CommonIT {
List<TrialBalanceQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
TrialBalanceQueryDto result = new TrialBalanceQueryDto();
result.setDate("2019-03-04 19:14:17");
result.setStatus(false);
result.setSource("来源");
result.setPeriod(201803);
// result.setDate("2019-03-04 19:14:17");
// result.setStatus(false);
// result.setSource("来源");
// result.setPeriod(201803);
result.setLedgerId("账套ID");
result.setLedgerName("账套名称");
result.setCurrencyCode("账套币种");
......@@ -195,10 +194,10 @@ public class EbsApiServiceImplTest extends CommonIT {
List<CashFlowQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
CashFlowQueryDto result = new CashFlowQueryDto();
result.setDate("2019-03-04 19:14:17");
result.setSource("来源");
result.setPeriod(201803);
result.setStatus(true);
// result.setDate("2019-03-04 19:14:17");
// result.setSource("来源");
// result.setPeriod(201803);
// result.setStatus(true);
result.setLedgerId("账套ID");
result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种");
......@@ -222,9 +221,9 @@ public class EbsApiServiceImplTest extends CommonIT {
List<BalanceSheetQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
BalanceSheetQueryDto result = new BalanceSheetQueryDto();
result.setDate("2019-03-04 19:14:17");
result.setPeriod(201812);
result.setStatus(false);
// result.setDate("2019-03-04 19:14:17");
// result.setPeriod(201812);
// result.setStatus(false);
result.setLedgerCurrencyCode("账套币种");
result.setEntityCode("机构编码");
result.setEntityName("机构名称");
......@@ -248,10 +247,10 @@ public class EbsApiServiceImplTest extends CommonIT {
List<BalanceSheetPrcQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
BalanceSheetPrcQueryDto result = new BalanceSheetPrcQueryDto();
result.setDate("2019-03-04 19:14:17");
result.setStatus(false);
result.setSource("来源");
result.setPeriod(201804);
// result.setDate("2019-03-04 19:14:17");
// result.setStatus(false);
// result.setSource("来源");
// result.setPeriod(201804);
result.setLedgerId("账套ID");
result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种");
......@@ -273,10 +272,10 @@ public class EbsApiServiceImplTest extends CommonIT {
List<ProfitLossStatementQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
ProfitLossStatementQueryDto result = new ProfitLossStatementQueryDto();
result.setDate("2019-03-04 19:14:17");
result.setStatus(false);
result.setSource("来源");
result.setPeriod(201904);
// result.setDate("2019-03-04 19:14:17");
// result.setStatus(false);
// result.setSource("来源");
// result.setPeriod(201904);
result.setLedgerId("账套ID");
result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种");
......@@ -298,10 +297,10 @@ public class EbsApiServiceImplTest extends CommonIT {
List<ProfitLossStatementPrcQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
ProfitLossStatementPrcQueryDto result = new ProfitLossStatementPrcQueryDto();
result.setDate("2019-03-04 19:14:17");
result.setStatus(false);
result.setSource("来源");
result.setPeriod(201904);
// result.setDate("2019-03-04 19:14:17");
// result.setStatus(false);
// result.setSource("来源");
// result.setPeriod(201904);
result.setLedgerId("账套ID");
result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种");
......@@ -323,7 +322,7 @@ public class EbsApiServiceImplTest extends CommonIT {
List<OrganizationAccountingRateQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
OrganizationAccountingRateQueryDto result = new OrganizationAccountingRateQueryDto();
result.setPeriod(2018);
// result.setPeriod(2018);
result.setConvertionType("汇率类型名称");
result.setCurrencyFrom("原币种");
result.setCurrencyTo("目标币种");
......@@ -332,4 +331,20 @@ public class EbsApiServiceImplTest extends CommonIT {
String a=JSON.toJSONString(items);
System.out.println(a);
}
@Test
public void testConvertPeriod(){
System.out.println(convertPeriod(201813));
System.out.println(convertPeriod(201814));
System.out.println(convertPeriod(201812));
System.out.println(convertPeriod(201810));
System.out.println(convertPeriod(201811));
}
private Integer convertPeriod(Integer period){
if(period%100==13){
period--;
}
return period;
}
}
\ 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