|
|
|
@ -39,6 +39,7 @@
|
|
|
|
|
<result property="Active" column="Active"/>
|
|
|
|
|
<result property="enterpriseId" column="Enterprise_Id"/>
|
|
|
|
|
<result property="enterpriseCode" column="Enterprise_Code"/>
|
|
|
|
|
<result property="workorderCode" column="workorderCode"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="pagination_tail">
|
|
|
|
|
limit #{page.pageOffset} , #{page.rows}
|
|
|
|
@ -49,7 +50,8 @@
|
|
|
|
|
<select id="selectOdsProcureOutOrderListZU" parameterType="OdsProcureOutOrder" resultMap="OdsProcureOutOrderResult">
|
|
|
|
|
SELECT
|
|
|
|
|
Produce_Code,
|
|
|
|
|
User_Defined1
|
|
|
|
|
User_Defined1,
|
|
|
|
|
MAX(Create_Date) AS Create_Date
|
|
|
|
|
FROM
|
|
|
|
|
ods_procure_out_order
|
|
|
|
|
where
|
|
|
|
@ -58,6 +60,8 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="userDefined1 != null and userDefined1 != ''"> and User_Defined1 = #{userDefined1}</if>
|
|
|
|
|
GROUP BY Produce_Code,User_Defined1
|
|
|
|
|
ORDER BY
|
|
|
|
|
Create_Date DESC;
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectOdsProcureOutOrderListZUKEN" resultType="java.lang.String">
|
|
|
|
|
SELECT DISTINCT
|
|
|
|
@ -81,13 +85,10 @@
|
|
|
|
|
<if test="userDefined1 != null and userDefined1 != ''"> and User_Defined1 = #{userDefined1}</if>
|
|
|
|
|
AND User_Defined3 ='x'
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectOdsProcureOutOrderListZUT" parameterType="OdsProcureOutOrder"
|
|
|
|
|
resultMap="OdsProcureOutOrderResult">
|
|
|
|
|
<select id="selectOdsProcureOutOrderListZUT" parameterType="OdsProcureOutOrder" resultMap="OdsProcureOutOrderResult">
|
|
|
|
|
<include refid="selectOdsProcureOutOrderVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="produceCode != null and produceCode != ''">and Produce_Code like concat('%', #{produceCode},
|
|
|
|
|
'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="produceCode != null and produceCode != ''"> and Produce_Code like concat('%', #{produceCode}, '%')</if>
|
|
|
|
|
<if test="userDefined1 != null and userDefined1 != ''"> and User_Defined1 = #{userDefined1}</if>
|
|
|
|
|
<if test="Active != null and Active != ''"> and Active = #{Active}</if>
|
|
|
|
|
</where>
|
|
|
|
@ -105,12 +106,8 @@
|
|
|
|
|
<if test="outNumber != null "> and Out_Number = #{outNumber}</if>
|
|
|
|
|
<if test="locCode != null and locCode != ''"> and Loc_Code = #{locCode}</if>
|
|
|
|
|
<if test="locDesc != null and locDesc != ''"> and Loc_Desc = #{locDesc}</if>
|
|
|
|
|
<if test="productionLineDesc != null and productionLineDesc != ''">and Production_Line_Desc =
|
|
|
|
|
#{productionLineDesc}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="productionLineCode != null and productionLineCode != ''">and Production_Line_Code =
|
|
|
|
|
#{productionLineCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="productionLineDesc != null and productionLineDesc != ''"> and Production_Line_Desc = #{productionLineDesc}</if>
|
|
|
|
|
<if test="productionLineCode != null and productionLineCode != ''"> and Production_Line_Code = #{productionLineCode}</if>
|
|
|
|
|
<if test="orderStatus != null and orderStatus != ''"> and Order_Status = #{orderStatus}</if>
|
|
|
|
|
<if test="userDefined1 != null and userDefined1 != ''"> and User_Defined1 = #{userDefined1}</if>
|
|
|
|
|
<if test="userDefined2 != null and userDefined2 != ''"> and User_Defined2 = #{userDefined2}</if>
|
|
|
|
@ -124,9 +121,7 @@
|
|
|
|
|
<if test="userDefined10 != null and userDefined10 != ''"> and User_Defined10 = #{userDefined10}</if>
|
|
|
|
|
<if test="userDefined11 != null and userDefined11 != ''"> and User_Defined11 = #{userDefined11}</if>
|
|
|
|
|
<if test="supplierCode != null and supplierCode != ''"> and Supplier_Code = #{supplierCode}</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''">and Supplier_Name like concat('%', #{supplierName},
|
|
|
|
|
'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''"> and Supplier_Name like concat('%', #{supplierName}, '%')</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and Create_By = #{createBy}</if>
|
|
|
|
|
<if test="createDate != null "> and Create_Date = #{createDate}</if>
|
|
|
|
|
<if test="lastUpdateBy != null and lastUpdateBy != ''"> and Last_Update_By = #{lastUpdateBy}</if>
|
|
|
|
@ -272,6 +267,7 @@
|
|
|
|
|
SELECT
|
|
|
|
|
prepare_id id,
|
|
|
|
|
workorder_name Produce_Code,
|
|
|
|
|
workorder_code workorderCode,
|
|
|
|
|
product_code Material_Code,
|
|
|
|
|
product_name Material_Desc,
|
|
|
|
|
unit Unit,
|
|
|
|
@ -405,4 +401,10 @@
|
|
|
|
|
#{item.userDefined1}
|
|
|
|
|
</foreach>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectMachineCode" resultType="java.lang.String">
|
|
|
|
|
SELECT
|
|
|
|
|
machine_code
|
|
|
|
|
FROM mes_report_work
|
|
|
|
|
WHERE workorder_code=#{order.workorderCode} AND end_report='1'
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|