|
|
|
|
@ -1172,8 +1172,17 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
String[] split3 = batchNos.split(","); |
|
|
|
|
Map<String, List<String>> tempListMap = new HashMap(); |
|
|
|
|
for (String batch : split3) { |
|
|
|
|
String reagentId = batch.split("-")[0]; |
|
|
|
|
String realBatch = batch.split("-")[1]; |
|
|
|
|
String[] reagentIdAndBatchArr = batch.split("-"); |
|
|
|
|
String reagentId = reagentIdAndBatchArr[0]; |
|
|
|
|
// 试剂中会有中线的情况,如:1101-3,-3也要带着;原以为只有1101
|
|
|
|
|
String realBatch = ""; |
|
|
|
|
if (reagentIdAndBatchArr.length > 2) { |
|
|
|
|
for (int i = 1; i < reagentIdAndBatchArr.length; i++) { |
|
|
|
|
realBatch += reagentIdAndBatchArr[i] + "-"; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
realBatch = reagentIdAndBatchArr[1]; |
|
|
|
|
} |
|
|
|
|
List<String> list = tempListMap.get(reagentId); |
|
|
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
|
|
list.add(realBatch); |
|
|
|
|
|