湖里妇幼单据上传

Lhxyy
yewj 3 months ago
parent 55e7c7052d
commit 2f72b8b6ac

@ -352,4 +352,6 @@ public abstract class CommonHttpClient implements BaseHttpClient {
} }
} }

@ -667,71 +667,27 @@ public class HlfyyyClient extends CommonHttpClient {
//查询单据类型 //查询单据类型
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeDao.selectByAction(ioCollectOrder.getBusType()); BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeDao.selectByAction(ioCollectOrder.getBusType());
if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_HOSPTIAL)) {
//医院客户
zaxzyyOrderRequest.setCorpId(orderEntity.getFromCorp());
//查询客户名称
String corpName = basicCorpDao.selectNameByErpId(orderEntity.getFromCorp());
zaxzyyOrderRequest.setCorpName(corpName);
} else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_INTTERNAL)) {
//内部科室
BasicCorpEntity basicCorpEntity = null;
if (StrUtil.isNotEmpty(orderEntity.getFromCorp())) {
basicCorpEntity = basicCorpDao.selectByErpId(orderEntity.getFromCorp());
}
if (basicCorpEntity != null) {
zaxzyyOrderRequest.setCorpId(basicCorpEntity.getThirdId());
zaxzyyOrderRequest.setCorpName(basicCorpEntity.getName());
} else {
AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("code", ioCollectOrder.getFromCorp()));
try {
//根据第三方系统标识,获取对应字段的值
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper<ThrInvWarehouseEntity>()
.eq(ThrInvWarehouseEntity::getCode, authWarehouseService.getThirdInvCode(warehouseEntity))
.eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId()));
zaxzyyOrderRequest.setCorpId(thrInvWarehouseEntity.getCode());
zaxzyyOrderRequest.setCorpName(thrInvWarehouseEntity.getName());
} catch (Exception e) {
String msg = "查询单据对应往来单位的第三方仓库信息异常";
orderUploadLogService.updateLocalErr(orderEntity, msg);
log.error("----单据提交-----" + orderEntity.getBillNo() + msg);
return ResultVOUtils.error(500, msg);
}
}
//供应商
BasicCorpEntity basicCorpEntity = null;
if (StrUtil.isNotEmpty(orderEntity.getFromCorp())) {
basicCorpEntity = basicCorpDao.selectByErpId(orderEntity.getFromCorp());
}
if (basicCorpEntity != null) {
zaxzyyOrderRequest.setCorpId(basicCorpEntity.getThirdId());
zaxzyyOrderRequest.setCorpName(basicCorpEntity.getName());
} else { } else {
//供应商 String msg = "查询单据对应的第三方往来单位信息异常";
BasicCorpEntity basicCorpEntity = null; orderUploadLogService.updateLocalErr(orderEntity, msg);
if (StrUtil.isNotEmpty(orderEntity.getFromCorp())) { log.error("----单据提交-----" + orderEntity.getBillNo() + msg);
basicCorpEntity = basicCorpDao.selectByErpId(orderEntity.getFromCorp()); return ResultVOUtils.error(500, msg);
}
if (basicCorpEntity != null) {
zaxzyyOrderRequest.setCorpId(basicCorpEntity.getThirdId());
zaxzyyOrderRequest.setCorpName(basicCorpEntity.getName());
} else {
String msg = "查询单据对应的第三方往来单位信息异常";
orderUploadLogService.updateLocalErr(orderEntity, msg);
log.error("----单据提交-----" + orderEntity.getBillNo() + msg);
return ResultVOUtils.error(500, msg);
}
} }
//查询仓库信息 //查询仓库信息
AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("code", orderEntity.getInvCode())); AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("code", orderEntity.getInvCode()));
try { try {
// va004Service.getOne(new LambdaQueryWrapper<VA004>() zaxzyyOrderRequest.setLocInvCode(warehouseEntity.getThirdId());
// .eq(VA004::getCode, warehouseEntity.getCode())
//
// );
// ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper<ThrInvWarehouseEntity>()
// .eq(ThrInvWarehouseEntity::getCode, warehouseEntity.getCode())
//// .eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId())
// );
zaxzyyOrderRequest.setLocInvCode(warehouseEntity.getCode());
zaxzyyOrderRequest.setLocInvName(warehouseEntity.getName()); zaxzyyOrderRequest.setLocInvName(warehouseEntity.getName());
zaxzyyOrderRequest.setLocStorageCode(warehouseEntity.getThirdId());
zaxzyyOrderRequest.setLocStorageCode(warehouseEntity.getCode());
zaxzyyOrderRequest.setLocStorageName(warehouseEntity.getName()); zaxzyyOrderRequest.setLocStorageName(warehouseEntity.getName());
} catch (Exception e) { } catch (Exception e) {
log.error("查询第三方系统仓库信息异常", e); log.error("查询第三方系统仓库信息异常", e);
@ -755,36 +711,36 @@ public class HlfyyyClient extends CommonHttpClient {
.ne("action", "StockCheck") .ne("action", "StockCheck")
); );
List<UdiwmsOrderDetailRequest> items = new ArrayList<>(); List<UdiwmsOrderDetailRequest> items = new ArrayList<>();
//查询业务单据详情 // 查询业务单据详情
// List<IoOrderDetailBizEntity> detailBizEntities = orderDetailBizDao.selectList(new QueryWrapper<IoOrderDetailBizEntity>().eq("orderIdFk", orderEntity.getBillNo())); List<IoOrderDetailBizEntity> detailBizEntities = orderDetailBizDao.selectList(new QueryWrapper<IoOrderDetailBizEntity>().eq("orderIdFk", orderEntity.getBillNo()));
// String errMsg = setOrderDetailList(ioCodeEntities, items, detailBizEntities); String errMsg = setOrderDetailList(ioCodeEntities, items, detailBizEntities);
// zaxzyyOrderRequest.setItem(items); zaxzyyOrderRequest.setItem(items);
// if (CollUtil.isEmpty(items)) { if (CollUtil.isEmpty(items)) {
// orderUploadLogService.updateLocalErr(orderEntity, errMsg); orderUploadLogService.updateLocalErr(orderEntity, errMsg);
// return ResultVOUtils.error(500, errMsg); return ResultVOUtils.error(500, errMsg);
// } }
//
// if (StrUtil.isNotEmpty(errMsg)) { if (StrUtil.isNotEmpty(errMsg)) {
// orderUploadLogService.updateLocalErr(orderEntity, errMsg); orderUploadLogService.updateLocalErr(orderEntity, errMsg);
// return ResultVOUtils.error(500, errMsg); return ResultVOUtils.error(500, errMsg);
// } }
// for (UdiwmsOrderDetailRequest i : items) { for (UdiwmsOrderDetailRequest i : items) {
// String fphm = ""; String fphm = "";
// String fprq = null; String fprq = null;
// List<IoOrderInvoiceEntity> invoiceList = IoOrderInvoiceEntity.builder().build() List<IoOrderInvoiceEntity> invoiceList = IoOrderInvoiceEntity.builder().build()
// .selectList(Wrappers.lambdaQuery(IoOrderInvoiceEntity.class).eq(IoOrderInvoiceEntity::getOrderIdFk, orderEntity.getBillNo()) .selectList(Wrappers.lambdaQuery(IoOrderInvoiceEntity.class).eq(IoOrderInvoiceEntity::getOrderIdFk, orderEntity.getBillNo())
// .eq(IoOrderInvoiceEntity::getBindRlFk, i.getBindRlFk()) .eq(IoOrderInvoiceEntity::getBindRlFk, i.getBindRlFk())
// .eq(StrUtil.isNotEmpty(i.getBatchNo()), IoOrderInvoiceEntity::getBatchNo, i.getBatchNo()). .eq(StrUtil.isNotEmpty(i.getBatchNo()), IoOrderInvoiceEntity::getBatchNo, i.getBatchNo()).
// groupBy(IoOrderInvoiceEntity::getInvoiceEncode)); groupBy(IoOrderInvoiceEntity::getInvoiceEncode));
// if (CollectionUtil.isNotEmpty(invoiceList)) { if (CollectionUtil.isNotEmpty(invoiceList)) {
// fphm = invoiceList.stream().map(IoOrderInvoiceEntity::getInvoiceEncode).collect(Collectors.joining(",")); fphm = invoiceList.stream().map(IoOrderInvoiceEntity::getInvoiceEncode).collect(Collectors.joining(","));
// if (invoiceList.get(0).getInvoiceDate() != null) if (invoiceList.get(0).getInvoiceDate() != null)
// fprq = DateUtil.formatDateTime(invoiceList.get(0).getInvoiceDate()); fprq = DateUtil.formatDateTime(invoiceList.get(0).getInvoiceDate());
// } }
// i.setFirstSalesInvNo(fphm); i.setFirstSalesInvNo(fphm);
// i.setSecSalesInvNo(fphm); i.setSecSalesInvNo(fphm);
// i.setInvoiceDate(fprq); i.setInvoiceDate(fprq);
// } }
//构造诏安接口参数 //构造诏安接口参数
ZzzyyRequest zaZyRequest = new ZzzyyRequest(); ZzzyyRequest zaZyRequest = new ZzzyyRequest();
zaZyRequest.setMsgHeader(getMsgHeader("saveBuyApplyInfo")); zaZyRequest.setMsgHeader(getMsgHeader("saveBuyApplyInfo"));
@ -792,11 +748,11 @@ public class HlfyyyClient extends CommonHttpClient {
submitByWebService(zaZyRequest.getMsgHeader(), zaZyRequest.getMsgBody()); submitByWebService(zaZyRequest.getMsgHeader(), zaZyRequest.getMsgBody());
return submitOrder(orderEntity, zaZyRequest); return submitOrder(orderEntity, zaZyRequest);
} }
public BaseResponse submitOrders(UdiwmsOrderRequest udiwmsOrderRequest) { public BaseResponse submitOrders(UdiwmsOrderRequest udiwmsOrderRequest) {
if (StrUtil.isBlank(udiwmsOrderRequest.getBillNo())) { if (StrUtil.isBlank(udiwmsOrderRequest.getBillNo())) {
return ResultVOUtils.error(500, "单据号不能为空"); return ResultVOUtils.error(500, "单据号不能为空");
} }
udiwmsOrderRequest.setBillType("SC73450632224238");
ZaxzyyOrderRequest zaxzyyOrderRequest = new ZaxzyyOrderRequest(); ZaxzyyOrderRequest zaxzyyOrderRequest = new ZaxzyyOrderRequest();
BeanUtil.copyProperties(udiwmsOrderRequest, zaxzyyOrderRequest); BeanUtil.copyProperties(udiwmsOrderRequest, zaxzyyOrderRequest);
//查询单据和详情信息,组装第三方系统接口所需参数 //查询单据和详情信息,组装第三方系统接口所需参数
@ -804,92 +760,37 @@ public class HlfyyyClient extends CommonHttpClient {
zaxzyyOrderRequest.setBillDate(DateUtil.formatDateTime(orderEntity.getCreateTime())); zaxzyyOrderRequest.setBillDate(DateUtil.formatDateTime(orderEntity.getCreateTime()));
//查询对应的第三方单据类型 //查询对应的第三方单据类型
ThrSystemBusApiEntity thrSystemBusApiEntity = thrSystemBusApiDao.selectOne(new QueryWrapper<ThrSystemBusApiEntity>().eq("code", udiwmsOrderRequest.getBillType())); zaxzyyOrderRequest.setBillType("01");
zaxzyyOrderRequest.setBillType(udiwmsOrderRequest.getBillType());
zaxzyyOrderRequest.setBillFlag("1"); zaxzyyOrderRequest.setBillFlag("1");
zaxzyyOrderRequest.setThirdSys("thirdSys");
//查询单据类型 //查询单据类型
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeDao.selectByAction(udiwmsOrderRequest.getBillType()); //供应商
if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_HOSPTIAL)) { BasicCorpEntity basicCorpEntity = null;
//医院客户 if (StrUtil.isNotEmpty(orderEntity.getFromCorp())) {
zaxzyyOrderRequest.setCorpId(orderEntity.getFromCorp()); basicCorpEntity = basicCorpDao.selectByErpId(orderEntity.getFromCorp());
//查询客户名称 }
String corpName = basicCorpDao.selectNameByErpId(orderEntity.getFromCorp()); if (basicCorpEntity != null) {
zaxzyyOrderRequest.setCorpName(corpName); zaxzyyOrderRequest.setCorpId(basicCorpEntity.getThirdId());
} else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_INTTERNAL)) { zaxzyyOrderRequest.setCorpName(basicCorpEntity.getName());
//内部科室
BasicCorpEntity basicCorpEntity = null;
if (StrUtil.isNotEmpty(orderEntity.getFromCorp())) {
basicCorpEntity = basicCorpDao.selectByErpId(orderEntity.getFromCorp());
}
if (basicCorpEntity != null) {
zaxzyyOrderRequest.setCorpId(basicCorpEntity.getThirdId());
zaxzyyOrderRequest.setCorpName(basicCorpEntity.getName());
} else {
AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("code", udiwmsOrderRequest.getCorpId()));
try {
//根据第三方系统标识,获取对应字段的值
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper<ThrInvWarehouseEntity>()
.eq(ThrInvWarehouseEntity::getCode, authWarehouseService.getThirdInvCode(warehouseEntity))
.eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId()));
zaxzyyOrderRequest.setCorpId(thrInvWarehouseEntity.getCode());
zaxzyyOrderRequest.setCorpName(thrInvWarehouseEntity.getName());
} catch (Exception e) {
String msg = "查询单据对应往来单位的第三方仓库信息异常";
orderUploadLogService.updateLocalErr(orderEntity, msg);
log.error("----单据提交-----" + orderEntity.getBillNo() + msg);
return ResultVOUtils.error(500, msg);
}
}
} else { } else {
//供应商 String msg = "查询单据对应的第三方往来单位信息异常";
BasicCorpEntity basicCorpEntity = null; orderUploadLogService.updateLocalErr(orderEntity, msg);
if (StrUtil.isNotEmpty(orderEntity.getFromCorp())) { log.error("----单据提交-----" + orderEntity.getBillNo() + msg);
basicCorpEntity = basicCorpDao.selectByErpId(orderEntity.getFromCorp()); return ResultVOUtils.error(500, msg);
}
if (basicCorpEntity != null) {
zaxzyyOrderRequest.setCorpId(basicCorpEntity.getThirdId());
zaxzyyOrderRequest.setCorpName(basicCorpEntity.getName());
} else {
String msg = "查询单据对应的第三方往来单位信息异常";
orderUploadLogService.updateLocalErr(orderEntity, msg);
log.error("----单据提交-----" + orderEntity.getBillNo() + msg);
return ResultVOUtils.error(500, msg);
}
} }
//查询仓库信息 //查询仓库信息
AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("code", orderEntity.getInvCode())); AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("code", orderEntity.getInvCode()));
try { try {
// va004Service.getOne(new LambdaQueryWrapper<VA004>()
// .eq(VA004::getCode, warehouseEntity.getCode())
//
// );
// ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper<ThrInvWarehouseEntity>()
// .eq(ThrInvWarehouseEntity::getCode, warehouseEntity.getCode())
//// .eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId())
// );
zaxzyyOrderRequest.setLocInvCode(warehouseEntity.getCode()); zaxzyyOrderRequest.setLocInvCode(warehouseEntity.getCode());
zaxzyyOrderRequest.setLocInvName(warehouseEntity.getName()); zaxzyyOrderRequest.setLocInvName(warehouseEntity.getName());
zaxzyyOrderRequest.setLocStorageCode(warehouseEntity.getCode());
zaxzyyOrderRequest.setLocStorageName(warehouseEntity.getName());
} catch (Exception e) { } catch (Exception e) {
log.error("查询第三方系统仓库信息异常", e); log.error("查询第三方系统仓库信息异常", e);
String msg = "查询第三方系统仓库信息异常"; String msg = "查询第三方系统仓库信息异常";
orderUploadLogService.updateLocalErr(orderEntity, msg); orderUploadLogService.updateLocalErr(orderEntity, msg);
return ResultVOUtils.error(500, msg); return ResultVOUtils.error(500, msg);
} }
//设置单据出入库类型 //设置单据出入库类型
if (basicBussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_PUT)) { zaxzyyOrderRequest.setInoutType(1); //入库
zaxzyyOrderRequest.setInoutType(1); //入库
} else if (basicBussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
zaxzyyOrderRequest.setInoutType(2); //出库
}
//设置备注信息 //设置备注信息
zaxzyyOrderRequest.setRemark("udi管理系统提交单据"); zaxzyyOrderRequest.setRemark("udi管理系统提交单据");
//组装单据明细数据 //组装单据明细数据
@ -899,35 +800,35 @@ public class HlfyyyClient extends CommonHttpClient {
); );
List<UdiwmsOrderDetailRequest> items = new ArrayList<>(); List<UdiwmsOrderDetailRequest> items = new ArrayList<>();
//查询业务单据详情 //查询业务单据详情
// List<IoOrderDetailBizEntity> detailBizEntities = orderDetailBizDao.selectList(new QueryWrapper<IoOrderDetailBizEntity>().eq("orderIdFk", orderEntity.getBillNo())); List<IoOrderDetailBizEntity> detailBizEntities = orderDetailBizDao.selectList(new QueryWrapper<IoOrderDetailBizEntity>().eq("orderIdFk", orderEntity.getBillNo()));
// String errMsg = setOrderDetailList(ioCodeEntities, items, detailBizEntities); String errMsg = setOrderDetailList(ioCodeEntities, items, detailBizEntities);
// zaxzyyOrderRequest.setItem(items); zaxzyyOrderRequest.setItem(items);
// if (CollUtil.isEmpty(items)) { if (CollUtil.isEmpty(items)) {
// orderUploadLogService.updateLocalErr(orderEntity, errMsg); orderUploadLogService.updateLocalErr(orderEntity, errMsg);
// return ResultVOUtils.error(500, errMsg); return ResultVOUtils.error(500, errMsg);
// } }
//
// if (StrUtil.isNotEmpty(errMsg)) { if (StrUtil.isNotEmpty(errMsg)) {
// orderUploadLogService.updateLocalErr(orderEntity, errMsg); orderUploadLogService.updateLocalErr(orderEntity, errMsg);
// return ResultVOUtils.error(500, errMsg); return ResultVOUtils.error(500, errMsg);
// } }
// for (UdiwmsOrderDetailRequest i : items) { for (UdiwmsOrderDetailRequest i : items) {
// String fphm = ""; String fphm = "";
// String fprq = null; String fprq = null;
// List<IoOrderInvoiceEntity> invoiceList = IoOrderInvoiceEntity.builder().build() List<IoOrderInvoiceEntity> invoiceList = IoOrderInvoiceEntity.builder().build()
// .selectList(Wrappers.lambdaQuery(IoOrderInvoiceEntity.class).eq(IoOrderInvoiceEntity::getOrderIdFk, orderEntity.getBillNo()) .selectList(Wrappers.lambdaQuery(IoOrderInvoiceEntity.class).eq(IoOrderInvoiceEntity::getOrderIdFk, orderEntity.getBillNo())
// .eq(IoOrderInvoiceEntity::getBindRlFk, i.getBindRlFk()) .eq(IoOrderInvoiceEntity::getBindRlFk, i.getBindRlFk())
// .eq(StrUtil.isNotEmpty(i.getBatchNo()), IoOrderInvoiceEntity::getBatchNo, i.getBatchNo()). .eq(StrUtil.isNotEmpty(i.getBatchNo()), IoOrderInvoiceEntity::getBatchNo, i.getBatchNo()).
// groupBy(IoOrderInvoiceEntity::getInvoiceEncode)); groupBy(IoOrderInvoiceEntity::getInvoiceEncode));
// if (CollectionUtil.isNotEmpty(invoiceList)) { if (CollectionUtil.isNotEmpty(invoiceList)) {
// fphm = invoiceList.stream().map(IoOrderInvoiceEntity::getInvoiceEncode).collect(Collectors.joining(",")); fphm = invoiceList.stream().map(IoOrderInvoiceEntity::getInvoiceEncode).collect(Collectors.joining(","));
// if (invoiceList.get(0).getInvoiceDate() != null) if (invoiceList.get(0).getInvoiceDate() != null)
// fprq = DateUtil.formatDateTime(invoiceList.get(0).getInvoiceDate()); fprq = DateUtil.formatDateTime(invoiceList.get(0).getInvoiceDate());
// } }
// i.setFirstSalesInvNo(fphm); i.setFirstSalesInvNo(fphm);
// i.setSecSalesInvNo(fphm); i.setSecSalesInvNo(fphm);
// i.setInvoiceDate(fprq); i.setInvoiceDate(fprq);
// } }
//构造诏安接口参数 //构造诏安接口参数
ZzzyyRequest zaZyRequest = new ZzzyyRequest(); ZzzyyRequest zaZyRequest = new ZzzyyRequest();
zaZyRequest.setMsgHeader(getMsgHeader("saveBuyApplyInfo")); zaZyRequest.setMsgHeader(getMsgHeader("saveBuyApplyInfo"));
@ -1365,30 +1266,35 @@ public class HlfyyyClient extends CommonHttpClient {
item.setExpireDate(DateUtil.formatExpireTime(StrUtil.isBlank(detailBizEntity.getExpireDate()) ? null : "20" + detailBizEntity.getExpireDate())); item.setExpireDate(DateUtil.formatExpireTime(StrUtil.isBlank(detailBizEntity.getExpireDate()) ? null : "20" + detailBizEntity.getExpireDate()));
String thirdProductId = (String) ReflectUtil.getFieldValue(basicUdirel, thirdSysConfig.getThirdId()); String thirdProductId = (String) ReflectUtil.getFieldValue(basicUdirel, thirdSysConfig.getThirdId());
item.setProductId(thirdProductId); //产品ID item.setProductId(thirdProductId); //产品ID
//查询第三方产品名称 //查询第三方产品名称 --医保编码
ThrProductsEntity thrProductsEntity = thrProductsDao.selectOne(new LambdaQueryWrapper<ThrProductsEntity>() ThrProductsEntity thrProductsEntity = thrProductsDao.selectOne(new LambdaQueryWrapper<ThrProductsEntity>()
.eq(ThrProductsEntity::getCode, thirdProductId).last("limit 1")); .eq(ThrProductsEntity::getCode, thirdProductId).last("limit 1"));
// 物资字典
// ThrProductsEntity thrProductsEntity = thrProductsDao.selectOne(new LambdaQueryWrapper<ThrProductsEntity>()
// .eq(ThrProductsEntity::getCode, thirdProductId).eq(ThrProductsEntity::getThirdSysFk, "thirdId1").last("limit 1"));
if (thrProductsEntity == null) { if (thrProductsEntity == null) {
log.error("第三方产品编码未关联"); log.error("第三方产品编码未关联");
return null; return null;
} }
item.setProductName(thrProductsEntity.getName()); //产品名称 item.setProductName(thrProductsEntity.getName()); //产品名称
item.setBindRlFk(detailBizEntity.getBindRlFk()); // item.setBindRlFk(detailBizEntity.getBindRlFk());
item.setStandard(detailBizEntity.getSpec()); //规格型号 item.setStandard(detailBizEntity.getSpec()); //规格型号
item.setBillNo(detailBizEntity.getOrderIdFk()); //单据号 item.setBillNo(detailBizEntity.getOrderIdFk()); //单据号
item.setRegisterNo(detailBizEntity.getCertCode()); //注册/备案证号 item.setRegisterNo(detailBizEntity.getCertCode()); //注册/备案证号
item.setManufactory(basicProducts.getManufactory()); //生产厂家 item.setManufactory(basicProducts.getManufactory()); //生产厂家
item.setMeasname(thrProductsEntity.getMeasname()); //计量单位 item.setMeasname(thrProductsEntity.getMeasname()); //计量单位
item.setAllowNoBatch(IntUtil.value(basicProducts.getAllowNoBatch())); //是否允许无批次号 item.setAllowNoBatch(IntUtil.value(basicProducts.getAllowNoBatch())); //是否允许无批次号
if (StrUtil.isNotEmpty(item.getManufactory())) { // if (StrUtil.isNotEmpty(item.getManufactory())) {
ThrCorpEntity thrCorpEntity = thrCorpService.getThrCorpByName(item.getManufactory()); // ThrCorpEntity thrCorpEntity = thrCorpService.getThrCorpByName(item.getManufactory());
if (thrCorpEntity != null) // if (thrCorpEntity != null)
item.setManufactoryCode(thrCorpEntity.getUnitId()); // item.setManufactoryCode(thrCorpEntity.getUnitId());
} // }
item.setSupCode(thrProductsEntity.getSupCode()); // item.setSupCode(thrProductsEntity.getSupCode());
item.setCplb(thrProductsEntity.getFlbm()); // item.setCplb(thrProductsEntity.getFlbm());
item.setHslb(thrProductsEntity.getCplb()); // item.setHslb(thrProductsEntity.getCplb());
item.setCount(detailBizEntity.getCount()); item.setCount(detailBizEntity.getCount());
return item; return item;
} }
@ -2571,6 +2477,10 @@ public class HlfyyyClient extends CommonHttpClient {
Class<?>[] returnTypes = new Class[]{String.class}; Class<?>[] returnTypes = new Class[]{String.class};
// Invoke the web service // Invoke the web service
log.error("msgHeader:" + msgHeader);
log.error("msgBody:" + msgBody);
Object[] response = serviceClient.invokeBlocking(QName.valueOf(METHOD_NAME), params, returnTypes); Object[] response = serviceClient.invokeBlocking(QName.valueOf(METHOD_NAME), params, returnTypes);
// Return the response // Return the response

Loading…
Cancel
Save