|
@@ -497,8 +497,7 @@
|
|
|
on a.ware_house_type = b.collect_type
|
|
on a.ware_house_type = b.collect_type
|
|
|
LEFT JOIN psi_management_warehouse_basics bas on a.basic_id = bas.id
|
|
LEFT JOIN psi_management_warehouse_basics bas on a.basic_id = bas.id
|
|
|
left join psi_management_type c on a.ware_house_type = c.id
|
|
left join psi_management_type c on a.ware_house_type = c.id
|
|
|
- where a.trade_name = #{goodsName}
|
|
|
|
|
- and a.ware_house_type = #{collectTypeId}
|
|
|
|
|
|
|
+ where a.ware_house_type = #{collectTypeId}
|
|
|
and a.del_flag = 0
|
|
and a.del_flag = 0
|
|
|
GROUP BY a.ware_house_type
|
|
GROUP BY a.ware_house_type
|
|
|
ORDER BY a.update_time DESC
|
|
ORDER BY a.update_time DESC
|
|
@@ -527,8 +526,7 @@
|
|
|
|
|
|
|
|
LEFT JOIN psi_management_warehouse_basics bas on a.basic_id = bas.id
|
|
LEFT JOIN psi_management_warehouse_basics bas on a.basic_id = bas.id
|
|
|
left join psi_management_type c on a.ware_house_type = c.id
|
|
left join psi_management_type c on a.ware_house_type = c.id
|
|
|
- where a.trade_name = #{goodsName}
|
|
|
|
|
- and a.ware_house_type = #{collectTypeId}
|
|
|
|
|
|
|
+ where a.ware_house_type = #{collectTypeId}
|
|
|
and a.produce_date = #{produceDate}
|
|
and a.produce_date = #{produceDate}
|
|
|
and a.del_flag = 0
|
|
and a.del_flag = 0
|
|
|
GROUP BY a.ware_house_type,a.produce_date
|
|
GROUP BY a.ware_house_type,a.produce_date
|
|
@@ -557,8 +555,7 @@
|
|
|
on a.ware_house_type = b.collect_type
|
|
on a.ware_house_type = b.collect_type
|
|
|
LEFT JOIN psi_management_warehouse_basics bas on a.basic_id = bas.id
|
|
LEFT JOIN psi_management_warehouse_basics bas on a.basic_id = bas.id
|
|
|
left join psi_management_type c on a.ware_house_type = c.id
|
|
left join psi_management_type c on a.ware_house_type = c.id
|
|
|
- where a.trade_name = #{goodsName}
|
|
|
|
|
- and a.ware_house_type = #{collectTypeId}
|
|
|
|
|
|
|
+ where a.ware_house_type = #{collectTypeId}
|
|
|
and a.del_flag = 0
|
|
and a.del_flag = 0
|
|
|
ORDER BY a.produce_date asc
|
|
ORDER BY a.produce_date asc
|
|
|
</select>
|
|
</select>
|
|
@@ -595,14 +592,13 @@
|
|
|
|
|
|
|
|
WHERE a.ware_house_type = #{wareHouseType}
|
|
WHERE a.ware_house_type = #{wareHouseType}
|
|
|
and a.del_flag = 0
|
|
and a.del_flag = 0
|
|
|
- and a.trade_name = #{tradeName}
|
|
|
|
|
and a.produce_date <= #{produceDate}
|
|
and a.produce_date <= #{produceDate}
|
|
|
GROUP BY a.ware_house_type
|
|
GROUP BY a.ware_house_type
|
|
|
ORDER BY a.ware_house_type DESC
|
|
ORDER BY a.ware_house_type DESC
|
|
|
</select>
|
|
</select>
|
|
|
<select id="getCollectInfoByTime" resultType="java.lang.String">
|
|
<select id="getCollectInfoByTime" resultType="java.lang.String">
|
|
|
SELECT
|
|
SELECT
|
|
|
- IFNULL((sum(trade_number) - collect_number),sum(trade_number)) as tradeNumber
|
|
|
|
|
|
|
+ GREATEST( IFNULL(SUM(trade_number) - collect_number, SUM(trade_number)), 0 ) AS tradeNumber
|
|
|
FROM
|
|
FROM
|
|
|
psi_management_warehouse_detailed a
|
|
psi_management_warehouse_detailed a
|
|
|
left join psi_management_type c on a.ware_house_type = c.id
|
|
left join psi_management_type c on a.ware_house_type = c.id
|