| | |
| | | import com.vincent.rsf.openApi.config.PlatformProperties; |
| | | import com.vincent.rsf.openApi.entity.constant.WmsConstant; |
| | | import com.vincent.rsf.openApi.entity.dto.CommonResponse; |
| | | import com.vincent.rsf.openApi.entity.dto.ErpCommonResponse; |
| | | import com.vincent.rsf.openApi.entity.dto.OrderDto; |
| | | import com.vincent.rsf.openApi.entity.params.ErpMatnrParms; |
| | | import com.vincent.rsf.openApi.entity.params.ErpOpParams; |
| | |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | objectMapper.coercionConfigDefaults().setCoercion(CoercionInputShape.EmptyString, CoercionAction.AsEmpty); |
| | | try { |
| | | CommonResponse result = objectMapper.readValue(exchange.getBody(), CommonResponse.class); |
| | | if (result.getCode() == 200) { |
| | | return result; |
| | | CommonResponse commonResponse = new CommonResponse(); |
| | | ErpCommonResponse result = objectMapper.readValue(exchange.getBody(), ErpCommonResponse.class); |
| | | if (!result.getIsError()) { |
| | | commonResponse.setCode(200).setMsg(result.getMessage()).setData(result.getData()); |
| | | return commonResponse; |
| | | } else { |
| | | throw new CoolException("上传失败!!"); |
| | | } |