Parcourir la source

调整返回审批信息

daili il y a 3 ans
Parent
commit
2cbb995eab

+ 6 - 3
application-facade/src/main/resources/mapper/PreventMistakeMapper.xml

@@ -340,10 +340,11 @@
     <select id="getLatestApprovalInfo" resultType="com.factory.web.entity.pm.OnsiteApprovalPlan"><![CDATA[
         SELECT oap.benteler_plan_id,
                oap.approval_level,
-               a.approval_user_id,
                oap.`status`,
+               a.approval_user_id,
                a.reason,
-               a.updated_time
+               a.updated_time,
+               uu.username
         FROM onsite_approval_plan oap,
              (
                  SELECT oap.*
@@ -351,8 +352,10 @@
                  WHERE oap.benteler_plan_id = #{req.bentelerPlanId}
                  order by oap.status desc, oap.approval_level desc
                  limit 1
-             ) a
+             ) a,
+             us_user uu
         WHERE oap.benteler_plan_id = a.benteler_plan_id
+          and uu.id = a.approval_user_id
           AND oap.benteler_plan_id = #{req.bentelerPlanId}
         order by approval_level desc
         limit 1