关键零部件型号库编辑与新增修改
This commit is contained in:
+4
-6
@@ -115,9 +115,8 @@ public class ProcessPartTypeApplyRecordController {
|
|||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
// @RequiresPermissions("keyPartBindingManage:add")
|
// @RequiresPermissions("keyPartBindingManage:add")
|
||||||
public Result<T> add(@RequestBody ProcessPartTypeApplyRecord processPartTypeApplyRecord) {
|
public Result<ProcessPartTypeApplyRecord> add(@RequestBody ProcessPartTypeApplyRecord processPartTypeApplyRecord) {
|
||||||
String id = processPartTypeApplyRecordService.add(processPartTypeApplyRecord);
|
return Result.OK(processPartTypeApplyRecordService.add(processPartTypeApplyRecord));
|
||||||
return Result.OK(id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -131,9 +130,8 @@ public class ProcessPartTypeApplyRecordController {
|
|||||||
@ApiOperationSupport(order = 6)
|
@ApiOperationSupport(order = 6)
|
||||||
@PostMapping(value = "/edit")
|
@PostMapping(value = "/edit")
|
||||||
// @RequiresPermissions("keyPartBindingManage:import")
|
// @RequiresPermissions("keyPartBindingManage:import")
|
||||||
public Result<T> edit(@Validated @RequestBody ProcessPartTypeApplyRecord processPartTypeApplyRecord) {
|
public Result<ProcessPartTypeApplyRecord> edit(@Validated @RequestBody ProcessPartTypeApplyRecord processPartTypeApplyRecord) {
|
||||||
this.processPartTypeApplyRecordService.edit(processPartTypeApplyRecord);
|
return Result.OK(this.processPartTypeApplyRecordService.edit(processPartTypeApplyRecord));
|
||||||
return Result.OK(ResultCommon.OK);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 确认生成
|
* 确认生成
|
||||||
|
|||||||
+2
-2
@@ -21,9 +21,9 @@ public interface IProcessPartTypeApplyRecordService extends IService<ProcessPart
|
|||||||
|
|
||||||
void deleteByIds(List<String> ids);
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
String add(ProcessPartTypeApplyRecord processPartTypeApplyRecord);
|
ProcessPartTypeApplyRecord add(ProcessPartTypeApplyRecord processPartTypeApplyRecord);
|
||||||
|
|
||||||
void edit(ProcessPartTypeApplyRecord processPartTypeApplyRecord);
|
ProcessPartTypeApplyRecord edit(ProcessPartTypeApplyRecord processPartTypeApplyRecord);
|
||||||
|
|
||||||
String affirmGenerate(ProcessPartTypeApplyRecord processPartTypeApplyRecord);
|
String affirmGenerate(ProcessPartTypeApplyRecord processPartTypeApplyRecord);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -94,13 +94,13 @@ public class ProcessPartTypeApplyRecordServiceImpl extends ServiceImpl<ProcessPa
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String add(ProcessPartTypeApplyRecord processPartTypeApplyRecord) {
|
public ProcessPartTypeApplyRecord add(ProcessPartTypeApplyRecord processPartTypeApplyRecord) {
|
||||||
save(processPartTypeApplyRecord);
|
save(processPartTypeApplyRecord);
|
||||||
return processPartTypeApplyRecord.getId();
|
return processPartTypeApplyRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void edit(ProcessPartTypeApplyRecord processPartTypeApplyRecord) {
|
public ProcessPartTypeApplyRecord edit(ProcessPartTypeApplyRecord processPartTypeApplyRecord) {
|
||||||
ProcessPartTypeApplyRecord processPartTypeApplyRecordOld = getById(processPartTypeApplyRecord.getId());
|
ProcessPartTypeApplyRecord processPartTypeApplyRecordOld = getById(processPartTypeApplyRecord.getId());
|
||||||
if(Objects.isNull(processPartTypeApplyRecordOld)){
|
if(Objects.isNull(processPartTypeApplyRecordOld)){
|
||||||
throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
||||||
@@ -110,6 +110,7 @@ public class ProcessPartTypeApplyRecordServiceImpl extends ServiceImpl<ProcessPa
|
|||||||
throw new JeroBootException(ResultCommon.NO_PERMISSION);
|
throw new JeroBootException(ResultCommon.NO_PERMISSION);
|
||||||
}
|
}
|
||||||
updateById(processPartTypeApplyRecord);
|
updateById(processPartTypeApplyRecord);
|
||||||
|
return processPartTypeApplyRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user