CustomerService.java 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. package com.goafanti.customer.service;
  2. import java.text.ParseException;
  3. import java.util.Date;
  4. import java.util.List;
  5. import java.util.Set;
  6. import com.goafanti.customer.bo.*;
  7. import org.apache.poi.xssf.usermodel.XSSFWorkbook;
  8. import com.goafanti.common.bo.userDaysBo;
  9. import com.goafanti.common.error.BusinessException;
  10. import com.goafanti.common.model.Admin;
  11. import com.goafanti.common.model.OrganizationContactBook;
  12. import com.goafanti.common.model.User;
  13. import com.goafanti.core.mybatis.page.Pagination;
  14. public interface CustomerService {
  15. /**
  16. * 私有个人客户列表查询
  17. * @param pageSize
  18. * @return
  19. */
  20. Pagination<CustomerListOut> listPrivatePersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  21. /**
  22. * 公共个人客户列表查询
  23. * @param pageSize
  24. * @return
  25. */
  26. Pagination<CustomerListOut> listPublicPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  27. /**
  28. * 所有个人客户列表查询
  29. * @param pageSize
  30. * @return
  31. */
  32. Pagination<CustomerListOut> listAllPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  33. /**
  34. * 管理个人客户查询(所属人同部门客户管理)
  35. * @param pageSize
  36. * @return
  37. */
  38. Pagination<CustomerListOut> listAllManagePersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  39. /**
  40. * 私有单位客户列表查询
  41. * @return
  42. */
  43. Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli,Integer sort,Integer sortType,Integer power, Integer pageNo, Integer pageSize);
  44. /**
  45. * 公共单位客户列表查询
  46. * @param pageSize
  47. * @return
  48. */
  49. Pagination<CustomerListOut> listPublicOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  50. /**
  51. * 所有单位客户列表查询
  52. * @param pageSize
  53. * @return
  54. */
  55. Pagination<CustomerListOut> listAllOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  56. /**
  57. * 管理单位客户列表查询
  58. * @param pageSize
  59. * @return
  60. */
  61. Pagination<CustomerListOut> listAllManageOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  62. /**
  63. * 使用客户名检索客户
  64. * @param name 客户名称
  65. * @return
  66. */
  67. List<CustomerSimpleBo> findCustomerByName(String name);
  68. /**
  69. * 使用客户名检索私有客户
  70. * @param name
  71. * @return
  72. */
  73. List<CustomerSimpleBo> getPrivateCustomerByName(String name);
  74. /**
  75. * 使用客户名称检索已签单客户
  76. * @param name
  77. * @return
  78. */
  79. List<CustomerSimpleBo> getSignedCustomerByName(String name);
  80. /**
  81. * 客户全查询
  82. * @param name
  83. * @return
  84. */
  85. Object getUserByName(String name);
  86. /**
  87. * 判断是否存在某个单位客户
  88. * @param name
  89. * @return
  90. */
  91. int judgeCustomerByName(String name);
  92. /**
  93. *
  94. * @return
  95. */
  96. int addCustomer(InputAddCustomer in) throws BusinessException;
  97. /**
  98. * 查询单位客户详情
  99. * @param uid 用户ID
  100. * @return
  101. */
  102. CustomerPersonalDetailBo findPersonalCustomerDetail(String uid);
  103. /**
  104. * 查询单位客户详情
  105. * @param uid 用户ID
  106. * @return
  107. */
  108. CustomerOrganizationDetailBo findOrganizationCustomerDetail(String uid);
  109. /**
  110. * 修改单位客户信息
  111. * @param bo
  112. * @return
  113. */
  114. int updateOrganizationCustomer(CustomerOrganizationDetailBo bo);
  115. /**
  116. * 修改个人客户信息
  117. * @param bo
  118. * @return
  119. */
  120. int updatePersonalCustomer(CustomerPersonalDetailBo bo);
  121. /**
  122. * 查看客户账户信息
  123. * @param uid 客户ID
  124. * @return
  125. */
  126. User findUserAccountDetail(String uid);
  127. /**
  128. * 更新用户基本信息
  129. * @param user
  130. */
  131. int updateUserAccount(User user);
  132. /**
  133. * 客户联系人列表
  134. * @param uid
  135. * @return
  136. */
  137. List<OrganizationContactBook> findCustomerContacts(String uid);
  138. /**
  139. * 添加拜访记录
  140. * @param fbb
  141. * @param mainStatus 0辅助跟进 1主要跟进
  142. */
  143. int addFollow(FollowBusinessBo fbb,String ufid,Integer mainStatus) throws BusinessException;
  144. /**
  145. * 查询拜访记录详情
  146. * @param followId
  147. * @return
  148. */
  149. FollowBusinessBo findFollowById(String followId);
  150. /**
  151. * 查询单词拜访推进的客户意向
  152. * @param followId
  153. * @return
  154. */
  155. List<BusinessListBo> findBusinessByFollowId(String followId);
  156. /**
  157. * 修改拜访记录
  158. * @param fbb
  159. */
  160. int updateFollow(FollowBusinessBo fbb) throws BusinessException;
  161. /**
  162. * 查询客户的所有联系人
  163. * @param uid
  164. * @return
  165. */
  166. Set<OrganizationContactBook> findAllContacts(String uid);
  167. /**
  168. * 更新客户联系人
  169. * @param ocbList
  170. * @return
  171. */
  172. int updateCustomerContacts(List<OrganizationContactBook> ocbList,String uid);
  173. /**
  174. * 删除拜访记录
  175. * @param followId
  176. * @return
  177. */
  178. int deleteFollow(String followId);
  179. /**
  180. * 检查客户业务
  181. * @param boSet
  182. * @param existRows
  183. */
  184. void checkCustomer(Set<CustomerExcelBo> boSet,Set<Integer> existRows, Set<Integer> filterRows);
  185. /**
  186. * 保存上传数据
  187. * @param boSet
  188. */
  189. int saveUploadData(Set<CustomerExcelBo> boSet);
  190. /**
  191. * 通过操作类型更新客户
  192. * @param uid
  193. * @param operatorType
  194. * @return
  195. */
  196. int updateByOperatorType(String uid,String aid,String oldAid,Integer operatorType,Integer data);
  197. /**
  198. * 客户统计
  199. * @param sDate
  200. * @param eDate
  201. * @return
  202. */
  203. Pagination<StatisticBo> customerStatistics(Date sDate, Date eDate, String depNo, String businessGlossoryId, Integer pageNo, Integer pageSize);
  204. /**
  205. * 业务进度统计
  206. * @param sDate
  207. * @param eDate
  208. * @return
  209. */
  210. Pagination<StatisticBo> businessStatistic(Date sDate, Date eDate, String depNo, String businessGlossoryId,Integer pageNo, Integer pageSize);
  211. /**
  212. * 拜访统计
  213. * @param sDate
  214. * @param eDate
  215. * @return
  216. */
  217. Pagination<StatisticBo> followStatistic(Date sDate, Date eDate, String depNo, Integer pageNo, Integer pageSize);
  218. /**
  219. * 查询我的业务列表
  220. * @param blo
  221. * @return
  222. */
  223. Pagination<BusinessListBo> listBusiness(BusinessListBo blo,Integer pageNo,Integer pageSize);
  224. /**
  225. * 查询所有的业务列表
  226. * @return
  227. */
  228. Pagination<BusinessListBo> listAllBusiness(BusinessListBo blo, Integer pageNo, Integer pageSize);
  229. /**
  230. * 业务管理列表
  231. * @param blo
  232. * @return
  233. */
  234. Pagination<BusinessListBo> listManageBusiness(BusinessListBo blo,Integer pageNo,Integer pageSize);
  235. /**
  236. * 意向字典
  237. * @return
  238. */
  239. List<BusinessListBo> findBusinessGlossory();
  240. /**
  241. *
  242. * @param uid 客户ID
  243. * @param businessProjectId 业务项目的ID
  244. * @return
  245. */
  246. int judgeBusiness(String uid,String businessProjectId);
  247. /**
  248. * 添加意向服务和跟进记录
  249. * @param bfb
  250. */
  251. void addBusinessAndFollow(BussinessFollowBo bfb) throws ParseException ;
  252. /**
  253. * 查询业务列表
  254. * @param uid 客户ID
  255. * @param aid 营销员ID
  256. * @return
  257. */
  258. List<BusinessListBo> findBusinessByUAid(String uid,String aid);
  259. /**
  260. * 查询锁定的业务列表
  261. * @param uid
  262. * @param aid
  263. * @return
  264. */
  265. List<BusinessListBo> findLockedBusinessByUAid(String uid,String aid);
  266. /**
  267. * 查看业务意向详情
  268. * @param businessId
  269. * @return
  270. */
  271. BussinessFollowBo findBusinessDetail(String businessId);
  272. /**
  273. * 修改业务意向
  274. * @param bfb
  275. * @return
  276. */
  277. int updateBusiness(BussinessFollowBo bfb);
  278. /**
  279. * 跟进单个业务意向
  280. * @param bfb
  281. * @return
  282. */
  283. int addFollowOneBusiness(BussinessFollowBo bfb) throws ParseException;
  284. /**
  285. * 查询某个客户的一个意向的当次拜访
  286. * @param ufbId
  287. * @return
  288. */
  289. BussinessFollowBo findFollowOneBusiness(String ufbId);
  290. /**
  291. * 修改某个客户的一个意向的当次拜访
  292. * @param bfb
  293. * @return
  294. */
  295. int updateFollowOneBusiness(BussinessFollowBo bfb);
  296. /**
  297. * 添加单个联系人
  298. * @param ocb
  299. * @return
  300. */
  301. int addOneContact(OrganizationContactBook ocb);
  302. /**
  303. * 删除业务
  304. * @param businessId
  305. * @return
  306. */
  307. int deleteBusiness(String businessId);
  308. /**
  309. * 停止业务
  310. * @param businessId
  311. * @return
  312. */
  313. int updateBusinessToStop(String businessId);
  314. /**
  315. * 删除跟进记录中间表记录
  316. * @param ufbId
  317. * @return
  318. */
  319. int deleteFollowOneBusiness(String ufbId);
  320. /**
  321. * 删除单个联系人
  322. * @param ocbId
  323. * @return
  324. */
  325. int deleteOneContact(String ocbId);
  326. List<Admin> findAdminName();
  327. int updatePersonalCustomerz(CustomerPersonalDetailBo bo);
  328. Pagination<CustomerListOut> findEnteringAudit(CustomerListOut clo, Integer pageNo, Integer pageSize);
  329. Pagination<CustomerListOut> findEnteringAuditIsNo(CustomerListOut clo, Integer pageNo, Integer pageSize);
  330. int updateEnteringAudit(User bo);
  331. /**
  332. * 修改为主要联系人
  333. * @param ocbId
  334. * @return
  335. */
  336. int updateMainContact(String ocbId,String uid);
  337. /** 修改拒绝客户信息 **/
  338. int updateRefusedCustomer(String id,String nickname, String mobile, String societyTag);
  339. /**
  340. * 签单的单位客户
  341. * @param cli
  342. * @param pageNo
  343. * @param pageSize
  344. * @return
  345. */
  346. Pagination<CustomerListOut> listSignOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  347. /**
  348. * 签单的个人客户
  349. * @param cli
  350. * @param pageNo
  351. * @param pageSize
  352. * @return
  353. */
  354. Pagination<CustomerListOut> listSignPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  355. /**
  356. * 查询需要释放的客户
  357. * @param uid 客户Id
  358. * @param type 0 未跟进 1未签单
  359. * @return
  360. */
  361. List<LockingReleaseBo> selectWaitReleaseCustomer(String uid, Integer type);
  362. List<LockingReleaseBo> selectWaitReleaseBusiness(String uid);
  363. void updateReleaseLock(Date releaseTime);
  364. /**
  365. * 查询客户的锁定业务
  366. * @param uid
  367. * @return
  368. */
  369. List<LockingReleaseBo> selectLockedProject(String uid);
  370. /**
  371. * 再次签订项目任务
  372. * @param aid
  373. * @return
  374. */
  375. int updateAgainProjectTask(String uid, String projectId, String aid);
  376. /**
  377. * 客户资料转交
  378. * @param id
  379. * @param aid
  380. * @return
  381. */
  382. int updateInformationMaintainerr(String id, String aid);
  383. /**
  384. * 个人客户资料列表
  385. * @param cli
  386. * @param pageNo
  387. * @param pageSize
  388. * @return
  389. */
  390. Pagination<CustomerListIn> listCustomerInformation(CustomerListIn cli, Integer pageNo, Integer pageSize);
  391. /**
  392. * 部门客户资料列表
  393. * @param cli
  394. * @param pageNo
  395. * @param pageSize
  396. * @return
  397. */
  398. Pagination<CustomerListIn> listDepCustomerInformation(CustomerListIn cli, Integer pageNo, Integer pageSize);
  399. void updatePendingReleaseLock(List<LockingReleaseBo> newList);
  400. List<LockingReleaseBo> selectPendinglockUserList();
  401. int updateUserLevel(User u);
  402. public Float countIntegrity(CustomerOrganizationDetailBo bo);
  403. XSSFWorkbook privateUnitCustomerOutXls(CustomerListIn cli ,Integer sort,Integer sortType,Integer pageNo, Integer pageSize);
  404. int customerHandOver(String userIds, String receiveId);
  405. List<transferListBo> transferList(String uid);
  406. int updatePrivateBusinessTransfer(String inputId, String uid, String pid);
  407. int pushReleaseUser(String id);
  408. /**
  409. *
  410. * @param id
  411. * @return
  412. */
  413. List<userDaysBo> selectReleaseUserDays(String id);
  414. List<userDaysBo> selectChannelUserDays(String id);
  415. int addGuidance(String followId, String guidance);
  416. /**
  417. * 查看跟进记录列表
  418. * @param pageNo
  419. * @param pageSize
  420. * @return
  421. */
  422. Pagination<FollowListBo> listFollowHistory(Integer pageNo, Integer pageSize,String uid,String businessGlossoryId,Integer type);
  423. int pushGuidance(String uid);
  424. boolean checkMax(String aid);
  425. /**
  426. *
  427. * @param list 释放客户
  428. * @param type 0 未跟进 1未签单
  429. * @throws InterruptedException
  430. */
  431. void pushReleaseLog(List<LockingReleaseBo> list,Integer type) throws InterruptedException;
  432. Object listChannelCustomer(InputListChannel in);
  433. /**
  434. *
  435. * @param uids 用户集
  436. * @param receiveId 接受者
  437. * @param remarks 备注
  438. * @param type 0总监分配 1经理分配 2回退
  439. * @return
  440. */
  441. Object pushChannelDeliver(List<String> uids, String receiveId, String remarks, Integer type);
  442. Object getChannelCustomerByName(String name);
  443. boolean checkChannel(List<String> uids);
  444. boolean checkBeforeChannel(String uid);
  445. boolean checkRecovery(List<String> uids);
  446. List<userDaysBo> selectChannelNotFollow(String string);
  447. Object listChannelCounts(InputChannelCounts in);
  448. int updateUserName(String uid, String userName);
  449. List<UserNamesListBo> listUserName(String uid);
  450. boolean checkUserName(String userName);
  451. Object getUserByNames(String name, Integer pageNo, Integer pageSize);
  452. Pagination<OutUserMianProducts> mainProductsList(InputMainProductsList in) ;
  453. List<OutUserDateLogList> userDateLogList(String uid);
  454. int updateuserBusinessScope(String id, String businessScope);
  455. boolean checkData(String uid, String aid);
  456. int updateUserDate(String uid,Integer province, Integer city, Integer area, String businessScope, String intendedProject);
  457. }