Parcourir la source

供应商产能报表 添加排序

huxy il y a 2 ans
Parent
commit
7d54cbfcda

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/SupplierCapacityMapper.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.scas.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -35,6 +36,7 @@ public interface SupplierCapacityMapper extends BaseMapper<SupplierCapacity> {
 
     IPage<SupplierCapacity> selectPage(@Param("ew")QueryWrapper<SupplierCapacityDto> queryWrapper);
 
+    //@InterceptorIgnore(tenantLine = "true")
     List<SupplierCapacity> selectPage2(@Param("begin")Integer begin, @Param("end")Integer end, @Param("ew")QueryWrapper<SupplierCapacityDto> queryWrapper);
 
     long selectCounts(@Param("ew")QueryWrapper<SupplierCapacityDto> queryWrapper);

+ 9 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/xml/SupplierCapacityMapper.xml

@@ -127,13 +127,21 @@
             left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
             left join ComputationUnit on OM_MODetails.cUnitID=ComputationUnit.cComunitCode
             left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
+
+             SELECT  * FROM  Supplier_Capacity_Test p
+        ${ew.customSqlSegment}
+        order by p.darrivedate desc
+        OFFSET (${begin} -1)*10 ROWS FETCH NEXT ${end} ROWS ONLY
+
+        -- WITH selectTemp AS (SELECT TOP 100 PERCENT ROW_NUMBER() OVER (ORDER BY darrivedate) as __row_number__, * FROM Supplier_Capacity_Test p
+        --${ew.customSqlSegment})  SELECT * FROM selectTemp WHERE __row_number__ BETWEEN ${begin} AND ${end} ORDER BY __row_number__
             )p*/
             select  * from Supplier_Capacity_Test p
             ${ew.customSqlSegment}
     </select>
 
     <select id="selectPage2" resultType="org.jeecg.modules.scas.entity.SupplierCapacity">
-         WITH selectTemp AS (SELECT TOP 100 PERCENT ROW_NUMBER() OVER (ORDER BY darrivedate) as __row_number__, * FROM Supplier_Capacity_Test p
+        WITH selectTemp AS (SELECT TOP 100 PERCENT ROW_NUMBER() OVER (ORDER BY darrivedate,csrccode) as __row_number__, * FROM Supplier_Capacity_Test p
         ${ew.customSqlSegment})  SELECT * FROM selectTemp WHERE __row_number__ BETWEEN ${begin} AND ${end} ORDER BY __row_number__
     </select>