收发货统计表

This commit is contained in:
mzr 2024-05-22 15:01:56 +08:00
parent 692d2511ed
commit 9fed935dc6
4 changed files with 14 additions and 6 deletions

View File

@ -167,9 +167,9 @@ public class RecordsExcel {
deliveryNum = StringUtil.isNullOrEmpty(deliveryNum)? 0:deliveryNum; deliveryNum = StringUtil.isNullOrEmpty(deliveryNum)? 0:deliveryNum;
receiptRecordsBo.setDeliveryNum(deliveryNum.toString()); receiptRecordsBo.setDeliveryNum(deliveryNum.toString());
// 如果数量都是0,跳出循环 // 如果数量都是0,跳出循环
if ("0.00".equals(receiptRecordsBo.getMajorNum()) && (invoiceNum == 0) && (receiveNum == 0) && (deliveryNum == 0)) { // if ("0.00".equals(receiptRecordsBo.getMajorNum()) && (invoiceNum == 0) && (receiveNum == 0) && (deliveryNum == 0)) {
continue; // continue;
} // }
if (StringUtil.isNotEmpty(invoiceNum) && (0 != invoiceNum)) { if (StringUtil.isNotEmpty(invoiceNum) && (0 != invoiceNum)) {
DecimalFormat df = new DecimalFormat("0.00"); DecimalFormat df = new DecimalFormat("0.00");
@ -214,6 +214,7 @@ public class RecordsExcel {
map.put("startTime", startTime); map.put("startTime", startTime);
map.put("endTime", endTime); map.put("endTime", endTime);
map.put("goodsNo", goodsNo); map.put("goodsNo", goodsNo);
map.put("isAll", "1");
List list2 = receiptRecordsService.findGoods(map, ".getMajorNum"); List list2 = receiptRecordsService.findGoods(map, ".getMajorNum");
Map map1 = (Map) list2.get(0); Map map1 = (Map) list2.get(0);
if (map1 != null) { if (map1 != null) {

View File

@ -124,7 +124,7 @@
<if test="goodsNo != null and goodsNo != ''"> <if test="goodsNo != null and goodsNo != ''">
AND a.GOODS_NO = #{goodsNo} AND a.GOODS_NO = #{goodsNo}
</if> </if>
<if test="goodsNo == null or goodsNo == ''"> <if test="(goodsNo == null or goodsNo == '') and (isAll == null or isAll == '')">
AND (a.GOODS_NO is null or a.GOODS_NO = '') AND (a.GOODS_NO is null or a.GOODS_NO = '')
</if> </if>
<if test="clientId != null and clientId != ''"> <if test="clientId != null and clientId != ''">

View File

@ -279,9 +279,12 @@
</where> </where>
) )
</if> </if>
<if test="goodsNo == null or goodsNo == ''"> <if test="(goodsNo == null or goodsNo == '') and (isAll == null or isAll == '')">
AND (a.GOODS_NO is null or a.GOODS_NO = '') AND (a.GOODS_NO is null or a.GOODS_NO = '')
</if> </if>
<if test="isAll != null and isAll != ''">
and a.GOODS_NO is not null
</if>
<if test="companyId != null and companyId != ''"> <if test="companyId != null and companyId != ''">
AND a.company_id = #{companyId} AND a.company_id = #{companyId}
</if> </if>
@ -448,9 +451,12 @@
</where> </where>
) )
</if> </if>
<if test="goodsNo == null or goodsNo == ''"> <if test="(goodsNo == null or goodsNo == '') and (isAll == null or isAll == '')">
AND (a.GOODS_NO is null or a.GOODS_NO = '') AND (a.GOODS_NO is null or a.GOODS_NO = '')
</if> </if>
<if test="isAll != null and isAll != ''">
and a.GOODS_NO is not null
</if>
<if test="companyId != null and companyId != ''"> <if test="companyId != null and companyId != ''">
AND a.company_id = #{companyId} AND a.company_id = #{companyId}
</if> </if>

View File

@ -334,6 +334,7 @@ public class ReceiptRecordsService {
// 应发数量 发货单的商品的实发数量汇总 // 应发数量 发货单的商品的实发数量汇总
map.put("startTime", startTime); map.put("startTime", startTime);
map.put("endTime", endTime); map.put("endTime", endTime);
map.put("isAll", "1");
// List list2 = invoiceService.findList(map, ".countNum"); // List list2 = invoiceService.findList(map, ".countNum");
List list2 = this.findGoods(map, ".getMajorNum"); List list2 = this.findGoods(map, ".getMajorNum");
Map map1 = (Map) list2.get(0); Map map1 = (Map) list2.get(0);