Finish Hotfix-100
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:
@@ -22,6 +22,17 @@ global Boolean completeRulesEnabled
|
||||
global IntegryCustomerDB customerDb
|
||||
global IntegryCustomer customer
|
||||
|
||||
|
||||
rule "completeStatoTask"
|
||||
no-loop
|
||||
when
|
||||
eval(completeRulesEnabled && customerDb == IntegryCustomerDB.Integry_Studioml)
|
||||
$stbActivity : StbActivity(flagTipologia == "P" && estimatedEnddate != null && userName != "DEV" && userName != "T0003" && activityResultId == null &&
|
||||
effectiveEndtime == null)
|
||||
then
|
||||
modify ( $stbActivity ) { setActivityResultId("DA FARE") }
|
||||
end
|
||||
|
||||
/*
|
||||
rule "completeStatoAttivita"
|
||||
no-loop
|
||||
|
||||
@@ -52,6 +52,11 @@ import it.integry.ems_model.service.SetupGest;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.*;
|
||||
import it.integry.ems_model.utility.dto.ConvertQueryDTO;
|
||||
import it.integry.firebase.dto.MessageDTO;
|
||||
import it.integry.firebase.dto.NotificationDTO;
|
||||
import it.integry.firebase.dto.apns.ApnsConfigDTO;
|
||||
import it.integry.firebase.dto.apns.ApsDTO;
|
||||
import it.integry.firebase.service.NotificationService;
|
||||
import it.integry.security.cache.SecretKeyCacheComponent;
|
||||
import it.integry.security.dto.LoginRequestDTO;
|
||||
import kotlin.Triple;
|
||||
@@ -113,6 +118,8 @@ public class SystemController {
|
||||
|
||||
@Autowired
|
||||
private RequestDataDTO requestDataDTO;
|
||||
@Autowired
|
||||
private NotificationService notificationService;
|
||||
|
||||
|
||||
@GetMapping(value = "/system/ok")
|
||||
@@ -822,6 +829,44 @@ public class SystemController {
|
||||
multiDBTransactionManager);
|
||||
}
|
||||
activity.setActivityId(stbActivity.getActivityId());
|
||||
|
||||
|
||||
if (!stbActivity.getUserCreator().equalsIgnoreCase(stbActivity.getUserName()) &&
|
||||
!stbActivity.getUserName().equalsIgnoreCase("T0003") &&
|
||||
stbActivity.getActivityTypeId().equalsIgnoreCase("TICKET")) {
|
||||
|
||||
String title = "E' stato inserito un ticket";
|
||||
String message = String.format("E' stato inserito il ticket #%s commessa %s. %s", stbActivity.getActivityId(),
|
||||
stbActivity.getCodJcom(), stbActivity.getActivityDescription());
|
||||
|
||||
List<String> utenti = new ArrayList<>();
|
||||
if (stbActivity.getUserName().equalsIgnoreCase("DEV")) {
|
||||
utenti.add("F0003");
|
||||
utenti.add("F0237");
|
||||
utenti.add("F0060");
|
||||
} else {
|
||||
utenti.add(stbActivity.getUserName());
|
||||
}
|
||||
|
||||
for (String username : utenti) {
|
||||
notificationService.sendNotificationToUserDevices(new MessageDTO()
|
||||
.setUserName(username)
|
||||
.setAppName(WtbUserDeviceToken.AppName.TASK)
|
||||
.setNotification(new NotificationDTO()
|
||||
.setTitle(title)
|
||||
.setBody(message)
|
||||
)
|
||||
.setApns(new ApnsConfigDTO()
|
||||
.setAps(new ApsDTO()
|
||||
.setSound("default")
|
||||
.setContentAvailable(true)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return ServiceRestResponse.createPositiveResponse(activity);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user