|
|
@@ -46,16 +46,16 @@
|
|
|
<result column="service_content" jdbcType="VARCHAR" property="serviceContent" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- order_no, order_type, creater, create_time, update_time, buyer_id, first_amount,
|
|
|
- total_amount, settlement_amount, refund_amount, order_status, liquidation_status,
|
|
|
- process_status, project_status, approval, order_remarks, delete_sign, salesman_id,
|
|
|
- finance_id, technician_id, sign_time, settlement_time, contract_picture_url, contract_no,
|
|
|
- contract_type, contacts, contact_mobile, legal_person, legal_person_tel, proof_count,
|
|
|
- proof_aid, proof_time, proof_status, order_dep, outsource, additional_order, primary_order,
|
|
|
+ order_no, order_type, creater, create_time, update_time, buyer_id, first_amount,
|
|
|
+ total_amount, settlement_amount, refund_amount, order_status, liquidation_status,
|
|
|
+ process_status, project_status, approval, order_remarks, delete_sign, salesman_id,
|
|
|
+ finance_id, technician_id, sign_time, settlement_time, contract_picture_url, contract_no,
|
|
|
+ contract_type, contacts, contact_mobile, legal_person, legal_person_tel, proof_count,
|
|
|
+ proof_aid, proof_time, proof_status, order_dep, outsource, additional_order, primary_order,
|
|
|
old_salesman_id, back_status, agreement_url, new_user, service_content
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from t_order_new
|
|
|
where order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
@@ -65,34 +65,34 @@
|
|
|
where order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.goafanti.common.model.TOrderNew">
|
|
|
- insert into t_order_new (order_no, order_type, creater,
|
|
|
- create_time, update_time, buyer_id,
|
|
|
- first_amount, total_amount, settlement_amount,
|
|
|
- refund_amount, order_status, liquidation_status,
|
|
|
- process_status, project_status, approval,
|
|
|
- order_remarks, delete_sign, salesman_id,
|
|
|
- finance_id, technician_id, sign_time,
|
|
|
- settlement_time, contract_picture_url, contract_no,
|
|
|
- contract_type, contacts, contact_mobile,
|
|
|
- legal_person, legal_person_tel, proof_count,
|
|
|
- proof_aid, proof_time, proof_status,
|
|
|
- order_dep, outsource, additional_order,
|
|
|
- primary_order, old_salesman_id, back_status,
|
|
|
+ insert into t_order_new (order_no, order_type, creater,
|
|
|
+ create_time, update_time, buyer_id,
|
|
|
+ first_amount, total_amount, settlement_amount,
|
|
|
+ refund_amount, order_status, liquidation_status,
|
|
|
+ process_status, project_status, approval,
|
|
|
+ order_remarks, delete_sign, salesman_id,
|
|
|
+ finance_id, technician_id, sign_time,
|
|
|
+ settlement_time, contract_picture_url, contract_no,
|
|
|
+ contract_type, contacts, contact_mobile,
|
|
|
+ legal_person, legal_person_tel, proof_count,
|
|
|
+ proof_aid, proof_time, proof_status,
|
|
|
+ order_dep, outsource, additional_order,
|
|
|
+ primary_order, old_salesman_id, back_status,
|
|
|
agreement_url, new_user, service_content
|
|
|
)
|
|
|
- values (#{orderNo,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER}, #{creater,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR},
|
|
|
- #{firstAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL},
|
|
|
- #{refundAmount,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER},
|
|
|
- #{processStatus,jdbcType=INTEGER}, #{projectStatus,jdbcType=INTEGER}, #{approval,jdbcType=INTEGER},
|
|
|
- #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}, #{salesmanId,jdbcType=VARCHAR},
|
|
|
- #{financeId,jdbcType=VARCHAR}, #{technicianId,jdbcType=VARCHAR}, #{signTime,jdbcType=DATE},
|
|
|
- #{settlementTime,jdbcType=DATE}, #{contractPictureUrl,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR},
|
|
|
- #{contractType,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR},
|
|
|
- #{legalPerson,jdbcType=VARCHAR}, #{legalPersonTel,jdbcType=VARCHAR}, #{proofCount,jdbcType=FLOAT},
|
|
|
- #{proofAid,jdbcType=VARCHAR}, #{proofTime,jdbcType=TIMESTAMP}, #{proofStatus,jdbcType=INTEGER},
|
|
|
- #{orderDep,jdbcType=VARCHAR}, #{outsource,jdbcType=INTEGER}, #{additionalOrder,jdbcType=VARCHAR},
|
|
|
- #{primaryOrder,jdbcType=VARCHAR}, #{oldSalesmanId,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER},
|
|
|
+ values (#{orderNo,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER}, #{creater,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR},
|
|
|
+ #{firstAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL},
|
|
|
+ #{refundAmount,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER},
|
|
|
+ #{processStatus,jdbcType=INTEGER}, #{projectStatus,jdbcType=INTEGER}, #{approval,jdbcType=INTEGER},
|
|
|
+ #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}, #{salesmanId,jdbcType=VARCHAR},
|
|
|
+ #{financeId,jdbcType=VARCHAR}, #{technicianId,jdbcType=VARCHAR}, #{signTime,jdbcType=DATE},
|
|
|
+ #{settlementTime,jdbcType=DATE}, #{contractPictureUrl,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR},
|
|
|
+ #{contractType,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR},
|
|
|
+ #{legalPerson,jdbcType=VARCHAR}, #{legalPersonTel,jdbcType=VARCHAR}, #{proofCount,jdbcType=FLOAT},
|
|
|
+ #{proofAid,jdbcType=VARCHAR}, #{proofTime,jdbcType=TIMESTAMP}, #{proofStatus,jdbcType=INTEGER},
|
|
|
+ #{orderDep,jdbcType=VARCHAR}, #{outsource,jdbcType=INTEGER}, #{additionalOrder,jdbcType=VARCHAR},
|
|
|
+ #{primaryOrder,jdbcType=VARCHAR}, #{oldSalesmanId,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER},
|
|
|
#{agreementUrl,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{serviceContent,jdbcType=VARCHAR}
|
|
|
)
|
|
|
</insert>
|
|
|
@@ -830,11 +830,12 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
<!-- 通过订单编号获得订单的负责人(营销员) -->
|
|
|
<select id="getSaleIdByOno" parameterType="java.lang.String" resultType="com.goafanti.order.bo.TOrderNewBo">
|
|
|
select order_no orderNo ,salesman_id as salesmanId, a.name as salesmanName,
|
|
|
- o.contract_no contractNo,a.email ,u.nickname as userName
|
|
|
- from t_order_new o left join admin a on o.salesman_id = a.id
|
|
|
- left join `user` u on u.id = o.buyer_id
|
|
|
- where order_no = #{_parameter,jdbcType=VARCHAR}
|
|
|
+ o.contract_no contractNo,a.email ,u.nickname as userName,o.order_dep orderDep,
|
|
|
+ d.name departmentName,d.finance_id financeId
|
|
|
+ from t_order_new o left join admin a on o.salesman_id = a.id left join `user` u on u.id = o.buyer_id
|
|
|
+ left join department d on o.order_dep=d.id where order_no = #{_parameter,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
+
|
|
|
<select id="selectOrderNewListByPage" resultType="com.goafanti.order.bo.TOrderNewBo">
|
|
|
select a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,a.delete_sign deleteSign,
|
|
|
a.contract_no as contractNo, b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,
|
|
|
@@ -1551,4 +1552,4 @@ left join department d on o.order_dep = d.id left join t_order_mid a on o.orde
|
|
|
select order_no orderNo,contract_no contractNo
|
|
|
from t_order_new where delete_sign in (0,2) and buyer_id = #{uid}
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+</mapper>
|