Showing
11 changed files
with
80 additions
and
194 deletions
| ... | @@ -50,6 +50,7 @@ CREATE TABLE T_ICLEAR_API_LOG( | ... | @@ -50,6 +50,7 @@ CREATE TABLE T_ICLEAR_API_LOG( |
| 50 | CREATE TABLE T_ICLEAR_API_MAWB( | 50 | CREATE TABLE T_ICLEAR_API_MAWB( |
| 51 | ID int identity(1,1) primary key --PK | 51 | ID int identity(1,1) primary key --PK |
| 52 | ,MSGID int | 52 | ,MSGID int |
| 53 | + ,APPID VARCHAR(20) --用户ID | ||
| 53 | ,IEFlag varchar(1) | 54 | ,IEFlag varchar(1) |
| 54 | ,TYPE VARCHAR(6) | 55 | ,TYPE VARCHAR(6) |
| 55 | ,AGENTCODE VARCHAR(18) | 56 | ,AGENTCODE VARCHAR(18) |
| ... | @@ -104,6 +105,7 @@ CREATE TABLE T_ICLEAR_API_MAWBDETAIL( | ... | @@ -104,6 +105,7 @@ CREATE TABLE T_ICLEAR_API_MAWBDETAIL( |
| 104 | ID int identity(1,1) primary key --PK | 105 | ID int identity(1,1) primary key --PK |
| 105 | ,MSGID int | 106 | ,MSGID int |
| 106 | ,MAWBID int | 107 | ,MAWBID int |
| 108 | + ,DETAILID VARCHAR(50) | ||
| 107 | ,CLASSMARK VARCHAR(1) | 109 | ,CLASSMARK VARCHAR(1) |
| 108 | ,CODETS VARCHAR(10) | 110 | ,CODETS VARCHAR(10) |
| 109 | ,DECLPRICE NUMERIC(19,5) | 111 | ,DECLPRICE NUMERIC(19,5) |
| ... | @@ -130,4 +132,21 @@ CREATE TABLE T_ICLEAR_API_MAWBDETAIL( | ... | @@ -130,4 +132,21 @@ CREATE TABLE T_ICLEAR_API_MAWBDETAIL( |
| 130 | ,DESTCODE VARCHAR(8) | 132 | ,DESTCODE VARCHAR(8) |
| 131 | ,DISTRICTCODE VARCHAR(5) | 133 | ,DISTRICTCODE VARCHAR(5) |
| 132 | 134 | ||
| 133 | -) | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 135 | +) | ||
| 136 | + | ||
| 137 | + | ||
| 138 | + | ||
| 139 | +---ALTER TABLE T_ICLEAR_API_MAWB ADD SOURCE_TYPE VARCHAR(10); | ||
| 140 | +ALTER TABLE T_CHM_CONSIGNMENT_DETAIL ADD DETAILID VARCHAR(50); | ||
| 141 | + | ||
| 142 | + | ||
| 143 | + | ||
| 144 | + | ||
| 145 | + | ||
| 146 | + | ||
| 147 | + | ||
| 148 | + | ||
| 149 | + | ||
| 150 | + | ||
| 151 | + | ||
| 152 | + | ... | ... |
No preview for this file type
| ... | @@ -57,7 +57,8 @@ public class CustomsDataInterface { | ... | @@ -57,7 +57,8 @@ public class CustomsDataInterface { |
| 57 | result.setMsg("请求信息不能为空"); | 57 | result.setMsg("请求信息不能为空"); |
| 58 | return result; | 58 | return result; |
| 59 | } | 59 | } |
| 60 | - //0、保存请求信息,保存到iClear的 SQLServer | 60 | + //1、保存请求信息,保存到iClear的 SQLServer |
| 61 | + | ||
| 61 | StopWatch sw = new StopWatch("receice mawb"); | 62 | StopWatch sw = new StopWatch("receice mawb"); |
| 62 | sw.start("save log"); | 63 | sw.start("save log"); |
| 63 | 64 | ||
| ... | @@ -67,6 +68,7 @@ public class CustomsDataInterface { | ... | @@ -67,6 +68,7 @@ public class CustomsDataInterface { |
| 67 | IClearApiLog saveIClearApiLogResult = iClearApiLogService.saveIClearApiLog(iClearApiLogService.convertToIClearApiLog(mawb,appId,appKey,new Date(Long.valueOf(timeStamp)))); | 68 | IClearApiLog saveIClearApiLogResult = iClearApiLogService.saveIClearApiLog(iClearApiLogService.convertToIClearApiLog(mawb,appId,appKey,new Date(Long.valueOf(timeStamp)))); |
| 68 | 69 | ||
| 69 | 70 | ||
| 71 | + mawb.setAppId(appId); | ||
| 70 | if(!Objects.equals(saveIClearApiLogResult,null)){ | 72 | if(!Objects.equals(saveIClearApiLogResult,null)){ |
| 71 | log.info("请求保存成功,msgId:"+saveIClearApiLogResult.getMsgId()); | 73 | log.info("请求保存成功,msgId:"+saveIClearApiLogResult.getMsgId()); |
| 72 | mawb.setMsgId(saveIClearApiLogResult.getMsgId()); | 74 | mawb.setMsgId(saveIClearApiLogResult.getMsgId()); |
| ... | @@ -85,37 +87,28 @@ public class CustomsDataInterface { | ... | @@ -85,37 +87,28 @@ public class CustomsDataInterface { |
| 85 | sw.stop(); | 87 | sw.stop(); |
| 86 | 88 | ||
| 87 | 89 | ||
| 88 | - | ||
| 89 | - //1、校验用户名密码 | ||
| 90 | -// sw.start("checkAppSecret"); | ||
| 91 | -// result=this.checkAppSecret(request, result); | ||
| 92 | -// sw.stop(); | ||
| 93 | - | ||
| 94 | - | ||
| 95 | //2、TODO 校验主单 | 90 | //2、TODO 校验主单 |
| 96 | sw.start("checkMawb"); | 91 | sw.start("checkMawb"); |
| 97 | - if(result.getSuccess()){ | 92 | + result=mawbService.checkMawb(mawb); |
| 98 | - //result.setSuccess(mawbService.checkMawb(mawb)); | 93 | + if(!result.getSuccess()){ |
| 94 | + return result; | ||
| 99 | } | 95 | } |
| 100 | sw.stop(); | 96 | sw.stop(); |
| 101 | 97 | ||
| 102 | //3、TODO 校验子单 | 98 | //3、TODO 校验子单 |
| 103 | sw.start("checkMawbDetail"); | 99 | sw.start("checkMawbDetail"); |
| 104 | - if(result.getSuccess()){ | 100 | + result=mawbDetailServicel.checkMawbDetail(mawb); |
| 105 | - | 101 | + if(!result.getSuccess()){ |
| 102 | + return result; | ||
| 106 | } | 103 | } |
| 107 | sw.stop(); | 104 | sw.stop(); |
| 108 | 105 | ||
| 109 | 106 | ||
| 110 | //4、保存运单到iclear中 | 107 | //4、保存运单到iclear中 |
| 111 | sw.start("processChmConsignment"); | 108 | sw.start("processChmConsignment"); |
| 112 | - //if(result.getSuccess()){ | 109 | + result = chmConsignmentService.processChmConsignment(mawb, timeStamp,appId); |
| 113 | - //TODO 等待校验逻辑完善后,由result.getSuccess() 判断 | 110 | + if(!result.getSuccess()){ |
| 114 | - if(true){ | 111 | + return result; |
| 115 | - result = chmConsignmentService.processChmConsignment(mawb, timeStamp,appId); | ||
| 116 | - if(!result.getSuccess()){ | ||
| 117 | - return result; | ||
| 118 | - } | ||
| 119 | } | 112 | } |
| 120 | sw.stop(); | 113 | sw.stop(); |
| 121 | 114 | ... | ... |
| ... | @@ -32,6 +32,11 @@ public class Mawb implements Serializable { | ... | @@ -32,6 +32,11 @@ public class Mawb implements Serializable { |
| 32 | @Column(name = "MSGID") | 32 | @Column(name = "MSGID") |
| 33 | private Long msgId; | 33 | private Long msgId; |
| 34 | 34 | ||
| 35 | + @ApiModelProperty(value = "用户ID", name = "AppId", example = "IDE") | ||
| 36 | + @Column(name = "APPID") | ||
| 37 | + private String AppId; | ||
| 38 | + | ||
| 39 | + | ||
| 35 | @ApiModelProperty(value = "进出口标志", name = "IEFlag", example = "固定值:E") | 40 | @ApiModelProperty(value = "进出口标志", name = "IEFlag", example = "固定值:E") |
| 36 | @Column(name = "IEFLAG") | 41 | @Column(name = "IEFLAG") |
| 37 | private String IEFlag; | 42 | private String IEFlag; | ... | ... |
| ... | @@ -31,6 +31,9 @@ public class MawbDetail implements Serializable { | ... | @@ -31,6 +31,9 @@ public class MawbDetail implements Serializable { |
| 31 | @Column(name="MAWBID") | 31 | @Column(name="MAWBID") |
| 32 | private Long MAWBID; | 32 | private Long MAWBID; |
| 33 | 33 | ||
| 34 | + @Column(name="DETAILID") | ||
| 35 | + private String detailId; | ||
| 36 | + | ||
| 34 | @ApiModelProperty(value = "商品编号", example = "空值") | 37 | @ApiModelProperty(value = "商品编号", example = "空值") |
| 35 | @Column(name = "CLASSMARK") | 38 | @Column(name = "CLASSMARK") |
| 36 | //JsonProperty("ClassMark") | 39 | //JsonProperty("ClassMark") | ... | ... |
| ... | @@ -233,6 +233,10 @@ public class ChmConsignmentDetail implements Serializable { | ... | @@ -233,6 +233,10 @@ public class ChmConsignmentDetail implements Serializable { |
| 233 | private String contentDescription; | 233 | private String contentDescription; |
| 234 | 234 | ||
| 235 | 235 | ||
| 236 | + @Column(name = "DETAILID") | ||
| 237 | + private String detailId; | ||
| 238 | + | ||
| 239 | + | ||
| 236 | //------------------------------------------------------------------------------------ | 240 | //------------------------------------------------------------------------------------ |
| 237 | /** | 241 | /** |
| 238 | * 备注 | 242 | * 备注 | ... | ... |
| ... | @@ -110,6 +110,7 @@ public class ChmConsignmentDetailService { | ... | @@ -110,6 +110,7 @@ public class ChmConsignmentDetailService { |
| 110 | result.setDomesticDestinationMapping(domesticDestinationDictionaryEntries); | 110 | result.setDomesticDestinationMapping(domesticDestinationDictionaryEntries); |
| 111 | result.setDomesticDestination(destinationCountryDictionaryEntries.getChineseName()); | 111 | result.setDomesticDestination(destinationCountryDictionaryEntries.getChineseName()); |
| 112 | 112 | ||
| 113 | + result.setDetailId(mawbDetail.getDetailId()); | ||
| 113 | 114 | ||
| 114 | }catch (Exception e){ | 115 | }catch (Exception e){ |
| 115 | log.error("convertToChmConsignmentDetail() error:"+e.getMessage()); | 116 | log.error("convertToChmConsignmentDetail() error:"+e.getMessage()); | ... | ... |
| ... | @@ -2,6 +2,7 @@ package com.erry.iclear.dateInterface.service; | ... | @@ -2,6 +2,7 @@ package com.erry.iclear.dateInterface.service; |
| 2 | 2 | ||
| 3 | import com.erry.iclear.dateInterface.api.request.Mawb; | 3 | import com.erry.iclear.dateInterface.api.request.Mawb; |
| 4 | import com.erry.iclear.dateInterface.api.request.MawbDetail; | 4 | import com.erry.iclear.dateInterface.api.request.MawbDetail; |
| 5 | +import com.erry.iclear.dateInterface.api.response.ResultRS; | ||
| 5 | import com.erry.iclear.dateInterface.repository.MawbDetailRepository; | 6 | import com.erry.iclear.dateInterface.repository.MawbDetailRepository; |
| 6 | import lombok.extern.slf4j.Slf4j; | 7 | import lombok.extern.slf4j.Slf4j; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | @@ -26,4 +27,20 @@ public class MawbDetailService { | ... | @@ -26,4 +27,20 @@ public class MawbDetailService { |
| 26 | 27 | ||
| 27 | } | 28 | } |
| 28 | 29 | ||
| 30 | + | ||
| 31 | + public ResultRS checkMawbDetail(Mawb mawb){ | ||
| 32 | + ResultRS result = new ResultRS(Boolean.FALSE,null,null); | ||
| 33 | + try{ | ||
| 34 | + | ||
| 35 | + | ||
| 36 | + | ||
| 37 | + result.setSuccess(Boolean.TRUE); | ||
| 38 | + }catch (Exception e){ | ||
| 39 | + log.error("checkMawbDetail() error:"+e.getMessage()); | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + return result; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + | ||
| 29 | } | 46 | } | ... | ... |
| 1 | package com.erry.iclear.dateInterface.service; | 1 | package com.erry.iclear.dateInterface.service; |
| 2 | 2 | ||
| 3 | import com.erry.iclear.dateInterface.api.request.Mawb; | 3 | import com.erry.iclear.dateInterface.api.request.Mawb; |
| 4 | +import com.erry.iclear.dateInterface.api.response.ResultRS; | ||
| 4 | import com.erry.iclear.dateInterface.repository.MawbRepository; | 5 | import com.erry.iclear.dateInterface.repository.MawbRepository; |
| 5 | import com.google.gson.Gson; | 6 | import com.google.gson.Gson; |
| 6 | import lombok.extern.slf4j.Slf4j; | 7 | import lombok.extern.slf4j.Slf4j; |
| ... | @@ -42,24 +43,22 @@ public class MawbService { | ... | @@ -42,24 +43,22 @@ public class MawbService { |
| 42 | * @param mawb | 43 | * @param mawb |
| 43 | * @return | 44 | * @return |
| 44 | */ | 45 | */ |
| 45 | - public Boolean checkMawb(Mawb mawb){ | 46 | + public ResultRS checkMawb(Mawb mawb){ |
| 46 | - | 47 | + ResultRS result = new ResultRS(Boolean.FALSE,null,null); |
| 47 | try{ | 48 | try{ |
| 48 | log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(mawb)); | 49 | log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(mawb)); |
| 49 | - boolean checkResult = Boolean.FALSE; | ||
| 50 | 50 | ||
| 51 | 51 | ||
| 52 | 52 | ||
| 53 | 53 | ||
| 54 | - //checkResult= | 54 | + result.setSuccess(Boolean.TRUE); |
| 55 | - log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(mawb) +" result :" +checkResult ); | 55 | + log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(mawb) +" result :" +result.getSuccess() ); |
| 56 | 56 | ||
| 57 | - return checkResult; | ||
| 58 | 57 | ||
| 59 | }catch (Exception e){ | 58 | }catch (Exception e){ |
| 60 | log.error("checkMawb() error:" + e.getMessage()); | 59 | log.error("checkMawb() error:" + e.getMessage()); |
| 61 | } | 60 | } |
| 62 | - return Boolean.FALSE; | 61 | + return result; |
| 63 | } | 62 | } |
| 64 | 63 | ||
| 65 | } | 64 | } | ... | ... |
| 1 | -package com.erry.iclear.dateInterface; | ||
| 2 | - | ||
| 3 | -import com.erry.iclear.dateInterface.api.request.Mawb; | ||
| 4 | -import com.erry.iclear.dateInterface.api.request.MawbDetail; | ||
| 5 | -import com.erry.iclear.dateInterface.api.response.ResultRS; | ||
| 6 | -import com.google.gson.Gson; | ||
| 7 | - | ||
| 8 | -import java.math.BigDecimal; | ||
| 9 | -import java.util.ArrayList; | ||
| 10 | -import java.util.List; | ||
| 11 | - | ||
| 12 | -public class ApiTest { | ||
| 13 | - | ||
| 14 | - | ||
| 15 | - public static void main(String[] args) { | ||
| 16 | - //{"IEFlag":"E","type":"EX","agentCode":"1111980005","agentName":"联邦快递(中国)有限公司","billNo":"202105210784","contrNo":"NO.565733","customMaster":"0101","cutMode":"101","declTrnRel":"0","distinatePort":"ASM000","ediId":"001","entryId":"25512456","feeCurr":"USD","feeMark":"3","feeRate":100.58,"grossWet":500,"IEPort":"0101","inputerName":"","insurCurr":"MOP","insurMark":"3","insurRate":23.44,"manualNo":"备案号","netWt":80,"otherCurr":"USD","otherRate":10,"otherMark":"","ownerCode":"Z321654987","ownerName":"上海保险","packNo":1,"preEntryId":"","tradeCountry":"US","tradeMode":"110","tradeCode":"Z321654987","trafMode":"1","tradeName":"上海铢怡国际货物运输代理有限公司","transMode":"3","wrapType":"22","tradeCodeScc":"A74125896321456987","ownerCodeScc":"A74125896321456987","tradeAreaCode":"US","markNo":"N/M","entyPortCode":"310302","goodsPlace":"","declareName":"张安","overseasConsignorCode":"Z785421","overseasConsigneeCode":"Z785421","overseasConsigneeEname":"出口时必填收件人公司名(原)","mawbDetailList":[{"classMark":"","codeTS":"69125472","declPrice":111.123,"declTotal":788,"dutyMode":"1","exgNo":"","exgVersion":"","firstUnit":"035","firstQty":11,"gunit":"007","gmodel":"商品规格、型号","gname":"餐桌","gno":"1","gqty":1.88,"originCountry":"US","secondUnit":"007","secondQty":2,"tradeCurr":"USD","useTo":"","ciqCode":"","destinationCountry":"CN","declGoodsEname":"","destCode":"","districtCode":"4408W"},{"classMark":"","codeTS":"69125472","declPrice":45.72,"declTotal":33,"dutyMode":"1","exgNo":"","exgVersion":"","firstUnit":"035","firstQty":11,"gunit":"007","gmodel":"商品规格、型号","gname":"餐桌","gno":"2","gqty":22.88,"originCountry":"US","secondUnit":"007","secondQty":3,"tradeCurr":"USD","useTo":"","ciqCode":"","destinationCountry":"CN","declGoodsEname":"","destCode":"","districtCode":"4408W"}]} | ||
| 17 | - | ||
| 18 | - | ||
| 19 | - MawbDetail d1 = new MawbDetail(); | ||
| 20 | - d1.setClassMark(""); | ||
| 21 | - d1.setCodeTS("69125472"); | ||
| 22 | - d1.setDeclPrice(BigDecimal.valueOf(111.123)); | ||
| 23 | - d1.setDeclTotal(BigDecimal.valueOf(788)); | ||
| 24 | - d1.setDutyMode("1"); | ||
| 25 | - d1.setExgNo(""); | ||
| 26 | - d1.setExgVersion(""); | ||
| 27 | - d1.setFirstUnit("035"); | ||
| 28 | - d1.setFirstQty(11); | ||
| 29 | - d1.setGunit("007"); | ||
| 30 | - d1.setGmodel("商品规格、型号"); | ||
| 31 | - d1.setGname("餐桌"); | ||
| 32 | - d1.setGno("1"); | ||
| 33 | - d1.setGqty(BigDecimal.valueOf(1.88)); | ||
| 34 | - d1.setOriginCountry("US"); | ||
| 35 | - d1.setSecondUnit("007"); | ||
| 36 | - d1.setSecondQty(2); | ||
| 37 | - d1.setTradeCurr("USD"); | ||
| 38 | - d1.setUseTo(""); | ||
| 39 | - d1.setWorkUsd(null); | ||
| 40 | - d1.setDestinationCountry("CN"); | ||
| 41 | - d1.setCiqCode(""); | ||
| 42 | - d1.setDeclGoodsEname(""); | ||
| 43 | - d1.setDestCode(""); | ||
| 44 | - d1.setDistrictCode("4408W"); | ||
| 45 | - | ||
| 46 | - | ||
| 47 | - MawbDetail d2 = new MawbDetail(); | ||
| 48 | - d2.setClassMark(""); | ||
| 49 | - d2.setCodeTS("69125472"); | ||
| 50 | - d2.setDeclPrice(BigDecimal.valueOf(45.72)); | ||
| 51 | - d2.setDeclTotal(BigDecimal.valueOf(33)); | ||
| 52 | - d2.setDutyMode("1"); | ||
| 53 | - d2.setExgNo(""); | ||
| 54 | - d2.setExgVersion(""); | ||
| 55 | - d2.setFirstUnit("035"); | ||
| 56 | - d2.setFirstQty(11); | ||
| 57 | - d2.setGunit("007"); | ||
| 58 | - d2.setGmodel("商品规格、型号"); | ||
| 59 | - d2.setGname("餐桌"); | ||
| 60 | - d2.setGno("2"); | ||
| 61 | - d2.setGqty(BigDecimal.valueOf(22.88)); | ||
| 62 | - d2.setOriginCountry("US"); | ||
| 63 | - d2.setSecondUnit("007"); | ||
| 64 | - d2.setSecondQty(3); | ||
| 65 | - d2.setTradeCurr("USD"); | ||
| 66 | - d2.setUseTo(""); | ||
| 67 | - d2.setWorkUsd(null); | ||
| 68 | - d2.setDestinationCountry("CN"); | ||
| 69 | - d2.setCiqCode(""); | ||
| 70 | - d2.setDeclGoodsEname(""); | ||
| 71 | - d2.setDestCode(""); | ||
| 72 | - d2.setDistrictCode("4408W"); | ||
| 73 | - | ||
| 74 | - | ||
| 75 | - | ||
| 76 | - List<MawbDetail> mawbDetailList = new ArrayList<MawbDetail>(); | ||
| 77 | - mawbDetailList.add(d1); | ||
| 78 | - mawbDetailList.add(d2); | ||
| 79 | - | ||
| 80 | - | ||
| 81 | - | ||
| 82 | - | ||
| 83 | - Mawb mawb = new Mawb(); | ||
| 84 | - mawb.setIEFlag("E"); | ||
| 85 | - mawb.setType("EX"); | ||
| 86 | - mawb.setAgentCode("1111980005"); | ||
| 87 | - mawb.setAgentName("联邦快递(中国)有限公司"); | ||
| 88 | - mawb.setBillNo("202105210784"); | ||
| 89 | - mawb.setContrNo("NO.565733"); | ||
| 90 | - mawb.setCustomMaster("0101"); | ||
| 91 | - mawb.setCutMode("101"); | ||
| 92 | - mawb.setDeclTrnRel("0"); | ||
| 93 | - mawb.setDistinatePort("ASM000"); | ||
| 94 | - mawb.setEdiId("001"); | ||
| 95 | - mawb.setEntryId("25512456"); | ||
| 96 | - mawb.setFeeCurr("USD"); | ||
| 97 | - mawb.setFeeMark("3"); | ||
| 98 | - mawb.setFeeRate(BigDecimal.valueOf(100.58)); | ||
| 99 | - mawb.setGrossWet(500); | ||
| 100 | - mawb.setIEPort("0101"); | ||
| 101 | - mawb.setInputerName(""); | ||
| 102 | - mawb.setInsurCurr("MOP"); | ||
| 103 | - mawb.setInsurMark("3"); | ||
| 104 | - mawb.setInsurRate(BigDecimal.valueOf(23.44)); | ||
| 105 | - mawb.setManualNo("备案号"); | ||
| 106 | - mawb.setNetWt(BigDecimal.valueOf(80)); | ||
| 107 | - mawb.setOtherCurr("USD"); | ||
| 108 | - mawb.setOtherRate(BigDecimal.valueOf(10)); | ||
| 109 | - mawb.setOtherMark(""); | ||
| 110 | - mawb.setOwnerCode("Z321654987"); | ||
| 111 | - mawb.setOwnerName("上海保险"); | ||
| 112 | - mawb.setPackNo(1); | ||
| 113 | - mawb.setPreEntryId(""); | ||
| 114 | - mawb.setTradeCountry("US"); | ||
| 115 | - mawb.setTradeMode("110"); | ||
| 116 | - mawb.setTradeCode("Z321654987"); | ||
| 117 | - mawb.setTrafMode("1"); | ||
| 118 | - mawb.setTradeName("上海铢怡国际货物运输代理有限公司"); | ||
| 119 | - mawb.setTransMode("3"); | ||
| 120 | - mawb.setWrapType("22"); | ||
| 121 | - mawb.setTradeCodeScc("A74125896321456987"); | ||
| 122 | - mawb.setOwnerCodeScc("A74125896321456987"); | ||
| 123 | - mawb.setTradeAreaCode("US"); | ||
| 124 | - mawb.setMarkNo("N/M"); | ||
| 125 | - mawb.setEntyPortCode("310302"); | ||
| 126 | - mawb.setGoodsPlace(""); | ||
| 127 | - mawb.setDeclareName("张安"); | ||
| 128 | - mawb.setOverseasConsignorCode("Z785421"); | ||
| 129 | - mawb.setOverseasConsigneeCode("Z785421"); | ||
| 130 | - mawb.setOverseasConsigneeEname("出口时必填收件人公司名(原)"); | ||
| 131 | - mawb.setMawbDetailList(mawbDetailList); | ||
| 132 | - | ||
| 133 | - | ||
| 134 | - | ||
| 135 | - | ||
| 136 | - | ||
| 137 | -// List list=(List<MawbDetail>) mawb.getMawbDetailList(); | ||
| 138 | -// list.forEach(d->{ | ||
| 139 | -// System.out.println(d.toString()); | ||
| 140 | -// }); | ||
| 141 | - | ||
| 142 | - | ||
| 143 | - | ||
| 144 | - ResultRS rs = new ResultRS(true,"200","操作成功"); | ||
| 145 | - | ||
| 146 | - | ||
| 147 | - Gson gson = new Gson(); | ||
| 148 | - System.out.println(gson.toJson(mawb)); | ||
| 149 | - | ||
| 150 | - System.out.println(gson.toJson(rs)); | ||
| 151 | - | ||
| 152 | - | ||
| 153 | - | ||
| 154 | - | ||
| 155 | - | ||
| 156 | - | ||
| 157 | - | ||
| 158 | - } | ||
| 159 | -} |
| ... | @@ -23,8 +23,8 @@ public class HttpClientTest { | ... | @@ -23,8 +23,8 @@ public class HttpClientTest { |
| 23 | // System.out.println(HttpClientUtil.get(HttpConfig.custom().url("https://40.73.78.157:8780/system/healthCheck"))); | 23 | // System.out.println(HttpClientUtil.get(HttpConfig.custom().url("https://40.73.78.157:8780/system/healthCheck"))); |
| 24 | // System.out.println(HttpClientUtil.post(HttpConfig.custom().url("https://40.73.78.157:8780/customs/sendMawb"))); | 24 | // System.out.println(HttpClientUtil.post(HttpConfig.custom().url("https://40.73.78.157:8780/customs/sendMawb"))); |
| 25 | 25 | ||
| 26 | - //String timeStamp = "1623920478192"; | 26 | + String timeStamp = "1623920478192"; |
| 27 | - String timeStamp = "1624263798669"; | 27 | + //String timeStamp = "1624263798669"; |
| 28 | System.out.println(new Date(Long.valueOf(timeStamp))); | 28 | System.out.println(new Date(Long.valueOf(timeStamp))); |
| 29 | String token = SHA256Util.getSHA256String("IDE" + "iClearExport" + "b92131f03f19a348" + timeStamp); | 29 | String token = SHA256Util.getSHA256String("IDE" + "iClearExport" + "b92131f03f19a348" + timeStamp); |
| 30 | System.out.println(token); | 30 | System.out.println(token); |
| ... | @@ -43,7 +43,7 @@ public class HttpClientTest { | ... | @@ -43,7 +43,7 @@ public class HttpClientTest { |
| 43 | .pool(100, 10) | 43 | .pool(100, 10) |
| 44 | .sslpv(SSLs.SSLProtocolVersion.TLSv1_2) | 44 | .sslpv(SSLs.SSLProtocolVersion.TLSv1_2) |
| 45 | .ssl() | 45 | .ssl() |
| 46 | - .retry(5); | 46 | + .retry(3); |
| 47 | 47 | ||
| 48 | // String url = "https://40.73.78.157:8780/customs/sendMawb"; | 48 | // String url = "https://40.73.78.157:8780/customs/sendMawb"; |
| 49 | String url = "https://192.168.1.75:8780/customs/sendMawb"; | 49 | String url = "https://192.168.1.75:8780/customs/sendMawb"; |
| ... | @@ -58,8 +58,8 @@ public class HttpClientTest { | ... | @@ -58,8 +58,8 @@ public class HttpClientTest { |
| 58 | 58 | ||
| 59 | 59 | ||
| 60 | public static Mawb createMawb() { | 60 | public static Mawb createMawb() { |
| 61 | - | ||
| 62 | MawbDetail d1 = new MawbDetail(); | 61 | MawbDetail d1 = new MawbDetail(); |
| 62 | + d1.setDetailId("202105210784-1"); | ||
| 63 | d1.setClassMark(""); | 63 | d1.setClassMark(""); |
| 64 | d1.setCodeTS("69125472"); | 64 | d1.setCodeTS("69125472"); |
| 65 | d1.setDeclPrice(BigDecimal.valueOf(111.123)); | 65 | d1.setDeclPrice(BigDecimal.valueOf(111.123)); |
| ... | @@ -71,9 +71,9 @@ public class HttpClientTest { | ... | @@ -71,9 +71,9 @@ public class HttpClientTest { |
| 71 | d1.setFirstQty(11); | 71 | d1.setFirstQty(11); |
| 72 | d1.setGunit("007"); | 72 | d1.setGunit("007"); |
| 73 | d1.setGmodel("商品规格、型号"); | 73 | d1.setGmodel("商品规格、型号"); |
| 74 | - d1.setGname("餐桌2"); | 74 | + d1.setGname("餐桌"); |
| 75 | d1.setGno("1"); | 75 | d1.setGno("1"); |
| 76 | - d1.setGqty(BigDecimal.valueOf(15.88)); | 76 | + d1.setGqty(BigDecimal.valueOf(1.88)); |
| 77 | d1.setOriginCountry("US"); | 77 | d1.setOriginCountry("US"); |
| 78 | d1.setSecondUnit("007"); | 78 | d1.setSecondUnit("007"); |
| 79 | d1.setSecondQty(2); | 79 | d1.setSecondQty(2); |
| ... | @@ -88,6 +88,7 @@ public class HttpClientTest { | ... | @@ -88,6 +88,7 @@ public class HttpClientTest { |
| 88 | 88 | ||
| 89 | 89 | ||
| 90 | MawbDetail d2 = new MawbDetail(); | 90 | MawbDetail d2 = new MawbDetail(); |
| 91 | + d2.setDetailId("202105210784-2"); | ||
| 91 | d2.setClassMark(""); | 92 | d2.setClassMark(""); |
| 92 | d2.setCodeTS("69125472"); | 93 | d2.setCodeTS("69125472"); |
| 93 | d2.setDeclPrice(BigDecimal.valueOf(45.72)); | 94 | d2.setDeclPrice(BigDecimal.valueOf(45.72)); |
| ... | @@ -99,9 +100,9 @@ public class HttpClientTest { | ... | @@ -99,9 +100,9 @@ public class HttpClientTest { |
| 99 | d2.setFirstQty(11); | 100 | d2.setFirstQty(11); |
| 100 | d2.setGunit("007"); | 101 | d2.setGunit("007"); |
| 101 | d2.setGmodel("商品规格、型号"); | 102 | d2.setGmodel("商品规格、型号"); |
| 102 | - d2.setGname("餐桌3"); | 103 | + d2.setGname("餐桌"); |
| 103 | d2.setGno("2"); | 104 | d2.setGno("2"); |
| 104 | - d2.setGqty(BigDecimal.valueOf(42.88)); | 105 | + d2.setGqty(BigDecimal.valueOf(22.88)); |
| 105 | d2.setOriginCountry("US"); | 106 | d2.setOriginCountry("US"); |
| 106 | d2.setSecondUnit("007"); | 107 | d2.setSecondUnit("007"); |
| 107 | d2.setSecondQty(3); | 108 | d2.setSecondQty(3); |
| ... | @@ -115,11 +116,14 @@ public class HttpClientTest { | ... | @@ -115,11 +116,14 @@ public class HttpClientTest { |
| 115 | d2.setDistrictCode("4408W"); | 116 | d2.setDistrictCode("4408W"); |
| 116 | 117 | ||
| 117 | 118 | ||
| 119 | + | ||
| 118 | List<MawbDetail> mawbDetailList = new ArrayList<MawbDetail>(); | 120 | List<MawbDetail> mawbDetailList = new ArrayList<MawbDetail>(); |
| 119 | mawbDetailList.add(d1); | 121 | mawbDetailList.add(d1); |
| 120 | mawbDetailList.add(d2); | 122 | mawbDetailList.add(d2); |
| 121 | 123 | ||
| 122 | 124 | ||
| 125 | + | ||
| 126 | + | ||
| 123 | Mawb mawb = new Mawb(); | 127 | Mawb mawb = new Mawb(); |
| 124 | mawb.setIEFlag("E"); | 128 | mawb.setIEFlag("E"); |
| 125 | mawb.setType("EX"); | 129 | mawb.setType("EX"); | ... | ... |
-
Please register or login to post a comment