|
|
@ -4,27 +4,27 @@ |
|
|
<resultMap id="BaseResultMap" type="com.gaotao.modules.toolman.entity.ToolTransDetail"> |
|
|
<resultMap id="BaseResultMap" type="com.gaotao.modules.toolman.entity.ToolTransDetail"> |
|
|
<!--@mbg.generated--> |
|
|
<!--@mbg.generated--> |
|
|
<!--@Table tool_trans_detail--> |
|
|
<!--@Table tool_trans_detail--> |
|
|
<result column="id" jdbcType="INTEGER" property="id" /> |
|
|
|
|
|
<result column="trans_no" jdbcType="VARCHAR" property="transNo" /> |
|
|
|
|
|
<result column="item_no" jdbcType="VARCHAR" property="itemNo" /> |
|
|
|
|
|
<result column="tool_instance_id" jdbcType="VARCHAR" property="toolInstanceId" /> |
|
|
|
|
|
<result column="trans_qty" jdbcType="INTEGER" property="transQty" /> |
|
|
|
|
|
<result column="batch_no" jdbcType="VARCHAR" property="batchNo" /> |
|
|
|
|
|
<result column="ware_house_id" jdbcType="VARCHAR" property="wareHouseId" /> |
|
|
|
|
|
<result column="location_id" jdbcType="VARCHAR" property="locationId" /> |
|
|
|
|
|
<result column="direction" jdbcType="CHAR" property="direction" /> |
|
|
|
|
|
<result column="orderRef1" jdbcType="VARCHAR" property="orderRef1" /> |
|
|
|
|
|
<result column="orderRef2" jdbcType="VARCHAR" property="orderRef2" /> |
|
|
|
|
|
<result column="orderRef3" jdbcType="VARCHAR" property="orderRef3" /> |
|
|
|
|
|
<result column="orderRef4" jdbcType="VARCHAR" property="orderRef4" /> |
|
|
|
|
|
<result column="supplier_id" jdbcType="VARCHAR" property="supplierId" /> |
|
|
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" /> |
|
|
|
|
|
<result column="created_by" jdbcType="VARCHAR" property="createdBy" /> |
|
|
|
|
|
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate" /> |
|
|
|
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
|
|
|
|
|
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate" /> |
|
|
|
|
|
<result column="delflag" jdbcType="CHAR" property="delflag" /> |
|
|
|
|
|
<result column="version" jdbcType="INTEGER" property="version" /> |
|
|
|
|
|
|
|
|
<result column="id" jdbcType="INTEGER" property="id"/> |
|
|
|
|
|
<result column="trans_no" jdbcType="VARCHAR" property="transNo"/> |
|
|
|
|
|
<result column="item_no" jdbcType="VARCHAR" property="itemNo"/> |
|
|
|
|
|
<result column="tool_instance_id" jdbcType="VARCHAR" property="toolInstanceId"/> |
|
|
|
|
|
<result column="trans_qty" jdbcType="INTEGER" property="transQty"/> |
|
|
|
|
|
<result column="batch_no" jdbcType="VARCHAR" property="batchNo"/> |
|
|
|
|
|
<result column="ware_house_id" jdbcType="VARCHAR" property="wareHouseId"/> |
|
|
|
|
|
<result column="location_id" jdbcType="VARCHAR" property="locationId"/> |
|
|
|
|
|
<result column="direction" jdbcType="CHAR" property="direction"/> |
|
|
|
|
|
<result column="orderRef1" jdbcType="VARCHAR" property="orderRef1"/> |
|
|
|
|
|
<result column="orderRef2" jdbcType="VARCHAR" property="orderRef2"/> |
|
|
|
|
|
<result column="orderRef3" jdbcType="VARCHAR" property="orderRef3"/> |
|
|
|
|
|
<result column="orderRef4" jdbcType="VARCHAR" property="orderRef4"/> |
|
|
|
|
|
<result column="supplier_id" jdbcType="VARCHAR" property="supplierId"/> |
|
|
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark"/> |
|
|
|
|
|
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/> |
|
|
|
|
|
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate"/> |
|
|
|
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/> |
|
|
|
|
|
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate"/> |
|
|
|
|
|
<result column="delflag" jdbcType="CHAR" property="delflag"/> |
|
|
|
|
|
<result column="version" jdbcType="INTEGER" property="version"/> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
<sql id="Base_Column_List"> |
|
|
<sql id="Base_Column_List"> |
|
|
<!--@mbg.generated--> |
|
|
<!--@mbg.generated--> |
|
|
@ -228,14 +228,21 @@ |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
<select id="getToolInstanceIdUseHist" resultMap="BaseResultMap"> |
|
|
<select id="getToolInstanceIdUseHist" resultMap="BaseResultMap"> |
|
|
select C.SupplierName as supplier_name ,A.created_date as deliveryDate,B.created_date as returnDate |
|
|
|
|
|
,CONVERT(varchar(100), A.created_date, 23) as strDeliveryDate |
|
|
|
|
|
,CONVERT(varchar(100), B.created_date, 23) as strReturnDate |
|
|
|
|
|
,B.created_by |
|
|
|
|
|
|
|
|
select C.SupplierName as supplier_name |
|
|
|
|
|
, A.created_date as deliveryDate |
|
|
|
|
|
, B.created_date as returnDate |
|
|
|
|
|
, CONVERT(varchar(100), A.created_date, 23) as strDeliveryDate |
|
|
|
|
|
, CONVERT(varchar(100), B.created_date, 23) as strReturnDate |
|
|
|
|
|
, B.created_by |
|
|
from tool_trans_detail B |
|
|
from tool_trans_detail B |
|
|
left join tool_trans_detail A on A.tool_instance_id = B.tool_instance_id and A.trans_no like 'TW%' |
|
|
left join tool_trans_detail A on A.tool_instance_id = B.tool_instance_id and A.trans_no like 'TW%' |
|
|
and A.tool_instance_id = #{toolInstanceId,jdbcType=VARCHAR} |
|
|
and A.tool_instance_id = #{toolInstanceId,jdbcType=VARCHAR} |
|
|
LEFT JOIN Supplier C on C.supplierID = A.supplier_id |
|
|
LEFT JOIN Supplier C on C.supplierID = A.supplier_id |
|
|
where B.orderRef2 = A.trans_no |
|
|
where B.orderRef2 = A.trans_no |
|
|
</select> |
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
<select id="getLocationCount" resultType="java.lang.Integer"> |
|
|
|
|
|
select count(1) |
|
|
|
|
|
from tool_trans_detail |
|
|
|
|
|
where location_id = #{locationId} |
|
|
|
|
|
</select> |
|
|
</mapper> |
|
|
</mapper> |