Przeglądaj źródła

计划修改为审批过后的机会

guozx 3 lat temu
rodzic
commit
fa044fc8ea

+ 6 - 2
application-task/src/main/resources/mappers/FirstTaskMapper.xml

@@ -22,10 +22,14 @@
 
 
 
-    <select id="getCalenderFirstForType" resultMap="calendarFirst">  <!-- todo  这个还需要状态 -->
-        SELECT b.* FROM  benteler_plan a,first_article_calendar b
+    <select id="getCalenderFirstForType" resultMap="calendarFirst">
+        SELECT b.* FROM  benteler_plan a,first_article_calendar b,onsite_approval_plan oap
         WHERE a.id=b.benteler_plan_id and a.pause_flag=0 and a.deleted=0 and a.effective_date &lt;= now()
         and b.type_flag=${type_flag}
+        and a.id = oap.benteler_plan_id
+        and a.plan_type = 1
+        and oap.approval_level = 2
+        and oap.status = 1
     </select>
 
     <insert id="insertFirstTask" parameterType="com.jihengbel.intelligent.applicationtask.entry.FirstTask">

+ 5 - 1
application-task/src/main/resources/mappers/OnsiteTaskMapper.xml

@@ -31,7 +31,7 @@
     </select>
 
     <select id="getCalenderOnsitesForType" resultMap="calendarOnsite">  <!-- todo  这个还需要状态 -->
-        SELECT b.* FROM  benteler_plan a,onsite_calendar b
+        SELECT b.* FROM  benteler_plan a,onsite_calendar b,onsite_approval_plan oap
         WHERE
         a.id=b.benteler_plan_id and a.pause_flag=0 and a.deleted=0 and a.effective_date &lt;= now()
         and b.type_flag=${type_flag}
@@ -41,6 +41,10 @@
         <if test="month_day != null and month_day != ''">
             and  b.month_day = ${month_day}
         </if>
+        and a.id = oap.benteler_plan_id
+        and a.plan_type = 2
+        and oap.approval_level = 2
+        and oap.status = 1
 
     </select>