Commit 491fb535 authored by tangwei's avatar tangwei

修改查询sql

parent d291b82f
......@@ -41,8 +41,9 @@ public class PlanController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "巡检计划查询", notes = "巡检计划查询")
@RequestMapping(value = "/listNew", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse qryCheckInfoPageNew(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false)PlanInfoPageParam queryRequests,
@ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) {
public CommonResponse qryCheckInfoPageNew(@ApiParam(value = "查询条件", required = false)
@RequestBody(required = false)PlanInfoPageParam queryRequests,
@ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) {
ReginParams reginParams = getSelectedOrgInfo();
queryRequests.setBizOrgCode(reginParams.getPersonIdentity().getCompanyBizOrgCode());
......
......@@ -1237,7 +1237,7 @@ public class PointController extends AbstractBaseController {
@ApiParam(value = "点名称") @RequestParam(value = "name", required = false) String name,
@RequestParam(value = "current", defaultValue = "1") int current,
@RequestParam(value = "size", defaultValue = "10") int size) {
return CommonResponseUtil.success(iPointService.queryPointList4Route(riskSourceId, pointNo, name, current, size));
return CommonResponseUtil.success(iPointService.queryPointList4Route(riskSourceId, pointNo, name, current-1, size));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -181,7 +181,7 @@
<if test="remark!=null"> and a.remark like concat(concat("%",#{remark}),"%")</if>
<if test="orgCode!=null"> and (a.org_code LIKE CONCAT( #{orgCode}, '-%' ) or a.org_code= #{orgCode} )</if>
<if test="userId!=null"> and FIND_IN_SET(#{userId},a.user_id)</if>
<if test="bizOrgCode!=null"> and b.biz_org_code like concat(concat("%",#{bizOrgCode}),"%")</if>
<if test="bizOrgCode!=null"> and b.biz_org_code like concat(#{bizOrgCode},"%")</if>
order by a.id
</select>
......
......@@ -56,7 +56,7 @@
e. NAME routeName,
d.point_no pointNo,
d. NAME pointName,
a.user_id userName,
a.user_name userName,
a.user_dept userDept,
date_format(
a.begin_time,
......
......@@ -89,7 +89,7 @@
<if test="name!=null">AND r.`name` LIKE CONCAT('%', #{name}, '%')</if>
<if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if>
<if test="orgCode!=null">AND r.org_Code = #{orgCode}</if>
<if test="bizOrgCode!=null">AND r.biz_org_code = #{bizOrgCode}</if>
<if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if>
<!-- <if test="deptId!=null">AND r.dept_id = #{deptId}</if> -->
<choose>
......@@ -115,7 +115,7 @@
<if test="name!=null">AND r.`name` LIKE CONCAT('%', #{name}, '%')</if>
<if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if>
<if test="orgCode!=null">AND r.org_Code = #{orgCode}</if>
<if test="bizOrgCode!=null">AND r.biz_org_code = #{bizOrgCode}</if>
<if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if>
<choose>
<when test="deptId > 0 " > AND r.dept_id = #{deptId}</when>
<when test="deptId == -1 " > AND r.dept_id in(0,-1)</when>
......@@ -402,6 +402,6 @@
</select>
<select id="queryRoutesByOrgCode" resultType="com.yeejoin.amos.patrol.dao.entity.Route">
SELECT * FROM p_route r where r.is_delete = 0 and r.biz_org_code = #{orgCode}
SELECT * FROM p_route r where r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}, '%'))
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment