1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package com.jsh.erp.controller;
- import com.jsh.erp.base.AjaxResult;
- import com.jsh.erp.datasource.dto.MaterialDTO;
- import com.jsh.erp.datasource.dto.MaterialInputDto;
- import com.jsh.erp.service.MaterialInputService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.web.bind.annotation.*;
- import javax.annotation.Resource;
- import javax.servlet.http.HttpServletRequest;
- @RestController
- @RequestMapping(value = "/materialInput")
- @Api(tags = {"商品录入管理"})
- public class MaterialInputController {
- @Resource
- private MaterialInputService materialInputService;
- /**
- * 查询任务详情
- * @param number
- * @return
- */
- @ApiOperation("商品录入详情")
- @GetMapping("/detail/{number}")
- public AjaxResult detailByNumber(@PathVariable("number") String number) {
- return AjaxResult.success(materialInputService.getDetailByNumber(number));
- }
- @PostMapping(value = "/update")
- @ApiOperation(value = "修改货物录入信息")
- public AjaxResult updateResource(@RequestBody MaterialInputDto materialInputDto) {
- boolean b = materialInputService.updateMaterialInput(materialInputDto);
- if (!b){
- return AjaxResult.error("修改货物录入信息失败");
- }
- return AjaxResult.success();
- }
- }
|