zhangherong
2025-06-25 23855599412c4d61b38d78f0f3abd3430a48b5b1
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentPunchController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,71 @@
package org.jeecg.modules.mdc.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.mdc.entity.MdcEquipmentPunch;
import org.jeecg.modules.mdc.service.IMdcEquipmentPunchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * @Description: mdc_equipment_punch
 * @Author: jeecg-boot
 * @Date: 2025-06-09
 * @Version: V1.0
 */
@Api(tags = "上下班打卡记录表")
@RestController
@RequestMapping("/mdcEquipmentPunch")
@Slf4j
public class MdcEquipmentPunchController extends JeecgController<MdcEquipmentPunch, IMdcEquipmentPunchService> {
    @Autowired
    private IMdcEquipmentPunchService mdcEquipmentPunchService;
    private static final String msg = "打卡成功!";
    /**
     * æŸ¥è¯¢å½“前登录人所负责设备打卡情况
     *
     * @return
     */
    @ApiOperation(value = "查询当前登录人所负责设备打卡情况", notes = "查询当前登录人所负责设备打卡情况")
    @GetMapping(value = "/list")
    public Result<List<MdcEquipmentPunch>> queryList() {
        return Result.OK(mdcEquipmentPunchService.queryList());
    }
    /**
     * ä¸Šç­æ‰“卡
     *
     * @param mdcEquipmentPunch
     * @return
     */
    @AutoLog(value = "上班打卡")
    @ApiOperation(value = "上班打卡", notes = "上班打卡")
    @PostMapping(value = "/workUp")
    public Result<String> workUp(@RequestBody MdcEquipmentPunch mdcEquipmentPunch) {
        mdcEquipmentPunchService.workUp(mdcEquipmentPunch);
        return Result.OK(msg);
    }
    /**
     * ä¸‹ç­æ‰“卡
     *
     * @param mdcEquipmentPunch
     * @return
     */
    @AutoLog(value = "下班打卡")
    @ApiOperation(value = "下班打卡", notes = "下班打卡")
    @PostMapping(value = "/workDown")
    public Result<String> workDown(@RequestBody MdcEquipmentPunch mdcEquipmentPunch) {
        mdcEquipmentPunchService.workDown(mdcEquipmentPunch);
        return Result.OK(msg);
    }
}