|
|
@@ -102,8 +102,8 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Thu Oct 22 16:26:31 CST 2020.
|
|
|
-->
|
|
|
- id, tid, company_name, unit_price, quantity, total_amount, material, urgent, audit,
|
|
|
- assets, income, remarks, create_time, cid, party_amount, type, patent_name_type,
|
|
|
+ id, tid, company_name, unit_price, quantity, total_amount, material, urgent, audit,
|
|
|
+ assets, income, remarks, create_time, cid, party_amount, type, patent_name_type,
|
|
|
official_amount, start_type, patent_type
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.ThirdPartyCompanyExample" resultMap="BaseResultMap">
|
|
|
@@ -131,7 +131,7 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Thu Oct 22 16:26:31 CST 2020.
|
|
|
-->
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from third_party_company
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -162,19 +162,19 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Thu Oct 22 16:26:31 CST 2020.
|
|
|
-->
|
|
|
- insert into third_party_company (id, tid, company_name,
|
|
|
- unit_price, quantity, total_amount,
|
|
|
- material, urgent, audit,
|
|
|
- assets, income, remarks,
|
|
|
- create_time, cid, party_amount,
|
|
|
- type, patent_name_type, official_amount,
|
|
|
+ insert into third_party_company (id, tid, company_name,
|
|
|
+ unit_price, quantity, total_amount,
|
|
|
+ material, urgent, audit,
|
|
|
+ assets, income, remarks,
|
|
|
+ create_time, cid, party_amount,
|
|
|
+ type, patent_name_type, official_amount,
|
|
|
start_type, patent_type)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR},
|
|
|
- #{unitPrice,jdbcType=DECIMAL}, #{quantity,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL},
|
|
|
- #{material,jdbcType=INTEGER}, #{urgent,jdbcType=INTEGER}, #{audit,jdbcType=INTEGER},
|
|
|
- #{assets,jdbcType=VARCHAR}, #{income,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{cid,jdbcType=INTEGER}, #{partyAmount,jdbcType=DECIMAL},
|
|
|
- #{type,jdbcType=INTEGER}, #{patentNameType,jdbcType=INTEGER}, #{officialAmount,jdbcType=DECIMAL},
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR},
|
|
|
+ #{unitPrice,jdbcType=DECIMAL}, #{quantity,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL},
|
|
|
+ #{material,jdbcType=INTEGER}, #{urgent,jdbcType=INTEGER}, #{audit,jdbcType=INTEGER},
|
|
|
+ #{assets,jdbcType=VARCHAR}, #{income,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{cid,jdbcType=INTEGER}, #{partyAmount,jdbcType=DECIMAL},
|
|
|
+ #{type,jdbcType=INTEGER}, #{patentNameType,jdbcType=INTEGER}, #{officialAmount,jdbcType=DECIMAL},
|
|
|
#{startType,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.ThirdPartyCompany">
|
|
|
@@ -524,26 +524,26 @@
|
|
|
select a.id,a.tid,a.company_name companyName,a.unit_price unitPrice,a.quantity,a.total_amount totalAmount,a.material,a.urgent,
|
|
|
a.patent_name_type patentNameType,a.audit,a.assets,a.income,a.remarks,a.cid,b.cost_reduction costReduction,b.official_cost officialCost,
|
|
|
a.type,a.party_amount partyAmount ,op.amount officialUnitPrice,op.proportion85 reductionAmount,a.start_type startType,a.patent_type patentType
|
|
|
- from third_party_company a left join t_order_task b on a.tid=b.id left join official_fee_price op on b.patent_type =op.patent_type and a.patent_name_type =op.`type`
|
|
|
+ from third_party_company a left join t_order_task b on a.tid=b.id left join official_fee_price op on b.patent_type =op.patent_type and a.patent_name_type =op.`type`
|
|
|
where tid= #{tid}
|
|
|
</select>
|
|
|
<!-- <select id="selectByTidPuls" resultType="com.goafanti.organization.bo.ProjectTypePuls">
|
|
|
select a.id,a.official_cost officialCost,a.cost_reduction costReduction ,a.commodity_quantity quantity ,a.patent_type patentType,b.patent_name_type projectType,
|
|
|
c.amount officialAmount,c.proportion85 from t_order_task a left join t_order_outsource b on a.id=b.tid
|
|
|
-left join official_fee_price c on a.patent_type =c.patent_type and b.patent_name_type =c.`type`
|
|
|
+left join official_fee_price c on a.patent_type =c.patent_type and b.patent_name_type =c.`type`
|
|
|
where a.id= #{tid}
|
|
|
</select> -->
|
|
|
<select id="selectByTidGetListDtails" resultType="com.goafanti.organization.bo.ProjectTypePuls">
|
|
|
select a.id,a.official_cost officialCost,a.cost_reduction costReduction ,a.commodity_quantity quantity ,a.patent_type patentType,b.patent_name_type projectType,
|
|
|
c.amount officialAmount,c.proportion85 from t_order_task x left join t_order_task a on x.order_no =a.order_no left join t_order_outsource b on a.id=b.tid
|
|
|
-left join official_fee_price c on a.patent_type =c.patent_type and b.patent_name_type =c.`type`
|
|
|
+left join official_fee_price c on a.patent_type =c.patent_type and b.patent_name_type =c.`type`
|
|
|
where x.id= #{tid}
|
|
|
</select>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<select id="selectPaymentList" resultType="com.goafanti.organization.bo.outPaymentList">
|
|
|
select a.id, c.contract_no contractNo,b.order_no orderNo,d.buyer_name userName, d.dep_name depName,f.party_amount costAmount,
|
|
|
- a.choose_type chooseType,a.payment_amount paymentAmount,a.application_amount applicationAmount,a.tid,a.company_name companyName,
|
|
|
+ a.choose_type chooseType,a.payment_amount paymentAmount,a.application_amount applicationAmount,a.tid,a.company_name companyName,
|
|
|
date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTime,a.aname,d.finance_name financeName,b.cname, b.commodity_name pname,
|
|
|
b.project_status projectStatus,a.status,bp.`type` projectType,b.cost_reduction costReduction ,b.official_cost officialCost,c.total_amount totalAmount,
|
|
|
c.settlement_amount settlementAmount,a.process_status processStatus
|
|
|
@@ -572,8 +572,11 @@ where x.id= #{tid}
|
|
|
<if test="userName !=null">
|
|
|
and d.buyer_name like concat('%', #{userName},'%')
|
|
|
</if>
|
|
|
- <if test="depId !=null">
|
|
|
- and c.order_dep= #{depId}
|
|
|
+ <if test="deps !=null">
|
|
|
+ and c.order_dep in
|
|
|
+ <foreach close=")" collection="deps" item="deps" open="(" separator=",">
|
|
|
+ #{deps.id}
|
|
|
+ </foreach>
|
|
|
</if>
|
|
|
<if test="aname !=null">
|
|
|
and a.aname like concat('%',#{aname},'%')
|
|
|
@@ -598,11 +601,11 @@ where x.id= #{tid}
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectPaymentCount" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
from t_order_payment a left join t_order_task b on a.tid=b.id left join t_order_new c on b.order_no=c.order_no
|
|
|
- left join t_order_mid d on b.order_no=d.order_no
|
|
|
+ left join t_order_mid d on b.order_no=d.order_no
|
|
|
where 1=1
|
|
|
<if test="lvl==0">
|
|
|
and d.finance_id= #{aid}
|
|
|
@@ -625,8 +628,11 @@ where x.id= #{tid}
|
|
|
<if test="userName !=null">
|
|
|
and d.buyer_name like concat('%', #{userName},'%')
|
|
|
</if>
|
|
|
- <if test="depId !=null">
|
|
|
- and c.order_dep= #{depId}
|
|
|
+ <if test="deps !=null">
|
|
|
+ and c.order_dep in
|
|
|
+ <foreach close=")" collection="deps" item="deps" open="(" separator=",">
|
|
|
+ #{deps.id}
|
|
|
+ </foreach>
|
|
|
</if>
|
|
|
<if test="aname !=null">
|
|
|
and a.aname like concat('%',#{aname},'%')
|
|
|
@@ -650,8 +656,8 @@ where x.id= #{tid}
|
|
|
b.set_up_amount projectAmount,e.cost_amount costAmount,e.party_amount partyAmount,b.task_receiver,
|
|
|
c.liquidation_status liquidationStatus,a.dun_type dunType,a.project_type projectType,a.tid,
|
|
|
a.total_amount NodeAmount,date_format(a.start_time,'%Y-%m-%d %H:%i:%S')startTime,a.status
|
|
|
- from payment_node a
|
|
|
- left join t_order_task b on a.tid=b.id
|
|
|
+ from payment_node a
|
|
|
+ left join t_order_task b on a.tid=b.id
|
|
|
left join t_order_new c on b.order_no=c.order_no
|
|
|
left join t_order_mid d on b.order_no=d.order_no
|
|
|
left join t_task_mid e on b.id=e.tid
|
|
|
@@ -691,10 +697,10 @@ where x.id= #{tid}
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
- <select id="selectNodeCount" resultType="java.lang.Integer">
|
|
|
+ <select id="selectNodeCount" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
- from payment_node a
|
|
|
- left join t_order_task b on a.tid=b.id
|
|
|
+ from payment_node a
|
|
|
+ left join t_order_task b on a.tid=b.id
|
|
|
left join t_order_new c on b.order_no=c.order_no
|
|
|
left join t_order_mid d on b.order_no=d.order_no
|
|
|
where 1=1
|
|
|
@@ -732,7 +738,7 @@ where x.id= #{tid}
|
|
|
|
|
|
<select id="softWritingPriceList" resultType="com.goafanti.common.model.SoftWritingPrice">
|
|
|
select a.id,a.cid,b.company_name companyName,a.material,a.unit_price unitPrice,a.urgent,a.remarks,
|
|
|
- a.status,date_format(a.create_time,'%Y-%m-%d %H:%i:%s')createTimes
|
|
|
+ a.status,date_format(a.create_time,'%Y-%m-%d %H:%i:%s')createTimes
|
|
|
from soft_writing_price a left join company_library b on a.cid=b.id
|
|
|
where 1=1
|
|
|
<if test="s.companyName != null">
|
|
|
@@ -748,9 +754,9 @@ where x.id= #{tid}
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="softWritingPriceCount" resultType="java.lang.Integer">
|
|
|
- select count(*)
|
|
|
+ select count(*)
|
|
|
from soft_writing_price a left join company_library b on a.cid=b.id
|
|
|
where 1=1
|
|
|
<if test="s.companyName != null">
|
|
|
@@ -763,7 +769,7 @@ where x.id= #{tid}
|
|
|
and a.urgent= #{s.urgent}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectListOfficialFeePrice" resultType="com.goafanti.common.model.OfficialFeePrice">
|
|
|
select id,type,patent_type patentType,amount,proportion85,remarks,date_format(create_time, '%Y-%m-%d %H:%i:%S') createTimes
|
|
|
from official_fee_price where 1=1
|
|
|
@@ -778,7 +784,7 @@ where x.id= #{tid}
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="countListOfficialFeePrice" resultType="java.lang.Integer" >
|
|
|
select count(*)
|
|
|
from official_fee_price where 1=1
|
|
|
@@ -790,9 +796,9 @@ where x.id= #{tid}
|
|
|
</if>
|
|
|
</select>
|
|
|
<delete id="deleteByTid" >
|
|
|
- delete from third_party_company
|
|
|
+ delete from third_party_company
|
|
|
where tid= #{tid}
|
|
|
</delete>
|
|
|
-
|
|
|
-
|
|
|
-</mapper>
|
|
|
+
|
|
|
+
|
|
|
+</mapper>
|