水质列表查询接口开发, 水质导入导出接口开发

master
徐杰盟 2024-01-25 16:02:16 +08:00
parent 7fa8ddc11f
commit 83a9522da9
9 changed files with 731 additions and 36 deletions

17
pom.xml
View File

@ -27,6 +27,15 @@
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</dependency> </dependency>
<!--
excel导出
-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.3.2</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -48,6 +57,14 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>15</source>
<target>15</target>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
<repositories> <repositories>

View File

@ -0,0 +1,95 @@
package com.gunshi.project.xyt.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R;
import com.gunshi.project.xyt.model.StWaterQualityR;
import com.gunshi.project.xyt.service.WaterQualityService;
import com.gunshi.project.xyt.so.WaterQualityPageSo;
import com.gunshi.project.xyt.validate.markers.QueryPage;
import com.gunshi.project.xyt.validate.markers.QueryTimeRange;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
/**
* Description:
* Created by xusan on 2024/1/23
*
* @author xusan
* @version 1.0
*/
@RestController
@Slf4j
@Tag(name = "水质整编接口-controller", description = "水质整编接口")
@Data
@RequestMapping("/waterQuality")
public class WaterQualityController {
private final WaterQualityService waterqualityService;
// @Operation(summary = "新增水质监测数据")
// @ApiResponses(value = {
// @ApiResponse(responseCode = "200",description = "成功")
// })
// @PostMapping("/add")
// public R<String> add(@RequestBody @Validated StWaterQualityR organization){
// return R.ok(waterqualityService.add(organization));
// }
//
// @Operation(summary = "更新水质监测数据")
// @ApiResponses(value = {
// @ApiResponse(responseCode = "200",description = "成功")
// })
// @PostMapping("/update")
// public R<String> update(@RequestBody @Validated StWaterQualityR organization){
// return R.ok(waterqualityService.update(organization));
// }
//
// @Operation(summary = "根据id删除水质监测数据")
// @Parameter(name = "id", description = "水质监测数据id")
// @DeleteMapping("/delete")
// public R<String> delete(@RequestParam("id") String orgCode){
// return R.ok(waterqualityService.delete(orgCode));
// }
@Operation(summary = "水质监测数据分页查询")
@PostMapping("/page")
public R<Page<StWaterQualityR>> page(
@Validated({QueryPage.class, QueryTimeRange.class}) @RequestBody
WaterQualityPageSo waterQualityPageSo
) {
return R.ok(waterqualityService.page(waterQualityPageSo));
}
@Operation(summary = "水质监测数据导出")
@GetMapping("/export")
public void export(WaterQualityPageSo waterQualityPageSo, HttpServletResponse response) {
waterqualityService.export(waterQualityPageSo, response);
}
@Operation(summary = "水质监测数据导入")
@GetMapping("/import")
public R<String> importExcel(@RequestParam("file") MultipartFile file) {
if (file.isEmpty()) {
return R.error(400, "请选择上传文件");
}
try {
return R.ok( waterqualityService.importExcel(file));
} catch (IOException e) {
return R.error(500, "文件上传失败: " + e.getMessage());
}
}
}

View File

@ -0,0 +1,16 @@
package com.gunshi.project.xyt.mapper;
import com.gunshi.db.dao.IMapper;
import com.gunshi.project.xyt.model.StWaterQualityR;
import org.apache.ibatis.annotations.Mapper;
/**
* Description:
* Created by XuSan on 2024/1/23.
*
* @author XuSan
* @version 1.0
*/
@Mapper
public interface WaterQualityMapper extends IMapper<StWaterQualityR> {
}

View File

@ -0,0 +1,280 @@
package com.gunshi.project.xyt.model;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* Description:
* Created by XuSan on 2024/1/23.
*
* @author XuSan
* @version 1.0
*/
/**
*
*/
@Data
@TableName(value = "ST_WATER_QUALITY_R")
@Schema(description = "水质自动监测数据表")
public class StWaterQualityR {
/**
* id
*/
@TableId(value = "ID", type = IdType.AUTO)
@Schema(description = "主键id")
@ExcelProperty("编号")
private Integer id;
/**
*
*/
@TableField(value = "STCD")
@Schema(description = "站码")
@ExcelProperty("站码")
private String stcd;
/**
*
*/
@TableField(value = "SPT")
@Schema(description = "采样时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
@ExcelProperty("采样时间")
private LocalDateTime spt;
/**
*
*/
@TableField(value = "WIMP")
@Schema(description = "水温")
@ExcelProperty("水温")
private BigDecimal wimp;
/**
* PH
*/
@TableField(value = "PH")
@Schema(description = "PH值")
@ExcelProperty("PH值")
private BigDecimal ph;
/**
*
*/
@TableField(value = "COND")
@Schema(description = "电导率")
@ExcelProperty("电导率")
private BigDecimal cond;
/**
*
*/
@TableField(value = "TURB")
@Schema(description = "浑浊度")
@ExcelProperty("浑浊度")
private BigDecimal turb;
/**
*
*/
@TableField(value = "DOX")
@Schema(description = "溶解氧")
@ExcelProperty("溶解氧")
private BigDecimal dox;
/**
*
*/
@TableField(value = "CODMN")
@Schema(description = "高锰酸钾指数")
@ExcelProperty("高锰酸钾指数")
private BigDecimal codmn;
/**
*
*/
@TableField(value = "CODCR")
@Schema(description = "化学需氧量")
@ExcelProperty("化学需氧量")
private BigDecimal codcr;
/**
*
*/
@TableField(value = "TN")
@Schema(description = "总氮")
@ExcelProperty("总氮")
private BigDecimal tn;
/**
*
*/
@TableField(value = "NH3N")
@Schema(description = "氨氮")
@ExcelProperty("氨氮")
private BigDecimal nh3N;
/**
*
*/
@TableField(value = "NO2")
@Schema(description = "亚硝酸盐氮")
@ExcelProperty("亚硝酸盐氮")
private BigDecimal no2;
/**
*
*/
@TableField(value = "NO3")
@Schema(description = "硝酸盐氮")
@ExcelProperty("硝酸盐氮")
private BigDecimal no3;
/**
*
*/
@TableField(value = "TP")
@Schema(description = "总磷")
@ExcelProperty("总磷")
private BigDecimal tp;
/**
*
*/
@TableField(value = "TOC")
@Schema(description = "总有机碳")
@ExcelProperty("总有机碳")
private BigDecimal toc;
/**
*
*/
@TableField(value = "VLPH")
@Schema(description = "挥发酚")
@ExcelProperty("挥发酚")
private BigDecimal vlph;
/**
* 绿a
*/
@TableField(value = "CHLA")
@Schema(description = "叶绿素a")
@ExcelProperty("叶绿素a")
private BigDecimal chla;
/**
*
*/
@TableField(value = "F")
@Schema(description = "氟化物")
@ExcelProperty("氟化物")
private BigDecimal f;
/**
*
*/
@TableField(value = "ARS")
@Schema(description = "砷")
@ExcelProperty("砷")
private BigDecimal ars;
/**
*
*/
@TableField(value = "HG")
@Schema(description = "汞")
@ExcelProperty("汞")
private BigDecimal hg;
/**
* ()
*/
@TableField(value = "CR6")
@Schema(description = "铬(六价)")
@ExcelProperty("铬(六价)")
private BigDecimal cr6;
/**
*
*/
@TableField(value = "CU")
@Schema(description = "铜")
@ExcelProperty("铜")
private BigDecimal cu;
/**
*
*/
@TableField(value = "PB")
@Schema(description = "铅")
@ExcelProperty("铅")
private BigDecimal pb;
/**
*
*/
@TableField(value = "CD")
@Schema(description = "镉")
@ExcelProperty("镉")
private BigDecimal cd;
/**
*
*/
@TableField(value = "ZN")
@Schema(description = "锌")
@ExcelProperty("锌")
private BigDecimal zn;
/**
*
*/
@TableField(value = "SB")
@Schema(description = "锑")
@ExcelProperty("锑")
private BigDecimal sb;
/**
* 湿
*/
@TableField(value = "HUMIDITY")
@Schema(description = "湿度")
@ExcelProperty("湿度")
private BigDecimal humidity;
/**
*
*/
@TableField(value = "ROOMTMP")
@Schema(description = "室温")
@ExcelProperty("室温")
private BigDecimal roomtmp;
/**
*
*/
@TableField(value = "CATEGORY")
@Schema(description = "水质类别")
@ExcelProperty("水质类别")
private BigDecimal category;
/**
*
*/
@TableField(value = "POLLUTER")
@Schema(description = "污染物")
@ExcelProperty("污染物")
private BigDecimal polluter;
}

View File

@ -0,0 +1,34 @@
package com.gunshi.project.xyt.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.project.xyt.model.StWaterQualityR;
import com.gunshi.project.xyt.so.WaterQualityPageSo;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.List;
/**
* Description:
* Created by xusan on 2024/1/23
*
* @author xusan
* @version 1.0
*/
public interface WaterQualityService {
Page<StWaterQualityR> page(WaterQualityPageSo waterQualityPageSo);
void export(WaterQualityPageSo waterQualityPageSo, HttpServletResponse response);
String importExcel(MultipartFile file) throws IOException;
String add(StWaterQualityR stWaterQualityR);
String addList(List<StWaterQualityR> stWaterQualityRList);
String update(StWaterQualityR StWaterQualityR);
String delete(String id);
}

View File

@ -0,0 +1,173 @@
package com.gunshi.project.xyt.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.read.listener.PageReadListener;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.db.dao.BaseOrderDao;
import com.gunshi.project.xyt.mapper.WaterQualityMapper;
import com.gunshi.project.xyt.model.StWaterQualityR;
import com.gunshi.project.xyt.service.WaterQualityService;
import com.gunshi.project.xyt.so.WaterQualityPageSo;
import jakarta.servlet.http.HttpServletResponse;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
/**
* Description:
* Created by xusan on 2023/1/23.
*
* @author xusan
* @version 1.0
*/
@EqualsAndHashCode(callSuper = true)
@Service
@Data
@Transactional(rollbackFor = Exception.class)
@Slf4j
public class WaterQualityServiceImpl extends BaseOrderDao<WaterQualityMapper, StWaterQualityR> implements WaterQualityService {
/**
*
*
* @param so
*/
@Override
public Page<StWaterQualityR> page(WaterQualityPageSo so) {
LambdaQueryWrapper<StWaterQualityR> query = Wrappers.lambdaQuery();
if (so.getStm() != null) {
query.ge(StWaterQualityR::getSpt, so.getStm());
}
if (so.getEtm() != null) {
query.le(StWaterQualityR::getSpt, so.getEtm());
}
return super.page(so.toPage(), query);
}
/**
*
*
* @param so
*/
@Override
public void export(WaterQualityPageSo so , HttpServletResponse response) {
// 获取基础数据
Page<StWaterQualityR> page = page(so);
// 生成文件名
String fileName = "水质统计表 "
+ DateFormatUtils.format(so.getStm(), DateFormatString.YYYY_MM_DD_HH_MM_SS)
+ "至"
+ DateFormatUtils.format(so.getEtm(), DateFormatString.YYYY_MM_DD_HH_MM_SS)
+ ".xlsx";
// String tempPath = System.getProperty("java.io.tmpdir") + IdUtil.fastSimpleUUID() + ".xlsx";
// String tempPath = System.getProperty("java.io.tmpdir") + fileName + ".xlsx";
// File file = new File(tempPath);
//
// // 指定模板文件
// ExcelWriter excelWriter = EasyExcel.write(file, StWaterQualityR.class).build();
//
// WriteSheet writeSheet = EasyExcel.writerSheet(1, "水质").build();
// // 分页去数据库查询数据 这里可以去数据库查询每一页的数据
// List<StWaterQualityR> data = page.getRecords();
// excelWriter.write(data, writeSheet);
//
// // 千万别忘记finish 会帮忙关闭流
// excelWriter.finish();
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码
response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8));
// 数据输出
try {
EasyExcel.write(response.getOutputStream(), StWaterQualityR.class).sheet("水质").doWrite(page.getRecords());
} catch (IOException e) {
log.error("水质文件下载失败, " + e.getMessage(),e);
throw new RuntimeException(e);
}
}
@Override
public String importExcel(MultipartFile file) throws IOException {
// 创建一个用于存储数据的List
List<StWaterQualityR> data = new ArrayList<>();
EasyExcel.read(file.getInputStream(), StWaterQualityR.class, new PageReadListener<StWaterQualityR>(data::addAll)).sheet().doRead();
for (StWaterQualityR o : data) {
o.setId(null);
}
return this.addList(data);
}
/**
*
*
* @param o
*/
@Override
public String add(StWaterQualityR o) {
return this.save(o) ? "成功":"失败";
}
@Override
public String addList(List<StWaterQualityR> stWaterQualityRList) {
try {
for (StWaterQualityR o : stWaterQualityRList) {
this.add(o);
}
}catch (Exception e) {
return "失败";
}
return "成功";
// return this.saveBatch(stWaterQualityRList) ? "成功":"失败";
}
/**
*
*
* @param o
*/
@Override
public String update(StWaterQualityR o) {
return this.updateById(o) ? "成功":"失败";
}
/**
*
*
* @param id id
*/
@Override
public String delete(String id) {
return this.removeById(id) ? "成功":"失败";
}
}

View File

@ -0,0 +1,36 @@
package com.gunshi.project.xyt.so;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gunshi.core.dateformat.DateFormatString;
import com.gunshi.db.dto.PageSo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* Description:
* Created by XuSan on 2024/1/23.
*
* @author XuSan
* @version 1.0
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class WaterQualityPageSo extends PageSo {
@Schema(description = "查询开始时间", pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS,
example = DateFormatString.YYYY_MM_DD_HH_MM_SS_EXAMPLE)
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
@DateTimeFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS)
private Date stm;
@Schema(description = "查询结束时间", pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS,
example = DateFormatString.YYYY_MM_DD_HH_MM_SS_EXAMPLE)
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
@DateTimeFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS)
private Date etm;
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gunshi.project.xyt.mapper.WaterQualityMapper">
</mapper>

View File

@ -1,40 +1,76 @@
CREATE TABLE [xyt].[HYD_RI_WQAMD_W] # CREATE TABLE [xyt].[HYD_RI_WQAMD_W]
( # (
[STCD] CHAR(14) NOT NULL, # [STCD] CHAR(14) NOT NULL,
[SPT] DATETIME2(6) NOT NULL, # [SPT] DATETIME2(6) NOT NULL,
[WIMP] DECIMAL(4,2), # [WIMP] DECIMAL(4,2),
[PH] DECIMAL(4,2), # [PH] DECIMAL(4,2),
[COND] DECIMAL(6,0), # [COND] DECIMAL(6,0),
[TURB] DECIMAL(3,0), # [TURB] DECIMAL(3,0),
[DOX] DECIMAL(4,2), # [DOX] DECIMAL(4,2),
[CODMN] DECIMAL(6,1), # [CODMN] DECIMAL(6,1),
[CODCR] DECIMAL(7,1), # [CODCR] DECIMAL(7,1),
[TN] DECIMAL(6,3), # [TN] DECIMAL(6,3),
[NH3N] DECIMAL(6,3), # [NH3N] DECIMAL(6,3),
[NO2] DECIMAL(5,3), # [NO2] DECIMAL(5,3),
[NO3] DECIMAL(5,3), # [NO3] DECIMAL(5,3),
[TP] DECIMAL(8,3), # [TP] DECIMAL(8,3),
[TOC] DECIMAL(4,1), # [TOC] DECIMAL(4,1),
[VLPH] DECIMAL(10,6), # [VLPH] DECIMAL(10,6),
[CHLA] DECIMAL(6,4), # [CHLA] DECIMAL(6,4),
[F] DECIMAL(5,2), # [F] DECIMAL(5,2),
[ARS] DECIMAL(8,6), # [ARS] DECIMAL(8,6),
[HG] DECIMAL(9,7), # [HG] DECIMAL(9,7),
[CR6] DECIMAL(5,3), # [CR6] DECIMAL(5,3),
[CU] DECIMAL(7,5), # [CU] DECIMAL(7,5),
[PB] DECIMAL(7,5), # [PB] DECIMAL(7,5),
[CD] DECIMAL(7,5), # [CD] DECIMAL(7,5),
[ZN] DECIMAL(6,4), # [ZN] DECIMAL(6,4),
[SB] DECIMAL(7,5), # [SB] DECIMAL(7,5),
[HUMIDITY] DECIMAL(4,2), # [HUMIDITY] DECIMAL(4,2),
[ROOMTMP] DECIMAL(4,2), # [ROOMTMP] DECIMAL(4,2),
[ID] INT IDENTITY(1, 1) NOT NULL, # [ID] INT IDENTITY(1, 1) NOT NULL,
CONSTRAINT [PK_HYD_RI_WQAMD_W] PRIMARY KEY CLUSTERED ([ID]), # CONSTRAINT [PK_HYD_RI_WQAMD_W] PRIMARY KEY CLUSTERED ([ID]),
CONSTRAINT [UQ_HYD_RI_WQAMD_W_ID] UNIQUE ([ID]), # CONSTRAINT [UQ_HYD_RI_WQAMD_W_ID] UNIQUE ([ID]),
CONSTRAINT [UQ_HYD_RI_WQAMD_W_STCD_SPT] UNIQUE ([STCD], [SPT]) # CONSTRAINT [UQ_HYD_RI_WQAMD_W_STCD_SPT] UNIQUE ([STCD], [SPT])
) ON [MAIN] WITH (DATA_COMPRESSION = CLUSTERED COLUMNSTORE); # ) ON [MAIN] WITH (DATA_COMPRESSION = CLUSTERED COLUMNSTORE);
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'水质自动监测数据' , @level0type=N'SCHEMA',@level0name=N'xyt', @level1type=N'TABLE',@level1name=N'HYD_RI_WQAMD_W'; CREATE TABLE [HYD_RI_WQAMD_W]
(
[STCD] VARCHAR(14) NOT NULL,
[SPT] DATETIME2(6) NOT NULL,
[WIMP] DECIMAL(4,2),
[PH] DECIMAL(4,2),
[COND] DECIMAL(6,0),
[TURB] DECIMAL(3,0),
[DOX] DECIMAL(4,2),
[CODMN] DECIMAL(6,1),
[CODCR] DECIMAL(7,1),
[TN] DECIMAL(6,3),
[NH3N] DECIMAL(6,3),
[NO2] DECIMAL(5,3),
[NO3] DECIMAL(5,3),
[TP] DECIMAL(8,3),
[TOC] DECIMAL(4,1),
[VLPH] DECIMAL(10,6),
[CHLA] DECIMAL(6,4),
[F] DECIMAL(5,2),
[ARS] DECIMAL(8,6),
[HG] DECIMAL(9,7),
[CR6] DECIMAL(5,3),
[CU] DECIMAL(7,5),
[PB] DECIMAL(7,5),
[CD] DECIMAL(7,5),
[ZN] DECIMAL(6,4),
[SB] DECIMAL(7,5),
[HUMIDITY] DECIMAL(4,2),
[ROOMTMP] DECIMAL(4,2),
[ID] INT IDENTITY(1, 1) NOT NULL,
CONSTRAINT [PK_HYD_RI_WQAMD_W] PRIMARY KEY CLUSTERED ([ID]),
CONSTRAINT [UQ_HYD_RI_WQAMD_W_ID] UNIQUE ([ID]),
CONSTRAINT [UQ_HYD_RI_WQAMD_W_STCD_SPT] UNIQUE ([STCD], [SPT])
)
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'水质自动监测数据' , @level0type=N'SCHEMA',@level0name=N'xyt', @level1type=N'TABLE',@level1name=N'HYD_RI_WQAMD_W';
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'xyt', @level1type=N'TABLE',@level1name=N'HYD_RI_WQAMD_W', @level2type=N'COLUMN',@level2name=N'ARS'; EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'xyt', @level1type=N'TABLE',@level1name=N'HYD_RI_WQAMD_W', @level2type=N'COLUMN',@level2name=N'ARS';
@ -93,3 +129,6 @@ EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'水温' , @lev
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'xyt', @level1type=N'TABLE',@level1name=N'HYD_RI_WQAMD_W', @level2type=N'COLUMN',@level2name=N'ZN'; EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'xyt', @level1type=N'TABLE',@level1name=N'HYD_RI_WQAMD_W', @level2type=N'COLUMN',@level2name=N'ZN';
CREATE INDEX [IX_HYD_RI_WQAMD_W_STCD_SPT] ON [xyt].[HYD_RI_WQAMD_W] ([STCD] ASC, [SPT] ASC) ON [MAIN] WITH (DATA_COMPRESSION = CLUSTERED COLUMNSTORE); CREATE INDEX [IX_HYD_RI_WQAMD_W_STCD_SPT] ON [xyt].[HYD_RI_WQAMD_W] ([STCD] ASC, [SPT] ASC) ON [MAIN] WITH (DATA_COMPRESSION = CLUSTERED COLUMNSTORE);
SET IDENTITY_INSERT ST_WATER_QUALITY_R ON;