Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -163,16 +163,18 @@ public class CrmService {
|
||||
}
|
||||
|
||||
if (createContact.getActivityRequest() != null) {
|
||||
response.setStbActivity(
|
||||
createNewActivity(
|
||||
createContact
|
||||
.getActivityRequest()
|
||||
.setCodJcom(codJcom),
|
||||
new CRMCreateNewCommessaRequestDTO()
|
||||
.setCommessa(createContact.getCommessa()),
|
||||
createContact.getCliente()
|
||||
)
|
||||
StbActivity newActivity = createNewActivity(
|
||||
createContact
|
||||
.getActivityRequest()
|
||||
.setCodJcom(codJcom),
|
||||
new CRMCreateNewCommessaRequestDTO()
|
||||
.setCommessa(createContact.getCommessa()),
|
||||
createContact.getCliente()
|
||||
);
|
||||
|
||||
entityProcessor.processEntity(newActivity, true, multiDBTransactionManager);
|
||||
|
||||
response.setStbActivity(newActivity);
|
||||
} else {
|
||||
throw new Exception("Dati dell'attività da creare inesistenti");
|
||||
}
|
||||
@@ -362,11 +364,13 @@ public class CrmService {
|
||||
completeOrder.setCodJcom(jtbComt.getCodJcom());
|
||||
|
||||
if (completeOrder.getActivity() != null) {
|
||||
createNewActivity(
|
||||
StbActivity newActivity = createNewActivity(
|
||||
completeOrder.getActivity(),
|
||||
new CRMCreateNewCommessaRequestDTO()
|
||||
.setCommessa(completeOrder.getCommessa())
|
||||
);
|
||||
|
||||
entityProcessor.processEntity(newActivity, true, multiDBTransactionManager);
|
||||
} else {
|
||||
throw new Exception("Dati dell'attività da creare inesistenti");
|
||||
}
|
||||
@@ -621,10 +625,9 @@ public class CrmService {
|
||||
}
|
||||
|
||||
private StbActivity createNewActivity(CRMActivityDTO activityRequest, CRMCreateNewCommessaRequestDTO commessaRequest, CRMClienteDTO clienteDTO) throws Exception {
|
||||
StbActivity stbActivity = CRMUtility.buildStbActivity(activityRequest);
|
||||
stbActivity.setOperation(OperationType.INSERT);
|
||||
String parentActivityId = activityRequest.getParentActivityId();
|
||||
|
||||
if (UtilityString.isNullOrEmpty(activityRequest.getParentActivityId()) && commessaRequest != null) {
|
||||
if (UtilityString.isNullOrEmpty(parentActivityId) && commessaRequest != null) {
|
||||
String userName = requestDataDTO.getUsername();
|
||||
String activityTypeId, activityDescription;
|
||||
|
||||
@@ -655,10 +658,12 @@ public class CrmService {
|
||||
parentActivity.setOperation(OperationType.INSERT);
|
||||
entityProcessor.processEntity(parentActivity, true, multiDBTransactionManager);
|
||||
|
||||
stbActivity.setParentActivityId(parentActivity.getActivityId());
|
||||
entityProcessor.processEntity(stbActivity, true, multiDBTransactionManager);
|
||||
parentActivityId = parentActivity.getActivityId();
|
||||
}
|
||||
|
||||
StbActivity stbActivity = CRMUtility.buildStbActivity(activityRequest).setParentActivityId(parentActivityId);
|
||||
stbActivity.setOperation(OperationType.INSERT);
|
||||
|
||||
return stbActivity;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user