Commit 644a0a50 authored by tangwei's avatar tangwei

修改无计划巡检权限归属

parent 67494093
...@@ -226,10 +226,16 @@ public class CheckController extends AbstractBaseController { ...@@ -226,10 +226,16 @@ 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());
......
...@@ -37,7 +37,7 @@ public class PlanTaskJob { ...@@ -37,7 +37,7 @@ public class PlanTaskJob {
*/ */
@Scheduled(cron = "${jobs.cron}") @Scheduled(cron = "${jobs.cron}")
public void scheduleJob() { public void scheduleJob() {
System.out.println("开始执行定时任务============");
if("cluster".equals(cluster)){ if("cluster".equals(cluster)){
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
String time=format.format(new Date()); String time=format.format(new Date());
......
...@@ -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,23 @@ ...@@ -242,7 +242,23 @@
) 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 +306,7 @@ ...@@ -290,7 +306,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}
......
...@@ -494,6 +494,7 @@ ...@@ -494,6 +494,7 @@
(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
...@@ -522,7 +523,7 @@ ...@@ -522,7 +523,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