From 4c11e2bff576de52af022b5e0c156ca898e6457b Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Fri, 20 Oct 2023 17:49:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=9B=E8=81=98=E5=B7=A5=E4=BD=9C=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WorkBenchPortalServiceImpl.java | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/com/engine/recruit/service/impl/WorkBenchPortalServiceImpl.java b/src/com/engine/recruit/service/impl/WorkBenchPortalServiceImpl.java index 94c37c2..edbc575 100644 --- a/src/com/engine/recruit/service/impl/WorkBenchPortalServiceImpl.java +++ b/src/com/engine/recruit/service/impl/WorkBenchPortalServiceImpl.java @@ -58,25 +58,13 @@ public class WorkBenchPortalServiceImpl extends Service implements com.engine.re public OptionVO getJobTenure() { RecordSet rs = new RecordSet(); List list = new ArrayList<>(); - rs.executeQuery("select id,xxnr from uf_sjzd where zdlxmc = 9"); + rs.executeQuery("select a.xxnr,b.sum from uf_sjzd a \n" + + "left join (select gznx,count(1) as sum from uf_jcl_zp_zpzw group by gznx) b \n" + + "on a.id = b.gznx where a.zdlxmc = 9"); while (rs.next()) { - list.add(RecruitPortalCommonVO.builder().id(Util.getIntValue(rs.getString("id)"))).title(Util.null2String(rs.getString("xxnr"))).count(0).build()); + list.add(RecruitPortalCommonVO.builder().count(Util.getIntValue(rs.getString("sum"),0)).title(Util.null2String(rs.getString("xxnr"))).build()); } - List list1 = new ArrayList<>(); - rs.executeQuery("select gznx,count(1) as sum from uf_jcl_zp_zpzw group by gznx;"); - while (rs.next()) { - list1.add(RecruitPortalCommonVO.builder().id(Util.getIntValue(rs.getString("gznx)"))).count(Util.getIntValue(rs.getString("sum"))).build()); - } - - for (RecruitPortalCommonVO item1 : list) { - for (RecruitPortalCommonVO item2 : list1) { - if (item1.getId().equals(item2.getId())) { - item1.setCount(item2.getCount()); - break; - } - } - } List xData = list.stream() .map(RecruitPortalCommonVO::getTitle) @@ -96,12 +84,11 @@ public class WorkBenchPortalServiceImpl extends Service implements com.engine.re @Override public OptionVO getWaitStepPerson() { RecordSet rs = new RecordSet(); - rs.executeQuery("select a.xxnr,b.sum from uf_sjzd a \n" + - "left join (select gznx,count(1) as sum from uf_jcl_zp_zpzw group by gznx) b \n" + - "on a.id = b.gznx where a.zdlxmc = 9"); + rs.executeQuery("select dqypjd,count(1) as sum from uf_jcl_yppc where dqypjd is not null group by dqypjd"); List xData = new ArrayList<>(); List barSeriesData = new ArrayList<>(); while (rs.next()) { + xData.add(Util.null2String(rs.getString("xxnr"))); barSeriesData.add(Util.getIntValue(rs.getString("sum")),0); }