|
|
@@ -21,6 +21,8 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.math.RoundingMode;
|
|
|
import java.text.DecimalFormat;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
@@ -75,7 +77,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
}
|
|
|
|
|
|
// 获取公司检查的某个收费站的受检次数和扣分合计
|
|
|
- List<FwqStatisticsBean> company_beans = getFeeStationCheckItemScore(obj);
|
|
|
+ List<FwqStatisticsBean> company_beans = getFeeStationCheckItemScore(obj);
|
|
|
// 获取第三方暗访稽查的某个服务区的受检次数和扣分合计
|
|
|
obj.setCheck_type(8);
|
|
|
List<FwqStatisticsBean> third_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
|
|
|
@@ -92,6 +94,9 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
for (FwqStatisticsBean third_bean : third_beans) {
|
|
|
mapStationInfos.get(third_bean.getDept_id()).setThird_check_num(third_bean.getChecked_num() > 1 ? 1 : third_bean.getChecked_num());
|
|
|
mapStationInfos.get(third_bean.getDept_id()).setThird_total_score(third_bean.getCheck_total_score());
|
|
|
+ // 2018年09月11日 处理第三方暗访的得分除以0.9
|
|
|
+ third_bean.setThird_total_score_handle(BigDecimal.valueOf(third_bean.getCheck_total_score()).divide(BigDecimal.valueOf(0.9), 2, RoundingMode.HALF_UP));
|
|
|
+ mapStationInfos.get(third_bean.getDept_id()).setThird_total_score_handle(third_bean.getThird_total_score_handle());
|
|
|
}
|
|
|
|
|
|
for (FwqStatisticsBean onsite_bean : onsite_beans) {
|
|
|
@@ -119,7 +124,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
value.setCheck_total_avg(df.format(avg));
|
|
|
// 设置平均得分
|
|
|
Float score_avg = (1000 - Float.valueOf(df.format(avg)));
|
|
|
- Float score_wxfw_avg = (1000-Float.valueOf(df.format(avgWxfw)));
|
|
|
+ Float score_wxfw_avg = (1000 - Float.valueOf(df.format(avgWxfw)));
|
|
|
value.setScore_avg(score_avg.toString());
|
|
|
value.setScore_wxfw_avg(score_wxfw_avg.toString());
|
|
|
}
|
|
|
@@ -159,7 +164,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- CheckTaskPeriod period = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
|
|
|
+ CheckTaskPeriod period = commonService.getCheckTaskPeriod(obj.getStart_date().getTime() + 1 * 1000 * 60 * 60, obj.getEnd_date().getTime() + 1 * 1000 * 60 * 60);
|
|
|
|
|
|
if (period != null) {
|
|
|
for (FwqStatisticsBean s : sortList) {
|
|
|
@@ -395,7 +400,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
}
|
|
|
|
|
|
if (obj.getStart_date() != null && obj.getEnd_date() != null) {
|
|
|
- CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
|
|
|
+ CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime() + 1 * 1000 * 60 * 60, obj.getEnd_date().getTime() + 1 * 1000 * 60 * 60);
|
|
|
if (p != null) {
|
|
|
obj.setPeriod_id(p.getId());
|
|
|
}
|
|
|
@@ -494,7 +499,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
Calendar cal2 = Calendar.getInstance();
|
|
|
cal2.setTime(obj.getEnd_date());
|
|
|
cal2.add(Calendar.MONTH, -1);
|
|
|
- CheckTaskPeriod lastTaskPeriod = commonService.getCheckTaskPeriod(cal.getTime().getTime()+1 * 1000 * 60 * 60, cal2.getTime().getTime()+1 * 1000 * 60 * 60);
|
|
|
+ CheckTaskPeriod lastTaskPeriod = commonService.getCheckTaskPeriod(cal.getTime().getTime() + 1 * 1000 * 60 * 60, cal2.getTime().getTime() + 1 * 1000 * 60 * 60);
|
|
|
if (lastTaskPeriod != null) {
|
|
|
FwqStatisticsBean temp = new FwqStatisticsBean();
|
|
|
temp.setStart_date(new Date(lastTaskPeriod.getStarttime().getTime() - 1 * 1000 * 60 * 60));
|
|
|
@@ -803,7 +808,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
}
|
|
|
|
|
|
if (obj.getStart_date() != null && obj.getEnd_date() != null) {
|
|
|
- CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
|
|
|
+ CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime() + 1 * 1000 * 60 * 60, obj.getEnd_date().getTime() + 1 * 1000 * 60 * 60);
|
|
|
if (p != null) {
|
|
|
obj.setPeriod_id(p.getId());
|
|
|
}
|