Procházet zdrojové kódy

Merge branch 'test' into dev

yzc před 1 rokem
rodič
revize
400149ac2f

+ 5 - 0
hx-account/src/main/java/com/fjhx/account/entity/transaction/dto/TransactionSelectDto.java

@@ -28,4 +28,9 @@ public class TransactionSelectDto extends BaseSelectDto {
      */
     private Integer type;
 
+    /**
+     * 归属公司
+     */
+    private Long corporationId;
+
 }

+ 3 - 0
hx-account/src/main/java/com/fjhx/account/service/transaction/impl/TransactionServiceImpl.java

@@ -16,6 +16,7 @@ import com.fjhx.account.service.account.AccountRunningWaterService;
 import com.fjhx.account.service.transaction.TransactionDepartmentService;
 import com.fjhx.account.service.transaction.TransactionService;
 import com.fjhx.common.service.corporation.CorporationService;
+import com.fjhx.common.utils.Assert;
 import com.fjhx.common.utils.ExchangeRateUtil;
 import com.ruoyi.common.utils.wrapper.IWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -52,6 +53,7 @@ public class TransactionServiceImpl extends ServiceImpl<TransactionMapper, Trans
         wrapper.eq(Transaction::getIsFlowingWater, dto.getIsFlowingWater());
         wrapper.eq(Transaction::getDepartmentId, dto.getDepartmentId());
         wrapper.eq(Transaction::getType, dto.getType());
+        wrapper.eq(Transaction::getCorporationId, dto.getCorporationId());
         //关键字搜索
         if (ObjectUtil.isNotEmpty(dto.getKeyword())) {
             List<Long> accountIds = accountManagementService.listObject(AccountManagement::getId,
@@ -84,6 +86,7 @@ public class TransactionServiceImpl extends ServiceImpl<TransactionMapper, Trans
     @Override
     @DSTransactional
     public void add(TransactionDto transactionDto) {
+        Assert.notEmpty(transactionDto.getDeptType(), "往来部门类型不能为空");
         //如果是流水就创建流水数据
         if (1 == transactionDto.getIsFlowingWater()) {
             AccountRunningWater accountRunningWater = new AccountRunningWater();