Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | |
| | | :deep(.el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | </style> |
| | |
| | | } |
| | | }) |
| | | // 计算总价 |
| | | product.totalPrice = details.reduce((sum, d) => sum + (d.materialPric || 0), 0) |
| | | product.totalPrice = details.reduce((sum, d) => sum + (d.materialPric || 0) , 0) |
| | | }) |
| | | dialogTableVisible.value = true |
| | | } |
| | |
| | | |
| | | List<Map<String, String>> getOrderBomDataMp(String orderId); |
| | | |
| | | List<Map<String, String>> getBOMDetails(Integer productId); |
| | | List<Map<String, String>> getBOMDetails(Integer productId, String orderId); |
| | | |
| | | List<Map<String, String>> getOrderBomSumDataMp(String orderId); |
| | | |
| | |
| | | if (!orderDetailsList.isEmpty()) { |
| | | for (OrderDetail od : orderDetailsList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", bomDataMapper.getBOMDetails(od.getProductId())); |
| | | itemmap.put("data", bomDataMapper.getBOMDetails(od.getProductId(),od.getOrderId())); |
| | | list.add(itemmap); |
| | | |
| | | } |
| | |
| | | pd.separation, |
| | | fc.technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | od.building_number, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | fc.technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number, |
| | | fc.merge as merge |
| | | fc.merge as merge, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | pd.separation, |
| | | #{compound} as technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | od.building_number, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | |
| | | <select id="getOrderBomDataMp"> |
| | | SELECT product_id,product_name,SUM(quantity) as quantity, |
| | | SUM(gross_area) as area,SUM(perimeter) as perimeter from sd.order_detail where order_id=#{orderId} |
| | | SUM(gross_area) as area,SUM(perimeter) as perimeter,order_id from sd.order_detail where order_id=#{orderId} |
| | | GROUP BY product_id |
| | | </select> |
| | | |
| | | <select id="getBOMDetails"> |
| | | select *,(consume*price) as materialPric from sd.bom_product as bp left join sd.bom_base as bb on bb.id=bp.base_id |
| | | where bp.product_id = #{productId} ORDER BY product_layer |
| | | select bp.*,bb.*,(consume*price) as materialPric,od.quantity from sd.bom_product as bp |
| | | left join sd.bom_base as bb on bb.id=bp.base_id |
| | | left join ( select order_id,product_id,SUM(quantity) as quantity from sd.order_detail GROUP BY order_id,product_id |
| | | ) as od on od.product_id = bp.product_id |
| | | where bp.product_id = #{productId} and od.order_id = #{orderId} ORDER BY product_layer |
| | | </select> |
| | | |
| | | <select id="getOrderBomSumDataMp"> |
| | |
| | | bb.type, |
| | | sum(bb.consume) as consume, |
| | | sum(bb.price) as price, |
| | | sum(bb.consume * bb.price) AS materialPrice |
| | | sum(bb.consume * bb.price) AS materialPrice, |
| | | od.quantity |
| | | FROM |
| | | sd.bom_product AS bp |
| | | LEFT JOIN sd.bom_base AS bb ON bb.id = bp.base_id |
| | | LEFT JOIN ( |
| | | select order_id,product_id from sd.order_detail GROUP BY product_id |
| | | select order_id,product_id,SUM(quantity) as quantity from sd.order_detail GROUP BY order_id,product_id |
| | | ) as od on od.product_id = bp.product_id |
| | | |
| | | WHERE od.order_id=#{orderId} |