|
|
@ -36,7 +36,6 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
@ -200,7 +199,7 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl<IcServiceRecordD |
|
|
|
}); |
|
|
|
|
|
|
|
// 3.反馈
|
|
|
|
if (input == null) { |
|
|
|
if (feedbackDto == null) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
@ -219,9 +218,11 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl<IcServiceRecordD |
|
|
|
serviceFeedbackDao.insert(feedbackEntity); |
|
|
|
|
|
|
|
// 4.反馈附件列表
|
|
|
|
List<ServiceProjectFeedbackFormDTO.Feedback> attachmentList = feedbackDto.getAttachmentList(); |
|
|
|
List<ServiceProjectFeedbackFormDTO.Attachment> attachmentList = feedbackDto.getAttachmentList(); |
|
|
|
if (CollectionUtils.isNotEmpty(attachmentList)) { |
|
|
|
attachmentList.forEach(a -> { |
|
|
|
for (int i = 0; i < attachmentList.size(); i++) { |
|
|
|
ServiceProjectFeedbackFormDTO.Attachment a = attachmentList.get(i); |
|
|
|
|
|
|
|
IcServiceProjectAttachmentEntity at = new IcServiceProjectAttachmentEntity(); |
|
|
|
at.setAttachmentFormat(a.getAttachmentFormat()); |
|
|
|
at.setAttachmentName(a.getAttachmentName()); |
|
|
@ -229,11 +230,12 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl<IcServiceRecordD |
|
|
|
at.setAttachmentUrl(a.getAttachmentUrl()); |
|
|
|
at.setDuration(0); |
|
|
|
at.setIcServiceId(input.getServiceProjectId()); |
|
|
|
// todo 需要审核吗
|
|
|
|
// 根本不需要审核,逗你玩
|
|
|
|
at.setReason(null); |
|
|
|
at.setStatus(null); |
|
|
|
at.setStatus("auto_passed"); |
|
|
|
at.setSort(i); |
|
|
|
serviceProjectAttachmentDao.insert(at); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -254,9 +256,19 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl<IcServiceRecordD |
|
|
|
EpmetErrorCode.SERVER_ERROR.getCode(), |
|
|
|
msg, msg); |
|
|
|
|
|
|
|
return new String[]{ neighborHoodDTO.getAgencyPids().concat(":").concat(neighborHoodDTO.getId()), |
|
|
|
GridInfoCache gridOfNeighborhood = CustomerOrgRedis.getGridInfo(neighborHoodDTO.getGridId()); |
|
|
|
|
|
|
|
String agencyPids = neighborHoodDTO.getAgencyPids(); |
|
|
|
String agencyId = neighborHoodDTO.getAgencyId(); |
|
|
|
String gridId = gridOfNeighborhood.getId(); |
|
|
|
|
|
|
|
return new String[]{ agencyPids.concat(":") |
|
|
|
.concat(agencyId).concat(":") |
|
|
|
.concat(gridId).concat(":") |
|
|
|
.concat(neighborHoodDTO.getId()), |
|
|
|
neighborHoodDTO.getNeighborHoodName() }; |
|
|
|
} else if ("agency".equals(scopeObjectType)) { |
|
|
|
// 组织的pids是到父级组织
|
|
|
|
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(scopeObjectId); |
|
|
|
if ("0".equals(agencyInfo.getPid())) { |
|
|
|
return new String[]{ agencyInfo.getId(), agencyInfo.getOrganizationName() }; |
|
|
@ -264,7 +276,8 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl<IcServiceRecordD |
|
|
|
return new String[]{ agencyInfo.getPids().concat(":").concat(agencyInfo.getPid()), agencyInfo.getOrganizationName() }; |
|
|
|
} else if ("grid".equals(scopeObjectType)) { |
|
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(scopeObjectId); |
|
|
|
return new String[]{ gridInfo.getPids().concat(":").concat(gridInfo.getPid()), gridInfo.getGridName() }; |
|
|
|
// 网格的pids是到社区的
|
|
|
|
return new String[]{ gridInfo.getPids().concat(":").concat(gridInfo.getId()), gridInfo.getGridName() }; |
|
|
|
} else { |
|
|
|
String msg = String.format("【服务项目】-发起服务-范围type未知:scopeObjectType:%s,scopeObjectId:%s", scopeObjectType, scopeObjectId); |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg); |
|
|
|