Commit f9a4e600 authored by tangwei's avatar tangwei

修改无计划巡检归属

parent 0f343b88
...@@ -226,10 +226,19 @@ public class CheckController extends AbstractBaseController { ...@@ -226,10 +226,19 @@ public class CheckController extends AbstractBaseController {
requestParam.setOrgCode(orgCode); requestParam.setOrgCode(orgCode);
requestParam.setUserId(getUserId()); requestParam.setUserId(getUserId());
requestParam.setCheckDepartmentId(personIdentity.getCompanyId()); requestParam.setCheckDepartmentId(reginParams.getDepartment().getSequenceNbr().toString());
requestParam.setUserName(personIdentity.getPersonName()); requestParam.setUserName(personIdentity.getPersonName());
requestParam.setDepId(personIdentity.getCompanyId());
requestParam.setDepName(personIdentity.getCompanyName()); if (reginParams.getDepartment() != null && reginParams.getDepartment().getSequenceNbr() != null) {
requestParam.setDepId(reginParams.getDepartment().getSequenceNbr().toString());
}
if (reginParams.getDepartment() != null) {
requestParam.setDepName(reginParams.getDepartment().getDepartmentName());
}
CheckDto checkDto = checkService.saveCheckRecordNew(requestParam,token); CheckDto checkDto = checkService.saveCheckRecordNew(requestParam,token);
if(StringUtil.isNotEmpty(checkDto)){ if(StringUtil.isNotEmpty(checkDto)){
asyncTaskf(checkDto.getCheckId()); asyncTaskf(checkDto.getCheckId());
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
and FIND_IN_SET(#{dangerId}, t.dangerIds) and FIND_IN_SET(#{dangerId}, t.dangerIds)
</if> </if>
<if test="bizOrgCode != null and bizOrgCode != ''"> <if test="bizOrgCode != null and bizOrgCode != ''">
and d.biz_org_code LIKE CONCAT(#{bizOrgCode},'%') and a.org_code LIKE CONCAT(#{bizOrgCode},'%')
</if> </if>
</trim> </trim>
</select> </select>
...@@ -242,7 +242,26 @@ ...@@ -242,7 +242,26 @@
) as is_ok, ) as is_ok,
a.score, a.score,
d.`name` AS `route_name`, d.`name` AS `route_name`,
a.check_mode,
(
CASE
WHEN a.check_mode = 'QR'
THEN '二维码巡检'
WHEN a.check_mode = 'MOBILE'
THEN '移动点巡检'
WHEN a.check_mode = 'NFC'
THEN 'NFC巡检'
WHEN a.check_mode = 'WEB'
THEN '录入检查点巡检'
WHEN a.check_mode = 'WEB_OUT'
THEN '外来检查'
ELSE
'系统自检'
END
) as check_mode,
e.`name` AS `plan_name`, e.`name` AS `plan_name`,
a.plan_task_id, a.plan_task_id,
a.plan_id, a.plan_id,
...@@ -290,7 +309,7 @@ ...@@ -290,7 +309,7 @@
and FIND_IN_SET(#{dangerId}, t.dangerIds) and FIND_IN_SET(#{dangerId}, t.dangerIds)
</if> </if>
<if test="bizOrgCode != null and bizOrgCode != ''"> <if test="bizOrgCode != null and bizOrgCode != ''">
and d.biz_org_code LIKE CONCAT(#{bizOrgCode},'%') and a.org_code LIKE CONCAT(#{bizOrgCode},'%')
</if> </if>
</trim> </trim>
order by ${orderBy} order by ${orderBy}
......
...@@ -486,6 +486,8 @@ ...@@ -486,6 +486,8 @@
(select p_point.`name` from p_point where p_point.id= temp2.pointId) pointName, (select p_point.`name` from p_point where p_point.id= temp2.pointId) pointName,
(select p_plan.`name` from p_plan where p_plan.id= temp2.planId) planName, (select p_plan.`name` from p_plan where p_plan.id= temp2.planId) planName,
(select p_route.`name` from p_route where p_route.id= temp2.routeId) routeName, (select p_route.`name` from p_route where p_route.id= temp2.routeId) routeName,
(select p_route.`biz_org_code` from p_route where p_route.id= temp2.routeId) orgCode,
temp2.* temp2.*
FROM FROM
p_point_inputitem ppi p_point_inputitem ppi
...@@ -514,7 +516,7 @@ ...@@ -514,7 +516,7 @@
ptd.route_id routeId, ptd.route_id routeId,
ptd.plan_id planId, ptd.plan_id planId,
ptd.user_id AS userId, ptd.user_id AS userId,
ptd.org_code AS orgCode,
ptd.end_time AS endTime, ptd.end_time AS endTime,
pptd.id as planTaskDetailId, pptd.id as planTaskDetailId,
(select p_plan.dept_id from p_plan where p_plan.id=ptd.plan_id) depId (select p_plan.dept_id from p_plan where p_plan.id=ptd.plan_id) depId
......
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