Explorar o código

feat:首页改造

Joburgess %!s(int64=4) %!d(string=hai) anos
pai
achega
cf713d690e

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/IndexBaseMonthData.java

@@ -15,6 +15,8 @@ public class IndexBaseMonthData {
 	
 	/**  */
 	private java.util.Date month;
+
+	private String title;
 	
 	/** 分部编号 */
 	private Integer organId;
@@ -116,4 +118,12 @@ public class IndexBaseMonthData {
 	public void setUpdateTime(Date updateTime) {
 		this.updateTime = updateTime;
 	}
+
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
 }

+ 6 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/IndexBaseMonthDataServiceImpl.java

@@ -20,7 +20,6 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
-import javax.xml.crypto.Data;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
@@ -90,7 +89,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 				}
 				IndexBaseMonthData indexBaseMonthData = new IndexBaseMonthData();
 				indexBaseMonthData.setMonth(Date.from(currentMonthDate.atStartOfDay(DateUtil.zoneId).toInstant()));
-				indexBaseMonthData.setTotalNum(BigDecimal.ONE);
+				indexBaseMonthData.setTotalNum(BigDecimal.ZERO);
 				indexBaseMonthData.setActivateNum(BigDecimal.ZERO);
 				indexBaseMonthData.setPercent(BigDecimal.ZERO);
 				indexBaseMonthData.setDataType(typeDateMapEntry.getKey());
@@ -190,6 +189,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		IndexBaseMonthData preStudentNumData = new IndexBaseMonthData();
 		preStudentNumData.setMonth(currentMonth);
 		preStudentNumData.setDataType(IndexDataType.STUDENT_CONVERSION_PRE_STUDENT_NUM);
+		preStudentNumData.setTitle(IndexDataType.STUDENT_CONVERSION_PRE_STUDENT_NUM.getMsg());
 		preStudentNumData.setTotalNum(preStudentNum.stream().map(IndexBaseMonthData::getTotalNum).reduce(BigDecimal.ZERO, BigDecimal::add));
 		preStudentNumData.setActivateNum(preStudentNum.stream().map(IndexBaseMonthData::getActivateNum).reduce(BigDecimal.ZERO, BigDecimal::add));
 
@@ -198,6 +198,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		IndexBaseMonthData studentNumData = new IndexBaseMonthData();
 		studentNumData.setMonth(currentMonth);
 		studentNumData.setDataType(IndexDataType.STUDENT_CONVERSION_STUDENT_NUM);
+		studentNumData.setTitle(IndexDataType.STUDENT_CONVERSION_STUDENT_NUM.getMsg());
 		studentNumData.setTotalNum(studentNum.stream().map(IndexBaseMonthData::getTotalNum).reduce(BigDecimal.ZERO, BigDecimal::add));
 		studentNumData.setActivateNum(studentNum.stream().map(IndexBaseMonthData::getActivateNum).reduce(BigDecimal.ZERO, BigDecimal::add));
 
@@ -206,6 +207,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		IndexBaseMonthData paymentStudentNumData = new IndexBaseMonthData();
 		paymentStudentNumData.setMonth(currentMonth);
 		paymentStudentNumData.setDataType(IndexDataType.STUDENT_CONVERSION_PAYMENT_STUDENT_NUM);
+		paymentStudentNumData.setTitle(IndexDataType.STUDENT_CONVERSION_PAYMENT_STUDENT_NUM.getMsg());
 		paymentStudentNumData.setTotalNum(paymentStudentNum.stream().map(IndexBaseMonthData::getTotalNum).reduce(BigDecimal.ZERO, BigDecimal::add));
 		paymentStudentNumData.setActivateNum(paymentStudentNum.stream().map(IndexBaseMonthData::getActivateNum).reduce(BigDecimal.ZERO, BigDecimal::add));
 
@@ -214,6 +216,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		IndexBaseMonthData convertStudentNumData = new IndexBaseMonthData();
 		convertStudentNumData.setMonth(currentMonth);
 		convertStudentNumData.setDataType(IndexDataType.STUDENT_CONVERSION_VIP_PRACTICE_STUDENT_NUM);
+		convertStudentNumData.setTitle(IndexDataType.STUDENT_CONVERSION_VIP_PRACTICE_STUDENT_NUM.getMsg());
 		convertStudentNumData.setTotalNum(convertStudentNum.stream().map(IndexBaseMonthData::getTotalNum).reduce(BigDecimal.ZERO, BigDecimal::add));
 		convertStudentNumData.setActivateNum(convertStudentNum.stream().map(IndexBaseMonthData::getActivateNum).reduce(BigDecimal.ZERO, BigDecimal::add));
 
@@ -242,6 +245,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		convertData.add(convertStudentNumData);
 		IndexBaseDto indexBaseData = new IndexBaseDto(IndexDataType.STUDENT_CONVERSION, IndexDataType.STUDENT_CONVERSION.getMsg());
 		indexBaseData.setIndexMonthData(convertData, currentMonth);
+		indexBaseData.setPercent(convertStudentNumData.getPercent());
 		result.add(indexBaseData);
 	}