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