package cn.com.goldenwater.dcproj.controller.importex; import cn.com.goldenwater.core.web.BaseController; import cn.com.goldenwater.core.web.BaseResponse; import cn.com.goldenwater.dcproj.service.ImpXJFlkdisInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import static cn.com.goldenwater.core.web.BaseController.buildSuccessResponse; @Api(value = "IMP 河湖四乱基础信息", tags = "IMP 河湖四乱基础信息") @RestController @RequestMapping("/imp/flkdis/info") public class ImpFLKDISInfoController extends BaseController { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private ImpXJFlkdisInfoService impFlkdisInfoService; @ApiOperation(value = "插入新疆百日攻坚河湖四乱问题数据") @RequestMapping(value = "insertFlkdisList", method = RequestMethod.POST) public BaseResponse insertFlkdisList(@RequestParam("file") MultipartFile file) { try { String persId = getCurrentPersId(); impFlkdisInfoService.insertFlkdisList(file,persId); }catch (Exception e){ e.printStackTrace(); } return buildSuccessResponse("执行结束!!!"); } @ApiOperation(value = "插入新疆百日攻坚河湖四乱问题数据") @RequestMapping(value = "insertFlkdisListTest", method = RequestMethod.GET) public BaseResponse insertFlkdisListTest(@RequestParam("filepath") String filepath) { try { String persId = getCurrentPersId(); impFlkdisInfoService.insertFlkdisListTest(filepath,persId); }catch (Exception e){ e.printStackTrace(); } return buildSuccessResponse("执行结束!!!"); } @ApiOperation(value = "批量处理新疆水库名录") @RequestMapping(value = "importFjRsList", method = RequestMethod.POST) public BaseResponse importFjRsList(@ApiParam(name = "filePath", value = "路径", required = true) @RequestParam String filePath) { // try { // ImpRsExcel impRsExcel = new ImpRsExcel(); // impRsExcel.doImportExcel(filePath,1,0,true, HashMap.class, "", "sk",attAdXBaseDao,attRsBaseFjDao,attRsBaseService,attRsBaseDao); // }catch (Exception e){ // e.printStackTrace(); // } return buildSuccessResponse("执行结束!!!"); } }