| | |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @Api(tags = "逻辑分区") |
| | |
| | | @OperationLog("Create loc areas mats") |
| | | @PostMapping("/locAreaMat/save") |
| | | public R save(@RequestBody LocAreaMat locAreaMat) { |
| | | if (Objects.isNull(locAreaMat.getWarehouseId())) { |
| | | return R.error("仓库不能为空!!"); |
| | | } |
| | | if (Objects.isNull(locAreaMat.getAreaId())) { |
| | | return R.error("库区不能为空!!"); |
| | | } |
| | | locAreaMat.setCreateBy(getLoginUserId()); |
| | | locAreaMat.setCreateTime(new Date()); |
| | | locAreaMat.setUpdateBy(getLoginUserId()); |
| | | locAreaMat.setUpdateTime(new Date()); |
| | | if (!locAreaMatService.save(locAreaMat)) { |
| | | return R.error("Save Fail"); |
| | | } |