代码提交、功能重写
This commit is contained in:
parent
0d9e03507b
commit
1cf8d42e75
|
|
@ -19,38 +19,60 @@ import java.util.stream.Collectors;
|
||||||
*/
|
*/
|
||||||
public class DanikorSyncUserJob extends BaseCronJob {
|
public class DanikorSyncUserJob extends BaseCronJob {
|
||||||
|
|
||||||
// select * into hrmresource_back FROM hrmresource where 1=2;
|
//select * into hrmresource_back FROM hrmresource where 1=2;
|
||||||
// alter table hrmresource_back add sync_date date null;
|
//alter table hrmresource_back add sync_date date null;
|
||||||
// alter table hrmresource_back add default getdate() for sync_date;
|
//alter table hrmresource_back add default getdate() for sync_date;
|
||||||
// alter table hrmresource_back add sync_id int identity(1,1);
|
//alter table hrmresource_back add sync_id int identity(1,1);
|
||||||
private static final String RESOURCE_MAIN = "hrmresource";
|
private static final String RESOURCE_MAIN = "hrmresource";
|
||||||
private static final String RESOURCE_BACK = "hrmresource_back";
|
private static final String RESOURCE_BACK = "hrmresource_back";
|
||||||
|
|
||||||
// CREATE TABLE cus_fielddata_back (
|
//CREATE TABLE cus_fielddata_back (
|
||||||
// seqorder int NOT NULL,
|
//seqorder int NOT NULL,
|
||||||
// [scope] varchar(1000) NULL,
|
//[scope] varchar(1000) NULL,
|
||||||
// scopeid int NOT NULL,
|
//scopeid int NOT NULL,
|
||||||
// id int NOT NULL,
|
//id int NOT NULL,
|
||||||
// sync_date date null,
|
//sync_date date null,
|
||||||
// sync_id int identity(1,1)
|
//sync_id int identity(1,1)
|
||||||
// );
|
//);
|
||||||
// alter table cus_fielddata_back add default getdate() for sync_date;
|
//alter table cus_fielddata_back add default getdate() for sync_date;
|
||||||
private static final String CUS_MAIN = "cus_fielddata";
|
private static final String CUS_MAIN = "cus_fielddata";
|
||||||
private static final String CUS_BACK = "cus_fielddata_back";
|
private static final String CUS_BACK = "cus_fielddata_back";
|
||||||
|
|
||||||
// select * into hrmsubcompany_back FROM hrmsubcompany where 1=2;
|
//select * into hrmsubcompany_back FROM hrmsubcompany where 1=2;
|
||||||
// alter table hrmsubcompany_back add sync_date date null;
|
//alter table hrmsubcompany_back add sync_date date null;
|
||||||
// alter table hrmsubcompany_back add default getdate() for sync_date;
|
//alter table hrmsubcompany_back add default getdate() for sync_date;
|
||||||
// alter table hrmsubcompany_back add sync_id int identity(1,1);
|
//alter table hrmsubcompany_back drop column id;
|
||||||
|
//alter table hrmsubcompany_back add id int not null;
|
||||||
|
//alter table hrmsubcompany_back add sync_id int identity(1,1);
|
||||||
private static final String COMPANY_MAIN = "hrmsubcompany";
|
private static final String COMPANY_MAIN = "hrmsubcompany";
|
||||||
private static final String COMPANY_BACK = "hrmsubcompany_back";
|
private static final String COMPANY_BACK = "hrmsubcompany_back";
|
||||||
|
|
||||||
|
//CREATE TABLE hrmsubcompanydefined_back (
|
||||||
|
//id int NOT NULL,
|
||||||
|
//subcomid int NOT NULL,
|
||||||
|
//sync_date date null,
|
||||||
|
//sync_id int identity(1,1)
|
||||||
|
//);
|
||||||
|
//alter table hrmsubcompanydefined_back add default getdate() for sync_date;
|
||||||
private static final String COMPANY_DEFINED_MAIN = "hrmsubcompanydefined";
|
private static final String COMPANY_DEFINED_MAIN = "hrmsubcompanydefined";
|
||||||
private static final String COMPANY_DEFINED_BACK = "hrmsubcompanydefined_back";
|
private static final String COMPANY_DEFINED_BACK = "hrmsubcompanydefined_back";
|
||||||
|
|
||||||
|
//select * into hrmdepartment_back FROM hrmdepartment where 1=2;
|
||||||
|
//alter table hrmdepartment_back add sync_date date null;
|
||||||
|
//alter table hrmdepartment_back add default getdate() for sync_date;
|
||||||
|
//alter table hrmdepartment_back drop column id;
|
||||||
|
//alter table hrmdepartment_back add id int not null;
|
||||||
|
//alter table hrmdepartment_back add sync_id int identity(1,1);
|
||||||
private static final String DEPARTMENT_MAIN = "hrmdepartment";
|
private static final String DEPARTMENT_MAIN = "hrmdepartment";
|
||||||
private static final String DEPARTMENT_BACK = "hrmdepartment_back";
|
private static final String DEPARTMENT_BACK = "hrmdepartment_back";
|
||||||
|
|
||||||
|
//CREATE TABLE hrmdepartmentdefined_back (
|
||||||
|
//id int NOT NULL,
|
||||||
|
//deptid int NOT NULL,
|
||||||
|
//sync_date date null,
|
||||||
|
//sync_id int identity(1,1)
|
||||||
|
//);
|
||||||
|
//alter table hrmdepartmentdefined_back add default getdate() for sync_date;
|
||||||
private static final String DEPARTMENT_DEFINED_MAIN = "hrmdepartmentdefined";
|
private static final String DEPARTMENT_DEFINED_MAIN = "hrmdepartmentdefined";
|
||||||
private static final String DEPARTMENT_DEFINED_BACK = "hrmdepartmentdefined_back";
|
private static final String DEPARTMENT_DEFINED_BACK = "hrmdepartmentdefined_back";
|
||||||
|
|
||||||
|
|
@ -60,26 +82,44 @@ public class DanikorSyncUserJob extends BaseCronJob {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
// 比较两张表的表结构
|
// 比较两张表的表结构,同步表结构、表数据
|
||||||
List<TableColumnPO> cusFieldDataList = getDanikorResourceMapper().getColumnInfoByTableName(CUS_MAIN);
|
syncTableFields(RESOURCE_MAIN, RESOURCE_BACK);
|
||||||
List<TableColumnPO> cusFieldDataBackList = getDanikorResourceMapper().getColumnInfoByTableName(CUS_BACK);
|
syncTableFields(CUS_MAIN, CUS_BACK);
|
||||||
List<TableColumnPO> resourceDataList = getDanikorResourceMapper().getColumnInfoByTableName(RESOURCE_MAIN);
|
|
||||||
for (TableColumnPO tableColumnPO : cusFieldDataList) {
|
syncTableFields(COMPANY_MAIN, COMPANY_BACK);
|
||||||
if (!cusFieldDataBackList.contains(tableColumnPO)) {
|
syncTableFields(COMPANY_DEFINED_MAIN, COMPANY_DEFINED_BACK);
|
||||||
|
|
||||||
|
syncTableFields(DEPARTMENT_MAIN, DEPARTMENT_BACK);
|
||||||
|
syncTableFields(DEPARTMENT_DEFINED_MAIN, DEPARTMENT_DEFINED_BACK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步表字段
|
||||||
|
*
|
||||||
|
* @param mainTableName
|
||||||
|
* @param backTableName
|
||||||
|
*/
|
||||||
|
private void syncTableFields(String mainTableName, String backTableName) {
|
||||||
|
List<TableColumnPO> mainTableFields;
|
||||||
|
List<TableColumnPO> backTableFields;
|
||||||
|
if (CUS_MAIN.equals(mainTableName)) {
|
||||||
|
mainTableFields = getDanikorResourceMapper().getCusColumnByTableName(mainTableName);
|
||||||
|
backTableFields = getDanikorResourceMapper().getCusColumnByTableName(backTableName);
|
||||||
|
} else {
|
||||||
|
mainTableFields = getDanikorResourceMapper().getHrmColumnByTableName(mainTableName);
|
||||||
|
backTableFields = getDanikorResourceMapper().getHrmColumnByTableName(backTableName);
|
||||||
|
}
|
||||||
|
for (TableColumnPO tableColumnPO : mainTableFields) {
|
||||||
|
if (!backTableFields.contains(tableColumnPO)) {
|
||||||
// 为回溯表创建字段
|
// 为回溯表创建字段
|
||||||
MapperProxyFactory.getProxy(ExtendInfoMapper.class).addTableColumn(CUS_BACK, tableColumnPO.getColumnName(), tableColumnPO.getColumnType());
|
MapperProxyFactory.getProxy(ExtendInfoMapper.class).addTableColumn(backTableName, tableColumnPO.getColumnName(), tableColumnPO.getColumnType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 同步表数据
|
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
String resourceColumns = resourceDataList.stream().map(TableColumnPO::getColumnName).collect(Collectors.joining(","));
|
String mainTableColumns = mainTableFields.stream().map(TableColumnPO::getColumnName).collect(Collectors.joining(","));
|
||||||
String customColumns = cusFieldDataList.stream().map(TableColumnPO::getColumnName).collect(Collectors.joining(","));
|
|
||||||
// 同步主表数据
|
// 同步主表数据
|
||||||
String sql = "insert into " + RESOURCE_BACK + "(" + resourceColumns + ") select " + resourceColumns + " from " + RESOURCE_MAIN;
|
String sql = "insert into " + backTableName + "(" + mainTableColumns + ") select " + mainTableColumns + " from " + mainTableName;
|
||||||
rs.execute(sql);
|
rs.execute(sql);
|
||||||
// 同步明细表数据
|
|
||||||
sql = "insert into " + CUS_BACK + "(" + customColumns + ") select " + customColumns + " from " + CUS_MAIN;
|
|
||||||
rs.execute(sql);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,20 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface DanikorResourceMapper {
|
public interface DanikorResourceMapper {
|
||||||
/**
|
/**
|
||||||
* 查询表结构信息
|
* 查询人员自定义表结构信息
|
||||||
*
|
*
|
||||||
* @param tableName
|
* @param tableName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<TableColumnPO> getColumnInfoByTableName(@Param("tableName") String tableName);
|
List<TableColumnPO> getCusColumnByTableName(@Param("tableName") String tableName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询组织架构表结构信息
|
||||||
|
*
|
||||||
|
* @param tableName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<TableColumnPO> getHrmColumnByTableName(@Param("tableName") String tableName);
|
||||||
|
|
||||||
|
Integer summaryData(@Param("tableName") String tableName, @Param("syncDate") String syncDate);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,48 @@
|
||||||
<mapper namespace="com.engine.organization.mapper.danikor.DanikorResourceMapper">
|
<mapper namespace="com.engine.organization.mapper.danikor.DanikorResourceMapper">
|
||||||
|
|
||||||
|
|
||||||
<select id="getColumnInfoByTableName" resultType="com.engine.organization.entity.column.TableColumnPO">
|
<select id="getCusColumnByTableName" resultType="com.engine.organization.entity.column.TableColumnPO">
|
||||||
select a.name as tableName, b.name as columnName, c.fielddbtype as columnType
|
select a.name as tableName, b.name as columnName, c.fielddbtype as columnType
|
||||||
from sysobjects a
|
from sysobjects a
|
||||||
inner join syscolumns b on a.id = b.id and a.xtype = 'U'
|
inner join syscolumns b on a.id = b.id and a.xtype = 'U'
|
||||||
left join cus_formdict c on b.name = c.fieldname
|
left join cus_formdict c on b.name = c.fieldname
|
||||||
where a.name = #{tableName}
|
where a.name = #{tableName}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getHrmColumnByTableName" resultType="com.engine.organization.entity.column.TableColumnPO">
|
||||||
|
select a.name as tableName, b.name as columnName, d.fielddbtype as columnType
|
||||||
|
from sysobjects a
|
||||||
|
inner join syscolumns b on a.id = b.id and a.xtype = 'U'
|
||||||
|
left join hrm_formfield d on b.name = d.fieldname
|
||||||
|
<if test="tableName=='hrmsubcompany' ">
|
||||||
|
and d.groupid = 6
|
||||||
|
</if>
|
||||||
|
<if test="tableName=='hrmsubcompanydefined' ">
|
||||||
|
and d.groupid = 6
|
||||||
|
</if>
|
||||||
|
<if test="tableName=='hrmdepartment'">
|
||||||
|
and d.groupid = 7
|
||||||
|
</if>
|
||||||
|
<if test="tableName=='hrmdepartmentdefined'">
|
||||||
|
and d.groupid = 7
|
||||||
|
</if>
|
||||||
|
<if test="tableName=='hrmresource'">
|
||||||
|
and d.groupid < 6
|
||||||
|
</if>
|
||||||
|
where a.name = #{tableName}
|
||||||
|
</select>
|
||||||
|
<select id="summaryData" resultType="java.lang.Integer">
|
||||||
|
select count(id)
|
||||||
|
from ${tableName}
|
||||||
|
where 1 = 1
|
||||||
|
<if test="tableName == 'hrmresource'">
|
||||||
|
and status < 4
|
||||||
|
</if>
|
||||||
|
<if test="tableName != 'hrmresource'">
|
||||||
|
isnull(canceled, '0') = '0'
|
||||||
|
</if>
|
||||||
|
<if test="syncDate != null and syncDate !=''">
|
||||||
|
and sync_date = #{syncDate}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package com.engine.organization.service;
|
package com.engine.organization.service;
|
||||||
|
|
||||||
|
import com.engine.organization.util.MenuBtn;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,4 +26,19 @@ public interface DanikorResourceBackService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getSearchCondition();
|
Map<String, Object> getSearchCondition();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取列表页面按钮信息
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, List<MenuBtn>> getHasRight();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取汇总数据
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getSummaryData(Map<String, Object> params);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,11 @@ import com.engine.organization.entity.danikor.vo.ResourceBackVO;
|
||||||
import com.engine.organization.mapper.danikor.DanikorResourceMapper;
|
import com.engine.organization.mapper.danikor.DanikorResourceMapper;
|
||||||
import com.engine.organization.mapper.resource.HrmResourceMapper;
|
import com.engine.organization.mapper.resource.HrmResourceMapper;
|
||||||
import com.engine.organization.service.DanikorResourceBackService;
|
import com.engine.organization.service.DanikorResourceBackService;
|
||||||
|
import com.engine.organization.util.MenuBtn;
|
||||||
import com.engine.organization.util.OrganizationFormItemUtil;
|
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||||
import com.engine.organization.util.db.MapperProxyFactory;
|
import com.engine.organization.util.db.MapperProxyFactory;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.common.DateUtil;
|
||||||
import weaver.general.Util;
|
import weaver.general.Util;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -45,9 +47,9 @@ public class DanikorResourceBackServiceImpl extends Service implements DanikorRe
|
||||||
OrganizationWeaTable<ResourceBackVO> table = new OrganizationWeaTable<>(user, ResourceBackVO.class);
|
OrganizationWeaTable<ResourceBackVO> table = new OrganizationWeaTable<>(user, ResourceBackVO.class);
|
||||||
String syncDate = Util.null2String(params.get("syncDate"));
|
String syncDate = Util.null2String(params.get("syncDate"));
|
||||||
String sqlForm = "from hrmresource t left join cus_fielddata t0 on t.id = t0.id and t0.scopeid ='-1' left join cus_fielddata t1 on t.id = t1.id and t1.scopeid ='1' left join cus_fielddata t2 on t.id = t2.id and t2.scopeid ='3' left join hrmjobtitles t3 on t.jobtitle=t3.id left join hrmjobactivities t4 on t3.jobactivityid=t4.id left join hrmjobgroups t5 on t4.jobgroupid=t5.id ";
|
String sqlForm = "from hrmresource t left join cus_fielddata t0 on t.id = t0.id and t0.scopeid ='-1' left join cus_fielddata t1 on t.id = t1.id and t1.scopeid ='1' left join cus_fielddata t2 on t.id = t2.id and t2.scopeid ='3' left join hrmjobtitles t3 on t.jobtitle=t3.id left join hrmjobactivities t4 on t3.jobactivityid=t4.id left join hrmjobgroups t5 on t4.jobgroupid=t5.id ";
|
||||||
String sqlWhere = "where 1 = 1 ";
|
String sqlWhere = "where t.status < 4 ";
|
||||||
String cusTableName = "cus_fielddata";
|
String cusTableName = "cus_fielddata";
|
||||||
if (StringUtils.isNotBlank(syncDate)) {
|
if (StringUtils.isNotBlank(syncDate) && !DateUtil.getDate(new Date()).equals(syncDate)) {
|
||||||
sqlWhere += " and t.sync_date = '" + syncDate + "'";
|
sqlWhere += " and t.sync_date = '" + syncDate + "'";
|
||||||
sqlForm = "from hrmresource_back t left join cus_fielddata_back t0 on t.id = t0.id and t0.scopeid = '-1' and t.sync_date = t0.sync_date left join cus_fielddata_back t1 on t.id = t1.id and t1.scopeid = '1' and t.sync_date = t1.sync_date left join cus_fielddata_back t2 on t.id = t2.id and t2.scopeid = '3' and t.sync_date = t2.sync_date left join hrmjobtitles t3 on t.jobtitle = t3.id left join hrmjobactivities t4 on t3.jobactivityid = t4.id left join hrmjobgroups t5 on t4.jobgroupid = t5.id ";
|
sqlForm = "from hrmresource_back t left join cus_fielddata_back t0 on t.id = t0.id and t0.scopeid = '-1' and t.sync_date = t0.sync_date left join cus_fielddata_back t1 on t.id = t1.id and t1.scopeid = '1' and t.sync_date = t1.sync_date left join cus_fielddata_back t2 on t.id = t2.id and t2.scopeid = '3' and t.sync_date = t2.sync_date left join hrmjobtitles t3 on t.jobtitle = t3.id left join hrmjobactivities t4 on t3.jobactivityid = t4.id left join hrmjobgroups t5 on t4.jobgroupid = t5.id ";
|
||||||
cusTableName = "cus_fielddata_back";
|
cusTableName = "cus_fielddata_back";
|
||||||
|
|
@ -62,7 +64,7 @@ public class DanikorResourceBackServiceImpl extends Service implements DanikorRe
|
||||||
//初次使用,无模板初始值
|
//初次使用,无模板初始值
|
||||||
String columns = "-1_hrm_lastname,-1_hrm_departmentid,-1_hrm_subcompanyid1,-1_hrm_jobtitle,-1_hrm_mobile,-1_hrm_telephone,-1_hrm_managerid,-1_hrm_dsporder";
|
String columns = "-1_hrm_lastname,-1_hrm_departmentid,-1_hrm_subcompanyid1,-1_hrm_jobtitle,-1_hrm_mobile,-1_hrm_telephone,-1_hrm_managerid,-1_hrm_dsporder";
|
||||||
|
|
||||||
List<String> cusFieldNames = getDanikorResourceMapper().getColumnInfoByTableName(cusTableName).stream().map(TableColumnPO::getColumnName).collect(Collectors.toList());
|
List<String> cusFieldNames = getDanikorResourceMapper().getCusColumnByTableName(cusTableName).stream().map(TableColumnPO::getColumnName).collect(Collectors.toList());
|
||||||
List<String> columnList = Arrays.asList(columns.split(","));
|
List<String> columnList = Arrays.asList(columns.split(","));
|
||||||
BigDecimal decimal = new BigDecimal(100 / columnList.size());
|
BigDecimal decimal = new BigDecimal(100 / columnList.size());
|
||||||
for (SearchConditionGroup allCondition : allConditions) {
|
for (SearchConditionGroup allCondition : allConditions) {
|
||||||
|
|
@ -118,4 +120,27 @@ public class DanikorResourceBackServiceImpl extends Service implements DanikorRe
|
||||||
apiDatas.put("conditions", addGroups);
|
apiDatas.put("conditions", addGroups);
|
||||||
return apiDatas;
|
return apiDatas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, List<MenuBtn>> getHasRight() {
|
||||||
|
Map<String, List<MenuBtn>> btnDatas = new HashMap<>();
|
||||||
|
ArrayList<MenuBtn> rightMenuList = new ArrayList<>();
|
||||||
|
// 显示列定制
|
||||||
|
rightMenuList.add(MenuBtn.rightMenu_btnColumn());
|
||||||
|
btnDatas.put("rightMenu", rightMenuList);
|
||||||
|
return btnDatas;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getSummaryData(Map<String, Object> params) {
|
||||||
|
HashMap<String, Object> returnMap = new HashMap<>();
|
||||||
|
String syncDate = Util.null2String(params.get("syncDate"));
|
||||||
|
if (DateUtil.getDate(new Date()).equals(syncDate)) {
|
||||||
|
syncDate = null;
|
||||||
|
}
|
||||||
|
returnMap.put("subcompany", getDanikorResourceMapper().summaryData("hrmsubcompany", syncDate));
|
||||||
|
returnMap.put("department", getDanikorResourceMapper().summaryData("hrmdepartment", syncDate));
|
||||||
|
returnMap.put("person", getDanikorResourceMapper().summaryData("hrmresource", syncDate));
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,29 @@ public class DanikorResourceBackController {
|
||||||
return ReturnResult.exceptionHandle(e);
|
return ReturnResult.exceptionHandle(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getHasRight")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public ReturnResult getHasRight(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return ReturnResult.successed(getDanikorResourceBackWrapper(user).getHasRight());
|
||||||
|
} catch (Exception e) {
|
||||||
|
return ReturnResult.exceptionHandle(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getSummaryData")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public ReturnResult getSummaryData(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||||
|
return ReturnResult.successed(getDanikorResourceBackWrapper(user).getSummaryData(map));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return ReturnResult.exceptionHandle(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,11 @@ package com.engine.organization.wrapper;
|
||||||
import com.engine.common.util.ServiceUtil;
|
import com.engine.common.util.ServiceUtil;
|
||||||
import com.engine.organization.service.DanikorResourceBackService;
|
import com.engine.organization.service.DanikorResourceBackService;
|
||||||
import com.engine.organization.service.impl.DanikorResourceBackServiceImpl;
|
import com.engine.organization.service.impl.DanikorResourceBackServiceImpl;
|
||||||
|
import com.engine.organization.util.MenuBtn;
|
||||||
import com.engine.organization.util.OrganizationWrapper;
|
import com.engine.organization.util.OrganizationWrapper;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,7 +25,15 @@ public class DanikorResourceBackWrapper extends OrganizationWrapper {
|
||||||
return getDanikorResourceBackService(user).listPage(params);
|
return getDanikorResourceBackService(user).listPage(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Object> getSearchCondition(){
|
public Map<String, Object> getSearchCondition() {
|
||||||
return getDanikorResourceBackService(user).getSearchCondition();
|
return getDanikorResourceBackService(user).getSearchCondition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, List<MenuBtn>> getHasRight() {
|
||||||
|
return getDanikorResourceBackService(user).getHasRight();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> getSummaryData(Map<String, Object> params) {
|
||||||
|
return getDanikorResourceBackService(user).getSummaryData(params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue