|
|
|
@ -12,6 +12,7 @@ import com.glxp.api.entity.inout.IoOrderEntity;
|
|
|
|
|
import com.glxp.api.entity.inv.InnerOrderDetailEntity;
|
|
|
|
|
import com.glxp.api.entity.inv.InvInnerOrderPdfTempEntity;
|
|
|
|
|
import com.glxp.api.entity.inv.InvInnerOrderPrintEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SystemPDFModuleEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
|
|
|
|
|
import com.glxp.api.req.basic.FilterUdiRelRequest;
|
|
|
|
@ -112,11 +113,11 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
filterUdiRelRequest.setId(Long.valueOf(obj.getProductId()));
|
|
|
|
|
filterUdiRelRequest.setPackLevel(udiRelevanceDao.selectPackLevel(obj.getNameCode()));
|
|
|
|
|
System.out.println(filterUdiRelRequest.getPackLevel());
|
|
|
|
|
int a=0;
|
|
|
|
|
if (filterUdiRelRequest.getPackLevel()==null){
|
|
|
|
|
a=0;
|
|
|
|
|
}else {
|
|
|
|
|
a=Integer.parseInt(filterUdiRelRequest.getPackLevel())-1;
|
|
|
|
|
int a = 0;
|
|
|
|
|
if (filterUdiRelRequest.getPackLevel() == null) {
|
|
|
|
|
a = 0;
|
|
|
|
|
} else {
|
|
|
|
|
a = Integer.parseInt(filterUdiRelRequest.getPackLevel()) - 1;
|
|
|
|
|
}
|
|
|
|
|
//查询耗材字典信息
|
|
|
|
|
//UdiRelevanceResponse filterUdiRelevance = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest).get(0);
|
|
|
|
@ -125,7 +126,7 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(filterUdiRelevance.getNameCode());
|
|
|
|
|
|
|
|
|
|
String udiCode = "#" + udiProductEntity.getNameCode() + "#" + obj.getProductDate() + "#" + obj.getExpireDate() +
|
|
|
|
|
"#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + "#" ;
|
|
|
|
|
"#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + "#";
|
|
|
|
|
udiCode = udiCode.replaceAll("#null", "#");
|
|
|
|
|
innerOrderPrintEntity.setUdiCode(udiCode);
|
|
|
|
|
invInnerOrderPrintDao.insert(innerOrderPrintEntity);
|
|
|
|
@ -161,11 +162,9 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageSimpleResponse print(InnerOrderQRCodeTextPDFTemplateRequest innerOrderQRCodeTextPDFTemplateRequest) {
|
|
|
|
|
|
|
|
|
|
SystemPDFModuleEntity systemPDFModuleEntity = systemPDFModuleService.selectById(6 + "");
|
|
|
|
|
if (systemPDFModuleEntity == null) return null;
|
|
|
|
|
SysPdfTemplateRelevanceLabelEntity sysPdfTemplateRelevanceLabelEntity = systemPDFModuleService.selectByLabelId(1 + "");
|
|
|
|
|
SystemPDFTemplateEntity systemPDFTemplateEntity =
|
|
|
|
|
systemPDFTemplateService.selectById(String.valueOf(systemPDFModuleEntity.getTemplateId()));
|
|
|
|
|
systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceLabelEntity.getTemplateId()));
|
|
|
|
|
if (systemPDFTemplateEntity == null) return null;
|
|
|
|
|
List<InnerOrderPrintResponse> printEntities = new ArrayList<>();
|
|
|
|
|
List<InnerOrderPrintResponse> mStockPrintEntities = new ArrayList<>();
|
|
|
|
@ -207,13 +206,13 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
InvInnerOrderPdfTempEntity stockPrintTempEntity = new InvInnerOrderPdfTempEntity();
|
|
|
|
|
if (innerOrderQRCodeTextPDFTemplateRequest.getOrderId() != null) {
|
|
|
|
|
String fileName = innerOrderQRCodeTextPDFTemplateRequest.getOrderId() + "__" + index + "__标签打印" + ".pdf";
|
|
|
|
|
String filePath = dirPath + "\\pdfprint\\" + fileName;
|
|
|
|
|
String filePath = dirPath + "pdfprint/" + fileName;
|
|
|
|
|
stockPrintTempEntity.setFileName(fileName);
|
|
|
|
|
stockPrintTempEntity.setFilePath(filePath);
|
|
|
|
|
stockPrintTempEntity.setStockOrderFk(innerOrderQRCodeTextPDFTemplateRequest.getOrderId());
|
|
|
|
|
} else {
|
|
|
|
|
String fileName = innerOrderQRCodeTextPDFTemplateRequest.getQueryId() + "__" + index + "__标签打印" + ".pdf";
|
|
|
|
|
String filePath = dirPath + "\\pdfprint\\" + fileName;
|
|
|
|
|
String filePath = dirPath + "pdfprint/" + fileName;
|
|
|
|
|
stockPrintTempEntity.setFileName(fileName);
|
|
|
|
|
stockPrintTempEntity.setFilePath(filePath);
|
|
|
|
|
stockPrintTempEntity.setPrintCodeIdFk(innerOrderQRCodeTextPDFTemplateRequest.getQueryId());
|
|
|
|
@ -222,7 +221,7 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
stockPrintTempEntity.setGenkey(CustomUtil.getId());
|
|
|
|
|
stockPrintTempEntities.add(stockPrintTempEntity);
|
|
|
|
|
}
|
|
|
|
|
jaspaperService.printPdfLocal(splits, stockPrintTempEntities, systemPDFTemplateEntity.getPath());
|
|
|
|
|
jaspaperService.printPdfLocal(splits, stockPrintTempEntities, dirPath + "pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()));
|
|
|
|
|
|
|
|
|
|
innerOrderPdfTempService.insertStockPrintTempList(stockPrintTempEntities);
|
|
|
|
|
|
|
|
|
@ -276,7 +275,8 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
innerOrderPrintEntity.setExpireDate(obj.getExpireDate());
|
|
|
|
|
innerOrderPrintEntity.setProductDate(obj.getProductDate());
|
|
|
|
|
innerOrderPrintEntity.setProductName(obj.getCoName());
|
|
|
|
|
innerOrderPrintEntity.setCount(obj.getCount());
|
|
|
|
|
// obj.getCount()
|
|
|
|
|
innerOrderPrintEntity.setCount(1);
|
|
|
|
|
innerOrderPrintEntity.setBatchNo(obj.getBatchNo());
|
|
|
|
|
innerOrderPrintEntity.setCreateTime(new Date());
|
|
|
|
|
innerOrderPrintEntity.setType(2);
|
|
|
|
@ -292,7 +292,7 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(filterUdiRelevance.getNameCode());
|
|
|
|
|
|
|
|
|
|
String udiCode = "#" + obj.getNameCode() + "#" + obj.getProductDate() + "#" + obj.getExpireDate() +
|
|
|
|
|
"#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + "#" ;
|
|
|
|
|
"#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + "#";
|
|
|
|
|
udiCode = udiCode.replaceAll("#null", "#");
|
|
|
|
|
innerOrderPrintEntity.setUdiCode(udiCode);
|
|
|
|
|
invInnerOrderPrintDao.insert(innerOrderPrintEntity);
|
|
|
|
|