交班记录代码提交

This commit is contained in:
Tankaikai
2025-03-07 10:31:12 +08:00
parent a136c24d84
commit 29181fcd87
2 changed files with 50 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
package com.czg.controller.admin;
import cn.hutool.core.bean.BeanUtil;
import com.czg.account.dto.HandoverRecordDTO;
import com.czg.account.entity.HandoverRecord;
import com.czg.account.service.HandoverRecordService;
import com.czg.account.vo.HandoverProductListVo;
import com.czg.account.vo.HandoverTotalVo;
@@ -85,10 +87,24 @@ public class HandoverRecordController {
@PostMapping("handover")
@OperationLog("收银机-交班/关班")
//@SaAdminCheckPermission("handoverRecord:handover")
public CzgResult<Void> handover(@RequestParam Integer isPrint) {
public CzgResult<Long> handover(@RequestParam Integer isPrint) {
Long id = handoverRecordService.handover();
handoverRecordService.printHandoverReceipt(id, isPrint);
return CzgResult.success();
return CzgResult.success(id);
}
/**
* 交班记录-详情
*
* @param id 交班记录ID
*/
@GetMapping("/detail/{id}")
@OperationLog("交班记录-详情")
//@SaAdminCheckPermission("handoverRecord:detail")
public CzgResult<HandoverRecordDTO> detail(@PathVariable Long id) {
HandoverRecord entity = handoverRecordService.getById(id);
HandoverRecordDTO data = BeanUtil.copyProperties(entity, HandoverRecordDTO.class);
return CzgResult.success(data);
}
}