Commit 506dce2c authored by chase's avatar chase

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

parents de5fbc39 1c7bd322
package pwc.taxtech.atms.common.util;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.security.GeneralSecurityException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.Consts;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.config.RequestConfig.Builder;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLContextBuilder;
import org.apache.http.conn.ssl.TrustStrategy;
import org.apache.http.conn.ssl.X509HostnameVerifier;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.BasicNameValuePair;
/**
* 依赖的jar包有:commons-lang-2.6.jar、httpclient-4.3.2.jar、httpcore-4.3.1.jar、commons-io-2.4.jar
* @author zhaoyb
*
*/
public class HttpUtil {
public static final int connTimeout=10000;
public static final int readTimeout=10000;
public static final String charset="UTF-8";
private static HttpClient client = null;
static {
PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();
cm.setMaxTotal(128);
cm.setDefaultMaxPerRoute(128);
client = HttpClients.custom().setConnectionManager(cm).build();
}
public static String postParameters(String url, String parameterStr) throws ConnectTimeoutException, SocketTimeoutException, Exception{
return post(url,parameterStr,"application/x-www-form-urlencoded",charset,connTimeout,readTimeout);
}
public static String postParameters(String url, String parameterStr,String charset, Integer connTimeout, Integer readTimeout) throws ConnectTimeoutException, SocketTimeoutException, Exception{
return post(url,parameterStr,"application/x-www-form-urlencoded",charset,connTimeout,readTimeout);
}
public static String postParameters(String url, Map<String, String> params) throws ConnectTimeoutException,
SocketTimeoutException, Exception {
return postForm(url, params, null, connTimeout, readTimeout);
}
public static String postParameters(String url, Map<String, String> params, Integer connTimeout,Integer readTimeout) throws ConnectTimeoutException,
SocketTimeoutException, Exception {
return postForm(url, params, null, connTimeout, readTimeout);
}
public static String get(String url) throws Exception {
return get(url, charset, null, null);
}
public static String get(String url, String charset) throws Exception {
return get(url, charset, connTimeout, readTimeout);
}
/**
* 发送一个 Post 请求, 使用指定的字符集编码.
*
* @param url
* @param body RequestBody
* @param mimeType 例如 application/xml "application/x-www-form-urlencoded" a=1&b=2&c=3
* @param charset 编码
* @param connTimeout 建立链接超时时间,毫秒.
* @param readTimeout 响应超时时间,毫秒.
* @return ResponseBody, 使用指定的字符集编码.
* @throws ConnectTimeoutException 建立链接超时异常
* @throws SocketTimeoutException 响应超时
* @throws Exception
*/
public static String post(String url, String body, String mimeType,String charset, Integer connTimeout, Integer readTimeout)
throws ConnectTimeoutException, SocketTimeoutException, Exception {
HttpClient client = null;
HttpPost post = new HttpPost(url);
String result = "";
try {
if (StringUtils.isNotBlank(body)) {
HttpEntity entity = new StringEntity(body, ContentType.create(mimeType, charset));
post.setEntity(entity);
}
// 设置参数
Builder customReqConf = RequestConfig.custom();
if (connTimeout != null) {
customReqConf.setConnectTimeout(connTimeout);
}
if (readTimeout != null) {
customReqConf.setSocketTimeout(readTimeout);
}
post.setConfig(customReqConf.build());
HttpResponse res;
if (url.startsWith("https")) {
// 执行 Https 请求.
client = createSSLInsecureClient();
res = client.execute(post);
} else {
// 执行 Http 请求.
client = HttpUtil.client;
res = client.execute(post);
}
result = IOUtils.toString(res.getEntity().getContent(), charset);
} finally {
post.releaseConnection();
if (url.startsWith("https") && client != null&& client instanceof CloseableHttpClient) {
((CloseableHttpClient) client).close();
}
}
return result;
}
/**
* 提交form表单
*
* @param url
* @param params
* @param connTimeout
* @param readTimeout
* @return
* @throws ConnectTimeoutException
* @throws SocketTimeoutException
* @throws Exception
*/
public static String postForm(String url, Map<String, String> params, Map<String, String> headers, Integer connTimeout,Integer readTimeout) throws ConnectTimeoutException,
SocketTimeoutException, Exception {
HttpClient client = null;
HttpPost post = new HttpPost(url);
try {
if (params != null && !params.isEmpty()) {
List<NameValuePair> formParams = new ArrayList<org.apache.http.NameValuePair>();
Set<Entry<String, String>> entrySet = params.entrySet();
for (Entry<String, String> entry : entrySet) {
formParams.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
}
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formParams, Consts.UTF_8);
post.setEntity(entity);
}
if (headers != null && !headers.isEmpty()) {
for (Entry<String, String> entry : headers.entrySet()) {
post.addHeader(entry.getKey(), entry.getValue());
}
}
// 设置参数
Builder customReqConf = RequestConfig.custom();
if (connTimeout != null) {
customReqConf.setConnectTimeout(connTimeout);
}
if (readTimeout != null) {
customReqConf.setSocketTimeout(readTimeout);
}
post.setConfig(customReqConf.build());
HttpResponse res = null;
if (url.startsWith("https")) {
// 执行 Https 请求.
client = createSSLInsecureClient();
res = client.execute(post);
} else {
// 执行 Http 请求.
client = HttpUtil.client;
res = client.execute(post);
}
return IOUtils.toString(res.getEntity().getContent(), "UTF-8");
} finally {
post.releaseConnection();
if (url.startsWith("https") && client != null
&& client instanceof CloseableHttpClient) {
((CloseableHttpClient) client).close();
}
}
}
/**
* 发送一个 GET 请求
*
* @param url
* @param charset
* @param connTimeout 建立链接超时时间,毫秒.
* @param readTimeout 响应超时时间,毫秒.
* @return
* @throws ConnectTimeoutException 建立链接超时
* @throws SocketTimeoutException 响应超时
* @throws Exception
*/
public static String get(String url, String charset, Integer connTimeout,Integer readTimeout)
throws ConnectTimeoutException,SocketTimeoutException, Exception {
HttpClient client = null;
HttpGet get = new HttpGet(url);
String result = "";
try {
// 设置参数
Builder customReqConf = RequestConfig.custom();
if (connTimeout != null) {
customReqConf.setConnectTimeout(connTimeout);
}
if (readTimeout != null) {
customReqConf.setSocketTimeout(readTimeout);
}
get.setConfig(customReqConf.build());
HttpResponse res = null;
if (url.startsWith("https")) {
// 执行 Https 请求.
client = createSSLInsecureClient();
res = client.execute(get);
} else {
// 执行 Http 请求.
client = HttpUtil.client;
res = client.execute(get);
}
result = IOUtils.toString(res.getEntity().getContent(), charset);
} finally {
get.releaseConnection();
if (url.startsWith("https") && client != null && client instanceof CloseableHttpClient) {
((CloseableHttpClient) client).close();
}
}
return result;
}
/**
* 从 response 里获取 charset
*
* @param ressponse
* @return
*/
@SuppressWarnings("unused")
private static String getCharsetFromResponse(HttpResponse ressponse) {
// Content-Type:text/html; charset=GBK
if (ressponse.getEntity() != null && ressponse.getEntity().getContentType() != null && ressponse.getEntity().getContentType().getValue() != null) {
String contentType = ressponse.getEntity().getContentType().getValue();
if (contentType.contains("charset=")) {
return contentType.substring(contentType.indexOf("charset=") + 8);
}
}
return null;
}
/**
* 创建 SSL连接
* @return
* @throws GeneralSecurityException
*/
private static CloseableHttpClient createSSLInsecureClient() throws GeneralSecurityException {
try {
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
public boolean isTrusted(X509Certificate[] chain,String authType) throws CertificateException {
return true;
}
}).build();
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, new X509HostnameVerifier() {
@Override
public boolean verify(String arg0, SSLSession arg1) {
return true;
}
@Override
public void verify(String host, SSLSocket ssl)
throws IOException {
}
@Override
public void verify(String host, X509Certificate cert)
throws SSLException {
}
@Override
public void verify(String host, String[] cns,
String[] subjectAlts) throws SSLException {
}
});
return HttpClients.custom().setSSLSocketFactory(sslsf).build();
} catch (GeneralSecurityException e) {
throw e;
}
}
public static void main(String[] args) {
try {
String str= post("https://localhost:443/ssl/test.shtml","name=12&page=34","application/x-www-form-urlencoded", "UTF-8", 10000, 10000);
//String str= get("https://localhost:443/ssl/test.shtml?name=12&page=34","GBK");
/*Map<String,String> map = new HashMap<String,String>();
map.put("name", "111");
map.put("page", "222");
String str= postForm("https://localhost:443/ssl/test.shtml",map,null, 10000, 10000);*/
System.out.println(str);
} catch (ConnectTimeoutException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SocketTimeoutException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
\ No newline at end of file
...@@ -23,13 +23,13 @@ public class EbsApiController { ...@@ -23,13 +23,13 @@ public class EbsApiController {
@RequestMapping(value = "/updateJE", method = RequestMethod.POST) @RequestMapping(value = "/updateJE", method = RequestMethod.POST)
public @ResponseBody 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)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateJE return items is empty"); logger.debug("the updateJE return items is empty");
return ApiResultDto.success(Collections.emptyList()); return ApiResultDto.success(Collections.emptyList());
} }
try { try {
ebsApiService.queryRemoteServerThenUpdateJE(items); ebsApiService.queryRemoteServerThenUpdateJE(id,items);
return ApiResultDto.success(); return ApiResultDto.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("updateJE error.", e); logger.error("updateJE error.", e);
...@@ -38,13 +38,13 @@ public class EbsApiController { ...@@ -38,13 +38,13 @@ public class EbsApiController {
} }
@RequestMapping(value = "/updateTB", method = RequestMethod.POST) @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)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateTB return items is empty"); logger.debug("the updateTB return items is empty");
return ApiResultDto.success(Collections.emptyList()); return ApiResultDto.success(Collections.emptyList());
} }
try { try {
ebsApiService.queryRemoteServerThenUpdateTB(items); ebsApiService.queryRemoteServerThenUpdateTB(id,items);
return ApiResultDto.success(); return ApiResultDto.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("updateTB error.", e); logger.error("updateTB error.", e);
...@@ -53,13 +53,13 @@ public class EbsApiController { ...@@ -53,13 +53,13 @@ public class EbsApiController {
} }
@RequestMapping(value = "/updateCF", method = RequestMethod.POST) @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)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateCF return items is empty"); logger.debug("the updateCF return items is empty");
return ApiResultDto.success(Collections.emptyList()); return ApiResultDto.success(Collections.emptyList());
} }
try { try {
ebsApiService.queryRemoteServerThenUpdateCF(items); ebsApiService.queryRemoteServerThenUpdateCF(id,items);
return ApiResultDto.success(); return ApiResultDto.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("updateCF error.", e); logger.error("updateCF error.", e);
...@@ -68,13 +68,13 @@ public class EbsApiController { ...@@ -68,13 +68,13 @@ public class EbsApiController {
} }
@RequestMapping(value = "/updateBS", method = RequestMethod.POST) @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)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateBS return items is empty"); logger.debug("the updateBS return items is empty");
return ApiResultDto.success(Collections.emptyList()); return ApiResultDto.success(Collections.emptyList());
} }
try { try {
ebsApiService.queryRemoteServerThenUpdateBS(items); ebsApiService.queryRemoteServerThenUpdateBS(id,items);
return ApiResultDto.success(); return ApiResultDto.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("updateBS error.", e); logger.error("updateBS error.", e);
...@@ -83,13 +83,13 @@ public class EbsApiController { ...@@ -83,13 +83,13 @@ public class EbsApiController {
} }
@RequestMapping(value = "/updatePL", method = RequestMethod.POST) @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)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updatePL return items is empty"); logger.debug("the updatePL return items is empty");
return ApiResultDto.success(Collections.emptyList()); return ApiResultDto.success(Collections.emptyList());
} }
try { try {
ebsApiService.queryRemoteServerThenUpdatePL(items); ebsApiService.queryRemoteServerThenUpdatePL(id,items);
return ApiResultDto.success(); return ApiResultDto.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("updatePL error.", e); logger.error("updatePL error.", e);
...@@ -98,13 +98,13 @@ public class EbsApiController { ...@@ -98,13 +98,13 @@ public class EbsApiController {
} }
@RequestMapping(value = "/updateBSprc", method = RequestMethod.POST) @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)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateBSprc return items is empty"); logger.debug("the updateBSprc return items is empty");
return ApiResultDto.success(Collections.emptyList()); return ApiResultDto.success(Collections.emptyList());
} }
try { try {
ebsApiService.queryRemoteServerThenUpdateBSprc(items); ebsApiService.queryRemoteServerThenUpdateBSprc(id,items);
return ApiResultDto.success(); return ApiResultDto.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("updateBSprc error.", e); logger.error("updateBSprc error.", e);
...@@ -113,13 +113,13 @@ public class EbsApiController { ...@@ -113,13 +113,13 @@ public class EbsApiController {
} }
@RequestMapping(value = "/updatePLprc", method = RequestMethod.POST) @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)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updatePLprc return items is empty"); logger.debug("the updatePLprc return items is empty");
return ApiResultDto.success(Collections.emptyList()); return ApiResultDto.success(Collections.emptyList());
} }
try { try {
ebsApiService.queryRemoteServerThenUpdatePLprc(items); ebsApiService.queryRemoteServerThenUpdatePLprc(id,items);
return ApiResultDto.success(); return ApiResultDto.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("updatePLprc error.", e); logger.error("updatePLprc error.", e);
...@@ -128,13 +128,13 @@ public class EbsApiController { ...@@ -128,13 +128,13 @@ public class EbsApiController {
} }
@RequestMapping(value = "/updateOAR", method = RequestMethod.POST) @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)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateOAR return items is empty"); logger.debug("the updateOAR return items is empty");
return ApiResultDto.success(Collections.emptyList()); return ApiResultDto.success(Collections.emptyList());
} }
try { try {
ebsApiService.queryRemoteServerThenUpdateOAR(items); ebsApiService.queryRemoteServerThenUpdateOAR(id,items);
return ApiResultDto.success(); return ApiResultDto.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("updateOAR error.", e); logger.error("updateOAR error.", e);
......
package pwc.taxtech.atms.dto.ebsdto; package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
public class BalanceSheetPrcQueryDto { public class BalanceSheetPrcQueryDto {
...@@ -13,7 +16,8 @@ public class BalanceSheetPrcQueryDto { ...@@ -13,7 +16,8 @@ public class BalanceSheetPrcQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String date; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -35,7 +39,7 @@ public class BalanceSheetPrcQueryDto { ...@@ -35,7 +39,7 @@ public class BalanceSheetPrcQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer period; private String period;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -46,7 +50,7 @@ public class BalanceSheetPrcQueryDto { ...@@ -46,7 +50,7 @@ public class BalanceSheetPrcQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Boolean status; private String status;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -158,14 +162,6 @@ public class BalanceSheetPrcQueryDto { ...@@ -158,14 +162,6 @@ public class BalanceSheetPrcQueryDto {
*/ */
private BigDecimal begBal; private BigDecimal begBal;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getSource() { public String getSource() {
return source; return source;
} }
...@@ -174,19 +170,27 @@ public class BalanceSheetPrcQueryDto { ...@@ -174,19 +170,27 @@ public class BalanceSheetPrcQueryDto {
this.source = source; this.source = source;
} }
public Integer getPeriod() { public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getPeriod() {
return period; return period;
} }
public void setPeriod(Integer period) { public void setPeriod(String period) {
this.period = period; this.period = period;
} }
public Boolean getStatus() { public String getStatus() {
return status; return status;
} }
public void setStatus(Boolean status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
......
package pwc.taxtech.atms.dto.ebsdto; package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
public class BalanceSheetQueryDto { public class BalanceSheetQueryDto {
/** /**
...@@ -12,7 +15,8 @@ public class BalanceSheetQueryDto { ...@@ -12,7 +15,8 @@ public class BalanceSheetQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String date; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -34,7 +38,7 @@ public class BalanceSheetQueryDto { ...@@ -34,7 +38,7 @@ public class BalanceSheetQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer period; private String period;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -45,7 +49,7 @@ public class BalanceSheetQueryDto { ...@@ -45,7 +49,7 @@ public class BalanceSheetQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Boolean status; private String status;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -157,14 +161,6 @@ public class BalanceSheetQueryDto { ...@@ -157,14 +161,6 @@ public class BalanceSheetQueryDto {
*/ */
private BigDecimal begBal; private BigDecimal begBal;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getSource() { public String getSource() {
return source; return source;
} }
...@@ -173,19 +169,27 @@ public class BalanceSheetQueryDto { ...@@ -173,19 +169,27 @@ public class BalanceSheetQueryDto {
this.source = source; this.source = source;
} }
public Integer getPeriod() { public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getPeriod() {
return period; return period;
} }
public void setPeriod(Integer period) { public void setPeriod(String period) {
this.period = period; this.period = period;
} }
public Boolean getStatus() { public String getStatus() {
return status; return status;
} }
public void setStatus(Boolean status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
......
package pwc.taxtech.atms.dto.ebsdto; package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
public class CashFlowQueryDto { public class CashFlowQueryDto {
/** /**
...@@ -12,7 +15,8 @@ public class CashFlowQueryDto { ...@@ -12,7 +15,8 @@ public class CashFlowQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String date; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -34,7 +38,7 @@ public class CashFlowQueryDto { ...@@ -34,7 +38,7 @@ public class CashFlowQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer period; private String period;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -45,7 +49,7 @@ public class CashFlowQueryDto { ...@@ -45,7 +49,7 @@ public class CashFlowQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Boolean status; private String status;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -169,11 +173,11 @@ public class CashFlowQueryDto { ...@@ -169,11 +173,11 @@ public class CashFlowQueryDto {
*/ */
private BigDecimal ytdAmt; private BigDecimal ytdAmt;
public String getDate() { public Date getDate() {
return date; return date;
} }
public void setDate(String date) { public void setDate(Date date) {
this.date = date; this.date = date;
} }
...@@ -185,19 +189,19 @@ public class CashFlowQueryDto { ...@@ -185,19 +189,19 @@ public class CashFlowQueryDto {
this.source = source; this.source = source;
} }
public Integer getPeriod() { public String getPeriod() {
return period; return period;
} }
public void setPeriod(Integer period) { public void setPeriod(String period) {
this.period = period; this.period = period;
} }
public Boolean getStatus() { public String getStatus() {
return status; return status;
} }
public void setStatus(Boolean status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
......
package pwc.taxtech.atms.dto.ebsdto; package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
public class JournalEntryQueryDto { public class JournalEntryQueryDto {
...@@ -13,7 +16,8 @@ public class JournalEntryQueryDto { ...@@ -13,7 +16,8 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String date; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -68,7 +72,7 @@ public class JournalEntryQueryDto { ...@@ -68,7 +72,7 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Boolean status; private String status;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -123,7 +127,7 @@ public class JournalEntryQueryDto { ...@@ -123,7 +127,7 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer period; private String period;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -134,7 +138,8 @@ public class JournalEntryQueryDto { ...@@ -134,7 +138,8 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String accountingDate; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date accountingDate;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -508,7 +513,8 @@ public class JournalEntryQueryDto { ...@@ -508,7 +513,8 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String attribute2; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date attribute2;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -684,7 +690,8 @@ public class JournalEntryQueryDto { ...@@ -684,7 +690,8 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String createdDate; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date createdDate;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -706,13 +713,14 @@ public class JournalEntryQueryDto { ...@@ -706,13 +713,14 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @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; return date;
} }
public void setDate(String date) { public void setDate(Date date) {
this.date = date; this.date = date;
} }
...@@ -748,11 +756,11 @@ public class JournalEntryQueryDto { ...@@ -748,11 +756,11 @@ public class JournalEntryQueryDto {
this.currencyCode = currencyCode; this.currencyCode = currencyCode;
} }
public Boolean getStatus() { public String getStatus() {
return status; return status;
} }
public void setStatus(Boolean status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
...@@ -788,19 +796,19 @@ public class JournalEntryQueryDto { ...@@ -788,19 +796,19 @@ public class JournalEntryQueryDto {
this.postedStatus = postedStatus; this.postedStatus = postedStatus;
} }
public Integer getPeriod() { public String getPeriod() {
return period; return period;
} }
public void setPeriod(Integer period) { public void setPeriod(String period) {
this.period = period; this.period = period;
} }
public String getAccountingDate() { public Date getAccountingDate() {
return accountingDate; return accountingDate;
} }
public void setAccountingDate(String accountingDate) { public void setAccountingDate(Date accountingDate) {
this.accountingDate = accountingDate; this.accountingDate = accountingDate;
} }
...@@ -1068,11 +1076,11 @@ public class JournalEntryQueryDto { ...@@ -1068,11 +1076,11 @@ public class JournalEntryQueryDto {
this.attribute1 = attribute1; this.attribute1 = attribute1;
} }
public String getAttribute2() { public Date getAttribute2() {
return attribute2; return attribute2;
} }
public void setAttribute2(String attribute2) { public void setAttribute2(Date attribute2) {
this.attribute2 = attribute2; this.attribute2 = attribute2;
} }
...@@ -1196,11 +1204,11 @@ public class JournalEntryQueryDto { ...@@ -1196,11 +1204,11 @@ public class JournalEntryQueryDto {
this.createdBy = createdBy; this.createdBy = createdBy;
} }
public String getCreatedDate() { public Date getCreatedDate() {
return createdDate; return createdDate;
} }
public void setCreatedDate(String createdDate) { public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate; this.createdDate = createdDate;
} }
...@@ -1212,11 +1220,11 @@ public class JournalEntryQueryDto { ...@@ -1212,11 +1220,11 @@ public class JournalEntryQueryDto {
this.lateUpdatedBy = lateUpdatedBy; this.lateUpdatedBy = lateUpdatedBy;
} }
public String getLateUpdatedDate() { public Date getLateUpdatedDate() {
return lateUpdatedDate; return lateUpdatedDate;
} }
public void setLateUpdatedDate(String lateUpdatedDate) { public void setLateUpdatedDate(Date lateUpdatedDate) {
this.lateUpdatedDate = lateUpdatedDate; this.lateUpdatedDate = lateUpdatedDate;
} }
} }
package pwc.taxtech.atms.dto.ebsdto; package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
public class OrganizationAccountingRateQueryDto { public class OrganizationAccountingRateQueryDto {
private String date; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 期间 * 期间
...@@ -13,7 +17,7 @@ public class OrganizationAccountingRateQueryDto { ...@@ -13,7 +17,7 @@ public class OrganizationAccountingRateQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer period; private String period;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -69,19 +73,19 @@ public class OrganizationAccountingRateQueryDto { ...@@ -69,19 +73,19 @@ public class OrganizationAccountingRateQueryDto {
*/ */
private String invalidDate; private String invalidDate;
public String getDate() { public Date getDate() {
return date; return date;
} }
public void setDate(String date) { public void setDate(Date date) {
this.date = date; this.date = date;
} }
public Integer getPeriod() { public String getPeriod() {
return period; return period;
} }
public void setPeriod(Integer period) { public void setPeriod(String period) {
this.period = period; this.period = period;
} }
......
package pwc.taxtech.atms.dto.ebsdto; package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
public class ProfitLossStatementPrcQueryDto { public class ProfitLossStatementPrcQueryDto {
/** /**
...@@ -12,7 +15,8 @@ public class ProfitLossStatementPrcQueryDto { ...@@ -12,7 +15,8 @@ public class ProfitLossStatementPrcQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String date; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -34,7 +38,7 @@ public class ProfitLossStatementPrcQueryDto { ...@@ -34,7 +38,7 @@ public class ProfitLossStatementPrcQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer period; private String period;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -45,7 +49,7 @@ public class ProfitLossStatementPrcQueryDto { ...@@ -45,7 +49,7 @@ public class ProfitLossStatementPrcQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Boolean status; private String status;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -157,14 +161,6 @@ public class ProfitLossStatementPrcQueryDto { ...@@ -157,14 +161,6 @@ public class ProfitLossStatementPrcQueryDto {
*/ */
private BigDecimal ytdAmt; private BigDecimal ytdAmt;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getSource() { public String getSource() {
return source; return source;
} }
...@@ -173,19 +169,27 @@ public class ProfitLossStatementPrcQueryDto { ...@@ -173,19 +169,27 @@ public class ProfitLossStatementPrcQueryDto {
this.source = source; this.source = source;
} }
public Integer getPeriod() { public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getPeriod() {
return period; return period;
} }
public void setPeriod(Integer period) { public void setPeriod(String period) {
this.period = period; this.period = period;
} }
public Boolean getStatus() { public String getStatus() {
return status; return status;
} }
public void setStatus(Boolean status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
......
package pwc.taxtech.atms.dto.ebsdto; package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
public class ProfitLossStatementQueryDto { public class ProfitLossStatementQueryDto {
/** /**
...@@ -12,7 +15,8 @@ public class ProfitLossStatementQueryDto { ...@@ -12,7 +15,8 @@ public class ProfitLossStatementQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String date; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -34,7 +38,7 @@ public class ProfitLossStatementQueryDto { ...@@ -34,7 +38,7 @@ public class ProfitLossStatementQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer period; private String period;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -45,7 +49,7 @@ public class ProfitLossStatementQueryDto { ...@@ -45,7 +49,7 @@ public class ProfitLossStatementQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Boolean status; private String status;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -157,14 +161,6 @@ public class ProfitLossStatementQueryDto { ...@@ -157,14 +161,6 @@ public class ProfitLossStatementQueryDto {
*/ */
private BigDecimal ytdAmt; private BigDecimal ytdAmt;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getSource() { public String getSource() {
return source; return source;
} }
...@@ -173,19 +169,27 @@ public class ProfitLossStatementQueryDto { ...@@ -173,19 +169,27 @@ public class ProfitLossStatementQueryDto {
this.source = source; this.source = source;
} }
public Integer getPeriod() { public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getPeriod() {
return period; return period;
} }
public void setPeriod(Integer period) { public void setPeriod(String period) {
this.period = period; this.period = period;
} }
public Boolean getStatus() { public String getStatus() {
return status; return status;
} }
public void setStatus(Boolean status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
......
package pwc.taxtech.atms.dto.ebsdto; package pwc.taxtech.atms.dto.ebsdto;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
public class TrialBalanceQueryDto { public class TrialBalanceQueryDto {
/** /**
...@@ -12,7 +15,8 @@ public class TrialBalanceQueryDto { ...@@ -12,7 +15,8 @@ public class TrialBalanceQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String date; @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm",timezone = "GMT+8")
private Date date;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -34,7 +38,7 @@ public class TrialBalanceQueryDto { ...@@ -34,7 +38,7 @@ public class TrialBalanceQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer period; private String period;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -78,7 +82,7 @@ public class TrialBalanceQueryDto { ...@@ -78,7 +82,7 @@ public class TrialBalanceQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Boolean status; private String status;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -542,11 +546,11 @@ public class TrialBalanceQueryDto { ...@@ -542,11 +546,11 @@ public class TrialBalanceQueryDto {
*/ */
private BigDecimal ytdCrBeq; private BigDecimal ytdCrBeq;
public String getDate() { public Date getDate() {
return date; return date;
} }
public void setDate(String date) { public void setDate(Date date) {
this.date = date; this.date = date;
} }
...@@ -558,11 +562,11 @@ public class TrialBalanceQueryDto { ...@@ -558,11 +562,11 @@ public class TrialBalanceQueryDto {
this.source = source; this.source = source;
} }
public Integer getPeriod() { public String getPeriod() {
return period; return period;
} }
public void setPeriod(Integer period) { public void setPeriod(String period) {
this.period = period; this.period = period;
} }
...@@ -590,11 +594,11 @@ public class TrialBalanceQueryDto { ...@@ -590,11 +594,11 @@ public class TrialBalanceQueryDto {
this.currencyCode = currencyCode; this.currencyCode = currencyCode;
} }
public Boolean getStatus() { public String getStatus() {
return status; return status;
} }
public void setStatus(Boolean status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
......
...@@ -27,6 +27,8 @@ public class TrialBalanceDto implements Serializable { ...@@ -27,6 +27,8 @@ public class TrialBalanceDto implements Serializable {
private String source; private String source;
private Integer tmsPeriod;
private Integer period; private Integer period;
private String ledgerId; private String ledgerId;
...@@ -253,6 +255,14 @@ public class TrialBalanceDto implements Serializable { ...@@ -253,6 +255,14 @@ public class TrialBalanceDto implements Serializable {
this.source = source == null ? null : source.trim(); this.source = source == null ? null : source.trim();
} }
public Integer getTmsPeriod() {
return tmsPeriod;
}
public void setTmsPeriod(Integer tmsPeriod) {
this.tmsPeriod = tmsPeriod;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column trial_balance.period * This method returns the value of the database column trial_balance.period
......
...@@ -11,56 +11,56 @@ public interface EbsApiService { ...@@ -11,56 +11,56 @@ public interface EbsApiService {
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateJE(List<JournalEntryQueryDto> items); void queryRemoteServerThenUpdateJE(Long id,List<JournalEntryQueryDto> items);
/** /**
* ebs 科目余额表同步更新 * ebs 科目余额表同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateTB(List<TrialBalanceQueryDto> items); void queryRemoteServerThenUpdateTB(Long id,List<TrialBalanceQueryDto> items);
/** /**
* ebs 现金流量表同步更新 * ebs 现金流量表同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateCF(List<CashFlowQueryDto> items); void queryRemoteServerThenUpdateCF(Long id,List<CashFlowQueryDto> items);
/** /**
* ebs 资产负债表同步更新 * ebs 资产负债表同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateBS(List<BalanceSheetQueryDto> items); void queryRemoteServerThenUpdateBS(Long id,List<BalanceSheetQueryDto> items);
/** /**
* ebs 资产负债表PRC同步更新 * ebs 资产负债表PRC同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateBSprc(List<BalanceSheetPrcQueryDto> items); void queryRemoteServerThenUpdateBSprc(Long id,List<BalanceSheetPrcQueryDto> items);
/** /**
* ebs 利润表同步更新 * ebs 利润表同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdatePL(List<ProfitLossStatementQueryDto> items); void queryRemoteServerThenUpdatePL(Long id ,List<ProfitLossStatementQueryDto> items);
/** /**
* ebs 利润表PRC同步更新 * ebs 利润表PRC同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdatePLprc(List<ProfitLossStatementPrcQueryDto> items); void queryRemoteServerThenUpdatePLprc(Long id,List<ProfitLossStatementPrcQueryDto> items);
/** /**
* ebs 汇率表同步更新 * ebs 汇率表同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateOAR(List<OrganizationAccountingRateQueryDto> items); void queryRemoteServerThenUpdateOAR(Long id,List<OrganizationAccountingRateQueryDto> items);
/** /**
* ebs 机构信息表同步更新 * ebs 机构信息表同步更新
......
...@@ -37,8 +37,12 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -37,8 +37,12 @@ public class EbsApiServiceImpl implements EbsApiService {
@Resource @Resource
private BalanceSheetMapper balanceSheetMapper; private BalanceSheetMapper balanceSheetMapper;
@Resource @Resource
private BalanceSheetFinalMapper balanceSheetFinalMapper;
@Resource
private ProfitLossStatementMapper profitLossStatementMapper; private ProfitLossStatementMapper profitLossStatementMapper;
@Resource @Resource
private ProfitLossStatementFinalMapper profitLossStatementFinalMapper;
@Resource
private OrganizationAccountingRateMapper organizationAccountingRateMapper; private OrganizationAccountingRateMapper organizationAccountingRateMapper;
@Resource @Resource
private OrganizationMapper organizationMapper; private OrganizationMapper organizationMapper;
...@@ -59,7 +63,7 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -59,7 +63,7 @@ public class EbsApiServiceImpl implements EbsApiService {
private static final Logger logger = LoggerFactory.getLogger(EbsApiServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(EbsApiServiceImpl.class);
@Override @Override
public void queryRemoteServerThenUpdateJE(List<JournalEntryQueryDto> items) { public void queryRemoteServerThenUpdateJE(Long id ,List<JournalEntryQueryDto> items) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
logger.debug("start queryRemoteServerThenUpdateJE 日记账表"); logger.debug("start queryRemoteServerThenUpdateJE 日记账表");
//判断数据是否存在 //判断数据是否存在
...@@ -75,11 +79,12 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -75,11 +79,12 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.error("break loop as catch:" + e, e); logger.error("break loop as catch:" + e, e);
} }
} }
updateDataImportLog(id,items.size());
logger.debug("end queryRemoteServerThenUpdateJE 日记账表,took [{}] ms", System.currentTimeMillis() - start); logger.debug("end queryRemoteServerThenUpdateJE 日记账表,took [{}] ms", System.currentTimeMillis() - start);
} }
@Override @Override
public void queryRemoteServerThenUpdateTB(List<TrialBalanceQueryDto> items) { public void queryRemoteServerThenUpdateTB(Long id ,List<TrialBalanceQueryDto> items) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
logger.debug("start queryRemoteServerThenUpdateTB 科目余额表"); logger.debug("start queryRemoteServerThenUpdateTB 科目余额表");
//判断数据是否存在 //判断数据是否存在
...@@ -90,16 +95,17 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -90,16 +95,17 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("requestTBItems 科目余额表条目:" + JSON.toJSONString(items)); logger.debug("requestTBItems 科目余额表条目:" + JSON.toJSONString(items));
for (TrialBalanceQueryDto a : items) { for (TrialBalanceQueryDto a : items) {
try { try {
processTB(a); processTB(id,a);
} catch (Exception e) { } catch (Exception e) {
logger.error("break loop as catch:" + e, e); logger.error("break loop as catch:" + e, e);
} }
} }
updateDataImportLog(id,items.size());
logger.debug("end queryRemoteServerThenUpdateTB 科目余额表,took [{}] ms", System.currentTimeMillis() - start); logger.debug("end queryRemoteServerThenUpdateTB 科目余额表,took [{}] ms", System.currentTimeMillis() - start);
} }
@Override @Override
public void queryRemoteServerThenUpdateCF(List<CashFlowQueryDto> items) { public void queryRemoteServerThenUpdateCF(Long id ,List<CashFlowQueryDto> items) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
logger.debug("start queryRemoteServerThenUpdateCF 现金流量表"); logger.debug("start queryRemoteServerThenUpdateCF 现金流量表");
//判断数据是否存在 //判断数据是否存在
...@@ -110,16 +116,17 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -110,16 +116,17 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("requestCFItems 现金流量表条目:" + JSON.toJSONString(items)); logger.debug("requestCFItems 现金流量表条目:" + JSON.toJSONString(items));
for (CashFlowQueryDto a : items) { for (CashFlowQueryDto a : items) {
try { try {
processCF(a); processCF(id,a);
} catch (Exception e) { } catch (Exception e) {
logger.error("break loop as catch:" + e, e); logger.error("break loop as catch:" + e, e);
} }
} }
updateDataImportLog(id,items.size());
logger.debug("end queryRemoteServerThenUpdateCF 现金流量表,took [{}] ms", System.currentTimeMillis() - start); logger.debug("end queryRemoteServerThenUpdateCF 现金流量表,took [{}] ms", System.currentTimeMillis() - start);
} }
@Override @Override
public void queryRemoteServerThenUpdateBS(List<BalanceSheetQueryDto> items) { public void queryRemoteServerThenUpdateBS(Long id ,List<BalanceSheetQueryDto> items) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
logger.debug("start queryRemoteServerThenUpdateBS 资产负债表"); logger.debug("start queryRemoteServerThenUpdateBS 资产负债表");
//判断数据是否存在 //判断数据是否存在
...@@ -130,16 +137,17 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -130,16 +137,17 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("requestBSItems 资产负债表条目:" + JSON.toJSONString(items)); logger.debug("requestBSItems 资产负债表条目:" + JSON.toJSONString(items));
for (BalanceSheetQueryDto a : items) { for (BalanceSheetQueryDto a : items) {
try { try {
processBS(a); processBS(id,a);
} catch (Exception e) { } catch (Exception e) {
logger.error("break loop as catch:" + e, e); logger.error("break loop as catch:" + e, e);
} }
} }
updateDataImportLog(id,items.size());
logger.debug("end queryRemoteServerThenUpdateBS 资产负债表,took [{}] ms", System.currentTimeMillis() - start); logger.debug("end queryRemoteServerThenUpdateBS 资产负债表,took [{}] ms", System.currentTimeMillis() - start);
} }
@Override @Override
public void queryRemoteServerThenUpdateBSprc(List<BalanceSheetPrcQueryDto> items) { public void queryRemoteServerThenUpdateBSprc(Long id ,List<BalanceSheetPrcQueryDto> items) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
logger.debug("start queryRemoteServerThenUpdateBSprc 资产负债表PRC"); logger.debug("start queryRemoteServerThenUpdateBSprc 资产负债表PRC");
//判断数据是否存在 //判断数据是否存在
...@@ -150,16 +158,17 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -150,16 +158,17 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("requestBSprcItems 资产负债表PRC条目:" + JSON.toJSONString(items)); logger.debug("requestBSprcItems 资产负债表PRC条目:" + JSON.toJSONString(items));
for (BalanceSheetPrcQueryDto a : items) { for (BalanceSheetPrcQueryDto a : items) {
try { try {
processBSprc(a); processBSprc(id,a);
} catch (Exception e) { } catch (Exception e) {
logger.error("break loop as catch:" + e, e); logger.error("break loop as catch:" + e, e);
} }
} }
updateDataImportLog(id,items.size());
logger.debug("end queryRemoteServerThenUpdateBSprc 资产负债表PRC,took [{}] ms", System.currentTimeMillis() - start); logger.debug("end queryRemoteServerThenUpdateBSprc 资产负债表PRC,took [{}] ms", System.currentTimeMillis() - start);
} }
@Override @Override
public void queryRemoteServerThenUpdatePL(List<ProfitLossStatementQueryDto> items) { public void queryRemoteServerThenUpdatePL(Long id ,List<ProfitLossStatementQueryDto> items) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
logger.debug("start queryRemoteServerThenUpdatePL 利润表"); logger.debug("start queryRemoteServerThenUpdatePL 利润表");
//判断数据是否存在 //判断数据是否存在
...@@ -170,16 +179,17 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -170,16 +179,17 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("requestPLItems 利润表条目:" + JSON.toJSONString(items)); logger.debug("requestPLItems 利润表条目:" + JSON.toJSONString(items));
for (ProfitLossStatementQueryDto a : items) { for (ProfitLossStatementQueryDto a : items) {
try { try {
processPL(a); processPL(id,a);
} catch (Exception e) { } catch (Exception e) {
logger.error("break loop as catch:" + e, e); logger.error("break loop as catch:" + e, e);
} }
} }
updateDataImportLog(id,items.size());
logger.debug("end queryRemoteServerThenUpdatePL 利润表,took [{}] ms", System.currentTimeMillis() - start); logger.debug("end queryRemoteServerThenUpdatePL 利润表,took [{}] ms", System.currentTimeMillis() - start);
} }
@Override @Override
public void queryRemoteServerThenUpdatePLprc(List<ProfitLossStatementPrcQueryDto> items) { public void queryRemoteServerThenUpdatePLprc(Long id ,List<ProfitLossStatementPrcQueryDto> items) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
logger.debug("start queryRemoteServerThenUpdatePLprc 利润表PRC"); logger.debug("start queryRemoteServerThenUpdatePLprc 利润表PRC");
//判断数据是否存在 //判断数据是否存在
...@@ -190,16 +200,17 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -190,16 +200,17 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("requestPLItems 利润表PRC条目:" + JSON.toJSONString(items)); logger.debug("requestPLItems 利润表PRC条目:" + JSON.toJSONString(items));
for (ProfitLossStatementPrcQueryDto a : items) { for (ProfitLossStatementPrcQueryDto a : items) {
try { try {
processPLprc(a); processPLprc(id,a);
} catch (Exception e) { } catch (Exception e) {
logger.error("break loop as catch:" + e, e); logger.error("break loop as catch:" + e, e);
} }
} }
updateDataImportLog(id,items.size());
logger.debug("end queryRemoteServerThenUpdatePLprc 利润表PRC,took [{}] ms", System.currentTimeMillis() - start); logger.debug("end queryRemoteServerThenUpdatePLprc 利润表PRC,took [{}] ms", System.currentTimeMillis() - start);
} }
@Override @Override
public void queryRemoteServerThenUpdateOAR(List<OrganizationAccountingRateQueryDto> items) { public void queryRemoteServerThenUpdateOAR(Long id ,List<OrganizationAccountingRateQueryDto> items) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
logger.debug("start queryRemoteServerThenUpdateOAR 汇率表"); logger.debug("start queryRemoteServerThenUpdateOAR 汇率表");
//判断数据是否存在 //判断数据是否存在
...@@ -210,16 +221,18 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -210,16 +221,18 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("requestPLItems 汇率表:" + JSON.toJSONString(items)); logger.debug("requestPLItems 汇率表:" + JSON.toJSONString(items));
for (OrganizationAccountingRateQueryDto a : items) { for (OrganizationAccountingRateQueryDto a : items) {
try { try {
processOAR(a); processOAR(id,a);
} catch (Exception e) { } catch (Exception e) {
logger.error("break loop as catch:" + e, e); logger.error("break loop as catch:" + e, e);
} }
} }
updateDataImportLog(id,items.size());
logger.debug("end queryRemoteServerThenUpdateOAR 汇率表,took [{}] ms", System.currentTimeMillis() - start); logger.debug("end queryRemoteServerThenUpdateOAR 汇率表,took [{}] ms", System.currentTimeMillis() - start);
} }
private void processJE(JournalEntryQueryDto item) { private void processJE(JournalEntryQueryDto item) {
JournalEntryExample journalEntryExample = new JournalEntryExample(); JournalEntryExample journalEntryExample = new JournalEntryExample();
//日记账头ID和日记账行号
journalEntryExample.createCriteria().andHeaderIdEqualTo(item.getHeaderId()).andLineNumEqualTo(item.getLineNum()); journalEntryExample.createCriteria().andHeaderIdEqualTo(item.getHeaderId()).andLineNumEqualTo(item.getLineNum());
List<JournalEntry> journalEntryList = journalEntryMapper.selectByExample(journalEntryExample); List<JournalEntry> journalEntryList = journalEntryMapper.selectByExample(journalEntryExample);
//唯一则更新否则插入 //唯一则更新否则插入
...@@ -229,7 +242,7 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -229,7 +242,7 @@ public class EbsApiServiceImpl implements EbsApiService {
journalEntry = journalEntryList.get(0); journalEntry = journalEntryList.get(0);
populateFieldsJE(item, journalEntry); populateFieldsJE(item, journalEntry);
journalEntry.setId(journalEntryList.get(0).getId()); journalEntry.setId(journalEntryList.get(0).getId());
journalEntryMapper.updateByPrimaryKey(journalEntry); journalEntryMapper.updateByPrimaryKeySelective(journalEntry);
} else { } else {
logger.debug("miss and insert journalEntry headerId:{},lineNum:{}", item.getHeaderId(), item.getLineNum()); logger.debug("miss and insert journalEntry headerId:{},lineNum:{}", item.getHeaderId(), item.getLineNum());
populateFieldsJE(item, journalEntry); populateFieldsJE(item, journalEntry);
...@@ -241,34 +254,29 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -241,34 +254,29 @@ public class EbsApiServiceImpl implements EbsApiService {
} }
} }
private void processTB(TrialBalanceQueryDto item) { private void processTB(Long id,TrialBalanceQueryDto item) {
TrialBalanceExample example = new TrialBalanceExample(); TrialBalanceExample example = new TrialBalanceExample();
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间 //机构编码和期间
example.createCriteria().andSegment1EqualTo(item.getSegment1()).andPeriodEqualTo(item.getPeriod()); example.createCriteria().andSegment1EqualTo(item.getSegment1()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod()));
List<TrialBalance> itemList = trialBalanceMapper.selectByExample(example); List<TrialBalance> itemList = trialBalanceMapper.selectByExample(example);
//唯一则更新否则插入 //唯一则更新否则插入
TrialBalance result = new TrialBalance(); TrialBalance result = new TrialBalance();
if (itemList.size() >0) { if (itemList.size() >0) {
logger.debug("exit and delete TrialBalance EntityCode:{},Period:{}", item.getSegment1(), item.getPeriod()); logger.debug("exit and delete TrialBalance EntityCode:{},Period:{}", item.getSegment1(), convertPeriodStr2Int(item.getPeriod()));
trialBalanceMapper.deleteByExample(example); trialBalanceMapper.deleteByExample(example);
} }
logger.debug("insert TrialBalance EntityCode:{},Period:{}", item.getSegment1(), item.getPeriod()); logger.debug("insert TrialBalance EntityCode:{},Period:{}", item.getSegment1(), convertPeriodStr2Int(item.getPeriod()));
populateFieldsTB(item, result); populateFieldsTB(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateBy(""); result.setCreateBy(getCurrentOperatorName(id));
result.setCreateTime(new Date());
result.setCreateTime(new Date()); result.setCreateTime(new Date());
trialBalanceMapper.insertSelective(result); trialBalanceMapper.insertSelective(result);
} }
private void processCF(CashFlowQueryDto item) { private void processCF(Long id,CashFlowQueryDto item) {
CashFlowExample example = new CashFlowExample(); CashFlowExample example = new CashFlowExample();
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间 //机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(item.getPeriod()); example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod()));
List<CashFlow> itemList = cashFlowMapper.selectByExample(example); List<CashFlow> itemList = cashFlowMapper.selectByExample(example);
//唯一则更新否则插入 //唯一则更新否则插入
CashFlow result = new CashFlow(); CashFlow result = new CashFlow();
...@@ -280,16 +288,15 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -280,16 +288,15 @@ public class EbsApiServiceImpl implements EbsApiService {
populateFieldsCF(item, result); populateFieldsCF(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateTime(new Date()); result.setCreateTime(new Date());
result.setCreateBy(""); result.setCreateBy(getCurrentOperatorName(id));
cashFlowMapper.insertSelective(result); cashFlowMapper.insertSelective(result);
} }
private void processBS(BalanceSheetQueryDto item) { private void processBS(Long id,BalanceSheetQueryDto item) {
BalanceSheetExample example = new BalanceSheetExample(); BalanceSheetExample example = new BalanceSheetExample();
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间 //机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(item.getPeriod()); example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod()));
List<BalanceSheet> itemList = balanceSheetMapper.selectByExample(example); List<BalanceSheet> itemList = balanceSheetMapper.selectByExample(example);
//唯一则更新否则插入 //唯一则更新否则插入
BalanceSheet result = new BalanceSheet(); BalanceSheet result = new BalanceSheet();
...@@ -300,39 +307,43 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -300,39 +307,43 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("insert BalanceSheet EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("insert BalanceSheet EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
populateFieldsBS(item, result); populateFieldsBS(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateBy(""); result.setCreateBy(getCurrentOperatorName(id));
result.setCreateTime(new Date()); result.setCreateTime(new Date());
balanceSheetMapper.insertSelective(result); balanceSheetMapper.insertSelective(result);
logger.debug("start to insert balanceSheetFinal ");
// 1、写入最终表
BalanceSheetExample balanceSheetExample = new BalanceSheetExample();
balanceSheetExample.createCriteria().andOrganizationIdEqualTo(result.getOrganizationId()).andPeriodEqualTo(result.getPeriod());
if (balanceSheetFinalMapper.countByExample(balanceSheetExample) > 0) {
balanceSheetFinalMapper.deleteByExample(balanceSheetExample);
}
balanceSheetFinalMapper.insertSelective(result);
} }
private void processBSprc(BalanceSheetPrcQueryDto item) { private void processBSprc(Long id,BalanceSheetPrcQueryDto item) {
BalanceSheetExample example = new BalanceSheetExample(); BalanceSheetExample example = new BalanceSheetExample();
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间 //机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(item.getPeriod()); example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod()));
List<BalanceSheet> itemList = balanceSheetMapper.selectByExample(example); List<BalanceSheet> itemList = balanceSheetMapper.selectByExample(example);
//唯一则更新否则插入 //唯一则更新否则插入
BalanceSheet result = new BalanceSheet(); BalanceSheet result = new BalanceSheet();
if (itemList.size() >0) { if (itemList.size() >0) {
logger.debug("exit and delete BalanceSheetPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("exit and delete BalanceSheetPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
balanceSheetMapper.updateByPrimaryKey(result); balanceSheetMapper.deleteByExample(example);
} }
logger.debug("insert BalanceSheetPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("insert BalanceSheetPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
populateFieldsBSprc(item, result); populateFieldsBSprc(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateBy(""); result.setCreateBy(getCurrentOperatorName(id));
result.setCreateTime(new Date()); result.setCreateTime(new Date());
balanceSheetMapper.insertSelective(result); balanceSheetMapper.insertSelective(result);
} }
private void processPL(ProfitLossStatementQueryDto item) { private void processPL(Long id,ProfitLossStatementQueryDto item) {
ProfitLossStatementExample example = new ProfitLossStatementExample(); ProfitLossStatementExample example = new ProfitLossStatementExample();
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间 //机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(item.getPeriod()); example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod()));
List<ProfitLossStatement> itemList = profitLossStatementMapper.selectByExample(example); List<ProfitLossStatement> itemList = profitLossStatementMapper.selectByExample(example);
//唯一则更新否则插入 //唯一则更新否则插入
ProfitLossStatement result = new ProfitLossStatement(); ProfitLossStatement result = new ProfitLossStatement();
...@@ -344,16 +355,22 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -344,16 +355,22 @@ public class EbsApiServiceImpl implements EbsApiService {
populateFieldsPLS(item, result); populateFieldsPLS(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateTime(new Date()); result.setCreateTime(new Date());
result.setCreateBy(""); result.setCreateBy(getCurrentOperatorName(id));
profitLossStatementMapper.insertSelective(result); profitLossStatementMapper.insertSelective(result);
logger.debug("start to insert profitLossStatementFinal ");
// 1、写入最终表
ProfitLossStatementExample profitLossStatementExample = new ProfitLossStatementExample();
profitLossStatementExample.createCriteria().andOrganizationIdEqualTo(result.getOrganizationId()).andPeriodEqualTo(result.getPeriod());
if (profitLossStatementFinalMapper.countByExample(profitLossStatementExample) > 0) {
profitLossStatementFinalMapper.deleteByExample(profitLossStatementExample);
}
profitLossStatementFinalMapper.insertSelective(result);
} }
private void processPLprc(ProfitLossStatementPrcQueryDto item) { private void processPLprc(Long id,ProfitLossStatementPrcQueryDto item) {
ProfitLossStatementExample example = new ProfitLossStatementExample(); ProfitLossStatementExample example = new ProfitLossStatementExample();
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间 //机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(item.getPeriod()); example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(convertPeriodStr2Int(item.getPeriod()));
List<ProfitLossStatement> itemList = profitLossStatementMapper.selectByExample(example); List<ProfitLossStatement> itemList = profitLossStatementMapper.selectByExample(example);
//唯一则更新否则插入 //唯一则更新否则插入
ProfitLossStatement result = new ProfitLossStatement(); ProfitLossStatement result = new ProfitLossStatement();
...@@ -365,49 +382,51 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -365,49 +382,51 @@ public class EbsApiServiceImpl implements EbsApiService {
populateFieldsPLSprc(item, result); populateFieldsPLSprc(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateTime(new Date()); result.setCreateTime(new Date());
result.setCreateBy(""); result.setCreateBy(getCurrentOperatorName(id));
profitLossStatementMapper.insertSelective(result); profitLossStatementMapper.insertSelective(result);
} }
private void processOAR(OrganizationAccountingRateQueryDto item) { private void processOAR(Long id,OrganizationAccountingRateQueryDto item) {
OrganizationAccountingRateExample example = new OrganizationAccountingRateExample(); OrganizationAccountingRateExample example = new OrganizationAccountingRateExample();
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//TODO 汇率表更新依据未知
//期间 //期间
example.createCriteria().andPeriodEqualTo(item.getPeriod()); example.createCriteria().andPeriodEqualTo(convertPeriod12(item.getPeriod()));
List<OrganizationAccountingRate> itemList = organizationAccountingRateMapper.selectByExample(example); List<OrganizationAccountingRate> itemList = organizationAccountingRateMapper.selectByExample(example);
//唯一则更新否则插入 //唯一则更新否则插入
OrganizationAccountingRate result = new OrganizationAccountingRate(); OrganizationAccountingRate result = new OrganizationAccountingRate();
if (itemList.size() >0) { if (itemList.size() >0) {
logger.debug("exit and delete OrganizationAccountingRate Period:{}", item.getPeriod()); logger.debug("exit and update OrganizationAccountingRate Period:{}", item.getPeriod());
organizationAccountingRateMapper.deleteByExample(example); result = itemList.get(0);
} populateFieldsOAR(item, result);
result.setId(itemList.get(0).getId());
result.setUpdateBy(getCurrentOperatorName(id));
organizationAccountingRateMapper.updateByPrimaryKeySelective(result);
}else {
logger.debug("insert OrganizationAccountingRate Period:{}", item.getPeriod()); logger.debug("insert OrganizationAccountingRate Period:{}", item.getPeriod());
populateFieldsOAR(item, result); populateFieldsOAR(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateTime(new Date()); result.setCreateTime(new Date());
result.setCreateBy(""); result.setCreateBy(getCurrentOperatorName(id));
organizationAccountingRateMapper.insertSelective(result); organizationAccountingRateMapper.insertSelective(result);
} }
}
private void populateFieldsJE(JournalEntryQueryDto item, JournalEntry result) { private void populateFieldsJE(JournalEntryQueryDto item, JournalEntry result) {
beanUtil.copyProperties(item, result); Integer originPeriod=convertPeriodStr2Int(item.getPeriod());
Integer convertPeriod=convertPeriod12(item.getPeriod());
result.setOrganizationId(getOrganizationByEbsCode(item.getSegment1()).getId()); result.setOrganizationId(getOrganizationByEbsCode(item.getSegment1()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getSegment1(),item.getPeriod()).getId()); result.setProjectId(getProjectByEbsCodeAndPeriod(item.getSegment1(),convertPeriod).getId());
result.setDate(ebsDateFormat(item.getDate())); result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20)); result.setSource(trimLimit(item.getSource(), 20));
result.setLedgerId(trimLimit(item.getLedgerId(), 128)); result.setLedgerId(trimLimit(item.getLedgerId(), 128));
result.setLedgerName(trimLimit(item.getLedgerName(), 300)); result.setLedgerName(trimLimit(item.getLedgerName(), 300));
result.setCurrencyCode(trimLimit(item.getCurrencyCode(), 20)); result.setCurrencyCode(trimLimit(item.getCurrencyCode(), 20));
result.setStatus(item.getStatus()?"true":"false"); result.setStatus(item.getStatus());
result.setHeaderId(trimLimit(item.getHeaderId(), 128)); result.setHeaderId(trimLimit(item.getHeaderId(), 128));
result.setLineNum(trimLimit(item.getLineNum(), 300)); result.setLineNum(trimLimit(item.getLineNum(), 300));
result.setApprovalStatus(trimLimit(item.getApprovalStatus(), 20)); result.setApprovalStatus(trimLimit(item.getApprovalStatus(), 20));
result.setPostedStatus(trimLimit(item.getPostedStatus(), 20)); result.setPostedStatus(trimLimit(item.getPostedStatus(), 20));
result.setPeriod(StringUtils.isBlank(item.getPeriod().toString()) ? 0 : item.getPeriod()); result.setPeriod(originPeriod);
result.setAccountingDate(ebsDateFormat(item.getAccountingDate())); result.setAccountingDate(item.getAccountingDate());
result.setJournalSource(trimLimit(item.getJournalSource(), 20)); result.setJournalSource(trimLimit(item.getJournalSource(), 20));
result.setCategory(trimLimit(item.getCategory(), 50)); result.setCategory(trimLimit(item.getCategory(), 50));
result.setName(trimLimit(item.getName(), 300)); result.setName(trimLimit(item.getName(), 300));
...@@ -449,7 +468,7 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -449,7 +468,7 @@ public class EbsApiServiceImpl implements EbsApiService {
.orElse(BigDecimal.ZERO)); .orElse(BigDecimal.ZERO));
result.setCfItem(trimLimit(item.getCfItem(), 50)); result.setCfItem(trimLimit(item.getCfItem(), 50));
result.setAttribute1(trimLimit(item.getAttribute1(), 300)); result.setAttribute1(trimLimit(item.getAttribute1(), 300));
result.setAttribute2(ebsDateFormat(item.getAttribute2())); result.setAttribute2(item.getAttribute2());
result.setAttribute3(trimLimit(item.getAttribute3(), 300)); result.setAttribute3(trimLimit(item.getAttribute3(), 300));
result.setAttribute4(trimLimit(item.getAttribute4(), 300)); result.setAttribute4(trimLimit(item.getAttribute4(), 300));
result.setAttribute5(trimLimit(item.getAttribute5(), 300)); result.setAttribute5(trimLimit(item.getAttribute5(), 300));
...@@ -464,21 +483,26 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -464,21 +483,26 @@ public class EbsApiServiceImpl implements EbsApiService {
result.setAttribute14(trimLimit(item.getAttribute14(), 300)); result.setAttribute14(trimLimit(item.getAttribute14(), 300));
result.setAttribute15(trimLimit(item.getAttribute15(), 300)); result.setAttribute15(trimLimit(item.getAttribute15(), 300));
result.setAttribute16(trimLimit(item.getAttribute16(), 300)); result.setAttribute16(trimLimit(item.getAttribute16(), 300));
result.setLateUpdatedBy(""); result.setLateUpdatedBy(trimLimit(item.getLateUpdatedBy(), 50));
result.setLateUpdatedDate(new Date()); result.setLateUpdatedDate(item.getLateUpdatedDate());
result.setUpdateTime(new Date()); result.setUpdateTime(new Date());
result.setCreatedBy(item.getCreatedBy());
result.setCreatedDate(item.getCreatedDate());
result.setTmsPeriod(convertPeriod);
} }
private void populateFieldsTB(TrialBalanceQueryDto item, TrialBalance result) { private void populateFieldsTB(TrialBalanceQueryDto item, TrialBalance result) {
beanUtil.copyProperties(item, result); Integer originPeriod=convertPeriodStr2Int(item.getPeriod());
Integer convertPeriod=convertPeriod12(item.getPeriod());
result.setOrganizationId(getOrganizationByEbsCode(item.getSegment1()).getId()); result.setOrganizationId(getOrganizationByEbsCode(item.getSegment1()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getSegment1(),item.getPeriod()).getId()); result.setProjectId(getProjectByEbsCodeAndPeriod(item.getSegment1(),convertPeriod).getId());
result.setDate(ebsDateFormat(item.getDate())); result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20)); result.setSource(trimLimit(item.getSource(), 20));
result.setPeriod(originPeriod);
result.setLedgerId(trimLimit(item.getLedgerId(), 128)); result.setLedgerId(trimLimit(item.getLedgerId(), 128));
result.setLedgerName(trimLimit(item.getLedgerName(), 300)); result.setLedgerName(trimLimit(item.getLedgerName(), 300));
result.setCurrencyCode(trimLimit(item.getCurrencyCode(), 20)); result.setCurrencyCode(trimLimit(item.getCurrencyCode(), 20));
result.setStatus(item.getStatus()?"true":"false"); result.setStatus(item.getStatus());
result.setCategory(trimLimit(item.getCategory(), 10)); result.setCategory(trimLimit(item.getCategory(), 10));
result.setAccountCategory(trimLimit(item.getAccountCategory(), 20)); result.setAccountCategory(trimLimit(item.getAccountCategory(), 20));
result.setAcctCode1(trimLimit(item.getAcctCode1(), 300)); result.setAcctCode1(trimLimit(item.getAcctCode1(), 300));
...@@ -553,18 +577,19 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -553,18 +577,19 @@ public class EbsApiServiceImpl implements EbsApiService {
result.setYtdCrBeq(Optional.ofNullable(item.getYtdCrBeq()) result.setYtdCrBeq(Optional.ofNullable(item.getYtdCrBeq())
.map(x -> x.setScale(4, RoundingMode.HALF_UP)) .map(x -> x.setScale(4, RoundingMode.HALF_UP))
.orElse(BigDecimal.ZERO)); .orElse(BigDecimal.ZERO));
result.setUpdateBy("");
result.setUpdateTime(new Date()); result.setUpdateTime(new Date());
result.setTmsPeriod(convertPeriod);
} }
private void populateFieldsCF(CashFlowQueryDto item, CashFlow result) { private void populateFieldsCF(CashFlowQueryDto item, CashFlow result) {
beanUtil.copyProperties(item, result); Integer originPeriod=convertPeriodStr2Int(item.getPeriod());
Integer convertPeriod=convertPeriod12(item.getPeriod());
result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId()); result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),item.getPeriod()).getId()); result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),convertPeriod).getId());
result.setDate(ebsDateFormat(item.getDate())); result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 128)); result.setSource(trimLimit(item.getSource(), 128));
result.setPeriod(item.getPeriod()); result.setPeriod(originPeriod);
result.setStatus(item.getStatus()?"true":"false"); result.setStatus(item.getStatus());
result.setLedgerId(trimLimit(item.getLedgerId(), 128)); result.setLedgerId(trimLimit(item.getLedgerId(), 128));
result.setLedgerName(trimLimit(item.getLedgerName(), 300)); result.setLedgerName(trimLimit(item.getLedgerName(), 300));
result.setLedgerCurrencyCode(trimLimit(item.getLedgerCurrencyCode(), 128)); result.setLedgerCurrencyCode(trimLimit(item.getLedgerCurrencyCode(), 128));
...@@ -580,18 +605,19 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -580,18 +605,19 @@ public class EbsApiServiceImpl implements EbsApiService {
result.setYtdAmt(Optional.ofNullable(item.getYtdAmt()) result.setYtdAmt(Optional.ofNullable(item.getYtdAmt())
.map(x -> x.setScale(4, RoundingMode.HALF_UP)) .map(x -> x.setScale(4, RoundingMode.HALF_UP))
.orElse(BigDecimal.ZERO)); .orElse(BigDecimal.ZERO));
result.setUpdateBy("");
result.setUpdateTime(new Date()); result.setUpdateTime(new Date());
result.setTmsPeriod(convertPeriod);
} }
private void populateFieldsBS(BalanceSheetQueryDto item, BalanceSheet result) { private void populateFieldsBS(BalanceSheetQueryDto item, BalanceSheet result) {
beanUtil.copyProperties(item, result); Integer originPeriod=convertPeriodStr2Int(item.getPeriod());
Integer convertPeriod=convertPeriod12(item.getPeriod());
result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId()); result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),item.getPeriod()).getId()); result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),convertPeriod).getId());
result.setDate(ebsDateFormat(item.getDate())); result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20)); result.setSource(trimLimit(item.getSource(), 20));
result.setPeriod(item.getPeriod()); result.setPeriod(originPeriod);
result.setStatus(item.getStatus()?"true":"false"); result.setStatus(item.getStatus());
result.setLedgerId(trimLimit(item.getLedgerId(), 128)); result.setLedgerId(trimLimit(item.getLedgerId(), 128));
result.setLedgerName(trimLimit(item.getLedgerName(), 300)); result.setLedgerName(trimLimit(item.getLedgerName(), 300));
result.setLedgerCurrencyCode(trimLimit(item.getLedgerCurrencyCode(), 20)); result.setLedgerCurrencyCode(trimLimit(item.getLedgerCurrencyCode(), 20));
...@@ -606,18 +632,19 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -606,18 +632,19 @@ public class EbsApiServiceImpl implements EbsApiService {
result.setBegBal(Optional.ofNullable(item.getBegBal()) result.setBegBal(Optional.ofNullable(item.getBegBal())
.map(x -> x.setScale(4, RoundingMode.HALF_UP)) .map(x -> x.setScale(4, RoundingMode.HALF_UP))
.orElse(BigDecimal.ZERO)); .orElse(BigDecimal.ZERO));
result.setUpdateBy("");
result.setUpdateTime(new Date()); result.setUpdateTime(new Date());
result.setTmsPeriod(convertPeriod);
} }
private void populateFieldsBSprc(BalanceSheetPrcQueryDto item, BalanceSheet result) { private void populateFieldsBSprc(BalanceSheetPrcQueryDto item, BalanceSheet result) {
beanUtil.copyProperties(item, result); Integer originPeriod=convertPeriodStr2Int(item.getPeriod());
Integer convertPeriod=convertPeriod12(item.getPeriod());
result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId()); result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),item.getPeriod()).getId()); result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),convertPeriod).getId());
result.setDate(ebsDateFormat(item.getDate())); result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20)); result.setSource(trimLimit(item.getSource(), 20));
result.setPeriod(item.getPeriod()); result.setPeriod(originPeriod);
result.setStatus(item.getStatus()?"true":"false"); result.setStatus(item.getStatus());
result.setLedgerId(trimLimit(item.getLedgerId(), 128)); result.setLedgerId(trimLimit(item.getLedgerId(), 128));
result.setLedgerName(trimLimit(item.getLedgerName(), 300)); result.setLedgerName(trimLimit(item.getLedgerName(), 300));
result.setLedgerCurrencyCode(trimLimit(item.getLedgerCurrencyCode(), 20)); result.setLedgerCurrencyCode(trimLimit(item.getLedgerCurrencyCode(), 20));
...@@ -632,18 +659,19 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -632,18 +659,19 @@ public class EbsApiServiceImpl implements EbsApiService {
result.setBegBal(Optional.ofNullable(item.getBegBal()) result.setBegBal(Optional.ofNullable(item.getBegBal())
.map(x -> x.setScale(4, RoundingMode.HALF_UP)) .map(x -> x.setScale(4, RoundingMode.HALF_UP))
.orElse(BigDecimal.ZERO)); .orElse(BigDecimal.ZERO));
result.setUpdateBy(""); result.setTmsPeriod(convertPeriod);
result.setUpdateTime(new Date()); result.setUpdateTime(new Date());
} }
private void populateFieldsPLS(ProfitLossStatementQueryDto item, ProfitLossStatement result) { private void populateFieldsPLS(ProfitLossStatementQueryDto item, ProfitLossStatement result) {
beanUtil.copyProperties(item, result); Integer originPeriod=convertPeriodStr2Int(item.getPeriod());
Integer convertPeriod=convertPeriod12(item.getPeriod());
result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId()); result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),item.getPeriod()).getId()); result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),convertPeriod).getId());
result.setDate(ebsDateFormat(item.getDate())); result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20)); result.setSource(trimLimit(item.getSource(), 20));
result.setPeriod(item.getPeriod()); result.setPeriod(originPeriod);
result.setStatus(item.getStatus()?"true":"false"); result.setStatus(item.getStatus());
result.setLedgerId(trimLimit(item.getLedgerId(), 128)); result.setLedgerId(trimLimit(item.getLedgerId(), 128));
result.setLedgerName(trimLimit(item.getLedgerName(), 300)); result.setLedgerName(trimLimit(item.getLedgerName(), 300));
result.setLedgerCurrencyCode(trimLimit(item.getLedgerCurrencyCode(), 20)); result.setLedgerCurrencyCode(trimLimit(item.getLedgerCurrencyCode(), 20));
...@@ -658,18 +686,19 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -658,18 +686,19 @@ public class EbsApiServiceImpl implements EbsApiService {
result.setYtdAmt(Optional.ofNullable(item.getYtdAmt()) result.setYtdAmt(Optional.ofNullable(item.getYtdAmt())
.map(x -> x.setScale(4, RoundingMode.HALF_UP)) .map(x -> x.setScale(4, RoundingMode.HALF_UP))
.orElse(BigDecimal.ZERO)); .orElse(BigDecimal.ZERO));
result.setTmsPeriod(convertPeriod);
result.setUpdateTime(new Date()); result.setUpdateTime(new Date());
result.setUpdateBy("");
} }
private void populateFieldsPLSprc(ProfitLossStatementPrcQueryDto item, ProfitLossStatement result) { private void populateFieldsPLSprc(ProfitLossStatementPrcQueryDto item, ProfitLossStatement result) {
beanUtil.copyProperties(item, result); Integer originPeriod=convertPeriodStr2Int(item.getPeriod());
Integer convertPeriod=convertPeriod12(item.getPeriod());
result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId()); result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),item.getPeriod()).getId()); result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),convertPeriod).getId());
result.setDate(ebsDateFormat(item.getDate())); result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20)); result.setSource(trimLimit(item.getSource(), 20));
result.setPeriod(item.getPeriod()); result.setPeriod(originPeriod);
result.setStatus(item.getStatus()?"true":"false"); result.setStatus(item.getStatus());
result.setLedgerId(trimLimit(item.getLedgerId(), 128)); result.setLedgerId(trimLimit(item.getLedgerId(), 128));
result.setLedgerName(trimLimit(item.getLedgerName(), 300)); result.setLedgerName(trimLimit(item.getLedgerName(), 300));
result.setLedgerCurrencyCode(trimLimit(item.getLedgerCurrencyCode(), 20)); result.setLedgerCurrencyCode(trimLimit(item.getLedgerCurrencyCode(), 20));
...@@ -685,18 +714,19 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -685,18 +714,19 @@ public class EbsApiServiceImpl implements EbsApiService {
.map(x -> x.setScale(4, RoundingMode.HALF_UP)) .map(x -> x.setScale(4, RoundingMode.HALF_UP))
.orElse(BigDecimal.ZERO)); .orElse(BigDecimal.ZERO));
result.setUpdateTime(new Date()); result.setUpdateTime(new Date());
result.setUpdateBy(""); result.setTmsPeriod(convertPeriod);
} }
private void populateFieldsOAR(OrganizationAccountingRateQueryDto item, OrganizationAccountingRate result) { private void populateFieldsOAR(OrganizationAccountingRateQueryDto item, OrganizationAccountingRate result) {
beanUtil.copyProperties(item, result); Integer convertPeriod=convertPeriod12(item.getPeriod());
result.setPeriod(item.getPeriod()); result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 128));
result.setPeriod(convertPeriod);
result.setConvertionType(trimLimit(item.getConvertionType(), 100)); result.setConvertionType(trimLimit(item.getConvertionType(), 100));
result.setCurrencyFrom(trimLimit(item.getCurrencyFrom(), 10)); result.setCurrencyFrom(trimLimit(item.getCurrencyFrom(), 10));
result.setCurrencyTo(trimLimit(item.getCurrencyTo(), 10)); result.setCurrencyTo(trimLimit(item.getCurrencyTo(), 10));
result.setEndDate(ebsDateFormat(item.getInvalidDate())); result.setEndDate(ebsDateFormat(item.getInvalidDate()));
result.setRate(item.getRate().floatValue()); result.setRate(item.getRate().floatValue());
result.setUpdateBy("");
result.setUpdateTime(new Date()); result.setUpdateTime(new Date());
} }
@Override @Override
...@@ -784,6 +814,16 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -784,6 +814,16 @@ public class EbsApiServiceImpl implements EbsApiService {
} }
} }
/**
* 获取操作人信息
* @param id
* @return
*/
private String getCurrentOperatorName(Long id){
DataImportLog dataImportLog= dataImportLogMapper.selectByPrimaryKey(id);
String operator=dataImportLog!=null?dataImportLog.getOperator():"";
return operator;
}
/** /**
* 获取格式化时间 * 获取格式化时间
...@@ -813,10 +853,12 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -813,10 +853,12 @@ public class EbsApiServiceImpl implements EbsApiService {
OrganizationExample example=new OrganizationExample(); OrganizationExample example=new OrganizationExample();
example.createCriteria().andCodeEqualTo(code); example.createCriteria().andCodeEqualTo(code);
List<Organization> list=organizationMapper.selectByExample(example); List<Organization> list=organizationMapper.selectByExample(example);
Organization organization=new Organization();
organization.setId("");
if(list.size()>0){ if(list.size()>0){
return list.get(0); organization.setId(list.get(0).getId());
} }
return new Organization(); return organization;
} }
/** /**
...@@ -830,10 +872,12 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -830,10 +872,12 @@ public class EbsApiServiceImpl implements EbsApiService {
ProjectExample example=new ProjectExample(); ProjectExample example=new ProjectExample();
example.createCriteria().andCodeEqualTo(code).andYearEqualTo(period/100); example.createCriteria().andCodeEqualTo(code).andYearEqualTo(period/100);
List<Project> list=projectMapper.selectByExample(example); List<Project> list=projectMapper.selectByExample(example);
Project project=new Project();
project.setId("");
if(list.size()>0){ if(list.size()>0){
return list.get(0); project.setId(list.get(0).getId());
} }
return new Project(); return project;
} }
/** /**
...@@ -841,12 +885,27 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -841,12 +885,27 @@ public class EbsApiServiceImpl implements EbsApiService {
* 返回的数据与用户在税务系统选择的期间需一致, * 返回的数据与用户在税务系统选择的期间需一致,
* 但用户选择12期时请求的数据应为YYYY-12和YYYY-13即12期和13期的数据, * 但用户选择12期时请求的数据应为YYYY-12和YYYY-13即12期和13期的数据,
* EBS返回的数据可以包含YYYY-12和YYYY-13 * EBS返回的数据可以包含YYYY-12和YYYY-13
* @param period * @param periodStr
* @return
*/
private Integer convertPeriodStr2Int(String periodStr){
periodStr=StringUtils.replace(periodStr, "-", "");
Integer period=Integer.parseInt(periodStr);
return period;
}
/**
* 期间格式转换yyyy13均改为yyyy12
* 返回的数据与用户在税务系统选择的期间需一致,
* 但用户选择12期时请求的数据应为YYYY-12和YYYY-13即12期和13期的数据,
* EBS返回的数据可以包含YYYY-12和YYYY-13
* @param periodStr
* @return * @return
*/ */
private Integer convertPeriod(Integer period){ private Integer convertPeriod12(String periodStr){
if(period%100==13){ Integer period= convertPeriodStr2Int(periodStr);
period--; if(period%100>12){
period= (period/100)*100+12;
} }
return period; return period;
} }
......
...@@ -50,6 +50,27 @@ public class DataInitTest extends CommonIT { ...@@ -50,6 +50,27 @@ public class DataInitTest extends CommonIT {
@Resource @Resource
private OrganizationEmployeeMapper organizationEmployeeMapper; private OrganizationEmployeeMapper organizationEmployeeMapper;
@Resource
private OrganizationAccountingRateMapper organizationAccountingRateMapper;
@Resource
private OrganizationApprovedLevyInfoMapper organizationApprovedLevyInfoMapper;
@Resource
private OrganizationInvoiceMapper organizationInvoiceMapper;
@Resource
private OrganizationReturnRateMapper organizationReturnRateMapper;
@Resource
private OrganizationTaxOfficerMapper organizationTaxOfficerMapper;
@Resource
private OrganizationTaxRuleMapper organizationTaxRuleMapper;
@Resource
private OrganizationTaxpayerQualificationMapper organizationTaxpayerQualificationMapper;
@Resource @Resource
private EquityInformationMapper equityInformationMapper; private EquityInformationMapper equityInformationMapper;
...@@ -151,9 +172,9 @@ public class DataInitTest extends CommonIT { ...@@ -151,9 +172,9 @@ public class DataInitTest extends CommonIT {
} }
equityInfos.forEach(ei -> { equityInfos.forEach(ei -> {
// 逐条insert 失败的记录 // 逐条insert 失败的记录
if (equityInformationMapper.insertSelective(ei) < 1) { /*if (equityInformationMapper.insertSelective(ei) < 1) {
failList.putIfAbsent(orgK, orgV); failList.putIfAbsent(orgK, orgV);
} }*/
}); });
} }
} else if ("股东信息".equals(infoK) && equityInfos.isEmpty()) { } else if ("股东信息".equals(infoK) && equityInfos.isEmpty()) {
...@@ -223,9 +244,9 @@ public class DataInitTest extends CommonIT { ...@@ -223,9 +244,9 @@ public class DataInitTest extends CommonIT {
} }
equityInfos1.forEach(ei -> { equityInfos1.forEach(ei -> {
// 逐条insert 失败的记录 // 逐条insert 失败的记录
if (equityInformationMapper.insertSelective(ei) < 1) { /* if (equityInformationMapper.insertSelective(ei) < 1) {
failList.putIfAbsent(orgK, orgV); failList.putIfAbsent(orgK, orgV);
} }*/
}); });
} }
} else if ("变更记录".equals(infoK)) { } else if ("变更记录".equals(infoK)) {
...@@ -251,9 +272,9 @@ public class DataInitTest extends CommonIT { ...@@ -251,9 +272,9 @@ public class DataInitTest extends CommonIT {
}); });
logs.forEach(l -> { logs.forEach(l -> {
// 逐条insert 失败的记录 // 逐条insert 失败的记录
if (operationLogEquityMapper.insertSelective(l) < 1) { /* if (operationLogEquityMapper.insertSelective(l) < 1) {
failList.putIfAbsent(orgK, orgV); failList.putIfAbsent(orgK, orgV);
} }*/
}); });
} }
...@@ -264,6 +285,7 @@ public class DataInitTest extends CommonIT { ...@@ -264,6 +285,7 @@ public class DataInitTest extends CommonIT {
OrganizationExtra orgEx = new OrganizationExtra(); OrganizationExtra orgEx = new OrganizationExtra();
OrganizationEmployee orgEmp = new OrganizationEmployee(); OrganizationEmployee orgEmp = new OrganizationEmployee();
org.setId(orgId); org.setId(orgId);
org.setName(orgName); org.setName(orgName);
...@@ -323,7 +345,7 @@ public class DataInitTest extends CommonIT { ...@@ -323,7 +345,7 @@ public class DataInitTest extends CommonIT {
} }
} }
}); });
if (organizationMapper.insertSelective(org) < 0) { /* if (organizationMapper.insertSelective(org) < 0) {
failList.putIfAbsent(orgK, orgV); failList.putIfAbsent(orgK, orgV);
} }
if (organizationExtraMapper.insertSelective(orgEx) < 0) { if (organizationExtraMapper.insertSelective(orgEx) < 0) {
...@@ -331,7 +353,8 @@ public class DataInitTest extends CommonIT { ...@@ -331,7 +353,8 @@ public class DataInitTest extends CommonIT {
} }
if (organizationEmployeeMapper.insertSelective(orgEmp) < 0) { if (organizationEmployeeMapper.insertSelective(orgEmp) < 0) {
failList.putIfAbsent(orgK, orgV); failList.putIfAbsent(orgK, orgV);
} }*/
insertExtraList(orgId);
} }
}); });
} catch (Exception e) { } catch (Exception e) {
...@@ -363,6 +386,16 @@ public class DataInitTest extends CommonIT { ...@@ -363,6 +386,16 @@ public class DataInitTest extends CommonIT {
System.out.println(String.format("失败条数[%s]", failList.size())); System.out.println(String.format("失败条数[%s]", failList.size()));
} }
private void insertExtraList(String orgId) {
organizationAccountingRateMapper.insertSelective(new OrganizationAccountingRate(idService.nextId(),orgId));
organizationApprovedLevyInfoMapper.insertSelective(new OrganizationApprovedLevyInfo(idService.nextId(),orgId));
organizationInvoiceMapper.insertSelective(new OrganizationInvoice(idService.nextId(),orgId));
organizationReturnRateMapper.insertSelective(new OrganizationReturnRate(idService.nextId(),orgId));
organizationTaxOfficerMapper.insertSelective(new OrganizationTaxOfficer(idService.nextId(),orgId));
organizationTaxRuleMapper.insertSelective(new OrganizationTaxRule(idService.nextId(),orgId));
organizationTaxpayerQualificationMapper.insertSelective(new OrganizationTaxpayerQualification(idService.nextId(),orgId));
}
@Test @Test
public void syncOrg(){ public void syncOrg(){
List<String> taxPayNums= organizationMapper.selectByExample(new OrganizationExample()).stream().map(Organization::getTaxPayerNumber).collect(Collectors.toList()); List<String> taxPayNums= organizationMapper.selectByExample(new OrganizationExample()).stream().map(Organization::getTaxPayerNumber).collect(Collectors.toList());
......
package pwc.taxtech.atms.service.impl; package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import org.junit.Test; import org.junit.Test;
import pwc.taxtech.atms.CommonIT; import pwc.taxtech.atms.CommonIT;
import pwc.taxtech.atms.dto.ebsdto.*; import pwc.taxtech.atms.dto.ebsdto.*;
...@@ -31,7 +30,7 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -31,7 +30,7 @@ public class EbsApiServiceImplTest extends CommonIT {
} }
@Test @Test
public void queryRemoteServerThenUpdateOrg(){ public void queryRemoteServerThenUpdateOrg(){
List<OrganizationQueryDto> items = new ArrayList(); List<OrganizationQueryDto> items =new ArrayList<>();
for(int i=0;i<2;i++){ for(int i=0;i<2;i++){
OrganizationQueryDto dto = new OrganizationQueryDto(); OrganizationQueryDto dto = new OrganizationQueryDto();
dto.setTaxPayerNumber("sadsafsdf3232"); dto.setTaxPayerNumber("sadsafsdf3232");
...@@ -72,7 +71,7 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -72,7 +71,7 @@ public class EbsApiServiceImplTest extends CommonIT {
journalEntryQueryDto.setLineNum("日记账行号"); journalEntryQueryDto.setLineNum("日记账行号");
journalEntryQueryDto.setApprovalStatus("审批状态"); journalEntryQueryDto.setApprovalStatus("审批状态");
journalEntryQueryDto.setPostedStatus("过账"); journalEntryQueryDto.setPostedStatus("过账");
journalEntryQueryDto.setPeriod(20180102+i); // journalEntryQueryDto.setPeriod(20180102+i);
journalEntryQueryDto.setJournalSource("日记账来源"); journalEntryQueryDto.setJournalSource("日记账来源");
journalEntryQueryDto.setCategory("日记账类别"); journalEntryQueryDto.setCategory("日记账类别");
journalEntryQueryDto.setName("日记账名称"); journalEntryQueryDto.setName("日记账名称");
...@@ -134,10 +133,10 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -134,10 +133,10 @@ public class EbsApiServiceImplTest extends CommonIT {
List<TrialBalanceQueryDto> items=new ArrayList<>(); List<TrialBalanceQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) { for(int i=0;i<2;i++) {
TrialBalanceQueryDto result = new TrialBalanceQueryDto(); TrialBalanceQueryDto result = new TrialBalanceQueryDto();
result.setDate("2019-03-04 19:14:17"); // result.setDate("2019-03-04 19:14:17");
result.setStatus(false); // result.setStatus(false);
result.setSource("来源"); // result.setSource("来源");
result.setPeriod(201803); // result.setPeriod(201803);
result.setLedgerId("账套ID"); result.setLedgerId("账套ID");
result.setLedgerName("账套名称"); result.setLedgerName("账套名称");
result.setCurrencyCode("账套币种"); result.setCurrencyCode("账套币种");
...@@ -195,10 +194,10 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -195,10 +194,10 @@ public class EbsApiServiceImplTest extends CommonIT {
List<CashFlowQueryDto> items=new ArrayList<>(); List<CashFlowQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) { for(int i=0;i<2;i++) {
CashFlowQueryDto result = new CashFlowQueryDto(); CashFlowQueryDto result = new CashFlowQueryDto();
result.setDate("2019-03-04 19:14:17"); // result.setDate("2019-03-04 19:14:17");
result.setSource("来源"); // result.setSource("来源");
result.setPeriod(201803); // result.setPeriod(201803);
result.setStatus(true); // result.setStatus(true);
result.setLedgerId("账套ID"); result.setLedgerId("账套ID");
result.setLedgerName("账套名称"); result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种"); result.setLedgerCurrencyCode("账套币种");
...@@ -222,9 +221,9 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -222,9 +221,9 @@ public class EbsApiServiceImplTest extends CommonIT {
List<BalanceSheetQueryDto> items=new ArrayList<>(); List<BalanceSheetQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) { for(int i=0;i<2;i++) {
BalanceSheetQueryDto result = new BalanceSheetQueryDto(); BalanceSheetQueryDto result = new BalanceSheetQueryDto();
result.setDate("2019-03-04 19:14:17"); // result.setDate("2019-03-04 19:14:17");
result.setPeriod(201812); // result.setPeriod(201812);
result.setStatus(false); // result.setStatus(false);
result.setLedgerCurrencyCode("账套币种"); result.setLedgerCurrencyCode("账套币种");
result.setEntityCode("机构编码"); result.setEntityCode("机构编码");
result.setEntityName("机构名称"); result.setEntityName("机构名称");
...@@ -248,10 +247,10 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -248,10 +247,10 @@ public class EbsApiServiceImplTest extends CommonIT {
List<BalanceSheetPrcQueryDto> items=new ArrayList<>(); List<BalanceSheetPrcQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) { for(int i=0;i<2;i++) {
BalanceSheetPrcQueryDto result = new BalanceSheetPrcQueryDto(); BalanceSheetPrcQueryDto result = new BalanceSheetPrcQueryDto();
result.setDate("2019-03-04 19:14:17"); // result.setDate("2019-03-04 19:14:17");
result.setStatus(false); // result.setStatus(false);
result.setSource("来源"); // result.setSource("来源");
result.setPeriod(201804); // result.setPeriod(201804);
result.setLedgerId("账套ID"); result.setLedgerId("账套ID");
result.setLedgerName("账套名称"); result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种"); result.setLedgerCurrencyCode("账套币种");
...@@ -273,10 +272,10 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -273,10 +272,10 @@ public class EbsApiServiceImplTest extends CommonIT {
List<ProfitLossStatementQueryDto> items=new ArrayList<>(); List<ProfitLossStatementQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) { for(int i=0;i<2;i++) {
ProfitLossStatementQueryDto result = new ProfitLossStatementQueryDto(); ProfitLossStatementQueryDto result = new ProfitLossStatementQueryDto();
result.setDate("2019-03-04 19:14:17"); // result.setDate("2019-03-04 19:14:17");
result.setStatus(false); // result.setStatus(false);
result.setSource("来源"); // result.setSource("来源");
result.setPeriod(201904); // result.setPeriod(201904);
result.setLedgerId("账套ID"); result.setLedgerId("账套ID");
result.setLedgerName("账套名称"); result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种"); result.setLedgerCurrencyCode("账套币种");
...@@ -298,10 +297,10 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -298,10 +297,10 @@ public class EbsApiServiceImplTest extends CommonIT {
List<ProfitLossStatementPrcQueryDto> items=new ArrayList<>(); List<ProfitLossStatementPrcQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) { for(int i=0;i<2;i++) {
ProfitLossStatementPrcQueryDto result = new ProfitLossStatementPrcQueryDto(); ProfitLossStatementPrcQueryDto result = new ProfitLossStatementPrcQueryDto();
result.setDate("2019-03-04 19:14:17"); // result.setDate("2019-03-04 19:14:17");
result.setStatus(false); // result.setStatus(false);
result.setSource("来源"); // result.setSource("来源");
result.setPeriod(201904); // result.setPeriod(201904);
result.setLedgerId("账套ID"); result.setLedgerId("账套ID");
result.setLedgerName("账套名称"); result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种"); result.setLedgerCurrencyCode("账套币种");
...@@ -323,7 +322,7 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -323,7 +322,7 @@ public class EbsApiServiceImplTest extends CommonIT {
List<OrganizationAccountingRateQueryDto> items=new ArrayList<>(); List<OrganizationAccountingRateQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) { for(int i=0;i<2;i++) {
OrganizationAccountingRateQueryDto result = new OrganizationAccountingRateQueryDto(); OrganizationAccountingRateQueryDto result = new OrganizationAccountingRateQueryDto();
result.setPeriod(2018); // result.setPeriod(2018);
result.setConvertionType("汇率类型名称"); result.setConvertionType("汇率类型名称");
result.setCurrencyFrom("原币种"); result.setCurrencyFrom("原币种");
result.setCurrencyTo("目标币种"); result.setCurrencyTo("目标币种");
...@@ -332,4 +331,20 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -332,4 +331,20 @@ public class EbsApiServiceImplTest extends CommonIT {
String a=JSON.toJSONString(items); String a=JSON.toJSONString(items);
System.out.println(a); 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
...@@ -480,6 +480,14 @@ public class OrganizationAccountingRate extends BaseEntity implements Serializab ...@@ -480,6 +480,14 @@ public class OrganizationAccountingRate extends BaseEntity implements Serializab
* *
* @mbg.generated * @mbg.generated
*/ */
public OrganizationAccountingRate(){}
public OrganizationAccountingRate(Long id,String orgId){
this.id = id;
this.organizationId = orgId;
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
......
...@@ -118,6 +118,15 @@ public class OrganizationApprovedLevyInfo extends BaseEntity implements Serializ ...@@ -118,6 +118,15 @@ public class OrganizationApprovedLevyInfo extends BaseEntity implements Serializ
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public OrganizationApprovedLevyInfo() {
}
public OrganizationApprovedLevyInfo(long id, String orgId) {
this.id = id;
this.organizationId = orgId;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_approved_levy_info.id * This method returns the value of the database column organization_approved_levy_info.id
......
...@@ -129,6 +129,13 @@ public class OrganizationInvoice extends BaseEntity implements Serializable { ...@@ -129,6 +129,13 @@ public class OrganizationInvoice extends BaseEntity implements Serializable {
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public OrganizationInvoice(){}
public OrganizationInvoice(long id, String orgId) {
this.id = id;
this.organizationId = orgId;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_invoice.id * This method returns the value of the database column organization_invoice.id
......
...@@ -96,6 +96,14 @@ public class OrganizationReturnRate extends BaseEntity implements Serializable { ...@@ -96,6 +96,14 @@ public class OrganizationReturnRate extends BaseEntity implements Serializable {
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public OrganizationReturnRate() {
}
public OrganizationReturnRate(long id, String orgId) {
this.id = id;
this.organizationId = orgId;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_return_rate.id * This method returns the value of the database column organization_return_rate.id
......
...@@ -96,6 +96,15 @@ public class OrganizationTaxOfficer extends BaseEntity implements Serializable { ...@@ -96,6 +96,15 @@ public class OrganizationTaxOfficer extends BaseEntity implements Serializable {
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public OrganizationTaxOfficer() {
}
public OrganizationTaxOfficer(long id ,String orgId) {
this.id = id;
this.organizationId = orgId;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_tax_officer.id * This method returns the value of the database column organization_tax_officer.id
......
...@@ -96,6 +96,14 @@ public class OrganizationTaxRule extends BaseEntity implements Serializable { ...@@ -96,6 +96,14 @@ public class OrganizationTaxRule extends BaseEntity implements Serializable {
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public OrganizationTaxRule() {
}
public OrganizationTaxRule(long id,String orgId) {
this.id = id;
this.organizationId = orgId;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_tax_rule.id * This method returns the value of the database column organization_tax_rule.id
......
...@@ -107,6 +107,14 @@ public class OrganizationTaxpayerQualification extends BaseEntity implements Ser ...@@ -107,6 +107,14 @@ public class OrganizationTaxpayerQualification extends BaseEntity implements Ser
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public OrganizationTaxpayerQualification() {
}
public OrganizationTaxpayerQualification(long id, String orgId) {
this.id = id;
this.organizationId = orgId;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_taxpayer_qualification.id * This method returns the value of the database column organization_taxpayer_qualification.id
......
...@@ -68,6 +68,17 @@ public class TrialBalance extends BaseEntity implements Serializable { ...@@ -68,6 +68,17 @@ public class TrialBalance extends BaseEntity implements Serializable {
*/ */
private String source; private String source;
/**
* Database Column Remarks:
* 税务系统期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column trial_balance.tms_period
*
* @mbg.generated
*/
private Integer tmsPeriod;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 期间 yyyymm * 期间 yyyymm
...@@ -735,6 +746,30 @@ public class TrialBalance extends BaseEntity implements Serializable { ...@@ -735,6 +746,30 @@ public class TrialBalance extends BaseEntity implements Serializable {
this.source = source == null ? null : source.trim(); this.source = source == null ? null : source.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column trial_balance.tms_period
*
* @return the value of trial_balance.tms_period
*
* @mbg.generated
*/
public Integer getTmsPeriod() {
return tmsPeriod;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column trial_balance.tms_period
*
* @param tmsPeriod the value for trial_balance.tms_period
*
* @mbg.generated
*/
public void setTmsPeriod(Integer tmsPeriod) {
this.tmsPeriod = tmsPeriod;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column trial_balance.period * This method returns the value of the database column trial_balance.period
...@@ -1928,6 +1963,7 @@ public class TrialBalance extends BaseEntity implements Serializable { ...@@ -1928,6 +1963,7 @@ public class TrialBalance extends BaseEntity implements Serializable {
sb.append(", projectId=").append(projectId); sb.append(", projectId=").append(projectId);
sb.append(", date=").append(date); sb.append(", date=").append(date);
sb.append(", source=").append(source); sb.append(", source=").append(source);
sb.append(", tmsPeriod=").append(tmsPeriod);
sb.append(", period=").append(period); sb.append(", period=").append(period);
sb.append(", ledgerId=").append(ledgerId); sb.append(", ledgerId=").append(ledgerId);
sb.append(", ledgerName=").append(ledgerName); sb.append(", ledgerName=").append(ledgerName);
......
...@@ -526,6 +526,66 @@ public class TrialBalanceExample { ...@@ -526,6 +526,66 @@ public class TrialBalanceExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTmsPeriodIsNull() {
addCriterion("tms_period is null");
return (Criteria) this;
}
public Criteria andTmsPeriodIsNotNull() {
addCriterion("tms_period is not null");
return (Criteria) this;
}
public Criteria andTmsPeriodEqualTo(Integer value) {
addCriterion("tms_period =", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotEqualTo(Integer value) {
addCriterion("tms_period <>", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodGreaterThan(Integer value) {
addCriterion("tms_period >", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodGreaterThanOrEqualTo(Integer value) {
addCriterion("tms_period >=", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodLessThan(Integer value) {
addCriterion("tms_period <", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodLessThanOrEqualTo(Integer value) {
addCriterion("tms_period <=", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodIn(List<Integer> values) {
addCriterion("tms_period in", values, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotIn(List<Integer> values) {
addCriterion("tms_period not in", values, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodBetween(Integer value1, Integer value2) {
addCriterion("tms_period between", value1, value2, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotBetween(Integer value1, Integer value2) {
addCriterion("tms_period not between", value1, value2, "tmsPeriod");
return (Criteria) this;
}
public Criteria andPeriodIsNull() { public Criteria andPeriodIsNull() {
addCriterion("period is null"); addCriterion("period is null");
return (Criteria) this; return (Criteria) this;
......
...@@ -68,6 +68,17 @@ public class TrialBalanceFinal extends BaseEntity implements Serializable { ...@@ -68,6 +68,17 @@ public class TrialBalanceFinal extends BaseEntity implements Serializable {
*/ */
private String source; private String source;
/**
* Database Column Remarks:
* 税务系统期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column trial_balance_final.tms_period
*
* @mbg.generated
*/
private Integer tmsPeriod;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 期间 yyyymm * 期间 yyyymm
...@@ -735,6 +746,30 @@ public class TrialBalanceFinal extends BaseEntity implements Serializable { ...@@ -735,6 +746,30 @@ public class TrialBalanceFinal extends BaseEntity implements Serializable {
this.source = source == null ? null : source.trim(); this.source = source == null ? null : source.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column trial_balance_final.tms_period
*
* @return the value of trial_balance_final.tms_period
*
* @mbg.generated
*/
public Integer getTmsPeriod() {
return tmsPeriod;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column trial_balance_final.tms_period
*
* @param tmsPeriod the value for trial_balance_final.tms_period
*
* @mbg.generated
*/
public void setTmsPeriod(Integer tmsPeriod) {
this.tmsPeriod = tmsPeriod;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column trial_balance_final.period * This method returns the value of the database column trial_balance_final.period
...@@ -1928,6 +1963,7 @@ public class TrialBalanceFinal extends BaseEntity implements Serializable { ...@@ -1928,6 +1963,7 @@ public class TrialBalanceFinal extends BaseEntity implements Serializable {
sb.append(", projectId=").append(projectId); sb.append(", projectId=").append(projectId);
sb.append(", date=").append(date); sb.append(", date=").append(date);
sb.append(", source=").append(source); sb.append(", source=").append(source);
sb.append(", tmsPeriod=").append(tmsPeriod);
sb.append(", period=").append(period); sb.append(", period=").append(period);
sb.append(", ledgerId=").append(ledgerId); sb.append(", ledgerId=").append(ledgerId);
sb.append(", ledgerName=").append(ledgerName); sb.append(", ledgerName=").append(ledgerName);
......
...@@ -526,6 +526,66 @@ public class TrialBalanceFinalExample { ...@@ -526,6 +526,66 @@ public class TrialBalanceFinalExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTmsPeriodIsNull() {
addCriterion("tms_period is null");
return (Criteria) this;
}
public Criteria andTmsPeriodIsNotNull() {
addCriterion("tms_period is not null");
return (Criteria) this;
}
public Criteria andTmsPeriodEqualTo(Integer value) {
addCriterion("tms_period =", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotEqualTo(Integer value) {
addCriterion("tms_period <>", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodGreaterThan(Integer value) {
addCriterion("tms_period >", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodGreaterThanOrEqualTo(Integer value) {
addCriterion("tms_period >=", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodLessThan(Integer value) {
addCriterion("tms_period <", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodLessThanOrEqualTo(Integer value) {
addCriterion("tms_period <=", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodIn(List<Integer> values) {
addCriterion("tms_period in", values, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotIn(List<Integer> values) {
addCriterion("tms_period not in", values, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodBetween(Integer value1, Integer value2) {
addCriterion("tms_period between", value1, value2, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotBetween(Integer value1, Integer value2) {
addCriterion("tms_period not between", value1, value2, "tmsPeriod");
return (Criteria) this;
}
public Criteria andPeriodIsNull() { public Criteria andPeriodIsNull() {
addCriterion("period is null"); addCriterion("period is null");
return (Criteria) this; return (Criteria) this;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<result column="project_id" jdbcType="VARCHAR" property="projectId" /> <result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="date" jdbcType="TIMESTAMP" property="date" /> <result column="date" jdbcType="TIMESTAMP" property="date" />
<result column="source" jdbcType="VARCHAR" property="source" /> <result column="source" jdbcType="VARCHAR" property="source" />
<result column="tms_period" jdbcType="INTEGER" property="tmsPeriod" />
<result column="period" jdbcType="INTEGER" property="period" /> <result column="period" jdbcType="INTEGER" property="period" />
<result column="ledger_id" jdbcType="VARCHAR" property="ledgerId" /> <result column="ledger_id" jdbcType="VARCHAR" property="ledgerId" />
<result column="ledger_name" jdbcType="VARCHAR" property="ledgerName" /> <result column="ledger_name" jdbcType="VARCHAR" property="ledgerName" />
...@@ -132,14 +133,14 @@ ...@@ -132,14 +133,14 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, organization_id, project_id, `date`, `source`, period, ledger_id, ledger_name, id, organization_id, project_id, `date`, `source`, tms_period, period, ledger_id,
currency_code, `status`, category, account_category, acct_code1, acct_name1, acct_name2, ledger_name, currency_code, `status`, category, account_category, acct_code1, acct_name1,
acct_name3, segment1, segment2, segment3, segment4, segment5, segment6, segment7, acct_name2, acct_name3, segment1, segment2, segment3, segment4, segment5, segment6,
segment8, segment9, segment10, segment1_name, segment2_name, segment3_name, segment4_name, segment7, segment8, segment9, segment10, segment1_name, segment2_name, segment3_name,
segment5_name, segment6_name, segment7_name, segment8_name, segment9_name, segment10_name, segment4_name, segment5_name, segment6_name, segment7_name, segment8_name, segment9_name,
beg_bal, period_dr, period_cr, end_bal, qtd_dr, qtd_cr, ytd_dr, ytd_cr, beg_bal_beq, segment10_name, beg_bal, period_dr, period_cr, end_bal, qtd_dr, qtd_cr, ytd_dr, ytd_cr,
period_dr_beq, period_cr_beq, end_bal_beq, qtd_dr_beq, qtd_cr_beq, ytd_dr_beq, ytd_cr_beq, beg_bal_beq, period_dr_beq, period_cr_beq, end_bal_beq, qtd_dr_beq, qtd_cr_beq, ytd_dr_beq,
create_time, update_time ytd_cr_beq, create_time, update_time
</sql> </sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.TrialBalanceFinalExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.TrialBalanceFinalExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -193,43 +194,43 @@ ...@@ -193,43 +194,43 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
insert into trial_balance_final (id, organization_id, project_id, insert into trial_balance_final (id, organization_id, project_id,
`date`, `source`, period, `date`, `source`, tms_period,
ledger_id, ledger_name, currency_code, period, ledger_id, ledger_name,
`status`, category, account_category, currency_code, `status`, category,
acct_code1, acct_name1, acct_name2, account_category, acct_code1, acct_name1,
acct_name3, segment1, segment2, acct_name2, acct_name3, segment1,
segment3, segment4, segment5, segment2, segment3, segment4,
segment6, segment7, segment8, segment5, segment6, segment7,
segment9, segment10, segment1_name, segment8, segment9, segment10,
segment2_name, segment3_name, segment4_name, segment1_name, segment2_name, segment3_name,
segment5_name, segment6_name, segment7_name, segment4_name, segment5_name, segment6_name,
segment8_name, segment9_name, segment10_name, segment7_name, segment8_name, segment9_name,
beg_bal, period_dr, period_cr, segment10_name, beg_bal, period_dr,
end_bal, qtd_dr, qtd_cr, period_cr, end_bal, qtd_dr,
ytd_dr, ytd_cr, beg_bal_beq, qtd_cr, ytd_dr, ytd_cr,
period_dr_beq, period_cr_beq, end_bal_beq, beg_bal_beq, period_dr_beq, period_cr_beq,
qtd_dr_beq, qtd_cr_beq, ytd_dr_beq, end_bal_beq, qtd_dr_beq, qtd_cr_beq,
ytd_cr_beq, create_time, update_time ytd_dr_beq, ytd_cr_beq, create_time,
) update_time)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
#{date,jdbcType=TIMESTAMP}, #{source,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}, #{date,jdbcType=TIMESTAMP}, #{source,jdbcType=VARCHAR}, #{tmsPeriod,jdbcType=INTEGER},
#{ledgerId,jdbcType=VARCHAR}, #{ledgerName,jdbcType=VARCHAR}, #{currencyCode,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}, #{ledgerId,jdbcType=VARCHAR}, #{ledgerName,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR}, #{accountCategory,jdbcType=VARCHAR}, #{currencyCode,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR},
#{acctCode1,jdbcType=VARCHAR}, #{acctName1,jdbcType=VARCHAR}, #{acctName2,jdbcType=VARCHAR}, #{accountCategory,jdbcType=VARCHAR}, #{acctCode1,jdbcType=VARCHAR}, #{acctName1,jdbcType=VARCHAR},
#{acctName3,jdbcType=VARCHAR}, #{segment1,jdbcType=VARCHAR}, #{segment2,jdbcType=VARCHAR}, #{acctName2,jdbcType=VARCHAR}, #{acctName3,jdbcType=VARCHAR}, #{segment1,jdbcType=VARCHAR},
#{segment3,jdbcType=VARCHAR}, #{segment4,jdbcType=VARCHAR}, #{segment5,jdbcType=VARCHAR}, #{segment2,jdbcType=VARCHAR}, #{segment3,jdbcType=VARCHAR}, #{segment4,jdbcType=VARCHAR},
#{segment6,jdbcType=VARCHAR}, #{segment7,jdbcType=VARCHAR}, #{segment8,jdbcType=VARCHAR}, #{segment5,jdbcType=VARCHAR}, #{segment6,jdbcType=VARCHAR}, #{segment7,jdbcType=VARCHAR},
#{segment9,jdbcType=VARCHAR}, #{segment10,jdbcType=VARCHAR}, #{segment1Name,jdbcType=VARCHAR}, #{segment8,jdbcType=VARCHAR}, #{segment9,jdbcType=VARCHAR}, #{segment10,jdbcType=VARCHAR},
#{segment2Name,jdbcType=VARCHAR}, #{segment3Name,jdbcType=VARCHAR}, #{segment4Name,jdbcType=VARCHAR}, #{segment1Name,jdbcType=VARCHAR}, #{segment2Name,jdbcType=VARCHAR}, #{segment3Name,jdbcType=VARCHAR},
#{segment5Name,jdbcType=VARCHAR}, #{segment6Name,jdbcType=VARCHAR}, #{segment7Name,jdbcType=VARCHAR}, #{segment4Name,jdbcType=VARCHAR}, #{segment5Name,jdbcType=VARCHAR}, #{segment6Name,jdbcType=VARCHAR},
#{segment8Name,jdbcType=VARCHAR}, #{segment9Name,jdbcType=VARCHAR}, #{segment10Name,jdbcType=VARCHAR}, #{segment7Name,jdbcType=VARCHAR}, #{segment8Name,jdbcType=VARCHAR}, #{segment9Name,jdbcType=VARCHAR},
#{begBal,jdbcType=DECIMAL}, #{periodDr,jdbcType=DECIMAL}, #{periodCr,jdbcType=DECIMAL}, #{segment10Name,jdbcType=VARCHAR}, #{begBal,jdbcType=DECIMAL}, #{periodDr,jdbcType=DECIMAL},
#{endBal,jdbcType=DECIMAL}, #{qtdDr,jdbcType=DECIMAL}, #{qtdCr,jdbcType=DECIMAL}, #{periodCr,jdbcType=DECIMAL}, #{endBal,jdbcType=DECIMAL}, #{qtdDr,jdbcType=DECIMAL},
#{ytdDr,jdbcType=DECIMAL}, #{ytdCr,jdbcType=DECIMAL}, #{begBalBeq,jdbcType=DECIMAL}, #{qtdCr,jdbcType=DECIMAL}, #{ytdDr,jdbcType=DECIMAL}, #{ytdCr,jdbcType=DECIMAL},
#{periodDrBeq,jdbcType=DECIMAL}, #{periodCrBeq,jdbcType=DECIMAL}, #{endBalBeq,jdbcType=DECIMAL}, #{begBalBeq,jdbcType=DECIMAL}, #{periodDrBeq,jdbcType=DECIMAL}, #{periodCrBeq,jdbcType=DECIMAL},
#{qtdDrBeq,jdbcType=DECIMAL}, #{qtdCrBeq,jdbcType=DECIMAL}, #{ytdDrBeq,jdbcType=DECIMAL}, #{endBalBeq,jdbcType=DECIMAL}, #{qtdDrBeq,jdbcType=DECIMAL}, #{qtdCrBeq,jdbcType=DECIMAL},
#{ytdCrBeq,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} #{ytdDrBeq,jdbcType=DECIMAL}, #{ytdCrBeq,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP},
) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.TrialBalanceFinal"> <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.TrialBalanceFinal">
<!-- <!--
...@@ -253,6 +254,9 @@ ...@@ -253,6 +254,9 @@
<if test="source != null"> <if test="source != null">
`source`, `source`,
</if> </if>
<if test="tmsPeriod != null">
tms_period,
</if>
<if test="period != null"> <if test="period != null">
period, period,
</if> </if>
...@@ -417,6 +421,9 @@ ...@@ -417,6 +421,9 @@
<if test="source != null"> <if test="source != null">
#{source,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR},
</if> </if>
<if test="tmsPeriod != null">
#{tmsPeriod,jdbcType=INTEGER},
</if>
<if test="period != null"> <if test="period != null">
#{period,jdbcType=INTEGER}, #{period,jdbcType=INTEGER},
</if> </if>
...@@ -598,6 +605,9 @@ ...@@ -598,6 +605,9 @@
<if test="record.source != null"> <if test="record.source != null">
`source` = #{record.source,jdbcType=VARCHAR}, `source` = #{record.source,jdbcType=VARCHAR},
</if> </if>
<if test="record.tmsPeriod != null">
tms_period = #{record.tmsPeriod,jdbcType=INTEGER},
</if>
<if test="record.period != null"> <if test="record.period != null">
period = #{record.period,jdbcType=INTEGER}, period = #{record.period,jdbcType=INTEGER},
</if> </if>
...@@ -761,6 +771,7 @@ ...@@ -761,6 +771,7 @@
project_id = #{record.projectId,jdbcType=VARCHAR}, project_id = #{record.projectId,jdbcType=VARCHAR},
`date` = #{record.date,jdbcType=TIMESTAMP}, `date` = #{record.date,jdbcType=TIMESTAMP},
`source` = #{record.source,jdbcType=VARCHAR}, `source` = #{record.source,jdbcType=VARCHAR},
tms_period = #{record.tmsPeriod,jdbcType=INTEGER},
period = #{record.period,jdbcType=INTEGER}, period = #{record.period,jdbcType=INTEGER},
ledger_id = #{record.ledgerId,jdbcType=VARCHAR}, ledger_id = #{record.ledgerId,jdbcType=VARCHAR},
ledger_name = #{record.ledgerName,jdbcType=VARCHAR}, ledger_name = #{record.ledgerName,jdbcType=VARCHAR},
...@@ -833,6 +844,9 @@ ...@@ -833,6 +844,9 @@
<if test="source != null"> <if test="source != null">
`source` = #{source,jdbcType=VARCHAR}, `source` = #{source,jdbcType=VARCHAR},
</if> </if>
<if test="tmsPeriod != null">
tms_period = #{tmsPeriod,jdbcType=INTEGER},
</if>
<if test="period != null"> <if test="period != null">
period = #{period,jdbcType=INTEGER}, period = #{period,jdbcType=INTEGER},
</if> </if>
...@@ -993,6 +1007,7 @@ ...@@ -993,6 +1007,7 @@
project_id = #{projectId,jdbcType=VARCHAR}, project_id = #{projectId,jdbcType=VARCHAR},
`date` = #{date,jdbcType=TIMESTAMP}, `date` = #{date,jdbcType=TIMESTAMP},
`source` = #{source,jdbcType=VARCHAR}, `source` = #{source,jdbcType=VARCHAR},
tms_period = #{tmsPeriod,jdbcType=INTEGER},
period = #{period,jdbcType=INTEGER}, period = #{period,jdbcType=INTEGER},
ledger_id = #{ledgerId,jdbcType=VARCHAR}, ledger_id = #{ledgerId,jdbcType=VARCHAR},
ledger_name = #{ledgerName,jdbcType=VARCHAR}, ledger_name = #{ledgerName,jdbcType=VARCHAR},
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<result column="project_id" jdbcType="VARCHAR" property="projectId" /> <result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="date" jdbcType="TIMESTAMP" property="date" /> <result column="date" jdbcType="TIMESTAMP" property="date" />
<result column="source" jdbcType="VARCHAR" property="source" /> <result column="source" jdbcType="VARCHAR" property="source" />
<result column="tms_period" jdbcType="INTEGER" property="tmsPeriod" />
<result column="period" jdbcType="INTEGER" property="period" /> <result column="period" jdbcType="INTEGER" property="period" />
<result column="ledger_id" jdbcType="VARCHAR" property="ledgerId" /> <result column="ledger_id" jdbcType="VARCHAR" property="ledgerId" />
<result column="ledger_name" jdbcType="VARCHAR" property="ledgerName" /> <result column="ledger_name" jdbcType="VARCHAR" property="ledgerName" />
...@@ -132,14 +133,14 @@ ...@@ -132,14 +133,14 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, organization_id, project_id, `date`, `source`, period, ledger_id, ledger_name, id, organization_id, project_id, `date`, `source`, tms_period, period, ledger_id,
currency_code, `status`, category, account_category, acct_code1, acct_name1, acct_name2, ledger_name, currency_code, `status`, category, account_category, acct_code1, acct_name1,
acct_name3, segment1, segment2, segment3, segment4, segment5, segment6, segment7, acct_name2, acct_name3, segment1, segment2, segment3, segment4, segment5, segment6,
segment8, segment9, segment10, segment1_name, segment2_name, segment3_name, segment4_name, segment7, segment8, segment9, segment10, segment1_name, segment2_name, segment3_name,
segment5_name, segment6_name, segment7_name, segment8_name, segment9_name, segment10_name, segment4_name, segment5_name, segment6_name, segment7_name, segment8_name, segment9_name,
beg_bal, period_dr, period_cr, end_bal, qtd_dr, qtd_cr, ytd_dr, ytd_cr, beg_bal_beq, segment10_name, beg_bal, period_dr, period_cr, end_bal, qtd_dr, qtd_cr, ytd_dr, ytd_cr,
period_dr_beq, period_cr_beq, end_bal_beq, qtd_dr_beq, qtd_cr_beq, ytd_dr_beq, ytd_cr_beq, beg_bal_beq, period_dr_beq, period_cr_beq, end_bal_beq, qtd_dr_beq, qtd_cr_beq, ytd_dr_beq,
create_time, update_time ytd_cr_beq, create_time, update_time
</sql> </sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.TrialBalanceExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.TrialBalanceExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -193,43 +194,43 @@ ...@@ -193,43 +194,43 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
insert into trial_balance (id, organization_id, project_id, insert into trial_balance (id, organization_id, project_id,
`date`, `source`, period, `date`, `source`, tms_period,
ledger_id, ledger_name, currency_code, period, ledger_id, ledger_name,
`status`, category, account_category, currency_code, `status`, category,
acct_code1, acct_name1, acct_name2, account_category, acct_code1, acct_name1,
acct_name3, segment1, segment2, acct_name2, acct_name3, segment1,
segment3, segment4, segment5, segment2, segment3, segment4,
segment6, segment7, segment8, segment5, segment6, segment7,
segment9, segment10, segment1_name, segment8, segment9, segment10,
segment2_name, segment3_name, segment4_name, segment1_name, segment2_name, segment3_name,
segment5_name, segment6_name, segment7_name, segment4_name, segment5_name, segment6_name,
segment8_name, segment9_name, segment10_name, segment7_name, segment8_name, segment9_name,
beg_bal, period_dr, period_cr, segment10_name, beg_bal, period_dr,
end_bal, qtd_dr, qtd_cr, period_cr, end_bal, qtd_dr,
ytd_dr, ytd_cr, beg_bal_beq, qtd_cr, ytd_dr, ytd_cr,
period_dr_beq, period_cr_beq, end_bal_beq, beg_bal_beq, period_dr_beq, period_cr_beq,
qtd_dr_beq, qtd_cr_beq, ytd_dr_beq, end_bal_beq, qtd_dr_beq, qtd_cr_beq,
ytd_cr_beq, create_time, update_time ytd_dr_beq, ytd_cr_beq, create_time,
) update_time)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
#{date,jdbcType=TIMESTAMP}, #{source,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}, #{date,jdbcType=TIMESTAMP}, #{source,jdbcType=VARCHAR}, #{tmsPeriod,jdbcType=INTEGER},
#{ledgerId,jdbcType=VARCHAR}, #{ledgerName,jdbcType=VARCHAR}, #{currencyCode,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}, #{ledgerId,jdbcType=VARCHAR}, #{ledgerName,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR}, #{accountCategory,jdbcType=VARCHAR}, #{currencyCode,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR},
#{acctCode1,jdbcType=VARCHAR}, #{acctName1,jdbcType=VARCHAR}, #{acctName2,jdbcType=VARCHAR}, #{accountCategory,jdbcType=VARCHAR}, #{acctCode1,jdbcType=VARCHAR}, #{acctName1,jdbcType=VARCHAR},
#{acctName3,jdbcType=VARCHAR}, #{segment1,jdbcType=VARCHAR}, #{segment2,jdbcType=VARCHAR}, #{acctName2,jdbcType=VARCHAR}, #{acctName3,jdbcType=VARCHAR}, #{segment1,jdbcType=VARCHAR},
#{segment3,jdbcType=VARCHAR}, #{segment4,jdbcType=VARCHAR}, #{segment5,jdbcType=VARCHAR}, #{segment2,jdbcType=VARCHAR}, #{segment3,jdbcType=VARCHAR}, #{segment4,jdbcType=VARCHAR},
#{segment6,jdbcType=VARCHAR}, #{segment7,jdbcType=VARCHAR}, #{segment8,jdbcType=VARCHAR}, #{segment5,jdbcType=VARCHAR}, #{segment6,jdbcType=VARCHAR}, #{segment7,jdbcType=VARCHAR},
#{segment9,jdbcType=VARCHAR}, #{segment10,jdbcType=VARCHAR}, #{segment1Name,jdbcType=VARCHAR}, #{segment8,jdbcType=VARCHAR}, #{segment9,jdbcType=VARCHAR}, #{segment10,jdbcType=VARCHAR},
#{segment2Name,jdbcType=VARCHAR}, #{segment3Name,jdbcType=VARCHAR}, #{segment4Name,jdbcType=VARCHAR}, #{segment1Name,jdbcType=VARCHAR}, #{segment2Name,jdbcType=VARCHAR}, #{segment3Name,jdbcType=VARCHAR},
#{segment5Name,jdbcType=VARCHAR}, #{segment6Name,jdbcType=VARCHAR}, #{segment7Name,jdbcType=VARCHAR}, #{segment4Name,jdbcType=VARCHAR}, #{segment5Name,jdbcType=VARCHAR}, #{segment6Name,jdbcType=VARCHAR},
#{segment8Name,jdbcType=VARCHAR}, #{segment9Name,jdbcType=VARCHAR}, #{segment10Name,jdbcType=VARCHAR}, #{segment7Name,jdbcType=VARCHAR}, #{segment8Name,jdbcType=VARCHAR}, #{segment9Name,jdbcType=VARCHAR},
#{begBal,jdbcType=DECIMAL}, #{periodDr,jdbcType=DECIMAL}, #{periodCr,jdbcType=DECIMAL}, #{segment10Name,jdbcType=VARCHAR}, #{begBal,jdbcType=DECIMAL}, #{periodDr,jdbcType=DECIMAL},
#{endBal,jdbcType=DECIMAL}, #{qtdDr,jdbcType=DECIMAL}, #{qtdCr,jdbcType=DECIMAL}, #{periodCr,jdbcType=DECIMAL}, #{endBal,jdbcType=DECIMAL}, #{qtdDr,jdbcType=DECIMAL},
#{ytdDr,jdbcType=DECIMAL}, #{ytdCr,jdbcType=DECIMAL}, #{begBalBeq,jdbcType=DECIMAL}, #{qtdCr,jdbcType=DECIMAL}, #{ytdDr,jdbcType=DECIMAL}, #{ytdCr,jdbcType=DECIMAL},
#{periodDrBeq,jdbcType=DECIMAL}, #{periodCrBeq,jdbcType=DECIMAL}, #{endBalBeq,jdbcType=DECIMAL}, #{begBalBeq,jdbcType=DECIMAL}, #{periodDrBeq,jdbcType=DECIMAL}, #{periodCrBeq,jdbcType=DECIMAL},
#{qtdDrBeq,jdbcType=DECIMAL}, #{qtdCrBeq,jdbcType=DECIMAL}, #{ytdDrBeq,jdbcType=DECIMAL}, #{endBalBeq,jdbcType=DECIMAL}, #{qtdDrBeq,jdbcType=DECIMAL}, #{qtdCrBeq,jdbcType=DECIMAL},
#{ytdCrBeq,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} #{ytdDrBeq,jdbcType=DECIMAL}, #{ytdCrBeq,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP},
) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.TrialBalance"> <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.TrialBalance">
<!-- <!--
...@@ -253,6 +254,9 @@ ...@@ -253,6 +254,9 @@
<if test="source != null"> <if test="source != null">
`source`, `source`,
</if> </if>
<if test="tmsPeriod != null">
tms_period,
</if>
<if test="period != null"> <if test="period != null">
period, period,
</if> </if>
...@@ -417,6 +421,9 @@ ...@@ -417,6 +421,9 @@
<if test="source != null"> <if test="source != null">
#{source,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR},
</if> </if>
<if test="tmsPeriod != null">
#{tmsPeriod,jdbcType=INTEGER},
</if>
<if test="period != null"> <if test="period != null">
#{period,jdbcType=INTEGER}, #{period,jdbcType=INTEGER},
</if> </if>
...@@ -598,6 +605,9 @@ ...@@ -598,6 +605,9 @@
<if test="record.source != null"> <if test="record.source != null">
`source` = #{record.source,jdbcType=VARCHAR}, `source` = #{record.source,jdbcType=VARCHAR},
</if> </if>
<if test="record.tmsPeriod != null">
tms_period = #{record.tmsPeriod,jdbcType=INTEGER},
</if>
<if test="record.period != null"> <if test="record.period != null">
period = #{record.period,jdbcType=INTEGER}, period = #{record.period,jdbcType=INTEGER},
</if> </if>
...@@ -761,6 +771,7 @@ ...@@ -761,6 +771,7 @@
project_id = #{record.projectId,jdbcType=VARCHAR}, project_id = #{record.projectId,jdbcType=VARCHAR},
`date` = #{record.date,jdbcType=TIMESTAMP}, `date` = #{record.date,jdbcType=TIMESTAMP},
`source` = #{record.source,jdbcType=VARCHAR}, `source` = #{record.source,jdbcType=VARCHAR},
tms_period = #{record.tmsPeriod,jdbcType=INTEGER},
period = #{record.period,jdbcType=INTEGER}, period = #{record.period,jdbcType=INTEGER},
ledger_id = #{record.ledgerId,jdbcType=VARCHAR}, ledger_id = #{record.ledgerId,jdbcType=VARCHAR},
ledger_name = #{record.ledgerName,jdbcType=VARCHAR}, ledger_name = #{record.ledgerName,jdbcType=VARCHAR},
...@@ -833,6 +844,9 @@ ...@@ -833,6 +844,9 @@
<if test="source != null"> <if test="source != null">
`source` = #{source,jdbcType=VARCHAR}, `source` = #{source,jdbcType=VARCHAR},
</if> </if>
<if test="tmsPeriod != null">
tms_period = #{tmsPeriod,jdbcType=INTEGER},
</if>
<if test="period != null"> <if test="period != null">
period = #{period,jdbcType=INTEGER}, period = #{period,jdbcType=INTEGER},
</if> </if>
...@@ -993,6 +1007,7 @@ ...@@ -993,6 +1007,7 @@
project_id = #{projectId,jdbcType=VARCHAR}, project_id = #{projectId,jdbcType=VARCHAR},
`date` = #{date,jdbcType=TIMESTAMP}, `date` = #{date,jdbcType=TIMESTAMP},
`source` = #{source,jdbcType=VARCHAR}, `source` = #{source,jdbcType=VARCHAR},
tms_period = #{tmsPeriod,jdbcType=INTEGER},
period = #{period,jdbcType=INTEGER}, period = #{period,jdbcType=INTEGER},
ledger_id = #{ledgerId,jdbcType=VARCHAR}, ledger_id = #{ledgerId,jdbcType=VARCHAR},
ledger_name = #{ledgerName,jdbcType=VARCHAR}, ledger_name = #{ledgerName,jdbcType=VARCHAR},
......
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