Commit 6eda3847 by ilal Committed by chenzg

提交测试接口

parent 4bc93c36
package cn.timer.api.controller.kqgl;
import java.util.ArrayList;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.timer.api.dto.kqgl.CompensateDto;
import cn.timer.api.dto.kqgl.LeaveTypeDto;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@Api(tags = "3.0考勤模块")
@RestController
@Transactional
@RequestMapping(value = "/kqmk", produces = { "application/json", "multipart/form-data" })
public class TimeCardController {
/**
* 查询列表-假期规则
*/
@GetMapping(value = "/list_leave_rules")
@ApiOperation(value = "1: 查询列表-假期规则", httpMethod = "GET", notes = " 查询列表-假期规则")
@ApiOperationSupport(order = 1)
public Result<Object> selectListLeaveRules() {
List<LeaveTypeDto> leas = new ArrayList<LeaveTypeDto>();
LeaveTypeDto lea = LeaveTypeDto.builder().build();
lea.setVacid(1);
lea.setVacname("事假");
leas.add(lea);
LeaveTypeDto lea2 = LeaveTypeDto.builder().build();
lea2.setVacid(2);
lea2.setVacname("调休");
leas.add(lea2);
LeaveTypeDto lea3 = LeaveTypeDto.builder().build();
lea3.setVacid(3);
lea3.setVacname("病假");
leas.add(lea3);
return ResultUtil.data(leas, "操作成功!");
}
/**
* 查询列表-加班补偿方式
*/
@GetMapping(value = "/list_compensate")
@ApiOperation(value = "2: 查询列表-加班补偿方式", httpMethod = "GET", notes = " 查询列表-加班补偿方式")
@ApiOperationSupport(order = 1)
public Result<Object> selectListCompensate() {
List<CompensateDto> coms = new ArrayList<CompensateDto>();
CompensateDto com = CompensateDto.builder().build();
com.setOvtiid(1);
com.setOvtiname("加班费");
coms.add(com);
CompensateDto coms2 = CompensateDto.builder().build();
coms2.setOvtiid(2);
coms2.setOvtiname("调休");
coms.add(coms2);
return ResultUtil.data(coms, "操作成功!");
}
}
package cn.timer.api.dto.kqgl;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CompensateDto {
@ApiModelProperty(value = "加班补偿记录id", example = "1", required = true)
private Integer ovtiid;
@ApiModelProperty(value = "加班补偿名称", example = "加班费、调休")
private String ovtiname;
}
package cn.timer.api.dto.kqgl;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LeaveTypeDto {
@ApiModelProperty(value = "假期记录id", example = "1", required = true)
private Integer vacid;
@ApiModelProperty(value = "假期名称", example = "事假、调休...")
private String vacname;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment