|
|
|
@ -3,6 +3,7 @@ package com.hxhq.business.controller; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.hxhq.common.security.annotation.Logical; |
|
|
|
import com.hxhq.common.security.annotation.RequiresPermissions; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@ -56,6 +57,14 @@ public class StepController extends BaseController |
|
|
|
@RequiresPermissions("business:step:list") |
|
|
|
public AjaxResult save(@RequestBody Step step) |
|
|
|
{ |
|
|
|
QueryWrapper<Step> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.eq("sn",step.getSn()); |
|
|
|
if(step.getId()!=null){ |
|
|
|
queryWrapper.ne("id",step.getId()); |
|
|
|
} |
|
|
|
if(stepService.count(queryWrapper)>0){ |
|
|
|
return AjaxResult.error("编号已存在"); |
|
|
|
} |
|
|
|
return toAjax(stepService.saveOrUpdate(step)); |
|
|
|
} |
|
|
|
|
|
|
|
|