From 4012aa18874491f69c1cedb3d5a68ffbf02caceb Mon Sep 17 00:00:00 2001 From: cb <275647614@qq.com> Date: Wed, 2 Jul 2025 16:43:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8D=9E=E5=8F=96=E7=BA=BF?= =?UTF-8?q?=E7=B4=A2=E6=B1=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/system/ClewController.java | 56 +++ .../web/controller/tool/NoticeController.java | 8 +- .../templates/system/clew/publicClew.html | 20 + .../templates/system/clew/qualityClew.html | 346 ++++++++++++++++++ .../java/com/ruoyi/system/domain/Clew.java | 9 + .../com/ruoyi/system/mapper/ClewMapper.java | 8 + .../ruoyi/system/service/IClewService.java | 16 + .../system/service/impl/ClewServiceImpl.java | 12 + .../resources/mapper/system/ClewMapper.xml | 78 +++- 9 files changed, 548 insertions(+), 5 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/system/clew/qualityClew.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewController.java index 6067f2b7..8e6a3a13 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ClewController.java @@ -85,6 +85,13 @@ public class ClewController extends BaseController return prefix + "/publicClew"; } + @RequiresPermissions("system:clew:view") + @GetMapping("qualityClew") + public String qualityClew(ModelMap modelMap) + { + return prefix + "/qualityClew"; + } + /** * 查询线索列表 */ @@ -133,6 +140,7 @@ public class ClewController extends BaseController { startPage(); clew.setSaleId(2L); + clew.setPoolStatus("01"); // 只显示公海池状态的线索 List list = clewService.selectClewPublicList(clew); list.forEach(model->{ if(model.getSaleId() != null){ @@ -157,6 +165,37 @@ public class ClewController extends BaseController return getDataTable(list); } + @RequiresPermissions("system:clew:list") + @PostMapping("/listQuality") + @ResponseBody + public TableDataInfo listQuality(Clew clew) + { + startPage(); + clew.setPoolStatus("02"); // 只显示优质线索池状态的线索 + List list = clewService.selectClewQualityList(clew); + list.forEach(model->{ + if(model.getSaleId() != null){ + SysUser user = sysUserService.selectUserById(model.getSaleId()); + if(user != null){ + model.setSaleName(user.getUserName()); + } + SysUser sourceUser = sysUserService.selectUserById(model.getSourceSaleId()); + if(sourceUser != null){ + model.setSourceSaleName(sourceUser.getUserName()); + } + } + if(model.getSourceApp() != null){ + CompanyApp param = new CompanyApp(); + param.setCompanyId(model.getSourceApp()); + List result = companyAppService.selectCompanyAppList(param); + model.setSourceAppName(result.get(0).getAppName()); + }else { + model.setSourceAppName("黑猫APP"); + } + }); + return getDataTable(list); + } + /** * 导出线索列表 */ @@ -432,4 +471,21 @@ public class ClewController extends BaseController return "system/clew/changeBatchUser"; } + /** + * 捞取线索到优质线索池 + */ + @PostMapping("/catchClew") + @ResponseBody + public AjaxResult catchClew(Clew clew) + { + Clew sourceClew = clewService.selectClewById(clew.getId()); + if(!"01".equals(sourceClew.getPoolStatus())){ + return AjaxResult.error("该线索不在公海池中!"); + } + sourceClew.setPoolStatus("02"); + sourceClew.setCatchTime(new Date()); + sourceClew.setUpdateTime(new Date()); + return toAjax(clewService.catchClewToQuality(sourceClew)); + } + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/NoticeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/NoticeController.java index 7fb2481b..8fb65adb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/NoticeController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/NoticeController.java @@ -88,7 +88,7 @@ public class NoticeController { log.info("归因转化回调内容,{},{},{},{},{},{},{}", aid, appId, oaid, idType, uniqueId, actionType, callBack); String token= getToken(); if (StringUtils.isEmpty(token)){ - token="eyJraWQiOiJ1MUFEcW95T21wT1ZHcXh6VzNnaWtPNER3UmJDZ2RNRCIsInR5cCI6IkpXVCIsImFsZyI6IkhTMjU2In0.eyJzdWIiOiIxMjczODgzNzQ1NTQ3NDkzODI0IiwiZG4iOjEsImNsaWVudF90eXBlIjoxLCJleHAiOjE3NDkyODE2MjUsImlhdCI6MTc0OTEwODgyNX0.FxqWkjbHgLav_q6sg8HWxTCMYl4_YkFf7MYSo6cFffk"; + token="eyJraWQiOiJ1MUFEcW95T21wT1ZHcXh6VzNnaWtPNER3UmJDZ2RNRCIsInR5cCI6IkpXVCIsImFsZyI6IkhTMjU2In0.eyJzdWIiOiIxMjczODgzNzQ1NTQ3NDkzODI0IiwiZG4iOjEsImNsaWVudF90eXBlIjoxLCJleHAiOjE3NDk2MjUyNDEsImlhdCI6MTc0OTQ1MjQ0MX0.yZnwxuUVxA8dC1TnMtKfnOKB3Cd4s4afujPs5F8pcX0"; } HuaweiRequest huaweiRequest=new HuaweiRequest(); huaweiRequest.setActionType("4"); @@ -309,9 +309,9 @@ public class NoticeController { headers.put("Content-Type", "application/json"); Map params=new HashMap<>(); - headers.put("grant_type", "client_credentials"); - headers.put("client_id", "1273883745547493824"); // 从配置读取 - headers.put("client_secret", "BBA385787FE8D5CA4F0C889915C6FBA752F7B18C19E99FFE6B09ACCC92C60181"); // 从配置读取 + params.put("grant_type", "client_credentials"); + params.put("client_id", "1273883745547493824"); // 从配置读取 + params.put("client_secret", "BBA385787FE8D5CA4F0C889915C6FBA752F7B18C19E99FFE6B09ACCC92C60181"); // 从配置读取 String s; try { s= sendPost( diff --git a/ruoyi-admin/src/main/resources/templates/system/clew/publicClew.html b/ruoyi-admin/src/main/resources/templates/system/clew/publicClew.html index ec47b7ec..c850f588 100644 --- a/ruoyi-admin/src/main/resources/templates/system/clew/publicClew.html +++ b/ruoyi-admin/src/main/resources/templates/system/clew/publicClew.html @@ -243,6 +243,18 @@ return $.table.selectDictLabel(isDeal, value); } }, + { + field: 'poolStatus', + title: '池状态', + formatter: function(value, row, index) { + if(value == '01') { + return '公海池'; + } else if(value == '02') { + return '优质线索池'; + } + return value; + } + }, { field: 'wxAccount', title: '成交金额' @@ -290,6 +302,7 @@ formatter: function(value, row, index) { var actions = []; actions.push('取回线索'); + actions.push('捞取'); return actions.join(''); } }] @@ -318,6 +331,13 @@ $.modal.open("选择客服", url, '800', '300'); } + /* 捞取线索到优质线索池 */ + function catchClew(id) { + $.modal.confirm("确定要捞取该线索到优质线索池吗?", function() { + $.operate.post(prefix + "/catchClew", { "id": id}); + }) + } + function changeBatchUser(){ table.set(); var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); diff --git a/ruoyi-admin/src/main/resources/templates/system/clew/qualityClew.html b/ruoyi-admin/src/main/resources/templates/system/clew/qualityClew.html new file mode 100644 index 00000000..c615fff5 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/clew/qualityClew.html @@ -0,0 +1,346 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + App来源: +
  • +
  • + 加微: +
  • +
  • + 有效: +
  • +
  • + 意向: +
  • +
  • + 成交: +
  • +
  • + 来源应用: +
  • +
  • + + + - + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Clew.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Clew.java index 96964983..b01c8ba3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Clew.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Clew.java @@ -117,6 +117,15 @@ public class Clew extends BaseEntity @Excel(name = "成交状态 0.未成交 1.已成交") private String isDeal; + /** 池状态 01.公海池 02.优质线索池 */ + @Excel(name = "池状态 01.公海池 02.优质线索池") + private String poolStatus; + + /** 捞取时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "捞取时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date catchTime; + /** 省份 */ @Excel(name = "省份") private String provinceName; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewMapper.java index f4426837..80ef2ca1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClewMapper.java @@ -31,6 +31,14 @@ public interface ClewMapper public List selectClewPublicList(Clew clew); + /** + * 查询优质线索池列表 + * + * @param clew 线索 + * @return 线索集合 + */ + public List selectClewQualityList(Clew clew); + /** * 新增线索 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IClewService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IClewService.java index e17a4701..84470530 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IClewService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IClewService.java @@ -31,6 +31,14 @@ public interface IClewService public List selectClewPublicList(Clew clew); + /** + * 查询优质线索池列表 + * + * @param clew 线索 + * @return 线索集合 + */ + public List selectClewQualityList(Clew clew); + /** * 新增线索 * @@ -49,6 +57,14 @@ public interface IClewService public int updateBatchClew(Clew clew); + /** + * 捞取线索到优质线索池 + * + * @param clew 线索 + * @return 结果 + */ + public int catchClewToQuality(Clew clew); + /** * 批量删除线索 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewServiceImpl.java index bda925cd..6fba05e3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClewServiceImpl.java @@ -59,6 +59,12 @@ public class ClewServiceImpl implements IClewService return clewMapper.selectClewPublicList(clew); } + @Override + public List selectClewQualityList(Clew clew) + { + return clewMapper.selectClewQualityList(clew); + } + /** * 新增线索 * @@ -109,6 +115,12 @@ public class ClewServiceImpl implements IClewService return clewMapper.updateBatchClew(clew); } + @Override + public int catchClewToQuality(Clew clew) + { + return clewMapper.updateClew(clew); + } + /** * 批量删除线索 * diff --git a/ruoyi-system/src/main/resources/mapper/system/ClewMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ClewMapper.xml index 983c7469..e4fe3988 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ClewMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ClewMapper.xml @@ -27,6 +27,8 @@ + + @@ -47,7 +49,7 @@ wx_name, phone, debt_type, debt_money, source_type, source_app, wx_account, customer_status, customer_level, touch_qrcode, contact_number, is_touch, is_add_wx, is_effective, is_plan, is_deal, - province_name, city_name, customer_name, contact_time, other_phone, + pool_status, catch_time, province_name, city_name, customer_name, contact_time, other_phone, create_time, create_by, update_by, update_time, remark, customer_remark,two_customer_remark,assign_times from clew @@ -150,6 +152,7 @@ and contact_time = #{contactTime} and other_phone = #{otherPhone} and remark = #{remark} + and pool_status = #{poolStatus} and is_add_wx = '1' @@ -209,6 +212,8 @@ is_effective, is_plan, is_deal, + pool_status, + catch_time, province_name, city_name, customer_name, @@ -241,6 +246,8 @@ #{isEffective}, #{isPlan}, #{isDeal}, + #{poolStatus}, + #{catchTime}, #{provinceName}, #{cityName}, #{customerName}, @@ -277,6 +284,8 @@ is_effective = #{isEffective}, is_plan = #{isPlan}, is_deal = #{isDeal}, + pool_status = #{poolStatus}, + catch_time = #{catchTime}, province_name = #{provinceName}, city_name = #{cityName}, customer_name = #{customerName}, @@ -342,4 +351,71 @@ and sale_id != 2 and update_time <= #{beginTime} + + \ No newline at end of file