|
@ -40,6 +40,7 @@ import com.epmet.constant.PartyServiceCenterConstant; |
|
|
import com.epmet.dao.IcMatterAppointmentRecordDao; |
|
|
import com.epmet.dao.IcMatterAppointmentRecordDao; |
|
|
import com.epmet.dao.IcPartyServiceCenterDao; |
|
|
import com.epmet.dao.IcPartyServiceCenterDao; |
|
|
import com.epmet.dto.IcPartyServiceCenterDTO; |
|
|
import com.epmet.dto.IcPartyServiceCenterDTO; |
|
|
|
|
|
import com.epmet.dto.RegisterRelationDTO; |
|
|
import com.epmet.dto.TimeDTO; |
|
|
import com.epmet.dto.TimeDTO; |
|
|
import com.epmet.dto.form.*; |
|
|
import com.epmet.dto.form.*; |
|
|
import com.epmet.dto.result.*; |
|
|
import com.epmet.dto.result.*; |
|
@ -347,13 +348,9 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ |
|
|
throw new RenException(EpmetErrorCode.APPOINTMENT_TIME_ERROR.getCode()); |
|
|
throw new RenException(EpmetErrorCode.APPOINTMENT_TIME_ERROR.getCode()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); |
|
|
Result<RegisterRelationDTO> registerRelation = userOpenFeignClient.resiRelationInfo(tokenDto.getUserId()); |
|
|
if (null == staffInfo){ |
|
|
if (!registerRelation.success()){ |
|
|
throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); |
|
|
throw new EpmetException(String.format("查询居民{%s}信息失败",tokenDto.getUserId())); |
|
|
} |
|
|
|
|
|
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); |
|
|
|
|
|
if (null == agencyInfo){ |
|
|
|
|
|
throw new RenException(String.format("查询组织信息失败%s",staffInfo.getAgencyId())); |
|
|
|
|
|
} |
|
|
} |
|
|
IcMatterAppointmentRecordEntity e = ConvertUtils.sourceToTarget(formDTO, IcMatterAppointmentRecordEntity.class); |
|
|
IcMatterAppointmentRecordEntity e = ConvertUtils.sourceToTarget(formDTO, IcMatterAppointmentRecordEntity.class); |
|
|
e.setCustomerId(customerId); |
|
|
e.setCustomerId(customerId); |
|
@ -361,11 +358,24 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ |
|
|
e.setOrgId(formDTO.getOrgId()); |
|
|
e.setOrgId(formDTO.getOrgId()); |
|
|
e.setOrgType(formDTO.getOrgType()); |
|
|
e.setOrgType(formDTO.getOrgType()); |
|
|
}else { |
|
|
}else { |
|
|
e.setOrgId(staffInfo.getAgencyId()); |
|
|
e.setOrgId(registerRelation.getData().getGridId()); |
|
|
e.setOrgType(PartyServiceCenterConstant.ORG_TYPE_AGENCY); |
|
|
e.setOrgType(PartyServiceCenterConstant.ORG_TYPE_GRID); |
|
|
|
|
|
} |
|
|
|
|
|
if (e.getOrgType().equals(PartyServiceCenterConstant.ORG_TYPE_GRID)){ |
|
|
|
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(e.getOrgId()); |
|
|
|
|
|
if (null == gridInfo){ |
|
|
|
|
|
throw new EpmetException(String.format("查询组织信息失败%s",e.getOrgId())); |
|
|
|
|
|
} |
|
|
|
|
|
e.setPid(gridInfo.getPid()); |
|
|
|
|
|
e.setPids(gridInfo.getPids()); |
|
|
|
|
|
}else { |
|
|
|
|
|
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(e.getOrgId()); |
|
|
|
|
|
if (null == agencyInfo){ |
|
|
|
|
|
throw new EpmetException(String.format("查询组织信息失败%s",e.getOrgId())); |
|
|
|
|
|
} |
|
|
|
|
|
e.setPid(agencyInfo.getPid()); |
|
|
|
|
|
e.setPids(agencyInfo.getPids()); |
|
|
} |
|
|
} |
|
|
e.setPid(agencyInfo.getPid()); |
|
|
|
|
|
e.setPids(agencyInfo.getPids()); |
|
|
|
|
|
e.setStatus(PartyServiceCenterConstant.APPOINTMENT_STATUS_APPOINTING); |
|
|
e.setStatus(PartyServiceCenterConstant.APPOINTMENT_STATUS_APPOINTING); |
|
|
matterAppointmentRecordDao.insert(e); |
|
|
matterAppointmentRecordDao.insert(e); |
|
|
} |
|
|
} |
|
|