|
|
@@ -0,0 +1,47 @@
|
|
|
+
|
|
|
+package org.sky.scientific.controller;
|
|
|
+
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import jakarta.validation.Valid;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import org.sky.core.boot.ctrl.KdController;
|
|
|
+import org.sky.core.secure.utils.SecureUtil;
|
|
|
+import org.sky.core.tool.api.R;
|
|
|
+import org.sky.scientific.pojo.entity.SettingEntity;
|
|
|
+import org.sky.scientific.service.SettingService;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 出勤时间设置 控制器
|
|
|
+ *
|
|
|
+ * @author Kd
|
|
|
+ * @since 2025-07-01
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@AllArgsConstructor
|
|
|
+@RequestMapping("/setting")
|
|
|
+@Tag(name = "设置-出勤时长/高企证书")
|
|
|
+public class SettingController extends KdController {
|
|
|
+
|
|
|
+ private final SettingService service;
|
|
|
+
|
|
|
+ @GetMapping("/detail/{year}")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @Operation(summary = "详情")
|
|
|
+ public R<SettingEntity> detail(@PathVariable("year") String year) {
|
|
|
+ SettingEntity detail = service.detail(year);
|
|
|
+ return R.data(detail);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/submit")
|
|
|
+ @ApiOperationSupport(order = 3)
|
|
|
+ @Operation(summary = "新增或修改" )
|
|
|
+ public R submit(@Valid @RequestBody SettingEntity dto) {
|
|
|
+ dto.setTenantId(SecureUtil.getTenantId());
|
|
|
+ return R.status(service.submit(dto));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|