|
|
@ -35,6 +35,7 @@ import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEnt |
|
|
|
import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessEntity; |
|
|
|
import com.epmet.service.evaluationindex.screen.ScreenProjectProcessAttachmentService; |
|
|
|
import com.epmet.service.evaluationindex.screen.ScreenProjectProcessService; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.collections4.ListUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@ -122,21 +123,24 @@ public class ScreenProjectProcessServiceImpl extends BaseServiceImpl<ScreenProje |
|
|
|
if (CollectionUtils.isEmpty(param.getDataList())){ |
|
|
|
return; |
|
|
|
} |
|
|
|
if (param.getIsFirst()) { |
|
|
|
/*if (param.getIsFirst()) { |
|
|
|
int affectedRows = baseDao.deleteByDateIdAndCustomerId(param.getCustomerId(), param.getDateId()); |
|
|
|
while (affectedRows > 0) { |
|
|
|
affectedRows = baseDao.deleteByDateIdAndCustomerId(param.getCustomerId(), param.getDateId()); |
|
|
|
} |
|
|
|
} |
|
|
|
}*/ |
|
|
|
List<String> processIdList = |
|
|
|
param.getDataList().stream().map(ScreenProjectProcessFormDTO :: getProcessId).collect(Collectors.toList()).stream().distinct() |
|
|
|
.collect(Collectors.toList()); |
|
|
|
if (CollectionUtils.isEmpty(processIdList)){ |
|
|
|
return; |
|
|
|
} |
|
|
|
//删除旧数据
|
|
|
|
baseDao.deleteByProcessIds(param.getCustomerId(), processIdList); |
|
|
|
screenProjectProcessAttachmentDao.deleteByProcessIds(param.getCustomerId(), processIdList); |
|
|
|
Lists.partition(processIdList, NumConstant.TWO_HUNDRED).forEach(list -> { |
|
|
|
//删除旧数据
|
|
|
|
baseDao.deleteByProcessIds(param.getCustomerId(), list); |
|
|
|
screenProjectProcessAttachmentDao.deleteByProcessIds(param.getCustomerId(), list); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
List<ScreenProjectProcessAttachmentEntity> attachmentList = new ArrayList<>(); |
|
|
|
|
|
|
|