|
|
@@ -8,6 +8,40 @@
|
|
|
into_id
|
|
|
, into_no, into_type, from_id, from_no, org_id, staff_id, cus_id, sup_id, into_status, intoing_qty, intoing_amt, into_qty, into_amt, return_qty, return_amt, into_date, remarks, annex_paths, make_staff, make_time, receivable_id, payable_id, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
|
|
|
</sql>
|
|
|
+ <sql id="Base_Column_List_tpi">
|
|
|
+ tpi.into_id
|
|
|
+ , tpi.into_no
|
|
|
+ , tpi.into_type
|
|
|
+ , tpi.from_id
|
|
|
+ , tpi.from_no
|
|
|
+ , tpi.org_id
|
|
|
+ , tpi.staff_id
|
|
|
+ , tpi.cus_id
|
|
|
+ , tpi.sup_id
|
|
|
+ , tpi.into_status
|
|
|
+ , tpi.intoing_qty
|
|
|
+ , tpi.intoing_amt
|
|
|
+ , tpi.into_qty
|
|
|
+ , tpi.into_amt
|
|
|
+ , tpi.return_qty
|
|
|
+ , tpi.return_amt
|
|
|
+ , tpi.into_date
|
|
|
+ , tpi.remarks
|
|
|
+ , tpi.annex_paths
|
|
|
+ , tpi.make_staff
|
|
|
+ , tpi.make_time
|
|
|
+ , tpi.receivable_id
|
|
|
+ , tpi.payable_id
|
|
|
+ , tpi.flg_valid
|
|
|
+ , tpi.cp_id
|
|
|
+ , tpi.op_create_time
|
|
|
+ , tpi.op_create_user_id
|
|
|
+ , tpi.op_update_time
|
|
|
+ , tpi.op_update_user_id
|
|
|
+ , tpi.op_app_code
|
|
|
+ , tpi.op_timestamp
|
|
|
+ , tpi.op_db_user
|
|
|
+ </sql>
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.ivt.Inbound">
|
|
|
@@ -45,6 +79,41 @@
|
|
|
<result column="op_db_user" property="opDbUser"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <!-- 通用查询映射结果 -->
|
|
|
+ <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.ivt.InboundResponse">
|
|
|
+ <id column="into_id" property="intoId"/>
|
|
|
+ <result column="into_no" property="intoNo"/>
|
|
|
+ <result column="into_type" property="intoType"/>
|
|
|
+ <result column="from_id" property="fromId" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="from_no" property="fromNo"/>
|
|
|
+ <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="sup_id" property="supId" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="into_status" property="intoStatus"/>
|
|
|
+ <result column="intoing_qty" property="intoingQty"/>
|
|
|
+ <result column="intoing_amt" property="intoingAmt"/>
|
|
|
+ <result column="into_qty" property="intoQty"/>
|
|
|
+ <result column="into_amt" property="intoAmt"/>
|
|
|
+ <result column="return_qty" property="returnQty"/>
|
|
|
+ <result column="return_amt" property="returnAmt"/>
|
|
|
+ <result column="into_date" property="intoDate" typeHandler="TimestampTypeHandler"/>
|
|
|
+ <result column="remarks" property="remarks"/>
|
|
|
+ <result column="annex_paths" property="annexPaths" typeHandler="JsonTypeHandler"/>
|
|
|
+ <result column="make_staff" property="makeStaff" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
|
|
|
+ <result column="receivable_id" property="receivableId" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="payable_id" property="payableId" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="flg_valid" property="flgValid"/>
|
|
|
+ <result column="cp_id" property="cpId"/>
|
|
|
+ <result column="op_create_time" property="opCreateTime" typeHandler="TimestampTypeHandler"/>
|
|
|
+ <result column="op_create_user_id" property="opCreateUserId" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
|
|
|
+ <result column="op_update_user_id" property="opUpdateUserId" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="op_app_code" property="opAppCode"/>
|
|
|
+ <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
|
|
|
+ <result column="op_db_user" property="opDbUser"/>
|
|
|
+ </resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
@@ -308,11 +377,21 @@
|
|
|
</sql>
|
|
|
|
|
|
<!-- 查询表t_psi_inbound,(条件查询+分页)列表 -->
|
|
|
- <select id="selectByCond" resultMap="BaseResultMap">
|
|
|
+ <select id="selectByCond" resultMap="BaseResultMapResponse">
|
|
|
SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- FROM dkic_b.t_psi_inbound
|
|
|
- <include refid="Condition"/>
|
|
|
+ <include refid="Base_Column_List_tpi"/>,
|
|
|
+ tmo.org_name AS "orgName",
|
|
|
+ tmp.sup_name AS "supplierName",
|
|
|
+ tms.staff_name AS "staffName",
|
|
|
+ tms.staff_name AS "makeStaffName",
|
|
|
+ sys.f_get_name_i18n(tdk.kind_name_i18n, 'zh_CN') AS "intoStatusName"
|
|
|
+ FROM dkic_b.t_psi_inbound tpi
|
|
|
+ Left join dkic_b.t_mst_org tmo on tmo.org_id = tpi.org_id
|
|
|
+ Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = tpi.sup_id
|
|
|
+ Left join dkic_b.t_mst_staff tms on tms.staff_id = tpi.staff_id
|
|
|
+ Left join dkic_b.t_mst_staff tms1 on tms1.staff_id = tpi.make_staff
|
|
|
+ LEFT JOIN sys.t_data_kind tdk ON tdk.kind_code = tpi.into_status
|
|
|
+ <include refid="Condition_Join"/>
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
|
</if>
|