| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | |
| | | @OperationLog("Create loc type") |
| | | @PostMapping("/locType/save") |
| | | public R save(@RequestBody LocType locType) { |
| | | if (Objects.isNull(locType.getName())) { |
| | | throw new CoolException("库位类型不能为空!!"); |
| | | } |
| | | if (Objects.isNull(locType.getRegex())) { |
| | | throw new CoolException("库位规则表达式不能为空!!"); |
| | | } |
| | | locType.setCreateBy(getLoginUserId()); |
| | | locType.setCreateTime(new Date()); |
| | | locType.setUpdateBy(getLoginUserId()); |
| | | locType.setUpdateTime(new Date()); |
| | | if (!locTypeService.save(locType)) { |
| | | return R.error("Save Fail"); |
| | | } |