|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.math.BigDecimal; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  | import java.util.Optional; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * <p> | 
|---|
|  |  |  | 
|---|
|  |  |  | // 开始,结束时间 | 
|---|
|  |  |  | if(StringUtils.hasLength(businessTime)){ | 
|---|
|  |  |  | String[] split = businessTime.split(" - "); | 
|---|
|  |  |  | startTime = split[0]; | 
|---|
|  |  |  | endTime = split[1]; | 
|---|
|  |  |  | startTime = split[0] + " 00:00:00"; | 
|---|
|  |  |  | endTime = split[1] + " 23:59:59"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); | 
|---|
|  |  |  | Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void getDataStatisticsIncomeOrCommission(Integer agentId, String monthDate, Integer type, Model model) { | 
|---|
|  |  |  | public void getDataStatisticsIncomeOrCommission(Integer agentId, String monthDate, Integer type, Model model, Map<String, Object> map) { | 
|---|
|  |  |  | List<PerformanceTableResp> list = new ArrayList<>(); | 
|---|
|  |  |  | if(2 == type){ | 
|---|
|  |  |  | list = tRevenueMapper.getDataStatisticsIncomeOrCommission(agentId,1,monthDate); | 
|---|
|  |  |  | 
|---|
|  |  |  | list = tRevenueMapper.getDataStatisticsIncomeOrCommission(agentId,2,monthDate); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | model.addAttribute("performanceResp",list); | 
|---|
|  |  |  | map.put("performanceResp",list); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void getDataStatisticsIncomeOrCommissionByIds(List<Integer> ids, String monthDate, Integer type, Model model, Map<String, Object> map) { | 
|---|
|  |  |  | List<PerformanceTableResp> list = new ArrayList<>(); | 
|---|
|  |  |  | if(2 == type){ | 
|---|
|  |  |  | list = tRevenueMapper.getDataStatisticsIncomeOrCommissionByIds(ids,1,monthDate); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (3 == type){ | 
|---|
|  |  |  | list = tRevenueMapper.getDataStatisticsIncomeOrCommissionByIds(ids,2,monthDate); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | model.addAttribute("performanceResp",list); | 
|---|
|  |  |  | map.put("performanceResp",list); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|