|
@@ -250,6 +250,12 @@ public class WmTaskContentServiceImpl extends ServiceImpl<WmTaskContentMapper, W
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 获取任务类型对应积分
|
|
|
+ WmTaskType wmTaskType = new WmTaskType();
|
|
|
+ wmTaskType.setRuleId(tWmScorePackage.getRuleId());
|
|
|
+ WmTaskType wmTaskType1 = wmTaskTypeService.getById(wmTaskContent.getTemp30());
|
|
|
+ wmTaskType.setTaskTypeName(wmTaskType1.getTaskTypeName());
|
|
|
+ int score = wmTaskTypeService.getWmTaskTypeByEnt(wmTaskType);
|
|
|
// 医院信息收集、医院信息修改两类任务做的任务总积分不得大于积分包值的60%(积分包值小于5000不做限制)
|
|
|
if ("15".equals(wmTaskContent.getTemp30()) || "30".equals(wmTaskContent.getTemp30())) {
|
|
|
if (tWmScorePackage.getScore() > 5000) {
|
|
@@ -261,7 +267,7 @@ public class WmTaskContentServiceImpl extends ServiceImpl<WmTaskContentMapper, W
|
|
|
.ne(WmTask::getTaskStatus, "4"));
|
|
|
if (CollectionUtil.isNotEmpty(wmTaskList)) {
|
|
|
int totalScore = tWmScorePackage.getScore();
|
|
|
- int partScore = wmTaskList.stream().mapToInt(WmTask::getScore).sum();
|
|
|
+ int partScore = wmTaskList.stream().mapToInt(WmTask::getScore).sum() + score;
|
|
|
if (partScore * 1.0 / totalScore > 0.6) {
|
|
|
return R.failed("医院信息收集、医院信息修改两类任务总积分不得大于积分包值的60%");
|
|
|
}
|
|
@@ -336,7 +342,6 @@ public class WmTaskContentServiceImpl extends ServiceImpl<WmTaskContentMapper, W
|
|
|
|
|
|
Map<String, String> resultMap = new HashMap<>();
|
|
|
|
|
|
- int score = 0;
|
|
|
boolean saveContent = super.save(wmTaskContent);
|
|
|
if (saveContent) {
|
|
|
if (null != sysU) {
|
|
@@ -350,12 +355,6 @@ public class WmTaskContentServiceImpl extends ServiceImpl<WmTaskContentMapper, W
|
|
|
|
|
|
wmTask.setTaskTypeId(wmTaskContent.getTemp30());
|
|
|
|
|
|
- WmTaskType wmTaskType = new WmTaskType();
|
|
|
- wmTaskType.setRuleId(tWmScorePackage.getRuleId());
|
|
|
- WmTaskType wmTaskType1 = wmTaskTypeService.getById(wmTaskContent.getTemp30());
|
|
|
- wmTaskType.setTaskTypeName(wmTaskType1.getTaskTypeName());
|
|
|
- score = wmTaskTypeService.getWmTaskTypeByEnt(wmTaskType);
|
|
|
-
|
|
|
/**
|
|
|
*
|
|
|
* 2020-12-13 医院区分新增和修改 start
|