|
|
@@ -18,6 +18,7 @@ import com.usoftchina.saas.transfers.utils.SendUtil;
|
|
|
import com.usoftchina.saas.utils.BeanMapper;
|
|
|
import com.usoftchina.saas.utils.JsonUtils;
|
|
|
import com.usoftchina.saas.utils.ObjectUtils;
|
|
|
+import com.usoftchina.saas.utils.StringUtils;
|
|
|
import com.usoftchina.saas.utils.http.HttpUtil;
|
|
|
import com.usoftchina.saas.utils.http.HttpUtil.Response;
|
|
|
import org.slf4j.Logger;
|
|
|
@@ -73,13 +74,13 @@ public class SendPurchaseInTask extends Executable{
|
|
|
//将数据改为B2B数据格式
|
|
|
List<PurchaseProdInOut> data = new ArrayList<PurchaseProdInOut>();
|
|
|
data.add(b2bPurchaseProdInOut);
|
|
|
- boolean success = SendUtil.sendToB2B(url, JSON.toJSONString(data), companyDTO.getAccessKey());
|
|
|
- if (success) {
|
|
|
+ String message = SendUtil.sendToB2B(url, JSON.toJSONString(data), companyDTO.getAccessKey());
|
|
|
+ if (StringUtils.isEmpty(message)) {
|
|
|
LOGGER.info("采购验收单上传成功, id={}", messageInfo.getBizId());
|
|
|
prodInOutApi.updateB2BStatus(Long.parseLong(messageInfo.getBizId()), "已上传");
|
|
|
} else {
|
|
|
- LOGGER.info("采购验收单上传失败, id={}", messageInfo.getBizId());
|
|
|
- throw new Exception("上传失败");
|
|
|
+ LOGGER.info("采购验收单上传失败, id={},error Message={}", messageInfo.getBizId(), message);
|
|
|
+ throw new Exception(message);
|
|
|
}
|
|
|
}
|
|
|
|