|
@@ -4,6 +4,7 @@ import cn.cslg.pas.common.model.vo.ProjectImportPatentVO;
|
|
|
import cn.cslg.pas.common.model.vo.UploadParamsVO;
|
|
|
import cn.cslg.pas.common.utils.DateUtils;
|
|
|
import cn.cslg.pas.common.utils.JsonUtils;
|
|
|
+import cn.cslg.pas.common.utils.StringUtils;
|
|
|
import cn.cslg.pas.domain.PQueueData;
|
|
|
import cn.cslg.pas.domain.QuestionRecord;
|
|
|
import cn.cslg.pas.domain.QueueData;
|
|
@@ -593,6 +594,22 @@ public class PantentQueueService {
|
|
|
updateTask.setDefaultNum(task.getDefaultNum());
|
|
|
updateTask.setTrueSuccessNum(task.getSuccessNum() - updateTask.getDefaultNum());
|
|
|
taskService.updateById(updateTask);
|
|
|
+
|
|
|
+ //任务条件表更新isAddPatentNos
|
|
|
+ if (task.getIsAddPatentNos() != null && task.getIsAddPatentNos().size() > 0) {
|
|
|
+ ArrayList<String> updateIsAddPatentNos = new ArrayList<>(task.getIsAddPatentNos());
|
|
|
+ updateIsAddPatentNos.removeIf(item -> item.equals(queueData.getUploadParamsVO().getPatent().getPatentNo()));
|
|
|
+ updateIsAddPatentNos.removeIf(item -> item.equals(queueData.getUploadParamsVO().getPatent().getApplicationNo()));
|
|
|
+
|
|
|
+ TaskCondition taskCondition = new TaskCondition()
|
|
|
+ .setId(task.getTaskConditionId())
|
|
|
+ .setIsAddPatentNos(StringUtils.join(updateIsAddPatentNos, ","));
|
|
|
+ taskConditionService.updateById(taskCondition);
|
|
|
+
|
|
|
+ task.setIsAddPatentNos(updateIsAddPatentNos);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
long percentage = (long) Math.floor((task.getSuccessNum() + 0D) / total * 100D);
|
|
|
//当全部完成时
|
|
|
if (task.getSuccessNum().equals(total)) {
|
|
@@ -752,7 +769,7 @@ public class PantentQueueService {
|
|
|
* @param taskId 任务id
|
|
|
*/
|
|
|
public void setQueueRemoveTasks(Integer taskId) {
|
|
|
- //任务暂停时清除生产者队列中已有的该任务的所有专利
|
|
|
+ //任务暂停时清除生产者队列中该任务元素
|
|
|
this.setPatentZhuluQueueList.removeIf(pQueueData -> pQueueData.getTask().getId().equals(taskId));
|
|
|
this.setPatentRightQueueList.removeIf(pQueueData -> pQueueData.getTask().getId().equals(taskId));
|
|
|
this.setPatentInstructionTextQueueList.removeIf(pQueueData -> pQueueData.getTask().getId().equals(taskId));
|
|
@@ -773,14 +790,15 @@ public class PantentQueueService {
|
|
|
this.patentInstructionPDFQueueList.removeIf(queueData -> queueData.getTask().getId().equals(taskId));
|
|
|
this.patentImageQueueList.removeIf(queueData -> queueData.getTask().getId().equals(taskId));
|
|
|
//任务暂停时清除 patentIdMap(任务id + "|" + 专利id,拼接而成的专利的数量标识(作为辨别某一任务的某一专利消费完成的消费者数量))中该任务的专利数量标识
|
|
|
- Iterator<String> iterator = this.patentIdMap.keySet().iterator();
|
|
|
- while (iterator.hasNext()) {
|
|
|
- String key = iterator.next();
|
|
|
- if (key.contains(taskId + "")) {
|
|
|
- iterator.remove();
|
|
|
- this.patentIdMap.remove(key);
|
|
|
- }
|
|
|
- }
|
|
|
+// Iterator<String> iterator = this.patentIdMap.keySet().iterator();
|
|
|
+ this.patentIdMap.keySet().removeIf(item -> item.contains(taskId + "|"));
|
|
|
+// while (iterator.hasNext()) {
|
|
|
+// String key = iterator.next();
|
|
|
+// if (key.contains(taskId + "|")) {
|
|
|
+// iterator.remove();
|
|
|
+// this.patentIdMap.remove(key);
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
}
|
|
|
|