|
|
|
@ -46,7 +46,6 @@ import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.entity.CustomerGridEntity; |
|
|
|
import com.epmet.feign.*; |
|
|
|
import com.epmet.resi.partymember.dto.partymember.result.WarnAndPartyAuditResultDTO; |
|
|
|
import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; |
|
|
|
import com.epmet.service.CustomerAgencyService; |
|
|
|
import com.epmet.service.CustomerGridService; |
|
|
|
@ -966,45 +965,21 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
public AbandonGridResDTO abandonGrid(AbandonGridFormDTO formDTO) { |
|
|
|
|
|
|
|
//待审核党员、待审核热心居民
|
|
|
|
Result<WarnAndPartyAuditResultDTO> partyMem = resiPartyMemberOpenFeignClient.partyMemberAuditReset(formDTO.getGridId()); |
|
|
|
if (!partyMem.success() || null == partyMem.getData()) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "partyMemberAuditReset failed", "数据校验异常"); |
|
|
|
} |
|
|
|
public void abandonGrid(AbandonGridFormDTO formDTO) { |
|
|
|
//未处理的事件
|
|
|
|
Result<Boolean> eventRes = govProjectOpenFeignClient.eventAuditReset(formDTO.getGridId()); |
|
|
|
if (!eventRes.success() || null == eventRes.getData()) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "eventAuditReset failed", "数据校验异常"); |
|
|
|
} |
|
|
|
//表决中的议题
|
|
|
|
Result<Boolean> issueAuditReset = govIssueOpenFeignClient.issueAuditReset(formDTO.getGridId()); |
|
|
|
if (!issueAuditReset.success() || null == issueAuditReset.getData()) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "issueAuditReset failed", "数据校验异常"); |
|
|
|
} |
|
|
|
//徽章????
|
|
|
|
AbandonGridResDTO result=new AbandonGridResDTO(true,new ArrayList<>()); |
|
|
|
if(partyMem.getData().getPartyMemberStatus()){ |
|
|
|
result.setAbandonFlag(false); |
|
|
|
result.getToDoList().add("存在未审核的党员申请"); |
|
|
|
if (eventRes.success() || issueAuditReset.success()) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "校验数据异常", "服务器开小差了..."); |
|
|
|
} |
|
|
|
if(partyMem.getData().getWarnStatus()){ |
|
|
|
result.setAbandonFlag(false); |
|
|
|
result.getToDoList().add("存在未审核的热心居民申请"); |
|
|
|
if (eventRes.getData()) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "存在未处理的事件", "该网格存在未办结的群众直报事件,请先将事件办结后再操作"); |
|
|
|
} |
|
|
|
if(eventRes.getData()){ |
|
|
|
result.setAbandonFlag(false); |
|
|
|
result.getToDoList().add("存在未处理的事件"); |
|
|
|
} |
|
|
|
if(issueAuditReset.getData()){ |
|
|
|
result.setAbandonFlag(false); |
|
|
|
result.getToDoList().add("存在未处理的议题"); |
|
|
|
if (issueAuditReset.getData()) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "存在未关闭的议题", "该网格存在未关闭的议题,请处理完再操作"); |
|
|
|
} |
|
|
|
|
|
|
|
if(!result.getAbandonFlag()){ |
|
|
|
return result; |
|
|
|
} |
|
|
|
//可以弃用、处理数据 todo
|
|
|
|
// ....
|
|
|
|
// ....
|
|
|
|
@ -1015,7 +990,6 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu |
|
|
|
updateGrid.set(CustomerGridEntity::getAbandonFlag,true); |
|
|
|
updateGrid.eq(CustomerGridEntity::getId,formDTO.getGridId()); |
|
|
|
baseDao.update(null,updateGrid); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|