From 2ef0c3a229c28873d950335fdb6c45b43911eaaf Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Wed, 11 Dec 2024 18:00:04 +0800 Subject: [PATCH] =?UTF-8?q?#QC3421143#=20=E5=9F=BA=E6=9C=AC=E7=8A=B6?= =?UTF-8?q?=E5=86=B5=E5=88=86=E6=9E=90=E6=98=8E=E7=BB=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?,=E5=B7=A5=E9=BE=84=E7=8A=B6=E5=86=B5=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=8F=B8=E9=BE=84=E7=8A=B6=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/artifacts/weaver_develop_jar.xml | 2 +- src/com/api/hrm/util/HrmBaseStateUtil.java | 19 ++++++----- .../impl/BasicResourceTableServiceImpl.java | 34 ++++++++++++++++++- 3 files changed, 44 insertions(+), 11 deletions(-) diff --git a/.idea/artifacts/weaver_develop_jar.xml b/.idea/artifacts/weaver_develop_jar.xml index 6258dfe..2aff103 100644 --- a/.idea/artifacts/weaver_develop_jar.xml +++ b/.idea/artifacts/weaver_develop_jar.xml @@ -1,6 +1,6 @@ - $PROJECT_DIR$/out/artifacts/weaver_develop_jar + $PROJECT_DIR$/../../../../weaver/ecology/WEB-INF/lib diff --git a/src/com/api/hrm/util/HrmBaseStateUtil.java b/src/com/api/hrm/util/HrmBaseStateUtil.java index 33a7540..7008aa0 100644 --- a/src/com/api/hrm/util/HrmBaseStateUtil.java +++ b/src/com/api/hrm/util/HrmBaseStateUtil.java @@ -379,7 +379,8 @@ public List> getSexRpResult(HttpServletRequest request, HttpS /* * * 工龄报表查询 - * + * #QC3421143# 工龄报表数据替换为司龄数据 20241211 + * */ @SuppressWarnings("deprecation") @@ -506,9 +507,9 @@ public List> getSeniorityRpResult(HttpServletRequest request, /*先算出工龄记录为空的人数*/ if(sqlwhere.equals("")){ - sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and (workstartdate is null or workstartdate ='')"; + sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and (companystartdate is null or companystartdate ='')"; }else{ - sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and (workstartdate is null or workstartdate ='')"+sqlwhere; + sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and (companystartdate is null or companystartdate ='')"+sqlwhere; } rs.executeSql(sqlstr); @@ -530,9 +531,9 @@ public List> getSeniorityRpResult(HttpServletRequest request, int tempyear = Util.getIntValue(Util.add0(today.get(Calendar.YEAR), 4));//当前年份 if(rs.getDBType().equals("oracle")){ - sqlstr="select min(workstartdate) from HrmResource where (accounttype is null or accounttype=0) and workstartdate is not null "; + sqlstr="select min(companystartdate) from HrmResource where (accounttype is null or accounttype=0) and companystartdate is not null "; }else{ - sqlstr="select min(workstartdate) from HrmResource where (accounttype is null or accounttype=0) and workstartdate is not null and workstartdate !=''"; + sqlstr="select min(companystartdate) from HrmResource where (accounttype is null or accounttype=0) and companystartdate is not null and companystartdate !=''"; } rs.executeSql(sqlstr); rs.next(); @@ -558,15 +559,15 @@ public List> getSeniorityRpResult(HttpServletRequest request, if(rs.getDBType().equals("oracle")){ if(sqlwhere.equals("")){ - sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and workstartdate >'"+workfrom+"' and workstartdate <='"+workto+"' and workstartdate is not null "; + sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and companystartdate >'"+workfrom+"' and companystartdate <='"+workto+"' and companystartdate is not null "; }else{ - sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and workstartdate >'"+workfrom+"' and workstartdate <='"+workto+"' and workstartdate is not null "+sqlwhere; + sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and companystartdate >'"+workfrom+"' and companystartdate <='"+workto+"' and companystartdate is not null "+sqlwhere; } }else{ if(sqlwhere.equals("")){ - sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and workstartdate >'"+workfrom+"' and workstartdate <='"+workto+"' and workstartdate<>'' and workstartdate is not null "; + sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and companystartdate >'"+workfrom+"' and companystartdate <='"+workto+"' and companystartdate<>'' and companystartdate is not null "; }else{ - sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and workstartdate >'"+workfrom+"' and workstartdate <='"+workto+"' and workstartdate<>'' and workstartdate is not null "+sqlwhere; + sqlstr="select count(*) resultcount from HrmResource where (accounttype is null or accounttype=0) and companystartdate >'"+workfrom+"' and companystartdate <='"+workto+"' and companystartdate<>'' and companystartdate is not null "+sqlwhere; } } diff --git a/src/com/engine/gainway/service/impl/BasicResourceTableServiceImpl.java b/src/com/engine/gainway/service/impl/BasicResourceTableServiceImpl.java index 2bb3cb5..903a1e9 100644 --- a/src/com/engine/gainway/service/impl/BasicResourceTableServiceImpl.java +++ b/src/com/engine/gainway/service/impl/BasicResourceTableServiceImpl.java @@ -1,8 +1,15 @@ package com.engine.gainway.service.impl; +import com.cloudstore.eccom.pc.table.WeaTable; +import com.cloudstore.eccom.pc.table.WeaTableColumn; +import com.cloudstore.eccom.pc.table.WeaTableType; +import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.core.impl.Service; import com.engine.gainway.service.BasicResourceTableService; +import weaver.general.PageIdConst; +import weaver.general.Util; +import java.util.HashMap; import java.util.Map; /** @@ -15,6 +22,31 @@ public class BasicResourceTableServiceImpl extends Service implements BasicResou @Override public Map linkTable(Map params) { - return null; + Map resultMap = new HashMap<>(4); + String cmd = Util.null2String(params.get("cmd")); + WeaTable table = new WeaTable(); + String pageId = "7036b679-029d-411f-b885-8e1720514f83"; + table.setPageID(pageId); + table.setPageUID(String.format("%s_%s",pageId,user.getUID())); + String pageSize = PageIdConst.getPageSize(pageId, user.getUID()); + table.setPagesize(pageSize); + + + + + table.getColumns().add(new WeaTableColumn("10%", "分部", "resourceid").setTransmethod("com.engine.kqsolution.util.ResourceSnipUtils.selectResourceName")); + table.getColumns().add(new WeaTableColumn("10%", "一级部门", "workcode")); + table.getColumns().add(new WeaTableColumn("10%", "二级部门", "subcompanyid1").setTransmethod("com.engine.kqsolution.util.ResourceSnipUtils.selectSubCompanyName")); + table.getColumns().add(new WeaTableColumn("10%", "三级部门", "departmentid").setTransmethod("com.engine.kqsolution.util.ResourceSnipUtils.selectDeptName")); + table.getColumns().add(new WeaTableColumn("10%", "四级部门", "jobtitle").setTransmethod("com.engine.kqsolution.util.ResourceSnipUtils.selectJobName")); + table.getColumns().add(new WeaTableColumn("10%", "考勤结果", "result").setTransmethod("com.engine.kqsolution.util.ResourceSnipUtils.selectKqResult")); + table.getColumns().add(new WeaTableColumn("10%", "考勤结果", "result").setTransmethod("com.engine.kqsolution.util.ResourceSnipUtils.selectKqResult")); + table.getColumns().add(new WeaTableColumn("10%", "考勤结果", "result").setTransmethod("com.engine.kqsolution.util.ResourceSnipUtils.selectKqResult")); + table.setTableType(WeaTableType.NONE); + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + resultMap.putAll(result.getResultMap()); + return resultMap; } }