|
|
|
@ -304,7 +304,12 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint, |
|
|
|
|
// @RequiresPermissions("annualCompPoint:annual_comp_point:edit")
|
|
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
|
|
|
|
public Result<String> 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<AnnualCompPoint, |
|
|
|
|
// @RequiresPermissions("annualCompPoint:annual_comp_point:delete")
|
|
|
|
|
@DeleteMapping(value = "/delete") |
|
|
|
|
public Result<String> 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("删除成功!"); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|