|
@@ -8,19 +8,16 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.ruoyi.zdsz.domain.ZArea;
|
|
|
-import com.ruoyi.zdsz.domain.bo.ZAreaBo;
|
|
|
import com.ruoyi.zdsz.domain.bo.ZBuildingBo;
|
|
|
import com.ruoyi.zdsz.domain.bo.ZEngineeringNodeBo;
|
|
|
import com.ruoyi.zdsz.domain.vo.*;
|
|
|
import com.ruoyi.zdsz.mapper.ZAreaMapper;
|
|
|
import com.ruoyi.zdsz.service.IZEngineeringNodeService;
|
|
|
-import com.ruoyi.zdsz.service.IZEngineeringReviewService;
|
|
|
import com.ruoyi.zdsz.service.IZMaterialStatisticsService;
|
|
|
+import com.ruoyi.zdsz.task.RiewTask;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
-import lombok.Value;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.ruoyi.zdsz.domain.bo.ZEngineeringCivilBo;
|
|
|
import com.ruoyi.zdsz.domain.ZEngineeringCivil;
|
|
@@ -337,15 +334,36 @@ public class ZEngineeringCivilServiceImpl implements IZEngineeringCivilService {
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getEnginClassification()), ZEngineeringCivil::getEnginClassification, bo.getEnginClassification());
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getEnginType()), ZEngineeringCivil::getEnginType, bo.getEnginType());
|
|
|
List<ZEngineeringCivil> zEngineeringCivilList=baseMapper.selectList(lqw);
|
|
|
-
|
|
|
+ int count=50;
|
|
|
+ List <ZEngineeringCivil> newList = new ArrayList() ;
|
|
|
if (zEngineeringCivilList.size()>0)
|
|
|
{
|
|
|
- ScheduledThreadPoolExecutor threadPoolTaskExecutor=new ScheduledThreadPoolExecutor((zEngineeringCivilList.size()/50)+1);
|
|
|
- CountDownLatch countDownLatch = new CountDownLatch((zEngineeringCivilList.size()/50)+1);
|
|
|
+ int runSize=zEngineeringCivilList.size()/count+1;
|
|
|
+ ScheduledThreadPoolExecutor threadPoolTaskExecutor=new ScheduledThreadPoolExecutor(runSize);
|
|
|
+ CountDownLatch countDownLatch = new CountDownLatch(runSize);
|
|
|
+
|
|
|
+ for(int i=0;i<runSize;i++)
|
|
|
+ {
|
|
|
+ if((i+1)==runSize){
|
|
|
+ int startIndex = (i*count);;
|
|
|
+ int endIndex = zEngineeringCivilList.size();
|
|
|
+ newList =zEngineeringCivilList.subList(startIndex,endIndex);
|
|
|
+ }else{
|
|
|
+ int startIndex = i*count;;
|
|
|
+ int endIndex = (i+1)*count;
|
|
|
+ newList =zEngineeringCivilList.subList(startIndex,endIndex);
|
|
|
+ }
|
|
|
+
|
|
|
+ threadPoolTaskExecutor.execute(new RiewTask(newList,zEngineeringNodeBo));
|
|
|
+ }
|
|
|
+
|
|
|
+ threadPoolTaskExecutor.shutdown();
|
|
|
|
|
|
- izEngineeringNodeService.batchReview(zEngineeringCivilList,zEngineeringNodeBo);
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+
|