| | |
| | | t.update_user updateUser, |
| | | sp.pro_name proName |
| | | from t_pipe_out_plan t |
| | | left join sys_project sp on sp.pro_id = t.pro_id |
| | | where |
| | | t.is_use = 1 |
| | | and t.pro_id = #{proId} |
| | |
| | | GROUP BY b.time |
| | | ) c ON c.yearAndMoth= d.yearAndMoth |
| | | ) e ON e.Moth = a.month |
| | | WHERE b.pro_id = #{proId} |
| | | |
| | | WHERE b.pro_id = #{proId} and a.pipe_out_plan_id =#{planOutId} |
| | | ORDER BY a.month |
| | | </select> |
| | | |
| | | <insert id="insertMoth"> |
| | |
| | | pipe_out_plan_id, |
| | | </if> |
| | | <if test="month != null"> |
| | | month, |
| | | `month`, |
| | | </if> |
| | | <if test="planProduct != null"> |
| | | plan_product, |
| | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | <if test="id != null"> |
| | | id = #{id,jdbcType=VARCHAR}, |
| | | #{id,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="pipeOutPlanId != null"> |
| | | pipe_out_plan_id = #{pipeOutPlanId,jdbcType=VARCHAR}, |
| | | #{pipeOutPlanId,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="month != null"> |
| | | `month` = #{month,jdbcType=INTEGER}, |
| | | #{month,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="planProduct != null"> |
| | | plan_product= #{planProduct,jdbcType=INTEGER}, |
| | | #{planProduct,jdbcType=INTEGER}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | plan_year=#{planYear}, |
| | | </if> |
| | | <if test="needPipeNum != null"> |
| | | needPipeNum = #{needPipeNum}, |
| | | need_pipe_num = #{needPipeNum}, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | create_time=#{createTime}, |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteMoth"> |
| | | delete from t_pipe_out_plan_moth where plan_out_id=#{planOutId} |
| | | delete from t_pipe_out_plan_moth where pipe_out_plan_id=#{planOutId} |
| | | </delete> |
| | | |
| | | |