| | |
| | | productProcessMapper.updateById(productProcess); |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | if(CollectionUtils.isEmpty(productProcessList)){ |
| | | return AjaxResult.warn("模板错误或导入数据为空"); |
| | | } |
| | | productProcessList.forEach(productProcess -> { |
| | | if (ObjectUtils.isEmpty(productProcess)) { |
| | | throw new RuntimeException("使用模板进行导入"); |
| | | } |
| | | if (ObjectUtils.isEmpty(productProcess.getName())) { |
| | | throw new RuntimeException("工序名称不能为空"); |
| | | } |
| | | }); |
| | | this.saveOrUpdateBatch(productProcessList); |
| | | return AjaxResult.success(true); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return AjaxResult.error("导入失败"); |
| | | return AjaxResult.error(e.getMessage()); |
| | | } |
| | | } |
| | | |