2025-03-13 09:43:16 +08:00
|
|
|
|
package com.dpkj.modules.print.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import com.dpkj.common.dto.LexMarkResultDTO;
|
|
|
|
|
|
import com.dpkj.common.vo.Result;
|
|
|
|
|
|
import com.dpkj.modules.print.request.MS439Request;
|
|
|
|
|
|
import com.dpkj.modules.print.service.MS439PrintService;
|
|
|
|
|
|
import com.dpkj.modules.print.vo.PrinterStatus;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* MS439控制层,利盟打印机
|
|
|
|
|
|
*
|
|
|
|
|
|
* @author <a href="https://gitee.com/shi-chongli">石头人</a>
|
|
|
|
|
|
* @version 1.0
|
|
|
|
|
|
* @since 2025-03-03 10:47:06
|
|
|
|
|
|
*/
|
|
|
|
|
|
@RestController
|
|
|
|
|
|
@RequestMapping("/ms439")
|
|
|
|
|
|
public class MS439Controller {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
private MS439PrintService ms439PrintService;
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/print")
|
|
|
|
|
|
public Result<LexMarkResultDTO<?>> print(@Validated @RequestBody MS439Request request){
|
|
|
|
|
|
return Result.ok(ms439PrintService.printImage(request));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/getStatus")
|
2025-03-14 16:02:00 +08:00
|
|
|
|
public Result<String> print(@RequestParam(defaultValue = "A4") String papersource){
|
|
|
|
|
|
this.ms439PrintService.getStatus(papersource);
|
2025-03-13 09:43:16 +08:00
|
|
|
|
return Result.ok();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|