交班权限
This commit is contained in:
parent
0f07ebf8e4
commit
02cbb27eac
|
|
@ -7,14 +7,11 @@ import com.czg.account.service.HandoverRecordService;
|
|||
import com.czg.account.vo.HandoverProductListVo;
|
||||
import com.czg.account.vo.HandoverTotalVo;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.annotation.SaStaffCheckPermission;
|
||||
import com.czg.config.RabbitPublisher;
|
||||
import com.czg.enums.YesNoEnum;
|
||||
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 jakarta.annotation.Resource;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -32,8 +29,6 @@ import java.util.List;
|
|||
@RequestMapping("/admin/handoverRecord")
|
||||
public class HandoverRecordController {
|
||||
private final HandoverRecordService handoverRecordService;
|
||||
@Resource
|
||||
private RabbitPublisher rabbitPublisher;
|
||||
|
||||
/**
|
||||
* 交班记录-分页
|
||||
|
|
@ -44,7 +39,7 @@ public class HandoverRecordController {
|
|||
@GetMapping("page")
|
||||
@OperationLog("交班记录-分页")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
@SaAdminCheckPermission("handoverRecord:page")
|
||||
@SaAdminCheckPermission(value = "handoverRecord:page",name = "交班记录-分页")
|
||||
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);
|
||||
|
|
@ -58,7 +53,7 @@ public class HandoverRecordController {
|
|||
@GetMapping("{id}")
|
||||
@OperationLog("交班记录-查看")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
@SaAdminCheckPermission("handoverRecord:info")
|
||||
@SaAdminCheckPermission(value = "handoverRecord:info",name = "交班记录-查看")
|
||||
public CzgResult<List<HandoverProductListVo>> info(@PathVariable Long id) {
|
||||
List<HandoverProductListVo> data = handoverRecordService.getHandoverProductListById(id);
|
||||
return CzgResult.success(data);
|
||||
|
|
@ -73,7 +68,7 @@ public class HandoverRecordController {
|
|||
@GetMapping("/export/{id}")
|
||||
@OperationLog("交班记录-导出")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
@SaAdminCheckPermission("handoverRecord:export")
|
||||
@SaAdminCheckPermission(value = "handoverRecord:export",name = "交班记录-导出")
|
||||
public List<HandoverProductListVo> export(@PathVariable Long id) {
|
||||
return handoverRecordService.getHandoverProductListById(id);
|
||||
}
|
||||
|
|
@ -84,7 +79,7 @@ public class HandoverRecordController {
|
|||
@GetMapping("total")
|
||||
@OperationLog("收银机-交班数据统计")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
@SaAdminCheckPermission("handoverRecord:total")
|
||||
@SaAdminCheckPermission(value = "handoverRecord:total",name = "收银机-交班数据统计")
|
||||
public CzgResult<HandoverTotalVo> total() {
|
||||
HandoverTotalVo data = handoverRecordService.totalHandoverData();
|
||||
return CzgResult.success(data);
|
||||
|
|
@ -98,7 +93,7 @@ public class HandoverRecordController {
|
|||
@PostMapping("handover")
|
||||
@OperationLog("收银机-交班/关班")
|
||||
// @SaStaffCheckPermission("yun_xu_jiao_ban")
|
||||
@SaAdminCheckPermission("handoverRecord:handover")
|
||||
@SaAdminCheckPermission(value = "handoverRecord:handover",name = "收银机-交班/关班")
|
||||
public CzgResult<Long> handover(@RequestParam Integer isPrint) {
|
||||
Long id = handoverRecordService.handover();
|
||||
return CzgResult.success(id);
|
||||
|
|
@ -112,7 +107,7 @@ public class HandoverRecordController {
|
|||
@PostMapping("/network/print/{id}")
|
||||
@OperationLog("收银机-交班/关班-网络打印机打印交班小票")
|
||||
// @SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
@SaAdminCheckPermission("handoverRecord:networkPrint")
|
||||
@SaAdminCheckPermission(value = "handoverRecord:networkPrint",name = "收银机-交班/关班-网络打印机打印交班小票")
|
||||
public CzgResult<Void> handover(@PathVariable Long id) {
|
||||
handoverRecordService.printHandoverReceipt(id, YesNoEnum.YES.value());
|
||||
return CzgResult.success();
|
||||
|
|
@ -127,6 +122,7 @@ public class HandoverRecordController {
|
|||
@GetMapping("/detail/{id}")
|
||||
@OperationLog("交班记录-详情")
|
||||
//@SaAdminCheckPermission("handoverRecord:detail")
|
||||
@SaAdminCheckPermission(value = "handoverRecord:detail",name = "交班记录-详情")
|
||||
public CzgResult<HandoverRecordDTO> detail(@PathVariable Long id) {
|
||||
HandoverRecord entity = handoverRecordService.getById(id);
|
||||
HandoverRecordDTO data = BeanUtil.copyProperties(entity, HandoverRecordDTO.class);
|
||||
|
|
|
|||
Loading…
Reference in New Issue