|
@@ -9,6 +9,7 @@
|
|
|
<resultMap type="com.keao.edu.user.entity.ExamManualLedger" id="ExamManualLedger">
|
|
|
<result column="id_" property="id" />
|
|
|
<result column="organ_id_" property="organId"/>
|
|
|
+ <result column="target_organ_id_" property="targetOrganId"/>
|
|
|
<result column="examination_basic_id_" property="examinationBasicId" />
|
|
|
<result column="trans_direction_" property="transDirection" />
|
|
|
<result column="amount_" property="amount" />
|
|
@@ -38,8 +39,8 @@
|
|
|
SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
|
|
|
</selectKey>
|
|
|
-->
|
|
|
- INSERT INTO exam_manual_ledger (organ_id_,examination_basic_id_,trans_direction_,amount_,trans_time_,memo_,operator_user_id_,tenant_id_,create_time_)
|
|
|
- VALUES(#{organId},#{examinationBasicId},#{transDirection},#{amount},#{transTime},#{memo},#{operatorUserId},#{tenantId},NOW())
|
|
|
+ INSERT INTO exam_manual_ledger (organ_id_,target_organ_id_,examination_basic_id_,trans_direction_,amount_,trans_time_,memo_,operator_user_id_,tenant_id_,create_time_)
|
|
|
+ VALUES(#{organId},#{targetOrganId},#{examinationBasicId},#{transDirection},#{amount},#{transTime},#{memo},#{operatorUserId},#{tenantId},NOW())
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -49,6 +50,9 @@
|
|
|
<if test="organId!=null">
|
|
|
organ_id_=#{organId},
|
|
|
</if>
|
|
|
+ <if test="targetOrganId!=null">
|
|
|
+ target_organ_id_=#{targetOrganId},
|
|
|
+ </if>
|
|
|
<if test="examinationBasicId != null">
|
|
|
examination_basic_id_ = #{examinationBasicId},
|
|
|
</if>
|
|
@@ -92,6 +96,9 @@
|
|
|
<sql id="queryExamManualLedgersCondition">
|
|
|
<where>
|
|
|
examination_basic_id_=#{examId}
|
|
|
+ <if test="organId!=null and organId!=0">
|
|
|
+ AND organ_id_=#{organId}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
|
|
@@ -102,7 +109,7 @@
|
|
|
su.real_name_ user_real_name_
|
|
|
FROM
|
|
|
exam_manual_ledger eml
|
|
|
- LEFT JOIN organization o ON eml.organ_id_ = o.id_
|
|
|
+ LEFT JOIN organization o ON eml.target_organ_id_ = o.id_
|
|
|
LEFT JOIN sys_user su ON eml.operator_user_id_ = su.id_
|
|
|
<include refid="queryExamManualLedgersCondition"/>
|
|
|
ORDER BY id_
|