feat 添加打印请求
This commit is contained in:
parent
0a68f96c90
commit
c2c0619d74
@ -69,6 +69,25 @@ public class LabelController {
|
|||||||
return JsonResponse.success();
|
return JsonResponse.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/storagePrint", method = RequestMethod.POST)
|
||||||
|
public AjaxResult storagePrint(@RequestBody JSONObject in) throws CustomException {
|
||||||
|
// 获取信息
|
||||||
|
String printName = in.get("PRINTNAME").toString();
|
||||||
|
// 数据
|
||||||
|
List<Map<String,Object>> dataList = (List) in.get("LIST");
|
||||||
|
// 打印
|
||||||
|
List<String> resList = new ArrayList<>();
|
||||||
|
for (Map<String, Object> data : dataList) {
|
||||||
|
StoragePrintDto storagePrintDto = new StoragePrintDto();
|
||||||
|
storagePrintDto.setPrinterName(printName);
|
||||||
|
storagePrintDto.setSiteName(data.get("SITENAME").toString());
|
||||||
|
storagePrintDto.setStorageName(data.get("STORAGENAME").toString());
|
||||||
|
String urlInfo = labelService.storagePrint(storagePrintDto);
|
||||||
|
resList.add(urlInfo);
|
||||||
|
}
|
||||||
|
return AjaxResult.me().setResultObj(resList);
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/labelPrintTest", method = RequestMethod.POST)
|
@RequestMapping(value = "/labelPrintTest", method = RequestMethod.POST)
|
||||||
//@Operation(summary = "标签打印测试, 测试只能打印 标签模板没有参数的标签. ")
|
//@Operation(summary = "标签打印测试, 测试只能打印 标签模板没有参数的标签. ")
|
||||||
public AjaxResult labelPrintTest(@RequestBody JSONObject in) throws CustomException {
|
public AjaxResult labelPrintTest(@RequestBody JSONObject in) throws CustomException {
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.cim.idm.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class StoragePrintDto {
|
||||||
|
|
||||||
|
// sdk
|
||||||
|
private String siteName;
|
||||||
|
|
||||||
|
// 货位名称
|
||||||
|
private String storageName;
|
||||||
|
|
||||||
|
// 打印机名称
|
||||||
|
private String printerName;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user