Commit abcd8f35 authored by tianbo's avatar tianbo

气瓶详情图片

parent 9f78b0f6
package com.yeejoin.amos.boot.module.tzs.flc.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -8,6 +9,7 @@ import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 气瓶基本信息
......@@ -143,4 +145,6 @@ public class CylinderInfoDto extends BaseDto {
@ApiModelProperty(value = "企业负责人")
private String unitPerson;
@ApiModelProperty(value = "附件")
private Map<String, List<AttachmentDto>> attachments;
}
......@@ -6,6 +6,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import com.yeejoin.amos.boot.module.tzs.api.entity.MsgLog;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.ESCylinderServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
......@@ -20,6 +23,7 @@ import com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.CylinderUnitService
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.common.recycler.Recycler;
......@@ -74,6 +78,8 @@ public class CylinderInfoController extends BaseController {
private Map<Integer, String> regionMap;
@Autowired
private SourceFileServiceImpl sourceFileService;
/**
* 新增气瓶基本信息
......@@ -554,6 +560,8 @@ public class CylinderInfoController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "获取气瓶详细信息", notes = "获取气瓶详细信息")
public ResponseModel<CylinderInfoDto> cyinderInfoList(@PathVariable Long sequenceNbr) {
CylinderInfo cylinderInfo = cylinderInfoServiceImpl.getById(sequenceNbr);
Map<String, List<AttachmentDto>> imgMap = sourceFileService.getAttachments(cylinderInfo.getSequenceNbr());
CylinderInfoDto target = new CylinderInfoDto();
// 把原对象数据拷贝到新对象
BeanUtils.copyProperties(cylinderInfo, target);
......@@ -591,7 +599,7 @@ public class CylinderInfoController extends BaseController {
} else {
target.setInspectionStatas(0);
}
target.setAttachments(imgMap);
return ResponseHelper.buildResponse(target);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment