|
|
@@ -299,17 +299,21 @@ public class SalesReportServiceImpl extends BaseMybatisDao<DailySalesReportMappe
|
|
|
ReportDate rd = new ReportDate(new Date());
|
|
|
for (marketingESBo m : list) {
|
|
|
Map<String,Object> map=new HashMap<>();
|
|
|
- marketingESBo day=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getDailyStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getDailyEnd(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
+ marketingESBo day=null;
|
|
|
+ if(null!=m.getDepartmentId())day=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getDailyStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getDailyEnd(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
Map<String,String> daily =valuesloading(day);
|
|
|
daily.put("AVG", calculateAVG((null==day||null==day.getYearFollowNo())?"0":day.getYearFollowNo(),(null==day||null==day.getDepartmentNumber())?"0":day.getDepartmentNumber()));
|
|
|
map.put("daily", daily);
|
|
|
- marketingESBo weekly=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getWeeklyStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getWeeklyEnd(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
+ marketingESBo weekly=null;
|
|
|
+ if(null!=m.getDepartmentId())weekly=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getWeeklyStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getWeeklyEnd(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
Map<String,String> week =valuesloading(weekly);
|
|
|
map.put("week", week);
|
|
|
- marketingESBo month=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getMonthStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getMonthEnd(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
+ marketingESBo month=null;
|
|
|
+ if(null!=m.getDepartmentId())month=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getMonthStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getMonthEnd(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
Map<String,String> months =valuesloading(month);
|
|
|
map.put("months", months);
|
|
|
- marketingESBo year=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getYearStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getYearEnd(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
+ marketingESBo year=null;
|
|
|
+ if(null!=m.getDepartmentId())year=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getYearStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getYearEnd(), AFTConstants.YYYYMMDDHHMMSS));
|
|
|
Map<String,String> annual =valuesloading(year);
|
|
|
map.put("annual", annual);
|
|
|
m.setValues(map);
|