| | |
| | | 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; |
| | | |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.ExcelUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.text.DateFormat; |
| | |
| | | |
| | | @Autowired |
| | | private ITRegionService regionService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITTaxiCardPaymentService taxiCardPaymentService; |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @RequestMapping("") |
| | | public String index(){ |
| | | public String index() { |
| | | return PREFIX + "tTaxiCard.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/audit") |
| | | public String audit(){ |
| | | public String audit() { |
| | | return PREFIX + "tTaxiCardAudit.html"; |
| | | } |
| | | |
| | |
| | | |
| | | @RequestMapping("/tTaxiCard_add") |
| | | public String tTaxiCardAdd(Model model){ |
| | | model.addAttribute("roleType", ShiroExtUtil.getUser().getRoleType()); |
| | | model.addAttribute("roleType", shiroExtUtil.getUser().getRoleType()); |
| | | return PREFIX + "tTaxiCard_add.html"; |
| | | } |
| | | |
| | |
| | | model.addAttribute("viewIdentity","myself"); /// 查看角色--自己 |
| | | |
| | | model.addAttribute("item", tTaxiCard); |
| | | model.addAttribute("roleType", ShiroExtUtil.getUser().getRoleType()); |
| | | model.addAttribute("roleType", shiroExtUtil.getUser().getRoleType()); |
| | | return PREFIX + "tTaxiCard_edit.html"; |
| | | } |
| | | |
| | |
| | | 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", ShiroExtUtil.getUser().getObjectId()).orderBy("id", false); |
| | | .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", ShiroExtUtil.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", ShiroExtUtil.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 = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer createUserId = ShiroExtUtil.getUser().getId(); |
| | | Integer companyId = shiroExtUtil.getUser().getObjectId(); |
| | | Integer createUserId = shiroExtUtil.getUser().getId(); |
| | | taxiCard.setCompanyId(companyId); |
| | | taxiCard.setCreateUserId(createUserId); |
| | | taxiCard.setState(2); |
| | | if (ShiroExtUtil.getUser().getRoleType() == 1) { |
| | | if (shiroExtUtil.getUser().getRoleType() == 1) { |
| | | taxiCard.setAuditStatus(2); |
| | | } else { |
| | | taxiCard.setAuditStatus(1); |
| | |
| | | @RequestMapping("/searchCoupons") |
| | | @ResponseBody |
| | | public Object searchCoupons(){ |
| | | Integer companyId = ShiroExtUtil.getUser().getObjectId(); |
| | | Integer companyId = shiroExtUtil.getUser().getObjectId(); |
| | | return couponRecordService.selectList(new EntityWrapper<SysCouponRecord>().eq("companyId",companyId)); |
| | | } |
| | | |