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); }