中医院接口修改

dtxyy
anthonywj 9 months ago
parent 5a29403fc3
commit 77e8a31199

@ -491,6 +491,7 @@ public class PtxhyyClient extends CommonHttpClient {
thrInvResultResponse.setType(ptxhInvResponse.getLb());
thrInvResultResponse.setOutCount(ptxhInvResponse.getZsl());
thrInvResultResponse.setReCount(ptxhInvResponse.getZsl());
thrInvResultResponse.setBatchNo("/");
thrInvResultResponse.setSickerName(ptxhInvResponse.getBrxm());
thrInvResultResponse.setSickerCode(ptxhInvResponse.getJzhm());
if (StrUtil.isNotEmpty(ptxhInvResponse.getRq())) {

@ -137,7 +137,7 @@ public class ZzzyyClient extends CommonHttpClient {
zaxzyyOrderRequest.setBillDate(DateUtil.formatDateTime(orderEntity.getCreateTime()));
//查询对应的第三方单据类型
ThrSystemBusApiEntity thrSystemBusApiEntity = thrSystemBusApiDao.selectOne(new QueryWrapper<ThrSystemBusApiEntity>().eq("code", udiwmsOrderRequest.getBillType()));
ThrSystemBusApiEntity thrSystemBusApiEntity = thrSystemBusApiDao.selectOne(new QueryWrapper<ThrSystemBusApiEntity>().eq("code", orderEntity.getAction()));
if (StrUtil.isBlank(thrSystemBusApiEntity.getUrl())) {
// return ResultVOUtils.error(500, "接口未配置,无法提交!");
}
@ -146,47 +146,55 @@ public class ZzzyyClient extends CommonHttpClient {
zaxzyyOrderRequest.setBillFlag("1");
//查询单据类型
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeDao.selectByAction(udiwmsOrderRequest.getBillType());
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", 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) {
log.error("查询单据对应往来单位的第三方仓库信息异常", e);
}
}
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeDao.selectByAction(orderEntity.getAction());
} else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_SP)) {
//供应商
ThrCorpEntity thrCorp = thrCorpService.getThrCorp(udiwmsOrderRequest.getCorpId());
if (null != thrCorp) {
zaxzyyOrderRequest.setCorpId(thrCorp.getUnitId());
zaxzyyOrderRequest.setCorpName(thrCorp.getName());
} else {
log.error("查询单据对应的第三方往来单位信息异常");
}
ThrCorpEntity thrCorp = thrCorpService.getThrCorp(orderEntity.getFromCorp());
if (null != thrCorp) {
zaxzyyOrderRequest.setCorpId(thrCorp.getUnitId());
zaxzyyOrderRequest.setCorpName(thrCorp.getName());
} else {
log.error("查询单据对应的第三方往来单位信息异常");
}
// 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", orderEntity.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) {
// log.error("查询单据对应往来单位的第三方仓库信息异常", e);
// }
// }
//
// } else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_SP)) {
// //供应商
// ThrCorpEntity thrCorp = thrCorpService.getThrCorp(orderEntity.getFromCorp());
// if (null != thrCorp) {
// zaxzyyOrderRequest.setCorpId(thrCorp.getUnitId());
// zaxzyyOrderRequest.setCorpName(thrCorp.getName());
// } else {
// log.error("查询单据对应的第三方往来单位信息异常");
// }
// }
//查询仓库信息
@ -248,9 +256,9 @@ public class ZzzyyClient extends CommonHttpClient {
//构造诏安接口参数
UdiwmsPreInOrderRequest udiwmsPreInOrderRequest = submitPreInOrderToThirdSys(zaxzyyOrderRequest, orderEntity);
// UdiwmsPreInOrderRequest udiwmsPreInOrderRequest = submitPreInOrderToThirdSys(zaxzyyOrderRequest, orderEntity);
return submitOrder(orderEntity, udiwmsPreInOrderRequest);
return submitOrder(orderEntity, zaxzyyOrderRequest);
}
@ -285,7 +293,7 @@ public class ZzzyyClient extends CommonHttpClient {
* @param zaZyRequest
* @return
*/
private BaseResponse submitOrder(IoOrderEntity orderEntity, UdiwmsPreInOrderRequest zaZyRequest) {
private BaseResponse submitOrder(IoOrderEntity orderEntity, ZaxzyyOrderRequest zaZyRequest) {
//记录日志
IoOrderUploadLogEntity uploadLog = new IoOrderUploadLogEntity();
uploadLog.setBillDate(orderEntity.getCreateTime());

Loading…
Cancel
Save