Merge branch 'uat-temp-nht-2504140000-46317' into uat-temp-wj-chongqingdaqu-dev

uat-temp-wj-chongqingdaqu-dev
jason 3 months ago
commit 588b014422

@ -875,8 +875,8 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer
} }
String strCustInfoSeq = custInfoSeq != null ? Long.toString(custInfoSeq) : ""; String strCustInfoSeq = custInfoSeq != null ? Long.toString(custInfoSeq) : "";
if (strCustInfoSeq.length() >= 6) { if (strCustInfoSeq.length() >= 5) {
values.add(strCustInfoSeq.substring(strCustInfoSeq.length() - 6)); values.add(strCustInfoSeq.substring(strCustInfoSeq.length() - 5));
} else { } else {
values.add(strCustInfoSeq); values.add(strCustInfoSeq);
} }
@ -1031,7 +1031,7 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer
hql.append(" and l.modifyDatetime BETWEEN :startDateTime AND :endDateTime "); hql.append(" and l.modifyDatetime BETWEEN :startDateTime AND :endDateTime ");
hql.append(" and s.shippingGroupCode in (:shippingGroupCode) "); hql.append(" and s.shippingGroupCode in (:shippingGroupCode) ");
hql.append(" group by s.shippingGroupCode "); hql.append(" group by s.shippingGroupCode ");
List<Map> ddd = entityManager.createQuery(hql.toString()) List<Map> dataList = entityManager.createQuery(hql.toString())
.setParameter("organizeCode", cfg.getOrganizeCode()) .setParameter("organizeCode", cfg.getOrganizeCode())
.setParameter("isValid", CommonEnumUtil.VALID) .setParameter("isValid", CommonEnumUtil.VALID)
.setParameter("isDeleted", CommonEnumUtil.FALSE) .setParameter("isDeleted", CommonEnumUtil.FALSE)
@ -1042,11 +1042,11 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer
.getResultList(); .getResultList();
Map<String, String> shippingGroupCount = new HashMap<>(); Map<String, String> shippingGroupCount = new HashMap<>();
if (!CollectionUtils.isEmpty(ddd)) { if (!CollectionUtils.isEmpty(dataList)) {
for (Map dd : ddd) { for (Map data : dataList) {
Object totalCount = dd.get("totalCount"); Object totalCount = data.get("totalCount");
if (totalCount != null) { if (totalCount != null) {
shippingGroupCount.put(dd.get("shippingGroupCode").toString(), totalCount.toString()); shippingGroupCount.put(data.get("shippingGroupCode").toString(), String.format("%.0f", (Double)totalCount));
} }
} }
} }
@ -1129,8 +1129,8 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer
.setParameter("organizeCode", cfg.getOrganizeCode()) .setParameter("organizeCode", cfg.getOrganizeCode())
.setParameter("isValid", CommonEnumUtil.VALID) .setParameter("isValid", CommonEnumUtil.VALID)
.setParameter("isDeleted", CommonEnumUtil.FALSE) .setParameter("isDeleted", CommonEnumUtil.FALSE)
.setParameter("startDateTime", DateUtil.formatDate(nowTime)) .setParameter("startDateTime", DateUtil.formatDate(prevHourTime))
.setParameter("endDateTime", DateUtil.formatDate(prevHourTime)) .setParameter("endDateTime", DateUtil.formatDate(nowTime))
.getResultList(); .getResultList();
// Use a map to store counts for quick access // Use a map to store counts for quick access
@ -1138,7 +1138,7 @@ public class MesShippingKanbanCfgServiceImpl implements IMesShippingKanbanCfgSer
.collect(Collectors.toMap( .collect(Collectors.toMap(
map -> map.get("workCenterCode").toString(), map -> map.get("workCenterCode").toString(),
map -> map.get("totalCount").toString(), map -> map.get("totalCount").toString(),
(existing, replacement) -> existing // Handle duplicates if any (existing, replacement) -> existing
)); ));
// Collect counts for each shipping group // Collect counts for each shipping group

Loading…
Cancel
Save