From fc43b8d08210e8c8ae6e01553f8a1485c2c3324a 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 5a03fc55..ccb9281f 100644 --- a/src/main/java/net/gepafin/tendermanagement/dao/ApplicationDao.java +++ b/src/main/java/net/gepafin/tendermanagement/dao/ApplicationDao.java @@ -615,8 +615,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);