|
|
@@ -27,13 +27,26 @@
|
|
|
<result column="project_type" jdbcType="INTEGER" property="projectType" />
|
|
|
<result column="service_type" jdbcType="VARCHAR" property="serviceType" />
|
|
|
<result column="service_project" jdbcType="VARCHAR" property="serviceProject" />
|
|
|
+ <result column="cost_actual" jdbcType="DECIMAL" property="costActual" />
|
|
|
+ <result column="patent_cost" jdbcType="DECIMAL" property="patentCost" />
|
|
|
+ <result column="patent_cost_actual" jdbcType="DECIMAL" property="patentCostActual" />
|
|
|
+ <result column="soft_cost" jdbcType="DECIMAL" property="softCost" />
|
|
|
+ <result column="soft_cost_actual" jdbcType="DECIMAL" property="softCostActual" />
|
|
|
+ <result column="audit_cost" jdbcType="DECIMAL" property="auditCost" />
|
|
|
+ <result column="audit_cost_actual" jdbcType="DECIMAL" property="auditCostActual" />
|
|
|
+ <result column="other_cost" jdbcType="DECIMAL" property="otherCost" />
|
|
|
+ <result column="other_cost_actual" jdbcType="DECIMAL" property="otherCostActual" />
|
|
|
+ <result column="expect_profit" jdbcType="DECIMAL" property="expectProfit" />
|
|
|
+ <result column="actual_profit" jdbcType="DECIMAL" property="actualProfit" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, order_no, salesman_id, finance_id, salesman_name, finance_name, final_receivables,
|
|
|
final_Receivables_time, invoice_amount, create_time, buyer_name, order_receivables,
|
|
|
order_arrears, payment_amount, cost_amount, dep_name, province_name, legal_affairs,
|
|
|
dun_start_time, legal_affairs_type, operation_time, legal_affairs_status, project_type,
|
|
|
- service_type, service_project
|
|
|
+ service_type, service_project, cost_actual, patent_cost, patent_cost_actual, soft_cost,
|
|
|
+ soft_cost_actual, audit_cost, audit_cost_actual, other_cost, other_cost_actual, expect_profit,
|
|
|
+ actual_profit
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -54,7 +67,11 @@
|
|
|
dep_name, province_name, legal_affairs,
|
|
|
dun_start_time, legal_affairs_type, operation_time,
|
|
|
legal_affairs_status, project_type, service_type,
|
|
|
- service_project)
|
|
|
+ service_project, cost_actual, patent_cost,
|
|
|
+ patent_cost_actual, soft_cost, soft_cost_actual,
|
|
|
+ audit_cost, audit_cost_actual, other_cost,
|
|
|
+ other_cost_actual, expect_profit, actual_profit
|
|
|
+ )
|
|
|
values (#{orderNo,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR}, #{financeId,jdbcType=VARCHAR},
|
|
|
#{salesmanName,jdbcType=VARCHAR}, #{financeName,jdbcType=VARCHAR}, #{finalReceivables,jdbcType=DECIMAL},
|
|
|
#{finalReceivablesTime,jdbcType=TIMESTAMP}, #{invoiceAmount,jdbcType=DECIMAL},
|
|
|
@@ -63,7 +80,11 @@
|
|
|
#{depName,jdbcType=VARCHAR}, #{provinceName,jdbcType=VARCHAR}, #{legalAffairs,jdbcType=INTEGER},
|
|
|
#{dunStartTime,jdbcType=TIMESTAMP}, #{legalAffairsType,jdbcType=INTEGER}, #{operationTime,jdbcType=DATE},
|
|
|
#{legalAffairsStatus,jdbcType=INTEGER}, #{projectType,jdbcType=INTEGER}, #{serviceType,jdbcType=VARCHAR},
|
|
|
- #{serviceProject,jdbcType=VARCHAR})
|
|
|
+ #{serviceProject,jdbcType=VARCHAR}, #{costActual,jdbcType=DECIMAL}, #{patentCost,jdbcType=DECIMAL},
|
|
|
+ #{patentCostActual,jdbcType=DECIMAL}, #{softCost,jdbcType=DECIMAL}, #{softCostActual,jdbcType=DECIMAL},
|
|
|
+ #{auditCost,jdbcType=DECIMAL}, #{auditCostActual,jdbcType=DECIMAL}, #{otherCost,jdbcType=DECIMAL},
|
|
|
+ #{otherCostActual,jdbcType=DECIMAL}, #{expectProfit,jdbcType=DECIMAL}, #{actualProfit,jdbcType=DECIMAL}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderMid" useGeneratedKeys="true">
|
|
|
insert into t_order_mid
|
|
|
@@ -140,6 +161,39 @@
|
|
|
<if test="serviceProject != null">
|
|
|
service_project,
|
|
|
</if>
|
|
|
+ <if test="costActual != null">
|
|
|
+ cost_actual,
|
|
|
+ </if>
|
|
|
+ <if test="patentCost != null">
|
|
|
+ patent_cost,
|
|
|
+ </if>
|
|
|
+ <if test="patentCostActual != null">
|
|
|
+ patent_cost_actual,
|
|
|
+ </if>
|
|
|
+ <if test="softCost != null">
|
|
|
+ soft_cost,
|
|
|
+ </if>
|
|
|
+ <if test="softCostActual != null">
|
|
|
+ soft_cost_actual,
|
|
|
+ </if>
|
|
|
+ <if test="auditCost != null">
|
|
|
+ audit_cost,
|
|
|
+ </if>
|
|
|
+ <if test="auditCostActual != null">
|
|
|
+ audit_cost_actual,
|
|
|
+ </if>
|
|
|
+ <if test="otherCost != null">
|
|
|
+ other_cost,
|
|
|
+ </if>
|
|
|
+ <if test="otherCostActual != null">
|
|
|
+ other_cost_actual,
|
|
|
+ </if>
|
|
|
+ <if test="expectProfit != null">
|
|
|
+ expect_profit,
|
|
|
+ </if>
|
|
|
+ <if test="actualProfit != null">
|
|
|
+ actual_profit,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="orderNo != null">
|
|
|
@@ -214,6 +268,39 @@
|
|
|
<if test="serviceProject != null">
|
|
|
#{serviceProject,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="costActual != null">
|
|
|
+ #{costActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="patentCost != null">
|
|
|
+ #{patentCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="patentCostActual != null">
|
|
|
+ #{patentCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="softCost != null">
|
|
|
+ #{softCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="softCostActual != null">
|
|
|
+ #{softCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="auditCost != null">
|
|
|
+ #{auditCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="auditCostActual != null">
|
|
|
+ #{auditCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="otherCost != null">
|
|
|
+ #{otherCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="otherCostActual != null">
|
|
|
+ #{otherCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="expectProfit != null">
|
|
|
+ #{expectProfit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="actualProfit != null">
|
|
|
+ #{actualProfit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderMid">
|
|
|
@@ -291,6 +378,39 @@
|
|
|
<if test="serviceProject != null">
|
|
|
service_project = #{serviceProject,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="costActual != null">
|
|
|
+ cost_actual = #{costActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="patentCost != null">
|
|
|
+ patent_cost = #{patentCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="patentCostActual != null">
|
|
|
+ patent_cost_actual = #{patentCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="softCost != null">
|
|
|
+ soft_cost = #{softCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="softCostActual != null">
|
|
|
+ soft_cost_actual = #{softCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="auditCost != null">
|
|
|
+ audit_cost = #{auditCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="auditCostActual != null">
|
|
|
+ audit_cost_actual = #{auditCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="otherCost != null">
|
|
|
+ other_cost = #{otherCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="otherCostActual != null">
|
|
|
+ other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="expectProfit != null">
|
|
|
+ expect_profit = #{expectProfit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="actualProfit != null">
|
|
|
+ actual_profit = #{actualProfit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -319,7 +439,18 @@
|
|
|
legal_affairs_status = #{legalAffairsStatus,jdbcType=INTEGER},
|
|
|
project_type = #{projectType,jdbcType=INTEGER},
|
|
|
service_type = #{serviceType,jdbcType=VARCHAR},
|
|
|
- service_project = #{serviceProject,jdbcType=VARCHAR}
|
|
|
+ service_project = #{serviceProject,jdbcType=VARCHAR},
|
|
|
+ cost_actual = #{costActual,jdbcType=DECIMAL},
|
|
|
+ patent_cost = #{patentCost,jdbcType=DECIMAL},
|
|
|
+ patent_cost_actual = #{patentCostActual,jdbcType=DECIMAL},
|
|
|
+ soft_cost = #{softCost,jdbcType=DECIMAL},
|
|
|
+ soft_cost_actual = #{softCostActual,jdbcType=DECIMAL},
|
|
|
+ audit_cost = #{auditCost,jdbcType=DECIMAL},
|
|
|
+ audit_cost_actual = #{auditCostActual,jdbcType=DECIMAL},
|
|
|
+ other_cost = #{otherCost,jdbcType=DECIMAL},
|
|
|
+ other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
|
|
|
+ expect_profit = #{expectProfit,jdbcType=DECIMAL},
|
|
|
+ actual_profit = #{actualProfit,jdbcType=DECIMAL}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
@@ -364,15 +495,7 @@
|
|
|
where a.order_no=b.order_no and a.id= #{tid}
|
|
|
</update>
|
|
|
|
|
|
- <update id="updateAddCostAmount">
|
|
|
- update t_order_task a ,t_order_mid b
|
|
|
- <set>
|
|
|
- <if test="cost !=null">
|
|
|
- b.cost_amount= b.cost_amount+#{cost},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where a.order_no=b.order_no and a.id= #{tid}
|
|
|
- </update>
|
|
|
+
|
|
|
<update id="updateByOrderNo">
|
|
|
update t_order_mid
|
|
|
<set>
|
|
|
@@ -596,4 +719,47 @@
|
|
|
set a.service_project =b.pname,a.service_type =b.cname
|
|
|
where a.order_no=b.order_no and a.order_no = #{orderNo};
|
|
|
</update>
|
|
|
+
|
|
|
+ <update id="updateAddCostAmount" parameterType="com.goafanti.common.model.TOrderMid">
|
|
|
+ update t_order_mid
|
|
|
+ <set>
|
|
|
+ <if test="costActual != null">
|
|
|
+ cost_actual =cost_actual+ #{costActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="patentCost != null">
|
|
|
+ patent_cost =patent_cost+ #{patentCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="patentCostActual != null">
|
|
|
+ patent_cost_actual =patent_cost_actual+ #{patentCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="softCost != null">
|
|
|
+ soft_cost =soft_cost+ #{softCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="softCostActual != null">
|
|
|
+ soft_cost_actual =soft_cost_actual+ #{softCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="auditCost != null">
|
|
|
+ audit_cost =audit_cost+ #{auditCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="auditCostActual != null">
|
|
|
+ audit_cost_actual =audit_cost_actual+ #{auditCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="otherCost != null">
|
|
|
+ other_cost =other_cost+ #{otherCost,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="otherCostActual != null">
|
|
|
+ other_cost_actual =other_cost_actual+ #{otherCostActual,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="expectProfit != null">
|
|
|
+ expect_profit =expect_profit+ #{expectProfit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="actualProfit != null">
|
|
|
+ actual_profit =actual_profit+ #{actualProfit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="costAmount != null">
|
|
|
+ cost_amount =cost_amount+ #{costAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where order_no =#{orderNo}
|
|
|
+ </update>
|
|
|
</mapper>
|