Kaynağa Gözat

安全检查调试

jiawuxian 1 yıl önce
ebeveyn
işleme
cffe14a495

+ 10 - 4
soc-modules/soc-modules-core/src/main/resources/mapper/safetycheck/CoreSafecheckPlanMapper.xml

@@ -43,6 +43,7 @@
         <result property="publishTime" column="publish_time"/>
         <result property="withdrawTime" column="withdraw_time"/>
         <result property="effectiveTime" column="effective_time"/>
+        <result property="parentStatus" column="parent_status"/>
         <result property="execOrg" column="exec_org"/>
         <result property="execOrg" column="exec_org"/>
         <!--        <result property="checkOrg" column="check_org"/>-->
@@ -189,6 +190,9 @@
                  LEFT JOIN core_safecheck_plan_to_check_org_type typ ON c.id = typ.plan_id
         where c.id = #{id}
     </select>
+    <select id="get" resultType="com.xunmei.core.safetyCheck.domain.CoreSafecheckPlan">
+        select  * from core_safecheck_plan where id=#{id}
+    </select>
     <select id="selectCoreSafecheckPlanPage" resultMap="CoreSafecheckPlanResult">
         SELECT
         GROUP_CONCAT(DISTINCT role_name) as role_names,
@@ -225,6 +229,7 @@
         c.publish_time,
         c.withdraw_time,
         c.effective_time,
+        cp.plan_status as parent_status,
         o1.short_name AS plan_create_org_name,
         o2.type as plan_of_org_type,
         o2.short_name AS plan_of_org_name,
@@ -239,6 +244,7 @@
         dic.dict_label
         FROM
         core_safecheck_plan c
+        left join  core_safecheck_plan cp on c.parent_id=cp.id
         LEFT JOIN sys_org o1 ON c.plan_create_org_id = o1.id
         LEFT JOIN sys_org o2 ON c.plan_of_org_id = o2.id
         LEFT JOIN core_safecheck_plan_to_role pr ON c.id = pr.plan_id
@@ -251,7 +257,7 @@
         LEFT JOIN core_safecheck_plan_to_check_org_type typ ON c.id=typ.plan_id
         LEFT JOIN sys_dict_data dic ON dic.dict_value = typ.type_id
         WHERE
-        1 =1
+        c.is_deleted='0'
         and dic.dict_type='sys_org_type'
         <if test="check.planName != null  and check.planName != ''">
             and c.plan_name like concat('%', #{check.planName}, '%')
@@ -731,12 +737,12 @@
         SELECT #{newPlanId},
                `point_id`,
                `point_scan`,
-               `required`,
-               `of_org_id`,
                `create_time`,
                `update_time`,
                `create_by`,
-               `update_by`
+               `update_by`,
+               `required`,
+               `of_org_id`
         FROM core_safecheck_plan_to_point
         WHERE plan_id = #{planId}
     </insert>