|
|
@ -85,10 +85,7 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<HomeMonthTotalResultDTO> getHomeMonthTotal(HomeMonthTotalFormDTO formDTO) { |
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
|
|
|
if (null == staffInfo){ |
|
|
|
throw new EpmetException("查询工作人员失败:"+formDTO.getStaffId()); |
|
|
|
} |
|
|
|
CustomerStaffInfoCacheResult staffInfo = queryStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
|
|
|
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
IcPartyOrgDTO icPartyOrgDTO = partyOrgService.get(formDTO.getOrgId()); |
|
|
|
if (null == icPartyOrgDTO){ |
|
|
@ -138,11 +135,7 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Map<String, String> addOrUpdate(IcPartyActAddOrUpdateFormDTO formDTO) { |
|
|
|
CustomerStaffInfoCacheResult staffInfo=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getPublishStaffId()); |
|
|
|
if (null == staffInfo) { |
|
|
|
String msg = "查询工作人员信息异常"; |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); |
|
|
|
} |
|
|
|
CustomerStaffInfoCacheResult staffInfo=queryStaffInfo(formDTO.getCustomerId(),formDTO.getPublishStaffId()); |
|
|
|
IcPartyActEntity icPartyActEntity= ConvertUtils.sourceToTarget(formDTO,IcPartyActEntity.class); |
|
|
|
icPartyActEntity.setAutoPublicTime(DateUtils.calDateBaseDay(formDTO.getHoldTime(),formDTO.getAutoPublicType())); |
|
|
|
icPartyActEntity.setPublishStaffName(staffInfo.getRealName()); |
|
|
@ -181,6 +174,15 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart |
|
|
|
return map; |
|
|
|
} |
|
|
|
|
|
|
|
private CustomerStaffInfoCacheResult queryStaffInfo(String customerId, String staffId) { |
|
|
|
CustomerStaffInfoCacheResult staffInfo=CustomerStaffRedis.getStaffInfo(customerId,staffId); |
|
|
|
if (null == staffInfo) { |
|
|
|
String msg = "查询工作人员信息异常"; |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); |
|
|
|
} |
|
|
|
return staffInfo; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 活动列表-分页查询 |
|
|
@ -190,7 +192,10 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public PageData<IcPartyActPageResultDTO> pageList(IcPartyActPageFormDTO formDTO) { |
|
|
|
CustomerStaffInfoCacheResult staffInfo = queryStaffInfo(formDTO.getCustomerId(),formDTO.getPublishStaffId()); |
|
|
|
formDTO.setStaffAgencyId(staffInfo.getAgencyId()); |
|
|
|
// todo
|
|
|
|
|
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
@ -216,10 +221,7 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public ActAndScheduleListResultDTO getActAndScheduleList(ActAndScheduleListFormDTO formDTO) { |
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
|
|
|
if (null == staffInfo){ |
|
|
|
throw new EpmetException("查询工作人员失败:"+formDTO.getStaffId()); |
|
|
|
} |
|
|
|
CustomerStaffInfoCacheResult staffInfo = queryStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId()); |
|
|
|
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
IcPartyOrgDTO icPartyOrgDTO = partyOrgService.get(formDTO.getOrgId()); |
|
|
|
if (null == icPartyOrgDTO){ |
|
|
|