湖里妇幼上传更新

hlfyyy
qiuyt 3 months ago
parent 191b608b5f
commit 7e358df691

@ -800,6 +800,8 @@ public class HlfyyyClient extends CommonHttpClient {
list.add(codeDetailEntityNew);
}
udiwmsOrderDetailHlfyRequest.setCodeList(list);
}else {
udiwmsOrderDetailHlfyRequest.setCodeList(new ArrayList<>());
}
udiwmsOrderDetailHlfyRequestArrayList.add(udiwmsOrderDetailHlfyRequest);
}
@ -1213,15 +1215,20 @@ public class HlfyyyClient extends CommonHttpClient {
private String setOrderDetailList(List<IoCodeEntity> ioCodeEntities, List<UdiwmsOrderDetailRequest> orderDetailRequests, List<IoOrderDetailBizEntity> detailBizEntities) {
String errMsg = "";
for (IoOrderDetailBizEntity detailBizEntity : detailBizEntities) {
log.error("detailBizEntity==="+detailBizEntity);
IoOrderDetailCodeEntity orderDetailCodeEntity = orderDetailCodeDao
.selectOne(new QueryWrapper<IoOrderDetailCodeEntity>()
.eq("orderIdFk", detailBizEntity.getOrderIdFk())
.eq("bindRlFk", detailBizEntity.getBindRlFk())
.eq(StrUtil.isNotEmpty(detailBizEntity.getBatchNo()), "batchNo", detailBizEntity.getBatchNo())
.isNull(StrUtil.isEmpty(detailBizEntity.getBatchNo()), "batchNo").last("LIMIT 1"));
if (orderDetailCodeEntity != null && IntUtil.value(orderDetailCodeEntity.getReCount()) > 0) {
detailBizEntity.setCount(orderDetailCodeEntity.getReCount());
// IoOrderDetailCodeEntity orderDetailCodeEntity = orderDetailCodeDao
// .selectOne(new QueryWrapper<IoOrderDetailCodeEntity>()
// .eq("orderIdFk", detailBizEntity.getOrderIdFk())
// .eq("bindRlFk", detailBizEntity.getBindRlFk())
// .eq(StrUtil.isNotEmpty(detailBizEntity.getBatchNo()), "batchNo", detailBizEntity.getBatchNo())
// .isNull(StrUtil.isEmpty(detailBizEntity.getBatchNo()), "batchNo").last("LIMIT 1"));
// if (orderDetailCodeEntity != null && IntUtil.value(orderDetailCodeEntity.getReCount()) > 0) {
// detailBizEntity.setCount(orderDetailCodeEntity.getReCount());
//
// }else {
// detailBizEntity.setCount(0);
//
// }
// detailBizEntity.setCount(orderDetailCodeEntity.getReCount());
UdiwmsOrderDetailRequest item = buildProductInfo(detailBizEntity);
if (item != null) {
//封装条码信息
@ -1231,7 +1238,6 @@ public class HlfyyyClient extends CommonHttpClient {
errMsg = detailBizEntity.getCoName() + "," + "第三方产品编码未关联";
}
}
}
return errMsg;
}
@ -1304,8 +1310,6 @@ public class HlfyyyClient extends CommonHttpClient {
item.setCount(detailBizEntity.getCount());
item.setInvoiceDate(detailBizEntity.getInvoiceDate());
item.setFirstSalesInvNo(detailBizEntity.getFirstSalesInvNo());
log.error("item==="+item);
return item;
}
@ -1350,7 +1354,7 @@ public class HlfyyyClient extends CommonHttpClient {
orderUploadLogDao.insert(uploadLog);
return baseResponseA;
} catch (Exception e) {
log.error("解析提交到智业单据返回结果异常,结果信息:{}", baseResponseA);
log.error("解析提交到his单据返回结果异常,结果信息:{}", baseResponseA);
log.error("异常信息:{}", e);
uploadLog.setStatus(3);
uploadLog.setResult("提交失败,错误信息:" + baseResponseA);
@ -1691,15 +1695,15 @@ public class HlfyyyClient extends CommonHttpClient {
String busType = ioCollectOrder.getBusType();
if (matchBusType(busType, buyType_3501)) {
submitOrders(ioCollectOrder);
optionUploadCollectOrder3501(ioCollectOrder);
} else if (matchBusType(busType, buyType_3502)) {
submitOrders(ioCollectOrder);
optionUploadCollectOrder3502(ioCollectOrder);
} else if (matchBusType(busType, buyType_3505)) {
return submitOrders(ioCollectOrder);
optionUploadCollectOrder3505(ioCollectOrder);
} else if (matchBusType(busType, buyType_3506)) {
submitOrders(ioCollectOrder);
optionUploadCollectOrder3506(ioCollectOrder);
} else {
submitOrders(ioCollectOrder);
return submitOrders(ioCollectOrder);
}
}
}
@ -2490,18 +2494,18 @@ public class HlfyyyClient extends CommonHttpClient {
URLEncoder.encode(msgHeader, "UTF-8"),
URLEncoder.encode(msgBody, "UTF-8")
);
log.error("上传his单据入参:" + msgBody);
HttpRequest request = HttpRequest.post(WSDL_URL)
.addHeaders(headers)
.body(postData);
HttpResponse xmlResponse = request.execute();
log.error("response:" + xmlResponse);
String xml = xmlResponse.body();
// 假设 XML 解析到的 JSON 字符串部分
String jsonStr ="{" + xml.substring(xml.indexOf("{") + 1, xml.lastIndexOf("}")) + "}" ;
log.error("jsonStr:" + jsonStr);
log.error("上传his单据返回:" + jsonStr);
JSONObject jsonObject = JSON.parseObject(jsonStr);
// 提取并打印retCode、retMsg和output的值
@ -2515,8 +2519,8 @@ public class HlfyyyClient extends CommonHttpClient {
return ResultVOUtils.error(500, retMsg);
} catch (Exception e) {
log.error("上传智业单据错误===" + e.getMessage());
return ResultVOUtils.error(500, "上传智业单据错误===" + e.getMessage());
log.error("上传his单据错误===" + e.getMessage());
return ResultVOUtils.error(500, "上传his单据错误===" + e.getMessage());
}
}

@ -93,6 +93,9 @@ public class SubmitOrderUtil {
codes.add(codeDetailEntity);
});
item.setCodeList(codes);
}else {
item.setCodeList(new ArrayList<>());
}
}

Loading…
Cancel
Save