Prechádzať zdrojové kódy

资金流水明细 添加往来单位名称

yzc 1 rok pred
rodič
commit
e942d72e30

+ 5 - 0
hx-account/src/main/java/com/fjhx/account/entity/account/vo/AccountRunningWaterVo.java

@@ -102,4 +102,9 @@ public class AccountRunningWaterVo extends AccountRunningWater {
      * 销售合同id集合
      */
     private String contractIds;
+
+    /**
+     * 往来部门名称
+     */
+    private String transactionDeptName;
 }

+ 9 - 0
hx-account/src/main/java/com/fjhx/account/service/account/impl/AccountRunningWaterServiceImpl.java

@@ -18,11 +18,13 @@ import com.fjhx.account.entity.account.po.AccountRunningWater;
 import com.fjhx.account.entity.account.vo.AccountRunningWaterVo;
 import com.fjhx.account.entity.tax.po.TaxRefundDetails;
 import com.fjhx.account.entity.transaction.po.Transaction;
+import com.fjhx.account.entity.transaction.po.TransactionDepartment;
 import com.fjhx.account.mapper.account.AccountRunningWaterMapper;
 import com.fjhx.account.service.account.AccountManagementService;
 import com.fjhx.account.service.account.AccountRemainderService;
 import com.fjhx.account.service.account.AccountRunningWaterService;
 import com.fjhx.account.service.tax.TaxRefundDetailsService;
+import com.fjhx.account.service.transaction.TransactionDepartmentService;
 import com.fjhx.account.service.transaction.TransactionService;
 import com.fjhx.common.constant.SourceConstant;
 import com.fjhx.common.entity.corporation.po.Corporation;
@@ -75,6 +77,8 @@ public class AccountRunningWaterServiceImpl extends ServiceImpl<AccountRunningWa
     private TaxRefundDetailsService taxRefundDetailsService;
     @Autowired
     private TransactionService transactionService;
+    @Autowired
+    private TransactionDepartmentService transactionDepartmentService;
 
     @Override
     public Page<AccountRunningWaterVo> getPage(AccountRunningWaterSelectDto dto) {
@@ -183,6 +187,11 @@ public class AccountRunningWaterServiceImpl extends ServiceImpl<AccountRunningWa
         if (ObjectUtil.isNotEmpty(corporation)) {
             result.setCorporationName(corporation.getName());
         }
+        //赋值往来单位名称
+        TransactionDepartment transactionDepartment = transactionDepartmentService.getById(result.getTransactionDeptId());
+        if (ObjectUtil.isNotEmpty(transactionDepartment)) {
+            result.setTransactionDeptName(transactionDepartment.getName());
+        }
         return result;
     }
 

+ 4 - 2
hx-account/src/main/resources/mapper/account/AccountRunningWaterMapper.xml

@@ -102,8 +102,10 @@
             arw.create_time,
             arw.update_user,
             arw.update_time,
-            am.name accountManagementName,
-            am.corporation_id
+            am.name                       accountManagementName,
+            am.corporation_id,
+            ifnull(arw.is_transaction, 0) isTransaction,
+            arw.transaction_dept_id
         from account_running_water arw
                  left join account_management am on arw.account_management_id = am.id
         where arw.id = #{id}