1.调整模板打印接口

zhairh
x_z 2 years ago
parent 06bdab6fbb
commit f9e8408fa0

@ -69,10 +69,10 @@ public class SystemPDFTemplateController {
String data = ""; String data = "";
if (systemPDFTemplateEntity.getModule() == 2) { if (systemPDFTemplateEntity.getModule() == 2) {
data = 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) { } else if (systemPDFTemplateEntity.getModule() == 0) {
data = 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"); JasperUtils.jasperReport(request, response, data, systemPDFTemplateEntity.getPath(), "pdf");

@ -1,5 +1,6 @@
package com.glxp.api.admin.controller.inventory; package com.glxp.api.admin.controller.inventory;
import cn.hutool.json.JSONUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.annotation.AuthRuleAnnotation; import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.entity.info.SystemPDFModuleEntity; 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.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -166,7 +169,9 @@ public class DeviceMAOrderController {
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(filterDeviceMAOrderRequest.getTemplateId()); SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(filterDeviceMAOrderRequest.getTemplateId());
//查询打印数据 //查询打印数据
Map<String, Object> data = deviceMAOrderService.getPrintData(filterDeviceMAOrderRequest.getOrderId()); Map<String, Object> data = deviceMAOrderService.getPrintData(filterDeviceMAOrderRequest.getOrderId());
JasperUtils.jasperReport(request, response, data, systemPDFTemplateEntity.getPath(), "pdf"); Map<String, List<Map<String, Object>>> printData = new HashMap<>(1);
printData.put("data", Arrays.asList(data));
JasperUtils.jasperReport(request, response, JSONUtil.toJsonStr(printData), systemPDFTemplateEntity.getPath(), "pdf");
} }

@ -1,6 +1,7 @@
package com.glxp.api.admin.controller.inventory; package com.glxp.api.admin.controller.inventory;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.annotation.AuthRuleAnnotation; import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.entity.info.SystemPDFModuleEntity; 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.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -168,7 +170,9 @@ public class InvCountOrderController {
//打印单号标签 //打印单号标签
Map<String, Object> data = new HashMap<>(1); Map<String, Object> data = new HashMap<>(1);
data.put("orderId", invCountOrderPrintRequest.getOrderId()); data.put("orderId", invCountOrderPrintRequest.getOrderId());
JasperUtils.jasperReport(request, response, data, systemPDFTemplateEntity.getPath(), "pdf"); Map<String, List<Map<String, Object>>> printData = new HashMap<>(1);
printData.put("data", Arrays.asList(data));
JasperUtils.jasperReport(request, response, JSONUtil.toJsonStr(printData), systemPDFTemplateEntity.getPath(), "pdf");
} }
//------------------------------------------------------手持终端接口--------------------------------------------------------------- //------------------------------------------------------手持终端接口---------------------------------------------------------------

@ -71,6 +71,7 @@ public class DeviceMAOrderServiceImpl implements DeviceMAOrderService {
deviceMAOrderEntity.setOrderId(gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.DEVICE_MA_ORDER, "yyyyMMdd"))); deviceMAOrderEntity.setOrderId(gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.DEVICE_MA_ORDER, "yyyyMMdd")));
deviceMAOrderEntity.setCreateUser(customerService.getUserBean().getUserName()); deviceMAOrderEntity.setCreateUser(customerService.getUserBean().getUserName());
deviceMAOrderEntity.setCreateTime(DateUtil.getDateTime()); deviceMAOrderEntity.setCreateTime(DateUtil.getDateTime());
deviceMAOrderEntity.setAuditUser(customerService.getUserBean().getUserName());
deviceMAOrderEntity.setStatus(0); deviceMAOrderEntity.setStatus(0);
deviceMAOrderEntity.setUpdateTime(DateUtil.getDateTime()); deviceMAOrderEntity.setUpdateTime(DateUtil.getDateTime());
deviceMAOrderDao.insert(deviceMAOrderEntity); deviceMAOrderDao.insert(deviceMAOrderEntity);

Loading…
Cancel
Save