Bladeren bron

添加问题类型id

tags/v1.0.0^2
chengwang 1 jaar geleden
bovenliggende
commit
ba86b4f24e
3 gewijzigde bestanden met toevoegingen van 174 en 153 verwijderingen
  1. +149
    -144
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/InspectionFile.java
  2. +15
    -8
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java
  3. +10
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/entity/InspectionFile.java

+ 149
- 144
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/InspectionFile.java Bestand weergeven

@@ -1,144 +1,149 @@
package com.tuoheng.admin.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.core.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.util.Date;
/**
* 巡检任务问题表
*
* @team tuoheng
* @author wanjing
* @date 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_inspection_file")
public class InspectionFile extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 租户ID
*/
private String tenantId;
/**
* 图片编号
*/
private String fileCode;
/**
* 巡检任务ID
*/
private String inspectionId;
/**
* 附件类型:1图片 2视频
*/
private Integer fileType;
/**
* 文件名称
*/
private String fileName;
/**
* 缩略图
*/
private String fileThumbnail;
/**
* 原图
*/
private String fileOriginal;
/**
* 标记图
*/
private String fileImage;
/**
* 文件大小
*/
private Double fileSize;
/**
* 纬度(原始图片纬度)
*/
private String latitude;
/**
* 经度(原始图片经度)
*/
private String longitude;
/**
* 位置信息
*/
private String location;
/**
* 高德地图经度
*/
private String gaodeLongitude;
/**
* 高德地图纬度
*/
private String gaodeLatitude;
/**
* 高德地图地址
*/
private String gaodeAddress;
/**
* 图片来源:1AI 2后台 3视频
*/
private Integer source;
/**
* 问题类型二级分类ID
*/
private String questionCode;
/**
* 问题名称
*/
private String questionName;
/**
* 巡检内容
*/
private String questionContent;
/**
* 详细描述
*/
private String questionDesc;
/**
* 状态:5待确认 10已忽略 15已确认 20已生成工单 25问题已处理
*/
private Integer status;
/**
* 审核人
*/
private String checkUser;
/**
* 审核时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date checkTime;
}
package com.tuoheng.admin.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.core.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
* 巡检任务问题表
*
* @team tuoheng
* @author wanjing
* @date 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_inspection_file")
public class InspectionFile extends BaseEntity {

private static final long serialVersionUID = 1L;

/**
* 租户ID
*/
private String tenantId;

/**
* 图片编号
*/
private String fileCode;

/**
* 巡检任务ID
*/
private String inspectionId;

/**
* 附件类型:1图片 2视频
*/
private Integer fileType;

/**
* 文件名称
*/
private String fileName;

/**
* 缩略图
*/
private String fileThumbnail;

/**
* 原图
*/
private String fileOriginal;

/**
* 标记图
*/
private String fileImage;

/**
* 文件大小
*/
private Double fileSize;

/**
* 纬度(原始图片纬度)
*/
private String latitude;

/**
* 经度(原始图片经度)
*/
private String longitude;

/**
* 位置信息
*/
private String location;

/**
* 高德地图经度
*/
private String gaodeLongitude;

/**
* 高德地图纬度
*/
private String gaodeLatitude;

/**
* 高德地图地址
*/
private String gaodeAddress;

/**
* 图片来源:1AI 2后台 3视频
*/
private Integer source;

/**
* 问题类型二级分类code
*/
private String questionCode;

/**
* 问题类型二级分类ID
*/
private String questionId;

/**
* 问题名称
*/
private String questionName;

/**
* 巡检内容
*/
private String questionContent;

/**
* 详细描述
*/
private String questionDesc;

/**
* 状态:5待确认 10已忽略 15已确认 20已生成工单 25问题已处理
*/
private Integer status;

/**
* 审核人
*/
private String checkUser;

/**
* 审核时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date checkTime;

}

+ 15
- 8
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java Bestand weergeven

@@ -4,15 +4,10 @@ import cn.hutool.core.util.RandomUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tuoheng.admin.entity.Business;
import com.tuoheng.admin.entity.FlightData;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.entity.InspectionFile;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.entity.*;
import com.tuoheng.admin.enums.*;
import com.tuoheng.admin.mapper.BusinessMapper;
import com.tuoheng.admin.mapper.FlightDataMapper;
import com.tuoheng.admin.mapper.InspectionFileMapper;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.request.third.DspCallbackRequest;
import com.tuoheng.admin.request.third.QuestionFile;
import com.tuoheng.admin.utils.GaodeUtil;
@@ -51,6 +46,9 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
@Autowired
private FlightDataMapper flightDataMapper;

@Autowired
private QuestionTypeMapper questionTypeMapper;

/**
* 保存DSP回调数据
*
@@ -158,6 +156,15 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
BeanUtils.copyProperties(questionFile, inspectionFile);
//问题编号
inspectionFile.setQuestionCode(questionFile.getQuestionCode());
//问题id
//根据questionCode查询问题类型表出对应的id值
if(StringUtils.isNotEmpty(questionFile.getQuestionCode())){
QuestionType questionType = questionTypeMapper.selectOne(Wrappers.<QuestionType>lambdaQuery()
.eq(QuestionType::getCode, questionFile.getQuestionCode())
.eq(QuestionType::getMark, 1));
inspectionFile.setQuestionId(questionType.getId());
}

// 问题名称
inspectionFile.setQuestionContent(questionFile.getQuestionName());
inspectionFile.setTenantId(inspection.getTenantId());

+ 10
- 1
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/entity/InspectionFile.java Bestand weergeven

@@ -104,6 +104,11 @@ public class InspectionFile extends BaseEntity {
*/
private String questionId;

/**
* 问题类型二级分类code
*/
private String questionCode;

/**
* 图片来源:1AI 2后台 3视频
*/
@@ -114,10 +119,14 @@ public class InspectionFile extends BaseEntity {
*/
private String questionName;

// /**
// * 巡检内容
// */
// private String content;
/**
* 巡检内容
*/
private String content;
private String questionContent;

/**
* 详细描述

Laden…
Annuleren
Opslaan