|
|
|
@ -11,13 +11,16 @@ import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.constant.ConstantType;
|
|
|
|
|
import com.glxp.api.controller.BaseController;
|
|
|
|
|
import com.glxp.api.entity.auth.AuthAdmin;
|
|
|
|
|
import com.glxp.api.entity.auth.AuthCompany;
|
|
|
|
|
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.IoOrderDetailCodeEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.IoOrderEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.IoOrderInvoiceEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
|
|
|
|
|
import com.glxp.api.entity.thrsys.ThrProductsEntity;
|
|
|
|
|
import com.glxp.api.req.inout.*;
|
|
|
|
|
import com.glxp.api.res.inout.CptTraceOrderResponse;
|
|
|
|
|
import com.glxp.api.res.inout.CptTraceResultResponse;
|
|
|
|
@ -26,11 +29,14 @@ import com.glxp.api.res.inout.IoOrderDetailResultResponse;
|
|
|
|
|
import com.glxp.api.service.auth.AuthCompanyService;
|
|
|
|
|
import com.glxp.api.service.basic.IBasicBussinessTypeService;
|
|
|
|
|
import com.glxp.api.service.inout.*;
|
|
|
|
|
import com.glxp.api.service.inout.impl.IoOrderInvoiceService;
|
|
|
|
|
import com.glxp.api.service.system.SystemPDFModuleService;
|
|
|
|
|
import com.glxp.api.service.system.SystemPDFTemplateService;
|
|
|
|
|
import com.glxp.api.service.thrsys.ThrProductsService;
|
|
|
|
|
import com.glxp.api.util.DateUtil;
|
|
|
|
|
import com.glxp.api.util.JasperUtils;
|
|
|
|
|
import net.sf.jasperreports.engine.JRException;
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
@ -66,6 +72,10 @@ public class IoOrderDetailResultController extends BaseController {
|
|
|
|
|
private String filePath;
|
|
|
|
|
@Resource
|
|
|
|
|
AuthCompanyService authCompanyService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrProductsService thrProductsService;
|
|
|
|
|
@Resource
|
|
|
|
|
private IoOrderInvoiceService ioOrderInvoiceService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询单据扫码明细列表
|
|
|
|
@ -205,6 +215,7 @@ public class IoOrderDetailResultController extends BaseController {
|
|
|
|
|
if (filterOrderDetailResultRequest.getList() != null && filterOrderDetailResultRequest.getList().size() > 0) {
|
|
|
|
|
ioOrderDetailResultResponseList = filterOrderDetailResultRequest.getList();
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
//按查询打印
|
|
|
|
|
FilterOrderRequest filterOrderRequest = new FilterOrderRequest();
|
|
|
|
|
filterOrderRequest.setVueType(filterOrderDetailResultRequest.getActionType());
|
|
|
|
@ -226,6 +237,25 @@ public class IoOrderDetailResultController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
int i = 1;
|
|
|
|
|
for (IoOrderDetailResultResponse ioOrderDetailResultResponse : ioOrderDetailResultResponseList) {
|
|
|
|
|
//查询第三方产品产品类别
|
|
|
|
|
ThrProductsEntity thrProductsEntity = thrProductsService.filterThrProductsByMainId(ioOrderDetailResultResponse.getBindRlFk() + "");
|
|
|
|
|
//查询发票信息
|
|
|
|
|
String dateStr="";
|
|
|
|
|
List<String> encodeList=new ArrayList<>();
|
|
|
|
|
IoOrderInvoiceRequest ioOrderInvoiceRequest=new IoOrderInvoiceRequest();
|
|
|
|
|
ioOrderInvoiceRequest.setBindRlFk(ioOrderDetailResultResponse.getBindRlFk() + "");
|
|
|
|
|
ioOrderInvoiceRequest.setOrderIdFk(ioOrderDetailResultResponse.getOrderIdFk());
|
|
|
|
|
ioOrderInvoiceRequest.setBatchNo(ioOrderDetailResultResponse.getBatchNo());
|
|
|
|
|
List<IoOrderInvoiceEntity> ioOrderInvoiceEntityList=ioOrderInvoiceService.selectOrderInvoice(ioOrderInvoiceRequest);
|
|
|
|
|
for (IoOrderInvoiceEntity ioOrderInvoiceEntity : ioOrderInvoiceEntityList) {
|
|
|
|
|
encodeList.add(ioOrderInvoiceEntity.getInvoiceEncode());
|
|
|
|
|
}
|
|
|
|
|
String encode=String.join(",", encodeList);
|
|
|
|
|
if(CollectionUtils.isNotEmpty(ioOrderInvoiceEntityList)){
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
dateStr = sdf.format(ioOrderInvoiceEntityList.get(0).getCreateTime());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//组装数据
|
|
|
|
|
Map<String, Object> ioOrderDetailResultData = new HashMap<>();
|
|
|
|
|
ioOrderDetailResultData.put("index", String.valueOf(i));
|
|
|
|
@ -248,11 +278,15 @@ public class IoOrderDetailResultController extends BaseController {
|
|
|
|
|
ioOrderDetailResultData.put("billTypeName", ioOrderDetailResultResponse.getBillTypeName() == null ? ' ' : ioOrderDetailResultResponse.getBillTypeName());
|
|
|
|
|
ioOrderDetailResultData.put("mainAction", ioOrderDetailResultResponse.getMainAction() == null ? ' ' : ioOrderDetailResultResponse.getMainAction());
|
|
|
|
|
ioOrderDetailResultData.put("auditTime", ioOrderDetailResultResponse.getAuditTime() == null ? ' ' : formatter.format(ioOrderDetailResultResponse.getAuditTime()));
|
|
|
|
|
if(thrProductsEntity!=null){
|
|
|
|
|
ioOrderDetailResultData.put("cplb", thrProductsEntity.getCplb() == null ? ' ' : thrProductsEntity.getCplb());
|
|
|
|
|
}
|
|
|
|
|
ioOrderDetailResultData.put("invoiceEncode", encode);
|
|
|
|
|
ioOrderDetailResultData.put("createTime", dateStr);
|
|
|
|
|
list.add(ioOrderDetailResultData);
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data.put("data", list);
|
|
|
|
|
String param = JSON.toJSONString(data);
|
|
|
|
|
JasperUtils.jasperReport(request, response, param, filePath + "pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
|
|
|
|
@ -260,6 +294,7 @@ public class IoOrderDetailResultController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 提供UDI协调调用单据明细
|
|
|
|
|
*/
|
|
|
|
|