|
|
@ -33,6 +33,7 @@ import com.epmet.constant.ReadFlagConstant; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.UserResiInfoResultDTO; |
|
|
|
import com.epmet.dto.result.UserRoleResultDTO; |
|
|
|
import com.epmet.modules.constant.UserMessageConstant; |
|
|
|
import com.epmet.modules.feign.EpmetMessageFeignClient; |
|
|
|
import com.epmet.modules.feign.EpmetUserFeignClient; |
|
|
|
import com.epmet.modules.feign.GovOrgFeignClient; |
|
|
@ -67,7 +68,6 @@ import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import sun.security.pkcs11.Secmod; |
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.*; |
|
|
@ -343,7 +343,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
+ (StringUtils.isBlank(resiResult.getData().getName()) ? "" :resiResult.getData().getName()); |
|
|
|
} |
|
|
|
userName = StringUtils.isBlank(userName) ? ModuleConstant.UNKNOWN : userName; |
|
|
|
String msg = String.format(ModuleConstant.CREATION_OF_GROUP_MESSAGE_TEMPLATE,roleName,userName,applyCreateGroupFormDTO.getGroupName()); |
|
|
|
String msg = String.format(UserMessageConstant.CREATION_OF_GROUP_MESSAGE_TEMPLATE,roleName,userName,applyCreateGroupFormDTO.getGroupName()); |
|
|
|
//3.2、插入一条待审核的操作记录
|
|
|
|
ResiGroupOperationDTO resiGroupOperation = new ResiGroupOperationDTO(); |
|
|
|
resiGroupOperation.setResiGroupId(resiGroupEntity.getId()); |
|
|
@ -391,7 +391,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
} |
|
|
|
resiGroupStatisticalService.save(resiGroupStatisticalDTO); |
|
|
|
//发送消息:创建小组
|
|
|
|
sendMsgResi2Gov(ModuleConstant.CREATE_GROUP_APPLYING_MSG_TITLE,msg,applyCreateGroupFormDTO.getGridId(),applyCreateGroupFormDTO.getUserId(),applyCreateGroupFormDTO.getCustomerId()); |
|
|
|
sendMsgResi2Gov(UserMessageConstant.CREATE_GROUP_APPLYING_MSG_TITLE,msg,applyCreateGroupFormDTO.getGridId(),applyCreateGroupFormDTO.getUserId(),applyCreateGroupFormDTO.getCustomerId()); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
@ -550,9 +550,9 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
userMessageFormDTO.setApp(ModuleConstant.APP_RESI); |
|
|
|
userMessageFormDTO.setGridId(resiGroupDTO.getGridId()); |
|
|
|
userMessageFormDTO.setCustomerId(resiGroupDTO.getCustomerId()); |
|
|
|
userMessageFormDTO.setMessageContent(String.format(ModuleConstant.AGREE_CREATING_GROUP_MSG,resiGroupDTO.getGroupName())); |
|
|
|
userMessageFormDTO.setMessageContent(String.format(UserMessageConstant.AGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName())); |
|
|
|
if(!epmetMessageFeignClient.saveUserMessage(userMessageFormDTO).success()){ |
|
|
|
logger.warn(String.format(ModuleConstant.FAILED_SEND_MESSAGE,String.format(ModuleConstant.AGREE_CREATING_GROUP_MSG,resiGroupDTO.getGroupName()))); |
|
|
|
logger.warn(String.format(ModuleConstant.FAILED_SEND_MESSAGE,String.format(UserMessageConstant.AGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName()))); |
|
|
|
} |
|
|
|
|
|
|
|
return new Result(); |
|
|
@ -594,9 +594,9 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
userMessageFormDTO.setApp(ModuleConstant.APP_RESI); |
|
|
|
userMessageFormDTO.setGridId(resiGroupDTO.getGridId()); |
|
|
|
userMessageFormDTO.setCustomerId(resiGroupDTO.getCustomerId()); |
|
|
|
userMessageFormDTO.setMessageContent(String.format(ModuleConstant.DISAGREE_CREATING_GROUP_MSG,resiGroupDTO.getGroupName(),disAgreeApplyGroupFormDTO.getRejectReason())); |
|
|
|
userMessageFormDTO.setMessageContent(String.format(UserMessageConstant.DISAGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName(),disAgreeApplyGroupFormDTO.getRejectReason())); |
|
|
|
if(!epmetMessageFeignClient.saveUserMessage(userMessageFormDTO).success()){ |
|
|
|
logger.warn(String.format(ModuleConstant.FAILED_SEND_MESSAGE,String.format(ModuleConstant.DISAGREE_CREATING_GROUP_MSG,resiGroupDTO.getGroupName(),disAgreeApplyGroupFormDTO.getRejectReason()))); |
|
|
|
logger.warn(String.format(ModuleConstant.FAILED_SEND_MESSAGE,String.format(UserMessageConstant.DISAGREE_CREATING_GROUP_MSG_TEMPLATE,resiGroupDTO.getGroupName(),disAgreeApplyGroupFormDTO.getRejectReason()))); |
|
|
|
} |
|
|
|
|
|
|
|
return new Result(); |
|
|
@ -785,7 +785,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
return new Result<ApplyingGroupDetailResultDTO>().ok(detail); |
|
|
|
} |
|
|
|
/** |
|
|
|
* @Description 给加入此网格的管理员发送消息 |
|
|
|
* @Description 给加入此网格的网格长发送消息 |
|
|
|
* @param msg |
|
|
|
* @param gridId |
|
|
|
* @param userId |
|
|
@ -804,7 +804,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
RolesUsersListFormDTO rolesUsersListFormDTO = new RolesUsersListFormDTO(); |
|
|
|
rolesUsersListFormDTO.setCustomerId(customerId); |
|
|
|
List<String> roleKeys = new ArrayList<String>(); |
|
|
|
roleKeys.add(ModuleConstant.STAFF_ROLE_MANAGER); |
|
|
|
roleKeys.add(ModuleConstant.STAFF_ROLE_GRID_MANAGER); |
|
|
|
rolesUsersListFormDTO.setRoleKeys(roleKeys); |
|
|
|
rolesUsersListFormDTO.setUserIds(gridstaffs.getData()); |
|
|
|
Result<List<String>> staffRoles = |
|
|
|