| 
															
																@@ -68,7 +68,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         ifnull(sum(zrbi.reimbursement_amount),0) as "alreadyReimbursementAmount", 
															 | 
															
															 | 
															
																         ifnull(sum(zrbi.reimbursement_amount),0) as "alreadyReimbursementAmount", 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         ifnull((a.reimbursement_quota - ifnull(sum(zrbi.reimbursement_amount),0)),0) as "remainReimbursementAmount", 
															 | 
															
															 | 
															
																         ifnull((a.reimbursement_quota - ifnull(sum(zrbi.reimbursement_amount),0)),0) as "remainReimbursementAmount", 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         ifnull(( CONVERT ( a.reimbursement_quota / a.reimbursement_quota_day, DECIMAL ( 15, 2 )) - ifnull(sum( zrbi.reimbursement_day ),0)), 0 ) AS "surplusReimbursementDay" 
															 | 
															
															 | 
															
																         ifnull(( CONVERT ( a.reimbursement_quota / a.reimbursement_quota_day, DECIMAL ( 15, 2 )) - ifnull(sum( zrbi.reimbursement_day ),0)), 0 ) AS "surplusReimbursementDay" 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        FROM zs_reimbursement_user_accountant_info a 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        FROM zs_reimbursement_user_info a 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <include refid="reimbursementUserJoinColumns"/> 
															 | 
															
															 | 
															
																         <include refid="reimbursementUserJoinColumns"/> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         left join sys_office so on so.id = su.office_id 
															 | 
															
															 | 
															
																         left join sys_office so on so.id = su.office_id 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         LEFT JOIN zs_reimbursement_business_accountant_info zrbi ON zrbi.user_id = a.user_id and zrbi.year = a.year 
															 | 
															
															 | 
															
																         LEFT JOIN zs_reimbursement_business_accountant_info zrbi ON zrbi.user_id = a.user_id and zrbi.year = a.year 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -83,6 +83,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             <if test="reimbursementUser.officeId != null and reimbursementUser.officeId != ''"> 
															 | 
															
															 | 
															
																             <if test="reimbursementUser.officeId != null and reimbursementUser.officeId != ''"> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 and su.office_id in (select id from sys_office where del_flag = 0 and (id = #{reimbursementUser.officeId} or parent_ids like concat('%',#{reimbursementUser.officeId},'%'))) 
															 | 
															
															 | 
															
																                 and su.office_id in (select id from sys_office where del_flag = 0 and (id = #{reimbursementUser.officeId} or parent_ids like concat('%',#{reimbursementUser.officeId},'%'))) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             </if> 
															 | 
															
															 | 
															
																             </if> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            and a.office_type = #{reimbursementUser.officeType} 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         </where> 
															 | 
															
															 | 
															
																         </where> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         group by a.user_id,a.year 
															 | 
															
															 | 
															
																         group by a.user_id,a.year 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         order by a.update_date desc,a.year desc, a.user_id asc 
															 | 
															
															 | 
															
																         order by a.update_date desc,a.year desc, a.user_id asc 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -103,7 +104,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     </select> 
															 | 
															
															 | 
															
																     </select> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																     <insert id="save"> 
															 | 
															
															 | 
															
																     <insert id="save"> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        insert into zs_reimbursement_user_accountant_info ( 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        insert into zs_reimbursement_user_info ( 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             id, 
															 | 
															
															 | 
															
																             id, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             create_by, 
															 | 
															
															 | 
															
																             create_by, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             create_date, 
															 | 
															
															 | 
															
																             create_date, 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -115,7 +116,8 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             year, 
															 | 
															
															 | 
															
																             year, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             reimbursement_quota, 
															 | 
															
															 | 
															
																             reimbursement_quota, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             reimbursement_all_day, 
															 | 
															
															 | 
															
																             reimbursement_all_day, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            reimbursement_quota_day 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            reimbursement_quota_day, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            office_type 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         ) 
															 | 
															
															 | 
															
																         ) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         values 
															 | 
															
															 | 
															
																         values 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         ( 
															 | 
															
															 | 
															
																         ( 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -130,12 +132,13 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             #{year}, 
															 | 
															
															 | 
															
																             #{year}, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             #{reimbursementQuota}, 
															 | 
															
															 | 
															
																             #{reimbursementQuota}, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             #{reimbursementAllDay}, 
															 | 
															
															 | 
															
																             #{reimbursementAllDay}, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            #{reimbursementQuotaDay} 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            #{reimbursementQuotaDay}, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            #{officeType} 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         ) 
															 | 
															
															 | 
															
																         ) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     </insert> 
															 | 
															
															 | 
															
																     </insert> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																     <insert id="saveList"> 
															 | 
															
															 | 
															
																     <insert id="saveList"> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        insert into zs_reimbursement_user_accountant_info ( 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        insert into zs_reimbursement_user_info ( 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         id, 
															 | 
															
															 | 
															
																         id, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         create_by, 
															 | 
															
															 | 
															
																         create_by, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         create_date, 
															 | 
															
															 | 
															
																         create_date, 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -147,7 +150,8 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         year, 
															 | 
															
															 | 
															
																         year, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         reimbursement_quota, 
															 | 
															
															 | 
															
																         reimbursement_quota, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         reimbursement_all_day, 
															 | 
															
															 | 
															
																         reimbursement_all_day, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        reimbursement_quota_day 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        reimbursement_quota_day, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        office_type 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         ) 
															 | 
															
															 | 
															
																         ) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         values 
															 | 
															
															 | 
															
																         values 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <foreach collection="reimbursementUserList" item="item" separator=","> 
															 | 
															
															 | 
															
																         <foreach collection="reimbursementUserList" item="item" separator=","> 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -162,7 +166,8 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             #{item.year}, 
															 | 
															
															 | 
															
																             #{item.year}, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             #{item.reimbursementQuota}, 
															 | 
															
															 | 
															
																             #{item.reimbursementQuota}, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             #{item.reimbursementAllDay}, 
															 | 
															
															 | 
															
																             #{item.reimbursementAllDay}, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            #{item.reimbursementQuotaDay} 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            #{item.reimbursementQuotaDay}, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            #{item.officeType} 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             ) 
															 | 
															
															 | 
															
																             ) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         </foreach> 
															 | 
															
															 | 
															
																         </foreach> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     </insert> 
															 | 
															
															 | 
															
																     </insert> 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -170,7 +175,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																     <update id="update"> 
															 | 
															
															 | 
															
																     <update id="update"> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        update zs_reimbursement_user_accountant_info 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        update zs_reimbursement_user_info 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         set 
															 | 
															
															 | 
															
																         set 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             update_by = #{updateBy} 
															 | 
															
															 | 
															
																             update_by = #{updateBy} 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             ,update_date = #{updateDate} 
															 | 
															
															 | 
															
																             ,update_date = #{updateDate} 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -194,7 +199,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     <select id="queryById" resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementUserDTO"> 
															 | 
															
															 | 
															
																     <select id="queryById" resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementUserDTO"> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         SELECT 
															 | 
															
															 | 
															
																         SELECT 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <include refid="reimbursementUserColumns"/> 
															 | 
															
															 | 
															
																         <include refid="reimbursementUserColumns"/> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            FROM zs_reimbursement_user_accountant_info a 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            FROM zs_reimbursement_user_info a 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <include refid="reimbursementUserJoinColumns"/> 
															 | 
															
															 | 
															
																         <include refid="reimbursementUserJoinColumns"/> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <where> 
															 | 
															
															 | 
															
																         <where> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             a.del_flag = 0 
															 | 
															
															 | 
															
																             a.del_flag = 0 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -205,7 +210,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     <select id="queryByUserIdAndYear" resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementUserDTO"> 
															 | 
															
															 | 
															
																     <select id="queryByUserIdAndYear" resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementUserDTO"> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         SELECT 
															 | 
															
															 | 
															
																         SELECT 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <include refid="reimbursementUserColumns"/> 
															 | 
															
															 | 
															
																         <include refid="reimbursementUserColumns"/> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            FROM zs_reimbursement_user_accountant_info a 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            FROM zs_reimbursement_user_info a 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <include refid="reimbursementUserJoinColumns"/> 
															 | 
															
															 | 
															
																         <include refid="reimbursementUserJoinColumns"/> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <where> 
															 | 
															
															 | 
															
																         <where> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             a.del_flag = 0 
															 | 
															
															 | 
															
																             a.del_flag = 0 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -216,7 +221,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     </select> 
															 | 
															
															 | 
															
																     </select> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																     <delete id="delete"> 
															 | 
															
															 | 
															
																     <delete id="delete"> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        delete from zs_reimbursement_user_accountant_info 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        delete from zs_reimbursement_user_info 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <where> 
															 | 
															
															 | 
															
																         <where> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             <if test="idList != null and idList.size>0"> 
															 | 
															
															 | 
															
																             <if test="idList != null and idList.size>0"> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 and id in 
															 | 
															
															 | 
															
																                 and id in 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -243,7 +248,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     <select id="getExistReimbursementUserList" resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementUserDTO"> 
															 | 
															
															 | 
															
																     <select id="getExistReimbursementUserList" resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementUserDTO"> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         SELECT 
															 | 
															
															 | 
															
																         SELECT 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <include refid="reimbursementUserColumns"/> 
															 | 
															
															 | 
															
																         <include refid="reimbursementUserColumns"/> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        FROM zs_reimbursement_user_accountant_info a 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        FROM zs_reimbursement_user_info a 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <include refid="reimbursementUserJoinColumns"/> 
															 | 
															
															 | 
															
																         <include refid="reimbursementUserJoinColumns"/> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         <where> 
															 | 
															
															 | 
															
																         <where> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             a.del_flag = 0 
															 | 
															
															 | 
															
																             a.del_flag = 0 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -254,6 +259,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 </foreach> 
															 | 
															
															 | 
															
																                 </foreach> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             </if> 
															 | 
															
															 | 
															
																             </if> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             and a.year = #{year} 
															 | 
															
															 | 
															
																             and a.year = #{year} 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            and office_type = #{officeType} 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         </where> 
															 | 
															
															 | 
															
																         </where> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     </select> 
															 | 
															
															 | 
															
																     </select> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 </mapper> 
															 | 
															
															 | 
															
																 </mapper> 
															 |