From d53659b2726a6444d51973133a1c79f60f1eaf26 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Wed, 19 Jul 2023 10:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/BasicOrderPrintController.java | 29 ++++++++++++++++++- .../api/dao/inout/IoOrderDetailBizDao.java | 2 ++ .../inout/IoOrderDetailBizService.java | 2 ++ .../impl/IoOrderDetailBizServiceImpl.java | 5 ++++ .../mapper/inout/IoOrderDetailBizDao.xml | 7 +++++ 5 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java index ac6661e8..65d19b38 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java @@ -20,6 +20,7 @@ import com.glxp.api.req.inout.InspectionPDFTemplateRequest; import com.glxp.api.req.purchase.FilterSupManufacturerRequest; import com.glxp.api.req.purchase.purPlanPrintRequest; import com.glxp.api.req.system.FilterPdfTemplateRequest; +import com.glxp.api.res.inout.IoOrderInvoiceResponse; import com.glxp.api.res.inout.IoOrderResponse; import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse; import com.glxp.api.service.basic.IBasicBussinessTypeService; @@ -122,6 +123,7 @@ public class BasicOrderPrintController { for (IoOrderDetailBizEntity obj : ioOrderDetailBizEntityList) { //查询产品表 UdiProductEntity udiProductEntity = udiProductService.findByUuid(obj.getUuidFk()); + List ioOrderInvoiceResponses = ioOrderDetailBizService.selectByorderIdFk(obj.getOrderIdFk()); //组装数据 Map bizData = new HashMap<>(); bizData.put("index", i); @@ -144,6 +146,19 @@ public class BasicOrderPrintController { bizData.put("manufactor", obj.getManufacturer()); bizData.put("zczbhhzbapzbh", obj.getCertCode() == null ? ' ' : obj.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=""; + for (IoOrderInvoiceResponse respons : ioOrderInvoiceResponses) { + encode+=respons.getInvoiceEncode()+","; + } + encode = encode.substring(0,encode.length()-1); + bizData.put("invoiceEncode", encode == null ? ' ' : encode); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String dateStr = sdf.format(ioOrderInvoiceResponses.get(0).getCreateTime()); + bizData.put("createTime", dateStr == null ? ' ' : dateStr); + + } list.add(bizData); i++; } @@ -170,7 +185,7 @@ public class BasicOrderPrintController { } //查询产品表 UdiProductEntity udiProductEntity = udiProductService.findByUuid(ioOrderDetailBizEntity.getUuidFk()); - + List ioOrderInvoiceResponses = ioOrderDetailBizService.selectByorderIdFk(ioOrderDetailBizEntity.getOrderIdFk()); //组装数据 Map bizData = new HashMap<>(); bizData.put("index", i); @@ -193,6 +208,18 @@ public class BasicOrderPrintController { 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=""; + for (IoOrderInvoiceResponse respons : ioOrderInvoiceResponses) { + encode+=respons.getInvoiceEncode()+","; + } + encode = encode.substring(0,encode.length()-1); + bizData.put("invoiceEncode", encode == null ? ' ' : encode); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String dateStr = sdf.format(ioOrderInvoiceResponses.get(0).getCreateTime()); + bizData.put("createTime", dateStr == null ? ' ' : dateStr); + } list.add(bizData); i++; } diff --git a/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java b/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java index c30b546f..a26a90c1 100644 --- a/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java +++ b/src/main/java/com/glxp/api/dao/inout/IoOrderDetailBizDao.java @@ -27,6 +27,8 @@ public interface IoOrderDetailBizDao extends BaseMapperPlus filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest); + List selectByorderIdFk(String orderIdFk); + IoOrderInvoiceResponse selectByinvoiceId(Long id); /** diff --git a/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java b/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java index 5b0a9ffa..34d77e15 100644 --- a/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java +++ b/src/main/java/com/glxp/api/service/inout/IoOrderDetailBizService.java @@ -46,6 +46,8 @@ public interface IoOrderDetailBizService { List filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest); + List selectByorderIdFk(String orderIdFk); + IoOrderInvoiceResponse selectByinvoiceId(Long id); Boolean updateOrderDetailBiz(IoOrderDetailBizEntity ioOrderDetailBizEntity); diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java index 70ced51f..46a7eb2c 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java @@ -191,6 +191,11 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { return ioOrderDetailBizDao.filterListInv(orderDetailBizRequest); } + @Override + public List selectByorderIdFk(String orderIdFk) { + return ioOrderDetailBizDao.selectByorderIdFk(orderIdFk); + } + @Override public IoOrderInvoiceResponse selectByinvoiceId(Long id) { return ioOrderDetailBizDao.selectByinvoiceId(id); diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml index ef29a18a..28da472e 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDetailBizDao.xml @@ -81,6 +81,13 @@ where id = #{id} + +