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

销售发票增加归属公司过滤

caozj пре 1 година
родитељ
комит
bb914677d9

+ 5 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/contract/dto/ContractInvoiceSelectDto.java

@@ -19,4 +19,9 @@ public class ContractInvoiceSelectDto extends BaseSelectDto {
      */
     private Integer invoiceType;
 
+    /**
+     * 归属公司
+     */
+    private Long corporationId;
+
 }

+ 5 - 2
hx-sale/src/main/java/com/fjhx/sale/service/contract/impl/ContractInvoiceServiceImpl.java

@@ -73,9 +73,12 @@ public class ContractInvoiceServiceImpl extends ServiceImpl<ContractInvoiceMappe
     @Override
     public Page<ContractInvoiceVo> getPage(ContractInvoiceSelectDto dto) {
         IWrapper<ContractInvoice> wrapper = getWrapper();
-        wrapper.orderByDesc("t1", Invoice::getCreateTime);
+        wrapper.orderByDesc("t1", ContractInvoice::getCreateTime);
         if(ObjectUtils.isNotEmpty(dto.getInvoiceType())){
-            wrapper.eq("t1", Invoice::getType,dto.getInvoiceType());
+            wrapper.eq("t1", ContractInvoice::getType,dto.getInvoiceType());
+        }
+        if(ObjectUtils.isNotEmpty(dto.getCorporationId())){
+            wrapper.eq("t1", ContractInvoice::getCorporationId,dto.getCorporationId());
         }
         if(StringUtils.isNotEmpty(dto.getKeyword())){
             wrapper.keyword(dto.getKeyword(), new SqlField("t1.contractCodes"));