Browse Source

新增字段

anderx 2 years ago
parent
commit
892da78372

+ 89 - 20
src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml

@@ -37,6 +37,12 @@
     <result column="contract_picture_url" jdbcType="VARCHAR" property="contractPictureUrl" />
     <result column="first_amount" jdbcType="DECIMAL" property="firstAmount" />
     <result column="examine_name" jdbcType="VARCHAR" property="examineName" />
+    <result column="cw_indirect_cost" jdbcType="DECIMAL" property="cwIndirectCost" />
+    <result column="contacts" jdbcType="VARCHAR" property="contacts" />
+    <result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
+    <result column="manager_contacts" jdbcType="VARCHAR" property="managerContacts" />
+    <result column="manager_contact_mobile" jdbcType="VARCHAR" property="managerContactMobile" />
+
   </resultMap>
   <sql id="Base_Column_List">
     id, order_no, process_state, `status`, `type`, create_time, remarks, voucher_url,
@@ -44,7 +50,8 @@
     zxs_cost, zxs_remarks, payment_time, payment_amount, invoice_time, invoice_amount,
     invoice_type, cw_cost, refundable_amount, cw_remarks, estimate_cost, estimate_refundable,
     refund_Invoice, used_order, refund_status, refund_url, back_status, attachment_url,
-    contract_picture_url, first_amount, examine_name
+    contract_picture_url, first_amount, examine_name,cw_indirect_cost,contacts,contact_mobile,
+    manager_contacts,manager_contact_mobile
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -68,7 +75,8 @@
       estimate_refundable, refund_Invoice, used_order,
       refund_status, refund_url, back_status,
       attachment_url, contract_picture_url, first_amount,
-      examine_name)
+      examine_name,cw_indirect_cost,contacts,contact_mobile,
+      manager_contacts,manager_contact_mobile)
     values (#{orderNo,jdbcType=VARCHAR}, #{processState,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
       #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR},
       #{voucherUrl,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL},
@@ -80,7 +88,8 @@
       #{estimateRefundable,jdbcType=DECIMAL}, #{refundInvoice,jdbcType=DECIMAL}, #{usedOrder,jdbcType=VARCHAR},
       #{refundStatus,jdbcType=INTEGER}, #{refundUrl,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER},
       #{attachmentUrl,jdbcType=VARCHAR}, #{contractPictureUrl,jdbcType=VARCHAR}, #{firstAmount,jdbcType=DECIMAL},
-      #{examineName,jdbcType=VARCHAR})
+      #{examineName,jdbcType=VARCHAR},#{cwIndirectCost,jdbcType=DECIMAL},#{contacts,jdbcType=VARCHAR},#{contactMobile,jdbcType=VARCHAR},
+      #{managerContacts,jdbcType=VARCHAR},#{managerContactMobile,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.NewOrderChange" useGeneratedKeys="true">
     insert into new_order_change
@@ -187,6 +196,21 @@
       <if test="examineName != null">
         examine_name,
       </if>
+      <if test="cwIndirectCost != null">
+        cw_indirect_cost,
+      </if>
+      <if test="contacts != null">
+        contacts,
+      </if>
+      <if test="contactMobile != null">
+        contact_mobile,
+      </if>
+      <if test="managerContacts != null">
+        manager_contacts,
+      </if>
+        <if test="managerContactMobile != null">
+          manager_contact_mobile,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="orderNo != null">
@@ -291,6 +315,21 @@
       <if test="examineName != null">
         #{examineName,jdbcType=VARCHAR},
       </if>
+      <if test="cwIndirectCost != null">
+        #{cwIndirectCost,jdbcType=DECIMAL},
+      </if>
+      <if test="contacts != null">
+        #{contacts,jdbcType=VARCHAR},
+      </if>
+      <if test="contactMobile != null">
+        #{contactMobile,jdbcType=VARCHAR},
+      </if>
+      <if test="managerContacts != null">
+        #{managerContacts,jdbcType=VARCHAR},
+      </if>
+      <if test="managerContactMobile != null">
+        #{managerContactMobile,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.NewOrderChange">
@@ -398,6 +437,21 @@
       <if test="examineName != null">
         examine_name = #{examineName,jdbcType=VARCHAR},
       </if>
+      <if test="cwIndirectCost != null">
+        cw_indirect_cost=#{cwIndirectCost,jdbcType=DECIMAL},
+      </if>
+      <if test="contacts != null">
+        contacts=#{contacts,jdbcType=VARCHAR},
+      </if>
+      <if test="contactMobile != null">
+        contact_mobile=#{contactMobile,jdbcType=VARCHAR},
+      </if>
+      <if test="managerContacts != null">
+        manager_contacts=#{managerContacts,jdbcType=VARCHAR},
+      </if>
+      <if test="managerContactMobile != null">
+        manager_contact_mobile=#{managerContactMobile,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -436,7 +490,12 @@
       attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
       contract_picture_url = #{contractPictureUrl,jdbcType=VARCHAR},
       first_amount = #{firstAmount,jdbcType=DECIMAL},
-      examine_name = #{examineName,jdbcType=VARCHAR}
+      examine_name = #{examineName,jdbcType=VARCHAR},
+        cw_indirect_cost=#{cwIndirectCost,jdbcType=DECIMAL},
+    contacts=#{contacts,jdbcType=VARCHAR},
+    contact_mobile=#{contactMobile,jdbcType=VARCHAR},
+    manager_contacts=#{managerContacts,jdbcType=VARCHAR},
+    manager_contact_mobile=#{managerContactMobile,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByorderNo" resultType="com.goafanti.order.bo.NewOrderChangeBo">
@@ -447,7 +506,12 @@ select
 	a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
-	a.cw_remarks cwRemarks,a.contract_picture_url contractPictureUrl,a.first_amount firstAmount,a.examine_name examineName
+	a.cw_remarks cwRemarks,a.contract_picture_url contractPictureUrl,a.first_amount firstAmount,a.examine_name examineName,
+    a.cw_indirect_cost cwIndirectCost,
+    a.contacts contacts,
+    a.contact_mobile contactMobile,
+    a.manager_contacts managerContacts,
+    a.manager_contact_mobile managerContactMobile
     from new_order_change a where 1 = 1
 	and a.order_no= #{orderNo}
 	order by a.create_time desc limit 1
@@ -460,7 +524,12 @@ select
 	a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
-	a.cw_remarks cwRemarks,a.back_status backStatus ,a.contract_picture_url contractPictureUrl,a.first_amount firstAmount
+	a.cw_remarks cwRemarks,a.back_status backStatus ,a.contract_picture_url contractPictureUrl,a.first_amount firstAmount,
+    a.cw_indirect_cost cwIndirectCost,
+    a.contacts contacts,
+    a.contact_mobile contactMobile,
+    a.manager_contacts managerContacts,
+    a.manager_contact_mobile managerContactMobile
     from new_order_change a where 1 = 1
 	and a.id= #{ChangeId}
 	order by a.create_time desc
@@ -474,7 +543,8 @@ select
 	a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,a.first_amount firstAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
-	a.cw_remarks cwRemarks,a.back_status backStatus from new_order_change a where 1 = 1 and status in (0,1,2,3)
+	a.cw_remarks cwRemarks,a.back_status backStatus
+from new_order_change a where 1 = 1 and status in (0,1,2,3)
 	and a.order_no= #{orderNo}
 	order by a.create_time desc
   </select>
@@ -487,7 +557,12 @@ select
 	a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,a.first_amount firstAmount,
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,a.examine_name examineName,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
-	a.cw_remarks cwRemarks,a.estimate_cost estimateCost,estimate_refundable estimateRefundable,refund_Invoice refundInvoice,a.contract_picture_url contractPictureUrl
+	a.cw_remarks cwRemarks,a.estimate_cost estimateCost,estimate_refundable estimateRefundable,refund_Invoice refundInvoice,a.contract_picture_url contractPictureUrl,
+    a.cw_indirect_cost cwIndirectCost,
+    a.contacts contacts,
+    a.contact_mobile contactMobile,
+    a.manager_contacts managerContacts,
+    a.manager_contact_mobile managerContactMobile
 	from new_order_change a where 1 = 1 and a.id= #{id}
   </select>
   <select id="checkOderNo" resultType="java.lang.Integer">
@@ -498,7 +573,12 @@ select
 	select a.id,a.order_no orderNo,b.contract_no contractNo, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes,c.nickname,b.order_type orderType,
   date_format(b.create_time,'%Y-%m-%d %H:%i:%S')establishTimes, b.order_status orderStatus,b.total_amount totalAmount,a.status ,a.examine_name examineName,
   b.settlement_amount settlementAmount,(b.total_amount-b.settlement_amount) arrears,d.name salesmanName,e.name depName,a.`type`,
-  a.process_state processState,a.back_status backStatus from new_order_change  noc left join  new_order_change a on noc.id=a.id
+  a.process_state processState,a.back_status backStatus,noc.cw_indirect_cost cwIndirectCost,
+    noc.contacts contacts,
+    noc.contact_mobile contactMobile,
+    noc.manager_contacts managerContacts,
+    noc.manager_contact_mobile managerContactMobile
+	from new_order_change  noc left join  new_order_change a on noc.id=a.id
   left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id left join admin d on b.salesman_id=d.id
   left join department e on b.order_dep=e.id
     <if test="processState==3">
@@ -776,17 +856,6 @@ select
     <select id="getOrderChange" resultType="java.util.Map">
 	select id,used_order usedOrder from new_order_change where  order_no= #{orderNo} order by id desc
 	</select>
-
-
-  <update id="updateExamineName">
-    update new_order_change a , t_order_new b ,(select a.department_id depId,group_concat(a.name) name
-                                                from admin a left join user_role b on a.id=b.uid
-                                                             left join `role` c on b.rid =c.id
-                                                where c.role_type ='9996' and a.status ='0' and a.department_id = #{depId}
-                                                group by a.department_id ) c
-    set a.examine_name =c.name
-    where a.order_no =b.order_no and b.order_dep = #{depId} and b.order_dep =c.depId
-  </update>
     <update id="updateTaskExamineName">
       update new_order_change n left join (select c.id
              from t_order_new a left join t_order_task b on a.order_no =b.order_no

+ 70 - 41
src/main/java/com/goafanti/common/model/NewOrderChange.java

@@ -1,190 +1,178 @@
 package com.goafanti.common.model;
 
-import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
+import java.io.Serializable;
 
 /**
- * new_order_change
- * @author 
+ * 订单变更(NewOrderChange)实体类
+ *
+ * @author andex
+ * @since 2023-11-27 13:46:34
  */
 public class NewOrderChange implements Serializable {
+    private static final long serialVersionUID = -19111689813792568L;
     /**
      * id
      */
     private Integer id;
-
     /**
      * 订单编号
      */
     private String orderNo;
-
     /**
-     * 流程状态 0营销员 1营销管理员 2技术员 3技术经理 4技术总监 5财务专员(退单) 6财务总监 7总裁 8董事长
+     * 流程状态 0=营销员,1=营销经理,2=营销管理员,3=技术员,4=技术经理,5=技术总监,6=财务专员,7=财务总监,8=总裁,9=董事长
      */
     private Integer processState;
-
     /**
      * 状态 0草稿 1审核中 2通过 3驳回 4完成 5撤销 6上传附件
      */
     private Integer status;
-
     /**
      * 变更类型 0退单退款 1项目及金额变更 2仅项目变更 3仅金额变更 4重报 5赠送
      */
     private Integer type;
-
     /**
      * 创建时间
      */
     private Date createTime;
-
     /**
      * 备注
      */
     private String remarks;
-
     /**
      * 图片地址
      */
     private String voucherUrl;
-
     /**
      * 总金额
      */
     private BigDecimal totalAmount;
-
     /**
      * 已收款
      */
     private BigDecimal settlementAmount;
-
     /**
      * 申请金额
      */
     private BigDecimal changeAmount;
-
     /**
      * 申请人
      */
     private String applicant;
-
     /**
      * 申请部门
      */
     private String depName;
-
     /**
      * 项目进度
      */
     private String projectState;
-
     /**
      * 发生成本费用
      */
     private BigDecimal zxsCost;
-
     /**
      * 咨询师备注(营销员日志备注)
      */
     private String zxsRemarks;
-
     /**
      * 收款时间
      */
     private Date paymentTime;
-
     /**
      * 收款金额
      */
     private BigDecimal paymentAmount;
-
     /**
      * 开票时间
      */
     private Date invoiceTime;
-
     /**
      * 已开票金额
      */
     private BigDecimal invoiceAmount;
-
     /**
      * 发票类型
      */
     private String invoiceType;
-
     /**
-     * 发生成本
+     * 发生直接成本
      */
     private BigDecimal cwCost;
-
     /**
      * 应退金额
      */
     private BigDecimal refundableAmount;
-
     /**
      * 财务备注
      */
     private String cwRemarks;
-
     /**
      * 预计成本费用
      */
     private BigDecimal estimateCost;
-
     /**
      * 预计退款
      */
     private BigDecimal estimateRefundable;
-
     /**
      * 累计退票
      */
     private BigDecimal refundInvoice;
-
     /**
      * 原订单编号
      */
     private String usedOrder;
-
     /**
      * 退款状态 0否 1是
      */
     private Integer refundStatus;
-
     /**
      * 退款凭证
      */
     private String refundUrl;
-
     /**
      * 驳回位置 (同流程状态)
      */
     private Integer backStatus;
-
     /**
      * 附件地址
      */
     private String attachmentUrl;
-
     /**
      * 合同图片
      */
     private String contractPictureUrl;
-
     /**
      * 首付金额
      */
     private BigDecimal firstAmount;
-
     /**
      * 审核人员名称
      */
     private String examineName;
+    /**
+     * 发生间接成本
+     */
+    private BigDecimal cwIndirectCost;
+    /**
+     * 企业负责人
+     */
+    private String contacts;
+    /**
+     * 负责人联系电话
+     */
+    private String contactMobile;
+    /**
+     * 企业总经理
+     */
+    private String managerContacts;
+    /**
+     * 总经理联系电话
+     */
+    private String managerContactMobile;
 
-    private static final long serialVersionUID = 1L;
 
     public Integer getId() {
         return id;
@@ -465,4 +453,45 @@ public class NewOrderChange implements Serializable {
     public void setExamineName(String examineName) {
         this.examineName = examineName;
     }
-}
+
+    public BigDecimal getCwIndirectCost() {
+        return cwIndirectCost;
+    }
+
+    public void setCwIndirectCost(BigDecimal cwIndirectCost) {
+        this.cwIndirectCost = cwIndirectCost;
+    }
+
+    public String getContacts() {
+        return contacts;
+    }
+
+    public void setContacts(String contacts) {
+        this.contacts = contacts;
+    }
+
+    public String getContactMobile() {
+        return contactMobile;
+    }
+
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+
+    public String getManagerContacts() {
+        return managerContacts;
+    }
+
+    public void setManagerContacts(String managerContacts) {
+        this.managerContacts = managerContacts;
+    }
+
+    public String getManagerContactMobile() {
+        return managerContactMobile;
+    }
+
+    public void setManagerContactMobile(String managerContactMobile) {
+        this.managerContactMobile = managerContactMobile;
+    }
+
+}