招聘需求报表 增加搜索条件
This commit is contained in:
parent
e7a2d39d2c
commit
501c7a4dd2
|
|
@ -5,6 +5,8 @@ import com.engine.core.impl.Service;
|
||||||
import com.engine.organization.component.OrganizationWeaTable;
|
import com.engine.organization.component.OrganizationWeaTable;
|
||||||
import com.engine.xmg.entity.demand.vo.RecruitDemandTable;
|
import com.engine.xmg.entity.demand.vo.RecruitDemandTable;
|
||||||
import com.engine.xmg.service.RecruitDemandService;
|
import com.engine.xmg.service.RecruitDemandService;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import weaver.general.Util;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -18,16 +20,47 @@ public class RecruitDemandServiceImpl extends Service implements RecruitDemandSe
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getRecruitDemandReport(Map<String, Object> param) {
|
public Map<String, Object> getRecruitDemandReport(Map<String, Object> param) {
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
|
||||||
|
|
||||||
// 刷新引用状态
|
|
||||||
OrganizationWeaTable<RecruitDemandTable> table = new OrganizationWeaTable<>(user, RecruitDemandTable.class);
|
OrganizationWeaTable<RecruitDemandTable> table = new OrganizationWeaTable<>(user, RecruitDemandTable.class);
|
||||||
String sqlWhere = " where 1=1 ";
|
String sqlWhere = buildSqlWhere(param);
|
||||||
table.setSqlwhere(sqlWhere);
|
table.setSqlwhere(sqlWhere);
|
||||||
WeaResultMsg result = new WeaResultMsg(false);
|
WeaResultMsg result = new WeaResultMsg(false);
|
||||||
result.putAll(table.makeDataResult());
|
result.putAll(table.makeDataResult());
|
||||||
result.success();
|
result.success();
|
||||||
resultMap.putAll(result.getResultMap());
|
return new HashMap<>(result.getResultMap());
|
||||||
return resultMap;
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建sql where条件
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String buildSqlWhere(Map<String, Object> param) {
|
||||||
|
String sql = " where 1=1 ";
|
||||||
|
String resourceId = Util.null2String(param.get("resourceId"));
|
||||||
|
String departmentId = Util.null2String(param.get("departmentId"));
|
||||||
|
String dateRange = Util.null2String(param.get("dateRange"));
|
||||||
|
String jobTitle = Util.null2String(param.get("jobTitle"));
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(resourceId)) {
|
||||||
|
sql += " and t.sqr = '" + resourceId + "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(departmentId)) {
|
||||||
|
sql += " and t.szbm = '" + departmentId + "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(jobTitle)) {
|
||||||
|
sql += " and t.gw = '" + jobTitle + "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(dateRange)) {
|
||||||
|
String[] split = dateRange.split(",");
|
||||||
|
if (split.length == 2) {
|
||||||
|
sql += "t.sqsj >= '" + split[0] + "' and t.sqsj <='" + split[1] + "'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue