Showing
7 changed files
with
253 additions
and
49 deletions
sql/BASF校验接口.sql
0 → 100644
File mode changed
| ... | @@ -12,7 +12,9 @@ import com.erry.iclear.dateInterface.api.response.ResultRS; | ... | @@ -12,7 +12,9 @@ import com.erry.iclear.dateInterface.api.response.ResultRS; |
| 12 | import com.erry.iclear.dateInterface.entity.ChmConsignment; | 12 | import com.erry.iclear.dateInterface.entity.ChmConsignment; |
| 13 | import com.erry.iclear.dateInterface.entity.DeclaredInfo; | 13 | import com.erry.iclear.dateInterface.entity.DeclaredInfo; |
| 14 | import com.erry.iclear.dateInterface.entity.IClearApiLog; | 14 | import com.erry.iclear.dateInterface.entity.IClearApiLog; |
| 15 | +import com.erry.iclear.dateInterface.entity.TIClearApiCheckLog; | ||
| 15 | import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; | 16 | import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository; |
| 17 | +import com.erry.iclear.dateInterface.repository.IClearApiCheckLogRepository; | ||
| 16 | import com.erry.iclear.dateInterface.service.*; | 18 | import com.erry.iclear.dateInterface.service.*; |
| 17 | import com.erry.iclear.dateInterface.util.JsonToJava; | 19 | import com.erry.iclear.dateInterface.util.JsonToJava; |
| 18 | import com.erry.iclear.dateInterface.util.StringUtil; | 20 | import com.erry.iclear.dateInterface.util.StringUtil; |
| ... | @@ -58,10 +60,73 @@ public class FedexDataInterface { | ... | @@ -58,10 +60,73 @@ public class FedexDataInterface { |
| 58 | @Autowired | 60 | @Autowired |
| 59 | private ChmConsignmentRepository chmConsignmentRepository; | 61 | private ChmConsignmentRepository chmConsignmentRepository; |
| 60 | 62 | ||
| 63 | + @Autowired | ||
| 64 | + private IClearApiCheckLogRepository iClearApiCheckLogRepository; | ||
| 65 | + | ||
| 61 | @Value("${api.address.iclear-submit-url}") | 66 | @Value("${api.address.iclear-submit-url}") |
| 62 | String iclearCSubmitUrl; | 67 | String iclearCSubmitUrl; |
| 63 | 68 | ||
| 64 | 69 | ||
| 70 | + @ApiOperation(value = "BASF运单数据校验接口", httpMethod = "POST", notes = "ex: http://192.168.1.75:8080/fedex/checkBASFMawbFedex") | ||
| 71 | + @PostMapping("/checkBASFMawbFedex") | ||
| 72 | + @ResponseBody | ||
| 73 | + public ResultRS checkBASFMawbFedex(HttpServletRequest request | ||
| 74 | + ,@RequestBody Fedexc fedexc) throws HttpProcessException { | ||
| 75 | + String appId=(String) request.getHeader("Appid"); | ||
| 76 | + String appKey=(String) request.getHeader("Appkey"); | ||
| 77 | + String timeStamp=(String) request.getHeader("TimeStamp"); | ||
| 78 | + String token=(String) request.getHeader("Token"); | ||
| 79 | + String addr = request.getRemoteAddr(); | ||
| 80 | + | ||
| 81 | + | ||
| 82 | + TIClearApiCheckLog tIclearApiCheckLog = new TIClearApiCheckLog(); | ||
| 83 | + tIclearApiCheckLog.setRequestAppid(appId); | ||
| 84 | + tIclearApiCheckLog.setRequestAppkey(appKey); | ||
| 85 | + tIclearApiCheckLog.setRequestIp(addr); | ||
| 86 | + tIclearApiCheckLog.setRequestToken(token); | ||
| 87 | + tIclearApiCheckLog.setConsignmentCode(fedexc.getConsignmentCode()); | ||
| 88 | + tIclearApiCheckLog.setCreateTime(new Date()); | ||
| 89 | + tIclearApiCheckLog.setRequestText( | ||
| 90 | + new String("appId:"+appId+"," + | ||
| 91 | + "appKey:"+appKey+"," + | ||
| 92 | + "timeStamp:"+timeStamp+"," + | ||
| 93 | + "token:"+token) + "," | ||
| 94 | + + fedexc.toString() | ||
| 95 | + ); | ||
| 96 | + TIClearApiCheckLog tiClearApiCheckLogSave = iClearApiCheckLogRepository.save(tIclearApiCheckLog); | ||
| 97 | + log.info("checkBASFMawbFedex:"+fedexc.toString()); | ||
| 98 | + log.info("appId:{},appKey:{},timeStamp:{},token:{}",appId,appKey,timeStamp,token); | ||
| 99 | + | ||
| 100 | + ResultRS result = fedexService.checkBasfInterfaceData(fedexc); | ||
| 101 | + | ||
| 102 | + StopWatch sw = new StopWatch("checkBASFMawbFedex"); | ||
| 103 | + sw.start("generate FedexMawb"); | ||
| 104 | + fedexc.setAppId(appId); | ||
| 105 | + FedexMawb saveMawbFedexResult = fedexService.generateFedexMawb(fedexc); | ||
| 106 | + sw.stop(); | ||
| 107 | + | ||
| 108 | + sw.start("checkFedexMawb"); | ||
| 109 | + String msg = result.getMsg(); | ||
| 110 | + String iclearCheckMsg = fedexService.checkFedexMawb(saveMawbFedexResult).getMsg(); | ||
| 111 | + result.setMsg(msg+";"+iclearCheckMsg); | ||
| 112 | + sw.stop(); | ||
| 113 | + | ||
| 114 | + log.info(sw.prettyPrint()); | ||
| 115 | + if(result.getSuccess()){ | ||
| 116 | + result.setSuccess(Boolean.TRUE); | ||
| 117 | + result.setCode("0"); | ||
| 118 | + } | ||
| 119 | + tiClearApiCheckLogSave.setResponseText(result.getMsg()); | ||
| 120 | + tiClearApiCheckLogSave.setCode(result.getCode()); | ||
| 121 | + tiClearApiCheckLogSave.setSuccess(result.getSuccess()); | ||
| 122 | + | ||
| 123 | + iClearApiCheckLogRepository.save(tiClearApiCheckLogSave); | ||
| 124 | + log.info(result.toString()); | ||
| 125 | + return result; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + | ||
| 129 | + | ||
| 65 | @ApiOperation(value = "Fedex推送运单数据", httpMethod = "POST", notes = "ex: http://192.168.1.75:8080/fedex/sendMawbFedex") | 130 | @ApiOperation(value = "Fedex推送运单数据", httpMethod = "POST", notes = "ex: http://192.168.1.75:8080/fedex/sendMawbFedex") |
| 66 | @PostMapping("/sendMawbFedex") | 131 | @PostMapping("/sendMawbFedex") |
| 67 | @ResponseBody | 132 | @ResponseBody |
| ... | @@ -283,4 +348,5 @@ public class FedexDataInterface { | ... | @@ -283,4 +348,5 @@ public class FedexDataInterface { |
| 283 | result.setCode("0"); | 348 | result.setCode("0"); |
| 284 | return result; | 349 | return result; |
| 285 | } | 350 | } |
| 351 | + | ||
| 286 | } | 352 | } | ... | ... |
| 1 | +package com.erry.iclear.dateInterface.entity; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.erry.iclear.dateInterface.common.BaseModel; | ||
| 5 | +import lombok.Data; | ||
| 6 | + | ||
| 7 | +import javax.persistence.*; | ||
| 8 | +import java.util.Date; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * BASF校验接口日志表 | ||
| 12 | + */ | ||
| 13 | +@Entity | ||
| 14 | +@Table(name = "T_ICLEAR_API_CHECK_LOG") | ||
| 15 | +@Data | ||
| 16 | +public class TIClearApiCheckLog extends BaseModel { | ||
| 17 | + | ||
| 18 | + @Id | ||
| 19 | + @GeneratedValue | ||
| 20 | + @Column(name = "ID" ) | ||
| 21 | + private Long id; | ||
| 22 | + | ||
| 23 | + @Column(name = "request_appid" ) | ||
| 24 | + private String requestAppid; | ||
| 25 | + | ||
| 26 | + @Column(name = "request_appkey" ) | ||
| 27 | + private String requestAppkey; | ||
| 28 | + | ||
| 29 | + @Column(name = "request_token" ) | ||
| 30 | + private String requestToken; | ||
| 31 | + | ||
| 32 | + @Column(name = "consignment_code" ) | ||
| 33 | + private String consignmentCode; | ||
| 34 | + | ||
| 35 | + @Column(name = "request_text" ) | ||
| 36 | + private String requestText; | ||
| 37 | + | ||
| 38 | + @Column(name = "response_text" ) | ||
| 39 | + private String responseText; | ||
| 40 | + | ||
| 41 | + @Column(name = "request_ip" ) | ||
| 42 | + private String requestIp; | ||
| 43 | + | ||
| 44 | + @Column(name = "create_time" ) | ||
| 45 | + private Date createTime; | ||
| 46 | + | ||
| 47 | + @Column(name = "success" ) | ||
| 48 | + private Boolean success; | ||
| 49 | + | ||
| 50 | + @Column(name = "code" ) | ||
| 51 | + private String code; | ||
| 52 | + | ||
| 53 | +} |
| 1 | +package com.erry.iclear.dateInterface.repository; | ||
| 2 | + | ||
| 3 | +import com.erry.iclear.dateInterface.entity.IClearApiLog; | ||
| 4 | +import com.erry.iclear.dateInterface.entity.TIClearApiCheckLog; | ||
| 5 | +import org.hibernate.annotations.DynamicInsert; | ||
| 6 | +import org.hibernate.annotations.DynamicUpdate; | ||
| 7 | +import org.springframework.data.jpa.repository.JpaRepository; | ||
| 8 | +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | ||
| 9 | +import org.springframework.stereotype.Repository; | ||
| 10 | +import org.springframework.transaction.annotation.Transactional; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * @author Administrator | ||
| 14 | + */ | ||
| 15 | +@DynamicUpdate | ||
| 16 | +@DynamicInsert | ||
| 17 | +@Repository | ||
| 18 | +@Transactional(rollbackFor = Exception.class) | ||
| 19 | +public interface IClearApiCheckLogRepository extends JpaRepository<TIClearApiCheckLog, Integer>, JpaSpecificationExecutor<TIClearApiCheckLog> { | ||
| 20 | + | ||
| 21 | + | ||
| 22 | +} |
| ... | @@ -11,15 +11,22 @@ import com.erry.iclear.dateInterface.entity.ChmConsignmentDetail; | ... | @@ -11,15 +11,22 @@ import com.erry.iclear.dateInterface.entity.ChmConsignmentDetail; |
| 11 | import com.erry.iclear.dateInterface.repository.FedexMawbRepository; | 11 | import com.erry.iclear.dateInterface.repository.FedexMawbRepository; |
| 12 | import com.erry.iclear.dateInterface.util.JsonToJava; | 12 | import com.erry.iclear.dateInterface.util.JsonToJava; |
| 13 | import com.google.gson.Gson; | 13 | import com.google.gson.Gson; |
| 14 | +import io.swagger.annotations.ApiModelProperty; | ||
| 14 | import lombok.extern.slf4j.Slf4j; | 15 | import lombok.extern.slf4j.Slf4j; |
| 16 | +import org.apache.commons.lang3.StringUtils; | ||
| 15 | import org.apache.http.Header; | 17 | import org.apache.http.Header; |
| 16 | import org.springframework.beans.factory.annotation.Autowired; | 18 | import org.springframework.beans.factory.annotation.Autowired; |
| 17 | import org.springframework.beans.factory.annotation.Value; | 19 | import org.springframework.beans.factory.annotation.Value; |
| 18 | import org.springframework.stereotype.Service; | 20 | import org.springframework.stereotype.Service; |
| 19 | 21 | ||
| 22 | +import javax.persistence.*; | ||
| 23 | +import javax.validation.Valid; | ||
| 24 | +import javax.validation.constraints.NotBlank; | ||
| 25 | +import javax.validation.constraints.NotNull; | ||
| 20 | import java.util.ArrayList; | 26 | import java.util.ArrayList; |
| 21 | import java.util.List; | 27 | import java.util.List; |
| 22 | import java.util.Objects; | 28 | import java.util.Objects; |
| 29 | +import java.util.stream.Collectors; | ||
| 23 | 30 | ||
| 24 | /** | 31 | /** |
| 25 | * @author Administrator | 32 | * @author Administrator |
| ... | @@ -50,51 +57,7 @@ public class FedexService { | ... | @@ -50,51 +57,7 @@ public class FedexService { |
| 50 | FedexMawb result=null; | 57 | FedexMawb result=null; |
| 51 | try{ | 58 | try{ |
| 52 | log.info("saveMawb start>>>>>>>>>>>"); | 59 | log.info("saveMawb start>>>>>>>>>>>"); |
| 53 | - //运单头部信息 | 60 | + FedexMawb fedexMawb = this.generateFedexMawb(fedexc); |
| 54 | - FedexMawb fedexMawb = new FedexMawb(); | ||
| 55 | - fedexMawb.setAppId(fedexc.getAppId()); | ||
| 56 | - fedexMawb.setMsgId(fedexc.getMsgId()); | ||
| 57 | - fedexMawb.setConsignmentCodeId(fedexc.getConsignmentId()); | ||
| 58 | - fedexMawb.setType(fedexc.getConsType()); | ||
| 59 | - //TODO 记录时为同一张表,用 '-->' 记录具体存放字段(方便查看,以免误解) | ||
| 60 | - //运单号-->提单号 | ||
| 61 | - fedexMawb.setBillNo(fedexc.getConsignmentCode()); | ||
| 62 | - //经营单位 --> 消费使用/生产销售单位名称 | ||
| 63 | - fedexMawb.setOwnerName(fedexc.getOperateUnitName()); | ||
| 64 | - //经营单位海关编码 --> 消费使用/生产销售单位代码 | ||
| 65 | - fedexMawb.setOwnerCode(fedexc.getOperateUnitCode()); | ||
| 66 | - //经营单位社会信用证代码 --> 消费使用/生产销售单位单位统一编码 | ||
| 67 | - fedexMawb.setOwnerCodeScc(fedexc.getOperateSCC()); | ||
| 68 | - //发件人 --> 境内收发货人名称 | ||
| 69 | - fedexMawb.setTradeName(fedexc.getSender()); | ||
| 70 | - //发件人海关编码 --> 境内收发货人编号 | ||
| 71 | - fedexMawb.setTradeCode(fedexc.getShipperCustomsCode()); | ||
| 72 | - //发件人社会信用证代码 --> 生产核销单位统一信用代码---报关形式类型 | ||
| 73 | - fedexMawb.setTradeCodeScc(fedexc.getShipperSCC()); | ||
| 74 | - | ||
| 75 | - fedexMawb.setEanNo(fedexc.getEanNo()); | ||
| 76 | - //明细 | ||
| 77 | - List<FedexMawbDetail> mawbDetailList = new ArrayList<>(); | ||
| 78 | - if (fedexc.getConsignmentList().size()>0){ | ||
| 79 | - for (FedexDetail fedexcDetail : fedexc.getConsignmentList()){ | ||
| 80 | - FedexMawbDetail mawbDetail = new FedexMawbDetail(); | ||
| 81 | - mawbDetail.setDetailId(String.valueOf(fedexcDetail.getConsignmentDetailId())); | ||
| 82 | - mawbDetail.setGmodel(fedexcDetail.getModel()); | ||
| 83 | - mawbDetail.setCodeTS(fedexcDetail.getSkuCode()); | ||
| 84 | - mawbDetail.setGname(fedexcDetail.getSkuName()); | ||
| 85 | - mawbDetail.setGqty(fedexcDetail.getKnockdownNumber()); | ||
| 86 | - mawbDetail.setGunit(fedexcDetail.getKnockdownUnit()); | ||
| 87 | - mawbDetail.setFirstUnit(fedexcDetail.getUnitLegalFirst()); | ||
| 88 | - mawbDetail.setFirstQty(fedexcDetail.getQtyLegalFirst()); | ||
| 89 | - mawbDetail.setSecondQty(fedexcDetail.getQtyLegalSecond()); | ||
| 90 | - mawbDetail.setSecondUnit(fedexcDetail.getUnitLegalSecond()); | ||
| 91 | - mawbDetail.setDeclTotal(fedexcDetail.getDeclaredAmount()); | ||
| 92 | - mawbDetail.setTradeCurr(fedexcDetail.getCurrency()); | ||
| 93 | - mawbDetail.setDeclaredWeight(fedexcDetail.getDeclaredWeight()); | ||
| 94 | - mawbDetailList.add(mawbDetail); | ||
| 95 | - } | ||
| 96 | - } | ||
| 97 | - fedexMawb.setMawbDetailList(mawbDetailList); | ||
| 98 | result = fedexMawbRepository.save(fedexMawb); | 61 | result = fedexMawbRepository.save(fedexMawb); |
| 99 | log.info("saveMawb end>>>>>>>>>>>"); | 62 | log.info("saveMawb end>>>>>>>>>>>"); |
| 100 | }catch (Exception e){ | 63 | }catch (Exception e){ |
| ... | @@ -103,6 +66,57 @@ public class FedexService { | ... | @@ -103,6 +66,57 @@ public class FedexService { |
| 103 | return result; | 66 | return result; |
| 104 | } | 67 | } |
| 105 | 68 | ||
| 69 | + public FedexMawb generateFedexMawb(Fedexc fedexc){ | ||
| 70 | + //运单头部信息 | ||
| 71 | + FedexMawb fedexMawb = new FedexMawb(); | ||
| 72 | + fedexMawb.setAppId(fedexc.getAppId()); | ||
| 73 | + fedexMawb.setMsgId(fedexc.getMsgId()); | ||
| 74 | + fedexMawb.setConsignmentCodeId(fedexc.getConsignmentId()); | ||
| 75 | + fedexMawb.setType(fedexc.getConsType()); | ||
| 76 | + //TODO 记录时为同一张表,用 '-->' 记录具体存放字段(方便查看,以免误解) | ||
| 77 | + //运单号-->提单号 | ||
| 78 | + fedexMawb.setBillNo(fedexc.getConsignmentCode()); | ||
| 79 | + //经营单位 --> 消费使用/生产销售单位名称 | ||
| 80 | + fedexMawb.setOwnerName(fedexc.getOperateUnitName()); | ||
| 81 | + //经营单位海关编码 --> 消费使用/生产销售单位代码 | ||
| 82 | + fedexMawb.setOwnerCode(fedexc.getOperateUnitCode()); | ||
| 83 | + //经营单位社会信用证代码 --> 消费使用/生产销售单位单位统一编码 | ||
| 84 | + fedexMawb.setOwnerCodeScc(fedexc.getOperateSCC()); | ||
| 85 | + //发件人 --> 境内收发货人名称 | ||
| 86 | + fedexMawb.setTradeName(fedexc.getSender()); | ||
| 87 | + //发件人海关编码 --> 境内收发货人编号 | ||
| 88 | + fedexMawb.setTradeCode(fedexc.getShipperCustomsCode()); | ||
| 89 | + //发件人社会信用证代码 --> 生产核销单位统一信用代码---报关形式类型 | ||
| 90 | + fedexMawb.setTradeCodeScc(fedexc.getShipperSCC()); | ||
| 91 | + | ||
| 92 | + fedexMawb.setEanNo(fedexc.getEanNo()); | ||
| 93 | + //明细 | ||
| 94 | + List<FedexMawbDetail> mawbDetailList = new ArrayList<>(); | ||
| 95 | + List<FedexDetail> consignmentList = fedexc.getConsignmentList(); | ||
| 96 | + if (Objects.nonNull(consignmentList) &&consignmentList.size()>0){ | ||
| 97 | + for (FedexDetail fedexcDetail : fedexc.getConsignmentList()){ | ||
| 98 | + FedexMawbDetail mawbDetail = new FedexMawbDetail(); | ||
| 99 | + mawbDetail.setDetailId(String.valueOf(fedexcDetail.getConsignmentDetailId())); | ||
| 100 | + mawbDetail.setGmodel(fedexcDetail.getModel()); | ||
| 101 | + mawbDetail.setCodeTS(fedexcDetail.getSkuCode()); | ||
| 102 | + mawbDetail.setGname(fedexcDetail.getSkuName()); | ||
| 103 | + mawbDetail.setGqty(fedexcDetail.getKnockdownNumber()); | ||
| 104 | + mawbDetail.setGunit(fedexcDetail.getKnockdownUnit()); | ||
| 105 | + mawbDetail.setFirstUnit(fedexcDetail.getUnitLegalFirst()); | ||
| 106 | + mawbDetail.setFirstQty(fedexcDetail.getQtyLegalFirst()); | ||
| 107 | + mawbDetail.setSecondQty(fedexcDetail.getQtyLegalSecond()); | ||
| 108 | + mawbDetail.setSecondUnit(fedexcDetail.getUnitLegalSecond()); | ||
| 109 | + mawbDetail.setDeclTotal(fedexcDetail.getDeclaredAmount()); | ||
| 110 | + mawbDetail.setTradeCurr(fedexcDetail.getCurrency()); | ||
| 111 | + mawbDetail.setDeclaredWeight(fedexcDetail.getDeclaredWeight()); | ||
| 112 | + mawbDetailList.add(mawbDetail); | ||
| 113 | + } | ||
| 114 | + } | ||
| 115 | + fedexMawb.setMawbDetailList(mawbDetailList); | ||
| 116 | + | ||
| 117 | + return fedexMawb; | ||
| 118 | + } | ||
| 119 | + | ||
| 106 | /** | 120 | /** |
| 107 | * 校验主单 | 121 | * 校验主单 |
| 108 | * @param fedexMawb | 122 | * @param fedexMawb |
| ... | @@ -145,7 +159,56 @@ public class FedexService { | ... | @@ -145,7 +159,56 @@ public class FedexService { |
| 145 | result.setMsg(iclearCheckResponseResult.getMessage()); | 159 | result.setMsg(iclearCheckResponseResult.getMessage()); |
| 146 | log.info("<<<<<<<< checkMawb start >>>>>>>>>> mawb:"+gson.toJson(fedexMawb) +" result :" +result.getSuccess() +" iclear check response : " + json + " status : " + result.getSuccess()); | 160 | log.info("<<<<<<<< checkMawb start >>>>>>>>>> mawb:"+gson.toJson(fedexMawb) +" result :" +result.getSuccess() +" iclear check response : " + json + " status : " + result.getSuccess()); |
| 147 | }catch (Exception e){ | 161 | }catch (Exception e){ |
| 148 | - log.error("checkMawb() error:" + e.getMessage()); | 162 | + log.error("checkMawb() error:",e); |
| 163 | + } | ||
| 164 | + return result; | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + | ||
| 168 | + /** | ||
| 169 | + * 校验BASF接口信息 | ||
| 170 | + * @param fedexc | ||
| 171 | + * @return | ||
| 172 | + */ | ||
| 173 | + public ResultRS checkBasfInterfaceData(Fedexc fedexc){ | ||
| 174 | + | ||
| 175 | + ResultRS result = new ResultRS(Boolean.FALSE,"",""); | ||
| 176 | + | ||
| 177 | + if(Objects.equals(fedexc,null)){ | ||
| 178 | + result.setCode("-7"); | ||
| 179 | + result.setMsg("请求信息不能为空"); | ||
| 180 | + }else{ | ||
| 181 | + List<String> msgList = new ArrayList<>(); | ||
| 182 | +// 参数consignmentCode不能为空 | ||
| 183 | + String consignmentCode = fedexc.getConsignmentCode(); | ||
| 184 | + if(StringUtils.isEmpty(consignmentCode)){ | ||
| 185 | + msgList.add("参数consignmentCode不能为空"); | ||
| 186 | + } | ||
| 187 | +// 参数consignmentId不能为空 | ||
| 188 | + Long consignmentId = fedexc.getConsignmentId(); | ||
| 189 | + if(Objects.isNull(consignmentId)){ | ||
| 190 | + msgList.add("参数consignmentId不能为空"); | ||
| 191 | + } | ||
| 192 | +// 参数consType不能为空 | ||
| 193 | + String consType = fedexc.getConsType(); | ||
| 194 | + if(StringUtils.isEmpty(consType)){ | ||
| 195 | + msgList.add("参数consType不能为空"); | ||
| 196 | + } | ||
| 197 | +// 参数sender不能为空 | ||
| 198 | + String sender = fedexc.getSender(); | ||
| 199 | + if(StringUtils.isEmpty(sender)){ | ||
| 200 | + msgList.add("参数sender不能为空"); | ||
| 201 | + } | ||
| 202 | +// 参数shipperSCC不能为空 | ||
| 203 | + String shipperSCC = fedexc.getShipperSCC(); | ||
| 204 | + if(StringUtils.isEmpty(shipperSCC)){ | ||
| 205 | + msgList.add("参数shipperSCC不能为空"); | ||
| 206 | + } | ||
| 207 | + if(msgList.size() > 0){ | ||
| 208 | + String join = msgList.stream().collect(Collectors.joining(";")); | ||
| 209 | + result.setCode("-7"); | ||
| 210 | + result.setMsg(join); | ||
| 211 | + } | ||
| 149 | } | 212 | } |
| 150 | return result; | 213 | return result; |
| 151 | } | 214 | } | ... | ... |
| 1 | spring: | 1 | spring: |
| 2 | datasource: | 2 | datasource: |
| 3 | - url: jdbc:sqlserver://40.73.78.157:1433;DatabaseName=IClearDev | 3 | + url: jdbc:sqlserver://40.73.78.157:1433;DatabaseName=IClearUat |
| 4 | username: sa | 4 | username: sa |
| 5 | password: Fedex_123 | 5 | password: Fedex_123 |
| 6 | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver | 6 | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| ... | @@ -35,4 +35,4 @@ api: | ... | @@ -35,4 +35,4 @@ api: |
| 35 | #传输海关回执地址 | 35 | #传输海关回执地址 |
| 36 | customs-url: https://apiuat.iclrccd-fedex.com/export/outbound/customs | 36 | customs-url: https://apiuat.iclrccd-fedex.com/export/outbound/customs |
| 37 | #推送完整报文地址 | 37 | #推送完整报文地址 |
| 38 | - complete-msg-url: https://apiuat.iclrccd-fedex.com/export/outbound/mawb | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 38 | + complete-msg-url: https://apiuat.iclrccd-fedex.com/export/outbound/mawb | ... | ... |
-
Please register or login to post a comment