添加渗压,渗流设备管理方法
parent
f1b385dc2d
commit
53cee69133
|
|
@ -17,11 +17,13 @@ import com.gunshi.project.xyt.entity.basedata.SysDictVo;
|
|||
import com.gunshi.project.xyt.model.StAddvcdD;
|
||||
import com.gunshi.project.xyt.model.StCameraAreaB;
|
||||
import com.gunshi.project.xyt.model.StCameraB;
|
||||
import com.gunshi.project.xyt.model.StMoncrB;
|
||||
import com.gunshi.project.xyt.model.StStbprpB;
|
||||
import com.gunshi.project.xyt.model.SysDictB;
|
||||
import com.gunshi.project.xyt.service.StAdcdService;
|
||||
import com.gunshi.project.xyt.service.StCameraAreaService;
|
||||
import com.gunshi.project.xyt.service.StCameraService;
|
||||
import com.gunshi.project.xyt.service.StMoncrService;
|
||||
import com.gunshi.project.xyt.service.StStbprpService;
|
||||
import com.gunshi.project.xyt.service.SysDictService;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
|
|
@ -57,6 +59,7 @@ public class BasicDataController {
|
|||
private final StCameraAreaService stCameraAreaService;
|
||||
private final StCameraService stCameraService;
|
||||
private final StStbprpService stStbprpService;
|
||||
private final StMoncrService stMoncrService;
|
||||
|
||||
|
||||
@Post(path = "/dict/search/query", summary = "查询字典接口")
|
||||
|
|
@ -207,6 +210,27 @@ public class BasicDataController {
|
|||
return R.ok(true);
|
||||
}
|
||||
|
||||
@Post(path = "/monct/manage/insert", summary = "新增监测断面接口")
|
||||
public R<Boolean> insertMonCr(@Validated @RequestBody StMoncrB obj) {
|
||||
stMoncrService.insert(obj);
|
||||
return R.ok(true);
|
||||
}
|
||||
|
||||
@Post(path = "/monct/manage/check", summary = "检查监测断面编码是否存在接口")
|
||||
public R<Boolean> checkMonCrCode(@Validated @RequestBody CheckStringSearch obj) {
|
||||
stMoncrService.checkCode(obj);
|
||||
return R.ok(true);
|
||||
}
|
||||
|
||||
@Post(path = "/monct/manage/update", summary = "更新监测断面接口")
|
||||
public R<Boolean> updateMonCr(@Validated @RequestBody StMoncrB obj) {
|
||||
stMoncrService.update(obj);
|
||||
return R.ok(true);
|
||||
}
|
||||
|
||||
@Post(path = "/monct/search/query", summary = "查询监测断面列表接口")
|
||||
public R<Page<StMoncrB>> queryMonCrList(@Validated @RequestBody GeneralSearch search) {
|
||||
return R.ok(stMoncrService.queryBySearch(search));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import lombok.Data;
|
|||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@Schema(description = "表单参数校验对象")
|
||||
public class CheckStringSearch {
|
||||
@Schema(description="编码/名称/关键词")
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package com.gunshi.project.xyt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.xyt.model.StSpgPztb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package com.gunshi.project.xyt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.xyt.model.StSpgSpprmp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,15 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
|
@ -27,6 +31,7 @@ public class StSpgPztb implements Serializable {
|
|||
@TableId(value = "ID", type = IdType.INPUT)
|
||||
@Schema(description="id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@NotNull(message = "id不能为空", groups = {Update.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
@ -34,6 +39,8 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "DEVICE_ID")
|
||||
@Schema(description="测站编码(MCU)")
|
||||
@NotNull(message = "测站编码(MCU)不能为空")
|
||||
@Size(max = 30,message = "测站编码(MCU)长度不能超过30")
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
|
|
@ -41,6 +48,8 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "STATION_CODE")
|
||||
@Schema(description="测点编号")
|
||||
@NotNull(message = "测点编号不能为空")
|
||||
@Size(max = 50,message = "测点编号长度不能超过30")
|
||||
private String stationCode;
|
||||
|
||||
/**
|
||||
|
|
@ -48,6 +57,7 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "CHANNEL_NUM")
|
||||
@Schema(description="通道号")
|
||||
@NotNull
|
||||
private Integer channelNum;
|
||||
|
||||
/**
|
||||
|
|
@ -55,6 +65,7 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "INSTALLATION_POSITION_X")
|
||||
@Schema(description="安装经度")
|
||||
|
||||
private BigDecimal installationPositionX;
|
||||
|
||||
/**
|
||||
|
|
@ -98,6 +109,7 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "INITIAL_READING")
|
||||
@Schema(description="初始读数")
|
||||
@NotNull(message = "初始读数不能为空")
|
||||
private BigDecimal initialReading;
|
||||
|
||||
/**
|
||||
|
|
@ -105,6 +117,7 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "CALIBRATION_COEFFICIENT")
|
||||
@Schema(description="率定系数")
|
||||
@NotNull(message = "率定系数不能为空")
|
||||
private BigDecimal calibrationCoefficient;
|
||||
|
||||
/**
|
||||
|
|
@ -112,6 +125,7 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "START_TEMPERATURE")
|
||||
@Schema(description="初始温度读数")
|
||||
@NotNull(message = "初始温度读数不能为空")
|
||||
private BigDecimal startTemperature;
|
||||
|
||||
/**
|
||||
|
|
@ -119,6 +133,7 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "TEMPERATURE_K")
|
||||
@Schema(description="温度率定系数")
|
||||
@NotNull(message = "温度率定系数不能为空")
|
||||
private BigDecimal temperatureK;
|
||||
|
||||
/**
|
||||
|
|
@ -126,6 +141,7 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "DAM_HEIGHT")
|
||||
@Schema(description="坝(堰)顶高程")
|
||||
@NotNull(message = "坝(堰)顶高程不能为空")
|
||||
private BigDecimal damHeight;
|
||||
|
||||
/**
|
||||
|
|
@ -133,6 +149,7 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "DIST_FROM_OSMOSIS_METER_TO_BOTTOM")
|
||||
@Schema(description="渗压计到孔底距离")
|
||||
@NotNull(message = "渗压计到孔底距离不能为空")
|
||||
private BigDecimal distFromOsmosisMeterToBottom;
|
||||
|
||||
/**
|
||||
|
|
@ -217,6 +234,7 @@ public class StSpgPztb implements Serializable {
|
|||
*/
|
||||
@TableField(value = "EMBEDDING_ELEVATION")
|
||||
@Schema(description="埋设高程")
|
||||
@NotNull
|
||||
private BigDecimal embeddingElevation;
|
||||
|
||||
/**
|
||||
|
|
@ -405,6 +423,14 @@ public class StSpgPztb implements Serializable {
|
|||
@Schema(description="管低高程")
|
||||
private BigDecimal pipeBottomHeight;
|
||||
|
||||
/**
|
||||
* 所在断面
|
||||
*/
|
||||
@TableField(value = "CR_ID")
|
||||
@Schema(description = "所在断面")
|
||||
@NotNull
|
||||
private Long crId;
|
||||
|
||||
public static final String COL_ID = "ID";
|
||||
|
||||
public static final String COL_DEVICE_ID = "DEVICE_ID";
|
||||
|
|
@ -512,4 +538,6 @@ public class StSpgPztb implements Serializable {
|
|||
public static final String COL_PIPE_TOP_HEIGHT = "PIPE_TOP_HEIGHT";
|
||||
|
||||
public static final String COL_PIPE_BOTTOM_HEIGHT = "PIPE_BOTTOM_HEIGHT";
|
||||
|
||||
public static final String COL_CR_ID = "CR_ID";
|
||||
}
|
||||
|
|
@ -363,6 +363,13 @@ public class StSpgSpprmp implements Serializable {
|
|||
@Schema(description="多项式系数C")
|
||||
private BigDecimal polynomialCoefficientc;
|
||||
|
||||
/**
|
||||
* 所在断面
|
||||
*/
|
||||
@TableField(value = "CR_ID")
|
||||
@Schema(description = "所在断面")
|
||||
private Long crId;
|
||||
|
||||
public static final String COL_ID = "ID";
|
||||
|
||||
public static final String COL_DEVICE_ID = "DEVICE_ID";
|
||||
|
|
@ -458,4 +465,6 @@ public class StSpgSpprmp implements Serializable {
|
|||
public static final String COL_POLYNOMIAL_COEFFICIENTB = "POLYNOMIAL_COEFFICIENTB";
|
||||
|
||||
public static final String COL_POLYNOMIAL_COEFFICIENTC = "POLYNOMIAL_COEFFICIENTC";
|
||||
|
||||
public static final String COL_CR_ID = "CR_ID";
|
||||
}
|
||||
|
|
@ -28,7 +28,8 @@ public class StMoncrService {
|
|||
private final StMoncrBMapper stMoncrBMapper;
|
||||
|
||||
|
||||
public Page<StMoncrB> queryBySearch(Page<StMoncrB> page, GeneralSearch search){
|
||||
public Page<StMoncrB> queryBySearch(GeneralSearch search){
|
||||
Page<StMoncrB> page = search.getPageSo().toPage();
|
||||
return stMoncrBMapper.queryBySearch(page, search);
|
||||
}
|
||||
|
||||
|
|
@ -37,8 +38,8 @@ public class StMoncrService {
|
|||
* @param stMoncrB 监测断面对象
|
||||
*/
|
||||
public void insert(StMoncrB stMoncrB) {
|
||||
CheckStringSearch checkStringSearch = CheckStringSearch.builder()
|
||||
.keyword(stMoncrB.getCrCd()).build();
|
||||
CheckStringSearch checkStringSearch = new CheckStringSearch();
|
||||
checkStringSearch.setKeyword(stMoncrB.getCrCd());
|
||||
checkCode(checkStringSearch);
|
||||
stMoncrB.setCrId(IdWorker.getId());
|
||||
stMoncrB.setSortOn(getMaxSortOn());
|
||||
|
|
@ -51,8 +52,9 @@ public class StMoncrService {
|
|||
* @param stMoncrB 监测断面对象
|
||||
*/
|
||||
public void update(StMoncrB stMoncrB) {
|
||||
CheckStringSearch checkStringSearch = CheckStringSearch.builder()
|
||||
.keyword(stMoncrB.getCrCd()).id(stMoncrB.getCrId()).build();
|
||||
CheckStringSearch checkStringSearch = new CheckStringSearch();
|
||||
checkStringSearch.setKeyword(stMoncrB.getCrCd());
|
||||
checkStringSearch.setId(stMoncrB.getCrId());
|
||||
checkCode(checkStringSearch);
|
||||
stMoncrB.setTm(new Date());
|
||||
stMoncrBMapper.updateById(stMoncrB);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package com.gunshi.project.xyt.service;
|
||||
|
||||
import com.gunshi.project.xyt.mapper.StSpgPztbMapper;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 渗压设备Service
|
||||
* @author Sun Lejun
|
||||
* @version 1.0
|
||||
* @date 2024/1/26
|
||||
*/
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Data
|
||||
public class StSpgPztbService {
|
||||
private final StSpgPztbMapper stSpgPztbMapper;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.gunshi.project.xyt.service;
|
||||
|
||||
import com.gunshi.project.xyt.mapper.StSpgSpprmpMapper;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 渗流设备
|
||||
* @author Sun Lejun
|
||||
* @version 1.0
|
||||
* @date 2024/1/26
|
||||
*/
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Data
|
||||
public class StSpgSpprmpService {
|
||||
private final StSpgSpprmpMapper stSpgSpprmpMapper;
|
||||
}
|
||||
|
|
@ -58,6 +58,7 @@
|
|||
<result column="PROJECT_NAME" jdbcType="VARCHAR" property="projectName" />
|
||||
<result column="PIPE_TOP_HEIGHT" jdbcType="DECIMAL" property="pipeTopHeight" />
|
||||
<result column="PIPE_BOTTOM_HEIGHT" jdbcType="DECIMAL" property="pipeBottomHeight" />
|
||||
<result column="CR_ID" jdbcType="BIGINT" property="crId" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
|
|
@ -70,7 +71,7 @@
|
|||
ZERO_PRESSURE_READINGS, EMBEDDING_FINISH_READING, EMBEDDING_DATE, AIR_TEMPERATURE,
|
||||
AIR_PRESSURE, WEATHER, HEADWATER_LEVEL, TAILWATER_LEVEL, TECHNICAL_DIRECTOR, CHECK_PERSONNEL,
|
||||
BURIED_PERSONNEL, SKETCH_MAP, [STATUS], MODIFICATION_TIME, CREATION_TIME, SUPERVISOR,
|
||||
REMARK, PROJECT_NAME, PIPE_TOP_HEIGHT, PIPE_BOTTOM_HEIGHT
|
||||
REMARK, PROJECT_NAME, PIPE_TOP_HEIGHT, PIPE_BOTTOM_HEIGHT, CR_ID
|
||||
</sql>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
|
|
@ -84,7 +85,7 @@
|
|||
END_READINGS, ZERO_PRESSURE_READINGS, EMBEDDING_FINISH_READING, EMBEDDING_DATE,
|
||||
AIR_TEMPERATURE, AIR_PRESSURE, WEATHER, HEADWATER_LEVEL, TAILWATER_LEVEL, TECHNICAL_DIRECTOR,
|
||||
CHECK_PERSONNEL, BURIED_PERSONNEL, SKETCH_MAP, [STATUS], MODIFICATION_TIME, CREATION_TIME,
|
||||
SUPERVISOR, REMARK, PROJECT_NAME, PIPE_TOP_HEIGHT, PIPE_BOTTOM_HEIGHT)
|
||||
SUPERVISOR, REMARK, PROJECT_NAME, PIPE_TOP_HEIGHT, PIPE_BOTTOM_HEIGHT, CR_ID)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=BIGINT}, #{item.deviceId,jdbcType=VARCHAR}, #{item.stationCode,jdbcType=VARCHAR},
|
||||
|
|
@ -108,8 +109,8 @@
|
|||
#{item.checkPersonnel,jdbcType=VARCHAR}, #{item.buriedPersonnel,jdbcType=VARCHAR},
|
||||
#{item.sketchMap,jdbcType=BIGINT}, #{item.status,jdbcType=INTEGER}, #{item.modificationTime,jdbcType=TIMESTAMP},
|
||||
#{item.creationTime,jdbcType=TIMESTAMP}, #{item.supervisor,jdbcType=VARCHAR}, #{item.remark,jdbcType=VARCHAR},
|
||||
#{item.projectName,jdbcType=VARCHAR}, #{item.pipeTopHeight,jdbcType=DECIMAL}, #{item.pipeBottomHeight,jdbcType=DECIMAL}
|
||||
)
|
||||
#{item.projectName,jdbcType=VARCHAR}, #{item.pipeTopHeight,jdbcType=DECIMAL}, #{item.pipeBottomHeight,jdbcType=DECIMAL},
|
||||
#{item.crId,jdbcType=BIGINT})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
@ -52,6 +52,7 @@
|
|||
<result column="POLYNOMIAL_COEFFICIENTA" jdbcType="DECIMAL" property="polynomialCoefficienta" />
|
||||
<result column="POLYNOMIAL_COEFFICIENTB" jdbcType="DECIMAL" property="polynomialCoefficientb" />
|
||||
<result column="POLYNOMIAL_COEFFICIENTC" jdbcType="DECIMAL" property="polynomialCoefficientc" />
|
||||
<result column="CR_ID" jdbcType="BIGINT" property="crId" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
|
|
@ -63,7 +64,7 @@
|
|||
LATEST_REPORTING_TIME, FORMULA, CREATE_TIME, [STATUS], MAX_H, INSTALLATION_POSITION_X,
|
||||
INSTALLATION_POSITION_Y, INSTALLATION_POSITION_Z, HEADWATER_LEVEL, TAILWATER_LEVEL,
|
||||
AIR_TEMPERATURE, AIR_PRESSURE, WEATHER, LINEAR_COEFFICIENTG, POLYNOMIAL_COEFFICIENTA,
|
||||
POLYNOMIAL_COEFFICIENTB, POLYNOMIAL_COEFFICIENTC
|
||||
POLYNOMIAL_COEFFICIENTB, POLYNOMIAL_COEFFICIENTC, CR_ID
|
||||
</sql>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
|
|
@ -76,7 +77,7 @@
|
|||
LATEST_REPORTING_TIME, FORMULA, CREATE_TIME, [STATUS], MAX_H, INSTALLATION_POSITION_X,
|
||||
INSTALLATION_POSITION_Y, INSTALLATION_POSITION_Z, HEADWATER_LEVEL, TAILWATER_LEVEL,
|
||||
AIR_TEMPERATURE, AIR_PRESSURE, WEATHER, LINEAR_COEFFICIENTG, POLYNOMIAL_COEFFICIENTA,
|
||||
POLYNOMIAL_COEFFICIENTB, POLYNOMIAL_COEFFICIENTC)
|
||||
POLYNOMIAL_COEFFICIENTB, POLYNOMIAL_COEFFICIENTC, CR_ID)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=BIGINT}, #{item.deviceId,jdbcType=VARCHAR}, #{item.stationCode,jdbcType=VARCHAR},
|
||||
|
|
@ -97,7 +98,7 @@
|
|||
#{item.tailwaterLevel,jdbcType=DECIMAL}, #{item.airTemperature,jdbcType=DECIMAL},
|
||||
#{item.airPressure,jdbcType=DECIMAL}, #{item.weather,jdbcType=VARCHAR}, #{item.linearCoefficientg,jdbcType=DECIMAL},
|
||||
#{item.polynomialCoefficienta,jdbcType=DECIMAL}, #{item.polynomialCoefficientb,jdbcType=DECIMAL},
|
||||
#{item.polynomialCoefficientc,jdbcType=DECIMAL})
|
||||
#{item.polynomialCoefficientc,jdbcType=DECIMAL}, #{item.crId,jdbcType=BIGINT})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue