|
@@ -26,11 +26,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="account" column="account" />
|
|
|
<result property="openingBank" column="opening_bank" />
|
|
|
<result property="openingBankAccount" column="opening_bank_account" />
|
|
|
+ <result property="fBillstatus" column="f_billstatus" />
|
|
|
+ <result property="applicantId" column="applicant_id" />
|
|
|
+ <result property="applicantName" column="applicant_name" />
|
|
|
+ <result property="fReviewDate" column="f_review_date" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTCostManagementVo">
|
|
|
select f_id, f_no, create_by, create_time, update_by, update_time, remark, del_flag, f_status, dept_id, dept_name,
|
|
|
- create_dept, create_dept_name, business_time, business_type, expense_type, total_amount, create_by_id, account, opening_bank, opening_bank_account
|
|
|
+ create_dept, create_dept_name, business_time, business_type, expense_type, total_amount, create_by_id, account, opening_bank, opening_bank_account,
|
|
|
+ f_billstatus, applicant_id, applicant_name, f_review_date
|
|
|
from t_cost_management
|
|
|
</sql>
|
|
|
|
|
@@ -58,6 +63,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
TCM.f_id,
|
|
|
TCM.f_no,
|
|
|
TCM.f_status,
|
|
|
+ CASE
|
|
|
+ WHEN TCM.f_status = '0' THEN '录入'
|
|
|
+ WHEN TCM.f_status = '1' THEN '请核'
|
|
|
+ WHEN TCM.f_status = '2' THEN '审批中'
|
|
|
+ WHEN TCM.f_status = '3' THEN '审批通过'
|
|
|
+ WHEN TCM.f_status = '4' THEN '完成'
|
|
|
+ END
|
|
|
+ AS fStatusName,
|
|
|
TCM.dept_id,
|
|
|
TCM.dept_name,
|
|
|
TCM.create_by,
|
|
@@ -66,7 +79,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
TCM.business_time,
|
|
|
TCM.create_time,
|
|
|
TCM.total_amount,
|
|
|
- TCM.remark
|
|
|
+ TCM.remark,
|
|
|
+ TCM.f_billstatus,
|
|
|
+ TCM.applicant_id,
|
|
|
+ TCM.applicant_name,
|
|
|
+ TCM.f_review_date
|
|
|
from t_cost_management TCM
|
|
|
LEFT JOIN t_cost_management_item TCMI ON TCMI.f_pid = TCM.f_id
|
|
|
<where>
|
|
@@ -95,7 +112,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectTCostManagementById" parameterType="Long" resultMap="TCostManagementResult">
|
|
|
select TCM.f_id, TCM.f_no, TCM.create_by, TCM.create_time, TCM.update_by, TCM.update_time, TCM.remark, TCM.del_flag, TCM.f_status, TCM.dept_id, TCM.dept_name,
|
|
|
TCM.create_dept, TCM.create_dept_name, TCM.business_time, TCM.business_type, TCM.expense_type, TCM.total_amount,
|
|
|
- TCM.create_by_id,pro.dict_label AS businessTypeName, sd.dict_label AS expenseTypeName, TCM.account, TCM.opening_bank, TCM.opening_bank_account
|
|
|
+ TCM.create_by_id,pro.dict_label AS businessTypeName, sd.dict_label AS expenseTypeName, TCM.account, TCM.opening_bank, TCM.opening_bank_account, TCM.f_billstatus,TCM.applicant_id,
|
|
|
+ TCM.applicant_name,TCM.f_review_date,
|
|
|
+ CASE
|
|
|
+ WHEN TCM.f_status = '0' THEN '录入'
|
|
|
+ WHEN TCM.f_status = '1' THEN '请核'
|
|
|
+ WHEN TCM.f_status = '2' THEN '审批中'
|
|
|
+ WHEN TCM.f_status = '3' THEN '审批通过'
|
|
|
+ WHEN TCM.f_status = '4' THEN '完成'
|
|
|
+ END
|
|
|
+ AS fStatusName
|
|
|
from t_cost_management TCM
|
|
|
LEFT JOIN sys_dict_data pro ON pro.dict_value = TCM.business_type AND pro.dict_type = 'expense_business_type'
|
|
|
LEFT JOIN sys_dict_data sd ON sd.dict_value = TCM.expense_type AND sd.dict_type = 'reimbursement_method'
|
|
@@ -128,6 +154,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="account != null">account,</if>
|
|
|
<if test="openingBank != null">opening_bank,</if>
|
|
|
<if test="openingBankAccount != null">opening_bank_account,</if>
|
|
|
+ <if test="fBillstatus != null">f_billstatus,</if>
|
|
|
+ <if test="applicantId != null">applicant_id,</if>
|
|
|
+ <if test="applicantName != null">applicant_name,</if>
|
|
|
+ <if test="fReviewDate != null">f_review_date,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="fNo != null">#{fNo},</if>
|
|
@@ -150,6 +180,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="account != null">#{account},</if>
|
|
|
<if test="openingBank != null">#{openingBank},</if>
|
|
|
<if test="openingBankAccount != null">#{openingBankAccount},</if>
|
|
|
+ <if test="fBillstatus != null">#{fBillstatus},</if>
|
|
|
+ <if test="applicantId != null">#{applicantId},</if>
|
|
|
+ <if test="applicantName != null">#{applicantName},</if>
|
|
|
+ <if test="fReviewDate != null">#{fReviewDate},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -175,6 +209,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="account != null">account = #{account},</if>
|
|
|
<if test="openingBank != null">opening_bank = #{openingBank},</if>
|
|
|
<if test="openingBankAccount != null">opening_bank_account = #{openingBankAccount},</if>
|
|
|
+ <if test="fBillstatus != null">f_billstatus = #{fBillstatus},</if>
|
|
|
+ <if test="applicantId != null">applicant_id = #{applicantId},</if>
|
|
|
+ <if test="applicantName != null">applicant_name = #{applicantName},</if>
|
|
|
+ <if test="fReviewDate != null">f_review_date = #{fReviewDate},</if>
|
|
|
</trim>
|
|
|
where f_id = #{fId}
|
|
|
</update>
|