代码备份

dev_drug_dmyh250207
yewj 2 weeks ago
parent 181ff4f408
commit 66a6d5b776

@ -106,8 +106,7 @@ public class UdiProductServiceImpl implements UdiProductService {
@Override
public UdiProductEntity findOneByOriginUuid(String originUuid) {
List<UdiProductEntity> udiProductEntities = findByOriginUuid(originUuid);
if (CollUtil.isNotEmpty(udiProductEntities))
return udiProductEntities.get(0);
if (CollUtil.isNotEmpty(udiProductEntities)) return udiProductEntities.get(0);
return null;
}
@ -135,16 +134,14 @@ public class UdiProductServiceImpl implements UdiProductService {
@Override
public boolean updateUdiInfo(UdiProductEntity udiProductEntity) {
if (StrUtil.isEmpty(udiProductEntity.getNameCode()))
return false;
if (StrUtil.isEmpty(udiProductEntity.getNameCode())) return false;
udiProductEntity.setUpdateTime(new Date());
return udiProductDao.updateUdiInfo(udiProductEntity);
}
public boolean updateUdiInfoByUuid(UdiProductEntity udiProductEntity) {
if (StrUtil.isEmpty(udiProductEntity.getUuid()))
return false;
if (StrUtil.isEmpty(udiProductEntity.getUuid())) return false;
return udiProductDao.updateUdiInfoByUuid(udiProductEntity);
}
@ -171,8 +168,7 @@ public class UdiProductServiceImpl implements UdiProductService {
@Override
public boolean updateUdiInfoNotAll(UdiInfoRequest udiInfoRequest) {
if (StrUtil.isEmpty(udiInfoRequest.getUuid()))
return false;
if (StrUtil.isEmpty(udiInfoRequest.getUuid())) return false;
return udiProductDao.updateUdiInfoNotAll(udiInfoRequest);
}
@ -192,7 +188,8 @@ public class UdiProductServiceImpl implements UdiProductService {
udiRelevanceEntity = udiRelevanceDao.selectById(addProductRequest.getRelId());
List<UdiProductEntity> udiProductEntities = udiProductDao.findByUuids(udiRelevanceEntity.getUuid());
for (UdiProductEntity udiProductEntity : udiProductEntities) {
if (addProductRequest.getNameCode().equals(udiProductEntity.getNameCode())) {
if (StrUtil.isNotEmpty(addProductRequest.getNameCode()) && StrUtil.isNotEmpty(udiProductEntity.getNameCode())
&& udiProductEntity.getNameCode().equals(udiProductEntity.getNameCode())) {
udiProductEntity.setBhxjsl(addProductRequest.getBhxjsl());
}
addProductRequest.setNameCode(udiProductEntity.getNameCode());
@ -207,22 +204,14 @@ public class UdiProductServiceImpl implements UdiProductService {
if (IntUtil.value(udiProductEntity.getPackLevel()) == 1) {
udiProductEntity.setDiType(1);
}
int i = udiProductDao.updateById(udiProductEntity);
if (i == 0) {
throw new JsonException(500, "更新错误");
}
}
//修改关联表
// udiRelevanceEntity.setUseLeverCount(addProductRequest.getUseLeverCount());
udiRelevanceEntity.setSplitEnable(addProductRequest.getSplitEnable());
udiRelevanceEntity.setAutoCode(addProductRequest.getAutoCode());
// udiRelevanceEntity.setUseLevelDi(addProductRequest.getUseLevelDi());
// udiRelevanceEntity.setUseLevelUnit(addProductRequest.getUseLevelUnit());
udiRelevanceEntity.setUseLevel(addProductRequest.getUseLevel());
// udiRelevanceEntity.setDistributeLevelDi(addProductRequest.getDistributeLevelDi());
// udiRelevanceEntity.setDistributeLevelUnit(addProductRequest.getDistributeLevelUnit());
// udiRelevanceEntity.setDistributeLevelCount(addProductRequest.getDistributeLevelCount());
udiRelevanceEntity.setDistributeLevel(addProductRequest.getDistributeLevel());
udiRelevanceEntity.setPayFeeCode(addProductRequest.getPayFeeCode());
udiRelevanceEntity.setUseMaxLevel(addProductRequest.getUseMaxLevel());
@ -232,9 +221,6 @@ public class UdiProductServiceImpl implements UdiProductService {
udiRelevanceEntity.setManuReview(addProductRequest.getManuReview());
udiRelevanceEntity.setNotCodeType(addProductRequest.getNotCodeType());
udiRelevanceEntity.setUpdateTime(new Date());
udiRelevanceEntity.setDrugSellingPrice(addProductRequest.getDrugSellingPrice());
udiRelevanceEntity.setDrugSellingPriceTime(addProductRequest.getDrugSellingPriceTime());
udiRelevanceEntity.setHangingNetType(addProductRequest.getHangingNetType());
@ -300,7 +286,6 @@ public class UdiProductServiceImpl implements UdiProductService {
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
udiProductDao.insert(udiProductEntity);
}
}
udiRelevanceDao.insertUdiRelevance(udiRelevanceEntity);
updateLevelCount(udiRelevanceEntity);
@ -339,9 +324,7 @@ public class UdiProductServiceImpl implements UdiProductService {
// 上传多玛融合表
List<CodeRel> codeRelArrayList = new ArrayList<>();
if (StringUtils.isNotEmpty(updateLevelDrugRequest.getPackUnit())
|| !Objects.isNull(updateLevelDrugRequest.getBhxjsl()) || StringUtils.isNotEmpty(updateLevelDrugRequest.getXjdw())
) {
if (StringUtils.isNotEmpty(updateLevelDrugRequest.getPackUnit()) || !Objects.isNull(updateLevelDrugRequest.getBhxjsl()) || StringUtils.isNotEmpty(updateLevelDrugRequest.getXjdw())) {
CodeRel codeRel = new CodeRel();
codeRel.setDrugCode(udiProductEntity1.getNameCode());
codeRel.setUpdateTime(new Date());
@ -386,8 +369,7 @@ public class UdiProductServiceImpl implements UdiProductService {
udiProductEntity.setPackLevel("1");
}
}
Map<String, List<UdiProductEntity>> groupedByLevel = udiInfoEntities.stream()
.collect(Collectors.groupingBy(UdiProductEntity::getPackLevel));
Map<String, List<UdiProductEntity>> groupedByLevel = udiInfoEntities.stream().collect(Collectors.groupingBy(UdiProductEntity::getPackLevel));
groupedByLevel.forEach((level, entities) -> {
UdiProductEntity udiProductEntity = entities.get(0);
DiLevelResponse diLevelResponse = new DiLevelResponse();
@ -442,15 +424,11 @@ public class UdiProductServiceImpl implements UdiProductService {
return udiProductEntity;
}
Optional<UdiProductEntity> nextEntityOptional = udiProductEntities.stream()
.filter(item -> item.getNameCode().equals(udiProductEntity.getBhxjcpbm()))
.findFirst();
Optional<UdiProductEntity> nextEntityOptional = udiProductEntities.stream().filter(item -> item.getNameCode().equals(udiProductEntity.getBhxjcpbm())).findFirst();
nextEntityOptional.ifPresent(entity -> xjCountWrapper.addCount(udiProductEntity.getBhxjsl()));
return nextEntityOptional
.map(entity -> findUltimateEntity(entity, udiProductEntities, xjCountWrapper))
.orElse(null);
return nextEntityOptional.map(entity -> findUltimateEntity(entity, udiProductEntities, xjCountWrapper)).orElse(null);
}
@ -533,16 +511,12 @@ public class UdiProductServiceImpl implements UdiProductService {
List<YbDrug> list = ybDrugService.getList(ybHcflDetailFilterRequest);
YbDrug ybDrug;
if (thrProductsEntity != null && !CollUtil.isEmpty(list)
&& !CollUtil.isEmpty(thirdAliDrugList)) {
if (thrProductsEntity != null && !CollUtil.isEmpty(list) && !CollUtil.isEmpty(thirdAliDrugList)) {
ybDrug = list.get(0);
// 多码融合表拼接参数
List<CodeRel> codeRelArrayList = new ArrayList<>();
// 选入就要把标识为空的数据先删除
udiProductDao.delete(new QueryWrapper<UdiProductEntity>()
.eq("uuid", thirdAliDrugRequest.getUuid())
.isNull("nameCode")
);
udiProductDao.delete(new QueryWrapper<UdiProductEntity>().eq("uuid", thirdAliDrugRequest.getUuid()).isNull("nameCode"));
try {
detailSort = Integer.valueOf(thirdAliDrugList.get(0).getPhysicDetailType());
} catch (Exception e) {
@ -592,8 +566,7 @@ public class UdiProductServiceImpl implements UdiProductService {
}
public void addCount(int value) {
if (value == 0)
value = 1;
if (value == 0) value = 1;
this.count = this.count * value;
}
}

@ -3,9 +3,9 @@ server:
spring:
datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms_cl?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
jdbc-url: jdbc:p6spy:mysql://192.168.0.206:3306/udispms82?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
password: Glxp@6066
hikari:
connection-timeout: 60000
maximum-pool-size: 60

@ -581,7 +581,7 @@
<if test="notCodeType != '' and notCodeType != null">
AND basic_udirel.notCodeType = #{notCodeType}
</if>
<if test="manuReview != '' and manuReview != null">
<if test="manuReview != null">
AND manuReview = #{manuReview}
</if>
<if test="thirdId != '' and thirdId != null">

Loading…
Cancel
Save