commit
15cccfaed4
@ -0,0 +1,13 @@
|
|||||||
|
package com.api.organization.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Path("/bs/hrmorganization/dept")
|
||||||
|
public class DepartmentController extends com.engine.organization.web.DepartmentController {
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.engine.organization.entity.comp.param;
|
||||||
|
|
||||||
|
import com.engine.organization.common.BaseQueryParam;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/16
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class CompSearchParam extends BaseQueryParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
private String compNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String compName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 简称
|
||||||
|
*/
|
||||||
|
private String compNameShort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上级公司
|
||||||
|
*/
|
||||||
|
private Long parentCompany;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构代码
|
||||||
|
*/
|
||||||
|
private String orgCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行业
|
||||||
|
*/
|
||||||
|
private Integer industry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private Integer compPrincipal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁用标记
|
||||||
|
*/
|
||||||
|
private Boolean forbiddenTag;
|
||||||
|
}
|
@ -0,0 +1,130 @@
|
|||||||
|
package com.engine.organization.entity.department.bo;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.department.dto.DepartmentListDTO;
|
||||||
|
import com.engine.organization.entity.department.param.DeptSearchParam;
|
||||||
|
import com.engine.organization.entity.department.po.DepartmentPO;
|
||||||
|
import com.engine.organization.entity.department.vo.SingleDeptTreeVO;
|
||||||
|
import com.engine.organization.mapper.department.DepartmentMapper;
|
||||||
|
import com.engine.organization.mapper.employee.EmployeeMapper;
|
||||||
|
import com.engine.organization.util.db.MapperProxyFactory;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public class DepartmentBO {
|
||||||
|
|
||||||
|
public static List<DepartmentListDTO> buildDeptDTOList(Collection<DepartmentPO> list, List<DepartmentPO> filterList) {
|
||||||
|
// 搜索结果为空,直接返回空
|
||||||
|
if (CollectionUtils.isEmpty(filterList)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
// 递归添加父级数据
|
||||||
|
Map<Long, DepartmentPO> poMaps = list.stream().collect(Collectors.toMap(item -> item.getId(), item -> item));
|
||||||
|
List<DepartmentPO> addedList = new ArrayList<>();
|
||||||
|
for (DepartmentPO po : filterList) {
|
||||||
|
dealParentData(addedList, po, poMaps);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<DepartmentListDTO> dtoList = addedList.stream().map(e -> DepartmentListDTO.builder()
|
||||||
|
.id(e.getId())
|
||||||
|
.deptNo(e.getDeptNo())
|
||||||
|
.deptName(e.getDeptName())
|
||||||
|
.deptNameShort(e.getDeptNameShort())
|
||||||
|
.parentComp(e.getParentComp() + "")// 命名
|
||||||
|
.parentDept(e.getParentDept())
|
||||||
|
.parentDeptName(null == poMaps.get(e.getParentDept()) ? "" : poMaps.get(e.getParentDept()).getDeptName())
|
||||||
|
.deptPrincipal(getEmployeeNameById((long) e.getDeptPrincipal()))
|
||||||
|
.showOrder(e.getShowOrder())
|
||||||
|
.forbiddenTag(e.getForbiddenTag())
|
||||||
|
.build()
|
||||||
|
).collect(Collectors.toList());
|
||||||
|
Map<Long, List<DepartmentListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentDept() && 0 != item.getParentDept()).collect(Collectors.groupingBy(DepartmentListDTO::getParentDept));
|
||||||
|
return dtoList.stream().map(e -> {
|
||||||
|
e.setChildren(collects.get(e.getId()));
|
||||||
|
return e;
|
||||||
|
}).filter(item -> null == item.getParentDept() || 0 == item.getParentDept()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DepartmentPO convertParamsToPO(DeptSearchParam param, Long employeeId) {
|
||||||
|
if (null == param) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return DepartmentPO.builder()
|
||||||
|
.id(param.getId() == null ? 0 : param.getId())
|
||||||
|
.deptNo(param.getDeptNo())
|
||||||
|
.deptName(param.getDeptName())
|
||||||
|
.deptNameShort(param.getDeptNameShort())
|
||||||
|
.parentComp(param.getParentComp())
|
||||||
|
.parentDept(param.getParentDept())
|
||||||
|
.deptPrincipal(param.getDeptPrincipal())
|
||||||
|
.showOrder(param.getShowOrder())
|
||||||
|
.forbiddenTag(param.getForbiddenTag() == null ? null : param.getForbiddenTag() ? 0 : 1)
|
||||||
|
.deleteType(0)
|
||||||
|
.createTime(new Date())
|
||||||
|
.updateTime(new Date())
|
||||||
|
.creator(employeeId).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<SingleDeptTreeVO> buildSingleDeptTreeVOS(List<DepartmentPO> departmentPOs,Long parentComp) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isEmpty(departmentPOs)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<SingleDeptTreeVO> singleDeptTreeVOS = departmentPOs.stream().map(e -> SingleDeptTreeVO.builder()
|
||||||
|
.id(e.getId())
|
||||||
|
.deptName(e.getDeptName())
|
||||||
|
.parentComp(e.getParentComp())
|
||||||
|
.parentDept(e.getParentDept())
|
||||||
|
.parentDeptName(e.getParentDept() == null ? "" : getDeptNameById(e.getParentDept().intValue()))
|
||||||
|
.deptPrincipalName(getEmployeeNameById((long) e.getDeptPrincipal()))
|
||||||
|
.build()
|
||||||
|
).collect(Collectors.toList());
|
||||||
|
//获取非一级部门
|
||||||
|
Map<Long, List<SingleDeptTreeVO>> collects = singleDeptTreeVOS.stream().filter(item -> !parentComp.equals(item.getParentComp()) && null != item.getParentDept()).collect(Collectors.groupingBy(SingleDeptTreeVO :: getParentDept));
|
||||||
|
|
||||||
|
return singleDeptTreeVOS.stream().map(e -> {
|
||||||
|
e.setChildren(collects.get(e.getId()));
|
||||||
|
return e;
|
||||||
|
}).filter(item -> parentComp.equals(item.getParentComp())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String getDeptNameById(Integer id) {
|
||||||
|
return MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptNameById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getEmployeeNameById(Long id) {
|
||||||
|
return MapperProxyFactory.getProxy(EmployeeMapper.class).getEmployeeNameById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归获取查询后数据的父级数据
|
||||||
|
*
|
||||||
|
* @param addedList
|
||||||
|
* @param po
|
||||||
|
* @param poMaps
|
||||||
|
*/
|
||||||
|
private static void dealParentData(List<DepartmentPO> addedList, DepartmentPO po, Map<Long, DepartmentPO> poMaps) {
|
||||||
|
if (!addedList.contains(po)) {
|
||||||
|
addedList.add(po);
|
||||||
|
}
|
||||||
|
DepartmentPO parentPO = poMaps.get(po.getParentDept());
|
||||||
|
if (null != parentPO) {
|
||||||
|
dealParentData(addedList, parentPO, poMaps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,98 @@
|
|||||||
|
package com.engine.organization.entity.department.dto;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.organization.annotation.OrganizationTable;
|
||||||
|
import com.engine.organization.annotation.OrganizationTableOperate;
|
||||||
|
import com.engine.organization.annotation.TableTitle;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/19
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@OrganizationTable(pageId = "96f2bb0d-da73-11ec-a0da-00ffcbed7508",
|
||||||
|
tableType = WeaTableType.NONE,
|
||||||
|
operates = {
|
||||||
|
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||||
|
@OrganizationTableOperate(index = "1", text = "删除"),
|
||||||
|
@OrganizationTableOperate(index = "2", text = "合并"),
|
||||||
|
@OrganizationTableOperate(index = "3", text = "转移"),
|
||||||
|
@OrganizationTableOperate(index = "4", text = "联查岗位"),
|
||||||
|
@OrganizationTableOperate(index = "4", text = "联查人员")
|
||||||
|
})
|
||||||
|
public class DepartmentListDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "编号", dataIndex = "deptNo", key = "deptNo")
|
||||||
|
private String deptNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "名称", dataIndex = "deptName", key = "deptName")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 简称
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "简称", dataIndex = "deptNameShort", key = "deptNameShort")
|
||||||
|
private String deptNameShort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属分部
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "所属分部", dataIndex = "parentComp", key = "parentComp")
|
||||||
|
private String parentComp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上级部门
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "上级部门", dataIndex = "parentDeptName", key = "parentDeptName")
|
||||||
|
private String parentDeptName;
|
||||||
|
|
||||||
|
private Long parentDept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门负责人
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "部门负责人", dataIndex = "deptPrincipal", key = "deptPrincipal")
|
||||||
|
private String deptPrincipal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder")
|
||||||
|
private int showOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "说明", dataIndex = "description", key = "description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁用标记
|
||||||
|
*/
|
||||||
|
@TableTitle(title = "禁用标记", dataIndex = "forbiddenTag", key = "forbiddenTag")
|
||||||
|
private int forbiddenTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子节点
|
||||||
|
*/
|
||||||
|
private List<DepartmentListDTO> children;
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.engine.organization.entity.department.param;
|
||||||
|
|
||||||
|
import com.engine.organization.common.BaseQueryParam;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/23
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DeptSearchParam extends BaseQueryParam {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String deptNo;
|
||||||
|
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
private String deptNameShort;
|
||||||
|
|
||||||
|
private Long parentComp;
|
||||||
|
|
||||||
|
private Long parentDept;
|
||||||
|
|
||||||
|
private Integer deptPrincipal;
|
||||||
|
|
||||||
|
private Integer showOrder;
|
||||||
|
|
||||||
|
private Boolean forbiddenTag;
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.engine.organization.entity.department.param;
|
||||||
|
|
||||||
|
import com.engine.organization.common.BaseQueryParam;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class QuerySingleDeptListParam extends BaseQueryParam {
|
||||||
|
|
||||||
|
private Long parentComp;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package com.engine.organization.entity.department.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/19
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DepartmentPO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String deptNo;
|
||||||
|
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
private String deptNameShort;
|
||||||
|
|
||||||
|
private Long parentComp;
|
||||||
|
|
||||||
|
private Long parentDept;
|
||||||
|
|
||||||
|
private Integer deptPrincipal; //部门负责人
|
||||||
|
|
||||||
|
private Integer showOrder;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
private Integer forbiddenTag;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
private int deleteType;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package com.engine.organization.entity.department.vo;
|
||||||
|
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||||
|
import com.engine.organization.annotation.OrganizationTable;
|
||||||
|
import com.engine.organization.annotation.TableTitle;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@OrganizationTable(pageId = "01b397a9-638b-4d58-89c7-4a1d17f98656",
|
||||||
|
tableType = WeaTableType.NONE)
|
||||||
|
public class SingleDeptTreeVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@TableTitle(title = "部门名称", dataIndex = "deptName", key = "deptName")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
private Long parentComp; //上级分部
|
||||||
|
|
||||||
|
private Long parentDept; //上级部门id
|
||||||
|
|
||||||
|
@TableTitle(title = "上级部门", dataIndex = "parentDeptName", key = "parentDeptName")
|
||||||
|
private String parentDeptName; //上级部门
|
||||||
|
|
||||||
|
@TableTitle(title = "部门负责人", dataIndex = "deptPrincipalName", key = "deptPrincipalName")
|
||||||
|
private String deptPrincipalName; //部门负责人
|
||||||
|
|
||||||
|
//子节点
|
||||||
|
private List<SingleDeptTreeVO> children;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.engine.organization.entity.employee;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class Employee {
|
||||||
|
|
||||||
|
private Long employeeId;
|
||||||
|
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
private Long departmentId;
|
||||||
|
|
||||||
|
//....
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,418 @@
|
|||||||
|
package com.engine.organization.entity.extend.bo;
|
||||||
|
|
||||||
|
import com.api.browser.bean.BrowserBean;
|
||||||
|
import com.api.browser.bean.BrowserValueInfo;
|
||||||
|
import com.api.browser.bean.SearchConditionItem;
|
||||||
|
import com.api.browser.service.BrowserValueInfoService;
|
||||||
|
import com.api.browser.util.BrowserInitUtil;
|
||||||
|
import com.api.browser.util.ConditionFactory;
|
||||||
|
import com.api.browser.util.ConditionType;
|
||||||
|
import com.api.hrm.bean.FieldItem;
|
||||||
|
import com.api.hrm.util.FieldType;
|
||||||
|
import com.api.hrm.util.ServiceUtil;
|
||||||
|
import com.engine.kq.cmd.shiftmanagement.toolkit.ShiftManagementToolKit;
|
||||||
|
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
||||||
|
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||||
|
import com.engine.sensitive.biz.SensitiveWordTypeComInfo;
|
||||||
|
import weaver.file.ImageFileManager;
|
||||||
|
import weaver.general.Util;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
import weaver.hrm.definedfield.HrmFieldManager;
|
||||||
|
import weaver.systeminfo.SystemEnv;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/19
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class ExtendInfoBO {
|
||||||
|
|
||||||
|
public static String DATE_SELECT = "select";
|
||||||
|
public static String DATE_FROM = "from";
|
||||||
|
public static String DATE_TO = "to";
|
||||||
|
public static String DATE_Time_FROM = "_start";
|
||||||
|
public static String DATE_Time_TO = "_end";
|
||||||
|
|
||||||
|
// 封装对象为table组件
|
||||||
|
public static List<Map<String, Object>> convertInfoListToTable(User user, List<ExtendInfoPO> infoPOList, int viewAttr, boolean showLabel) {
|
||||||
|
List<Map<String, Object>> lsCol = new ArrayList<Map<String, Object>>();
|
||||||
|
Map<String, Object> col = null;
|
||||||
|
|
||||||
|
int width = 100 / infoPOList.size();
|
||||||
|
for (int i = 0; infoPOList != null && i < infoPOList.size(); i++) {
|
||||||
|
ExtendInfoPO extendInfoPO = infoPOList.get(i);
|
||||||
|
String tmpkey = extendInfoPO.getFieldName();
|
||||||
|
col = new HashMap<String, Object>();
|
||||||
|
col.put("title", extendInfoPO.getFieldNameDesc());
|
||||||
|
|
||||||
|
col.put("key", tmpkey);
|
||||||
|
col.put("dataIndex", tmpkey);
|
||||||
|
col.put("com", getFieldDetialInfo(user, extendInfoPO, viewAttr, showLabel, width));
|
||||||
|
|
||||||
|
col.put("width", width + "%");
|
||||||
|
|
||||||
|
lsCol.add(col);
|
||||||
|
}
|
||||||
|
return lsCol;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 明细表字段
|
||||||
|
*
|
||||||
|
* @param user
|
||||||
|
* @param extendInfoPO
|
||||||
|
* @param viewAttr
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static List<FieldItem> getFieldDetialInfo(User user, ExtendInfoPO extendInfoPO, int viewAttr, boolean showLabel, int width) {
|
||||||
|
List<FieldItem> ls = new ArrayList<FieldItem>();
|
||||||
|
FieldItem fieldItem = createField(user, extendInfoPO, viewAttr, showLabel, width);
|
||||||
|
ls.add(fieldItem);
|
||||||
|
return ls;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建列表字段信息
|
||||||
|
*
|
||||||
|
* @param user
|
||||||
|
* @param extendInfoPO
|
||||||
|
* @param viewAttr
|
||||||
|
* @param showLabel
|
||||||
|
* @param width
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static FieldItem createField(User user, ExtendInfoPO extendInfoPO, int viewAttr, boolean showLabel, int width) {
|
||||||
|
FieldItem fieldItem = new FieldItem();
|
||||||
|
if (showLabel) {
|
||||||
|
fieldItem.setLabel(extendInfoPO.getFieldNameDesc());
|
||||||
|
} else {
|
||||||
|
fieldItem.setLabel("");
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldItem.setType(getFieldhtmltype(extendInfoPO.getControlType() + ""));
|
||||||
|
fieldItem.setKey(extendInfoPO.getFieldName());
|
||||||
|
// 查看操作 全部设置为只读
|
||||||
|
if (1 == viewAttr) {
|
||||||
|
fieldItem.setViewAttr(viewAttr);
|
||||||
|
} else {
|
||||||
|
// 必填
|
||||||
|
if (1 == extendInfoPO.getIsrequired()) {
|
||||||
|
fieldItem.setViewAttr(3);
|
||||||
|
fieldItem.setRules("required|string");
|
||||||
|
} else {
|
||||||
|
fieldItem.setViewAttr(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 浏览按钮特殊处理
|
||||||
|
if (FieldType.BROWSER.equals(fieldItem.getType())) {
|
||||||
|
BrowserBean browserConditionParam = OrganizationFormItemUtil.browserItem(user, 2, 16, fieldItem.getViewAttr(), false, extendInfoPO.getFieldNameDesc(), extendInfoPO.getBrowserType(), extendInfoPO.getFieldName(), "").getBrowserConditionParam();
|
||||||
|
fieldItem.setBrowserConditionParam(browserConditionParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldItem.setWidth(width + "%");
|
||||||
|
return fieldItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取对应的控件类型
|
||||||
|
*
|
||||||
|
* @param fieldhtmltype
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static FieldType getFieldhtmltype(String fieldhtmltype) {
|
||||||
|
FieldType fieldtype = null;
|
||||||
|
if (fieldhtmltype.equals("1")) {
|
||||||
|
fieldtype = FieldType.INPUT;
|
||||||
|
} else if (fieldhtmltype.equals("2")) {
|
||||||
|
fieldtype = FieldType.TEXTAREA;
|
||||||
|
} else if (fieldhtmltype.equals("3")) {
|
||||||
|
fieldtype = FieldType.BROWSER;
|
||||||
|
} else if (fieldhtmltype.equals("4")) {
|
||||||
|
fieldtype = FieldType.CHECKBOX;
|
||||||
|
} else if (fieldhtmltype.equals("5")) {
|
||||||
|
fieldtype = FieldType.SELECT;
|
||||||
|
} else if (fieldhtmltype.equals("6")) {
|
||||||
|
fieldtype = FieldType.FILEUPLOAD;
|
||||||
|
} else if (fieldhtmltype.equals("7")) {
|
||||||
|
fieldtype = FieldType.TEXT;
|
||||||
|
}
|
||||||
|
return fieldtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static SearchConditionItem getSearchConditionItem(User user, int viewAttr, ExtendInfoPO extendInfoPO, Object fieldvalue) {
|
||||||
|
SearchConditionItem searchConditionItem = null;
|
||||||
|
try {
|
||||||
|
if (user == null) {
|
||||||
|
user = new User();
|
||||||
|
user.setLanguage(7);
|
||||||
|
}
|
||||||
|
ConditionFactory conditionFactory = new ConditionFactory(user);
|
||||||
|
HrmFieldManager hrmFieldManager = new HrmFieldManager();
|
||||||
|
String fieldid = Util.null2String(extendInfoPO.getId());//字段id
|
||||||
|
String fieldname = Util.null2String(extendInfoPO.getFieldName());//字段名
|
||||||
|
String fieldlabel = Util.null2String(extendInfoPO.getFieldNameDesc());//字段显示名
|
||||||
|
String fieldhtmltype = Util.null2String(extendInfoPO.getControlType());//字段类型
|
||||||
|
String detailtype = Util.null2String(extendInfoPO.getBrowserType());//字段二级类型(浏览框--单人力)
|
||||||
|
String dmlurl = Util.null2String("");
|
||||||
|
boolean isQuickSearch = true;
|
||||||
|
boolean isScope = false;
|
||||||
|
|
||||||
|
if (fieldhtmltype.equals("1")) {//单行文本框
|
||||||
|
if (isScope) {//范围
|
||||||
|
if (Util.null2String(fieldvalue).length() == 0) {
|
||||||
|
fieldvalue = new HashMap<String, Object>();
|
||||||
|
}
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.SCOPE, fieldlabel, new String[]{fieldname, fieldname + "to"});
|
||||||
|
} else if (detailtype.equals("2")) {//数字
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.INPUTNUMBER, fieldlabel, fieldname, isQuickSearch);
|
||||||
|
} else {
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.INPUT, fieldlabel, fieldname, isQuickSearch);
|
||||||
|
}
|
||||||
|
} else if (fieldhtmltype.equals("2")) {//多行文本框
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.TEXTAREA, fieldlabel, fieldname);
|
||||||
|
} else if (fieldhtmltype.equals("3")) {//浏览按钮
|
||||||
|
if (detailtype.equals("2")) {
|
||||||
|
if (!extendInfoPO.getTableName().toLowerCase().contains("_dt")) {
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.DATEPICKER, fieldlabel, fieldname);
|
||||||
|
} else {
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.DATE, fieldlabel, fieldname, detailtype);
|
||||||
|
searchConditionItem.setDomkey(new String[]{fieldname + DATE_SELECT, fieldname + DATE_FROM, fieldname + DATE_TO});
|
||||||
|
searchConditionItem.setOptions(ServiceUtil.getDateSelectFromTo(user.getLanguage()));
|
||||||
|
}
|
||||||
|
} else if (detailtype.equals("19")) {
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.TIMEPICKER, fieldlabel, fieldname, detailtype);
|
||||||
|
} else if (detailtype.equals("402")) { // 年
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.DATEPICKER, fieldlabel, fieldname, detailtype);
|
||||||
|
searchConditionItem.setFormat("yyyy");
|
||||||
|
searchConditionItem.setMode("year");
|
||||||
|
searchConditionItem.setPlaceholder(SystemEnv.getHtmlLabelNames("526306", user.getLanguage()));
|
||||||
|
searchConditionItem.setShowTime(false);
|
||||||
|
} else if (detailtype.equals("403")) {
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.DATEPICKER, fieldlabel, fieldname, detailtype);
|
||||||
|
searchConditionItem.setFormat("yyyy-MM");
|
||||||
|
searchConditionItem.setMode("month");
|
||||||
|
searchConditionItem.setPlaceholder(SystemEnv.getHtmlLabelNames("126137", user.getLanguage()));
|
||||||
|
searchConditionItem.setShowTime(false);
|
||||||
|
} else if (detailtype.equals("RANGEPICKER")) {//日期区间
|
||||||
|
String[] domkey = new String[]{DATE_FROM + fieldname, DATE_TO + fieldname};
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.RANGEPICKER, fieldlabel, domkey);
|
||||||
|
searchConditionItem.setValue(fieldvalue);
|
||||||
|
} else if (detailtype.equals("TIMERANGEPICKER")) {//时间区间
|
||||||
|
String[] domkey = new String[]{fieldname + DATE_Time_FROM, fieldname + DATE_Time_TO};
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.TIMERANGEPICKER, fieldlabel, domkey);
|
||||||
|
searchConditionItem.setValue(fieldvalue);
|
||||||
|
} else {
|
||||||
|
//if (detailtype.equals("161") || detailtype.equals("162") || detailtype.equals("256") || detailtype.equals("257")) {
|
||||||
|
// BrowserBean browserbean = new BrowserBean(detailtype + "");
|
||||||
|
// BrowserInitUtil browserInitUtil = new BrowserInitUtil();
|
||||||
|
// String fielddbtype = dmlurl;
|
||||||
|
// if (!dmlurl.startsWith("browser.")) {
|
||||||
|
// fielddbtype = "browser." + dmlurl;
|
||||||
|
// }
|
||||||
|
// if (detailtype.equals("161") || detailtype.equals("162")) {
|
||||||
|
// browserInitUtil.initCustomizeBrow(browserbean, fielddbtype, Util.getIntValue(detailtype), user.getUID());
|
||||||
|
// } else {
|
||||||
|
// browserbean.getDataParams().put("cube_treeid", dmlurl);
|
||||||
|
// browserbean.getDataParams().put("currenttime", System.currentTimeMillis());
|
||||||
|
// browserInitUtil.initBrowser(browserbean, user.getLanguage());
|
||||||
|
// }
|
||||||
|
// searchConditionItem = new SearchConditionItem(ConditionType.BROWSER, SystemEnv.getHtmlLabelNames(fieldlabel, user.getLanguage()), new String[]{fieldname}, browserbean);
|
||||||
|
//} else {
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.BROWSER, fieldlabel, fieldname, detailtype);
|
||||||
|
//}
|
||||||
|
// searchConditionItem.getBrowserConditionParam().setHideVirtualOrg(hrmFieldBean.getHideVirtualOrg());
|
||||||
|
List<Map<String, Object>> replaceDatas = new ArrayList<Map<String, Object>>();
|
||||||
|
String tmpFieldValue = Util.null2String(fieldvalue);
|
||||||
|
if (detailtype.equals("mkqshift")) {
|
||||||
|
ShiftManagementToolKit shiftManagementToolKit = new ShiftManagementToolKit();
|
||||||
|
String[] fieldvalues = Util.splitString(tmpFieldValue, ",");
|
||||||
|
for (int i = 0; fieldvalues != null && i < fieldvalues.length; i++) {
|
||||||
|
String fieldshowname = Util.null2String(shiftManagementToolKit.getShiftOnOffWorkSections(fieldvalues[i], user.getLanguage()));
|
||||||
|
if (fieldshowname.length() == 0) continue;
|
||||||
|
Map<String, Object> replaceData = new HashMap<String, Object>();
|
||||||
|
replaceData.put("id", fieldvalues[i]);
|
||||||
|
replaceData.put("name", fieldshowname);
|
||||||
|
replaceDatas.add(replaceData);
|
||||||
|
}
|
||||||
|
} else if (detailtype.equals("sensitivewordstype")) {
|
||||||
|
SensitiveWordTypeComInfo sensitiveWordTypeComInfo = new SensitiveWordTypeComInfo();
|
||||||
|
String[] fieldvalues = Util.splitString(tmpFieldValue, ",");
|
||||||
|
for (int i = 0; fieldvalues != null && i < fieldvalues.length; i++) {
|
||||||
|
String fieldshowname = Util.null2String(sensitiveWordTypeComInfo.getName(fieldvalues[i]));
|
||||||
|
if (fieldshowname.length() == 0) continue;
|
||||||
|
Map<String, Object> replaceData = new HashMap<String, Object>();
|
||||||
|
replaceData.put("id", fieldvalues[i]);
|
||||||
|
replaceData.put("name", fieldshowname);
|
||||||
|
replaceDatas.add(replaceData);
|
||||||
|
}
|
||||||
|
} else if (detailtype.equals("doccategory")) {
|
||||||
|
List<BrowserValueInfo> fieldvalues = new BrowserValueInfoService().getBrowserValueInfo(detailtype, Util.null2String(fieldvalue));
|
||||||
|
for (int i = 0; fieldvalues != null && i < fieldvalues.size(); i++) {
|
||||||
|
BrowserValueInfo valueInfo = fieldvalues.get(i);
|
||||||
|
String fieldshowname = valueInfo.getName();
|
||||||
|
if (fieldshowname.length() == 0) continue;
|
||||||
|
Map<String, Object> replaceData = new HashMap<String, Object>();
|
||||||
|
replaceData.put("id", valueInfo.getId());
|
||||||
|
replaceData.put("name", fieldshowname);
|
||||||
|
replaceDatas.add(replaceData);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (tmpFieldValue.length() > 0) {
|
||||||
|
String fieldshowname = hrmFieldManager.getFieldvalue(user, dmlurl, Util.getIntValue(fieldid), Util.getIntValue(fieldhtmltype), Util.getIntValue(detailtype), tmpFieldValue, 0);
|
||||||
|
String[] fieldvalues = Util.splitString(tmpFieldValue, ",");
|
||||||
|
String[] fieldshownames = Util.splitString(fieldshowname, ",");
|
||||||
|
if (detailtype.equals("257")) {
|
||||||
|
if (fieldshowname.endsWith(" ")) {
|
||||||
|
fieldshowname = fieldshowname.substring(0, fieldshowname.length() - 5);
|
||||||
|
}
|
||||||
|
fieldshownames = Util.splitString(fieldshowname, " ");
|
||||||
|
}
|
||||||
|
for (int i = 0; fieldvalues != null && i < fieldvalues.length; i++) {
|
||||||
|
if (fieldvalues.length != fieldshownames.length) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (Util.null2String(fieldshownames[i]).length() == 0) continue;
|
||||||
|
Map<String, Object> replaceData = new HashMap<String, Object>();
|
||||||
|
replaceData.put("id", fieldvalues[i]);
|
||||||
|
replaceData.put("name", fieldshownames[i]);
|
||||||
|
replaceDatas.add(replaceData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldvalue = replaceDatas;
|
||||||
|
}
|
||||||
|
} else if (fieldhtmltype.equals("4")) {//Check框
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.CHECKBOX, fieldlabel, fieldname);
|
||||||
|
if (detailtype.equals("2")) {
|
||||||
|
searchConditionItem.setConditionType(ConditionType.SWITCH);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (fieldhtmltype.equals("5")) { //选择框
|
||||||
|
// List<SearchConditionOption> statusOptions = hrmFieldBean.getSelectOption();
|
||||||
|
// if (statusOptions == null) statusOptions = new ArrayList<SearchConditionOption>();
|
||||||
|
// try {
|
||||||
|
// if (fieldid.length() > 0) {
|
||||||
|
// rs = new RecordSet();
|
||||||
|
// char flag = Util.getSeparator();
|
||||||
|
// if (hrmFieldBean.getIsFormField()) {
|
||||||
|
// if (Util.null2String(hrmFieldBean.getIssystem()).equals("1")) {
|
||||||
|
// rs.executeProc("hrm_selectitembyid_new", "" + fieldid + flag + 1);
|
||||||
|
// } else {
|
||||||
|
// rs.executeProc("cus_selectitembyid_new", "" + fieldid + flag + 1);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (fieldname.startsWith("column_")) {
|
||||||
|
// rs.executeProc("cus_selectitembyid_new", "" + fieldid + flag + 1);
|
||||||
|
// } else {
|
||||||
|
// rs.executeProc("hrm_searchselectitembyid", fieldid);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// while (rs.next()) {
|
||||||
|
// String tmpselectvalue = Util.null2String(rs.getString("selectvalue"));
|
||||||
|
// String tmpselectname = Util.toScreen(rs.getString("selectname"), user.getLanguage());
|
||||||
|
// if (Util.null2String(rs.getString("cancel")).equals("1")) continue;
|
||||||
|
// boolean isDefault = Util.null2String(rs.getString("isdefault")).equals("y");
|
||||||
|
// if (!isDefault) {
|
||||||
|
// isDefault = Util.null2String(rs.getString("hrm_isdefault")).equals("1");
|
||||||
|
// }
|
||||||
|
// SearchConditionOption searchConditionOption = new SearchConditionOption(tmpselectvalue, tmpselectname, isDefault);
|
||||||
|
// if (!statusOptions.contains(searchConditionOption)) {
|
||||||
|
// statusOptions.add(searchConditionOption);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// writeLog(e);
|
||||||
|
// }
|
||||||
|
// searchConditionItem = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname, statusOptions);
|
||||||
|
// if (detailtype.equals("") || detailtype.equals("0")) {
|
||||||
|
// detailtype = "1";
|
||||||
|
// }
|
||||||
|
// searchConditionItem.setKey(Util.null2String(fieldvalue));
|
||||||
|
// searchConditionItem.setValue(fieldvalue);
|
||||||
|
// searchConditionItem.setDetailtype(Util.getIntValue(detailtype, 3));
|
||||||
|
} else if (fieldhtmltype.equals("6")) {//附件
|
||||||
|
if (fieldname.equals("resourceimageid")) {
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.RESOURCEIMG, fieldlabel, fieldname, isQuickSearch);
|
||||||
|
} else {
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.UPLOAD, fieldlabel, fieldname, isQuickSearch);
|
||||||
|
searchConditionItem.setUploadUrl("/api/doc/upload/uploadFile");
|
||||||
|
searchConditionItem.setCategory("category");
|
||||||
|
searchConditionItem.setMaxFilesNumber(10);
|
||||||
|
searchConditionItem.setMultiSelection(true);
|
||||||
|
Map<String, Object> otherParamsMap = new HashMap<>();
|
||||||
|
otherParamsMap.put("showClearAll", false);
|
||||||
|
otherParamsMap.put("showOrder", true);
|
||||||
|
searchConditionItem.setOtherParams(otherParamsMap);
|
||||||
|
if (Util.null2String(fieldvalue).length() > 0) {
|
||||||
|
List<Object> datas = new ArrayList<Object>();
|
||||||
|
Map<String, Object> data = null;
|
||||||
|
String[] tmpIds = Util.splitString(Util.null2String(fieldvalue), ",");
|
||||||
|
for (int i = 0; i < tmpIds.length; i++) {
|
||||||
|
String fileid = tmpIds[i];
|
||||||
|
ImageFileManager manager = new ImageFileManager();
|
||||||
|
manager.getImageFileInfoById(Util.getIntValue(fileid));
|
||||||
|
String filename = manager.getImageFileName();
|
||||||
|
String extname = filename.contains(".") ? filename.substring(filename.lastIndexOf(".") + 1) : "";
|
||||||
|
data = new HashMap<String, Object>();
|
||||||
|
data.put("acclink", "/weaver/weaver.file.FileDownload?fileid=" + fileid);
|
||||||
|
data.put("fileExtendName", extname);
|
||||||
|
data.put("fileid", fileid);
|
||||||
|
//if (Util.null2String(this.isMobile).equals("1")) {
|
||||||
|
// data.put("filelink", "/spa/document/static4mobile/index.html#/attach/" + fileid);
|
||||||
|
//} else {
|
||||||
|
data.put("filelink", "/spa/document/index2file.jsp?imagefileId=" + fileid + "#/main/document/fileView");
|
||||||
|
//}
|
||||||
|
data.put("filename", filename);
|
||||||
|
data.put("filesize", manager.getImgsize());
|
||||||
|
data.put("imgSrc", "");
|
||||||
|
data.put("isImg", "");
|
||||||
|
data.put("loadlink", "/weaver/weaver.file.FileDownload?fileid=" + fileid + "&download=1");
|
||||||
|
data.put("showDelete", "true");
|
||||||
|
data.put("showLoad", "true");
|
||||||
|
datas.add(data);
|
||||||
|
}
|
||||||
|
searchConditionItem.setDatas(datas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (fieldhtmltype.equals("7")) {//颜色选择
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.COLORPICKER, fieldlabel, fieldname, true);
|
||||||
|
searchConditionItem.setValue(fieldvalue);
|
||||||
|
} else if (fieldhtmltype.equals("8")) {//DESCRIPTION
|
||||||
|
searchConditionItem = conditionFactory.createCondition(ConditionType.DESCRIPTION, fieldlabel, fieldname);
|
||||||
|
searchConditionItem.setValue(fieldvalue);
|
||||||
|
}
|
||||||
|
if (searchConditionItem != null) {
|
||||||
|
BrowserInitUtil.setConditionItemDefaultValue(searchConditionItem, fieldvalue, 2);
|
||||||
|
searchConditionItem.setLabelcol(6);
|
||||||
|
searchConditionItem.setFieldcol(12);
|
||||||
|
searchConditionItem.setViewAttr(viewAttr);
|
||||||
|
if (searchConditionItem.getBrowserConditionParam() != null) {
|
||||||
|
searchConditionItem.getBrowserConditionParam().setViewAttr(viewAttr);
|
||||||
|
}
|
||||||
|
if (searchConditionItem.getConditionType().equals(ConditionType.DATE)) {
|
||||||
|
searchConditionItem.setFieldcol(18);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Util.null2String(extendInfoPO.getFieldNameDesc()).length() > 0) {
|
||||||
|
searchConditionItem.setLabel(extendInfoPO.getFieldNameDesc());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return searchConditionItem;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.engine.organization.entity.extend.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/18
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ExtendGroupPO {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private Integer extendType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组名称
|
||||||
|
*/
|
||||||
|
private String groupName;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
private int deleteType;
|
||||||
|
private Date createTime;
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,111 @@
|
|||||||
|
package com.engine.organization.entity.extend.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/19
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ExtendInfoPO {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private Integer extendType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表名
|
||||||
|
*/
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段名
|
||||||
|
*/
|
||||||
|
private String fieldName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段中文名
|
||||||
|
*/
|
||||||
|
private String fieldNameDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private String fieldType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 控件类型
|
||||||
|
*/
|
||||||
|
private Integer controlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浏览按钮类型
|
||||||
|
*/
|
||||||
|
private String browserType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组主键
|
||||||
|
*/
|
||||||
|
private Long extendGroupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用
|
||||||
|
*/
|
||||||
|
private Integer isenable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否必填
|
||||||
|
*/
|
||||||
|
private Integer isrequired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表显示
|
||||||
|
*/
|
||||||
|
private Integer listShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询卡片显示
|
||||||
|
*/
|
||||||
|
private Integer searchShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改显示
|
||||||
|
*/
|
||||||
|
private Integer editShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增加显示
|
||||||
|
*/
|
||||||
|
private Integer addShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浏览按钮显示
|
||||||
|
*/
|
||||||
|
private Integer browserShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
private Integer showOrder;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
private int deleteType;
|
||||||
|
private Date createTime;
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.engine.organization.entity.staff.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/24
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class StaffPlanPO {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
private String planNo;
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String planName;
|
||||||
|
/**
|
||||||
|
* 年度
|
||||||
|
*/
|
||||||
|
private Integer planYear;
|
||||||
|
/**
|
||||||
|
* 时间开始
|
||||||
|
*/
|
||||||
|
private Date time_start;
|
||||||
|
/**
|
||||||
|
* 时间结束
|
||||||
|
*/
|
||||||
|
private Date time_end;
|
||||||
|
/**
|
||||||
|
* 适用公司
|
||||||
|
*/
|
||||||
|
private String companyId;
|
||||||
|
/**
|
||||||
|
* 说明
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private Integer forbiddenTag;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
private int deleteType;
|
||||||
|
private Date createTime;
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.engine.organization.mapper.department;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.department.po.DepartmentPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public interface DepartmentMapper {
|
||||||
|
|
||||||
|
List<DepartmentPO> getDeptListByCompId();
|
||||||
|
|
||||||
|
List<DepartmentPO> getDeptListByPId(@Param("PId") Long PId);
|
||||||
|
|
||||||
|
List<DepartmentPO> getDeptList(DepartmentPO departmentPO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取顶级数据
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DepartmentPO> listParent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取子层级数据
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DepartmentPO> listChild(@Param("ids") Collection ids);
|
||||||
|
|
||||||
|
DepartmentPO getDeptById(@Param("id") int id);
|
||||||
|
|
||||||
|
String getDeptNameById(@Param("id") int id);
|
||||||
|
}
|
@ -0,0 +1,171 @@
|
|||||||
|
<?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.department.DepartmentMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.department.po.DepartmentPO">
|
||||||
|
<result column="id" property="id"/>
|
||||||
|
<result column="dept_no" property="deptNo"/>
|
||||||
|
<result column="dept_name" property="deptName"/>
|
||||||
|
<result column="dept_name_short" property="deptNameShort"/>
|
||||||
|
<result column="parent_comp" property="parentComp"/>
|
||||||
|
<result column="parent_dept" property="parentDept"/>
|
||||||
|
<result column="dept_principal" property="deptPrincipal"/>
|
||||||
|
<result column="show_order" property="showOrder"/>
|
||||||
|
<result column="description" property="description"/>
|
||||||
|
<result column="forbidden_tag" property="forbiddenTag"/>
|
||||||
|
<result column="creator" property="creator"/>
|
||||||
|
<result column="delete_type" property="deleteType"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getDeptListByCompId" resultType="com.engine.organization.entity.department.po.DepartmentPO">
|
||||||
|
select t.id, t.dept_name, t.parent_dept, t.dept_principal,t.parent_dept,t.parent_comp
|
||||||
|
from jcl_org_dept t
|
||||||
|
where delete_type = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDeptListByPId" resultType="com.engine.organization.entity.department.po.DepartmentPO">
|
||||||
|
select t.id, t.dept_name, t.parent_dept, t.dept_principal
|
||||||
|
from jcl_org_dept t
|
||||||
|
where delete_type = 0
|
||||||
|
and parent_dept = #{PId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDeptNameById" resultType="string">
|
||||||
|
select t.dept_name
|
||||||
|
from jcl_org_dept t
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDeptList" parameterType="com.engine.organization.entity.department.po.DepartmentPO"
|
||||||
|
resultMap="BaseResultMap">
|
||||||
|
select t.id,
|
||||||
|
t.dept_no,
|
||||||
|
t.dept_name,
|
||||||
|
t.dept_name_short,
|
||||||
|
t.parent_comp,
|
||||||
|
t.parent_dept,
|
||||||
|
t.dept_principal,
|
||||||
|
t.show_order,
|
||||||
|
t.forbidden_tag
|
||||||
|
from jcl_org_dept t
|
||||||
|
where delete_type = 0
|
||||||
|
<include refid="likeSQL"/>
|
||||||
|
<if test=" parentComp != null ">
|
||||||
|
and t.parent_comp = #{parentComp}
|
||||||
|
</if>
|
||||||
|
<if test=" parentDept != null ">
|
||||||
|
and t.parent_dept = #{parentDept}
|
||||||
|
</if>
|
||||||
|
<if test=" deptPrincipal != null ">
|
||||||
|
and t.dept_principal = #{deptPrincipal}
|
||||||
|
</if>
|
||||||
|
<if test=" showOrder != null ">
|
||||||
|
and t.show_order = #{showOrder}
|
||||||
|
</if>
|
||||||
|
<if test=" forbiddenTag != null ">
|
||||||
|
and t.forbidden_tag = #{forbiddenTag}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDeptById" resultType="com.engine.organization.entity.department.po.DepartmentPO">
|
||||||
|
select t.id,
|
||||||
|
t.dept_no,
|
||||||
|
t.dept_name,
|
||||||
|
t.dept_name_short,
|
||||||
|
t.parent_comp,
|
||||||
|
t.parent_dept,
|
||||||
|
t.dept_principal,
|
||||||
|
t.show_order,
|
||||||
|
t.forbidden_tag
|
||||||
|
from jcl_org_dept t
|
||||||
|
where delete_type = 0
|
||||||
|
and id = #{id}
|
||||||
|
</select>
|
||||||
|
<select id="listParent" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
t.id,
|
||||||
|
t.dept_no,
|
||||||
|
t.dept_name,
|
||||||
|
t.dept_name_short,
|
||||||
|
t.parent_comp,
|
||||||
|
t.parent_dept,
|
||||||
|
t.dept_principal,
|
||||||
|
t.show_order,
|
||||||
|
t.forbidden_tag
|
||||||
|
FROM
|
||||||
|
jcl_org_dept t
|
||||||
|
WHERE t.delete_type = 0
|
||||||
|
<include refid="nullSql"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="listChild" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
t.id,
|
||||||
|
t.dept_no,
|
||||||
|
t.dept_name,
|
||||||
|
t.dept_name_short,
|
||||||
|
t.parent_comp,
|
||||||
|
t.parent_dept,
|
||||||
|
t.dept_principal,
|
||||||
|
t.show_order,
|
||||||
|
t.forbidden_tag
|
||||||
|
FROM
|
||||||
|
jcl_org_dept t
|
||||||
|
WHERE t.delete_type = 0
|
||||||
|
AND parent_dept IN
|
||||||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<sql id="likeSQL">
|
||||||
|
<if test=" deptNo != null and deptNo != '' ">
|
||||||
|
and t.dept_no like CONCAT('%',#{deptNo},'%')
|
||||||
|
</if>
|
||||||
|
<if test=" deptName != null and deptName != '' ">
|
||||||
|
and t.dept_name like CONCAT('%',#{deptName},'%')
|
||||||
|
</if>
|
||||||
|
<if test=" deptNameShort != null and deptNameShort != '' ">
|
||||||
|
and t.dept_name_short like CONCAT('%',#{deptNameShort},'%')
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="likeSQL" databaseId="oracle">
|
||||||
|
<if test=" deptNo != null and deptNo != '' ">
|
||||||
|
and t.dept_no like '%'||#{deptNo}||'%'
|
||||||
|
</if>
|
||||||
|
<if test=" deptName != null and deptName != '' ">
|
||||||
|
and t.dept_name like '%'||#{deptName}||'%'
|
||||||
|
</if>
|
||||||
|
<if test=" deptNameShort != null and deptNameShort != '' ">
|
||||||
|
and t.dept_name_short like '%'||#{deptNameShort}||'%'
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="likeSQL" databaseId="sqlserver">
|
||||||
|
<if test=" deptNo != null and deptNo != '' ">
|
||||||
|
and t.dept_no like '%'+#{deptNo}+'%'
|
||||||
|
</if>
|
||||||
|
<if test=" deptName != null and deptName != '' ">
|
||||||
|
and t.dept_name like '%'+#{deptName}+'%'
|
||||||
|
</if>
|
||||||
|
<if test=" deptNameShort != null and deptNameShort != '' ">
|
||||||
|
and t.dept_name_short like '%'+#{deptNameShort}+'%'
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="nullSql">
|
||||||
|
and ifnull(parent_dept,'0')='0'
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="nullSql" databaseId="sqlserver">
|
||||||
|
and isnull(parent_dept,'0')='0'
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="nullSql" databaseId="oracle">
|
||||||
|
and NVL(parent_dept,'0')='0'
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.engine.organization.mapper.employee;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.department.po.DepartmentPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public interface EmployeeMapper {
|
||||||
|
|
||||||
|
String getEmployeeNameById(@Param("employeeId") Long id);
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
<?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.employee.EmployeeMapper">
|
||||||
|
|
||||||
|
<select id="getEmployeeNameById" resultType="string">
|
||||||
|
select t.lastname
|
||||||
|
from hrmresource t
|
||||||
|
where id = #{employeeId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.engine.organization.mapper.extend;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/20
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface ExtDTMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主表id,查询拓展表数据
|
||||||
|
*
|
||||||
|
* @param tableName
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> listCompExtDT(@Param("tableName") String tableName, @Param("id") long id, @Param("fields") String fields);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入主表明细表
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int insertCompExtDT(@Param("tableName") String tableName, @Param("map") Map<String, Object> map);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据mainId删除指定明细表数据
|
||||||
|
*
|
||||||
|
* @param tableName
|
||||||
|
* @param mainId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int deleteByMainID(@Param("tableName") String tableName, @Param("mainId") long mainId);
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
<?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.extend.ExtDTMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insertCompExtDT" parameterType="java.util.Map">
|
||||||
|
insert into ${tableName} (
|
||||||
|
<foreach collection="map" item="value" index="key" separator=",">
|
||||||
|
${key}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
values (
|
||||||
|
<foreach collection="map" item="value" index="key" separator=",">
|
||||||
|
#{value}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<delete id="deleteByMainID">
|
||||||
|
delete
|
||||||
|
from ${tableName}
|
||||||
|
where mainid = #{mainId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="listCompExtDT" resultType="map">
|
||||||
|
select ${fields}
|
||||||
|
from ${tableName}
|
||||||
|
where mainid = #{id}
|
||||||
|
and delete_type = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,48 @@
|
|||||||
|
package com.engine.organization.mapper.extend;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/20
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface ExtMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主表id,查询主表拓展表数据
|
||||||
|
*
|
||||||
|
* @param tableName
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> listCompExt(@Param("tableName") String tableName, @Param("fields") String fields, @Param("id") long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断当前数据是否存在
|
||||||
|
*
|
||||||
|
* @param tableName
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int countCompExtById(@Param("tableName") String tableName, @Param("id") long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入主表拓展表
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int insertCompExt(@Param("tableName") String tableName, @Param("map") Map<String, Object> map);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新主表拓展表
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateCompExt(@Param("tableName") String tableName, @Param("id") long id, @Param("map") Map<String, Object> map);
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
<?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.extend.ExtMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insertCompExt" parameterType="java.util.Map">
|
||||||
|
insert into ${tableName} (
|
||||||
|
<foreach collection="map" item="value" index="key" separator=",">
|
||||||
|
${key}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
values (
|
||||||
|
<foreach collection="map" item="value" index="key" separator=",">
|
||||||
|
#{value}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateCompExt" parameterType="java.util.Map">
|
||||||
|
update ${tableName} set
|
||||||
|
<foreach collection="map" item="value" index="key" separator=",">
|
||||||
|
${key} = #{value}
|
||||||
|
</foreach>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="listCompExt" resultType="map">
|
||||||
|
select ${fields}
|
||||||
|
from ${tableName}
|
||||||
|
where delete_type = 0
|
||||||
|
and id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="countCompExtById" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from ${tableName}
|
||||||
|
where delete_type = 0
|
||||||
|
and id = #{id}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.engine.organization.mapper.extend;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.extend.po.ExtendGroupPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/18
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface ExtendGroupMapper {
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @param groupType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ExtendGroupPO> listByType(@Param("groupType") String groupType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询分组名称
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String getGroupNameById(@Param("id") String id);
|
||||||
|
}
|
@ -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.extend.ExtendGroupMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.extend.po.ExtendGroupPO">
|
||||||
|
<result column="id" property="id"/>
|
||||||
|
<result column="extend_type" property="extendType"/>
|
||||||
|
<result column="group_name" property="groupName"/>
|
||||||
|
<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.extend_type
|
||||||
|
, t.group_name
|
||||||
|
, t.creator
|
||||||
|
, t.delete_type
|
||||||
|
, t.create_time
|
||||||
|
, t.update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="listByType" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="baseColumns"/>
|
||||||
|
FROM
|
||||||
|
jcl_field_extendgroup t
|
||||||
|
WHERE t.delete_type = 0
|
||||||
|
<if test=" extendType != null and extendType != '' ">
|
||||||
|
and extend_type = #{extendType}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="getGroupNameById" resultType="java.lang.String">
|
||||||
|
select group_name
|
||||||
|
from jcl_field_extendgroup
|
||||||
|
where id = #{id} and delete_type = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.engine.organization.mapper.extend;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/19
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface ExtendInfoMapper {
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @param extendType
|
||||||
|
* @param extendGroupId
|
||||||
|
* @param tableName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ExtendInfoPO> listFields(@Param("extendType") String extendType, @Param("extendGroupId") String extendGroupId, @Param("tableName") String tableName);
|
||||||
|
}
|
@ -0,0 +1,74 @@
|
|||||||
|
<?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.extend.ExtendInfoMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.extend.po.ExtendInfoPO">
|
||||||
|
<result column="id" property="id"/>
|
||||||
|
<result column="extend_type" property="extendType"/>
|
||||||
|
<result column="table_name" property="tableName"/>
|
||||||
|
<result column="field_name" property="fieldName"/>
|
||||||
|
<result column="field_name_desc" property="fieldNameDesc"/>
|
||||||
|
<result column="field_type" property="fieldType"/>
|
||||||
|
<result column="control_type" property="controlType"/>
|
||||||
|
<result column="browser_type" property="browserType"/>
|
||||||
|
<result column="extend_group_id" property="extendGroupId"/>
|
||||||
|
<result column="isenable" property="isenable"/>
|
||||||
|
<result column="isrequired" property="isrequired"/>
|
||||||
|
<result column="list_show" property="listShow"/>
|
||||||
|
<result column="search_show" property="searchShow"/>
|
||||||
|
<result column="edit_show" property="editShow"/>
|
||||||
|
<result column="add_show" property="addShow"/>
|
||||||
|
<result column="browser_show" property="browserShow"/>
|
||||||
|
<result column="show_order" property="showOrder"/>
|
||||||
|
<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.extend_type
|
||||||
|
, t.table_name
|
||||||
|
, t.field_name
|
||||||
|
, t.field_name_desc
|
||||||
|
, t.field_type
|
||||||
|
, t.control_type
|
||||||
|
, t.browser_type
|
||||||
|
, t.extend_group_id
|
||||||
|
, t.isenable
|
||||||
|
, t.isrequired
|
||||||
|
, t.list_show
|
||||||
|
, t.search_show
|
||||||
|
, t.edit_show
|
||||||
|
, t.add_show
|
||||||
|
, t.browser_show
|
||||||
|
, t.show_order
|
||||||
|
, t.creator
|
||||||
|
, t.delete_type
|
||||||
|
, t.create_time
|
||||||
|
, t.update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="listFields" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="baseColumns"/>
|
||||||
|
FROM
|
||||||
|
jcl_field_extendinfo t
|
||||||
|
WHERE t.delete_type = 0
|
||||||
|
<if test=" extendType != null and extendType != '' ">
|
||||||
|
and extend_type = #{extendType}
|
||||||
|
</if>
|
||||||
|
<if test=" extendGroupId != null and extendGroupId != '' ">
|
||||||
|
and extend_group_id = #{extendGroupId}
|
||||||
|
</if>
|
||||||
|
<if test=" tableName != null and tableName != '' ">
|
||||||
|
and table_name = #{tableName}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,52 @@
|
|||||||
|
package com.engine.organization.service;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.department.param.DeptSearchParam;
|
||||||
|
import com.engine.organization.entity.department.param.QuerySingleDeptListParam;
|
||||||
|
import com.engine.organization.entity.department.vo.SingleDeptTreeVO;
|
||||||
|
import com.engine.organization.util.page.PageInfo;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public interface DepartmentService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据分部id获取部门tree
|
||||||
|
* 联查部门
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<SingleDeptTreeVO> getDeptListByPid(QuerySingleDeptListParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表数据展示
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> listPage(DeptSearchParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存部门基础信息
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int saveBaseComp(DeptSearchParam params);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取新增表单
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getSaveForm();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
package com.engine.organization.service;
|
||||||
|
|
||||||
|
import com.api.browser.bean.SearchConditionItem;
|
||||||
|
import com.engine.organization.entity.TopTab;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/24
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface ExtService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组装主表拓展表表单
|
||||||
|
*
|
||||||
|
* @param user
|
||||||
|
* @param extendType
|
||||||
|
* @param tableName
|
||||||
|
* @param viewAttr
|
||||||
|
* @param id
|
||||||
|
* @param groupId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SearchConditionItem> getExtForm(User user, String extendType, String tableName, int viewAttr, long id, String groupId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组装明细表表单
|
||||||
|
*
|
||||||
|
* @param user
|
||||||
|
* @param extendType
|
||||||
|
* @param tableName
|
||||||
|
* @param id
|
||||||
|
* @param viewAttr
|
||||||
|
* @param showLabel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> getExtendTables(User user, String extendType, String tableName, long id, int viewAttr, boolean showLabel);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓展页面分组
|
||||||
|
*
|
||||||
|
* @param extendType
|
||||||
|
* @param tableName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<TopTab> getTabInfo(String extendType, String tableName);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新主表拓展表
|
||||||
|
*
|
||||||
|
* @param user
|
||||||
|
* @param extendType
|
||||||
|
* @param tableName
|
||||||
|
* @param params
|
||||||
|
* @param groupId
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateExtForm(User user, String extendType, String tableName, Map<String, Object> params, String groupId, Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新明细表
|
||||||
|
*
|
||||||
|
* @param user
|
||||||
|
* @param extendType
|
||||||
|
* @param tableName
|
||||||
|
* @param params
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
void updateExtDT(User user, String extendType, String tableName, Map<String, Object> params, Long id);
|
||||||
|
}
|
@ -0,0 +1,188 @@
|
|||||||
|
package com.engine.organization.service.impl;
|
||||||
|
|
||||||
|
import com.api.browser.bean.SearchConditionGroup;
|
||||||
|
import com.api.browser.bean.SearchConditionItem;
|
||||||
|
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||||
|
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.organization.component.OrganizationWeaTable;
|
||||||
|
import com.engine.organization.entity.department.bo.DepartmentBO;
|
||||||
|
import com.engine.organization.entity.department.dto.DepartmentListDTO;
|
||||||
|
import com.engine.organization.entity.department.param.DeptSearchParam;
|
||||||
|
import com.engine.organization.entity.department.param.QuerySingleDeptListParam;
|
||||||
|
import com.engine.organization.entity.department.po.DepartmentPO;
|
||||||
|
import com.engine.organization.entity.department.vo.SingleDeptTreeVO;
|
||||||
|
import com.engine.organization.mapper.department.DepartmentMapper;
|
||||||
|
import com.engine.organization.service.DepartmentService;
|
||||||
|
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||||
|
import com.engine.organization.util.db.MapperProxyFactory;
|
||||||
|
import com.engine.organization.util.page.Column;
|
||||||
|
import com.engine.organization.util.page.PageInfo;
|
||||||
|
import com.engine.organization.util.page.PageUtil;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import weaver.general.StringUtil;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public class DepartmentServiceImpl extends Service implements DepartmentService {
|
||||||
|
|
||||||
|
private DepartmentMapper getDepartmentMapper() {
|
||||||
|
return MapperProxyFactory.getProxy(DepartmentMapper.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<SingleDeptTreeVO> getDeptListByPid(QuerySingleDeptListParam param) {
|
||||||
|
|
||||||
|
//1.查询分部下所有部门
|
||||||
|
//PageUtil.start(param.getCurrent(), param.getPageSize());
|
||||||
|
List<DepartmentPO> departmentPOS = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptListByCompId();
|
||||||
|
PageInfo<DepartmentPO> pageInfo = new PageInfo<>(departmentPOS);
|
||||||
|
List<SingleDeptTreeVO> singleDeptTreeVOS = DepartmentBO.buildSingleDeptTreeVOS(departmentPOS,param.getParentComp());
|
||||||
|
PageInfo<SingleDeptTreeVO> pageInfos = new PageInfo<>(singleDeptTreeVOS, SingleDeptTreeVO.class);
|
||||||
|
pageInfos.setTotal(pageInfo.getTotal());
|
||||||
|
pageInfos.setPageNum(param.getCurrent());
|
||||||
|
pageInfos.setPageSize(param.getPageSize());
|
||||||
|
|
||||||
|
return pageInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> listPage(DeptSearchParam param) {
|
||||||
|
Map<String, Object> datas = new HashMap<>();
|
||||||
|
PageUtil.start(param.getCurrent(), param.getPageSize());
|
||||||
|
List<DepartmentPO> parentList = getDepartmentMapper().listParent();
|
||||||
|
List<DepartmentPO> list = new ArrayList<>();
|
||||||
|
list.addAll(parentList);
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(parentList)) {
|
||||||
|
// 递归查询子数据
|
||||||
|
getChildPOs(parentList, list);
|
||||||
|
}
|
||||||
|
DepartmentPO departmentPO = DepartmentBO.convertParamsToPO(param, (long) user.getUID());
|
||||||
|
// 搜索条件过滤数据
|
||||||
|
List<DepartmentPO> filterList = filterListByParams(list, departmentPO);
|
||||||
|
|
||||||
|
List<DepartmentListDTO> departmentListDTOS = DepartmentBO.buildDeptDTOList(list, filterList);
|
||||||
|
PageInfo<DepartmentListDTO> pageInfo = new PageInfo<>(departmentListDTOS);
|
||||||
|
|
||||||
|
PageInfo<DepartmentListDTO> pageInfos = new PageInfo<>(departmentListDTOS, DepartmentListDTO.class);
|
||||||
|
pageInfos.setTotal(pageInfo.getTotal());
|
||||||
|
pageInfos.setPageNum(param.getCurrent());
|
||||||
|
pageInfos.setPageSize(param.getPageSize());
|
||||||
|
|
||||||
|
OrganizationWeaTable<DepartmentListDTO> table = new OrganizationWeaTable<>(user, DepartmentListDTO.class);
|
||||||
|
List<Column> columns = pageInfos.getColumns();
|
||||||
|
List<WeaTableColumn> weaTableColumn = columns.stream().map(v -> new WeaTableColumn("100", v.getTitle(), v.getKey())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
|
table.setColumns(weaTableColumn);
|
||||||
|
|
||||||
|
WeaResultMsg result = new WeaResultMsg(false);
|
||||||
|
result.putAll(table.makeDataResult());
|
||||||
|
result.success();
|
||||||
|
|
||||||
|
|
||||||
|
datas.put("pageInfo", pageInfos);
|
||||||
|
datas.put("dataKey", result.getResultMap());
|
||||||
|
return datas;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int saveBaseComp(DeptSearchParam params) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getSaveForm() {
|
||||||
|
Map<String, Object> apiDatas = new HashMap<>();
|
||||||
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||||
|
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||||
|
// 编号
|
||||||
|
SearchConditionItem deptNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "编号", "deptNo");
|
||||||
|
deptNoItem.setRules("required|string");
|
||||||
|
// 名称
|
||||||
|
SearchConditionItem deptNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "名称", "deptName");
|
||||||
|
deptNameItem.setRules("required|string");
|
||||||
|
// 简称
|
||||||
|
SearchConditionItem deptNameShortItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "简称", "deptNameShort");
|
||||||
|
deptNameShortItem.setRules("required|string");
|
||||||
|
// TODO 自定义按钮
|
||||||
|
// 所属分部
|
||||||
|
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "161", "parentComp", "compBrowser");
|
||||||
|
//上级部门
|
||||||
|
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级公司", "161", "parentDept", "deptBrowser");
|
||||||
|
// 部门负责人
|
||||||
|
SearchConditionItem deptPrincipalItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "部门负责人", "1", "deptPrincipal", "");
|
||||||
|
// 显示顺序
|
||||||
|
SearchConditionItem showOrderItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "编号", "showOrder");
|
||||||
|
// 说明
|
||||||
|
SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 60, "说明", "description");
|
||||||
|
|
||||||
|
conditionItems.add(deptNoItem);
|
||||||
|
conditionItems.add(deptNameItem);
|
||||||
|
conditionItems.add(deptNameShortItem);
|
||||||
|
conditionItems.add(compBrowserItem);
|
||||||
|
conditionItems.add(deptBrowserItem);
|
||||||
|
conditionItems.add(deptPrincipalItem);
|
||||||
|
conditionItems.add(showOrderItem);
|
||||||
|
conditionItems.add(descriptionItem);
|
||||||
|
|
||||||
|
|
||||||
|
addGroups.add(new SearchConditionGroup("基本信息", true, conditionItems));
|
||||||
|
apiDatas.put("condition", addGroups);
|
||||||
|
|
||||||
|
return apiDatas;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过搜索条件过滤list数据
|
||||||
|
*
|
||||||
|
* @param departmentPOS
|
||||||
|
* @param departmentPO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<DepartmentPO> filterListByParams(Collection<DepartmentPO> departmentPOS, DepartmentPO departmentPO) {
|
||||||
|
// 搜索后的数据
|
||||||
|
List<DepartmentPO> filterList = new ArrayList<>();
|
||||||
|
// 筛选数据
|
||||||
|
for (Iterator<DepartmentPO> iterator = departmentPOS.iterator(); iterator.hasNext(); ) {
|
||||||
|
DepartmentPO next = iterator.next();
|
||||||
|
boolean isAdd = (StringUtil.isEmpty(departmentPO.getDeptName()) || next.getDeptName().contains(departmentPO.getDeptName())) // 名称
|
||||||
|
&& (StringUtil.isEmpty(departmentPO.getDeptNo()) || next.getDeptNo().contains(departmentPO.getDeptNo()))//编号
|
||||||
|
&& (StringUtil.isEmpty(departmentPO.getDeptNameShort()) || next.getDeptNameShort().contains(departmentPO.getDeptNameShort()))//简称
|
||||||
|
&& (null == departmentPO.getParentComp() || next.getParentComp().equals(departmentPO.getParentComp()))//所属分部
|
||||||
|
&& (null == departmentPO.getParentDept() || next.getParentDept().equals(departmentPO.getParentDept()))//上级部门
|
||||||
|
&& (null == departmentPO.getDeptPrincipal() || next.getDeptPrincipal().equals(departmentPO.getDeptPrincipal()))//部门负责人
|
||||||
|
&& (null == departmentPO.getShowOrder() || next.getShowOrder().equals(departmentPO.getShowOrder()))//显示顺序
|
||||||
|
&& (null == departmentPO.getForbiddenTag() || next.getForbiddenTag().equals(departmentPO.getForbiddenTag()));//禁用标记
|
||||||
|
|
||||||
|
if (isAdd) {
|
||||||
|
filterList.add(next);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return filterList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归获取子级数据
|
||||||
|
*
|
||||||
|
* @param parentList
|
||||||
|
* @param list
|
||||||
|
*/
|
||||||
|
private void getChildPOs(List<DepartmentPO> parentList, List<DepartmentPO> list) {
|
||||||
|
List<Long> ids = parentList.stream().map(DepartmentPO::getId).collect(Collectors.toList());
|
||||||
|
List<DepartmentPO> listChild = getDepartmentMapper().listChild(ids);
|
||||||
|
if (CollectionUtils.isNotEmpty(listChild)) {
|
||||||
|
list.addAll(listChild);
|
||||||
|
getChildPOs(listChild, list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,181 @@
|
|||||||
|
package com.engine.organization.service.impl;
|
||||||
|
|
||||||
|
import com.api.browser.bean.SearchConditionItem;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.organization.entity.TopTab;
|
||||||
|
import com.engine.organization.entity.extend.bo.ExtendInfoBO;
|
||||||
|
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
||||||
|
import com.engine.organization.mapper.extend.ExtDTMapper;
|
||||||
|
import com.engine.organization.mapper.extend.ExtMapper;
|
||||||
|
import com.engine.organization.mapper.extend.ExtendGroupMapper;
|
||||||
|
import com.engine.organization.mapper.extend.ExtendInfoMapper;
|
||||||
|
import com.engine.organization.service.ExtService;
|
||||||
|
import com.engine.organization.util.OrganizationAssert;
|
||||||
|
import com.engine.organization.util.db.MapperProxyFactory;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import weaver.general.Util;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/24
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class ExtServiceImpl extends Service implements ExtService {
|
||||||
|
|
||||||
|
private static final Integer BROWSER_TYPE = 3;
|
||||||
|
|
||||||
|
private ExtendInfoMapper getExtendInfoMapper() {
|
||||||
|
return MapperProxyFactory.getProxy(ExtendInfoMapper.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ExtendGroupMapper getExtendGroupMapper() {
|
||||||
|
return MapperProxyFactory.getProxy(ExtendGroupMapper.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ExtDTMapper getExtDTMapper() {
|
||||||
|
return MapperProxyFactory.getProxy(ExtDTMapper.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ExtMapper getExtMapper() {
|
||||||
|
return MapperProxyFactory.getProxy(ExtMapper.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SearchConditionItem> getExtForm(User user, String extendType, String tableName, int viewAttr, long id, String groupId) {
|
||||||
|
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||||
|
|
||||||
|
// 2编辑 1查看
|
||||||
|
OrganizationAssert.notNull(groupId, "请选择对应的拓展页");
|
||||||
|
List<ExtendInfoPO> infoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName);
|
||||||
|
String fields = infoPOList.stream().map(ExtendInfoPO::getFieldName).collect(Collectors.joining(","));
|
||||||
|
infoPOList.stream().map(ExtendInfoPO::getFieldName).collect(Collectors.joining(","));
|
||||||
|
Map<String, Object> compExtMap = getExtMapper().listCompExt(tableName, fields, id);
|
||||||
|
// 组装拓展页内容
|
||||||
|
for (ExtendInfoPO extendInfoPO : infoPOList) {
|
||||||
|
SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, compExtMap.get(extendInfoPO.getFieldName()));
|
||||||
|
item.setFieldcol(16);
|
||||||
|
if (null != item && 2 == viewAttr && 1 == extendInfoPO.getIsrequired()) {
|
||||||
|
item.setViewAttr(3);
|
||||||
|
item.setRules("required|string");
|
||||||
|
}
|
||||||
|
conditionItems.add(item);
|
||||||
|
}
|
||||||
|
return conditionItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getExtendTables(User user, String extendType, String tableName, long id, int viewAttr, boolean showLabel) {
|
||||||
|
List<Map<String, Object>> tables = new ArrayList<>();
|
||||||
|
// 查询所有分布模块,拓展明细表信息
|
||||||
|
List<ExtendInfoPO> infoPOList = getExtendInfoMapper().listFields(extendType, "", tableName);
|
||||||
|
Map<Long, List<ExtendInfoPO>> groupMap = infoPOList.stream().collect(Collectors.groupingBy(ExtendInfoPO::getExtendGroupId));
|
||||||
|
// 遍历Map,组装数据
|
||||||
|
for (Map.Entry<Long, List<ExtendInfoPO>> entry : groupMap.entrySet()) {
|
||||||
|
Map<String, Object> tableMap = new HashMap<>();
|
||||||
|
tableMap.put("hide", false);
|
||||||
|
tableMap.put("tabname", getExtendGroupMapper().getGroupNameById(entry.getKey() + ""));
|
||||||
|
Map<String, Object> tabinfoMap = new HashMap<>();
|
||||||
|
tabinfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, entry.getValue(), viewAttr, showLabel));
|
||||||
|
tabinfoMap.put("rownum", "rownum" + entry.getKey());
|
||||||
|
|
||||||
|
// 浏览按钮添加filespan字段
|
||||||
|
String fields = entry.getValue().stream().map(item -> {
|
||||||
|
if (BROWSER_TYPE == item.getControlType()) {
|
||||||
|
return item.getFieldName() + "," + item.getFieldName() + "span";
|
||||||
|
}
|
||||||
|
return item.getFieldName();
|
||||||
|
}).collect(Collectors.joining(","));
|
||||||
|
// 去除null 元素
|
||||||
|
List<Map<String, Object>> maps = getExtDTMapper().listCompExtDT(tableName, id, fields);
|
||||||
|
maps.removeIf(Objects::isNull);
|
||||||
|
tabinfoMap.put("datas", maps);
|
||||||
|
tableMap.put("tabinfo", tabinfoMap);
|
||||||
|
tables.add(tableMap);
|
||||||
|
}
|
||||||
|
return tables;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓展页面分组
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<TopTab> getTabInfo(String extendType, String tableName) {
|
||||||
|
List<TopTab> topTabs = new ArrayList<>();
|
||||||
|
// 基本信息
|
||||||
|
topTabs.add(TopTab.builder().color("#000000").groupId("0").showcount(false).title("基本信息").viewCondition("0").build());
|
||||||
|
|
||||||
|
List<ExtendInfoPO> infoPOList = getExtendInfoMapper().listFields(extendType, "", tableName);
|
||||||
|
List<Long> extendGroups = infoPOList.stream().map(ExtendInfoPO::getExtendGroupId).collect(Collectors.toList());
|
||||||
|
// 拓展信息
|
||||||
|
if (CollectionUtils.isNotEmpty(extendGroups)) {
|
||||||
|
for (Long groupId : extendGroups) {
|
||||||
|
topTabs.add(TopTab.builder().color("#000000").groupId(groupId + "").showcount(false).title(getExtendGroupMapper().getGroupNameById(groupId + "")).viewCondition(groupId + "").build());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return topTabs;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateExtForm(User user, String extendType, String tableName, Map<String, Object> params, String groupId, Long id) {
|
||||||
|
int updateBaseComp;
|
||||||
|
List<ExtendInfoPO> extInfoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName);
|
||||||
|
List<String> extFields = extInfoPOList.stream().map(ExtendInfoPO::getFieldName).collect(Collectors.toList());
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
for (String dtField : extFields) {
|
||||||
|
map.put(dtField, params.get(dtField));
|
||||||
|
}
|
||||||
|
// 判断更新还是插入
|
||||||
|
int count = getExtMapper().countCompExtById(tableName, id);
|
||||||
|
if (count > 0) {
|
||||||
|
map.put("update_time", new Date());
|
||||||
|
updateBaseComp = getExtMapper().updateCompExt(tableName, id, map);
|
||||||
|
} else {
|
||||||
|
map.put("creator", user.getUID());
|
||||||
|
map.put("delete_type", 0);
|
||||||
|
map.put("create_time", new Date());
|
||||||
|
map.put("update_time", new Date());
|
||||||
|
map.put("id", id);
|
||||||
|
updateBaseComp = getExtMapper().insertCompExt(tableName, map);
|
||||||
|
}
|
||||||
|
return updateBaseComp;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateExtDT(User user, String extendType, String tableName, Map<String, Object> params, Long id) {
|
||||||
|
List<ExtendInfoPO> dtInfoPOList = getExtendInfoMapper().listFields(extendType, "", "");
|
||||||
|
Map<Long, String> groups = dtInfoPOList.stream().collect(Collectors.toMap(ExtendInfoPO::getExtendGroupId, ExtendInfoPO::getTableName, (k1, k2) -> k1));
|
||||||
|
// 删除原有明细表数据
|
||||||
|
groups.forEach((k, v) -> {
|
||||||
|
if (v.toLowerCase().contains("_dt")) getExtDTMapper().deleteByMainID(v, id);
|
||||||
|
});
|
||||||
|
|
||||||
|
for (Map.Entry<Long, String> entry : groups.entrySet()) {
|
||||||
|
int rowNum = Util.getIntValue((String) params.get("rownum" + entry.getKey()));
|
||||||
|
List<ExtendInfoPO> filterS = dtInfoPOList.stream().filter(item -> entry.getKey().equals(item.getExtendGroupId())).collect(Collectors.toList());
|
||||||
|
for (int i = 0; i < rowNum; i++) {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
|
||||||
|
for (ExtendInfoPO extendInfoPO : filterS) {
|
||||||
|
if (BROWSER_TYPE == extendInfoPO.getControlType()) {
|
||||||
|
map.put(extendInfoPO.getFieldName() + "span", params.get(extendInfoPO.getFieldName() + "span_" + i));
|
||||||
|
}
|
||||||
|
map.put(extendInfoPO.getFieldName(), params.get(extendInfoPO.getFieldName() + "_" + i));
|
||||||
|
}
|
||||||
|
map.put("mainid", id);
|
||||||
|
map.put("creator", user.getUID());
|
||||||
|
map.put("delete_type", 0);
|
||||||
|
map.put("create_time", new Date());
|
||||||
|
map.put("update_time", new Date());
|
||||||
|
getExtDTMapper().insertCompExtDT(entry.getValue(), map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
package com.engine.organization.web;
|
||||||
|
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.organization.entity.department.param.DeptSearchParam;
|
||||||
|
import com.engine.organization.entity.department.param.QuerySingleDeptListParam;
|
||||||
|
import com.engine.organization.util.response.ReturnResult;
|
||||||
|
import com.engine.organization.wrapper.DepartmentWrapper;
|
||||||
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public class DepartmentController {
|
||||||
|
|
||||||
|
private DepartmentWrapper getDepartmentWrapper(User user) {
|
||||||
|
return ServiceUtil.getService(DepartmentWrapper.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/getDeptListByPid")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public ReturnResult getDeptListByPid(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QuerySingleDeptListParam querySingleDeptListParam) {
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return getDepartmentWrapper(user).getDeptListByPid(querySingleDeptListParam);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return ReturnResult.exceptionHandle(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取list列表
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/listDept")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public ReturnResult listDept(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeptSearchParam params) {
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return ReturnResult.successed(getDepartmentWrapper(user).listPage(params));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return ReturnResult.exceptionHandle(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存表单
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("/getSaveForm")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public ReturnResult getSaveForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return ReturnResult.successed(getDepartmentWrapper(user).getSaveForm());
|
||||||
|
} catch (Exception e) {
|
||||||
|
return ReturnResult.exceptionHandle(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.engine.organization.webservice;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.comp.po.CompPO;
|
||||||
|
|
||||||
|
import javax.jws.WebMethod;
|
||||||
|
import javax.jws.WebService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/23
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@WebService
|
||||||
|
public interface CustomBrowserService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司/分部 树形列表
|
||||||
|
* 只获取未删除且启用的数据
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@WebMethod(
|
||||||
|
operationName = "getCompTreeList",
|
||||||
|
action = "com.engine.organization.webservice.CustomBrowserService.getCompTreeList"
|
||||||
|
)
|
||||||
|
List<CompPO> getCompTreeList();
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
package com.engine.organization.webservice;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.comp.po.CompPO;
|
||||||
|
import com.engine.organization.mapper.comp.CompMapper;
|
||||||
|
import com.engine.organization.util.db.MapperProxyFactory;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: TODO
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/05/23
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class CustomBrowserServiceImpl implements CustomBrowserService {
|
||||||
|
private CompMapper getCompMapper() {
|
||||||
|
return MapperProxyFactory.getProxy(CompMapper.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CompPO> getCompTreeList() {
|
||||||
|
// 获取所有启用数据
|
||||||
|
List<CompPO> allList = getCompMapper().list().stream().filter(item -> 0 == item.getForbiddenTag()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<CompPO> parentList = allList.stream().filter(item -> (null == item.getParentCompany() || 0 == item.getParentCompany())).collect(Collectors.toList());
|
||||||
|
Map<Long, List<CompPO>> compMap = allList.stream().filter(item -> (null != item.getParentCompany() && 0 != item.getParentCompany())).collect(Collectors.groupingBy(CompPO::getParentCompany));
|
||||||
|
List<CompPO> returnList = new ArrayList<>();
|
||||||
|
dealChildren(parentList, returnList, compMap);
|
||||||
|
|
||||||
|
return returnList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理分部子节点
|
||||||
|
*
|
||||||
|
* @param parentList
|
||||||
|
* @param returnList
|
||||||
|
* @param compMap
|
||||||
|
*/
|
||||||
|
private void dealChildren(List<CompPO> parentList, List<CompPO> returnList, Map<Long, List<CompPO>> compMap) {
|
||||||
|
if (CollectionUtils.isEmpty(parentList)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (CompPO compPO : parentList) {
|
||||||
|
returnList.add(compPO);
|
||||||
|
dealChildren(compMap.get(compPO.getId()), returnList, compMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package com.engine.organization.wrapper;
|
||||||
|
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.organization.entity.department.param.DeptSearchParam;
|
||||||
|
import com.engine.organization.entity.department.param.QuerySingleDeptListParam;
|
||||||
|
import com.engine.organization.service.DepartmentService;
|
||||||
|
import com.engine.organization.service.impl.DepartmentServiceImpl;
|
||||||
|
import com.engine.organization.util.page.PageInfo;
|
||||||
|
import com.engine.organization.util.response.ReturnResult;
|
||||||
|
import com.engine.organization.entity.department.vo.SingleDeptTreeVO;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/5/20
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public class DepartmentWrapper extends Service {
|
||||||
|
|
||||||
|
public DepartmentService getDepartmentService(User user) {
|
||||||
|
return ServiceUtil.getService(DepartmentServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReturnResult getDeptListByPid(QuerySingleDeptListParam param) {
|
||||||
|
PageInfo<SingleDeptTreeVO> singleDeptTreeVOS = getDepartmentService(user).getDeptListByPid(param);
|
||||||
|
return ReturnResult.successed(singleDeptTreeVOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表数据展示
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Map<String, Object> listPage(DeptSearchParam param) {
|
||||||
|
return getDepartmentService(user).listPage(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取保存表单
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Map<String, Object> getSaveForm() {
|
||||||
|
return getDepartmentService(user).getSaveForm();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue