Преглед изворни кода

Merge remote-tracking branch 'origin/develop' into develop

‘linchangsheng’ пре 5 месеци
родитељ
комит
117a411485

+ 2 - 1
mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/MaterialMapper.java

@@ -479,7 +479,8 @@ public interface MaterialMapper {
 
     List<WorkerPurchaseCategoryBean> getWorkerMonthSummaryData(@Param("companyWechatId") String companyWechatId,
                                                                @Param("startDate") String startDate,
-                                                               @Param("endDate") String endDate);
+                                                               @Param("endDate") String endDate,
+                                                               @Param("websits") List<String> websits);
 
     /**
      * 网点汇总记账列表

+ 1 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/material/report/ReportLogic.java

@@ -499,7 +499,7 @@ public class ReportLogic {
         String[] monthDateTime = computeMonthDateTime(month);
         String startDate = monthDateTime[0];
         String endDate = monthDateTime[1];
-        List<WorkerPurchaseCategoryBean> monthSummaryData = materialMapper.getWorkerMonthSummaryData(adminUser.getCompanyWechatId(), startDate, endDate);
+        List<WorkerPurchaseCategoryBean> monthSummaryData = materialMapper.getWorkerMonthSummaryData(adminUser.getCompanyWechatId(), startDate, endDate, websits);
 
         return monthSummaryData;
     }

+ 2 - 2
mall-server-api/src/main/resources/mapper/CommonMapper.xml

@@ -879,9 +879,9 @@
         ${ex.selected}
         FROM settle_expense a
         ${ex.query}
-        <if test='adminWebsitIds != null and adminWebsitIds.size > 0' >
+        <if test='ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0' >
             AND a.websit_id  in
-            <foreach collection="adminWebsitIds" open="(" close=")" item="item" separator=",">
+            <foreach collection="ex.adminWebsitIds" open="(" close=")" item="item" separator=",">
                 #{item}
             </foreach>
         </if>

+ 12 - 0
mall-server-api/src/main/resources/mapper/MaterialMapper.xml

@@ -1430,6 +1430,12 @@
                             AND a.company_wechat_id = #{companyWechatId}
                             AND a.flag = 'PAY_TAKE'
                             AND a.confirm_time BETWEEN #{startDate} AND #{endDate}
+                            <if test="websits != null and websits.size > 0">
+                                AND a.websit_id in
+                                <foreach item="item" index="index" collection="websits" open="(" separator="," close=")">
+                                    #{item}
+                                </foreach>
+                            </if>
                         UNION ALL
                         SELECT
                             a.identity,
@@ -1449,6 +1455,12 @@
                             AND a.company_wechat_id = #{companyWechatId}
                             AND a.confirm_by IS NOT NULL
                             AND a.confirm_time BETWEEN #{startDate} AND #{endDate}
+                            <if test="websits != null and websits.size > 0">
+                                AND a.websit_id in
+                                <foreach item="item" index="index" collection="websits" open="(" separator="," close=")">
+                                    #{item}
+                                </foreach>
+                            </if>
                     ) a
                     LEFT JOIN websit_goods b ON a.goods_id = b.goods_id
                 GROUP BY

+ 2 - 2
mall-server-sync-api/src/main/resources/mapper/CommonMapper.xml

@@ -879,9 +879,9 @@
         ${ex.selected}
         FROM settle_expense a
         ${ex.query}
-        <if test='adminWebsitIds != null and adminWebsitIds.size > 0' >
+        <if test='ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0' >
             AND a.websit_id  in
-            <foreach collection="adminWebsitIds" open="(" close=")" item="item" separator=",">
+            <foreach collection="ex.adminWebsitIds" open="(" close=")" item="item" separator=",">
                 #{item}
             </foreach>
         </if>