@ -177,6 +177,7 @@
</foreach>
</if>
</where>
order by law_sort,planned_month+0
</select>
<select id= "page" resultType= "com.ruoyi.programManagement.entity.BPlanEnterprise" >
select * from b_plan_enterprise
@ -349,7 +350,6 @@
) e ON a.enterprise_id = e.USC_CODE
</select>
<update id= "updateIdList" parameterType= "java.util.List" >
UPDATE b_plan_enterprise
SET status = 1
@ -386,7 +386,20 @@
</trim>
where id = #{id}
</update>
<update id= "updateEndTime" >
UPDATE b_enterprise_new a
INNER JOIN (
SELECT
USC_CODE,
MAX_EXAMINE_END_TIME
FROM
( SELECT ROW_NUMBER ( ) over ( PARTITION BY USC_CODE ORDER BY EXAMINE_END_TIME DESC ) rowId, USC_CODE, EXAMINE_END_TIME AS MAX_EXAMINE_END_TIME FROM sz_enfor_examine ) S
WHERE
rowId = 1
) c
ON a.enterprise_id = c.USC_CODE
SET a.EXAMINE_END_TIME = c.MAX_EXAMINE_END_TIME
</update>
<insert id= "insertPlan" parameterType= "BPlanEnterpriseRequest" useGeneratedKeys= "true" keyProperty= "id" >
@ -413,6 +426,7 @@
<if test= "userId != null" > user_id,</if>
<if test= "deptId != null" > dept_id,</if>
<if test= "uuto != null" > uuto,</if>
<if test= "checkStatus != null" > check_status,</if>
</trim>
<trim prefix= "values (" suffix= ")" suffixOverrides= "," >
@ -437,6 +451,7 @@
<if test= "userId != null" > #{userId},</if>
<if test= "deptId != null" > #{deptId},</if>
<if test= "uuto != null" > #{uuto},</if>
<if test= "checkStatus != null" > #{checkStatus},</if>
</trim>
</insert>