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