| | |
| | | import com.yuanchu.mom.service.StandardProductListService; |
| | | import com.yuanchu.mom.service.StandardTreeService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | |
| | | @GetMapping("/selectStandardTreeList") |
| | | public Result selectStandardTreeList() { |
| | | return Result.success(standardTreeService.selectStandardTreeList()); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "获取标准树(检验下单)") |
| | | @GetMapping("/selectStandardTreeList2") |
| | | public Result selectStandardTreeList2() { |
| | | return Result.success(standardTreeService.selectStandardTreeList2()); |
| | | } |
| | | |
| | | @ValueClassify("标准库") |
| | |
| | | |
| | | @ValueClassify("标准库") |
| | | @ApiOperation("导入标准库") |
| | | @PostMapping("/inExcelOfTree") |
| | | public Result inExcelOfTree(@RequestParam("file") MultipartFile file) { |
| | | standardTreeService.inExcelOfTree(file); |
| | | @PostMapping("/inExcelOfTree/{isEquipment}") |
| | | public Result inExcelOfTree(@RequestParam("file") MultipartFile file, @PathVariable("isEquipment") Boolean isEquipment) { |
| | | if (!isEquipment) { |
| | | standardTreeService.inExcelOfTree(file); |
| | | } else { |
| | | standardTreeService.importWorkstationExcel(file); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("标准库") |
| | | @ApiOperation("导出标准库") |
| | | @GetMapping("/exportStandTree") |
| | | public void exportStandTree(HttpServletResponse response) throws IOException { |
| | | standardTreeService.exportStandTree(response); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation("重置标准库单价") |
| | | @PostMapping("/resetTreeOfPrice") |