| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | |
| | |
| | | |
| | | @RequestMapping("/tTaxiCard_add") |
| | | public String tTaxiCardAdd(Model model){ |
| | | model.addAttribute("roleType",ShiroKit.getUser().getRoleType()); |
| | | model.addAttribute("roleType", ShiroExtUtil.getUser().getRoleType()); |
| | | return PREFIX + "tTaxiCard_add.html"; |
| | | } |
| | | |
| | |
| | | public String tTaxiCardEdit(@PathVariable Integer id, Model model){ |
| | | TTaxiCard tTaxiCard = taxiCardService.selectById(id); |
| | | model.addAttribute("viewIdentity","myself"); /// 查看角色--自己 |
| | | |
| | | model.addAttribute("item",tTaxiCard); |
| | | model.addAttribute("roleType",ShiroKit.getUser().getRoleType()); |
| | | |
| | | model.addAttribute("item", tTaxiCard); |
| | | model.addAttribute("roleType", ShiroExtUtil.getUser().getRoleType()); |
| | | return PREFIX + "tTaxiCard_edit.html"; |
| | | } |
| | | |
| | |
| | | @ResponseBody |
| | | public Object ttaxiCardList(String startTime, String endTime, Integer type, String nameStr){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<TTaxiCard>().eq("auditStatus",2) |
| | | .eq("companyId",ShiroKit.getUser().getObjectId()).orderBy("id",false); |
| | | Wrapper wrapper = new EntityWrapper<TTaxiCard>().eq("auditStatus", 2) |
| | | .eq("companyId", ShiroExtUtil.getUser().getObjectId()).orderBy("id", false); |
| | | |
| | | if (ToolUtil.isNotEmpty(startTime) && ToolUtil.isNotEmpty(endTime)){ |
| | | wrapper.between("createTime",startTime + " 00:00:00",endTime + " 23:59:59"); |
| | |
| | | @ResponseBody |
| | | public Object tTaxiCardAuditList(String startTime, String endTime, Integer type, String nameStr){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<TTaxiCard>().ne("companyId",ShiroKit.getUser().getObjectId()).orderBy("id",false); |
| | | Wrapper wrapper = new EntityWrapper<TTaxiCard>().ne("companyId", ShiroExtUtil.getUser().getObjectId()).orderBy("id", false); |
| | | |
| | | if (ToolUtil.isNotEmpty(startTime) && ToolUtil.isNotEmpty(endTime)){ |
| | | wrapper.between("createTime",startTime + " 00:00:00",endTime + " 23:59:59"); |
| | |
| | | @RequestMapping("/initSuitCity") |
| | | @ResponseBody |
| | | public Object initSuitCity(){ |
| | | List<TCompanyCity> list = companyCityService.selectList(new EntityWrapper<TCompanyCity>().eq("companyId",ShiroKit.getUser().getObjectId())); |
| | | List<TCompanyCity> list = companyCityService.selectList(new EntityWrapper<TCompanyCity>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | List<String> stringList = new ArrayList<>(); |
| | | for (TCompanyCity tCompanyCity : list) { |
| | | String area = ""; |
| | |
| | | |
| | | @RequestMapping("/add") |
| | | @ResponseBody |
| | | public Object add(TTaxiCard taxiCard){ |
| | | Integer companyId = ShiroKit.getUser().getObjectId(); |
| | | Integer createUserId = ShiroKit.getUser().getId(); |
| | | public Object add(TTaxiCard taxiCard) { |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer createUserId = ShiroExtUtil.getUser().getId(); |
| | | taxiCard.setCompanyId(companyId); |
| | | taxiCard.setCreateUserId(createUserId); |
| | | taxiCard.setState(2); |
| | | if (ShiroKit.getUser().getRoleType() == 1){ |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | taxiCard.setAuditStatus(2); |
| | | }else { |
| | | } else { |
| | | taxiCard.setAuditStatus(1); |
| | | } |
| | | taxiCard.setCreateTime(DateUtil.parseTime(DateUtil.getTime())); |
| | | |
| | | |
| | | String note = taxiCard.getNote(); |
| | | note = note.replaceAll("& lt;", "<").replaceAll("& gt;", ">"); |
| | | |
| | |
| | | @RequestMapping("/searchCoupons") |
| | | @ResponseBody |
| | | public Object searchCoupons(){ |
| | | Integer companyId = ShiroKit.getUser().getObjectId(); |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | return couponRecordService.selectList(new EntityWrapper<SysCouponRecord>().eq("companyId",companyId)); |
| | | } |
| | | |