|
|
@ -7,6 +7,8 @@ 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.commonmethod.CommonMethod; |
|
|
|
import com.yxt.oms.biz.func.commonmethod.DataRule; |
|
|
|
import com.yxt.oms.biz.func.crmfile.CommonAppendixSelectQuery; |
|
|
|
import com.yxt.oms.biz.func.crmfile.CommonAppendixVo; |
|
|
|
import com.yxt.oms.biz.func.crmfile.CommonAttachTypeEnum; |
|
|
@ -68,12 +70,14 @@ public class CrmCustomerTempService { |
|
|
|
private DictCommonFeign dictCommonFeign; |
|
|
|
@Resource |
|
|
|
private SysOrganizationFeign sysOrganizationFeign; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private CommonMethod commonMethod; |
|
|
|
public ResultBean<PagerVo<CrmCustomerTempVo>> listPageVo(PagerQuery<CrmCustomerTempQuery> pq) { |
|
|
|
if (StringUtils.isNotBlank(pq.getParams().getUserSid())) { |
|
|
|
String staffSid = sysUserFeign.selectBySid(pq.getParams().getUserSid()).getData().getStaffSid(); |
|
|
|
pq.getParams().setStaffSid(staffSid); |
|
|
|
} |
|
|
|
//通用组装方法 根据用户sid、菜单、组织全路径sid 获取组装参数
|
|
|
|
CrmCustomerTempQuery query = pq.getParams(); |
|
|
|
DataRule dataRule=commonMethod.dataRule(query.getOrgPath(),query.getMenuUrl(),query.getUserSid()).getData(); |
|
|
|
pq.getParams().setOrgLevelKey(dataRule.getDataRuleId()); |
|
|
|
pq.getParams().setIndex(dataRule.getIndex()); |
|
|
|
return crmCustomerTempFeign.listPage(pq); |
|
|
|
} |
|
|
|
|
|
|
@ -159,13 +163,13 @@ public class CrmCustomerTempService { |
|
|
|
dto.fillEntity(crmCustomerTemp); |
|
|
|
crmCustomerTemp.setCreateBySid(dto.getUserSid()); |
|
|
|
crmCustomerTemp.setStaffSid(sysUserInfoVo.getStaffSid()); |
|
|
|
String orgSid = ""; |
|
|
|
if (StringUtils.isNotBlank(dto.getOrgPath())) { |
|
|
|
orgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData(); |
|
|
|
} else { |
|
|
|
orgSid = sysStaffOrgFeign.getPathSidByUserSid(dto.getUserSid()).getData(); |
|
|
|
} |
|
|
|
crmCustomerTemp.setCreateOrgSid(orgSid); |
|
|
|
// String orgSid = "";
|
|
|
|
// if (StringUtils.isNotBlank(dto.getOrgPath())) {
|
|
|
|
// orgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData();
|
|
|
|
// } else {
|
|
|
|
// orgSid = sysStaffOrgFeign.getPathSidByUserSid(dto.getUserSid()).getData();
|
|
|
|
// }
|
|
|
|
crmCustomerTemp.setCreateOrgSid(dto.getCreateOrgSid()); |
|
|
|
ResultBean resultBean = dictCommonFeign.getFirstDictKeyByType(DictCommonType.FOLLOW_STATE, "0"); |
|
|
|
if (resultBean.getSuccess() && resultBean.getData() != null) { |
|
|
|
String key = resultBean.getData().toString(); |
|
|
|