ソースを参照

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.2.0^2
chengwang 1年前
コミット
9650c18a9a
3個のファイルの変更32行の追加6行の削除
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/QuestionType.java
  2. +22
    -6
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java
  3. +5
    -0
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/entity/QuestionType.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/QuestionType.java ファイルの表示

@@ -42,4 +42,9 @@ public class QuestionType extends BaseEntity {
* 事故问题:0:否;1:是
*/
private Integer accidentQuestion;

/**
* 是否展示问题 0:否;1是
*/
private Integer isShow;
}

+ 22
- 6
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java ファイルの表示

@@ -18,6 +18,7 @@ import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.*;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
@@ -263,6 +264,12 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
inspectionFile.setGaodeAddress(gaodeAddress_live);
}
}

Map<String, QuestionType> questionTypeMap = getStringQuestionTypeMap();
QuestionType questionType = questionTypeMap.get(inspectionFile.getQuestionCode());
if(0 == questionType.getIsShow()){
inspectionFile.setMark(MarkEnum.NOTVALID.getCode());
}
return inspectionFile;
}).collect(Collectors.toList());

@@ -289,12 +296,7 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
private Boolean saveAccidentData(List<InspectionFile> inspectionFileList) {
log.info("调用保存应急数据方法,应急数据入库开始....");
List<Accident> accidentList = new ArrayList<>();
List<QuestionType> questionTypeList = questionTypeMapper.selectList(Wrappers.<QuestionType>lambdaQuery()
.eq(QuestionType::getMark, MarkEnum.VALID.getCode()));
Map<String, QuestionType> questionTypeMap = new HashMap<>();
for (QuestionType type : questionTypeList) {
questionTypeMap.put(type.getCode(), type);
}
Map<String, QuestionType> questionTypeMap = getStringQuestionTypeMap();
for (InspectionFile inspectionFile : inspectionFileList) {
QuestionType questionType = questionTypeMap.get(inspectionFile.getQuestionCode());
if (0 == questionType.getAccidentQuestion()) {
@@ -355,6 +357,20 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
return accidentService.saveBatch(accidentList);
}

/**
* 根据问题类型封装成map
* @return
*/
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) {
questionTypeMap.put(type.getCode(), type);
}
return questionTypeMap;
}

/**
* 获取飞行坐标
*

+ 5
- 0
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/entity/QuestionType.java ファイルの表示

@@ -44,4 +44,9 @@ public class QuestionType extends BaseEntity {
*/
private Integer accidentQuestion;

/**
* 是否展示问题 0:否;1是
*/
private Integer isShow;

}

読み込み中…
キャンセル
保存