|
|
@ -1,8 +1,16 @@ |
|
|
|
package com.kms.yg.df.controller; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Date; |
|
|
|
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.domain.SearchParam; |
|
|
|
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.ApiOperation; |
|
|
|
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.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.PutMapping; |
|
|
@ -46,6 +55,10 @@ public class BsSgcDfHdmtzzController extends BaseController |
|
|
|
private BsSgcDfHdmtzzService bsSgcDfHdmtzzService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private BsSgcDfSafeJbxxService bsSgcDfSafeJbxxService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 查询横断面特征值列表 |
|
|
|
*/ |
|
|
@ -53,7 +66,10 @@ public class BsSgcDfHdmtzzController extends BaseController |
|
|
|
@ApiOperation("横断面特征值列表") |
|
|
|
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 |
|
|
|
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)); |
|
|
|
} |
|
|
|
|
|
|
|