Changeset 6285
- Timestamp:
- Jun 10, 2021, 3:52:27 PM (2 years ago)
- Location:
- extensions/net.sf.basedb.reggie/branches/4.31-stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/branches/4.31-stable/resources/outtake/delivery_export.js
r4173 r6285 38 38 { 39 39 var list = workLists[i]; 40 var name = list.name + ' (' + list.size + ')';40 var name = list.name + ' (' + list.size+(list.parentType?' '+list.parentType : '') + ')'; 41 41 var option = new Option(name, list.id); 42 42 option.workList = list; -
extensions/net.sf.basedb.reggie/branches/4.31-stable/resources/outtake/register.js
r4179 r6285 49 49 { 50 50 var list = workLists[i]; 51 var name = list.name + ' (' + list.size + ')';51 var name = list.name + ' (' + list.size+(list.parentType?' '+list.parentType : '') + ')'; 52 52 var option = new Option(name, list.id); 53 53 option.workList = list; … … 193 193 { 194 194 submitInfo.sampleConsumed = Doc.element('sampleConsumedYes').checked; 195 var except = [];196 195 submitInfo.except = Link.getIdsInList(frm.except, workList.itemType); 197 196 } -
extensions/net.sf.basedb.reggie/branches/4.31-stable/src/net/sf/basedb/reggie/servlet/OuttakeServlet.java
r6284 r6285 342 342 343 343 ItemList workList = ItemList.getById(dc, workListId); 344 344 Float targetAmount = (Float)Annotationtype.OUTTAKE_TARGET_AMOUNT.getAnnotationValue(dc, workList); 345 Float targetVolume = (Float)Annotationtype.OUTTAKE_TARGET_VOLUME.getAnnotationValue(dc, workList); 346 345 347 ItemQuery<Extract> memberQuery = (ItemQuery<Extract>)workList.getMembers(); 346 348 memberQuery.setIncludes(Reggie.INCLUDE_IN_CURRENT_PROJECT); … … 360 362 361 363 TableWriter tw = new TableWriter(out); 362 tw.tablePrintData("Name", "Box", "Position", "Quantity (µg)", "Concentration (ng/µl)"); 363 Object[] data = new Object[5]; 364 Object[] data = null; 365 if (targetAmount != null && targetVolume != null) 366 { 367 tw.tablePrintData("Name", "Box", "Position", "Quantity (µg)", "Concentration (ng/µl)"); 368 data = new Object[5]; 369 } 370 else 371 { 372 tw.tablePrintData("Name", "Box", "Position", "Quantity (µl)"); 373 data = new Object[4]; 374 } 364 375 365 376 Iterator<Extract> it = memberQuery.iterate(dc); … … 377 388 data[2] = well.getCoordinate(); 378 389 data[3] = Values.formatNumber(aliquot.getRemainingQuantity(), 1); 379 data[4] = Values.formatNumber((Float)Annotationtype.DILUTION_CONC.getAnnotationValue(dc, aliquot), 1); 390 if (data.length > 4) 391 { 392 data[4] = Values.formatNumber((Float)Annotationtype.DILUTION_CONC.getAnnotationValue(dc, aliquot), 1); 393 } 380 394 tw.tablePrintData(data); 381 395 } … … 604 618 Float ndConc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, parent); 605 619 606 if (remain != null && ndConc != null) 607 { 608 boolean isException = except.contains(aliquot.getId()); 609 if (isException) numExceptions++; 610 611 if (sampleConsumed != isException) 620 if (targetAmount != null && targetVolume != null) 621 { 622 if (remain != null && ndConc != null) 612 623 { 613 Dilution d = new Dilution(targetAmount, targetVolume, ndConc, remain); 614 creationEvent.getEventSource(parent).setUsedQuantity(d.amount); 615 aliquot.setOriginalQuantity(d.amount); 616 Annotationtype.DILUTION_CONC.setAnnotationValue(dc, aliquot, d.getDilutedConc()); 617 //jsonMessages.add(aliquot.getId() + ":" + aliquot.getName() + ": " + ndConc + "--" + d.getDilutedConc() + ":"+isException); 624 boolean isException = except.contains(aliquot.getId()); 625 if (isException) numExceptions++; 626 627 if (sampleConsumed != isException) 628 { 629 Dilution d = new Dilution(targetAmount, targetVolume, ndConc, remain); 630 creationEvent.getEventSource(parent).setUsedQuantity(d.amount); 631 aliquot.setOriginalQuantity(d.amount); 632 Annotationtype.DILUTION_CONC.setAnnotationValue(dc, aliquot, d.getDilutedConc()); 633 //jsonMessages.add(aliquot.getId() + ":" + aliquot.getName() + ": " + ndConc + "--" + d.getDilutedConc() + ":"+isException); 634 } 635 else 636 { 637 // jsonMessages.add(aliquot.getId() + ":" + aliquot.getName() + " not consumed: " + isException); 638 } 618 639 } 619 else 640 } 641 else if (targetVolume != null) 642 { 643 if (remain != null) 620 644 { 621 // jsonMessages.add(aliquot.getId() + ":" + aliquot.getName() + " not consumed: " + isException); 645 boolean isException = except.contains(aliquot.getId()); 646 if (isException) numExceptions++; 647 if (sampleConsumed != isException) 648 { 649 Dilution d = new Dilution(targetVolume, remain); 650 creationEvent.getEventSource(parent).setUsedQuantity(d.volume); 651 aliquot.setOriginalQuantity(d.volume); 652 //jsonMessages.add(aliquot.getId() + ":" + aliquot.getName() + ": " + d.volume + ":"+isException); 653 } 654 else 655 { 656 //jsonMessages.add(aliquot.getId() + ":" + aliquot.getName() + " not consumed: " + isException); 657 } 622 658 } 623 659 }
Note: See TracChangeset
for help on using the changeset viewer.