|
@@ -767,6 +767,9 @@ public class WmScorePackageServiceImpl extends ServiceImpl<WmScorePackageMapper,
|
|
|
}
|
|
|
}
|
|
|
wmScorePackage.setBelongDate(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM")) + "");
|
|
|
+
|
|
|
+ // 没有上级关联包, 则屏蔽推广药品企业
|
|
|
+ wmScorePackage.setDrugProducerList(null);
|
|
|
} else {
|
|
|
WmScorePackage relationScore = this.getById(wmScorePackage.getRelationScoreId());
|
|
|
if (relationScore == null) {
|
|
@@ -774,11 +777,12 @@ public class WmScorePackageServiceImpl extends ServiceImpl<WmScorePackageMapper,
|
|
|
}
|
|
|
|
|
|
// 关联上级推广药品企业(兼容历史)
|
|
|
- Set<String> producerNames = wmDaDrugEntDrugtableService.listDrugProducerByDeptId(Integer.parseInt(relationScore.getDeptId()));
|
|
|
- wmScorePackage.setDrugProducerList(producerNames.toArray(new String[0]));
|
|
|
+ if (ArrayUtil.isEmpty(wmScorePackage.getDrugProducerList()) && ArrayUtil.isNotEmpty(relationScore.getDrugProducerList())) {
|
|
|
+ wmScorePackage.setDrugProducerList(relationScore.getDrugProducerList());
|
|
|
+ }
|
|
|
// 关联上级推广药品
|
|
|
if (ArrayUtil.isEmpty(wmScorePackage.getDrugtable())) {
|
|
|
- wmScorePackage.setDrugtable(wmScorePackage.getDrugtable());
|
|
|
+ wmScorePackage.setDrugtable(relationScore.getDrugtable());
|
|
|
}
|
|
|
|
|
|
wmScorePackage.setDrugEntId(relationScore.getDrugEntId());
|
|
@@ -1721,6 +1725,9 @@ public class WmScorePackageServiceImpl extends ServiceImpl<WmScorePackageMapper,
|
|
|
// 查询原积分包值
|
|
|
int oldPackageScore = this.getById(wmScorePackage.getId()).getScore();
|
|
|
|
|
|
+ // 没有上级关联包, 则屏蔽推广药品企业
|
|
|
+ wmScorePackage.setDrugProducerList(null);
|
|
|
+
|
|
|
this.updateById(wmScorePackage);
|
|
|
if (wmScorePackage.getRelationScoreId() == null) {
|
|
|
this.update(Wrappers.<WmScorePackage>lambdaUpdate()
|