Bladeren bron

销售订单报表统计图

liuchaohui 2 jaren geleden
bovenliggende
commit
c5d9a0a090

+ 8 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/controller/SoSoDetailsController.java

@@ -205,8 +205,10 @@ public class SoSoDetailsController extends JeecgController<SoSoDetails, ISoSoDet
 	 @GetMapping(value = "/QuerySO_SOMainReportBydepartment")
 	 public Result<List<SoSoDetails>> QuerySO_SOMainReportBydepartment(String vendorType,String startYearMonth,String endYearMonth,
 														String department){
-
-		 return null;
+		 Result<List<SoSoDetails>> result =new Result<>();
+		 List<SoSoDetails> list = soSoDetailsService.QuerySO_SOMainReportBydepartment(vendorType, startYearMonth, endYearMonth, department);
+		 result.setResult(list);
+		 return result;
 	 }
 
 	 /**
@@ -217,8 +219,10 @@ public class SoSoDetailsController extends JeecgController<SoSoDetails, ISoSoDet
 	 @GetMapping(value = "/QuerySO_SOMainReportBycustomer")
 	 public Result<List<SoSoDetails>> QuerySO_SOMainReportBycustomer(String vendorType,String startYearMonth,String endYearMonth,
 																	 String customer){
-
-		 return null;
+		 Result<List<SoSoDetails>> result =new Result<>();
+		 List<SoSoDetails> list = soSoDetailsService.QuerySO_SOMainReportBycustomer(vendorType, startYearMonth, endYearMonth, customer);
+		 result.setResult(list);
+		 return result;
 	 }
 
 }

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/xml/SoSoDetailsMapper.xml

@@ -56,6 +56,7 @@
         LEFT JOIN SO_SODetails ssd ON ss.ID= ssd.ID
         left join Vendor v on ss.cCusCode=v.cVenCode
         left join Department de on ss.cDepCode=de.cDepCode
+        left join Customer cc on ss.cCusCode = cc.cCusCode
         WHERE
         CONVERT ( CHAR ( 7 ), ss.dPreDateBT, 120 ) <![CDATA[ >= ]]> #{startYearMonth}
         AND CONVERT ( CHAR ( 7 ), ss.dPreDateBT, 120 ) <![CDATA[ <= ]]> #{endYearMonth}
@@ -68,7 +69,7 @@
         <if test="department!=null and map.department!='' ">
             and de.cDepName = #{department}
         </if>
-        GROUP BY de.cDepName
+        GROUP BY cc.cCusName
     </select>
 
 
@@ -83,6 +84,7 @@
         LEFT JOIN SO_SODetails ssd ON ss.ID= ssd.ID
         left join Vendor v on ss.cCusCode=v.cVenCode
         left join Customer cc on ss.cCusCode = cc.cCusCode
+        left join Department de on ss.cDepCode=de.cDepCode
         WHERE
         CONVERT ( CHAR ( 7 ), ss.dPreDateBT, 120 ) <![CDATA[ >= ]]> #{startYearMonth}
         AND CONVERT ( CHAR ( 7 ), ss.dPreDateBT, 120 ) <![CDATA[ <= ]]> #{endYearMonth}

+ 6 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/service/ISoSoDetailsService.java

@@ -1,7 +1,6 @@
 package org.jeecg.modules.report.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.apache.ibatis.annotations.Param;
 import org.jeecg.modules.report.entity.SoSoDetails;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -21,4 +20,10 @@ public interface ISoSoDetailsService extends IService<SoSoDetails> {
      * @return
      */
     IPage<SoSoDetails> getSO_SOMainReport(IPage<SoSoDetails> page,Map<String, Object> map);
+
+    List<SoSoDetails> QuerySO_SOMainReportBydepartment(String department,
+                                                       String vendorType,String startYearMonth,String endYearMonth);
+
+    List<SoSoDetails> QuerySO_SOMainReportBycustomer(String customer,
+                                                     String vendorType,String startYearMonth,String endYearMonth);
 }

+ 12 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/service/impl/SoSoDetailsServiceImpl.java

@@ -26,4 +26,16 @@ public class SoSoDetailsServiceImpl extends ServiceImpl<SoSoDetailsMapper, SoSoD
     public IPage<SoSoDetails> getSO_SOMainReport(IPage<SoSoDetails> page,Map<String, Object> map) {
         return this.baseMapper.getSO_SOMainReport(page,map);
     }
+
+    @Override
+    @DS("multi-one")
+    public List<SoSoDetails> QuerySO_SOMainReportBydepartment(String department, String vendorType, String startYearMonth, String endYearMonth) {
+        return this.baseMapper.QuerySO_SOMainReportBydepartment(department,vendorType,startYearMonth,endYearMonth);
+    }
+
+    @Override
+    @DS("multi-one")
+    public List<SoSoDetails> QuerySO_SOMainReportBycustomer(String customer, String vendorType, String startYearMonth, String endYearMonth) {
+        return this.baseMapper.QuerySO_SOMainReportBycustomer(customer,vendorType,startYearMonth,endYearMonth);
+    }
 }