|
@@ -96,21 +96,21 @@ a.create_time as createTime,b.unit_price as unitPrice,sum(b.total_price) as tota
|
|
|
|
|
|
<select id="queryItem" resultType="org.jeecg.modules.documents.letterDeposit.entity.SyLetterDepositItem">
|
|
<select id="queryItem" resultType="org.jeecg.modules.documents.letterDeposit.entity.SyLetterDepositItem">
|
|
|
|
|
|
- select item_number as itemNumber,small_po as smallPo,sum(total) as total,box_number as boxNumber,pre_ids as syPreAssembledPackingListItemId,sy_pre_assembled_packing_list_id as syPreAssembledPackingListId,
|
|
|
|
-total_gross_weight as totalGrossWeight,total_net_weight as totalNetWeight,total_volume as totalVolume,distribution_point as distributionPoint,
|
|
|
|
|
|
+ select itemNumber,smallPo,sum(total) as total,sum(boxNumber) as boxNumber,syPreAssembledPackingListItemId,syPreAssembledPackingListId,sum(totalGrossWeight) as totalGrossWeight,sum(totalNetWeight) as totalNetWeight,sum(totalVolume) as totalVolume,distributionPoint,containerCode,containerNumber,unitPrice,sum(totalPrice) as totalPrice,hod,salesman,salesDepartment,spurOrSubOrder,supplier,clientAbbreviation from (select item_number as itemNumber,small_po as smallPo,sum(total) as total,box_number as boxNumber,GROUP_CONCAT(sy_pre_assembled_packing_list_item_id) as syPreAssembledPackingListItemId,sy_pre_assembled_packing_list_id as syPreAssembledPackingListId,
|
|
|
|
+total_gross_weight as totalGrossWeight,total_net_weight as totalNetWeight,total_volume as totalVolume,distribution_point as distributionPoint,letter_groupid as letterGroupid,
|
|
container_code as containerCode,container_number as containerNumber,unit_price as unitPrice,sum(total_price) as totalPrice,
|
|
container_code as containerCode,container_number as containerNumber,unit_price as unitPrice,sum(total_price) as totalPrice,
|
|
hod,salesman,sales_Department as salesDepartment,spur_or_sub_order as spurOrSubOrder,supplier,client_abbreviation as clientAbbreviation
|
|
hod,salesman,sales_Department as salesDepartment,spur_or_sub_order as spurOrSubOrder,supplier,client_abbreviation as clientAbbreviation
|
|
from sy_letter_deposit_item
|
|
from sy_letter_deposit_item
|
|
- where del_flag = 0 and sy_letter_deposit_id = #{syId} group by letter_groupid order by item_number,small_po desc
|
|
|
|
-
|
|
|
|
|
|
+ where del_flag = 0 and sy_letter_deposit_id = #{syId} group by groupid order by item_number,small_po desc) t GROUP BY letterGroupid
|
|
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="printItem" resultType="org.jeecg.modules.documents.letterDeposit.entity.SyLetterDepositItem">
|
|
<select id="printItem" resultType="org.jeecg.modules.documents.letterDeposit.entity.SyLetterDepositItem">
|
|
|
|
|
|
- select a.item_number as itemNumber,a.small_po as smallPo,round(sum(a.total),2) as total,round(a.box_number,0) as boxNumber,
|
|
|
|
|
|
+ select itemNumber,sum(boxNumber) as boxNumber,smallPo,total,sum(totalGrossWeight) as totalGrossWeight,sum(totalNetWeight) as totalNetWeight,sum(totalVolume) as totalVolume,containerCode,containerNumber,unitPrice,sum(totalPrice) as totalPrice,hod,salesman,salesDepartment,spurOrSubOrder,supplier,englishName,pcs,ctns,kgs,cbm from(
|
|
|
|
+ select a.item_number as itemNumber,a.small_po as smallPo,round(sum(a.total),2) as total,round(a.box_number,0) as boxNumber,
|
|
round(a.total_gross_weight,2) as totalGrossWeight,round(a.total_net_weight,2) as totalNetWeight,round(a.total_volume,3) as totalVolume,
|
|
round(a.total_gross_weight,2) as totalGrossWeight,round(a.total_net_weight,2) as totalNetWeight,round(a.total_volume,3) as totalVolume,
|
|
-a.container_code as containerCode,a.container_number as containerNumber,a.unit_price as unitPrice,sum(a.total_price) as totalPrice,
|
|
|
|
|
|
+a.container_code as containerCode,a.container_number as containerNumber,a.unit_price as unitPrice,sum(a.total_price) as totalPrice,letter_groupid as letterGroupid,
|
|
a.hod,a.salesman,a.sales_Department as salesDepartment,a.spur_or_sub_order as spurOrSubOrder,a.supplier,
|
|
a.hod,a.salesman,a.sales_Department as salesDepartment,a.spur_or_sub_order as spurOrSubOrder,a.supplier,
|
|
c.english_product_name as englishName,'PCS' as pcs, 'CTNS' as ctns,'KGS' as kgs,'CBM' as cbm
|
|
c.english_product_name as englishName,'PCS' as pcs, 'CTNS' as ctns,'KGS' as kgs,'CBM' as cbm
|
|
from sy_letter_deposit_item a
|
|
from sy_letter_deposit_item a
|
|
@@ -118,7 +118,6 @@ c.english_product_name as englishName,'PCS' as pcs, 'CTNS' as ctns,'KGS' as kgs,
|
|
on a.sy_pre_assembled_packing_list_id = b.id
|
|
on a.sy_pre_assembled_packing_list_id = b.id
|
|
left join sy_declaration_elements c
|
|
left join sy_declaration_elements c
|
|
on b.elements_id = c.id
|
|
on b.elements_id = c.id
|
|
- where a.del_flag = 0 and a.sy_letter_deposit_id = #{id} group by letter_groupid order by a.item_number,a.small_po desc
|
|
|
|
-
|
|
|
|
|
|
+ where a.del_flag = 0 and a.sy_letter_deposit_id = #{id} group by groupid order by a.item_number,a.small_po desc) t GROUP BY t.letterGroupid
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|