|
@@ -9,6 +9,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
import com.ruoyi.common.utils.PDFUtil;
|
|
import com.ruoyi.common.utils.PDFUtil;
|
|
|
|
+import com.ruoyi.common.utils.StringUtils;
|
|
import com.ruoyi.system.domain.ProposalInfo;
|
|
import com.ruoyi.system.domain.ProposalInfo;
|
|
import com.ruoyi.system.domain.member.MemberInfo;
|
|
import com.ruoyi.system.domain.member.MemberInfo;
|
|
import com.ruoyi.system.domain.sqmy.SqmyInfo;
|
|
import com.ruoyi.system.domain.sqmy.SqmyInfo;
|
|
@@ -25,6 +26,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.text.DecimalFormat;
|
|
import java.text.DecimalFormat;
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -163,6 +165,7 @@ public class StatisticsServiceImpl implements IStatisticsService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public AjaxResult threeData() throws ParseException {
|
|
public AjaxResult threeData() throws ParseException {
|
|
|
|
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
//获取当前时间
|
|
//获取当前时间
|
|
String endTime = DateUtils.getTime();
|
|
String endTime = DateUtils.getTime();
|
|
@@ -213,9 +216,10 @@ public class StatisticsServiceImpl implements IStatisticsService {
|
|
taMap.put("percent", "0%");
|
|
taMap.put("percent", "0%");
|
|
if (proposalInfos != null && proposalInfos.size() > 0) {
|
|
if (proposalInfos != null && proposalInfos.size() > 0) {
|
|
for (ProposalInfo info : proposalInfos) {
|
|
for (ProposalInfo info : proposalInfos) {
|
|
- if (DateUtils.isEffectiveDate(String.valueOf(info.getCreateTime()), previousWeekMonday, previousWeekSunday)) {
|
|
|
|
|
|
+ String str = formatter.format(info.getCreateTime());
|
|
|
|
+ if (DateUtils.isEffectiveDate(str, previousWeekMonday, previousWeekSunday)) {
|
|
lastWeek++;
|
|
lastWeek++;
|
|
- } else if (DateUtils.isEffectiveDate(String.valueOf(info.getCreateTime()), thisWeekMonday, endTime)) {
|
|
|
|
|
|
+ } else if (DateUtils.isEffectiveDate(str, thisWeekMonday, endTime)) {
|
|
week++;
|
|
week++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -253,9 +257,10 @@ public class StatisticsServiceImpl implements IStatisticsService {
|
|
sqmyMap.put("percent", "0%");
|
|
sqmyMap.put("percent", "0%");
|
|
if (sqmyInfos != null && sqmyInfos.size() > 0) {
|
|
if (sqmyInfos != null && sqmyInfos.size() > 0) {
|
|
for (SqmyInfo info : sqmyInfos) {
|
|
for (SqmyInfo info : sqmyInfos) {
|
|
- if (DateUtils.isEffectiveDate(String.valueOf(info.getCreateTime()), lastStartMonth, lastEndtMonth)) {
|
|
|
|
|
|
+ String str = formatter.format(info.getCreateTime());
|
|
|
|
+ if (DateUtils.isEffectiveDate(str, lastStartMonth, lastEndtMonth)) {
|
|
lastMonth++;
|
|
lastMonth++;
|
|
- } else if (DateUtils.isEffectiveDate(String.valueOf(info.getCreateTime()), startMonth, endTime)) {
|
|
|
|
|
|
+ } else if (DateUtils.isEffectiveDate(str, startMonth, endTime)) {
|
|
month++;
|
|
month++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -275,6 +280,7 @@ public class StatisticsServiceImpl implements IStatisticsService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public AjaxResult weekData() throws ParseException {
|
|
public AjaxResult weekData() throws ParseException {
|
|
|
|
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
//获取当前时间
|
|
//获取当前时间
|
|
String endTime = DateUtils.getTime();
|
|
String endTime = DateUtils.getTime();
|
|
@@ -294,7 +300,8 @@ public class StatisticsServiceImpl implements IStatisticsService {
|
|
int num = 0;
|
|
int num = 0;
|
|
if (tbl) {
|
|
if (tbl) {
|
|
for (ProposalInfo info : proposalInfos) {
|
|
for (ProposalInfo info : proposalInfos) {
|
|
- if (String.valueOf(info.getCreateTime()).contains(weekList.get(i))) {
|
|
|
|
|
|
+ String str = formatter.format(info.getCreateTime());
|
|
|
|
+ if (str.contains(weekList.get(i))) {
|
|
num++;
|
|
num++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -313,7 +320,8 @@ public class StatisticsServiceImpl implements IStatisticsService {
|
|
int num = 0;
|
|
int num = 0;
|
|
if (sbl) {
|
|
if (sbl) {
|
|
for (SqmyInfo info : sqmyInfos) {
|
|
for (SqmyInfo info : sqmyInfos) {
|
|
- if (String.valueOf(info.getCreateTime()).contains(weekList.get(i))) {
|
|
|
|
|
|
+ String str = formatter.format(info.getCreateTime());
|
|
|
|
+ if (str.contains(weekList.get(i))) {
|
|
num++;
|
|
num++;
|
|
}
|
|
}
|
|
}
|
|
}
|