Skip to content

Commit

Permalink
release 2024-05-17
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkurasoff committed May 17, 2024
1 parent 47e98f3 commit 690b9d4
Show file tree
Hide file tree
Showing 10 changed files with 878 additions and 875 deletions.
1,729 changes: 859 additions & 870 deletions bin/pharmadex2-0.0.1.jar

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -834,11 +834,12 @@ public ResourceDTO resurceDefinitionSuspend(@RequestBody ResourceDTO data) throw
* @throws DataNotFoundException
*/
@PostMapping("/api/admin/resource/thing/prepare")
public ThingDTO resourceThingPrepare(@RequestBody ResourceDTO data) throws DataNotFoundException {
public ThingDTO resourceThingPrepare(Authentication auth, @RequestBody ResourceDTO data) throws DataNotFoundException {
try {
ThingDTO ret = superVisServ.resourceThingPrepare(data);
UserDetailsDTO user = userService.userData(auth, new UserDetailsDTO());
ThingDTO ret = superVisServ.resourceThingPrepare(data, user);
return ret;
} catch (ObjectNotFoundException e) {
} catch (ObjectNotFoundException | JsonProcessingException e) {
throw new DataNotFoundException(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ public ResourceDTO table(AssemblyDTO res, ResourceDTO resDto) throws ObjectNotFo
Concept dictRoot=closureServ.getParent(td.getDictNode());
if(dictRoot.getActive()) {
jdbcRepo.resource_read(dictRoot.getID());
List<TableRow> rows= jdbcRepo.qtbGroupReport(select, "", "resurl='"+thing.getUrl()+"'", table.getHeaders());
//List<TableRow> rows= jdbcRepo.qtbGroupReport(select, "", "resurl='"+thing.getUrl()+"'", table.getHeaders());
List<TableRow> rows= jdbcRepo.qtbGroupReport(select, "", "resurl='"+node.getIdentifier()+"'", table.getHeaders());
TableQtb.tablePage(rows, table);
table.setSelectable(false);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fasterxml.jackson.core.JsonProcessingException;

/**
* Services for supervisor
*
Expand Down Expand Up @@ -798,17 +800,27 @@ private Headers headerResources(Headers headers) {
* Put right node id and url to the thing definition
*
* @param data
* @param user
* @return
* @throws ObjectNotFoundException
* @throws JsonProcessingException
*/
@Transactional
public ThingDTO resourceThingPrepare(ResourceDTO data) throws ObjectNotFoundException {
public ThingDTO resourceThingPrepare(ResourceDTO data, UserDetailsDTO user) throws ObjectNotFoundException, JsonProcessingException {
if (data.getNodeId() > 0) {
ThingDTO ret = new ThingDTO();
Concept node = closureServ.loadConceptById(data.getNodeId());
ret.setVarName(node.getIdentifier());
ret.setNodeId(node.getID());
ret.setUrl(node.getLabel());
Thing th=boilerServ.thingByNode(node, new Thing());
if(th.getID()==0) {
th.setConcept(node);
th.setUrl(node.getLabel());
th=boilerServ.saveThing(th);
node.setActive(true);
closureServ.save(node);
}
return ret;
} else {
throw new ObjectNotFoundException("resourceThingPrepare. Node ID is ZERO", logger);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified server/pharmadex2/src/test/resources/Components_EL_out.docx
Binary file not shown.
Binary file modified server/pharmadex2/src/test/resources/myFile.docx
Binary file not shown.
Binary file modified server/pharmadex2/src/test/resources/reportDataStructure.xlsx
Binary file not shown.

0 comments on commit 690b9d4

Please sign in to comment.