diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesShippingKanbanCfgServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesShippingKanbanCfgServiceImpl.java index 2ab04cf..a6c6317 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesShippingKanbanCfgServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesShippingKanbanCfgServiceImpl.java @@ -789,8 +789,8 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer } catch (NoResultException e) { } String strCustInfoSeq = custInfoSeq != null ? Long.toString(custInfoSeq) : ""; - if (strCustInfoSeq.length() >= 6) { - values.add(strCustInfoSeq.substring(strCustInfoSeq.length() - 6)); + if (strCustInfoSeq.length() >= 5) { + values.add(strCustInfoSeq.substring(strCustInfoSeq.length() - 5)); } else { values.add(strCustInfoSeq); } @@ -824,8 +824,8 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer if (StringUtils.isEmpty(strCustInfoSeq)) { strCustInfoSeq = "0"; } - if (strCustInfoSeq.length() >= 6) { - values.add(strCustInfoSeq.substring(strCustInfoSeq.length() - 6)); + if (strCustInfoSeq.length() >= 5) { + values.add(strCustInfoSeq.substring(strCustInfoSeq.length() - 5)); } else { values.add(strCustInfoSeq); } @@ -1082,8 +1082,8 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer .setParameter("organizeCode", cfg.getOrganizeCode()) .setParameter("isValid", CommonEnumUtil.VALID) .setParameter("isDeleted", CommonEnumUtil.FALSE) - .setParameter("startDateTime", DateUtil.formatDate(nowTime)) - .setParameter("endDateTime", DateUtil.formatDate(prevHourTime)) + .setParameter("startDateTime", DateUtil.formatDate(prevHourTime)) + .setParameter("endDateTime", DateUtil.formatDate(nowTime)) .setParameter("overPoint", cfg.getOnlinePoint()) .getSingleResult(); @@ -1124,11 +1124,12 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer "SELECT new map(pr.workCenterCode as workCenterCode, COUNT(DISTINCT(pr.productSn)) as totalCount) " + "FROM " + MesProductionRecord.class.getName() + " pr " + "WHERE pr.organizeCode = :organizeCode AND pr.isDeleted = :isDeleted AND pr.isValid = :isValid " + - "AND pr.createDatetime BETWEEN :startDateTime AND :endDateTime " + + "AND pr.reportType = :reportType AND pr.createDatetime BETWEEN :startDateTime AND :endDateTime " + "GROUP BY pr.workCenterCode", Map.class) .setParameter("organizeCode", cfg.getOrganizeCode()) .setParameter("isValid", CommonEnumUtil.VALID) .setParameter("isDeleted", CommonEnumUtil.FALSE) + .setParameter("reportType", MesExtEnumUtil.MES_REPORT_TYPE.REPORT.getValue()) .setParameter("startDateTime", DateUtil.formatDate(prevHourTime)) .setParameter("endDateTime", DateUtil.formatDate(nowTime)) .getResultList();