|
@@ -70,6 +70,9 @@ public class FillGatherTaskServiceImpl extends BaseServiceImpl<FillGatherTaskMap
|
|
|
|
|
|
private void deleteDetails(List<String> detailIds,String taskId){
|
|
|
StringBuilder ids = new StringBuilder();
|
|
|
+ Weekend<FillGatherTaskDetail> weekend = new Weekend<>(FillGatherTaskDetail.class);
|
|
|
+ WeekendCriteria<FillGatherTaskDetail,Object> weekendCriteria = weekend.weekendCriteria();
|
|
|
+ List<String> deleteIds = new ArrayList<>();
|
|
|
for(int i=0;i<detailIds.size();i++){
|
|
|
String id = detailIds.get(i);
|
|
|
// 判断是否已填报,未填报的设备不允许删除
|
|
@@ -79,8 +82,11 @@ public class FillGatherTaskServiceImpl extends BaseServiceImpl<FillGatherTaskMap
|
|
|
FillGatherTaskDetail detail = new FillGatherTaskDetail();
|
|
|
detail.setId(detailIds.get(i));
|
|
|
ids.append(detail.getId()).append("&");
|
|
|
- fillGatherTaskDetailMapper.deleteByPrimaryKey(detail);
|
|
|
+ deleteIds.add(detail.getId());
|
|
|
+// fillGatherTaskDetailMapper.deleteByPrimaryKey(detail);
|
|
|
}
|
|
|
+ weekendCriteria.andIn(FillGatherTaskDetail::getId,deleteIds);
|
|
|
+ fillGatherTaskDetailMapper.deleteByExample(weekend);
|
|
|
// 将redis缓存中的集合进行一个删除
|
|
|
String idString = ids.toString();
|
|
|
List<FillGatherTaskDetailVO> list = RedisUtils.getList(taskId,0,-1);
|