@ -0,0 +1,12 @@
|
||||
package com.api.organization.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/bs/hrmorganization/quicksearch")
|
||||
public class QuickSearchController extends com.engine.organization.web.QuickSearchController {
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.engine.organization.entity.chart;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/06/30
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ChartPO {
|
||||
private String fname;
|
||||
/**
|
||||
* 0:集团,1:分部,2:部门
|
||||
*/
|
||||
private String ftype;
|
||||
private String fnumber;
|
||||
private String fobjid;
|
||||
private String parentId;
|
||||
private String expand;
|
||||
private String fisvitual;
|
||||
private String hasChildren;
|
||||
|
||||
// 在岗数
|
||||
private Integer fonjob;
|
||||
|
||||
// 部门负责人
|
||||
private String fleader;
|
||||
|
||||
// 人员主次账号
|
||||
private String belongto;
|
||||
// 人员工龄
|
||||
private String companyWorkYear;
|
||||
// 人员头像
|
||||
private String fleaderimg;
|
||||
|
||||
private String id;
|
||||
private String key;
|
||||
|
||||
// 部门层级
|
||||
private int departmentDepth;
|
||||
|
||||
public String getId() {
|
||||
if (StringUtils.isNotBlank(ftype)) {
|
||||
switch (ftype) {
|
||||
case "0":
|
||||
id = "c_" + fobjid;
|
||||
break;
|
||||
case "1":
|
||||
id = "s_" + fobjid;
|
||||
break;
|
||||
case "2":
|
||||
id = "d_" + fobjid;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getFisvitual() {
|
||||
// 人员、岗位不展示次字段
|
||||
if (StringUtils.isNotBlank(ftype) && ("3".equals(ftype) || "4".equals(ftype))) {
|
||||
return null;
|
||||
}
|
||||
return StringUtils.isBlank(fisvitual) ? "0" : fisvitual;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
public String getCompanyWorkYear() {
|
||||
if (StringUtils.isNotBlank(ftype) && "4".equals(ftype)) {
|
||||
return StringUtils.isNotBlank(companyWorkYear) ? companyWorkYear : "0";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.engine.organization.entity.chart;
|
||||
|
||||
import com.engine.organization.common.BaseQueryParam;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/3 2:48 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class ReasourceListParam extends BaseQueryParam {
|
||||
|
||||
private Integer departmentId;
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.engine.organization.entity.chart;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/3 2:16 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class ResourceListColumns {
|
||||
|
||||
private String title;
|
||||
|
||||
private String dataIndex;
|
||||
|
||||
private String key;
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.engine.organization.entity.chart;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/6/29 11:19 AM
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class TimeLinesBO {
|
||||
|
||||
private Integer key;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
|
||||
private String color;
|
||||
|
||||
private String time;
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
package com.engine.organization.entity.chart;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/07/25
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class TreeSelect {
|
||||
public static final String COMPANY = "0";
|
||||
public static final String SUB_COMPANY = "1";
|
||||
public static final String DEPARTMENT = "2";
|
||||
|
||||
@JSONField(ordinal = 1)
|
||||
private String key;
|
||||
@JSONField(ordinal = 2)
|
||||
private String title;
|
||||
@JSONField(ordinal = 3)
|
||||
private String id;
|
||||
@JSONField(ordinal = 4)
|
||||
private List<TreeSelect> children;
|
||||
private String type;
|
||||
private String canceled;
|
||||
private boolean disabled;
|
||||
|
||||
private String showCanceled;
|
||||
|
||||
public List<TreeSelect> getChildren() {
|
||||
if (null != children) {
|
||||
return children;
|
||||
}
|
||||
children = new ArrayList<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
if (COMPANY.equals(type)) {
|
||||
String sql = "select id ,subcompanyname ,canceled from hrmsubcompany where " + getCancelSqlStr() + " and (supsubcomid is null or supsubcomid = 0) and companyid = ? order by showorder,id";
|
||||
rs.executeQuery(sql, key);
|
||||
while (rs.next()) {
|
||||
children.add(TreeSelect.builder().key(rs.getString("id")).title(rs.getString("subcompanyname")).canceled(rs.getString("canceled")).type(SUB_COMPANY).showCanceled(showCanceled).build());
|
||||
}
|
||||
} else if (SUB_COMPANY.equals(type)) {
|
||||
String sql = "select id ,subcompanyname ,canceled from hrmsubcompany where " + getCancelSqlStr() + " and supsubcomid = ? order by showorder,id";
|
||||
rs.executeQuery(sql, key);
|
||||
while (rs.next()) {
|
||||
children.add(TreeSelect.builder().key(rs.getString("id")).title(rs.getString("subcompanyname")).canceled(rs.getString("canceled")).type(SUB_COMPANY).showCanceled(showCanceled).build());
|
||||
}
|
||||
sql = "select id,departmentname ,canceled from hrmdepartment where " + getCancelSqlStr() + " and (supdepid is null or supdepid =0) and subcompanyid1 = ? order by showorder,id";
|
||||
rs.executeQuery(sql, key);
|
||||
while (rs.next()) {
|
||||
children.add(TreeSelect.builder().key(rs.getString("id")).title(rs.getString("departmentname")).canceled(rs.getString("canceled")).type(DEPARTMENT).showCanceled(showCanceled).build());
|
||||
}
|
||||
} else if (DEPARTMENT.equals(type)) {
|
||||
String sql = "select id,departmentname ,canceled from hrmdepartment where " + getCancelSqlStr() + " and supdepid = ? order by showorder,id";
|
||||
rs.executeQuery(sql, key);
|
||||
while (rs.next()) {
|
||||
children.add(TreeSelect.builder().key(rs.getString("id")).title(rs.getString("departmentname")).canceled(rs.getString("canceled")).type(DEPARTMENT).showCanceled(showCanceled).build());
|
||||
}
|
||||
}
|
||||
return CollectionUtils.isEmpty(children) ? null : children;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
switch (type) {
|
||||
case COMPANY:
|
||||
return "c" + key;
|
||||
case SUB_COMPANY:
|
||||
return "s" + key;
|
||||
case DEPARTMENT:
|
||||
return "d" + key;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return getKey();
|
||||
}
|
||||
|
||||
public String getCanceled() {
|
||||
if (StringUtils.isBlank(canceled)) {
|
||||
return "0";
|
||||
}
|
||||
return canceled;
|
||||
}
|
||||
|
||||
public String getShowCanceled() {
|
||||
return null;
|
||||
}
|
||||
|
||||
private String getCancelSqlStr() {
|
||||
if (StringUtils.isNotBlank(showCanceled) && "1".equals(showCanceled)) {
|
||||
return " 1=1 ";
|
||||
} else {
|
||||
return " (canceled is null or canceled != 1) ";
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.engine.organization.entity.chart.history;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/11 4:36 PM
|
||||
* @Description: 虚拟维度历史表
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class CompanyVirtualHistory {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer companyVirtualId;
|
||||
|
||||
private String creater;
|
||||
|
||||
private String companyName;
|
||||
|
||||
private String companyCode;
|
||||
|
||||
private String companyDesc;
|
||||
|
||||
private Integer showOrder;
|
||||
|
||||
private Integer canceled;
|
||||
|
||||
private String virtualType;
|
||||
|
||||
private String virtualTypeDesc;
|
||||
|
||||
private String versionDate;
|
||||
|
||||
private Integer versionId;
|
||||
|
||||
private Integer fonJob;
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.engine.organization.entity.chart.history;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/11 4:36 PM
|
||||
* @Description: 部门历史表
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class DepartmentHistory {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String creater;
|
||||
|
||||
private Integer departmentId;
|
||||
|
||||
private String departmentMark;
|
||||
|
||||
private String departmentName;
|
||||
|
||||
private String subcompanyId;
|
||||
|
||||
private String subcompany;
|
||||
|
||||
private Integer supDepartmentId;
|
||||
|
||||
private String supDepartment;
|
||||
|
||||
private Integer canceled;
|
||||
|
||||
private String departmentCode;
|
||||
|
||||
private String coadJutant;
|
||||
|
||||
private Integer tlevel;
|
||||
|
||||
private String versionDate;
|
||||
|
||||
private Integer versionId;
|
||||
|
||||
private Integer fonjob;
|
||||
|
||||
private Integer isVirtual;
|
||||
|
||||
private String fLeader;
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.engine.organization.entity.chart.history;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/11 4:36 PM
|
||||
* @Description: 虚拟维度部门历史表
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class DepartmentVirtualHistory {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer departmentVirtualId;
|
||||
|
||||
private String creater;
|
||||
|
||||
private String departmentName;
|
||||
|
||||
private String departmentCode;
|
||||
|
||||
private String departmentMark;
|
||||
|
||||
private String supDepartment;
|
||||
|
||||
private Integer supDepId;
|
||||
|
||||
private String allSupDepId;
|
||||
|
||||
private String subCompany;
|
||||
|
||||
private String subCompanyId;
|
||||
|
||||
private Integer canceled;
|
||||
|
||||
private String virtualType;
|
||||
|
||||
private String tLevel;
|
||||
|
||||
private String showOrder;
|
||||
|
||||
private String versionDate;
|
||||
|
||||
private Integer versionId;
|
||||
|
||||
private Integer fonJob;
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.engine.organization.entity.chart.history;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/11 4:59 PM
|
||||
* @Description: 岗位历史表
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class JobHistory {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String creater;
|
||||
|
||||
private Integer jobId;
|
||||
|
||||
private String jobName;
|
||||
|
||||
private Integer departmentId;
|
||||
|
||||
private String department;
|
||||
|
||||
private Integer subCompanyId;
|
||||
|
||||
private String subCompany;
|
||||
|
||||
private String jobResponsibility;
|
||||
|
||||
private Integer canceled;
|
||||
|
||||
private String jobCode;
|
||||
|
||||
private String description;
|
||||
|
||||
private String versionDate;
|
||||
|
||||
private Integer versionId;
|
||||
|
||||
private Integer fonJob;
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.engine.organization.entity.chart.history;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/11 4:59 PM
|
||||
* @Description: 虚拟人员历史表
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class ResourceVirtualHistory {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer resourceId;
|
||||
|
||||
private Integer managerId;
|
||||
|
||||
private Integer subCompanyId;
|
||||
|
||||
private String departmentId;
|
||||
|
||||
private String managerStr;
|
||||
|
||||
private Integer virtualType;
|
||||
|
||||
private String description;
|
||||
|
||||
private String versionDate;
|
||||
|
||||
private Integer versionId;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.engine.organization.entity.chart.history;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/11 4:36 PM
|
||||
* @Description: 虚拟维度分部历史表
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class SubCompanyVirtualHistory {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer subCompanyVirtualId;
|
||||
|
||||
private String creater;
|
||||
|
||||
private String subCompanyName;
|
||||
|
||||
private String subCompanyCode;
|
||||
|
||||
private String subCompanyDesc;
|
||||
|
||||
private String supSubCompany;
|
||||
|
||||
private Integer supSubCompId;
|
||||
|
||||
private String company;
|
||||
|
||||
private String companyId;
|
||||
|
||||
private Integer canceled;
|
||||
|
||||
private String virtualType;
|
||||
|
||||
private String tLevel;
|
||||
|
||||
private String showOrder;
|
||||
|
||||
private String versionDate;
|
||||
|
||||
private Integer versionId;
|
||||
|
||||
private Integer fonJob;
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.engine.organization.entity.chart.history;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/11 4:36 PM
|
||||
* @Description: 分部历史表
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class SubcompanyHistory {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String creater;
|
||||
|
||||
private Integer subcompanyId;
|
||||
|
||||
private String subcompanyName;
|
||||
|
||||
private String subcompanyDesc;
|
||||
|
||||
private String company;
|
||||
|
||||
private String supSubcompanyId;
|
||||
|
||||
private String supSubcompany;
|
||||
|
||||
private Integer canceled;
|
||||
|
||||
private String subcompanyCode;
|
||||
|
||||
private Integer limitUsers;
|
||||
|
||||
private Integer tlevel;
|
||||
|
||||
private String versionDate;
|
||||
|
||||
private Integer versionId;
|
||||
|
||||
private Integer fonJob;
|
||||
|
||||
private Integer isVirtual;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.engine.organization.entity.department.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DepartmentDragParam {
|
||||
private Integer dropPosition;
|
||||
private String sourcekey;
|
||||
private String targetkey;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.engine.organization.entity.hrmresource.bo;
|
||||
|
||||
import com.engine.organization.entity.hrmresource.po.ResourceChartPO;
|
||||
import com.engine.organization.entity.hrmresource.vo.ResourceChartVO;
|
||||
import com.engine.organization.transmethod.HrmResourceTransMethod;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/07/06
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ResourceChartBO {
|
||||
|
||||
public static List<ResourceChartVO> convertToVO(List<ResourceChartPO> resourceChartPOS) {
|
||||
List<ResourceChartVO> resourceChartVOS = new ArrayList<>();
|
||||
for (ResourceChartPO resourceChartPO : resourceChartPOS) {
|
||||
ResourceChartVO resourceChartVO = new ResourceChartVO();
|
||||
resourceChartVO.setId(resourceChartPO.getId());
|
||||
resourceChartVO.setWorkCode(resourceChartPO.getWorkCode());
|
||||
resourceChartVO.setLastName(resourceChartPO.getLastName());
|
||||
resourceChartVO.setSex("1".equals(resourceChartPO.getSex()) ? "女" : "男");
|
||||
resourceChartVO.setDepartmentName(HrmResourceTransMethod.getDepartmentName(Util.null2String(resourceChartPO.getDepartmentId())));
|
||||
resourceChartVO.setSubcompanyName(HrmResourceTransMethod.getCompanyName(Util.null2String(resourceChartPO.getSubcompanyid1())));
|
||||
resourceChartVO.setJobTitle(HrmResourceTransMethod.getJobName(Util.null2String(resourceChartPO.getJobTitle())));
|
||||
resourceChartVO.setStatus(resourceChartPO.getStatus());
|
||||
resourceChartVO.setMobile(resourceChartPO.getMobile());
|
||||
resourceChartVOS.add(resourceChartVO);
|
||||
}
|
||||
return resourceChartVOS;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.engine.organization.entity.hrmresource.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/3 2:25 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ResourceChartPO {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String workCode;
|
||||
|
||||
private String lastName;
|
||||
|
||||
private String sex;
|
||||
|
||||
private Integer departmentId;
|
||||
|
||||
private Integer subcompanyid1;
|
||||
|
||||
private Integer jobTitle;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private String mobile;
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.engine.organization.entity.hrmresource.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/7/3 2:40 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ResourceChartVO {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String workCode;
|
||||
|
||||
private String lastName;
|
||||
|
||||
private String sex;
|
||||
|
||||
private String departmentName;
|
||||
|
||||
private String subcompanyName;
|
||||
|
||||
private String jobTitle;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private String mobile;
|
||||
|
||||
private Long key;
|
||||
|
||||
public Long getKey() {
|
||||
return id;
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.engine.organization.entity.search;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class QuickSearchCondition {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 查询id
|
||||
*/
|
||||
private String fieldId;
|
||||
/**
|
||||
* 查询名称
|
||||
*/
|
||||
private String customName;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 排序id
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 所属人员
|
||||
*/
|
||||
private Integer belongTo;
|
||||
/**
|
||||
* 显示模式
|
||||
*/
|
||||
private Integer showModel;
|
||||
/**
|
||||
* 模块id
|
||||
*/
|
||||
private Integer modelId;
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.engine.organization.entity.search;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class QuickSearchDetail {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 查询id
|
||||
*/
|
||||
private String fieldId;
|
||||
/**
|
||||
* 所属人员
|
||||
*/
|
||||
private Integer belongTo;
|
||||
/**
|
||||
* cid
|
||||
*/
|
||||
private Integer cId;
|
||||
/**
|
||||
* 查询名称
|
||||
*/
|
||||
private String customName;
|
||||
/**
|
||||
* 最小值
|
||||
*/
|
||||
private Integer minNum;
|
||||
/**
|
||||
* 最大值
|
||||
*/
|
||||
private Integer maxNum;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 排序id
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 模块id
|
||||
*/
|
||||
private Integer modelId;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.engine.organization.entity.search;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class QuickSearchField {
|
||||
private String fieldHtmlType;
|
||||
private String type;
|
||||
private String fieldDbType;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.engine.organization.entity.search;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class QuickSearchOption {
|
||||
private String fieldId;
|
||||
private String fieldLabel;
|
||||
private String fieldName;
|
||||
private String fieldHtmlType;
|
||||
private String type;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.engine.organization.entity.search;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class QuickSearchSetting {
|
||||
private Integer id;
|
||||
private Integer belongTo;
|
||||
private Integer isQuickSearch;
|
||||
private Integer isShowType;
|
||||
private Integer isHideName;
|
||||
private Integer updateTor;
|
||||
private String updateDate;
|
||||
private String updateTime;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.engine.organization.entity.search.condition;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/14
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ConditionOption {
|
||||
private String key;
|
||||
private String showname;
|
||||
private Boolean selected;
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.engine.organization.entity.search.condition;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/14
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RangeCondition {
|
||||
private String label;
|
||||
private List<ConditionOption> options;
|
||||
private List<String> domkey;
|
||||
private Map<String, Object> selectLinkageDatas;
|
||||
private Integer labelcol;
|
||||
private Integer fieldcol;
|
||||
//private Integer showModel;
|
||||
private String com;
|
||||
|
||||
public Integer getLabelcol() {
|
||||
if (null == labelcol) {
|
||||
return 6;
|
||||
}
|
||||
return labelcol;
|
||||
}
|
||||
|
||||
public Integer getFieldcol() {
|
||||
if (null == fieldcol) {
|
||||
return 18;
|
||||
}
|
||||
return fieldcol;
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.engine.organization.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/14
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum QuickSearchConditionEnum {
|
||||
|
||||
/**
|
||||
* 字段类型
|
||||
*/
|
||||
SELECT("5"), DATETIME("3"),NUMBER("1"),RESOURCE("-1"),MEETING("-3"),WAREHOUSE("-5");
|
||||
|
||||
private String value;
|
||||
|
||||
QuickSearchConditionEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static QuickSearchConditionEnum getByValue(String value) {
|
||||
for (QuickSearchConditionEnum conditionEnum : values()) {
|
||||
if (conditionEnum.getValue().equals(value)) {
|
||||
return conditionEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
package com.engine.organization.mapper.condition;
|
||||
|
||||
import com.engine.organization.entity.jclimport.po.CusFormFieldPO;
|
||||
import com.engine.organization.entity.jclimport.po.HrmFormFieldPO;
|
||||
import com.engine.organization.entity.jclimport.po.JclSelectItem;
|
||||
import com.engine.organization.entity.search.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface QuickSearchMapper {
|
||||
|
||||
/**
|
||||
* 查询快速搜索设置
|
||||
*
|
||||
* @param belongTo 人员ID
|
||||
* @return 搜索设置实体
|
||||
*/
|
||||
QuickSearchSetting getQuickSearchSetting(@Param("belongTo") Integer belongTo);
|
||||
|
||||
/**
|
||||
* 获取快速搜索条件
|
||||
*
|
||||
* @param belongTo 人员ID
|
||||
* @return 搜索条件实体
|
||||
*/
|
||||
List<QuickSearchCondition> getQuickSearchConditionList(@Param("belongTo") Integer belongTo, @Param("modelId") Integer modelId);
|
||||
|
||||
/**
|
||||
* 获取快速搜索选项列表
|
||||
*
|
||||
* @return 搜索选项列表
|
||||
*/
|
||||
List<QuickSearchOption> getQuickSearchOptionList();
|
||||
|
||||
/**
|
||||
* 获取主表、自定义表可以的所有字段信息
|
||||
*
|
||||
* @return 自定义表可以的所有字段信息
|
||||
*/
|
||||
List<CusFormFieldPO> getAllFieldInfo();
|
||||
|
||||
/**
|
||||
* 插入快速搜索设置
|
||||
*
|
||||
* @param quickSearchSetting 快速搜索设置实体
|
||||
* @return return
|
||||
*/
|
||||
int insertQuickSearchSetting(@Param("quickSearchSetting") QuickSearchSetting quickSearchSetting);
|
||||
|
||||
/**
|
||||
* 更新快速搜索设置
|
||||
*
|
||||
* @param quickSearchSetting 快速搜索设置实体
|
||||
* @return return
|
||||
*/
|
||||
int updateQuickSearchSetting(@Param("quickSearchSetting") QuickSearchSetting quickSearchSetting);
|
||||
|
||||
/**
|
||||
* 插入快速搜索条件
|
||||
*
|
||||
* @param quickSearchCondition 快速搜索条件实体
|
||||
* @return return
|
||||
*/
|
||||
int insertQuickSearchCondition(@Param("quickSearchCondition") QuickSearchCondition quickSearchCondition);
|
||||
|
||||
/**
|
||||
* 更新快速搜索条件
|
||||
*
|
||||
* @param quickSearchCondition 快速搜索条件实体
|
||||
* @return return
|
||||
*/
|
||||
int updateQuickSearchCondition(@Param("quickSearchCondition") QuickSearchCondition quickSearchCondition);
|
||||
|
||||
/**
|
||||
* 按Cid删除快速搜索详细信息
|
||||
*
|
||||
* @param cId condition主键
|
||||
* @return return
|
||||
*/
|
||||
int deleteQuickSearchDetailByCid(@Param("cId") Integer cId);
|
||||
|
||||
/**
|
||||
* 按ID删除快速搜索条件
|
||||
*
|
||||
* @param ids ids
|
||||
* @return return
|
||||
*/
|
||||
int deleteQuickSearchConditionByIds(@Param("ids") Collection<Integer> ids);
|
||||
|
||||
/**
|
||||
* 按Cids删除快速搜索详细信息
|
||||
*
|
||||
* @param cIds cIds
|
||||
* @return return
|
||||
*/
|
||||
int deleteQuickSearchDetailByCids(@Param("cIds") Collection<Integer> cIds);
|
||||
|
||||
/**
|
||||
* 按Cid获取快速搜索详细信息
|
||||
*
|
||||
* @param cId cId
|
||||
* @return return
|
||||
*/
|
||||
List<QuickSearchDetail> getQuickSearchDetailByCid(@Param("cId") String cId);
|
||||
|
||||
QuickSearchDetail getQuickSearchDetailById(@Param("id") String id);
|
||||
|
||||
/**
|
||||
* 按条件Id获取快速搜索字段列表
|
||||
*
|
||||
* @param id 条件Id
|
||||
* @return return
|
||||
*/
|
||||
List<QuickSearchField> getQuickSearchFieldListByConditionId(@Param("id") String id);
|
||||
|
||||
/**
|
||||
* 更新快速搜索详细信息
|
||||
*
|
||||
* @param quickSearchDetail 详细信息实体
|
||||
* @return return
|
||||
*/
|
||||
int updateQuickSearchDetail(@Param("quickSearchDetail") QuickSearchDetail quickSearchDetail);
|
||||
|
||||
/**
|
||||
* 插入快速搜索详细信息
|
||||
*
|
||||
* @param quickSearchDetail 详细信息实体
|
||||
* @return return
|
||||
*/
|
||||
int insertQuickSearchDetail(@Param("quickSearchDetail") QuickSearchDetail quickSearchDetail);
|
||||
|
||||
/**
|
||||
* 按ID删除快速搜索详细信息
|
||||
*
|
||||
* @param ids id
|
||||
* @return return
|
||||
*/
|
||||
int deleteQuickSearchDetailByIds(@Param("ids") Collection<Integer> ids);
|
||||
|
||||
HrmFormFieldPO getHrmFormFieldByFieldId(@Param("fieldId") String fieldId);
|
||||
|
||||
List<JclSelectItem> getSelectItemListByFieldId(@Param("fieldId") String fieldId);
|
||||
|
||||
}
|
@ -0,0 +1,210 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.organization.mapper.condition.QuickSearchMapper">
|
||||
|
||||
|
||||
<select id="getQuickSearchSetting" resultType="com.engine.organization.entity.search.QuickSearchSetting">
|
||||
select id, isquicksearch, isshowtype, ishidename
|
||||
from jcl_quicksearch_setting
|
||||
where belongto = #{belongTo}
|
||||
</select>
|
||||
|
||||
<select id="getQuickSearchConditionList"
|
||||
resultType="com.engine.organization.entity.search.QuickSearchCondition">
|
||||
select c.id, fieldid, c.customname, c.type, c.orderid, c.showmodel
|
||||
from jcl_quicksearch_condition c
|
||||
where belongto = #{belongTo}
|
||||
and modelid = #{modelId}
|
||||
order by c.orderid, c.id
|
||||
</select>
|
||||
|
||||
<select id="getQuickSearchOptionList" resultType="com.engine.organization.entity.search.QuickSearchOption">
|
||||
select b.fieldid, b.fieldlabel, b.fieldname, fieldhtmltype, b.type
|
||||
from hrm_formfield b
|
||||
inner join hrm_fieldgroup c on c.id = b.groupid and c.grouptype in (-1, 1, 3)
|
||||
</select>
|
||||
<select id="getQuickSearchDetailByCid"
|
||||
resultType="com.engine.organization.entity.search.QuickSearchDetail">
|
||||
select id,
|
||||
customname,
|
||||
minnum,
|
||||
maxnum,
|
||||
type,
|
||||
orderid,
|
||||
fieldid,
|
||||
belongto
|
||||
from jcl_quicksearch_detail
|
||||
where cid = #{cId}
|
||||
order by orderid, id
|
||||
</select>
|
||||
|
||||
<select id="getQuickSearchDetailById" resultType="com.engine.organization.entity.search.QuickSearchDetail">
|
||||
select id,
|
||||
customname,
|
||||
minnum,
|
||||
maxnum,
|
||||
type,
|
||||
orderid,
|
||||
fieldid,
|
||||
belongto
|
||||
from jcl_quicksearch_detail
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getQuickSearchFieldListByConditionId"
|
||||
resultType="com.engine.organization.entity.search.QuickSearchField">
|
||||
select b.fieldhtmltype, b.type, b.fielddbtype
|
||||
from jcl_quicksearch_condition c
|
||||
left join hrm_formfield b on b.fieldid = c.fieldid
|
||||
where c.id = #{id}
|
||||
</select>
|
||||
<select id="getHrmFormFieldByFieldId"
|
||||
resultType="com.engine.organization.entity.jclimport.po.HrmFormFieldPO">
|
||||
select a.fieldid,
|
||||
a.fieldname,
|
||||
a.issystem,
|
||||
a.fieldlabel labelname,
|
||||
a.ismand,
|
||||
a.fielddbtype,
|
||||
a.fieldhtmltype,
|
||||
a.type,
|
||||
a.dmlurl
|
||||
from hrm_formfield a
|
||||
where a.fieldhtmltype != '6'
|
||||
and a.fieldid = #{fieldId}
|
||||
</select>
|
||||
<select id="getSelectItemListByFieldId"
|
||||
resultType="com.engine.organization.entity.jclimport.po.JclSelectItem">
|
||||
select selectvalue, selectname
|
||||
from hrm_selectitem
|
||||
where fieldid = #{fieldId}
|
||||
</select>
|
||||
<select id="getAllFieldInfo" resultType="com.engine.organization.entity.jclimport.po.CusFormFieldPO">
|
||||
SELECT *
|
||||
FROM (SELECT t1.fieldid,
|
||||
t2.fieldname,
|
||||
t1.fieldlable fieldLabel,
|
||||
t1.ismand,
|
||||
t2.fielddbtype,
|
||||
t2.fieldhtmltype,
|
||||
t2.type,
|
||||
t1.dmlurl,
|
||||
fieldorder,
|
||||
groupid,
|
||||
t1.scopeid as scopeId,
|
||||
'cus' as tablename
|
||||
FROM cus_formfield t1,
|
||||
cus_formdict t2
|
||||
WHERE t1.fieldid = t2.id
|
||||
AND t1.scope = 'HrmCustomFieldByInfoType'
|
||||
UNION ALL
|
||||
SELECT t3.fieldid,
|
||||
t3.fieldname,
|
||||
t3.fieldlabel fieldLabel,
|
||||
t3.ismand,
|
||||
t3.fielddbtype,
|
||||
t3.fieldhtmltype,
|
||||
t3.TYPE,
|
||||
t3.dmlurl,
|
||||
t3.fieldorder,
|
||||
t3.groupid,
|
||||
c.grouptype as scopeId,
|
||||
'hrm' as tablename
|
||||
FROM hrm_formfield t3
|
||||
inner join hrm_fieldgroup c on c.id = t3.groupid and c.grouptype in (-1, 1, 3)) hrmallfield
|
||||
WHERE FIELDHTMLTYPE != '6'
|
||||
ORDER BY hrmallfield.groupid, hrmallfield.fieldorder
|
||||
</select>
|
||||
|
||||
<insert id="insertQuickSearchSetting">
|
||||
insert into jcl_quicksearch_setting(belongto,
|
||||
isquicksearch,
|
||||
isshowtype,
|
||||
ishidename,
|
||||
updatetor,
|
||||
updatedate,
|
||||
updatetime)
|
||||
values (#{quickSearchSetting.belongTo},
|
||||
#{quickSearchSetting.isQuickSearch},
|
||||
#{quickSearchSetting.isShowType},
|
||||
#{quickSearchSetting.isHideName},
|
||||
#{quickSearchSetting.updateTor},
|
||||
#{quickSearchSetting.updateDate},
|
||||
#{quickSearchSetting.updateTime})
|
||||
</insert>
|
||||
|
||||
<update id="updateQuickSearchSetting">
|
||||
update jcl_quicksearch_setting
|
||||
set isquicksearch=#{quickSearchSetting.isQuickSearch},
|
||||
isshowtype=#{quickSearchSetting.isShowType},
|
||||
ishidename=#{quickSearchSetting.isHideName}
|
||||
where id = #{quickSearchSetting.id}
|
||||
</update>
|
||||
|
||||
<insert id="insertQuickSearchCondition">
|
||||
insert into jcl_quicksearch_condition(belongto, fieldid, customname, type, orderid, showmodel, modelid)
|
||||
values (#{quickSearchCondition.belongTo}, #{quickSearchCondition.fieldId}, #{quickSearchCondition.customName},
|
||||
#{quickSearchCondition.type}, #{quickSearchCondition.orderId}, #{quickSearchCondition.showModel},
|
||||
#{quickSearchCondition.modelId})
|
||||
</insert>
|
||||
|
||||
<update id="updateQuickSearchCondition">
|
||||
update jcl_quicksearch_condition
|
||||
set belongto=#{quickSearchCondition.belongTo},
|
||||
fieldid=#{quickSearchCondition.fieldId},
|
||||
customname=#{quickSearchCondition.customName},
|
||||
type=#{quickSearchCondition.type},
|
||||
orderid=#{quickSearchCondition.orderId},
|
||||
showmodel=#{quickSearchCondition.showModel},
|
||||
modelid = #{quickSearchCondition.modelId}
|
||||
where id = #{quickSearchCondition.id}
|
||||
</update>
|
||||
|
||||
<insert id="insertQuickSearchDetail">
|
||||
insert into jcl_quicksearch_detail(cid, customname, minnum, maxnum, type, orderid, fieldid, belongto)
|
||||
values (#{quickSearchDetail.cId}, #{quickSearchDetail.customName}, #{quickSearchDetail.minNum},
|
||||
#{quickSearchDetail.maxNum}, #{quickSearchDetail.type}, #{quickSearchDetail.orderId},
|
||||
#{quickSearchDetail.fieldId}, #{quickSearchDetail.belongTo})
|
||||
</insert>
|
||||
|
||||
<update id="updateQuickSearchDetail">
|
||||
update jcl_quicksearch_detail
|
||||
set cid=#{quickSearchDetail.cId},
|
||||
customname=#{quickSearchDetail.customName},
|
||||
minnum=#{quickSearchDetail.minNum},
|
||||
maxnum=#{quickSearchDetail.maxNum},
|
||||
type=#{quickSearchDetail.type},
|
||||
orderid=#{quickSearchDetail.orderId},
|
||||
fieldid=#{quickSearchDetail.fieldId},
|
||||
belongto=#{quickSearchDetail.belongTo}
|
||||
where id = #{quickSearchDetail.id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteQuickSearchDetailByCid">
|
||||
delete
|
||||
from jcl_quicksearch_detail
|
||||
where cid = #{cId}
|
||||
</delete>
|
||||
<delete id="deleteQuickSearchConditionByIds">
|
||||
delete from jcl_quicksearch_condition where id in
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQuickSearchDetailByCids">
|
||||
delete from jcl_quicksearch_detail where cid in
|
||||
<foreach collection="cIds" open="(" item="cid" separator="," close=")">
|
||||
#{cid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQuickSearchDetailByIds">
|
||||
delete from jcl_quicksearch_detail where id in
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,50 @@
|
||||
package com.engine.organization.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface QuickSearchService {
|
||||
/**
|
||||
* 获取快速搜索条件
|
||||
*
|
||||
* @param params 前端参数
|
||||
* @return return
|
||||
*/
|
||||
Map<String, Object> getQuickSearchCondition(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 获取快速搜索信息
|
||||
*
|
||||
* @param params params
|
||||
* @return return
|
||||
*/
|
||||
Map<String, Object> getQuickSearchInfo(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 保存快速搜索信息
|
||||
*
|
||||
* @param params params
|
||||
* @return return
|
||||
*/
|
||||
Map<String, Object> saveQuickSearchInfo(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 获取快速搜索详细信息
|
||||
*
|
||||
* @param params params
|
||||
* @return return
|
||||
*/
|
||||
Map<String, Object> getQuickSearchDetailInfo(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 保存快速搜索详细信息
|
||||
*
|
||||
* @param params params
|
||||
* @return return
|
||||
*/
|
||||
Map<String, Object> saveQuickSearchDetailInfo(Map<String, Object> params);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,94 @@
|
||||
package com.engine.organization.web;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.QuickSearchWrapper;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class QuickSearchController {
|
||||
public QuickSearchWrapper getQuickSearchWrapper(User user) {
|
||||
return ServiceUtil.getService(QuickSearchWrapper.class, user);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getQuickSearchCondition")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getQuickSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getQuickSearchWrapper(user).getQuickSearchCondition(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getQuickSearchInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getQuickSearchInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getQuickSearchWrapper(user).getQuickSearchInfo(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/saveQuickSearchInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult saveQuickSearchInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getQuickSearchWrapper(user).saveQuickSearchInfo(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getQuickSearchDetailInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getQuickSearchDetailInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getQuickSearchWrapper(user).getQuickSearchDetailInfo(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/saveQuickSearchDetailInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult saveQuickSearchDetailInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getQuickSearchWrapper(user).saveQuickSearchDetailInfo(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.service.QuickSearchService;
|
||||
import com.engine.organization.service.impl.QuickSearchServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/08/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class QuickSearchWrapper extends Service {
|
||||
private QuickSearchService getQuickSearchService(User user) {
|
||||
return ServiceUtil.getService(QuickSearchServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> getQuickSearchCondition(Map<String, Object> params) {
|
||||
return getQuickSearchService(user).getQuickSearchCondition(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> getQuickSearchInfo(Map<String, Object> params) {
|
||||
return getQuickSearchService(user).getQuickSearchInfo(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> saveQuickSearchInfo(Map<String, Object> params) {
|
||||
return getQuickSearchService(user).saveQuickSearchInfo(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> getQuickSearchDetailInfo(Map<String, Object> params) {
|
||||
return getQuickSearchService(user).getQuickSearchDetailInfo(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> saveQuickSearchDetailInfo(Map<String, Object> params) {
|
||||
return getQuickSearchService(user).saveQuickSearchDetailInfo(params);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue