Pre Merge pull request !152 from reset/develop
commit
112931a987
Binary file not shown.
@ -0,0 +1,13 @@
|
|||||||
|
package com.api.organization.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description:
|
||||||
|
* @Date 2022/6/28
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Path("/bs/hrmorganization/common")
|
||||||
|
public class ExportCommonController extends com.engine.organization.web.ExportCommonController {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.api.organization.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/06/29
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Path("/bs/hrmorganization/commonimport")
|
||||||
|
public class ImportCommonController extends com.engine.organization.web.ImportCommonController {
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.api.organization.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/05
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Path("/bs/hrmorganization/log")
|
||||||
|
public class LogViewController extends com.engine.organization.web.LogViewController{
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.api.organization.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @className: OrgChartController
|
||||||
|
* @author: dengjp
|
||||||
|
* @date: 2022/7/7
|
||||||
|
* @description: 组织架构图
|
||||||
|
**/
|
||||||
|
@Path("/bs/hrmorganization/orgchart")
|
||||||
|
public class OrgChartController extends com.engine.organization.web.OrgChartController {
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.engine.organization.common;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class LocalDateRange {
|
||||||
|
|
||||||
|
//"开始日期
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date fromDate;
|
||||||
|
|
||||||
|
//结束日期
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,124 @@
|
|||||||
|
package com.engine.organization.entity.commom;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/06
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class FieldInfo {
|
||||||
|
/**
|
||||||
|
* 字段名称
|
||||||
|
*/
|
||||||
|
private String fieldName;
|
||||||
|
/**
|
||||||
|
* 第一个字段的类型
|
||||||
|
*/
|
||||||
|
private Class<?> firstFieldType;
|
||||||
|
/**
|
||||||
|
* 第二个字段的类型
|
||||||
|
*/
|
||||||
|
private Class<?> secondFieldType;
|
||||||
|
/**
|
||||||
|
* 第一个对象的值
|
||||||
|
*/
|
||||||
|
private Object firstVal;
|
||||||
|
/**
|
||||||
|
* 第二个对象的值
|
||||||
|
*/
|
||||||
|
private Object secondVal;
|
||||||
|
|
||||||
|
public FieldInfo() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public FieldInfo(String fieldName, Class<?> firstFieldType, Class<?> secondFieldType) {
|
||||||
|
this.fieldName = fieldName;
|
||||||
|
this.firstFieldType = firstFieldType;
|
||||||
|
this.secondFieldType = secondFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FieldInfo(String fieldName, Class<?> fieldType, Object firstVal, Object secondVal) {
|
||||||
|
this.fieldName = fieldName;
|
||||||
|
this.firstFieldType = fieldType;
|
||||||
|
this.secondFieldType = fieldType;
|
||||||
|
this.firstVal = firstVal;
|
||||||
|
this.secondVal = secondVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FieldInfo(String fieldName, Class<?> firstFieldType, Class<?> secondFieldType, Object firstVal, Object secondVal) {
|
||||||
|
this.fieldName = fieldName;
|
||||||
|
this.firstFieldType = firstFieldType;
|
||||||
|
this.secondFieldType = secondFieldType;
|
||||||
|
this.firstVal = firstVal;
|
||||||
|
this.secondVal = secondVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFieldName() {
|
||||||
|
return fieldName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFieldName(String fieldName) {
|
||||||
|
this.fieldName = fieldName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<?> getFirstFieldType() {
|
||||||
|
return firstFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFirstFieldType(Class<?> firstFieldType) {
|
||||||
|
this.firstFieldType = firstFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getFirstVal() {
|
||||||
|
return firstVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFirstVal(Object firstVal) {
|
||||||
|
this.firstVal = firstVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecondFieldType(Class<?> secondFieldType) {
|
||||||
|
this.secondFieldType = secondFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<?> getSecondFieldType() {
|
||||||
|
return secondFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSecondVal() {
|
||||||
|
return secondVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecondVal(Object secondVal) {
|
||||||
|
this.secondVal = secondVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
FieldInfo fieldInfo = (FieldInfo) o;
|
||||||
|
return Objects.equals(fieldName, fieldInfo.fieldName) &&
|
||||||
|
Objects.equals(firstFieldType, fieldInfo.firstFieldType) &&
|
||||||
|
Objects.equals(secondFieldType, fieldInfo.secondFieldType) &&
|
||||||
|
Objects.equals(firstVal, fieldInfo.firstVal) &&
|
||||||
|
Objects.equals(secondVal, fieldInfo.secondVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(fieldName, firstFieldType, secondFieldType, firstVal, secondVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "FieldInfo{" +
|
||||||
|
"fieldName='" + fieldName + '\'' +
|
||||||
|
", firstFieldType=" + firstFieldType +
|
||||||
|
", secondFieldType=" + secondFieldType +
|
||||||
|
", firstVal=" + firstVal +
|
||||||
|
", secondVal=" + secondVal +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.engine.organization.entity.hrmresource.bo;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.hrmresource.param.HrmRelationSaveParam;
|
||||||
|
import com.engine.organization.entity.hrmresource.po.HrmRelationPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/11
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class HrmRelationBO {
|
||||||
|
public static HrmRelationPO convertSaveParamToPO(HrmRelationSaveParam saveParam) {
|
||||||
|
if (null == saveParam) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return HrmRelationPO.builder()
|
||||||
|
.id(saveParam.getId())
|
||||||
|
.schemeId(saveParam.getSchemeId())
|
||||||
|
.levelId(saveParam.getLevelId())
|
||||||
|
.gradeId(saveParam.getGradeId())
|
||||||
|
.sequenceId(saveParam.getSequenceId())
|
||||||
|
.postId(saveParam.getPostId())
|
||||||
|
.postInfoId(saveParam.getPostInfoId())
|
||||||
|
.companyId(saveParam.getCompanyId())
|
||||||
|
.departmentId(saveParam.getDepartmentId())
|
||||||
|
.jobId(saveParam.getJobId())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
package com.engine.organization.entity.hrmresource.param;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/11
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class HrmRelationSaveParam {
|
||||||
|
/**
|
||||||
|
* 人员ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级方案ID
|
||||||
|
*/
|
||||||
|
private Long schemeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职等ID
|
||||||
|
*/
|
||||||
|
private String levelId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职级ID
|
||||||
|
*/
|
||||||
|
private Long gradeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位序列ID
|
||||||
|
*/
|
||||||
|
private Long sequenceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职务分类ID
|
||||||
|
*/
|
||||||
|
private Long postId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职务信息ID
|
||||||
|
*/
|
||||||
|
private Long postInfoId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部ID
|
||||||
|
*/
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
private Long departmentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位ID
|
||||||
|
*/
|
||||||
|
private Long jobId;
|
||||||
|
}
|
@ -0,0 +1,338 @@
|
|||||||
|
package com.engine.organization.entity.hrmresource.param;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/06/27
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class HrmResourceImportParam {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* work_code
|
||||||
|
*/
|
||||||
|
private String work_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* login_id
|
||||||
|
*/
|
||||||
|
private String login_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* last_name
|
||||||
|
*/
|
||||||
|
private String last_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sex
|
||||||
|
*/
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* account_type
|
||||||
|
*/
|
||||||
|
private String account_type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* belong_to
|
||||||
|
*/
|
||||||
|
private String belong_to;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* company_id
|
||||||
|
*/
|
||||||
|
private String company_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* department_id
|
||||||
|
*/
|
||||||
|
private String department_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* job_activity
|
||||||
|
*/
|
||||||
|
private String job_activity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* job_title
|
||||||
|
*/
|
||||||
|
private String job_title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* job_call
|
||||||
|
*/
|
||||||
|
private String job_call;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* job_level
|
||||||
|
*/
|
||||||
|
private String job_level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* job_group_id
|
||||||
|
*/
|
||||||
|
private String job_group_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* job_activity_desc
|
||||||
|
*/
|
||||||
|
private String job_activity_desc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* status
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* system_language
|
||||||
|
*/
|
||||||
|
private String system_language;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* resource_image_id
|
||||||
|
*/
|
||||||
|
private String resource_image_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* messager_url
|
||||||
|
*/
|
||||||
|
private String messager_url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* location_id
|
||||||
|
*/
|
||||||
|
private String location_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* manager_id
|
||||||
|
*/
|
||||||
|
private String manager_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* assistant_id
|
||||||
|
*/
|
||||||
|
private String assistant_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mobile
|
||||||
|
*/
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* telephone
|
||||||
|
*/
|
||||||
|
private String telephone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mobile_call
|
||||||
|
*/
|
||||||
|
private String mobile_call;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fax
|
||||||
|
*/
|
||||||
|
private String fax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* email
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* workroom
|
||||||
|
*/
|
||||||
|
private String workroom;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pass_word
|
||||||
|
*/
|
||||||
|
private String pass_word;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sec_level
|
||||||
|
*/
|
||||||
|
private String sec_level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* birthday
|
||||||
|
*/
|
||||||
|
private String birthday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* folk
|
||||||
|
*/
|
||||||
|
private String folk;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* native_place
|
||||||
|
*/
|
||||||
|
private String native_place;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* reg_resident_place
|
||||||
|
*/
|
||||||
|
private String reg_resident_place;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* certificate_num
|
||||||
|
*/
|
||||||
|
private String certificate_num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* marital_status
|
||||||
|
*/
|
||||||
|
private String marital_status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* policy
|
||||||
|
*/
|
||||||
|
private String policy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* be_member_date
|
||||||
|
*/
|
||||||
|
private String be_member_date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* be_party_date
|
||||||
|
*/
|
||||||
|
private String be_party_date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* islabouunion
|
||||||
|
*/
|
||||||
|
private String islabouunion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* degree
|
||||||
|
*/
|
||||||
|
private String degree;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* health_info
|
||||||
|
*/
|
||||||
|
private String health_info;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* education_level
|
||||||
|
*/
|
||||||
|
private String education_level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* height
|
||||||
|
*/
|
||||||
|
private String height;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* weight
|
||||||
|
*/
|
||||||
|
private Integer weight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* use_kind
|
||||||
|
*/
|
||||||
|
private String use_kind;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* start_date
|
||||||
|
*/
|
||||||
|
private String start_date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* end_date
|
||||||
|
*/
|
||||||
|
private String end_date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* probation_end_date
|
||||||
|
*/
|
||||||
|
private String probation_end_date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* resident_place
|
||||||
|
*/
|
||||||
|
private String resident_place;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* home_address
|
||||||
|
*/
|
||||||
|
private String home_address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* temp_resident_number
|
||||||
|
*/
|
||||||
|
private String temp_resident_number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* company_start_date
|
||||||
|
*/
|
||||||
|
private String company_start_date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* work_start_date
|
||||||
|
*/
|
||||||
|
private String work_start_date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* accum_fund_account
|
||||||
|
*/
|
||||||
|
private String accum_fund_account;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* account_name
|
||||||
|
*/
|
||||||
|
private String account_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bank_id
|
||||||
|
*/
|
||||||
|
private String bank_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* account_id
|
||||||
|
*/
|
||||||
|
private String account_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* show_order
|
||||||
|
*/
|
||||||
|
private Integer show_order;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* classification
|
||||||
|
*/
|
||||||
|
private String classification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* woprk_year
|
||||||
|
*/
|
||||||
|
private String work_year;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* company_work_year
|
||||||
|
*/
|
||||||
|
private String company_work_year;
|
||||||
|
|
||||||
|
private String baseFieldsValue="";
|
||||||
|
|
||||||
|
private String baseFields="";
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
private int deleteType;
|
||||||
|
private Date createTime;
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
package com.engine.organization.entity.hrmresource.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/11
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class HrmRelationPO {
|
||||||
|
/**
|
||||||
|
* 人员ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级方案ID
|
||||||
|
*/
|
||||||
|
private Long schemeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职等ID
|
||||||
|
*/
|
||||||
|
private String levelId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职级ID
|
||||||
|
*/
|
||||||
|
private Long gradeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位序列ID
|
||||||
|
*/
|
||||||
|
private Long sequenceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职务分类ID
|
||||||
|
*/
|
||||||
|
private Long postId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职务信息ID
|
||||||
|
*/
|
||||||
|
private Long postInfoId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部ID
|
||||||
|
*/
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
private Long departmentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位ID
|
||||||
|
*/
|
||||||
|
private Long jobId;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
private Integer deleteType;
|
||||||
|
private Date createTime;
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
package com.engine.organization.entity.hrmresource.vo;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.organization.annotation.OrganizationTable;
|
||||||
|
import com.engine.organization.annotation.OrganizationTableColumn;
|
||||||
|
import com.engine.organization.annotation.OrganizationTableOperate;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/01
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@OrganizationTable(pageId = "2f2011f7-f915-11ec-8d51-00e04c680716",
|
||||||
|
fields = "t.id," +
|
||||||
|
"t.lastname," +
|
||||||
|
"t.departmentid," +
|
||||||
|
"t.subcompanyid1," +
|
||||||
|
"t.mobile," +
|
||||||
|
"t.telephone," +
|
||||||
|
"t.managerid, " +
|
||||||
|
"t.dsporder ",
|
||||||
|
fromSql = "FROM hrmresource t ",
|
||||||
|
orderby = " dsporder ",
|
||||||
|
sortway = " asc",
|
||||||
|
primarykey = "id",
|
||||||
|
operates = {
|
||||||
|
@OrganizationTableOperate(index = "0", text = "发消息"),
|
||||||
|
@OrganizationTableOperate(index = "1", text = "发送邮件"),
|
||||||
|
@OrganizationTableOperate(index = "1", text = "发送短信"),
|
||||||
|
@OrganizationTableOperate(index = "1", text = "新建日程"),
|
||||||
|
@OrganizationTableOperate(index = "1", text = "系统信息"),
|
||||||
|
},
|
||||||
|
tableType = WeaTableType.CHECKBOX
|
||||||
|
)
|
||||||
|
public class ScHrmResourceVO {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(column = "id", display = false)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "姓名", width = "25%", column = "lastname")
|
||||||
|
private String lastName;
|
||||||
|
/**
|
||||||
|
* 部门
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "部门", width = "25%", column = "departmentid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getScDepartmentName")
|
||||||
|
private String departmentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "分部", width = "25%", column = "subcompanyid1", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getScCompanyName")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移动电话
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "移动电话", width = "25%", column = "mobile")
|
||||||
|
private String mobile;
|
||||||
|
/**
|
||||||
|
* 办公室电话
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "办公室电话", width = "25%", column = "telephone")
|
||||||
|
private String telephone;
|
||||||
|
/**
|
||||||
|
* 直接上级
|
||||||
|
*/
|
||||||
|
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getScManagerName")
|
||||||
|
private String managerName;
|
||||||
|
|
||||||
|
@OrganizationTableColumn(text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
|
||||||
|
private Integer showOrder;
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
package com.engine.organization.entity.logview.bo;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 不同的属性
|
||||||
|
*
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/06
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class FieldInfo {
|
||||||
|
/**
|
||||||
|
* 字段名称
|
||||||
|
*/
|
||||||
|
private String fieldName;
|
||||||
|
/**
|
||||||
|
* 第一个字段的类型
|
||||||
|
*/
|
||||||
|
private Class<?> firstFieldType;
|
||||||
|
/**
|
||||||
|
* 第二个字段的类型
|
||||||
|
*/
|
||||||
|
private Class<?> secondFieldType;
|
||||||
|
/**
|
||||||
|
* 第一个对象的值
|
||||||
|
*/
|
||||||
|
private Object firstVal;
|
||||||
|
/**
|
||||||
|
* 第二个对象的值
|
||||||
|
*/
|
||||||
|
private Object secondVal;
|
||||||
|
|
||||||
|
public FieldInfo() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public FieldInfo(String fieldName, Class<?> firstFieldType, Class<?> secondFieldType) {
|
||||||
|
this.fieldName = fieldName;
|
||||||
|
this.firstFieldType = firstFieldType;
|
||||||
|
this.secondFieldType = secondFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FieldInfo(String fieldName, Class<?> fieldType, Object firstVal, Object secondVal) {
|
||||||
|
this.fieldName = fieldName;
|
||||||
|
this.firstFieldType = fieldType;
|
||||||
|
this.secondFieldType = fieldType;
|
||||||
|
this.firstVal = firstVal;
|
||||||
|
this.secondVal = secondVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FieldInfo(String fieldName, Class<?> firstFieldType, Class<?> secondFieldType, Object firstVal, Object secondVal) {
|
||||||
|
this.fieldName = fieldName;
|
||||||
|
this.firstFieldType = firstFieldType;
|
||||||
|
this.secondFieldType = secondFieldType;
|
||||||
|
this.firstVal = firstVal;
|
||||||
|
this.secondVal = secondVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFieldName() {
|
||||||
|
return fieldName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFieldName(String fieldName) {
|
||||||
|
this.fieldName = fieldName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<?> getFirstFieldType() {
|
||||||
|
return firstFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFirstFieldType(Class<?> firstFieldType) {
|
||||||
|
this.firstFieldType = firstFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getFirstVal() {
|
||||||
|
return firstVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFirstVal(Object firstVal) {
|
||||||
|
this.firstVal = firstVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecondFieldType(Class<?> secondFieldType) {
|
||||||
|
this.secondFieldType = secondFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<?> getSecondFieldType() {
|
||||||
|
return secondFieldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSecondVal() {
|
||||||
|
return secondVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecondVal(Object secondVal) {
|
||||||
|
this.secondVal = secondVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
FieldInfo fieldInfo = (FieldInfo) o;
|
||||||
|
return Objects.equals(fieldName, fieldInfo.fieldName) &&
|
||||||
|
Objects.equals(firstFieldType, fieldInfo.firstFieldType) &&
|
||||||
|
Objects.equals(secondFieldType, fieldInfo.secondFieldType) &&
|
||||||
|
Objects.equals(firstVal, fieldInfo.firstVal) &&
|
||||||
|
Objects.equals(secondVal, fieldInfo.secondVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(fieldName, firstFieldType, secondFieldType, firstVal, secondVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "[\"" + fieldName + "\":由\"" + firstVal + "\"修改为\"" + secondVal;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.engine.organization.entity.logview.param;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/05
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class LogViewSearchParam {
|
||||||
|
private Long operatorId;
|
||||||
|
private Long companyId;
|
||||||
|
private Long departmentId;
|
||||||
|
private String operateDate;
|
||||||
|
private String startDate;
|
||||||
|
private String endDate;
|
||||||
|
private String moduleType;
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package com.engine.organization.entity.logview.vo;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.organization.annotation.*;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/05
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@OrganizationTable(pageId = "caef4d3e-fc3d-11ec-a203-00e04c680716",
|
||||||
|
fields = "t.id, t.operator_name, t.create_time, t.operate_type, t.client_ip, t.operate_module_name,t.operate_desc,t.message,t.value,t.params_str",
|
||||||
|
fromSql = "FROM hr_log t ",
|
||||||
|
primarykey = "id",
|
||||||
|
orderby = "create_time",
|
||||||
|
tableType = WeaTableType.NONE
|
||||||
|
)
|
||||||
|
public class LogViewVO {
|
||||||
|
|
||||||
|
@OrganizationTableColumn(text = "操作时间", width = "20%", column = "create_time", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getDateTimeFormat")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@OrganizationTableColumn(text = "操作者", width = "16%", column = "operator_name")
|
||||||
|
private String operator;
|
||||||
|
|
||||||
|
@OrganizationTableColumn(text = "操作类型", width = "16%", column = "operate_type", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateType")
|
||||||
|
private String operateType;
|
||||||
|
|
||||||
|
@OrganizationTableColumn(text = "操作描述", width = "16%", column = "operate_desc")
|
||||||
|
private String operateDesc;
|
||||||
|
|
||||||
|
@OrganizationTableColumn(text = "对象", width = "16%", column = "value")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@OrganizationTableColumn(text = "所属模块", width = "16%", column = "operate_module_name")
|
||||||
|
private String operateModuleName;
|
||||||
|
|
||||||
|
@OrganizationTableColumn(text = "修改详情", width = "16%", column = "message")
|
||||||
|
private String showDetail;
|
||||||
|
|
||||||
|
@OrganizationTableColumn(text = "操作IP", width = "16%", column = "client_ip")
|
||||||
|
private String clientIp;
|
||||||
|
|
||||||
|
@OrganizationTableColumn(text = "操作参数", width = "16%", column = "params_str", display = false)
|
||||||
|
private String paramsStr;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.engine.organization.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/04
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public enum LogModuleNameEnum {
|
||||||
|
SCHEME("等级方案", 1),
|
||||||
|
LEVEL("职等", 2),
|
||||||
|
GRADE("职级", 3),
|
||||||
|
SEQUENCE("岗位序列", 4),
|
||||||
|
POSTINFO("职务管理", 6),
|
||||||
|
GROUP("集团管理", 7),
|
||||||
|
COMPANY("分部管理", 8),
|
||||||
|
DEPARTMENT("部门管理", 9),
|
||||||
|
JOB("岗位管理", 10),
|
||||||
|
RESOURCE("人员管理", 11),
|
||||||
|
STAFFPLAN("编制方案", 12),
|
||||||
|
STAFF("编制上报", 13),
|
||||||
|
OTHER("其他模块", 99);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private Integer value;
|
||||||
|
|
||||||
|
LogModuleNameEnum(String name, Integer value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.engine.organization.mapper.hrmresource;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.hrmresource.po.HrmRelationPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/20
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface HrmRelationMapper {
|
||||||
|
HrmRelationPO getRelationById(@Param("id") Long id);
|
||||||
|
|
||||||
|
int insertIgnoreNull(HrmRelationPO relationPO);
|
||||||
|
|
||||||
|
int updateHrmRelation(HrmRelationPO relationPO);
|
||||||
|
}
|
@ -0,0 +1,158 @@
|
|||||||
|
<?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.hrmresource.HrmRelationMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.hrmresource.po.HrmRelationPO">
|
||||||
|
<result column="id" property="id"/>
|
||||||
|
<result column="scheme_id" property="schemeId"/>
|
||||||
|
<result column="level_id" property="levelId"/>
|
||||||
|
<result column="grade_id" property="gradeId"/>
|
||||||
|
<result column="sequence_id" property="sequenceId"/>
|
||||||
|
<result column="post_id" property="postId"/>
|
||||||
|
<result column="post_info_id" property="postInfoId"/>
|
||||||
|
<result column="company_id" property="companyId"/>
|
||||||
|
<result column="department_id" property="departmentId"/>
|
||||||
|
<result column="job_id" property="jobId"/>
|
||||||
|
<result column="creator" property="creator"/>
|
||||||
|
<result column="delete_type" property="deleteType"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 表字段 -->
|
||||||
|
<sql id="baseColumns">
|
||||||
|
t
|
||||||
|
.
|
||||||
|
id
|
||||||
|
, t.scheme_id
|
||||||
|
, t.level_id
|
||||||
|
, t.grade_id
|
||||||
|
, t.sequence_id
|
||||||
|
, t.post_id
|
||||||
|
, t.post_info_id
|
||||||
|
, t.company_id
|
||||||
|
, t.department_id
|
||||||
|
, t.job_id
|
||||||
|
, t.creator
|
||||||
|
, t.delete_type
|
||||||
|
, t.create_time
|
||||||
|
, t.update_time
|
||||||
|
</sql>
|
||||||
|
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.hrmresource.po.HrmRelationPO"
|
||||||
|
keyProperty="id"
|
||||||
|
keyColumn="id" useGeneratedKeys="true">
|
||||||
|
INSERT INTO jcl_org_hrmrelation
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="creator != null">
|
||||||
|
creator,
|
||||||
|
</if>
|
||||||
|
<if test="deleteType != null">
|
||||||
|
delete_type,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
<if test="id != null ">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="schemeId != null ">
|
||||||
|
scheme_id,
|
||||||
|
</if>
|
||||||
|
<if test="levelId != null ">
|
||||||
|
level_id,
|
||||||
|
</if>
|
||||||
|
<if test="gradeId != null ">
|
||||||
|
grade_id,
|
||||||
|
</if>
|
||||||
|
<if test="sequenceId != null ">
|
||||||
|
sequence_id,
|
||||||
|
</if>
|
||||||
|
<if test="postId != null ">
|
||||||
|
post_id,
|
||||||
|
</if>
|
||||||
|
<if test="postInfoId != null ">
|
||||||
|
post_info_id,
|
||||||
|
</if>
|
||||||
|
<if test="companyId != null ">
|
||||||
|
company_id,
|
||||||
|
</if>
|
||||||
|
<if test="departmentId != null ">
|
||||||
|
department_id,
|
||||||
|
</if>
|
||||||
|
<if test="jobId != null ">
|
||||||
|
job_id,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="creator != null">
|
||||||
|
#{creator},
|
||||||
|
</if>
|
||||||
|
<if test="deleteType != null">
|
||||||
|
#{deleteType},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
<if test="id != null">
|
||||||
|
#{id},
|
||||||
|
</if>
|
||||||
|
<if test="schemeId != null">
|
||||||
|
#{schemeId},
|
||||||
|
</if>
|
||||||
|
<if test="levelId != null">
|
||||||
|
#{levelId},
|
||||||
|
</if>
|
||||||
|
<if test="gradeId != null">
|
||||||
|
#{gradeId},
|
||||||
|
</if>
|
||||||
|
<if test="sequenceId != null">
|
||||||
|
#{sequenceId},
|
||||||
|
</if>
|
||||||
|
<if test="postId != null">
|
||||||
|
#{postId},
|
||||||
|
</if>
|
||||||
|
<if test="postInfoId != null">
|
||||||
|
#{postInfoId},
|
||||||
|
</if>
|
||||||
|
<if test="companyId != null">
|
||||||
|
#{companyId},
|
||||||
|
</if>
|
||||||
|
<if test="departmentId != null">
|
||||||
|
#{departmentId},
|
||||||
|
</if>
|
||||||
|
<if test="jobId != null">
|
||||||
|
#{jobId},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateHrmRelation" parameterType="com.engine.organization.entity.hrmresource.po.HrmRelationPO">
|
||||||
|
update jcl_org_hrmrelation
|
||||||
|
<set>
|
||||||
|
update_time=#{updateTime},
|
||||||
|
scheme_id=#{schemeId},
|
||||||
|
level_id=#{levelId},
|
||||||
|
grade_id=#{gradeId},
|
||||||
|
sequence_id=#{sequenceId},
|
||||||
|
post_id=#{postId},
|
||||||
|
post_info_id=#{postInfoId},
|
||||||
|
company_id=#{companyId},
|
||||||
|
department_id=#{departmentId},
|
||||||
|
job_id=#{jobId},
|
||||||
|
</set>
|
||||||
|
WHERE id = #{id} AND delete_type = 0
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="getRelationById" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="baseColumns"/>
|
||||||
|
from jcl_org_hrmrelation t where delete_type = 0
|
||||||
|
AND id =#{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,45 @@
|
|||||||
|
<?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.hrmresource.HrmResourceMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.hrmresource.po.HrmResourcePO">
|
||||||
|
<result column="id" property="id"/>
|
||||||
|
<result column="creator" property="creator"/>
|
||||||
|
<result column="delete_type" property="deleteType"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 表字段 -->
|
||||||
|
<sql id="baseColumns">
|
||||||
|
t
|
||||||
|
.
|
||||||
|
id
|
||||||
|
, t.creator
|
||||||
|
, t.delete_type
|
||||||
|
, t.create_time
|
||||||
|
, t.update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="getMaxId" resultType="java.lang.Long">
|
||||||
|
select max(id)
|
||||||
|
from jcl_org_hrmresource
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getLastNameById" resultType="java.lang.String">
|
||||||
|
select last_name
|
||||||
|
from jcl_org_hrmresource
|
||||||
|
where delete_type = 0
|
||||||
|
and id = #{id}
|
||||||
|
</select>
|
||||||
|
<select id="getIdByKeyField" resultType="java.lang.Integer">
|
||||||
|
select id
|
||||||
|
from jcl_org_hrmresource
|
||||||
|
where delete_type = 0
|
||||||
|
and ${keyField} = #{keyFieldValue}
|
||||||
|
</select>
|
||||||
|
<select id="getKeyMapByKetField" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
select id, account_type, certificate_num, login_id, work_code, ${keyField}
|
||||||
|
from jcl_org_hrmresource
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.engine.organization.mapper.hrmresource;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/06/30
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface SystemDataMapper {
|
||||||
|
|
||||||
|
JSONObject getSysLanguageByLicense();
|
||||||
|
|
||||||
|
List<JSONObject> getSysLanguageByActivable();
|
||||||
|
|
||||||
|
List<JSONObject> getHrmEducationLevelData();
|
||||||
|
|
||||||
|
List<JSONObject> getHrmJobCallData();
|
||||||
|
|
||||||
|
List<JSONObject> getHrmLocationsByCountryId();
|
||||||
|
|
||||||
|
List<JSONObject> getHrmUseKindData();
|
||||||
|
|
||||||
|
String getScCompanyNameById(@Param("companyId") String companyId);
|
||||||
|
|
||||||
|
String getScDepartmentNameById(@Param("departmentId") String departmentId);
|
||||||
|
|
||||||
|
String getScHrmResourceNameById(@Param("managerId") String managerId);
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
<?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.hrmresource.SystemDataMapper">
|
||||||
|
|
||||||
|
<select id="getSysLanguageByLicense" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
select multilanguage, (select id from syslanguage where language='简体中文' or language='中文') as cnLanguageId
|
||||||
|
from license
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getSysLanguageByActivable" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
select id, language
|
||||||
|
from syslanguage
|
||||||
|
where activable = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getHrmEducationLevelData" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
select id, name
|
||||||
|
from HrmEducationLevel
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getHrmJobCallData" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
select id, name
|
||||||
|
from HrmJobCall
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getHrmLocationsByCountryId" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
select id, locationname
|
||||||
|
from HrmLocations
|
||||||
|
where countryid = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getHrmUseKindData" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
select id, name
|
||||||
|
from HrmUseKind
|
||||||
|
</select>
|
||||||
|
<select id="getScCompanyNameById" resultType="java.lang.String">
|
||||||
|
select subcompanyname
|
||||||
|
from hrmsubcompany
|
||||||
|
where id = #{companyId}
|
||||||
|
</select>
|
||||||
|
<select id="getScDepartmentNameById" resultType="java.lang.String">
|
||||||
|
select departmentname
|
||||||
|
from hrmdepartment
|
||||||
|
where id = #{departmentId}
|
||||||
|
</select>
|
||||||
|
<select id="getScHrmResourceNameById" resultType="java.lang.String">
|
||||||
|
select lastname
|
||||||
|
from hrmresource
|
||||||
|
where id = #{managerId}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.engine.organization.mapper.resource;
|
||||||
|
|
||||||
|
|
||||||
|
import com.engine.organization.entity.hrmresource.vo.HrmResourceVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description:
|
||||||
|
* @Date 2022/6/28
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public interface ResourceMapper {
|
||||||
|
|
||||||
|
List<HrmResourceVO> listAll(@Param("ids")List<Long> ids);
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
<?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.resource.ResourceMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.hrmresource.po.HrmResourcePO">
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 表字段 -->
|
||||||
|
<sql id="baseColumns">
|
||||||
|
id,last_name,department_id,company_id,mobile,telephone,manager_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="listAll" resultType="com.engine.organization.entity.hrmresource.vo.HrmResourceVO">
|
||||||
|
SELECT t.last_name as lastName,d.dept_name as departmentName,
|
||||||
|
c.comp_name as companyName,t.mobile,t.telephone,t1.last_name as managerName
|
||||||
|
from jcl_org_hrmresource t
|
||||||
|
left join JCL_ORG_DEPT d on t.department_id = d.id
|
||||||
|
left join jcl_org_comp c on t.company_id = c.id
|
||||||
|
left join jcl_org_hrmresource t1 on t.manager_id = t1.id
|
||||||
|
where 1 = 1
|
||||||
|
<if test="ids != null and ids.size > 0" >
|
||||||
|
AND t.id IN
|
||||||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!--<include refid="likeSql"/>-->
|
||||||
|
<!--<if test="param.departmentId != null and param.departmentId != ''">-->
|
||||||
|
<!--and t.department_id = #{param.departmentId}-->
|
||||||
|
<!--</if>-->
|
||||||
|
<!--<if test="param.companyId != null and param.companyId != ''">-->
|
||||||
|
<!--and t.company_id = #{param.companyId}-->
|
||||||
|
<!--</if>-->
|
||||||
|
<!--<if test="param.mobile != null and param.mobile != ''">-->
|
||||||
|
<!--and t.mobile = #{param.mobile}-->
|
||||||
|
<!--</if>-->
|
||||||
|
<!--<if test="param.telephone != null and param.telephone != ''">-->
|
||||||
|
<!--and t.telephone = #{param.telephone}-->
|
||||||
|
<!--</if>-->
|
||||||
|
<!--<if test="param.managerId != null and param.managerId != ''">-->
|
||||||
|
<!--and t.manager_id = #{param.managerId}-->
|
||||||
|
<!--</if>-->
|
||||||
|
<!--<if test="param.mobileCall != null and param.mobileCall != ''">-->
|
||||||
|
<!--and t.mobile_call = #{param.mobileCall}-->
|
||||||
|
<!--</if>-->
|
||||||
|
<!--<if test="param.jobTitle != null and param.jobTitle != ''">-->
|
||||||
|
<!--and t.job_title = #{param.jobTitle}-->
|
||||||
|
<!--</if>-->
|
||||||
|
order by t.id asc;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<sql id="likeSql">
|
||||||
|
<if test="param.lastName != null and param.lastName != ''">
|
||||||
|
AND t.last_name like CONCAT('%',#{param.lastName},'%')
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
<sql id="likeSql" databaseId="oracle">
|
||||||
|
<if test="param.lastName != null and param.lastName != ''">
|
||||||
|
AND t.last_name like '%'||#{param.lastName}||'%'
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
<sql id="likeSql" databaseId="sqlserver">
|
||||||
|
<if test="param.lastName != null and param.lastName != ''">
|
||||||
|
AND t.last_name like '%'+#{param.lastName}+'%'
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
@ -1,4 +1,4 @@
|
|||||||
package com.engine.organization.mapper.SISLog;
|
package com.engine.organization.mapper.sislog;
|
||||||
|
|
||||||
import com.engine.organization.entity.LoggerContext;
|
import com.engine.organization.entity.LoggerContext;
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.engine.organization.service;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description:
|
||||||
|
* @Date 2022/6/28
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public interface ExportCommonService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员导出
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
XSSFWorkbook resourceExport(List<Long> ids);
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.engine.organization.service;
|
||||||
|
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/06/29
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface ImportCommonService {
|
||||||
|
/**
|
||||||
|
* 人员导入
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> saveImportResource(Map<String, Object> params, HttpServletRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用导入
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> saveImport(Map<String, Object> params, HttpServletRequest request, User user);
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.engine.organization.service;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.logview.param.LogViewSearchParam;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/05
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface LogViewService {
|
||||||
|
/**
|
||||||
|
* 日志列表
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> listPage(LogViewSearchParam param);
|
||||||
|
|
||||||
|
Map<String, Object> getSearchCondition();
|
||||||
|
|
||||||
|
String showDetailById(Long id);
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.engine.organization.service;
|
||||||
|
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @className: OrgChartService
|
||||||
|
* @author: dengjp
|
||||||
|
* @date: 2022/7/7
|
||||||
|
* @description: 组织架构图Service
|
||||||
|
**/
|
||||||
|
public interface OrgChartService {
|
||||||
|
Map<String, Object> getOptionCondition(Map<String, Object> request2Map, User user);
|
||||||
|
|
||||||
|
Map<String, Object> getCompanyData(Map<String, Object> request2Map, User user);
|
||||||
|
|
||||||
|
Map<String, Object> getUserData(Map<String, Object> request2Map, User user);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.engine.organization.service.impl;
|
||||||
|
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
|
||||||
|
import com.engine.organization.entity.hrmresource.vo.HrmResourceVO;
|
||||||
|
import com.engine.organization.mapper.resource.ResourceMapper;
|
||||||
|
import com.engine.organization.service.ExportCommonService;
|
||||||
|
import com.engine.organization.util.HrmI18nUtil;
|
||||||
|
import com.engine.organization.util.db.MapperProxyFactory;
|
||||||
|
import com.engine.organization.util.excel.ExcelUtil;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description:
|
||||||
|
* @Date 2022/6/28
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public class ExportCommonServiceImpl extends Service implements ExportCommonService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public XSSFWorkbook resourceExport(List<Long> ids) {
|
||||||
|
|
||||||
|
List<HrmResourceVO> hrmResourceVOS = MapperProxyFactory.getProxy(ResourceMapper.class).listAll(ids);
|
||||||
|
if (hrmResourceVOS == null) {
|
||||||
|
hrmResourceVOS = new ArrayList<>();
|
||||||
|
}
|
||||||
|
// 1.工作簿名称
|
||||||
|
String sheetName = HrmI18nUtil.getI18nLabel(85368, "人员档案数据");
|
||||||
|
// 2.表头(后面动态获取)
|
||||||
|
List<List<Object>> excelSheetData = new ArrayList<>();
|
||||||
|
|
||||||
|
String[] header = {
|
||||||
|
HrmI18nUtil.getI18nLabel( 93270, "姓名"),
|
||||||
|
HrmI18nUtil.getI18nLabel( 93272, "部门"),
|
||||||
|
HrmI18nUtil.getI18nLabel( 93274, "分部"),
|
||||||
|
HrmI18nUtil.getI18nLabel( 93275, "移动电话"),
|
||||||
|
HrmI18nUtil.getI18nLabel( 93278, "办公室电话"),
|
||||||
|
HrmI18nUtil.getI18nLabel( 93279, "直接上级")};
|
||||||
|
excelSheetData.add(Arrays.asList(header));
|
||||||
|
|
||||||
|
//数据
|
||||||
|
List<List<Object>> rows = new LinkedList<>();
|
||||||
|
for (HrmResourceVO vo : hrmResourceVOS) {
|
||||||
|
List<Object> row = new LinkedList<>();
|
||||||
|
row.add(vo.getLastName());
|
||||||
|
row.add(vo.getDepartmentName());
|
||||||
|
row.add(vo.getCompanyName());
|
||||||
|
row.add(vo.getMobile());
|
||||||
|
row.add(vo.getTelephone());
|
||||||
|
row.add(vo.getManagerName());
|
||||||
|
rows.add(row);
|
||||||
|
}
|
||||||
|
excelSheetData.addAll(rows);
|
||||||
|
return ExcelUtil.genWorkbookV2(excelSheetData, sheetName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.engine.organization.service.impl;
|
||||||
|
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.organization.entity.hrmresource.param.HrmResourceImportParam;
|
||||||
|
import com.engine.organization.service.ImportCommonService;
|
||||||
|
import com.engine.organization.util.saveimport.HrmResourceImportAdaptUtil;
|
||||||
|
import com.engine.organization.util.saveimport.HrmResourceImportProcessUtil;
|
||||||
|
import com.engine.organization.util.saveimport.SaveImportProcessUtil;
|
||||||
|
import weaver.file.FileUploadToPath;
|
||||||
|
import weaver.general.BaseBean;
|
||||||
|
import weaver.general.Util;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
import weaver.systeminfo.SystemEnv;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/06/29
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class ImportCommonServiceImpl extends Service implements ImportCommonService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> saveImportResource(Map<String, Object> params, HttpServletRequest request) {
|
||||||
|
|
||||||
|
Map<String, Object> returnMap = new HashMap<>();
|
||||||
|
try {
|
||||||
|
String keyField = (String) params.get("keyField");
|
||||||
|
switch (keyField) {
|
||||||
|
case "workcode":
|
||||||
|
params.put("keyField","work_code");
|
||||||
|
break;
|
||||||
|
case "lastname":
|
||||||
|
params.put("keyField","last_name");
|
||||||
|
break;
|
||||||
|
case "loginid":
|
||||||
|
params.put("keyField","login_id");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
/*综合考虑多数据源后,实现通过配置文件配置适配器和解析类*/
|
||||||
|
List<Object> lsErrorInfo = new ArrayList<>();
|
||||||
|
HrmResourceImportAdaptUtil importAdaptUtil = new HrmResourceImportAdaptUtil();
|
||||||
|
FileUploadToPath fu = new FileUploadToPath(request);
|
||||||
|
int language = this.user.getLanguage();
|
||||||
|
importAdaptUtil.setUserlanguage(language);
|
||||||
|
List<String> errorInfo = importAdaptUtil.creatImportMap(fu);
|
||||||
|
//如果读取数据和验证模板没有发生错误
|
||||||
|
if (errorInfo.isEmpty()) {
|
||||||
|
Map<String, HrmResourceImportParam> hrMap = importAdaptUtil.getHrmImportMap();
|
||||||
|
HrmResourceImportProcessUtil importProcessUtil = new HrmResourceImportProcessUtil();
|
||||||
|
importProcessUtil.init(request);
|
||||||
|
importProcessUtil.processMap(hrMap);
|
||||||
|
} else {
|
||||||
|
Map<String, Object> error;
|
||||||
|
for (String s : errorInfo) {
|
||||||
|
error = new HashMap<>();
|
||||||
|
error.put("message", Util.null2String(s));
|
||||||
|
lsErrorInfo.add(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
returnMap.put("errorInfo", lsErrorInfo);
|
||||||
|
returnMap.put("status", "1");
|
||||||
|
} catch (Exception e) {
|
||||||
|
returnMap.put("status", "-1");
|
||||||
|
returnMap.put("message", e.getMessage());
|
||||||
|
}
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> saveImport(Map<String, Object> params, HttpServletRequest request, User user) {
|
||||||
|
Map<String, Object> returnMap = new HashMap<>();
|
||||||
|
request.getSession(true).setAttribute("importBaseCreater", user);
|
||||||
|
try {
|
||||||
|
List<Object> lsErrorInfo = new ArrayList<>();
|
||||||
|
SaveImportProcessUtil importProcessUtil = new SaveImportProcessUtil();
|
||||||
|
List<String> errorInfo = importProcessUtil.importXls(request);
|
||||||
|
if (errorInfo != null && !errorInfo.isEmpty()) {
|
||||||
|
Map<String, Object> error;
|
||||||
|
for (String s : errorInfo) {
|
||||||
|
error = new HashMap<>();
|
||||||
|
error.put("message", Util.null2String(s));
|
||||||
|
lsErrorInfo.add(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
returnMap.put("errorInfo", lsErrorInfo);
|
||||||
|
returnMap.put("status", "1");
|
||||||
|
returnMap.put("message", SystemEnv.getHtmlLabelName(24645, user.getLanguage()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
new BaseBean().writeLog("导入基础数据失败:" + e);
|
||||||
|
returnMap.put("status", "-1");
|
||||||
|
returnMap.put("message", e.getMessage());
|
||||||
|
}
|
||||||
|
returnMap.put("pid", request.getSession(true).getAttribute("importExcelPid"));
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,124 @@
|
|||||||
|
package com.engine.organization.service.impl;
|
||||||
|
|
||||||
|
import com.api.browser.bean.SearchConditionGroup;
|
||||||
|
import com.api.browser.bean.SearchConditionItem;
|
||||||
|
import com.api.browser.bean.SearchConditionOption;
|
||||||
|
import com.api.browser.util.ConditionType;
|
||||||
|
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.email.util.EmailCommonCondition;
|
||||||
|
import com.engine.email.util.EmailConditionItem;
|
||||||
|
import com.engine.organization.component.OrganizationWeaTable;
|
||||||
|
import com.engine.organization.entity.logview.param.LogViewSearchParam;
|
||||||
|
import com.engine.organization.entity.logview.vo.LogViewVO;
|
||||||
|
import com.engine.organization.service.LogViewService;
|
||||||
|
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import weaver.general.TimeUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/05
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class LogViewServiceImpl extends Service implements LogViewService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> listPage(LogViewSearchParam param) {
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
OrganizationWeaTable<LogViewVO> table = new OrganizationWeaTable<>(user, LogViewVO.class);
|
||||||
|
String sqlWhere = buildSqlWhere(param);
|
||||||
|
table.setSqlwhere(sqlWhere);
|
||||||
|
WeaResultMsg result = new WeaResultMsg(false);
|
||||||
|
result.putAll(table.makeDataResult());
|
||||||
|
result.success();
|
||||||
|
resultMap.putAll(result.getResultMap());
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getSearchCondition() {
|
||||||
|
Map<String, Object> apiDatas = new HashMap<>();
|
||||||
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||||
|
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||||
|
|
||||||
|
// 操作者
|
||||||
|
SearchConditionItem operatorId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者", "1", "operatorId", "");
|
||||||
|
//操作时间
|
||||||
|
SearchConditionItem dateItem = OrganizationFormItemUtil.dateItem(user,2,16,true,2,"操作时间","operateDate");
|
||||||
|
|
||||||
|
// 操作者部门
|
||||||
|
SearchConditionItem departmentId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者部门", "161", "departmentId", "deptBrowser");
|
||||||
|
// 操作者分部
|
||||||
|
SearchConditionItem companyId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者分部", "161", "companyId", "compBrowser");
|
||||||
|
|
||||||
|
conditionItems.add(operatorId);
|
||||||
|
conditionItems.add(dateItem);
|
||||||
|
conditionItems.add(departmentId);
|
||||||
|
conditionItems.add(companyId);
|
||||||
|
|
||||||
|
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
||||||
|
apiDatas.put("conditions", addGroups);
|
||||||
|
return apiDatas;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String showDetailById(Long id) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static class DateGroupData {
|
||||||
|
private String name;
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
public DateGroupData(String name, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private String buildSqlWhere(LogViewSearchParam param) {
|
||||||
|
if (null == param) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String sqlWhere = " where delete_type = 0 ";
|
||||||
|
if (StringUtils.isNotBlank(param.getModuleType())) {
|
||||||
|
sqlWhere += " and operate_module = '" + param.getModuleType() + "'";
|
||||||
|
}
|
||||||
|
if (null != param.getOperatorId()) {
|
||||||
|
sqlWhere += " and operator_id = '" + param.getOperatorId() + "'";
|
||||||
|
}
|
||||||
|
if (null != param.getCompanyId()) {
|
||||||
|
sqlWhere += " and operator_id in (select id from hrmresource where subcompanyid1 = '" + param.getCompanyId() + "')";
|
||||||
|
}
|
||||||
|
if (null != param.getDepartmentId()) {
|
||||||
|
sqlWhere += " and operator_id in (select id from hrmresource where departmentid = '" + param.getDepartmentId() + "')";
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(param.getOperateDate()) && !"-1".equals(param.getOperateDate())) {
|
||||||
|
if (!"6".equals(param.getOperateDate())) {
|
||||||
|
sqlWhere += " and create_time >= '" + TimeUtil.getDateByOption(param.getOperateDate() + "", "0") + " 00:00:00'";
|
||||||
|
sqlWhere += " and create_time <= '" + TimeUtil.getDateByOption(param.getOperateDate() + "", "") + " 23:59:59'";
|
||||||
|
} else {
|
||||||
|
if (StringUtils.isNotBlank(param.getStartDate())) {
|
||||||
|
sqlWhere += " and create_time >= '" + param.getStartDate() + "'";
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(param.getEndDate())) {
|
||||||
|
sqlWhere += " and create_time <= '" + param.getEndDate() + "'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sqlWhere;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,249 @@
|
|||||||
|
package com.engine.organization.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateField;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.organization.service.OrgChartService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @className: OrgChartServiceImpl
|
||||||
|
* @author: dengjp
|
||||||
|
* @date: 2022/7/7
|
||||||
|
* @description: 组织架构图ServiceImpl
|
||||||
|
**/
|
||||||
|
public class OrgChartServiceImpl extends Service implements OrgChartService {
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getOptionCondition(Map<String, Object> request2Map, User user) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
String type = (String) request2Map.get("type");
|
||||||
|
rs.executeQuery("select id, companyname from HrmCompanyVirtual order by id");
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
List<Map<String, Object>> fclasslist = new ArrayList<>();
|
||||||
|
Map<String, Object> defaultItem = new HashMap<>();
|
||||||
|
defaultItem.put("id", "0");
|
||||||
|
defaultItem.put("companyname", "行政维度");
|
||||||
|
fclasslist.add(defaultItem);
|
||||||
|
while(rs.next()) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
item.put("id", rs.getString("id"));
|
||||||
|
item.put("companyname", rs.getString("companyname"));
|
||||||
|
fclasslist.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
rs.executeQuery("select id, fnumber, fname from jcl_org_map " +("company".equals(type) ? "where ftype in (0, 1, 2)" : "") +" order by ftype , id ");
|
||||||
|
List<Map<String, Object>> companylist = new ArrayList<>();
|
||||||
|
Map<String, Object> defaultCompanyItem = new HashMap<>();
|
||||||
|
defaultCompanyItem.put("id", "0");
|
||||||
|
defaultCompanyItem.put("fname", "集团");
|
||||||
|
companylist.add(defaultCompanyItem);
|
||||||
|
while(rs.next()) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
item.put("id", rs.getString("id"));
|
||||||
|
item.put("fnumber", rs.getString("fnumber"));
|
||||||
|
item.put("fname", rs.getString("fname"));
|
||||||
|
companylist.add(item);
|
||||||
|
}
|
||||||
|
result.put("api_status", true);
|
||||||
|
result.put("fclasslist", fclasslist);
|
||||||
|
result.put("companylist", companylist);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getCompanyData(Map<String, Object> request2Map, User user) {
|
||||||
|
String date = (String) request2Map.get("date"); // 数据日期
|
||||||
|
if(StringUtils.isBlank(date)) {
|
||||||
|
date = DateUtil.format( DateUtil.offset(new Date() , DateField.DAY_OF_MONTH, 1), "yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
|
||||||
|
String fclass = (String) request2Map.get("fclass"); // 维度
|
||||||
|
String root = (String) request2Map.get("root"); // 根节点
|
||||||
|
String level = (String) request2Map.get("level"); // 显示层级
|
||||||
|
if(StringUtils.isBlank(level)) {
|
||||||
|
level = "3";
|
||||||
|
}
|
||||||
|
|
||||||
|
String fisvitual = (String) request2Map.get("fisvitual"); // 是否显示虚拟组织
|
||||||
|
if(StringUtils.isBlank(fisvitual)) {
|
||||||
|
fisvitual = "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
String whereSql = " where 1 = 1 ";
|
||||||
|
whereSql += " and (fdatebegin <= '"+ date +"' and fdateend >= '"+ date +"') or (fdatebegin <= '"+ date +"' and fdateend is null ) ";
|
||||||
|
whereSql += " and fclass = " + fclass +" ";
|
||||||
|
|
||||||
|
if("0".equals(fisvitual)) {
|
||||||
|
whereSql += " and fisvitual = 0 ";
|
||||||
|
}else {
|
||||||
|
whereSql += " and fisvitual in (0, 1) ";
|
||||||
|
}
|
||||||
|
|
||||||
|
String whereItemSql = " ";
|
||||||
|
if("0".equals(root)) { // 集团的情况
|
||||||
|
whereItemSql += " and ftype = 0 ";
|
||||||
|
} else {
|
||||||
|
whereItemSql += " and id = '" + root +"' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取根节点
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select id, fname, ftype, fparentid from jcl_org_map " + whereSql + whereItemSql);
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
String id = null;
|
||||||
|
if(rs.next()) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
id = rs.getString("id");
|
||||||
|
item.put("id", rs.getString("id"));
|
||||||
|
item.put("fname", rs.getString("fname"));
|
||||||
|
item.put("ftype", rs.getString("ftype"));
|
||||||
|
item.put("parentId", null);
|
||||||
|
list.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
int currentLevel = 1;
|
||||||
|
if(currentLevel + 1 <= Integer.parseInt(level)) {
|
||||||
|
findCompanyItemByParantId(id, currentLevel + 1, level, rs, list, whereSql);
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("api_status", true);
|
||||||
|
result.put("data", list);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findCompanyItemByParantId(String id, int currentLevel, String level, RecordSet rs, List<Map<String, Object>> list, String whereSql) {
|
||||||
|
rs.executeQuery("select id, fname, ftype, fparentid from jcl_org_map " + whereSql + " and fparentid = " + id);
|
||||||
|
List<Map<String, Object>> currentList = new ArrayList<>();
|
||||||
|
while(rs.next()) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
item.put("id", rs.getString("id"));
|
||||||
|
item.put("fname", rs.getString("fname"));
|
||||||
|
item.put("ftype", rs.getString("ftype"));
|
||||||
|
item.put("parentId", rs.getString("fparentid"));
|
||||||
|
currentList.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
list.addAll(currentList);
|
||||||
|
|
||||||
|
for (Map<String, Object> stringObjectMap : currentList) {
|
||||||
|
if(currentLevel + 1 <= Integer.parseInt(level)) {
|
||||||
|
findCompanyItemByParantId((String) stringObjectMap.get("id"), currentLevel + 1, level, rs, list, whereSql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getUserData(Map<String, Object> request2Map, User user) {
|
||||||
|
String date = (String) request2Map.get("date"); // 数据日期
|
||||||
|
if(StringUtils.isBlank(date)) {
|
||||||
|
date = DateUtil.format( DateUtil.offset(new Date() , DateField.DAY_OF_MONTH, 1), "yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
|
||||||
|
String fclass = (String) request2Map.get("fclass"); // 维度
|
||||||
|
String root = (String) request2Map.get("root"); // 根节点
|
||||||
|
String level = (String) request2Map.get("level"); // 显示层级
|
||||||
|
if(StringUtils.isBlank(level)) {
|
||||||
|
level = "3";
|
||||||
|
}
|
||||||
|
|
||||||
|
String fisvitual = (String) request2Map.get("fisvitual"); // 是否显示虚拟组织
|
||||||
|
if(StringUtils.isBlank(fisvitual)) {
|
||||||
|
fisvitual = "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
String whereSql = " where 1 = 1 ";
|
||||||
|
whereSql += " and (t.fdatebegin <= '"+ date +"' and t.fdateend >= '"+ date +"') or (t.fdatebegin <= '"+ date +"' and t.fdateend is null ) ";
|
||||||
|
whereSql += " and t.fclass = " + fclass +" ";
|
||||||
|
|
||||||
|
if("0".equals(fisvitual)) {
|
||||||
|
whereSql += " and t.fisvitual = 0 ";
|
||||||
|
}else {
|
||||||
|
whereSql += " and t.fisvitual in (0, 1) ";
|
||||||
|
}
|
||||||
|
|
||||||
|
String whereItemSql = " ";
|
||||||
|
if("0".equals(root)) { // 集团的情况
|
||||||
|
whereItemSql += " and t.ftype = 0 ";
|
||||||
|
} else {
|
||||||
|
whereItemSql += " and t.id = '" + root +"' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取根节点
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select t.id, t.fname, t.ftype, t.fparentid, t.fleadername, t.fleaderimg, t.fleaderjob, t.fplan, t.fonjob from jcl_org_map t " + whereSql + whereItemSql);
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
String id = null;
|
||||||
|
if(rs.next()) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
id = rs.getString("id");
|
||||||
|
item.put("id", rs.getString("id"));
|
||||||
|
item.put("fname", rs.getString("fname"));
|
||||||
|
item.put("ftype", rs.getString("ftype"));
|
||||||
|
item.put("parentId", null);
|
||||||
|
item.put("fleadername", rs.getString("fleadername"));
|
||||||
|
item.put("fleaderimg", rs.getString("fleaderimg"));
|
||||||
|
item.put("fleaderjob", rs.getString("fleaderjob"));
|
||||||
|
item.put("fplan", rs.getString("fplan"));
|
||||||
|
item.put("fonjob", rs.getString("fonjob"));
|
||||||
|
list.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
int currentLevel = 1;
|
||||||
|
if(currentLevel + 1 <= Integer.parseInt(level)) {
|
||||||
|
findUserItemByParantId(id, currentLevel + 1, level, rs, list, whereSql);
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("api_status", true);
|
||||||
|
result.put("data", list);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findUserItemByParantId(String id, int currentLevel, String level, RecordSet rs, List<Map<String, Object>> list, String whereSql) {
|
||||||
|
rs.executeQuery("select t.id, t.fname, t.ftype, t.fparentid, t.fleadername, t.fleaderimg, t.fleaderjob, t.fplan, t.fonjob, t.fnumber from jcl_org_map t " + whereSql + " and t.fparentid = " + id);
|
||||||
|
List<Map<String, Object>> currentList = new ArrayList<>();
|
||||||
|
while(rs.next()) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
item.put("id", rs.getString("id"));
|
||||||
|
item.put("fname", rs.getString("fname"));
|
||||||
|
item.put("ftype", rs.getString("ftype"));
|
||||||
|
item.put("parentId", rs.getString("fparentid"));
|
||||||
|
item.put("fleadername", rs.getString("fleadername"));
|
||||||
|
item.put("fleaderimg", rs.getString("fleaderimg"));
|
||||||
|
item.put("fleaderjob", rs.getString("fleaderjob"));
|
||||||
|
item.put("fplan", rs.getString("fplan"));
|
||||||
|
item.put("fonjob", rs.getString("fonjob"));
|
||||||
|
item.put("fnumber", rs.getString("fnumber"));
|
||||||
|
currentList.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Map<String, Object> stringObjectMap : currentList) {
|
||||||
|
if("4".equals(stringObjectMap.get("ftype"))) { // 员工信息
|
||||||
|
rs.executeQuery("select id, mobile, homeaddress from hrmresource where id = ? ", stringObjectMap.get("fnumber"));
|
||||||
|
if(rs.next()) {
|
||||||
|
stringObjectMap.put("mobile", rs.getString("mobile"));
|
||||||
|
stringObjectMap.put("address", rs.getString("homeaddress"));
|
||||||
|
}
|
||||||
|
rs.executeQuery("select departmentname from hrmresource hrm \n" +
|
||||||
|
"left join hrmdepartment d\n" +
|
||||||
|
"on hrm.departmentid = d.id\n" +
|
||||||
|
"where hrm.id = ? ", stringObjectMap.get("fnumber"));
|
||||||
|
if(rs.next()) {
|
||||||
|
stringObjectMap.put("department", rs.getString("departmentname"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if(currentLevel + 1 <= Integer.parseInt(level)) {
|
||||||
|
findUserItemByParantId((String) stringObjectMap.get("id"), currentLevel + 1, level, rs, list, whereSql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
list.addAll(currentList);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
package com.engine.organization.transmethod;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
|
import com.engine.organization.enums.OperateTypeEnum;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/05
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class LogViewTransMethod {
|
||||||
|
|
||||||
|
public String getOperateType(String operateType) {
|
||||||
|
if (StringUtils.isNotBlank(operateType)) {
|
||||||
|
switch (operateType) {
|
||||||
|
case "1":
|
||||||
|
operateType = OperateTypeEnum.ADD.getLabel();
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
operateType = OperateTypeEnum.UPDATE.getLabel();
|
||||||
|
break;
|
||||||
|
case "4":
|
||||||
|
operateType = OperateTypeEnum.DELETE.getLabel();
|
||||||
|
break;
|
||||||
|
case "5":
|
||||||
|
operateType = OperateTypeEnum.MOVE.getLabel();
|
||||||
|
break;
|
||||||
|
case "6":
|
||||||
|
operateType = OperateTypeEnum.MERGE.getLabel();
|
||||||
|
break;
|
||||||
|
case "7":
|
||||||
|
operateType = OperateTypeEnum.COPY.getLabel();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return operateType;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDateTimeFormat(String dateTime) {
|
||||||
|
if (StringUtils.isNotBlank(dateTime)) {
|
||||||
|
dateTime = dateTime.substring(0,19);
|
||||||
|
}
|
||||||
|
return dateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getFormatJson(String jsonStr) {
|
||||||
|
if (StringUtils.isNotBlank(jsonStr)) {
|
||||||
|
try {
|
||||||
|
JSONObject object = JSONObject.parseObject(jsonStr);
|
||||||
|
jsonStr = JSON.toJSONString(object, SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue,
|
||||||
|
SerializerFeature.WriteDateUseDateFormat);
|
||||||
|
jsonStr= jsonStr.replace("\n","<br/>").replace("\t","    ");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return jsonStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return jsonStr;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.engine.organization.util;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.organization.entity.LoggerContext;
|
||||||
|
import com.engine.organization.entity.logview.bo.FieldBaseEquator;
|
||||||
|
import com.engine.organization.transmethod.LogViewTransMethod;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/07/04
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class OrganizationWrapper extends Service {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 记录操作日志
|
||||||
|
*
|
||||||
|
* @param clazz 调用类
|
||||||
|
* @param value 对象名称
|
||||||
|
* @param params 传参
|
||||||
|
* @param before 原始对象
|
||||||
|
* @param after 更新后对象
|
||||||
|
*/
|
||||||
|
public void writeOperateLog(Class clazz, String value, String params,
|
||||||
|
Object before, Object after) {
|
||||||
|
Method method = clazz.getEnclosingMethod();
|
||||||
|
LoggerContext loggerContext;
|
||||||
|
if (null != before) {
|
||||||
|
String formatJson = LogViewTransMethod.getFormatJson(params);
|
||||||
|
if (null != after) {
|
||||||
|
FieldBaseEquator fieldBaseEquator = new FieldBaseEquator();
|
||||||
|
List<String> diffFields = fieldBaseEquator.getDiffFields(before, after);
|
||||||
|
if (CollectionUtils.isEmpty(diffFields)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
StringBuilder message = new StringBuilder();
|
||||||
|
for (int i = 0; i < diffFields.size(); i++) {
|
||||||
|
message.append(i + 1).append(".").append(diffFields.get(i)).append("<br/>");
|
||||||
|
}
|
||||||
|
loggerContext = LoggerContext.builder().operatorId(user.getUID()).value(value).clientIp(user.getLoginip()).paramsStr(formatJson).operatorName(user.getLastname()).message(message.toString()).build();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
loggerContext = LoggerContext.builder().operatorId(user.getUID()).value(value).clientIp(user.getLoginip()).paramsStr(formatJson).operatorName(user.getLastname()).message(JSON.toJSONString(before)).build();
|
||||||
|
}
|
||||||
|
LogAspect logAspect = new LogAspect(clazz, method, loggerContext);
|
||||||
|
logAspect.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param clazz 调用类
|
||||||
|
* @param value 对象名称
|
||||||
|
* @param params 传参
|
||||||
|
* @param message 日志描述信息
|
||||||
|
*/
|
||||||
|
public void writeOperateLog(Class clazz, String value, String params,
|
||||||
|
String message) {
|
||||||
|
writeOperateLog(clazz, value, params, message, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.engine.organization.util.excel;
|
||||||
|
|
||||||
|
public enum BooleanEnum {
|
||||||
|
|
||||||
|
True0("是", Boolean.TRUE),
|
||||||
|
True1("Y", Boolean.TRUE),
|
||||||
|
True2("TRUE", Boolean.TRUE),
|
||||||
|
True3("1", Boolean.TRUE),
|
||||||
|
True4("YES", Boolean.TRUE),
|
||||||
|
True5("T", Boolean.TRUE),
|
||||||
|
False0("否", Boolean.FALSE),
|
||||||
|
False1("N", Boolean.FALSE),
|
||||||
|
False2("FALSE", Boolean.FALSE),
|
||||||
|
False3("0", Boolean.FALSE),
|
||||||
|
False4("NO", Boolean.FALSE),
|
||||||
|
False5("F", Boolean.FALSE);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private Boolean value;
|
||||||
|
|
||||||
|
private BooleanEnum(String name, Boolean value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(Boolean value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,111 @@
|
|||||||
|
package com.engine.organization.util.excel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注释
|
||||||
|
*/
|
||||||
|
public class ExcelComment {
|
||||||
|
int dx1 = 0;
|
||||||
|
int dy1 = 0;
|
||||||
|
int dx2 = 0;
|
||||||
|
int dy2 = 0;
|
||||||
|
int col1 = 0;
|
||||||
|
int row1 = 0;
|
||||||
|
int col2 = 0;
|
||||||
|
int row2 = 0;
|
||||||
|
String content;
|
||||||
|
|
||||||
|
public int getDx1() {
|
||||||
|
return dx1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDx1(int dx1) {
|
||||||
|
this.dx1 = dx1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDy1() {
|
||||||
|
return dy1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDy1(int dy1) {
|
||||||
|
this.dy1 = dy1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDx2() {
|
||||||
|
return dx2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDx2(int dx2) {
|
||||||
|
this.dx2 = dx2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDy2() {
|
||||||
|
return dy2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDy2(int dy2) {
|
||||||
|
this.dy2 = dy2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCol1() {
|
||||||
|
return col1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCol1(int col1) {
|
||||||
|
this.col1 = col1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRow1() {
|
||||||
|
return row1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRow1(int row1) {
|
||||||
|
this.row1 = row1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCol2() {
|
||||||
|
return col2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCol2(int col2) {
|
||||||
|
this.col2 = col2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRow2() {
|
||||||
|
return row2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRow2(int row2) {
|
||||||
|
this.row2 = row2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExcelComment(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2, String content) {
|
||||||
|
this.dx1 = dx1;
|
||||||
|
this.dy1 = dy1;
|
||||||
|
this.dx2 = dx2;
|
||||||
|
this.dy2 = dy2;
|
||||||
|
this.col1 = col1;
|
||||||
|
this.row1 = row1;
|
||||||
|
this.col2 = col2;
|
||||||
|
this.row2 = row2;
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExcelComment(int col1, int row1, int col2, int row2, String content) {
|
||||||
|
this.col1 = col1;
|
||||||
|
this.row1 = row1;
|
||||||
|
this.col2 = col2;
|
||||||
|
this.row2 = row2;
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExcelComment() {
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.engine.organization.util.excel;
|
||||||
|
import org.apache.commons.lang3.exception.ContextedRuntimeException;
|
||||||
|
|
||||||
|
public class ExcelParseException extends ContextedRuntimeException{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -8696742623977630854L;
|
||||||
|
|
||||||
|
public ExcelParseException(String message) {
|
||||||
|
super(message);
|
||||||
|
this.msgCode = DEFAULT_CODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExcelParseException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
this.msgCode = DEFAULT_CODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认异常编码
|
||||||
|
*/
|
||||||
|
private static final String DEFAULT_CODE = "EXCP0000";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常编码
|
||||||
|
*/
|
||||||
|
private String msgCode;
|
||||||
|
|
||||||
|
public String getMsgCode() {
|
||||||
|
return msgCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsgCode(String msgCode) {
|
||||||
|
this.msgCode = msgCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue