人员快捷搜索BUG修复

pull/205/head
dxfeng 2 years ago
parent 0c4bf4eead
commit a3380ce0bd

@ -32,6 +32,14 @@ public interface QuickSearchMapper {
*/
List<QuickSearchCondition> getQuickSearchConditionList(@Param("belongTo") Integer belongTo, @Param("modelId") Integer modelId);
/**
*
*
* @param id id
* @return return
*/
QuickSearchCondition getQuickSearchConditionById(@Param("id") String id);
/**
*
*
@ -115,10 +123,11 @@ public interface QuickSearchMapper {
/**
* Id
*
* @param id Id
* @param fieldName
* @param scopeId scopeId
* @return return
*/
List<QuickSearchField> getQuickSearchFieldListByConditionId(@Param("id") String id);
QuickSearchField getQuickSearchFieldListByConditionId(@Param("fieldName") String fieldName, @Param("scopeId") String scopeId);
/**
*

@ -18,6 +18,13 @@
order by c.orderid, c.id
</select>
<select id="getQuickSearchConditionById"
resultType="com.engine.organization.entity.search.QuickSearchCondition">
select c.id, fieldid, c.customname, c.type, c.orderid, c.showmodel
from jcl_quicksearch_condition c
where id = #{id}
</select>
<select id="getQuickSearchOptionList" resultType="com.engine.organization.entity.search.QuickSearchOption">
select b.fieldid, b.fieldlabel, b.fieldname, fieldhtmltype, b.type
from hrm_formfield b
@ -53,10 +60,19 @@
<select id="getQuickSearchFieldListByConditionId"
resultType="com.engine.organization.entity.search.QuickSearchField">
select b.fieldhtmltype, b.type, b.fielddbtype
from jcl_quicksearch_condition c
left join hrm_formfield b on b.fieldid = c.fieldid
where c.id = #{id}
SELECT *
FROM (SELECT t2.fielddbtype, t2.fieldhtmltype, t2.type, t1.scopeid as scopeId, t2.fieldname
FROM cus_formfield t1,
cus_formdict t2
WHERE t1.fieldid = t2.id
AND t1.scope = 'HrmCustomFieldByInfoType'
UNION ALL
SELECT t3.fielddbtype, t3.fieldhtmltype, t3.TYPE, c.grouptype as scopeId, t3.fieldname
FROM hrm_formfield t3
inner join hrm_fieldgroup c on c.id = t3.groupid and c.grouptype in (-1, 1, 3)) hrmallfield
WHERE FIELDHTMLTYPE != '6'
and fieldname = #{fieldName}
and scopeId = #{scopeId}
</select>
<select id="getHrmFormFieldByFieldId"
resultType="com.engine.organization.entity.jclimport.po.HrmFormFieldPO">
@ -100,7 +116,7 @@
UNION ALL
SELECT t3.fieldid,
t3.fieldname,
t3.fieldlabel fieldLabel,
t3.fieldlabel fieldLabel,
t3.ismand,
t3.fielddbtype,
t3.fieldhtmltype,

@ -1187,7 +1187,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
if (StringUtils.isNotBlank(value) && !"-1".equals(value) && !"0,,".equals(value) && !"0".equals(value)) {
if (!"6".equals(value)) {
if ("1".equals(value)) {
sb.append(" and ").append(tableSql).append(" = '").append(OrganizationDateUtil.getFormatLocalDate(LocalDate.now())).append(" '");
sb.append(" and ").append(tableSql).append(" = '").append(OrganizationDateUtil.getFormatLocalDate(LocalDate.now())).append("'");
}else {
sb.append(" and ").append(tableSql).append(" >= '").append(TimeUtil.getDateByOption(value, "0")).append(" 00:00:00'");
sb.append(" and ").append(tableSql).append(" <= '").append(TimeUtil.getDateByOption(value, "")).append(" 23:59:59'");

@ -359,9 +359,11 @@ public class QuickSearchServiceImpl extends Service implements QuickSearchServic
obj.put("orderid", orderId);
datas.add(obj);
}
List<QuickSearchField> quickSearchFieldList = getQuickSearchMapper().getQuickSearchFieldListByConditionId(cid);
QuickSearchCondition quickSearchConditionById = getQuickSearchMapper().getQuickSearchConditionById(cid);
String[] split = quickSearchConditionById.getFieldId().split("_");
int precision = 0;
for (QuickSearchField quickSearchField : quickSearchFieldList) {
if(split.length==3) {
QuickSearchField quickSearchField = getQuickSearchMapper().getQuickSearchFieldListByConditionId(split[2], split[0]);
String fieldHtmlType = quickSearchField.getFieldHtmlType();
String type = quickSearchField.getType();
String fieldDbType = quickSearchField.getFieldDbType();

Loading…
Cancel
Save