Commit 61a46681 authored by eddie.woo's avatar eddie.woo

add log

parent 6b940574
...@@ -15,6 +15,8 @@ import javax.net.ssl.SSLException; ...@@ -15,6 +15,8 @@ import javax.net.ssl.SSLException;
import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocket;
import com.alibaba.fastjson.JSON;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.Consts; import org.apache.http.Consts;
...@@ -38,6 +40,8 @@ import org.apache.http.impl.client.CloseableHttpClient; ...@@ -38,6 +40,8 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.BasicNameValuePair; import org.apache.http.message.BasicNameValuePair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* 依赖的jar包有:commons-lang-2.6.jar、httpclient-4.3.2.jar、httpcore-4.3.1.jar、commons-io-2.4.jar * 依赖的jar包有:commons-lang-2.6.jar、httpclient-4.3.2.jar、httpcore-4.3.1.jar、commons-io-2.4.jar
...@@ -50,6 +54,7 @@ public class HttpUtil { ...@@ -50,6 +54,7 @@ public class HttpUtil {
public static final int readTimeout=10000; public static final int readTimeout=10000;
public static final String charset="UTF-8"; public static final String charset="UTF-8";
private static HttpClient client = null; private static HttpClient client = null;
private static final Logger logger = LoggerFactory.getLogger(HttpUtil.class);
static { static {
PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(); PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();
...@@ -140,6 +145,7 @@ public class HttpUtil { ...@@ -140,6 +145,7 @@ public class HttpUtil {
public static String post(String url,Map<String, String> headers, String mimeType,String charset, Integer connTimeout, Integer readTimeout) public static String post(String url,Map<String, String> headers, String mimeType,String charset, Integer connTimeout, Integer readTimeout)
throws ConnectTimeoutException, SocketTimeoutException, Exception { throws ConnectTimeoutException, SocketTimeoutException, Exception {
logger.info("Http post: url: {}, header: {}", url, JSON.toJSONString(headers == null ? MapUtils.EMPTY_MAP : headers));
HttpClient client = null; HttpClient client = null;
HttpPost post = new HttpPost(url); HttpPost post = new HttpPost(url);
String result = ""; String result = "";
......
package pwc.taxtech.atms.controller; package pwc.taxtech.atms.controller;
import com.alibaba.fastjson.JSON;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -223,7 +224,7 @@ public class EbsApiController { ...@@ -223,7 +224,7 @@ public class EbsApiController {
*/ */
@RequestMapping(value = "/callback", method = RequestMethod.POST) @RequestMapping(value = "/callback", method = RequestMethod.POST)
public ApiResultDto callback(@RequestBody EbsCallBackDto callBackDto) { public ApiResultDto callback(@RequestBody EbsCallBackDto callBackDto) {
logger.info("EBS callback 调用,taskId :{}",callBackDto.getTaskId()); logger.info("EBS callback 调用,taskId :{}", JSON.toJSONString(callBackDto));
ApiResultDto apiResultDto = new ApiResultDto(); ApiResultDto apiResultDto = new ApiResultDto();
try{ try{
ebsApiService.changeCallBackStatus(callBackDto); ebsApiService.changeCallBackStatus(callBackDto);
......
...@@ -255,7 +255,7 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -255,7 +255,7 @@ public class EbsApiServiceImpl implements EbsApiService {
JournalEntryExample journalEntryExample = new JournalEntryExample(); JournalEntryExample journalEntryExample = new JournalEntryExample();
item.setTaskId(String.valueOf(id)); item.setTaskId(String.valueOf(id));
//日记账头ID和日记账行号 //日记账头ID和日记账行号
journalEntryExample.createCriteria().andHeaderIdEqualTo(item.getHeaderId()).andLineNumEqualTo(item.getLineNum()).andTaskIdNotEqualTo(item.getTaskId()); journalEntryExample.createCriteria().andHeaderIdEqualTo(item.getHeaderId()).andLineNumEqualTo(item.getLineNum()).andSourceEqualTo(item.getSource());
List<JournalEntry> journalEntryList = journalEntryMapper.selectByExample(journalEntryExample); List<JournalEntry> journalEntryList = journalEntryMapper.selectByExample(journalEntryExample);
//唯一则更新否则插入 //唯一则更新否则插入
JournalEntry journalEntry = new JournalEntry(); JournalEntry journalEntry = new JournalEntry();
......
...@@ -190,8 +190,8 @@ ...@@ -190,8 +190,8 @@
<div class="cardview-header"> <div class="cardview-header">
<span class="org-name" title="{{result.organizationName}}">{{result.organizationName | limitString:17}}</span> <span class="org-name" title="{{result.organizationName}}">{{result.organizationName | limitString:17}}</span>
<span ng-show="(result.taxRate>0 && result.hasWarning)"> <span ng-show="(result.taxRate>0 && result.hasWarning)">
<i class="fa fa-exclamation-circle" title="模型异常" style="color: orange; " aria-hidden="true"></i> <!--<i class="fa fa-exclamation-circle" title="模型异常" style="color: orange; " aria-hidden="true"></i>-->
<i class="fa fa-exclamation-triangle" title="风险提示" style="color:pink; margin-left:8px;" aria-hidden="true"></i> <!--<i class="fa fa-exclamation-triangle" title="风险提示" style="color:pink; margin-left:8px;" aria-hidden="true"></i>-->
<i class="fa fa-question-circle" aria-hidden="true" title="报表异常" style="color:lightpink; margin-left: 8px;margin-right:16px;"></i> <i class="fa fa-question-circle" aria-hidden="true" title="报表异常" style="color:lightpink; margin-left: 8px;margin-right:16px;"></i>
</span> </span>
</div> </div>
......
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