同步檀树岗的渗流,渗压。位移代码

master
yangzhe123 2025-11-03 16:47:35 +08:00
parent 9e9aab14ec
commit 50fb447c68
126 changed files with 9322 additions and 1425 deletions

View File

@ -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();
}
}

View File

@ -95,6 +95,7 @@ public class AttDamProfileController extends AbstractCommonFileController{
@Operation(summary = "列表") @Operation(summary = "列表")
@PostMapping("/list") @PostMapping("/list")
public R<List<AttDamProfile>> list() { public R<List<AttDamProfile>> list() {
LambdaQueryWrapper<AttDamProfile> wq = new LambdaQueryWrapper(); LambdaQueryWrapper<AttDamProfile> wq = new LambdaQueryWrapper();
wq.orderByAsc(AttDamProfile::getProfileCode); wq.orderByAsc(AttDamProfile::getProfileCode);
List<AttDamProfile> list = service.list(wq); List<AttDamProfile> list = service.list(wq);

View File

@ -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 "失败";
}
}
}

View File

@ -185,7 +185,7 @@ public class ForecastProjectController {
@Operation(summary = "pdf导出") @Operation(summary = "pdf导出")
@GetMapping("export") @PostMapping("export")
public void export(@RequestParam("ids") List<String> ids, HttpServletResponse response) { public void export(@RequestParam("ids") List<String> ids, HttpServletResponse response) {
try { try {
// 设置响应头 // 设置响应头

View File

@ -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";
}
}

View File

@ -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));
// }
}

View File

@ -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);
// }
//
//}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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));
}
}

View File

@ -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);
}
}

View File

@ -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());
}
}

View File

@ -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";
}
}

View File

@ -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);
}
}

View File

@ -6,6 +6,7 @@ import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.dto.ExportCommonDto; import com.gunshi.project.hsz.entity.dto.ExportCommonDto;
import com.gunshi.project.hsz.entity.so.MentenceFarmerRecordPageSo; import com.gunshi.project.hsz.entity.so.MentenceFarmerRecordPageSo;
import com.gunshi.project.hsz.model.ByLog; 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.model.MentenceFarmerRecord;
import com.gunshi.project.hsz.service.FileAssociationsService; import com.gunshi.project.hsz.service.FileAssociationsService;
import com.gunshi.project.hsz.service.HiddenInfoService; import com.gunshi.project.hsz.service.HiddenInfoService;
@ -48,6 +49,9 @@ public class MentenceFarmerRecordController extends AbstractCommonFileControlle
boolean result = mentenceFarmerRecordService.saveDate(dto); boolean result = mentenceFarmerRecordService.saveDate(dto);
if(result){ if(result){
fileService.saveFile(dto.getFiles(),getGroupId(),dto.getId().toString()); 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); return R.ok(result ? dto : null);
} }
@ -59,6 +63,9 @@ public class MentenceFarmerRecordController extends AbstractCommonFileControlle
boolean flag = mentenceFarmerRecordService.update(dto); boolean flag = mentenceFarmerRecordService.update(dto);
if (flag) { if (flag) {
fileService.saveFile(dto.getFiles(), getGroupId(), dto.getId().toString()); 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); return R.ok(flag ? dto : null);
} }
@ -66,9 +73,12 @@ public class MentenceFarmerRecordController extends AbstractCommonFileControlle
@Operation(summary = "删除") @Operation(summary = "删除")
@GetMapping("/del/{id}") @GetMapping("/del/{id}")
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) { public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
boolean result = mentenceFarmerRecordService.delete(id); List<Long> res = mentenceFarmerRecordService.delete(id);
if(result){ if(res != null){
fileService.deleteFile(getGroupId(),id.toString()); fileService.deleteFile(getGroupId(),id.toString());
for (Long cid : res) {
hiddenInfoService.deleteFile(String.valueOf(cid));
}
} }
return R.ok(true); return R.ok(true);
} }
@ -78,9 +88,17 @@ public class MentenceFarmerRecordController extends AbstractCommonFileControlle
public R<Page<MentenceFarmerRecord>> page(@RequestBody MentenceFarmerRecordPageSo pageSo) { public R<Page<MentenceFarmerRecord>> page(@RequestBody MentenceFarmerRecordPageSo pageSo) {
Page<MentenceFarmerRecord> byPage = mentenceFarmerRecordService.pageQuery(pageSo); Page<MentenceFarmerRecord> byPage = mentenceFarmerRecordService.pageQuery(pageSo);
if(!CollectionUtils.isEmpty(byPage.getRecords())){ if(!CollectionUtils.isEmpty(byPage.getRecords())){
byPage.getRecords().forEach(o -> o.setFiles( byPage.getRecords().forEach(o ->{
fileService.getFiles(getGroupId(),o.getId().toString())
)); 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); return R.ok(byPage);
} }

View File

@ -29,9 +29,9 @@ import java.util.Objects;
* author: xusan * author: xusan
* date: 2024-07-08 17:40:37 * date: 2024-07-08 17:40:37
*/ */
@Tag(name = "渗流设备表") //@Tag(name = "渗流设备表")
@RestController //@RestController
@RequestMapping(value="/osmoticFlowDevice") //@RequestMapping(value="/osmoticFlowDevice")
public class OsmoticFlowDeviceController extends AbstractCommonFileController{ public class OsmoticFlowDeviceController extends AbstractCommonFileController{
@Autowired @Autowired

View File

@ -21,9 +21,9 @@ import java.util.List;
* author: xusan * author: xusan
* date: 2024-07-08 17:40:37 * date: 2024-07-08 17:40:37
*/ */
@Tag(name = "渗流监测记录表") //@Tag(name = "渗流监测记录表")
@RestController //@RestController
@RequestMapping(value="/osmoticFlowR") //@RequestMapping(value="/osmoticFlowR")
public class OsmoticFlowRController { public class OsmoticFlowRController {
@Autowired @Autowired

View File

@ -29,9 +29,9 @@ import java.util.Objects;
* author: xusan * author: xusan
* date: 2024-07-08 17:40:37 * date: 2024-07-08 17:40:37
*/ */
@Tag(name = "渗压设备表") //@Tag(name = "渗压设备表")
@RestController //@RestController
@RequestMapping(value="/osmoticPressDevice") //@RequestMapping(value="/osmoticPressDevice")
public class OsmoticPressDeviceController extends AbstractCommonFileController{ public class OsmoticPressDeviceController extends AbstractCommonFileController{
@Autowired @Autowired

View File

@ -1,178 +1,178 @@
package com.gunshi.project.hsz.controller; //package com.gunshi.project.hsz.controller;
//
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; //import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; //import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; //import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; //import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; //import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo; //import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo; //import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo;
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo; //import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
import com.gunshi.project.hsz.entity.vo.OsmoticChartVo; //import com.gunshi.project.hsz.entity.vo.OsmoticChartVo;
import com.gunshi.project.hsz.entity.vo.OsmoticPressDetailVo; //import com.gunshi.project.hsz.entity.vo.OsmoticPressDetailVo;
import com.gunshi.project.hsz.entity.vo.OsmoticPressVo; //import com.gunshi.project.hsz.entity.vo.OsmoticPressVo;
import com.gunshi.project.hsz.entity.vo.OsmoticStationVo; //import com.gunshi.project.hsz.entity.vo.OsmoticStationVo;
import com.gunshi.project.hsz.model.OsmoticPressDevice; //import com.gunshi.project.hsz.model.OsmoticPressDevice;
import com.gunshi.project.hsz.model.OsmoticPressR; //import com.gunshi.project.hsz.model.OsmoticPressR;
import com.gunshi.project.hsz.service.OsmoticPressDeviceService; //import com.gunshi.project.hsz.service.OsmoticPressDeviceService;
import com.gunshi.project.hsz.service.OsmoticPressRService; //import com.gunshi.project.hsz.service.OsmoticPressRService;
import com.gunshi.project.hsz.validate.markers.Insert; //import com.gunshi.project.hsz.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; //import com.gunshi.project.hsz.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; //import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; //import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; //import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse; //import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.collections4.CollectionUtils; //import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; //import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; //import org.springframework.web.bind.annotation.*;
//
import java.io.Serializable; //import java.io.Serializable;
import java.util.List; //import java.util.List;
import java.util.Map; //import java.util.Map;
import java.util.Objects; //import java.util.Objects;
import java.util.stream.Collectors; //import java.util.stream.Collectors;
//
/** ///**
* : // * 描述: 渗压监测记录表
* author: xusan // * author: xusan
* date: 2024-07-08 17:40:37 // * date: 2024-07-08 17:40:37
*/ // */
@Tag(name = "渗压监测记录表") ////@Tag(name = "渗压监测记录表")
@RestController ////@RestController
@RequestMapping(value="/osmoticPressR") ////@RequestMapping(value="/osmoticPressR")
public class OsmoticPressRController { //public class OsmoticPressRController {
//
@Autowired // @Autowired
private OsmoticPressRService service; // private OsmoticPressRService service;
//
@Autowired // @Autowired
private OsmoticPressDeviceService osmoticPressDeviceService; // private OsmoticPressDeviceService osmoticPressDeviceService;
//
//
@Operation(summary = "新增") // @Operation(summary = "新增")
@PostMapping("/insert") // @PostMapping("/insert")
public R<OsmoticPressR> insert(@Validated(Insert.class) @RequestBody OsmoticPressR dto) { // public R<OsmoticPressR> insert(@Validated(Insert.class) @RequestBody OsmoticPressR dto) {
// // 通过时间戳去除毫秒 //// // 通过时间戳去除毫秒
// long currentTime = System.currentTimeMillis(); //// long currentTime = System.currentTimeMillis();
// long seconds = currentTime / 1000; // 去掉毫秒部分 //// long seconds = currentTime / 1000; // 去掉毫秒部分
// Date dateWithoutMillis = new Date(seconds * 1000); // 转回毫秒时间戳 //// Date dateWithoutMillis = new Date(seconds * 1000); // 转回毫秒时间戳
// dto.setTm(dateWithoutMillis); //// dto.setTm(dateWithoutMillis);
boolean result = service.save(dto); // boolean result = service.save(dto);
return R.ok(result ? dto : null); // return R.ok(result ? dto : null);
} // }
//
@Operation(summary = "修改") // @Operation(summary = "修改")
@PostMapping("/update") // @PostMapping("/update")
public R<OsmoticPressR> update(@Validated(Update.class) @RequestBody OsmoticPressR dto) { // public R<OsmoticPressR> update(@Validated(Update.class) @RequestBody OsmoticPressR dto) {
LambdaUpdateWrapper<OsmoticPressR> wrapper = new LambdaUpdateWrapper<>(); // LambdaUpdateWrapper<OsmoticPressR> wrapper = new LambdaUpdateWrapper<>();
wrapper.eq(OsmoticPressR::getTm, dto.getTm()) // wrapper.eq(OsmoticPressR::getTm, dto.getTm())
.eq(OsmoticPressR::getStationCode, dto.getStationCode()) // .eq(OsmoticPressR::getStationCode, dto.getStationCode())
.set(OsmoticPressR::getPress, dto.getPress()) // .set(OsmoticPressR::getPress, dto.getPress())
.set(OsmoticPressR::getVib, dto.getVib()) // .set(OsmoticPressR::getVib, dto.getVib())
.set(OsmoticPressR::getTemp, dto.getTemp()) // .set(OsmoticPressR::getTemp, dto.getTemp())
.set(OsmoticPressR::getValue, dto.getValue()) // .set(OsmoticPressR::getValue, dto.getValue())
.set(OsmoticPressR::getChan, dto.getChan()); // .set(OsmoticPressR::getChan, dto.getChan());
boolean update = service.update(null, wrapper); // boolean update = service.update(null, wrapper);
return R.ok(update ? dto : null); // return R.ok(update ? dto : null);
} // }
//
@Operation(summary = "删除") // @Operation(summary = "删除")
@GetMapping("/del/{id}/{tm}") // @GetMapping("/del/{id}/{tm}")
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id,@Schema(name = "tm") @PathVariable("tm") Serializable 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)){ // if(Objects.isNull(id) || Objects.isNull(tm)){
return R.ok(false); // return R.ok(false);
} // }
QueryWrapper<OsmoticPressR> wrapper = new QueryWrapper<>(); // QueryWrapper<OsmoticPressR> wrapper = new QueryWrapper<>();
wrapper.eq("station_code", id).eq("tm", tm); // wrapper.eq("station_code", id).eq("tm", tm);
return R.ok(service.remove(wrapper)); // return R.ok(service.remove(wrapper));
} // }
//
@Operation(summary = "列表") // @Operation(summary = "列表")
@PostMapping("/list") // @PostMapping("/list")
public R<List<OsmoticPressR>> list() { // public R<List<OsmoticPressR>> list() {
return R.ok(service.lambdaQuery().list()); // return R.ok(service.lambdaQuery().list());
} // }
//
@Operation(summary = "分页") // @Operation(summary = "分页")
@PostMapping("/page") // @PostMapping("/page")
public R<Page<OsmoticPressR>> page(@RequestBody OsmoticQueryPageSo osmoticQueryPageSo) { // public R<Page<OsmoticPressR>> page(@RequestBody OsmoticQueryPageSo osmoticQueryPageSo) {
Page<OsmoticPressR> osmoticPressRPage = service.queryPage(osmoticQueryPageSo); // Page<OsmoticPressR> osmoticPressRPage = service.queryPage(osmoticQueryPageSo);
List<OsmoticPressR> records = osmoticPressRPage.getRecords(); // List<OsmoticPressR> records = osmoticPressRPage.getRecords();
if(CollectionUtils.isEmpty(records)){ // if(CollectionUtils.isEmpty(records)){
return R.ok(osmoticPressRPage); // return R.ok(osmoticPressRPage);
} // }
List<OsmoticPressR> collect = records.stream().peek(e -> { // List<OsmoticPressR> collect = records.stream().peek(e -> {
LambdaQueryWrapper<OsmoticPressDevice> wq = new LambdaQueryWrapper(); // LambdaQueryWrapper<OsmoticPressDevice> wq = new LambdaQueryWrapper();
wq.eq(OsmoticPressDevice::getStationCode, e.getStationCode()); // wq.eq(OsmoticPressDevice::getStationCode, e.getStationCode());
List<OsmoticPressDevice> list = osmoticPressDeviceService.list(wq); // List<OsmoticPressDevice> list = osmoticPressDeviceService.list(wq);
if (CollectionUtils.isNotEmpty(list)) { // if (CollectionUtils.isNotEmpty(list)) {
OsmoticPressDevice osmoticPressDevice = list.stream().findFirst().orElse(null); // OsmoticPressDevice osmoticPressDevice = list.stream().findFirst().orElse(null);
e.setProfileCode(osmoticPressDevice.getProfileCode()); // e.setProfileCode(osmoticPressDevice.getProfileCode());
} // }
}).collect(Collectors.toList()); // }).collect(Collectors.toList());
osmoticPressRPage.setRecords(collect); // osmoticPressRPage.setRecords(collect);
return R.ok(osmoticPressRPage); // return R.ok(osmoticPressRPage);
} // }
//
@Operation(summary = "大屏-大坝安全监测统计") // @Operation(summary = "大屏-大坝安全监测统计")
@GetMapping("/stat") // @GetMapping("/stat")
public R<Map<Integer,Integer>> stat() { // public R<Map<Integer,Integer>> stat() {
return R.ok(service.stat()); // return R.ok(service.stat());
} // }
//
@Operation(summary = "布置图-渗压/渗流监测") // @Operation(summary = "布置图-渗压/渗流监测")
@GetMapping("/list/value") // @GetMapping("/list/value")
public R<List<OsmoticPressVo>> listValue(@Schema(name = "type",description = "类型1渗压 2渗流") @RequestParam("type") Integer type) { // public R<List<OsmoticPressVo>> listValue(@Schema(name = "type",description = "类型1渗压 2渗流") @RequestParam("type") Integer type) {
return R.ok(service.listValue(type)); // return R.ok(service.listValue(type));
} // }
//
@Operation(summary = "布置图-按测站查询渗压/渗流监测数据") // @Operation(summary = "布置图-按测站查询渗压/渗流监测数据")
@PostMapping("/detail/value") // @PostMapping("/detail/value")
public R<List<OsmoticPressDetailVo>> detailValue(@RequestBody @Validated OsmoticDetailQuerySo so) { // public R<List<OsmoticPressDetailVo>> detailValue(@RequestBody @Validated OsmoticDetailQuerySo so) {
return R.ok(service.detailValue(so)); // return R.ok(service.detailValue(so));
} // }
//
@Operation(summary = "测值查询(数据表)") // @Operation(summary = "测值查询(数据表)")
@PostMapping("/query/value") // @PostMapping("/query/value")
public R<List<OsmoticStationVo>> queryValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) { // public R<List<OsmoticStationVo>> queryValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
return R.ok(service.queryValue(osmoticQuerySo,null)); // return R.ok(service.queryValue(osmoticQuerySo,null));
} // }
//
@Operation(summary = "测值查询(多图单表)") // @Operation(summary = "测值查询(多图单表)")
@PostMapping("/query/chart") // @PostMapping("/query/chart")
public R<List<OsmoticChartVo>> queryChart(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) { // public R<List<OsmoticChartVo>> queryChart(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
return R.ok(service.queryChart(osmoticQuerySo,null)); // return R.ok(service.queryChart(osmoticQuerySo,null));
} // }
//
@Operation(summary = "浸润线查询") // @Operation(summary = "浸润线查询")
@PostMapping("/infiltra/line") // @PostMapping("/infiltra/line")
public R<List<OsmoticStationVo>> infiltraLine(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) { // public R<List<OsmoticStationVo>> infiltraLine(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
return R.ok(service.infiltraLine(osmoticQuerySo)); // return R.ok(service.infiltraLine(osmoticQuerySo));
} // }
//
@Operation(summary = "浸润线导出") // @Operation(summary = "浸润线导出")
@PostMapping( "/export") // @PostMapping( "/export")
public void export(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) { // public void export(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
service.export(osmoticQuerySo,response); // service.export(osmoticQuerySo,response);
} // }
//
@Operation(summary = "年度渗压/渗流统计(表格)") // @Operation(summary = "年度渗压/渗流统计(表格)")
@PostMapping("/year/stat") // @PostMapping("/year/stat")
public R<List<OsmoticStationVo>> yearStat(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) { // public R<List<OsmoticStationVo>> yearStat(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
return R.ok(service.yearStat(osmoticQuerySo)); // return R.ok(service.yearStat(osmoticQuerySo));
} // }
//
@Operation(summary = "年度渗压/渗流统计(全年度特征值统计)") // @Operation(summary = "年度渗压/渗流统计(全年度特征值统计)")
@PostMapping("/year/stat/value") // @PostMapping("/year/stat/value")
public R<List<OsmoticChartVo>> yearStatValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) { // public R<List<OsmoticChartVo>> yearStatValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
return R.ok(service.yearStatValue(osmoticQuerySo)); // return R.ok(service.yearStatValue(osmoticQuerySo));
} // }
//
@Operation(summary = "年度渗压/渗流统计导出") // @Operation(summary = "年度渗压/渗流统计导出")
@PostMapping( "/year/stat/export") // @PostMapping( "/year/stat/export")
public void yearStatExport(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) { // public void yearStatExport(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
service.yearStatExport(osmoticQuerySo,response); // service.yearStatExport(osmoticQuerySo,response);
} // }
//
} //}

View File

@ -23,9 +23,9 @@ import java.util.Objects;
* author: xusan * author: xusan
* date: 2024-07-08 17:40:37 * date: 2024-07-08 17:40:37
*/ */
@Tag(name = "位移设备表") //@Tag(name = "位移设备表")
@RestController //@RestController
@RequestMapping(value="/osmoticShiftDevice") //@RequestMapping(value="/osmoticShiftDevice")
public class OsmoticShiftDeviceController { public class OsmoticShiftDeviceController {
@Autowired @Autowired

View File

@ -1,116 +1,116 @@
package com.gunshi.project.hsz.controller; //package com.gunshi.project.hsz.controller;
//
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; //import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; //import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; //import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gunshi.core.result.R; //import com.gunshi.core.result.R;
import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo; //import com.gunshi.project.hsz.entity.so.OsmoticDetailQuerySo;
import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo; //import com.gunshi.project.hsz.entity.so.OsmoticQueryPageSo;
import com.gunshi.project.hsz.entity.so.OsmoticQuerySo; //import com.gunshi.project.hsz.entity.so.OsmoticQuerySo;
import com.gunshi.project.hsz.entity.vo.*; //import com.gunshi.project.hsz.entity.vo.*;
import com.gunshi.project.hsz.model.OsmoticShiftR; //import com.gunshi.project.hsz.model.OsmoticShiftR;
import com.gunshi.project.hsz.service.OsmoticShiftRService; //import com.gunshi.project.hsz.service.OsmoticShiftRService;
import com.gunshi.project.hsz.validate.markers.Insert; //import com.gunshi.project.hsz.validate.markers.Insert;
import com.gunshi.project.hsz.validate.markers.Update; //import com.gunshi.project.hsz.validate.markers.Update;
import io.swagger.v3.oas.annotations.Operation; //import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; //import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; //import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse; //import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; //import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; //import org.springframework.web.bind.annotation.*;
//
import java.io.Serializable; //import java.io.Serializable;
import java.util.List; //import java.util.List;
import java.util.Objects; //import java.util.Objects;
//
/** ///**
* : // * 描述: 位移监测记录表
* author: xusan // * author: xusan
* date: 2024-07-08 17:40:37 // * date: 2024-07-08 17:40:37
*/ // */
@Tag(name = "位移监测记录表") ////@Tag(name = "位移监测记录表")
@RestController ////@RestController
@RequestMapping(value="/osmoticShiftR") ////@RequestMapping(value="/osmoticShiftR")
public class OsmoticShiftRController { //public class OsmoticShiftRController {
//
@Autowired // @Autowired
private OsmoticShiftRService service; // private OsmoticShiftRService service;
//
//
@Operation(summary = "新增") // @Operation(summary = "新增")
@PostMapping("/insert") // @PostMapping("/insert")
public R<OsmoticShiftR> insert(@Validated(Insert.class) @RequestBody OsmoticShiftR dto) { // public R<OsmoticShiftR> insert(@Validated(Insert.class) @RequestBody OsmoticShiftR dto) {
// dto.setTm(new Date()); // // dto.setTm(new Date());
boolean result = service.save(dto); // boolean result = service.save(dto);
return R.ok(result ? dto : null); // return R.ok(result ? dto : null);
} // }
//
@Operation(summary = "修改") // @Operation(summary = "修改")
@PostMapping("/update") // @PostMapping("/update")
public R<OsmoticShiftR> update(@Validated(Update.class) @RequestBody OsmoticShiftR dto) { // public R<OsmoticShiftR> update(@Validated(Update.class) @RequestBody OsmoticShiftR dto) {
LambdaUpdateWrapper<OsmoticShiftR> wrapper = new LambdaUpdateWrapper<>(); // LambdaUpdateWrapper<OsmoticShiftR> wrapper = new LambdaUpdateWrapper<>();
wrapper.eq(OsmoticShiftR::getStationCode, dto.getStationCode()) // wrapper.eq(OsmoticShiftR::getStationCode, dto.getStationCode())
.eq(OsmoticShiftR::getTm, dto.getTm()) // .eq(OsmoticShiftR::getTm, dto.getTm())
.set(OsmoticShiftR::getX, dto.getX()) // .set(OsmoticShiftR::getX, dto.getX())
.set(OsmoticShiftR::getY, dto.getY()) // .set(OsmoticShiftR::getY, dto.getY())
.set(OsmoticShiftR::getH, dto.getH()); // .set(OsmoticShiftR::getH, dto.getH());
boolean update = service.update(null, wrapper); // boolean update = service.update(null, wrapper);
return R.ok(update ? dto : null); // return R.ok(update ? dto : null);
} // }
//
@Operation(summary = "删除") // @Operation(summary = "删除")
@GetMapping("/del/{id}/{tm}") // @GetMapping("/del/{id}/{tm}")
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id,@Schema(name = "tm") @PathVariable("tm") Serializable 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)){ // if(Objects.isNull(id) || Objects.isNull(tm)){
return R.ok(false); // return R.ok(false);
} // }
QueryWrapper<OsmoticShiftR> wrapper = new QueryWrapper<>(); // QueryWrapper<OsmoticShiftR> wrapper = new QueryWrapper<>();
wrapper.eq("station_code", id).eq("tm", tm); // wrapper.eq("station_code", id).eq("tm", tm);
return R.ok(service.remove(wrapper)); // return R.ok(service.remove(wrapper));
} // }
//
@Operation(summary = "列表") // @Operation(summary = "列表")
@PostMapping("/list") // @PostMapping("/list")
public R<List<OsmoticShiftR>> list() { // public R<List<OsmoticShiftR>> list() {
return R.ok(service.lambdaQuery().list()); // return R.ok(service.lambdaQuery().list());
} // }
//
@Operation(summary = "分页") // @Operation(summary = "分页")
@PostMapping("/page") // @PostMapping("/page")
public R<Page<OsmoticShiftR>> page(@RequestBody OsmoticQueryPageSo osmoticQueryPageSo) { // public R<Page<OsmoticShiftR>> page(@RequestBody OsmoticQueryPageSo osmoticQueryPageSo) {
return R.ok(service.queryPage(osmoticQueryPageSo)); // return R.ok(service.queryPage(osmoticQueryPageSo));
} // }
//
@Operation(summary = "年度位移统计(表格)") // @Operation(summary = "年度位移统计(表格)")
@PostMapping("/year/stat") // @PostMapping("/year/stat")
public R<List<OsmoticShiftVo>> yearStat(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) { // public R<List<OsmoticShiftVo>> yearStat(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
return R.ok(service.yearStat(osmoticQuerySo)); // return R.ok(service.yearStat(osmoticQuerySo));
} // }
//
@Operation(summary = "年度位移统计(全年度特征值统计)") // @Operation(summary = "年度位移统计(全年度特征值统计)")
@PostMapping("/year/stat/value") // @PostMapping("/year/stat/value")
public R<List<OsmoticChartVo>> yearStatValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) { // public R<List<OsmoticChartVo>> yearStatValue(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo) {
return R.ok(service.yearStatValue(osmoticQuerySo)); // return R.ok(service.yearStatValue(osmoticQuerySo));
} // }
//
@Operation(summary = "年度位移统计导出") // @Operation(summary = "年度位移统计导出")
@PostMapping( "/year/stat/export") // @PostMapping( "/year/stat/export")
public void yearStatExport(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) { // public void yearStatExport(@RequestBody @Validated OsmoticQuerySo osmoticQuerySo, HttpServletResponse response) {
service.yearStatExport(osmoticQuerySo,response); // service.yearStatExport(osmoticQuerySo,response);
} // }
//
@Operation(summary = "布置图-位移监测") // @Operation(summary = "布置图-位移监测")
@GetMapping("/list/value") // @GetMapping("/list/value")
public R<List<OsmoticShiftListVo>> listValue() { // public R<List<OsmoticShiftListVo>> listValue() {
return R.ok(service.listValue()); // return R.ok(service.listValue());
} // }
//
@Operation(summary = "布置图-按测站查询位移监测数据") // @Operation(summary = "布置图-按测站查询位移监测数据")
@PostMapping("/detail/value") // @PostMapping("/detail/value")
public R<List<OsmoticShiftValueVo>> detailValue(@RequestBody @Validated OsmoticDetailQuerySo so) { // public R<List<OsmoticShiftValueVo>> detailValue(@RequestBody @Validated OsmoticDetailQuerySo so) {
return R.ok(service.detailValue(so)); // return R.ok(service.detailValue(so));
} // }
//
} //}

View File

@ -28,9 +28,9 @@ import java.util.stream.Collectors;
* author: xusan * author: xusan
* date: 2024-08-28 10:29:58 * date: 2024-08-28 10:29:58
*/ */
@Tag(name = "白蚁普查") //@Tag(name = "白蚁普查")
@RestController //@RestController
@RequestMapping(value="/termite/survey") //@RequestMapping(value="/termite/survey")
public class TermiteSurveyController extends AbstractCommonFileController{ public class TermiteSurveyController extends AbstractCommonFileController{
@Autowired @Autowired

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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();
}

View File

@ -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;
}

View File

@ -0,0 +1,9 @@
package com.gunshi.project.hsz.entity.dto;
import lombok.Data;
@Data
public class SqlRequest {
private String sql;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -22,7 +22,7 @@ public class OsmoticQuerySo {
private Integer type = 1; private Integer type = 1;
@Schema(description = "年度") @Schema(description = "年度")
private Integer year; private String year;
@Schema(description = "时间") @Schema(description = "时间")
private DateTimeRangeSo dateTimeRangeSo; private DateTimeRangeSo dateTimeRangeSo;
@ -32,4 +32,7 @@ public class OsmoticQuerySo {
@Schema(description = "测点编号") @Schema(description = "测点编号")
private List<@NotEmpty String> stationCodes; private List<@NotEmpty String> stationCodes;
@Schema(description = "wy (没啥用的字段)")
private String wy;
} }

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -0,0 +1,8 @@
package com.gunshi.project.hsz.entity.vo;
import lombok.Data;
@Data
public class JcskByInspectDetailVo {
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -50,6 +50,21 @@ public interface InspectTaskMapper extends BaseMapper<InspectTask> {
""") """)
Page<InspectTask> pageQuery(Page<InspectTask> page,@Param("obj") InspectTaskPageSo pageSo); 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(""" @Select("""
<script> <script>
with m1 as ( with m1 as (

View File

@ -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);
}

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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();
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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();
}

View File

@ -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);
}

View File

@ -43,5 +43,15 @@ public interface OsmoticWarnRMapper extends BaseMapper<OsmoticWarnR> {
order by t.tm desc order by t.tm desc
</script> </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);
} }

View File

@ -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);
}

View File

@ -36,4 +36,10 @@ public interface StWaterRMapper extends BaseMapper<StWaterR> {
on t1.stcd = t2.stcd and t1.tm = t2.max_tm ; on t1.stcd = t2.stcd and t1.tm = t2.max_tm ;
""") """)
List<StWaterR> getStcdLastWaterData(); List<StWaterR> getStcdLastWaterData();
@Select("""
select * from st_water_r where stcd = #{stcd} order by tm desc limit 1
""")
StWaterR selectNewDataByStcd(String stcd);
} }

View File

@ -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
* status0
* stauts1
* ROW_NUMBER orderstatus1status1ob_date
* orderstatus1
* orderstatus1status1
* @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);
/**
* sqlsql
* @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);
}

View File

@ -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> {
}

View File

@ -4,16 +4,20 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; 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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.List;
@TableName("hidden_info") @TableName("hidden_info")
@Data @Data
public class HiddenInfo { public class HiddenInfo {
@TableId("id") @TableId("id")
@JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@TableField("mentence_farmer_record_id") @TableField("mentence_farmer_record_id")
@ -42,4 +46,7 @@ public class HiddenInfo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date resolveTime; private Date resolveTime;
@TableField(exist = false)
private List<FileAssociations> files;
} }

View File

@ -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
* rdevice_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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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
* rrscdcd
*/
@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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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
* rrscdmpcd
*/
@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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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
* rrscd,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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -48,10 +48,15 @@ public class MentenceFarmerRecord {
@Schema(description = "维护人员名称") @Schema(description = "维护人员名称")
private String mentencePersonName; private String mentencePersonName;
@TableField("mentence_time") @TableField("mentence_time_begin")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@Schema(description = "维护时间") @Schema(description = "维护时间开始")
private Date mentenceTime; private Date mentenceTimeBegin;
@TableField("mentence_time_end")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@Schema(description = "维护时间结束")
private Date mentenceTimeEnd;
@TableField("fill_time") @TableField("fill_time")
@Schema(description = "填报时间") @Schema(description = "填报时间")

View File

@ -81,4 +81,8 @@ public class OsmoticWarnR implements Serializable {
@Schema(description="告警级别1黄色 2红色") @Schema(description="告警级别1黄色 2红色")
private Integer level; private Integer level;
@TableField(value = "resolve_suggest")
@Schema(description = "处理建议")
private String resolveSuggest;
} }

View File

@ -178,6 +178,11 @@ public class OsmoticWarnRule implements Serializable {
@Schema(description="value_two") @Schema(description="value_two")
private BigDecimal valueTwo; private BigDecimal valueTwo;
@TableField(value = "resolve_suggest")
@Schema(description = "处理建议")
private String resolveSuggest;
/** /**
* 0 1 * 0 1
*/ */

View File

@ -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;
}

View File

@ -27,17 +27,27 @@ import java.util.stream.Collectors;
public class AttDamProfileService extends ServiceImpl<AttDamProfileMapper, AttDamProfile> public class AttDamProfileService extends ServiceImpl<AttDamProfileMapper, AttDamProfile>
{ {
@Resource @Resource
private OsmoticPressDeviceAutoDao pressDeviceAutoDao; private JcskSyBService jcskSyBService;
@Resource
private JcskSlBService jcskSlBService;
@Resource
private JcskGnssBService jcskGnssBService;
public List<ProfilePressTreeVo> tree() { public List<ProfilePressTreeVo> tree() {
LambdaQueryWrapper<AttDamProfile> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<AttDamProfile> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.orderByAsc(AttDamProfile::getProfileCode); queryWrapper.orderByAsc(AttDamProfile::getProfileCode);
List<AttDamProfile> list = this.list(queryWrapper); List<AttDamProfile> list = this.list(queryWrapper);
List<ProfilePressTreeVo> res = MyBeanUtil.collectionCopy(list,ProfilePressTreeVo.class); List<ProfilePressTreeVo> res = MyBeanUtil.collectionCopy(list,ProfilePressTreeVo.class);
for(ProfilePressTreeVo vo : res){ for(ProfilePressTreeVo vo : res){
List<OsmoticPressDevice> pressList = pressDeviceAutoDao.list(new LambdaQueryWrapper<OsmoticPressDevice>() List<String> childrensy = jcskSyBService.getDvcdByProfileCode(vo.getProfileCode());
.eq(OsmoticPressDevice::getProfileCode, vo.getProfileCode()).orderByAsc(OsmoticPressDevice::getStationCode)); vo.setChildren(childrensy);
vo.setChildren(pressList.stream().map(OsmoticPressDevice::getStationCode).sorted().collect(Collectors.toList())); //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; return res;
} }

View File

@ -43,6 +43,7 @@ import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;

View File

@ -4,14 +4,38 @@ package com.gunshi.project.hsz.service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gunshi.project.hsz.mapper.HiddenInfoMapper; import com.gunshi.project.hsz.mapper.HiddenInfoMapper;
import com.gunshi.project.hsz.mapper.MentenceFarmerRecordMapper; 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.HiddenInfo;
import com.gunshi.project.hsz.model.MentenceFarmerRecord; import com.gunshi.project.hsz.model.MentenceFarmerRecord;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service @Service
@Slf4j @Slf4j
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class HiddenInfoService extends ServiceImpl<HiddenInfoMapper, HiddenInfo> { 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