소스 검색

UPDATE CONTROLLER

jihs 4 년 전
부모
커밋
661b199fca

+ 6 - 3
src/main/java/org/jeecg/modules/payment/controller/ManagerPaymentAndReceiptSlipController.java

@@ -223,9 +223,12 @@ public class ManagerPaymentAndReceiptSlipController {
 			@ApiImplicitParam(name="pkOrg", value="组织",required=true, dataType="String"),
 	})
 	@GetMapping(value = "/getFinanceList")
-	public Result<List<FinanceListRespDTO>> getFinanceList(FinanceListReqDTO reqDTO) {
-		Result<List<FinanceListRespDTO>> result = new Result<List<FinanceListRespDTO>>();
-		List<FinanceListRespDTO> list  = managerPaymentAndReceiptSlipService.getFinanceList(reqDTO);
+	public Result<IPage<FinanceListRespDTO>> getFinanceList(FinanceListReqDTO reqDTO,
+		   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+		   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
+		Result<IPage<FinanceListRespDTO>> result = new Result<IPage<FinanceListRespDTO>>();
+		Page<ManagerPaymentAndReceiptSlip> page = new Page<ManagerPaymentAndReceiptSlip>(pageNo, pageSize);
+		IPage<FinanceListRespDTO> list  = managerPaymentAndReceiptSlipService.getFinanceList(page, reqDTO);
 		result.setResult(list);
 		result.setSuccess(true);
 		return result;

+ 3 - 1
src/main/java/org/jeecg/modules/payment/mapper/ManagerPaymentAndReceiptSlipMapper.java

@@ -3,6 +3,8 @@ package org.jeecg.modules.payment.mapper;
 import java.util.List;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.ibatis.annotations.Param;
 import org.jeecg.common.dto.archives.ExpensePriceReqDTO;
 import org.jeecg.common.dto.payment.FinanceListReqDTO;
@@ -33,5 +35,5 @@ public interface ManagerPaymentAndReceiptSlipMapper extends BaseMapper<ManagerPa
     /**
      * @desc 财务收款确认列表
      */
-    List<FinanceListRespDTO> getFinanceList(FinanceListReqDTO reqDTO);
+    IPage<FinanceListRespDTO> getFinanceList(Page<ManagerPaymentAndReceiptSlip> page, @Param("reqDTO") FinanceListReqDTO reqDTO);
 }

+ 4 - 4
src/main/java/org/jeecg/modules/payment/mapper/xml/ManagerPaymentAndReceiptSlipMapper.xml

@@ -77,11 +77,11 @@
             JOIN manage_payment_and_receipt_content AS b
             ON a.id = b.slip_id
             WHERE a.del_flag = '0' AND b.del_flag = '0'
-            <if test = "billCode != null and billCode != ''">
-               AND a.billcode = #{billCode}
+            <if test = "reqDTO.billCode != null and reqDTO.billCode != ''">
+               AND a.billcode = #{reqDTO.billCode}
             </if>
-            <if test = "pkOrg != null and pkOrg != ''">
-                AND a.pk_org = #{pkOrg}
+            <if test = "reqDTO.pkOrg != null and reqDTO.pkOrg != ''">
+                AND a.pk_org = #{reqDTO.pkOrg}
             </if>
       </select>
 

+ 3 - 1
src/main/java/org/jeecg/modules/payment/service/ManagerPaymentAndReceiptSlipService.java

@@ -1,5 +1,7 @@
 package org.jeecg.modules.payment.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.jeecg.common.dto.archives.ExpensePriceReqDTO;
 import org.jeecg.common.dto.archives.ExpensePriceRespDTO;
 import org.jeecg.common.dto.payment.FinanceListEditReqDTO;
@@ -57,7 +59,7 @@ public interface ManagerPaymentAndReceiptSlipService extends IService<ManagerPay
     /**
      * @desc 财务收款确认列表(一一对应)
      */
-    List<FinanceListRespDTO> getFinanceList(FinanceListReqDTO reqDTO);
+    IPage<FinanceListRespDTO> getFinanceList(Page<ManagerPaymentAndReceiptSlip> page, FinanceListReqDTO reqDTO);
     /**
      * @desc 修改财务收款确认状态
      */

+ 4 - 2
src/main/java/org/jeecg/modules/payment/service/impl/ManagerPaymentAndReceiptSlipServiceImpl.java

@@ -2,6 +2,8 @@ package org.jeecg.modules.payment.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.google.common.collect.Lists;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.dto.archives.ExpensePriceReqDTO;
@@ -174,8 +176,8 @@ public class ManagerPaymentAndReceiptSlipServiceImpl extends ServiceImpl<Manager
      * @desc 财务收款确认列表
      */
     @Override
-    public List<FinanceListRespDTO> getFinanceList(FinanceListReqDTO reqDTO) {
-        return managerPaymentAndReceiptSlipMapper.getFinanceList(reqDTO);
+    public IPage<FinanceListRespDTO> getFinanceList(Page<ManagerPaymentAndReceiptSlip> page, FinanceListReqDTO reqDTO) {
+        return managerPaymentAndReceiptSlipMapper.getFinanceList(page, reqDTO);
     }
 
     /**