From b0e7595ad7f4942b9f4150c528bcebecf334e434 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Fri, 8 Nov 2024 09:31:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=9A=E6=89=8D=E6=9E=97=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- .../jclproduct/entity/po/DepartmentPo.java | 2 +- .../jclproduct/utils/EmploymentUtil.java | 49 +++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 71a7a3f..22b2815 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,10 @@ /weaver-develop.iml /out/ -.idea/ +/.idea/ HELP.md target/ -.idea /test /src/rebel.xml diff --git a/src/com/engine/jclproduct/entity/po/DepartmentPo.java b/src/com/engine/jclproduct/entity/po/DepartmentPo.java index a0e8add..fbff45d 100644 --- a/src/com/engine/jclproduct/entity/po/DepartmentPo.java +++ b/src/com/engine/jclproduct/entity/po/DepartmentPo.java @@ -31,5 +31,5 @@ public class DepartmentPo { private String departmentCode; - private Integer bmfzr; + private String bmfzr; } diff --git a/src/com/engine/jclproduct/utils/EmploymentUtil.java b/src/com/engine/jclproduct/utils/EmploymentUtil.java index 9f79bf0..88ed01f 100644 --- a/src/com/engine/jclproduct/utils/EmploymentUtil.java +++ b/src/com/engine/jclproduct/utils/EmploymentUtil.java @@ -1,8 +1,10 @@ package com.engine.jclproduct.utils; import com.engine.jclproduct.entity.param.TransferParam; +import com.engine.jclproduct.entity.po.DepartmentPo; import com.engine.jclproduct.entity.po.EmploymentRecordPo; import com.engine.jclproduct.entity.po.HrmresourcePo; +import com.engine.jclproduct.entity.po.SubCompanyPo; import com.weaver.general.Util; import weaver.common.DateUtil; import weaver.conn.RecordSet; @@ -97,6 +99,53 @@ public class EmploymentUtil { return hrmresourcePoList; } + /** + * 当前分部表信息 + * @return + */ + public static List getSubCompany() { + List subCompanyPoList = new ArrayList<>(); + RecordSet rs = new RecordSet(); + rs.executeQuery("select id,subcompanyname,companyid,supsubcomid,showorder,canceled,subcompanycode from hrmsubcompany"); + while (rs.next()) { + subCompanyPoList.add(SubCompanyPo.builder() + .subcompanyId(Util.getIntValue(rs.getString("id"))) + .subcompanyName(Util.null2String(rs.getString("subcompanyname"))) + .companyId(Util.getIntValue(rs.getString("companyid"))) + .supsubcomId(Util.getIntValue(rs.getString("supsubcomid"))) + .showorder(Util.getFloatValue(rs.getString("showorder"))) + .canceled(Util.getIntValue(rs.getString("canceled"))) + .subcompanyCode(Util.null2String(rs.getString("subcompanycode"))) + .build()); + } + return subCompanyPoList; + } + + + /** + * 当前部门表信息 + * @return + */ + public static List getDepartment() { + List departmentPoList = new ArrayList<>(); + RecordSet rs = new RecordSet(); + rs.executeQuery("select a.id,departmentmark,subcompanyid1,supdepid,showorder,canceled,departmentcode,b.bmfzr from hrmdepartment a\n" + + " left join hrmdepartmentdefined b on a.id = b.deptid"); + while (rs.next()) { + departmentPoList.add(DepartmentPo.builder() + .departmentId(Util.getIntValue(rs.getString("id"))) + .departmentmark(Util.null2String(rs.getString("departmentmark"))) + .subcompanyId(Util.getIntValue(rs.getString("subcompanyid1"))) + .supdepId(Util.getIntValue(rs.getString("supdepid"))) + .showorder(Util.getFloatValue(rs.getString("showorder"))) + .canceled(Util.getIntValue(rs.getString("canceled"))) + .departmentCode(Util.null2String(rs.getString("departmentcode"))) + .bmfzr(Util.null2String(rs.getString("bmfzr"))) + .build()); + } + return departmentPoList; + } +