优化对账单的查询接口
This commit is contained in:
@@ -542,12 +542,8 @@ public class DepotHeadService {
|
|||||||
}
|
}
|
||||||
if (type.equals("采购入库")) {
|
if (type.equals("采购入库")) {
|
||||||
allPrice = p2.subtract(p1);
|
allPrice = p2.subtract(p1);
|
||||||
} else if (type.equals("销售退货入库")) {
|
|
||||||
allPrice = p2.subtract(p1);
|
|
||||||
} else if (type.equals("销售出库")) {
|
} else if (type.equals("销售出库")) {
|
||||||
allPrice = p1.subtract(p2);
|
allPrice = p1.subtract(p2);
|
||||||
} else if (type.equals("采购退货出库")) {
|
|
||||||
allPrice = p1.subtract(p2);
|
|
||||||
} else if (type.equals("收款")) {
|
} else if (type.equals("收款")) {
|
||||||
allPrice = BigDecimal.ZERO.subtract(p1);
|
allPrice = BigDecimal.ZERO.subtract(p1);
|
||||||
} else if (type.equals("付款")) {
|
} else if (type.equals("付款")) {
|
||||||
|
|||||||
@@ -468,7 +468,7 @@
|
|||||||
select dh.number,concat(dh.sub_type,dh.type) as type,dh.discount_last_money,dh.other_money,dh.change_amount,s.supplier supplierName,
|
select dh.number,concat(dh.sub_type,dh.type) as type,dh.discount_last_money,dh.other_money,dh.change_amount,s.supplier supplierName,
|
||||||
date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime from jsh_depot_head dh
|
date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime from jsh_depot_head dh
|
||||||
left join jsh_supplier s on s.id=dh.organ_id and ifnull(s.delete_Flag,'0') !='1'
|
left join jsh_supplier s on s.id=dh.organ_id and ifnull(s.delete_Flag,'0') !='1'
|
||||||
where s.type=#{supType} and (dh.sub_type!='其它' and dh.sub_type!='采购订单' and dh.sub_type!='销售订单')
|
where s.type=#{supType} and (dh.sub_type='采购' or dh.sub_type='销售')
|
||||||
and dh.oper_time >=#{beginTime} and dh.oper_time <=#{endTime}
|
and dh.oper_time >=#{beginTime} and dh.oper_time <=#{endTime}
|
||||||
<if test="organId != null">
|
<if test="organId != null">
|
||||||
and dh.organ_id=#{organId}
|
and dh.organ_id=#{organId}
|
||||||
@@ -495,7 +495,7 @@
|
|||||||
(
|
(
|
||||||
select count(1) a from jsh_depot_head dh
|
select count(1) a from jsh_depot_head dh
|
||||||
left join jsh_supplier s on s.id=dh.organ_id and ifnull(s.delete_Flag,'0') !='1'
|
left join jsh_supplier s on s.id=dh.organ_id and ifnull(s.delete_Flag,'0') !='1'
|
||||||
where s.type=#{supType} and (dh.sub_type!='其它' and dh.sub_type!='采购订单' and dh.sub_type!='销售订单')
|
where s.type=#{supType} and (dh.sub_type='采购' or dh.sub_type='销售')
|
||||||
and dh.oper_time >=#{beginTime} and dh.oper_time <=#{endTime}
|
and dh.oper_time >=#{beginTime} and dh.oper_time <=#{endTime}
|
||||||
<if test="organId != null">
|
<if test="organId != null">
|
||||||
and dh.organ_id=#{organId}
|
and dh.organ_id=#{organId}
|
||||||
|
|||||||
Reference in New Issue
Block a user