Bladeren bron

fix:扣款sql修改

ly 9 maanden geleden
bovenliggende
commit
e28acda034
1 gewijzigde bestanden met toevoegingen van 7 en 11 verwijderingen
  1. 7 11
      src/main/resources/mybatis/business/BizDeductionMapper.xml

+ 7 - 11
src/main/resources/mybatis/business/BizDeductionMapper.xml

@@ -4,26 +4,20 @@
     <!-- 基础的返回map 多表复杂的 自行组合 -->
     <resultMap id="BaseResultMap" type="cn.ezhizao.project.business.deduction.domain.BizDeduction">
         <id column="id" jdbcType="BIGINT" property="id"/>
-        <result column="id" jdbcType="BIGINT" property="id"/>
         <result column="confirm_id" jdbcType="BIGINT" property="confirmId"/>
         <result column="company_id" jdbcType="BIGINT" property="companyId"/>
         <result column="operation_id" jdbcType="BIGINT" property="operationId"/>
-        <association property="companyName" javaType="java.lang.String" select="getCompanyName" column="company_id"/>
-        <association property="confirmName" javaType="java.lang.String" select="getConfirmName" column="confirm_id"/>
-        <association property="operationName" javaType="java.lang.String" select="getOperationName"
-                     column="operation_id"/>
         <collection property="files" ofType="cn.ezhizao.project.system.domain.SysFileStorage" select="getFiles"
                     column="id"/>
     </resultMap>
     <resultMap id="expotyResultMap" type="cn.ezhizao.project.business.deduction.domain.BizDeduction">
         <id column="id" jdbcType="BIGINT" property="id"/>
-        <result column="id" jdbcType="BIGINT" property="id"/>
         <result column="confirm_id" jdbcType="BIGINT" property="confirmId"/>
         <result column="company_id" jdbcType="BIGINT" property="companyId"/>
         <result column="operation_id" jdbcType="BIGINT" property="operationId"/>
-        <association property="confirmName" javaType="java.lang.String" select="getConfirmName" column="confirm_id"/>
-        <association property="operationName" javaType="java.lang.String" select="getOperationName"
-                     column="operation_id"/>
+<!--        <association property="confirmName" javaType="java.lang.String" select="getConfirmName" column="confirm_id"/>-->
+<!--        <association property="operationName" javaType="java.lang.String" select="getOperationName"-->
+<!--                     column="operation_id"/>-->
     </resultMap>
     <resultMap type="cn.ezhizao.project.system.domain.SysFileStorage" id="FileStorageResult">
         <id column="id" property="id"/>
@@ -64,15 +58,16 @@
     <select id="getTotal" resultType="java.lang.Integer">
         SELECT COUNT(1) FROM (<include refid="getListSql"/>) AS C
     </select>
-
     <sql id="getListSql">
         SELECT t1.*, t2.tax_type,
-        t11.name as companyName,
+        t11.name as companyName,t12.nick_name as confirmName,t13.nick_name as operationName,
         t3.account_name as from_company_name,t8.account_name as toTenantName, t3.id from_tenant_id FROM biz_deduction t1 left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
         left join biz_entrust t9 on t9.work_order_id = t1.work_order_id and t9.deleted = 0 and  date_format(t9.current_month, '%Y%m') = concat(t1.year, t1.month)
         left join biz_tenant t8 on t8.id = t9.to_tenant_id
         left join biz_company t11 on t11.id = t1.company_id and t11.deleted = 0
+        left join sys_user t12 on t12.user_id = t1.confirm_id
+        left join sys_user t13 on t13.user_id = t1.operation_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             t1.deleted = 0 AND
             <if test="id != null  ">
@@ -158,6 +153,7 @@
                 ) AND
             </if>
         </trim>
+        order by t1.create_time desc
     </sql>
 
 </mapper>