| | |
| | | |
| | | import cn.gistack.sm.sjztdw.excel.DbExcel; |
| | | import cn.gistack.sm.sjztdw.excel.DbExcelImport; |
| | | import cn.gistack.sm.sjztdw.service.IDbPersonReportService; |
| | | import cn.gistack.sm.sjztdw.service.IDwsResFormDiService; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import cn.gistack.sm.sjztdw.vo.ListVO; |
| | | import io.undertow.websockets.jsr.annotated.DecoderUtils; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Base64; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | public class DbPersonReportController extends BladeController { |
| | | |
| | | private IDbPersonReportService dbPersonReportService; |
| | | private IDwsResFormDiService dbPersonReportService; |
| | | |
| | | /** |
| | | * 导入模板 |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("import-data") |
| | | public R importData(MultipartFile file,String resGuid,String ch) { |
| | | public R importData(MultipartFile file,String resGuid,@RequestParam("ch") String ch) { |
| | | |
| | | DbExcelImport dbExcelImport = new DbExcelImport(dbPersonReportService,resGuid,ch); |
| | | ExcelUtil.save(file, dbExcelImport, DbExcel.class); |
| | | return R.success("操作成功"); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody DbExcelVO dbExcel){ |
| | | Boolean b = dbPersonReportService.update(dbExcel); |
| | | return R.status(b); |
| | | } |
| | | |
| | | @PostMapping("/remove") |
| | | public R remove(@RequestBody DbExcelVO dbExcelVO){ |
| | | Boolean b = dbPersonReportService.remove(dbExcelVO); |
| | | return R.status(b); |
| | | } |
| | | |
| | | @PostMapping("/removeBatch") |
| | | public R removeBatch(@RequestBody ListVO list){ |
| | | Boolean b = dbPersonReportService.removeBatch(list.getList()); |
| | | return R.status(b); |
| | | } |
| | | |
| | | |
| | | |
| | | |