同步檀树岗的渗流,渗压。位移代码
parent
9e9aab14ec
commit
50fb447c68
|
|
@ -0,0 +1,77 @@
|
|||
package com.gunshi;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
public class Tests extends Thread {
|
||||
|
||||
static Queue<Integer> queue = new LinkedList<>();
|
||||
static int maxSize = 10;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
// Tests tc = new Tests();
|
||||
// // 创建生产者线程
|
||||
// Thread producer = new Thread(() -> {
|
||||
// try {
|
||||
// int value = 0;
|
||||
// while (true) {
|
||||
// tc.produce();
|
||||
// Thread.sleep(2000); // 模拟生产耗时
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// Thread.currentThread().interrupt();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// // 创建消费者线程
|
||||
// Thread consumer = new Thread(() -> {
|
||||
// try {
|
||||
// while (true) {
|
||||
// tc.customer();
|
||||
// Thread.sleep(1500); // 模拟消费耗时
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// Thread.currentThread().interrupt();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// producer.start();
|
||||
// consumer.start();
|
||||
CountDownLatch countDownLatch = new CountDownLatch(3);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
new Thread(() -> {
|
||||
System.out.println("执行任务中。。。");
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
countDownLatch.countDown();
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
countDownLatch.await();
|
||||
System.out.println("所有任务执行完毕");
|
||||
}
|
||||
|
||||
public synchronized void produce() throws Exception{
|
||||
while (queue.size() == maxSize){
|
||||
System.out.println("队列已满,生产者等待...");
|
||||
wait();
|
||||
}
|
||||
queue.offer(0);
|
||||
System.out.println("生产者生产。。" + "队列大小为:" + queue.size());
|
||||
notifyAll();
|
||||
}
|
||||
|
||||
|
||||
public synchronized void customer() throws Exception{
|
||||
while(queue.size() == 0){
|
||||
System.out.println("队列无数据,等待生产者生产");
|
||||
wait();
|
||||
}
|
||||
queue.poll();
|
||||
System.out.println("消费者消费。。" + "队列大小为:" + queue.size());
|
||||
notifyAll();
|
||||
}
|
||||
}
|
||||
|
|
@ -95,6 +95,7 @@ public class AttDamProfileController extends AbstractCommonFileController{
|
|||
@Operation(summary = "列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<AttDamProfile>> list() {
|
||||
|
||||
LambdaQueryWrapper<AttDamProfile> wq = new LambdaQueryWrapper();
|
||||
wq.orderByAsc(AttDamProfile::getProfileCode);
|
||||
List<AttDamProfile> list = service.list(wq);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
import com.gunshi.project.hsz.timetask.PaDataTask;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.text.ParseException;
|
||||
|
||||
@Tag(name = "后门")
|
||||
@RestController
|
||||
@RequestMapping(value="/debug")
|
||||
public class DebugController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private PaDataTask paDataTask;
|
||||
|
||||
|
||||
@GetMapping("/patask")
|
||||
public String patask(){
|
||||
try {
|
||||
paDataTask.PaDataCalc();
|
||||
return "成功";
|
||||
} catch (ParseException e) {
|
||||
return "失败";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -185,7 +185,7 @@ public class ForecastProjectController {
|
|||
|
||||
|
||||
@Operation(summary = "pdf导出")
|
||||
@GetMapping("export")
|
||||
@PostMapping("export")
|
||||
public void export(@RequestParam("ids") List<String> ids, HttpServletResponse response) {
|
||||
try {
|
||||
// 设置响应头
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Tag(name = "维护养护-隐患点")
|
||||
@RestController
|
||||
@RequestMapping(value="/hiddeninfo")
|
||||
public class HiddenInfoController extends AbstractCommonFileController {
|
||||
@Override
|
||||
public String getGroupId() {
|
||||
return "hiddeninfo";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.hsz.entity.so.WaterDevicePageSo;
|
||||
import com.gunshi.project.hsz.model.JcskByB;
|
||||
import com.gunshi.project.hsz.service.WaterDeviceService;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Tag(name = "白蚁监测设备")
|
||||
@RestController
|
||||
@RequestMapping(value="/jcskByB")
|
||||
public class JcskByBController {
|
||||
@Autowired
|
||||
private WaterDeviceService service;
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
public R<Page<JcskByB>> page(@RequestBody @Validated WaterDevicePageSo page) {
|
||||
return R.ok(service.pageQuery(page));
|
||||
}
|
||||
|
||||
// @Operation(summary = "新增")
|
||||
// public R<JcskByB> insert(@Validated(Insert.class) @RequestBody JcskByB dto) {
|
||||
// return R.ok(service.saveDate(dto));
|
||||
// }
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.gunshi.project.hsz.controller;//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.entity.so.JcskByBDPageSo;
|
||||
//import com.gunshi.project.xyt.model.JcskByB;
|
||||
//import com.gunshi.project.xyt.model.JcskByBD;
|
||||
//import com.gunshi.project.xyt.service.JcskByBDService;
|
||||
//import com.gunshi.project.xyt.service.JcskByBService;
|
||||
//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.validation.annotation.Validated;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
//public class JcskByBDController {
|
||||
//
|
||||
//
|
||||
// @Autowired
|
||||
// private JcskByBDService jcskByBDService;
|
||||
//
|
||||
// @Autowired
|
||||
// private JcskByBService jcskByBService;
|
||||
//
|
||||
//
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
// public R<Page<JcskByBD>> page(@RequestBody @Validated JcskByBDPageSo page){
|
||||
// Page<JcskByBD> res = jcskByBDService.pageQuery(page);
|
||||
// return R.ok(res);
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "列表")
|
||||
// @GetMapping("/list")
|
||||
// public R<List<JcskByBD>> list(){
|
||||
// List<JcskByBD> res = jcskByBDService.list();
|
||||
// return R.ok(res);
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "获取白蚁机箱设备")
|
||||
// @GetMapping("/list/byDevice")
|
||||
// public R<List<JcskByB>> getJcskByBD(){
|
||||
// return R.ok(jcskByBService.lambdaQuery().list());
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "获取所有设备编码")
|
||||
// @GetMapping("/list/device")
|
||||
// public R<List<String>> listDevices(){
|
||||
// List<String> res = jcskByBDService.listDevices();
|
||||
// return R.ok(res);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.hsz.entity.so.JcskByRPageSo;
|
||||
import com.gunshi.project.hsz.model.JcskByB;
|
||||
import com.gunshi.project.hsz.model.JcskByBD;
|
||||
import com.gunshi.project.hsz.model.JcskByR;
|
||||
import com.gunshi.project.hsz.model.JcskByRProcess;
|
||||
import com.gunshi.project.hsz.service.JcskByBDService;
|
||||
import com.gunshi.project.hsz.service.JcskByBService;
|
||||
import com.gunshi.project.hsz.service.JcskByRProcessService;
|
||||
import com.gunshi.project.hsz.service.JcskByRService;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Tag(name = "白蚁监测数据")
|
||||
@RestController
|
||||
@RequestMapping(value="/termite/survey")
|
||||
public class JcskByRController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private JcskByRService service;
|
||||
|
||||
@Autowired
|
||||
private JcskByRProcessService jcskByRProcessService;
|
||||
|
||||
@Autowired
|
||||
private JcskByBService jcskByBService;
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/pageDetail")
|
||||
public R<Page<JcskByR>> page(@RequestBody @Validated JcskByRPageSo page) {
|
||||
return R.ok(service.pageQuery(page));
|
||||
}
|
||||
|
||||
@Operation(summary = "统计白蚁有无")
|
||||
@PostMapping("/count")
|
||||
public R<Map<String,Long>> count(@RequestBody @Validated JcskByRPageSo page){
|
||||
page.getPageSo().setPageSize(1000000);
|
||||
Map<String,Long> countMap = new HashMap<>();
|
||||
countMap.put("totalPoint",0l);
|
||||
countMap.put("hasAnt",0l);
|
||||
countMap.put("notAnt",0l);
|
||||
countMap.put("noData",0l);
|
||||
Map<String,Long> res = service.pageQueryCount(page,countMap);
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
@Operation(summary = "根据测点编号查询时间范围内的所有数据")
|
||||
@PostMapping("/detail")
|
||||
public R<Page<JcskByR>> detailList(@RequestBody @Validated JcskByRPageSo page){
|
||||
return R.ok(service.detailList(page));
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private JcskByBDService jcskByBDService;
|
||||
|
||||
|
||||
@Operation(summary = "获取所有白蚁测点信息")
|
||||
@PostMapping("/list/allOrder")
|
||||
public R<List<JcskByBD>> listAllOrder(@RequestBody JcskByRPageSo page){
|
||||
return R.ok(jcskByBDService.listAll(page.getObDate()));
|
||||
}
|
||||
|
||||
@Operation(summary = "获取白蚁机箱设备")
|
||||
@GetMapping("/list/byDevice")
|
||||
public R<List<JcskByB>> getJcskByBD(){
|
||||
return R.ok(jcskByBService.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "获取所有设备编码")
|
||||
@GetMapping("/list/device")
|
||||
public R<List<String>> listDevices(){
|
||||
List<String> res = jcskByBDService.listDevices();
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
@Operation(summary = "处理")
|
||||
@PostMapping("/process")
|
||||
public R<Boolean> process(@RequestBody JcskByRProcess jcskByRProcess){
|
||||
Boolean flag = jcskByRProcessService.process(jcskByRProcess);
|
||||
return R.ok(flag);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询所有测点最新的一条数据")
|
||||
@GetMapping("/listNewData")
|
||||
public R<List<JcskByR>> listNewData(@RequestParam(value = "deviceId",required = false) String deviceId){
|
||||
List<JcskByR> res = service.listNewData(deviceId);
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.hsz.entity.so.JcskGnssBPageSo;
|
||||
import com.gunshi.project.hsz.entity.vo.HomeJcskGnssBVo;
|
||||
import com.gunshi.project.hsz.model.JcskGnssB;
|
||||
import com.gunshi.project.hsz.service.JcskGnssBService;
|
||||
import com.gunshi.project.hsz.validate.markers.Insert;
|
||||
import com.gunshi.project.hsz.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Tag(name = "位移设备Controller")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticShiftDevice")
|
||||
public class JcskGnssBController {
|
||||
|
||||
@Autowired
|
||||
private JcskGnssBService service;
|
||||
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<JcskGnssB> insert(@Validated(Insert.class) @RequestBody JcskGnssB dto) {
|
||||
if (Objects.nonNull(service.getById(dto.getCd()))) {
|
||||
throw new IllegalArgumentException("当前编号已存在");
|
||||
}
|
||||
boolean result = service.save(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<JcskGnssB> update(@Validated(Update.class) @RequestBody JcskGnssB dto) {
|
||||
if (Objects.isNull(service.getById(dto.getCd()))) {
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
public R<Page<JcskGnssB>> page(@RequestBody @Validated JcskGnssBPageSo page) {
|
||||
return R.ok(service.pageQuery(page));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "详情和监测数据查询(暂无设备表,无法使用)")
|
||||
@PostMapping("/getDetailsAndMonitoringDataList")
|
||||
public R<List<HomeJcskGnssBVo>> getDetailsAndMonitoringDataList() {
|
||||
return R.ok(service.getDetailsAndMonitoringDataList());
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询详细数据")
|
||||
@GetMapping("/getDetailsById")
|
||||
public R<HomeJcskGnssBVo> getDetailsById(@RequestParam(name = "id") String id) {
|
||||
HomeJcskGnssBVo byId = service.getDetailsById(id);
|
||||
return R.ok(byId);
|
||||
}
|
||||
|
||||
@Operation(summary = "列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<JcskGnssB>> list() {
|
||||
List<JcskGnssB> list = service.lambdaQuery()
|
||||
.orderByAsc(JcskGnssB::getCd)
|
||||
.list();
|
||||
list.stream().forEach(o ->{
|
||||
o.setStationCode(o.getCd());
|
||||
});
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@Operation(summary = "获取位移的断面数据")
|
||||
@GetMapping("/list/dm")
|
||||
public R<List<String>> listDm(){
|
||||
|
||||
List<String> res = service.listDms();
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.hsz.entity.dto.ArtificialJcskGnssDeleteDto;
|
||||
import com.gunshi.project.hsz.entity.so.JcskGnssRPageSo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
|
||||
import com.gunshi.project.hsz.entity.vo.*;
|
||||
import com.gunshi.project.hsz.model.JcskGnssB;
|
||||
import com.gunshi.project.hsz.model.JcskGnssR;
|
||||
import com.gunshi.project.hsz.service.JcskGnssBService;
|
||||
import com.gunshi.project.hsz.service.JcskGnssRService;
|
||||
import com.gunshi.project.hsz.validate.markers.Insert;
|
||||
import com.gunshi.project.hsz.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "位移R表")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticShiftR")
|
||||
public class JcskGnssRController {
|
||||
|
||||
@Autowired
|
||||
private JcskGnssRService service;
|
||||
|
||||
@Autowired
|
||||
private JcskGnssBService jcskGnssBService;
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
public R<Page<JcskGnssR>> page(@RequestBody @Validated JcskGnssRPageSo page) {
|
||||
return R.ok(service.pageQuery(page));
|
||||
}
|
||||
|
||||
@Operation(summary = "历史")
|
||||
@PostMapping("/history")
|
||||
public R<Page<JcskGnssRHisVo>> historyPage(@RequestBody @Validated JcskGnssRPageSo page) {
|
||||
return R.ok(service.historyPage(page));
|
||||
}
|
||||
|
||||
@Operation(summary = "人工分页")
|
||||
@PostMapping("/artificial/page")
|
||||
public R<Page<JcskGnssR>> artificialPage(@RequestBody @Validated JcskGnssRPageSo page) {
|
||||
return R.ok(service.artificialPage(page));
|
||||
}
|
||||
|
||||
@Operation(summary = "人工分页-导出")
|
||||
@PostMapping("/artificial/export")
|
||||
public void artificialExport(@RequestBody @Validated JcskGnssRPageSo page,HttpServletResponse response){
|
||||
service.artificialExport(page,response);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/artificial/insert")
|
||||
public R<JcskGnssR> insert(@Validated(Insert.class) @RequestBody JcskGnssR dto) {
|
||||
// // 通过时间戳去除毫秒
|
||||
// long currentTime = System.currentTimeMillis();
|
||||
// long seconds = currentTime / 1000; // 去掉毫秒部分
|
||||
// Date dateWithoutMillis = new Date(seconds * 1000); // 转回毫秒时间戳
|
||||
// dto.setTm(dateWithoutMillis);
|
||||
boolean result = service.saveData(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "获取人工录入测点")
|
||||
@GetMapping("/artificial/tree")
|
||||
public R<List<JcskGnssB>> artificialTree() {
|
||||
List<JcskGnssB> res = jcskGnssBService.artificialTree();
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/artificial/update")
|
||||
public R<JcskGnssR> update(@Validated(Update.class) @RequestBody JcskGnssR dto) {
|
||||
boolean update = service.updateData(dto);
|
||||
return R.ok(update ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/artificial/delete")
|
||||
public R<Boolean> del(@RequestBody @Validated ArtificialJcskGnssDeleteDto dto) {
|
||||
boolean delete = service.deleteData(dto);
|
||||
return R.ok(delete);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<JcskGnssR>> list() {
|
||||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "获取断面对应测点编号")
|
||||
@GetMapping("/tree")
|
||||
public R<List<GnssCdAndCdVo>> getChAndCd() {
|
||||
List<GnssCdAndCdVo> res = service.getChAndCd();
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "年度位移统计(表格)")
|
||||
@PostMapping("/year/stat")
|
||||
public R<List<OsmoticShiftVo2>> yearStat(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.yearStat(osmoticQuerySo));
|
||||
}
|
||||
|
||||
@Operation(summary = "年度位移统计(全年度特征值统计)")
|
||||
@PostMapping("/year/stat/value")
|
||||
public R<List<OsmoticChartVo2>> yearStatValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.yearStatValue(osmoticQuerySo));
|
||||
}
|
||||
|
||||
@Operation(summary = "年度位移统计导出")
|
||||
@PostMapping( "/year/stat/export")
|
||||
public void yearStatExport(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
|
||||
service.yearStatExport(osmoticQuerySo,response);
|
||||
}
|
||||
|
||||
@Operation(summary = "布置图-位移监测")
|
||||
@GetMapping("/list/value")
|
||||
public R<List<JcskGnessListVo>> listValue() {
|
||||
return R.ok(service.listValue());
|
||||
}
|
||||
|
||||
@Operation(summary = "布置图-按测站查询位移监测数据")
|
||||
@PostMapping("/detail/value")
|
||||
public R<List<OsmoticShiftValueVo2>> detailValue(@RequestBody @Validated OsmoticDetailQuerySo so) {
|
||||
return R.ok(service.detailValue(so));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.hsz.entity.so.JcskSlBPageSo;
|
||||
import com.gunshi.project.hsz.entity.vo.HomeJcskSlBVo;
|
||||
import com.gunshi.project.hsz.model.JcskSlB;
|
||||
import com.gunshi.project.hsz.service.JcskSlBService;
|
||||
import com.gunshi.project.hsz.validate.markers.Insert;
|
||||
import com.gunshi.project.hsz.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Tag(name = "渗压测力点-设备基础信息")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticFlowDevice")
|
||||
public class JcskSlBController {
|
||||
@Autowired
|
||||
private JcskSlBService service;
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
public R<Page<JcskSlB>> page(@RequestBody @Validated JcskSlBPageSo page) {
|
||||
return R.ok(service.pageQuery(page));
|
||||
}
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<JcskSlB> insert(@Validated(Insert.class) @RequestBody JcskSlB dto) {
|
||||
if (Objects.nonNull(service.getById(dto.getMpcd()))) {
|
||||
throw new IllegalArgumentException("当前编号已存在");
|
||||
}
|
||||
|
||||
dto.setDtuptm(new Date());
|
||||
boolean result = service.save(dto);
|
||||
// if (result){
|
||||
// fileService.saveFile(dto.getFiles(), getGroupId(), dto.getStationCode());
|
||||
// }
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<JcskSlB> update(@Validated(Update.class) @RequestBody JcskSlB dto) {
|
||||
if (Objects.isNull(service.getById(dto.getMpcd()))) {
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
dto.setDtuptm(null);
|
||||
boolean result = service.updateById(dto);
|
||||
// if (result){
|
||||
// fileService.saveFile(dto.getFiles(), getGroupId(), dto.getStationCode());
|
||||
// }
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<JcskSlB>> list() {
|
||||
List<JcskSlB> list = service.lambdaQuery().list();
|
||||
list.stream().forEach(o ->{
|
||||
o.setStationCode(o.getDvcd());
|
||||
});
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "详情和监测数据查询")
|
||||
@PostMapping("/getDetailsAndMonitoringDataList")
|
||||
public R<List<HomeJcskSlBVo>> getDetailsAndMonitoringDataList() {
|
||||
return R.ok(service.getDetailsAndMonitoringDataList());
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询详细数据")
|
||||
@GetMapping("/getDetailsById")
|
||||
public R<HomeJcskSlBVo> getDetailsById(@RequestParam(name = "id") String id) {
|
||||
HomeJcskSlBVo byId = service.getDetailsById(id.toString());
|
||||
return R.ok(byId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.hsz.entity.so.JcskSlRPageSo;
|
||||
import com.gunshi.project.hsz.entity.vo.JcskSlRHisVo;
|
||||
import com.gunshi.project.hsz.model.JcskSlR;
|
||||
import com.gunshi.project.hsz.service.JcskSlRService;
|
||||
import com.gunshi.project.hsz.validate.markers.Insert;
|
||||
import com.gunshi.project.hsz.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "渗流量(剔除异常)")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticFlowR")
|
||||
public class JcskSlRController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private JcskSlRService service;
|
||||
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
public R<Page<JcskSlR>> page(@RequestBody @Validated JcskSlRPageSo page) {
|
||||
return R.ok(service.pageQuery(page));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/history")
|
||||
public R<Page<JcskSlRHisVo>> historyPage(@RequestBody @Validated JcskSlRPageSo page) {
|
||||
return R.ok(service.historyPage(page));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<JcskSlR> insert(@Validated(Insert.class) @RequestBody JcskSlR dto) {
|
||||
boolean result = service.save(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<JcskSlR> update(@Validated(Update.class) @RequestBody JcskSlR dto) {
|
||||
boolean result = service.updateById(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<JcskSlR>> list() {
|
||||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.hsz.entity.so.JcskSyBPageSo;
|
||||
import com.gunshi.project.hsz.entity.vo.HomeJcskSYBVo;
|
||||
import com.gunshi.project.hsz.model.JcskSyB;
|
||||
import com.gunshi.project.hsz.service.JcskSyBService;
|
||||
import com.gunshi.project.hsz.validate.markers.Insert;
|
||||
import com.gunshi.project.hsz.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Tag(name = "测压管表")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticPressDevice")
|
||||
public class JcskSyBController extends AbstractCommonFileController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private JcskSyBService service;
|
||||
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<JcskSyB> insert(@Validated(Insert.class) @RequestBody JcskSyB dto) {
|
||||
if (Objects.nonNull(service.getById(dto.getMpcd()))) {
|
||||
throw new IllegalArgumentException("当前编号已存在");
|
||||
}
|
||||
dto.setDtuptm(LocalDateTime.now());
|
||||
boolean result = service.save(dto);
|
||||
// if (result){
|
||||
// fileService.saveFile(dto.getFiles(), getGroupId(), dto.getStationCode());
|
||||
// }
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<JcskSyB> update(@Validated(Update.class) @RequestBody JcskSyB dto) {
|
||||
if (Objects.isNull(service.getById(dto.getMpcd()))) {
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
dto.setDtuptm(LocalDateTime.now());
|
||||
boolean result = service.updateById(dto);
|
||||
// if (result){
|
||||
// fileService.saveFile(dto.getFiles(), getGroupId(), dto.getStationCode());
|
||||
// }
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
public R<Page<JcskSyB>> page(@RequestBody @Validated JcskSyBPageSo page) {
|
||||
return R.ok(service.pageQuery(page));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "详情和监测数据查询")
|
||||
@PostMapping("/getDetailsAndMonitoringDataList")
|
||||
public R<List<HomeJcskSYBVo>> getDetailsAndMonitoringDataList() {
|
||||
return R.ok(service.getDetailsAndMonitoringDataList());
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询详细数据")
|
||||
@GetMapping("/getDetailsById")
|
||||
public R<HomeJcskSYBVo> getDetailsById(@RequestParam(name = "id") String id) {
|
||||
HomeJcskSYBVo byId = service.getDetailsById(id);
|
||||
return R.ok(byId);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<JcskSyB>> list() {
|
||||
List<JcskSyB> list = service.lambdaQuery().list();
|
||||
list.stream().forEach(item -> {
|
||||
item.setStationCode(item.getDvcd());
|
||||
});
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGroupId() {
|
||||
return "OsmoticPressDevice";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
|
||||
import com.gunshi.project.hsz.entity.dto.ArtificialJcskSyDeleteDto;
|
||||
import com.gunshi.project.hsz.entity.so.JcskSyRPageSo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
|
||||
import com.gunshi.project.hsz.entity.vo.*;
|
||||
import com.gunshi.project.hsz.model.JcskSyR;
|
||||
import com.gunshi.project.hsz.service.JcskSyRService;
|
||||
import com.gunshi.project.hsz.validate.markers.Insert;
|
||||
import com.gunshi.project.hsz.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Tag(name = "渗流压力水位")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticPressR")
|
||||
public class JcskSyRController {
|
||||
@Autowired
|
||||
private JcskSyRService service;
|
||||
|
||||
@Operation(summary = "获取dvcd")
|
||||
@GetMapping("/list/dvcd")
|
||||
public R<List<DmDvcdVo>> listDvcd(){
|
||||
List<DmDvcdVo> res = service.listDvcd();
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
@Operation(summary = "获取测站编码和测站编号")
|
||||
@GetMapping("/list/stcdMpcd")
|
||||
public R<List<SyStcdMpcdVo>> listStcdMpcd(){
|
||||
return R.ok(service.listStcdMpcd());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
public R<Page<JcskSyR>> page(@RequestBody @Validated JcskSyRPageSo page) {
|
||||
return R.ok(service.pageQuery(page));
|
||||
}
|
||||
|
||||
@Operation(summary = "人工分页")
|
||||
@PostMapping("/artificial/page")
|
||||
public R<Page<JcskSyR>> artificialPage(@RequestBody @Validated JcskSyRPageSo page) {
|
||||
return R.ok(service.artificialPage(page));
|
||||
}
|
||||
|
||||
@Operation(summary = "人工分页-导出")
|
||||
@PostMapping("/artificial/export")
|
||||
public void artificialExport(@RequestBody @Validated JcskSyRPageSo page,HttpServletResponse response){
|
||||
service.artificialExport(page,response);
|
||||
}
|
||||
|
||||
@Operation(summary = "历史")
|
||||
@PostMapping("/history")
|
||||
public R<Page<JcskSyRHisVo>> historyPage(@RequestBody @Validated JcskSyRPageSo page) {
|
||||
return R.ok(service.historyPage(page));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/artificial/insert")
|
||||
public R<JcskSyR> insert(@Validated(Insert.class) @RequestBody JcskSyR dto) {
|
||||
// // 通过时间戳去除毫秒
|
||||
// long currentTime = System.currentTimeMillis();
|
||||
// long seconds = currentTime / 1000; // 去掉毫秒部分
|
||||
// Date dateWithoutMillis = new Date(seconds * 1000); // 转回毫秒时间戳
|
||||
// dto.setTm(dateWithoutMillis);
|
||||
boolean result = service.saveData(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/artificial/update")
|
||||
public R<JcskSyR> update(@Validated(Update.class) @RequestBody JcskSyR dto) {
|
||||
boolean update = service.updateData(dto);
|
||||
return R.ok(update ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/artificial/delete")
|
||||
public R<Boolean> del(@RequestBody @Validated ArtificialJcskSyDeleteDto dto) {
|
||||
boolean delete = service.deleteData(dto);
|
||||
return R.ok(delete);
|
||||
}
|
||||
|
||||
@Operation(summary = "大屏-大坝安全监测统计")
|
||||
@GetMapping("/stat")
|
||||
public R<Map<Integer,Integer>> stat() {
|
||||
return R.ok(service.stat());
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<JcskSyR>> list() {
|
||||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "布置图-渗压/渗流监测")
|
||||
@GetMapping("/list/value")
|
||||
public R<List<JcskSyRVo>> listValue(@Schema(name = "type",description = "类型(1渗压 2渗流)") @RequestParam("type") Integer type) {
|
||||
return R.ok(service.listValue(type));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "布置图-按测站查询渗压/渗流监测数据")
|
||||
@PostMapping("/detail/value")
|
||||
public R<List<OsmoticPressDetailVo>> detailValue(@RequestBody @Validated OsmoticDetailQuerySo so) {
|
||||
return R.ok(service.detailValue(so));
|
||||
}
|
||||
|
||||
@Operation(summary = "测值查询(数据表)")
|
||||
@PostMapping("/query/value")
|
||||
public R<List<OsmoticStationVo2>> queryValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.queryValue(osmoticQuerySo,null));
|
||||
}
|
||||
|
||||
@Operation(summary = "测值查询(多图单表)")
|
||||
@PostMapping("/query/chart")
|
||||
public R<List<OsmoticChartVo2>> queryChart(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.queryChart(osmoticQuerySo,null));
|
||||
}
|
||||
|
||||
@Operation(summary = "浸润线查询")
|
||||
@PostMapping("/infiltra/line")
|
||||
public R<List<OsmoticStationVo2>> infiltraLine(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.infiltraLine(osmoticQuerySo));
|
||||
}
|
||||
|
||||
@Operation(summary = "浸润线导出")
|
||||
@PostMapping( "/export")
|
||||
public void export(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
|
||||
service.export(osmoticQuerySo,response);
|
||||
}
|
||||
|
||||
@Operation(summary = "年度渗压/渗流统计(表格)")
|
||||
@PostMapping("/year/stat")
|
||||
public R<List<OsmoticStationVo2>> yearStat(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.yearStat(osmoticQuerySo));
|
||||
}
|
||||
|
||||
@Operation(summary = "年度渗压/渗流统计(全年度特征值统计)")
|
||||
@PostMapping("/year/stat/value")
|
||||
public R<List<OsmoticChartVo2>> yearStatValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.yearStatValue(osmoticQuerySo));
|
||||
}
|
||||
|
||||
@Operation(summary = "年度渗压/渗流统计导出")
|
||||
@PostMapping( "/year/stat/export")
|
||||
public void yearStatExport(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
|
||||
service.yearStatExport(osmoticQuerySo,response);
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ import com.gunshi.core.result.R;
|
|||
import com.gunshi.project.hsz.entity.dto.ExportCommonDto;
|
||||
import com.gunshi.project.hsz.entity.so.MentenceFarmerRecordPageSo;
|
||||
import com.gunshi.project.hsz.model.ByLog;
|
||||
import com.gunshi.project.hsz.model.HiddenInfo;
|
||||
import com.gunshi.project.hsz.model.MentenceFarmerRecord;
|
||||
import com.gunshi.project.hsz.service.FileAssociationsService;
|
||||
import com.gunshi.project.hsz.service.HiddenInfoService;
|
||||
|
|
@ -48,6 +49,9 @@ public class MentenceFarmerRecordController extends AbstractCommonFileControlle
|
|||
boolean result = mentenceFarmerRecordService.saveDate(dto);
|
||||
if(result){
|
||||
fileService.saveFile(dto.getFiles(),getGroupId(),dto.getId().toString());
|
||||
for (HiddenInfo detail : dto.getDetails()) {
|
||||
hiddenInfoService.saveFile(detail.getFiles(),detail.getId().toString());
|
||||
}
|
||||
}
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
|
@ -59,6 +63,9 @@ public class MentenceFarmerRecordController extends AbstractCommonFileControlle
|
|||
boolean flag = mentenceFarmerRecordService.update(dto);
|
||||
if (flag) {
|
||||
fileService.saveFile(dto.getFiles(), getGroupId(), dto.getId().toString());
|
||||
for (HiddenInfo detail : dto.getDetails()) {
|
||||
hiddenInfoService.saveFile(detail.getFiles(),detail.getId().toString());
|
||||
}
|
||||
}
|
||||
return R.ok(flag ? dto : null);
|
||||
}
|
||||
|
|
@ -66,9 +73,12 @@ public class MentenceFarmerRecordController extends AbstractCommonFileControlle
|
|||
@Operation(summary = "删除")
|
||||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
boolean result = mentenceFarmerRecordService.delete(id);
|
||||
if(result){
|
||||
List<Long> res = mentenceFarmerRecordService.delete(id);
|
||||
if(res != null){
|
||||
fileService.deleteFile(getGroupId(),id.toString());
|
||||
for (Long cid : res) {
|
||||
hiddenInfoService.deleteFile(String.valueOf(cid));
|
||||
}
|
||||
}
|
||||
return R.ok(true);
|
||||
}
|
||||
|
|
@ -78,9 +88,17 @@ public class MentenceFarmerRecordController extends AbstractCommonFileControlle
|
|||
public R<Page<MentenceFarmerRecord>> page(@RequestBody MentenceFarmerRecordPageSo pageSo) {
|
||||
Page<MentenceFarmerRecord> byPage = mentenceFarmerRecordService.pageQuery(pageSo);
|
||||
if(!CollectionUtils.isEmpty(byPage.getRecords())){
|
||||
byPage.getRecords().forEach(o -> o.setFiles(
|
||||
byPage.getRecords().forEach(o ->{
|
||||
|
||||
o.setFiles(
|
||||
fileService.getFiles(getGroupId(),o.getId().toString())
|
||||
));
|
||||
);
|
||||
|
||||
List<HiddenInfo> details = o.getDetails();
|
||||
details.forEach(detail -> {
|
||||
detail.setFiles(hiddenInfoService.getFiles(detail.getId().toString()));
|
||||
});
|
||||
});
|
||||
}
|
||||
return R.ok(byPage);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ import java.util.Objects;
|
|||
* author: xusan
|
||||
* date: 2024-07-08 17:40:37
|
||||
*/
|
||||
@Tag(name = "渗流设备表")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticFlowDevice")
|
||||
//@Tag(name = "渗流设备表")
|
||||
//@RestController
|
||||
//@RequestMapping(value="/osmoticFlowDevice")
|
||||
public class OsmoticFlowDeviceController extends AbstractCommonFileController{
|
||||
|
||||
@Autowired
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ import java.util.List;
|
|||
* author: xusan
|
||||
* date: 2024-07-08 17:40:37
|
||||
*/
|
||||
@Tag(name = "渗流监测记录表")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticFlowR")
|
||||
//@Tag(name = "渗流监测记录表")
|
||||
//@RestController
|
||||
//@RequestMapping(value="/osmoticFlowR")
|
||||
public class OsmoticFlowRController {
|
||||
|
||||
@Autowired
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ import java.util.Objects;
|
|||
* author: xusan
|
||||
* date: 2024-07-08 17:40:37
|
||||
*/
|
||||
@Tag(name = "渗压设备表")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticPressDevice")
|
||||
//@Tag(name = "渗压设备表")
|
||||
//@RestController
|
||||
//@RequestMapping(value="/osmoticPressDevice")
|
||||
public class OsmoticPressDeviceController extends AbstractCommonFileController{
|
||||
|
||||
@Autowired
|
||||
|
|
|
|||
|
|
@ -1,178 +1,178 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
|
||||
import com.gunshi.project.hsz.entity.vo.OsmoticChartVo;
|
||||
import com.gunshi.project.hsz.entity.vo.OsmoticPressDetailVo;
|
||||
import com.gunshi.project.hsz.entity.vo.OsmoticPressVo;
|
||||
import com.gunshi.project.hsz.entity.vo.OsmoticStationVo;
|
||||
import com.gunshi.project.hsz.model.OsmoticPressDevice;
|
||||
import com.gunshi.project.hsz.model.OsmoticPressR;
|
||||
import com.gunshi.project.hsz.service.OsmoticPressDeviceService;
|
||||
import com.gunshi.project.hsz.service.OsmoticPressRService;
|
||||
import com.gunshi.project.hsz.validate.markers.Insert;
|
||||
import com.gunshi.project.hsz.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 描述: 渗压监测记录表
|
||||
* author: xusan
|
||||
* date: 2024-07-08 17:40:37
|
||||
*/
|
||||
@Tag(name = "渗压监测记录表")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticPressR")
|
||||
public class OsmoticPressRController {
|
||||
|
||||
@Autowired
|
||||
private OsmoticPressRService service;
|
||||
|
||||
@Autowired
|
||||
private OsmoticPressDeviceService osmoticPressDeviceService;
|
||||
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<OsmoticPressR> insert(@Validated(Insert.class) @RequestBody OsmoticPressR dto) {
|
||||
// // 通过时间戳去除毫秒
|
||||
// long currentTime = System.currentTimeMillis();
|
||||
// long seconds = currentTime / 1000; // 去掉毫秒部分
|
||||
// Date dateWithoutMillis = new Date(seconds * 1000); // 转回毫秒时间戳
|
||||
// dto.setTm(dateWithoutMillis);
|
||||
boolean result = service.save(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<OsmoticPressR> update(@Validated(Update.class) @RequestBody OsmoticPressR dto) {
|
||||
LambdaUpdateWrapper<OsmoticPressR> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(OsmoticPressR::getTm, dto.getTm())
|
||||
.eq(OsmoticPressR::getStationCode, dto.getStationCode())
|
||||
.set(OsmoticPressR::getPress, dto.getPress())
|
||||
.set(OsmoticPressR::getVib, dto.getVib())
|
||||
.set(OsmoticPressR::getTemp, dto.getTemp())
|
||||
.set(OsmoticPressR::getValue, dto.getValue())
|
||||
.set(OsmoticPressR::getChan, dto.getChan());
|
||||
boolean update = service.update(null, wrapper);
|
||||
return R.ok(update ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@GetMapping("/del/{id}/{tm}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id,@Schema(name = "tm") @PathVariable("tm") Serializable tm) {
|
||||
if(Objects.isNull(id) || Objects.isNull(tm)){
|
||||
return R.ok(false);
|
||||
}
|
||||
QueryWrapper<OsmoticPressR> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("station_code", id).eq("tm", tm);
|
||||
return R.ok(service.remove(wrapper));
|
||||
}
|
||||
|
||||
@Operation(summary = "列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<OsmoticPressR>> list() {
|
||||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
public R<Page<OsmoticPressR>> page(@RequestBody OsmoticQueryPageSo osmoticQueryPageSo) {
|
||||
Page<OsmoticPressR> osmoticPressRPage = service.queryPage(osmoticQueryPageSo);
|
||||
List<OsmoticPressR> records = osmoticPressRPage.getRecords();
|
||||
if(CollectionUtils.isEmpty(records)){
|
||||
return R.ok(osmoticPressRPage);
|
||||
}
|
||||
List<OsmoticPressR> collect = records.stream().peek(e -> {
|
||||
LambdaQueryWrapper<OsmoticPressDevice> wq = new LambdaQueryWrapper();
|
||||
wq.eq(OsmoticPressDevice::getStationCode, e.getStationCode());
|
||||
List<OsmoticPressDevice> list = osmoticPressDeviceService.list(wq);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
OsmoticPressDevice osmoticPressDevice = list.stream().findFirst().orElse(null);
|
||||
e.setProfileCode(osmoticPressDevice.getProfileCode());
|
||||
}
|
||||
}).collect(Collectors.toList());
|
||||
osmoticPressRPage.setRecords(collect);
|
||||
return R.ok(osmoticPressRPage);
|
||||
}
|
||||
|
||||
@Operation(summary = "大屏-大坝安全监测统计")
|
||||
@GetMapping("/stat")
|
||||
public R<Map<Integer,Integer>> stat() {
|
||||
return R.ok(service.stat());
|
||||
}
|
||||
|
||||
@Operation(summary = "布置图-渗压/渗流监测")
|
||||
@GetMapping("/list/value")
|
||||
public R<List<OsmoticPressVo>> listValue(@Schema(name = "type",description = "类型(1渗压 2渗流)") @RequestParam("type") Integer type) {
|
||||
return R.ok(service.listValue(type));
|
||||
}
|
||||
|
||||
@Operation(summary = "布置图-按测站查询渗压/渗流监测数据")
|
||||
@PostMapping("/detail/value")
|
||||
public R<List<OsmoticPressDetailVo>> detailValue(@RequestBody @Validated OsmoticDetailQuerySo so) {
|
||||
return R.ok(service.detailValue(so));
|
||||
}
|
||||
|
||||
@Operation(summary = "测值查询(数据表)")
|
||||
@PostMapping("/query/value")
|
||||
public R<List<OsmoticStationVo>> queryValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.queryValue(osmoticQuerySo,null));
|
||||
}
|
||||
|
||||
@Operation(summary = "测值查询(多图单表)")
|
||||
@PostMapping("/query/chart")
|
||||
public R<List<OsmoticChartVo>> queryChart(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.queryChart(osmoticQuerySo,null));
|
||||
}
|
||||
|
||||
@Operation(summary = "浸润线查询")
|
||||
@PostMapping("/infiltra/line")
|
||||
public R<List<OsmoticStationVo>> infiltraLine(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.infiltraLine(osmoticQuerySo));
|
||||
}
|
||||
|
||||
@Operation(summary = "浸润线导出")
|
||||
@PostMapping( "/export")
|
||||
public void export(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
|
||||
service.export(osmoticQuerySo,response);
|
||||
}
|
||||
|
||||
@Operation(summary = "年度渗压/渗流统计(表格)")
|
||||
@PostMapping("/year/stat")
|
||||
public R<List<OsmoticStationVo>> yearStat(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.yearStat(osmoticQuerySo));
|
||||
}
|
||||
|
||||
@Operation(summary = "年度渗压/渗流统计(全年度特征值统计)")
|
||||
@PostMapping("/year/stat/value")
|
||||
public R<List<OsmoticChartVo>> yearStatValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.yearStatValue(osmoticQuerySo));
|
||||
}
|
||||
|
||||
@Operation(summary = "年度渗压/渗流统计导出")
|
||||
@PostMapping( "/year/stat/export")
|
||||
public void yearStatExport(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
|
||||
service.yearStatExport(osmoticQuerySo,response);
|
||||
}
|
||||
|
||||
}
|
||||
//package com.gunshi.project.hsz.controller;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
//import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
//import com.gunshi.core.result.R;
|
||||
//import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
|
||||
//import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo;
|
||||
//import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
|
||||
//import com.gunshi.project.hsz.entity.vo.OsmoticChartVo;
|
||||
//import com.gunshi.project.hsz.entity.vo.OsmoticPressDetailVo;
|
||||
//import com.gunshi.project.hsz.entity.vo.OsmoticPressVo;
|
||||
//import com.gunshi.project.hsz.entity.vo.OsmoticStationVo;
|
||||
//import com.gunshi.project.hsz.model.OsmoticPressDevice;
|
||||
//import com.gunshi.project.hsz.model.OsmoticPressR;
|
||||
//import com.gunshi.project.hsz.service.OsmoticPressDeviceService;
|
||||
//import com.gunshi.project.hsz.service.OsmoticPressRService;
|
||||
//import com.gunshi.project.hsz.validate.markers.Insert;
|
||||
//import com.gunshi.project.hsz.validate.markers.Update;
|
||||
//import io.swagger.v3.oas.annotations.Operation;
|
||||
//import io.swagger.v3.oas.annotations.media.Schema;
|
||||
//import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
//import jakarta.servlet.http.HttpServletResponse;
|
||||
//import org.apache.commons.collections4.CollectionUtils;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.validation.annotation.Validated;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//import java.util.Objects;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * 描述: 渗压监测记录表
|
||||
// * author: xusan
|
||||
// * date: 2024-07-08 17:40:37
|
||||
// */
|
||||
////@Tag(name = "渗压监测记录表")
|
||||
////@RestController
|
||||
////@RequestMapping(value="/osmoticPressR")
|
||||
//public class OsmoticPressRController {
|
||||
//
|
||||
// @Autowired
|
||||
// private OsmoticPressRService service;
|
||||
//
|
||||
// @Autowired
|
||||
// private OsmoticPressDeviceService osmoticPressDeviceService;
|
||||
//
|
||||
//
|
||||
// @Operation(summary = "新增")
|
||||
// @PostMapping("/insert")
|
||||
// public R<OsmoticPressR> insert(@Validated(Insert.class) @RequestBody OsmoticPressR dto) {
|
||||
//// // 通过时间戳去除毫秒
|
||||
//// long currentTime = System.currentTimeMillis();
|
||||
//// long seconds = currentTime / 1000; // 去掉毫秒部分
|
||||
//// Date dateWithoutMillis = new Date(seconds * 1000); // 转回毫秒时间戳
|
||||
//// dto.setTm(dateWithoutMillis);
|
||||
// boolean result = service.save(dto);
|
||||
// return R.ok(result ? dto : null);
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "修改")
|
||||
// @PostMapping("/update")
|
||||
// public R<OsmoticPressR> update(@Validated(Update.class) @RequestBody OsmoticPressR dto) {
|
||||
// LambdaUpdateWrapper<OsmoticPressR> wrapper = new LambdaUpdateWrapper<>();
|
||||
// wrapper.eq(OsmoticPressR::getTm, dto.getTm())
|
||||
// .eq(OsmoticPressR::getStationCode, dto.getStationCode())
|
||||
// .set(OsmoticPressR::getPress, dto.getPress())
|
||||
// .set(OsmoticPressR::getVib, dto.getVib())
|
||||
// .set(OsmoticPressR::getTemp, dto.getTemp())
|
||||
// .set(OsmoticPressR::getValue, dto.getValue())
|
||||
// .set(OsmoticPressR::getChan, dto.getChan());
|
||||
// boolean update = service.update(null, wrapper);
|
||||
// return R.ok(update ? dto : null);
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "删除")
|
||||
// @GetMapping("/del/{id}/{tm}")
|
||||
// public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id,@Schema(name = "tm") @PathVariable("tm") Serializable tm) {
|
||||
// if(Objects.isNull(id) || Objects.isNull(tm)){
|
||||
// return R.ok(false);
|
||||
// }
|
||||
// QueryWrapper<OsmoticPressR> wrapper = new QueryWrapper<>();
|
||||
// wrapper.eq("station_code", id).eq("tm", tm);
|
||||
// return R.ok(service.remove(wrapper));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "列表")
|
||||
// @PostMapping("/list")
|
||||
// public R<List<OsmoticPressR>> list() {
|
||||
// return R.ok(service.lambdaQuery().list());
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
// public R<Page<OsmoticPressR>> page(@RequestBody OsmoticQueryPageSo osmoticQueryPageSo) {
|
||||
// Page<OsmoticPressR> osmoticPressRPage = service.queryPage(osmoticQueryPageSo);
|
||||
// List<OsmoticPressR> records = osmoticPressRPage.getRecords();
|
||||
// if(CollectionUtils.isEmpty(records)){
|
||||
// return R.ok(osmoticPressRPage);
|
||||
// }
|
||||
// List<OsmoticPressR> collect = records.stream().peek(e -> {
|
||||
// LambdaQueryWrapper<OsmoticPressDevice> wq = new LambdaQueryWrapper();
|
||||
// wq.eq(OsmoticPressDevice::getStationCode, e.getStationCode());
|
||||
// List<OsmoticPressDevice> list = osmoticPressDeviceService.list(wq);
|
||||
// if (CollectionUtils.isNotEmpty(list)) {
|
||||
// OsmoticPressDevice osmoticPressDevice = list.stream().findFirst().orElse(null);
|
||||
// e.setProfileCode(osmoticPressDevice.getProfileCode());
|
||||
// }
|
||||
// }).collect(Collectors.toList());
|
||||
// osmoticPressRPage.setRecords(collect);
|
||||
// return R.ok(osmoticPressRPage);
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "大屏-大坝安全监测统计")
|
||||
// @GetMapping("/stat")
|
||||
// public R<Map<Integer,Integer>> stat() {
|
||||
// return R.ok(service.stat());
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "布置图-渗压/渗流监测")
|
||||
// @GetMapping("/list/value")
|
||||
// public R<List<OsmoticPressVo>> listValue(@Schema(name = "type",description = "类型(1渗压 2渗流)") @RequestParam("type") Integer type) {
|
||||
// return R.ok(service.listValue(type));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "布置图-按测站查询渗压/渗流监测数据")
|
||||
// @PostMapping("/detail/value")
|
||||
// public R<List<OsmoticPressDetailVo>> detailValue(@RequestBody @Validated OsmoticDetailQuerySo so) {
|
||||
// return R.ok(service.detailValue(so));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "测值查询(数据表)")
|
||||
// @PostMapping("/query/value")
|
||||
// public R<List<OsmoticStationVo>> queryValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
// return R.ok(service.queryValue(osmoticQuerySo,null));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "测值查询(多图单表)")
|
||||
// @PostMapping("/query/chart")
|
||||
// public R<List<OsmoticChartVo>> queryChart(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
// return R.ok(service.queryChart(osmoticQuerySo,null));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "浸润线查询")
|
||||
// @PostMapping("/infiltra/line")
|
||||
// public R<List<OsmoticStationVo>> infiltraLine(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
// return R.ok(service.infiltraLine(osmoticQuerySo));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "浸润线导出")
|
||||
// @PostMapping( "/export")
|
||||
// public void export(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
|
||||
// service.export(osmoticQuerySo,response);
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "年度渗压/渗流统计(表格)")
|
||||
// @PostMapping("/year/stat")
|
||||
// public R<List<OsmoticStationVo>> yearStat(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
// return R.ok(service.yearStat(osmoticQuerySo));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "年度渗压/渗流统计(全年度特征值统计)")
|
||||
// @PostMapping("/year/stat/value")
|
||||
// public R<List<OsmoticChartVo>> yearStatValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
// return R.ok(service.yearStatValue(osmoticQuerySo));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "年度渗压/渗流统计导出")
|
||||
// @PostMapping( "/year/stat/export")
|
||||
// public void yearStatExport(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
|
||||
// service.yearStatExport(osmoticQuerySo,response);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
|
@ -23,9 +23,9 @@ import java.util.Objects;
|
|||
* author: xusan
|
||||
* date: 2024-07-08 17:40:37
|
||||
*/
|
||||
@Tag(name = "位移设备表")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticShiftDevice")
|
||||
//@Tag(name = "位移设备表")
|
||||
//@RestController
|
||||
//@RequestMapping(value="/osmoticShiftDevice")
|
||||
public class OsmoticShiftDeviceController {
|
||||
|
||||
@Autowired
|
||||
|
|
|
|||
|
|
@ -1,116 +1,116 @@
|
|||
package com.gunshi.project.hsz.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
|
||||
import com.gunshi.project.hsz.entity.vo.*;
|
||||
import com.gunshi.project.hsz.model.OsmoticShiftR;
|
||||
import com.gunshi.project.hsz.service.OsmoticShiftRService;
|
||||
import com.gunshi.project.hsz.validate.markers.Insert;
|
||||
import com.gunshi.project.hsz.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 描述: 位移监测记录表
|
||||
* author: xusan
|
||||
* date: 2024-07-08 17:40:37
|
||||
*/
|
||||
@Tag(name = "位移监测记录表")
|
||||
@RestController
|
||||
@RequestMapping(value="/osmoticShiftR")
|
||||
public class OsmoticShiftRController {
|
||||
|
||||
@Autowired
|
||||
private OsmoticShiftRService service;
|
||||
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<OsmoticShiftR> insert(@Validated(Insert.class) @RequestBody OsmoticShiftR dto) {
|
||||
// dto.setTm(new Date());
|
||||
boolean result = service.save(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<OsmoticShiftR> update(@Validated(Update.class) @RequestBody OsmoticShiftR dto) {
|
||||
LambdaUpdateWrapper<OsmoticShiftR> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(OsmoticShiftR::getStationCode, dto.getStationCode())
|
||||
.eq(OsmoticShiftR::getTm, dto.getTm())
|
||||
.set(OsmoticShiftR::getX, dto.getX())
|
||||
.set(OsmoticShiftR::getY, dto.getY())
|
||||
.set(OsmoticShiftR::getH, dto.getH());
|
||||
boolean update = service.update(null, wrapper);
|
||||
return R.ok(update ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@GetMapping("/del/{id}/{tm}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id,@Schema(name = "tm") @PathVariable("tm") Serializable tm) {
|
||||
|
||||
if(Objects.isNull(id) || Objects.isNull(tm)){
|
||||
return R.ok(false);
|
||||
}
|
||||
QueryWrapper<OsmoticShiftR> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("station_code", id).eq("tm", tm);
|
||||
return R.ok(service.remove(wrapper));
|
||||
}
|
||||
|
||||
@Operation(summary = "列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<OsmoticShiftR>> list() {
|
||||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
public R<Page<OsmoticShiftR>> page(@RequestBody OsmoticQueryPageSo osmoticQueryPageSo) {
|
||||
return R.ok(service.queryPage(osmoticQueryPageSo));
|
||||
}
|
||||
|
||||
@Operation(summary = "年度位移统计(表格)")
|
||||
@PostMapping("/year/stat")
|
||||
public R<List<OsmoticShiftVo>> yearStat(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.yearStat(osmoticQuerySo));
|
||||
}
|
||||
|
||||
@Operation(summary = "年度位移统计(全年度特征值统计)")
|
||||
@PostMapping("/year/stat/value")
|
||||
public R<List<OsmoticChartVo>> yearStatValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
return R.ok(service.yearStatValue(osmoticQuerySo));
|
||||
}
|
||||
|
||||
@Operation(summary = "年度位移统计导出")
|
||||
@PostMapping( "/year/stat/export")
|
||||
public void yearStatExport(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
|
||||
service.yearStatExport(osmoticQuerySo,response);
|
||||
}
|
||||
|
||||
@Operation(summary = "布置图-位移监测")
|
||||
@GetMapping("/list/value")
|
||||
public R<List<OsmoticShiftListVo>> listValue() {
|
||||
return R.ok(service.listValue());
|
||||
}
|
||||
|
||||
@Operation(summary = "布置图-按测站查询位移监测数据")
|
||||
@PostMapping("/detail/value")
|
||||
public R<List<OsmoticShiftValueVo>> detailValue(@RequestBody @Validated OsmoticDetailQuerySo so) {
|
||||
return R.ok(service.detailValue(so));
|
||||
}
|
||||
|
||||
}
|
||||
//package com.gunshi.project.hsz.controller;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
//import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
//import com.gunshi.core.result.R;
|
||||
//import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
|
||||
//import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo;
|
||||
//import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
|
||||
//import com.gunshi.project.hsz.entity.vo.*;
|
||||
//import com.gunshi.project.hsz.model.OsmoticShiftR;
|
||||
//import com.gunshi.project.hsz.service.OsmoticShiftRService;
|
||||
//import com.gunshi.project.hsz.validate.markers.Insert;
|
||||
//import com.gunshi.project.hsz.validate.markers.Update;
|
||||
//import io.swagger.v3.oas.annotations.Operation;
|
||||
//import io.swagger.v3.oas.annotations.media.Schema;
|
||||
//import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
//import jakarta.servlet.http.HttpServletResponse;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.validation.annotation.Validated;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//import java.util.List;
|
||||
//import java.util.Objects;
|
||||
//
|
||||
///**
|
||||
// * 描述: 位移监测记录表
|
||||
// * author: xusan
|
||||
// * date: 2024-07-08 17:40:37
|
||||
// */
|
||||
////@Tag(name = "位移监测记录表")
|
||||
////@RestController
|
||||
////@RequestMapping(value="/osmoticShiftR")
|
||||
//public class OsmoticShiftRController {
|
||||
//
|
||||
// @Autowired
|
||||
// private OsmoticShiftRService service;
|
||||
//
|
||||
//
|
||||
// @Operation(summary = "新增")
|
||||
// @PostMapping("/insert")
|
||||
// public R<OsmoticShiftR> insert(@Validated(Insert.class) @RequestBody OsmoticShiftR dto) {
|
||||
// // dto.setTm(new Date());
|
||||
// boolean result = service.save(dto);
|
||||
// return R.ok(result ? dto : null);
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "修改")
|
||||
// @PostMapping("/update")
|
||||
// public R<OsmoticShiftR> update(@Validated(Update.class) @RequestBody OsmoticShiftR dto) {
|
||||
// LambdaUpdateWrapper<OsmoticShiftR> wrapper = new LambdaUpdateWrapper<>();
|
||||
// wrapper.eq(OsmoticShiftR::getStationCode, dto.getStationCode())
|
||||
// .eq(OsmoticShiftR::getTm, dto.getTm())
|
||||
// .set(OsmoticShiftR::getX, dto.getX())
|
||||
// .set(OsmoticShiftR::getY, dto.getY())
|
||||
// .set(OsmoticShiftR::getH, dto.getH());
|
||||
// boolean update = service.update(null, wrapper);
|
||||
// return R.ok(update ? dto : null);
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "删除")
|
||||
// @GetMapping("/del/{id}/{tm}")
|
||||
// public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id,@Schema(name = "tm") @PathVariable("tm") Serializable tm) {
|
||||
//
|
||||
// if(Objects.isNull(id) || Objects.isNull(tm)){
|
||||
// return R.ok(false);
|
||||
// }
|
||||
// QueryWrapper<OsmoticShiftR> wrapper = new QueryWrapper<>();
|
||||
// wrapper.eq("station_code", id).eq("tm", tm);
|
||||
// return R.ok(service.remove(wrapper));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "列表")
|
||||
// @PostMapping("/list")
|
||||
// public R<List<OsmoticShiftR>> list() {
|
||||
// return R.ok(service.lambdaQuery().list());
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
// public R<Page<OsmoticShiftR>> page(@RequestBody OsmoticQueryPageSo osmoticQueryPageSo) {
|
||||
// return R.ok(service.queryPage(osmoticQueryPageSo));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "年度位移统计(表格)")
|
||||
// @PostMapping("/year/stat")
|
||||
// public R<List<OsmoticShiftVo>> yearStat(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
// return R.ok(service.yearStat(osmoticQuerySo));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "年度位移统计(全年度特征值统计)")
|
||||
// @PostMapping("/year/stat/value")
|
||||
// public R<List<OsmoticChartVo>> yearStatValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
|
||||
// return R.ok(service.yearStatValue(osmoticQuerySo));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "年度位移统计导出")
|
||||
// @PostMapping( "/year/stat/export")
|
||||
// public void yearStatExport(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
|
||||
// service.yearStatExport(osmoticQuerySo,response);
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "布置图-位移监测")
|
||||
// @GetMapping("/list/value")
|
||||
// public R<List<OsmoticShiftListVo>> listValue() {
|
||||
// return R.ok(service.listValue());
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "布置图-按测站查询位移监测数据")
|
||||
// @PostMapping("/detail/value")
|
||||
// public R<List<OsmoticShiftValueVo>> detailValue(@RequestBody @Validated OsmoticDetailQuerySo so) {
|
||||
// return R.ok(service.detailValue(so));
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
|
@ -28,9 +28,9 @@ import java.util.stream.Collectors;
|
|||
* author: xusan
|
||||
* date: 2024-08-28 10:29:58
|
||||
*/
|
||||
@Tag(name = "白蚁普查")
|
||||
@RestController
|
||||
@RequestMapping(value="/termite/survey")
|
||||
//@Tag(name = "白蚁普查")
|
||||
//@RestController
|
||||
//@RequestMapping(value="/termite/survey")
|
||||
public class TermiteSurveyController extends AbstractCommonFileController{
|
||||
|
||||
@Autowired
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
package com.gunshi.project.hsz.entity.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class ArtificialJcskGnssDeleteDto {
|
||||
|
||||
|
||||
private String cd;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date tm;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.gunshi.project.hsz.entity.dto;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class ArtificialJcskSyDeleteDto {
|
||||
|
||||
private String stcd;
|
||||
|
||||
private String mpcd;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date mstm;
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.gunshi.project.hsz.entity.dto;
|
||||
|
||||
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.hsz.entity.page.GenericPageParams;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class BusinessRuleDto extends GenericPageParams {
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@DateTimeFormat(pattern = DateFormatString.YYYY_MM_DD)
|
||||
private Date stm;
|
||||
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
@DateTimeFormat(pattern = DateFormatString.YYYY_MM_DD)
|
||||
private Date etm;
|
||||
|
||||
|
||||
@Schema(description = "规则名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "规则类型 1 水资源调度,2 防洪调度,3 工程安全,4 应急抢险,5 其他")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private Integer status;
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.gunshi.project.hsz.entity.dto;
|
||||
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import com.gunshi.project.hsz.entity.page.GenericPageParams;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class DispatchSchemeDto extends GenericPageParams {
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@DateTimeFormat(pattern = DateFormatString.YYYY_MM_DD)
|
||||
private Date stm;
|
||||
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
@DateTimeFormat(pattern = DateFormatString.YYYY_MM_DD)
|
||||
private Date etm;
|
||||
|
||||
|
||||
@Schema(description = "方案名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "调度类型 1 防洪调度,2 兴利调度,3 生态调度,4 应急调度,5 其他")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private Integer status;
|
||||
|
||||
PageSo pageSo = new PageSo();
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.gunshi.project.hsz.entity.dto;
|
||||
|
||||
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.hsz.entity.page.GenericPageParams;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class ProjectSafetyDto extends GenericPageParams {
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@DateTimeFormat(pattern = DateFormatString.YYYY_MM_DD)
|
||||
private Date stm;
|
||||
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
@DateTimeFormat(pattern = DateFormatString.YYYY_MM_DD)
|
||||
private Date etm;
|
||||
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "知识库类型 ")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private Integer status;
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.gunshi.project.hsz.entity.dto;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SqlRequest {
|
||||
private String sql;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.gunshi.project.hsz.entity.dto;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class StGateRDto {
|
||||
|
||||
private String stcd;
|
||||
|
||||
private BigDecimal gtop;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime tm;
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.gunshi.project.hsz.entity.so;
|
||||
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "分页查询对象")
|
||||
public class JcskByBDPageSo {
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
@Schema(description = "分页参数")
|
||||
private PageSo pageSo;
|
||||
|
||||
@Schema(description = "机箱编号 (一个机箱有多个设备)")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "设备编号")
|
||||
private String order;
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.gunshi.project.hsz.entity.so;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.db.dto.DateTimeRangeSo;
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
@Schema(description = "分页查询对象")
|
||||
public class JcskByRPageSo {
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
@Schema(description = "分页参数")
|
||||
private PageSo pageSo;
|
||||
|
||||
private DateTimeRangeSo dateTimeRangeSo;
|
||||
|
||||
@Schema(description = "监测时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date obDate;
|
||||
|
||||
@Schema(description = "设备编号")
|
||||
private String deviceCode;
|
||||
|
||||
@Schema(description = "测点编号")
|
||||
private String order;
|
||||
|
||||
@Schema(description = "有无白蚁入侵")
|
||||
private Integer status;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.gunshi.project.hsz.entity.so;
|
||||
|
||||
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "分页查询对象")
|
||||
public class JcskGnssBPageSo {
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
@Schema(description = "分页参数")
|
||||
private PageSo pageSo;
|
||||
|
||||
@Schema(description = "设备编码")
|
||||
private String stationCode;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.gunshi.project.hsz.entity.so;
|
||||
|
||||
|
||||
import com.gunshi.db.dto.DateTimeRangeSo;
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "分页查询对象")
|
||||
public class JcskGnssRPageSo {
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
@Schema(description = "分页参数")
|
||||
private PageSo pageSo;
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
private DateTimeRangeSo dateTimeRangeSo;
|
||||
|
||||
|
||||
@Schema(description = "测点编码")
|
||||
private String cd;
|
||||
|
||||
@Schema(description = "断面")
|
||||
private String ch;
|
||||
|
||||
@Schema(description = "录入方式")
|
||||
private Integer isArtificial;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.gunshi.project.hsz.entity.so;
|
||||
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "分页查询对象")
|
||||
public class JcskSlBPageSo {
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
@Schema(description = "分页参数")
|
||||
private PageSo pageSo;
|
||||
|
||||
|
||||
@Schema(description = "水库代码")
|
||||
private String rscd;
|
||||
|
||||
@Schema(description = "RTU编号")
|
||||
private String stcd;
|
||||
|
||||
@Schema(description = "测点编号")
|
||||
private String mpcd;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.gunshi.project.hsz.entity.so;
|
||||
|
||||
|
||||
import com.gunshi.db.dto.DateTimeRangeSo;
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "分页查询对象")
|
||||
public class JcskSlRPageSo {
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
@Schema(description = "分页参数")
|
||||
private PageSo pageSo;
|
||||
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
private DateTimeRangeSo dateTimeRangeSo;
|
||||
|
||||
@Schema(description = "断面")
|
||||
private String dm;
|
||||
|
||||
|
||||
@Schema(description = "测点")
|
||||
private String dvcd;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.gunshi.project.hsz.entity.so;
|
||||
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "分页查询对象")
|
||||
public class JcskSyBPageSo {
|
||||
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
@Schema(description = "分页参数")
|
||||
private PageSo pageSo;
|
||||
|
||||
|
||||
@Schema(description = "断面")
|
||||
private String dm;
|
||||
|
||||
@Schema(description = "测点编号")
|
||||
private String mpcd;
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.gunshi.project.hsz.entity.so;
|
||||
|
||||
import com.gunshi.db.dto.DateTimeRangeSo;
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "分页查询对象")
|
||||
public class JcskSyRPageSo {
|
||||
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
@Schema(description = "分页参数")
|
||||
private PageSo pageSo;
|
||||
|
||||
|
||||
@Schema(description = "上报时间")
|
||||
private DateTimeRangeSo dateTimeRangeSo;
|
||||
|
||||
@Schema(description = "测点编号")
|
||||
private String dvcd;
|
||||
|
||||
@Schema(description = "断面")
|
||||
private String dm;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ public class OsmoticQuerySo {
|
|||
private Integer type = 1;
|
||||
|
||||
@Schema(description = "年度")
|
||||
private Integer year;
|
||||
private String year;
|
||||
|
||||
@Schema(description = "时间")
|
||||
private DateTimeRangeSo dateTimeRangeSo;
|
||||
|
|
@ -32,4 +32,7 @@ public class OsmoticQuerySo {
|
|||
|
||||
@Schema(description = "测点编号")
|
||||
private List<@NotEmpty String> stationCodes;
|
||||
|
||||
@Schema(description = "wy (没啥用的字段)")
|
||||
private String wy;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
package com.gunshi.project.hsz.entity.so;
|
||||
|
||||
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "分页查询对象")
|
||||
public class WaterDevicePageSo {
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
@Schema(description = "分页参数")
|
||||
private PageSo pageSo;
|
||||
|
||||
|
||||
@Schema(description = "设备编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "设备名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "接入站点编码")
|
||||
private String mnNo;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DmDvcdVo {
|
||||
|
||||
@Schema(description = "断面")
|
||||
private String dm;
|
||||
|
||||
@Schema(description = "断面编码")
|
||||
private List<String> dvcd;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class GnssCdAndCdVo {
|
||||
|
||||
private String ch;
|
||||
|
||||
private List<String> childrens;
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.hsz.model.JcskGnssB;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class HomeJcskGnssBVo extends JcskGnssB {
|
||||
|
||||
/**
|
||||
* x方向
|
||||
*/
|
||||
@Schema(description="x方向")
|
||||
private String x;
|
||||
|
||||
/**
|
||||
* y方向
|
||||
*/
|
||||
@Schema(description="y方向")
|
||||
private String y;
|
||||
|
||||
/**
|
||||
* h方向
|
||||
*/
|
||||
@Schema(description="h方向")
|
||||
private String h;
|
||||
|
||||
/**
|
||||
* 监测时间
|
||||
*/
|
||||
@Schema(description="监测时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.hsz.model.JcskSyB;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class HomeJcskSYBVo extends JcskSyB {
|
||||
|
||||
/**
|
||||
* 管水位
|
||||
*/
|
||||
@Schema(description="管水位")
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 监测时间
|
||||
*/
|
||||
@Schema(description="监测时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.hsz.model.JcskSlB;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class HomeJcskSlBVo extends JcskSlB {
|
||||
|
||||
/**
|
||||
* 管水位
|
||||
*/
|
||||
@Schema(description="流量")
|
||||
private String q;
|
||||
|
||||
/**
|
||||
* 监测时间
|
||||
*/
|
||||
@Schema(description="监测时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class JcskByInspectDetailVo {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.hsz.model.InspectTask;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class JcskByRProcessVo extends InspectTask {
|
||||
|
||||
@Schema(description = "设备编号")
|
||||
private String order;
|
||||
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
@Schema(description = "监测时间")
|
||||
private Date obDate;
|
||||
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
@Schema(description = "监测时间 + hours之后的结束时间")
|
||||
private Date obResolveDate;
|
||||
|
||||
|
||||
private Integer hours;
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class JcskGnessListVo {
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@Schema(description="测点编号")
|
||||
private String cd;
|
||||
|
||||
@Schema(description = "桩号/断面")
|
||||
private String ch;
|
||||
|
||||
@Schema(description = "测点名称")
|
||||
private String cdnm;
|
||||
|
||||
@Schema(description = "测点编号/另一种叫法")
|
||||
private String stationCode;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@Schema(description="时间")
|
||||
private String tm;
|
||||
|
||||
@Schema(description = "监测时间是否离当前时间超过2天(0否 1是)")
|
||||
private Integer flag = 0;
|
||||
|
||||
/**
|
||||
* x方向
|
||||
*/
|
||||
@Schema(description="e方向")
|
||||
private BigDecimal de;
|
||||
|
||||
@Schema(description = "e方向是否超过预警(0否 1是)")
|
||||
private Integer xStatus = 0;
|
||||
|
||||
/**
|
||||
* y方向
|
||||
*/
|
||||
@Schema(description="n方向")
|
||||
private BigDecimal dn;
|
||||
|
||||
@Schema(description = "n方向是否超过预警(0否 1是)")
|
||||
private Integer yStatus = 0;
|
||||
|
||||
/**
|
||||
* h方向
|
||||
*/
|
||||
@Schema(description="u方向")
|
||||
private BigDecimal du;
|
||||
|
||||
@Schema(description = "u方向是否超过预警(0否 1是)")
|
||||
private Integer hStatus = 0;
|
||||
|
||||
@JsonIgnore
|
||||
private String direction;
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class JcskGnssRHisVo {
|
||||
/**
|
||||
* 水库编码设备编码
|
||||
*/
|
||||
@TableField("res_cd")
|
||||
private String resCd;
|
||||
|
||||
/**
|
||||
* 测点编码
|
||||
*/
|
||||
@TableField("cd")
|
||||
private String cd;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String ch;
|
||||
|
||||
/**
|
||||
* e方向变形值,单位(mm)
|
||||
*/
|
||||
@TableField("de")
|
||||
private BigDecimal de;
|
||||
|
||||
/**
|
||||
* n方向变形值,单位(mm)
|
||||
*/
|
||||
@TableField("dn")
|
||||
private BigDecimal dn;
|
||||
|
||||
/**
|
||||
* u方向变形值,单位(mm)
|
||||
*/
|
||||
@TableField("du")
|
||||
private BigDecimal du;
|
||||
|
||||
/**
|
||||
* 站点高程
|
||||
*/
|
||||
@TableField("alt")
|
||||
private BigDecimal alt;
|
||||
|
||||
/**
|
||||
* 监测时间
|
||||
*/
|
||||
@TableField("tm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_tm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTm;
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class JcskSlRHisVo {
|
||||
|
||||
/**
|
||||
* 水库代码
|
||||
*/
|
||||
@TableField("rscd")
|
||||
private String rscd;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String dm;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String dvcd;
|
||||
|
||||
/**
|
||||
* 水工建筑物编号
|
||||
*/
|
||||
@TableField("hycncd")
|
||||
private String hycncd;
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@TableField("mpcd")
|
||||
private String mpcd;
|
||||
|
||||
|
||||
@TableField("stcd")
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
* 测量时间
|
||||
*/
|
||||
@TableField("mstm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date mstm;
|
||||
|
||||
/**
|
||||
* 温度,单位℃
|
||||
*/
|
||||
@TableField("tm")
|
||||
private BigDecimal tm;
|
||||
|
||||
/**
|
||||
* 渗流量,单位l/s
|
||||
*/
|
||||
@TableField("spqn")
|
||||
private BigDecimal spqn;
|
||||
|
||||
/**
|
||||
* 标准水温渗流量,单位l/s
|
||||
*/
|
||||
@TableField("stspqn")
|
||||
private BigDecimal stspqn;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_tm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTm;
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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;
|
||||
|
||||
@Data
|
||||
public class JcskSyRHisVo {
|
||||
|
||||
/**
|
||||
* 水库代码
|
||||
*/
|
||||
@TableField("rscd")
|
||||
private String rscd;
|
||||
|
||||
/**
|
||||
* 测站编码
|
||||
*/
|
||||
@TableField("stcd")
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
* 水工建筑物编号
|
||||
*/
|
||||
@TableField("hycncd")
|
||||
private String hycncd;
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@TableField("mpcd")
|
||||
private String mpcd;
|
||||
|
||||
/**
|
||||
* 测量时间
|
||||
*/
|
||||
@TableField("mstm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime mstm;
|
||||
|
||||
/**
|
||||
* 温度
|
||||
*/
|
||||
@TableField("tm")
|
||||
private BigDecimal tm;
|
||||
|
||||
/**
|
||||
* 渗流压力水位,单位m
|
||||
*/
|
||||
@TableField("spprwl")
|
||||
private BigDecimal spprwl;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_tm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime updateTm;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "断面编码")
|
||||
private String dm;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "断面名称")
|
||||
private String dmName;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "dvcd")
|
||||
private String dvcd;
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class JcskSyRVo {
|
||||
@Schema(description="测点编码")
|
||||
private String stationCode;
|
||||
|
||||
@Schema(description = "断面名称")
|
||||
private String profileName;
|
||||
|
||||
@Schema(description="监测时间")
|
||||
private String tm;
|
||||
|
||||
@Schema(description="监测值")
|
||||
private BigDecimal value;
|
||||
|
||||
@Schema(description = "监测时间是否离当前时间超过2天(0否 1是)")
|
||||
private Integer flag = 0;
|
||||
|
||||
@Schema(description = "是否超过预警(0否 1是)")
|
||||
private Integer status = 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class OsmoticChartDetailVo2 {
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@Schema(description="时间")
|
||||
private String tm;
|
||||
|
||||
/**
|
||||
* 库水位
|
||||
*/
|
||||
@Schema(description="库水位")
|
||||
private BigDecimal rz;
|
||||
|
||||
/**
|
||||
* 管水位
|
||||
*/
|
||||
@Schema(description="管水位")
|
||||
private BigDecimal value;
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OsmoticChartVo2 {
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@Schema(description="测点编号")
|
||||
private String cd;
|
||||
|
||||
/**
|
||||
* 最大值
|
||||
*/
|
||||
@Schema(description="最大值")
|
||||
private BigDecimal maxValue;
|
||||
|
||||
/**
|
||||
* 最大值时间
|
||||
*/
|
||||
@Schema(description="最大值时间")
|
||||
private String maxTm;
|
||||
|
||||
/**
|
||||
* 最小值
|
||||
*/
|
||||
@Schema(description="最小值")
|
||||
private BigDecimal minValue;
|
||||
|
||||
/**
|
||||
* 最小值时间
|
||||
*/
|
||||
@Schema(description="最小值时间")
|
||||
private String minTm;
|
||||
|
||||
/**
|
||||
* 变幅
|
||||
*/
|
||||
@Schema(description="变幅")
|
||||
private BigDecimal diff;
|
||||
|
||||
@Schema(description = "数据")
|
||||
private List<OsmoticChartDetailVo> detailVos;
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class OsmoticShiftListVo2 {
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@Schema(description="测点编号")
|
||||
private String cd;
|
||||
|
||||
private String cdNm;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@Schema(description="时间")
|
||||
private String tm;
|
||||
|
||||
@Schema(description = "监测时间是否离当前时间超过2天(0否 1是)")
|
||||
private Integer flag = 0;
|
||||
|
||||
/**
|
||||
* x方向
|
||||
*/
|
||||
@Schema(description="x方向")
|
||||
private BigDecimal de;
|
||||
|
||||
@Schema(description = "x方向是否超过预警(0否 1是)")
|
||||
private Integer xStatus = 0;
|
||||
|
||||
/**
|
||||
* y方向
|
||||
*/
|
||||
@Schema(description="y方向")
|
||||
private BigDecimal dn;
|
||||
|
||||
@Schema(description = "y方向是否超过预警(0否 1是)")
|
||||
private Integer yStatus = 0;
|
||||
|
||||
/**
|
||||
* h方向
|
||||
*/
|
||||
@Schema(description="h方向")
|
||||
private BigDecimal du;
|
||||
|
||||
@Schema(description = "h方向是否超过预警(0否 1是)")
|
||||
private Integer hStatus = 0;
|
||||
|
||||
@JsonIgnore
|
||||
private String direction;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class OsmoticShiftValueVo2 {
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@Schema(description="时间")
|
||||
private String tm;
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@Schema(description="测点编号")
|
||||
private String cd;
|
||||
|
||||
/**
|
||||
* x方向
|
||||
*/
|
||||
@Schema(description="e ->x方向")
|
||||
private BigDecimal de;
|
||||
|
||||
/**
|
||||
* y方向
|
||||
*/
|
||||
@Schema(description=" n ->y方向")
|
||||
private BigDecimal dn;
|
||||
|
||||
/**
|
||||
* h方向
|
||||
*/
|
||||
@Schema(description="u ->h方向")
|
||||
private BigDecimal du;
|
||||
|
||||
/**
|
||||
* 库水位
|
||||
*/
|
||||
@Schema(description="库水位")
|
||||
private BigDecimal rz;
|
||||
|
||||
|
||||
@Schema(description = "是否人工")
|
||||
private Integer isArtificial;
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OsmoticShiftVo2 {
|
||||
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@Schema(description="时间")
|
||||
private String tm;
|
||||
|
||||
@Schema(description="测值")
|
||||
private List<OsmoticShiftValueVo2> list;
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OsmoticStationVo2 extends StRzVo{
|
||||
|
||||
@Schema(description = "结果分析(0异常 1正常)")
|
||||
private Integer status = 1;
|
||||
|
||||
@Schema(description="测值")
|
||||
private List<OsmoticValueVo2> list;
|
||||
|
||||
@Schema(description = "降雨量")
|
||||
private BigDecimal drp;
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class OsmoticValueVo2 {
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@Schema(description="时间")
|
||||
private String tm;
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@Schema(description="测点编号")
|
||||
private String stationCode;
|
||||
|
||||
/**
|
||||
* 管水位
|
||||
*/
|
||||
@Schema(description="管水位")
|
||||
private BigDecimal value;
|
||||
|
||||
/**
|
||||
* 库水位
|
||||
*/
|
||||
@Schema(description="库水位")
|
||||
private BigDecimal rz;
|
||||
|
||||
@Schema(description = "结果分析(0异常 1正常)")
|
||||
private Integer status = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.gunshi.project.hsz.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SyStcdMpcdVo {
|
||||
|
||||
private String stcd;
|
||||
|
||||
private List<String> mpcdList;
|
||||
}
|
||||
|
|
@ -50,6 +50,21 @@ public interface InspectTaskMapper extends BaseMapper<InspectTask> {
|
|||
""")
|
||||
Page<InspectTask> pageQuery(Page<InspectTask> page,@Param("obj") InspectTaskPageSo pageSo);
|
||||
|
||||
@Select("""
|
||||
select count(is_handle) as handleNum from inspect_task_detail where is_handle = 0
|
||||
AND task_id = #{taskId}
|
||||
GROUP BY task_id
|
||||
""")
|
||||
Integer countIsHandle(@Param("taskId") Long taskId);
|
||||
|
||||
|
||||
@Select("""
|
||||
select count(is_normal) as problemNum from inspect_task_detail where is_normal = 0
|
||||
AND task_id = #{taskId}
|
||||
GROUP BY task_id
|
||||
""")
|
||||
Integer countIsNormal(@Param("taskId") Long taskId);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
with m1 as (
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.model.JcskByBD;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface JcskByBDMapper extends BaseMapper<JcskByBD> {
|
||||
|
||||
@Select("""
|
||||
select device_id
|
||||
from jcsk_by_b_d group by device_id
|
||||
""")
|
||||
List<String> listDevices();
|
||||
|
||||
|
||||
@Select("""
|
||||
SELECT t3.*, t1.status
|
||||
FROM jcsk_by_b_d t3
|
||||
left JOIN (
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT *,
|
||||
ROW_NUMBER() OVER (PARTITION BY "order" ORDER BY ob_date DESC) as rn
|
||||
FROM jcsk_by_r
|
||||
WHERE ob_date::date = #{obDate}
|
||||
) tmp
|
||||
WHERE rn = 1
|
||||
) t1 ON t3."order" = t1."order"
|
||||
ORDER BY t1.status DESC, t1.ob_date DESC;
|
||||
""")
|
||||
List<JcskByBD> listAll(@Param("obDate") Date obDate);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.model.JcskByB;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface JcskByBMapper extends BaseMapper<JcskByB> {
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.model.JcskByInspectTask;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface JcskByInspectTaskMapper extends BaseMapper<JcskByInspectTask> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.model.JcskByRProcess;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface JcskByRProcessMapper extends BaseMapper<JcskByRProcess> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.entity.vo.HomeJcskGnssBVo;
|
||||
import com.gunshi.project.hsz.model.JcskGnssB;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface JcskGnssBMapper extends BaseMapper<JcskGnssB> {
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT st.*,r.de as x,r.dn as y,r.du as h,r.tm FROM jcsk_gnss_b st
|
||||
LEFT JOIN (SELECT cd ,MAX(tm) tm FROM jcsk_gnss_r GROUP BY cd) maxr ON st.cd = maxr.cd
|
||||
LEFT JOIN jcsk_gnss_r r ON maxr.cd = r.cd AND maxr.tm = r.tm
|
||||
</script>
|
||||
""")
|
||||
List<HomeJcskGnssBVo> getDetailsAndMonitoringDataList();
|
||||
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT st.*,r.de as x,r.dn as y,r.du as h,r.tm FROM jcsk_gnss_b st
|
||||
LEFT JOIN (SELECT cd ,MAX(tm) tm FROM jcsk_gnss_r GROUP BY cd) maxr ON st.cd = maxr.cd
|
||||
LEFT JOIN jcsk_gnss_r r ON maxr.cd = r.cd AND maxr.tm = r.tm
|
||||
WHERE st.cd = #{id}
|
||||
</script>
|
||||
""")
|
||||
HomeJcskGnssBVo getDetailsById(String id);
|
||||
|
||||
|
||||
@Select("""
|
||||
select ch from jcsk_gnss_b where ch is not null
|
||||
group by ch
|
||||
""")
|
||||
List<String> listDms();
|
||||
|
||||
@Select("""
|
||||
select ch from jcsk_gnss_b group by ch
|
||||
""")
|
||||
List<String> selectCH();
|
||||
|
||||
|
||||
@Select("""
|
||||
select cd from jcsk_gnss_b where ch = #{ch}
|
||||
""")
|
||||
List<String> selectCDbyCh(@Param("ch") String ch);
|
||||
|
||||
@Select("""
|
||||
select * from jcsk_gnss_b where ch is null order by cd asc
|
||||
""")
|
||||
List<JcskGnssB> selectArtificial();
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.model.JcskGnssREightAm;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface JcskGnssREightAmMapper extends BaseMapper<JcskGnssREightAm> {
|
||||
|
||||
@Select("""
|
||||
select t1.*
|
||||
from jcsk_gnss_r_8am t1 join (
|
||||
select cd, max(tm) as tm
|
||||
from jcsk_gnss_r_8am
|
||||
GROUP BY cd
|
||||
) t2 on t1.cd = t2.cd and t1.tm = t2.tm;
|
||||
""")
|
||||
List<JcskGnssREightAm> queryNewDataTime();
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,231 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.project.hsz.entity.so.JcskGnssRPageSo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
|
||||
import com.gunshi.project.hsz.entity.vo.JcskGnessListVo;
|
||||
import com.gunshi.project.hsz.entity.vo.JcskGnssRHisVo;
|
||||
import com.gunshi.project.hsz.entity.vo.OsmoticShiftListVo2;
|
||||
import com.gunshi.project.hsz.entity.vo.OsmoticShiftValueVo2;
|
||||
import com.gunshi.project.hsz.model.JcskGnssR;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface JcskGnssRMapper extends BaseMapper<JcskGnssR> {
|
||||
|
||||
// @Select("""
|
||||
// <script>
|
||||
// SELECT st.cd,r.de,r.dn,r.du,to_char(r.tm,'YYYY-MM-DD HH24:MI:SS') as tm FROM jcsk_gnss_r st
|
||||
// LEFT JOIN (SELECT cd,MAX(tm) tm FROM jcsk_gnss_r GROUP BY cd) maxr ON st.cd = maxr.cd
|
||||
// LEFT JOIN jcsk_gnss_r r ON maxr.cd = r.cd AND maxr.tm = r.tm
|
||||
// ORDER BY st.cd asc,r.tm desc
|
||||
// </script>
|
||||
// """)
|
||||
// List<JcskGnessListVo> listValue();
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select
|
||||
t1.cd,
|
||||
t1.ch,
|
||||
t1.cd_nm as cdnm,
|
||||
t2.de,
|
||||
t2.dn,
|
||||
t2.du,
|
||||
to_char(t2.tm,'YYYY-MM-DD HH24:MI:SS') as tm
|
||||
from jcsk_gnss_b t1
|
||||
left join (
|
||||
select t2.*
|
||||
from jcsk_gnss_r t2
|
||||
join (
|
||||
select cd, MAX(tm) as tm
|
||||
from jcsk_gnss_r
|
||||
GROUP BY cd
|
||||
) maxr on t2.cd = maxr.cd and t2.tm = maxr.tm
|
||||
) t2 on t1.cd = t2.cd
|
||||
ORDER BY t1.cd asc, t2.tm desc;
|
||||
</script>
|
||||
""")
|
||||
List<JcskGnessListVo> listValue();
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t.station_code as cd,to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm,s.direction
|
||||
from public.osmotic_warn_r t
|
||||
left join public.osmotic_warn_rule s on t.rule_id = s.id
|
||||
where t.station_code in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticShiftListVo2> queryWarn(@Param("obj") OsmoticQuerySo so);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t.cd,t.tm as tm,t.de ,t.dn ,t.du,t.res_cd,t.alt
|
||||
from public.jcsk_gnss_r t
|
||||
where t.cd in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticShiftValueVo2> queryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t.cd,t.tm as tm,t.de ,t.dn ,t.du,t.res_cd,t.alt
|
||||
from public.jcsk_gnss_r_8am t
|
||||
where t.cd in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticShiftValueVo2> queryReorganizeValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm,t.de,t.dn ,t.du,t.is_artificial as isArtificial from public.jcsk_gnss_r t
|
||||
where t.cd = #{obj.stationCode}
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticShiftValueVo2> detailValue(@Param("obj") OsmoticDetailQuerySo so);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
WITH daily_data AS (
|
||||
SELECT
|
||||
t2.cd,
|
||||
t1.ch,
|
||||
t1.cd_nm,
|
||||
t2.de,
|
||||
t2.dn,
|
||||
t2.du,
|
||||
t2.alt,
|
||||
t2.tm,
|
||||
t2.update_tm,
|
||||
ROW_NUMBER() OVER (PARTITION BY t2.cd, t1.ch, DATE(t2.tm) ORDER BY t2.tm DESC) as rn
|
||||
FROM jcsk_gnss_b t1
|
||||
JOIN jcsk_gnss_r t2 ON t1.cd = t2.cd
|
||||
WHERE 1=1
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
AND t2.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
AND t2.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
<if test="obj.cd != null and obj.cd != ''">
|
||||
AND t2.cd = #{obj.cd}
|
||||
</if>
|
||||
<if test="obj.ch != null and obj.ch != ''">
|
||||
AND t1.ch = #{obj.ch}
|
||||
</if>
|
||||
<if test= "obj.isArtificial != null">
|
||||
AND t2.is_artificial = #{obj.isArtificial}
|
||||
</if>
|
||||
)
|
||||
SELECT
|
||||
cd,
|
||||
ch,
|
||||
cd_nm as cdnm,
|
||||
de,
|
||||
dn,
|
||||
du,
|
||||
alt,
|
||||
tm as tm,
|
||||
update_tm
|
||||
FROM daily_data
|
||||
WHERE rn = 1
|
||||
ORDER BY DATE(tm) DESC, tm DESC, cd DESC
|
||||
</script>
|
||||
""")
|
||||
Page<JcskGnssR> pageQuery(Page<Object> page, @Param("obj") JcskGnssRPageSo page1);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t1.ch,t2.* from
|
||||
jcsk_gnss_b t1
|
||||
left join jcsk_gnss_r t2
|
||||
on t1.cd = t2.cd
|
||||
where 1=1
|
||||
<if test="dto.cd != null and dto.cd != ''">
|
||||
AND t1.cd = #{dto.cd}
|
||||
</if>
|
||||
<if test="dto.ch != null and dto.ch != ''">
|
||||
AND t1.ch = #{dto.ch}
|
||||
</if>
|
||||
<if test="dto.dateTimeRangeSo != null">
|
||||
<![CDATA[
|
||||
AND t2.tm >= #{dto.dateTimeRangeSo.start}
|
||||
AND t2.tm <= #{dto.dateTimeRangeSo.end}
|
||||
]]>
|
||||
</if>
|
||||
</script>
|
||||
""")
|
||||
Page<JcskGnssRHisVo> historyPage(Page<Object> page, @Param("dto") JcskGnssRPageSo page1);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t1.ch,t2.* from
|
||||
jcsk_gnss_b t1
|
||||
left join jcsk_gnss_r t2
|
||||
on t1.cd = t2.cd
|
||||
where t2.is_artificial = 1
|
||||
<if test="dto.cd != null and dto.cd != ''">
|
||||
AND t1.cd = #{dto.cd}
|
||||
</if>
|
||||
<if test="dto.ch != null and dto.ch != ''">
|
||||
AND t1.ch = #{dto.ch}
|
||||
</if>
|
||||
<if test="dto.dateTimeRangeSo != null">
|
||||
<![CDATA[
|
||||
AND t2.tm >= #{dto.dateTimeRangeSo.start}
|
||||
AND t2.tm <= #{dto.dateTimeRangeSo.end}
|
||||
]]>
|
||||
</if>
|
||||
order by t2.tm desc
|
||||
</script>
|
||||
""")
|
||||
Page<JcskGnssR> artificialPage(Page<Object> page,@Param("dto") JcskGnssRPageSo page1);
|
||||
}
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
|
||||
import com.gunshi.project.hsz.entity.vo.HomeJcskSlBVo;
|
||||
import com.gunshi.project.hsz.entity.vo.JcskSyRVo;
|
||||
import com.gunshi.project.hsz.entity.vo.OsmoticPressDetailVo;
|
||||
import com.gunshi.project.hsz.entity.vo.OsmoticValueVo2;
|
||||
import com.gunshi.project.hsz.model.JcskSlB;
|
||||
import com.gunshi.project.hsz.model.JcskSlR;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface JcskSlBMapper extends BaseMapper<JcskSlB> {
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT st.*,r.spqn as q,r.mstm as tm FROM jcsk_sl_b st
|
||||
LEFT JOIN (SELECT mpcd,MAX(mstm) tm FROM jcsk_sl_r GROUP BY mpcd) maxr ON st.mpcd = maxr.mpcd
|
||||
LEFT JOIN jcsk_sl_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
|
||||
</script>
|
||||
""")
|
||||
List<HomeJcskSlBVo> getDetailsAndMonitoringDataList();
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT st.*,r.spqn as q,r.mstm as tm FROM jcsk_sl_b st
|
||||
LEFT JOIN (SELECT mpcd,MAX(mstm) tm FROM jcsk_sl_r GROUP BY mpcd) maxr ON st.mpcd = maxr.mpcd
|
||||
LEFT JOIN jcsk_sl_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
|
||||
where st.mpcd = #{id}
|
||||
</script>
|
||||
""")
|
||||
HomeJcskSlBVo getDetailsById(String id);
|
||||
|
||||
|
||||
@Select("""
|
||||
select dvcd from jcsk_sl_b where dm = #{dm}
|
||||
""")
|
||||
List<String> getDvcdByProfileCode(@Param("dm") String profileCode);
|
||||
|
||||
|
||||
@Select(
|
||||
"""
|
||||
<script>
|
||||
SELECT station_code, value, tm
|
||||
FROM (
|
||||
SELECT
|
||||
st.dvcd as station_code,
|
||||
r.spqn as value,
|
||||
to_char(r.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
|
||||
ROW_NUMBER() OVER (PARTITION BY st.mpcd ORDER BY r.mstm DESC) as rn
|
||||
FROM jcsk_sl_b st
|
||||
LEFT JOIN jcsk_sl_r r ON st.mpcd = r.mpcd
|
||||
) t
|
||||
WHERE rn = 1
|
||||
ORDER BY station_code asc;
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
List<JcskSyRVo> listValue();
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t1.dvcd as stationCode,t2.mstm as tm,t2.spqn as value
|
||||
from public.jcsk_sl_b t1
|
||||
left join public.jcsk_sl_r t2
|
||||
on t1.mpcd = t2.mpcd
|
||||
where t1.dvcd in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t2.mstm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticValueVo2> queryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t2.*
|
||||
from public.jcsk_sl_b t1
|
||||
left join public.jcsk_sl_r t2
|
||||
on t1.mpcd = t2.mpcd
|
||||
where t1.dvcd in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t2.mstm desc
|
||||
</script>
|
||||
""")
|
||||
List<JcskSlR> syncqueryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t1.dvcd as stationCode,t2.mstm as tm,t2.spqn as value
|
||||
from public.jcsk_sl_b t1
|
||||
left join public.jcsk_sl_r_8am t2
|
||||
on t1.mpcd = t2.mpcd
|
||||
where t1.dvcd in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t2.mstm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticValueVo2> query8AmValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select to_char(t.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
|
||||
t.spqn as value from public.jcsk_sl_b t2
|
||||
left join
|
||||
public.jcsk_sl_r t on t2.mpcd = t.mpcd
|
||||
where t2.dvcd = #{obj.stationCode}
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t.mstm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticPressDetailVo> detailValue(@Param("obj") OsmoticDetailQuerySo so);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select dvcd from jcsk_sl_b where mpcd = #{mpcd} limit 1
|
||||
</script>
|
||||
""")
|
||||
String selectDvcdByStcdAndMpcd(@Param("mpcd") String mpcd);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.model.JcskSlREightAm;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface JcskSlREightAmMapper extends BaseMapper<JcskSlREightAm> {
|
||||
@Select("""
|
||||
select t1.*
|
||||
from jcsk_sl_r_8am t1
|
||||
join (select stcd,mpcd,max(mstm) as mstm from jcsk_sl_r_8am GROUP BY stcd,mpcd) as t2
|
||||
on t1.mstm = t2.mstm and t1.stcd = t2.stcd and t1.mpcd = t2.mpcd;
|
||||
""")
|
||||
List<JcskSlREightAm> queryNewDataTime();
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.project.hsz.entity.so.JcskSlRPageSo;
|
||||
import com.gunshi.project.hsz.entity.vo.JcskSlRHisVo;
|
||||
import com.gunshi.project.hsz.model.JcskSlR;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
@Mapper
|
||||
public interface JcskSlRMapper extends BaseMapper<JcskSlR> {
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
<![CDATA[
|
||||
WITH ranked_data AS (
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.dm,
|
||||
t3.profile_name as dmName,
|
||||
t2.dvcd,
|
||||
ROW_NUMBER() OVER (PARTITION BY t1.mpcd, DATE_TRUNC('day', t1.mstm) ORDER BY t1.mstm DESC) as rn
|
||||
FROM jcsk_sl_r t1
|
||||
JOIN jcsk_sl_b t2 ON t1.mpcd = t2.mpcd
|
||||
LEFT JOIN att_dam_profile t3 ON t2.dm = t3.profile_code
|
||||
WHERE 1=1
|
||||
]]>
|
||||
<if test="dto.dvcd != null and dto.dvcd != ''">
|
||||
AND t2.dvcd = #{dto.dvcd}
|
||||
</if>
|
||||
<if test="dto.dm != null and dto.dm != ''">
|
||||
AND t2.dm = #{dto.dm}
|
||||
</if>
|
||||
<if test="dto.dateTimeRangeSo != null">
|
||||
<![CDATA[
|
||||
AND t1.mstm >= #{dto.dateTimeRangeSo.start}
|
||||
AND t1.mstm <= #{dto.dateTimeRangeSo.end}
|
||||
]]>
|
||||
</if>
|
||||
)
|
||||
SELECT *
|
||||
FROM ranked_data
|
||||
WHERE rn = 1
|
||||
ORDER BY mstm DESC
|
||||
</script>
|
||||
""")
|
||||
Page<JcskSlR> pageQuery(Page<Object> page, @Param("dto") JcskSlRPageSo page1);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
<![CDATA[
|
||||
select t2.*,
|
||||
t1.dm,
|
||||
t3.profile_name as dmName,
|
||||
t1.dvcd
|
||||
from jcsk_sl_b t1
|
||||
left join jcsk_sl_r t2 on t1.mpcd = t2.mpcd
|
||||
left join att_dam_profile t3 on t1.dm = t3.profile_code
|
||||
where 1=1
|
||||
]]>
|
||||
<if test="dto.dvcd != null and dto.dvcd != ''">
|
||||
AND t1.dvcd = #{dto.dvcd}
|
||||
</if>
|
||||
<if test="dto.dm != null and dto.dm != ''">
|
||||
AND t1.dm = #{dto.dm}
|
||||
</if>
|
||||
<if test="dto.dateTimeRangeSo != null">
|
||||
<![CDATA[
|
||||
AND t2.mstm >= #{dto.dateTimeRangeSo.start}
|
||||
AND t2.mstm <= #{dto.dateTimeRangeSo.end}
|
||||
]]>
|
||||
</if>
|
||||
order by t2.mstm desc
|
||||
</script>
|
||||
""")
|
||||
Page<JcskSlRHisVo> historyPage(Page<Object> page, JcskSlRPageSo page1);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.entity.vo.HomeJcskSYBVo;
|
||||
import com.gunshi.project.hsz.model.JcskSyB;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface JcskSyBMapper extends BaseMapper<JcskSyB> {
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT st.*, r.spprwl as value, r.mstm
|
||||
FROM jcsk_sy_b st
|
||||
LEFT JOIN (
|
||||
SELECT mpcd, MAX(mstm) as max_mstm
|
||||
FROM jcsk_sy_r
|
||||
GROUP BY mpcd) maxr ON st.mpcd = maxr.mpcd
|
||||
LEFT JOIN jcsk_sy_r r ON maxr.mpcd = r.mpcd AND maxr.max_mstm = r.mstm
|
||||
</script>
|
||||
""")
|
||||
List<HomeJcskSYBVo> getDetailsAndMonitoringDataList();
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT st.*, r.spprwl as value, r.mstm
|
||||
FROM jcsk_sy_b st
|
||||
LEFT JOIN (
|
||||
SELECT mpcd, MAX(mstm) as tm\s
|
||||
FROM jcsk_sy_r\s
|
||||
GROUP BY mpcd
|
||||
)maxr ON st.mpcd = maxr.mpcd
|
||||
LEFT JOIN jcsk_sy_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
|
||||
WHERE st.mpcd = #{id}
|
||||
</script>
|
||||
""")
|
||||
HomeJcskSYBVo getDetailsById(@Param("id") String id);
|
||||
|
||||
|
||||
@Select("""
|
||||
SELECT dvcd from jcsk_sy_b where dm = #{dm}
|
||||
ORDER BY LENGTH(dvcd) ASC,dvcd ASC;
|
||||
""")
|
||||
List<String> getDvcdByProfileCode(@Param("dm") String profileCode);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select dvcd from jcsk_sy_b where mpcd = #{mpcd} and stcd =#{stcd}
|
||||
</script>
|
||||
""")
|
||||
String selectDvcdByStcdAndMpcd(@Param("stcd")String stcd,@Param("mpcd") String mpcd);
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.model.JcskSyREightAm;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface JcskSyREightAmMapper extends BaseMapper<JcskSyREightAm> {
|
||||
|
||||
@Select("""
|
||||
select t1.*
|
||||
from jcsk_sy_r_8am t1
|
||||
join (select stcd,mpcd,max(mstm) as mstm from jcsk_sy_r_8am GROUP BY stcd,mpcd) as t2
|
||||
on t1.mstm = t2.mstm and t1.stcd = t2.stcd and t1.mpcd = t2.mpcd;
|
||||
""")
|
||||
List<JcskSyREightAm> queryNewDataTime();
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,361 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.project.hsz.entity.so.JcskSyRPageSo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
|
||||
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
|
||||
import com.gunshi.project.hsz.entity.vo.*;
|
||||
import com.gunshi.project.hsz.model.JcskSyB;
|
||||
import com.gunshi.project.hsz.model.JcskSyR;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface JcskSyRMapper extends BaseMapper<JcskSyR> {
|
||||
@Select(
|
||||
"""
|
||||
<script>
|
||||
SELECT
|
||||
st.dvcd as station_code,
|
||||
r.spprwl as value,
|
||||
to_char(r.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
|
||||
m.profile_name
|
||||
FROM jcsk_sy_b st
|
||||
LEFT JOIN (
|
||||
SELECT mpcd,stcd, MAX(mstm) as max_tm
|
||||
FROM jcsk_sy_r
|
||||
GROUP BY mpcd,stcd
|
||||
) maxr ON st.mpcd = maxr.mpcd and st.stcd = maxr.stcd
|
||||
LEFT JOIN jcsk_sy_r r ON maxr.mpcd = r.mpcd AND maxr.max_tm = r.mstm and maxr.stcd = r.stcd
|
||||
LEFT JOIN att_dam_profile m ON st.dm = m.profile_code
|
||||
ORDER BY m._order ASC;
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
List<JcskSyRVo> listValue();
|
||||
|
||||
|
||||
|
||||
@Select(
|
||||
"""
|
||||
<script>
|
||||
SELECT
|
||||
st.mpcd as station_code,
|
||||
r.spqn as value,
|
||||
to_char(r.mstm,'YYYY-MM-DD HH24:MI:SS') as tm
|
||||
FROM jcsk_sl_b st
|
||||
LEFT JOIN (
|
||||
SELECT mpcd, MAX(mstm) as tm
|
||||
FROM jcsk_sl_r
|
||||
GROUP BY mpcd
|
||||
) maxr ON st.mpcd = maxr.mpcd
|
||||
LEFT JOIN jcsk_sl_r r ON maxr.mpcd = r.mpcd AND maxr.tm = r.mstm
|
||||
ORDER BY st.mpcd asc, r.mstm desc;
|
||||
</script>
|
||||
"""
|
||||
)
|
||||
List<JcskSyRVo> flowListValue();
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t.station_code as stationCode,to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm
|
||||
from public.osmotic_warn_r t
|
||||
where t.station_code in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticValueVo2> queryWarn(@Param("obj") OsmoticQuerySo so);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select to_char(t.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,
|
||||
t.spprwl as value from public.jcsk_sy_b t2
|
||||
left join public.jcsk_sy_r t on t2.stcd = t.stcd and t2.mpcd = t.mpcd
|
||||
where t2.dvcd = #{obj.stationCode}
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t.mstm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticPressDetailVo> detailValue(@Param("obj") OsmoticDetailQuerySo so);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm,t.rz
|
||||
from public.st_rsvr_r t
|
||||
where t.stcd = #{stcd} and to_char(t.tm, 'MI:SS') = '00:00'
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
List<StRzVo> queryLineRz(@Param("obj") OsmoticQuerySo osmoticQuerySo, @Param("stcd") String stcd);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select to_char(t.tm,'YYYY-MM-DD') as tm,t.drp as rz
|
||||
from public.st_pptn_r_d t
|
||||
where t.year = #{year} and t.stcd = #{stcd}
|
||||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
List<StRzVo> queryDrp(@Param("year") Integer year,@Param("stcd") String stcd);
|
||||
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select to_char(t.tm,'YYYY-MM-DD') as tm,t.rz
|
||||
from public.st_rsvr_r t
|
||||
where to_char(t.tm, 'HH24:MI:SS') = '08:00:00' and t.stcd = #{stcd}
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
List<StRzVo> queryRz(@Param("obj") OsmoticQuerySo osmoticQuerySo,@Param("stcd") String stcd);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t.tm,t.rz
|
||||
from public.st_rsvr_r t
|
||||
where to_char(t.tm, 'MI:SS') = '00:00' and to_char(t.tm, 'HH24:MI') like '%:00' and t.stcd = #{stcd}
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
List<StRzVo> queryRz2(@Param("obj") OsmoticQuerySo osmoticQuerySo,@Param("stcd") String stcd);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t1.dvcd as stationCode,t2.mstm as tm,t2.spprwl as value
|
||||
from public.jcsk_sy_b t1 left join public.jcsk_sy_r t2
|
||||
on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
|
||||
where t1.dvcd in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t2.mstm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticValueVo2> queryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t1.dvcd as stationCode,t2.mstm as tm,t2.spprwl as value
|
||||
from public.jcsk_sy_b t1 left join public.jcsk_sy_r_8am t2
|
||||
on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
|
||||
where t1.dvcd in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t2.mstm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticValueVo2> query8AmValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t2.*
|
||||
from public.jcsk_sy_b t1
|
||||
left join public.jcsk_sy_r t2
|
||||
on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
|
||||
where t1.dvcd in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t2.mstm desc
|
||||
</script>
|
||||
""")
|
||||
List<JcskSyR> syncqueryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
||||
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t1.dvcd as stationCode,to_char(t2.mstm,'YYYY-MM-DD HH24:MI:SS') as tm,t2.spprwl as value
|
||||
from public.jcsk_sy_b t1
|
||||
left join public.jcsk_sy_r t2 on t1.stcd =t2.stcd and t1.mpcd = t2.mpcd
|
||||
where t1.dvcd in
|
||||
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||
and t2.mstm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||
</if>
|
||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
||||
and t2.mstm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
||||
</if>
|
||||
order by t2.mstm desc
|
||||
</script>
|
||||
""")
|
||||
List<OsmoticValueVo2> queryLineValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
<![CDATA[
|
||||
WITH ranked_data AS (
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.dm,
|
||||
t3.profile_name as dmName,
|
||||
t2.dvcd,
|
||||
ROW_NUMBER() OVER (PARTITION BY t1.stcd, t1.mpcd, DATE_TRUNC('day', t1.mstm) ORDER BY t1.mstm DESC) as rn
|
||||
FROM jcsk_sy_r t1
|
||||
JOIN jcsk_sy_b t2 ON t1.stcd = t2.stcd AND t1.mpcd = t2.mpcd
|
||||
LEFT JOIN att_dam_profile t3 ON t2.dm = t3.profile_code
|
||||
WHERE 1=1
|
||||
]]>
|
||||
<if test="dto.dvcd != null and dto.dvcd != ''">
|
||||
AND t2.dvcd = #{dto.dvcd}
|
||||
</if>
|
||||
<if test="dto.dm != null and dto.dm != ''">
|
||||
AND t2.dm = #{dto.dm}
|
||||
</if>
|
||||
<if test="dto.dateTimeRangeSo != null">
|
||||
<![CDATA[
|
||||
AND t1.mstm >= #{dto.dateTimeRangeSo.start}
|
||||
AND t1.mstm <= #{dto.dateTimeRangeSo.end}
|
||||
]]>
|
||||
</if>
|
||||
)
|
||||
SELECT *
|
||||
FROM ranked_data
|
||||
WHERE rn = 1
|
||||
ORDER BY mstm DESC
|
||||
</script>
|
||||
""")
|
||||
Page<JcskSyR> queryPage(Page<Object> page, @Param("dto") JcskSyRPageSo pageSo);
|
||||
|
||||
@Select("""
|
||||
select dm from jcsk_sy_b
|
||||
GROUP BY dm
|
||||
""")
|
||||
List<String> listDm();
|
||||
|
||||
|
||||
@Select("""
|
||||
select stcd,mpcd from jcsk_sy_b
|
||||
""")
|
||||
List<JcskSyB> listStcdMpcd();
|
||||
|
||||
|
||||
@Select("""
|
||||
select dvcd from jcsk_sy_b where dm = #{dm}
|
||||
""")
|
||||
List<String> listDvcdByDm(@Param("dm") String dm);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
<![CDATA[
|
||||
select t2.*,
|
||||
t1.dm,
|
||||
t3.profile_name as dmName,
|
||||
t1.dvcd
|
||||
from jcsk_sy_b t1
|
||||
left join jcsk_sy_r t2 on t1.stcd = t2.stcd and t1.mpcd = t2.mpcd
|
||||
left join att_dam_profile t3 on t1.dm = t3.profile_code
|
||||
where 1=1
|
||||
]]>
|
||||
<if test="dto.dvcd != null and dto.dvcd != ''">
|
||||
AND t1.dvcd = #{dto.dvcd}
|
||||
</if>
|
||||
<if test="dto.dm != null and dto.dm != ''">
|
||||
AND t1.dm = #{dto.dm}
|
||||
</if>
|
||||
<if test="dto.dateTimeRangeSo != null">
|
||||
<![CDATA[
|
||||
AND t2.mstm >= #{dto.dateTimeRangeSo.start}
|
||||
AND t2.mstm <= #{dto.dateTimeRangeSo.end}
|
||||
]]>
|
||||
</if>
|
||||
order by t2.mstm desc
|
||||
</script>
|
||||
""")
|
||||
Page<JcskSyRHisVo> historyPage(Page<Object> page, @Param("dto") JcskSyRPageSo page1);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
<![CDATA[
|
||||
select t2.*,
|
||||
t1.dm,
|
||||
t3.profile_name as dmName,
|
||||
t1.dvcd
|
||||
from jcsk_sy_b t1
|
||||
left join jcsk_sy_r t2 on t1.stcd = t2.stcd and t1.mpcd = t2.mpcd
|
||||
left join att_dam_profile t3 on t1.dm = t3.profile_code
|
||||
where t2.is_artificial = 1
|
||||
]]>
|
||||
<if test="dto.dvcd != null and dto.dvcd != ''">
|
||||
AND t1.dvcd = #{dto.dvcd}
|
||||
</if>
|
||||
<if test="dto.dm != null and dto.dm != ''">
|
||||
AND t1.dm = #{dto.dm}
|
||||
</if>
|
||||
<if test="dto.dateTimeRangeSo != null">
|
||||
<![CDATA[
|
||||
AND t2.mstm >= #{dto.dateTimeRangeSo.start}
|
||||
AND t2.mstm <= #{dto.dateTimeRangeSo.end}
|
||||
]]>
|
||||
</if>
|
||||
order by t2.mstm desc
|
||||
</script>
|
||||
""")
|
||||
Page<JcskSyR> artificialPage(Page<Object> page,@Param("dto") JcskSyRPageSo page1);
|
||||
}
|
||||
|
|
@ -43,5 +43,15 @@ public interface OsmoticWarnRMapper extends BaseMapper<OsmoticWarnR> {
|
|||
order by t.tm desc
|
||||
</script>
|
||||
""")
|
||||
Page<OsmoticWarnVo> queryPage(Page<OsmoticWarnVo> page,@Param("obj") WarnPageSo warnPageSo);
|
||||
Page<OsmoticWarnVo> queryPage(Page<OsmoticWarnVo> page, @Param("obj") WarnPageSo warnPageSo);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select * from osmotic_warn_r t
|
||||
where type = #{type}
|
||||
order by tm desc
|
||||
limit 1
|
||||
</script>
|
||||
""")
|
||||
OsmoticWarnR queryMaxTmByType(@Param("type") Integer type);
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.model.StFlowR;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface StFlowRMapper extends BaseMapper<StFlowR> {
|
||||
|
||||
|
||||
@Select("""
|
||||
select t1.sttp,t2.* from
|
||||
st_stbprp_b t1
|
||||
join (SELECT id, stcd, tm, inq, q, otq, crtime
|
||||
FROM (
|
||||
SELECT *,
|
||||
ROW_NUMBER() OVER (PARTITION BY stcd ORDER BY tm DESC) as rn
|
||||
FROM st_flow_r
|
||||
) t
|
||||
WHERE rn = 1) t2 on t1.stcd = t2.stcd
|
||||
""")
|
||||
List<StFlowR> listNewData();
|
||||
|
||||
@Select("""
|
||||
select DISTINCT stcd from st_flow_r
|
||||
""")
|
||||
List<String> listStcds();
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select * from st_flow_r where stcd = #{stcd}
|
||||
<if test="tm != null">
|
||||
and tm <![CDATA[>]]> #{tm}
|
||||
</if>
|
||||
order by tm asc
|
||||
</script>
|
||||
""")
|
||||
List<StFlowR> getDataByStcdAndTm(@Param("stcd") String stcd, @Param("tm") Date tm);
|
||||
}
|
||||
|
|
@ -36,4 +36,10 @@ public interface StWaterRMapper extends BaseMapper<StWaterR> {
|
|||
on t1.stcd = t2.stcd and t1.tm = t2.max_tm ;
|
||||
""")
|
||||
List<StWaterR> getStcdLastWaterData();
|
||||
|
||||
@Select("""
|
||||
select * from st_water_r where stcd = #{stcd} order by tm desc limit 1
|
||||
""")
|
||||
StWaterR selectNewDataByStcd(String stcd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,185 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
import com.gunshi.project.hsz.entity.so.JcskByRPageSo;
|
||||
import com.gunshi.project.hsz.model.JcskByR;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface WaterDataTermitesMapper extends BaseMapper<JcskByR> {
|
||||
|
||||
|
||||
/**
|
||||
* 这段sql需求是
|
||||
* 查询某一天的白蚁数据,然后按测点进行分组,分组之后某一组数据内,如果status全部为0,表示没有白蚁,那么就取最新的那条数据即可
|
||||
* 如果某一组数据内 stauts有为1的,就是出现了白蚁的,那么就取最新的那一条有白蚁的数据
|
||||
* ROW_NUMBER 窗口函数的作用是根据order进行分组,当status为1时,优先显示,如果没有status为1的情况,那么就不管,同时按ob_date进行降序排列
|
||||
* 这样每次取到的数据,如果这一天之内某个测点(order)都没有status为1的数据,那么就去这个测站最新的那一条数据
|
||||
* 如果这一天之内某个测点(order)有status为1的数据,那么就去这个测点这一天之内status为1的最新的那一条数据
|
||||
* @param page
|
||||
* @param jcskByRPageSo
|
||||
* @return
|
||||
*/
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
*,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY "order"
|
||||
ORDER BY
|
||||
CASE WHEN status = 1 THEN 0 ELSE 1 END,
|
||||
ob_date DESC
|
||||
) AS rn
|
||||
FROM jcsk_by_r
|
||||
WHERE 1=1
|
||||
AND ob_date::date = #{obj.obDate}
|
||||
) AS ranked_data
|
||||
WHERE rn = 1
|
||||
ORDER BY status DESC, ob_date DESC
|
||||
</script>
|
||||
""")
|
||||
Page<JcskByR> pageQuery(Page<JcskByR> page, @Param("obj") JcskByRPageSo jcskByRPageSo);
|
||||
|
||||
|
||||
/**
|
||||
* 这段sql,就是查询所有时间的,相当于上面那段sql的所有时间数据加起来
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT
|
||||
*
|
||||
FROM (
|
||||
SELECT
|
||||
*,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY
|
||||
"order",
|
||||
to_char(ob_date, 'yyyy-mm-dd')
|
||||
ORDER BY
|
||||
CASE WHEN status = 1 THEN 0 ELSE 1 END,
|
||||
ob_date DESC
|
||||
) AS rn
|
||||
FROM jcsk_by_r
|
||||
WHERE 1 = 1
|
||||
) AS ranked_data
|
||||
WHERE rn = 1
|
||||
ORDER BY
|
||||
"order" DESC,
|
||||
ob_date DESC
|
||||
</script>
|
||||
""")
|
||||
Page<JcskByR> pageQueryWithNoDate(Page<JcskByR> page, @Param("obj") JcskByRPageSo queryWrapper);
|
||||
|
||||
|
||||
/**
|
||||
* 根据取每个测点某一天内最新的那条数据(不用管status状态)
|
||||
* @param page
|
||||
* @param page1
|
||||
* @return
|
||||
*/
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
*,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY "order"
|
||||
ORDER BY ob_date DESC, status DESC
|
||||
) AS rn
|
||||
FROM jcsk_by_r
|
||||
WHERE 1=1
|
||||
AND ob_date::date = #{obj.obDate}
|
||||
<if test="obj.order != null and obj.order != ''">
|
||||
AND "order" LIKE '%' || #{obj.order} || '%'
|
||||
</if>
|
||||
) AS ranked_data
|
||||
JOIN jcsk_by_b_d t2 on ranked_data."order" = t2."order"
|
||||
WHERE rn = 1
|
||||
ORDER BY status DESC, ob_date DESC
|
||||
</script>
|
||||
""")
|
||||
Page<JcskByR> query(Page<Object> page,@Param("obj") JcskByRPageSo page1);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
<![CDATA[
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
*,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY "order"
|
||||
ORDER BY ob_date DESC
|
||||
) AS rn
|
||||
FROM jcsk_by_r
|
||||
WHERE 1=1
|
||||
AND ob_date >= #{start}
|
||||
AND ob_date <= #{end}
|
||||
AND status = 1
|
||||
) AS ranked_data
|
||||
WHERE rn = 1
|
||||
ORDER BY ob_date DESC
|
||||
]]>
|
||||
</script>
|
||||
""")
|
||||
List<JcskByR> queryHasAntList(@Param("start") Date start, @Param("end") Date end);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
*,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY "order"
|
||||
ORDER BY status DESC, ob_date DESC
|
||||
) AS rn
|
||||
FROM jcsk_by_r
|
||||
WHERE 1=1
|
||||
<if test="obj.order != null and obj.order != ''">
|
||||
AND "order" LIKE '%' || #{obj.order} || '%'
|
||||
</if>
|
||||
) AS ranked_data
|
||||
WHERE rn = 1
|
||||
ORDER BY status DESC, ob_date DESC
|
||||
</script>
|
||||
""")
|
||||
Page<JcskByR> queryWithNoDate(Page<Object> page,@Param("obj") JcskByRPageSo page1);
|
||||
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT t1.*
|
||||
FROM jcsk_by_r t1
|
||||
INNER JOIN (
|
||||
SELECT "order", MAX(ob_date) as max_ob_date
|
||||
FROM jcsk_by_r
|
||||
WHERE "order" IS NOT NULL
|
||||
GROUP BY "order"
|
||||
) t2 ON t1."order" = t2."order" AND t1.ob_date = t2.max_ob_date
|
||||
where 1=1
|
||||
<if test="deviceId !=null and deviceId !=''">
|
||||
AND t1.device_id = #{deviceId}
|
||||
</if>
|
||||
ORDER BY t1.status DESC, t1.ob_date DESC
|
||||
</script>
|
||||
""")
|
||||
List<JcskByR> listNewData(@Param("deviceId") String deviceId);
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.gunshi.project.hsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.hsz.model.JcskByB;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface WaterDeviceMapper extends BaseMapper<JcskByB> {
|
||||
}
|
||||
|
|
@ -4,16 +4,20 @@ 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 com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@TableName("hidden_info")
|
||||
@Data
|
||||
public class HiddenInfo {
|
||||
@TableId("id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@TableField("mentence_farmer_record_id")
|
||||
|
|
@ -42,4 +46,7 @@ public class HiddenInfo {
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date resolveTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<FileAssociations> files;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 白蚁设备表实体类
|
||||
* 数据源为WaterDevice
|
||||
* 与r表通过device_id关联
|
||||
*/
|
||||
@Data
|
||||
@TableName("jcsk_by_b")
|
||||
public class JcskByB {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableField("id")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 站点接入编码
|
||||
*/
|
||||
@TableField("mn_no")
|
||||
private String mnNo;
|
||||
|
||||
/**
|
||||
* 厂家id
|
||||
*/
|
||||
@TableField("factory_id")
|
||||
private Integer factoryId;
|
||||
|
||||
/**
|
||||
* 服务站点id
|
||||
*/
|
||||
@TableField("station_id")
|
||||
private Integer stationId;
|
||||
|
||||
/**
|
||||
* 服务站点名称
|
||||
*/
|
||||
@TableField("station_name")
|
||||
private String stationName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("created_at")
|
||||
private Integer createdAt;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@TableField("created_user")
|
||||
private Integer createdUser;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("updated_at")
|
||||
private Integer updatedAt;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@TableField("updated_user")
|
||||
private Integer updatedUser;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField("lat")
|
||||
private BigDecimal lat;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@TableField("lon")
|
||||
private BigDecimal lon;
|
||||
|
||||
/**
|
||||
* 省份id
|
||||
*/
|
||||
@TableField("province_id")
|
||||
private Long provinceId;
|
||||
|
||||
/**
|
||||
* 省份名称
|
||||
*/
|
||||
@TableField("province_name")
|
||||
private String provinceName;
|
||||
|
||||
/**
|
||||
* 城市id
|
||||
*/
|
||||
@TableField("city_id")
|
||||
private Long cityId;
|
||||
|
||||
/**
|
||||
* 城市名称
|
||||
*/
|
||||
@TableField("city_name")
|
||||
private String cityName;
|
||||
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
@TableField("area_name")
|
||||
private String areaName;
|
||||
|
||||
/**
|
||||
* 区域id
|
||||
*/
|
||||
@TableField("area_id")
|
||||
private Long areaId;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 设备类型详情
|
||||
*/
|
||||
@TableField("send_type")
|
||||
private String sendType;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@TableField("contact")
|
||||
private String contact;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@TableField("telephone")
|
||||
private String telephone;
|
||||
|
||||
/**
|
||||
* 流域
|
||||
*/
|
||||
@TableField("river")
|
||||
private String river;
|
||||
|
||||
/**
|
||||
* 安装地点
|
||||
*/
|
||||
@TableField("address")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 产品型号
|
||||
*/
|
||||
@TableField("model")
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 通信方式
|
||||
*/
|
||||
@TableField("communication_type")
|
||||
private Integer communicationType;
|
||||
|
||||
/**
|
||||
* 设备图片
|
||||
*/
|
||||
@TableField("image_url")
|
||||
private String imageUrl;
|
||||
|
||||
/**
|
||||
* 设备视频流地址的ip
|
||||
*/
|
||||
@TableField("video_ip")
|
||||
private String videoIp;
|
||||
|
||||
/**
|
||||
* 设备视频id
|
||||
*/
|
||||
@TableField("video_id")
|
||||
private String videoId;
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 设备站点关联表实体类
|
||||
* 对应表:jcsk_by_b_d
|
||||
*/
|
||||
@Data
|
||||
@TableName("public.jcsk_by_b_d")
|
||||
public class JcskByBD {
|
||||
|
||||
/**
|
||||
* 机箱
|
||||
*/
|
||||
@TableField(value="device_id")
|
||||
@Schema(description="设备编号")
|
||||
private Integer deviceId;
|
||||
|
||||
/**
|
||||
* 站点编号
|
||||
*/
|
||||
@TableField(value = "\"order\"")
|
||||
@Schema(description = "测点编号")
|
||||
private String order;
|
||||
|
||||
/**
|
||||
* 联网方式
|
||||
*/
|
||||
@TableField(value = "inte_type")
|
||||
@Schema(description = "联网方式")
|
||||
private String inteType;
|
||||
|
||||
/**
|
||||
* 安装位置
|
||||
*/
|
||||
@TableField(value = "fix_place")
|
||||
@Schema(description = "安装位置")
|
||||
private String fixPlace;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@TableField(value = "lgtd")
|
||||
@Schema(description = "经度")
|
||||
private BigDecimal lgtd;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField(value = "remark")
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField(value = "lttd")
|
||||
@Schema(description = "纬度")
|
||||
private BigDecimal lttd;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "有无白蚁 1为有 0为无")
|
||||
private Integer status;
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 巡检任务监测数据实体类
|
||||
*
|
||||
* @author gunshiiot
|
||||
* @TableName jcsk_by_inspect_task
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "jcsk_by_inspect_task")
|
||||
public class JcskByInspectTask {
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@TableField("\"order\"")
|
||||
@Schema(description = "设备id")
|
||||
private String order;
|
||||
|
||||
/**
|
||||
* 巡检任务id
|
||||
*/
|
||||
@TableField("inspect_task_id")
|
||||
@Schema(description = "巡检任务id")
|
||||
private Long inspectTaskId;
|
||||
|
||||
/**
|
||||
* 监测时间
|
||||
*/
|
||||
@TableField("ob_date")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
@Schema(description = "监测时间")
|
||||
private Date obDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@TableField("ob_resolve_date")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
@Schema(description = "结束时间")
|
||||
private Date obResolveDate;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.project.hsz.entity.vo.JcskByRProcessVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 白蚁数据表实体类
|
||||
* 数据源为WaterDataTermites
|
||||
*/
|
||||
@Data
|
||||
@TableName("jcsk_by_r")
|
||||
public class JcskByR {
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
@TableField("mn_no")
|
||||
private String mnNo;
|
||||
|
||||
/**
|
||||
* 白蚁蚁情状态,有白蚁入侵为1
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 白蚁设备电量
|
||||
*/
|
||||
@TableField("electricity")
|
||||
private Integer electricity;
|
||||
|
||||
/**
|
||||
* 白蚁设备安装的点位顺序(测点编号)
|
||||
*/
|
||||
@TableField("\"order\"")
|
||||
private String order;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("created_at")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createdAt;
|
||||
|
||||
/**
|
||||
* 观测时间
|
||||
*/
|
||||
@TableField("ob_time")
|
||||
private String obTime;
|
||||
|
||||
/**
|
||||
* 观测时间2
|
||||
*/
|
||||
@TableField("ob_date")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date obDate;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableField("id")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 水库id
|
||||
*/
|
||||
@TableField("station_id")
|
||||
private Integer stationId;
|
||||
|
||||
/**
|
||||
* 站点名称
|
||||
*/
|
||||
@TableField("station_name")
|
||||
private String stationName;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@TableField("device_id")
|
||||
private Integer deviceId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@TableField("device_name")
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@TableField("task_status")
|
||||
private String taskStatus;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@TableField("task_id")
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 接收类型
|
||||
*/
|
||||
@TableField("receive_type")
|
||||
private Short receiveType;
|
||||
|
||||
@Schema(description = "是否处理")
|
||||
@TableField(exist = false)
|
||||
private Boolean isProcess = false;
|
||||
|
||||
@Schema(description = "是否有巡检任务")
|
||||
@TableField(exist = false)
|
||||
private Boolean hasInspectTask = false;
|
||||
|
||||
|
||||
@Schema(description = "工单详情")
|
||||
@TableField(exist = false)
|
||||
private JcskByRProcessVo jcskByRProcessVo;
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName(value = "jcsk_by_r_process")
|
||||
public class JcskByRProcess {
|
||||
|
||||
|
||||
@TableField("\"order\"")
|
||||
@Schema(description = "设备编号")
|
||||
private String order;
|
||||
|
||||
@TableField("ob_date")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
@Schema(description = "监测时间")
|
||||
private Date obDate;
|
||||
|
||||
@TableField("ob_resolve_date")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
@Schema(description = "监测时间 + hours之后的结束时间")
|
||||
private Date obResolveDate;
|
||||
|
||||
@TableField("hours")
|
||||
@Schema(description = "间隔小时")
|
||||
private Integer hours;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "巡检任务实体类")
|
||||
private InspectTask inspectTask;
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 位移设备表
|
||||
* 数据源为AttWyCdBase
|
||||
* 与r表通过rscd加cd关联
|
||||
*/
|
||||
@Data
|
||||
@TableName("jcsk_gnss_b")
|
||||
public class JcskGnssB {
|
||||
/**
|
||||
* 测点编码
|
||||
*/
|
||||
@TableField("cd")
|
||||
private String cd;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String stationCode;
|
||||
|
||||
/**
|
||||
* 测点名称
|
||||
*/
|
||||
@TableField("cd_nm")
|
||||
private String cdNm;
|
||||
|
||||
/**
|
||||
* 桩号
|
||||
*/
|
||||
@TableField("ch")
|
||||
private String ch;
|
||||
|
||||
/**
|
||||
* 测点类型(sl/wy/sy)
|
||||
*/
|
||||
@TableField("cd_type")
|
||||
private String cdType;
|
||||
|
||||
/**
|
||||
* 水库编码
|
||||
*/
|
||||
@TableField("res_cd")
|
||||
private String resCd;
|
||||
|
||||
/**
|
||||
* 设备状态
|
||||
*/
|
||||
@TableField("device_status")
|
||||
private String deviceStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 位移数据表
|
||||
* 数据源为AttMqttCalcDataNormal
|
||||
*/
|
||||
@Data
|
||||
@TableName("jcsk_gnss_r")
|
||||
public class JcskGnssR {
|
||||
/**
|
||||
* 水库编码设备编码
|
||||
*/
|
||||
@TableField("res_cd")
|
||||
private String resCd;
|
||||
|
||||
/**
|
||||
* 测点编码
|
||||
*/
|
||||
@TableField("cd")
|
||||
private String cd;
|
||||
|
||||
/**
|
||||
* 人工录入cd,用于执行更新时用
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String newUpdateCd;
|
||||
|
||||
@TableField("is_artificial")
|
||||
private Integer isArtificial;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String ch;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cdnm;
|
||||
|
||||
/**
|
||||
* e方向变形值,单位(mm)
|
||||
*/
|
||||
@TableField("de")
|
||||
private BigDecimal de;
|
||||
|
||||
/**
|
||||
* n方向变形值,单位(mm)
|
||||
*/
|
||||
@TableField("dn")
|
||||
private BigDecimal dn;
|
||||
|
||||
/**
|
||||
* u方向变形值,单位(mm)
|
||||
*/
|
||||
@TableField("du")
|
||||
private BigDecimal du;
|
||||
|
||||
/**
|
||||
* 站点高程
|
||||
*/
|
||||
@TableField("alt")
|
||||
private BigDecimal alt;
|
||||
|
||||
/**
|
||||
* 监测时间
|
||||
*/
|
||||
@TableField("tm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
/**
|
||||
* 人工录入时间,用于执行更新时用
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date newUpdateTm;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_tm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTm;
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@Schema(description = "荆楚水库-位移整编表")
|
||||
@TableName("public.jcsk_gnss_r_8am")
|
||||
public class JcskGnssREightAm {
|
||||
|
||||
private String cd;
|
||||
|
||||
|
||||
private String tm;
|
||||
|
||||
|
||||
private BigDecimal de;
|
||||
|
||||
private BigDecimal dn;
|
||||
|
||||
private BigDecimal du;
|
||||
|
||||
private String res_cd;
|
||||
|
||||
private BigDecimal alt;
|
||||
}
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 渗流测点表实体类
|
||||
* 数据源为DsmSpgSpqnmp
|
||||
* 与r表通过rscd加mpcd关联
|
||||
*/
|
||||
@Data
|
||||
@TableName("jcsk_sl_b")
|
||||
public class JcskSlB {
|
||||
/**
|
||||
* 水库代码
|
||||
*/
|
||||
@TableField("rscd")
|
||||
private String rscd;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String stationCode;
|
||||
|
||||
/**
|
||||
* 水工建筑物编号
|
||||
*/
|
||||
@TableField("hycncd")
|
||||
private String hycncd;
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@TableField("mpcd")
|
||||
private String mpcd;
|
||||
|
||||
/**
|
||||
* rtu编号
|
||||
*/
|
||||
@TableField("stcd")
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
* 桩号
|
||||
*/
|
||||
@TableField("ch")
|
||||
private String ch;
|
||||
|
||||
/**
|
||||
* 轴距,单位m
|
||||
*/
|
||||
@TableField("ofax")
|
||||
private BigDecimal ofax;
|
||||
|
||||
/**
|
||||
* 高程,单位m
|
||||
*/
|
||||
@TableField("el")
|
||||
private BigDecimal el;
|
||||
|
||||
/**
|
||||
* 安装日期
|
||||
*/
|
||||
@TableField("indt")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private LocalDate indt;
|
||||
|
||||
/**
|
||||
* 仪器编号
|
||||
*/
|
||||
@TableField("dvcd")
|
||||
private String dvcd;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@TableField("lgtd")
|
||||
private BigDecimal lgtd;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField("lttd")
|
||||
private BigDecimal lttd;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("rm")
|
||||
private String rm;
|
||||
|
||||
/**
|
||||
* 资料更新时间
|
||||
*/
|
||||
@TableField("dtuptm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date dtuptm;
|
||||
|
||||
/**
|
||||
* 断面
|
||||
*/
|
||||
@TableField("dm")
|
||||
private String dm;
|
||||
|
||||
/**
|
||||
* 是否填报
|
||||
*/
|
||||
@TableField("is_tb")
|
||||
private String isTb;
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 渗流数据表实体类
|
||||
* 数据源为DsmSpgSpqnNormal
|
||||
*/
|
||||
@Data
|
||||
@TableName("jcsk_sl_r")
|
||||
public class JcskSlR {
|
||||
/**
|
||||
* 水库代码
|
||||
*/
|
||||
@TableField("rscd")
|
||||
private String rscd;
|
||||
|
||||
/**
|
||||
* 水工建筑物编号
|
||||
*/
|
||||
@TableField("hycncd")
|
||||
private String hycncd;
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@TableField("mpcd")
|
||||
private String mpcd;
|
||||
|
||||
|
||||
@TableField("stcd")
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
* 测量时间
|
||||
*/
|
||||
@TableField("mstm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date mstm;
|
||||
|
||||
/**
|
||||
* 温度,单位℃
|
||||
*/
|
||||
@TableField("tm")
|
||||
private BigDecimal tm;
|
||||
|
||||
/**
|
||||
* 渗流量,单位l/s
|
||||
*/
|
||||
@TableField("spqn")
|
||||
private BigDecimal spqn;
|
||||
|
||||
/**
|
||||
* 标准水温渗流量,单位l/s
|
||||
*/
|
||||
@TableField("stspqn")
|
||||
private BigDecimal stspqn;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_tm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTm;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String dvcd;
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("jcsk_sl_r_8am")
|
||||
public class JcskSlREightAm {
|
||||
/**
|
||||
* 水库代码
|
||||
*/
|
||||
@TableField("rscd")
|
||||
private String rscd;
|
||||
|
||||
/**
|
||||
* 水工建筑物编号
|
||||
*/
|
||||
@TableField("hycncd")
|
||||
private String hycncd;
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@TableField("mpcd")
|
||||
private String mpcd;
|
||||
|
||||
|
||||
@TableField("stcd")
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
* 测量时间
|
||||
*/
|
||||
@TableField("mstm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date mstm;
|
||||
|
||||
/**
|
||||
* 温度,单位℃
|
||||
*/
|
||||
@TableField("tm")
|
||||
private BigDecimal tm;
|
||||
|
||||
/**
|
||||
* 渗流量,单位l/s
|
||||
*/
|
||||
@TableField("spqn")
|
||||
private BigDecimal spqn;
|
||||
|
||||
/**
|
||||
* 标准水温渗流量,单位l/s
|
||||
*/
|
||||
@TableField("stspqn")
|
||||
private BigDecimal stspqn;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_tm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTm;
|
||||
}
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 渗压测点表
|
||||
* 数据源为DsmSpgSpprmp
|
||||
* 与r表通过rscd,stcd,mpcd关联
|
||||
*/
|
||||
@Data
|
||||
@TableName("jcsk_sy_b")
|
||||
public class JcskSyB {
|
||||
/**
|
||||
* 水库代码
|
||||
*/
|
||||
@TableField("rscd")
|
||||
private String rscd;
|
||||
|
||||
/**
|
||||
* rtu编码
|
||||
*/
|
||||
@TableField("stcd")
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
* 水工建筑物编号
|
||||
*/
|
||||
@TableField("hycncd")
|
||||
private String hycncd;
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@TableField("mpcd")
|
||||
private String mpcd;
|
||||
|
||||
/**
|
||||
* 桩号
|
||||
*/
|
||||
@TableField("ch")
|
||||
private String ch;
|
||||
|
||||
/**
|
||||
* 轴距,单位m
|
||||
*/
|
||||
@TableField("ofax")
|
||||
private BigDecimal ofax;
|
||||
|
||||
/**
|
||||
* 高程,单位m
|
||||
*/
|
||||
@TableField("el")
|
||||
private BigDecimal el;
|
||||
|
||||
/**
|
||||
* 监测类型
|
||||
*/
|
||||
@TableField("msps")
|
||||
private String msps;
|
||||
|
||||
/**
|
||||
* 透水段底高程,单位m
|
||||
*/
|
||||
@TableField("pmbtel")
|
||||
private BigDecimal pmbtel;
|
||||
|
||||
/**
|
||||
* 透水段顶高程,单位m
|
||||
*/
|
||||
@TableField("pmtpel")
|
||||
private BigDecimal pmtpel;
|
||||
|
||||
/**
|
||||
* 坝面高程
|
||||
*/
|
||||
@TableField("dsel")
|
||||
private BigDecimal dsel;
|
||||
|
||||
/**
|
||||
* 安装日期
|
||||
*/
|
||||
@TableField("indt")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private LocalDate indt;
|
||||
|
||||
/**
|
||||
* 仪器编号
|
||||
*/
|
||||
@TableField("dvcd")
|
||||
private String dvcd;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@TableField("lgtd")
|
||||
private BigDecimal lgtd;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField("lttd")
|
||||
private BigDecimal lttd;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("rm")
|
||||
private String rm;
|
||||
|
||||
/**
|
||||
* 资料更新时间
|
||||
*/
|
||||
@TableField("dtuptm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private LocalDateTime dtuptm;
|
||||
|
||||
/**
|
||||
* 断面
|
||||
*/
|
||||
@TableField("dm")
|
||||
private String dm;
|
||||
|
||||
/**
|
||||
* 是否填报
|
||||
*/
|
||||
@TableField("is_tb")
|
||||
private String isTb;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String stationCode;
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 渗压数据表实体类
|
||||
* 数据源为DsmSpgSpprNormal
|
||||
*/
|
||||
@Data
|
||||
@TableName("jcsk_sy_r")
|
||||
public class JcskSyR {
|
||||
/**
|
||||
* 水库代码
|
||||
*/
|
||||
@TableField("rscd")
|
||||
private String rscd;
|
||||
|
||||
/**
|
||||
* stcd
|
||||
*/
|
||||
@TableField("stcd")
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
* 水工建筑物编号
|
||||
*/
|
||||
@TableField("hycncd")
|
||||
private String hycncd;
|
||||
|
||||
/**
|
||||
* mpcd
|
||||
*/
|
||||
@TableField("mpcd")
|
||||
private String mpcd;
|
||||
|
||||
/**
|
||||
* 测量时间
|
||||
*/
|
||||
@TableField("mstm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date mstm;
|
||||
|
||||
/**
|
||||
* 用于记录人工录入数据时的新时间
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateMstm;
|
||||
|
||||
/**
|
||||
* 温度
|
||||
*/
|
||||
@TableField("tm")
|
||||
private BigDecimal tm;
|
||||
|
||||
/**
|
||||
* 渗流压力水位,单位m
|
||||
*/
|
||||
@TableField("spprwl")
|
||||
private BigDecimal spprwl;
|
||||
|
||||
@TableField("is_artificial")
|
||||
@Schema(description = "是否为人工录入 0不是 1是")
|
||||
private Integer isArtificial;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_tm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime updateTm;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "断面编码")
|
||||
private String dm;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "断面名称")
|
||||
private String dmName;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "测点编号")
|
||||
private String dvcd;
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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;
|
||||
|
||||
@Data
|
||||
@TableName("jcsk_sy_r_8am")
|
||||
public class JcskSyREightAm {
|
||||
/**
|
||||
* 水库代码
|
||||
*/
|
||||
@TableField("rscd")
|
||||
private String rscd;
|
||||
|
||||
/**
|
||||
* 测站编码
|
||||
*/
|
||||
@TableField("stcd")
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
* 水工建筑物编号
|
||||
*/
|
||||
@TableField("hycncd")
|
||||
private String hycncd;
|
||||
|
||||
/**
|
||||
* 测点编号
|
||||
*/
|
||||
@TableField("mpcd")
|
||||
private String mpcd;
|
||||
|
||||
/**
|
||||
* 测量时间
|
||||
*/
|
||||
@TableField("mstm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime mstm;
|
||||
|
||||
/**
|
||||
* 温度
|
||||
*/
|
||||
@TableField("tm")
|
||||
private BigDecimal tm;
|
||||
|
||||
/**
|
||||
* 渗流压力水位,单位m
|
||||
*/
|
||||
@TableField("spprwl")
|
||||
private BigDecimal spprwl;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_tm")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime updateTm;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "断面编码")
|
||||
private String dm;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "断面名称")
|
||||
private String dmName;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "dvcd")
|
||||
private String dvcd;
|
||||
}
|
||||
|
|
@ -48,10 +48,15 @@ public class MentenceFarmerRecord {
|
|||
@Schema(description = "维护人员名称")
|
||||
private String mentencePersonName;
|
||||
|
||||
@TableField("mentence_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Schema(description = "维护时间")
|
||||
private Date mentenceTime;
|
||||
@TableField("mentence_time_begin")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Schema(description = "维护时间开始")
|
||||
private Date mentenceTimeBegin;
|
||||
|
||||
@TableField("mentence_time_end")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Schema(description = "维护时间结束")
|
||||
private Date mentenceTimeEnd;
|
||||
|
||||
@TableField("fill_time")
|
||||
@Schema(description = "填报时间")
|
||||
|
|
|
|||
|
|
@ -81,4 +81,8 @@ public class OsmoticWarnR implements Serializable {
|
|||
@Schema(description="告警级别(1黄色 2红色)")
|
||||
private Integer level;
|
||||
|
||||
@TableField(value = "resolve_suggest")
|
||||
@Schema(description = "处理建议")
|
||||
private String resolveSuggest;
|
||||
|
||||
}
|
||||
|
|
@ -178,6 +178,11 @@ public class OsmoticWarnRule implements Serializable {
|
|||
@Schema(description="value_two")
|
||||
private BigDecimal valueTwo;
|
||||
|
||||
|
||||
@TableField(value = "resolve_suggest")
|
||||
@Schema(description = "处理建议")
|
||||
private String resolveSuggest;
|
||||
|
||||
/**
|
||||
* 是否启用(0否 1是)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
package com.gunshi.project.hsz.model;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 水厂流量表 (灌溉流量/水厂流量)
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("public.st_flow_r")
|
||||
public class StFlowR {
|
||||
|
||||
@TableId(value = "id")
|
||||
@Schema(description = "Id")
|
||||
private Long id;
|
||||
|
||||
|
||||
@TableField(value = "stcd")
|
||||
@Schema(description = "站点编码")
|
||||
private String stcd;
|
||||
|
||||
@TableField(value = "tm")
|
||||
@Schema(description = "观测时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime tm;
|
||||
|
||||
@TableField(value = "inq")
|
||||
private BigDecimal inq;
|
||||
|
||||
@TableField(value = "q")
|
||||
@Schema(description = "流量")
|
||||
private BigDecimal q;
|
||||
|
||||
@TableField(value = "otq")
|
||||
private BigDecimal otq;
|
||||
|
||||
@TableField(value = "crtime")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime crtime;
|
||||
|
||||
@Schema(description = "水量")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal v;
|
||||
|
||||
@Schema(description = "站点类型")
|
||||
@TableField(exist = false)
|
||||
private String sttp;
|
||||
|
||||
@TableField(exist = false)
|
||||
private ResMonthEcoFlow resMonthEcoFlow;
|
||||
}
|
||||
|
|
@ -27,17 +27,27 @@ import java.util.stream.Collectors;
|
|||
public class AttDamProfileService extends ServiceImpl<AttDamProfileMapper, AttDamProfile>
|
||||
{
|
||||
@Resource
|
||||
private OsmoticPressDeviceAutoDao pressDeviceAutoDao;
|
||||
private JcskSyBService jcskSyBService;
|
||||
|
||||
@Resource
|
||||
private JcskSlBService jcskSlBService;
|
||||
|
||||
@Resource
|
||||
private JcskGnssBService jcskGnssBService;
|
||||
|
||||
|
||||
public List<ProfilePressTreeVo> tree() {
|
||||
|
||||
LambdaQueryWrapper<AttDamProfile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.orderByAsc(AttDamProfile::getProfileCode);
|
||||
List<AttDamProfile> list = this.list(queryWrapper);
|
||||
List<ProfilePressTreeVo> res = MyBeanUtil.collectionCopy(list,ProfilePressTreeVo.class);
|
||||
for(ProfilePressTreeVo vo : res){
|
||||
List<OsmoticPressDevice> pressList = pressDeviceAutoDao.list(new LambdaQueryWrapper<OsmoticPressDevice>()
|
||||
.eq(OsmoticPressDevice::getProfileCode, vo.getProfileCode()).orderByAsc(OsmoticPressDevice::getStationCode));
|
||||
vo.setChildren(pressList.stream().map(OsmoticPressDevice::getStationCode).sorted().collect(Collectors.toList()));
|
||||
List<String> childrensy = jcskSyBService.getDvcdByProfileCode(vo.getProfileCode());
|
||||
vo.setChildren(childrensy);
|
||||
//List<OsmoticPressDevice> pressList = pressDeviceAutoDao.list(new LambdaQueryWrapper<OsmoticPressDevice>()
|
||||
// .eq(OsmoticPressDevice::getProfileCode, vo.getProfileCode()).orderByAsc(OsmoticPressDevice::getStationCode));
|
||||
// vo.setChildren(pressList.stream().map(OsmoticPressDevice::getStationCode).sorted().collect(Collectors.toList()));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,38 @@ package com.gunshi.project.hsz.service;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gunshi.project.hsz.mapper.HiddenInfoMapper;
|
||||
import com.gunshi.project.hsz.mapper.MentenceFarmerRecordMapper;
|
||||
import com.gunshi.project.hsz.model.FileAssociations;
|
||||
import com.gunshi.project.hsz.model.HiddenInfo;
|
||||
import com.gunshi.project.hsz.model.MentenceFarmerRecord;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class HiddenInfoService extends ServiceImpl<HiddenInfoMapper, HiddenInfo> {
|
||||
|
||||
@Autowired
|
||||
private FileAssociationsService fileService;
|
||||
|
||||
public String getGroupId(){
|
||||
return "hiddenInfo";
|
||||
}
|
||||
|
||||
public void saveFile(List<FileAssociations> files, String businessId) {
|
||||
fileService.saveFile(files,getGroupId(),businessId);
|
||||
}
|
||||
|
||||
public void deleteFile(String businessId) {
|
||||
fileService.deleteFile(getGroupId(),businessId);
|
||||
}
|
||||
|
||||
public List<FileAssociations> getFiles(String businessId) {
|
||||
List<FileAssociations> files = fileService.getFiles(getGroupId(), businessId);
|
||||
return files;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue