fix(service): 修改方案点位新增接口返回值类型
- 将IWmsProcessPlanService中的insertByBo方法返回值从Boolean改为Long - 更新WmsProcessPlanController中add方法返回R<Long>并返回新增记录ID - 修改WmsProcessPlanServiceImpl中insertByBo方法实现返回新增记录的planId
This commit is contained in:
@@ -56,8 +56,8 @@ public class WmsProcessPlanController extends BaseController {
|
|||||||
@Log(title = "方案点位", businessType = BusinessType.INSERT)
|
@Log(title = "方案点位", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsProcessPlanBo bo) {
|
public R<Long> add(@Validated(AddGroup.class) @RequestBody WmsProcessPlanBo bo) {
|
||||||
return toAjax(wmsProcessPlanService.insertByBo(bo));
|
return R.ok(wmsProcessPlanService.insertByBo(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log(title = "方案点位", businessType = BusinessType.UPDATE)
|
@Log(title = "方案点位", businessType = BusinessType.UPDATE)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public interface IWmsProcessPlanService {
|
|||||||
|
|
||||||
List<WmsProcessPlanVo> queryList(WmsProcessPlanBo bo);
|
List<WmsProcessPlanVo> queryList(WmsProcessPlanBo bo);
|
||||||
|
|
||||||
Boolean insertByBo(WmsProcessPlanBo bo);
|
Long insertByBo(WmsProcessPlanBo bo);
|
||||||
|
|
||||||
Boolean updateByBo(WmsProcessPlanBo bo);
|
Boolean updateByBo(WmsProcessPlanBo bo);
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class WmsProcessPlanServiceImpl implements IWmsProcessPlanService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean insertByBo(WmsProcessPlanBo bo) {
|
public Long insertByBo(WmsProcessPlanBo bo) {
|
||||||
WmsProcessSpecVersion ver = wmsProcessSpecVersionMapper.selectById(bo.getVersionId());
|
WmsProcessSpecVersion ver = wmsProcessSpecVersionMapper.selectById(bo.getVersionId());
|
||||||
if (ver == null) {
|
if (ver == null) {
|
||||||
throw new ServiceException("规程版本不存在");
|
throw new ServiceException("规程版本不存在");
|
||||||
@@ -78,7 +78,7 @@ public class WmsProcessPlanServiceImpl implements IWmsProcessPlanService {
|
|||||||
if (flag) {
|
if (flag) {
|
||||||
bo.setPlanId(add.getPlanId());
|
bo.setPlanId(add.getPlanId());
|
||||||
}
|
}
|
||||||
return flag;
|
return add.getPlanId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user