|
@@ -0,0 +1,224 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.zkqy.amichi.mapper.ExportproductionschedulingMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.zkqy.amichi.domain.Exportproductionscheduling" id="ExportproductionschedulingResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="orderNo" column="order_no" />
|
|
|
+ <result property="quantity" column="quantity" />
|
|
|
+ <result property="placeanorder" column="placeanorder" />
|
|
|
+ <result property="delivergoods" column="delivergoods" />
|
|
|
+ <result property="remind" column="remind" />
|
|
|
+ <result property="plannedProductionDate" column="planned_production_date" />
|
|
|
+ <result property="welding" column="welding" />
|
|
|
+ <result property="rqgd" column="rqgd" />
|
|
|
+ <result property="threadhead" column="threadhead" />
|
|
|
+ <result property="paint" column="paint" />
|
|
|
+ <result property="balance" column="balance" />
|
|
|
+ <result property="finalassembly" column="finalassembly" />
|
|
|
+ <result property="switchas" column="switchas" />
|
|
|
+ <result property="packing" column="packing" />
|
|
|
+ <result property="demand" column="demand" />
|
|
|
+ <result property="sparea" column="sparea" />
|
|
|
+ <result property="spareb" column="spareb" />
|
|
|
+ <result property="sparec" column="sparec" />
|
|
|
+ <result property="state" column="state" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="createById" column="create_by_id" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateById" column="update_by_id" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="dataApprovalStatus" column="data_approval_status" />
|
|
|
+ <result property="processKey" column="process_key" />
|
|
|
+ <result property="taskProcessKey" column="task_process_key" />
|
|
|
+ <result property="taskNodeKey" column="task_node_key" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ <result property="materialNo" column="material_no"/>
|
|
|
+ <result property="planTotalWorkingHours" column="plan_total_working_hours"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectExportproductionschedulingVo">
|
|
|
+ select id, order_no, quantity, placeanorder, delivergoods, remind, planned_production_date, welding, rqgd, threadhead,
|
|
|
+ paint, balance, finalassembly, switchas, packing, demand, sparea, spareb, sparec, state, remark, create_by_id,
|
|
|
+ create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key,
|
|
|
+ task_node_key,type,material_no,plan_total_working_hours from {DBNAME}.exportproductionscheduling
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectExportproductionschedulingList" parameterType="com.zkqy.amichi.domain.Exportproductionscheduling" resultMap="ExportproductionschedulingResult">
|
|
|
+ <include refid="selectExportproductionschedulingVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
|
|
+ <if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
|
|
+ <if test="placeanorder != null and placeanorder != ''"> and placeanorder = #{placeanorder}</if>
|
|
|
+ <if test="delivergoods != null and delivergoods != ''"> and delivergoods = #{delivergoods}</if>
|
|
|
+ <if test="remind != null and remind != ''"> and remind = #{remind}</if>
|
|
|
+ <if test="plannedProductionDate != null and plannedProductionDate != ''"> and planned_production_date = #{plannedProductionDate}</if>
|
|
|
+ <if test="welding != null and welding != ''"> and welding = #{welding}</if>
|
|
|
+ <if test="rqgd != null and rqgd != ''"> and rqgd = #{rqgd}</if>
|
|
|
+ <if test="threadhead != null and threadhead != ''"> and threadhead = #{threadhead}</if>
|
|
|
+ <if test="paint != null and paint != ''"> and paint = #{paint}</if>
|
|
|
+ <if test="balance != null and balance != ''"> and balance = #{balance}</if>
|
|
|
+ <if test="finalassembly != null and finalassembly != ''"> and finalassembly = #{finalassembly}</if>
|
|
|
+ <if test="switchas != null and switchas != ''"> and switchas = #{switchas}</if>
|
|
|
+ <if test="packing != null and packing != ''"> and packing = #{packing}</if>
|
|
|
+ <if test="demand != null and demand != ''"> and demand = #{demand}</if>
|
|
|
+ <if test="sparea != null and sparea != ''"> and sparea = #{sparea}</if>
|
|
|
+ <if test="spareb != null and spareb != ''"> and spareb = #{spareb}</if>
|
|
|
+ <if test="sparec != null and sparec != ''"> and sparec = #{sparec}</if>
|
|
|
+ <if test="state != null and state != ''"> and `state` = #{state}</if>
|
|
|
+ <if test="createById != null "> and create_by_id = #{createById}</if>
|
|
|
+ <if test="updateById != null "> and update_by_id = #{updateById}</if>
|
|
|
+ <if test="dataApprovalStatus != null and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
|
|
|
+ <if test="processKey != null and processKey != ''"> and process_key = #{processKey}</if>
|
|
|
+ <if test="taskProcessKey != null and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
|
|
|
+ <if test="taskNodeKey != null and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
|
|
|
+ <if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
|
|
+ <if test="type != null and type != ''"> and `type` = #{type} </if>
|
|
|
+ <if test="startTime != null and endTime != null ">
|
|
|
+ and DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="materialNo != null and materialNo != null ">
|
|
|
+ and `material_no` = #{materialNo}
|
|
|
+ </if>
|
|
|
+ order by delivergoods asc,plan_total_working_hours asc,material_no desc
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectExportproductionschedulingById" parameterType="Long" resultMap="ExportproductionschedulingResult">
|
|
|
+ <include refid="selectExportproductionschedulingVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertExportproductionscheduling" parameterType="com.zkqy.amichi.domain.Exportproductionscheduling" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into {DBNAME}.exportproductionscheduling
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="orderNo != null">order_no,</if>
|
|
|
+ <if test="quantity != null">quantity,</if>
|
|
|
+ <if test="placeanorder != null">placeanorder,</if>
|
|
|
+ <if test="delivergoods != null">delivergoods,</if>
|
|
|
+ <if test="remind != null">remind,</if>
|
|
|
+ <if test="plannedProductionDate != null">planned_production_date,</if>
|
|
|
+ <if test="welding != null">welding,</if>
|
|
|
+ <if test="rqgd != null">rqgd,</if>
|
|
|
+ <if test="threadhead != null">threadhead,</if>
|
|
|
+ <if test="paint != null">paint,</if>
|
|
|
+ <if test="balance != null">balance,</if>
|
|
|
+ <if test="finalassembly != null">finalassembly,</if>
|
|
|
+ <if test="switchas != null">switchas,</if>
|
|
|
+ <if test="packing != null">packing,</if>
|
|
|
+ <if test="demand != null">demand,</if>
|
|
|
+ <if test="sparea != null">sparea,</if>
|
|
|
+ <if test="spareb != null">spareb,</if>
|
|
|
+ <if test="sparec != null">sparec,</if>
|
|
|
+ <if test="state != null">`state`,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="createById != null">create_by_id,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateById != null">update_by_id,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="dataApprovalStatus != null">data_approval_status,</if>
|
|
|
+ <if test="processKey != null">process_key,</if>
|
|
|
+ <if test="taskProcessKey != null">task_process_key,</if>
|
|
|
+ <if test="taskNodeKey != null">task_node_key,</if>
|
|
|
+ <if test="type != null">`type`,</if>
|
|
|
+ <if test="materialNo != null">`material_no`,</if>
|
|
|
+ <if test="planTotalWorkingHours != null">`plan_total_working_hours`,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="orderNo != null">#{orderNo},</if>
|
|
|
+ <if test="quantity != null">#{quantity},</if>
|
|
|
+ <if test="placeanorder != null">#{placeanorder},</if>
|
|
|
+ <if test="delivergoods != null">#{delivergoods},</if>
|
|
|
+ <if test="remind != null">#{remind},</if>
|
|
|
+ <if test="plannedProductionDate != null">#{plannedProductionDate},</if>
|
|
|
+ <if test="welding != null">#{welding},</if>
|
|
|
+ <if test="rqgd != null">#{rqgd},</if>
|
|
|
+ <if test="threadhead != null">#{threadhead},</if>
|
|
|
+ <if test="paint != null">#{paint},</if>
|
|
|
+ <if test="balance != null">#{balance},</if>
|
|
|
+ <if test="finalassembly != null">#{finalassembly},</if>
|
|
|
+ <if test="switchas != null">#{switchas},</if>
|
|
|
+ <if test="packing != null">#{packing},</if>
|
|
|
+ <if test="demand != null">#{demand},</if>
|
|
|
+ <if test="sparea != null">#{sparea},</if>
|
|
|
+ <if test="spareb != null">#{spareb},</if>
|
|
|
+ <if test="sparec != null">#{sparec},</if>
|
|
|
+ <if test="state != null">#{state},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="createById != null">#{createById},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateById != null">#{updateById},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
|
|
|
+ <if test="processKey != null">#{processKey},</if>
|
|
|
+ <if test="taskProcessKey != null">#{taskProcessKey},</if>
|
|
|
+ <if test="taskNodeKey != null">#{taskNodeKey},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
+ <if test="materialNo != null">#{materialNo},</if>
|
|
|
+ <if test="planTotalWorkingHours != null">#{planTotalWorkingHours},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateExportproductionscheduling" parameterType="com.zkqy.amichi.domain.Exportproductionscheduling">
|
|
|
+ update {DBNAME}.exportproductionscheduling
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="orderNo != null">order_no = #{orderNo},</if>
|
|
|
+ <if test="quantity != null">quantity = #{quantity},</if>
|
|
|
+ <if test="placeanorder != null">placeanorder = #{placeanorder},</if>
|
|
|
+ <if test="delivergoods != null">delivergoods = #{delivergoods},</if>
|
|
|
+ <if test="remind != null">remind = #{remind},</if>
|
|
|
+ <if test="plannedProductionDate != null">planned_production_date = #{plannedProductionDate},</if>
|
|
|
+ <if test="welding != null">welding = #{welding},</if>
|
|
|
+ <if test="rqgd != null">rqgd = #{rqgd},</if>
|
|
|
+ <if test="threadhead != null">threadhead = #{threadhead},</if>
|
|
|
+ <if test="paint != null">paint = #{paint},</if>
|
|
|
+ <if test="balance != null">balance = #{balance},</if>
|
|
|
+ <if test="finalassembly != null">finalassembly = #{finalassembly},</if>
|
|
|
+ <if test="switchas != null">switchas = #{switchas},</if>
|
|
|
+ <if test="packing != null">packing = #{packing},</if>
|
|
|
+ <if test="demand != null">demand = #{demand},</if>
|
|
|
+ <if test="sparea != null">sparea = #{sparea},</if>
|
|
|
+ <if test="spareb != null">spareb = #{spareb},</if>
|
|
|
+ <if test="sparec != null">sparec = #{sparec},</if>
|
|
|
+ <if test="state != null">`state` = #{state},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="createById != null">create_by_id = #{createById},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateById != null">update_by_id = #{updateById},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
|
|
|
+ <if test="processKey != null">process_key = #{processKey},</if>
|
|
|
+ <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
|
|
|
+ <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
|
|
|
+ <if test="type != null">`type` = #{type},</if>
|
|
|
+ <if test="materialNo != null">material_no=#{materialNo},</if>
|
|
|
+ <if test="planTotalWorkingHours != null">`plan_total_working_hours`=#{planTotalWorkingHours},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteExportproductionschedulingById" parameterType="Long">
|
|
|
+ delete from {DBNAME}.exportproductionscheduling where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteExportproductionschedulingByIds" parameterType="String">
|
|
|
+ delete from {DBNAME}.exportproductionscheduling where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|