| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.yuanchu.mom.service.ConsignmentService; |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "新增成品发货") |
| | | @PostMapping("/addCon") |
| | | public Result addCon(@RequestHeader("token") String token, @RequestBody ConsignmentDto consignmentDto) throws Exception { |
| | | public Result addCon(@RequestHeader("token") String token, @Validated @RequestBody ConsignmentDto consignmentDto) throws Exception { |
| | | Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class); |
| | | return Result.success(consignmentService.addCon(data.get("name").replaceAll("\"", ""), consignmentDto)); |
| | | } |