|
|
@ -73,9 +73,9 @@ public class QuestionInventoryDomainServiceImpl implements QuestionInventoryDoma |
|
|
} |
|
|
} |
|
|
int w = cluster.getClusterSize(); |
|
|
int w = cluster.getClusterSize(); |
|
|
// 簇水位线: 1.0 * U * W
|
|
|
// 簇水位线: 1.0 * U * W
|
|
|
int clusterWatermark = (int) Math.ceil(watermark * w * questionTypeMap.get(QuestionTypeEnum.MULTIPLE_CHOICE.name())); |
|
|
int clusterWatermark = (int) Math.ceil(watermark * w); |
|
|
// 簇目标线: 1.2 * U * W
|
|
|
// 簇目标线: 1.2 * U * W
|
|
|
int clusterTargetLine = (int) Math.ceil(targetLine * w * questionTypeMap.get(QuestionTypeEnum.MULTIPLE_CHOICE.name())); |
|
|
int clusterTargetLine = (int) Math.ceil(targetLine * w); |
|
|
|
|
|
|
|
|
checkClusterProduce(cluster.getId(), clusterWatermark, clusterTargetLine); |
|
|
checkClusterProduce(cluster.getId(), clusterWatermark, clusterTargetLine); |
|
|
} |
|
|
} |
|
|
@ -119,12 +119,10 @@ public class QuestionInventoryDomainServiceImpl implements QuestionInventoryDoma |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Map<String, Double> questionTypeMap = questionTypeProportion(task); |
|
|
|
|
|
int targetLine = getTargetLine(task); |
|
|
int targetLine = getTargetLine(task); |
|
|
int clusterWatermark = targetLine * cluster.getClusterSize(); |
|
|
int clusterWatermark = (int) Math.ceil(targetLine * cluster.getClusterSize()); |
|
|
int targetNum = (int) Math.ceil(clusterWatermark * questionTypeMap.get(QuestionTypeEnum.MULTIPLE_CHOICE.name())); |
|
|
total = total + clusterWatermark; |
|
|
total = total + targetNum; |
|
|
if (!checkClusterInventory(cluster.getId(), clusterWatermark)) { |
|
|
if (!checkClusterInventory(cluster.getId(), targetNum)) { |
|
|
|
|
|
flage = true; |
|
|
flage = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -226,11 +224,9 @@ public class QuestionInventoryDomainServiceImpl implements QuestionInventoryDoma |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Boolean checkCluster(TaskEntity task, TaskKnowledgeClusterEntity cluster) { |
|
|
public Boolean checkCluster(TaskEntity task, TaskKnowledgeClusterEntity cluster) { |
|
|
Map<String, Double> questionTypeMap = questionTypeProportion(task); |
|
|
|
|
|
|
|
|
|
|
|
int targetLine = getTargetLine(task); |
|
|
int targetLine = getTargetLine(task); |
|
|
int clusterWatermark = targetLine * cluster.getClusterSize(); |
|
|
int clusterWatermark = (int) Math.ceil(targetLine * cluster.getClusterSize()); |
|
|
return checkClusterInventory(cluster.getId(), (int) Math.ceil(clusterWatermark * questionTypeMap.get(QuestionTypeEnum.MULTIPLE_CHOICE.name()))); |
|
|
return checkClusterInventory(cluster.getId(), clusterWatermark); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|