From f9e8408fa05728bf265081eb63a78f4a5a7baa0d Mon Sep 17 00:00:00 2001 From: x_z Date: Wed, 4 Jan 2023 17:12:19 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=B0=83=E6=95=B4=E6=A8=A1=E6=9D=BF=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/info/SystemPDFTemplateController.java | 4 ++-- .../controller/inventory/DeviceMAOrderController.java | 7 ++++++- .../controller/inventory/InvCountOrderController.java | 6 +++++- .../service/inventory/impl/DeviceMAOrderServiceImpl.java | 1 + 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/info/SystemPDFTemplateController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/info/SystemPDFTemplateController.java index 9e579803..4fd4e5d9 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/info/SystemPDFTemplateController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/info/SystemPDFTemplateController.java @@ -69,10 +69,10 @@ public class SystemPDFTemplateController { String data = ""; if (systemPDFTemplateEntity.getModule() == 2) { data = - "{\"data\":[{\"batchNo\":\"2020\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"1\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\"},{\"batchNo\":\"2023\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"2\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\"},{\"batchNo\":\"2021\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"3\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\",\"maintenanceStatus\":\"已养护\",\"code\":\"0106972825505180112101241725012421x003\",\"orderId\":\"DMA202212300022\",\"createTime\":\"2022/12/30 11:06:43\",\"createUser\":\"超级用户\",\"remark\":\"备注\",\"productName\":\"裂解仪\",\"deviceStatus\":\"正常\"}]}"; + "{\"data\":[{\"batchNo\":\"2020\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"1\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\",\"maintenanceStatus\":\"已养护\",\"code\":\"0106972825505180112101241725012421x003\",\"orderId\":\"DMA202212300022\",\"createTime\":\"2022-12-30 11:06:43\",\"createUser\":\"超级用户\",\"remark\":\"备注\",\"productName\":\"裂解仪\",\"deviceStatus\":\"正常\",\"auditUser\":\"超级用户\"},{\"batchNo\":\"2023\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"2\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\",\"maintenanceStatus\":\"已养护\",\"code\":\"0106972825505180112101241725012421x003\",\"orderId\":\"DMA202212300022\",\"createTime\":\"2022-12-30 11:06:43\",\"createUser\":\"超级用户\",\"remark\":\"备注\",\"productName\":\"裂解仪\",\"deviceStatus\":\"正常\",\"auditUser\":\"超级用户\"},{\"batchNo\":\"2021\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"3\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\",\"maintenanceStatus\":\"已养护\",\"code\":\"0106972825505180112101241725012421x003\",\"orderId\":\"DMA202212300022\",\"createTime\":\"2022-12-30 11:06:43\",\"createUser\":\"超级用户\",\"remark\":\"备注\",\"productName\":\"裂解仪\",\"deviceStatus\":\"正常\",\"auditUser\":\"超级用户\"}]}"; } else if (systemPDFTemplateEntity.getModule() == 0) { data = - "{\"data\":[{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"}]}"; + "{\"data\":[{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"}]}"; } JasperUtils.jasperReport(request, response, data, systemPDFTemplateEntity.getPath(), "pdf"); diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/DeviceMAOrderController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/DeviceMAOrderController.java index 1c9f13ff..cb8761f4 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/DeviceMAOrderController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/DeviceMAOrderController.java @@ -1,5 +1,6 @@ package com.glxp.api.admin.controller.inventory; +import cn.hutool.json.JSONUtil; import com.github.pagehelper.PageInfo; import com.glxp.api.admin.annotation.AuthRuleAnnotation; import com.glxp.api.admin.entity.info.SystemPDFModuleEntity; @@ -28,6 +29,8 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -166,7 +169,9 @@ public class DeviceMAOrderController { SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(filterDeviceMAOrderRequest.getTemplateId()); //查询打印数据 Map data = deviceMAOrderService.getPrintData(filterDeviceMAOrderRequest.getOrderId()); - JasperUtils.jasperReport(request, response, data, systemPDFTemplateEntity.getPath(), "pdf"); + Map>> printData = new HashMap<>(1); + printData.put("data", Arrays.asList(data)); + JasperUtils.jasperReport(request, response, JSONUtil.toJsonStr(printData), systemPDFTemplateEntity.getPath(), "pdf"); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvCountOrderController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvCountOrderController.java index 2a85a0e9..d7aa2ac5 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvCountOrderController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvCountOrderController.java @@ -1,6 +1,7 @@ package com.glxp.api.admin.controller.inventory; import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; import com.github.pagehelper.PageInfo; import com.glxp.api.admin.annotation.AuthRuleAnnotation; import com.glxp.api.admin.entity.info.SystemPDFModuleEntity; @@ -31,6 +32,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -168,7 +170,9 @@ public class InvCountOrderController { //打印单号标签 Map data = new HashMap<>(1); data.put("orderId", invCountOrderPrintRequest.getOrderId()); - JasperUtils.jasperReport(request, response, data, systemPDFTemplateEntity.getPath(), "pdf"); + Map>> printData = new HashMap<>(1); + printData.put("data", Arrays.asList(data)); + JasperUtils.jasperReport(request, response, JSONUtil.toJsonStr(printData), systemPDFTemplateEntity.getPath(), "pdf"); } //------------------------------------------------------手持终端接口--------------------------------------------------------------- diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/DeviceMAOrderServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/DeviceMAOrderServiceImpl.java index 9e0227a5..749db94a 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/DeviceMAOrderServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/DeviceMAOrderServiceImpl.java @@ -71,6 +71,7 @@ public class DeviceMAOrderServiceImpl implements DeviceMAOrderService { deviceMAOrderEntity.setOrderId(gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.DEVICE_MA_ORDER, "yyyyMMdd"))); deviceMAOrderEntity.setCreateUser(customerService.getUserBean().getUserName()); deviceMAOrderEntity.setCreateTime(DateUtil.getDateTime()); + deviceMAOrderEntity.setAuditUser(customerService.getUserBean().getUserName()); deviceMAOrderEntity.setStatus(0); deviceMAOrderEntity.setUpdateTime(DateUtil.getDateTime()); deviceMAOrderDao.insert(deviceMAOrderEntity);