Browse Source

会员特批修改

anderx 2 years ago
parent
commit
ba0d59ebb5

+ 5 - 2
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -22,7 +22,7 @@ public class AFTConstants {
 	public static final String	APPROVAL_DECISION					= "99999";
 	/**	特批决策者审核 */
 	public static final String	APPROVAL_DECISION_ASSISTANT			= "99989";
-	/**	总裁 */
+	/** 总裁 */
 	public static final String	CED									= "99998";
 	/** 副总裁 */
 	public static final String  VICE_CED	 	             	    = "99996";
@@ -212,5 +212,8 @@ public class AFTConstants {
 
     public static final long DUN_START_LIMIT_MS						= 24*3600*1000*900L;
 
-
+	/**
+	 * 省内判定
+	 */
+    public static final Integer HN_PROVINCE = 11;
 }

+ 23 - 6
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -68,6 +68,7 @@
     <result column="satisfaction_degree" jdbcType="INTEGER" property="satisfactionDegree" />
     <result column="satisfaction_degree_url" jdbcType="VARCHAR" property="satisfactionDegreeUrl" />
     <result column="examine_type" jdbcType="INTEGER" property="examineType" />
+    <result column="approval" jdbcType="INTEGER" property="approval" />
   </resultMap>
   <sql id="Base_Column_List">
     id, order_no, main, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode,
@@ -80,7 +81,8 @@
     declaration_batch, cost_reduction, official_cost, set_up_status, set_up_time, spot_check_status,
     high_tech_status, special_comment, if_certification_fee, certification_fee, certification_corporate,
     time_record, if_publicity, check_status, patent_type, pubicity_url, process_status,
-    member_type, picture_url, satisfaction_degree, satisfaction_degree_url, examine_type
+    member_type, picture_url, satisfaction_degree, satisfaction_degree_url, examine_type,
+    approval
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -115,7 +117,7 @@
       check_status, patent_type, pubicity_url,
       process_status, member_type, picture_url,
       satisfaction_degree, satisfaction_degree_url,
-      examine_type)
+      examine_type, approval)
     values (#{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{superId,jdbcType=VARCHAR},
       #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER},
       #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL}, #{taskStatus,jdbcType=INTEGER},
@@ -138,7 +140,7 @@
       #{checkStatus,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER}, #{pubicityUrl,jdbcType=VARCHAR},
       #{processStatus,jdbcType=INTEGER}, #{memberType,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR},
       #{satisfactionDegree,jdbcType=INTEGER}, #{satisfactionDegreeUrl,jdbcType=VARCHAR},
-      #{examineType,jdbcType=INTEGER})
+      #{examineType,jdbcType=INTEGER}, #{approval,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
     insert into t_order_task
@@ -338,6 +340,9 @@
       <if test="examineType != null">
         examine_type,
       </if>
+      <if test="approval != null">
+        approval,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="orderNo != null">
@@ -535,6 +540,9 @@
       <if test="examineType != null">
         #{examineType,jdbcType=INTEGER},
       </if>
+      <if test="approval != null">
+        #{approval,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderTask">
@@ -735,6 +743,9 @@
       <if test="examineType != null">
         examine_type = #{examineType,jdbcType=INTEGER},
       </if>
+      <if test="approval != null">
+        approval = #{approval,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -804,7 +815,8 @@
       picture_url = #{pictureUrl,jdbcType=VARCHAR},
       satisfaction_degree = #{satisfactionDegree,jdbcType=INTEGER},
       satisfaction_degree_url = #{satisfactionDegreeUrl,jdbcType=VARCHAR},
-      examine_type = #{examineType,jdbcType=INTEGER}
+      examine_type = #{examineType,jdbcType=INTEGER},
+      approval = #{approval,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -2121,7 +2133,7 @@
     select a.id,b.contract_no contractNo,c.buyer_name userName,a.order_no orderNo,b.approval ,c.dep_name depName,
     c.salesman_name salesmanName,c.finance_name financeName,a.commodity_name projectName,a.member_type memberType,
     b.delete_sign deleteSign ,b.total_amount totalAmount ,b.sales_type salesType ,b.other,a.examine_type examineType,
-    a.process_status status,a.commodity_id commodityId,a.commodity_name commodityName,
+    a.process_status status,a.commodity_id commodityId,a.commodity_name commodityName,a.approval approvalType,
     a.commodity_quantity commodityQuantity,a.task_comment taskComment,a.picture_url pictureUrl,
     e.service_life serviceLife ,e.service_year serviceYear,e.year_sum yearSum,e.contract_term contractTerm
     from t_order_task a left join t_order_new b on a.order_no =b.order_no
@@ -2138,7 +2150,9 @@
     <if test="shiroType ==2">
       and (d.finance_id  = #{aid} or  d.retrial_finance_id =#{aid})
     </if>
-
+    <if test="approvalType !=null">
+      and a.approval= #{approvalType}
+    </if>
     <if test="orderNo != null">
       and a.order_no = #{orderNo}
     </if>
@@ -2206,6 +2220,9 @@
     <if test="shiroType ==2">
       and (d.finance_id  = #{aid} or  d.retrial_finance_id =#{aid})
     </if>
+    <if test="approvalType !=null">
+      and a.approval= #{approvalType}
+    </if>
     <if test="orderNo != null">
       and a.order_no = #{orderNo}
     </if>

+ 14 - 1
src/main/java/com/goafanti/common/model/TOrderTask.java

@@ -335,10 +335,15 @@ public class TOrderTask implements Serializable {
     private String satisfactionDegreeUrl;
 
     /**
-     * 0=全部 ,1=财务审核,2=财务复审,3=已审核
+     * 0=无需审核 ,1=财务审核,2=财务复审,3=全部需要审核,4=已审核
      */
     private Integer examineType;
 
+    /**
+     * 特批状态 0-非特批 ,1-总裁特批,2-副总裁特批
+     */
+    private Integer approval;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -868,4 +873,12 @@ public class TOrderTask implements Serializable {
     public void setExamineType(Integer examineType) {
         this.examineType = examineType;
     }
+
+    public Integer getApproval() {
+        return approval;
+    }
+
+    public void setApproval(Integer approval) {
+        this.approval = approval;
+    }
 }

+ 10 - 0
src/main/java/com/goafanti/order/bo/OutMemberList.java

@@ -27,6 +27,8 @@ public class OutMemberList {
     private String taskComment;
     @Excel(name = "状态",readConverterExp = "0=非审核,1=财务审核,2=特批审核,3=通过,4=驳回",width = MINWIDTH)
     private Integer status;
+    /** 特批分类  0非特批 1总裁特批 2副总裁特批*/
+    private Integer approvalType;
 
     private Integer  deleteSign;
 
@@ -57,6 +59,14 @@ public class OutMemberList {
     private Integer myExamine;
     private Integer examineType;
 
+    public Integer getApprovalType() {
+        return approvalType;
+    }
+
+    public void setApprovalType(Integer approvalType) {
+        this.approvalType = approvalType;
+    }
+
     public Integer getExamineType() {
         return examineType;
     }

+ 14 - 0
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -1261,6 +1261,11 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		if(in.getStatus()!=null) map.put("status", in.getStatus());
 		if(in.getShiroType()!=null) map.put("shiroType", in.getShiroType());
 		map.put("aid",TokenManager.getAdminId());
+		if (TokenManager.hasRole(AFTConstants.VICE_CED)){
+			map.put("approvalType",2);
+		}else if (TokenManager.hasRole(AFTConstants.CED)){
+			map.put("approvalType",1);
+		}
 	}
 
 	@Override
@@ -1466,6 +1471,15 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			tOrderTask.setProcessStatus(1);
 			tOrderTask.setMemberType(memberType);
 			tOrderTask.setPictureUrl(pictureUrl);
+			if(memberType==1||memberType==2){
+				//判定项目省内外
+				Department dep = tOrderNewMapper.selectDepByOrderNo(tOrderTask.getOrderNo());
+				if (dep!=null&&dep.getProvince()==AFTConstants.HN_PROVINCE){
+					tOrderTask.setApproval(2);
+				}else {
+					tOrderTask.setApproval(1);
+				}
+			}
 		}
 		Integer i=tOrderTaskMapper.getSplitCount(tid);
 		i++;