Commit 8ffbd43c authored by lizhichao's avatar lizhichao

应收、应付列表查询功能优化

parent 772ee3d2
...@@ -131,6 +131,16 @@ public class TTradeProject extends BaseEntity ...@@ -131,6 +131,16 @@ public class TTradeProject extends BaseEntity
private String tradeTransactorName; private String tradeTransactorName;
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
private String projectName;
/**操作类型*/ /**操作类型*/
private List<String> operators = new ArrayList<>(); private List<String> operators = new ArrayList<>();
......
...@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="tradeId" column="trade_id" /> <result property="tradeId" column="trade_id" />
<result property="receiptNum" column="receipt_num" /> <result property="receiptNum" column="receipt_num" />
<result property="relationTransactionProjectId" column="relation_transaction_project_id" /> <result property="relationTransactionProjectId" column="relation_transaction_project_id" />
<result property="projectName" column="project_name" />
<result property="applyId" column="apply_id" /> <result property="applyId" column="apply_id" />
<result property="applyDeptId" column="apply_dept_id" /> <result property="applyDeptId" column="apply_dept_id" />
<result property="applyDeptManagerId" column="apply_dept_manager_id" /> <result property="applyDeptManagerId" column="apply_dept_manager_id" />
...@@ -223,9 +224,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -223,9 +224,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND pending_payment > 0 AND pending_payment > 0
</select> </select>
<select id="getIncomeOrPayableList" parameterType="TTradeProject" resultMap="TTradeProjectResult"> <select id="getIncomeOrPayableList" parameterType="TTradeProject" resultMap="TTradeProjectResult">
<include refid="selectTTradeProjectVo"/> SELECT
trade_id,
receipt_num,
relation_transaction_project_id,
apply_id,
apply_dept_id,
apply_dept_manager_id,
(select transaction_project_name from t_transaction_project where transaction_project_id=relation_transaction_project_id) project_name,
trade_transactor,
trade_dept_id,
trade_price,
trade_count,
trade_total,
trade_score,
trade_dept_manager_id,
settlement_time,
deal_price,
pending_payment,
attachment_url,
trade_status,
create_time,
update_time,
is_del,
remark,
deal_remark,
(SELECT nick_name FROM sys_user WHERE user_id = trade_transactor) AS trade_transactor_name,
(SELECT nick_name FROM sys_user WHERE user_id = apply_id) AS apply_name,
(SELECT dept_name FROM sys_dept WHERE dept_id = apply_dept_id) AS apply_dept_name,
(SELECT dept_name FROM sys_dept WHERE dept_id = trade_dept_id) AS trade_dept_name
FROM
t_trade_project
<where> <where>
trade_status =3 trade_status =3 and pending_payment>0
<if test="applyDeptId != null"> and apply_dept_id = #{applyDeptId}</if> <if test="applyDeptId != null"> and apply_dept_id = #{applyDeptId}</if>
<if test="tradeTransactor != null"> and trade_transactor = #{tradeTransactor}</if> <if test="tradeTransactor != null"> and trade_transactor = #{tradeTransactor}</if>
<if test="tradeDeptId != null"> and trade_dept_id = #{tradeDeptId}</if> <if test="tradeDeptId != null"> and trade_dept_id = #{tradeDeptId}</if>
......
...@@ -13,13 +13,15 @@ ...@@ -13,13 +13,15 @@
<el-table-column <el-table-column
label="交易项目" label="交易项目"
align="center" align="center"
prop="a" prop="projectName"
:formatter="formatter" :formatter="formatter"
/> />
<el-table-column label="卖方" align="center" prop="tradeTransactorName" /> <el-table-column label="卖方部门" align="center" prop="applyDeptName" />
<el-table-column label="申请人" align="center" prop="applyName" /> <el-table-column label="申请人" align="center" prop="applyName" />
<el-table-column label="买方" align="center" prop="applyDeptName" /> <el-table-column label="申请时间" align="center" prop="createTime" />
<el-table-column label="买方经办人" align="center" prop="tradeDeptName" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="买方部门" align="center" prop="tradeDeptName" />
<el-table-column label="买方经办人" align="center" prop="tradeTransactorName" />
<template v-if="or === 'income'"> <template v-if="or === 'income'">
<el-table-column <el-table-column
label="应收金额" label="应收金额"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment