|
|
@@ -634,6 +634,63 @@
|
|
|
</foreach>
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ <select id="selectByMainId" resultMap="MainMap">
|
|
|
+ select b.id,b.check_no,b.total_amount,b.order_no,o.contract_no,b.aname,b.apply_dep,b.pay_dep,
|
|
|
+ dep.name applyDepName,dep2.name payDepName, b.remarks,b.eaaid ,eap.name ,eap.bank ,eap.accounts ,b.status,b.process_status,
|
|
|
+ c.id sonId,c.total_amount sonAmount,c.`type` ,c.type_other ,c.user_names ,c.release_start ,c.release_end ,
|
|
|
+ d.id detId,d.`type` detType,d.amount ,d.start_district ,d.end_district
|
|
|
+ from expense_relationship a
|
|
|
+ left join expense_account b on a.id =b.id
|
|
|
+ left join department dep on b.apply_dep =dep.id left join department dep2 on b.pay_dep =dep2.id
|
|
|
+ left join t_order_new o on b.order_no =o.order_no left join expense_account_private eap on b.eaaid =eap.id
|
|
|
+ left join expense_account c on a.ea_id =c.id
|
|
|
+ left join expense_account_details d on c.id =d.eaid
|
|
|
+ where a.id= #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <resultMap id="MainMap" type="com.goafanti.expenseAccount.bo.MainExpenseAccount">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="check_no" jdbcType="VARCHAR" property="checkNo" />
|
|
|
+ <result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
|
|
|
+ <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
+ <result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
|
|
|
+ <result column="aname" jdbcType="VARCHAR" property="aname" />
|
|
|
+ <result column="apply_dep" jdbcType="VARCHAR" property="applyDep" />
|
|
|
+ <result column="pay_dep" jdbcType="VARCHAR" property="payDep" />
|
|
|
+ <result column="applyDepName" jdbcType="VARCHAR" property="applyDepName" />
|
|
|
+ <result column="payDepName" jdbcType="VARCHAR" property="payDepName" />
|
|
|
+ <result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
|
|
+ <result column="eaaid" jdbcType="INTEGER" property="eaaid" />
|
|
|
+ <result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
+ <result column="bank" jdbcType="VARCHAR" property="bank" />
|
|
|
+ <result column="accounts" jdbcType="VARCHAR" property="accounts" />
|
|
|
+ <result column="status" jdbcType="INTEGER" property="status" />
|
|
|
+ <result column="process_status" jdbcType="INTEGER" property="processStatus" />
|
|
|
+ <association property="sonList" resultMap="SonExpenseAccountMap"></association>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+<!--c.total_amount sonAmount,c.`type` ,c.type_other ,c.user_names ,c.release_start ,c.release_end ,-->
|
|
|
+ <resultMap id="SonExpenseAccountMap" type="com.goafanti.expenseAccount.bo.SonExpenseAccount">
|
|
|
+ <id column="sonId" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="sonAmount" jdbcType="DECIMAL" property="totalAmount" />
|
|
|
+ <result column="type" jdbcType="INTEGER" property="type" />
|
|
|
+ <result column="type_other" jdbcType="VARCHAR" property="typeOther" />
|
|
|
+ <result column="user_names" jdbcType="VARCHAR" property="userNames" />
|
|
|
+ <result column="release_start" jdbcType="VARCHAR" property="releaseStart" />
|
|
|
+ <result column="release_end" jdbcType="VARCHAR" property="releaseEnd" />
|
|
|
+ <association property="detList" resultMap="ExpenseAccountDetailsMap"></association>
|
|
|
+ </resultMap>
|
|
|
+<!--d.`type` detType,d.amount ,d.start_district ,d.end_district-->
|
|
|
+ <resultMap id="ExpenseAccountDetailsMap" type="com.goafanti.expenseAccount.bo.SonExpenseAccountDetails">
|
|
|
+ <id column="detId" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="detType" jdbcType="INTEGER" property="type" />
|
|
|
+ <result column="amount" jdbcType="DECIMAL" property="amount" />
|
|
|
+ <result column="start_district" jdbcType="VARCHAR" property="startDistrict" />
|
|
|
+ <result column="end_district" jdbcType="VARCHAR" property="endDistrict" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<update id="updateByIds" >
|
|
|
update expense_account
|
|
|
set status= #{status}
|