|
|
|
@ -158,36 +158,36 @@ public class YxzyyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
//查询单据类型,设置往来单位信息
|
|
|
|
|
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeDao.selectByAction(udiwmsOrderRequest.getBillType());
|
|
|
|
|
if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_HOSPTIAL)) {
|
|
|
|
|
//医院客户
|
|
|
|
|
dsOrderRequest.setCorpId(orderEntity.getFromCorp());
|
|
|
|
|
//查询客户名称
|
|
|
|
|
String corpName = basicCorpDao.selectNameByErpId(orderEntity.getFromCorp());
|
|
|
|
|
dsOrderRequest.setCorpName(corpName);
|
|
|
|
|
} else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_INTTERNAL)) {
|
|
|
|
|
//内部科室
|
|
|
|
|
AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new LambdaQueryWrapper<AuthWarehouseEntity>().eq(AuthWarehouseEntity::getCode, udiwmsOrderRequest.getCorpId()));
|
|
|
|
|
try {
|
|
|
|
|
//根据第三方系统标识,获取对应字段的值
|
|
|
|
|
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper<ThrInvWarehouseEntity>()
|
|
|
|
|
.eq(ThrInvWarehouseEntity::getCode, authWarehouseService.getThirdInvCode(warehouseEntity))
|
|
|
|
|
.eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId()));
|
|
|
|
|
|
|
|
|
|
dsOrderRequest.setCorpId(thrInvWarehouseEntity.getCode());
|
|
|
|
|
dsOrderRequest.setCorpName(thrInvWarehouseEntity.getName());
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("查询单据对应往来单位的第三方仓库信息异常", e);
|
|
|
|
|
}
|
|
|
|
|
} else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_SP)) {
|
|
|
|
|
// if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_HOSPTIAL)) {
|
|
|
|
|
// //医院客户
|
|
|
|
|
// dsOrderRequest.setCorpId(orderEntity.getFromCorp());
|
|
|
|
|
// //查询客户名称
|
|
|
|
|
// String corpName = basicCorpDao.selectNameByErpId(orderEntity.getFromCorp());
|
|
|
|
|
// dsOrderRequest.setCorpName(corpName);
|
|
|
|
|
// } else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_INTTERNAL)) {
|
|
|
|
|
// //内部科室
|
|
|
|
|
// AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new LambdaQueryWrapper<AuthWarehouseEntity>().eq(AuthWarehouseEntity::getCode, udiwmsOrderRequest.getCorpId()));
|
|
|
|
|
// try {
|
|
|
|
|
// //根据第三方系统标识,获取对应字段的值
|
|
|
|
|
// ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper<ThrInvWarehouseEntity>()
|
|
|
|
|
// .eq(ThrInvWarehouseEntity::getCode, authWarehouseService.getThirdInvCode(warehouseEntity))
|
|
|
|
|
// .eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId()));
|
|
|
|
|
//
|
|
|
|
|
// dsOrderRequest.setCorpId(thrInvWarehouseEntity.getCode());
|
|
|
|
|
// dsOrderRequest.setCorpName(thrInvWarehouseEntity.getName());
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// log.error("查询单据对应往来单位的第三方仓库信息异常", e);
|
|
|
|
|
// }
|
|
|
|
|
// } else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_SP)) {
|
|
|
|
|
//供应商
|
|
|
|
|
ThrCorpEntity thrCorp = thrCorpService.getThrCorp(udiwmsOrderRequest.getCorpId());
|
|
|
|
|
ThrCorpEntity thrCorp = thrCorpService.getThrCorp(orderEntity.getFromCorp());
|
|
|
|
|
if (null != thrCorp) {
|
|
|
|
|
dsOrderRequest.setCorpId(thrCorp.getUnitId());
|
|
|
|
|
dsOrderRequest.setCorpName(thrCorp.getName());
|
|
|
|
|
} else {
|
|
|
|
|
log.error("查询单据对应的第三方往来单位信息异常");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//查询仓库信息
|
|
|
|
|
AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new LambdaQueryWrapper<AuthWarehouseEntity>().eq(AuthWarehouseEntity::getCode, orderEntity.getInvCode()));
|
|
|
|
|