Browse Source

标签打印 子标签 后缀名称多出的BUG

master
rui_li 1 month ago
parent
commit
0500a90687
  1. 11
      src/main/java/com/gaotao/modules/finishedProduct/service/impl/PackingServiceImpl.java
  2. 3
      src/main/resources/mapper/finishedProduct/ReportFile.xml

11
src/main/java/com/gaotao/modules/finishedProduct/service/impl/PackingServiceImpl.java

@ -423,6 +423,10 @@ public class PackingServiceImpl implements PackingService {
List<ReportFileVo> sumReportFileVoList = new ArrayList<>();
sumReportFileVoList = getReportFileList(reportFileVos, sumList);
sumReportFileVoList.add(reportFileVo);
//添加子标签 2025-12-05 测试代码LR
log.info("新增测试打印子标签内容:{}", reportFileVos.toString());
sumReportFileVoList.addAll(reportFileVos);
log.info("新增测试打印全部标签内容:{}", sumReportFileVoList.toString());
for (ReportFileVo fileVo : sumReportFileVoList) {
// 数据 主键
String serialNo = RandomUtil.getOrderNoByAtomic1("Box");
@ -491,7 +495,12 @@ public class PackingServiceImpl implements PackingService {
//打印参数
Map<String, Object> printOutMap = new HashMap<>();
printOutMap.put("printerName", userprinter.getNewprintername());
printOutMap.put("btwName", fileVo.getReportFile());
String bartenderName = fileVo.getReportFile();
//判断是否含有.btw 含有去掉后缀
if (fileVo.getReportFile().contains(".btw")) {
bartenderName = fileVo.getReportFile().substring(0, fileVo.getReportFile().toUpperCase().indexOf(".BTW"));
}
printOutMap.put("btwName", bartenderName);
printOutMap.put("dataView", "box_label_print");
printOutMap.put("dataViewColumn", "serial_no");
printOutMap.put("dataViewCon", serialNo);

3
src/main/resources/mapper/finishedProduct/ReportFile.xml

@ -48,8 +48,7 @@
rfc.SubReportFlag = 'Y' and rfc.ParentReportID = #{reportId}
</select>
<select id="getReportFileListDefaultByParnetNo"
resultType="com.gaotao.modules.finishedProduct.vo.ReportFileVo">
<select id="getReportFileListDefaultByParnetNo" resultType="com.gaotao.modules.finishedProduct.vo.ReportFileVo">
SELECT rfc.ReportID AS reportId,
rf.Reportfile AS reportFile,
rfc.ParentReportID AS parentReportID,

Loading…
Cancel
Save