| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.aps.core.mapper.ApsPlateProcessStatMapper"> |
| | | |
| | | <resultMap type="ApsPlateProcessStat" id="ApsPlateProcessStatResult"> |
| | | <resultMap type="com.aps.core.domain.ApsPlateProcessStat" id="ApsPlateProcessStatResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="workOrderNo" column="work_order_no" /> |
| | | <result property="processName" column="process_name" /> |
| | |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | <result property="warning" column="warning" /> |
| | | <result property="exceptionStatus" column="exception_status" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsPlateProcessStatVo"> |
| | | select id, work_order_no, process_name, num, route_process_number, current_process_number, production_quantity, |
| | | standard_time, process_total_time, process_plan_end_day,process_plan_start_day, order_plan_end_day, design_times, |
| | | batch_number, create_by, del_flag, warning |
| | | batch_number, create_by, del_flag, warning, |
| | | CASE WHEN <![CDATA[ process_plan_start_day <= NOW() OR process_plan_end_day <= NOW() ]]> THEN '是' ELSE '否' END as exception_status |
| | | from aps_plate_process_stat |
| | | </sql> |
| | | |
| | | <select id="selectApsPlateProcessStatList" parameterType="ApsPlateProcessStat" resultMap="ApsPlateProcessStatResult"> |
| | | <select id="selectApsPlateProcessStatList" parameterType="com.aps.core.domain.ApsPlateProcessStat" resultMap="ApsPlateProcessStatResult"> |
| | | <include refid="selectApsPlateProcessStatVo"/> |
| | | <where> |
| | | <if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if> |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertApsPlateProcessStat" parameterType="ApsPlateProcessStat"> |
| | | <insert id="insertApsPlateProcessStat" parameterType="com.aps.core.domain.ApsPlateProcessStat"> |
| | | insert into aps_plate_process_stat |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsPlateProcessStat" parameterType="ApsPlateProcessStat"> |
| | | <update id="updateApsPlateProcessStat" parameterType="com.aps.core.domain.ApsPlateProcessStat"> |
| | | update aps_plate_process_stat |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="workOrderNo != null">work_order_no = #{workOrderNo},</if> |
| | |
| | | delete from aps_plate_process_stat where batch_number != #{batchNumber} |
| | | </update> |
| | | |
| | | <insert id="batchInsertPlateStat" parameterType="ApsPlateProcessStat"> |
| | | <insert id="batchInsertPlateStat" parameterType="com.aps.core.domain.ApsPlateProcessStat"> |
| | | insert into aps_plate_process_stat |
| | | ( |
| | | id, |