Bläddra i källkod

Merge branch 'master' into release

tags/V1.3.2
xiaoying 1 år sedan
förälder
incheckning
32b519ccfa
1 ändrade filer med 12 tillägg och 10 borttagningar
  1. +12
    -10
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java

+ 12
- 10
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java Visa fil

@@ -307,20 +307,11 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
.eq(InspectionFile::getInspectionId, inspection.getId())
.eq(InspectionFile::getMark, MarkEnum.VALID.getCode()));

log.info("批量插入问题图片数据");
CommonUtils.batchOperate((x) -> inspectionFileMapper.addBatch(x), thirstyQuestionFiles, 1000);

Map<String, QuestionType> questionTypeMap = getStringQuestionTypeMap();

log.info("调用saveAccidentData方法保存应急记录数据...");
Boolean result = saveAccidentDataService.saveAccidentData(questionTypeMap, thirstyQuestionFiles);
log.info("预警数据入库完成,result={}", result);

// 生成工单
autoGenerateWorkorderService.generate(inspection, questionTypeMap, thirstyQuestionFiles);

// 通知小程序
if (count <= 0) {
log.info("该任务第一次产生问题,通知小程序, inspectionId={}", inspection.getId());
// 该任务第一次产生问题,通知小程序
if (CollectionUtil.isNotEmpty(thirstyQuestionFiles) && thirstyQuestionFiles.size() > 0) {
InspectionFile inspectionFile = thirstyQuestionFiles.get(0);
@@ -328,6 +319,16 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
noticeWeChatMiniProgramService.notice(inspection, questionType);
}
}

log.info("批量插入问题图片数据");
CommonUtils.batchOperate((x) -> inspectionFileMapper.addBatch(x), thirstyQuestionFiles, 1000);

log.info("调用saveAccidentData方法保存应急记录数据...");
Boolean result = saveAccidentDataService.saveAccidentData(questionTypeMap, thirstyQuestionFiles);
log.info("预警数据入库完成,result={}", result);

// 生成工单
autoGenerateWorkorderService.generate(inspection, questionTypeMap, thirstyQuestionFiles);
}
//释放通道
if (4 == inspection.getAnalyseStatus() || 5 == inspection.getAnalyseStatus() || 6 == inspection.getAnalyseStatus()) {
@@ -351,6 +352,7 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
*/
private Map<String, QuestionType> getStringQuestionTypeMap() {
List<QuestionType> questionTypeList = questionTypeMapper.selectList(Wrappers.<QuestionType>lambdaQuery()

.eq(QuestionType::getMark, MarkEnum.VALID.getCode()));
Map<String, QuestionType> questionTypeMap = new HashMap<>();
for (QuestionType type : questionTypeList) {

Laddar…
Avbryt
Spara