|
|
|
@ -226,6 +226,7 @@ public class UdiProductServiceImpl implements UdiProductService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增/编辑药品信息
|
|
|
|
|
*
|
|
|
|
@ -241,6 +242,7 @@ public class UdiProductServiceImpl implements UdiProductService {
|
|
|
|
|
List<UdiProductEntity> udiProductEntities = udiProductDao.findByUuids(udiRelevanceEntity.getUuid());
|
|
|
|
|
for (UdiProductEntity udiProductEntity : udiProductEntities) {
|
|
|
|
|
addProductRequest.setNameCode(udiProductEntity.getNameCode());
|
|
|
|
|
addProductRequest.setId(udiProductEntity.getId());
|
|
|
|
|
BeanUtils.copyProperties(addProductRequest, udiProductEntity);
|
|
|
|
|
udiProductEntity.setCpmctymc(addProductRequest.getCpmctymc());
|
|
|
|
|
udiProductEntity.setProductsType(2);
|
|
|
|
@ -250,7 +252,18 @@ public class UdiProductServiceImpl implements UdiProductService {
|
|
|
|
|
if (IntUtil.value(udiProductEntity.getPackLevel()) == 1) {
|
|
|
|
|
udiProductEntity.setDiType(1);
|
|
|
|
|
}
|
|
|
|
|
udiProductDao.updateById(udiProductEntity);
|
|
|
|
|
udiProductDao.updateUdiInfo(udiProductEntity);
|
|
|
|
|
|
|
|
|
|
//修改关联表
|
|
|
|
|
udiRelevanceEntity.setUseLeverCount(addProductRequest.getUseLeverCount());
|
|
|
|
|
udiRelevanceEntity.setUseLevelDi(addProductRequest.getUseLevelDi());
|
|
|
|
|
udiRelevanceEntity.setUseLevelUnit(addProductRequest.getUseLevelUnit());
|
|
|
|
|
udiRelevanceEntity.setDistributeLevelDi(addProductRequest.getDistributeLevelDi());
|
|
|
|
|
udiRelevanceEntity.setDistributeLevelUnit(addProductRequest.getDistributeLevelUnit());
|
|
|
|
|
udiRelevanceEntity.setDistributeLevelCount(addProductRequest.getDistributeLevelCount());
|
|
|
|
|
udiRelevanceEntity.setPayFeeCode(addProductRequest.getPayFeeCode());
|
|
|
|
|
udiRelevanceDao.updateById(udiRelevanceEntity);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
udiRelevanceEntity = new UdiRelevanceEntity();
|
|
|
|
@ -263,6 +276,7 @@ public class UdiProductServiceImpl implements UdiProductService {
|
|
|
|
|
udiRelevanceEntity.setProductsType(2);
|
|
|
|
|
udiRelevanceEntity.setAttributeType(addProductRequest.getAttributeType());
|
|
|
|
|
udiRelevanceEntity.setHcType(addProductRequest.getHcType());
|
|
|
|
|
udiRelevanceEntity.setPayFeeCode(addProductRequest.getPayFeeCode());
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(addProductRequest.getDrugLevelLists())) {
|
|
|
|
|
for (UpdateLevelDrugRequest updateLevelDrugRequest : addProductRequest.getDrugLevelLists()) {
|
|
|
|
@ -272,8 +286,6 @@ public class UdiProductServiceImpl implements UdiProductService {
|
|
|
|
|
}
|
|
|
|
|
UdiProductEntity udiProductEntity = new UdiProductEntity();
|
|
|
|
|
BeanUtils.copyProperties(updateLevelDrugRequest, udiProductEntity);
|
|
|
|
|
BeanUtils.copyProperties(addProductRequest,udiProductEntity);
|
|
|
|
|
udiProductEntity.setNameCode(updateLevelDrugRequest.getNameCode());
|
|
|
|
|
udiProductEntity.setCpmctymc(addProductRequest.getCpmctymc());
|
|
|
|
|
udiProductEntity.setUuid(udiRelevanceEntity.getUuid());
|
|
|
|
|
udiProductEntity.setProductsType(2);
|
|
|
|
|