diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java index 9c5444f6..1c33d0e2 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java @@ -304,7 +304,12 @@ public class AnnualCompPointController extends JeecgController edit(@RequestBody AnnualCompPoint annualCompPoint) { - boolean isUpdate = annualCompPointService.updateById(annualCompPoint); + boolean isUpdate ; + if(annualCompPoint.getAnnualCompState().equals("0") && annualCompPoint.getAnnualCompState().equals("4") ){ + isUpdate = annualCompPointService.updateById(annualCompPoint); + } else { + return Result.error("当前状态不可修改"); + } if (!isUpdate){ return Result.error("编辑失败!"); } @@ -322,7 +327,13 @@ public class AnnualCompPointController extends JeecgController delete(@RequestParam(name = "id", required = true) String id) { - annualCompPointService.removeById(id); + AnnualCompPoint annualCompPoint =annualCompPointService.getById(id); + if(annualCompPoint.getAnnualCompState().equals("0") && annualCompPoint.getAnnualCompState().equals("4") ) { + System.out.println(id); + annualCompPointService.removeById(id); + }else { + return Result.error("当前状态不可删除"); + } return Result.OK("删除成功!"); } /**