|
|
@@ -0,0 +1,61 @@
|
|
|
+package net.mingsoft.tf.www;
|
|
|
+
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
+import io.swagger.v3.oas.annotations.Parameters;
|
|
|
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
+import jakarta.servlet.http.HttpServletRequest;
|
|
|
+import jakarta.servlet.http.HttpServletResponse;
|
|
|
+import net.mingsoft.base.entity.ResultData;
|
|
|
+import net.mingsoft.basic.annotation.LogAnn;
|
|
|
+import net.mingsoft.basic.bean.UploadConfigBean;
|
|
|
+import net.mingsoft.basic.constant.e.BusinessTypeEnum;
|
|
|
+import net.mingsoft.people.action.people.FileAction;
|
|
|
+import net.mingsoft.tf.entity.RecruitmentSubmissionEntity;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+
|
|
|
+import java.io.IOException;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
+
|
|
|
+@Controller
|
|
|
+@RequestMapping("/tf/recruitmentSubmission")
|
|
|
+public class RecruitmentSubmissionAction {
|
|
|
+ @Resource
|
|
|
+ private net.mingsoft.tf.action.RecruitmentSubmissionAction action;
|
|
|
+ @Autowired
|
|
|
+ private FileAction fileAction;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存招聘投递
|
|
|
+ *
|
|
|
+ * @param recruitmentSubmission 招聘投递实体
|
|
|
+ */
|
|
|
+ @Operation(summary = "保存招聘投递列表接口")
|
|
|
+ @Parameters({
|
|
|
+ @Parameter(name = "submissionName", description = "姓名", required = false, in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "submissionTel", description = "联系电话", required = false, in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "submissionEmail", description = "邮件", required = false, in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "submissionFile", description = "附件", required = false, in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "recruitmentId", description = "招聘ID", required = false, in = ParameterIn.QUERY),
|
|
|
+ })
|
|
|
+ @PostMapping("/save")
|
|
|
+ @ResponseBody
|
|
|
+ @LogAnn(title = "保存招聘投递", businessType = BusinessTypeEnum.INSERT)
|
|
|
+ public ResultData save(@RequestBody RecruitmentSubmissionEntity recruitmentSubmission) {
|
|
|
+ return action.save(recruitmentSubmission);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping(value = "/upload")
|
|
|
+ @ResponseBody
|
|
|
+ public ResultData upload(@Parameter(hidden = true) UploadConfigBean bean, HttpServletRequest req, HttpServletResponse res) throws IOException {
|
|
|
+ bean.setUploadPath(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMM")));
|
|
|
+ return fileAction.upload(bean, req, res);
|
|
|
+ }
|
|
|
+}
|