| | |
| | | |
| | | <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="orderId" column="order_id" jdbcType="BIGINT"/> |
| | | <result property="proId" column="pro_id" jdbcType="BIGINT"/> |
| | | <result property="batchId" column="batch_id" jdbcType="BIGINT"/> |
| | | <result property="processId" column="process_id" jdbcType="BIGINT"/> |
| | |
| | | |
| | | <resultMap id="PlanResultMap" type="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="orderId" column="order_id" jdbcType="BIGINT"/> |
| | | <result property="proId" column="pro_id" jdbcType="BIGINT"/> |
| | | <result property="batchId" column="batch_id" jdbcType="BIGINT"/> |
| | | <result property="processId" column="process_id" jdbcType="BIGINT"/> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id |
| | | id,order_id |
| | | ,pro_id,batch_id, |
| | | process_id,name,number, |
| | | status,creator, |
| | |
| | | </sql> |
| | | <sql id="part_Column_List" > |
| | | ${alias}.id, |
| | | ${alias}.order_id, |
| | | ${alias}.pro_id, |
| | | ${alias}.batch_id, |
| | | ${alias}.process_id, |
| | |
| | | <include refid="Base_Column_List"/> |
| | | from pr_assembly_plan |
| | | <trim prefix="where" suffixOverrides="and"> |
| | | <if test="orderId != null"> |
| | | order_id = #{orderId,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="proId != null"> |
| | | pro_id = #{proId,jdbcType=BIGINT} and |
| | | </if> |
| | |
| | | <include refid="Base_Column_List"/> |
| | | from pr_assembly_plan |
| | | <trim prefix="where" suffixOverrides="and"> |
| | | <if test="orderId != null"> |
| | | order_id = #{orderId,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="proId != null"> |
| | | pro_id = #{proId,jdbcType=BIGINT} and |
| | | </if> |
| | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan" |
| | | useGeneratedKeys="true"> |
| | | insert into pr_assembly_plan |
| | | ( id, pro_id, batch_id |
| | | ( id,order_id, pro_id, batch_id |
| | | , process_id, name, number |
| | | , status, creator |
| | | , dt, start_date, end_date |
| | | , deleted, content, input_number, output_number) |
| | | values ( #{id,jdbcType=BIGINT}, #{proId,jdbcType=BIGINT}, #{batchId,jdbcType=BIGINT} |
| | | values ( #{id,jdbcType=BIGINT},#{orderId,jdbcType=BIGINT}, #{proId,jdbcType=BIGINT}, #{batchId,jdbcType=BIGINT} |
| | | , #{processId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{number,jdbcType=INTEGER} |
| | | , #{status,jdbcType=TINYINT}, #{creator,jdbcType=VARCHAR} |
| | | , #{dt,jdbcType=TIMESTAMP}, #{startDate,jdbcType=VARCHAR}, #{endDate,jdbcType=VARCHAR} |
| | |
| | | insert into pr_assembly_plan |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="orderId != null">order_id,</if> |
| | | <if test="proId != null">pro_id,</if> |
| | | <if test="batchId != null">batch_id,</if> |
| | | <if test="processId != null">process_id,</if> |
| | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="orderId != null">#{orderId,jdbcType=BIGINT},</if> |
| | | <if test="proId != null">#{proId,jdbcType=BIGINT},</if> |
| | | <if test="batchId != null">#{batchId,jdbcType=BIGINT},</if> |
| | | <if test="processId != null">#{processId,jdbcType=BIGINT},</if> |
| | |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan"> |
| | | update pr_assembly_plan |
| | | <set> |
| | | <if test="orderId != null"> |
| | | order_id = #{orderId,jdbcType=BIGINT} , |
| | | </if> |
| | | <if test="proId != null"> |
| | | pro_id = #{proId,jdbcType=BIGINT}, |
| | | </if> |
| | |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan"> |
| | | update pr_assembly_plan |
| | | set pro_id = #{proId,jdbcType=BIGINT}, |
| | | set order_id = #{orderId,jdbcType=BIGINT}, |
| | | pro_id = #{proId,jdbcType=BIGINT}, |
| | | batch_id = #{batchId,jdbcType=BIGINT}, |
| | | process_id = #{processId,jdbcType=BIGINT}, |
| | | name = #{name,jdbcType=VARCHAR}, |
| | |
| | | </update> |
| | | |
| | | <select id="selectSome" resultMap="BaseResultMap"> |
| | | <!-- 一段时间开始的任务 --> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from pr_assembly_plan |
| | |
| | | pro_id = #{proId,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="startDate != null and startDate != '' "> |
| | | start_date = #{startDate,jdbcType=VARCHAR} and |
| | | start_date <![CDATA[ > ]]> #{startDate,jdbcType=VARCHAR} and |
| | | </if> |
| | | <if test="endDate != null and endDate != ''"> |
| | | end_date = #{endDate,jdbcType=VARCHAR} and |
| | | start_date <![CDATA[ < ]]> #{endDate,jdbcType=VARCHAR} and |
| | | </if> |
| | | </trim> |
| | | order by id desc |
| | |
| | | pro_id = #{proId,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="startDate != null and startDate != '' "> |
| | | start_date = #{startDate,jdbcType=VARCHAR} and |
| | | start_date <![CDATA[ > ]]> #{startDate,jdbcType=VARCHAR} and |
| | | </if> |
| | | <if test="endDate != null and endDate != ''"> |
| | | end_date = #{endDate,jdbcType=VARCHAR} and |
| | | start_date <![CDATA[ < ]]> #{endDate,jdbcType=VARCHAR} and |
| | | </if> |
| | | </trim> |
| | | </select> |