|
@@ -0,0 +1,42 @@
|
|
|
|
|
+package com.hzy.framework.web.service;
|
|
|
|
|
+
|
|
|
|
|
+import com.hzy.common.utils.DateUtils;
|
|
|
|
|
+import com.hzy.project.system.user.domain.User;
|
|
|
|
|
+import com.hzy.project.system.user.service.IUserService;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
|
+
|
|
|
|
|
+import java.text.ParseException;
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
+import java.util.Date;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * RuoYi首创 html调用 thymeleaf 实现字典读取
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author ruoyi
|
|
|
|
|
+ */
|
|
|
|
|
+@Service("common")
|
|
|
|
|
+public class CommonService
|
|
|
|
|
+{
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询用户数据信息
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return 参数键值
|
|
|
|
|
+ */
|
|
|
|
|
+ public List<String> getDurationList() throws ParseException {
|
|
|
|
|
+
|
|
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
|
|
+
|
|
|
|
|
+ Date start = DateUtils.parseDate("2025-10-01",DateUtils.YYYY_MM_DD);
|
|
|
|
|
+ Date end = DateUtils.getNowDate();
|
|
|
|
|
+
|
|
|
|
|
+ for (Date curr = start; curr.before(end); curr = DateUtils.addMonths(curr, 1)) {
|
|
|
|
|
+ list.add(DateUtils.parseDateToStr("yyyyMM", curr));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return list;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|