| | |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Matnr, BaseParam> pageParam = new PageParam<>(baseParam, Matnr.class); |
| | | return R.ok().add( matnrService.getMatnrPage(pageParam)); |
| | | return R.ok().add(matnrService.getMatnrPage(pageParam)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:matnr:list')") |
| | |
| | | if (Objects.isNull(matnr)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | if (Objects.isNull(matnr.get("matnr"))) { |
| | | if (Objects.isNull(matnr.get("name"))) { |
| | | throw new CoolException("名称不能为空!!"); |
| | | } |
| | | if (Objects.isNull(matnr.get("groupId"))) { |
| | |
| | | if (!matnrService.updateById(matnr)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | if (!Objects.isNull(params.get("fieldsIndex"))) { |
| | | if (!FieldsUtils.getFieldsSta().isEmpty()) { |
| | | FieldsUtils.updateFieldsValue(params); |
| | | } |
| | | |
| | | return R.ok("Update Success").add(matnr); |
| | | } |
| | | |