From 852d294263831752a184fa8a16f33aafee7ba309 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 29 一月 2026 13:48:43 +0800
Subject: [PATCH] 不合格管理:新增OA审核状态、物料属性,时间区间字段;以及导出功能
---
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java | 30 ++++++++++++++++++++++++------
1 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
index ad03024..b77a7fd 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -31,6 +31,7 @@
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import com.ruoyi.basic.pojo.StandardTemplate;
import com.ruoyi.basic.service.StandardTemplateService;
+import com.ruoyi.basic.vo.IfsInventoryQuantityVO;
import com.ruoyi.common.constant.DictDataConstants;
import com.ruoyi.common.constant.InsOrderTypeConstants;
import com.ruoyi.common.constant.MenuJumpPathConstants;
@@ -311,12 +312,13 @@
if (Objects.nonNull(insOrder.getIfsInventoryId())) {
IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectById(insOrder.getIfsInventoryId());
//杩囨护鍑轰笉鍚堟牸鎴栨湭鎻愪氦鐨勫崟瀛�
- count = ifsInventoryQuantityMapper.selectSplitOrderList(one.getPartNo(), one.getLineNo(), one.getReleaseNo(), one.getReceiptNo(), one.getOrderNo())
- .stream()
+ List<IfsInventoryQuantityVO> ifsInventoryQuantityVOS = ifsInventoryQuantityMapper.selectSplitOrderList(one.getPartNo(), one.getLineNo(), one.getReleaseNo(), one.getReceiptNo(), one.getOrderNo(), one.getContract());
+ count = ifsInventoryQuantityVOS.stream()
.filter(f -> (Objects.nonNull(f.getInsOrderId()) && !Objects.equals(f.getInsOrderId(), orderId)) && (Objects.isNull(f.getInsResult()) || 0 == f.getInsResult())).count();
}
map.put("errorMsg", collect);
map.put("unInsOrderCount", count);
+ map.put("unFinishCount", count);
return map;
}
@@ -1710,7 +1712,7 @@
List<String> lastValueList = new ArrayList<>();
SampleProductExportDto dto = new SampleProductExportDto();
BeanUtil.copyProperties(collect.get(s).get(0), dto);
- Set<String> tellSet = new HashSet<>();
+ List<String> tellSet = new ArrayList<>();
for (int i = startIndex; i < endIndex; i++) {
String cableTag = cableTags.get(i);
for (SampleProductExportDto sDto : collect.get(s)) {
@@ -1721,7 +1723,7 @@
}
}
//鍒囧壊鐢电紗閰嶇疆椤�
- dto.setTell(String.join("\n", tellSet.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList())));
+ dto.setTell(tellSet.stream().distinct().collect(Collectors.joining("\n")));
dto.setLastValueList(lastValueList);
sampleProductExportDtos.add(dto);
}
@@ -1740,6 +1742,22 @@
for (Map.Entry<String, List<SampleProductExportDto>> entry : entries) {
targetMap.put(entry.getKey(), entry.getValue());
}
+ }
+
+ /**
+ * 浣跨敤姝e垯琛ㄨ揪寮忓幓闄ゅ瓧绗︿覆鏈�鍚庝竴涓�"-"鍙婂叾鍚庨潰鐨勬墍鏈夊唴瀹�
+ * @param str 寰呭鐞嗙殑瀛楃涓诧紙鍏佽涓簄ull锛�
+ * @return 澶勭悊鍚庣殑瀛楃涓诧紝null杩斿洖null锛屾棤"-"杩斿洖鍘熷瓧绗︿覆
+ */
+ public static String removeLastHyphenAndContent(String str) {
+ // 绌哄�兼牎楠岋細閬垮厤NullPointerException
+ if (str == null || str.isEmpty()) {
+ return str;
+ }
+ // 姝e垯琛ㄨ揪寮忥細鍖归厤鏈�鍚庝竴涓�"-"鍙婂叾鍚庨潰鐨勬墍鏈夊唴瀹�
+ String regex = "-[^-]*$";
+ // 鏇挎崲鍖归厤鐨勫唴瀹逛负绌哄瓧绗︿覆
+ return str.replaceAll(regex, "");
}
/**
@@ -1765,7 +1783,7 @@
IfsPartPropsRecord ifsPartPropsRecord = ifsPartPropsRecordMapper.selectOne(Wrappers.<IfsPartPropsRecord>lambdaQuery()
.eq(IfsPartPropsRecord::getIfsInventoryId, ifsInventoryQuantity.getId()));
if (Objects.nonNull(ifsPartPropsRecord)) {
- enterFactoryReport.setOuterColor(ifsPartPropsRecord.getOuterColor());
+ enterFactoryReport.setOuterColor(StringUtils.equals(ifsPartPropsRecord.getOuterColor(),"/")?ifsPartPropsRecord.getInsulationColor():ifsPartPropsRecord.getOuterColor());
}
enterFactoryReport.setQtyArrived(ifsInventoryQuantity.getQtyArrived() == null ? "" :
ifsInventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + ifsInventoryQuantity.getBuyUnitMeas());
@@ -1810,7 +1828,7 @@
//鏌ヨ妫�楠屽崟娑堟伅
InsSampleUserVO insSampleUser = insSampleUserMapper.selectUserNameByOrderId(orderId);
if (Objects.nonNull(insSampleUser)) {
- enterFactoryReport.setPartDesc(insSampleUser.getModel());
+ enterFactoryReport.setPartDesc(removeLastHyphenAndContent(insSampleUser.getModel()));
enterFactoryReport.setInspector(insSampleUser.getInspector());
enterFactoryReport.setInspectDate(insSampleUser.getInspectDate());
}
--
Gitblit v1.9.3