Просмотр исходного кода

只查询总单, 不包含总单加明细

姜永辉 2 лет назад
Родитель
Сommit
5a3c2c9d5f

+ 11 - 0
src/main/java/com/dk/mdm/controller/mac/AccountController.java

@@ -47,6 +47,17 @@ public class AccountController extends BaseController<Account> {
         return accountService.selectAccountById(id);
     }
 
+    /**
+     * @desc :  总单加明细总数量
+     * @author : 姜永辉
+     * @date : 2024/3/6 10:36
+     */
+    @PostMapping({"/get_account_item_count"})
+    public ResponseResultVO countByCond(@RequestBody AccountItemQuery accountItemQuery) {
+        return accountService.countByCond(accountItemQuery);
+    }
+
+
 
     /**
      * @desc : 查询应收账款明细

+ 6 - 0
src/main/java/com/dk/mdm/mapper/mac/AccountItemMapper.java

@@ -15,6 +15,12 @@ import java.util.Map;
 @Repository
 public interface AccountItemMapper extends BaseMapper<AccountItem>{
     /**
+     * @desc : 查询应收账款明细-数量
+     * @author : 付斌
+     * @date : 2024-02-28 10:18
+     */
+    Long countByCond(AccountItemQuery accountItemQuery);
+    /**
      * @desc : 查询应收账款明细
      * @author : 付斌
      * @date : 2024-02-28 10:18

+ 3 - 0
src/main/java/com/dk/mdm/mapper/mac/AccountItemMapper.xml

@@ -105,6 +105,9 @@
             <if test="amtWaive != null">
                 AND t.amt_waive = #{amtWaive}
             </if>
+            <if test="amtResidueFlg != null">
+                AND t.amt_residue > 0
+            </if>
             <if test="amtResidue != null">
                 AND t.amt_residue = #{amtResidue}
             </if>

+ 2 - 0
src/main/java/com/dk/mdm/model/query/mac/AccountItemQuery.java

@@ -215,6 +215,8 @@ public class AccountItemQuery extends PageInfo<AccountItemQuery> implements Seri
     @ApiModelProperty(value = "企业ID")
     private Integer cpId;
 
+    @ApiModelProperty(value = "剩余金额是否大于0")
+    private Boolean amtResidueFlg;
 
     /*
      * 相关属性

+ 11 - 0
src/main/java/com/dk/mdm/service/mac/AccountService.java

@@ -77,6 +77,17 @@ public class AccountService extends BaseService<Account> {
     }
 
     /**
+     * @desc : 查询明细的总数量
+     * @author : 姜永辉
+     * @date : 2024/3/6 10:36
+     */
+    public ResponseResultVO countByCond(AccountItemQuery accountItemQuery) {
+        //根据id查询
+        Long aLong = accountItemMapper.countByCond(accountItemQuery);
+        return ResponseResultUtil.success(aLong);
+    }
+
+    /**
      * @desc : 查询应收账款明细
      * @author : 付斌
      * @date : 2024-02-28 13:25