diff --git a/src/main/java/cn/palmte/work/controller/backend/SpaceController.java b/src/main/java/cn/palmte/work/controller/backend/SpaceController.java index 8908dc4..c5fd35e 100644 --- a/src/main/java/cn/palmte/work/controller/backend/SpaceController.java +++ b/src/main/java/cn/palmte/work/controller/backend/SpaceController.java @@ -47,6 +47,7 @@ public class SpaceController extends BaseController { @RequestMapping("/list") public String list(@RequestParam(value = "keywords", required = false) String keywords, @RequestParam(value = "certainty") int certainty, + @RequestParam(value = "certaintyStr", required = false) String certaintyStr, @RequestParam(value = PAGE_NUMBER, defaultValue = DEFAULT_PAGE_NUMBER) int pageNumber, @RequestParam(value = PAGE_SIZE, defaultValue = DEFAULT_PAGE_SIZE) int pageSize, Map model) { @@ -57,6 +58,15 @@ public class SpaceController extends BaseController { model.put("adminId", admin.getId()); model.put("admin", admin); ConcurrentHashMap searchInfo = getSearchInfo(keywords, model); + if (certainty == 0) { + if (certaintyStr.startsWith("A")) { + certainty = 1; + } else if (certaintyStr.startsWith("B")) { + certainty = 2; + } else if (certaintyStr.startsWith("C")) { + certainty = 3; + } + } model.put("certainty", certainty); searchInfo.putIfAbsent("certainty", String.valueOf(certainty)); searchInfo.putIfAbsent("deptName", "销售管理部"); diff --git a/src/main/java/cn/palmte/work/service/ProjectService.java b/src/main/java/cn/palmte/work/service/ProjectService.java index ab658da..ece9aa9 100644 --- a/src/main/java/cn/palmte/work/service/ProjectService.java +++ b/src/main/java/cn/palmte/work/service/ProjectService.java @@ -101,10 +101,7 @@ public class ProjectService { if(StrUtil.isNotEmpty(searchInfo.get("underwrittenMode")) && !"-1".equals(searchInfo.get("underwrittenMode"))){ queryHelper.addCondition("p.underwritten_mode=?", Integer.parseInt(searchInfo.get("underwrittenMode"))); } - if(StrUtil.isNotEmpty(searchInfo.get("certainty")) && !"-1".equals(searchInfo.get("certainty"))){ - queryHelper.addCondition("p.certainty=?", Integer.parseInt(searchInfo.get("certainty"))); - } - queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("deptName")),"p.dept_name LIKE ?", "%"+searchInfo.get("deptName")+"%"); + if(StrUtil.isNotEmpty(searchInfo.get("estimateStatus")) && !"-1".equals(searchInfo.get("estimateStatus"))){ queryHelper.addCondition("p.approve_status_estimate>=1 and p.approve_status_estimate<=2"); } diff --git a/src/main/java/cn/palmte/work/service/SpaceService.java b/src/main/java/cn/palmte/work/service/SpaceService.java index 1ad7104..b59dd06 100644 --- a/src/main/java/cn/palmte/work/service/SpaceService.java +++ b/src/main/java/cn/palmte/work/service/SpaceService.java @@ -46,6 +46,9 @@ public class SpaceService { queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("customer")),"p.customer LIKE ?", "%"+searchInfo.get("customer")+"%"); queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("terminalCustomer")),"p.terminal_customer LIKE ?", "%"+searchInfo.get("terminalCustomer")+"%"); queryHelper.addCondition(StrUtil.isNotEmpty(searchInfo.get("principal")),"p.principal LIKE ?", "%"+searchInfo.get("principal")+"%"); + if(StrUtil.isNotEmpty(searchInfo.get("certainty")) && !"-1".equals(searchInfo.get("certainty"))){ + queryHelper.addCondition("p.certainty=?", Integer.parseInt(searchInfo.get("certainty"))); + } if(StrUtil.isNotEmpty(searchInfo.get("approveStatus")) && !"-1".equals(searchInfo.get("approveStatus"))){ int approveStatus = Integer.parseInt(searchInfo.get("approveStatus")); diff --git a/src/main/resources/templates/admin/space_statistics.ftl b/src/main/resources/templates/admin/space_statistics.ftl index d6b50d7..791b06f 100644 --- a/src/main/resources/templates/admin/space_statistics.ftl +++ b/src/main/resources/templates/admin/space_statistics.ftl @@ -96,6 +96,7 @@ xAxis: { type: 'category', name: '项目把握度', + // triggerEvent: true, axisLabel: { interval:0 }, @@ -202,6 +203,15 @@ window.location.href = "${base}/space/list?certainty=" + certainty; }); + myChart2.on('click', function (param) { + // for (const key in param) { + // console.log('key is ' + key + ', value is ' + param[key]); + // } + + const certaintyStr = param.name; + window.location.href = "${base}/space/list?certainty=0&certaintyStr=" + certaintyStr; + }); +