CustomerService.java 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  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.hssf.record.BOFRecord;
  8. import org.apache.poi.xssf.usermodel.XSSFWorkbook;
  9. import com.goafanti.common.bo.userDaysBo;
  10. import com.goafanti.common.error.BusinessException;
  11. import com.goafanti.common.model.Admin;
  12. import com.goafanti.common.model.OrganizationContactBook;
  13. import com.goafanti.common.model.User;
  14. import com.goafanti.core.mybatis.page.Pagination;
  15. public interface CustomerService {
  16. /**
  17. * 私有个人客户列表查询
  18. * @param pageSize
  19. * @return
  20. */
  21. Pagination<CustomerListOut> listPrivatePersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  22. /**
  23. * 公共个人客户列表查询
  24. * @param pageSize
  25. * @return
  26. */
  27. Pagination<CustomerListOut> listPublicPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  28. /**
  29. * 所有个人客户列表查询
  30. * @param pageSize
  31. * @return
  32. */
  33. Pagination<CustomerListOut> listAllPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  34. /**
  35. * 管理个人客户查询(所属人同部门客户管理)
  36. * @param pageSize
  37. * @return
  38. */
  39. Pagination<CustomerListOut> listAllManagePersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  40. /**
  41. * 私有单位客户列表查询
  42. * @return
  43. */
  44. Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli,Integer sort,Integer sortType,Integer power, Integer pageNo, Integer pageSize);
  45. /**
  46. * 公共单位客户列表查询
  47. * @param pageSize
  48. * @return
  49. */
  50. Pagination<CustomerListOut> listPublicOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  51. /**
  52. * 所有单位客户列表查询
  53. * @param pageSize
  54. * @return
  55. */
  56. Pagination<CustomerListOut> listAllOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  57. /**
  58. * 管理单位客户列表查询
  59. * @param pageSize
  60. * @return
  61. */
  62. Pagination<CustomerListOut> listAllManageOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  63. /**
  64. * 使用客户名检索客户
  65. * @param name 客户名称
  66. * @return
  67. */
  68. List<CustomerSimpleBo> findCustomerByName(String name);
  69. /**
  70. * 使用客户名检索私有客户
  71. * @param name
  72. * @return
  73. */
  74. List<CustomerSimpleBo> getPrivateCustomerByName(String name);
  75. /**
  76. * 使用客户名称检索已签单客户
  77. * @param name
  78. * @return
  79. */
  80. List<CustomerSimpleBo> getSignedCustomerByName(String name);
  81. /**
  82. * 客户全查询
  83. * @param name
  84. * @return
  85. */
  86. Object getUserByName(String name);
  87. /**
  88. * 判断是否存在某个单位客户
  89. * @param name
  90. * @return
  91. */
  92. int judgeCustomerByName(String name);
  93. /**
  94. *
  95. * @return
  96. */
  97. int addCustomer(InputAddCustomer in) throws BusinessException;
  98. /**
  99. * 查询单位客户详情
  100. * @param uid 用户ID
  101. * @return
  102. */
  103. CustomerPersonalDetailBo findPersonalCustomerDetail(String uid);
  104. /**
  105. * 查询单位客户详情
  106. * @param uid 用户ID
  107. * @return
  108. */
  109. CustomerOrganizationDetailBo findOrganizationCustomerDetail(String uid);
  110. /**
  111. * 修改单位客户信息
  112. * @param bo
  113. * @return
  114. */
  115. int updateOrganizationCustomer(CustomerOrganizationDetailBo bo);
  116. /**
  117. * 修改个人客户信息
  118. * @param bo
  119. * @return
  120. */
  121. int updatePersonalCustomer(CustomerPersonalDetailBo bo);
  122. /**
  123. * 查看客户账户信息
  124. * @param uid 客户ID
  125. * @return
  126. */
  127. User findUserAccountDetail(String uid);
  128. /**
  129. * 更新用户基本信息
  130. * @param user
  131. */
  132. int updateUserAccount(User user);
  133. /**
  134. * 客户联系人列表
  135. * @param uid
  136. * @return
  137. */
  138. List<OrganizationContactBook> findCustomerContacts(String uid);
  139. /**
  140. * 添加拜访记录
  141. * @param fbb
  142. * @param mainStatus 0辅助跟进 1主要跟进
  143. */
  144. int addFollow(FollowBusinessBo fbb,String ufid,Integer mainStatus) throws BusinessException;
  145. /**
  146. * 查询拜访记录详情
  147. * @param followId
  148. * @return
  149. */
  150. FollowBusinessBo findFollowById(String followId);
  151. /**
  152. * 查询单词拜访推进的客户意向
  153. * @param followId
  154. * @return
  155. */
  156. List<BusinessListBo> findBusinessByFollowId(String followId);
  157. /**
  158. * 修改拜访记录
  159. * @param fbb
  160. */
  161. int updateFollow(FollowBusinessBo fbb) throws BusinessException;
  162. /**
  163. * 查询客户的所有联系人
  164. * @param uid
  165. * @return
  166. */
  167. Set<OrganizationContactBook> findAllContacts(String uid);
  168. /**
  169. * 更新客户联系人
  170. * @param ocbList
  171. * @return
  172. */
  173. int updateCustomerContacts(List<OrganizationContactBook> ocbList,String uid);
  174. /**
  175. * 删除拜访记录
  176. * @param followId
  177. * @return
  178. */
  179. int deleteFollow(String followId);
  180. /**
  181. * 检查客户业务
  182. * @param boSet
  183. * @param existRows
  184. */
  185. void checkCustomer(Set<CustomerExcelBo> boSet,Set<Integer> existRows, Set<Integer> filterRows);
  186. /**
  187. * 保存上传数据
  188. * @param boSet
  189. */
  190. int saveUploadData(Set<CustomerExcelBo> boSet);
  191. /**
  192. * 通过操作类型更新客户
  193. * @param uid
  194. * @param operatorType
  195. * @return
  196. */
  197. int updateByOperatorType(String uid,String aid,String oldAid,Integer operatorType,Integer data);
  198. /**
  199. * 客户统计
  200. * @param sDate
  201. * @param eDate
  202. * @return
  203. */
  204. Pagination<StatisticBo> customerStatistics(Date sDate, Date eDate, String depNo, String businessGlossoryId, Integer pageNo, Integer pageSize);
  205. /**
  206. * 业务进度统计
  207. * @param sDate
  208. * @param eDate
  209. * @return
  210. */
  211. Pagination<StatisticBo> businessStatistic(Date sDate, Date eDate, String depNo, String businessGlossoryId,Integer pageNo, Integer pageSize);
  212. /**
  213. * 拜访统计
  214. * @param sDate
  215. * @param eDate
  216. * @return
  217. */
  218. Pagination<StatisticBo> followStatistic(Date sDate, Date eDate, String depNo, Integer pageNo, Integer pageSize);
  219. /**
  220. * 查询我的业务列表
  221. * @param blo
  222. * @return
  223. */
  224. Pagination<BusinessListBo> listBusiness(BusinessListBo blo,Integer pageNo,Integer pageSize);
  225. /**
  226. * 查询所有的业务列表
  227. * @return
  228. */
  229. Pagination<BusinessListBo> listAllBusiness(BusinessListBo blo, Integer pageNo, Integer pageSize);
  230. /**
  231. * 业务管理列表
  232. * @param blo
  233. * @return
  234. */
  235. Pagination<BusinessListBo> listManageBusiness(BusinessListBo blo,Integer pageNo,Integer pageSize);
  236. /**
  237. * 意向字典
  238. * @return
  239. */
  240. List<BusinessListBo> findBusinessGlossory();
  241. /**
  242. *
  243. * @param uid 客户ID
  244. * @param businessProjectId 业务项目的ID
  245. * @return
  246. */
  247. int judgeBusiness(String uid,String businessProjectId);
  248. /**
  249. * 添加意向服务和跟进记录
  250. * @param bfb
  251. */
  252. void addBusinessAndFollow(BussinessFollowBo bfb) throws ParseException ;
  253. /**
  254. * 查询业务列表
  255. * @param uid 客户ID
  256. * @param aid 营销员ID
  257. * @return
  258. */
  259. List<BusinessListBo> findBusinessByUAid(String uid,String aid);
  260. /**
  261. * 查询锁定的业务列表
  262. * @param uid
  263. * @param aid
  264. * @return
  265. */
  266. List<BusinessListBo> findLockedBusinessByUAid(String uid,String aid);
  267. /**
  268. * 查看业务意向详情
  269. * @param businessId
  270. * @return
  271. */
  272. BussinessFollowBo findBusinessDetail(String businessId);
  273. /**
  274. * 修改业务意向
  275. * @param bfb
  276. * @return
  277. */
  278. int updateBusiness(BussinessFollowBo bfb);
  279. /**
  280. * 跟进单个业务意向
  281. * @param bfb
  282. * @return
  283. */
  284. int addFollowOneBusiness(BussinessFollowBo bfb) throws ParseException;
  285. /**
  286. * 查询某个客户的一个意向的当次拜访
  287. * @param ufbId
  288. * @return
  289. */
  290. BussinessFollowBo findFollowOneBusiness(String ufbId);
  291. /**
  292. * 修改某个客户的一个意向的当次拜访
  293. * @param bfb
  294. * @return
  295. */
  296. int updateFollowOneBusiness(BussinessFollowBo bfb);
  297. /**
  298. * 添加单个联系人
  299. * @param ocb
  300. * @return
  301. */
  302. int addOneContact(OrganizationContactBook ocb);
  303. /**
  304. * 删除业务
  305. * @param businessId
  306. * @return
  307. */
  308. int deleteBusiness(String businessId);
  309. /**
  310. * 停止业务
  311. * @param businessId
  312. * @return
  313. */
  314. int updateBusinessToStop(String businessId);
  315. /**
  316. * 删除跟进记录中间表记录
  317. * @param ufbId
  318. * @return
  319. */
  320. int deleteFollowOneBusiness(String ufbId);
  321. /**
  322. * 删除单个联系人
  323. * @param ocbId
  324. * @return
  325. */
  326. int deleteOneContact(String ocbId);
  327. List<Admin> findAdminName();
  328. int updatePersonalCustomerz(CustomerPersonalDetailBo bo);
  329. Pagination<CustomerListOut> findEnteringAudit(CustomerListOut clo, Integer pageNo, Integer pageSize);
  330. Pagination<CustomerListOut> findEnteringAuditIsNo(CustomerListOut clo, Integer pageNo, Integer pageSize);
  331. int updateEnteringAudit(User bo);
  332. /**
  333. * 修改为主要联系人
  334. * @param ocbId
  335. * @return
  336. */
  337. int updateMainContact(String ocbId,String uid);
  338. /** 修改拒绝客户信息 **/
  339. int updateRefusedCustomer(String id,String nickname, String mobile, String societyTag);
  340. /**
  341. * 签单的单位客户
  342. * @param cli
  343. * @param pageNo
  344. * @param pageSize
  345. * @return
  346. */
  347. Pagination<CustomerListOut> listSignOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  348. /**
  349. * 签单的个人客户
  350. * @param cli
  351. * @param pageNo
  352. * @param pageSize
  353. * @return
  354. */
  355. Pagination<CustomerListOut> listSignPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
  356. /**
  357. * 查询需要释放的客户
  358. * @param uid 客户Id
  359. * @return
  360. */
  361. List<LockingReleaseBo> selectWaitReleaseCustomer(String uid);
  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 Double 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 uid,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,String introduction,Integer channelType);
  457. Pagination<OutChannelListBo> channelUserList(InputChannelListBo in);
  458. List<?> selectChannelUserList(InputChannelListBo in);
  459. boolean receiveEveryDay(String uid);
  460. int pushReceiveAsChannel(String uid);
  461. }