调整请求方式
This commit is contained in:
parent
f36e6703a3
commit
62e47e55be
|
@ -4,10 +4,7 @@ import com.dpkj.common.vo.Result;
|
|||
import com.dpkj.modules.autoReplyPrint.service.AutoReplyPrintService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 壁挂打印机
|
||||
|
@ -22,7 +19,7 @@ public class AutoReplyPrintController {
|
|||
/**
|
||||
* 获取打印机固件版本
|
||||
*/
|
||||
@GetMapping("CPPrinterGetPrinterFirmwareVersion")
|
||||
@PostMapping("CPPrinterGetPrinterFirmwareVersion")
|
||||
public Result<?> CPPrinterGetPrinterFirmwareVersion(@RequestParam(defaultValue = "VID:0x0FE6,PID:0x811E") String USBName) {
|
||||
return autoReplyPrintService.CPPrinterGetPrinterFirmwareVersion(USBName);
|
||||
}
|
||||
|
@ -30,7 +27,7 @@ public class AutoReplyPrintController {
|
|||
/**
|
||||
* 测试打印
|
||||
*/
|
||||
@GetMapping("/testWrite")
|
||||
@PostMapping("/testWrite")
|
||||
private Result<?> testWrite(@RequestParam(defaultValue = "VID:0x0FE6,PID:0x811E") String USBName){
|
||||
return this.autoReplyPrintService.testWrite(USBName);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.dpkj.modules.autoReplyPrint.controller;
|
|||
import com.dpkj.common.vo.Result;
|
||||
import com.dpkj.modules.autoReplyPrint.service.ImagePrintService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
@ -25,7 +26,7 @@ public class ImagePrintController {
|
|||
/**
|
||||
* 图片打印,通过路径
|
||||
*/
|
||||
@GetMapping("/usb/imagePrint/path")
|
||||
@PostMapping("/usb/imagePrint/path")
|
||||
Result<Void> usbImagePrintFromPath(@RequestParam(defaultValue = "VID:0x0FE6,PID:0x811E") String usbName,
|
||||
@RequestParam(defaultValue = "500") Integer width,
|
||||
@RequestParam(defaultValue = "500") Integer height,
|
||||
|
@ -38,7 +39,7 @@ public class ImagePrintController {
|
|||
/**
|
||||
* 图片打印,通过byte[]
|
||||
*/
|
||||
@GetMapping("/usb/imagePrint/pathData")
|
||||
@PostMapping("/usb/imagePrint/pathData")
|
||||
Result<Void> usbImagePrintFromData(@RequestParam(defaultValue = "VID:0x0FE6,PID:0x811E") String usbName,
|
||||
@RequestParam(defaultValue = "500") Integer width,
|
||||
@RequestParam(defaultValue = "500") Integer height,
|
||||
|
@ -51,7 +52,7 @@ public class ImagePrintController {
|
|||
/**
|
||||
* 图片打印,通过multipartFile文件
|
||||
*/
|
||||
@GetMapping("/usb/imagePrint/multipartFile")
|
||||
@PostMapping("/usb/imagePrint/multipartFile")
|
||||
Result<Void> usbImagePrintFromData(@RequestParam(defaultValue = "VID:0x0FE6,PID:0x811E") String usbName,
|
||||
@RequestParam(defaultValue = "500") Integer width,
|
||||
@RequestParam(defaultValue = "500") Integer height,
|
||||
|
@ -64,7 +65,7 @@ public class ImagePrintController {
|
|||
/**
|
||||
* 图片打印,通过byte[]
|
||||
*/
|
||||
@GetMapping("/usb/imagePrint/data")
|
||||
@PostMapping("/usb/imagePrint/data")
|
||||
Result<Void> usbImagePrintFromData(@RequestParam(defaultValue = "VID:0x0FE6,PID:0x811E") String usbName,
|
||||
@RequestParam(defaultValue = "500") Integer width,
|
||||
@RequestParam(defaultValue = "500") Integer height,
|
||||
|
|
|
@ -22,7 +22,7 @@ public class TemplateController {
|
|||
private TemplateService templateService;
|
||||
|
||||
|
||||
@GetMapping("/template/{templateName}")
|
||||
@PostMapping("/template/{templateName}")
|
||||
public Result<String> testTemplate(@RequestParam String jsonData,
|
||||
@RequestParam Integer width,
|
||||
@RequestParam Integer height,
|
||||
|
@ -32,7 +32,7 @@ public class TemplateController {
|
|||
return Result.ok("模板生成成功");
|
||||
}
|
||||
|
||||
@GetMapping("/template")
|
||||
@PostMapping("/template")
|
||||
public Result<String> testTemplate(@RequestParam String jsonData,
|
||||
@RequestParam Integer width,
|
||||
@RequestParam Integer height, @RequestParam(defaultValue = "E:\\images") String saveDir) {
|
||||
|
|
|
@ -4,10 +4,7 @@ import com.dpkj.common.vo.Result;
|
|||
import com.dpkj.modules.cardReader.service.CardReaderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 多合一读卡器
|
||||
|
@ -23,7 +20,7 @@ public class CardReaderController {
|
|||
* 连接设备并读取身份证信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("IDCardReader")
|
||||
@PostMapping("IDCardReader")
|
||||
public Result IDCardReader() {
|
||||
try {
|
||||
return cardReaderService.IDCardReader();
|
||||
|
@ -39,7 +36,7 @@ public class CardReaderController {
|
|||
* 连接设备并读取社保卡信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("SocialSecurityCardReader")
|
||||
@PostMapping("SocialSecurityCardReader")
|
||||
public Result<?> SocialSecurityCardReader() {
|
||||
try {
|
||||
return cardReaderService.SocialSecurityCardReader();
|
||||
|
|
Loading…
Reference in New Issue