| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.base.entity.LineSideWarehouse; |
| | | import org.jeecg.modules.base.entity.Supplier; |
| | | import org.jeecg.modules.base.service.ILineSideWarehouseService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | //@RequiresPermissions("org.jeecg.modules:base_line_side_warehouse:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody LineSideWarehouse lineSideWarehouse) { |
| | | lineSideWarehouse.setWarehouseStatus(CommonConstant.STATUS_1); |
| | | lineSideWarehouseService.save(lineSideWarehouse); |
| | | return Result.OK("添加成功!"); |
| | | } |
| | |
| | | return super.importExcel(request, response, LineSideWarehouse.class); |
| | | } |
| | | |
| | | @AutoLog(value = "线边库-启用&禁用") |
| | | @ApiOperation(value = "线边库-启用&禁用", notes = "线边库-启用&禁用") |
| | | @PutMapping(value = "/active") |
| | | public Result<?> active(@RequestParam(name = "id", required = true) String id) { |
| | | LineSideWarehouse lineSideWarehouse = lineSideWarehouseService.getById(id); |
| | | if (CommonConstant.STATUS_1.equals(lineSideWarehouse.getWarehouseStatus())) { |
| | | lineSideWarehouse.setWarehouseStatus(CommonConstant.STATUS_0); |
| | | } else { |
| | | lineSideWarehouse.setWarehouseStatus(CommonConstant.STATUS_1); |
| | | } |
| | | lineSideWarehouseService.updateById(lineSideWarehouse); |
| | | return Result.ok("操作成功!"); |
| | | } |
| | | |
| | | } |