| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.MaterialCodeDictionary; |
| | | import com.whyc.service.MaterialCodeDictionaryService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.LinkedList; |
| | |
| | | @Autowired |
| | | private MaterialCodeDictionaryService service; |
| | | |
| | | @GetMapping("codeList") |
| | | @ApiOperation(value = "查询编码列表分页",notes = "level:0(查询所有),1(一级编码),2(二级编码)") |
| | | public Response<PageInfo<MaterialCodeDictionary>> getCodeList(@RequestParam int pageNum,@RequestParam int pageSize,@RequestParam int level){ |
| | | PageInfo<MaterialCodeDictionary> codeList = service.getCodeList(pageNum, pageSize, level); |
| | | return new Response<PageInfo<MaterialCodeDictionary>>().set(1,codeList); |
| | | } |
| | | |
| | | //解析导入数据,只使用一次 |
| | | @Deprecated |
| | | @GetMapping("importData") |