|
|
@@ -0,0 +1,97 @@
|
|
|
+package com.xunmei.core.resumption.controller;
|
|
|
+
|
|
|
+import com.xunmei.common.core.vo.IdNameVo;
|
|
|
+import com.xunmei.common.core.web.controller.BaseController;
|
|
|
+import com.xunmei.common.core.web.domain.AjaxResult;
|
|
|
+import com.xunmei.common.core.web.page.TableDataInfo;
|
|
|
+import com.xunmei.core.resumption.dto.resumptionRecord.ResumptionNFCDto;
|
|
|
+import com.xunmei.core.resumption.dto.resumptionRecord.ResumptionRecordPageDto;
|
|
|
+import com.xunmei.core.resumption.dto.resumptionRecord.ResumptionRoleDto;
|
|
|
+import com.xunmei.core.resumption.service.IResumptionRecordService;
|
|
|
+import com.xunmei.core.resumption.vo.resumptionRecord.NFCRecordVo;
|
|
|
+import com.xunmei.core.resumption.vo.resumptionRecord.ResumptionRecordInfoVo;
|
|
|
+import com.xunmei.core.resumption.vo.resumptionRecord.ResumptionRoleVo;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author jingyuanchao
|
|
|
+ * @date 2022/5/11 14:24
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@Api(description = "履职记录")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/resumption/record")
|
|
|
+public class ResumptionRecordController extends BaseController {
|
|
|
+ @Resource
|
|
|
+ IResumptionRecordService resumptionRecordService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "履职记录分页")
|
|
|
+ @PostMapping("/page")
|
|
|
+ public TableDataInfo page(@RequestBody @Valid ResumptionRecordPageDto pageDto) {
|
|
|
+ return resumptionRecordService.selectList(pageDto);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "履职记录详情")
|
|
|
+ @GetMapping("/{id}")
|
|
|
+ public AjaxResult list(@PathVariable String id) {
|
|
|
+ List<ResumptionRecordInfoVo> list = resumptionRecordService.selectInfo(id);
|
|
|
+ return success(list);
|
|
|
+ }
|
|
|
+
|
|
|
+// @ApiOperation(value = "secBookDtInst字典表")
|
|
|
+// @GetMapping("/sec")
|
|
|
+// public JsonResponse<?> sec() {
|
|
|
+// return JsonResponse.success(resumptionRecordService.selectSecBookDtInstList());
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "履职记录角色下拉框")
|
|
|
+ @PostMapping("/role")
|
|
|
+ public AjaxResult role(@RequestBody ResumptionRoleDto roleDto) {
|
|
|
+ List<IdNameVo> list = resumptionRecordService.selectResumptionRole(roleDto);
|
|
|
+
|
|
|
+ return success(list);
|
|
|
+ }
|
|
|
+
|
|
|
+// @ApiOperation(value = "履职计划下拉框")
|
|
|
+// @PostMapping("/plan")
|
|
|
+// public JsonResponse<?> plan(@RequestBody ResumptionRoleDto roleDto) {
|
|
|
+// List<ResumptionRoleVo> list = resumptionRecordService.selectResumptionPlan(roleDto);
|
|
|
+// return JsonResponse.success(list);
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "履职记录NFC记录")
|
|
|
+ @PostMapping("/nfc")
|
|
|
+ public AjaxResult nfc(@RequestBody ResumptionNFCDto dto) {
|
|
|
+ List<NFCRecordVo> list = resumptionRecordService.selectNFCRecord(dto);
|
|
|
+ return success(list);
|
|
|
+ }
|
|
|
+ /* @ApiOperation(value = "履职记录导出")
|
|
|
+ @PostMapping("/export")
|
|
|
+ public JsonResponse<?> export(@RequestBody ResumptionRecordPageDto pageDto) {
|
|
|
+ String export = StringUtil.EMPTY_STRING;
|
|
|
+ try {
|
|
|
+ export = resumptionRecordService.export(pageDto);
|
|
|
+ return JsonResponse.success(export);
|
|
|
+ } catch (FileNotFoundException e) {
|
|
|
+ log.error("履职记录下载失败,{}", e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return JsonResponse.fail(export);
|
|
|
+ }*/
|
|
|
+ @ApiOperation(value = "履职记录导出")
|
|
|
+ @PostMapping("/export")
|
|
|
+ public void export(@RequestBody ResumptionRecordPageDto pageDto, HttpServletResponse response) throws Exception {
|
|
|
+
|
|
|
+ resumptionRecordService.export(pageDto,response);
|
|
|
+ }
|
|
|
+}
|