工程安全信息
parent
8f7a23fde3
commit
0d67c195ec
|
|
@ -0,0 +1,78 @@
|
||||||
|
package com.gunshi.project.ss.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.gunshi.core.result.R;
|
||||||
|
import com.gunshi.project.ss.model.FileAssociations;
|
||||||
|
import com.gunshi.project.ss.model.ReservoirDemarcationInfo;
|
||||||
|
import com.gunshi.project.ss.service.FileAssociationsService;
|
||||||
|
import com.gunshi.project.ss.service.ReservoirDemarcationInfoService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Tag(name = "水库划界信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/reservoirDemarcationInfo")
|
||||||
|
public class ReservoirDemarcationInfoController extends AbstractCommonFileController {
|
||||||
|
|
||||||
|
|
||||||
|
private static final String managementScopeArea = "managementScopeArea";
|
||||||
|
|
||||||
|
private static final String protectionScopeArea = "protectionScopeArea";
|
||||||
|
|
||||||
|
private static final String propertyCertificateArea = "propertyCertificateArea";
|
||||||
|
|
||||||
|
private static final String totalUseArea = "totalUseArea";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ReservoirDemarcationInfoService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FileAssociationsService fileService;
|
||||||
|
|
||||||
|
@Operation(description = "获取信息")
|
||||||
|
@GetMapping("/get")
|
||||||
|
public R<ReservoirDemarcationInfo> get(){
|
||||||
|
ReservoirDemarcationInfo query = service.list().get(0);
|
||||||
|
//获取资料
|
||||||
|
List<FileAssociations> managementScopeAreaFile = fileService.getFiles(managementScopeArea, query.getId().toString());
|
||||||
|
|
||||||
|
List<FileAssociations> protectionScopeAreaFile = fileService.getFiles(protectionScopeArea, query.getId().toString());
|
||||||
|
|
||||||
|
List<FileAssociations> propertyCertificateAreaFile = fileService.getFiles(propertyCertificateArea, query.getId().toString());
|
||||||
|
|
||||||
|
List<FileAssociations> totalUseAreaFile = fileService.getFiles(totalUseArea, query.getId().toString());
|
||||||
|
|
||||||
|
query.setManagementScopeAreaFiles(managementScopeAreaFile);
|
||||||
|
query.setProtectionScopeFiles(protectionScopeAreaFile);
|
||||||
|
query.setPropertyCertificateAreaFiles(propertyCertificateAreaFile);
|
||||||
|
query.setTotalUseAreaFiles(totalUseAreaFile);
|
||||||
|
return R.ok(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "修改")
|
||||||
|
@PostMapping("/update")
|
||||||
|
public R<ReservoirDemarcationInfo> update(@RequestBody ReservoirDemarcationInfo dto){
|
||||||
|
boolean flag = service.updateById(dto);
|
||||||
|
if(flag){
|
||||||
|
fileService.saveFile(dto.getManagementScopeAreaFiles(),managementScopeArea,dto.getId().toString());
|
||||||
|
fileService.saveFile(dto.getProtectionScopeFiles(),protectionScopeArea,dto.getId().toString());
|
||||||
|
fileService.saveFile(dto.getPropertyCertificateAreaFiles(), propertyCertificateArea,dto.getId().toString());
|
||||||
|
fileService.saveFile(dto.getTotalUseAreaFiles(),totalUseArea,dto.getId().toString());
|
||||||
|
}
|
||||||
|
return R.ok(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getGroupId() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.gunshi.project.ss.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.gunshi.project.ss.model.ReservoirDemarcationInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface ReservoirDemarcationInfoMapper extends BaseMapper<ReservoirDemarcationInfo> {
|
||||||
|
}
|
||||||
|
|
@ -631,4 +631,12 @@ public class AttResBase implements Serializable {
|
||||||
@Schema(description = "发证时间")
|
@Schema(description = "发证时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
private LocalDate issuingTime;
|
private LocalDate issuingTime;
|
||||||
|
|
||||||
|
@TableField("charge_person")
|
||||||
|
@Schema(description = "负责人")
|
||||||
|
private String chargePerson;
|
||||||
|
|
||||||
|
@TableField("management_housing")
|
||||||
|
@Schema(description = "管理用房")
|
||||||
|
private String managementHousing;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.gunshi.project.ss.model;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("reservoir_demarcation_info")
|
||||||
|
public class ReservoirDemarcationInfo {
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField("management_scope_area")
|
||||||
|
@Schema(description = "管理范围(km²)")
|
||||||
|
private BigDecimal managementScopeArea;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<FileAssociations> managementScopeAreaFiles;
|
||||||
|
|
||||||
|
@TableField("protection_scope_area")
|
||||||
|
@Schema(description = "保护范围(km²)")
|
||||||
|
private BigDecimal protectionScopeArea;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<FileAssociations> protectionScopeFiles;
|
||||||
|
|
||||||
|
@TableField("property_certificate_area")
|
||||||
|
@Schema(description = "已取得不动产权证书面积(万亩)")
|
||||||
|
private BigDecimal propertyCertificateArea;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<FileAssociations> propertyCertificateAreaFiles;
|
||||||
|
|
||||||
|
@TableField("total_use_area")
|
||||||
|
@Schema(description = "用地总面积(万亩)")
|
||||||
|
private BigDecimal totalUseArea;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<FileAssociations> totalUseAreaFiles;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.gunshi.project.ss.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gunshi.project.ss.mapper.ReservoirDemarcationInfoMapper;
|
||||||
|
import com.gunshi.project.ss.model.ReservoirDemarcationInfo;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class ReservoirDemarcationInfoService extends ServiceImpl<ReservoirDemarcationInfoMapper, ReservoirDemarcationInfo> {
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue