Commit b5bd46e7 authored by tangwei's avatar tangwei

新增接口

parent 268d9fb5
......@@ -32,6 +32,39 @@ public class PlanController extends AbstractBaseController {
@Autowired
private IPlanService planService;
/**
* 新加接口
*
* **/
@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) {
ReginParams reginParams = getSelectedOrgInfo();
queryRequests.setBizOrgCode(reginParams.getPersonIdentity().getCompanyBizOrgCode());
Page<HashMap<String, Object>> list = planService.getPlanInfo(queryRequests);
return CommonResponseUtil.success(list);
}
/**
* 巡检计划查询
*
......
......@@ -42,6 +42,20 @@ public class PlanInfoPageParam extends CommonPageable {
*/
private String userId;
/**
* 单位
* */
private String bizOrgCode;
public String getBizOrgCode() {
return bizOrgCode;
}
public void setBizOrgCode(String bizOrgCode) {
this.bizOrgCode = bizOrgCode;
}
public String getDeptId() {
return deptId;
}
......
......@@ -125,6 +125,9 @@
<if test="deptId!=null"> and a.dept_id = #{deptId}</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>
</select>
<!--巡检计划查询 -->
<select id="getPlanInfo" resultType="java.util.HashMap">
......@@ -143,6 +146,8 @@
<if test="remark!=null"> and a.remark1 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>
order by a.id desc
<choose>
<when test="pageSize==-1"></when>
......
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