内部码分页打印问题,默认打印数量为为1

test
anthonywj 1 year ago
parent ffe583217d
commit 5df22a6981

@ -12,9 +12,11 @@ import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.entity.system.*;
import com.glxp.api.req.basic.FilterOrderPrintRequest;
import com.glxp.api.req.inout.FilterOrderRequest;
import com.glxp.api.res.basic.UdiRelevanceResponse;
import com.glxp.api.res.inout.IoOrderResponse;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
import com.glxp.api.service.basic.UdiProductService;
import com.glxp.api.service.basic.UdiRelevanceService;
import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderService;
import com.glxp.api.service.inout.impl.IoCodeService;
@ -51,6 +53,9 @@ public class BasicOrderPrintController {
SystemPDFTemplateService systemPDFTemplateService;
@Resource
IoOrderDetailBizService ioOrderDetailBizService;
@Resource
UdiRelevanceService udiRelevanceService;
@Resource
IoOrderService ioOrderService;
@Resource
@ -173,7 +178,9 @@ public class BasicOrderPrintController {
}
}
//查询产品表
UdiProductEntity udiProductEntity = udiProductService.findByUuid(ioOrderDetailBizEntity.getUuidFk());
// UdiProductEntity udiProductEntity = udiProductService.findByUuid(ioOrderDetailBizEntity.getUuidFk());
UdiRelevanceResponse udiProductEntity = udiRelevanceService.selectByRelId(obj.getRelId() + "");
// List<IoOrderInvoiceResponse> ioOrderInvoiceResponses = ioOrderDetailBizService.selectByorderIdFk(ioOrderDetailBizEntity.getOrderIdFk());
//组装数据
Map<String, Object> bizData = new HashMap<>();
@ -184,7 +191,11 @@ public class BasicOrderPrintController {
bizData.put("billdate", formatter.format(ioOrderResponse.getCreateTime()));
bizData.put("remark1", sysPdfTemplateRelevanceCodeEntity.getRemark1() == null ? ' ' : sysPdfTemplateRelevanceCodeEntity.getRemark1());
bizData.put("remark2", sysPdfTemplateRelevanceCodeEntity.getRemark2() == null ? ' ' : sysPdfTemplateRelevanceCodeEntity.getRemark2());
bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms());
if (udiProductEntity != null) {
bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms());
bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc());
}
bizData.put("spmc", ioOrderDetailBizEntity.getCoName() == null ? ' ' : ioOrderDetailBizEntity.getCoName());
bizData.put("spec", ioOrderDetailBizEntity.getSpec() == null ? ' ' : ioOrderDetailBizEntity.getSpec());
bizData.put("count", ioOrderDetailBizEntity.getCount());
@ -196,7 +207,7 @@ public class BasicOrderPrintController {
bizData.put("expireDate", ioOrderDetailBizEntity.getExpireDate());
bizData.put("manufactor", ioOrderDetailBizEntity.getManufacturer());
bizData.put("zczbhhzbapzbh", ioOrderDetailBizEntity.getCertCode() == null ? ' ' : ioOrderDetailBizEntity.getCertCode());
bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc());
// bizData.put("cplb", udiProductEntity.getCplb() == null ? ' ' : udiProductEntity.getCplb());
// if(ioOrderInvoiceResponses != null && ioOrderInvoiceResponses.size()>0){
// String encode="";
@ -289,7 +300,7 @@ public class BasicOrderPrintController {
bizData.put("index", i);
bizData.put("nameCode", obj.getNameCode() == null ? ' ' : obj.getNameCode());
String udiCode = "#" + obj.getNameCode() + "#" + obj.getProduceDate() + "#" + obj.getExpireDate() +
"#" + obj.getBatchNo() + "#" + obj.getSerialNo() + "#" + "#";
"#" + obj.getBatchNo() + "#" + obj.getSerialNo() + "#" + "#";
udiCode = udiCode.replaceAll("#null", "#");
bizData.put("udiCode", udiCode);
bizData.put("cpmctymc", udiProductEntity.getCpmctymc() == null ? ' ' : udiProductEntity.getCpmctymc());

@ -100,8 +100,10 @@ public class UdiRelevanceServiceImpl extends ServiceImpl<UdiRelevanceDao, UdiRel
@Override
public UdiRelevanceResponse selectByRelId(String relId) {
if (StrUtil.isEmpty(relId))
return null;
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setRelId(relId);
filterUdiRelRequest.setId(Long.parseLong(relId));
List<UdiRelevanceResponse> udiRelevanceResponses = filterUdiRelevance(filterUdiRelRequest);
if (CollUtil.isNotEmpty(udiRelevanceResponses)) {
return udiRelevanceResponses.get(0);

@ -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);

@ -542,7 +542,7 @@
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and io.status = 7
and io.status = 7 or io.status = 10
)
</if>

@ -145,6 +145,7 @@
select *
from thr_products_add_di
where uuid = #{uuid}
limit 1
</select>

Loading…
Cancel
Save