花名册查询、导出BUG修复
This commit is contained in:
parent
4113df1708
commit
453d4afe97
|
|
@ -111,12 +111,9 @@
|
|||
from jcl_org_hrmresource t where delete_type = 0 and work_code = #{workCode}
|
||||
</select>
|
||||
<select id="listDetachAll" resultType="com.engine.organization.entity.hrmresource.vo.HrmResourceVO">
|
||||
SELECT t.last_name as lastName,d.departmentname as departmentName,
|
||||
c.subcompanyname as companyName,t.mobile,t.telephone,t1.last_name as managerName
|
||||
from jcl_org_hrmresource t
|
||||
left join hrmdepartment d on t.ec_department = d.id
|
||||
left join hrmsubcompany c on t.ec_company = c.id
|
||||
left join jcl_org_hrmresource t1 on t.manager_id = t1.id
|
||||
select t.lastname as lastname, d.departmentname as departmentname, c.subcompanyname as companyname, t.mobile,
|
||||
t.telephone, t1.lastname as managername from hrmresource t left join hrmdepartment d on t.departmentid = d.id
|
||||
left join hrmsubcompany c on t.subcompanyid1 = c.id left join hrmresource t1 on t.managerid = t1.id
|
||||
where 1 = 1
|
||||
<if test="ids != null and ids.size > 0">
|
||||
AND t.id IN
|
||||
|
|
@ -128,7 +125,7 @@
|
|||
<foreach collection="companyIds" open="(" item="companyId" separator="," close=")">
|
||||
#{companyId}
|
||||
</foreach>
|
||||
order by t.show_order asc;
|
||||
order by t.dsporder asc
|
||||
</select>
|
||||
|
||||
<select id="getMaxShowOrder" resultType="java.lang.Long">
|
||||
|
|
|
|||
|
|
@ -637,20 +637,31 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
|
||||
DBType dbType = DBType.get(new RecordSet().getDBType());
|
||||
StringBuilder sb = new StringBuilder(" where 1=1 ");
|
||||
if (params.containsKey("lastName")) {
|
||||
sb.append(" and t.status = 1");
|
||||
}
|
||||
for (Map.Entry<String, Object> entry : params.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
String value = Util.null2String(entry.getValue());
|
||||
if ("lastName".equals(key)) {
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
sb.append(" and t.lastname ").append(dbType.like(value));
|
||||
}
|
||||
sb.append(" and t.status = 1");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(value)) {
|
||||
continue;
|
||||
}
|
||||
if ("lastName".equals(key)) {
|
||||
sb.append(" and t.lastname ").append(dbType.like(value));
|
||||
}
|
||||
if ("companyId".equals(key)) {
|
||||
sb.append(" and t.subcompanyid1 ='").append(value).append("'");
|
||||
}
|
||||
if ("departmentId".equals(key)) {
|
||||
sb.append(" and t.departmentId ='").append(value).append("'");
|
||||
}
|
||||
if ("jobTitle".equals(key)) {
|
||||
JobPO jobById = getJobMapper().getJobById(Long.parseLong(value));
|
||||
if (null != jobById) {
|
||||
sb.append(" and t.jobtitle ='").append(Util.null2String(jobById.getEcJobTitle())).append("' and t.subcompanyid1 = '").append(Util.null2String(jobById.getEcCompany())).append("' and t.departmentId ='").append(Util.null2String(jobById.getEcDepartment())).append("'");
|
||||
}
|
||||
}
|
||||
|
||||
SearchConditionItem searchConditionItem = allFieldsMap.get(key);
|
||||
// 根据不同的类型,不同的查询方式
|
||||
buildDynamicSql(searchConditionItem, key, value, sb, dbType);
|
||||
|
|
|
|||
Loading…
Reference in New Issue