eliminati campi date nella stbactivity
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -0,0 +1,70 @@
|
|||||||
|
package it.integry.ems.migration.model;
|
||||||
|
|
||||||
|
import it.integry.ems.migration._base.BaseMigration;
|
||||||
|
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||||
|
|
||||||
|
public class Migration_20250929172222 extends BaseMigration implements MigrationModelInterface {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void up() throws Exception {
|
||||||
|
if (isHistoryDB())
|
||||||
|
return;
|
||||||
|
|
||||||
|
executeStatement("DROP INDEX [ix_stb_activity_raplav] ON [dbo].[stb_activity] ",
|
||||||
|
"DROP INDEX [ix[stb_activity_effective_date] ON [dbo].[stb_activity] ",
|
||||||
|
"DROP INDEX [ix_activity_effective] ON [dbo].[stb_activity] ",
|
||||||
|
"DROP INDEX [ix_activity_estimate] ON [dbo].[stb_activity] ",
|
||||||
|
"DROP INDEX [ix_stb_activity_alarm] ON [dbo].[stb_activity] ",
|
||||||
|
"alter table stb_activity drop column data_ins_act ",
|
||||||
|
"alter table stb_activity drop column estimated_date ",
|
||||||
|
"alter table stb_activity drop column alarm_date ",
|
||||||
|
"alter table stb_activity drop column effective_date ",
|
||||||
|
"alter table stb_activity drop column estimated_enddate ",
|
||||||
|
"alter table stb_activity drop column effective_enddate ",
|
||||||
|
"alter table stb_activity add data_ins_act as cast(ora_ins_act as date) ",
|
||||||
|
"alter table stb_activity add estimated_date as cast(estimated_time as date) ",
|
||||||
|
"alter table stb_activity add alarm_date as cast(alarm_time as date) ",
|
||||||
|
"alter table stb_activity add effective_date as cast(effective_time as date) ",
|
||||||
|
"alter table stb_activity add estimated_enddate as cast(estimated_endtime as date) ",
|
||||||
|
"alter table stb_activity add effective_enddate as cast(effective_endtime as date) ",
|
||||||
|
"CREATE NONCLUSTERED INDEX [ix_stb_activity_alarm] ON [dbo].[stb_activity] " +
|
||||||
|
"( " +
|
||||||
|
" " +
|
||||||
|
" [alarm_time] ASC, " +
|
||||||
|
" [alarm_date] ASC " +
|
||||||
|
") " ,
|
||||||
|
"CREATE NONCLUSTERED INDEX [ix_activity_estimate] ON [dbo].[stb_activity] " +
|
||||||
|
"( " +
|
||||||
|
" [activity_id] ASC, " +
|
||||||
|
" [estimated_date] ASC, " +
|
||||||
|
" [estimated_time] ASC, " +
|
||||||
|
" [estimated_enddate] ASC, " +
|
||||||
|
" [estimated_endtime] ASC " +
|
||||||
|
") " ,
|
||||||
|
"CREATE NONCLUSTERED INDEX [ix_activity_effective] ON [dbo].[stb_activity] " +
|
||||||
|
"( " +
|
||||||
|
" [activity_id] ASC, " +
|
||||||
|
" [effective_date] ASC, " +
|
||||||
|
" [effective_enddate] ASC, " +
|
||||||
|
" [effective_time] ASC, " +
|
||||||
|
" [effective_endtime] ASC " +
|
||||||
|
") " ,
|
||||||
|
"CREATE NONCLUSTERED INDEX [ix_stb_activity_raplav] ON [dbo].[stb_activity] " +
|
||||||
|
"( " +
|
||||||
|
" [data_ins_act] ASC, " +
|
||||||
|
" [flag_tipologia] ASC, " +
|
||||||
|
" [activity_type_id] ASC, " +
|
||||||
|
" [cod_jcom] ASC, " +
|
||||||
|
" [cod_jfas] ASC " +
|
||||||
|
") " ,
|
||||||
|
"CREATE NONCLUSTERED INDEX [ix[stb_activity_effective_date] ON [dbo].[stb_activity] " +
|
||||||
|
"( " +
|
||||||
|
" [effective_date] ASC " +
|
||||||
|
") "
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void down() throws Exception {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import it.integry.ems_model.utility.UtilityString;
|
|||||||
|
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -44,12 +45,12 @@ public class ConfigActivityRules extends QueryRules {
|
|||||||
blocca = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
blocca = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Date dataCheck;
|
LocalDate dataCheck;
|
||||||
if (!(stbActivity.getOperation() == OperationType.DELETE && stbActivity.getEffectiveDate() == null)) {
|
if (!(stbActivity.getOperation() == OperationType.DELETE && stbActivity.getEffectiveTime() == null)) {
|
||||||
if (stbActivity.getEffectiveDate() != null)
|
if (stbActivity.getEffectiveTime() != null)
|
||||||
dataCheck = stbActivity.getEffectiveDate();
|
dataCheck = stbActivity.getEffectiveTime().toLocalDate();
|
||||||
else if (stbActivity.getEstimatedDate() != null)
|
else if (stbActivity.getEstimatedTime() != null)
|
||||||
dataCheck = stbActivity.getEstimatedDate();
|
dataCheck = stbActivity.getEstimatedTime().toLocalDate();
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ public class ConfigActivityRules extends QueryRules {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean checkAttivita(Connection conn, String codJcom, Date dataCheck) throws Exception {
|
public static boolean checkAttivita(Connection conn, String codJcom, LocalDate dataCheck) throws Exception {
|
||||||
String sql =
|
String sql =
|
||||||
Query.format(
|
Query.format(
|
||||||
"SELECT CAST(COUNT(*) AS BIT)\n" +
|
"SELECT CAST(COUNT(*) AS BIT)\n" +
|
||||||
@@ -124,7 +125,7 @@ public class ConfigActivityRules extends QueryRules {
|
|||||||
JtbRLavt jtbRLavt = new JtbRLavt();
|
JtbRLavt jtbRLavt = new JtbRLavt();
|
||||||
jtbRLavt.setCodJflav(codJflav);
|
jtbRLavt.setCodJflav(codJflav);
|
||||||
jtbRLavt.setUsername(entity.getUsername());
|
jtbRLavt.setUsername(entity.getUsername());
|
||||||
jtbRLavt.setDataLav(entity.getEffectiveDate());
|
jtbRLavt.setDataLav(entity.getEffectiveTime());
|
||||||
jtbRLavt.setOperation(OperationType.INSERT_OR_UPDATE);
|
jtbRLavt.setOperation(OperationType.INSERT_OR_UPDATE);
|
||||||
jtbRLavt.setJtbRlavr(new ArrayList<>());
|
jtbRLavt.setJtbRlavr(new ArrayList<>());
|
||||||
|
|
||||||
|
|||||||
@@ -1274,8 +1274,8 @@ public class SalesRules extends QueryRules {
|
|||||||
.setActivityType(activityTypeId)
|
.setActivityType(activityTypeId)
|
||||||
.setFlagTipologia("P")
|
.setFlagTipologia("P")
|
||||||
.setCodAnag(vtbOfft.getCodAnag())
|
.setCodAnag(vtbOfft.getCodAnag())
|
||||||
.setEffectiveTime(UtilityLocalDate.localDateTimeToDate(vtbOfft.getDataIns()))
|
.setEffectiveTime(vtbOfft.getDataIns())
|
||||||
.setOraInsAct(UtilityLocalDate.localDateTimeToDate(vtbOfft.getDataIns()))
|
.setOraInsAct(vtbOfft.getDataIns())
|
||||||
.setUserCreator(vtbOfft.getUsername())
|
.setUserCreator(vtbOfft.getUsername())
|
||||||
.setUserName(vtbOfft.getUsername());
|
.setUserName(vtbOfft.getUsername());
|
||||||
stbActivity.setOperation(OperationType.INSERT);
|
stbActivity.setOperation(OperationType.INSERT);
|
||||||
@@ -1284,8 +1284,8 @@ public class SalesRules extends QueryRules {
|
|||||||
.setActivityType("OFFERTA IN ELAB")
|
.setActivityType("OFFERTA IN ELAB")
|
||||||
.setFlagTipologia("A")
|
.setFlagTipologia("A")
|
||||||
.setCodAnag(vtbOfft.getCodAnag())
|
.setCodAnag(vtbOfft.getCodAnag())
|
||||||
.setEffectiveTime(UtilityLocalDate.localDateTimeToDate(vtbOfft.getDataIns()))
|
.setEffectiveTime(vtbOfft.getDataIns())
|
||||||
.setOraInsAct(UtilityLocalDate.localDateTimeToDate(vtbOfft.getDataIns()))
|
.setOraInsAct(vtbOfft.getDataIns())
|
||||||
.setUserCreator(vtbOfft.getUsername())
|
.setUserCreator(vtbOfft.getUsername())
|
||||||
.setUserName(vtbOfft.getUsername());
|
.setUserName(vtbOfft.getUsername());
|
||||||
stbActivity.getStbActivity().add(sottoAttivita);
|
stbActivity.getStbActivity().add(sottoAttivita);
|
||||||
|
|||||||
@@ -624,8 +624,6 @@ public class GeneraOrdLav {
|
|||||||
activity.setFlagTipologia(flagTipologia);
|
activity.setFlagTipologia(flagTipologia);
|
||||||
activity.setUserName(userName);
|
activity.setUserName(userName);
|
||||||
activity.setActivityDescription(activityTypeID + " N° " + numOrd.toString() + " DEL + " + new SimpleDateFormat("yyyy/MM/dd").format(dataOrd));
|
activity.setActivityDescription(activityTypeID + " N° " + numOrd.toString() + " DEL + " + new SimpleDateFormat("yyyy/MM/dd").format(dataOrd));
|
||||||
activity.setEstimatedDate(dataIniz);
|
|
||||||
activity.setEstimatedEnddate(dataFine);
|
|
||||||
activity.setEstimatedTime(dataIniz);
|
activity.setEstimatedTime(dataIniz);
|
||||||
activity.setEstimatedEndtime(dataFine);
|
activity.setEstimatedEndtime(dataFine);
|
||||||
activity.setGestione("L");
|
activity.setGestione("L");
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class ProductionBusinessLogic {
|
|||||||
datiComm.setNumComm("");
|
datiComm.setNumComm("");
|
||||||
if (datiComm.getDataOrd() != null && datiComm.getNumOrd() != null) {
|
if (datiComm.getDataOrd() != null && datiComm.getNumOrd() != null) {
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yy");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yy");
|
||||||
datiComm.setNumComm(dateFormat.format(datiComm.getDataOrd()).toString() + UtilityString.leftPad(datiComm.getNumOrd().toString(), 5, '0'));
|
datiComm.setNumComm(dateFormat.format(datiComm.getDataOrd()) + UtilityString.leftPad(datiComm.getNumOrd().toString(), 5, '0'));
|
||||||
}
|
}
|
||||||
if (aggiungiGestione) {
|
if (aggiungiGestione) {
|
||||||
String numComm = "";
|
String numComm = "";
|
||||||
@@ -203,12 +203,10 @@ public class ProductionBusinessLogic {
|
|||||||
activity.setFlagTipologia(flagTipologia);
|
activity.setFlagTipologia(flagTipologia);
|
||||||
activity.setUserName(userName);
|
activity.setUserName(userName);
|
||||||
activity.setActivityDescription(activityTypeID + " N° " + numOrd.toString() + " DEL + " + new SimpleDateFormat("yyyy/MM/dd").format(dataOrd));
|
activity.setActivityDescription(activityTypeID + " N° " + numOrd.toString() + " DEL + " + new SimpleDateFormat("yyyy/MM/dd").format(dataOrd));
|
||||||
activity.setEstimatedDate(dataIniz);
|
activity.setEstimatedTime(UtilityLocalDate.localDateTimeFromDate(dataIniz));
|
||||||
activity.setEstimatedEnddate(dataFine);
|
activity.setEstimatedEndtime(UtilityLocalDate.localDateTimeFromDate(dataFine));
|
||||||
activity.setEstimatedTime(dataIniz);
|
|
||||||
activity.setEstimatedEndtime(dataFine);
|
|
||||||
activity.setGestione("L");
|
activity.setGestione("L");
|
||||||
activity.setDataOrd(dataOrd);
|
activity.setDataOrd(UtilityLocalDate.localDateFromDate(dataOrd));
|
||||||
activity.setNumOrd(numOrd);
|
activity.setNumOrd(numOrd);
|
||||||
activityList.add(activity);
|
activityList.add(activity);
|
||||||
}
|
}
|
||||||
@@ -259,12 +257,10 @@ public class ProductionBusinessLogic {
|
|||||||
activity.setFlagTipologia(flagTipologia);
|
activity.setFlagTipologia(flagTipologia);
|
||||||
activity.setUserName(userName);
|
activity.setUserName(userName);
|
||||||
activity.setActivityDescription(activityTypeID);
|
activity.setActivityDescription(activityTypeID);
|
||||||
activity.setEstimatedDate(dataIniz);
|
activity.setEstimatedTime(UtilityLocalDate.localDateTimeFromDate(dataIniz));
|
||||||
activity.setEstimatedEnddate(dataFine);
|
activity.setEstimatedEndtime(UtilityLocalDate.localDateTimeFromDate(dataFine));
|
||||||
activity.setEstimatedTime(dataIniz);
|
|
||||||
activity.setEstimatedEndtime(dataFine);
|
|
||||||
activity.setGestione("L");
|
activity.setGestione("L");
|
||||||
activity.setDataOrd(dataOrd);
|
activity.setDataOrd(UtilityLocalDate.localDateFromDate(dataOrd));
|
||||||
activity.setNumOrd(numOrd);
|
activity.setNumOrd(numOrd);
|
||||||
activityList.add(activity);
|
activityList.add(activity);
|
||||||
}
|
}
|
||||||
@@ -307,13 +303,11 @@ public class ProductionBusinessLogic {
|
|||||||
activity.setCodJcom(codJcom);
|
activity.setCodJcom(codJcom);
|
||||||
activity.setActivityTypeId(activityTypeID);
|
activity.setActivityTypeId(activityTypeID);
|
||||||
activity.setFlagTipologia(flagTipologia);
|
activity.setFlagTipologia(flagTipologia);
|
||||||
activity.setEstimatedDate(dataIniz);
|
activity.setEstimatedTime(UtilityLocalDate.localDateTimeFromDate(dataIniz));
|
||||||
activity.setEstimatedEnddate(dataFine);
|
activity.setEstimatedEndtime(UtilityLocalDate.localDateTimeFromDate(dataFine));
|
||||||
activity.setEstimatedTime(dataIniz);
|
|
||||||
activity.setEstimatedEndtime(dataFine);
|
|
||||||
activity.setUserName(userName);
|
activity.setUserName(userName);
|
||||||
activity.setGestione("L");
|
activity.setGestione("L");
|
||||||
activity.setDataOrd(dataOrd);
|
activity.setDataOrd(UtilityLocalDate.localDateFromDate(dataOrd));
|
||||||
activity.setNumOrd(numOrd);
|
activity.setNumOrd(numOrd);
|
||||||
activity.setActivityDescription("PRODUZIONE N° " + numOrd.toString() + " DEL + " + new SimpleDateFormat("yyyy/MM/dd").format(dataOrd));
|
activity.setActivityDescription("PRODUZIONE N° " + numOrd.toString() + " DEL + " + new SimpleDateFormat("yyyy/MM/dd").format(dataOrd));
|
||||||
activityList.add(activity);
|
activityList.add(activity);
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import it.integry.ems_model.base.EntityBase;
|
|||||||
import it.integry.ems_model.utility.UtilityDB;
|
import it.integry.ems_model.utility.UtilityDB;
|
||||||
import org.kie.api.definition.type.PropertyReactive;
|
import org.kie.api.definition.type.PropertyReactive;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
@@ -36,9 +36,6 @@ public class StbActivity extends EntityBase {
|
|||||||
@SqlField(value = "activity_type_id", maxLength = 40, nullable = false)
|
@SqlField(value = "activity_type_id", maxLength = 40, nullable = false)
|
||||||
private String activityTypeId;
|
private String activityTypeId;
|
||||||
|
|
||||||
@SqlField(value = "data_ins_act", nullable = false, defaultObjectValue = CommonConstants.SYSDATE)
|
|
||||||
private Date dataInsAct;
|
|
||||||
|
|
||||||
@SqlField(value = "activity_description", maxLength = 1024)
|
@SqlField(value = "activity_description", maxLength = 1024)
|
||||||
private String activityDescription;
|
private String activityDescription;
|
||||||
|
|
||||||
@@ -58,38 +55,23 @@ public class StbActivity extends EntityBase {
|
|||||||
@SqlField(value = "cod_jfas", maxLength = 5)
|
@SqlField(value = "cod_jfas", maxLength = 5)
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
|
||||||
@SqlField(value = "estimated_date", format = CommonConstants.SYSDATE)
|
|
||||||
private Date estimatedDate;
|
|
||||||
|
|
||||||
@SqlField(value = "estimated_time")
|
@SqlField(value = "estimated_time")
|
||||||
private Date estimatedTime;
|
private LocalDateTime estimatedTime;
|
||||||
|
|
||||||
@SqlField(value = "alarm_date", format = CommonConstants.SYSDATE)
|
|
||||||
private Date alarmDate;
|
|
||||||
|
|
||||||
@SqlField(value = "alarm_time")
|
@SqlField(value = "alarm_time")
|
||||||
private Date alarmTime;
|
private LocalDateTime alarmTime;
|
||||||
|
|
||||||
@SqlField(value = "effective_date", format = CommonConstants.SYSDATE)
|
|
||||||
private Date effectiveDate;
|
|
||||||
|
|
||||||
@SqlField(value = "effective_time")
|
@SqlField(value = "effective_time")
|
||||||
private Date effectiveTime;
|
private LocalDateTime effectiveTime;
|
||||||
|
|
||||||
@SqlField(value = "result_description", maxLength = 1024)
|
@SqlField(value = "result_description", maxLength = 1024)
|
||||||
private String resultDescription;
|
private String resultDescription;
|
||||||
|
|
||||||
@SqlField(value = "estimated_enddate", format = CommonConstants.SYSDATE)
|
|
||||||
private Date estimatedEnddate;
|
|
||||||
|
|
||||||
@SqlField(value = "estimated_endtime")
|
@SqlField(value = "estimated_endtime")
|
||||||
private Date estimatedEndtime;
|
private LocalDateTime estimatedEndtime;
|
||||||
|
|
||||||
@SqlField(value = "effective_enddate", format = CommonConstants.SYSDATE)
|
|
||||||
private Date effectiveEnddate;
|
|
||||||
|
|
||||||
@SqlField(value = "effective_endtime")
|
@SqlField(value = "effective_endtime")
|
||||||
private Date effectiveEndtime;
|
private LocalDateTime effectiveEndtime;
|
||||||
|
|
||||||
@SqlField(value = "user_creator", maxLength = 40)
|
@SqlField(value = "user_creator", maxLength = 40)
|
||||||
private String userCreator;
|
private String userCreator;
|
||||||
@@ -143,7 +125,7 @@ public class StbActivity extends EntityBase {
|
|||||||
private String gestione;
|
private String gestione;
|
||||||
|
|
||||||
@SqlField(value = "data_ord")
|
@SqlField(value = "data_ord")
|
||||||
private Date dataOrd;
|
private LocalDate dataOrd;
|
||||||
|
|
||||||
@SqlField(value = "num_ord")
|
@SqlField(value = "num_ord")
|
||||||
private Integer numOrd;
|
private Integer numOrd;
|
||||||
@@ -155,7 +137,7 @@ public class StbActivity extends EntityBase {
|
|||||||
private Integer idRiga;
|
private Integer idRiga;
|
||||||
|
|
||||||
@SqlField(value = "ora_ins_act")
|
@SqlField(value = "ora_ins_act")
|
||||||
private Date oraInsAct;
|
private LocalDateTime oraInsAct;
|
||||||
|
|
||||||
@SqlField(value = "indice_gradimento", defaultObjectValue = "0")
|
@SqlField(value = "indice_gradimento", defaultObjectValue = "0")
|
||||||
private BigDecimal indiceGradimento;
|
private BigDecimal indiceGradimento;
|
||||||
@@ -178,7 +160,7 @@ public class StbActivity extends EntityBase {
|
|||||||
private LocalDateTime oraModAct;
|
private LocalDateTime oraModAct;
|
||||||
|
|
||||||
@SqlField(value = "ora_view_act")
|
@SqlField(value = "ora_view_act")
|
||||||
private Date oraViewAct;
|
private LocalDateTime oraViewAct;
|
||||||
|
|
||||||
@SqlField(value = "cod_vdes", maxLength = 5)
|
@SqlField(value = "cod_vdes", maxLength = 5)
|
||||||
private String codVdes;
|
private String codVdes;
|
||||||
@@ -271,14 +253,6 @@ public class StbActivity extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataInsAct() {
|
|
||||||
return dataInsAct;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setDataInsAct(Date dataInsAct) {
|
|
||||||
this.dataInsAct = dataInsAct;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getActivityDescription() {
|
public String getActivityDescription() {
|
||||||
return activityDescription;
|
return activityDescription;
|
||||||
@@ -334,60 +308,6 @@ public class StbActivity extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getEstimatedDate() {
|
|
||||||
return estimatedDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setEstimatedDate(Date estimatedDate) {
|
|
||||||
this.estimatedDate = estimatedDate;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getEstimatedTime() {
|
|
||||||
return estimatedTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setEstimatedTime(Date estimatedTime) {
|
|
||||||
this.estimatedTime = estimatedTime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getAlarmDate() {
|
|
||||||
return alarmDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setAlarmDate(Date alarmDate) {
|
|
||||||
this.alarmDate = alarmDate;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getAlarmTime() {
|
|
||||||
return alarmTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setAlarmTime(Date alarmTime) {
|
|
||||||
this.alarmTime = alarmTime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getEffectiveDate() {
|
|
||||||
return effectiveDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setEffectiveDate(Date effectiveDate) {
|
|
||||||
this.effectiveDate = effectiveDate;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getEffectiveTime() {
|
|
||||||
return effectiveTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setEffectiveTime(Date effectiveTime) {
|
|
||||||
this.effectiveTime = effectiveTime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getResultDescription() {
|
public String getResultDescription() {
|
||||||
return resultDescription;
|
return resultDescription;
|
||||||
}
|
}
|
||||||
@@ -397,41 +317,7 @@ public class StbActivity extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getEstimatedEnddate() {
|
|
||||||
return estimatedEnddate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setEstimatedEnddate(Date estimatedEnddate) {
|
|
||||||
this.estimatedEnddate = estimatedEnddate;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getEstimatedEndtime() {
|
|
||||||
return estimatedEndtime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setEstimatedEndtime(Date estimatedEndtime) {
|
|
||||||
this.estimatedEndtime = estimatedEndtime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getEffectiveEnddate() {
|
|
||||||
return effectiveEnddate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setEffectiveEnddate(Date effectiveEnddate) {
|
|
||||||
this.effectiveEnddate = effectiveEnddate;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getEffectiveEndtime() {
|
|
||||||
return effectiveEndtime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setEffectiveEndtime(Date effectiveEndtime) {
|
|
||||||
this.effectiveEndtime = effectiveEndtime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserCreator() {
|
public String getUserCreator() {
|
||||||
return userCreator;
|
return userCreator;
|
||||||
@@ -586,14 +472,6 @@ public class StbActivity extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataOrd() {
|
|
||||||
return dataOrd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setDataOrd(Date dataOrd) {
|
|
||||||
this.dataOrd = dataOrd;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumOrd() {
|
public Integer getNumOrd() {
|
||||||
return numOrd;
|
return numOrd;
|
||||||
@@ -622,14 +500,6 @@ public class StbActivity extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getOraInsAct() {
|
|
||||||
return oraInsAct;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setOraInsAct(Date oraInsAct) {
|
|
||||||
this.oraInsAct = oraInsAct;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getIndiceGradimento() {
|
public BigDecimal getIndiceGradimento() {
|
||||||
return indiceGradimento;
|
return indiceGradimento;
|
||||||
@@ -694,15 +564,6 @@ public class StbActivity extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getOraViewAct() {
|
|
||||||
return oraViewAct;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StbActivity setOraViewAct(Date oraViewAct) {
|
|
||||||
this.oraViewAct = oraViewAct;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodVdes() {
|
public String getCodVdes() {
|
||||||
return codVdes;
|
return codVdes;
|
||||||
}
|
}
|
||||||
@@ -757,6 +618,78 @@ public class StbActivity extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getEstimatedTime() {
|
||||||
|
return estimatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbActivity setEstimatedTime(LocalDateTime estimatedTime) {
|
||||||
|
this.estimatedTime = estimatedTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getAlarmTime() {
|
||||||
|
return alarmTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbActivity setAlarmTime(LocalDateTime alarmTime) {
|
||||||
|
this.alarmTime = alarmTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getEffectiveTime() {
|
||||||
|
return effectiveTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbActivity setEffectiveTime(LocalDateTime effectiveTime) {
|
||||||
|
this.effectiveTime = effectiveTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getEstimatedEndtime() {
|
||||||
|
return estimatedEndtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbActivity setEstimatedEndtime(LocalDateTime estimatedEndtime) {
|
||||||
|
this.estimatedEndtime = estimatedEndtime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getEffectiveEndtime() {
|
||||||
|
return effectiveEndtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbActivity setEffectiveEndtime(LocalDateTime effectiveEndtime) {
|
||||||
|
this.effectiveEndtime = effectiveEndtime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataOrd() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbActivity setDataOrd(LocalDate dataOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getOraInsAct() {
|
||||||
|
return oraInsAct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbActivity setOraInsAct(LocalDateTime oraInsAct) {
|
||||||
|
this.oraInsAct = oraInsAct;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getOraViewAct() {
|
||||||
|
return oraViewAct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbActivity setOraViewAct(LocalDateTime oraViewAct) {
|
||||||
|
this.oraViewAct = oraViewAct;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public List<StbActivityCosts> getStbActivityCosts() {
|
public List<StbActivityCosts> getStbActivityCosts() {
|
||||||
return stbActivityCosts;
|
return stbActivityCosts;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -325,8 +325,8 @@ public class ActivityDTO {
|
|||||||
public Date getDataInizioEffettiva() {
|
public Date getDataInizioEffettiva() {
|
||||||
if (dataInizioEffettiva != null)
|
if (dataInizioEffettiva != null)
|
||||||
return dataInizioEffettiva;
|
return dataInizioEffettiva;
|
||||||
else if (stbActivity != null && stbActivity.getEffectiveDate() != EmsRestConstants.DATE_NULL)
|
else if (stbActivity != null && stbActivity.getEffectiveTime() != EmsRestConstants.DATE_NULL)
|
||||||
return stbActivity.getEffectiveDate();
|
return stbActivity.getEffectiveTime();
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ public class ActivityHistoryDTO {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getEffectiveDate() {
|
public Date getEffectiveTime() {
|
||||||
return effectiveDate;
|
return effectiveDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ public class ActivityTaskDTO {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getEffectiveDate() {
|
public Date getEffectiveTime() {
|
||||||
return effectiveDate;
|
return effectiveDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ public class ActivityService {
|
|||||||
.setActivityTypeId(stbActivity.getActivityTypeId())
|
.setActivityTypeId(stbActivity.getActivityTypeId())
|
||||||
.setActivityDescription(stbActivity.getActivityDescription())
|
.setActivityDescription(stbActivity.getActivityDescription())
|
||||||
.setUserName(stbActivity.getUserName())
|
.setUserName(stbActivity.getUserName())
|
||||||
.setEffectiveDate(stbActivity.getEffectiveDate())
|
.setEffectiveDate(stbActivity.getEffectiveTime())
|
||||||
.setActivityResultId(stbActivity.getActivityResultId())
|
.setActivityResultId(stbActivity.getActivityResultId())
|
||||||
.setResultDescription(stbActivity.getResultDescription())
|
.setResultDescription(stbActivity.getResultDescription())
|
||||||
.setOreLav(stbActivity.getOreRapportino())
|
.setOreLav(stbActivity.getOreRapportino())
|
||||||
@@ -638,7 +638,7 @@ public class ActivityService {
|
|||||||
startDate = calendar.getTime();
|
startDate = calendar.getTime();
|
||||||
|
|
||||||
|
|
||||||
if (parentStbActivity.getEffectiveDate() == null) {
|
if (parentStbActivity.getEffectiveTime() == null) {
|
||||||
parentStbActivity.setEffectiveTime(startHour);
|
parentStbActivity.setEffectiveTime(startHour);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1465,7 +1465,7 @@ public class ActivityService {
|
|||||||
.setUserName(activity.getUserName())
|
.setUserName(activity.getUserName())
|
||||||
.setEffectiveTime(activity.getEffectiveTime())
|
.setEffectiveTime(activity.getEffectiveTime())
|
||||||
.setEffectiveEndtime(activity.getEffectiveEndtime())
|
.setEffectiveEndtime(activity.getEffectiveEndtime())
|
||||||
.setEffectiveDate(activity.getEffectiveDate())
|
.setEffectiveDate(activity.getEffectiveTime())
|
||||||
.setEffectiveEnddate(activity.getEffectiveEndtime())
|
.setEffectiveEnddate(activity.getEffectiveEndtime())
|
||||||
.setEstimatedTime(activity.getEstimatedTime())
|
.setEstimatedTime(activity.getEstimatedTime())
|
||||||
.setEstimatedEndtime(activity.getEstimatedEndtime())
|
.setEstimatedEndtime(activity.getEstimatedEndtime())
|
||||||
|
|||||||
@@ -666,7 +666,7 @@ public class SteUPService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String activityTypeId = parentActivity.getActivityTypeId();
|
String activityTypeId = parentActivity.getActivityTypeId();
|
||||||
Date dataCreation = parentActivity.getEffectiveDate();
|
Date dataCreation = parentActivity.getEffectiveTime();
|
||||||
String codJfas = parentActivity.getCodJfas();
|
String codJfas = parentActivity.getCodJfas();
|
||||||
String userNamePv = parentActivity.getUserName();
|
String userNamePv = parentActivity.getUserName();
|
||||||
|
|
||||||
|
|||||||
@@ -791,7 +791,7 @@ public class CrmService {
|
|||||||
"Oggi" : UtilityDate.formatDate(stbActivity.getEstimatedDate(), CommonConstants.DATE_FORMAT_DMY);
|
"Oggi" : UtilityDate.formatDate(stbActivity.getEstimatedDate(), CommonConstants.DATE_FORMAT_DMY);
|
||||||
|
|
||||||
title = stbActivity.getActivityDescription();
|
title = stbActivity.getActivityDescription();
|
||||||
body = String.format("%s alle ore %s", moment, UtilityDate.formatDate(stbActivity.getEstimatedTime(), "HH:mm"));
|
body = String.format("%s alle ore %s", moment, UtilityLocalDate.formatDate(stbActivity.getEstimatedTime(), "HH:mm"));
|
||||||
notificationData.put("type", "memo");
|
notificationData.put("type", "memo");
|
||||||
startDate = stbActivity.getAlarmTime();
|
startDate = stbActivity.getAlarmTime();
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ import java.nio.file.Paths;
|
|||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
@@ -757,12 +758,13 @@ public class SystemController {
|
|||||||
stbActivity.setOperation(OperationType.INSERT);
|
stbActivity.setOperation(OperationType.INSERT);
|
||||||
|
|
||||||
if (activity.getActivityTypeId().equalsIgnoreCase("TICKET")) {
|
if (activity.getActivityTypeId().equalsIgnoreCase("TICKET")) {
|
||||||
Date dataAttivita = new Date();
|
LocalDateTime dataAttivita = UtilityLocalDate.getNow().atStartOfDay();
|
||||||
if (ConfigActivityRules.checkAttivita(multiDBTransactionManager.getPrimaryConnection(), stbActivity.getCodJcom(), dataAttivita)) {
|
if (ConfigActivityRules.checkAttivita(multiDBTransactionManager.getPrimaryConnection(), stbActivity.getCodJcom(), dataAttivita)) {
|
||||||
dataAttivita = UtilityDate.dateFromPart(UtilityDate.getYear(dataAttivita), UtilityDate.datePart(Calendar.MONTH, dataAttivita) + 1, 1);
|
dataAttivita = dataAttivita.plusMonths(1).withDayOfMonth(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
stbActivity.setEstimatedTime(dataAttivita)
|
stbActivity.setEstimatedTime(dataAttivita)
|
||||||
.setEstimatedEndtime(UtilityDate.RelativeDateTime(dataAttivita, 14));
|
.setEstimatedEndtime(dataAttivita.plusDays(14));
|
||||||
|
|
||||||
if (!activity.getUserName().equalsIgnoreCase("DEV") &&
|
if (!activity.getUserName().equalsIgnoreCase("DEV") &&
|
||||||
!activity.getUserName().equalsIgnoreCase("T0001") &&
|
!activity.getUserName().equalsIgnoreCase("T0001") &&
|
||||||
|
|||||||
Reference in New Issue
Block a user