将加盟机构信息、机构加盟申请、机构信息变更三个功能中搜索条件进行变更:企业名称、联系人合并为一个查询组件,查询时同时模糊匹配企业名称、联系人、联系电话

This commit is contained in:
1378012178@qq.com 2025-10-27 11:20:43 +08:00
parent 96ea2254d5
commit e2174bfb05
3 changed files with 36 additions and 20 deletions

View File

@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.nu.modules.orgapplyinfo.entity.OrgAllInfo;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
@ -79,6 +80,10 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
QueryWrapper<OrgApplyInfo> queryWrapper = QueryGenerator.initQueryWrapper(orgApplyInfo, req.getParameterMap(), customeRuleMap);
queryWrapper.in("status", new String[]{"1", "2", "3"});
Page<OrgApplyInfo> page = new Page<OrgApplyInfo>(pageNo, pageSize);
if (StringUtils.isNotBlank(orgApplyInfo.getTitle())) {
String value = orgApplyInfo.getTitle();
queryWrapper.and(c -> c.like("com_name", value).or().like("org_leader", value).or().like("org_leader_phone", value));
}
IPage<OrgApplyInfo> pageList = orgApplyInfoService.page(page, queryWrapper);
return Result.OK(pageList);
}
@ -106,6 +111,10 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
QueryWrapper<OrgApplyInfo> queryWrapper = QueryGenerator.initQueryWrapper(orgApplyInfo, req.getParameterMap(), customeRuleMap);
queryWrapper.in("status", new String[]{"4", "5"});
Page<OrgApplyInfo> page = new Page<OrgApplyInfo>(pageNo, pageSize);
if (StringUtils.isNotBlank(orgApplyInfo.getTitle())) {
String value = orgApplyInfo.getTitle();
queryWrapper.and(c -> c.like("com_name", value).or().like("org_leader", value).or().like("org_leader_phone", value));
}
IPage<OrgApplyInfo> pageList = orgApplyInfoService.page(page, queryWrapper);
return Result.OK(pageList);
}
@ -271,8 +280,8 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
@GetMapping(value = "/getOrgByOpenId")
public Result<IPage<OrgAllInfo>> getOrgByOpenId(@RequestParam(value = "openId", defaultValue = "", required = false) String openId,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "8") Integer pageSize) {
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "8") Integer pageSize) {
IPage<OrgAllInfo> page = new Page<>(pageNo, pageSize);
IPage<OrgAllInfo> resultPage = orgApplyInfoService.getOrgByOpenId(page, openId);
return Result.OK(resultPage);

View File

@ -254,5 +254,8 @@ public class OrgApplyInfo implements Serializable {
private java.lang.String workOrderStatus;
private java.lang.String workOrderId;
@TableField(exist = false)
private String title;
}

View File

@ -57,7 +57,11 @@
</foreach>
</if>
<if test="title != null and title != ''">
AND d.depart_name LIKE CONCAT('%', #{title}, '%')
AND (
d.depart_name LIKE CONCAT('%', #{title}, '%')
OR o.org_leader LIKE CONCAT('%', #{title}, '%')
OR o.org_leader_phone LIKE CONCAT('%', #{title}, '%')
)
</if>
</where>
order by (d.org_code + 0) asc
@ -111,7 +115,7 @@
</foreach>
</if>
<if test="invited !=null and invited != ''">
and eo.apply_type in
and eo.apply_type in
<foreach collection="invited.split(',')" item="item" open="(" separator="," close=")">
#{item}
</foreach>
@ -123,20 +127,20 @@
order by eo.create_time DESC
</select>
<!-- <choose>-->
<!-- <when test='status != null and status == "2"'>-->
<!-- ORDER BY (d.org_code + 0) ASC-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- ORDER BY-->
<!-- eo.iz_history desc,-->
<!-- CASE eo.status-->
<!-- WHEN '2' THEN 1-->
<!-- WHEN '1' THEN 2-->
<!-- WHEN '3' THEN 3-->
<!-- ELSE 4-->
<!-- END,-->
<!-- eo.create_time DESC-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- <choose>-->
<!-- <when test='status != null and status == "2"'>-->
<!-- ORDER BY (d.org_code + 0) ASC-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- ORDER BY-->
<!-- eo.iz_history desc,-->
<!-- CASE eo.status-->
<!-- WHEN '2' THEN 1-->
<!-- WHEN '1' THEN 2-->
<!-- WHEN '3' THEN 3-->
<!-- ELSE 4-->
<!-- END,-->
<!-- eo.create_time DESC-->
<!-- </otherwise>-->
<!-- </choose>-->
</mapper>