Showing
2 changed files
with
7 additions
and
4 deletions
| ... | @@ -14,6 +14,7 @@ import com.erry.iclear.dateInterface.entity.DeclearTask; | ... | @@ -14,6 +14,7 @@ import com.erry.iclear.dateInterface.entity.DeclearTask; |
| 14 | import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; | 14 | import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; |
| 15 | import com.erry.iclear.dateInterface.repository.DeclearTaskRepository; | 15 | import com.erry.iclear.dateInterface.repository.DeclearTaskRepository; |
| 16 | import com.erry.iclear.dateInterface.repository.ReceiptMessageRepository; | 16 | import com.erry.iclear.dateInterface.repository.ReceiptMessageRepository; |
| 17 | +import com.erry.iclear.dateInterface.util.DateUtils; | ||
| 17 | import com.erry.iclear.dateInterface.util.JsonToJava; | 18 | import com.erry.iclear.dateInterface.util.JsonToJava; |
| 18 | import lombok.extern.slf4j.Slf4j; | 19 | import lombok.extern.slf4j.Slf4j; |
| 19 | import org.apache.http.Header; | 20 | import org.apache.http.Header; |
| ... | @@ -106,7 +107,9 @@ public class ApiService { | ... | @@ -106,7 +107,9 @@ public class ApiService { |
| 106 | //去除微秒 | 107 | //去除微秒 |
| 107 | for(int i = 0 ; i < receiptMessageList.size() ; i ++){ | 108 | for(int i = 0 ; i < receiptMessageList.size() ; i ++){ |
| 108 | ReceiptMessage receiptMessage = receiptMessageList.get(i); | 109 | ReceiptMessage receiptMessage = receiptMessageList.get(i); |
| 109 | - receiptMessage.setNoticeDate(receiptMessage.getNoticeDate().substring(0,receiptMessage.getNoticeDate().length() - 4)); | 110 | + Date noticeDate = DateUtils.string2Date(receiptMessage.getNoticeDate(),null); |
| 111 | + String nDate = DateUtils.formatDate(noticeDate,"yyyy-MM-dd HH:mm:ss"); | ||
| 112 | + receiptMessage.setNoticeDate(nDate); | ||
| 110 | } | 113 | } |
| 111 | this.sendCustoms(token,receiptMessageList); | 114 | this.sendCustoms(token,receiptMessageList); |
| 112 | } | 115 | } | ... | ... |
| ... | @@ -25,7 +25,7 @@ public class HttpClientTest { | ... | @@ -25,7 +25,7 @@ public class HttpClientTest { |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | - String masbJson ="{\"ieFlag\":\"I\",\"type\":\" 0\",\"agentCode\":\"1111980005\",\"agentName\":\"联邦快递\",\"billNo\":\"774567874373\",\"contrNo\":\"3006622200\",\"customMaster\":\"0208\",\"cutMode\":\"101\",\"declTrnRel\":\"0\",\"distinatePort\":\"DEU000\",\"ediId\":\"1\",\"feeCurr\":\"EUR\",\"feeMark\":\"3\",\"feeRate\":110.9,\"grossWet\":4.6,\"iePort\":\"0207\",\"insurCurr\":\"EUR\",\"insurMark\":\"\",\"insurRate\":0.74,\"netWt\":32,\"ownerCode\":\"9112011660\",\"ownerName\":\"西门子电气传动有限公司\",\"packNo\":1,\"tradeCountry\":\"USA\",\"tradeMode\":\"0110\",\"tradeCode\":\"9112011660\",\"trafMode\":\"5\",\"tradeName\":\"西门子电气传动有限公司\",\"transMode\":\"1\",\"wrapType\":\"23\",\"tradeCodeScc\":\"91120116600587482L\",\"ownerCodeScc\":\"91120116600587482L\",\"tradeAreaCode\":\"DEU\",\"entyPortCode\":\"110101\",\"goodsPlace\":\"\",\"declareName\":\"Jimmy shen\",\"overseasConsigneeEname\":\"PRYSMIAN KABEL UND SYSTEME GMBH\",\"mawbDetailList\":[{\"detailId\":\"494\",\"classMark\":\"\",\"codeTS\":\"8504409999\",\"declPrice\":3365,\"declTotal\":3365,\"dutyMode\":\"1\",\"exgNo\":\"\",\"exgVersion\":\"\",\"firstUnit\":\"007\",\"firstQty\":1,\"originCountry\":\"CHN\",\"secondUnit\":\"035\",\"secondQty\":1,\"tradeCurr\":\"EUR\",\"useTo\":\"03\",\"destinationCountry\":\"DEU\",\"ciqCode\":\"\",\"destCode\":\"110102\",\"districtCode\":\"12043\",\"gno\":1,\"gname\":\"变频调速装置\",\"gmodel\":\"4|0|控制电机用|240KW|西门子/SIEMENS|6RA8081-6GV62-0AA0|||\",\"gqty\":1,\"gunit\":\"007\"}]}"; | 28 | + String masbJson ="{\"ieFlag\":\"I\",\"type\":\" 0\",\"agentCode\":\"1111980005\",\"agentName\":\"联邦快递\",\"billNo\":\"774597567332\",\"contrNo\":\"3006635555/3006636664\",\"customMaster\":\"0207\",\"cutMode\":\"1\",\"declTrnRel\":\"0\",\"distinatePort\":\"DEU000\",\"ediId\":\"1\",\"feeCurr\":\"EUR\",\"feeMark\":\"3\",\"feeRate\":110.9,\"grossWet\":4.6,\"iePort\":\"0207\",\"insurCurr\":\"EUR\",\"insurMark\":\"\",\"insurRate\":0.74,\"netWt\":32,\"ownerCode\":\"9112011660\",\"ownerName\":\"西门子电气传动有限公司\",\"packNo\":1,\"tradeCountry\":\"USA\",\"tradeMode\":\"0110\",\"tradeCode\":\"9112011660\",\"trafMode\":\"5\",\"tradeName\":\"西门子电气传动有限公司\",\"transMode\":\"1\",\"wrapType\":\"23\",\"tradeCodeScc\":\"91120116600587482L\",\"ownerCodeScc\":\"91120116600587482L\",\"tradeAreaCode\":\"DEU\",\"entyPortCode\":\"110101\",\"goodsPlace\":\"\",\"declareName\":\"Jimmy shen\",\"overseasConsigneeEname\":\"PRYSMIAN KABEL UND SYSTEME GMBH\",\"mawbDetailList\":[{\"detailId\":\"495\",\"classMark\":\"\",\"codeTS\":\"8504409999\",\"declPrice\":3365,\"declTotal\":3365,\"dutyMode\":\"1\",\"exgNo\":\"\",\"exgVersion\":\"\",\"firstUnit\":\"007\",\"firstQty\":1,\"originCountry\":\"CHN\",\"secondUnit\":\"035\",\"secondQty\":1,\"tradeCurr\":\"EUR\",\"useTo\":\"03\",\"destinationCountry\":\"DEU\",\"ciqCode\":\"\",\"destCode\":\"110102\",\"districtCode\":\"11010\",\"gno\":1,\"gname\":\"其他未列名静止式变流器\",\"gmodel\":\"4|0|控制电机用|240KW|西门子/SIEMENS|6RA8081-6GV62-0AA0|||\",\"gqty\":1,\"gunit\":\"007\"},{\"detailId\":\"496\",\"classMark\":\"\",\"codeTS\":\"8504409999\",\"declPrice\":9369,\"declTotal\":9369,\"dutyMode\":\"1\",\"exgNo\":\"\",\"exgVersion\":\"\",\"firstUnit\":\"007\",\"firstQty\":3,\"originCountry\":\"CHN\",\"secondUnit\":\"035\",\"secondQty\":1,\"tradeCurr\":\"EUR\",\"useTo\":\"03\",\"destinationCountry\":\"DEU\",\"ciqCode\":\"\",\"destCode\":\"110102\",\"districtCode\":\"11010\",\"gno\":2,\"gname\":\"其他未列名静止式变流器\",\"gmodel\":\"4|0|控制电机用|36KW|西门子/SIEMENS|6RA8081-6GV62-0BB0|||\",\"gqty\":3,\"gunit\":\"007\"}]}"; |
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | 31 | ||
| ... | @@ -52,8 +52,8 @@ public class HttpClientTest { | ... | @@ -52,8 +52,8 @@ public class HttpClientTest { |
| 52 | .ssl() | 52 | .ssl() |
| 53 | .retry(3); | 53 | .retry(3); |
| 54 | 54 | ||
| 55 | - String url = "https://40.73.78.157:8780/customs/sendMawb"; | 55 | + //String url = "https://40.73.78.157:8780/customs/sendMawb"; |
| 56 | - //String url = "https://127.0.0.1:8780/customs/sendMawb"; | 56 | + String url = "https://127.0.0.1:8780/customs/sendMawb"; |
| 57 | HttpConfig config = HttpConfig.custom() | 57 | HttpConfig config = HttpConfig.custom() |
| 58 | .headers(headers) | 58 | .headers(headers) |
| 59 | .url(url) | 59 | .url(url) | ... | ... |
-
Please register or login to post a comment