From 8f55a96825fef9e7da2d6a8c84d8834fa5e58d53 Mon Sep 17 00:00:00 2001 From: rajesh Date: Tue, 29 Oct 2024 19:47:11 +0530 Subject: [PATCH] Updated code for updating application status form AWAITING to DRAFT --- .../net/gepafin/tendermanagement/dao/ApplicationDao.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/gepafin/tendermanagement/dao/ApplicationDao.java b/src/main/java/net/gepafin/tendermanagement/dao/ApplicationDao.java index e1cf0820..cf1265fe 100644 --- a/src/main/java/net/gepafin/tendermanagement/dao/ApplicationDao.java +++ b/src/main/java/net/gepafin/tendermanagement/dao/ApplicationDao.java @@ -611,8 +611,11 @@ public class ApplicationDao { sendMailToUserAndCompany(userEntity, applicationEntity); sendMailTodefaultSystemAndGepafin(userEntity, applicationEntity); applicationEntity.setStatus(status.getValue()); - applicationEntity = saveApplicationEntity(applicationEntity); } + if (status.equals(ApplicationStatusTypeEnum.DRAFT) && Boolean.TRUE.equals(applicationEntity.getStatus().equals(ApplicationStatusTypeEnum.AWAITING.getValue()))) { + applicationEntity.setStatus(status.getValue()); + } + applicationEntity = saveApplicationEntity(applicationEntity); return getApplicationResponse(applicationEntity);