Commit c6823ac0c4d6816084edf405e89d80c17477baeb

Authored by 房远帅
1 parent 0ad74933

报表:订单明细新增筛选条件;订单明细分类:区分为三类:有价订单明细、库存订单明细、未锁规格订单明细 1、有价订单明细:经销、外贸库存合同统计无需生产订货单,经…

…销、外贸未锁规合同无需生产和需要生产订货单都统计、经销、外贸、加工标准合同需要生产订货单2、库存订单明细:经销、外贸库存合同需要生产订货单3、未锁规格订单明细:经销、外贸未锁规合同-无需生产订货单
 只统计已审核通过的订单数据
@@ -61,6 +61,9 @@ public class QueryOrderDetailReportVo extends PageVo implements BaseVo, Serializ @@ -61,6 +61,9 @@ public class QueryOrderDetailReportVo extends PageVo implements BaseVo, Serializ
61 @ApiModelProperty("导出类型") 61 @ApiModelProperty("导出类型")
62 private String exportType; 62 private String exportType;
63 63
  64 + @ApiModelProperty("订单分类:有价订单明细、库存订单明细、未锁规格订单明细")
  65 + private String orderCategory;
  66 +
64 /** 67 /**
65 * 排序 68 * 排序
66 */ 69 */
@@ -301,6 +301,29 @@ @@ -301,6 +301,29 @@
301 ) 301 )
302 ) 302 )
303 </if> 303 </if>
  304 + <if test="vo.orderCategory != null and vo.orderCategory != ''">
  305 + AND poi.examine_status = 'PASS'
  306 + <choose>
  307 + <when test="vo.orderCategory == 'PRICED'">
  308 + AND (
  309 + (c.type IN ('DIST_STOCK_CONTRACT', 'INTL_INVENTORY_AGMT') AND poi.type = 'NO_PRODUCTION')
  310 + OR (c.type IN ('DRAFT_DIST_AGMT', 'INTL_OPEN_SPEC_AGMT') AND poi.type IN ('PRODUCTION', 'NO_PRODUCTION'))
  311 + OR (c.type IN ('DISTRIB_STD', 'INTL_STD_CONTRACT', 'PROCESS_STD_AGMT') AND poi.type = 'PRODUCTION')
  312 + )
  313 + </when>
  314 + <when test="vo.orderCategory == 'INVENTORY'">
  315 + AND c.type IN ('DIST_STOCK_CONTRACT', 'INTL_INVENTORY_AGMT')
  316 + AND poi.type = 'PRODUCTION'
  317 + </when>
  318 + <when test="vo.orderCategory == 'OPEN_SPEC'">
  319 + AND c.type IN ('DRAFT_DIST_AGMT', 'INTL_OPEN_SPEC_AGMT')
  320 + AND poi.type = 'NO_PRODUCTION'
  321 + </when>
  322 + <otherwise>
  323 + AND 1 = 0
  324 + </otherwise>
  325 + </choose>
  326 + </if>
304 </where> 327 </where>
305 ) t 328 ) t
306 ORDER BY 329 ORDER BY