<?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.yuanchu.mom.mapper.ManufactureSchedulingMapper">
|
|
<select id="selectScheduling" resultType="map">
|
SELECT m.`id`, DATE_FORMAT(m.`create_time`, '%Y-%m-%d') createTime,
|
DATE_FORMAT(m.`end_time`, '%Y-%m-%d') endTime, m.`scheduled`, m.`go_state`,
|
DATE_FORMAT(m.`start_time`, '%Y-%m-%d') startTime
|
FROM manufacture_scheduling m
|
WHERE m.`manufacture_order_id` = 3
|
AND m.`state` = 1
|
</select>
|
|
<select id="selectProduceTable" resultType="map">
|
SELECT m.`id`, o.`name`, o.`specifications`, o.`unit`, m.`scheduled`, o.`proname`, o.`saleman`,
|
o.`downman`, DATE_FORMAT(m.`start_time`, '%Y-%m-%d') startTime, DATE_FORMAT(m.`end_time`, '%Y-%m-%d') endTime
|
FROM manufacture_scheduling m, manufacture_order o
|
WHERE m.`manufacture_order_id` = #{manOrdId}
|
AND m.`manufacture_order_id` = o.`id`
|
AND m.`state` = 1
|
<if test="productName != null and productName != ''">
|
AND o.`name` LIKE CONCAT('%', #{productName}, '%')
|
</if>
|
<if test="startTime != null and startTime != ''">
|
AND m.`start_time` >= #{startTime}
|
</if>
|
<if test="endTime != null and endTime != ''">
|
AND m.`end_time` <![CDATA[ <= ]]> #{endTime}
|
</if>
|
</select>
|
|
<select id="sePros" resultType="map">
|
SELECT s.`scheduled`, o.`order_code`, o.`customer_code`, o.`name`, o.`specifications`, o.`unit`,
|
DATE_FORMAT(o.`downTime`, '%Y-%m-%d') downTime, DATE_FORMAT(o.`delTime`, '%Y-%m-%d') delTime
|
FROM manufacture_scheduling s, manufacture_order o
|
WHERE s.`manufacture_order_id` = o.`id`
|
AND s.`id` = #{schedulingId}
|
</select>
|
</mapper>
|