Browse Source

开发

master_tdsql
zhuyulei 1 year ago
parent
commit
f6be9cdc1b
  1. 27
      shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfDfhdmController.java
  2. 18
      shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfGcxyController.java
  3. 32
      shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfHdmtzzController.java
  4. 31
      shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfJyjlController.java
  5. 26
      shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfSafeJbxxController.java
  6. 18
      shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfSwtzController.java
  7. 12
      shuili-system/src/main/java/com/kms/yg/df/domain/BsSgcDfSwtz.java

27
shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfDfhdmController.java

@ -1,8 +1,14 @@
package com.kms.yg.df.controller; package com.kms.yg.df.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yg.df.domain.BsSgcDfSafeJbxx;
import com.kms.yg.df.service.BsSgcDfSafeJbxxService;
import com.shuili.common.core.controller.BaseController; import com.shuili.common.core.controller.BaseController;
import com.shuili.common.core.domain.SearchParam; import com.shuili.common.core.domain.SearchParam;
import com.shuili.common.utils.poi.ExcelUtil; import com.shuili.common.utils.poi.ExcelUtil;
@ -45,6 +51,9 @@ public class BsSgcDfDfhdmController extends BaseController
@Autowired @Autowired
private BsSgcDfDfhdmService bsSgcDfDfhdmService; private BsSgcDfDfhdmService bsSgcDfDfhdmService;
@Autowired
private BsSgcDfSafeJbxxService bsSgcDfSafeJbxxService;
/** /**
@ -54,7 +63,10 @@ public class BsSgcDfDfhdmController extends BaseController
@ApiOperation("堤防横断面列表") @ApiOperation("堤防横断面列表")
public IPage list(@RequestBody SearchParam<BsSgcDfDfhdm> sp) public IPage list(@RequestBody SearchParam<BsSgcDfDfhdm> sp)
{ {
return bsSgcDfDfhdmService.selectPage(sp); Page<BsSgcDfDfhdm> page = bsSgcDfDfhdmService.page(new Page<>(sp.getPageNum(), sp.getPageSize()), Wrappers.lambdaQuery(BsSgcDfDfhdm.class)
.eq(BsSgcDfDfhdm::getDikeCode, sp.getData().getDikeCode())
.isNull(BsSgcDfDfhdm::getExprDate));
return page;
} }
/** /**
@ -100,6 +112,19 @@ public class BsSgcDfDfhdmController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody BsSgcDfDfhdm bsSgcDfDfhdm) public AjaxResult edit(@RequestBody BsSgcDfDfhdm bsSgcDfDfhdm)
{ {
String dikeCode = bsSgcDfDfhdm.getDikeCode();
BsSgcDfSafeJbxx byId = bsSgcDfSafeJbxxService.getOne(Wrappers.lambdaQuery(BsSgcDfSafeJbxx.class)
.eq(BsSgcDfSafeJbxx::getDikeCode, dikeCode));
byId.setStatus("4");
bsSgcDfSafeJbxxService.updateById(byId);
String id = bsSgcDfDfhdm.getId();
BsSgcDfDfhdm dfhdm = bsSgcDfDfhdmService.getById(id);
dfhdm.setExprDate(new Date());
dfhdm.setId(UUID.randomUUID().toString());
bsSgcDfDfhdmService.save(dfhdm);
bsSgcDfDfhdm.setEffDate(new Date());
bsSgcDfDfhdm.setExprDate(null);
return toAjax(bsSgcDfDfhdmService.updateById(bsSgcDfDfhdm)); return toAjax(bsSgcDfDfhdmService.updateById(bsSgcDfDfhdm));
} }

18
shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfGcxyController.java

@ -1,12 +1,17 @@
package com.kms.yg.df.controller; package com.kms.yg.df.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.system.service.SysDeptService; import com.kms.system.service.SysDeptService;
import com.kms.system.service.SysXzqhService; import com.kms.system.service.SysXzqhService;
import com.kms.yg.df.domain.BsSgcDfDfhdm;
import com.kms.yg.df.domain.BsSgcDfGcxy; import com.kms.yg.df.domain.BsSgcDfGcxy;
import com.kms.yg.df.domain.BsSgcDfJyjl;
import com.kms.yg.df.domain.BsSgcDfSafeJbxx; import com.kms.yg.df.domain.BsSgcDfSafeJbxx;
import com.kms.yg.df.service.BsSgcDfGcxyService; import com.kms.yg.df.service.BsSgcDfGcxyService;
import com.kms.yg.df.service.BsSgcDfSafeJbxxService; import com.kms.yg.df.service.BsSgcDfSafeJbxxService;
@ -71,7 +76,11 @@ public class BsSgcDfGcxyController extends BaseController
@ApiOperation("工程效益列表") @ApiOperation("工程效益列表")
public IPage list(@RequestBody SearchParam<BsSgcDfGcxy> sp) public IPage list(@RequestBody SearchParam<BsSgcDfGcxy> sp)
{ {
return bsSgcSzGcxyService.selectPage(sp);
Page<BsSgcDfGcxy> page = bsSgcSzGcxyService.page(new Page<>(sp.getPageNum(), sp.getPageSize()), Wrappers.lambdaQuery(BsSgcDfGcxy.class)
.eq(BsSgcDfGcxy::getDikeCode, sp.getData().getDikeCode())
.isNull(BsSgcDfGcxy::getExprDate));
return page;
} }
/** /**
@ -128,6 +137,13 @@ public class BsSgcDfGcxyController extends BaseController
.eq(BsSgcDfSafeJbxx::getDikeCode, dikeCode)); .eq(BsSgcDfSafeJbxx::getDikeCode, dikeCode));
byId.setStatus("4"); byId.setStatus("4");
bsSgcSzSafeJbxxService.updateById(byId); bsSgcSzSafeJbxxService.updateById(byId);
String id = bsSgcSzGcxy.getId();
BsSgcDfGcxy dfhdm = bsSgcSzGcxyService.getById(id);
dfhdm.setExprDate(new Date());
dfhdm.setId(UUID.randomUUID().toString());
bsSgcSzGcxyService.save(dfhdm);
bsSgcSzGcxy.setEffDate(new Date());
bsSgcSzGcxy.setExprDate(null);
return toAjax(bsSgcSzGcxyService.updateById(bsSgcSzGcxy)); return toAjax(bsSgcSzGcxyService.updateById(bsSgcSzGcxy));
} }

32
shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfHdmtzzController.java

@ -1,8 +1,16 @@
package com.kms.yg.df.controller; package com.kms.yg.df.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yg.df.domain.BsSgcDfDfhdm;
import com.kms.yg.df.domain.BsSgcDfGcxy;
import com.kms.yg.df.domain.BsSgcDfSafeJbxx;
import com.kms.yg.df.service.BsSgcDfSafeJbxxService;
import com.shuili.common.core.controller.BaseController; import com.shuili.common.core.controller.BaseController;
import com.shuili.common.core.domain.SearchParam; import com.shuili.common.core.domain.SearchParam;
import com.shuili.common.utils.poi.ExcelUtil; import com.shuili.common.utils.poi.ExcelUtil;
@ -12,6 +20,7 @@ import com.kms.common.utils.BaseEntityUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.ParameterResolutionDelegate;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.PutMapping;
@ -46,6 +55,10 @@ public class BsSgcDfHdmtzzController extends BaseController
private BsSgcDfHdmtzzService bsSgcDfHdmtzzService; private BsSgcDfHdmtzzService bsSgcDfHdmtzzService;
@Autowired
private BsSgcDfSafeJbxxService bsSgcDfSafeJbxxService;
/** /**
* 查询横断面特征值列表 * 查询横断面特征值列表
*/ */
@ -53,7 +66,10 @@ public class BsSgcDfHdmtzzController extends BaseController
@ApiOperation("横断面特征值列表") @ApiOperation("横断面特征值列表")
public IPage list(@RequestBody SearchParam<BsSgcDfHdmtzz> sp) public IPage list(@RequestBody SearchParam<BsSgcDfHdmtzz> sp)
{ {
return bsSgcDfHdmtzzService.selectPage(sp); Page<BsSgcDfHdmtzz> page = bsSgcDfHdmtzzService.page(new Page<>(sp.getPageNum(), sp.getPageSize()), Wrappers.lambdaQuery(BsSgcDfHdmtzz.class)
.eq(BsSgcDfHdmtzz::getDikeCode, sp.getData().getDikeCode())
.isNull(BsSgcDfHdmtzz::getExprDate));
return page;
} }
/** /**
@ -99,6 +115,20 @@ public class BsSgcDfHdmtzzController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody BsSgcDfHdmtzz bsSgcDfHdmtzz) public AjaxResult edit(@RequestBody BsSgcDfHdmtzz bsSgcDfHdmtzz)
{ {
String dikeCode = bsSgcDfHdmtzz.getDikeCode();
BsSgcDfSafeJbxx byId = bsSgcDfSafeJbxxService.getOne(Wrappers.lambdaQuery(BsSgcDfSafeJbxx.class)
.eq(BsSgcDfSafeJbxx::getDikeCode, dikeCode));
byId.setStatus("4");
bsSgcDfSafeJbxxService.updateById(byId);
String id = bsSgcDfHdmtzz.getId();
BsSgcDfHdmtzz dfhdm = bsSgcDfHdmtzzService.getById(id);
dfhdm.setExprDate(new Date());
dfhdm.setId(UUID.randomUUID().toString());
bsSgcDfHdmtzzService.save(dfhdm);
bsSgcDfHdmtzz.setEffDate(new Date());
bsSgcDfHdmtzz.setExprDate(null);
return toAjax(bsSgcDfHdmtzzService.updateById(bsSgcDfHdmtzz)); return toAjax(bsSgcDfHdmtzzService.updateById(bsSgcDfHdmtzz));
} }

31
shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfJyjlController.java

@ -1,8 +1,16 @@
package com.kms.yg.df.controller; package com.kms.yg.df.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yg.df.domain.BsSgcDfHdmtzz;
import com.kms.yg.df.domain.BsSgcDfSafeJbxx;
import com.kms.yg.df.domain.BsSgcDfSwtz;
import com.kms.yg.df.service.BsSgcDfSafeJbxxService;
import com.shuili.common.core.controller.BaseController; import com.shuili.common.core.controller.BaseController;
import com.shuili.common.core.domain.SearchParam; import com.shuili.common.core.domain.SearchParam;
import com.shuili.common.utils.poi.ExcelUtil; import com.shuili.common.utils.poi.ExcelUtil;
@ -46,7 +54,8 @@ public class BsSgcDfJyjlController extends BaseController
private BsSgcDfJyjlService bsSgcDfJyjlService; private BsSgcDfJyjlService bsSgcDfJyjlService;
@Autowired
private BsSgcDfSafeJbxxService bsSgcSzSafeJbxxService;
/** /**
* 查询决溢记录列表 * 查询决溢记录列表
*/ */
@ -54,7 +63,11 @@ public class BsSgcDfJyjlController extends BaseController
@ApiOperation("决溢记录列表") @ApiOperation("决溢记录列表")
public IPage list(@RequestBody SearchParam<BsSgcDfJyjl> sp) public IPage list(@RequestBody SearchParam<BsSgcDfJyjl> sp)
{ {
return bsSgcDfJyjlService.selectPage(sp); Page<BsSgcDfJyjl> page = bsSgcDfJyjlService.page(new Page<>(sp.getPageNum(), sp.getPageSize()),
Wrappers.lambdaQuery(BsSgcDfJyjl.class)
.eq(BsSgcDfJyjl::getDikeCode, sp.getData().getDikeCode())
.isNull(BsSgcDfJyjl::getExprDate));
return page;
} }
/** /**
@ -100,6 +113,18 @@ public class BsSgcDfJyjlController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody BsSgcDfJyjl bsSgcDfJyjl) public AjaxResult edit(@RequestBody BsSgcDfJyjl bsSgcDfJyjl)
{ {
String dikeCode = bsSgcDfJyjl.getDikeCode();
BsSgcDfSafeJbxx byId = bsSgcSzSafeJbxxService.getOne(Wrappers.lambdaQuery(BsSgcDfSafeJbxx.class)
.eq(BsSgcDfSafeJbxx::getDikeCode, dikeCode));
byId.setStatus("4");
bsSgcSzSafeJbxxService.updateById(byId);
String id = bsSgcDfJyjl.getId();
BsSgcDfJyjl dfhdm = bsSgcDfJyjlService.getById(id);
dfhdm.setExprDate(new Date());
dfhdm.setId(UUID.randomUUID().toString());
bsSgcDfJyjlService.save(dfhdm);
bsSgcDfJyjl.setEffDate(new Date());
bsSgcDfJyjl.setExprDate(null);
return toAjax(bsSgcDfJyjlService.updateById(bsSgcDfJyjl)); return toAjax(bsSgcDfJyjlService.updateById(bsSgcDfJyjl));
} }

26
shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfSafeJbxxController.java

@ -115,6 +115,7 @@ public class BsSgcDfSafeJbxxController extends BaseController {
.ne(BsSgcDfSafeJbxx::getStatus, "0") .ne(BsSgcDfSafeJbxx::getStatus, "0")
.eq(data.getDikeType() != null, BsSgcDfSafeJbxx::getDikeType, data.getDikeType()) .eq(data.getDikeType() != null, BsSgcDfSafeJbxx::getDikeType, data.getDikeType())
.eq(data.getStatus() != null, BsSgcDfSafeJbxx::getStatus, data.getStatus()) .eq(data.getStatus() != null, BsSgcDfSafeJbxx::getStatus, data.getStatus())
.isNull(BsSgcDfSafeJbxx::getExprDate)
.likeRight(data.getAdcd() != null, BsSgcDfSafeJbxx::getAdcd, sysXzqhService.getSubString(data.getAdcd())) .likeRight(data.getAdcd() != null, BsSgcDfSafeJbxx::getAdcd, sysXzqhService.getSubString(data.getAdcd()))
.orderByDesc(BsSgcDfSafeJbxx::getCreateTime)); .orderByDesc(BsSgcDfSafeJbxx::getCreateTime));
@ -179,7 +180,7 @@ public class BsSgcDfSafeJbxxController extends BaseController {
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody BsSgcDfSafeJbxx bsSgcSzSafeJbxx) { public AjaxResult edit(@RequestBody BsSgcDfSafeJbxx bsSgcSzSafeJbxx) {
// bsSgcSzSafeJbxx.setStatus("4"); // bsSgcSzSafeJbxx.setStatus("4");
if (bsSgcSzSafeJbxx.getStatus().equals("6")) { /*if (bsSgcSzSafeJbxx.getStatus().equals("6")) {
String id = bsSgcSzSafeJbxx.getId(); String id = bsSgcSzSafeJbxx.getId();
BsSgcDfSafeJbxx byId = bsSgcSzSafeJbxxService.getById(id); BsSgcDfSafeJbxx byId = bsSgcSzSafeJbxxService.getById(id);
byId.setExprDate(new Date()); byId.setExprDate(new Date());
@ -187,6 +188,29 @@ public class BsSgcDfSafeJbxxController extends BaseController {
bsSgcSzSafeJbxxService.save(byId); bsSgcSzSafeJbxxService.save(byId);
bsSgcSzSafeJbxx.setEffDate(new Date()); bsSgcSzSafeJbxx.setEffDate(new Date());
bsSgcSzSafeJbxx.setExprDate(null); bsSgcSzSafeJbxx.setExprDate(null);
}*/
if (bsSgcSzSafeJbxx.getStatus().equals("4")) {
String id = bsSgcSzSafeJbxx.getId();
//获取未修改的数据
BsSgcDfSafeJbxx byId = bsSgcSzSafeJbxxService.getById(id);
//将未修改的数据插入数据库
byId.setExprDate(new Date());
byId.setId(UUID.randomUUID().toString());
bsSgcSzSafeJbxxService.save(byId);
//生成新的数据
bsSgcSzSafeJbxx.setEffDate(new Date());
bsSgcSzSafeJbxx.setExprDate(null);
return toAjax(bsSgcSzSafeJbxxService.updateById(bsSgcSzSafeJbxx));
}
if (bsSgcSzSafeJbxx.getStatus().equals("5")) {
List<BsSgcDfSafeJbxx> list = bsSgcSzSafeJbxxService.list(Wrappers.lambdaQuery(BsSgcDfSafeJbxx.class)
.eq(BsSgcDfSafeJbxx::getDikeCode, bsSgcSzSafeJbxx.getDikeCode())
.isNull(BsSgcDfSafeJbxx::getEffDate)
.orderByDesc(BsSgcDfSafeJbxx::getExprDate));
bsSgcSzSafeJbxxService.removeById(bsSgcSzSafeJbxx.getId());
BsSgcDfSafeJbxx bsSgcDfSafeJbxx = list.get(0);
bsSgcDfSafeJbxx.setExprDate(null);
return toAjax(bsSgcSzSafeJbxxService.updateById(bsSgcDfSafeJbxx));
} }
return toAjax(bsSgcSzSafeJbxxService.updateById(bsSgcSzSafeJbxx)); return toAjax(bsSgcSzSafeJbxxService.updateById(bsSgcSzSafeJbxx));
} }

18
shuili-system/src/main/java/com/kms/yg/df/controller/BsSgcDfSwtzController.java

@ -1,11 +1,16 @@
package com.kms.yg.df.controller; package com.kms.yg.df.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.system.service.SysDeptService; import com.kms.system.service.SysDeptService;
import com.kms.system.service.SysXzqhService; import com.kms.system.service.SysXzqhService;
import com.kms.yg.df.domain.BsSgcDfHdmtzz;
import com.kms.yg.df.domain.BsSgcDfJyjl;
import com.kms.yg.df.domain.BsSgcDfSafeJbxx; import com.kms.yg.df.domain.BsSgcDfSafeJbxx;
import com.kms.yg.df.domain.BsSgcDfSwtz; import com.kms.yg.df.domain.BsSgcDfSwtz;
import com.kms.yg.df.service.BsSgcDfSafeJbxxService; import com.kms.yg.df.service.BsSgcDfSafeJbxxService;
@ -71,7 +76,11 @@ public class BsSgcDfSwtzController extends BaseController
@ApiOperation("水文特征列表") @ApiOperation("水文特征列表")
public IPage list(@RequestBody SearchParam<BsSgcDfSwtz> sp) public IPage list(@RequestBody SearchParam<BsSgcDfSwtz> sp)
{ {
return bsSgcSzSwtzService.selectPage(sp); Page<BsSgcDfSwtz> page = bsSgcSzSwtzService.page(new Page<>(sp.getPageNum(), sp.getPageSize()),
Wrappers.lambdaQuery(BsSgcDfSwtz.class)
.eq(BsSgcDfSwtz::getDikeCode, sp.getData().getDikeCode())
.isNull(BsSgcDfSwtz::getExprDate));
return page;
} }
/** /**
@ -127,6 +136,13 @@ public class BsSgcDfSwtzController extends BaseController
.eq(BsSgcDfSafeJbxx::getDikeCode, dikeCode)); .eq(BsSgcDfSafeJbxx::getDikeCode, dikeCode));
byId.setStatus("4"); byId.setStatus("4");
bsSgcSzSafeJbxxService.updateById(byId); bsSgcSzSafeJbxxService.updateById(byId);
String id = bsSgcSzSwtz.getId();
BsSgcDfSwtz dfhdm = bsSgcSzSwtzService.getById(id);
dfhdm.setExprDate(new Date());
dfhdm.setId(UUID.randomUUID().toString());
bsSgcSzSwtzService.save(dfhdm);
bsSgcSzSwtz.setEffDate(new Date());
bsSgcSzSwtz.setExprDate(null);
return toAjax(bsSgcSzSwtzService.updateById(bsSgcSzSwtz)); return toAjax(bsSgcSzSwtzService.updateById(bsSgcSzSwtz));
} }

12
shuili-system/src/main/java/com/kms/yg/df/domain/BsSgcDfSwtz.java

@ -206,4 +206,16 @@ public class BsSgcDfSwtz extends BaseEntity
@ApiModelProperty("历史最大洪峰流量日期") @ApiModelProperty("历史最大洪峰流量日期")
private Date highestWaterFlowTime; private Date highestWaterFlowTime;
/** 记录生效时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "记录生效时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("记录生效时间")
private Date effDate;
/** 记录失效时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "记录失效时间", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty("记录失效时间")
private Date exprDate;
} }

Loading…
Cancel
Save