Kaynağa Gözat

修改销售统计报表

zx 3 yıl önce
ebeveyn
işleme
6509cf6bdf

+ 8 - 4
src/main/java/com/steerinfo/dil/controller/StatisticalReportController.java

@@ -321,13 +321,14 @@ public class StatisticalReportController extends BaseRESTfulController {
                                          String isPage,
                                           String index
     ){
-        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
+
          if (orgCode!=null&&!"null".equals(orgCode)){
              mapValue.put("orgCode",orgCode);
          }
         if (index!=null&&!"null".equals(index)){
             mapValue.put("index",index);
         }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         if("yes".equals(isPage)){
             return success(statisticalReportService.getSaleOrderList(mapValue));
         }
@@ -358,13 +359,14 @@ public class StatisticalReportController extends BaseRESTfulController {
                                               String isPage,
                                               String index
     ){
-        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
+
         if (orgCode!=null&&!"null".equals(orgCode)){
             mapValue.put("orgCode",orgCode);
         }
         if (index!=null&&!"null".equals(index)){
             mapValue.put("index",index);
         }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         if ("yes".equals(isPage)){
             return success(statisticalReportService.getPurchaseOrderList(mapValue));
         }
@@ -395,13 +397,14 @@ public class StatisticalReportController extends BaseRESTfulController {
                                                String isPage,
                                              String index
     ){
-        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
+
         if (index!=null&&!"null".equals(index)){
             mapValue.put("index",index);
         }
         if (orgCode!=null&&!"null".equals(orgCode)){
             mapValue.put("orgCode",orgCode);
         }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         if ("yes".equals(isPage)){
             return  success(statisticalReportService.getPurchaseInwardList(mapValue));
         }
@@ -431,13 +434,14 @@ public class StatisticalReportController extends BaseRESTfulController {
                                        String isPage,
                                        String index
     ){
-        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
+
         if (index!=null&&!"null".equals(index)){
             mapValue.put("index",index);
         }
         if (orgCode!=null&&!"null".equals(orgCode)){
             mapValue.put("orgCode",orgCode);
         }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         if ("yes".equals(isPage)){
             return  success(statisticalReportService.getInwardInFactory(mapValue));
         }

+ 2 - 2
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -1912,8 +1912,8 @@
         ON RM.MATERIAL_ID=OOM.MATERIAL_ID
         JOIN AMS_SALE_ORDER ASO
         ON ASO.SALE_ORDER_ID=ASOM.SALE_ORDER_ID
-        LEFT JOIN AMS_SALE_ORDER_CARRIER ASOC
-        ON ASOC.SALE_ORDER_ID=ASO.SALE_ORDER_ID
+        LEFT JOIN AMS_DISPATCH_SALE_ORDER ASOC
+        ON ASOC.SALE_ORDER_MATERIAL_ID=ASOM.SALE_ORDER_MATERIAL_ID
         LEFT JOIN RMS_CARRIER RC3
         ON RC3.CARRIER_ID=ASOC.CARRIER_ID
         left join RMS_SHIPPER RS