2026-05-12 16:29:54 +08:00
|
|
|
package com.klp.controller;
|
|
|
|
|
|
|
|
|
|
import com.klp.common.annotation.Log;
|
|
|
|
|
import com.klp.common.core.controller.BaseController;
|
|
|
|
|
import com.klp.common.core.domain.PageQuery;
|
|
|
|
|
import com.klp.common.core.domain.R;
|
|
|
|
|
import com.klp.common.core.page.TableDataInfo;
|
2026-05-15 13:13:34 +08:00
|
|
|
import com.klp.common.core.validate.EditGroup;
|
2026-05-12 16:29:54 +08:00
|
|
|
import com.klp.common.enums.BusinessType;
|
|
|
|
|
import com.klp.domain.bo.AttendanceCheckBo;
|
|
|
|
|
import com.klp.domain.bo.WmsAttendanceCheckBo;
|
|
|
|
|
import com.klp.domain.vo.WmsAttendanceCheckVo;
|
|
|
|
|
import com.klp.service.IWmsAttendanceCheckService;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
2026-05-15 13:13:34 +08:00
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
2026-05-12 16:29:54 +08:00
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@Validated
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/wms/attendanceCheck")
|
|
|
|
|
public class WmsAttendanceCheckController extends BaseController {
|
|
|
|
|
|
|
|
|
|
private final IWmsAttendanceCheckService iWmsAttendanceCheckService;
|
|
|
|
|
|
|
|
|
|
@GetMapping("/list")
|
|
|
|
|
public TableDataInfo<WmsAttendanceCheckVo> list(WmsAttendanceCheckBo bo, PageQuery pageQuery) {
|
|
|
|
|
return iWmsAttendanceCheckService.queryPageList(bo, pageQuery);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/{checkId}")
|
|
|
|
|
public R<WmsAttendanceCheckVo> getInfo(@PathVariable Long checkId) {
|
|
|
|
|
return R.ok(iWmsAttendanceCheckService.queryById(checkId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Log(title = "考勤比对", businessType = BusinessType.DELETE)
|
|
|
|
|
@DeleteMapping("/{checkIds}")
|
|
|
|
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
|
|
|
@PathVariable Long[] checkIds) {
|
|
|
|
|
return toAjax(iWmsAttendanceCheckService.deleteWithValidByIds(Arrays.asList(checkIds), true));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Log(title = "考勤比对", businessType = BusinessType.INSERT)
|
|
|
|
|
@PostMapping("/check")
|
|
|
|
|
public R<Void> checkAttendance(@Validated @RequestBody AttendanceCheckBo bo) {
|
|
|
|
|
iWmsAttendanceCheckService.checkAttendance(bo);
|
|
|
|
|
return R.ok();
|
|
|
|
|
}
|
2026-05-15 13:13:34 +08:00
|
|
|
|
|
|
|
|
@Log(title = "考勤比对", businessType = BusinessType.UPDATE)
|
|
|
|
|
@PutMapping
|
|
|
|
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsAttendanceCheckBo bo) {
|
|
|
|
|
return toAjax(iWmsAttendanceCheckService.updateByBo(bo));
|
|
|
|
|
}
|
2026-05-12 16:29:54 +08:00
|
|
|
}
|