交班记录代码提交

This commit is contained in:
Tankaikai
2025-02-28 15:36:41 +08:00
parent 7eae3c6f68
commit 7cdce51c58
8 changed files with 147 additions and 4 deletions

View File

@@ -1,12 +1,18 @@
package com.czg.controller.admin;
import com.czg.account.dto.HandoverRecordDTO;
import com.czg.account.service.HandoverRecordService;
import com.czg.account.vo.HandoverProductListVo;
import com.czg.account.vo.HandoverTotalVo;
import com.czg.log.annotation.OperationLog;
import com.czg.resp.CzgResult;
import com.mybatisflex.core.paginate.Page;
import com.pig4cloud.plugin.excel.annotation.ResponseExcel;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 交班
@@ -20,6 +26,45 @@ import org.springframework.web.bind.annotation.*;
public class HandoverRecordController {
private final HandoverRecordService handoverRecordService;
/**
* 交班记录-分页
*
* @param beginDate 开始时间 格式yyyy-MM-dd
* @param endDate 结束时间 格式yyyy-MM-dd
*/
@GetMapping("page")
@OperationLog("交班记录-分页")
//@SaAdminCheckPermission("handoverRecord:page")
public CzgResult<Page<HandoverRecordDTO>> page(@RequestParam(required = false) String beginDate, @RequestParam(required = false) String endDate) {
Page<HandoverRecordDTO> page = handoverRecordService.getHandoverRecordPage(beginDate, endDate);
return CzgResult.success(page);
}
/**
* 交班记录-查看
*
* @param id 交班记录ID
*/
@GetMapping("{id}")
@OperationLog("交班记录-查看")
//@SaAdminCheckPermission("handoverRecord:info")
public CzgResult<List<HandoverProductListVo>> info(@PathVariable Long id) {
List<HandoverProductListVo> data = handoverRecordService.getHandoverProductListById(id);
return CzgResult.success(data);
}
/**
* 交班记录-导出
*
* @param id 交班记录ID
*/
@ResponseExcel(name = "交班售出商品明细")
@GetMapping("/export/{id}")
@OperationLog("交班记录-导出")
//@SaAdminCheckPermission("handoverRecord:export")
public List<HandoverProductListVo> export(@PathVariable Long id) {
return handoverRecordService.getHandoverProductListById(id);
}
/**
* 收银机-交班数据统计
@@ -34,6 +79,7 @@ public class HandoverRecordController {
/**
* 收银机-交班/关班
*
* @param isPrint 是否打印交班小票
*/
@PostMapping("handover")