Browse Source

订单最大公出值开发

anderx 1 year ago
parent
commit
9ce7ef40fb

+ 12 - 6
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -742,7 +742,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	}
 
 	private void pushOrderMaxDuration(TOrderNew orderNew,TOrderPublicReleaseCount out) {
-		BigDecimal maxDuration = BigDecimal.ZERO;
+		BigDecimal maxDuration;
 		//获取会员信息
 		List<TTaskMember> tTaskMembers = tTaskMemberMapper.selectByOrderNo(orderNew.getOrderNo());
 		int yearSum=0;
@@ -821,16 +821,22 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				orderYearMaxDuration.setYear(0);
 				orderYearMaxDuration.setOrderNo(orderNew.getOrderNo());
 				maxDuration = pushMaxDuration(orderNew.getTotalAmount());
+				//需修改成判定
 				if (maxDuration.compareTo(new BigDecimal(-1))==0){
 					orderYearMaxDuration.setMaxDuration(BigDecimal.ZERO);
 					orderYearMaxDuration.setStatus(1);
+					out.setMaxDuration(BigDecimal.ZERO.doubleValue());
+					out.setMaxType(2);
+				}else if (maxDuration.compareTo(new BigDecimal(0))==0){
+					orderYearMaxDuration.setMaxDuration(BigDecimal.ZERO);
+					orderYearMaxDuration.setStatus(0);
+					out.setMaxDuration(BigDecimal.ZERO.doubleValue());
+					out.setMaxType(0);
 				}else {
-					if (maxDuration.compareTo(new BigDecimal(-1))==0){
-						orderYearMaxDuration.setMaxDuration(BigDecimal.ZERO);
-						orderYearMaxDuration.setStatus(1);
-					}
 					orderYearMaxDuration.setMaxDuration(maxDuration);
 					orderYearMaxDuration.setStatus(0);
+					out.setMaxDuration(BigDecimal.ZERO.doubleValue());
+					out.setMaxType(1);
 				}
 				int x = orderYearMaxDurationMapper.queryAllByCount(new OrderYearMaxDuration(orderNew.getOrderNo(), 0));
 				if (x>0){
@@ -840,7 +846,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				}
 			}
 		}
-
+		out.setMaxProcess(4);
 	}
 
 	private  Integer extractYear(String yearStr) {