Browse Source

订单优化排序

wanghui 7 years ago
parent
commit
74ade93470

+ 5 - 3
src/main/java/com/goafanti/common/mapper/TOrderMapper.xml

@@ -1077,7 +1077,7 @@
 			and a.approval = #{approval,jdbcType=INTEGER}
 		</if>
 		<if test="buyerName != null and buyerName != ''">
-			and b.nickname = #{buyerName,jdbcType=VARCHAR}
+			and b.nickname like CONCAT('%',#{buyerName,jdbcType=VARCHAR},'%')
 		</if>
 		<if test="salesmanName != null and salesmanName != ''">
 			and c.name = #{salesmanName,jdbcType=VARCHAR}
@@ -1102,6 +1102,7 @@
 		<if test="page_sql != null">
 			${page_sql}
 		</if>
+			order by a.create_time desc
   </select>
   <select id="selectServiceOrderCount" resultType="java.lang.Integer">
   		select
@@ -1337,7 +1338,7 @@
 			and a.finance_id is  not null
 		</if>
 		<if test="buyerName != null and buyerName != ''">
-			and b.nickname = #{buyerName,jdbcType=VARCHAR}
+			and b.nickname like CONCAT('%',#{buyerName,jdbcType=VARCHAR},'%')
 		</if>
 		<if test="depId != null">
 			and c.department_id = #{depId,jdbcType=VARCHAR}
@@ -1351,6 +1352,7 @@
 		<if test="page_sql != null">
 			${page_sql}
 		</if>
+			order by a.create_time desc
   </select>
   <select id="selectSettlementCount" resultType="java.lang.Integer">
  	 select
@@ -1391,7 +1393,7 @@
 			and a.finance_id is not null
 		</if>
 		<if test="buyerName != null and buyerName != ''">
-			and b.nickname = #{buyerName,jdbcType=VARCHAR}
+			and b.nickname like CONCAT('%',#{buyerName,jdbcType=VARCHAR},'%')
 		</if>
 		<if test="depId != null">
 			and c.department_id = #{depId,jdbcType=VARCHAR}

+ 4 - 4
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -606,7 +606,7 @@
 		and a.create_time &lt; #{setUpEndDate,jdbcType=TIMESTAMP}
 	</if>
 	<if test="buyerName != null and buyerName != ''">
-		and b.nickname = #{buyerName,jdbcType=VARCHAR}
+		and b.nickname like CONCAT('%', #{buyerName,jdbcType=VARCHAR}, '%')
 	</if>
 	<if test="salesmanName != null and salesmanName !=''">
 		and d.name = #{salesmanName,jdbcType=VARCHAR}
@@ -651,7 +651,7 @@
 		and a.create_time &lt; #{setUpEndDate,jdbcType=TIMESTAMP}
 	</if>
 	<if test="buyerName != null and buyerName != ''">
-		and b.nickname = #{buyerName,jdbcType=VARCHAR}
+		and b.nickname like CONCAT('%', #{buyerName,jdbcType=VARCHAR}, '%')
 	</if>
 	<if test="salesmanName != null and salesmanName !=''">
 		and d.name = #{salesmanName,jdbcType=VARCHAR}
@@ -777,7 +777,7 @@
 			and d.serial_number = #{projectNo,jdbcType=VARCHAR}
 		</if>
 		<if test="buyerName != null and buyerName != ''">
-			and e.nickname = #{buyerName,jdbcType=VARCHAR}
+			and e.nickname like CONCAT('%',#{buyerName,jdbcType=VARCHAR},'%')	
 		</if>
 		<if test="taskReceiverName != null and taskReceiverName != ''">
 			and f.name = #{taskReceiverName,jdbcType=VARCHAR}
@@ -817,7 +817,7 @@
 			and d.serial_number = #{projectNo,jdbcType=VARCHAR}
 		</if>
 		<if test="buyerName != null and buyerName != ''">
-			and e.nickname = #{buyerName,jdbcType=VARCHAR}
+			and e.nickname like CONCAT('%',#{buyerName,jdbcType=VARCHAR},'%')
 		</if>
 		<if test="taskReceiverName != null and taskReceiverName != ''">
 			and f.name = #{taskReceiverName,jdbcType=VARCHAR}

+ 2 - 0
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -250,6 +250,7 @@
 		 <if test="page_sql != null">
     		${page_sql}
    		 </if>
+   		 order by a.create_time desc
 	</select>
 	<select id="selectOrganizationCustomerCount" resultType="java.lang.Integer">
 		select 
@@ -750,6 +751,7 @@
 	<if test="endDate != null and endDate != ''">
 		and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
 	</if>
+	order by a.create_time desc 
 	<if test="page_sql != null">
     	${page_sql}
     </if>

+ 13 - 1
src/main/java/com/goafanti/customer/bo/CustomerListIn.java

@@ -79,7 +79,11 @@ public class CustomerListIn {
 	
 	/** 专家审核状态 **/
 	private Integer expertAudit ;
-
+	
+	/** 专家发布状态**/
+	private Integer releaseStatus;
+	
+	
 	public Integer getExpertAudit() {
 		return expertAudit;
 	}
@@ -287,4 +291,12 @@ public class CustomerListIn {
 	public void setConsultant(String consultant) {
 		this.consultant = consultant;
 	}
+
+	public Integer getReleaseStatus() {
+		return releaseStatus;
+	}
+
+	public void setReleaseStatus(Integer releaseStatus) {
+		this.releaseStatus = releaseStatus;
+	}
 }

+ 1 - 23
src/main/java/com/goafanti/customer/bo/CustomerListOut.java

@@ -16,39 +16,17 @@ public class CustomerListOut extends CustomerListIn{
 	/** 营销员姓名 **/
 	private String adminName;
 	
-	/** 专家审核状态 **/
-	private Integer expertAudit;
-	
-	/** 专家发布状态**/
-	private Integer releaseStatus;
-	
 	/** 审核意见**/
 	private String auditOpinion;
 	
 	public String getAuditOpinion() {
 		return auditOpinion;
 	}
-
+	
 	public void setAuditOpinion(String auditOpinion) {
 		this.auditOpinion = auditOpinion;
 	}
 
-	public Integer getReleaseStatus() {
-		return releaseStatus;
-	}
-
-	public void setReleaseStatus(Integer releaseStatus) {
-		this.releaseStatus = releaseStatus;
-	}
-
-	public Integer getExpertAudit() {
-		return expertAudit;
-	}
-
-	public void setExpertAudit(Integer expertAudit) {
-		this.expertAudit = expertAudit;
-	}
-
 	public String getUid() {
 		return uid;
 	}

+ 3 - 3
src/main/java/com/goafanti/order/service/impl/OrderServiceImpl.java

@@ -858,10 +858,10 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 		}
 		tOrder.setSignFirstPayment(new BigDecimal(signFirstPayment));
 		tOrder.setSignTotalAmount(new BigDecimal(signTotalAmount));
-		tOrder.setOrderRemarks(orderRemarks);
+		if(StringUtils.isNotBlank(orderRemarks)) tOrder.setOrderRemarks(orderRemarks);
+		if(StringUtils.isNotBlank(orderNo)) tOrder.setContractNo(contractNo);
+		if(StringUtils.isNotBlank(contractPictureUrl)) tOrder.setContractPictureUrl(contractPictureUrl);
 		tOrder.setUpdateTime(new Date());
-		tOrder.setContractNo(contractNo);
-		tOrder.setContractPictureUrl(contractPictureUrl);
 		tOrderMapper.updateByPrimaryKeySelective(tOrder);
 		return 1;
 	}