|
|
|
@ -69,73 +69,6 @@
|
|
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<!-- <select id="getPurchorderItemMap" resultMap="purchorderItemMap">-->
|
|
|
|
|
<!-- SELECT-->
|
|
|
|
|
<!-- *-->
|
|
|
|
|
<!-- FROM-->
|
|
|
|
|
<!-- (-->
|
|
|
|
|
<!-- SELECT-->
|
|
|
|
|
<!-- a.DOCUMENT_NO,-->
|
|
|
|
|
<!-- a.creator_user_name AS `creatorUserName`,-->
|
|
|
|
|
<!-- a.creator_time AS `creatorTime`,-->
|
|
|
|
|
<!-- a.contract_no AS `contractNo`,-->
|
|
|
|
|
<!-- a.contract_code AS `contractCode`,-->
|
|
|
|
|
<!-- a.supplier_name AS `supplierName`,-->
|
|
|
|
|
<!-- a.document_no AS `documentNo`,-->
|
|
|
|
|
<!-- b.material_name AS `materialName`,-->
|
|
|
|
|
<!-- (-->
|
|
|
|
|
<!-- CASE-->
|
|
|
|
|
<!-- b.rate-->
|
|
|
|
|
<!-- WHEN '0' THEN-->
|
|
|
|
|
<!-- 13-->
|
|
|
|
|
<!-- WHEN '1' THEN-->
|
|
|
|
|
<!-- 9-->
|
|
|
|
|
<!-- WHEN '2' THEN-->
|
|
|
|
|
<!-- 6-->
|
|
|
|
|
<!-- WHEN '3' THEN-->
|
|
|
|
|
<!-- 5-->
|
|
|
|
|
<!-- WHEN '4' THEN-->
|
|
|
|
|
<!-- 3 ELSE b.unit-->
|
|
|
|
|
<!-- END-->
|
|
|
|
|
<!-- ) AS `rate1`,-->
|
|
|
|
|
<!-- AVG( b.price ) AS `price1`,-->
|
|
|
|
|
<!-- SUM( b.settlement ) AS `settlement1`,-->
|
|
|
|
|
<!-- ( CASE b.unit WHEN 0 THEN '吨' ELSE '千克' END ) AS `unit1`,-->
|
|
|
|
|
<!-- SUM( b.amount ) `amount1`,-->
|
|
|
|
|
<!-- b.pound_pictures poundPictures,-->
|
|
|
|
|
<!-- c.vehicle_pictures vehiclePictures,-->
|
|
|
|
|
<!-- d.supplier_nm,-->
|
|
|
|
|
<!-- c.pound_date 收货日期,-->
|
|
|
|
|
<!-- e.ticketno 送货车号,-->
|
|
|
|
|
<!-- c.gross_weight 毛重,-->
|
|
|
|
|
<!-- c.tare_weight 皮重,-->
|
|
|
|
|
<!-- c.buckle_weight 扣重,-->
|
|
|
|
|
<!-- c.settlement 结算重量-->
|
|
|
|
|
<!-- FROM-->
|
|
|
|
|
<!-- jg_purchaseorder AS a-->
|
|
|
|
|
<!-- LEFT JOIN jg_purchaseorder_item0 AS b ON a.id = b.purchaseorder_id-->
|
|
|
|
|
<!-- AND (-->
|
|
|
|
|
<!-- b.delete_mark != '1'-->
|
|
|
|
|
<!-- OR ISNULL( b.delete_mark ))-->
|
|
|
|
|
<!-- LEFT JOIN jg_poundlist AS c ON b.poundlist_id = c.id-->
|
|
|
|
|
<!-- AND (-->
|
|
|
|
|
<!-- c.delete_mark != '1'-->
|
|
|
|
|
<!-- OR ISNULL( c.delete_mark ))-->
|
|
|
|
|
<!-- AND (-->
|
|
|
|
|
<!-- ( c.pound_status != '1' AND c.pound_status != '2' )-->
|
|
|
|
|
<!-- OR ISNULL( c.pound_status ))-->
|
|
|
|
|
<!-- LEFT JOIN jg_customer AS d ON c.customer_id = d.id-->
|
|
|
|
|
<!-- AND (-->
|
|
|
|
|
<!-- d.delete_mark != '1'-->
|
|
|
|
|
<!-- OR ISNULL( d.delete_mark ))-->
|
|
|
|
|
<!-- LEFT JOIN jg_vehicle e ON c.vehicle_id = e.id-->
|
|
|
|
|
<!-- GROUP BY-->
|
|
|
|
|
<!-- b.material_name,-->
|
|
|
|
|
<!-- b.rate,-->
|
|
|
|
|
<!-- b.unit,-->
|
|
|
|
|
<!-- a.id-->
|
|
|
|
|
<!-- ) aaa ${ew.customSqlSegment}-->
|
|
|
|
|
<!-- </select>-->
|
|
|
|
|
|
|
|
|
|
<select id="getPdfInfo" resultMap="resultPdfInfoMap">
|
|
|
|
|
SELECT
|
|
|
|
@ -223,7 +156,8 @@
|
|
|
|
|
(
|
|
|
|
|
SELECT
|
|
|
|
|
a.document_no,
|
|
|
|
|
a.supplier_name AS `supplierName`,
|
|
|
|
|
IFNULL(g.supplier_name,'供应商信息查不到') AS `supplierName`,
|
|
|
|
|
c.supplier_id,
|
|
|
|
|
f.item_name AS `materialName`,
|
|
|
|
|
c.vehicle_pictures vehiclePictures,
|
|
|
|
|
c.pound_pictures poundPictures,
|
|
|
|
@ -238,7 +172,9 @@
|
|
|
|
|
( CASE c.unit WHEN 0 THEN '吨' ELSE '千克' END ) AS `unit`
|
|
|
|
|
FROM
|
|
|
|
|
jg_purchaseorder AS a
|
|
|
|
|
LEFT JOIN jg_poundlist AS c ON c.purchase_id = a.contract_code
|
|
|
|
|
LEFT JOIN jg_purchaseorder_item0 b ON a.id = b.purchaseorder_id
|
|
|
|
|
AND b.delete_mark = '0'
|
|
|
|
|
LEFT JOIN jg_poundlist AS c ON c.id = b.poundlist_id
|
|
|
|
|
AND c.delete_mark = '0'
|
|
|
|
|
LEFT JOIN jg_material f ON c.material_id = f.id
|
|
|
|
|
AND f.delete_mark = '0'
|
|
|
|
@ -246,9 +182,10 @@
|
|
|
|
|
AND d.delete_mark = '0'
|
|
|
|
|
LEFT JOIN jg_vehicle e ON c.vehicle_id = e.id
|
|
|
|
|
AND e.delete_mark = '0'
|
|
|
|
|
LEFT JOIN jg_supplier g on c.supplier_id=g.id
|
|
|
|
|
WHERE
|
|
|
|
|
a.delete_mark = '0'
|
|
|
|
|
) aaa ${ew.customSqlSegment}
|
|
|
|
|
) aaa ${ew.customSqlSegment}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getVehicleInfo" resultType="hashMap">
|
|
|
|
@ -265,13 +202,14 @@
|
|
|
|
|
e.drivername
|
|
|
|
|
FROM
|
|
|
|
|
jg_purchaseorder AS a
|
|
|
|
|
LEFT JOIN jg_poundlist AS c ON c.purchase_id = a.contract_code
|
|
|
|
|
AND c.delete_mark = '0'
|
|
|
|
|
LEFT JOIN jg_purchaseorder_item0 b ON a.id = b.purchaseorder_id
|
|
|
|
|
AND b.delete_mark = '0'
|
|
|
|
|
LEFT JOIN jg_poundlist AS c ON c.id = b.poundlist_id
|
|
|
|
|
LEFT JOIN jg_vehicle e ON c.vehicle_id = e.id
|
|
|
|
|
AND e.delete_mark = '0'
|
|
|
|
|
WHERE
|
|
|
|
|
a.delete_mark = '0'
|
|
|
|
|
) aaa ${ew.customSqlSegment}
|
|
|
|
|
) aaa ${ew.customSqlSegment}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="queryByKeyword" resultType="jnpf.purchaseorder.entity.PurchaseorderitemEntity">
|
|
|
|
|