Commit bb126eeb by zhangkb

修改指标删除接口为批量删除

parent 3727d0ea
...@@ -62,8 +62,8 @@ public class IndicatorsDefCtrl { ...@@ -62,8 +62,8 @@ public class IndicatorsDefCtrl {
@ApiOperation(value = "删除基础指标", notes = "删除基础指标") @ApiOperation(value = "删除基础指标", notes = "删除基础指标")
@PostMapping(value = "/deleteBaseInd") @PostMapping(value = "/deleteBaseInd")
public void deleteBaseInd(@RequestParam String indId) throws Exception{ public void deleteBaseInd(@RequestParam List<String> indIds) throws Exception{
baseIndDefService.delete(indId); baseIndDefService.delete(indIds);
} }
@ApiOperation(value = "根据id查询基础指标详情", notes = "根据id查询基础指标详情") @ApiOperation(value = "根据id查询基础指标详情", notes = "根据id查询基础指标详情")
...@@ -106,8 +106,8 @@ public class IndicatorsDefCtrl { ...@@ -106,8 +106,8 @@ public class IndicatorsDefCtrl {
@ApiOperation(value = "删除考核指标", notes = "删除考核指标") @ApiOperation(value = "删除考核指标", notes = "删除考核指标")
@PostMapping(value = "/deleteDriveInd") @PostMapping(value = "/deleteDriveInd")
public void deleteDriveInd(@RequestParam String indId) throws Exception{ public void deleteDriveInd(@RequestParam List<String> indIds) throws Exception{
driveIndDefService.delete(indId); driveIndDefService.delete(indIds);
} }
@ApiOperation(value = "根据考核指标id获取指标详情", notes = "根据考核指标id获取指标详情") @ApiOperation(value = "根据考核指标id获取指标详情", notes = "根据考核指标id获取指标详情")
......
...@@ -73,9 +73,11 @@ public class BaseIndDefService { ...@@ -73,9 +73,11 @@ public class BaseIndDefService {
return baseIndDefMapper.selectOne(baseIndDef); return baseIndDefMapper.selectOne(baseIndDef);
} }
public void delete(String indId) throws Exception{ public void delete(List<String> indIds) throws Exception{
baseIndDefMapper.deleteByPrimaryKey(indId); for(String indId : indIds) {
baseIndDefVersionService.updateIsDeleteStatus(indId, "1");//标识已删除 baseIndDefMapper.deleteByPrimaryKey(indId);
baseIndDefVersionService.updateIsDeleteStatus(indId, "1");//标识已删除
}
} }
public Map<String,Object> getByPageAndKeyword(Integer catalogId,String keyword, public Map<String,Object> getByPageAndKeyword(Integer catalogId,String keyword,
......
...@@ -135,9 +135,11 @@ public class DriveIndDefService { ...@@ -135,9 +135,11 @@ public class DriveIndDefService {
return result; return result;
} }
public void delete(String indId) throws Exception{ public void delete(List<String> indIds) throws Exception{
driveIndDefMapper.deleteByPrimaryKey(indId); for(String indId : indIds) {
driveIndDefVersionService.updateIsDeleteStatus(indId, "1");//标识已删除 driveIndDefMapper.deleteByPrimaryKey(indId);
driveIndDefVersionService.updateIsDeleteStatus(indId, "1");//标识已删除
}
} }
public Map<String,Object> getByPageAndKeyword(Integer catalogId,String keyword, public Map<String,Object> getByPageAndKeyword(Integer catalogId,String keyword,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment