Compare commits
No commits in common. "41227ec816b4ae50ae424416b4c3368a5c929983" and "c742686502b9e8b96b195f63ed00d6d23b9ca710" have entirely different histories.
41227ec816
...
c742686502
@ -27,7 +27,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -118,24 +117,7 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe
|
|||||||
queryWrapper.eq(CurrTaskDet.IDEN_CARD_NUM, idCard)
|
queryWrapper.eq(CurrTaskDet.IDEN_CARD_NUM, idCard)
|
||||||
.eq(CurrTaskDet.VALID, 1);
|
.eq(CurrTaskDet.VALID, 1);
|
||||||
List<CurrTaskDet> list = currTaskDetServiceBiz.list(queryWrapper);
|
List<CurrTaskDet> list = currTaskDetServiceBiz.list(queryWrapper);
|
||||||
Iterator<CurrTaskDet> iterator=list.iterator();
|
list.forEach(e -> {
|
||||||
while (iterator.hasNext()){
|
|
||||||
CurrTaskDet currTaskDet = iterator.next();
|
|
||||||
CurrTaskVo byId = currTaskService.getCurrTask(IdParam.builder().id(currTaskDet.getCurrTaskId()).build());
|
|
||||||
//如果加工类型是复加工,或者任务作废。移除对象
|
|
||||||
if (byId.getProcessType().equals(2) || byId.getValid() != 1)
|
|
||||||
{
|
|
||||||
iterator.remove();
|
|
||||||
}
|
|
||||||
//如果是多步骤任务且不是第一步,移除对象
|
|
||||||
if (byId.getIsAuto()==1){
|
|
||||||
AutoExeTask autoExeTask = autoExeTaskServiceBiz.getById(byId.getAutoExeTaskId());
|
|
||||||
if (!byId.getId().equals(autoExeTask.getFTaskId())){
|
|
||||||
iterator.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* list.forEach(e -> {
|
|
||||||
CurrTaskVo byId = currTaskService.getCurrTask(IdParam.builder().id(e.getCurrTaskId()).build());
|
CurrTaskVo byId = currTaskService.getCurrTask(IdParam.builder().id(e.getCurrTaskId()).build());
|
||||||
//如果加工类型是复加工,或者任务作废。移除对象
|
//如果加工类型是复加工,或者任务作废。移除对象
|
||||||
if (byId.getProcessType().equals(2) || byId.getValid() != 1)
|
if (byId.getProcessType().equals(2) || byId.getValid() != 1)
|
||||||
@ -149,7 +131,7 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe
|
|||||||
list.remove(e);
|
list.remove(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});*/
|
});
|
||||||
//计算加工总数
|
//计算加工总数
|
||||||
double sumWeight = list.stream().mapToDouble(CurrTaskDet::getWeight).sum();
|
double sumWeight = list.stream().mapToDouble(CurrTaskDet::getWeight).sum();
|
||||||
double sumQuantity = list.stream().mapToDouble(CurrTaskDet::getQuantity).sum();
|
double sumQuantity = list.stream().mapToDouble(CurrTaskDet::getQuantity).sum();
|
||||||
|
@ -24,7 +24,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,24 +75,7 @@ public class TaskDetHisServiceImpl extends BaseService implements TaskDetHisServ
|
|||||||
queryWrapper.eq(TaskDetHis.IDEN_CARD_NUM, idCard)
|
queryWrapper.eq(TaskDetHis.IDEN_CARD_NUM, idCard)
|
||||||
.eq(TaskDetHis.VALID, 1);
|
.eq(TaskDetHis.VALID, 1);
|
||||||
List<TaskDetHis> list = taskDetHisServiceBiz.list(queryWrapper);
|
List<TaskDetHis> list = taskDetHisServiceBiz.list(queryWrapper);
|
||||||
Iterator<TaskDetHis> iterator=list.iterator();
|
list.forEach(e -> {
|
||||||
while (iterator.hasNext()){
|
|
||||||
TaskDetHis taskDetHis = iterator.next();
|
|
||||||
CurrTaskVo byId = taskhisService.getById(IdParam.builder().id(taskDetHis.getCurrTaskId()).build());
|
|
||||||
//如果加工类型是复加工,或者任务作废。移除对象
|
|
||||||
if (byId.getProcessType().equals(2) || byId.getValid() != 1)
|
|
||||||
{
|
|
||||||
iterator.remove();
|
|
||||||
}
|
|
||||||
//如果是多步骤任务且不是第一步,移除对象
|
|
||||||
if (byId.getIsAuto()==1){
|
|
||||||
AutoExeTask autoExeTask = autoExeTaskServiceBiz.getById(byId.getAutoExeTaskId());
|
|
||||||
if (!byId.getId().equals(autoExeTask.getFTaskId())){
|
|
||||||
iterator.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* list.forEach(e -> {
|
|
||||||
CurrTaskVo byId = taskhisService.getById(IdParam.builder().id(e.getCurrTaskId()).build());
|
CurrTaskVo byId = taskhisService.getById(IdParam.builder().id(e.getCurrTaskId()).build());
|
||||||
//如果加工类型是复加工,或者任务作废。移除对象
|
//如果加工类型是复加工,或者任务作废。移除对象
|
||||||
if (byId.getProcessType().equals(2) || byId.getValid() != 1)
|
if (byId.getProcessType().equals(2) || byId.getValid() != 1)
|
||||||
@ -107,7 +89,7 @@ public class TaskDetHisServiceImpl extends BaseService implements TaskDetHisServ
|
|||||||
list.remove(e);
|
list.remove(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});*/
|
});
|
||||||
//计算加工总数
|
//计算加工总数
|
||||||
double sumWeight = list.stream().mapToDouble(TaskDetHis::getWeight).sum();
|
double sumWeight = list.stream().mapToDouble(TaskDetHis::getWeight).sum();
|
||||||
double sumQuantity = list.stream().mapToDouble(TaskDetHis::getQuantity).sum();
|
double sumQuantity = list.stream().mapToDouble(TaskDetHis::getQuantity).sum();
|
||||||
|
Loading…
Reference in New Issue
Block a user