Commit 03ebd90f by zhangkb

修改考核指标新增修改接口bug

parent bbf353e0
......@@ -98,10 +98,10 @@ public class IndicatorsDefCtrl {
@ApiOperation(value = "新建考核指标(isUpdate:0 新增 1修改)", notes = "新建考核指标(isUpdate:0 新增 1修改)")
@PostMapping(value = "/createDriveInd")
public void createDriveInd(@RequestBody DriveIndDef driveIndDef,@RequestParam String code,@RequestParam Integer catalogId,
public String createDriveInd(@RequestBody DriveIndDef driveIndDef,@RequestParam String code,@RequestParam Integer catalogId,
@RequestParam String catalogIdPath,@RequestParam String user,@RequestParam String isUpdate,
@RequestParam(required=false) String shortboardIds) throws Exception{
driveIndDefService.saveOrUpdate(driveIndDef, code, catalogId, catalogIdPath, user, isUpdate, shortboardIds);
return driveIndDefService.saveOrUpdate(driveIndDef, code, catalogId, catalogIdPath, user, isUpdate, shortboardIds);
}
@ApiOperation(value = "删除考核指标", notes = "删除考核指标")
......
......@@ -45,7 +45,7 @@ public class DriveIndDefService {
}
if("0".equals(isUpdate)) {//新建
DriveIndDef dbDriveIndDef = this.getById(driveIndDef.getIndId());
if(dbDriveIndDef==null) {
if(dbDriveIndDef!=null) {
return "indId is exist,create drive indicators fail";
}else {
driveIndDef.setCreater(user);
......
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