tao.mo

PI-11-功能扩展-06:

接口校验信息调整
mt
2023年3月6日17:36:32
......@@ -102,11 +102,17 @@ public class FedexDataInterface {
sw.start("checkFedexMawb");
String msg = result.getMsg();
String iclearCheckMsg = fedexService.checkFedexMawb(saveMawbFedexResult,appInfo).getMsg();
if(StringUtil.isEmpty(msg) && StringUtil.isEmpty(iclearCheckMsg)){
if(result.getSuccess() && StringUtil.isEmpty(iclearCheckMsg)){
result.setSuccess(Boolean.TRUE);
}else{
if(result.getSuccess()){
//基本非空信息验证通过,并且iclear验证失败
result.setMsg(iclearCheckMsg);
}else{
//基本非空信息验证失败,并且iclear验证失败
result.setMsg(msg+";"+iclearCheckMsg);
}
}
sw.stop();
log.info(sw.prettyPrint());
......
......@@ -166,13 +166,13 @@ public class ChmConsignmentDetailService {
result.setSkuName(mawbDetail.getGname());
//成交数量
result.setKnockdownNumber(bigDecimalFormat(BigDecimal.valueOf(mawbDetail.getGqty().doubleValue())));
//第二法定数量
result.setQtyLegalSecond(bigDecimalFormat(mawbDetail.getSecondQty()));
//第二计量单位
DictionaryEntries secondUnitDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.TRANSACTION_UNIT+ mawbDetail.getSecondUnit());
if(!Objects.equals(secondUnitDictionaryEntries,null)){
result.setUnitLegalSecondId(secondUnitDictionaryEntries);
result.setUnitLegalSecond(secondUnitDictionaryEntries.getChineseName());
//第二法定数量
result.setQtyLegalSecond(bigDecimalFormat(mawbDetail.getSecondQty()));
}
//成交币制
......
......@@ -169,11 +169,12 @@ public class FedexService {
*/
public ResultRS checkBasfInterfaceData(Fedexc fedexc, AppInfo appInfo){
ResultRS result = new ResultRS(Boolean.FALSE,null,null);
ResultRS result = new ResultRS(Boolean.TRUE,null,null);
if(Objects.equals(fedexc,null)){
result.setCode(ErrorCodeEnum.ERROR_7.getCode());
result.setMsg(ErrorCodeEnum.ERROR_7.getName());
result.setSuccess(Boolean.FALSE);
}else{
List<String> msgList = new ArrayList<>();
// 参数consignmentCode不能为空
......@@ -204,8 +205,9 @@ public class FedexService {
}
if(msgList.size() > 0){
String join = msgList.stream().collect(Collectors.joining(";"));
result.setCode("-7");
result.setCode(ErrorCodeEnum.ERROR_7.getCode());
result.setMsg(join);
result.setSuccess(Boolean.FALSE);
}
}
return result;
......