|
|
@ -7,6 +7,9 @@ import com.yxt.common.base.utils.HttpStatusEnum; |
|
|
|
import com.yxt.common.core.query.PagerQuery; |
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
|
import com.yxt.common.core.vo.PagerVo; |
|
|
|
import com.yxt.oms.biz.func.crmfile.CommonAppendixSelectQuery; |
|
|
|
import com.yxt.oms.biz.func.crmfile.CommonAppendixVo; |
|
|
|
import com.yxt.oms.biz.func.crmfile.CommonAttachTypeEnum; |
|
|
|
import com.yxt.oms.biz.func.crmfile.PcCommonAppendixDto; |
|
|
|
import com.yxt.oms.biz.func.crmvisit.CrmVisitService; |
|
|
|
import com.yxt.oms.biz.func.crmvisit.PcCrmVisitAppendixDto; |
|
|
@ -20,6 +23,7 @@ import com.yxt.oms.feign.portal.sysorganization.SysOrganizationFeign; |
|
|
|
import com.yxt.oms.feign.portal.sysstafforg.SysStaffOrgFeign; |
|
|
|
import com.yxt.oms.feign.portal.sysuser.SysUserFeign; |
|
|
|
import com.yxt.oms.feign.portal.sysuser.SysUserVo; |
|
|
|
import com.yxt.oms.utils.FileQueryUrl; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
@ -189,6 +193,22 @@ public class CrmCustomerTempService { |
|
|
|
} |
|
|
|
crmFileFeign.saveCommonAppendix(visitSid, pcCommonAppendixDtoList); |
|
|
|
} |
|
|
|
// 增加客户档案附件信息
|
|
|
|
if (dto.getCustomerFiles().size() != 0) { |
|
|
|
List<PcCommonAppendixDto> pcCommonAppendixDtoList = new ArrayList<>(); |
|
|
|
List<FileQueryUrl> list = dto.getCustomerFiles(); |
|
|
|
for (int i = 0; i < list.size(); i++) { |
|
|
|
PcCommonAppendixDto pcCommonAppendixDto = new PcCommonAppendixDto(); |
|
|
|
FileQueryUrl url = list.get(i); |
|
|
|
if (StringUtils.isNotBlank(dto.getUserSid())) { |
|
|
|
pcCommonAppendixDto.setCreateBySid(dto.getUserSid()); |
|
|
|
} |
|
|
|
pcCommonAppendixDto.setFilePath(url.getUrl()); |
|
|
|
pcCommonAppendixDtoList.add(pcCommonAppendixDto); |
|
|
|
} |
|
|
|
crmFileFeign.saveAppendix(visitSid, CommonAttachTypeEnum.CUSTOMER_FILE.getAttachType(), pcCommonAppendixDtoList); |
|
|
|
} |
|
|
|
|
|
|
|
return crmCustomerTemp; |
|
|
|
|
|
|
|
} |
|
|
@ -255,6 +275,23 @@ public class CrmCustomerTempService { |
|
|
|
customerTemp.setUseOrgSid(dto.getUseOrgSid()); |
|
|
|
} |
|
|
|
crmCustomerTempFeign.updateEntity(customerTemp); |
|
|
|
crmFileFeign.deleteFiles(sid, CommonAttachTypeEnum.CUSTOMER_FILE.getAttachType()); |
|
|
|
// 增加客户档案附件信息
|
|
|
|
if (dto.getCustomerFiles().size() != 0) { |
|
|
|
List<PcCommonAppendixDto> pcCommonAppendixDtoList = new ArrayList<>(); |
|
|
|
List<FileQueryUrl> list = dto.getCustomerFiles(); |
|
|
|
for (int i = 0; i < list.size(); i++) { |
|
|
|
PcCommonAppendixDto pcCommonAppendixDto = new PcCommonAppendixDto(); |
|
|
|
FileQueryUrl url = list.get(i); |
|
|
|
if (StringUtils.isNotBlank(dto.getUserSid())) { |
|
|
|
pcCommonAppendixDto.setCreateBySid(dto.getUserSid()); |
|
|
|
} |
|
|
|
pcCommonAppendixDto.setFilePath(url.getUrl()); |
|
|
|
pcCommonAppendixDtoList.add(pcCommonAppendixDto); |
|
|
|
} |
|
|
|
crmFileFeign.saveAppendix(sid, CommonAttachTypeEnum.CUSTOMER_FILE.getAttachType(), pcCommonAppendixDtoList); |
|
|
|
} |
|
|
|
|
|
|
|
return rb.success(); |
|
|
|
} |
|
|
|
|
|
|
@ -267,6 +304,19 @@ public class CrmCustomerTempService { |
|
|
|
CrmCustomerTempVo vo = new CrmCustomerTempVo(); |
|
|
|
CrmCustomerTemp crmCustomerTemp = this.fetchBySid(sid); |
|
|
|
BeanUtil.copyProperties(crmCustomerTemp, vo); |
|
|
|
CommonAppendixSelectQuery appendixSelectQuery = new CommonAppendixSelectQuery(); |
|
|
|
appendixSelectQuery.setLinkSid(sid); |
|
|
|
appendixSelectQuery.setAttachType(CommonAttachTypeEnum.CUSTOMER_FILE.getAttachType()); |
|
|
|
List<CommonAppendixVo> appendixVos = crmFileFeign.getPcAppendix(appendixSelectQuery).getData(); |
|
|
|
if (!appendixVos.isEmpty() && appendixVos.size() > 0) { |
|
|
|
List<FileQueryUrl> list = new ArrayList<>(); |
|
|
|
for (CommonAppendixVo appendixVo : appendixVos) { |
|
|
|
FileQueryUrl queryUrl = new FileQueryUrl(); |
|
|
|
queryUrl.setUrl(appendixVo.getFilePath()); |
|
|
|
list.add(queryUrl); |
|
|
|
} |
|
|
|
vo.setCustomerFiles(list); |
|
|
|
} |
|
|
|
return vo; |
|
|
|
} |
|
|
|
} |
|
|
|