|
|
|
@ -3,11 +3,13 @@ package com.glxp.api.controller.basic;
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
|
|
|
|
import com.glxp.api.common.enums.ResultEnum;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.dao.inout.IoOrderInvoiceMapper;
|
|
|
|
|
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
|
|
|
|
|
import com.glxp.api.entity.basic.UdiProductEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.IoCodeEntity;
|
|
|
|
@ -31,6 +33,7 @@ import com.glxp.api.service.system.*;
|
|
|
|
|
import com.glxp.api.util.IntUtil;
|
|
|
|
|
import com.glxp.api.util.JasperUtils;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
@ -94,7 +97,8 @@ public class BasicOrderPrintController {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private IoOrderInvoiceMapper ioOrderInvoiceMapper;
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@PostMapping("/udiwms/pdf/template/order/file")
|
|
|
|
|
public void printSupCertProduction(@RequestBody FilterOrderPrintRequest filterOrderPrintRequest, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
|
@ -156,7 +160,19 @@ public class BasicOrderPrintController {
|
|
|
|
|
bizData.put("zczbhhzbapzbh", obj.getCertCode() == null ? ' ' : obj.getCertCode());
|
|
|
|
|
bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc());
|
|
|
|
|
bizData.put("fromSpmsOrders", ioOrderResponse.getFromSpmsOrders() == null ? ' ' : ioOrderResponse.getFromSpmsOrders());
|
|
|
|
|
bizData.put("invoiceCode",ioOrderResponse.getInvoiceCode());
|
|
|
|
|
|
|
|
|
|
List<IoOrderInvoiceEntity> list1 = ioOrderInvoiceMapper.selectList(new QueryWrapper<IoOrderInvoiceEntity>()
|
|
|
|
|
.eq("orderIdFk",filterOrderPrintRequest.getOrderIdFk())
|
|
|
|
|
);
|
|
|
|
|
String code = "";
|
|
|
|
|
if(list1!= null && list1.size()>0){
|
|
|
|
|
for (IoOrderInvoiceEntity ioOrderInvoiceEntity : list1) {
|
|
|
|
|
if(StringUtils.isNotEmpty(ioOrderInvoiceEntity.getInvoiceEncode())){
|
|
|
|
|
code+=ioOrderInvoiceEntity.getInvoiceEncode()+",";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
bizData.put("invoiceCode",code);
|
|
|
|
|
|
|
|
|
|
//添加发票号
|
|
|
|
|
String fphm = "";
|
|
|
|
@ -235,7 +251,17 @@ public class BasicOrderPrintController {
|
|
|
|
|
bizData.put("zczbhhzbapzbh", ioOrderDetailBizEntity.getCertCode() == null ? ' ' : ioOrderDetailBizEntity.getCertCode());
|
|
|
|
|
bizData.put("udiCode", obj.getCode().replaceAll("\u001D", ""));
|
|
|
|
|
bizData.put("fromSpmsOrders", ioOrderResponse.getFromSpmsOrders() == null ? ' ' : ioOrderResponse.getFromSpmsOrders());
|
|
|
|
|
|
|
|
|
|
List<IoOrderInvoiceEntity> list1 = ioOrderInvoiceMapper.selectList(new QueryWrapper<IoOrderInvoiceEntity>()
|
|
|
|
|
.eq("orderIdFk",ioOrderResponse.getBillNo())
|
|
|
|
|
);
|
|
|
|
|
String code = "";
|
|
|
|
|
if(list1!= null && list1.size()>0){
|
|
|
|
|
for (IoOrderInvoiceEntity ioOrderInvoiceEntity : list1) {
|
|
|
|
|
if(StringUtils.isNotEmpty(ioOrderInvoiceEntity.getInvoiceEncode())){
|
|
|
|
|
code+=ioOrderInvoiceEntity.getInvoiceEncode()+",";
|
|
|
|
|
} }
|
|
|
|
|
}
|
|
|
|
|
bizData.put("invoiceCode",code);
|
|
|
|
|
//添加发票号
|
|
|
|
|
String fphm = "";
|
|
|
|
|
String fprq = null;
|
|
|
|
|