From b09e6ce058571fd8d35164f3219915e48d728645 Mon Sep 17 00:00:00 2001 From: yanshikui Date: Mon, 18 Nov 2024 17:52:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=A0=B1=E8=A1=A8?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=B7=A5=E5=8D=95=E6=8A=A5=E8=A1=A8=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=8F=82=E6=95=B0=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ktg/mes/report/bean/PmReportBean.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/report/bean/PmReportBean.java b/ktg-mes/src/main/java/com/ktg/mes/report/bean/PmReportBean.java index 63032c7..5f5014c 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/report/bean/PmReportBean.java +++ b/ktg-mes/src/main/java/com/ktg/mes/report/bean/PmReportBean.java @@ -1,6 +1,7 @@ package com.ktg.mes.report.bean; import com.alibaba.fastjson.JSON; +import com.github.pagehelper.util.StringUtil; import com.ktg.mes.pro.domain.ProWorkorder; import com.ktg.mes.pro.service.IProWorkorderService; import com.ktg.mes.wm.domain.WmBarcode; @@ -10,6 +11,7 @@ import org.apache.commons.collections.MapUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import java.util.ArrayList; import java.util.List; @@ -28,6 +30,9 @@ public class PmReportBean { public List getData(String dsName, String datasetName, Map parameters) { String id = MapUtils.getString(parameters, "id"); + if (StringUtil.isEmpty(id)) { + id = "0"; + } ProWorkorder proWorkorder = proWorkorderService.selectProWorkorderByWorkorderId(Long.parseLong(id)); List list = new ArrayList<>(); @@ -38,7 +43,9 @@ public class PmReportBean { public List getChildData(String dsName, String datasetName, Map parameters) { String id = MapUtils.getString(parameters, "id"); - + if (StringUtil.isEmpty(id)) { + id = "0"; + } List proWorkorders = proWorkorderService.selectProWorkorderListByParentId(Long.parseLong(id)); @@ -50,6 +57,9 @@ public class PmReportBean { public List getQc(String dsName, String datasetName, Map parameters) { String id = MapUtils.getString(parameters, "id"); + if (StringUtil.isEmpty(id)) { + id = "0"; + } WmBarcode wmBarcode = new WmBarcode(); wmBarcode.setBarcodeId(Long.parseLong(id));