Browse Source

ifs正式库的BoxLabel数据

master
han\hanst 1 week ago
parent
commit
197bd9c489
  1. 14
      src/main/java/com/gaotao/modules/base/service/Impl/ReportLabelListServiceImpl.java

14
src/main/java/com/gaotao/modules/base/service/Impl/ReportLabelListServiceImpl.java

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

Loading…
Cancel
Save