Commit d291b82f authored by tangwei's avatar tangwei

修改接口

parent 1c4e1494
......@@ -56,7 +56,17 @@ public class PlanController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "巡检计划查询", notes = "巡检计划查询")
@RequestMapping(value = "/queryPlanByOrgCodeNew", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse qryCheckInfoNew() {
PlanInfoPageParam param =new PlanInfoPageParam();
ReginParams reginParams = getSelectedOrgInfo();
param.setBizOrgCode(reginParams.getPersonIdentity().getCompanyBizOrgCode());
List<HashMap<String, Object>> list = planService.getPlanInfoNoPage(param);
return CommonResponseUtil.success(list);
}
......
......@@ -33,4 +33,6 @@ public class PlanTaskVo {
private String userDept;
private String statusName;
}
......@@ -133,6 +133,15 @@
<select id="getPlanInfo" resultType="java.util.HashMap">
SELECT
a.id,a.name , IFNULL(a.plan_begin,"") planBegin,a.`status`,
(case a.plan_type
when 1 THEN '天'
when 2 THEN '周'
when 3 THEN '月'
else '年' END) as planTypeName,
(case a.is_fixed_date
when 0 THEN '否'
else '是' END) as isFixedDateName,
IFNULL(a.plan_end,"") planEnd,a.plan_end planEnd,a.plan_type planType,
b.name routeName,a.route_id routeId,a.is_fixed_date isFixedDate,a.remark,a.remark1
FROM
......@@ -157,7 +166,10 @@
<!--巡检计划查询不分页 -->
<select id="getPlanInfoNoPage" resultType="java.util.HashMap">
SELECT
a.id,a.name ,a.plan_type planType,b.name routeName,a.route_id routeId,a.is_fixed_date isFixedDate,a.remark
cast(a.id as char) as id,
a.name ,a.plan_type planType,b.name routeName,a.route_id routeId,a.is_fixed_date isFixedDate,a.remark
FROM
p_plan a,
p_route b
......@@ -169,6 +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>
order by a.id
</select>
......
......@@ -67,6 +67,15 @@
'%Y-%m-%d %H:%i:%s'
) endTime,
b.is_finish status,
(case b.is_finish
when 0 THEN '尚未巡检'
when 1 THEN '按时完成'
else '超时漏检' END) as `statusName`,
c.dept_id deptId,
c.remark1 as remark
FROM p_plan_task_detail b
......
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