@ -760,7 +760,7 @@ public class JobUtils {
JSONObject jsonObjectOffShelf = JSONUtil . parseObj ( ruleRespVOOffShelf . getConfiguration ( ) ) ;
JSONObject jsonObjectOffShelf = JSONUtil . parseObj ( ruleRespVOOffShelf . getConfiguration ( ) ) ;
// 查询库存余额
// 查询库存余额
QueryWrapper queryWrapper = new QueryWrapper ( ) ;
QueryWrapper queryWrapper = new QueryWrapper ( ) ;
queryWrapper . select ( "item_code" , "batch" , "SUM(qty) as qty" , "warehouse_code" , "area_code" , "location_group_code" , "location_code" , "produce_date" , "arrive_date" ) ;
queryWrapper . select ( "item_code" , "batch" , "SUM(qty) as qty" , "inventory_status" , " warehouse_code" , "area_code" , "location_group_code" , "location_code" , "produce_date" , "arrive_date" ) ;
if ( itemCode ! = null & & ! itemCode . equals ( "" ) ) {
if ( itemCode ! = null & & ! itemCode . equals ( "" ) ) {
queryWrapper . eq ( "item_code" , itemCode ) ;
queryWrapper . eq ( "item_code" , itemCode ) ;
} else {
} else {
@ -806,7 +806,7 @@ public class JobUtils {
}
}
// 发料包装类型——按 单件
// 发料包装类型——按 单件
if ( jsonObjectOffShelf . get ( "IssueStorageType" ) ! = null & & jsonObjectOffShelf . get ( "IssueStorageType" ) . equals ( "3" ) ) {
if ( jsonObjectOffShelf . get ( "IssueStorageType" ) ! = null & & jsonObjectOffShelf . get ( "IssueStorageType" ) . equals ( "3" ) ) {
queryWrapper . groupBy ( "item_code" , "batch" , "qty" , "warehouse_code" , "area_code" , "location_group_code" , "location_code" , "expire_date" , "produce_date" , "arrive_date" ) ;
queryWrapper . groupBy ( "item_code" , "batch" , "qty" , "inventory_status" , "warehouse_code" , "area_code" , "location_group_code" , "location_code" , "expire_date" , "produce_date" , "arrive_date" ) ;
}
}
// 根据批次策略 作为查询库存余额排序
// 根据批次策略 作为查询库存余额排序
// 批次类型——按 生产时间
// 批次类型——按 生产时间