- CORRECCIÓN DEL HORARIO EN EL GUARDADO DE GATOS Y TRASFERENCIAS POR SUMA DE +7HR
This commit is contained in:
parent
d44659160b
commit
78d9e09391
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Arrebol Consultancy copyright.
|
||||
*
|
||||
*
|
||||
* This code belongs to Arrebol Consultancy
|
||||
* its use, redistribution or modification are prohibited
|
||||
* its use, redistribution or modification are prohibited
|
||||
* without written authorization from Arrebol Consultancy.
|
||||
*/
|
||||
package com.arrebol.apc.controller.mobile.controller.exchange;
|
||||
@ -22,6 +22,7 @@ import com.arrebol.apc.model.ws.parsed.Exchange;
|
||||
import com.arrebol.apc.model.ws.parsed.ExchangeJaxb;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -33,133 +34,138 @@ import org.apache.logging.log4j.Logger;
|
||||
*/
|
||||
public class ExchangeEnebledUsersController implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userId
|
||||
* @param officeId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<ExchangeEnebledUsersView> findEnebledUsersToUserId(String userId, String officeId) throws Exception {
|
||||
logger.debug("exchangeEnebledUsersViewRepository");
|
||||
try {
|
||||
List<ModelParameter> parameters = new ArrayList<>();
|
||||
/**
|
||||
*
|
||||
* @param userId
|
||||
* @param officeId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<ExchangeEnebledUsersView> findEnebledUsersToUserId(String userId, String officeId) throws Exception {
|
||||
logger.debug("exchangeEnebledUsersViewRepository");
|
||||
try {
|
||||
List<ModelParameter> parameters = new ArrayList<>();
|
||||
|
||||
parameters.add(
|
||||
new ModelParameter(
|
||||
ExchangeEnebledUsersViewCfg.PARAM_OFFICE_ID,
|
||||
officeId
|
||||
)
|
||||
);
|
||||
parameters.add(
|
||||
new ModelParameter(
|
||||
ExchangeEnebledUsersViewCfg.PARAM_OFFICE_ID,
|
||||
officeId
|
||||
)
|
||||
);
|
||||
|
||||
parameters.add(
|
||||
new ModelParameter(
|
||||
ExchangeEnebledUsersViewCfg.FIELD_VIEW_ID,
|
||||
userId
|
||||
)
|
||||
);
|
||||
parameters.add(
|
||||
new ModelParameter(
|
||||
ExchangeEnebledUsersViewCfg.FIELD_VIEW_ID,
|
||||
userId
|
||||
)
|
||||
);
|
||||
|
||||
return exchangeEnebledUsersViewRepository.findEnebledUsersToUserId(
|
||||
ExchangeEnebledUsersViewCfg.QUERY_FIND_ENEBLED_USERS_TO_USER_ID,
|
||||
parameters
|
||||
);
|
||||
} catch (Exception e) {
|
||||
logger.error("findEnebledUsersToUserId", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
return exchangeEnebledUsersViewRepository.findEnebledUsersToUserId(
|
||||
ExchangeEnebledUsersViewCfg.QUERY_FIND_ENEBLED_USERS_TO_USER_ID,
|
||||
parameters
|
||||
);
|
||||
} catch (Exception e) {
|
||||
logger.error("findEnebledUsersToUserId", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param jaxb
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public boolean newExchange(ExchangeJaxb jaxb) throws Exception {
|
||||
logger.debug("newExchange");
|
||||
try {
|
||||
Transfer transfer = new Transfer(
|
||||
new User(jaxb.getSenderId()),
|
||||
new User(jaxb.getReceiverId()),
|
||||
ActiveStatus.ENEBLED,
|
||||
ActionStatus.PENDING,
|
||||
jaxb.getAmount(),
|
||||
new Office(jaxb.getOfficeId()),
|
||||
jaxb.getSenderId());
|
||||
/**
|
||||
*
|
||||
* @param jaxb
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public boolean newExchange(ExchangeJaxb jaxb) throws Exception {
|
||||
logger.debug("newExchange");
|
||||
try {
|
||||
Transfer transfer = new Transfer(
|
||||
new User(jaxb.getSenderId()),
|
||||
new User(jaxb.getReceiverId()),
|
||||
ActiveStatus.ENEBLED,
|
||||
ActionStatus.PENDING,
|
||||
jaxb.getAmount(),
|
||||
new Office(jaxb.getOfficeId()),
|
||||
jaxb.getSenderId());
|
||||
|
||||
return transferRepository.addTransfer(transfer);
|
||||
} catch (Exception e) {
|
||||
logger.error("newExchange", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
return transferRepository.addTransfer(transfer);
|
||||
} catch (Exception e) {
|
||||
logger.error("newExchange", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param transerId
|
||||
* @param userId
|
||||
* @param isApproved
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public boolean updateExchange(String transerId, String userId, boolean isApproved) throws Exception {
|
||||
logger.debug("updateExchange");
|
||||
try {
|
||||
List<ModelParameter> parameters = new ArrayList<>();
|
||||
/**
|
||||
*
|
||||
* @param transerId
|
||||
* @param userId
|
||||
* @param isApproved
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public boolean updateExchange(String transerId, String userId, boolean isApproved) throws Exception {
|
||||
logger.debug("updateExchange");
|
||||
try {
|
||||
List<ModelParameter> parameters = new ArrayList<>();
|
||||
|
||||
parameters.add(new ModelParameter(TransferCfg.FIELD_ACTION_STATUS, isApproved ? ActionStatus.APPROVED : ActionStatus.REJECTED));
|
||||
parameters.add(new ModelParameter(TransferCfg.FIELD_LAST_UPDATED_BY, userId));
|
||||
parameters.add(new ModelParameter(TransferCfg.FIELD_LAST_UPDATED_ON, new Date()));
|
||||
parameters.add(new ModelParameter(TransferCfg.FIELD_ID, transerId));
|
||||
parameters.add(new ModelParameter(TransferCfg.FIELD_ACTION_STATUS, isApproved ? ActionStatus.APPROVED : ActionStatus.REJECTED));
|
||||
parameters.add(new ModelParameter(TransferCfg.FIELD_LAST_UPDATED_BY, userId));
|
||||
Date date = new Date();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.add(Calendar.HOUR, -7);
|
||||
date = calendar.getTime();
|
||||
parameters.add(new ModelParameter(TransferCfg.FIELD_LAST_UPDATED_ON, date));
|
||||
parameters.add(new ModelParameter(TransferCfg.FIELD_ID, transerId));
|
||||
|
||||
return transferRepository.updateTransfer(TransferCfg.QUERY_UPDATE_TRANSFER_BY_ACTION, parameters);
|
||||
} catch (Exception e) {
|
||||
logger.error("updateExchange", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
return transferRepository.updateTransfer(TransferCfg.QUERY_UPDATE_TRANSFER_BY_ACTION, parameters);
|
||||
} catch (Exception e) {
|
||||
logger.error("updateExchange", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Exchange> exchangesByUsers(String userId) throws Exception {
|
||||
logger.debug("exchangesByUsers");
|
||||
try {
|
||||
List<ModelParameter> parameters = new ArrayList<>();
|
||||
/**
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Exchange> exchangesByUsers(String userId) throws Exception {
|
||||
logger.debug("exchangesByUsers");
|
||||
try {
|
||||
List<ModelParameter> parameters = new ArrayList<>();
|
||||
|
||||
parameters.add(
|
||||
new ModelParameter(
|
||||
TransferCfg.FIELD_USER_TRANSMITTER,
|
||||
new User(userId)
|
||||
)
|
||||
);
|
||||
|
||||
parameters.add(
|
||||
new ModelParameter(
|
||||
TransferCfg.FIELD_USER_RECEIVER,
|
||||
new User(userId)
|
||||
)
|
||||
);
|
||||
parameters.add(
|
||||
new ModelParameter(
|
||||
TransferCfg.FIELD_USER_TRANSMITTER,
|
||||
new User(userId)
|
||||
)
|
||||
);
|
||||
|
||||
return transferRepository.findAllTransferByUserIdAndCurdate(TransferCfg.QUERY_FIND_ALL_TRANSFER_BY_USER_ID_AND_CURDATE, parameters);
|
||||
} catch (Exception e) {
|
||||
logger.error("exchangesByUsers", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
parameters.add(
|
||||
new ModelParameter(
|
||||
TransferCfg.FIELD_USER_RECEIVER,
|
||||
new User(userId)
|
||||
)
|
||||
);
|
||||
|
||||
private static final long serialVersionUID = 2625775904919860613L;
|
||||
final Logger logger = LogManager.getLogger(ExchangeEnebledUsersController.class);
|
||||
return transferRepository.findAllTransferByUserIdAndCurdate(TransferCfg.QUERY_FIND_ALL_TRANSFER_BY_USER_ID_AND_CURDATE, parameters);
|
||||
} catch (Exception e) {
|
||||
logger.error("exchangesByUsers", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private final ExchangeEnebledUsersViewRepository exchangeEnebledUsersViewRepository;
|
||||
private final TransferRepository transferRepository;
|
||||
private static final long serialVersionUID = 2625775904919860613L;
|
||||
final Logger logger = LogManager.getLogger(ExchangeEnebledUsersController.class);
|
||||
|
||||
public ExchangeEnebledUsersController() {
|
||||
this.exchangeEnebledUsersViewRepository = new ExchangeEnebledUsersViewRepository();
|
||||
this.transferRepository = new TransferRepository();
|
||||
}
|
||||
private final ExchangeEnebledUsersViewRepository exchangeEnebledUsersViewRepository;
|
||||
private final TransferRepository transferRepository;
|
||||
|
||||
public ExchangeEnebledUsersController() {
|
||||
this.exchangeEnebledUsersViewRepository = new ExchangeEnebledUsersViewRepository();
|
||||
this.transferRepository = new TransferRepository();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ public class OtherExpense implements Serializable {
|
||||
Date date = new Date();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.add(Calendar.DAY_OF_YEAR, -1);
|
||||
calendar.add(Calendar.HOUR, -7);
|
||||
date = calendar.getTime();
|
||||
this.createdOn = date;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Arrebol Consultancy copyright.
|
||||
*
|
||||
*
|
||||
* This code belongs to Arrebol Consultancy
|
||||
* its use, redistribution or modification are prohibited
|
||||
* its use, redistribution or modification are prohibited
|
||||
* without written authorization from Arrebol Consultancy.
|
||||
*/
|
||||
package com.arrebol.apc.model.admin;
|
||||
@ -13,8 +13,8 @@ import com.arrebol.apc.model.enums.ActionStatus;
|
||||
import com.arrebol.apc.model.enums.ActiveStatus;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@ -41,257 +41,263 @@ import org.hibernate.annotations.GenericGenerator;
|
||||
@Table(name = "APC_TRANSFER")
|
||||
public class Transfer implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1304758262604329766L;
|
||||
private static final long serialVersionUID = -1304758262604329766L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(generator = "uuid")
|
||||
@GenericGenerator(name = "uuid", strategy = "uuid2")
|
||||
@Column(name = "id", length = 36)
|
||||
private String id;
|
||||
@Id
|
||||
@GeneratedValue(generator = "uuid")
|
||||
@GenericGenerator(name = "uuid", strategy = "uuid2")
|
||||
@Column(name = "id", length = 36)
|
||||
private String id;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn(
|
||||
name = "id_user_transmitter",
|
||||
referencedColumnName = "id",
|
||||
nullable = false
|
||||
)
|
||||
private User userTransmitter;
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn(
|
||||
name = "id_user_transmitter",
|
||||
referencedColumnName = "id",
|
||||
nullable = false
|
||||
)
|
||||
private User userTransmitter;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn(
|
||||
name = "id_user_receiver",
|
||||
referencedColumnName = "id",
|
||||
nullable = false
|
||||
)
|
||||
private User userReceiver;
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn(
|
||||
name = "id_user_receiver",
|
||||
referencedColumnName = "id",
|
||||
nullable = false
|
||||
)
|
||||
private User userReceiver;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "active_status", nullable = false)
|
||||
private ActiveStatus activeStatus;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "active_status", nullable = false)
|
||||
private ActiveStatus activeStatus;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "action_status", nullable = false)
|
||||
private ActionStatus actionStatus;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "action_status", nullable = false)
|
||||
private ActionStatus actionStatus;
|
||||
|
||||
@Column(name = "amount_to_transfer", nullable = false)
|
||||
private BigDecimal amountToTransfer;
|
||||
@Column(name = "amount_to_transfer", nullable = false)
|
||||
private BigDecimal amountToTransfer;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn(
|
||||
name = "id_office",
|
||||
referencedColumnName = "id",
|
||||
nullable = false
|
||||
)
|
||||
private Office office;
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn(
|
||||
name = "id_office",
|
||||
referencedColumnName = "id",
|
||||
nullable = false
|
||||
)
|
||||
private Office office;
|
||||
|
||||
@Column(name = "created_by", nullable = false, length = 36)
|
||||
private String createdBy;
|
||||
@Column(name = "created_by", nullable = false, length = 36)
|
||||
private String createdBy;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "created_on", length = 19)
|
||||
private Date createdOn;
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "created_on", length = 19)
|
||||
private Date createdOn;
|
||||
|
||||
@Column(name = "last_updated_by", length = 36)
|
||||
private String lastUpdatedBy;
|
||||
@Column(name = "last_updated_by", length = 36)
|
||||
private String lastUpdatedBy;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "last_updated_on", length = 19)
|
||||
private Date lastUpdatedOn;
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "last_updated_on", length = 19)
|
||||
private Date lastUpdatedOn;
|
||||
|
||||
public Transfer() {
|
||||
public Transfer() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userTransmitter
|
||||
* @param userReceiver
|
||||
* @param activeStatus
|
||||
* @param actionStatus
|
||||
* @param amountToTransfer
|
||||
* @param office
|
||||
* @param createdBy
|
||||
*/
|
||||
public Transfer(User userTransmitter, User userReceiver, ActiveStatus activeStatus, ActionStatus actionStatus, BigDecimal amountToTransfer, Office office, String createdBy) {
|
||||
this.userTransmitter = userTransmitter;
|
||||
this.userReceiver = userReceiver;
|
||||
this.activeStatus = activeStatus;
|
||||
this.actionStatus = actionStatus;
|
||||
this.amountToTransfer = amountToTransfer;
|
||||
this.office = office;
|
||||
this.createdBy = createdBy;
|
||||
this.createdOn = new Date();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param userTransmitter
|
||||
* @param userReceiver
|
||||
* @param activeStatus
|
||||
* @param actionStatus
|
||||
* @param amountToTransfer
|
||||
* @param office
|
||||
* @param createdBy
|
||||
*/
|
||||
public Transfer(User userTransmitter, User userReceiver, ActiveStatus activeStatus, ActionStatus actionStatus, BigDecimal amountToTransfer, Office office, String createdBy) {
|
||||
this.userTransmitter = userTransmitter;
|
||||
this.userReceiver = userReceiver;
|
||||
this.activeStatus = activeStatus;
|
||||
this.actionStatus = actionStatus;
|
||||
this.amountToTransfer = amountToTransfer;
|
||||
this.office = office;
|
||||
this.createdBy = createdBy;
|
||||
Date date = new Date();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.add(Calendar.HOUR, -7);
|
||||
date = calendar.getTime();
|
||||
this.createdOn = date;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public Transfer(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public Transfer(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Transfer(String id, User userTransmitter, User userReceiver, ActiveStatus activeStatus, ActionStatus actionStatus, BigDecimal amountToTransfer, Office office, String createdBy) {
|
||||
this.id = id;
|
||||
this.userTransmitter = userTransmitter;
|
||||
this.userReceiver = userReceiver;
|
||||
this.activeStatus = activeStatus;
|
||||
this.actionStatus = actionStatus;
|
||||
this.amountToTransfer = amountToTransfer;
|
||||
this.office = office;
|
||||
this.createdBy = createdBy;
|
||||
this.createdOn = new Date();
|
||||
}
|
||||
public Transfer(String id, User userTransmitter, User userReceiver, ActiveStatus activeStatus, ActionStatus actionStatus, BigDecimal amountToTransfer, Office office, String createdBy) {
|
||||
this.id = id;
|
||||
this.userTransmitter = userTransmitter;
|
||||
this.userReceiver = userReceiver;
|
||||
this.activeStatus = activeStatus;
|
||||
this.actionStatus = actionStatus;
|
||||
this.amountToTransfer = amountToTransfer;
|
||||
this.office = office;
|
||||
this.createdBy = createdBy;
|
||||
this.createdOn = new Date();
|
||||
}
|
||||
|
||||
public Transfer(String id, User userTransmitter, User userReceiver, ActiveStatus activeStatus, ActionStatus actionStatus, BigDecimal amountToTransfer, Office office, String createdBy, Date createdOn) {
|
||||
this.id = id;
|
||||
this.userTransmitter = userTransmitter;
|
||||
this.userReceiver = userReceiver;
|
||||
this.activeStatus = activeStatus;
|
||||
this.actionStatus = actionStatus;
|
||||
this.amountToTransfer = amountToTransfer;
|
||||
this.office = office;
|
||||
this.createdBy = createdBy;
|
||||
this.createdOn = createdOn;
|
||||
}
|
||||
public Transfer(String id, User userTransmitter, User userReceiver, ActiveStatus activeStatus, ActionStatus actionStatus, BigDecimal amountToTransfer, Office office, String createdBy, Date createdOn) {
|
||||
this.id = id;
|
||||
this.userTransmitter = userTransmitter;
|
||||
this.userReceiver = userReceiver;
|
||||
this.activeStatus = activeStatus;
|
||||
this.actionStatus = actionStatus;
|
||||
this.amountToTransfer = amountToTransfer;
|
||||
this.office = office;
|
||||
this.createdBy = createdBy;
|
||||
this.createdOn = createdOn;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public User getUserTransmitter() {
|
||||
return userTransmitter;
|
||||
}
|
||||
public User getUserTransmitter() {
|
||||
return userTransmitter;
|
||||
}
|
||||
|
||||
public void setUserTransmitter(User userTransmitter) {
|
||||
this.userTransmitter = userTransmitter;
|
||||
}
|
||||
public void setUserTransmitter(User userTransmitter) {
|
||||
this.userTransmitter = userTransmitter;
|
||||
}
|
||||
|
||||
public User getUserReceiver() {
|
||||
return userReceiver;
|
||||
}
|
||||
public User getUserReceiver() {
|
||||
return userReceiver;
|
||||
}
|
||||
|
||||
public void setUserReceiver(User userReceiver) {
|
||||
this.userReceiver = userReceiver;
|
||||
}
|
||||
public void setUserReceiver(User userReceiver) {
|
||||
this.userReceiver = userReceiver;
|
||||
}
|
||||
|
||||
public ActiveStatus getActiveStatus() {
|
||||
return activeStatus;
|
||||
}
|
||||
public ActiveStatus getActiveStatus() {
|
||||
return activeStatus;
|
||||
}
|
||||
|
||||
public void setActiveStatus(ActiveStatus activeStatus) {
|
||||
this.activeStatus = activeStatus;
|
||||
}
|
||||
public void setActiveStatus(ActiveStatus activeStatus) {
|
||||
this.activeStatus = activeStatus;
|
||||
}
|
||||
|
||||
public ActionStatus getActionStatus() {
|
||||
return actionStatus;
|
||||
}
|
||||
public ActionStatus getActionStatus() {
|
||||
return actionStatus;
|
||||
}
|
||||
|
||||
public void setActionStatus(ActionStatus actionStatus) {
|
||||
this.actionStatus = actionStatus;
|
||||
}
|
||||
public void setActionStatus(ActionStatus actionStatus) {
|
||||
this.actionStatus = actionStatus;
|
||||
}
|
||||
|
||||
public BigDecimal getAmountToTransfer() {
|
||||
return amountToTransfer;
|
||||
}
|
||||
public BigDecimal getAmountToTransfer() {
|
||||
return amountToTransfer;
|
||||
}
|
||||
|
||||
public void setAmountToTransfer(BigDecimal amountToTransfer) {
|
||||
this.amountToTransfer = amountToTransfer;
|
||||
}
|
||||
public void setAmountToTransfer(BigDecimal amountToTransfer) {
|
||||
this.amountToTransfer = amountToTransfer;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public Date getCreatedOn() {
|
||||
return createdOn;
|
||||
}
|
||||
public Date getCreatedOn() {
|
||||
return createdOn;
|
||||
}
|
||||
|
||||
public void setCreatedOn(Date createdOn) {
|
||||
this.createdOn = createdOn;
|
||||
}
|
||||
public void setCreatedOn(Date createdOn) {
|
||||
this.createdOn = createdOn;
|
||||
}
|
||||
|
||||
public String getLastUpdatedBy() {
|
||||
return lastUpdatedBy;
|
||||
}
|
||||
public String getLastUpdatedBy() {
|
||||
return lastUpdatedBy;
|
||||
}
|
||||
|
||||
public void setLastUpdatedBy(String lastUpdatedBy) {
|
||||
this.lastUpdatedBy = lastUpdatedBy;
|
||||
}
|
||||
public void setLastUpdatedBy(String lastUpdatedBy) {
|
||||
this.lastUpdatedBy = lastUpdatedBy;
|
||||
}
|
||||
|
||||
public Date getLastUpdatedOn() {
|
||||
return lastUpdatedOn;
|
||||
}
|
||||
public Date getLastUpdatedOn() {
|
||||
return lastUpdatedOn;
|
||||
}
|
||||
|
||||
public void setLastUpdatedOn(Date lastUpdatedOn) {
|
||||
this.lastUpdatedOn = lastUpdatedOn;
|
||||
}
|
||||
public void setLastUpdatedOn(Date lastUpdatedOn) {
|
||||
this.lastUpdatedOn = lastUpdatedOn;
|
||||
}
|
||||
|
||||
public Office getOffice() {
|
||||
return office;
|
||||
}
|
||||
public Office getOffice() {
|
||||
return office;
|
||||
}
|
||||
|
||||
public void setOffice(Office office) {
|
||||
this.office = office;
|
||||
}
|
||||
public void setOffice(Office office) {
|
||||
this.office = office;
|
||||
}
|
||||
|
||||
public String getUserReceiverRoutes(){
|
||||
String routes = "";
|
||||
routes = userReceiver.getHumanResource().getHumanResourceHasRoutes().stream().map((py) -> py.getRouteCtlg().getRoute()).collect(Collectors.joining(", "));
|
||||
public String getUserReceiverRoutes() {
|
||||
String routes = "";
|
||||
routes = userReceiver.getHumanResource().getHumanResourceHasRoutes().stream().map((py) -> py.getRouteCtlg().getRoute()).collect(Collectors.joining(", "));
|
||||
|
||||
return routes;
|
||||
}
|
||||
return routes;
|
||||
}
|
||||
|
||||
public String getUserTransmitterRoutes(){
|
||||
String routes = "";
|
||||
routes = userTransmitter.getHumanResource().getHumanResourceHasRoutes().stream().map((py) -> py.getRouteCtlg().getRoute()).collect(Collectors.joining(", "));
|
||||
public String getUserTransmitterRoutes() {
|
||||
String routes = "";
|
||||
routes = userTransmitter.getHumanResource().getHumanResourceHasRoutes().stream().map((py) -> py.getRouteCtlg().getRoute()).collect(Collectors.joining(", "));
|
||||
|
||||
return routes;
|
||||
}
|
||||
|
||||
public boolean getAction(Date lastStableSmallBox) {
|
||||
Date date = createdOn;
|
||||
boolean action = true;
|
||||
try {
|
||||
SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd");
|
||||
return routes;
|
||||
}
|
||||
|
||||
String dateStr = dt1.format(date);
|
||||
date = dt1.parse(dateStr);
|
||||
public boolean getAction(Date lastStableSmallBox) {
|
||||
Date date = createdOn;
|
||||
boolean action = true;
|
||||
try {
|
||||
SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
action = date.after(lastStableSmallBox);
|
||||
String dateStr = dt1.format(date);
|
||||
date = dt1.parse(dateStr);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(ExpenseCompany.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
return action;
|
||||
}
|
||||
action = date.after(lastStableSmallBox);
|
||||
|
||||
public boolean getActive() {
|
||||
if (activeStatus == ActiveStatus.ENEBLED) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public String conditionEnabled() {
|
||||
if(getActiveStatus() == ActiveStatus.DISABLED)
|
||||
return "grayRow";
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Transfer{" + "activeStatus=" + activeStatus + ", actionStatus=" + actionStatus + ", createdOn=" + createdOn + '}';
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(ExpenseCompany.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
return action;
|
||||
}
|
||||
|
||||
public boolean getActive() {
|
||||
if (activeStatus == ActiveStatus.ENEBLED) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public String conditionEnabled() {
|
||||
if (getActiveStatus() == ActiveStatus.DISABLED) {
|
||||
return "grayRow";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Transfer{" + "activeStatus=" + activeStatus + ", actionStatus=" + actionStatus + ", createdOn=" + createdOn + '}';
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user