|
|
|
@ -36,10 +36,11 @@
|
|
|
|
|
<result property="Active" column="Active"/>
|
|
|
|
|
<result property="enterpriseId" column="Enterprise_Id"/>
|
|
|
|
|
<result property="enterpriseCode" column="Enterprise_Code"/>
|
|
|
|
|
<result property="operationNumber" column="Operation_Number"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectOdsProcureOrderVo">
|
|
|
|
|
select Site_code, ID, Procure_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit,COALESCE(Reality_Number, 0) Reality_Number, Order_Status, User_Defined1, User_Defined2, User_Defined3, User_Defined4, User_Defined5, User_Defined6, User_Defined7, User_Defined8, User_Defined9, User_Defined10, User_Defined11, Supplier_Code, Supplier_Name, Remark, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code from ods_procure_order
|
|
|
|
|
select Site_code, ID, Procure_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit,COALESCE(Reality_Number, 0) Reality_Number, Order_Status, User_Defined1, User_Defined2, User_Defined3, User_Defined4, User_Defined5, User_Defined6, User_Defined7, User_Defined8, User_Defined9, User_Defined10, User_Defined11, Supplier_Code, Supplier_Name, Remark, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code, COALESCE(Operation_Number, 0) Operation_Number from ods_procure_order
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectOdsProcureOrderList" parameterType="OdsProcureOrder" resultMap="OdsProcureOrderResult">
|
|
|
|
@ -216,4 +217,11 @@
|
|
|
|
|
<include refid="selectOdsProcureOrderVo"/>
|
|
|
|
|
<![CDATA[ where Procure_Code = #{procureCode} and Active='1' AND Order_Status <> 0 ]]>
|
|
|
|
|
</select>
|
|
|
|
|
<update id="updateOdsProcureOrderAddOperationNumber" parameterType="OdsProcureOrder">
|
|
|
|
|
update ods_procure_order
|
|
|
|
|
SET Operation_Number = COALESCE(Operation_Number, 0) + #{czNumber},
|
|
|
|
|
Last_Update_By = #{lastUpdateBy},
|
|
|
|
|
Last_Update_Date = now()
|
|
|
|
|
where ID = #{ID}
|
|
|
|
|
</update>
|
|
|
|
|
</mapper>
|
|
|
|
|