feat(printing): 优化条码标签模板和图片生成尺寸
- 将普通物料标签模板更新为新样式 dp-1-label.html - 调整条码打印 HTML 渲染宽高至 480px x 320px - 将生成条码图片的 DPI 从 60 提升到 480,提高打印清晰度 - 修改储位二维码模板为储位二维码-label.html - 储位二维码图片 DPI 从 40 增加至 400,提升二维码精度 - 删除旧版普通物料标签模板中页面大小限制样式
This commit is contained in:
parent
2c9c0db974
commit
ce415b718a
|
|
@ -330,10 +330,10 @@ public class BarcodePrintingController extends BaseController {
|
||||||
for (DeliverNormalOrderItemDTO it : datas) {
|
for (DeliverNormalOrderItemDTO it : datas) {
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put("list", datas);
|
variables.put("list", datas);
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1-label", ".html", variables);
|
||||||
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
||||||
zos.putNextEntry(entry);
|
zos.putNextEntry(entry);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 60);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 480);
|
||||||
zos.write(imageBytes, 0, imageBytes.length);
|
zos.write(imageBytes, 0, imageBytes.length);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import com.nflg.wms.common.pojo.dto.*;
|
||||||
import com.nflg.wms.common.pojo.qo.*;
|
import com.nflg.wms.common.pojo.qo.*;
|
||||||
import com.nflg.wms.common.pojo.vo.InProduceOrderItemVO;
|
import com.nflg.wms.common.pojo.vo.InProduceOrderItemVO;
|
||||||
import com.nflg.wms.common.pojo.vo.InProduceOrderMaterialVO;
|
import com.nflg.wms.common.pojo.vo.InProduceOrderMaterialVO;
|
||||||
|
import com.nflg.wms.common.util.DateTimeUtil;
|
||||||
import com.nflg.wms.common.util.UserUtil;
|
import com.nflg.wms.common.util.UserUtil;
|
||||||
import com.nflg.wms.common.util.VUtil;
|
import com.nflg.wms.common.util.VUtil;
|
||||||
import com.nflg.wms.repository.entity.*;
|
import com.nflg.wms.repository.entity.*;
|
||||||
|
|
@ -32,6 +33,7 @@ import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
|
|
@ -43,8 +45,10 @@ import java.io.ByteArrayOutputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
@ -96,6 +100,9 @@ public class InProduceOrderController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private BasdeSerialNumberControllerService serialNumberControllerService;
|
private BasdeSerialNumberControllerService serialNumberControllerService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private StringRedisTemplate stringRedisTemplate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从SAP查询生产订单信息
|
* 从SAP查询生产订单信息
|
||||||
* @param no 生产订单号
|
* @param no 生产订单号
|
||||||
|
|
@ -122,6 +129,9 @@ public class InProduceOrderController extends BaseController {
|
||||||
.setCreateBy(UserUtil.getUserName())
|
.setCreateBy(UserUtil.getUserName())
|
||||||
.setCreateTime(LocalDateTime.now());
|
.setCreateTime(LocalDateTime.now());
|
||||||
produceOrderService.save(order);
|
produceOrderService.save(order);
|
||||||
|
String date = DateTimeUtil.format(LocalDate.now(), "yyMMdd");
|
||||||
|
stringRedisTemplate.opsForValue().setIfAbsent("index:batchNo:" + date, "0", 24 - LocalDateTime.now().getHour(), TimeUnit.HOURS);
|
||||||
|
String index = StrUtil.padPre(String.valueOf(stringRedisTemplate.opsForValue().increment("index:batchNo:" + date)), 4, "0");
|
||||||
WmsInProduceOrderItem parent = new WmsInProduceOrderItem()
|
WmsInProduceOrderItem parent = new WmsInProduceOrderItem()
|
||||||
.setOrderId(order.getId())
|
.setOrderId(order.getId())
|
||||||
.setParentId(0L)
|
.setParentId(0L)
|
||||||
|
|
@ -132,7 +142,7 @@ public class InProduceOrderController extends BaseController {
|
||||||
.setFactoryNo(request.getPwerk())
|
.setFactoryNo(request.getPwerk())
|
||||||
.setWarehouseNo(request.getLgort())
|
.setWarehouseNo(request.getLgort())
|
||||||
.setOrderNum(request.getPsmng())
|
.setOrderNum(request.getPsmng())
|
||||||
.setBatchNo(request.getBatchNo())
|
.setBatchNo(date + index)
|
||||||
.setSernr(request.getSernr());
|
.setSernr(request.getSernr());
|
||||||
produceOrderItemService.save(parent);
|
produceOrderItemService.save(parent);
|
||||||
if (request.getList()) {
|
if (request.getList()) {
|
||||||
|
|
@ -286,14 +296,10 @@ public class InProduceOrderController extends BaseController {
|
||||||
for (DeliverNormalOrderItemDTO it : datas) {
|
for (DeliverNormalOrderItemDTO it : datas) {
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put("list", datas);
|
variables.put("list", datas);
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1-label", ".html", variables);
|
||||||
// HtmlToImageUtil.convertToPng(html, 800);
|
|
||||||
// response.setContentType("image/png");
|
|
||||||
// response.getOutputStream().write(HtmlToImageUtil.convertToPng(html, 60));
|
|
||||||
// break;
|
|
||||||
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
||||||
zos.putNextEntry(entry);
|
zos.putNextEntry(entry);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 60);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 480);
|
||||||
zos.write(imageBytes, 0, imageBytes.length);
|
zos.write(imageBytes, 0, imageBytes.length);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -412,14 +412,14 @@ public class InProduceOrderSurplusController extends BaseController {
|
||||||
for (DeliverNormalOrderItemDTO it : datas) {
|
for (DeliverNormalOrderItemDTO it : datas) {
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put("list", datas);
|
variables.put("list", datas);
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1-label", ".html", variables);
|
||||||
// HtmlToImageUtil.convertToPng(html, 800);
|
// HtmlToImageUtil.convertToPng(html, 800);
|
||||||
// response.setContentType("image/png");
|
// response.setContentType("image/png");
|
||||||
// response.getOutputStream().write(HtmlToImageUtil.convertToPng(html, 60));
|
// response.getOutputStream().write(HtmlToImageUtil.convertToPng(html, 60));
|
||||||
// break;
|
// break;
|
||||||
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
||||||
zos.putNextEntry(entry);
|
zos.putNextEntry(entry);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 60);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 480);
|
||||||
zos.write(imageBytes, 0, imageBytes.length);
|
zos.write(imageBytes, 0, imageBytes.length);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -339,10 +339,10 @@ public class NormalOrderController extends BaseController {
|
||||||
for (DeliverNormalOrderItemDTO it : list) {
|
for (DeliverNormalOrderItemDTO it : list) {
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put("list", List.of(it));
|
variables.put("list", List.of(it));
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1-label", ".html", variables);
|
||||||
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
||||||
zos.putNextEntry(entry);
|
zos.putNextEntry(entry);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 60);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 480);
|
||||||
zos.write(imageBytes, 0, imageBytes.length);
|
zos.write(imageBytes, 0, imageBytes.length);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
.toList();
|
.toList();
|
||||||
if (Objects.equals(request.getType(), 1)) {
|
if (Objects.equals(request.getType(), 1)) {
|
||||||
datas.forEach(it -> {
|
datas.forEach(it -> {
|
||||||
it.setBatchNo(NoUtil.getBatchNo(request.getSupplierNo()));
|
it.setBatchNo(NoUtil.getBatchNo(it.getSupplierNo()));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return ApiResult.success(datas);
|
return ApiResult.success(datas);
|
||||||
|
|
@ -512,14 +512,10 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
variables.put("list", datas);
|
variables.put("list", datas);
|
||||||
variables.put("info", trayVO);
|
variables.put("info", trayVO);
|
||||||
variables.put("index", index);
|
variables.put("index", index);
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "spitem", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/qrcode/", "spitem-label", ".html", variables);
|
||||||
// HtmlToImageUtil.convertToPng(html, 800);
|
|
||||||
// response.setContentType("image/png");
|
|
||||||
// response.getOutputStream().write(HtmlToImageUtil.convertToPng(html, 60));
|
|
||||||
// break;
|
|
||||||
ZipEntry entry = new ZipEntry(it.getId() + ".png");
|
ZipEntry entry = new ZipEntry(it.getId() + ".png");
|
||||||
zos.putNextEntry(entry);
|
zos.putNextEntry(entry);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 60);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 600);
|
||||||
zos.write(imageBytes, 0, imageBytes.length);
|
zos.write(imageBytes, 0, imageBytes.length);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
@ -555,11 +551,11 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
public ResponseEntity<byte[]> exportTrayImage(@Valid @RequestParam @NotNull Long id) throws Exception {
|
public ResponseEntity<byte[]> exportTrayImage(@Valid @RequestParam @NotNull Long id) throws Exception {
|
||||||
DeliverStructuralPackageOrderExtendVO trayVO = deliverStructuralPackageOrderTrayService.getInfo(id);
|
DeliverStructuralPackageOrderExtendVO trayVO = deliverStructuralPackageOrderTrayService.getInfo(id);
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(trayVO)).throwMessage("数据不存在");
|
VUtil.trueThrowBusinessError(Objects.isNull(trayVO)).throwMessage("数据不存在");
|
||||||
trayVO.setQrCode(QRCodeUtil.generateQRCodeBase64(trayVO.getTrayNo(), 100, 100));
|
trayVO.setQrCode(QRCodeUtil.generateQRCodeBase64(trayVO.getTrayNo(), 200, 200));
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put("info", trayVO);
|
variables.put("info", trayVO);
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "tray", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/qrcode/", "tray-label", ".html", variables);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 60);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 600);
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
headers.setContentType(MediaType.IMAGE_PNG);
|
headers.setContentType(MediaType.IMAGE_PNG);
|
||||||
headers.setContentLength(imageBytes.length);
|
headers.setContentLength(imageBytes.length);
|
||||||
|
|
@ -597,8 +593,8 @@ public class StructuralPackageOrderController extends BaseController {
|
||||||
trayVO.setQrCode(QRCodeUtil.generateQRCodeBase64(uniqueCode + "$" + temp, 100, 100));
|
trayVO.setQrCode(QRCodeUtil.generateQRCodeBase64(uniqueCode + "$" + temp, 100, 100));
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put("info", trayVO);
|
variables.put("info", trayVO);
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "qitao", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/qrcode/", "qitao-label", ".html", variables);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 60);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 600);
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
headers.setContentType(MediaType.IMAGE_PNG);
|
headers.setContentType(MediaType.IMAGE_PNG);
|
||||||
headers.setContentLength(imageBytes.length);
|
headers.setContentLength(imageBytes.length);
|
||||||
|
|
|
||||||
|
|
@ -236,10 +236,10 @@ public class BinControllerService {
|
||||||
for (QRCodeDTO it : datas) {
|
for (QRCodeDTO it : datas) {
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put("datas", List.of(it));
|
variables.put("datas", List.of(it));
|
||||||
String html = ThymeleafUtil.generator("/template/", "储位二维码", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/", "储位二维码-label", ".html", variables);
|
||||||
ZipEntry entry = new ZipEntry(it.getNo() + ".png");
|
ZipEntry entry = new ZipEntry(it.getNo() + ".png");
|
||||||
zos.putNextEntry(entry);
|
zos.putNextEntry(entry);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 40);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 400);
|
||||||
zos.write(imageBytes, 0, imageBytes.length);
|
zos.write(imageBytes, 0, imageBytes.length);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,10 @@ import com.nflg.wms.common.util.VUtil;
|
||||||
import com.sap.conn.jco.*;
|
import com.sap.conn.jco.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
@ -41,9 +37,6 @@ public class SapService {
|
||||||
@Resource
|
@Resource
|
||||||
private JCoRepository repository;
|
private JCoRepository repository;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private StringRedisTemplate stringRedisTemplate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产订单副产品(拆解)入库过账
|
* 生产订单副产品(拆解)入库过账
|
||||||
*/
|
*/
|
||||||
|
|
@ -164,13 +157,8 @@ public class SapService {
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(eReturn.getString("TYPE"), "S"))
|
VUtil.trueThrowBusinessError(!StrUtil.equals(eReturn.getString("TYPE"), "S"))
|
||||||
.throwMessage("SAP:" + eReturn.getString("MESSAGE"));
|
.throwMessage("SAP:" + eReturn.getString("MESSAGE"));
|
||||||
return null;
|
return null;
|
||||||
} else {
|
|
||||||
String date = DateTimeUtil.format(LocalDate.now(), "yyMMdd");
|
|
||||||
stringRedisTemplate.opsForValue().setIfAbsent("index:batchNo:" + date, "0", 24 - LocalDateTime.now().getHour(), TimeUnit.HOURS);
|
|
||||||
String index = StrUtil.padPre(String.valueOf(stringRedisTemplate.opsForValue().increment("index:batchNo:" + date)), 4, "0");
|
|
||||||
dto.setBatchNo(date + index);
|
|
||||||
return dto;
|
|
||||||
}
|
}
|
||||||
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ public class HtmlToImageUtil {
|
||||||
/**
|
/**
|
||||||
* 将HTML内容转换为PNG图片
|
* 将HTML内容转换为PNG图片
|
||||||
* @param htmlContent HTML内容
|
* @param htmlContent HTML内容
|
||||||
* @param width 图片宽度,单位mm
|
* @param width 图片宽度
|
||||||
* @return PNG图片字节数组
|
* @return PNG图片字节数组
|
||||||
* @throws Exception 转换异常
|
* @throws Exception 转换异常
|
||||||
*/
|
*/
|
||||||
|
|
@ -36,7 +36,7 @@ public class HtmlToImageUtil {
|
||||||
command.add("wkhtmltoimage");
|
command.add("wkhtmltoimage");
|
||||||
// 可选参数:设置宽度 (例如 1200px)
|
// 可选参数:设置宽度 (例如 1200px)
|
||||||
command.add("--width");
|
command.add("--width");
|
||||||
command.add(String.valueOf((int) (width * 3.78)));
|
command.add(String.valueOf(width));
|
||||||
// 可选参数:指定图片类型 (例如 PNG)
|
// 可选参数:指定图片类型 (例如 PNG)
|
||||||
command.add("--format");
|
command.add("--format");
|
||||||
command.add("png");
|
command.add("png");
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -5,10 +5,6 @@
|
||||||
<title>普通物料标签</title>
|
<title>普通物料标签</title>
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||||
<style>
|
<style>
|
||||||
@page {
|
|
||||||
size: 60mm 40mm;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
body {
|
body {
|
||||||
width: 58mm;
|
width: 58mm;
|
||||||
height: 38mm;
|
height: 38mm;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<title>齐套标签</title>
|
||||||
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||||
|
<style>
|
||||||
|
@page {
|
||||||
|
size: 600px 400px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
width: 600px;
|
||||||
|
height: 400px;
|
||||||
|
font-size: 20pt;
|
||||||
|
font-family: SimSun, Arial, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1.1;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-print-color-adjust: exact;
|
||||||
|
print-color-adjust: exact;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 600px;
|
||||||
|
height: 400px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 3px solid #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
border: 3px solid #000;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qrcode {
|
||||||
|
width: 180px;
|
||||||
|
height: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
height: 120px;
|
||||||
|
font-size: 24pt;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="title" colspan="3" th:text="${info.packageDesc}">
|
||||||
|
左踏板连接架左踏板连接架左踏板连接架左踏板连接架左踏板连接架左踏板连接架
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="4" style="text-align: center;">
|
||||||
|
<img class="qrcode" alt="" th:src="${info.qrCode}"/>
|
||||||
|
</td>
|
||||||
|
<td style="width: 120px;">
|
||||||
|
采购单号
|
||||||
|
</td>
|
||||||
|
<td th:text="${info.externalOrderNo}">
|
||||||
|
S2507090053
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
行号
|
||||||
|
</td>
|
||||||
|
<td th:text="${info.rowNo}">
|
||||||
|
00100
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
SAP编码
|
||||||
|
</td>
|
||||||
|
<td th:text="${info.packageNo}">
|
||||||
|
2100080450
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
供应商
|
||||||
|
</td>
|
||||||
|
<td th:text="${info.supplierName}">
|
||||||
|
晋江市阳田金属制品有限公司品有限公司品有限公司
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -5,11 +5,6 @@
|
||||||
<title>齐套标签</title>
|
<title>齐套标签</title>
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||||
<style>
|
<style>
|
||||||
@page {
|
|
||||||
size: 60mm 40mm;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
width: 58mm;
|
width: 58mm;
|
||||||
height: 38mm;
|
height: 38mm;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<title>钢构件物料标签</title>
|
||||||
|
<style>
|
||||||
|
@page {
|
||||||
|
size: 600px 400px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
width: 600px;
|
||||||
|
height: 400px;
|
||||||
|
font-size: 20pt;
|
||||||
|
font-family: SimSun, Arial, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.1;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-print-color-adjust: exact;
|
||||||
|
print-color-adjust: exact;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 600px;
|
||||||
|
height: 380px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 3px solid #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr td {
|
||||||
|
border: 3px solid #000;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
text-align: left;
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle
|
||||||
|
}
|
||||||
|
|
||||||
|
.img {
|
||||||
|
width: auto;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qrcode {
|
||||||
|
width: 210px;
|
||||||
|
height: 210px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
height: 100px;
|
||||||
|
font-size: 24pt;
|
||||||
|
line-height: normal;
|
||||||
|
vertical-align: middle;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: left;
|
||||||
|
display: table-cell;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div th:each="item , iterStat: ${list}"
|
||||||
|
th:style="${iterStat.index == 0} ? 'page-break-before: auto;' : 'page-break-before: always;'">
|
||||||
|
<div th:text="${index}">1</div>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<div th:text="|${item.materialDesc}(${info.supplierCode})|" class="title">
|
||||||
|
833-33-07-NF左踏板连接架(00001016NF左踏板连接架NF左踏板连接架
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" rowspan="3" style="text-align: center;">
|
||||||
|
<img th:src="${item.qrCodeImage}" class="qrcode"
|
||||||
|
src="https://img-s.msn.cn/tenant/amp/entityid/AA1RXD8a.img" alt=""/>
|
||||||
|
</td>
|
||||||
|
<td colspan="2" th:text="${item.drawingNo}" style="height: 36px;">833-33-07-NF</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-weight: bold;text-align: center;width: 120px;height: 36px;">SAP编码</td>
|
||||||
|
<td th:text="${item.materialNo}" style="width: 20mm">2100080450</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" rowspan="2" style="width: 320px;height: 160px; text-align: center">
|
||||||
|
<img th:src="${item.image}" class="img" src="https://img-s.msn.cn/tenant/amp/entityid/AA1SpWIZ.img"
|
||||||
|
alt=""/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" style="font-size: 15pt;text-align: center;height: 30px" th:text="${item.qrCodeId}">
|
||||||
|
1244565616465_1
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -4,11 +4,6 @@
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<title>钢构件物料标签</title>
|
<title>钢构件物料标签</title>
|
||||||
<style>
|
<style>
|
||||||
@page {
|
|
||||||
size: 60mm 40mm;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
width: 58mm;
|
width: 58mm;
|
||||||
height: 38mm;
|
height: 38mm;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<title>托盘标签</title>
|
||||||
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||||
|
<style>
|
||||||
|
@page {
|
||||||
|
size: 600px 400px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
width: 600px;
|
||||||
|
height: 400px;
|
||||||
|
font-size: 20pt;
|
||||||
|
font-family: SimSun, Arial, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 600px;
|
||||||
|
height: 400px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 3px solid #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding-left: 10px;
|
||||||
|
vertical-align: middle;
|
||||||
|
border: 3px solid #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qrcode {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 180px;
|
||||||
|
height: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 24pt;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table>
|
||||||
|
<tr style="height: 120px;">
|
||||||
|
<td class="title" colspan="3" th:text="${info.packageDesc}">
|
||||||
|
左踏板连接架左踏板连接架左踏板连接架左踏板连接架左踏板连接架左
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="3" style="text-align: center;vertical-align: middle;padding-left: 0">
|
||||||
|
<img class="qrcode" alt="" th:src="${info.qrCode}"/>
|
||||||
|
</td>
|
||||||
|
<td style="width: 130px;">
|
||||||
|
托盘号
|
||||||
|
</td>
|
||||||
|
<td style="width: 240px;" th:text="${info.trayNo}">
|
||||||
|
S2507090053
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
SAP编码
|
||||||
|
</td>
|
||||||
|
<td th:text="${info.packageNo}">
|
||||||
|
2100080450
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
供应商
|
||||||
|
</td>
|
||||||
|
<td th:text="${info.supplierName}">
|
||||||
|
晋江市阳田金属制品有限公司
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -5,11 +5,6 @@
|
||||||
<title>托盘标签</title>
|
<title>托盘标签</title>
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||||
<style>
|
<style>
|
||||||
@page {
|
|
||||||
size: 60mm 40mm;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
width: 58mm;
|
width: 58mm;
|
||||||
height: 38mm;
|
height: 38mm;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>二维码</title>
|
||||||
|
<style>
|
||||||
|
@page {
|
||||||
|
size: 400px 600px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qrcode {
|
||||||
|
margin-top: 20px;
|
||||||
|
width: 350px;
|
||||||
|
height: 350px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 400px;
|
||||||
|
height: 600px;
|
||||||
|
font-size: 24pt;
|
||||||
|
font-family: SimSun, serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
page-break-after: always;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container:last-child {
|
||||||
|
page-break-after: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container" th:each="item : ${datas}">
|
||||||
|
<div style="text-align: center">
|
||||||
|
<div>
|
||||||
|
<img class="qrcode" alt="" th:src="${item.qrCode}" src="../img/qrcode.png"/>
|
||||||
|
</div>
|
||||||
|
<div th:text="${item.no}">ICO2156115651</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -72,9 +72,4 @@ public class ZWM00MB007DTO {
|
||||||
* 序列号
|
* 序列号
|
||||||
*/
|
*/
|
||||||
private String sernr;
|
private String sernr;
|
||||||
|
|
||||||
/**
|
|
||||||
* 批次号
|
|
||||||
*/
|
|
||||||
private String batchNo;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.nflg.wms.common.pojo.qo;
|
package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
import com.nflg.wms.common.pojo.dto.ZWM00MB007DTO;
|
import com.nflg.wms.common.pojo.dto.ZWM00MB007DTO;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import jakarta.validation.constraints.Positive;
|
import jakarta.validation.constraints.Positive;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -30,10 +29,4 @@ public class InProduceOrderGenerateMaterialsQO extends ZWM00MB007DTO {
|
||||||
@NotNull
|
@NotNull
|
||||||
@Positive(message = "收货数量必须大于0")
|
@Positive(message = "收货数量必须大于0")
|
||||||
private BigDecimal num;
|
private BigDecimal num;
|
||||||
|
|
||||||
/**
|
|
||||||
* 批次号
|
|
||||||
*/
|
|
||||||
@NotBlank
|
|
||||||
private String batchNo;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue