|
|
@ -17,6 +17,7 @@ import com.gaotao.modules.handlingunit.service.HandlingUnitService; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.context.annotation.Lazy; |
|
|
import org.springframework.context.annotation.Lazy; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -51,6 +52,9 @@ public class ReportLabelListServiceImpl extends ServiceImpl<ReportLabelListMappe |
|
|
@Autowired |
|
|
@Autowired |
|
|
private PrintTaskService printTaskService; |
|
|
private PrintTaskService printTaskService; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${custom.ifs-ifsDBName}") |
|
|
|
|
|
private String ifsDBName; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
@Transactional |
|
|
@Transactional |
|
|
public void saveZplElements(ZplDataDto zplDataDto) { |
|
|
public void saveZplElements(ZplDataDto zplDataDto) { |
|
|
@ -613,16 +617,24 @@ public class ReportLabelListServiceImpl extends ServiceImpl<ReportLabelListMappe |
|
|
|
|
|
|
|
|
LabelSettingData labelSetting = labelSettingDataList.get(0); |
|
|
LabelSettingData labelSetting = labelSettingDataList.get(0); |
|
|
if (!printFlag) { |
|
|
if (!printFlag) { |
|
|
String dateStr = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
|
|
|
|
|
// 生成前缀:A+site+YYYYMMDD |
|
|
// 生成前缀:A+site+YYYYMMDD |
|
|
String prefix = "A" + "5520250929"; |
|
|
String prefix = "A" + "5520250929"; |
|
|
List<String> unitIds = Collections.singletonList(prefix+"00000001"); |
|
|
List<String> unitIds = Collections.singletonList(prefix+"00000001"); |
|
|
queryParams.put("unitIds", unitIds); |
|
|
queryParams.put("unitIds", unitIds); |
|
|
|
|
|
if ("IFST".equalsIgnoreCase(ifsDBName)) { |
|
|
|
|
|
// 测试库(IFST)保留现有默认测试数据 |
|
|
queryParams.put("consignmentId", "1654576"); |
|
|
queryParams.put("consignmentId", "1654576"); |
|
|
queryParams.put("jobNo", "71305202"); |
|
|
queryParams.put("jobNo", "71305202"); |
|
|
queryParams.put("lineNo", "1"); |
|
|
queryParams.put("lineNo", "1"); |
|
|
queryParams.put("relNo", "1"); |
|
|
queryParams.put("relNo", "1"); |
|
|
queryParams.put("lineItemNo", 0); |
|
|
queryParams.put("lineItemNo", 0); |
|
|
|
|
|
} else { |
|
|
|
|
|
queryParams.put("consignmentId", "1773845"); |
|
|
|
|
|
queryParams.put("jobNo", "71330430"); |
|
|
|
|
|
queryParams.put("lineNo", "19"); |
|
|
|
|
|
queryParams.put("relNo", "1"); |
|
|
|
|
|
queryParams.put("lineItemNo",0); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
// 使用真实数据生成ZPL代码 |
|
|
// 使用真实数据生成ZPL代码 |
|
|
List<String> zplCodeList = labelDataProcessorService.generateZplWithRealData(reportId, elements, labelSetting, printFlag, queryParams); |
|
|
List<String> zplCodeList = labelDataProcessorService.generateZplWithRealData(reportId, elements, labelSetting, printFlag, queryParams); |
|
|
|