|
|
@ -5,7 +5,12 @@ 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.sz.domain.BsSgcSzCxjl; |
|
|
|
import com.kms.yg.sz.domain.BsSgcSzGctx; |
|
|
|
import com.kms.yg.sz.domain.BsSgcSzSafeJbxx; |
|
|
|
import com.kms.yg.sz.service.BsSgcSzSafeJbxxService; |
|
|
|
import com.shuili.common.core.controller.BaseController; |
|
|
|
import com.shuili.common.core.domain.SearchParam; |
|
|
|
import com.shuili.common.utils.poi.ExcelUtil; |
|
|
@ -49,6 +54,10 @@ public class BsSgcSzGcjgController extends BaseController |
|
|
|
private BsSgcSzGcjgService bsSgcSzGcjgService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private BsSgcSzSafeJbxxService bsSgcSzSafeJbxxService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 查询工程结构列表 |
|
|
|
*/ |
|
|
@ -56,7 +65,11 @@ public class BsSgcSzGcjgController extends BaseController |
|
|
|
@ApiOperation("工程结构列表") |
|
|
|
public IPage list(@RequestBody SearchParam<BsSgcSzGcjg> sp) |
|
|
|
{ |
|
|
|
return bsSgcSzGcjgService.selectPage(sp); |
|
|
|
Page<BsSgcSzGcjg> page = bsSgcSzGcjgService.page(new Page<>(sp.getPageNum(), sp.getPageSize()), |
|
|
|
Wrappers.lambdaQuery(BsSgcSzGcjg.class) |
|
|
|
.eq(BsSgcSzGcjg::getWagaCode, sp.getData().getWagaCode()) |
|
|
|
.isNull(BsSgcSzGcjg::getExprDate)); |
|
|
|
return page; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -103,11 +116,16 @@ public class BsSgcSzGcjgController extends BaseController |
|
|
|
public AjaxResult edit(@RequestBody BsSgcSzGcjg bsSgcSzGcjg) |
|
|
|
{ |
|
|
|
|
|
|
|
String wagaCode = bsSgcSzGcjg.getWagaCode(); |
|
|
|
BsSgcSzSafeJbxx byId = bsSgcSzSafeJbxxService.getOne(Wrappers.lambdaQuery(BsSgcSzSafeJbxx.class) |
|
|
|
.eq(BsSgcSzSafeJbxx::getWagaCode, wagaCode)); |
|
|
|
byId.setStatus("4"); |
|
|
|
bsSgcSzSafeJbxxService.updateById(byId); |
|
|
|
String id = bsSgcSzGcjg.getId(); |
|
|
|
BsSgcSzGcjg byId = bsSgcSzGcjgService.getById(id); |
|
|
|
byId.setExprDate(new Date()); |
|
|
|
byId.setId(UUID.randomUUID().toString()); |
|
|
|
bsSgcSzGcjgService.save(byId); |
|
|
|
BsSgcSzGcjg dfhdm = bsSgcSzGcjgService.getById(id); |
|
|
|
dfhdm.setExprDate(new Date()); |
|
|
|
dfhdm.setId(UUID.randomUUID().toString()); |
|
|
|
bsSgcSzGcjgService.save(dfhdm); |
|
|
|
bsSgcSzGcjg.setEffDate(new Date()); |
|
|
|
bsSgcSzGcjg.setExprDate(null); |
|
|
|
return toAjax(bsSgcSzGcjgService.updateById(bsSgcSzGcjg)); |
|
|
|