库存条码查询打印增加可支持抛送指定队列

This commit is contained in:
彭枝刚 2025-01-05 13:10:52 +08:00
parent ca8ee6c3a3
commit 26bec7a3a8

View File

@ -6,6 +6,7 @@ import com.foreverwin.mom.common.data.tenant.TenantContextHolder;
import com.foreverwin.mom.wms.dto.BarCodeQueryDto;
import com.foreverwin.mom.wms.mapper.ZWmsInventoryMapper;
import com.foreverwin.mom.wms.service.BarCodeQueryService;
import com.foreverwin.mom.wms.util.StringUtil;
import com.foreverwin.nlv.print.feign.RemotePrintService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
@ -69,10 +70,20 @@ public class BarCodeQueryServiceLmpl implements BarCodeQueryService {
}
printData.add(paramMap);
// 截取打印机和queueName
String printerNameFinal = "";
String queueName = "";
String[] strDat = printer.split("&&");
if (StringUtil.notEmpty(strDat[0])) {
printerNameFinal = strDat[0];
}
if (strDat.length > 1 && StringUtil.notEmpty(strDat[1])) {
queueName = strDat[1];
}
for (JSONObject jsonObject : printData) {
jsonObject.put("LABEL_QTY", 1);
jsonObject.put("PRINT_NAME", printer);
jsonObject.put("QUEUE_NAME", "");
jsonObject.put("PRINT_NAME", printerNameFinal);
jsonObject.put("QUEUE_NAME", queueName);
jsonObject.put("TEMPLATE", isSecrecy ? "RAM_LABEL_002.lab" : "RAM_LABEL_001.lab");
remotePrintService.remotePrintSaveLog(jsonObject);
}