|
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<resultMap type="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning" id="DetailsOfTheRefuelingPlanSpinningResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="timestampRandomCode" column="timestamp_random_code" />
|
|
|
+ <result property="macId" column="mac_id" />
|
|
|
<result property="machineId" column="machine_id" />
|
|
|
<result property="productionDigit" column="production_digit" />
|
|
|
<result property="currentColorCode" column="current_color_code" />
|
|
@@ -17,19 +18,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="planStatus" column="plan_status" />
|
|
|
<result property="number" column="number" />
|
|
|
<result property="remark" column="remark" />
|
|
|
- <result property="createbyId" column="create_by_id" />
|
|
|
- <result property="createbyName" column="create_by" />
|
|
|
- <result property="updatebyId" column="update_by_id" />
|
|
|
- <result property="updatebyName" column="update_by" />
|
|
|
+ <result property="createById" column="create_by_id" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="updateById" column="update_by_id" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="productId" column="product_id" />
|
|
|
<result property="salesmanId" column="salesman_id" />
|
|
|
<result property="productTypeName" column="productTypeName"/>
|
|
|
+ <result property="createById" column="create_by_id" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectDetailsOfTheRefuelingPlanSpinningVo">
|
|
|
- select id, timestamp_random_code, machine_id, production_digit, current_color_code, current_specification, current_lot_number, start_time, planned_end_time, plan_status, number, remark, create_by_id, create_by, update_by, update_by, create_time, update_time, product_id, salesman_id,productTypeName from {DBNAME}.details_of_the_refueling_plan_spinning
|
|
|
+ select id, timestamp_random_code, mac_id,machine_id, production_digit, current_color_code, current_specification, current_lot_number, start_time, planned_end_time,
|
|
|
+ plan_status, number, remark, create_by_id, create_by, update_by, update_by, create_time, update_time,
|
|
|
+ product_id, salesman_id,productTypeName,create_by_id,create_by,create_time
|
|
|
+
|
|
|
+ from {DBNAME}.details_of_the_refueling_plan_spinning
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectDetailsOfTheRefuelingPlanSpinningList" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning" resultMap="DetailsOfTheRefuelingPlanSpinningResult">
|
|
@@ -46,10 +54,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="plannedEndTime != null and plannedEndTime != ''"> and planned_end_time = #{plannedEndTime}</if>
|
|
|
<if test="planStatus != null and planStatus != ''"> and plan_status = #{planStatus}</if>
|
|
|
<if test="number != null and number != ''"> and number = #{number}</if>
|
|
|
- <if test="createbyId != null and createbyId != ''"> and create_by_id = #{createbyId}</if>
|
|
|
- <if test="createbyName != null and createbyName != ''"> and create_by like concat('%', #{createbyName}, '%')</if>
|
|
|
- <if test="updatebyId != null and updatebyId != ''"> and update_by_id = #{updatebyId}</if>
|
|
|
- <if test="updatebyName != null and updatebyName != ''"> and update_by like concat('%', #{updatebyName}, '%')</if>
|
|
|
+ <if test="createById != null and createById != ''"> and create_by_id = #{createById}</if>
|
|
|
+ <if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createby}, '%')</if>
|
|
|
+ <if test="updateById != null and updateById != ''"> and update_by_id = #{updateById}</if>
|
|
|
+ <if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateby}, '%')</if>
|
|
|
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
|
|
<if test="salesmanId != null and salesmanId != ''"> and salesman_id = #{salesmanId}</if>
|
|
|
and plan_status != 3
|
|
@@ -63,6 +71,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectDetailsOfTheRefuelingPlanSpinningListCount" resultType="java.lang.Integer">
|
|
|
select count(id) from {DBNAME}.details_of_the_refueling_plan_spinning where plan_status !=2
|
|
|
</select>
|
|
|
+ <select id="getCurrentProductionLineSuperior"
|
|
|
+ resultType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning">
|
|
|
+ <include refid="selectDetailsOfTheRefuelingPlanSpinningVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="id != null and id != ''"> and id != #{id}</if>
|
|
|
+ <if test="timestampRandomCode != null and timestampRandomCode != ''"> and timestamp_random_code = #{timestampRandomCode}</if>
|
|
|
+ <if test="macId != null and machineId != ''"> and mac_id = #{macId}</if>
|
|
|
+ <if test="machineId != null and machineId != ''"> and machine_id = #{machineId}</if>
|
|
|
+ <if test="productionDigit != null and productionDigit != ''"> and production_digit = #{productionDigit}</if>
|
|
|
+ <if test="currentColorCode != null and currentColorCode != ''"> and current_color_code = #{currentColorCode}</if>
|
|
|
+ <if test="currentSpecification != null and currentSpecification != ''"> and current_specification = #{currentSpecification}</if>
|
|
|
+ <if test="currentLotNumber != null and currentLotNumber != ''"> and current_lot_number = #{currentLotNumber}</if>
|
|
|
+ <if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
|
|
|
+ <if test="plannedEndTime != null and plannedEndTime != ''"> and planned_end_time = #{plannedEndTime}</if>
|
|
|
+ <if test="planStatus != null and planStatus != ''"> and plan_status = #{planStatus}</if>
|
|
|
+ <if test="number != null and number != ''"> and number = #{number}</if>
|
|
|
+ <if test="createById != null and createById != ''"> and create_by_id = #{createById}</if>
|
|
|
+ <if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
|
|
+ <if test="updateById != null and updateById != ''"> and update_by_id = #{updateById}</if>
|
|
|
+ <if test="updateBy != null and updateBy!= ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
|
|
+ <if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
|
|
+ <if test="salesmanId != null and salesmanId != ''"> and salesman_id = #{salesmanId}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="getIsTheOrderProductProduced"
|
|
|
+ parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning"
|
|
|
+ resultType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning">
|
|
|
+ select * from {DBNAME}.details_of_the_refueling_plan_spinning as dotrps
|
|
|
+ left join
|
|
|
+ {DBNAME}.sale_products as sp
|
|
|
+ on dotrps.product_id=sp.id and dotrps.salesman_id=sp.sale_order_no
|
|
|
+ where sp.`status`=4 and dotrps.id=#{id}
|
|
|
+ </select>
|
|
|
+ <select id="getUpdatePlanSpinningInfo"
|
|
|
+ resultType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning">
|
|
|
+ select * from {DBNAME}.details_of_the_refueling_plan_spinning as dotrps
|
|
|
+ left join
|
|
|
+ {DBNAME}.sale_products as sp
|
|
|
+ on dotrps.product_id=sp.id and dotrps.salesman_id=sp.sale_order_no
|
|
|
+ where sp.`status`!=4 and dotrps.id=#{id}
|
|
|
+ </select>
|
|
|
|
|
|
<insert id="insertDetailsOfTheRefuelingPlanSpinning" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into {DBNAME}.details_of_the_refueling_plan_spinning
|
|
@@ -78,14 +127,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="planStatus != null">plan_status,</if>
|
|
|
<if test="number != null">`number`,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
|
- <if test="createbyId != null">create_by_id,</if>
|
|
|
- <if test="createbyName != null">create_by,</if>
|
|
|
- <if test="updatebyId != null">update_by_id,</if>
|
|
|
- <if test="updatebyName != null">update_by,</if>
|
|
|
+ <if test="createById != null">create_by_id,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="updateById != null">update_by_id,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="productId != null">product_id,</if>
|
|
|
<if test="salesmanId != null">salesman_id,</if>
|
|
|
+ <if test="createById!=null and createById!=''">create_by_id,</if>
|
|
|
+ <if test="createBy!=null and createBy!=''">create_by,</if>
|
|
|
+ <if test="createTime!=null and createTime!=''">create_time,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="timestampRandomCode != null">#{timestampRandomCode},</if>
|
|
@@ -99,14 +151,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="planStatus != null">#{planStatus},</if>
|
|
|
<if test="number != null">#{number},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
- <if test="createbyId != null">#{createbyId},</if>
|
|
|
- <if test="createbyName != null">#{createbyName},</if>
|
|
|
- <if test="updatebyId != null">#{updatebyId},</if>
|
|
|
- <if test="updatebyName != null">#{updatebyName},</if>
|
|
|
+ <if test="createById != null">#{createById},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="updateById != null">#{updatebyId},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="productId != null">#{productId},</if>
|
|
|
<if test="salesmanId != null">#{salesmanId},</if>
|
|
|
+ <if test="createById!=null and createById!=''">#{createById},</if>
|
|
|
+ <if test="createBy!=null and createBy!=''">#{createBy},</if>
|
|
|
+ <if test="createTime!=null and createTime!=''">#{createTime},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -124,10 +179,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="planStatus != null">plan_status = #{planStatus},</if>
|
|
|
<if test="number != null">`number` = #{number},</if>
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
- <if test="createbyId != null">create_by_id = #{createbyId},</if>
|
|
|
- <if test="createbyName != null">createby_name = #{createbyName},</if>
|
|
|
- <if test="updatebyId != null">updateby_id = #{updatebyId},</if>
|
|
|
- <if test="updatebyName != null">updateby_name = #{updatebyName},</if>
|
|
|
+ <if test="createById != null">create_by_id = #{createById},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="updateById != null">update_by_id = #{updateById},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="productId != null">product_id = #{productId},</if>
|
|
@@ -166,7 +221,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
`number`,
|
|
|
`product_id`,
|
|
|
`salesman_id`,
|
|
|
- `productTypeName`
|
|
|
+ `productTypeName`,
|
|
|
+ `plan_type`,
|
|
|
+ create_by,
|
|
|
+ create_by_id,
|
|
|
+ create_time
|
|
|
</trim>
|
|
|
VALUES
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
@@ -184,7 +243,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
#{item.number},
|
|
|
#{item.productId},
|
|
|
#{item.salesmanId},
|
|
|
- #{item.productTypeName}
|
|
|
+ #{item.productTypeName},
|
|
|
+ #{item.planType},
|
|
|
+ #{item.createBy},
|
|
|
+ #{item.createById},
|
|
|
+ #{item.createTime}
|
|
|
</trim>
|
|
|
</foreach>
|
|
|
</insert>
|