| | |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IEvaluationService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.StoreConfigService; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | @Autowired |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private IRegionService regionService; |
| | | @Autowired |
| | | private FinanceClient financeClient; |
| | | @Autowired |
| | | private CancelledClassesClient cancelledClassesClient; |
| | |
| | | */ |
| | | @RequestMapping("/rechargeRecords") |
| | | public String index(Model model) { |
| | | |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | model.addAttribute("userType",objectType); |
| | | // 去重 |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("objectType",objectType); |
| | | return PREFIX + "RechargeRecords.html"; |
| | |
| | | @ResponseBody |
| | | public List<RechargeRecordsVO> list(String province, String city, String name, String phone,String time,Integer type) { |
| | | RechargeRecordsQuery coachQuery = new RechargeRecordsQuery(); |
| | | Region provinceCode = regionService.getOne(new QueryWrapper<Region>().eq("code", province)); |
| | | Region cityCode = regionService.getOne(new QueryWrapper<Region>().eq("code", city)); |
| | | if (provinceCode!=null){ |
| | | coachQuery.setProvince(provinceCode.getName()); |
| | | }else{ |
| | | coachQuery.setProvince(province); |
| | | } |
| | | if (cityCode!=null){ |
| | | coachQuery.setCity(cityCode.getName()); |
| | | }else{ |
| | | coachQuery.setCity(city); |
| | | } |
| | | coachQuery.setName(name); |
| | | |
| | | coachQuery.setPhone(phone); |
| | | coachQuery.setTime(time); |
| | | coachQuery.setType(type); |
| | |
| | | coachQuery.setType(type); |
| | | List<RechargeRecordsVO> rechargeRecordsVOS = financeClient.rechargeList(coachQuery); |
| | | BigDecimal total = new BigDecimal("0.00"); |
| | | BigDecimal result = new BigDecimal("0.00"); |
| | | for (RechargeRecordsVO rechargeRecordsVO : rechargeRecordsVOS) { |
| | | BigDecimal amount = rechargeRecordsVO.getAmount(); |
| | | total.add(amount); |
| | | total = total.add(amount); // 将新的值赋给total |
| | | result = result.add(amount); // 将新的值赋给result |
| | | } |
| | | return total; |
| | | } |