修改bug
This commit is contained in:
@@ -41,8 +41,10 @@ import com.njcn.system.pojo.po.DictData;
|
|||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.ListUtils;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@@ -247,7 +249,7 @@ public class PortableOfflLogServiceImpl extends ServiceImpl<PortableOfflLogMappe
|
|||||||
boolean minFlag = true;
|
boolean minFlag = true;
|
||||||
//开始上传文件、记录上传日志、解析的文件结果入库
|
//开始上传文件、记录上传日志、解析的文件结果入库
|
||||||
//最外层便利所有文件确保所有文件都上传及记录上传日志
|
//最外层便利所有文件确保所有文件都上传及记录上传日志
|
||||||
int nowStep = 0;
|
int nowStep = uploadDataParam.getFiles().size();
|
||||||
PortableOffMainLog portableOffMainLog = new PortableOffMainLog();
|
PortableOffMainLog portableOffMainLog = new PortableOffMainLog();
|
||||||
portableOffMainLog.setId(IdUtil.fastSimpleUUID());
|
portableOffMainLog.setId(IdUtil.fastSimpleUUID());
|
||||||
portableOffMainLog.setStartTime(LocalDateTime.now());
|
portableOffMainLog.setStartTime(LocalDateTime.now());
|
||||||
@@ -296,7 +298,11 @@ public class PortableOfflLogServiceImpl extends ServiceImpl<PortableOfflLogMappe
|
|||||||
portableOfflLog.setRealCount(pqdData.size());
|
portableOfflLog.setRealCount(pqdData.size());
|
||||||
if(minFlag){
|
if(minFlag){
|
||||||
log.info("类型min,插入infulxDb的pqdData");
|
log.info("类型min,插入infulxDb的pqdData");
|
||||||
pqdDataMapper.insertBatch(pqdData);
|
List<List<PqdData>> partition = ListUtils.partition(pqdData, 1500);
|
||||||
|
for (List<PqdData> sliceList : partition) {
|
||||||
|
List<PqdData> sublistAsOriginalListType = new ArrayList<>(sliceList);
|
||||||
|
pqdDataMapper.insertBatch(sublistAsOriginalListType);
|
||||||
|
}
|
||||||
//min结果集解析入库后就不需要在解析了
|
//min结果集解析入库后就不需要在解析了
|
||||||
minFlag = false;
|
minFlag = false;
|
||||||
}
|
}
|
||||||
@@ -457,7 +463,7 @@ public class PortableOfflLogServiceImpl extends ServiceImpl<PortableOfflLogMappe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
nowStep++;
|
nowStep++;
|
||||||
String json = "{operate:makeUp,"+"allStep:"+uploadDataParam.getFiles().size()+",nowStep:"+nowStep+"}";
|
String json = "{allStep:"+uploadDataParam.getFiles().size()*2+",nowStep:"+nowStep+"}";
|
||||||
|
|
||||||
publisher.send("/dataOnlineRecruitment/Progress/" + uploadDataParam.getLineId(), new Gson().toJson(json), 1, false);
|
publisher.send("/dataOnlineRecruitment/Progress/" + uploadDataParam.getLineId(), new Gson().toJson(json), 1, false);
|
||||||
//无需解析的不需要记录
|
//无需解析的不需要记录
|
||||||
|
|||||||
Reference in New Issue
Block a user