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));