湖里妇幼上传更新

hlfyyy
qiuyt 3 months ago
parent 191b608b5f
commit 7e358df691

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

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

Loading…
Cancel
Save