|
|
@ -179,8 +179,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD |
|
|
|
IcPartyActivityDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class); |
|
|
|
|
|
|
|
//获取服务事项
|
|
|
|
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(entity.getCustomerId()); |
|
|
|
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(entity.getCustomerId()); |
|
|
|
Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
List<String> services = icActivityServiceRelationService.getServiceList(id); |
|
|
|
List<String> serviceNames = services.stream().map(categoryMap::get).collect(Collectors.toList()); |
|
|
|
dto.setServiceMatterList(services); |
|
|
@ -213,7 +213,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD |
|
|
|
entity.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
entity.setAgencyId(staff.getAgencyId()); |
|
|
|
entity.setPids(staff.getAgencyPIds()); |
|
|
|
if(StringUtils.isBlank(entity.getId())) { |
|
|
|
if (StringUtils.isBlank(entity.getId())) { |
|
|
|
insert(entity); |
|
|
|
} else { |
|
|
|
updateById(entity); |
|
|
@ -290,8 +290,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD |
|
|
|
|
|
|
|
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); |
|
|
|
//获取服务事项
|
|
|
|
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); |
|
|
|
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); |
|
|
|
Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
//获取联建单位
|
|
|
|
IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); |
|
|
|
unitDTO.setAgencyId(staffInfoCache.getAgencyId()); |
|
|
@ -341,43 +341,43 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD |
|
|
|
|
|
|
|
} |
|
|
|
//活动标题 活动目标 活动内容 活动时间 活动地址 活动地址经度 活动地址纬度 活动结果
|
|
|
|
if(StringUtils.isBlank(obj.getTitle())) { |
|
|
|
if (StringUtils.isBlank(obj.getTitle())) { |
|
|
|
IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); |
|
|
|
failed.setErrorInfo("活动标题为空"); |
|
|
|
fileList.add(failed); |
|
|
|
log.warn(String.format("活动标题为空,行号->%s", obj.getRowNum())); |
|
|
|
iterator.remove(); |
|
|
|
} else if(StringUtils.isBlank(obj.getTarget())) { |
|
|
|
} else if (StringUtils.isBlank(obj.getTarget())) { |
|
|
|
IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); |
|
|
|
failed.setErrorInfo("活动目标为空"); |
|
|
|
fileList.add(failed); |
|
|
|
log.warn(String.format("活动目标为空,行号->%s", obj.getRowNum())); |
|
|
|
} else if(StringUtils.isBlank(obj.getContent())) { |
|
|
|
} else if (StringUtils.isBlank(obj.getContent())) { |
|
|
|
IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); |
|
|
|
failed.setErrorInfo("活动内容为空"); |
|
|
|
fileList.add(failed); |
|
|
|
log.warn(String.format("活动内容为空,行号->%s", obj.getRowNum())); |
|
|
|
} else if(StringUtils.isBlank(obj.getActivityTime())) { |
|
|
|
} else if (StringUtils.isBlank(obj.getActivityTime())) { |
|
|
|
IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); |
|
|
|
failed.setErrorInfo("活动时间为空"); |
|
|
|
fileList.add(failed); |
|
|
|
log.warn(String.format("活动时间为空,行号->%s", obj.getRowNum())); |
|
|
|
} else if(StringUtils.isBlank(obj.getAddress())) { |
|
|
|
} else if (StringUtils.isBlank(obj.getAddress())) { |
|
|
|
IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); |
|
|
|
failed.setErrorInfo("活动地址为空"); |
|
|
|
fileList.add(failed); |
|
|
|
log.warn(String.format("活动地址为空,行号->%s", obj.getRowNum())); |
|
|
|
} else if(StringUtils.isBlank(obj.getLatitude())) { |
|
|
|
} else if (StringUtils.isBlank(obj.getLatitude())) { |
|
|
|
IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); |
|
|
|
failed.setErrorInfo("活动地址纬度为空"); |
|
|
|
fileList.add(failed); |
|
|
|
log.warn(String.format("活动地址纬度为空,行号->%s", obj.getRowNum())); |
|
|
|
} else if(StringUtils.isBlank(obj.getLongitude())) { |
|
|
|
} else if (StringUtils.isBlank(obj.getLongitude())) { |
|
|
|
IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); |
|
|
|
failed.setErrorInfo("活动地址经度为空"); |
|
|
|
fileList.add(failed); |
|
|
|
log.warn(String.format("活动地址经度为空,行号->%s", obj.getRowNum())); |
|
|
|
} else if(StringUtils.isBlank(obj.getResult())) { |
|
|
|
} else if (StringUtils.isBlank(obj.getResult())) { |
|
|
|
IcPartyActivityImportFailedExcel failed = ConvertUtils.sourceToTarget(obj, IcPartyActivityImportFailedExcel.class); |
|
|
|
failed.setErrorInfo("活动结果为空"); |
|
|
|
fileList.add(failed); |
|
|
@ -540,7 +540,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public PageData<IcPartyActivityDTO> getActivityList(TokenDto tokenDto, PartyActivityFormDTO formDTO) { |
|
|
|
if (null == formDTO.getStartTime() && null == formDTO.getEndTime()) { |
|
|
|
// unitId 不为空(按单位查询)时,不需要限制活动创建时间
|
|
|
|
if (null == formDTO.getStartTime() && null == formDTO.getEndTime() && StringUtils.isBlank(formDTO.getUnitId())) { |
|
|
|
setDate(formDTO); |
|
|
|
} |
|
|
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
|
|
@ -554,8 +555,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD |
|
|
|
//获取联建单位
|
|
|
|
Map<String, String> option = icPartyUnitService.options(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
//获取服务事项字典
|
|
|
|
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); |
|
|
|
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); |
|
|
|
Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
//数据组装
|
|
|
|
dtoList.forEach(dto -> { |
|
|
|
//联建单位ID与单位名匹配
|
|
|
@ -617,6 +618,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD |
|
|
|
|
|
|
|
/** |
|
|
|
* 近30天开始时间和结束时间 (精确到秒) |
|
|
|
* |
|
|
|
* @Param formDTO |
|
|
|
* @Return |
|
|
|
* @Author zhaoqifeng |
|
|
|