|
@@ -176,20 +176,23 @@ public class BilletHotsendChangeShiftController extends JeecgController<BilletHo
|
|
|
|
|
|
@ApiOperation(value="钢坯交班记录-编辑钢坯原始记录定尺和备注", notes="钢坯交班记录-编辑钢坯原始记录定尺和备注")
|
|
|
@RequestMapping(value = "/editOriginalProductRecord", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
|
- public Result<String> editOriginalProductRecord(@RequestParam(name="id", required = true) String id,
|
|
|
- @RequestParam(name="sizeInfo", required = false) String sizeInfo,
|
|
|
- @RequestParam(name="content", required = false) String content) {
|
|
|
- BilletHotsendChangeShift billetHotsendChangeShift = billetHotsendChangeShiftService.getById(id);
|
|
|
- if(billetHotsendChangeShift==null) {
|
|
|
- return Result.error("未找到对应数据");
|
|
|
+ public Result<String> editOriginalProductRecord(@RequestBody BilletHotsendChangeShift billetHotsendChangeShift) {
|
|
|
+
|
|
|
+ if (oConvertUtils.isEmpty(billetHotsendChangeShift.getId())){
|
|
|
+ return Result.error("交班ID不能为空,编辑失败!");
|
|
|
}
|
|
|
- if (sizeInfo != null && !sizeInfo.isEmpty()){
|
|
|
- billetHotsendChangeShift.setSizeInfo(sizeInfo);
|
|
|
+
|
|
|
+ BilletHotsendChangeShift billetHotsendChangeShiftInfo = billetHotsendChangeShiftService.getById(billetHotsendChangeShift.getId());
|
|
|
+ if(billetHotsendChangeShiftInfo == null) {
|
|
|
+ return Result.error("未找到对应数据!");
|
|
|
}
|
|
|
- if (content != null && !content.isEmpty()){
|
|
|
- billetHotsendChangeShift.setContent(content);
|
|
|
+ if (oConvertUtils.isNotEmpty(billetHotsendChangeShift.getSizeInfo())){
|
|
|
+ billetHotsendChangeShiftInfo.setSizeInfo(billetHotsendChangeShift.getSizeInfo());
|
|
|
}
|
|
|
- billetHotsendChangeShiftService.updateById(billetHotsendChangeShift);
|
|
|
+ if (oConvertUtils.isNotEmpty(billetHotsendChangeShift.getContent())){
|
|
|
+ billetHotsendChangeShiftInfo.setContent(billetHotsendChangeShift.getContent());
|
|
|
+ }
|
|
|
+ billetHotsendChangeShiftService.updateById(billetHotsendChangeShiftInfo);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
|
|