Browse Source

企业纳税&财务

Antiloveg 9 years ago
parent
commit
8edc3cf227

+ 0 - 2
src/main/java/com/goafanti/common/dao/OrgFinanceMapper.java

@@ -13,8 +13,6 @@ public interface OrgFinanceMapper {
 
     int updateByPrimaryKeySelective(OrgFinance record);
 
-    int updateByPrimaryKeyWithBLOBs(OrgFinance record);
-
     int updateByPrimaryKey(OrgFinance record);
 
 	OrgFinance selectOrgFinanceByUid(String uid);

+ 0 - 2
src/main/java/com/goafanti/common/dao/OrgRatepayMapper.java

@@ -13,8 +13,6 @@ public interface OrgRatepayMapper {
 
     int updateByPrimaryKeySelective(OrgRatepay record);
 
-    int updateByPrimaryKeyWithBLOBs(OrgRatepay record);
-
     int updateByPrimaryKey(OrgRatepay record);
 
 	OrgRatepay selectOrgRatepayByUid(String uid);

+ 9 - 33
src/main/java/com/goafanti/common/mapper/OrgFinanceMapper.xml

@@ -15,22 +15,16 @@
     <result column="gross_profit" property="grossProfit" jdbcType="INTEGER" />
     <result column="net_profit" property="netProfit" jdbcType="INTEGER" />
     <result column="sales_revenue" property="salesRevenue" jdbcType="INTEGER" />
-  </resultMap>
-  <resultMap id="ResultMapWithBLOBs" type="com.goafanti.common.model.OrgFinance" extends="BaseResultMap" >
-    <result column="finance_url" property="financeUrl" jdbcType="LONGVARCHAR" />
+    <result column="finance_url" property="financeUrl" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, main_business_income, management_cost, operating_profit, various_tax, current_asset, 
-    net_fixed_asset, total_asset, net_asset, gross_profit, net_profit, sales_revenue
-  </sql>
-  <sql id="Blob_Column_List" >
+    net_fixed_asset, total_asset, net_asset, gross_profit, net_profit, sales_revenue, 
     finance_url
   </sql>
-  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
     <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
     from org_finance
     where id = #{id,jdbcType=VARCHAR}
   </select>
@@ -48,7 +42,7 @@
       #{managementCost,jdbcType=INTEGER}, #{operatingProfit,jdbcType=INTEGER}, #{variousTax,jdbcType=INTEGER}, 
       #{currentAsset,jdbcType=INTEGER}, #{netFixedAsset,jdbcType=INTEGER}, #{totalAsset,jdbcType=INTEGER}, 
       #{netAsset,jdbcType=INTEGER}, #{grossProfit,jdbcType=INTEGER}, #{netProfit,jdbcType=INTEGER}, 
-      #{salesRevenue,jdbcType=INTEGER}, #{financeUrl,jdbcType=LONGVARCHAR})
+      #{salesRevenue,jdbcType=INTEGER}, #{financeUrl,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgFinance" >
     insert into org_finance
@@ -137,7 +131,7 @@
         #{salesRevenue,jdbcType=INTEGER},
       </if>
       <if test="financeUrl != null" >
-        #{financeUrl,jdbcType=LONGVARCHAR},
+        #{financeUrl,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
@@ -181,28 +175,11 @@
         sales_revenue = #{salesRevenue,jdbcType=INTEGER},
       </if>
       <if test="financeUrl != null" >
-        finance_url = #{financeUrl,jdbcType=LONGVARCHAR},
+        finance_url = #{financeUrl,jdbcType=VARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.OrgFinance" >
-    update org_finance
-    set uid = #{uid,jdbcType=VARCHAR},
-      main_business_income = #{mainBusinessIncome,jdbcType=INTEGER},
-      management_cost = #{managementCost,jdbcType=INTEGER},
-      operating_profit = #{operatingProfit,jdbcType=INTEGER},
-      various_tax = #{variousTax,jdbcType=INTEGER},
-      current_asset = #{currentAsset,jdbcType=INTEGER},
-      net_fixed_asset = #{netFixedAsset,jdbcType=INTEGER},
-      total_asset = #{totalAsset,jdbcType=INTEGER},
-      net_asset = #{netAsset,jdbcType=INTEGER},
-      gross_profit = #{grossProfit,jdbcType=INTEGER},
-      net_profit = #{netProfit,jdbcType=INTEGER},
-      sales_revenue = #{salesRevenue,jdbcType=INTEGER},
-      finance_url = #{financeUrl,jdbcType=LONGVARCHAR}
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgFinance" >
     update org_finance
     set uid = #{uid,jdbcType=VARCHAR},
@@ -216,15 +193,14 @@
       net_asset = #{netAsset,jdbcType=INTEGER},
       gross_profit = #{grossProfit,jdbcType=INTEGER},
       net_profit = #{netProfit,jdbcType=INTEGER},
-      sales_revenue = #{salesRevenue,jdbcType=INTEGER}
+      sales_revenue = #{salesRevenue,jdbcType=INTEGER},
+      finance_url = #{financeUrl,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
-  <select id="selectOrgFinanceByUid" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
+   <select id="selectOrgFinanceByUid" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
     <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
     from org_finance
     where uid = #{uid,jdbcType=VARCHAR}
   </select>

+ 9 - 31
src/main/java/com/goafanti/common/mapper/OrgRatepayMapper.xml

@@ -11,22 +11,15 @@
     <result column="non_taxable_income" property="nonTaxableIncome" jdbcType="INTEGER" />
     <result column="tax_exempt_income" property="taxExemptIncome" jdbcType="INTEGER" />
     <result column="subsidy_income" property="subsidyIncome" jdbcType="INTEGER" />
-  </resultMap>
-  <resultMap id="ResultMapWithBLOBs" type="com.goafanti.common.model.OrgRatepay" extends="BaseResultMap" >
-    <result column="tax_return_url" property="taxReturnUrl" jdbcType="LONGVARCHAR" />
+    <result column="tax_return_url" property="taxReturnUrl" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, operating_income, management_cost, operating_profit, non_operating_income, 
-    non_taxable_income, tax_exempt_income, subsidy_income
-  </sql>
-  <sql id="Blob_Column_List" >
-    tax_return_url
+    non_taxable_income, tax_exempt_income, subsidy_income, tax_return_url
   </sql>
-  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
     <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
     from org_ratepay
     where id = #{id,jdbcType=VARCHAR}
   </select>
@@ -42,7 +35,7 @@
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{operatingIncome,jdbcType=INTEGER}, 
       #{managementCost,jdbcType=INTEGER}, #{operatingProfit,jdbcType=INTEGER}, #{nonOperatingIncome,jdbcType=INTEGER}, 
       #{nonTaxableIncome,jdbcType=INTEGER}, #{taxExemptIncome,jdbcType=INTEGER}, #{subsidyIncome,jdbcType=INTEGER}, 
-      #{taxReturnUrl,jdbcType=LONGVARCHAR})
+      #{taxReturnUrl,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgRatepay" >
     insert into org_ratepay
@@ -107,7 +100,7 @@
         #{subsidyIncome,jdbcType=INTEGER},
       </if>
       <if test="taxReturnUrl != null" >
-        #{taxReturnUrl,jdbcType=LONGVARCHAR},
+        #{taxReturnUrl,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
@@ -139,24 +132,11 @@
         subsidy_income = #{subsidyIncome,jdbcType=INTEGER},
       </if>
       <if test="taxReturnUrl != null" >
-        tax_return_url = #{taxReturnUrl,jdbcType=LONGVARCHAR},
+        tax_return_url = #{taxReturnUrl,jdbcType=VARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.OrgRatepay" >
-    update org_ratepay
-    set uid = #{uid,jdbcType=VARCHAR},
-      operating_income = #{operatingIncome,jdbcType=INTEGER},
-      management_cost = #{managementCost,jdbcType=INTEGER},
-      operating_profit = #{operatingProfit,jdbcType=INTEGER},
-      non_operating_income = #{nonOperatingIncome,jdbcType=INTEGER},
-      non_taxable_income = #{nonTaxableIncome,jdbcType=INTEGER},
-      tax_exempt_income = #{taxExemptIncome,jdbcType=INTEGER},
-      subsidy_income = #{subsidyIncome,jdbcType=INTEGER},
-      tax_return_url = #{taxReturnUrl,jdbcType=LONGVARCHAR}
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgRatepay" >
     update org_ratepay
     set uid = #{uid,jdbcType=VARCHAR},
@@ -166,17 +146,15 @@
       non_operating_income = #{nonOperatingIncome,jdbcType=INTEGER},
       non_taxable_income = #{nonTaxableIncome,jdbcType=INTEGER},
       tax_exempt_income = #{taxExemptIncome,jdbcType=INTEGER},
-      subsidy_income = #{subsidyIncome,jdbcType=INTEGER}
+      subsidy_income = #{subsidyIncome,jdbcType=INTEGER},
+      tax_return_url = #{taxReturnUrl,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
-   <select id="selectOrgRatepayByUid" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
+    <select id="selectOrgRatepayByUid" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
     <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
     from org_ratepay
     where uid = #{uid,jdbcType=VARCHAR}
   </select>
-  
 </mapper>