| | |
| | | public Object getDriverInfo(Integer driverId){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | TDriver tDriver = tDriverService.selectById(driverId); |
| | | TCar tCar = tCarService.selectById(tDriver.getCarId()); |
| | | // TCar tCar = tCarService.selectById(tDriver.getCarId()); |
| | | TCarBrand tCarBrand = null; |
| | | TCarModel tCarModel = null; |
| | | if(null != tCar){ |
| | | tCarBrand = carBrandService.selectById(tCar.getCarBrandId()); |
| | | tCarModel = carModelService.selectById(tCar.getCarModelId()); |
| | | } |
| | | // if(null != tCar){ |
| | | // tCarBrand = carBrandService.selectById(tCar.getCarBrandId()); |
| | | // tCarModel = carModelService.selectById(tCar.getCarModelId()); |
| | | // } |
| | | Integer[] states = new Integer[]{2, 3, 4, 5, 6, 11}; |
| | | Wrapper<TOrderTaxi> state4 = new EntityWrapper<TOrderTaxi>().in("state", states).eq("driverId", driverId).eq("isDelete", 1); |
| | | List<TOrderTaxi> tOrderTaxis = tOrderTaxiService.selectList(state4); |
| | | map.put("netcarDriver", tDriver); |
| | | map.put("netcar", tCar); |
| | | // map.put("netcar", tCar); |
| | | map.put("carBrand", null != tCarBrand ? tCarBrand.getName() : ""); |
| | | map.put("carModel", null != tCarModel ? tCarModel.getName() : ""); |
| | | map.put("order", tOrderTaxis); |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TAgentResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.enums.OrderStateEnum; |
| | | import com.stylefeng.guns.modular.system.enums.PayStatusEnum; |
| | | import com.stylefeng.guns.modular.system.enums.UserTypeEnum; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hdf.extractor.TC; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-20 09:18:08 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tAgent") |
| | | public class TAgentController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tAgent/"; |
| | | |
| | | @Autowired |
| | | private ITAgentService tAgentService; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tAgent.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tAgent_add") |
| | | public String tAgentAdd() { |
| | | return PREFIX + "tAgent_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tAgent_update/{tAgentId}") |
| | | public String tAgentUpdate(@PathVariable Integer tAgentId, Model model) { |
| | | TAgent tAgent = tAgentService.selectById(tAgentId); |
| | | model.addAttribute("item",tAgent); |
| | | LogObjectHolder.me().set(tAgent); |
| | | return PREFIX + "tAgent_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转详情页面 |
| | | */ |
| | | @RequestMapping("/agentDetail") |
| | | public String agentDetail(Integer agentId, Model model) { |
| | | tAgentService.detail(agentId,model); |
| | | return PREFIX + "tAgentDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转区域页面 |
| | | */ |
| | | @RequestMapping("/areaDetail") |
| | | public String areaDetail(Model model) { |
| | | List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("province",tRegions); |
| | | return PREFIX + "tAgentArea.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String principal,String principalPhone,String createTime) { |
| | | EntityWrapper<TAgent> wrapper = tAgentService.getAgentWrapper(principal,principalPhone,createTime); |
| | | List<TAgent> tAgents = tAgentService.selectList(wrapper); |
| | | // 代理商列表数据封装(导出共用) |
| | | return tAgentService.getAgentResp(tAgents); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tAgentService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TAgent tAgent) { |
| | | System.err.println(tAgent); |
| | | String[] split = tAgent.getAreaId().split("/"); |
| | | // 查询省市 |
| | | // 黑龙江省/大兴安岭地区 |
| | | // 702/852 |
| | | TRegion province = tRegionService.selectById(split[0]); |
| | | tAgent.setProvinceName(province.getName()); |
| | | tAgent.setProvinceCode(province.getCode()); |
| | | TRegion city = tRegionService.selectById(split[1]); |
| | | tAgent.setCityName(city.getName()); |
| | | tAgent.setCityCode(city.getCode()); |
| | | tAgentService.insert(tAgent); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tAgentId) { |
| | | tAgentService.deleteById(tAgentId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改用户状态 |
| | | */ |
| | | @RequestMapping(value = "/update-status") |
| | | @ResponseBody |
| | | public Object updateStatus(Integer id,Integer status) { |
| | | TAgent tAgent = tAgentService.selectById(id); |
| | | if(1 == status){ |
| | | tAgent.setStatus(2); |
| | | } |
| | | if(2 == status){ |
| | | tAgent.setStatus(1); |
| | | } |
| | | tAgentService.updateById(tAgent); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TAgent tAgent) { |
| | | tAgentService.updateById(tAgent); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tAgentId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tAgentId") Integer tAgentId) { |
| | | return tAgentService.selectById(tAgentId); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "省市区查询",notes="省市区查询") |
| | | @RequestMapping(value = "/area") |
| | | @ResponseBody |
| | | public Object area() { |
| | | return tRegionService.getAreaList(); |
| | | } |
| | | |
| | | @ApiOperation(value = "省查询",notes="省查询") |
| | | @RequestMapping(value = "/areaProvince") |
| | | @ResponseBody |
| | | public Object areaProvince(Model model) { |
| | | return tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | } |
| | | |
| | | @ApiOperation(value = "市区查询",notes="市区查询") |
| | | @RequestMapping(value = "/areaCity") |
| | | @ResponseBody |
| | | public Object areaCity(Integer parentId) { |
| | | return tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id",parentId)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "导出代理商列表",notes="导出代理商列表") |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String principal,String principalPhone,String createTime, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "Agent"+time1+".xls"; |
| | | String[] title = new String[] {"时间","姓名","联系电话","代理区域","订单数量", |
| | | "有效订单","已发放优惠券","已使用优惠券","累计优惠券金额","司机充值","司机数","状态"}; |
| | | EntityWrapper<TAgent> wrapper = tAgentService.getAgentWrapper(principal,principalPhone,createTime); |
| | | // 是否异常 |
| | | List<TAgent> list = tAgentService.selectList(wrapper); |
| | | |
| | | List<TAgentResp> agentResp = tAgentService.getAgentResp(list); |
| | | |
| | | String[][] values = new String[agentResp.size()][]; |
| | | for (int i = 0; i < agentResp.size(); i++) { |
| | | TAgentResp d = agentResp.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getPrincipal(); |
| | | values[i][2] = d.getPrincipalPhone(); |
| | | values[i][3] = d.getProvinceName()+d.getCityName(); |
| | | values[i][4] = String.valueOf(d.getOrderSum()); |
| | | values[i][5] = String.valueOf(d.getValidOrder()); |
| | | values[i][6] = String.valueOf(d.getIssuedCoupon()); |
| | | values[i][7] = String.valueOf(d.getUsedCoupon()); |
| | | values[i][8] = String.valueOf(d.getCouponPriceSum()); |
| | | values[i][9] = String.valueOf(d.getDriverRecharge() == null ? "0":d.getDriverRecharge()); |
| | | values[i][10] = String.valueOf(d.getDriverCount()); |
| | | Integer status1 = d.getStatus(); |
| | | if(1 == status1){ |
| | | values[i][11] = "正常"; |
| | | }else if(2 == status1){ |
| | | values[i][11] = "冻结"; |
| | | }else { |
| | | values[i][11] = "删除"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * 修改用户状态 |
| | | */ |
| | | @RequestMapping(value = "/update-status") |
| | | @ResponseBody |
| | |
| | | //清除相对应的司机关联车辆ID |
| | | List<TDriver> list = tDriverService.selectList(new EntityWrapper<TDriver>().eq("carId", tCarId)); |
| | | for (TDriver obj : list){ |
| | | obj.setCarId(null); |
| | | // obj.setCarId(null); |
| | | tDriverService.updateById(obj); |
| | | } |
| | | |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.*; |
| | | import com.stylefeng.guns.modular.system.dao.DriverPunishMapper; |
| | | import com.stylefeng.guns.modular.system.dao.DriverTrainMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-20 09:07:06 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/back-tDriver") |
| | | public class TDriverBackController extends BaseController { |
| | | |
| | | /*private String PREFIX = "/system/tDriver/"; |
| | | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | |
| | | @Autowired |
| | | private ITCompanyService tCompanyService; |
| | | |
| | | @Autowired |
| | | private ITDriverServiceService tDriverServiceService; |
| | | |
| | | @Autowired |
| | | private ITDriverLineService tDriverLineService; |
| | | |
| | | @Autowired |
| | | private ITLineService itLineService; |
| | | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | | |
| | | @Resource |
| | | private DriverTrainMapper driverTrainMapper; |
| | | |
| | | @Resource |
| | | private DriverPunishMapper driverPunishMapper; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | |
| | | |
| | | *//** |
| | | * 跳转到司机审核列表首页 |
| | | *//* |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tDriver.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 跳转到审核通过司机首页 |
| | | *//* |
| | | @RequestMapping("/yesDriver") |
| | | public String yesDriver() { |
| | | return PREFIX + "yesDriver.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 跳转到添加司机 |
| | | *//* |
| | | @RequestMapping("/tDriver_add") |
| | | public String tDriverAdd(Model model) { |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | model.addAttribute("roleType",roleType); |
| | | if (2 == roleType){ |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>() |
| | | .eq("type", 3) |
| | | .eq("superiorId",ShiroKit.getUser().getObjectId()) |
| | | .notIn("state",1) |
| | | .notIn("flag",3)); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else{ |
| | | model.addAttribute("franchiseeList",null); |
| | | } |
| | | //查询当前用户所属分公司/加盟商 |
| | | model.addAttribute("objectName",tCompanyService.selectById(ShiroKit.getUser().getObjectId()).getName()); |
| | | |
| | | //查询线路列表 |
| | | List<TLine> lineList = itLineService.selectList(new EntityWrapper<TLine>().eq("state", 1)); |
| | | model.addAttribute("lineList",lineList); |
| | | return PREFIX + "tDriver_add.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 跳转到修改审核司机 |
| | | *//* |
| | | @RequestMapping("/tDriver_immediately/{tDriverId}") |
| | | public String tDriver_immediately(@PathVariable Integer tDriverId, Model model) { |
| | | Map<String, Object> tDriver = tDriverService.getDriverById(tDriverId); |
| | | model.addAttribute("item",tDriver); |
| | | LogObjectHolder.me().set(tDriver); |
| | | return PREFIX + "tDriver_immediately.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 跳转到选择车辆页面 |
| | | *//* |
| | | @RequestMapping("/tDriver_changeCar/{tDriverId}") |
| | | public String tDriver_changeCar(@PathVariable Integer tDriverId, Model model) { |
| | | model.addAttribute("tDriverId",tDriverId); |
| | | return PREFIX + "tDriver_changeCar.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 跳转到冻结/解冻司机页面 |
| | | *//* |
| | | @RequestMapping("/tDriver_optDriver/{tDriverId}/{optType}") |
| | | public String tDriver_optDriver(@PathVariable Integer tDriverId,@PathVariable Integer optType, Model model) { |
| | | model.addAttribute("tDriverId",tDriverId); |
| | | model.addAttribute("optType",optType); |
| | | return PREFIX + "tDriver_optDriver.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 跳转到查看司机详情 |
| | | *//* |
| | | @RequestMapping("/tDriver_look/{tDriverId}") |
| | | public String tDriver_look(@PathVariable Integer tDriverId, Model model) { |
| | | Map<String, Object> tDriver = tDriverService.getDriverById(tDriverId); |
| | | model.addAttribute("item",tDriver); |
| | | LogObjectHolder.me().set(tDriver); |
| | | return PREFIX + "tDriver_look.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 跳转到修改司机 |
| | | *//* |
| | | @RequestMapping("/tDriver_update/{tDriverId}") |
| | | public String tDriverUpdate(@PathVariable Integer tDriverId, Model model) { |
| | | TDriver tDriver = tDriverService.selectById(tDriverId); |
| | | model.addAttribute("item",tDriver); |
| | | LogObjectHolder.me().set(tDriver); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | model.addAttribute("roleType",roleType); |
| | | model.addAttribute("objectName",tCompanyService.selectById(ShiroKit.getUser().getObjectId()).getName()); |
| | | |
| | | if (1 == roleType){ |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",tDriver.getCompanyId())); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else if (2 == roleType){ |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | } |
| | | |
| | | //查询平台ID |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1)); |
| | | //判断是平台司机还是加盟司机 |
| | | if ((SinataUtil.isEmpty(tDriver.getCompanyId()) || tDriver.getCompanyId() == 0 || tDriver.getCompanyId() == company.getId()) && (SinataUtil.isEmpty(tDriver.getFranchiseeId()) || tDriver.getFranchiseeId() == 0)){ |
| | | model.addAttribute("companyType",1); |
| | | }else{ |
| | | model.addAttribute("companyType",2); |
| | | } |
| | | |
| | | //获取经营业务 |
| | | List<TDriverService> serviceList = tDriverServiceService.selectList(new EntityWrapper<TDriverService>().eq("driverId", tDriverId)); |
| | | Integer one = 1; |
| | | Integer two = 1; |
| | | Integer three = 1; |
| | | Integer four = 1; |
| | | Integer five = 1; |
| | | Integer six = 1; |
| | | for (TDriverService obj : serviceList){ |
| | | if (obj.getType() == 1){ |
| | | one = 2; |
| | | } |
| | | if (obj.getType() == 2){ |
| | | two = 2; |
| | | } |
| | | if (obj.getType() == 3){ |
| | | three = 2; |
| | | } |
| | | if (obj.getType() == 4){ |
| | | four = 2; |
| | | } |
| | | if (obj.getType() == 5){ |
| | | five = 2; |
| | | } |
| | | if (obj.getType() == 6){ |
| | | six = 2; |
| | | } |
| | | } |
| | | model.addAttribute("one",one); |
| | | model.addAttribute("two",two); |
| | | model.addAttribute("three",three); |
| | | model.addAttribute("four",four); |
| | | model.addAttribute("five",five); |
| | | model.addAttribute("six",six); |
| | | |
| | | //查询线路列表 |
| | | List<TLine> lineList = itLineService.selectList(new EntityWrapper<TLine>().eq("state", 1)); |
| | | model.addAttribute("lineList",lineList); |
| | | //查询驾驶员已添加的线路列表 |
| | | List<Map<String, Object>> driverLineList = tDriverLineService.getDriverLineListByDriverId(tDriverId); |
| | | model.addAttribute("driverLineList",driverLineList); |
| | | return PREFIX + "tDriver_edit.html"; |
| | | } |
| | | |
| | | *//** |
| | | * 跳转到添加培训页 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | *//* |
| | | @RequestMapping("/showTraining") |
| | | public String showTraining(Integer id, Model model){ |
| | | model.addAttribute("id", id); |
| | | return PREFIX + "training.html"; |
| | | } |
| | | |
| | | |
| | | *//** |
| | | * 保存培训数据 |
| | | * @param train |
| | | * @param driverId |
| | | * @return |
| | | *//* |
| | | @ResponseBody |
| | | @RequestMapping(value = "/saveTrain", method = RequestMethod.POST) |
| | | public ResultUtil saveTrain(String train, Integer driverId){ |
| | | if(ToolUtil.isEmpty(train)){ |
| | | return ResultUtil.error("请添加有效的培训记录"); |
| | | } |
| | | String[] split = train.split(","); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | List<DriverTrain> update = new ArrayList<>(); |
| | | List<DriverTrain> add = new ArrayList<>(); |
| | | for(String s : split){ |
| | | String[] s1 = s.split("_"); |
| | | if(ToolUtil.isNotEmpty(s1[0])){//修改 |
| | | DriverTrain driverTrain = driverTrainMapper.selectById(s1[0]); |
| | | driverTrain.setDriverId(driverId); |
| | | driverTrain.setCourseName(s1[1]); |
| | | driverTrain.setCourseDate(sdf.parse(s1[2])); |
| | | driverTrain.setStartTime(s1[3]); |
| | | driverTrain.setStopTime(s1[4]); |
| | | driverTrain.setDuration(Integer.valueOf(s1[5])); |
| | | update.add(driverTrain); |
| | | }else{//添加 |
| | | DriverTrain driverTrain = new DriverTrain(); |
| | | driverTrain.setDriverId(driverId); |
| | | driverTrain.setCourseName(s1[1]); |
| | | driverTrain.setCourseDate(sdf.parse(s1[2])); |
| | | driverTrain.setStartTime(s1[3]); |
| | | driverTrain.setStopTime(s1[4]); |
| | | driverTrain.setDuration(Integer.valueOf(s1[5])); |
| | | add.add(driverTrain); |
| | | } |
| | | } |
| | | List<DriverTrain> driverTrains = driverTrainMapper.queryAllTrain(driverId); |
| | | for(DriverTrain driverTrain : driverTrains){ |
| | | boolean b = true; |
| | | for(String s : split){ |
| | | String[] s1 = s.split("_"); |
| | | if(ToolUtil.isNotEmpty(s1[0]) && driverTrain.getId() == Integer.valueOf(s1[0])){ |
| | | b = false; |
| | | break; |
| | | } |
| | | } |
| | | if(b){ |
| | | driverTrainMapper.deleteById(driverTrain.getId()); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoDriverEducate(driverTrain.getId(), 3); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | } |
| | | if(update.size() > 0){ |
| | | for(DriverTrain driverTrain : update){ |
| | | driverTrainMapper.updateById(driverTrain); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoDriverEducate(driverTrain.getId(), 2); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | } |
| | | if(add.size() > 0){ |
| | | for(DriverTrain driverTrain : add){ |
| | | driverTrainMapper.insert(driverTrain); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoDriverEducate(driverTrain.getId(), 1); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | } |
| | | |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | *//** |
| | | * 获取司机的所有培训数据 |
| | | * @param driverId |
| | | * @return |
| | | *//* |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryAllTrain", method = RequestMethod.POST) |
| | | public ResultUtil queryAllTrain(Integer driverId){ |
| | | List<DriverTrain> driverTrains = driverTrainMapper.queryAllTrain(driverId); |
| | | return ResultUtil.success(driverTrains); |
| | | } |
| | | |
| | | |
| | | *//** |
| | | * 跳转到处罚页 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | *//* |
| | | @RequestMapping("/showPunish") |
| | | public String showPunish(Integer id, Model model){ |
| | | model.addAttribute("id", id); |
| | | return PREFIX + "punish.html"; |
| | | } |
| | | |
| | | |
| | | *//** |
| | | * 保存处罚数据 |
| | | * @param punish |
| | | * @param driverId |
| | | * @return |
| | | *//* |
| | | @ResponseBody |
| | | @RequestMapping(value = "/savePunish", method = RequestMethod.POST) |
| | | public ResultUtil savePunish(String punish, Integer driverId){ |
| | | if(ToolUtil.isEmpty(punish)){ |
| | | return ResultUtil.error("请添加有效的培训记录"); |
| | | } |
| | | String[] split = punish.split(","); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | List<DriverPunish> update = new ArrayList<>(); |
| | | List<DriverPunish> add = new ArrayList<>(); |
| | | for(String s : split){ |
| | | String[] s1 = s.split("_"); |
| | | if(ToolUtil.isNotEmpty(s1[0])){//修改 |
| | | DriverPunish driverPunish = driverPunishMapper.selectById(s1[0]); |
| | | driverPunish.setDriverId(driverId); |
| | | driverPunish.setPunishTime(sdf.parse(s1[1])); |
| | | driverPunish.setPunishReason(s1[2]); |
| | | driverPunish.setPunishReault(s1[3]); |
| | | update.add(driverPunish); |
| | | }else{//添加 |
| | | DriverPunish driverPunish = new DriverPunish(); |
| | | driverPunish.setDriverId(driverId); |
| | | driverPunish.setPunishTime(sdf.parse(s1[1])); |
| | | driverPunish.setPunishReason(s1[2]); |
| | | driverPunish.setPunishReault(s1[3]); |
| | | add.add(driverPunish); |
| | | } |
| | | } |
| | | List<DriverPunish> driverPunishes = driverPunishMapper.queryAllPunish(driverId); |
| | | for(DriverPunish driverTrain : driverPunishes){ |
| | | boolean b = true; |
| | | for(String s : split){ |
| | | String[] s1 = s.split("_"); |
| | | if(ToolUtil.isNotEmpty(s1[0]) && driverTrain.getId() == Integer.valueOf(s1[0])){ |
| | | b = false; |
| | | break; |
| | | } |
| | | } |
| | | if(b){ |
| | | driverTrainMapper.deleteById(driverTrain.getId()); |
| | | } |
| | | } |
| | | if(update.size() > 0){ |
| | | for(DriverPunish driverTrain : update){ |
| | | driverPunishMapper.updateById(driverTrain); |
| | | } |
| | | } |
| | | if(add.size() > 0){ |
| | | for(DriverPunish driverTrain : add){ |
| | | driverPunishMapper.insert(driverTrain); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.ratedDriverPunish(driverTrain.getId()); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | } |
| | | |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | *//** |
| | | * 获取所有处罚数据 |
| | | * @param driverId |
| | | * @return |
| | | *//* |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryAllPunish", method = RequestMethod.POST) |
| | | public ResultUtil queryAllPunish(Integer driverId){ |
| | | List<DriverPunish> driverPunishes = driverPunishMapper.queryAllPunish(driverId); |
| | | return ResultUtil.success(driverPunishes); |
| | | } |
| | | |
| | | |
| | | *//** |
| | | * 根据分公司ID获取加盟商 |
| | | * @param oneId |
| | | * @return |
| | | *//* |
| | | @RequestMapping(value = "/oneChange") |
| | | @ResponseBody |
| | | public Object oneChange(@RequestParam Integer oneId) { |
| | | List<TCompany> list = new ArrayList<>(); |
| | | if (SinataUtil.isNotEmpty(oneId)){ |
| | | list = tCompanyService.selectList(new EntityWrapper<TCompany>() |
| | | .eq("type", 3) |
| | | .eq("superiorId", oneId) |
| | | .notIn("flag",3) |
| | | .notIn("state",1)); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | *//** |
| | | * 获取司机审核列表列表 |
| | | *//* |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String companyName, |
| | | String phone, |
| | | String account, |
| | | Integer addType, |
| | | Integer authState) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tDriverService.getAuthDriverList(page,beginTime,endTime,companyName,phone,account,addType,authState)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | *//** |
| | | * 获取审核通过的司机列表 |
| | | *//* |
| | | @RequestMapping(value = "/listYesDriver") |
| | | @ResponseBody |
| | | public Object listYesDriver(String insertTime, |
| | | String companyName, |
| | | String phone, |
| | | String name, |
| | | Integer addType, |
| | | Integer authState) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tDriverService.getDriverList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,companyName,phone,name,addType,authState)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | *//** |
| | | * 获取可被选择的车辆列表 |
| | | *//* |
| | | @RequestMapping(value = "/selectCarList/{tDriverId}") |
| | | @ResponseBody |
| | | public Object selectCarList(@PathVariable Integer tDriverId, |
| | | String carLicensePlate, |
| | | String brandName, |
| | | String modelName, |
| | | String color, |
| | | String serverStr) { |
| | | TDriver driver = tDriverService.selectById(tDriverId); |
| | | *//*String useCarIdStr = null; |
| | | //查询已被使用的车辆ID |
| | | if (SinataUtil.isNotEmpty(driver.getCarId())){ |
| | | useCarIdStr = tDriverService.getUseCarIdStr(driver.getCarId()); |
| | | }else{ |
| | | useCarIdStr = tDriverService.getUseCarIdStr(null); |
| | | }*//* |
| | | //2020-08-21:新需求,已被绑定的车辆可以被继续绑定 |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tDriverService.getCanSelectCarList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),null,carLicensePlate,brandName,modelName,color,serverStr)); |
| | | return super.packForBT(page); |
| | | |
| | | } |
| | | |
| | | *//** |
| | | * 审核操作 1=通过 2=不通过 |
| | | *//* |
| | | @RequestMapping(value = "/authOpt") |
| | | @ResponseBody |
| | | public Object authOpt(Integer id,Integer authState) { |
| | | if (SinataUtil.isNotEmpty(id) && SinataUtil.isNotEmpty(authState)){ |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | Integer type = 0; |
| | | if (1 == authState){ |
| | | type = 5; |
| | | tDriver.setAuthState(2); |
| | | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoCompanyStat(); |
| | | pushMinistryOfTransportUtil.baseInfoDriver(id); |
| | | pushMinistryOfTransportUtil.baseInfoDriverApp(id); |
| | | } |
| | | } |
| | | }).start(); |
| | | }else{ |
| | | type = 6; |
| | | tDriver.setAuthState(4); |
| | | } |
| | | |
| | | Map<String,String> map = new HashMap<>(); |
| | | map.put("uid", String.valueOf(tDriver.getId())); |
| | | map.put("type", String.valueOf(type)); |
| | | String result = HttpRequestUtil.postRequest(PushURL.driver_auth_url, map); |
| | | System.out.println("司机注册审核发送短信 :【driverId="+tDriver.getId().toString()+"】,调用接口:"+result); |
| | | |
| | | tDriverService.updateById(tDriver); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 更换车辆操作 |
| | | *//* |
| | | @RequestMapping(value = "/selectCarOpt") |
| | | @ResponseBody |
| | | public Object selectCarOpt(Integer tDriverId,Integer carId) { |
| | | if (SinataUtil.isNotEmpty(tDriverId) && SinataUtil.isNotEmpty(carId)){ |
| | | TDriver tDriver = tDriverService.selectById(tDriverId); |
| | | tDriver.setCarId(carId); |
| | | tDriverService.updateById(tDriver); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 新增司机审核列表 |
| | | *//* |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TDriver tDriver,@RequestParam String serverBox,@RequestParam String lineStr,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId) { |
| | | //判断登录账户是否重复 |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", tDriver.getPhone()).in("authState", "1,2,3").ne("flag", 3)); |
| | | if (count > 0){ |
| | | return "error"; |
| | | } |
| | | if (1 == roleType){ //平台 |
| | | if (2 == companyType.intValue()){ |
| | | if (SinataUtil.isNotEmpty(oneId)){ |
| | | tDriver.setCompanyId(oneId); |
| | | } |
| | | if (SinataUtil.isNotEmpty(twoId)){ |
| | | tDriver.setFranchiseeId(twoId); |
| | | } |
| | | }else if (1 == companyType.intValue()){ |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1)); |
| | | tDriver.setCompanyId(company.getId()); |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | | } |
| | | tDriver.setAddType(2); |
| | | tDriver.setIsPlatCar(1); |
| | | tDriver.setAuthState(2); |
| | | }else if (2 == roleType){ //分公司 |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tDriver.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(franchiseeId)){ |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | | } |
| | | tDriver.setAddType(3); |
| | | tDriver.setIsPlatCar(2); |
| | | tDriver.setAuthState(1); |
| | | tDriver.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | }else if (3 == roleType){ //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(tCompany)){ |
| | | tDriver.setCompanyId(tCompany.getSuperiorId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tDriver.setFranchiseeId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | tDriver.setAddType(4); |
| | | tDriver.setIsPlatCar(2); |
| | | tDriver.setAuthState(1); |
| | | tDriver.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | tDriver.setInsertTime(new Date()); |
| | | tDriver.setInsertUser(ShiroKit.getUser().getId()); |
| | | // tDriver.setPassword(MD5Util.encrypt(tDriver.getPassword())); |
| | | |
| | | tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#")); |
| | | |
| | | tDriverService.insert(tDriver); |
| | | |
| | | //添加经营业务 |
| | | String[] serverArray = serverBox.split(","); |
| | | for (int i=0;i<serverArray.length;i++){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(tDriver.getId()); |
| | | service.setType(Integer.valueOf(serverArray[i])); |
| | | tDriverServiceService.insert(service); |
| | | |
| | | if (3 == Integer.valueOf(serverArray[i])){ |
| | | //添加线路 |
| | | if (SinataUtil.isNotEmpty(lineStr)){ |
| | | addLine(lineStr,tDriver.getId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 添加线路 |
| | | * @param subArr |
| | | * @param id |
| | | *//* |
| | | public void addLine(String subArr,Integer id){ |
| | | JSONArray jsonArray = JSON.parseArray(subArr); |
| | | int size = jsonArray.size(); |
| | | for (int i = 0; i < size; i++){ |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | TDriverLine line = new TDriverLine(); |
| | | line.setCreateTime(new Date()); |
| | | line.setAddTime(jsonObject.getString("time")); |
| | | line.setLineId(jsonObject.getInteger("lineId")); |
| | | line.setDriverId(id); |
| | | tDriverLineService.insert(line); |
| | | } |
| | | } |
| | | |
| | | |
| | | *//** |
| | | * 删除司机审核列表 |
| | | *//* |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tDriverId) { |
| | | TDriver driver = tDriverService.selectById(tDriverId); |
| | | driver.setFlag("3"); |
| | | tDriverService.updateById(driver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | *//** |
| | | * 操作司机状态 |
| | | *//* |
| | | @RequestMapping(value = "/optDriver") |
| | | @ResponseBody |
| | | public Object optDriver(@RequestParam Integer driverId,@RequestParam String remark,@RequestParam Integer optType) { |
| | | if (SinataUtil.isNotEmpty(driverId) && SinataUtil.isNotEmpty(optType)){ |
| | | TDriver tDriver = tDriverService.selectById(driverId); |
| | | if (1 == optType){ //解冻 |
| | | tDriver.setAuthState(2); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoCompanyStat(); |
| | | pushMinistryOfTransportUtil.baseInfoDriver(driverId); |
| | | } |
| | | } |
| | | }).start(); |
| | | }else if (2 == optType){ //冻结 |
| | | tDriver.setAuthState(3); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoCompanyStat(); |
| | | pushMinistryOfTransportUtil.baseInfoDriver(driverId); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | tDriver.setRemark(remark); |
| | | tDriverService.updateById(tDriver); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 修改司机审核列表 |
| | | *//* |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TDriver tDriver,@RequestParam String serverBox,@RequestParam String lineStr,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId) { |
| | | TDriver obj = tDriverService.selectById(tDriver.getId()); |
| | | if (!obj.getPhone().equals(tDriver.getPhone())){ |
| | | //判断登录账户是否重复 |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", tDriver.getPhone()).in("authState", "1,2,3")); |
| | | if (count > 0){ |
| | | return "error"; |
| | | } |
| | | } |
| | | if (1 == roleType){ //平台 |
| | | if (2 == companyType.intValue()){ |
| | | if (SinataUtil.isNotEmpty(oneId)){ |
| | | tDriver.setCompanyId(oneId); |
| | | } |
| | | if (SinataUtil.isNotEmpty(twoId)){ |
| | | tDriver.setFranchiseeId(twoId); |
| | | } |
| | | }else if (1 == companyType.intValue()){ |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1)); |
| | | tDriver.setCompanyId(company.getId()); |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | | } |
| | | }else if (2 == roleType){ //分公司 |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tDriver.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(franchiseeId)){ |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | | } |
| | | }else if (3 == roleType){ //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(tCompany)){ |
| | | tDriver.setCompanyId(tCompany.getSuperiorId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tDriver.setFranchiseeId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | } |
| | | tDriver.setUpdateTime(new Date()); |
| | | tDriver.setUpdateUser(ShiroKit.getUser().getId()); |
| | | // tDriver.setPassword(MD5Util.encrypt(tDriver.getPassword())); |
| | | tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#")); |
| | | tDriverService.updateById(tDriver); |
| | | |
| | | //删除业务 |
| | | tDriverServiceService.delete(new EntityWrapper<TDriverService>().eq("driverId",tDriver.getId())); |
| | | |
| | | //删除线路 |
| | | tDriverLineService.delete(new EntityWrapper<TDriverLine>().eq("driverId",tDriver.getId())); |
| | | |
| | | //添加经营业务 |
| | | String[] serverArray = serverBox.split(","); |
| | | for (int i=0;i<serverArray.length;i++){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(tDriver.getId()); |
| | | service.setType(Integer.valueOf(serverArray[i])); |
| | | tDriverServiceService.insert(service); |
| | | |
| | | if (3 == Integer.valueOf(serverArray[i])){ |
| | | //添加线路 |
| | | if (SinataUtil.isNotEmpty(lineStr)){ |
| | | addLine(lineStr,tDriver.getId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoDriver(tDriver.getId()); |
| | | } |
| | | } |
| | | }).start(); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | *//** |
| | | * 下载模板 |
| | | * @param request |
| | | * @param response |
| | | *//* |
| | | @RequestMapping(value = "/uploadDriverModel") |
| | | public void uploadDriverModel(HttpServletRequest request, HttpServletResponse response) { |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<List<String>>(); |
| | | |
| | | String title = ""; |
| | | |
| | | // 首行【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | if (ShiroKit.getUser().getRoleType() == 1){ |
| | | title = "平台导入司机模板"; |
| | | |
| | | shellList.add("司机名称"); |
| | | shellList.add("所属机构[平台司机/加盟司机]"); |
| | | shellList.add("所属分公司[提示:加盟司机选填]"); |
| | | shellList.add("所属加盟商[提示:加盟司机选填]"); |
| | | shellList.add("性别[男/女]"); |
| | | shellList.add("驾驶证号码"); |
| | | shellList.add("驾龄"); |
| | | shellList.add("身份证号"); |
| | | shellList.add("居住地址"); |
| | | shellList.add("出租车资格证号"); |
| | | shellList.add("工号[选填]"); |
| | | shellList.add("经营业务:专车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | | shellList.add("经营业务:小件跨城物流[是/否]"); |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | }else if (ShiroKit.getUser().getRoleType() == 2){ |
| | | title = "分公司导入司机模板"; |
| | | |
| | | shellList.add("司机名称"); |
| | | shellList.add("所属加盟商[选填]"); |
| | | shellList.add("性别[男/女]"); |
| | | shellList.add("驾驶证号码"); |
| | | shellList.add("驾龄"); |
| | | shellList.add("身份证号"); |
| | | shellList.add("居住地址"); |
| | | shellList.add("出租车资格证号"); |
| | | shellList.add("工号[选填]"); |
| | | shellList.add("经营业务:专车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | | shellList.add("经营业务:小件跨城物流[是/否]"); |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | }else if (ShiroKit.getUser().getRoleType() == 3){ |
| | | title = "加盟商导入司机模板"; |
| | | |
| | | shellList.add("司机名称"); |
| | | shellList.add("性别[男/女]"); |
| | | shellList.add("驾驶证号码"); |
| | | shellList.add("驾龄"); |
| | | shellList.add("身份证号"); |
| | | shellList.add("居住地址"); |
| | | shellList.add("出租车资格证号"); |
| | | shellList.add("工号[选填]"); |
| | | shellList.add("经营业务:专车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | | shellList.add("经营业务:小件跨城物流[是/否]"); |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | } |
| | | dataList.add(shellList); |
| | | |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet(title+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), title, dataList, request, response); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | *//** |
| | | * 导入操作 |
| | | * @param request |
| | | * @return |
| | | *//* |
| | | @RequestMapping(value="/exportDriver",method = RequestMethod.POST) |
| | | @ResponseBody |
| | | public Object exportDriver(HttpServletRequest request){ |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile file = (MultipartFile) multipartRequest.getFile("myfile"); |
| | | try { |
| | | if (ShiroKit.getUser().getRoleType() == 1){ |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | | Row row = sh.getRow(i); |
| | | |
| | | Cell cell0 = row.getCell(0); //司机名称 |
| | | String zero = null; |
| | | if (SinataUtil.isNotEmpty(cell0)){ |
| | | zero = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell1 = row.getCell(1); //所属机构[平台司机/加盟司机] |
| | | String one = null; |
| | | if (SinataUtil.isNotEmpty(cell1)){ |
| | | one = String.valueOf(cell1.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell2 = row.getCell(2); //所属分公司[提示:加盟司机选填] |
| | | String two = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | two = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell3 = row.getCell(3); //所属加盟商[提示:加盟司机选填] |
| | | String three = null; |
| | | if (SinataUtil.isNotEmpty(cell3)){ |
| | | three = String.valueOf(cell3.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell4 = row.getCell(4); //性别[男/女] |
| | | String four = null; |
| | | if (SinataUtil.isNotEmpty(cell4)){ |
| | | four = String.valueOf(cell4.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell5 = row.getCell(5); //驾驶证号码 |
| | | String five = null; |
| | | if (SinataUtil.isNotEmpty(cell5)){ |
| | | five = String.valueOf(cell5.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell6 = row.getCell(6); //驾龄 |
| | | String six = null; |
| | | if (SinataUtil.isNotEmpty(cell6)){ |
| | | six = String.valueOf(cell6.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell7 = row.getCell(7); //身份证号 |
| | | String seven = null; |
| | | if (SinataUtil.isNotEmpty(cell7)){ |
| | | seven = String.valueOf(cell7.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell8 = row.getCell(8); //居住地址 |
| | | String eight = null; |
| | | if (SinataUtil.isNotEmpty(cell8)){ |
| | | eight = String.valueOf(cell8.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell9 = row.getCell(9); //出租车资格证号 |
| | | String nine = null; |
| | | if (SinataUtil.isNotEmpty(cell9)){ |
| | | nine = String.valueOf(cell9.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell10 = row.getCell(10); //工号[选填] |
| | | String ten = null; |
| | | if (SinataUtil.isNotEmpty(cell10)){ |
| | | ten = String.valueOf(cell10.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell11 = row.getCell(11); //经营业务:专车[是/否] |
| | | String eleven = null; |
| | | if (SinataUtil.isNotEmpty(cell11)){ |
| | | eleven = String.valueOf(cell11.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell12 = row.getCell(12); //经营业务:专车[是/否] |
| | | String twelve = null; |
| | | if (SinataUtil.isNotEmpty(cell12)){ |
| | | twelve = String.valueOf(cell12.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell13 = row.getCell(13); //经营业务:跨城出行[是/否] |
| | | String thirteen = null; |
| | | if (SinataUtil.isNotEmpty(cell13)){ |
| | | thirteen = String.valueOf(cell13.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell14 = row.getCell(14); //经营业务:小件同城物流[是/否] |
| | | String fourteen = null; |
| | | if (SinataUtil.isNotEmpty(cell14)){ |
| | | fourteen = String.valueOf(cell14.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell15 = row.getCell(15); //经营业务:小件跨城物流[是/否] |
| | | String fifteen = null; |
| | | if (SinataUtil.isNotEmpty(cell15)){ |
| | | fifteen = String.valueOf(cell15.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell16 = row.getCell(16); //经营业务:包车[是/否] |
| | | String sixteen = null; |
| | | if (SinataUtil.isNotEmpty(cell16)){ |
| | | sixteen = String.valueOf(cell16.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell17 = row.getCell(17); //登录账号[手机号] |
| | | String seventeen = null; |
| | | if (SinataUtil.isNotEmpty(cell17)){ |
| | | seventeen = String.valueOf(cell17.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell18 = row.getCell(18); //登录密码[密码长度为6-18] |
| | | String eighteen = null; |
| | | if (SinataUtil.isNotEmpty(cell18)){ |
| | | eighteen = String.valueOf(cell18.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(one) || SinataUtil.isEmpty(four) |
| | | || SinataUtil.isEmpty(five) || SinataUtil.isEmpty(six) || SinataUtil.isEmpty(nine) |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen) |
| | | || SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen) || SinataUtil.isEmpty(sixteen) |
| | | || SinataUtil.isEmpty(seventeen)|| SinataUtil.isEmpty(eighteen)){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | | //判断账号是否存在 |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", seventeen).in("authState", "1,2,3").ne("flag", 3)); |
| | | if (count > 0){ |
| | | continue; |
| | | } |
| | | |
| | | //判断所属机构 |
| | | if (!one.equals("平台司机") && !one.equals("加盟司机")){ |
| | | return new ErrorTip(500, "所属机构内容不正确"); |
| | | } |
| | | //判断性别 |
| | | if (!four.equals("男") && !four.equals("女")){ |
| | | return new ErrorTip(500, "性别内容不正确"); |
| | | } |
| | | //判断经营业务【专车】 |
| | | if (!eleven.equals("是") && !eleven.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【专车】内容不正确"); |
| | | } |
| | | //判断经营业务【出租车】 |
| | | if (!twelve.equals("是") && !twelve.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【出租车】内容不正确"); |
| | | } |
| | | //判断经营业务【跨城出行】 |
| | | if (!thirteen.equals("是") && !thirteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【跨城出行】内容不正确"); |
| | | } |
| | | //判断经营业务【小件同城物流】 |
| | | if (!fourteen.equals("是") && !fourteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件同城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【小件跨城物流】 |
| | | if (!fifteen.equals("是") && !fifteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件跨城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【包车】 |
| | | if (!sixteen.equals("是") && !sixteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【包车】内容不正确"); |
| | | } |
| | | //判断驾龄 |
| | | if (!isInteger(six)){ |
| | | return new ErrorTip(500, "驾龄格式不正确"); |
| | | } |
| | | //判断手机号 |
| | | if (!isPhone(seventeen)){ |
| | | return new ErrorTip(500, "登录账号[手机号]格式不正确"); |
| | | } |
| | | //判断登录密码 |
| | | if (!isPassword(eighteen)){ |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | |
| | | //查找平台公司 |
| | | TCompany platCompany = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1).notIn("flag", "3").last(" limit 1")); |
| | | Integer companyId = platCompany.getId(); |
| | | Integer franchiseeId = 0; |
| | | if ("加盟司机".equals(one)){ |
| | | //判断所属分公司是否存在 |
| | | if (SinataUtil.isNotEmpty(two)){ |
| | | TCompany company = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("name", two).eq("type", 2).notIn("flag", "3").last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(company)){ |
| | | companyId = company.getId(); |
| | | //判断加盟商是否存在 |
| | | if (SinataUtil.isNotEmpty(three)){ |
| | | TCompany franchisee = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("superiorId",company.getId()).eq("name", three).eq("type", 3).notIn("flag", "3").last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(franchisee)){ |
| | | franchiseeId = franchisee.getId(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | TDriver driver = new TDriver(); |
| | | driver.setAccount(seventeen); |
| | | driver.setJobNumber(ten); |
| | | driver.setPhone(seventeen); |
| | | driver.setPassword(ShiroKit.md5(eighteen, "SA;d5#")); |
| | | driver.setName(zero); |
| | | if ("男".equals(four)){ |
| | | driver.setSex(1); |
| | | }else if ("女".equals(four)){ |
| | | driver.setSex(2); |
| | | } |
| | | driver.setIdCard(seven); |
| | | driver.setDriverAge(Integer.valueOf(six)); |
| | | driver.setDriveCard(five); |
| | | driver.setTaxiAptitudeCard(nine); |
| | | if ("平台司机".equals(one)){ |
| | | driver.setIsPlatCar(1); |
| | | }else if ("加盟司机".equals(one)){ |
| | | driver.setIsPlatCar(2); |
| | | } |
| | | driver.setCompanyId(companyId); |
| | | driver.setFranchiseeId(franchiseeId); |
| | | driver.setState(2); |
| | | driver.setAuthState(2); |
| | | driver.setFlag("1"); |
| | | driver.setInsertUser(ShiroKit.getUser().getId()); |
| | | driver.setInsertTime(new Date()); |
| | | driver.setAddType(2); |
| | | driver.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | if(SinataUtil.isNotEmpty(eight)){ |
| | | driver.setDriverAddress(eight); |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | | |
| | | //添加专车服务模式 |
| | | if ("是".equals(eleven)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(1); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加出租车服务模式 |
| | | if ("是".equals(twelve)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(2); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加跨城出行服务模式 |
| | | if ("是".equals(thirteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(3); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件同城物流服务模式 |
| | | if ("是".equals(fourteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(4); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(fifteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加包车服务模式 |
| | | if ("是".equals(sixteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(6); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | } |
| | | } |
| | | }else if (ShiroKit.getUser().getRoleType() == 2){ |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | | Row row = sh.getRow(i); |
| | | |
| | | Cell cell0 = row.getCell(0); //司机名称 |
| | | String zero = null; |
| | | if (SinataUtil.isNotEmpty(cell0)){ |
| | | zero = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell1 = row.getCell(1); //所属加盟商[选填] |
| | | String one = null; |
| | | if (SinataUtil.isNotEmpty(cell1)){ |
| | | one = String.valueOf(cell1.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell2 = row.getCell(2); //性别[男/女] |
| | | String two = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | two = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell3 = row.getCell(3); //驾驶证号码 |
| | | String three = null; |
| | | if (SinataUtil.isNotEmpty(cell3)){ |
| | | three = String.valueOf(cell3.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell4 = row.getCell(4); //驾龄 |
| | | String four = null; |
| | | if (SinataUtil.isNotEmpty(cell4)){ |
| | | four = String.valueOf(cell4.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell5 = row.getCell(5); //身份证号 |
| | | String five = null; |
| | | if (SinataUtil.isNotEmpty(cell5)){ |
| | | five = String.valueOf(cell5.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell6 = row.getCell(6); //居住地址 |
| | | String six = null; |
| | | if (SinataUtil.isNotEmpty(cell6)){ |
| | | six = String.valueOf(cell6.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell7 = row.getCell(7); //出租车资格证号 |
| | | String seven = null; |
| | | if (SinataUtil.isNotEmpty(cell7)){ |
| | | seven = String.valueOf(cell7.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell8 = row.getCell(8); //工号[选填] |
| | | String eight = null; |
| | | if (SinataUtil.isNotEmpty(cell8)){ |
| | | eight = String.valueOf(cell8.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell9 = row.getCell(9); //经营业务:专车[是/否] |
| | | String nine = null; |
| | | if (SinataUtil.isNotEmpty(cell9)){ |
| | | nine = String.valueOf(cell9.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell10 = row.getCell(10); //经营业务:出租车[是/否] |
| | | String ten = null; |
| | | if (SinataUtil.isNotEmpty(cell10)){ |
| | | ten = String.valueOf(cell10.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell11 = row.getCell(11); //经营业务:跨城出行[是/否] |
| | | String eleven = null; |
| | | if (SinataUtil.isNotEmpty(cell11)){ |
| | | eleven = String.valueOf(cell11.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell12 = row.getCell(12); //经营业务:小件同城物流[是/否] |
| | | String twelve = null; |
| | | if (SinataUtil.isNotEmpty(cell12)){ |
| | | twelve = String.valueOf(cell12.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell13 = row.getCell(13); //经营业务:小件跨城物流[是/否] |
| | | String thirteen = null; |
| | | if (SinataUtil.isNotEmpty(cell13)){ |
| | | thirteen = String.valueOf(cell13.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell14 = row.getCell(14); //经营业务:包车[是/否] |
| | | String fourteen = null; |
| | | if (SinataUtil.isNotEmpty(cell14)){ |
| | | fourteen = String.valueOf(cell14.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell15 = row.getCell(15); //登录账号[手机号] |
| | | String fifteen = null; |
| | | if (SinataUtil.isNotEmpty(cell15)){ |
| | | fifteen = String.valueOf(cell15.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell16 = row.getCell(16); //登录密码[密码长度为6-18] |
| | | String sixteen = null; |
| | | if (SinataUtil.isNotEmpty(cell16)){ |
| | | sixteen = String.valueOf(cell16.getStringCellValue()).trim(); |
| | | } |
| | | if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(two) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four) |
| | | || SinataUtil.isEmpty(five) || SinataUtil.isEmpty(seven) |
| | | || SinataUtil.isEmpty(nine) || SinataUtil.isEmpty(ten) |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen) |
| | | || SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen) || SinataUtil.isEmpty(sixteen)){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | | //判断账号是否存在 |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", fifteen).in("authState", "1,2,3").ne("flag", 3)); |
| | | if (count > 0){ |
| | | continue; |
| | | } |
| | | //判断性别 |
| | | if (!two.equals("男") && !two.equals("女")){ |
| | | return new ErrorTip(500, "性别内容不正确"); |
| | | } |
| | | //判断经营业务【专车】 |
| | | if (!nine.equals("是") && !nine.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【专车】内容不正确"); |
| | | } |
| | | //判断经营业务【出租车】 |
| | | if (!ten.equals("是") && !ten.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【出租车】内容不正确"); |
| | | } |
| | | //判断经营业务【跨城出行】 |
| | | if (!eleven.equals("是") && !eleven.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【跨城出行】内容不正确"); |
| | | } |
| | | //判断经营业务【小件同城物流】 |
| | | if (!twelve.equals("是") && !twelve.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件同城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【小件跨城物流】 |
| | | if (!thirteen.equals("是") && !thirteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件跨城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【包车】 |
| | | if (!fourteen.equals("是") && !fourteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【包车】内容不正确"); |
| | | } |
| | | //判断驾龄 |
| | | if (!isInteger(four)){ |
| | | return new ErrorTip(500, "驾龄格式不正确"); |
| | | } |
| | | //判断手机号 |
| | | if (!isPhone(fifteen)){ |
| | | return new ErrorTip(500, "登录账号[手机号]格式不正确"); |
| | | } |
| | | //判断登录密码 |
| | | if (!isPassword(sixteen)){ |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | //查找平台公司 |
| | | Integer companyId = ShiroKit.getUser().getObjectId(); |
| | | Integer franchiseeId = 0; |
| | | //判断所属分公司是否存在 |
| | | if (SinataUtil.isNotEmpty(one)){ |
| | | TCompany franchisee = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("superiorId",companyId).eq("name", one).eq("type", 3).notIn("flag", "3").last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(franchisee)){ |
| | | franchiseeId = franchisee.getId(); |
| | | } |
| | | } |
| | | |
| | | TDriver driver = new TDriver(); |
| | | driver.setAccount(fifteen); |
| | | driver.setJobNumber(eight); |
| | | driver.setPhone(fifteen); |
| | | driver.setPassword(ShiroKit.md5(sixteen, "SA;d5#")); |
| | | driver.setName(zero); |
| | | if ("男".equals(two)){ |
| | | driver.setSex(1); |
| | | }else if ("女".equals(two)){ |
| | | driver.setSex(2); |
| | | } |
| | | driver.setIdCard(five); |
| | | driver.setDriverAge(Integer.valueOf(four)); |
| | | driver.setDriveCard(three); |
| | | driver.setTaxiAptitudeCard(seven); |
| | | driver.setIsPlatCar(2); |
| | | driver.setCompanyId(companyId); |
| | | driver.setFranchiseeId(franchiseeId); |
| | | driver.setState(1); |
| | | driver.setAuthState(1); |
| | | driver.setFlag("1"); |
| | | driver.setInsertUser(ShiroKit.getUser().getId()); |
| | | driver.setInsertTime(new Date()); |
| | | driver.setAddType(3); |
| | | driver.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(six)){ |
| | | driver.setDriverAddress(six); |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | | //添加专车服务模式 |
| | | if ("是".equals(nine)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(1); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加出租车服务模式 |
| | | if ("是".equals(ten)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(2); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加跨城出行服务模式 |
| | | if ("是".equals(eleven)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(3); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件同城物流服务模式 |
| | | if ("是".equals(twelve)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(4); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(thirteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加包车服务模式 |
| | | if ("是".equals(fourteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(6); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | |
| | | } |
| | | } |
| | | }else if (ShiroKit.getUser().getRoleType() == 3){ |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | | Row row = sh.getRow(i); |
| | | |
| | | Cell cell0 = row.getCell(0); //司机名称 |
| | | String zero = null; |
| | | if (SinataUtil.isNotEmpty(cell0)){ |
| | | zero = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell2 = row.getCell(1); //性别[男/女] |
| | | String one = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | one = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell3 = row.getCell(2); //驾驶证号码 |
| | | String two = null; |
| | | if (SinataUtil.isNotEmpty(cell3)){ |
| | | two = String.valueOf(cell3.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell4 = row.getCell(3); //驾龄 |
| | | String three = null; |
| | | if (SinataUtil.isNotEmpty(cell4)){ |
| | | three = String.valueOf(cell4.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell5 = row.getCell(4); //身份证号 |
| | | String four = null; |
| | | if (SinataUtil.isNotEmpty(cell5)){ |
| | | four = String.valueOf(cell5.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell6 = row.getCell(5); //居住地址 |
| | | String five = null; |
| | | if (SinataUtil.isNotEmpty(cell6)){ |
| | | five = String.valueOf(cell6.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell7 = row.getCell(6); //出租车资格证号 |
| | | String six = null; |
| | | if (SinataUtil.isNotEmpty(cell7)){ |
| | | six = String.valueOf(cell7.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell8 = row.getCell(7); //工号[选填] |
| | | String seven = null; |
| | | if (SinataUtil.isNotEmpty(cell8)){ |
| | | seven = String.valueOf(cell8.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell9 = row.getCell(8); //经营业务:专车[是/否] |
| | | String eight = null; |
| | | if (SinataUtil.isNotEmpty(cell9)){ |
| | | eight = String.valueOf(cell9.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell10 = row.getCell(9); //经营业务:出租车[是/否] |
| | | String nine = null; |
| | | if (SinataUtil.isNotEmpty(cell10)){ |
| | | nine = String.valueOf(cell10.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell11 = row.getCell(10); //经营业务:跨城出行[是/否] |
| | | String ten = null; |
| | | if (SinataUtil.isNotEmpty(cell11)){ |
| | | ten = String.valueOf(cell11.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell12 = row.getCell(11); //经营业务:小件同城物流[是/否] |
| | | String eleven = null; |
| | | if (SinataUtil.isNotEmpty(cell12)){ |
| | | eleven = String.valueOf(cell12.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell13 = row.getCell(12); //经营业务:小件跨城物流[是/否] |
| | | String twelve = null; |
| | | if (SinataUtil.isNotEmpty(cell13)){ |
| | | twelve = String.valueOf(cell13.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell14 = row.getCell(13); //经营业务:包车[是/否] |
| | | String thirteen = null; |
| | | if (SinataUtil.isNotEmpty(cell14)){ |
| | | thirteen = String.valueOf(cell14.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell15 = row.getCell(14); //登录账号[手机号] |
| | | String fourteen = null; |
| | | if (SinataUtil.isNotEmpty(cell15)){ |
| | | fourteen = String.valueOf(cell15.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell16 = row.getCell(15); //登录密码[密码长度为6-18] |
| | | String fifteen = null; |
| | | if (SinataUtil.isNotEmpty(cell16)){ |
| | | fifteen = String.valueOf(cell16.getStringCellValue()).trim(); |
| | | } |
| | | if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(one) || SinataUtil.isEmpty(two) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four) |
| | | || SinataUtil.isEmpty(six) || SinataUtil.isEmpty(eight) |
| | | || SinataUtil.isEmpty(nine) || SinataUtil.isEmpty(ten) |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen) |
| | | || SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen) ){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | | //判断账号是否存在 |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", fourteen).in("authState", "1,2,3").ne("flag", 3)); |
| | | if (count > 0){ |
| | | continue; |
| | | } |
| | | //判断性别 |
| | | if (!one.equals("男") && !one.equals("女")){ |
| | | return new ErrorTip(500, "性别内容不正确"); |
| | | } |
| | | //判断经营业务【专车】 |
| | | if (!eight.equals("是") && !eight.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【专车】内容不正确"); |
| | | } |
| | | //判断经营业务【出租车】 |
| | | if (!nine.equals("是") && !nine.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【出租车】内容不正确"); |
| | | } |
| | | //判断经营业务【跨城出行】 |
| | | if (!ten.equals("是") && !ten.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【跨城出行】内容不正确"); |
| | | } |
| | | //判断经营业务【小件同城物流】 |
| | | if (!eleven.equals("是") && !eleven.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件同城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【小件跨城物流】 |
| | | if (!twelve.equals("是") && !twelve.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件跨城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【包车】 |
| | | if (!thirteen.equals("是") && !thirteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【包车】内容不正确"); |
| | | } |
| | | //判断驾龄 |
| | | if (!isInteger(three)){ |
| | | return new ErrorTip(500, "驾龄格式不正确"); |
| | | } |
| | | //判断手机号 |
| | | if (!isPhone(fourteen)){ |
| | | return new ErrorTip(500, "登录账号[手机号]格式不正确"); |
| | | } |
| | | //判断登录密码 |
| | | if (!isPassword(fifteen)){ |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | //查找平台公司 |
| | | Integer companyId = 0; |
| | | Integer franchiseeId = 0; |
| | | TCompany franchisee = itCompanyService.selectById(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(franchisee)){ |
| | | companyId = franchisee.getSuperiorId(); |
| | | franchiseeId = franchisee.getId(); |
| | | } |
| | | if (companyId == 0 && franchiseeId == 0){ |
| | | return new ErrorTip(500, "当前登录账户上级分公司不能为空"); |
| | | } |
| | | |
| | | TDriver driver = new TDriver(); |
| | | driver.setAccount(fourteen); |
| | | driver.setJobNumber(seven); |
| | | driver.setPhone(fourteen); |
| | | driver.setPassword(ShiroKit.md5(fifteen, "SA;d5#")); |
| | | driver.setName(zero); |
| | | if ("男".equals(one)){ |
| | | driver.setSex(1); |
| | | }else if ("女".equals(one)){ |
| | | driver.setSex(2); |
| | | } |
| | | driver.setIdCard(four); |
| | | driver.setDriverAge(Integer.valueOf(three)); |
| | | driver.setDriveCard(two); |
| | | driver.setTaxiAptitudeCard(six); |
| | | driver.setIsPlatCar(2); |
| | | driver.setCompanyId(companyId); |
| | | driver.setFranchiseeId(franchiseeId); |
| | | driver.setState(1); |
| | | driver.setAuthState(1); |
| | | driver.setFlag("1"); |
| | | driver.setInsertUser(ShiroKit.getUser().getId()); |
| | | driver.setInsertTime(new Date()); |
| | | driver.setAddType(4); |
| | | driver.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(five)){ |
| | | driver.setDriverAddress(five); |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | | //添加专车服务模式 |
| | | if ("是".equals(eight)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(1); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加出租车服务模式 |
| | | if ("是".equals(nine)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(2); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加跨城出行服务模式 |
| | | if ("是".equals(ten)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(3); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件同城物流服务模式 |
| | | if ("是".equals(eleven)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(4); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(twelve)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加包车服务模式 |
| | | if ("是".equals(thirteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(6); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyService itCompanyService; |
| | | |
| | | @Autowired |
| | | private ITDriverServiceService itDriverServiceService; |
| | | |
| | | *//** |
| | | * 验证是否可以字符转为整数 |
| | | * @param str |
| | | * @return |
| | | *//* |
| | | public static boolean isInteger(String str) { |
| | | try{ |
| | | String reg = "^[0-9]\\d*$"; |
| | | boolean flag = str.matches(reg); |
| | | return flag; |
| | | }catch(NumberFormatException e) { |
| | | System.out.println("异常:\"" + str + "\"..."); |
| | | return false; |
| | | } |
| | | } |
| | | *//** |
| | | * 验证手机号格式是否正确 |
| | | * @param str |
| | | * @return |
| | | *//* |
| | | public static boolean isPhone(String str) { |
| | | try{ |
| | | String reg = "^1\\d{10}$"; |
| | | boolean flag = str.matches(reg); |
| | | return flag; |
| | | }catch(NumberFormatException e) { |
| | | System.out.println("异常:\"" + str + "\"..."); |
| | | return false; |
| | | } |
| | | } |
| | | *//** |
| | | * 验证密码长度是否正确 |
| | | * @param str |
| | | * @return |
| | | *//* |
| | | public static boolean isPassword(String str) { |
| | | try{ |
| | | String reg = "^.{6,18}$"; |
| | | boolean flag = str.matches(reg); |
| | | return flag; |
| | | }catch(NumberFormatException e) { |
| | | System.out.println("异常:\"" + str + "\"..."); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | *//** |
| | | * 导出司机信息 |
| | | *//* |
| | | @RequestMapping(value = "/outDriver") |
| | | public void outDriver(HttpServletRequest request, HttpServletResponse response) { |
| | | List<Map<String,Object>> listMap = tDriverService.getDriverListNoPage(ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId()); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | | |
| | | //第一行显示【封装】 |
| | | List<String> twoList = new ArrayList<String>(); |
| | | twoList.add("总计:"); |
| | | twoList.add(String.valueOf(listMap.size())+"条"); |
| | | dataList.add(twoList); |
| | | |
| | | // 列【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | shellList.add("添加时间"); |
| | | shellList.add("姓名"); |
| | | shellList.add("登录账号【手机号】"); |
| | | shellList.add("性别"); |
| | | shellList.add("司机来源"); |
| | | shellList.add("所属分公司"); |
| | | shellList.add("所属加盟商"); |
| | | shellList.add("当前车辆"); |
| | | shellList.add("服务模式"); |
| | | shellList.add("关联线路"); |
| | | shellList.add("评分"); |
| | | shellList.add("历史接单数"); |
| | | shellList.add("历史订单总金额"); |
| | | shellList.add("当前钱包余额"); |
| | | shellList.add("钱包活动余额"); |
| | | shellList.add("钱包收入余额"); |
| | | shellList.add("状态"); |
| | | dataList.add(shellList); |
| | | |
| | | for (Map<String,Object> object : listMap){ |
| | | // 详细数据列【封装】 |
| | | shellList = new ArrayList<String>(); |
| | | if(SinataUtil.isNotEmpty(object.get("insertTime"))){ |
| | | shellList.add(DateUtil.formatDate(DateUtil.parse(object.get("insertTime").toString(),"YYYY-MM-dd HH:mm:ss.S"), "YYYY-MM-dd HH:mm:ss")); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("name"))){ |
| | | shellList.add(object.get("name").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("phone"))){ |
| | | shellList.add(object.get("phone").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("sex"))){ |
| | | shellList.add(object.get("sex").toString() == "1"?"男":"女"); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("addType"))){ |
| | | |
| | | shellList.add(object.get("addType").toString().equals("1")?"司机注册":(object.get("addType").toString().equals("2")?"平台添加":(object.get("addType").toString().equals("3")?"分公司添加":(object.get("addType").toString().equals("4")?"加盟商添加":"")))); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("companyName"))){ |
| | | shellList.add(object.get("companyName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("franchiseeName"))){ |
| | | shellList.add(object.get("franchiseeName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("carLicensePlate"))){ |
| | | shellList.add(object.get("carLicensePlate").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("serverStr"))){ |
| | | shellList.add(object.get("serverStr").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("lineStr"))){ |
| | | shellList.add(object.get("lineStr").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("evaluateNum"))){ |
| | | shellList.add(object.get("evaluateNum").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("historyNum"))){ |
| | | shellList.add(object.get("historyNum").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("historyMoney"))){ |
| | | shellList.add(object.get("historyMoney").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("balance"))){ |
| | | shellList.add(object.get("balance").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("laveActivityMoney"))){ |
| | | shellList.add(object.get("laveActivityMoney").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("laveBusinessMoney"))){ |
| | | shellList.add(object.get("laveBusinessMoney").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("authState"))){ |
| | | shellList.add(object.get("authState").toString().equals("1")?"待审核":(object.get("authState").toString().equals("2")?"正常":(object.get("authState").toString().equals("3")?"冻结":(object.get("authState").toString().equals("4")?"已拒绝":"")))); |
| | | |
| | | shellList.add(object.get("authState").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | dataList.add(shellList); |
| | | } |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet("司机信息导出记录"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "司机信息导出记录", dataList,request, response); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }*/ |
| | | |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.*; |
| | | import com.stylefeng.guns.modular.system.dao.DriverPunishMapper; |
| | | import com.stylefeng.guns.modular.system.dao.DriverTrainMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | | import org.apache.poi.hdf.extractor.TC; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | |
| | | /** |
| | | * 司机审核列表控制器 |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-04 17:35:28 |
| | | * @Date 2023-02-20 09:07:06 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tDriver") |
| | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | |
| | | @Autowired |
| | | private ITCompanyService tCompanyService; |
| | | |
| | | @Autowired |
| | | private ITDriverServiceService tDriverServiceService; |
| | | |
| | | @Autowired |
| | | private ITDriverLineService tDriverLineService; |
| | | |
| | | @Autowired |
| | | private ITLineService itLineService; |
| | | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | | |
| | | @Resource |
| | | private DriverTrainMapper driverTrainMapper; |
| | | |
| | | @Resource |
| | | private DriverPunishMapper driverPunishMapper; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到司机审核列表首页 |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 跳转到审核通过司机首页 |
| | | */ |
| | | @RequestMapping("/yesDriver") |
| | | public String yesDriver() { |
| | | return PREFIX + "yesDriver.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加司机 |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tDriver_add") |
| | | public String tDriverAdd(Model model) { |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | model.addAttribute("roleType",roleType); |
| | | if (2 == roleType){ |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>() |
| | | .eq("type", 3) |
| | | .eq("superiorId",ShiroKit.getUser().getObjectId()) |
| | | .notIn("state",1) |
| | | .notIn("flag",3)); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else{ |
| | | model.addAttribute("franchiseeList",null); |
| | | } |
| | | //查询当前用户所属分公司/加盟商 |
| | | model.addAttribute("objectName",tCompanyService.selectById(ShiroKit.getUser().getObjectId()).getName()); |
| | | |
| | | //查询线路列表 |
| | | List<TLine> lineList = itLineService.selectList(new EntityWrapper<TLine>().eq("state", 1)); |
| | | model.addAttribute("lineList",lineList); |
| | | public String tDriverAdd() { |
| | | return PREFIX + "tDriver_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改审核司机 |
| | | */ |
| | | @RequestMapping("/tDriver_immediately/{tDriverId}") |
| | | public String tDriver_immediately(@PathVariable Integer tDriverId, Model model) { |
| | | Map<String, Object> tDriver = tDriverService.getDriverById(tDriverId); |
| | | model.addAttribute("item",tDriver); |
| | | LogObjectHolder.me().set(tDriver); |
| | | return PREFIX + "tDriver_immediately.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到选择车辆页面 |
| | | */ |
| | | @RequestMapping("/tDriver_changeCar/{tDriverId}") |
| | | public String tDriver_changeCar(@PathVariable Integer tDriverId, Model model) { |
| | | model.addAttribute("tDriverId",tDriverId); |
| | | return PREFIX + "tDriver_changeCar.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到冻结/解冻司机页面 |
| | | */ |
| | | @RequestMapping("/tDriver_optDriver/{tDriverId}/{optType}") |
| | | public String tDriver_optDriver(@PathVariable Integer tDriverId,@PathVariable Integer optType, Model model) { |
| | | model.addAttribute("tDriverId",tDriverId); |
| | | model.addAttribute("optType",optType); |
| | | return PREFIX + "tDriver_optDriver.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到查看司机详情 |
| | | */ |
| | | @RequestMapping("/tDriver_look/{tDriverId}") |
| | | public String tDriver_look(@PathVariable Integer tDriverId, Model model) { |
| | | Map<String, Object> tDriver = tDriverService.getDriverById(tDriverId); |
| | | model.addAttribute("item",tDriver); |
| | | LogObjectHolder.me().set(tDriver); |
| | | return PREFIX + "tDriver_look.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改司机 |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tDriver_update/{tDriverId}") |
| | | public String tDriverUpdate(@PathVariable Integer tDriverId, Model model) { |
| | | TDriver tDriver = tDriverService.selectById(tDriverId); |
| | | model.addAttribute("item",tDriver); |
| | | LogObjectHolder.me().set(tDriver); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | model.addAttribute("roleType",roleType); |
| | | model.addAttribute("objectName",tCompanyService.selectById(ShiroKit.getUser().getObjectId()).getName()); |
| | | |
| | | if (1 == roleType){ |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",tDriver.getCompanyId())); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else if (2 == roleType){ |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | } |
| | | |
| | | //查询平台ID |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1)); |
| | | //判断是平台司机还是加盟司机 |
| | | if ((SinataUtil.isEmpty(tDriver.getCompanyId()) || tDriver.getCompanyId() == 0 || tDriver.getCompanyId() == company.getId()) && (SinataUtil.isEmpty(tDriver.getFranchiseeId()) || tDriver.getFranchiseeId() == 0)){ |
| | | model.addAttribute("companyType",1); |
| | | }else{ |
| | | model.addAttribute("companyType",2); |
| | | } |
| | | |
| | | //获取经营业务 |
| | | List<TDriverService> serviceList = tDriverServiceService.selectList(new EntityWrapper<TDriverService>().eq("driverId", tDriverId)); |
| | | Integer one = 1; |
| | | Integer two = 1; |
| | | Integer three = 1; |
| | | Integer four = 1; |
| | | Integer five = 1; |
| | | Integer six = 1; |
| | | for (TDriverService obj : serviceList){ |
| | | if (obj.getType() == 1){ |
| | | one = 2; |
| | | } |
| | | if (obj.getType() == 2){ |
| | | two = 2; |
| | | } |
| | | if (obj.getType() == 3){ |
| | | three = 2; |
| | | } |
| | | if (obj.getType() == 4){ |
| | | four = 2; |
| | | } |
| | | if (obj.getType() == 5){ |
| | | five = 2; |
| | | } |
| | | if (obj.getType() == 6){ |
| | | six = 2; |
| | | } |
| | | } |
| | | model.addAttribute("one",one); |
| | | model.addAttribute("two",two); |
| | | model.addAttribute("three",three); |
| | | model.addAttribute("four",four); |
| | | model.addAttribute("five",five); |
| | | model.addAttribute("six",six); |
| | | |
| | | //查询线路列表 |
| | | List<TLine> lineList = itLineService.selectList(new EntityWrapper<TLine>().eq("state", 1)); |
| | | model.addAttribute("lineList",lineList); |
| | | //查询驾驶员已添加的线路列表 |
| | | List<Map<String, Object>> driverLineList = tDriverLineService.getDriverLineListByDriverId(tDriverId); |
| | | model.addAttribute("driverLineList",driverLineList); |
| | | return PREFIX + "tDriver_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加培训页 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showTraining") |
| | | public String showTraining(Integer id, Model model){ |
| | | model.addAttribute("id", id); |
| | | return PREFIX + "training.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存培训数据 |
| | | * @param train |
| | | * @param driverId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/saveTrain", method = RequestMethod.POST) |
| | | public ResultUtil saveTrain(String train, Integer driverId){ |
| | | if(ToolUtil.isEmpty(train)){ |
| | | return ResultUtil.error("请添加有效的培训记录"); |
| | | } |
| | | String[] split = train.split(","); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | List<DriverTrain> update = new ArrayList<>(); |
| | | List<DriverTrain> add = new ArrayList<>(); |
| | | for(String s : split){ |
| | | String[] s1 = s.split("_"); |
| | | if(ToolUtil.isNotEmpty(s1[0])){//修改 |
| | | DriverTrain driverTrain = driverTrainMapper.selectById(s1[0]); |
| | | driverTrain.setDriverId(driverId); |
| | | driverTrain.setCourseName(s1[1]); |
| | | driverTrain.setCourseDate(sdf.parse(s1[2])); |
| | | driverTrain.setStartTime(s1[3]); |
| | | driverTrain.setStopTime(s1[4]); |
| | | driverTrain.setDuration(Integer.valueOf(s1[5])); |
| | | update.add(driverTrain); |
| | | }else{//添加 |
| | | DriverTrain driverTrain = new DriverTrain(); |
| | | driverTrain.setDriverId(driverId); |
| | | driverTrain.setCourseName(s1[1]); |
| | | driverTrain.setCourseDate(sdf.parse(s1[2])); |
| | | driverTrain.setStartTime(s1[3]); |
| | | driverTrain.setStopTime(s1[4]); |
| | | driverTrain.setDuration(Integer.valueOf(s1[5])); |
| | | add.add(driverTrain); |
| | | } |
| | | } |
| | | List<DriverTrain> driverTrains = driverTrainMapper.queryAllTrain(driverId); |
| | | for(DriverTrain driverTrain : driverTrains){ |
| | | boolean b = true; |
| | | for(String s : split){ |
| | | String[] s1 = s.split("_"); |
| | | if(ToolUtil.isNotEmpty(s1[0]) && driverTrain.getId() == Integer.valueOf(s1[0])){ |
| | | b = false; |
| | | break; |
| | | } |
| | | } |
| | | if(b){ |
| | | driverTrainMapper.deleteById(driverTrain.getId()); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoDriverEducate(driverTrain.getId(), 3); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | } |
| | | if(update.size() > 0){ |
| | | for(DriverTrain driverTrain : update){ |
| | | driverTrainMapper.updateById(driverTrain); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoDriverEducate(driverTrain.getId(), 2); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | } |
| | | if(add.size() > 0){ |
| | | for(DriverTrain driverTrain : add){ |
| | | driverTrainMapper.insert(driverTrain); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoDriverEducate(driverTrain.getId(), 1); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | } |
| | | |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | /** |
| | | * 获取司机的所有培训数据 |
| | | * @param driverId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryAllTrain", method = RequestMethod.POST) |
| | | public ResultUtil queryAllTrain(Integer driverId){ |
| | | List<DriverTrain> driverTrains = driverTrainMapper.queryAllTrain(driverId); |
| | | return ResultUtil.success(driverTrains); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到处罚页 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showPunish") |
| | | public String showPunish(Integer id, Model model){ |
| | | model.addAttribute("id", id); |
| | | return PREFIX + "punish.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存处罚数据 |
| | | * @param punish |
| | | * @param driverId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/savePunish", method = RequestMethod.POST) |
| | | public ResultUtil savePunish(String punish, Integer driverId){ |
| | | if(ToolUtil.isEmpty(punish)){ |
| | | return ResultUtil.error("请添加有效的培训记录"); |
| | | } |
| | | String[] split = punish.split(","); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | List<DriverPunish> update = new ArrayList<>(); |
| | | List<DriverPunish> add = new ArrayList<>(); |
| | | for(String s : split){ |
| | | String[] s1 = s.split("_"); |
| | | if(ToolUtil.isNotEmpty(s1[0])){//修改 |
| | | DriverPunish driverPunish = driverPunishMapper.selectById(s1[0]); |
| | | driverPunish.setDriverId(driverId); |
| | | driverPunish.setPunishTime(sdf.parse(s1[1])); |
| | | driverPunish.setPunishReason(s1[2]); |
| | | driverPunish.setPunishReault(s1[3]); |
| | | update.add(driverPunish); |
| | | }else{//添加 |
| | | DriverPunish driverPunish = new DriverPunish(); |
| | | driverPunish.setDriverId(driverId); |
| | | driverPunish.setPunishTime(sdf.parse(s1[1])); |
| | | driverPunish.setPunishReason(s1[2]); |
| | | driverPunish.setPunishReault(s1[3]); |
| | | add.add(driverPunish); |
| | | } |
| | | } |
| | | List<DriverPunish> driverPunishes = driverPunishMapper.queryAllPunish(driverId); |
| | | for(DriverPunish driverTrain : driverPunishes){ |
| | | boolean b = true; |
| | | for(String s : split){ |
| | | String[] s1 = s.split("_"); |
| | | if(ToolUtil.isNotEmpty(s1[0]) && driverTrain.getId() == Integer.valueOf(s1[0])){ |
| | | b = false; |
| | | break; |
| | | } |
| | | } |
| | | if(b){ |
| | | driverTrainMapper.deleteById(driverTrain.getId()); |
| | | } |
| | | } |
| | | if(update.size() > 0){ |
| | | for(DriverPunish driverTrain : update){ |
| | | driverPunishMapper.updateById(driverTrain); |
| | | } |
| | | } |
| | | if(add.size() > 0){ |
| | | for(DriverPunish driverTrain : add){ |
| | | driverPunishMapper.insert(driverTrain); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.ratedDriverPunish(driverTrain.getId()); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | } |
| | | |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取所有处罚数据 |
| | | * @param driverId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryAllPunish", method = RequestMethod.POST) |
| | | public ResultUtil queryAllPunish(Integer driverId){ |
| | | List<DriverPunish> driverPunishes = driverPunishMapper.queryAllPunish(driverId); |
| | | return ResultUtil.success(driverPunishes); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据分公司ID获取加盟商 |
| | | * @param oneId |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/oneChange") |
| | | @ResponseBody |
| | | public Object oneChange(@RequestParam Integer oneId) { |
| | | List<TCompany> list = new ArrayList<>(); |
| | | if (SinataUtil.isNotEmpty(oneId)){ |
| | | list = tCompanyService.selectList(new EntityWrapper<TCompany>() |
| | | .eq("type", 3) |
| | | .eq("superiorId", oneId) |
| | | .notIn("flag",3) |
| | | .notIn("state",1)); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 获取司机审核列表列表 |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String companyName, |
| | | String phone, |
| | | String account, |
| | | Integer addType, |
| | | Integer authState) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tDriverService.getAuthDriverList(page,beginTime,endTime,companyName,phone,account,addType,authState)); |
| | | } |
| | | return super.packForBT(page); |
| | | public Object list(String createTime,String phone,Integer status) { |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); |
| | | return tDriverService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取审核通过的司机列表 |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/listYesDriver") |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listYesDriver(String insertTime, |
| | | String companyName, |
| | | String phone, |
| | | String name, |
| | | Integer addType, |
| | | Integer authState) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tDriverService.getDriverList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,companyName,phone,name,addType,authState)); |
| | | return super.packForBT(page); |
| | | public Object listBack(String condition) { |
| | | return tDriverService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 获取可被选择的车辆列表 |
| | | */ |
| | | @RequestMapping(value = "/selectCarList/{tDriverId}") |
| | | @ResponseBody |
| | | public Object selectCarList(@PathVariable Integer tDriverId, |
| | | String carLicensePlate, |
| | | String brandName, |
| | | String modelName, |
| | | String color, |
| | | String serverStr) { |
| | | TDriver driver = tDriverService.selectById(tDriverId); |
| | | /*String useCarIdStr = null; |
| | | //查询已被使用的车辆ID |
| | | if (SinataUtil.isNotEmpty(driver.getCarId())){ |
| | | useCarIdStr = tDriverService.getUseCarIdStr(driver.getCarId()); |
| | | }else{ |
| | | useCarIdStr = tDriverService.getUseCarIdStr(null); |
| | | }*/ |
| | | //2020-08-21:新需求,已被绑定的车辆可以被继续绑定 |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tDriverService.getCanSelectCarList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),null,carLicensePlate,brandName,modelName,color,serverStr)); |
| | | return super.packForBT(page); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 审核操作 1=通过 2=不通过 |
| | | */ |
| | | @RequestMapping(value = "/authOpt") |
| | | @ResponseBody |
| | | public Object authOpt(Integer id,Integer authState) { |
| | | if (SinataUtil.isNotEmpty(id) && SinataUtil.isNotEmpty(authState)){ |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | Integer type = 0; |
| | | if (1 == authState){ |
| | | type = 5; |
| | | tDriver.setAuthState(2); |
| | | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoCompanyStat(); |
| | | pushMinistryOfTransportUtil.baseInfoDriver(id); |
| | | pushMinistryOfTransportUtil.baseInfoDriverApp(id); |
| | | } |
| | | } |
| | | }).start(); |
| | | }else{ |
| | | type = 6; |
| | | tDriver.setAuthState(4); |
| | | } |
| | | |
| | | Map<String,String> map = new HashMap<>(); |
| | | map.put("uid", String.valueOf(tDriver.getId())); |
| | | map.put("type", String.valueOf(type)); |
| | | String result = HttpRequestUtil.postRequest(PushURL.driver_auth_url, map); |
| | | System.out.println("司机注册审核发送短信 :【driverId="+tDriver.getId().toString()+"】,调用接口:"+result); |
| | | |
| | | tDriverService.updateById(tDriver); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 更换车辆操作 |
| | | */ |
| | | @RequestMapping(value = "/selectCarOpt") |
| | | @ResponseBody |
| | | public Object selectCarOpt(Integer tDriverId,Integer carId) { |
| | | if (SinataUtil.isNotEmpty(tDriverId) && SinataUtil.isNotEmpty(carId)){ |
| | | TDriver tDriver = tDriverService.selectById(tDriverId); |
| | | tDriver.setCarId(carId); |
| | | tDriverService.updateById(tDriver); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 新增司机审核列表 |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TDriver tDriver,@RequestParam String serverBox,@RequestParam String lineStr,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId) { |
| | | //判断登录账户是否重复 |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", tDriver.getPhone()).in("authState", "1,2,3").ne("flag", 3)); |
| | | if (count > 0){ |
| | | return "error"; |
| | | } |
| | | if (1 == roleType){ //平台 |
| | | if (2 == companyType.intValue()){ |
| | | if (SinataUtil.isNotEmpty(oneId)){ |
| | | tDriver.setCompanyId(oneId); |
| | | } |
| | | if (SinataUtil.isNotEmpty(twoId)){ |
| | | tDriver.setFranchiseeId(twoId); |
| | | } |
| | | }else if (1 == companyType.intValue()){ |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1)); |
| | | tDriver.setCompanyId(company.getId()); |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | | } |
| | | tDriver.setAddType(2); |
| | | tDriver.setIsPlatCar(1); |
| | | tDriver.setAuthState(2); |
| | | }else if (2 == roleType){ //分公司 |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tDriver.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(franchiseeId)){ |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | | } |
| | | tDriver.setAddType(3); |
| | | tDriver.setIsPlatCar(2); |
| | | tDriver.setAuthState(1); |
| | | tDriver.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | }else if (3 == roleType){ //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(tCompany)){ |
| | | tDriver.setCompanyId(tCompany.getSuperiorId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tDriver.setFranchiseeId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | tDriver.setAddType(4); |
| | | tDriver.setIsPlatCar(2); |
| | | tDriver.setAuthState(1); |
| | | tDriver.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | tDriver.setInsertTime(new Date()); |
| | | tDriver.setInsertUser(ShiroKit.getUser().getId()); |
| | | // tDriver.setPassword(MD5Util.encrypt(tDriver.getPassword())); |
| | | |
| | | tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#")); |
| | | |
| | | public Object add(TDriver tDriver) { |
| | | tDriverService.insert(tDriver); |
| | | |
| | | //添加经营业务 |
| | | String[] serverArray = serverBox.split(","); |
| | | for (int i=0;i<serverArray.length;i++){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(tDriver.getId()); |
| | | service.setType(Integer.valueOf(serverArray[i])); |
| | | tDriverServiceService.insert(service); |
| | | |
| | | if (3 == Integer.valueOf(serverArray[i])){ |
| | | //添加线路 |
| | | if (SinataUtil.isNotEmpty(lineStr)){ |
| | | addLine(lineStr,tDriver.getId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 添加线路 |
| | | * @param subArr |
| | | * @param id |
| | | */ |
| | | public void addLine(String subArr,Integer id){ |
| | | JSONArray jsonArray = JSON.parseArray(subArr); |
| | | int size = jsonArray.size(); |
| | | for (int i = 0; i < size; i++){ |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | TDriverLine line = new TDriverLine(); |
| | | line.setCreateTime(new Date()); |
| | | line.setAddTime(jsonObject.getString("time")); |
| | | line.setLineId(jsonObject.getInteger("lineId")); |
| | | line.setDriverId(id); |
| | | tDriverLineService.insert(line); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除司机审核列表 |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tDriverId) { |
| | | TDriver driver = tDriverService.selectById(tDriverId); |
| | | driver.setFlag("3"); |
| | | tDriverService.updateById(driver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | /** |
| | | * 操作司机状态 |
| | | */ |
| | | @RequestMapping(value = "/optDriver") |
| | | @ResponseBody |
| | | public Object optDriver(@RequestParam Integer driverId,@RequestParam String remark,@RequestParam Integer optType) { |
| | | if (SinataUtil.isNotEmpty(driverId) && SinataUtil.isNotEmpty(optType)){ |
| | | TDriver tDriver = tDriverService.selectById(driverId); |
| | | if (1 == optType){ //解冻 |
| | | tDriver.setAuthState(2); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoCompanyStat(); |
| | | pushMinistryOfTransportUtil.baseInfoDriver(driverId); |
| | | } |
| | | } |
| | | }).start(); |
| | | }else if (2 == optType){ //冻结 |
| | | tDriver.setAuthState(3); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoCompanyStat(); |
| | | pushMinistryOfTransportUtil.baseInfoDriver(driverId); |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | tDriver.setRemark(remark); |
| | | tDriverService.updateById(tDriver); |
| | | } |
| | | tDriverService.deleteById(tDriverId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改司机审核列表 |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TDriver tDriver,@RequestParam String serverBox,@RequestParam String lineStr,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId) { |
| | | TDriver obj = tDriverService.selectById(tDriver.getId()); |
| | | if (!obj.getPhone().equals(tDriver.getPhone())){ |
| | | //判断登录账户是否重复 |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", tDriver.getPhone()).in("authState", "1,2,3")); |
| | | if (count > 0){ |
| | | return "error"; |
| | | } |
| | | } |
| | | if (1 == roleType){ //平台 |
| | | if (2 == companyType.intValue()){ |
| | | if (SinataUtil.isNotEmpty(oneId)){ |
| | | tDriver.setCompanyId(oneId); |
| | | } |
| | | if (SinataUtil.isNotEmpty(twoId)){ |
| | | tDriver.setFranchiseeId(twoId); |
| | | } |
| | | }else if (1 == companyType.intValue()){ |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1)); |
| | | tDriver.setCompanyId(company.getId()); |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | | } |
| | | }else if (2 == roleType){ //分公司 |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tDriver.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(franchiseeId)){ |
| | | tDriver.setFranchiseeId(franchiseeId); |
| | | } |
| | | }else if (3 == roleType){ //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(tCompany)){ |
| | | tDriver.setCompanyId(tCompany.getSuperiorId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tDriver.setFranchiseeId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | } |
| | | tDriver.setUpdateTime(new Date()); |
| | | tDriver.setUpdateUser(ShiroKit.getUser().getId()); |
| | | // tDriver.setPassword(MD5Util.encrypt(tDriver.getPassword())); |
| | | tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#")); |
| | | public Object update(TDriver tDriver) { |
| | | tDriverService.updateById(tDriver); |
| | | |
| | | //删除业务 |
| | | tDriverServiceService.delete(new EntityWrapper<TDriverService>().eq("driverId",tDriver.getId())); |
| | | |
| | | //删除线路 |
| | | tDriverLineService.delete(new EntityWrapper<TDriverLine>().eq("driverId",tDriver.getId())); |
| | | |
| | | //添加经营业务 |
| | | String[] serverArray = serverBox.split(","); |
| | | for (int i=0;i<serverArray.length;i++){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(tDriver.getId()); |
| | | service.setType(Integer.valueOf(serverArray[i])); |
| | | tDriverServiceService.insert(service); |
| | | |
| | | if (3 == Integer.valueOf(serverArray[i])){ |
| | | //添加线路 |
| | | if (SinataUtil.isNotEmpty(lineStr)){ |
| | | addLine(lineStr,tDriver.getId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoDriver(tDriver.getId()); |
| | | } |
| | | } |
| | | }).start(); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 下载模板 |
| | | * @param request |
| | | * @param response |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/uploadDriverModel") |
| | | public void uploadDriverModel(HttpServletRequest request, HttpServletResponse response) { |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<List<String>>(); |
| | | |
| | | String title = ""; |
| | | |
| | | // 首行【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | if (ShiroKit.getUser().getRoleType() == 1){ |
| | | title = "平台导入司机模板"; |
| | | |
| | | shellList.add("司机名称"); |
| | | shellList.add("所属机构[平台司机/加盟司机]"); |
| | | shellList.add("所属分公司[提示:加盟司机选填]"); |
| | | shellList.add("所属加盟商[提示:加盟司机选填]"); |
| | | shellList.add("性别[男/女]"); |
| | | shellList.add("驾驶证号码"); |
| | | shellList.add("驾龄"); |
| | | shellList.add("身份证号"); |
| | | shellList.add("居住地址"); |
| | | shellList.add("出租车资格证号"); |
| | | shellList.add("工号[选填]"); |
| | | shellList.add("经营业务:专车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | | shellList.add("经营业务:小件跨城物流[是/否]"); |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | }else if (ShiroKit.getUser().getRoleType() == 2){ |
| | | title = "分公司导入司机模板"; |
| | | |
| | | shellList.add("司机名称"); |
| | | shellList.add("所属加盟商[选填]"); |
| | | shellList.add("性别[男/女]"); |
| | | shellList.add("驾驶证号码"); |
| | | shellList.add("驾龄"); |
| | | shellList.add("身份证号"); |
| | | shellList.add("居住地址"); |
| | | shellList.add("出租车资格证号"); |
| | | shellList.add("工号[选填]"); |
| | | shellList.add("经营业务:专车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | | shellList.add("经营业务:小件跨城物流[是/否]"); |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | }else if (ShiroKit.getUser().getRoleType() == 3){ |
| | | title = "加盟商导入司机模板"; |
| | | |
| | | shellList.add("司机名称"); |
| | | shellList.add("性别[男/女]"); |
| | | shellList.add("驾驶证号码"); |
| | | shellList.add("驾龄"); |
| | | shellList.add("身份证号"); |
| | | shellList.add("居住地址"); |
| | | shellList.add("出租车资格证号"); |
| | | shellList.add("工号[选填]"); |
| | | shellList.add("经营业务:专车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | | shellList.add("经营业务:小件跨城物流[是/否]"); |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | } |
| | | dataList.add(shellList); |
| | | |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet(title+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), title, dataList, request, response); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导入操作 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @RequestMapping(value="/exportDriver",method = RequestMethod.POST) |
| | | @RequestMapping(value = "/detail/{tDriverId}") |
| | | @ResponseBody |
| | | public Object exportDriver(HttpServletRequest request){ |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile file = (MultipartFile) multipartRequest.getFile("myfile"); |
| | | try { |
| | | if (ShiroKit.getUser().getRoleType() == 1){ |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | | Row row = sh.getRow(i); |
| | | |
| | | Cell cell0 = row.getCell(0); //司机名称 |
| | | String zero = null; |
| | | if (SinataUtil.isNotEmpty(cell0)){ |
| | | zero = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell1 = row.getCell(1); //所属机构[平台司机/加盟司机] |
| | | String one = null; |
| | | if (SinataUtil.isNotEmpty(cell1)){ |
| | | one = String.valueOf(cell1.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell2 = row.getCell(2); //所属分公司[提示:加盟司机选填] |
| | | String two = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | two = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell3 = row.getCell(3); //所属加盟商[提示:加盟司机选填] |
| | | String three = null; |
| | | if (SinataUtil.isNotEmpty(cell3)){ |
| | | three = String.valueOf(cell3.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell4 = row.getCell(4); //性别[男/女] |
| | | String four = null; |
| | | if (SinataUtil.isNotEmpty(cell4)){ |
| | | four = String.valueOf(cell4.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell5 = row.getCell(5); //驾驶证号码 |
| | | String five = null; |
| | | if (SinataUtil.isNotEmpty(cell5)){ |
| | | five = String.valueOf(cell5.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell6 = row.getCell(6); //驾龄 |
| | | String six = null; |
| | | if (SinataUtil.isNotEmpty(cell6)){ |
| | | six = String.valueOf(cell6.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell7 = row.getCell(7); //身份证号 |
| | | String seven = null; |
| | | if (SinataUtil.isNotEmpty(cell7)){ |
| | | seven = String.valueOf(cell7.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell8 = row.getCell(8); //居住地址 |
| | | String eight = null; |
| | | if (SinataUtil.isNotEmpty(cell8)){ |
| | | eight = String.valueOf(cell8.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell9 = row.getCell(9); //出租车资格证号 |
| | | String nine = null; |
| | | if (SinataUtil.isNotEmpty(cell9)){ |
| | | nine = String.valueOf(cell9.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell10 = row.getCell(10); //工号[选填] |
| | | String ten = null; |
| | | if (SinataUtil.isNotEmpty(cell10)){ |
| | | ten = String.valueOf(cell10.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell11 = row.getCell(11); //经营业务:专车[是/否] |
| | | String eleven = null; |
| | | if (SinataUtil.isNotEmpty(cell11)){ |
| | | eleven = String.valueOf(cell11.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell12 = row.getCell(12); //经营业务:专车[是/否] |
| | | String twelve = null; |
| | | if (SinataUtil.isNotEmpty(cell12)){ |
| | | twelve = String.valueOf(cell12.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell13 = row.getCell(13); //经营业务:跨城出行[是/否] |
| | | String thirteen = null; |
| | | if (SinataUtil.isNotEmpty(cell13)){ |
| | | thirteen = String.valueOf(cell13.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell14 = row.getCell(14); //经营业务:小件同城物流[是/否] |
| | | String fourteen = null; |
| | | if (SinataUtil.isNotEmpty(cell14)){ |
| | | fourteen = String.valueOf(cell14.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell15 = row.getCell(15); //经营业务:小件跨城物流[是/否] |
| | | String fifteen = null; |
| | | if (SinataUtil.isNotEmpty(cell15)){ |
| | | fifteen = String.valueOf(cell15.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell16 = row.getCell(16); //经营业务:包车[是/否] |
| | | String sixteen = null; |
| | | if (SinataUtil.isNotEmpty(cell16)){ |
| | | sixteen = String.valueOf(cell16.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell17 = row.getCell(17); //登录账号[手机号] |
| | | String seventeen = null; |
| | | if (SinataUtil.isNotEmpty(cell17)){ |
| | | seventeen = String.valueOf(cell17.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell18 = row.getCell(18); //登录密码[密码长度为6-18] |
| | | String eighteen = null; |
| | | if (SinataUtil.isNotEmpty(cell18)){ |
| | | eighteen = String.valueOf(cell18.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(one) || SinataUtil.isEmpty(four) |
| | | || SinataUtil.isEmpty(five) || SinataUtil.isEmpty(six) || SinataUtil.isEmpty(nine) |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen) |
| | | || SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen) || SinataUtil.isEmpty(sixteen) |
| | | || SinataUtil.isEmpty(seventeen)|| SinataUtil.isEmpty(eighteen)){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | | //判断账号是否存在 |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", seventeen).in("authState", "1,2,3").ne("flag", 3)); |
| | | if (count > 0){ |
| | | continue; |
| | | } |
| | | |
| | | //判断所属机构 |
| | | if (!one.equals("平台司机") && !one.equals("加盟司机")){ |
| | | return new ErrorTip(500, "所属机构内容不正确"); |
| | | } |
| | | //判断性别 |
| | | if (!four.equals("男") && !four.equals("女")){ |
| | | return new ErrorTip(500, "性别内容不正确"); |
| | | } |
| | | //判断经营业务【专车】 |
| | | if (!eleven.equals("是") && !eleven.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【专车】内容不正确"); |
| | | } |
| | | //判断经营业务【出租车】 |
| | | if (!twelve.equals("是") && !twelve.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【出租车】内容不正确"); |
| | | } |
| | | //判断经营业务【跨城出行】 |
| | | if (!thirteen.equals("是") && !thirteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【跨城出行】内容不正确"); |
| | | } |
| | | //判断经营业务【小件同城物流】 |
| | | if (!fourteen.equals("是") && !fourteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件同城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【小件跨城物流】 |
| | | if (!fifteen.equals("是") && !fifteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件跨城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【包车】 |
| | | if (!sixteen.equals("是") && !sixteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【包车】内容不正确"); |
| | | } |
| | | //判断驾龄 |
| | | if (!isInteger(six)){ |
| | | return new ErrorTip(500, "驾龄格式不正确"); |
| | | } |
| | | //判断手机号 |
| | | if (!isPhone(seventeen)){ |
| | | return new ErrorTip(500, "登录账号[手机号]格式不正确"); |
| | | } |
| | | //判断登录密码 |
| | | if (!isPassword(eighteen)){ |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | |
| | | //查找平台公司 |
| | | TCompany platCompany = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1).notIn("flag", "3").last(" limit 1")); |
| | | Integer companyId = platCompany.getId(); |
| | | Integer franchiseeId = 0; |
| | | if ("加盟司机".equals(one)){ |
| | | //判断所属分公司是否存在 |
| | | if (SinataUtil.isNotEmpty(two)){ |
| | | TCompany company = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("name", two).eq("type", 2).notIn("flag", "3").last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(company)){ |
| | | companyId = company.getId(); |
| | | //判断加盟商是否存在 |
| | | if (SinataUtil.isNotEmpty(three)){ |
| | | TCompany franchisee = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("superiorId",company.getId()).eq("name", three).eq("type", 3).notIn("flag", "3").last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(franchisee)){ |
| | | franchiseeId = franchisee.getId(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | TDriver driver = new TDriver(); |
| | | driver.setAccount(seventeen); |
| | | driver.setJobNumber(ten); |
| | | driver.setPhone(seventeen); |
| | | driver.setPassword(ShiroKit.md5(eighteen, "SA;d5#")); |
| | | driver.setName(zero); |
| | | if ("男".equals(four)){ |
| | | driver.setSex(1); |
| | | }else if ("女".equals(four)){ |
| | | driver.setSex(2); |
| | | } |
| | | driver.setIdCard(seven); |
| | | driver.setDriverAge(Integer.valueOf(six)); |
| | | driver.setDriveCard(five); |
| | | driver.setTaxiAptitudeCard(nine); |
| | | if ("平台司机".equals(one)){ |
| | | driver.setIsPlatCar(1); |
| | | }else if ("加盟司机".equals(one)){ |
| | | driver.setIsPlatCar(2); |
| | | } |
| | | driver.setCompanyId(companyId); |
| | | driver.setFranchiseeId(franchiseeId); |
| | | driver.setState(2); |
| | | driver.setAuthState(2); |
| | | driver.setFlag("1"); |
| | | driver.setInsertUser(ShiroKit.getUser().getId()); |
| | | driver.setInsertTime(new Date()); |
| | | driver.setAddType(2); |
| | | driver.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | if(SinataUtil.isNotEmpty(eight)){ |
| | | driver.setDriverAddress(eight); |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | | |
| | | //添加专车服务模式 |
| | | if ("是".equals(eleven)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(1); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加出租车服务模式 |
| | | if ("是".equals(twelve)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(2); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加跨城出行服务模式 |
| | | if ("是".equals(thirteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(3); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件同城物流服务模式 |
| | | if ("是".equals(fourteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(4); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(fifteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加包车服务模式 |
| | | if ("是".equals(sixteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(6); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | } |
| | | } |
| | | }else if (ShiroKit.getUser().getRoleType() == 2){ |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | | Row row = sh.getRow(i); |
| | | |
| | | Cell cell0 = row.getCell(0); //司机名称 |
| | | String zero = null; |
| | | if (SinataUtil.isNotEmpty(cell0)){ |
| | | zero = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell1 = row.getCell(1); //所属加盟商[选填] |
| | | String one = null; |
| | | if (SinataUtil.isNotEmpty(cell1)){ |
| | | one = String.valueOf(cell1.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell2 = row.getCell(2); //性别[男/女] |
| | | String two = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | two = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell3 = row.getCell(3); //驾驶证号码 |
| | | String three = null; |
| | | if (SinataUtil.isNotEmpty(cell3)){ |
| | | three = String.valueOf(cell3.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell4 = row.getCell(4); //驾龄 |
| | | String four = null; |
| | | if (SinataUtil.isNotEmpty(cell4)){ |
| | | four = String.valueOf(cell4.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell5 = row.getCell(5); //身份证号 |
| | | String five = null; |
| | | if (SinataUtil.isNotEmpty(cell5)){ |
| | | five = String.valueOf(cell5.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell6 = row.getCell(6); //居住地址 |
| | | String six = null; |
| | | if (SinataUtil.isNotEmpty(cell6)){ |
| | | six = String.valueOf(cell6.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell7 = row.getCell(7); //出租车资格证号 |
| | | String seven = null; |
| | | if (SinataUtil.isNotEmpty(cell7)){ |
| | | seven = String.valueOf(cell7.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell8 = row.getCell(8); //工号[选填] |
| | | String eight = null; |
| | | if (SinataUtil.isNotEmpty(cell8)){ |
| | | eight = String.valueOf(cell8.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell9 = row.getCell(9); //经营业务:专车[是/否] |
| | | String nine = null; |
| | | if (SinataUtil.isNotEmpty(cell9)){ |
| | | nine = String.valueOf(cell9.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell10 = row.getCell(10); //经营业务:出租车[是/否] |
| | | String ten = null; |
| | | if (SinataUtil.isNotEmpty(cell10)){ |
| | | ten = String.valueOf(cell10.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell11 = row.getCell(11); //经营业务:跨城出行[是/否] |
| | | String eleven = null; |
| | | if (SinataUtil.isNotEmpty(cell11)){ |
| | | eleven = String.valueOf(cell11.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell12 = row.getCell(12); //经营业务:小件同城物流[是/否] |
| | | String twelve = null; |
| | | if (SinataUtil.isNotEmpty(cell12)){ |
| | | twelve = String.valueOf(cell12.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell13 = row.getCell(13); //经营业务:小件跨城物流[是/否] |
| | | String thirteen = null; |
| | | if (SinataUtil.isNotEmpty(cell13)){ |
| | | thirteen = String.valueOf(cell13.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell14 = row.getCell(14); //经营业务:包车[是/否] |
| | | String fourteen = null; |
| | | if (SinataUtil.isNotEmpty(cell14)){ |
| | | fourteen = String.valueOf(cell14.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell15 = row.getCell(15); //登录账号[手机号] |
| | | String fifteen = null; |
| | | if (SinataUtil.isNotEmpty(cell15)){ |
| | | fifteen = String.valueOf(cell15.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell16 = row.getCell(16); //登录密码[密码长度为6-18] |
| | | String sixteen = null; |
| | | if (SinataUtil.isNotEmpty(cell16)){ |
| | | sixteen = String.valueOf(cell16.getStringCellValue()).trim(); |
| | | } |
| | | if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(two) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four) |
| | | || SinataUtil.isEmpty(five) || SinataUtil.isEmpty(seven) |
| | | || SinataUtil.isEmpty(nine) || SinataUtil.isEmpty(ten) |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen) |
| | | || SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen) || SinataUtil.isEmpty(sixteen)){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | | //判断账号是否存在 |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", fifteen).in("authState", "1,2,3").ne("flag", 3)); |
| | | if (count > 0){ |
| | | continue; |
| | | } |
| | | //判断性别 |
| | | if (!two.equals("男") && !two.equals("女")){ |
| | | return new ErrorTip(500, "性别内容不正确"); |
| | | } |
| | | //判断经营业务【专车】 |
| | | if (!nine.equals("是") && !nine.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【专车】内容不正确"); |
| | | } |
| | | //判断经营业务【出租车】 |
| | | if (!ten.equals("是") && !ten.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【出租车】内容不正确"); |
| | | } |
| | | //判断经营业务【跨城出行】 |
| | | if (!eleven.equals("是") && !eleven.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【跨城出行】内容不正确"); |
| | | } |
| | | //判断经营业务【小件同城物流】 |
| | | if (!twelve.equals("是") && !twelve.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件同城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【小件跨城物流】 |
| | | if (!thirteen.equals("是") && !thirteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件跨城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【包车】 |
| | | if (!fourteen.equals("是") && !fourteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【包车】内容不正确"); |
| | | } |
| | | //判断驾龄 |
| | | if (!isInteger(four)){ |
| | | return new ErrorTip(500, "驾龄格式不正确"); |
| | | } |
| | | //判断手机号 |
| | | if (!isPhone(fifteen)){ |
| | | return new ErrorTip(500, "登录账号[手机号]格式不正确"); |
| | | } |
| | | //判断登录密码 |
| | | if (!isPassword(sixteen)){ |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | //查找平台公司 |
| | | Integer companyId = ShiroKit.getUser().getObjectId(); |
| | | Integer franchiseeId = 0; |
| | | //判断所属分公司是否存在 |
| | | if (SinataUtil.isNotEmpty(one)){ |
| | | TCompany franchisee = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("superiorId",companyId).eq("name", one).eq("type", 3).notIn("flag", "3").last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(franchisee)){ |
| | | franchiseeId = franchisee.getId(); |
| | | } |
| | | } |
| | | |
| | | TDriver driver = new TDriver(); |
| | | driver.setAccount(fifteen); |
| | | driver.setJobNumber(eight); |
| | | driver.setPhone(fifteen); |
| | | driver.setPassword(ShiroKit.md5(sixteen, "SA;d5#")); |
| | | driver.setName(zero); |
| | | if ("男".equals(two)){ |
| | | driver.setSex(1); |
| | | }else if ("女".equals(two)){ |
| | | driver.setSex(2); |
| | | } |
| | | driver.setIdCard(five); |
| | | driver.setDriverAge(Integer.valueOf(four)); |
| | | driver.setDriveCard(three); |
| | | driver.setTaxiAptitudeCard(seven); |
| | | driver.setIsPlatCar(2); |
| | | driver.setCompanyId(companyId); |
| | | driver.setFranchiseeId(franchiseeId); |
| | | driver.setState(1); |
| | | driver.setAuthState(1); |
| | | driver.setFlag("1"); |
| | | driver.setInsertUser(ShiroKit.getUser().getId()); |
| | | driver.setInsertTime(new Date()); |
| | | driver.setAddType(3); |
| | | driver.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(six)){ |
| | | driver.setDriverAddress(six); |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | | //添加专车服务模式 |
| | | if ("是".equals(nine)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(1); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加出租车服务模式 |
| | | if ("是".equals(ten)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(2); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加跨城出行服务模式 |
| | | if ("是".equals(eleven)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(3); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件同城物流服务模式 |
| | | if ("是".equals(twelve)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(4); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(thirteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加包车服务模式 |
| | | if ("是".equals(fourteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(6); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | |
| | | } |
| | | } |
| | | }else if (ShiroKit.getUser().getRoleType() == 3){ |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | | Row row = sh.getRow(i); |
| | | |
| | | Cell cell0 = row.getCell(0); //司机名称 |
| | | String zero = null; |
| | | if (SinataUtil.isNotEmpty(cell0)){ |
| | | zero = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell2 = row.getCell(1); //性别[男/女] |
| | | String one = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | one = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell3 = row.getCell(2); //驾驶证号码 |
| | | String two = null; |
| | | if (SinataUtil.isNotEmpty(cell3)){ |
| | | two = String.valueOf(cell3.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell4 = row.getCell(3); //驾龄 |
| | | String three = null; |
| | | if (SinataUtil.isNotEmpty(cell4)){ |
| | | three = String.valueOf(cell4.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell5 = row.getCell(4); //身份证号 |
| | | String four = null; |
| | | if (SinataUtil.isNotEmpty(cell5)){ |
| | | four = String.valueOf(cell5.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell6 = row.getCell(5); //居住地址 |
| | | String five = null; |
| | | if (SinataUtil.isNotEmpty(cell6)){ |
| | | five = String.valueOf(cell6.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell7 = row.getCell(6); //出租车资格证号 |
| | | String six = null; |
| | | if (SinataUtil.isNotEmpty(cell7)){ |
| | | six = String.valueOf(cell7.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell8 = row.getCell(7); //工号[选填] |
| | | String seven = null; |
| | | if (SinataUtil.isNotEmpty(cell8)){ |
| | | seven = String.valueOf(cell8.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell9 = row.getCell(8); //经营业务:专车[是/否] |
| | | String eight = null; |
| | | if (SinataUtil.isNotEmpty(cell9)){ |
| | | eight = String.valueOf(cell9.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell10 = row.getCell(9); //经营业务:出租车[是/否] |
| | | String nine = null; |
| | | if (SinataUtil.isNotEmpty(cell10)){ |
| | | nine = String.valueOf(cell10.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell11 = row.getCell(10); //经营业务:跨城出行[是/否] |
| | | String ten = null; |
| | | if (SinataUtil.isNotEmpty(cell11)){ |
| | | ten = String.valueOf(cell11.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell12 = row.getCell(11); //经营业务:小件同城物流[是/否] |
| | | String eleven = null; |
| | | if (SinataUtil.isNotEmpty(cell12)){ |
| | | eleven = String.valueOf(cell12.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell13 = row.getCell(12); //经营业务:小件跨城物流[是/否] |
| | | String twelve = null; |
| | | if (SinataUtil.isNotEmpty(cell13)){ |
| | | twelve = String.valueOf(cell13.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell14 = row.getCell(13); //经营业务:包车[是/否] |
| | | String thirteen = null; |
| | | if (SinataUtil.isNotEmpty(cell14)){ |
| | | thirteen = String.valueOf(cell14.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell15 = row.getCell(14); //登录账号[手机号] |
| | | String fourteen = null; |
| | | if (SinataUtil.isNotEmpty(cell15)){ |
| | | fourteen = String.valueOf(cell15.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell16 = row.getCell(15); //登录密码[密码长度为6-18] |
| | | String fifteen = null; |
| | | if (SinataUtil.isNotEmpty(cell16)){ |
| | | fifteen = String.valueOf(cell16.getStringCellValue()).trim(); |
| | | } |
| | | if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(one) || SinataUtil.isEmpty(two) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four) |
| | | || SinataUtil.isEmpty(six) || SinataUtil.isEmpty(eight) |
| | | || SinataUtil.isEmpty(nine) || SinataUtil.isEmpty(ten) |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen) |
| | | || SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen) ){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | | //判断账号是否存在 |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", fourteen).in("authState", "1,2,3").ne("flag", 3)); |
| | | if (count > 0){ |
| | | continue; |
| | | } |
| | | //判断性别 |
| | | if (!one.equals("男") && !one.equals("女")){ |
| | | return new ErrorTip(500, "性别内容不正确"); |
| | | } |
| | | //判断经营业务【专车】 |
| | | if (!eight.equals("是") && !eight.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【专车】内容不正确"); |
| | | } |
| | | //判断经营业务【出租车】 |
| | | if (!nine.equals("是") && !nine.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【出租车】内容不正确"); |
| | | } |
| | | //判断经营业务【跨城出行】 |
| | | if (!ten.equals("是") && !ten.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【跨城出行】内容不正确"); |
| | | } |
| | | //判断经营业务【小件同城物流】 |
| | | if (!eleven.equals("是") && !eleven.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件同城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【小件跨城物流】 |
| | | if (!twelve.equals("是") && !twelve.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件跨城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【包车】 |
| | | if (!thirteen.equals("是") && !thirteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【包车】内容不正确"); |
| | | } |
| | | //判断驾龄 |
| | | if (!isInteger(three)){ |
| | | return new ErrorTip(500, "驾龄格式不正确"); |
| | | } |
| | | //判断手机号 |
| | | if (!isPhone(fourteen)){ |
| | | return new ErrorTip(500, "登录账号[手机号]格式不正确"); |
| | | } |
| | | //判断登录密码 |
| | | if (!isPassword(fifteen)){ |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | //查找平台公司 |
| | | Integer companyId = 0; |
| | | Integer franchiseeId = 0; |
| | | TCompany franchisee = itCompanyService.selectById(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(franchisee)){ |
| | | companyId = franchisee.getSuperiorId(); |
| | | franchiseeId = franchisee.getId(); |
| | | } |
| | | if (companyId == 0 && franchiseeId == 0){ |
| | | return new ErrorTip(500, "当前登录账户上级分公司不能为空"); |
| | | } |
| | | |
| | | TDriver driver = new TDriver(); |
| | | driver.setAccount(fourteen); |
| | | driver.setJobNumber(seven); |
| | | driver.setPhone(fourteen); |
| | | driver.setPassword(ShiroKit.md5(fifteen, "SA;d5#")); |
| | | driver.setName(zero); |
| | | if ("男".equals(one)){ |
| | | driver.setSex(1); |
| | | }else if ("女".equals(one)){ |
| | | driver.setSex(2); |
| | | } |
| | | driver.setIdCard(four); |
| | | driver.setDriverAge(Integer.valueOf(three)); |
| | | driver.setDriveCard(two); |
| | | driver.setTaxiAptitudeCard(six); |
| | | driver.setIsPlatCar(2); |
| | | driver.setCompanyId(companyId); |
| | | driver.setFranchiseeId(franchiseeId); |
| | | driver.setState(1); |
| | | driver.setAuthState(1); |
| | | driver.setFlag("1"); |
| | | driver.setInsertUser(ShiroKit.getUser().getId()); |
| | | driver.setInsertTime(new Date()); |
| | | driver.setAddType(4); |
| | | driver.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(five)){ |
| | | driver.setDriverAddress(five); |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | | //添加专车服务模式 |
| | | if ("是".equals(eight)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(1); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加出租车服务模式 |
| | | if ("是".equals(nine)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(2); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加跨城出行服务模式 |
| | | if ("是".equals(ten)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(3); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件同城物流服务模式 |
| | | if ("是".equals(eleven)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(4); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(twelve)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加包车服务模式 |
| | | if ("是".equals(thirteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(6); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return SUCCESS_TIP; |
| | | public Object detail(@PathVariable("tDriverId") Integer tDriverId) { |
| | | return tDriverService.selectById(tDriverId); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyService itCompanyService; |
| | | |
| | | @Autowired |
| | | private ITDriverServiceService itDriverServiceService; |
| | | |
| | | /** |
| | | * 验证是否可以字符转为整数 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static boolean isInteger(String str) { |
| | | try{ |
| | | String reg = "^[0-9]\\d*$"; |
| | | boolean flag = str.matches(reg); |
| | | return flag; |
| | | }catch(NumberFormatException e) { |
| | | System.out.println("异常:\"" + str + "\"..."); |
| | | return false; |
| | | } |
| | | } |
| | | /** |
| | | * 验证手机号格式是否正确 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static boolean isPhone(String str) { |
| | | try{ |
| | | String reg = "^1\\d{10}$"; |
| | | boolean flag = str.matches(reg); |
| | | return flag; |
| | | }catch(NumberFormatException e) { |
| | | System.out.println("异常:\"" + str + "\"..."); |
| | | return false; |
| | | } |
| | | } |
| | | /** |
| | | * 验证密码长度是否正确 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static boolean isPassword(String str) { |
| | | try{ |
| | | String reg = "^.{6,18}$"; |
| | | boolean flag = str.matches(reg); |
| | | return flag; |
| | | }catch(NumberFormatException e) { |
| | | System.out.println("异常:\"" + str + "\"..."); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导出司机信息 |
| | | */ |
| | | @RequestMapping(value = "/outDriver") |
| | | public void outDriver(HttpServletRequest request, HttpServletResponse response) { |
| | | List<Map<String,Object>> listMap = tDriverService.getDriverListNoPage(ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId()); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | | |
| | | //第一行显示【封装】 |
| | | List<String> twoList = new ArrayList<String>(); |
| | | twoList.add("总计:"); |
| | | twoList.add(String.valueOf(listMap.size())+"条"); |
| | | dataList.add(twoList); |
| | | |
| | | // 列【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | shellList.add("添加时间"); |
| | | shellList.add("姓名"); |
| | | shellList.add("登录账号【手机号】"); |
| | | shellList.add("性别"); |
| | | shellList.add("司机来源"); |
| | | shellList.add("所属分公司"); |
| | | shellList.add("所属加盟商"); |
| | | shellList.add("当前车辆"); |
| | | shellList.add("服务模式"); |
| | | shellList.add("关联线路"); |
| | | shellList.add("评分"); |
| | | shellList.add("历史接单数"); |
| | | shellList.add("历史订单总金额"); |
| | | shellList.add("当前钱包余额"); |
| | | shellList.add("钱包活动余额"); |
| | | shellList.add("钱包收入余额"); |
| | | shellList.add("状态"); |
| | | dataList.add(shellList); |
| | | |
| | | for (Map<String,Object> object : listMap){ |
| | | // 详细数据列【封装】 |
| | | shellList = new ArrayList<String>(); |
| | | if(SinataUtil.isNotEmpty(object.get("insertTime"))){ |
| | | shellList.add(DateUtil.formatDate(DateUtil.parse(object.get("insertTime").toString(),"YYYY-MM-dd HH:mm:ss.S"), "YYYY-MM-dd HH:mm:ss")); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("name"))){ |
| | | shellList.add(object.get("name").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("phone"))){ |
| | | shellList.add(object.get("phone").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("sex"))){ |
| | | shellList.add(object.get("sex").toString() == "1"?"男":"女"); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("addType"))){ |
| | | |
| | | shellList.add(object.get("addType").toString().equals("1")?"司机注册":(object.get("addType").toString().equals("2")?"平台添加":(object.get("addType").toString().equals("3")?"分公司添加":(object.get("addType").toString().equals("4")?"加盟商添加":"")))); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("companyName"))){ |
| | | shellList.add(object.get("companyName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("franchiseeName"))){ |
| | | shellList.add(object.get("franchiseeName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("carLicensePlate"))){ |
| | | shellList.add(object.get("carLicensePlate").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("serverStr"))){ |
| | | shellList.add(object.get("serverStr").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("lineStr"))){ |
| | | shellList.add(object.get("lineStr").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("evaluateNum"))){ |
| | | shellList.add(object.get("evaluateNum").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("historyNum"))){ |
| | | shellList.add(object.get("historyNum").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("historyMoney"))){ |
| | | shellList.add(object.get("historyMoney").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("balance"))){ |
| | | shellList.add(object.get("balance").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("laveActivityMoney"))){ |
| | | shellList.add(object.get("laveActivityMoney").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("laveBusinessMoney"))){ |
| | | shellList.add(object.get("laveBusinessMoney").toString()); |
| | | }else{ |
| | | shellList.add("0"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("authState"))){ |
| | | shellList.add(object.get("authState").toString().equals("1")?"待审核":(object.get("authState").toString().equals("2")?"正常":(object.get("authState").toString().equals("3")?"冻结":(object.get("authState").toString().equals("4")?"已拒绝":"")))); |
| | | |
| | | shellList.add(object.get("authState").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | dataList.add(shellList); |
| | | } |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet("司机信息导出记录"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "司机信息导出记录", dataList,request, response); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TRechargeRecord; |
| | | import com.stylefeng.guns.modular.system.service.ITRechargeRecordService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-20 11:49:58 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tRechargeRecord") |
| | | public class TRechargeRecordController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tRechargeRecord/"; |
| | | |
| | | @Autowired |
| | | private ITRechargeRecordService tRechargeRecordService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tRechargeRecord.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tRechargeRecord_add") |
| | | public String tRechargeRecordAdd() { |
| | | return PREFIX + "tRechargeRecord_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tRechargeRecord_update/{tRechargeRecordId}") |
| | | public String tRechargeRecordUpdate(@PathVariable Integer tRechargeRecordId, Model model) { |
| | | TRechargeRecord tRechargeRecord = tRechargeRecordService.selectById(tRechargeRecordId); |
| | | model.addAttribute("item",tRechargeRecord); |
| | | LogObjectHolder.me().set(tRechargeRecord); |
| | | return PREFIX + "tRechargeRecord_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tRechargeRecordService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TRechargeRecord tRechargeRecord) { |
| | | tRechargeRecordService.insert(tRechargeRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tRechargeRecordId) { |
| | | tRechargeRecordService.deleteById(tRechargeRecordId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TRechargeRecord tRechargeRecord) { |
| | | tRechargeRecordService.updateById(tRechargeRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tRechargeRecordId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tRechargeRecordId") Integer tRechargeRecordId) { |
| | | return tRechargeRecordService.selectById(tRechargeRecordId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-20 14:21:02 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tRegion") |
| | | public class TRegionController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tRegion/"; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tRegion.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tRegion_add") |
| | | public String tRegionAdd() { |
| | | return PREFIX + "tRegion_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tRegion_update/{tRegionId}") |
| | | public String tRegionUpdate(@PathVariable Integer tRegionId, Model model) { |
| | | TRegion tRegion = tRegionService.selectById(tRegionId); |
| | | model.addAttribute("item",tRegion); |
| | | LogObjectHolder.me().set(tRegion); |
| | | return PREFIX + "tRegion_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tRegionService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TRegion tRegion) { |
| | | tRegionService.insert(tRegion); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tRegionId) { |
| | | tRegionService.deleteById(tRegionId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TRegion tRegion) { |
| | | tRegionService.updateById(tRegion); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tRegionId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tRegionId") Integer tRegionId) { |
| | | return tRegionService.selectById(tRegionId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.resp; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TAgent; |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | public class TAgentResp extends TAgent { |
| | | |
| | | @ApiModelProperty(value = "订单数量") |
| | | private Integer orderSum; |
| | | |
| | | @ApiModelProperty(value = "有效订单") |
| | | private Integer validOrder; |
| | | |
| | | @ApiModelProperty(value = "已发放优惠券") |
| | | private Integer issuedCoupon; |
| | | |
| | | @ApiModelProperty(value = "已使用优惠券") |
| | | private Integer usedCoupon; |
| | | |
| | | @ApiModelProperty(value = "累计优惠券金额") |
| | | private BigDecimal couponPriceSum; |
| | | |
| | | @ApiModelProperty(value = "司机充值") |
| | | private BigDecimal driverRecharge; |
| | | |
| | | @ApiModelProperty(value = "司机数") |
| | | private Integer driverCount; |
| | | |
| | | public Integer getOrderSum() { |
| | | return orderSum; |
| | | } |
| | | |
| | | public void setOrderSum(Integer orderSum) { |
| | | this.orderSum = orderSum; |
| | | } |
| | | |
| | | public Integer getValidOrder() { |
| | | return validOrder; |
| | | } |
| | | |
| | | public void setValidOrder(Integer validOrder) { |
| | | this.validOrder = validOrder; |
| | | } |
| | | |
| | | public Integer getIssuedCoupon() { |
| | | return issuedCoupon; |
| | | } |
| | | |
| | | public void setIssuedCoupon(Integer issuedCoupon) { |
| | | this.issuedCoupon = issuedCoupon; |
| | | } |
| | | |
| | | public Integer getUsedCoupon() { |
| | | return usedCoupon; |
| | | } |
| | | |
| | | public void setUsedCoupon(Integer usedCoupon) { |
| | | this.usedCoupon = usedCoupon; |
| | | } |
| | | |
| | | public BigDecimal getCouponPriceSum() { |
| | | return couponPriceSum; |
| | | } |
| | | |
| | | public void setCouponPriceSum(BigDecimal couponPriceSum) { |
| | | this.couponPriceSum = couponPriceSum; |
| | | } |
| | | |
| | | public BigDecimal getDriverRecharge() { |
| | | return driverRecharge; |
| | | } |
| | | |
| | | public void setDriverRecharge(BigDecimal driverRecharge) { |
| | | this.driverRecharge = driverRecharge; |
| | | } |
| | | |
| | | public Integer getDriverCount() { |
| | | return driverCount; |
| | | } |
| | | |
| | | public void setDriverCount(Integer driverCount) { |
| | | this.driverCount = driverCount; |
| | | } |
| | | } |
| | |
| | | lineShiftDriverMapper.updateById(lineShiftDriver); |
| | | if(lineShiftDriver.getLaveSeat() >= lineShiftDriver.getTotalSeat()){ |
| | | TDriver driver = tDriverService.selectById(orderCrossCity.getDriverId()); |
| | | driver.setState(2); |
| | | // driver.setState(2); |
| | | tDriverService.updateById(driver); |
| | | } |
| | | } |
| | |
| | | if(income.getUserType() == 2){//处理司机的收入 |
| | | TDriver driver = tDriverService.selectById(income.getObjectId()); |
| | | driver.setBalance(driver.getBalance().subtract(new BigDecimal(income.getMoney()))); |
| | | driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | driver.setBusinessMoney(new BigDecimal(driver.getBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | // driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | // driver.setBusinessMoney(new BigDecimal(driver.getBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | tDriverService.updateById(driver); |
| | | } |
| | | Income income1 = new Income(); |
| | |
| | | if(income.getUserType() == 2){//处理司机的收入 |
| | | TDriver driver = tDriverService.selectById(income.getObjectId()); |
| | | driver.setBalance(driver.getBalance().subtract(new BigDecimal(income.getMoney()))); |
| | | driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | driver.setBusinessMoney(new BigDecimal(driver.getBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | // driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | // driver.setBusinessMoney(new BigDecimal(driver.getBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | tDriverService.updateById(driver); |
| | | } |
| | | Income income1 = new Income(); |
| | |
| | | //修改之前司机状态 -- 空闲 |
| | | if(null != tOrderPrivateCar.getDriverId()){ |
| | | TDriver driver = tDriverService.selectById(tOrderPrivateCar.getDriverId()); |
| | | driver.setState(2); |
| | | // driver.setState(2); |
| | | tDriverService.updateById(driver); |
| | | } |
| | | |
| | |
| | | |
| | | //修改司机状态"空闲" |
| | | TDriver driver = itDriverService.selectById(tReassign.getOriginalDriverId()); |
| | | driver.setState(2); |
| | | // driver.setState(2); |
| | | itDriverService.updateById(driver); |
| | | |
| | | //添加取消记录 |
| | |
| | | lineShiftDriverMapper.updateById(lineShiftDriver); |
| | | if(lineShiftDriver.getLaveSeat() >= lineShiftDriver.getTotalSeat()){ |
| | | TDriver driver = itDriverService.selectById(tReassign.getOriginalDriverId()); |
| | | driver.setState(2); |
| | | // driver.setState(2); |
| | | itDriverService.updateById(driver); |
| | | } |
| | | |
| | |
| | | if(income.getUserType() == 2){//处理司机的收入 |
| | | TDriver driver = itDriverService.selectById(income.getObjectId()); |
| | | driver.setBalance(driver.getBalance().subtract(new BigDecimal(income.getMoney()))); |
| | | driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | driver.setBusinessMoney(new BigDecimal(driver.getBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | // driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | // driver.setBusinessMoney(new BigDecimal(driver.getBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | itDriverService.updateById(driver); |
| | | } |
| | | Income income1 = new Income(); |
| | |
| | | if(income.getUserType() == 2){//处理司机的收入 |
| | | TDriver driver = itDriverService.selectById(income.getObjectId()); |
| | | driver.setBalance(driver.getBalance().subtract(new BigDecimal(income.getMoney()))); |
| | | driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | driver.setBusinessMoney(new BigDecimal(driver.getBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | // driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | // driver.setBusinessMoney(new BigDecimal(driver.getBusinessMoney()).subtract(new BigDecimal(income.getMoney())).doubleValue()); |
| | | itDriverService.updateById(driver); |
| | | } |
| | | Income income1 = new Income(); |
| | |
| | | |
| | | //修改之前司机状态 -- 空闲 |
| | | TDriver oldDriver = itDriverService.selectById(tReassign.getOriginalDriverId()); |
| | | oldDriver.setState(2); |
| | | // oldDriver.setState(2); |
| | | itDriverService.updateById(oldDriver); |
| | | |
| | | //查找司机对象 |
| | | TDriver nowDriver = itDriverService.selectById(driverId); |
| | | nowDriver.setState(3); |
| | | // nowDriver.setState(3); |
| | | itDriverService.updateById(nowDriver); |
| | | |
| | | //修改专车订单 |
| | | tOrderPrivateCar.setState(tOrderPrivateCar.getOldState()); |
| | | tOrderPrivateCar.setDriverId(driverId); |
| | | tOrderPrivateCar.setCarId(nowDriver.getCarId()); |
| | | // tOrderPrivateCar.setCarId(nowDriver.getCarId()); |
| | | itOrderPrivateCarService.updateById(tOrderPrivateCar); |
| | | |
| | | //修改专车改派订单 |
| | | tReassign.setNowDriverId(driverId); |
| | | tReassign.setNowCarId(nowDriver.getCarId()); |
| | | // tReassign.setNowCarId(nowDriver.getCarId()); |
| | | tReassign.setState(3); |
| | | tReassign.setCompleteTime(new Date()); |
| | | tReassignService.updateById(tReassign); |
| | |
| | | lineShiftDriver.setLaveSeatNumber(seat); |
| | | lineShiftDriverMapper.updateById(lineShiftDriver); |
| | | if(lineShiftDriver.getLaveSeat() >= lineShiftDriver.getTotalSeat()){ |
| | | oldDriver.setState(2); |
| | | // oldDriver.setState(2); |
| | | itDriverService.updateById(oldDriver); |
| | | } |
| | | |
| | |
| | | lineShiftDriver1.setLaveSeatNumber(seat2); |
| | | lineShiftDriverMapper.updateById(lineShiftDriver1); |
| | | TDriver driver = itDriverService.selectById(driverId); |
| | | if(driver.getState() == 1){ |
| | | /*if(driver.getState() == 1){ |
| | | return ResultUtil.error("司机还未上班呢"); |
| | | } |
| | | if(driver.getState() == 2){ |
| | | driver.setState(3); |
| | | } |
| | | }*/ |
| | | |
| | | //修改订单数据 |
| | | tOrderCrossCity.setDriverId(driverId); |
| | | tOrderCrossCity.setCarId(driver.getCarId()); |
| | | // tOrderCrossCity.setCarId(driver.getCarId()); |
| | | tOrderCrossCity.setSeatNumber(seat1); |
| | | tOrderCrossCity.setState(tOrderCrossCity.getOldState()); |
| | | tOrderCrossCity.setLineShiftDriverId(lineShiftDriver1.getId()); |
| | |
| | | |
| | | //修改专车改派订单 |
| | | tReassign.setNowDriverId(driverId); |
| | | tReassign.setNowCarId(driver.getCarId()); |
| | | // tReassign.setNowCarId(driver.getCarId()); |
| | | tReassign.setState(3); |
| | | tReassign.setCompleteTime(new Date()); |
| | | tReassignService.updateById(tReassign); |
| | |
| | | income.setObjectId(driverId); |
| | | incomeService.updateById(income); |
| | | |
| | | oldDriver.setBusinessMoney(oldDriver.getBusinessMoney() - income.getMoney()); |
| | | oldDriver.setLaveBusinessMoney(oldDriver.getLaveBusinessMoney() - income.getMoney()); |
| | | // oldDriver.setBusinessMoney(oldDriver.getBusinessMoney() - income.getMoney()); |
| | | // oldDriver.setLaveBusinessMoney(oldDriver.getLaveBusinessMoney() - income.getMoney()); |
| | | oldDriver.setBalance(oldDriver.getBalance().subtract(new BigDecimal(income.getMoney()))); |
| | | |
| | | driver.setBusinessMoney(driver.getBusinessMoney() + income.getMoney()); |
| | | driver.setLaveBusinessMoney(driver.getLaveBusinessMoney() + income.getMoney()); |
| | | // driver.setBusinessMoney(driver.getBusinessMoney() + income.getMoney()); |
| | | // driver.setLaveBusinessMoney(driver.getLaveBusinessMoney() + income.getMoney()); |
| | | driver.setBalance(driver.getBalance().add(new BigDecimal(income.getMoney()))); |
| | | |
| | | } |
| | |
| | | //修改专车订单 |
| | | tOrderLogistics.setState(tOrderLogistics.getOldState()); |
| | | tOrderLogistics.setDriverId(driverId); |
| | | tOrderLogistics.setCarId(nowDriver.getCarId()); |
| | | // tOrderLogistics.setCarId(nowDriver.getCarId()); |
| | | orderLogisticsService.updateById(tOrderLogistics); |
| | | |
| | | tReassign.setNowDriverId(driverId); |
| | | tReassign.setNowCarId(nowDriver.getCarId()); |
| | | // tReassign.setNowCarId(nowDriver.getCarId()); |
| | | tReassign.setState(3); |
| | | tReassign.setCompleteTime(new Date()); |
| | | tReassignService.updateById(tReassign); |
| | |
| | | |
| | | TDriver driver = itDriverService.selectById(tReassign.getOriginalDriverId()); |
| | | driver.setBalance(driver.getBalance().subtract(new BigDecimal(income.getMoney()))); |
| | | driver.setBusinessMoney(driver.getBusinessMoney() - income.getMoney()); |
| | | driver.setLaveBusinessMoney(driver.getLaveBusinessMoney() - income.getMoney()); |
| | | // driver.setBusinessMoney(driver.getBusinessMoney() - income.getMoney()); |
| | | // driver.setLaveBusinessMoney(driver.getLaveBusinessMoney() - income.getMoney()); |
| | | itDriverService.updateById(driver); |
| | | |
| | | driver = itDriverService.selectById(driverId); |
| | | driver.setBalance(driver.getBalance().add(new BigDecimal(income.getMoney()))); |
| | | driver.setBusinessMoney(driver.getBusinessMoney() + income.getMoney()); |
| | | driver.setLaveBusinessMoney(driver.getLaveBusinessMoney() + income.getMoney()); |
| | | // driver.setBusinessMoney(driver.getBusinessMoney() + income.getMoney()); |
| | | // driver.setLaveBusinessMoney(driver.getLaveBusinessMoney() + income.getMoney()); |
| | | itDriverService.updateById(driver); |
| | | } |
| | | |
| | |
| | | itCompanyService.updateById(company); |
| | | |
| | | //设置该分公司下的所有司机状态 |
| | | itDriverService.updateCompanyDriverState(3,company.getId()); |
| | | // itDriverService.updateCompanyDriverState(3,company.getId()); |
| | | |
| | | }else if (user.getRoleType() == 3){ |
| | | //查询加盟商 |
| | |
| | | itCompanyService.updateById(franchisee); |
| | | |
| | | //设置该加盟商下的所有司机状态 |
| | | itDriverService.updateFranchiseeDriverState(3,franchisee.getId()); |
| | | // itDriverService.updateFranchiseeDriverState(3,franchisee.getId()); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | itCompanyService.updateById(company); |
| | | |
| | | //设置该分公司下的所有司机状态 |
| | | itDriverService.updateCompanyDriverState(2,company.getId()); |
| | | // itDriverService.updateCompanyDriverState(2,company.getId()); |
| | | |
| | | }else if (user.getRoleType() == 3){ |
| | | //查询加盟商 |
| | |
| | | itCompanyService.updateById(franchisee); |
| | | |
| | | //设置该加盟商下的所有司机状态 |
| | | itDriverService.updateFranchiseeDriverState(2,franchisee.getId()); |
| | | // itDriverService.updateFranchiseeDriverState(2,franchisee.getId()); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | |
| | | //修改之前司机状态 -- 空闲 |
| | | TDriver oldDriver = tDriverService.selectById(tOrderTaxi.getDriverId()); |
| | | oldDriver.setState(2); |
| | | // oldDriver.setState(2); |
| | | tDriverService.updateById(oldDriver); |
| | | |
| | | //查找司机对象 |
| | | TDriver nowDriver = tDriverService.selectById(driverId); |
| | | nowDriver.setState(3); |
| | | // nowDriver.setState(3); |
| | | tDriverService.updateById(nowDriver); |
| | | |
| | | //修改出租车订单 |
| | | tOrderTaxi.setState(tOrderTaxi.getOldState()); |
| | | tOrderTaxi.setDriverId(driverId); |
| | | tOrderTaxi.setCarId(nowDriver.getCarId()); |
| | | // tOrderTaxi.setCarId(nowDriver.getCarId()); |
| | | tOrderTaxiService.updateById(tOrderTaxi); |
| | | |
| | | //增加推送 |
| | |
| | | |
| | | //修改之前司机状态 -- 空闲 |
| | | TDriver driver = tDriverService.selectById(tOrderTaxi.getDriverId()); |
| | | driver.setState(2); |
| | | // driver.setState(2); |
| | | tDriverService.updateById(driver); |
| | | |
| | | tOrderTaxi.setState(10); |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TAgent; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 代理商 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @Mapper |
| | | public interface TAgentMapper extends BaseMapper<TAgent> { |
| | | |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 司机表 Mapper 接口 |
| | | * 司机基础信息 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-04 |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @Mapper |
| | | public interface TDriverMapper extends BaseMapper<TDriver> { |
| | | |
| | | /** |
| | | * 根据条件查询待审核司机列表 |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getAuthDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("companyName") String companyName, |
| | | @Param("phone") String phone, |
| | | @Param("account") String account, |
| | | @Param("addType") Integer addType, |
| | | @Param("authState") Integer authState); |
| | | |
| | | /** |
| | | * 根据用户ID获取用户详情 |
| | | * @param driverId |
| | | * @return |
| | | */ |
| | | Map<String,Object> getDriverById(@Param("driverId") Integer driverId); |
| | | |
| | | /** |
| | | * 根据审核通过的司机列表 |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("roleType") Integer roleType, |
| | | @Param("nowUserId") Integer nowUserId, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("companyName") String companyName, |
| | | @Param("phone") String phone, |
| | | @Param("name") String name, |
| | | @Param("addType") Integer addType, |
| | | @Param("authState") Integer authState); |
| | | |
| | | /** |
| | | * 查询已被使用的车辆ID |
| | | * @return |
| | | */ |
| | | String getUseCarIdStr(@Param("carId") Integer carId); |
| | | |
| | | /** |
| | | * 查询当前可被选择的车辆列表 |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getCanSelectCarList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("roleType") Integer roleType, |
| | | @Param("nowUserId") Integer nowUserId, |
| | | @Param("carIdStr") String carIdStr, |
| | | @Param("carLicensePlate") String carLicensePlate, |
| | | @Param("brandName") String brandName, |
| | | @Param("modelName") String modelName, |
| | | @Param("color") String color, |
| | | @Param("serverStr") String serverStr); |
| | | |
| | | /** |
| | | * 修改分公司司机的状态 |
| | | */ |
| | | void updateCompanyDriverState( @Param("authState") Integer authState, @Param("companyId") Integer companyId); |
| | | |
| | | /** |
| | | * 修改加盟商司机的状态 |
| | | */ |
| | | void updateFranchiseeDriverState( @Param("authState") Integer authState, @Param("franchiseeId") Integer franchiseeId); |
| | | |
| | | /** |
| | | * 根据审核通过的司机列表无分页 |
| | | * @return |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getDriverListNoPage(@Param("roleType") Integer roleType, |
| | | @Param("nowUserId") Integer nowUserId); |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TRechargeRecord; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充值记录 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @Mapper |
| | | public interface TRechargeRecordMapper extends BaseMapper<TRechargeRecord> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 省市区三级联动 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-02 |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @Mapper |
| | | public interface TRegionMapper extends BaseMapper<TRegion> { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.TAgentMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TAgent"> |
| | | <id column="id" property="id" /> |
| | | <result column="principal" property="principal" /> |
| | | <result column="principalPhone" property="principalPhone" /> |
| | | <result column="email" property="email" /> |
| | | <result column="provinceCode" property="provinceCode" /> |
| | | <result column="provinceName" property="provinceName" /> |
| | | <result column="cityCode" property="cityCode" /> |
| | | <result column="cityName" property="cityName" /> |
| | | <result column="status" property="status" /> |
| | | <result column="createTime" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, principal, principalPhone, email, provinceCode, provinceName, cityCode, cityName, status, createTime |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TDriver"> |
| | | <id column="id" property="id" /> |
| | | <result column="account" property="account" /> |
| | | <result column="jobNumber" property="jobNumber" /> |
| | | <result column="code" property="code" /> |
| | | <result column="name" property="name" /> |
| | | <result column="avatar" property="avatar" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="password" property="password" /> |
| | | <result column="name" property="name" /> |
| | | <result column="sex" property="sex" /> |
| | | <result column="idCard" property="idCard" /> |
| | | <result column="companyId" property="companyId" /> |
| | | <result column="headImgUrl" property="headImgUrl" /> |
| | | <result column="faceImgUrl" property="faceImgUrl" /> |
| | | <result column="idCardImgUrl1" property="idCardImgUrl1" /> |
| | | <result column="idCardImgUrl2" property="idCardImgUrl2" /> |
| | | <result column="placeOfEmployment" property="placeOfEmployment" /> |
| | | <result column="birthday" property="birthday" /> |
| | | <result column="bankCardNumber" property="bankCardNumber" /> |
| | | <result column="driverNationality" property="driverNationality" /> |
| | | <result column="driverNation" property="driverNation" /> |
| | | <result column="driverMaritalStatus" property="driverMaritalStatus" /> |
| | | <result column="driverLanguageLevel" property="driverLanguageLevel" /> |
| | | <result column="driverEducation" property="driverEducation" /> |
| | | <result column="driverCensus" property="driverCensus" /> |
| | | <result column="driverAddress" property="driverAddress" /> |
| | | <result column="driverContactAddress" property="driverContactAddress" /> |
| | | <result column="driverAge" property="driverAge" /> |
| | | <result column="driveCard" property="driveCard" /> |
| | | <result column="driveCardImgUrl" property="driveCardImgUrl" /> |
| | | <result column="driverType" property="driverType" /> |
| | | <result column="getDriverLicenseDate" property="getDriverLicenseDate" /> |
| | | <result column="driverLicenseOn" property="driverLicenseOn" /> |
| | | <result column="driverLicenseOff" property="driverLicenseOff" /> |
| | | <result column="taxiDriver" property="taxiDriver" /> |
| | | <result column="taxiAptitudeCard" property="taxiAptitudeCard" /> |
| | | <result column="networkCarlssueImg" property="networkCarlssueImg" /> |
| | | <result column="networkCarlssueOrganization" property="networkCarlssueOrganization" /> |
| | | <result column="networkCarlssueDate" property="networkCarlssueDate" /> |
| | | <result column="getNetworkCarProofDate" property="getNetworkCarProofDate" /> |
| | | <result column="networkCarProofOn" property="networkCarProofOn" /> |
| | | <result column="networkCarProofOff" property="networkCarProofOff" /> |
| | | <result column="registerDate" property="registerDate" /> |
| | | <result column="fullTimeDriver" property="fullTimeDriver" /> |
| | | <result column="inDriverBlacklist" property="inDriverBlacklist" /> |
| | | <result column="commercialType" property="commercialType" /> |
| | | <result column="contractCompany" property="contractCompany" /> |
| | | <result column="contractOn" property="contractOn" /> |
| | | <result column="contractOff" property="contractOff" /> |
| | | <result column="source" property="source" /> |
| | | <result column="emergencyContact" property="emergencyContact" /> |
| | | <result column="emergencyContactPhone" property="emergencyContactPhone" /> |
| | | <result column="emergencyContactAddress" property="emergencyContactAddress" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="isPlatCar" property="isPlatCar" /> |
| | | <result column="carId" property="carId" /> |
| | | <result column="authState" property="authState" /> |
| | | <result column="state" property="state" /> |
| | | <result column="flag" property="flag" /> |
| | | <result column="insertTime" property="insertTime" /> |
| | | <result column="insertUser" property="insertUser" /> |
| | | <result column="updateTime" property="updateTime" /> |
| | | <result column="updateUser" property="updateUser" /> |
| | | <result column="addType" property="addType" /> |
| | | <result column="laveBusinessMoney" property="laveBusinessMoney"/> |
| | | <result column="businessMoney" property="businessMoney"/> |
| | | <result column="emergencyPhone" property="emergencyPhone" /> |
| | | <result column="driverLicenseNumber" property="driverLicenseNumber" /> |
| | | <result column="driverLicense" property="driverLicense" /> |
| | | <result column="idcard" property="idcard" /> |
| | | <result column="idcardFront" property="idcardFront" /> |
| | | <result column="idcardBack" property="idcardBack" /> |
| | | <result column="inviterType" property="inviterType" /> |
| | | <result column="inviterId" property="inviterId" /> |
| | | <result column="agentId" property="agentId" /> |
| | | <result column="branchOfficeId" property="branchOfficeId" /> |
| | | <result column="balance" property="balance" /> |
| | | <result column="approvalStatus" property="approvalStatus" /> |
| | | <result column="approvalNotes" property="approvalNotes" /> |
| | | <result column="approvalUserId" property="approvalUserId" /> |
| | | <result column="approvalTime" property="approvalTime" /> |
| | | <result column="serverStatus" property="serverStatus" /> |
| | | <result column="integral" property="integral" /> |
| | | <result column="status" property="status" /> |
| | | <result column="createTime" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, account, jobNumber, phone, password, name, sex, idCard, companyId, headImgUrl, faceImgUrl, idCardImgUrl1, idCardImgUrl2, placeOfEmployment, birthday, bankCardNumber, driverNationality, driverNation, driverMaritalStatus, driverLanguageLevel, driverEducation, driverCensus, driverAddress, driverContactAddress, licenseCode, licenselImgUrl, driverAge, driveCard, driveCardImgUrl, driverType, getDriverLicenseDate, driverLicenseOn, driverLicenseOff, taxiDriver, taxiAptitudeCard, networkCarlssueImg, networkCarlssueOrganization, networkCarlssueDate, getNetworkCarProofDate, networkCarProofOn, networkCarProofOff, registerDate, fullTimeDriver, inDriverBlacklist, commercialType, contractCompany, contractOn, contractOff, emergencyContact, emergencyContactPhone, emergencyContactAddress, remark, isPlatCar, carId, authState, state, flag, insertTime, insertUser, updateTime, updateUser, addType |
| | | id, code, name, avatar, phone, password, sex, source, emergencyContact, emergencyPhone, driverLicenseNumber, driverLicense, idcard, idcardFront, idcardBack, inviterType, inviterId, agentId, branchOfficeId, balance, approvalStatus, approvalNotes, approvalUserId, approvalTime, serverStatus, integral, status, createTime |
| | | </sql> |
| | | |
| | | <!--根据条件查询待审核司机列表--> |
| | | <select id="getAuthDriverList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT cc1.`name` as companyName,cc2.`name` as franchiseeName,ds.serverStr,dd.* from t_driver as dd |
| | | LEFT JOIN (select * from t_company where type = 2 and flag != 3) as cc1 on cc1.id = dd.companyId |
| | | LEFT JOIN (select * from t_company where type = 3 and flag != 3) as cc2 on cc2.id = dd.franchiseeId |
| | | LEFT JOIN ( |
| | | SELECT |
| | | GROUP_CONCAT(case when type = 1 then '专车' |
| | | when type = 2 then '出租车' |
| | | when type = 3 then '跨城出行' |
| | | when type = 4 then '小件物流-同城' |
| | | when type = 5 then '小件物流-跨城' |
| | | when type = 6 then '包车' |
| | | else '' end ) as serverStr,driverId from t_driver_service GROUP BY driverId) as ds on ds.driverId = dd.id |
| | | ) as o |
| | | <where> |
| | | FIND_IN_SET(o.authState,'1,4') and o.flag != 3 |
| | | <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> |
| | | AND (o.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="companyName != null and companyName != ''"> |
| | | and (o.companyName LIKE CONCAT('%',#{companyName},'%') or o.franchiseeName LIKE CONCAT('%',#{companyName},'%')) |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | | and o.phone LIKE CONCAT('%',#{phone},'%') |
| | | </if> |
| | | <if test="account != null and account != ''"> |
| | | and o.account LIKE CONCAT('%',#{account},'%') |
| | | </if> |
| | | <if test="addType != null and addType != ''"> |
| | | and o.addType = #{addType} |
| | | </if> |
| | | <if test="authState != null and authState != ''"> |
| | | and o.authState = #{authState} |
| | | </if> |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | | |
| | | <!--根据用户ID获取用户详情--> |
| | | <select id="getDriverById" resultType="map"> |
| | | SELECT cc.`name` as companyName,ds.serverStr, |
| | | case when dd.addType = 1 then '司机注册' when dd.addType = 2 then '平台添加' when dd.addType = 3 then '分公司添加' when dd.addType = 4 then '加盟商添加' else '' end as addTypeStr, |
| | | case when dd.sex = 1 then '男' when dd.sex = 2 then '女' else '' end as sexStr, |
| | | case when dd.authState = 1 then '待审核' when dd.authState = 2 then '正常' when dd.authState = 3 then '冻结' when dd.authState = 4 then '已拒绝' end as authStateStr, |
| | | dd.* from t_driver as dd |
| | | LEFT JOIN (select * from t_company where flag != 3) as cc on cc.id = dd.companyId |
| | | LEFT JOIN ( |
| | | SELECT |
| | | GROUP_CONCAT(case when type = 1 then '专车' |
| | | when type = 2 then '出租车' |
| | | when type = 3 then '跨城出行' |
| | | when type = 4 then '小件物流-同城' |
| | | when type = 5 then '小件物流-跨城' |
| | | when type = 6 then '包车' |
| | | else '' end SEPARATOR '、') as serverStr,driverId from t_driver_service GROUP BY driverId) as ds on ds.driverId = dd.id |
| | | where dd.id = #{driverId} |
| | | </select> |
| | | |
| | | <!--根据审核通过的司机列表--> |
| | | <select id="getDriverList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT cc1.`name` as companyName,cc2.`name` as franchiseeName,ci.carLicensePlate,ds.serverStr,IFNULL(oe.evaluateNum,0) as evaluateNum, |
| | | (IFNULL(ot1.taxiNum, 0) + IFNULL(ot3.num, 0) + IFNULL(ot5.num, 0) + IFNULL(ot7.num, 0)) as historyNum,(IFNULL(ot2.taxiMoney, 0)+ IFNULL(ot4.money, 0) + IFNULL(ot6.money, 0) + IFNULL(ot8.money, 0)) as historyMoney,dd.* from t_driver as dd |
| | | LEFT JOIN (select * from t_company where type = 2 and flag != 3) as cc1 on cc1.id = dd.companyId |
| | | LEFT JOIN (select * from t_company where type = 3 and flag != 3) as cc2 on cc2.id = dd.franchiseeId |
| | | LEFT JOIN (select * from t_car where state = 1) as ci on ci.id = dd.carId |
| | | LEFT JOIN ( |
| | | SELECT |
| | | GROUP_CONCAT(case when type = 1 then '专车' |
| | | when type = 2 then '出租车' |
| | | when type = 3 then '跨城出行' |
| | | when type = 4 then '小件物流-同城' |
| | | when type = 5 then '小件物流-跨城' |
| | | when type = 6 then '包车' |
| | | else '' end ) as serverStr,driverId from t_driver_service GROUP BY driverId) as ds on ds.driverId = dd.id |
| | | LEFT JOIN (SELECT IFNULL(SUM(fraction)/COUNT(id),0) as evaluateNum,driverId FROM t_order_evaluate GROUP BY driverId) as oe on oe.driverId = dd.id |
| | | LEFT JOIN (SELECT COUNT(id) as taxiNum,driverId FROM t_order_taxi where FIND_IN_SET(state,'7,8,9') GROUP BY driverId) as ot1 on ot1.driverId = dd.id |
| | | LEFT JOIN (SELECT SUM(orderMoney) as taxiMoney,driverId FROM t_order_taxi where FIND_IN_SET(state,'7,8,9') GROUP BY driverId) as ot2 on ot2.driverId = dd.id |
| | | LEFT JOIN (SELECT COUNT(id) as num,driverId FROM t_order_private_car where FIND_IN_SET(state,'7,8,9') GROUP BY driverId) as ot3 on ot3.driverId = dd.id |
| | | LEFT JOIN (SELECT SUM(orderMoney) as money,driverId FROM t_order_private_car where FIND_IN_SET(state,'7,8,9') GROUP BY driverId) as ot4 on ot4.driverId = dd.id |
| | | LEFT JOIN (SELECT COUNT(id) as num,driverId FROM t_order_cross_city where FIND_IN_SET(state,'6,8,9') GROUP BY driverId) as ot5 on ot5.driverId = dd.id |
| | | LEFT JOIN (SELECT SUM(orderMoney) as money,driverId FROM t_order_cross_city where FIND_IN_SET(state,'6,8,9') GROUP BY driverId) as ot6 on ot6.driverId = dd.id |
| | | LEFT JOIN (SELECT COUNT(id) as num,driverId FROM t_order_logistics where FIND_IN_SET(state,'6,9') GROUP BY driverId) as ot7 on ot7.driverId = dd.id |
| | | LEFT JOIN (SELECT SUM(orderMoney) as money,driverId FROM t_order_logistics where FIND_IN_SET(state,'6,9') GROUP BY driverId) as ot8 on ot8.driverId = dd.id) as o |
| | | <where> |
| | | o.flag != 3 |
| | | <if test="roleType != null and roleType != '' and roleType == 1"> |
| | | and FIND_IN_SET(o.authState,'2,3') |
| | | </if> |
| | | <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> |
| | | AND (o.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="companyName != null and companyName != ''"> |
| | | and (o.companyName LIKE CONCAT('%',#{companyName},'%') or o.franchiseeName LIKE CONCAT('%',#{companyName},'%')) |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | | and o.phone LIKE CONCAT('%',#{phone},'%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and o.name LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="addType != null and addType != ''"> |
| | | and o.addType = #{addType} |
| | | </if> |
| | | <if test="authState != null and authState != ''"> |
| | | and o.authState = #{authState} |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType == 2"> |
| | | and (o.companyId = #{nowUserId} or FIND_IN_SET(o.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId))) |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType == 3"> |
| | | and o.franchiseeId = #{nowUserId} |
| | | </if> |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | | |
| | | <!--查询已被使用的车辆ID--> |
| | | <select id="getUseCarIdStr" resultType="java.lang.String"> |
| | | SELECT GROUP_CONCAT(dd.carId) as carIdStr from t_driver as dd where dd.authState = 2 and dd.flag != 3 |
| | | <if test="carId != null and carId != '' and carId != 0"> |
| | | and dd.carId != #{carId} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--查询当前可被选择的车辆列表--> |
| | | <select id="getCanSelectCarList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT cm.`name` as modelName,cb.`name` as brandName,ds.serverStr,ci.* from t_car as ci |
| | | LEFT JOIN (select * from t_car_model where state = 1) as cm on cm.id = ci.carModelId |
| | | LEFT JOIN (select * from t_car_brand where state = 1) as cb on cb.id = ci.carBrandId |
| | | LEFT JOIN ( |
| | | SELECT |
| | | GROUP_CONCAT(case when type = 1 then '专车' |
| | | when type = 2 then '出租车' |
| | | when type = 3 then '跨城出行' |
| | | when type = 4 then '小件物流-同城' |
| | | when type = 5 then '小件物流-跨城' |
| | | when type = 6 then '包车' |
| | | else '' end ) as serverStr,carId from t_car_service GROUP BY carId) as ds on ds.carId = ci.id) as o |
| | | <where> |
| | | o.state = 1 |
| | | <if test="carIdStr != null and carIdStr != ''"> |
| | | and not FIND_IN_SET(o.id,#{carIdStr}) |
| | | </if> |
| | | <if test="carLicensePlate != null and carLicensePlate != ''"> |
| | | and o.carLicensePlate LIKE CONCAT('%',#{carLicensePlate},'%') |
| | | </if> |
| | | <if test="brandName != null and brandName != ''"> |
| | | and o.brandName LIKE CONCAT('%',#{brandName},'%') |
| | | </if> |
| | | <if test="modelName != null and modelName != ''"> |
| | | and o.modelName LIKE CONCAT('%',#{modelName},'%') |
| | | </if> |
| | | <if test="color != null and color != ''"> |
| | | and o.carColor LIKE CONCAT('%',#{color},'%') |
| | | </if> |
| | | <if test="serverStr != null and serverStr != ''"> |
| | | and o.serverStr LIKE CONCAT('%',#{serverStr},'%') |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType == 2"> |
| | | and (o.companyId = #{nowUserId} or FIND_IN_SET(o.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where type = 3 and superiorId = #{nowUserId} GROUP BY superiorId))) |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType == 3"> |
| | | and o.franchiseeId = #{nowUserId} |
| | | </if> |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | | |
| | | <!--修改分公司司机的状态--> |
| | | <update id="updateCompanyDriverState" parameterType="java.lang.Integer"> |
| | | update t_driver |
| | | <set> |
| | | <if test="authState != null"> authState = #{authState} </if> |
| | | </set> |
| | | where companyId = #{companyId} and (franchiseeId = 0 or franchiseeId is null) |
| | | </update> |
| | | |
| | | <!--修改加盟商司机的状态--> |
| | | <update id="updateFranchiseeDriverState" parameterType="java.lang.Integer"> |
| | | update t_driver |
| | | <set> |
| | | <if test="authState != null"> authState = #{authState} </if> |
| | | </set> |
| | | where franchiseeId = #{franchiseeId} |
| | | </update> |
| | | |
| | | <!--根据审核通过的司机列表无分页--> |
| | | <select id="getDriverListNoPage" resultType="map"> |
| | | SELECT * FROM (SELECT cc1.`name` as companyName,cc2.`name` as franchiseeName,ci.carLicensePlate,ds.serverStr,IFNULL(oe.evaluateNum,0) as evaluateNum, |
| | | (IFNULL(ot1.taxiNum, 0) + IFNULL(ot3.num, 0) + IFNULL(ot5.num, 0)) as historyNum,(IFNULL(ot2.taxiMoney, 0)+ IFNULL(ot4.money, 0) + IFNULL(ot6.money, 0)) as historyMoney,dd.* from t_driver as dd |
| | | LEFT JOIN (select * from t_company where type = 2 and flag != 3) as cc1 on cc1.id = dd.companyId |
| | | LEFT JOIN (select * from t_company where type = 3 and flag != 3) as cc2 on cc2.id = dd.franchiseeId |
| | | LEFT JOIN (select * from t_car where state = 1) as ci on ci.id = dd.carId |
| | | LEFT JOIN ( |
| | | SELECT |
| | | GROUP_CONCAT(case when type = 1 then '专车' |
| | | when type = 2 then '出租车' |
| | | when type = 3 then '跨城出行' |
| | | when type = 4 then '小件物流-同城' |
| | | when type = 5 then '小件物流-跨城' |
| | | when type = 6 then '包车' |
| | | else '' end ) as serverStr,driverId from t_driver_service GROUP BY driverId) as ds on ds.driverId = dd.id |
| | | LEFT JOIN (SELECT IFNULL(SUM(fraction)/COUNT(id),0) as evaluateNum,driverId FROM t_order_evaluate GROUP BY driverId) as oe on oe.driverId = dd.id |
| | | LEFT JOIN (SELECT COUNT(id) as taxiNum,driverId FROM t_order_taxi where FIND_IN_SET(state,'7,8,9') GROUP BY driverId) as ot1 on ot1.driverId = dd.id |
| | | LEFT JOIN (SELECT SUM(orderMoney) as taxiMoney,driverId FROM t_order_taxi where FIND_IN_SET(state,'8,9') GROUP BY driverId) as ot2 on ot2.driverId = dd.id |
| | | LEFT JOIN (SELECT COUNT(id) as num,driverId FROM t_order_private_car where FIND_IN_SET(state,'7,8,9') GROUP BY driverId) as ot3 on ot3.driverId = dd.id |
| | | LEFT JOIN (SELECT SUM(orderMoney) as money,driverId FROM t_order_private_car where FIND_IN_SET(state,'7,8,9') GROUP BY driverId) as ot4 on ot4.driverId = dd.id |
| | | LEFT JOIN (SELECT COUNT(id) as num,driverId FROM t_order_cross_city where FIND_IN_SET(state,'6,7,8') GROUP BY driverId) as ot5 on ot5.driverId = dd.id |
| | | LEFT JOIN (SELECT SUM(orderMoney) as money,driverId FROM t_order_cross_city where FIND_IN_SET(state,'6,7,8') GROUP BY driverId) as ot6 on ot6.driverId = dd.id |
| | | ) as o |
| | | <where> |
| | | o.flag != 3 |
| | | <if test="roleType != null and roleType != '' and roleType == 1"> |
| | | and FIND_IN_SET(o.authState,'2,3') |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType == 2"> |
| | | and (o.companyId = #{nowUserId} or FIND_IN_SET(o.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId))) |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType == 3"> |
| | | and o.franchiseeId = #{nowUserId} |
| | | </if> |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.TRechargeRecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TRechargeRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="type" property="type" /> |
| | | <result column="userId" property="userId" /> |
| | | <result column="code" property="code" /> |
| | | <result column="amount" property="amount" /> |
| | | <result column="payType" property="payType" /> |
| | | <result column="payTime" property="payTime" /> |
| | | <result column="payStatus" property="payStatus" /> |
| | | <result column="orderNumber" property="orderNumber" /> |
| | | <result column="createTime" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, type, userId, code, amount, payType, payTime, payStatus, orderNumber, createTime |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.enums; |
| | | |
| | | |
| | | |
| | | /** |
| | | * @Description 充值记录状态枚举 |
| | | * @Author xiaochen |
| | | * @Date 2023/02/15 9:42 |
| | | */ |
| | | public enum PayStatusEnum { |
| | | |
| | | TO_BE_PAID(1, "待支付"), |
| | | FINISH(2, "已完成"); |
| | | |
| | | private String desc; |
| | | |
| | | |
| | | private int code; |
| | | |
| | | |
| | | PayStatusEnum(int code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | /** |
| | | * 通过code获取枚举 |
| | | * |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public static PayStatusEnum fromCode(Integer code) { |
| | | PayStatusEnum[] resultTypes = PayStatusEnum.values(); |
| | | for (PayStatusEnum resultType : resultTypes) { |
| | | if (code.equals(resultType.getCode())) { |
| | | return resultType; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.enums; |
| | | |
| | | |
| | | |
| | | /** |
| | | * @Description 用户司机枚举 |
| | | * @Author xiaochen |
| | | * @Date 2023/02/15 9:42 |
| | | */ |
| | | public enum UserTypeEnum { |
| | | |
| | | USER(1, "用户"), |
| | | DRIVER(2, "司机"); |
| | | |
| | | private String desc; |
| | | |
| | | |
| | | private int code; |
| | | |
| | | |
| | | UserTypeEnum(int code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | /** |
| | | * 通过code获取枚举 |
| | | * |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public static UserTypeEnum fromCode(Integer code) { |
| | | UserTypeEnum[] resultTypes = UserTypeEnum.values(); |
| | | for (UserTypeEnum resultType : resultTypes) { |
| | | if (code.equals(resultType.getCode())) { |
| | | return resultType; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 代理商 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @TableName("t_agent") |
| | | public class TAgent extends Model<TAgent> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 负责人姓名 |
| | | */ |
| | | private String principal; |
| | | /** |
| | | * 负责人电话 |
| | | */ |
| | | private String principalPhone; |
| | | /** |
| | | * 邮箱 |
| | | */ |
| | | private String email; |
| | | /** |
| | | * 代理区域省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 代理区域省名称 |
| | | */ |
| | | private String provinceName; |
| | | /** |
| | | * 代理区域市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 代理区域市名称 |
| | | */ |
| | | private String cityName; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 开户银行 |
| | | */ |
| | | @TableField(value = "bankDeposit") |
| | | @ApiModelProperty(value = "开户银行") |
| | | private String bankDeposit; |
| | | |
| | | /** |
| | | * 银行账户 |
| | | */ |
| | | @TableField(value = "bankAccount") |
| | | @ApiModelProperty(value = "银行账户") |
| | | private String bankAccount; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "区域") |
| | | private String area; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "区域id") |
| | | private String areaId; |
| | | |
| | | public String getAreaId() { |
| | | return areaId; |
| | | } |
| | | |
| | | public void setAreaId(String areaId) { |
| | | this.areaId = areaId; |
| | | } |
| | | |
| | | public String getBankDeposit() { |
| | | return bankDeposit; |
| | | } |
| | | |
| | | public void setBankDeposit(String bankDeposit) { |
| | | this.bankDeposit = bankDeposit; |
| | | } |
| | | |
| | | public String getBankAccount() { |
| | | return bankAccount; |
| | | } |
| | | |
| | | public void setBankAccount(String bankAccount) { |
| | | this.bankAccount = bankAccount; |
| | | } |
| | | |
| | | public String getArea() { |
| | | return area; |
| | | } |
| | | |
| | | public void setArea(String area) { |
| | | this.area = area; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getPrincipal() { |
| | | return principal; |
| | | } |
| | | |
| | | public void setPrincipal(String principal) { |
| | | this.principal = principal; |
| | | } |
| | | |
| | | public String getPrincipalPhone() { |
| | | return principalPhone; |
| | | } |
| | | |
| | | public void setPrincipalPhone(String principalPhone) { |
| | | this.principalPhone = principalPhone; |
| | | } |
| | | |
| | | public String getEmail() { |
| | | return email; |
| | | } |
| | | |
| | | public void setEmail(String email) { |
| | | this.email = email; |
| | | } |
| | | |
| | | public String getProvinceCode() { |
| | | return provinceCode; |
| | | } |
| | | |
| | | public void setProvinceCode(String provinceCode) { |
| | | this.provinceCode = provinceCode; |
| | | } |
| | | |
| | | public String getProvinceName() { |
| | | return provinceName; |
| | | } |
| | | |
| | | public void setProvinceName(String provinceName) { |
| | | this.provinceName = provinceName; |
| | | } |
| | | |
| | | public String getCityCode() { |
| | | return cityCode; |
| | | } |
| | | |
| | | public void setCityCode(String cityCode) { |
| | | this.cityCode = cityCode; |
| | | } |
| | | |
| | | public String getCityName() { |
| | | return cityName; |
| | | } |
| | | |
| | | public void setCityName(String cityName) { |
| | | this.cityName = cityName; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TAgent{" + |
| | | "id=" + id + |
| | | ", principal=" + principal + |
| | | ", principalPhone=" + principalPhone + |
| | | ", email=" + email + |
| | | ", provinceCode=" + provinceCode + |
| | | ", provinceName=" + provinceName + |
| | | ", cityCode=" + cityCode + |
| | | ", cityName=" + cityName + |
| | | ", status=" + status + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | @TableField("user_id") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "代理商id") |
| | | @TableField("agentId") |
| | | private Integer agentId; |
| | | |
| | | @ApiModelProperty(value = "分公司id") |
| | | @TableField("branchOfficeId") |
| | | private Integer branchOfficeId; |
| | | |
| | | @ApiModelProperty(value = "优惠券名称") |
| | | @TableField("coupon_name") |
| | | private String couponName; |
| | |
| | | @TableField("coupon_state") |
| | | private Integer couponState; |
| | | |
| | | public Integer getAgentId() { |
| | | return agentId; |
| | | } |
| | | |
| | | public void setAgentId(Integer agentId) { |
| | | this.agentId = agentId; |
| | | } |
| | | |
| | | public Integer getBranchOfficeId() { |
| | | return branchOfficeId; |
| | | } |
| | | |
| | | public void setBranchOfficeId(Integer branchOfficeId) { |
| | | this.branchOfficeId = branchOfficeId; |
| | | } |
| | | |
| | | public Integer getCouponState() { |
| | | return couponState; |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 司机表 |
| | | * 司机基础信息 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-04 |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @TableName("t_driver") |
| | | public class TDriver extends Model<TDriver> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 登录账号 |
| | | * 编号 |
| | | */ |
| | | private String account; |
| | | private String code; |
| | | /** |
| | | * 工号 |
| | | * 姓名 |
| | | */ |
| | | private String jobNumber; |
| | | private String name; |
| | | /** |
| | | * 头像 |
| | | */ |
| | | private String avatar; |
| | | /** |
| | | * 手机号 |
| | | */ |
| | |
| | | */ |
| | | private String password; |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | | * 性别(1=男,2=女) |
| | | */ |
| | | private Integer sex; |
| | | /** |
| | | * 身份证号 |
| | | * 来源(1=) |
| | | */ |
| | | private String idCard; |
| | | /** |
| | | * 公司id |
| | | */ |
| | | private Integer companyId; |
| | | /** |
| | | * 加盟商ID |
| | | */ |
| | | private Integer franchiseeId; |
| | | /** |
| | | * 头像照片 |
| | | */ |
| | | private String headImgUrl; |
| | | /** |
| | | * 人脸识别照片 |
| | | */ |
| | | private String faceImgUrl; |
| | | /** |
| | | * 身份证正面照片 |
| | | */ |
| | | private String idCardImgUrl1; |
| | | /** |
| | | * 身份证背面照片 |
| | | */ |
| | | private String idCardImgUrl2; |
| | | /** |
| | | * 网约车司机注册地行政区域 |
| | | */ |
| | | private String placeOfEmployment; |
| | | /** |
| | | * 生日 |
| | | */ |
| | | private Date birthday; |
| | | /** |
| | | * 银行卡号 |
| | | */ |
| | | private String bankCardNumber; |
| | | /** |
| | | * 国籍 |
| | | */ |
| | | private String driverNationality; |
| | | /** |
| | | * 民族 |
| | | */ |
| | | private String driverNation; |
| | | /** |
| | | * 婚姻状况(1:未婚,2:已婚,3:离异) |
| | | */ |
| | | private Integer driverMaritalStatus; |
| | | /** |
| | | * 外语能力 |
| | | */ |
| | | private String driverLanguageLevel; |
| | | /** |
| | | * 学历 |
| | | */ |
| | | private String driverEducation; |
| | | /** |
| | | * 户口登记机关名称 |
| | | */ |
| | | private String driverCensus; |
| | | /** |
| | | * 户口地址或常住地址 |
| | | */ |
| | | private String driverAddress; |
| | | /** |
| | | * 通信地址 |
| | | */ |
| | | private String driverContactAddress; |
| | | /** |
| | | * 驾龄 |
| | | */ |
| | | private Integer driverAge; |
| | | /** |
| | | * 驾驶证号 |
| | | */ |
| | | private String driveCard; |
| | | /** |
| | | * 驾驶证照片 |
| | | */ |
| | | private String driveCardImgUrl; |
| | | /** |
| | | * 准驾车型 |
| | | */ |
| | | private String driverType; |
| | | /** |
| | | * 初次领取驾驶证日期 |
| | | */ |
| | | private Date getDriverLicenseDate; |
| | | /** |
| | | * 驾驶证有效期限起 |
| | | */ |
| | | private Date driverLicenseOn; |
| | | /** |
| | | * 驾驶证有效期限止 |
| | | */ |
| | | private Date driverLicenseOff; |
| | | /** |
| | | * 是否巡游出租车驾驶员(0:否,1:是) |
| | | */ |
| | | private Integer taxiDriver; |
| | | /** |
| | | * 出租车资格证号 |
| | | */ |
| | | private String taxiAptitudeCard; |
| | | /** |
| | | * 网约车资格证照片 |
| | | */ |
| | | private String networkCarlssueImg; |
| | | /** |
| | | * 网络预约出租车驾驶员证发证机构 |
| | | */ |
| | | private String networkCarlssueOrganization; |
| | | /** |
| | | * 资格证发证日期 |
| | | */ |
| | | private Date networkCarlssueDate; |
| | | /** |
| | | * 初次认领资格证日期 |
| | | */ |
| | | private Date getNetworkCarProofDate; |
| | | /** |
| | | * 资格证有效起始日期 |
| | | */ |
| | | private Date networkCarProofOn; |
| | | /** |
| | | * 资格证有效截至日期 |
| | | */ |
| | | private Date networkCarProofOff; |
| | | /** |
| | | * 报备日期 |
| | | */ |
| | | private Date registerDate; |
| | | /** |
| | | * 是否专职驾驶员(0:否,1:是) |
| | | */ |
| | | private Integer fullTimeDriver; |
| | | /** |
| | | * 是否在驾驶员黑名单内(0:否,1:是) |
| | | */ |
| | | private Integer inDriverBlacklist; |
| | | /** |
| | | * 服务类型(1:网络预约出租汽车,2:巡游出租汽车,3:私人小客车合乘) |
| | | */ |
| | | private Integer commercialType; |
| | | /** |
| | | * 驾驶员合同签署公司 |
| | | */ |
| | | private String contractCompany; |
| | | /** |
| | | * 合同有效期起 |
| | | */ |
| | | private Date contractOn; |
| | | /** |
| | | * 合同有效期止 |
| | | */ |
| | | private Date contractOff; |
| | | private Integer source; |
| | | /** |
| | | * 紧急联系人 |
| | | */ |
| | |
| | | /** |
| | | * 紧急联系电话 |
| | | */ |
| | | private String emergencyContactPhone; |
| | | private String emergencyPhone; |
| | | /** |
| | | * 紧急联系地址 |
| | | * 驾驶证号码 |
| | | */ |
| | | private String emergencyContactAddress; |
| | | private String driverLicenseNumber; |
| | | /** |
| | | * 备注 |
| | | * 驾驶证照片 |
| | | */ |
| | | private String remark; |
| | | private String driverLicense; |
| | | /** |
| | | * 是否是平台车辆(1=是,2=否) |
| | | * 身份证号码 |
| | | */ |
| | | private Integer isPlatCar; |
| | | private String idcard; |
| | | /** |
| | | * 司机管理车辆id |
| | | * 身份证正面照 |
| | | */ |
| | | private Integer carId; |
| | | private String idcardFront; |
| | | /** |
| | | * 状态(1=待审核,2=正常,3=冻结,4=拒绝) |
| | | * 身份证背面照 |
| | | */ |
| | | private Integer authState; |
| | | private String idcardBack; |
| | | /** |
| | | * 司机状态(1=离线,2=空闲,3=服务中) |
| | | * 邀约人类型(1=用户,2=司机) |
| | | */ |
| | | private Integer state; |
| | | private Integer inviterType; |
| | | /** |
| | | * 1:创建,2:修改,3:删除 |
| | | * 邀约人id |
| | | */ |
| | | private String flag; |
| | | private Integer inviterId; |
| | | /** |
| | | * 添加时间 |
| | | * 代理商id |
| | | */ |
| | | private Date insertTime; |
| | | private Integer insertUser; |
| | | private Date updateTime; |
| | | private Integer updateUser; |
| | | private Integer agentId; |
| | | /** |
| | | * 司机来源方式 1=司机注册 2=平台添加 3=分公司添加 4=加盟商添加 |
| | | * 分公司id |
| | | */ |
| | | private Integer addType; |
| | | private Integer branchOfficeId; |
| | | /** |
| | | * 余额 |
| | | * 账户余额 |
| | | */ |
| | | private BigDecimal balance; |
| | | /** |
| | | * 业务总收入 |
| | | * @return |
| | | * 审核状态(1=待审核,2=已同意,3=已拒绝) |
| | | */ |
| | | @TableField("businessMoney") |
| | | private Double businessMoney; |
| | | private Integer approvalStatus; |
| | | /** |
| | | * 剩余未提现业务总收入 |
| | | * @return |
| | | * 审核注释 |
| | | */ |
| | | @TableField("laveBusinessMoney") |
| | | private Double laveBusinessMoney; |
| | | private String approvalNotes; |
| | | /** |
| | | * 添加司机的分公司/加盟商ID |
| | | * 审核用户id |
| | | */ |
| | | private Integer addObjectId; |
| | | private Integer approvalUserId; |
| | | /** |
| | | * 审核时间 |
| | | */ |
| | | private Date approvalTime; |
| | | /** |
| | | * 服务状态(1=空闲,2=服务中) |
| | | */ |
| | | private Integer serverStatus; |
| | | /** |
| | | * 剩余积分 |
| | | */ |
| | | private Integer integral; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | public BigDecimal getBalance() { |
| | | return balance; |
| | | } |
| | | |
| | | public void setBalance(BigDecimal balance) { |
| | | this.balance = balance; |
| | | } |
| | | |
| | | public Integer getAddObjectId() { |
| | | return addObjectId; |
| | | } |
| | | |
| | | public void setAddObjectId(Integer addObjectId) { |
| | | this.addObjectId = addObjectId; |
| | | } |
| | | |
| | | public Integer getFranchiseeId() { |
| | | return franchiseeId; |
| | | } |
| | | |
| | | public void setFranchiseeId(Integer franchiseeId) { |
| | | this.franchiseeId = franchiseeId; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getAccount() { |
| | | return account; |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setAccount(String account) { |
| | | this.account = account; |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getJobNumber() { |
| | | return jobNumber; |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setJobNumber(String jobNumber) { |
| | | this.jobNumber = jobNumber; |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getAvatar() { |
| | | return avatar; |
| | | } |
| | | |
| | | public void setAvatar(String avatar) { |
| | | this.avatar = avatar; |
| | | } |
| | | |
| | | public String getPhone() { |
| | |
| | | this.password = password; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getSex() { |
| | | return sex; |
| | | } |
| | |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public String getIdCard() { |
| | | return idCard; |
| | | public Integer getSource() { |
| | | return source; |
| | | } |
| | | |
| | | public void setIdCard(String idCard) { |
| | | this.idCard = idCard; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public String getHeadImgUrl() { |
| | | return headImgUrl; |
| | | } |
| | | |
| | | public void setHeadImgUrl(String headImgUrl) { |
| | | this.headImgUrl = headImgUrl; |
| | | } |
| | | |
| | | public String getFaceImgUrl() { |
| | | return faceImgUrl; |
| | | } |
| | | |
| | | public void setFaceImgUrl(String faceImgUrl) { |
| | | this.faceImgUrl = faceImgUrl; |
| | | } |
| | | |
| | | public String getIdCardImgUrl1() { |
| | | return idCardImgUrl1; |
| | | } |
| | | |
| | | public void setIdCardImgUrl1(String idCardImgUrl1) { |
| | | this.idCardImgUrl1 = idCardImgUrl1; |
| | | } |
| | | |
| | | public String getIdCardImgUrl2() { |
| | | return idCardImgUrl2; |
| | | } |
| | | |
| | | public void setIdCardImgUrl2(String idCardImgUrl2) { |
| | | this.idCardImgUrl2 = idCardImgUrl2; |
| | | } |
| | | |
| | | public String getPlaceOfEmployment() { |
| | | return placeOfEmployment; |
| | | } |
| | | |
| | | public void setPlaceOfEmployment(String placeOfEmployment) { |
| | | this.placeOfEmployment = placeOfEmployment; |
| | | } |
| | | |
| | | public Date getBirthday() { |
| | | return birthday; |
| | | } |
| | | |
| | | public void setBirthday(Date birthday) { |
| | | this.birthday = birthday; |
| | | } |
| | | |
| | | public String getBankCardNumber() { |
| | | return bankCardNumber; |
| | | } |
| | | |
| | | public void setBankCardNumber(String bankCardNumber) { |
| | | this.bankCardNumber = bankCardNumber; |
| | | } |
| | | |
| | | public String getDriverNationality() { |
| | | return driverNationality; |
| | | } |
| | | |
| | | public void setDriverNationality(String driverNationality) { |
| | | this.driverNationality = driverNationality; |
| | | } |
| | | |
| | | public String getDriverNation() { |
| | | return driverNation; |
| | | } |
| | | |
| | | public void setDriverNation(String driverNation) { |
| | | this.driverNation = driverNation; |
| | | } |
| | | |
| | | public Integer getDriverMaritalStatus() { |
| | | return driverMaritalStatus; |
| | | } |
| | | |
| | | public void setDriverMaritalStatus(Integer driverMaritalStatus) { |
| | | this.driverMaritalStatus = driverMaritalStatus; |
| | | } |
| | | |
| | | public String getDriverLanguageLevel() { |
| | | return driverLanguageLevel; |
| | | } |
| | | |
| | | public void setDriverLanguageLevel(String driverLanguageLevel) { |
| | | this.driverLanguageLevel = driverLanguageLevel; |
| | | } |
| | | |
| | | public String getDriverEducation() { |
| | | return driverEducation; |
| | | } |
| | | |
| | | public void setDriverEducation(String driverEducation) { |
| | | this.driverEducation = driverEducation; |
| | | } |
| | | |
| | | public String getDriverCensus() { |
| | | return driverCensus; |
| | | } |
| | | |
| | | public void setDriverCensus(String driverCensus) { |
| | | this.driverCensus = driverCensus; |
| | | } |
| | | |
| | | public String getDriverAddress() { |
| | | return driverAddress; |
| | | } |
| | | |
| | | public void setDriverAddress(String driverAddress) { |
| | | this.driverAddress = driverAddress; |
| | | } |
| | | |
| | | public String getDriverContactAddress() { |
| | | return driverContactAddress; |
| | | } |
| | | |
| | | public void setDriverContactAddress(String driverContactAddress) { |
| | | this.driverContactAddress = driverContactAddress; |
| | | } |
| | | |
| | | public Integer getDriverAge() { |
| | | return driverAge; |
| | | } |
| | | |
| | | public void setDriverAge(Integer driverAge) { |
| | | this.driverAge = driverAge; |
| | | } |
| | | |
| | | public String getDriveCard() { |
| | | return driveCard; |
| | | } |
| | | |
| | | public void setDriveCard(String driveCard) { |
| | | this.driveCard = driveCard; |
| | | } |
| | | |
| | | public String getDriveCardImgUrl() { |
| | | return driveCardImgUrl; |
| | | } |
| | | |
| | | public void setDriveCardImgUrl(String driveCardImgUrl) { |
| | | this.driveCardImgUrl = driveCardImgUrl; |
| | | } |
| | | |
| | | public String getDriverType() { |
| | | return driverType; |
| | | } |
| | | |
| | | public void setDriverType(String driverType) { |
| | | this.driverType = driverType; |
| | | } |
| | | |
| | | public Date getGetDriverLicenseDate() { |
| | | return getDriverLicenseDate; |
| | | } |
| | | |
| | | public void setGetDriverLicenseDate(Date getDriverLicenseDate) { |
| | | this.getDriverLicenseDate = getDriverLicenseDate; |
| | | } |
| | | |
| | | public Date getDriverLicenseOn() { |
| | | return driverLicenseOn; |
| | | } |
| | | |
| | | public void setDriverLicenseOn(Date driverLicenseOn) { |
| | | this.driverLicenseOn = driverLicenseOn; |
| | | } |
| | | |
| | | public Date getDriverLicenseOff() { |
| | | return driverLicenseOff; |
| | | } |
| | | |
| | | public void setDriverLicenseOff(Date driverLicenseOff) { |
| | | this.driverLicenseOff = driverLicenseOff; |
| | | } |
| | | |
| | | public Integer getTaxiDriver() { |
| | | return taxiDriver; |
| | | } |
| | | |
| | | public void setTaxiDriver(Integer taxiDriver) { |
| | | this.taxiDriver = taxiDriver; |
| | | } |
| | | |
| | | public String getTaxiAptitudeCard() { |
| | | return taxiAptitudeCard; |
| | | } |
| | | |
| | | public void setTaxiAptitudeCard(String taxiAptitudeCard) { |
| | | this.taxiAptitudeCard = taxiAptitudeCard; |
| | | } |
| | | |
| | | public String getNetworkCarlssueImg() { |
| | | return networkCarlssueImg; |
| | | } |
| | | |
| | | public void setNetworkCarlssueImg(String networkCarlssueImg) { |
| | | this.networkCarlssueImg = networkCarlssueImg; |
| | | } |
| | | |
| | | public String getNetworkCarlssueOrganization() { |
| | | return networkCarlssueOrganization; |
| | | } |
| | | |
| | | public void setNetworkCarlssueOrganization(String networkCarlssueOrganization) { |
| | | this.networkCarlssueOrganization = networkCarlssueOrganization; |
| | | } |
| | | |
| | | public Date getNetworkCarlssueDate() { |
| | | return networkCarlssueDate; |
| | | } |
| | | |
| | | public void setNetworkCarlssueDate(Date networkCarlssueDate) { |
| | | this.networkCarlssueDate = networkCarlssueDate; |
| | | } |
| | | |
| | | public Date getGetNetworkCarProofDate() { |
| | | return getNetworkCarProofDate; |
| | | } |
| | | |
| | | public void setGetNetworkCarProofDate(Date getNetworkCarProofDate) { |
| | | this.getNetworkCarProofDate = getNetworkCarProofDate; |
| | | } |
| | | |
| | | public Date getNetworkCarProofOn() { |
| | | return networkCarProofOn; |
| | | } |
| | | |
| | | public void setNetworkCarProofOn(Date networkCarProofOn) { |
| | | this.networkCarProofOn = networkCarProofOn; |
| | | } |
| | | |
| | | public Date getNetworkCarProofOff() { |
| | | return networkCarProofOff; |
| | | } |
| | | |
| | | public void setNetworkCarProofOff(Date networkCarProofOff) { |
| | | this.networkCarProofOff = networkCarProofOff; |
| | | } |
| | | |
| | | public Date getRegisterDate() { |
| | | return registerDate; |
| | | } |
| | | |
| | | public void setRegisterDate(Date registerDate) { |
| | | this.registerDate = registerDate; |
| | | } |
| | | |
| | | public Integer getFullTimeDriver() { |
| | | return fullTimeDriver; |
| | | } |
| | | |
| | | public void setFullTimeDriver(Integer fullTimeDriver) { |
| | | this.fullTimeDriver = fullTimeDriver; |
| | | } |
| | | |
| | | public Integer getInDriverBlacklist() { |
| | | return inDriverBlacklist; |
| | | } |
| | | |
| | | public void setInDriverBlacklist(Integer inDriverBlacklist) { |
| | | this.inDriverBlacklist = inDriverBlacklist; |
| | | } |
| | | |
| | | public Integer getCommercialType() { |
| | | return commercialType; |
| | | } |
| | | |
| | | public void setCommercialType(Integer commercialType) { |
| | | this.commercialType = commercialType; |
| | | } |
| | | |
| | | public String getContractCompany() { |
| | | return contractCompany; |
| | | } |
| | | |
| | | public void setContractCompany(String contractCompany) { |
| | | this.contractCompany = contractCompany; |
| | | } |
| | | |
| | | public Date getContractOn() { |
| | | return contractOn; |
| | | } |
| | | |
| | | public void setContractOn(Date contractOn) { |
| | | this.contractOn = contractOn; |
| | | } |
| | | |
| | | public Date getContractOff() { |
| | | return contractOff; |
| | | } |
| | | |
| | | public void setContractOff(Date contractOff) { |
| | | this.contractOff = contractOff; |
| | | public void setSource(Integer source) { |
| | | this.source = source; |
| | | } |
| | | |
| | | public String getEmergencyContact() { |
| | |
| | | this.emergencyContact = emergencyContact; |
| | | } |
| | | |
| | | public String getEmergencyContactPhone() { |
| | | return emergencyContactPhone; |
| | | public String getEmergencyPhone() { |
| | | return emergencyPhone; |
| | | } |
| | | |
| | | public void setEmergencyContactPhone(String emergencyContactPhone) { |
| | | this.emergencyContactPhone = emergencyContactPhone; |
| | | public void setEmergencyPhone(String emergencyPhone) { |
| | | this.emergencyPhone = emergencyPhone; |
| | | } |
| | | |
| | | public String getEmergencyContactAddress() { |
| | | return emergencyContactAddress; |
| | | public String getDriverLicenseNumber() { |
| | | return driverLicenseNumber; |
| | | } |
| | | |
| | | public void setEmergencyContactAddress(String emergencyContactAddress) { |
| | | this.emergencyContactAddress = emergencyContactAddress; |
| | | public void setDriverLicenseNumber(String driverLicenseNumber) { |
| | | this.driverLicenseNumber = driverLicenseNumber; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | public String getDriverLicense() { |
| | | return driverLicense; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | public void setDriverLicense(String driverLicense) { |
| | | this.driverLicense = driverLicense; |
| | | } |
| | | |
| | | public Integer getIsPlatCar() { |
| | | return isPlatCar; |
| | | public String getIdcard() { |
| | | return idcard; |
| | | } |
| | | |
| | | public void setIsPlatCar(Integer isPlatCar) { |
| | | this.isPlatCar = isPlatCar; |
| | | public void setIdcard(String idcard) { |
| | | this.idcard = idcard; |
| | | } |
| | | |
| | | public Integer getCarId() { |
| | | return carId; |
| | | public String getIdcardFront() { |
| | | return idcardFront; |
| | | } |
| | | |
| | | public void setCarId(Integer carId) { |
| | | this.carId = carId; |
| | | public void setIdcardFront(String idcardFront) { |
| | | this.idcardFront = idcardFront; |
| | | } |
| | | |
| | | public Integer getAuthState() { |
| | | return authState; |
| | | public String getIdcardBack() { |
| | | return idcardBack; |
| | | } |
| | | |
| | | public void setAuthState(Integer authState) { |
| | | this.authState = authState; |
| | | public void setIdcardBack(String idcardBack) { |
| | | this.idcardBack = idcardBack; |
| | | } |
| | | |
| | | public Integer getState() { |
| | | return state; |
| | | public Integer getInviterType() { |
| | | return inviterType; |
| | | } |
| | | |
| | | public void setState(Integer state) { |
| | | this.state = state; |
| | | public void setInviterType(Integer inviterType) { |
| | | this.inviterType = inviterType; |
| | | } |
| | | |
| | | public String getFlag() { |
| | | return flag; |
| | | public Integer getInviterId() { |
| | | return inviterId; |
| | | } |
| | | |
| | | public void setFlag(String flag) { |
| | | this.flag = flag; |
| | | public void setInviterId(Integer inviterId) { |
| | | this.inviterId = inviterId; |
| | | } |
| | | |
| | | public Date getInsertTime() { |
| | | return insertTime; |
| | | public Integer getAgentId() { |
| | | return agentId; |
| | | } |
| | | |
| | | public void setInsertTime(Date insertTime) { |
| | | this.insertTime = insertTime; |
| | | public void setAgentId(Integer agentId) { |
| | | this.agentId = agentId; |
| | | } |
| | | |
| | | public Integer getInsertUser() { |
| | | return insertUser; |
| | | public Integer getBranchOfficeId() { |
| | | return branchOfficeId; |
| | | } |
| | | |
| | | public void setInsertUser(Integer insertUser) { |
| | | this.insertUser = insertUser; |
| | | public void setBranchOfficeId(Integer branchOfficeId) { |
| | | this.branchOfficeId = branchOfficeId; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | public BigDecimal getBalance() { |
| | | return balance; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | public void setBalance(BigDecimal balance) { |
| | | this.balance = balance; |
| | | } |
| | | |
| | | public Integer getUpdateUser() { |
| | | return updateUser; |
| | | public Integer getApprovalStatus() { |
| | | return approvalStatus; |
| | | } |
| | | |
| | | public void setUpdateUser(Integer updateUser) { |
| | | this.updateUser = updateUser; |
| | | public void setApprovalStatus(Integer approvalStatus) { |
| | | this.approvalStatus = approvalStatus; |
| | | } |
| | | |
| | | public Integer getAddType() { |
| | | return addType; |
| | | public String getApprovalNotes() { |
| | | return approvalNotes; |
| | | } |
| | | |
| | | public void setAddType(Integer addType) { |
| | | this.addType = addType; |
| | | public void setApprovalNotes(String approvalNotes) { |
| | | this.approvalNotes = approvalNotes; |
| | | } |
| | | |
| | | public Double getLaveBusinessMoney() { |
| | | return laveBusinessMoney; |
| | | public Integer getApprovalUserId() { |
| | | return approvalUserId; |
| | | } |
| | | |
| | | public void setLaveBusinessMoney(Double laveBusinessMoney) { |
| | | this.laveBusinessMoney = laveBusinessMoney; |
| | | public void setApprovalUserId(Integer approvalUserId) { |
| | | this.approvalUserId = approvalUserId; |
| | | } |
| | | |
| | | public Double getBusinessMoney() { |
| | | return businessMoney; |
| | | public Date getApprovalTime() { |
| | | return approvalTime; |
| | | } |
| | | |
| | | public void setBusinessMoney(Double businessMoney) { |
| | | this.businessMoney = businessMoney; |
| | | public void setApprovalTime(Date approvalTime) { |
| | | this.approvalTime = approvalTime; |
| | | } |
| | | |
| | | public Integer getServerStatus() { |
| | | return serverStatus; |
| | | } |
| | | |
| | | public void setServerStatus(Integer serverStatus) { |
| | | this.serverStatus = serverStatus; |
| | | } |
| | | |
| | | public Integer getIntegral() { |
| | | return integral; |
| | | } |
| | | |
| | | public void setIntegral(Integer integral) { |
| | | this.integral = integral; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | @Override |
| | |
| | | public String toString() { |
| | | return "TDriver{" + |
| | | "id=" + id + |
| | | ", account=" + account + |
| | | ", jobNumber=" + jobNumber + |
| | | ", code=" + code + |
| | | ", name=" + name + |
| | | ", avatar=" + avatar + |
| | | ", phone=" + phone + |
| | | ", password=" + password + |
| | | ", name=" + name + |
| | | ", sex=" + sex + |
| | | ", idCard=" + idCard + |
| | | ", companyId=" + companyId + |
| | | ", headImgUrl=" + headImgUrl + |
| | | ", faceImgUrl=" + faceImgUrl + |
| | | ", idCardImgUrl1=" + idCardImgUrl1 + |
| | | ", idCardImgUrl2=" + idCardImgUrl2 + |
| | | ", placeOfEmployment=" + placeOfEmployment + |
| | | ", birthday=" + birthday + |
| | | ", bankCardNumber=" + bankCardNumber + |
| | | ", driverNationality=" + driverNationality + |
| | | ", driverNation=" + driverNation + |
| | | ", driverMaritalStatus=" + driverMaritalStatus + |
| | | ", driverLanguageLevel=" + driverLanguageLevel + |
| | | ", driverEducation=" + driverEducation + |
| | | ", driverCensus=" + driverCensus + |
| | | ", driverAddress=" + driverAddress + |
| | | ", driverContactAddress=" + driverContactAddress + |
| | | ", driverAge=" + driverAge + |
| | | ", driveCard=" + driveCard + |
| | | ", driveCardImgUrl=" + driveCardImgUrl + |
| | | ", driverType=" + driverType + |
| | | ", getDriverLicenseDate=" + getDriverLicenseDate + |
| | | ", driverLicenseOn=" + driverLicenseOn + |
| | | ", driverLicenseOff=" + driverLicenseOff + |
| | | ", taxiDriver=" + taxiDriver + |
| | | ", taxiAptitudeCard=" + taxiAptitudeCard + |
| | | ", networkCarlssueImg=" + networkCarlssueImg + |
| | | ", networkCarlssueOrganization=" + networkCarlssueOrganization + |
| | | ", networkCarlssueDate=" + networkCarlssueDate + |
| | | ", getNetworkCarProofDate=" + getNetworkCarProofDate + |
| | | ", networkCarProofOn=" + networkCarProofOn + |
| | | ", networkCarProofOff=" + networkCarProofOff + |
| | | ", registerDate=" + registerDate + |
| | | ", fullTimeDriver=" + fullTimeDriver + |
| | | ", inDriverBlacklist=" + inDriverBlacklist + |
| | | ", commercialType=" + commercialType + |
| | | ", contractCompany=" + contractCompany + |
| | | ", contractOn=" + contractOn + |
| | | ", contractOff=" + contractOff + |
| | | ", source=" + source + |
| | | ", emergencyContact=" + emergencyContact + |
| | | ", emergencyContactPhone=" + emergencyContactPhone + |
| | | ", emergencyContactAddress=" + emergencyContactAddress + |
| | | ", remark=" + remark + |
| | | ", isPlatCar=" + isPlatCar + |
| | | ", carId=" + carId + |
| | | ", authState=" + authState + |
| | | ", state=" + state + |
| | | ", flag=" + flag + |
| | | ", insertTime=" + insertTime + |
| | | ", insertUser=" + insertUser + |
| | | ", updateTime=" + updateTime + |
| | | ", updateUser=" + updateUser + |
| | | ", addType=" + addType + |
| | | ", emergencyPhone=" + emergencyPhone + |
| | | ", driverLicenseNumber=" + driverLicenseNumber + |
| | | ", driverLicense=" + driverLicense + |
| | | ", idcard=" + idcard + |
| | | ", idcardFront=" + idcardFront + |
| | | ", idcardBack=" + idcardBack + |
| | | ", inviterType=" + inviterType + |
| | | ", inviterId=" + inviterId + |
| | | ", agentId=" + agentId + |
| | | ", branchOfficeId=" + branchOfficeId + |
| | | ", balance=" + balance + |
| | | ", approvalStatus=" + approvalStatus + |
| | | ", approvalNotes=" + approvalNotes + |
| | | ", approvalUserId=" + approvalUserId + |
| | | ", approvalTime=" + approvalTime + |
| | | ", serverStatus=" + serverStatus + |
| | | ", integral=" + integral + |
| | | ", status=" + status + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充值记录 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @TableName("t_recharge_record") |
| | | public class TRechargeRecord extends Model<TRechargeRecord> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 数据类型(1=用户,2=司机) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer userId; |
| | | /** |
| | | * 流水号 |
| | | */ |
| | | private String code; |
| | | /** |
| | | * 充值金额 |
| | | */ |
| | | private BigDecimal amount; |
| | | /** |
| | | * 支付方式(1=微信) |
| | | */ |
| | | private Integer payType; |
| | | /** |
| | | * 完成支付时间 |
| | | */ |
| | | private Date payTime; |
| | | /** |
| | | * 支付状态(1=待支付,2=已完成) |
| | | */ |
| | | private Integer payStatus; |
| | | /** |
| | | * 第三方流水号 |
| | | */ |
| | | private String orderNumber; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Integer getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(Integer userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public Integer getPayType() { |
| | | return payType; |
| | | } |
| | | |
| | | public void setPayType(Integer payType) { |
| | | this.payType = payType; |
| | | } |
| | | |
| | | public Date getPayTime() { |
| | | return payTime; |
| | | } |
| | | |
| | | public void setPayTime(Date payTime) { |
| | | this.payTime = payTime; |
| | | } |
| | | |
| | | public Integer getPayStatus() { |
| | | return payStatus; |
| | | } |
| | | |
| | | public void setPayStatus(Integer payStatus) { |
| | | this.payStatus = payStatus; |
| | | } |
| | | |
| | | public String getOrderNumber() { |
| | | return orderNumber; |
| | | } |
| | | |
| | | public void setOrderNumber(String orderNumber) { |
| | | this.orderNumber = orderNumber; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TRechargeRecord{" + |
| | | "id=" + id + |
| | | ", type=" + type + |
| | | ", userId=" + userId + |
| | | ", code=" + code + |
| | | ", amount=" + amount + |
| | | ", payType=" + payType + |
| | | ", payTime=" + payTime + |
| | | ", payStatus=" + payStatus + |
| | | ", orderNumber=" + orderNumber + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 省市区三级联动 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-02 |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @TableName("t_region") |
| | | public class TRegion extends Model<TRegion> { |
| | |
| | | */ |
| | | private String english; |
| | | |
| | | @TableField(exist = false) |
| | | private List<TRegion> children; |
| | | |
| | | public List<TRegion> getChildren() { |
| | | return children; |
| | | } |
| | | |
| | | public void setChildren(List<TRegion> children) { |
| | | this.children = children; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TAgentResp; |
| | | import com.stylefeng.guns.modular.system.model.TAgent; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import org.springframework.ui.Model; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 代理商 服务类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | public interface ITAgentService extends IService<TAgent> { |
| | | |
| | | /** |
| | | * 获取代理商查询wrapper |
| | | * @param principal |
| | | * @param principalPhone |
| | | * @param createTime |
| | | * @return |
| | | */ |
| | | EntityWrapper<TAgent> getAgentWrapper(String principal, String principalPhone, String createTime); |
| | | |
| | | /** |
| | | * 代理商查看详情 |
| | | * @param agentId |
| | | * @param model |
| | | */ |
| | | void detail(Integer agentId, Model model); |
| | | |
| | | List<TAgentResp> getAgentResp(List<TAgent> tAgents); |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 司机表 服务类 |
| | | * 司机基础信息 服务类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-04 |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | public interface ITDriverService extends IService<TDriver> { |
| | | |
| | | /** |
| | | * 根据条件查询待审核司机列表 |
| | | * 获取司机分页列表 |
| | | * @param createTime |
| | | * @param phone |
| | | * @param status |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getAuthDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("companyName") String companyName, |
| | | @Param("phone") String phone, |
| | | @Param("account") String account, |
| | | @Param("addType") Integer addType, |
| | | @Param("authState") Integer authState); |
| | | |
| | | /** |
| | | * 根据用户ID获取用户详情 |
| | | * @param driverId |
| | | * @return |
| | | */ |
| | | Map<String,Object> getDriverById(@Param("driverId") Integer driverId); |
| | | |
| | | /** |
| | | * 根据审核通过的司机列表 |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getDriverList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("roleType") Integer roleType, |
| | | @Param("nowUserId") Integer nowUserId, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("companyName") String companyName, |
| | | @Param("phone") String phone, |
| | | @Param("name") String name, |
| | | @Param("addType") Integer addType, |
| | | @Param("authState") Integer authState); |
| | | |
| | | /** |
| | | * 查询已被使用的车辆ID |
| | | * @return |
| | | */ |
| | | String getUseCarIdStr(@Param("carId") Integer carId); |
| | | |
| | | /** |
| | | * 查询当前可被选择的车辆列表 |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getCanSelectCarList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("roleType") Integer roleType, |
| | | @Param("nowUserId") Integer nowUserId, |
| | | @Param("carIdStr") String carIdStr, |
| | | @Param("carLicensePlate") String carLicensePlate, |
| | | @Param("brandName") String brandName, |
| | | @Param("modelName") String modelName, |
| | | @Param("color") String color, |
| | | @Param("serverStr") String serverStr); |
| | | |
| | | /** |
| | | * 修改分公司司机的状态 |
| | | */ |
| | | void updateCompanyDriverState( @Param("authState") Integer authState, @Param("companyId") Integer companyId); |
| | | |
| | | /** |
| | | * 修改加盟商司机的状态 |
| | | */ |
| | | void updateFranchiseeDriverState( @Param("authState") Integer authState, @Param("franchiseeId") Integer franchiseeId); |
| | | |
| | | /** |
| | | * 根据审核通过的司机列表无分页 |
| | | * @return |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getDriverListNoPage(@Param("roleType") Integer roleType, |
| | | @Param("nowUserId") Integer nowUserId); |
| | | |
| | | EntityWrapper<TDriver> getPageList(String createTime, String phone, Integer status); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TRechargeRecord; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充值记录 服务类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | public interface ITRechargeRecordService extends IService<TRechargeRecord> { |
| | | |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 省市区三级联动 服务类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-02 |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | public interface ITRegionService extends IService<TRegion> { |
| | | |
| | | /** |
| | | * 得到省市区三级联动数据 |
| | | * @return |
| | | */ |
| | | List<TRegion> getAreaList(); |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TAgentResp; |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.enums.OrderStateEnum; |
| | | import com.stylefeng.guns.modular.system.enums.PayStatusEnum; |
| | | import com.stylefeng.guns.modular.system.enums.UserTypeEnum; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITAgentService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 代理商 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @Service |
| | | public class TAgentServiceImpl extends ServiceImpl<TAgentMapper, TAgent> implements ITAgentService { |
| | | |
| | | |
| | | @Autowired |
| | | private TAgentMapper tAgentMapper; |
| | | |
| | | @Autowired |
| | | private TOrderMapper tOrderMapper; |
| | | |
| | | @Autowired |
| | | private TCouponMapper tCouponMapper; |
| | | |
| | | @Autowired |
| | | private TDriverMapper tDriverMapper; |
| | | |
| | | @Autowired |
| | | private TRechargeRecordMapper tRechargeRecordMapper; |
| | | |
| | | @Override |
| | | public EntityWrapper<TAgent> getAgentWrapper(String principal, String principalPhone, String createTime) { |
| | | EntityWrapper<TAgent> wrapper = new EntityWrapper<>(); |
| | | // 昵称 |
| | | if(StringUtils.hasLength(principal)){ |
| | | wrapper.like("principal",principal); |
| | | } |
| | | // 手机号 |
| | | if(StringUtils.hasLength(principalPhone)){ |
| | | wrapper.like("principalPhone",principalPhone); |
| | | } |
| | | // 开始,结束时间 |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | Date startTime = DateUtil.getDate_str4(split[0]); |
| | | Date endTime = DateUtil.getDate_str4(split[1]); |
| | | wrapper.between("createTime",startTime,endTime); |
| | | } |
| | | return wrapper; |
| | | } |
| | | |
| | | @Override |
| | | public void detail(Integer agentId, Model model) { |
| | | // 查询代理商用户信息 |
| | | TAgent tAgent = tAgentMapper.selectById(agentId); |
| | | model.addAttribute("createTime",DateUtil.formatDate(tAgent.getCreateTime())); |
| | | |
| | | model.addAttribute("startTimeToEndTime",new SimpleDateFormat("yyyy-MM-dd").format(tAgent.getCreateTime()).replace("-",".") + "-" + |
| | | new SimpleDateFormat("yyyy-MM-dd").format(new Date()).replace("-",".")); |
| | | |
| | | model.addAttribute("principal",tAgent.getPrincipal()); |
| | | model.addAttribute("principalPhone",tAgent.getPrincipalPhone()); |
| | | model.addAttribute("email",tAgent.getEmail()); |
| | | model.addAttribute("area",tAgent.getProvinceName()+tAgent.getCityName()); |
| | | // 订单信息 |
| | | // 订单总量 |
| | | List<TOrder> orderList = tOrderMapper.selectList(new EntityWrapper<TOrder>().eq("agentId",tAgent.getId())); |
| | | model.addAttribute("orderSum",orderList.size()); |
| | | // 过滤已完成和待评价订单,且支付金额在14元以上 |
| | | List<TOrder> orders = orderList.stream().filter(order -> (order.getState().equals(OrderStateEnum.FINISH.getCode()) || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode())) |
| | | && 0 < order.getPayMoney().compareTo(new BigDecimal("14")) && order.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); |
| | | model.addAttribute("validOrder",orders.size()); |
| | | // 过滤已使用优惠券 |
| | | List<TOrder> usedCoupon = orderList.stream().filter(order -> (order.getState().equals(OrderStateEnum.FINISH.getCode()) || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode())) |
| | | && Objects.nonNull(order.getCouponId()) && order.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); |
| | | model.addAttribute("usedCoupon",usedCoupon.size()); |
| | | // 已使用优惠券金额求和,已使用优惠券id |
| | | List<Integer> usedCouponId = usedCoupon.stream().map(TOrder::getCouponId).collect(Collectors.toList()); |
| | | // 查询已使用优惠券金额求和 |
| | | List<TCoupon> tCoupons1 = tCouponMapper.selectList(new EntityWrapper<TCoupon>().in("id", usedCouponId)); |
| | | if(CollectionUtils.isEmpty(tCoupons1)){ |
| | | model.addAttribute("couponPriceSum", BigDecimal.ZERO); |
| | | }else { |
| | | tCoupons1.stream().map(TCoupon::getCouponPreferentialAmount).reduce(BigDecimal::add).ifPresent(bigDecimal -> model.addAttribute("couponPriceSum", bigDecimal)); |
| | | } |
| | | // 优惠券信息 |
| | | // 过滤代理商发放的优惠券 |
| | | List<TCoupon> tCoupons = tCouponMapper.selectList(new EntityWrapper<TCoupon>().eq("agentId", tAgent.getId())); |
| | | model.addAttribute("issuedCoupon",tCoupons.size()); |
| | | // 司机信息 |
| | | // 司机数 |
| | | List<TDriver> drivers = tDriverMapper.selectList(new EntityWrapper<TDriver>().eq("agentId", tAgent.getId())); |
| | | model.addAttribute("driverCount",drivers.size()); |
| | | // 司机充值计算 |
| | | List<Integer> driverIds = drivers.stream().map(TDriver::getId).collect(Collectors.toList()); |
| | | List<TRechargeRecord> tRechargeRecords = tRechargeRecordMapper.selectList(new EntityWrapper<TRechargeRecord>().in("userId", driverIds) |
| | | .eq("type", UserTypeEnum.DRIVER.getCode()) |
| | | .eq("payStatus", PayStatusEnum.FINISH.getCode())); |
| | | if(CollectionUtils.isEmpty(tRechargeRecords)){ |
| | | model.addAttribute("driverRecharge",BigDecimal.ZERO); |
| | | }else { |
| | | tRechargeRecords.stream().map(TRechargeRecord::getAmount).reduce(BigDecimal::add).ifPresent(record->model.addAttribute("driverRecharge",record)); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<TAgentResp> getAgentResp(List<TAgent> tAgents) { |
| | | // 查询订单 |
| | | List<TOrder> tOrders = tOrderMapper.selectList(new EntityWrapper<TOrder>()); |
| | | // 查询优惠券 |
| | | List<TCoupon> tCoupons = tCouponMapper.selectList(new EntityWrapper<TCoupon>()); |
| | | // 查询司机信息 |
| | | List<TDriver> tDrivers = tDriverMapper.selectList(new EntityWrapper<TDriver>()); |
| | | |
| | | List<TAgentResp> tAgentRespList = new ArrayList<>(tAgents.size()); |
| | | |
| | | for (TAgent tAgent : tAgents) { |
| | | TAgentResp tAgentResp = new TAgentResp(); |
| | | BeanUtils.copyProperties(tAgent,tAgentResp); |
| | | |
| | | tAgentResp.setArea(tAgent.getProvinceName()+tAgent.getCityName()); |
| | | |
| | | if(!CollectionUtils.isEmpty(tOrders)){ |
| | | // 订单总量 |
| | | List<TOrder> orderList = tOrders.stream().filter(order -> order.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); |
| | | tAgentResp.setOrderSum(orderList.size()); |
| | | // 过滤已完成和待评价订单,且支付金额在14元以上 |
| | | List<TOrder> orders = tOrders.stream().filter(order -> (order.getState().equals(OrderStateEnum.FINISH.getCode()) || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode())) |
| | | && 0 < order.getPayMoney().compareTo(new BigDecimal("14")) && order.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); |
| | | tAgentResp.setValidOrder(orders.size()); |
| | | // 过滤已使用优惠券 |
| | | List<TOrder> usedCoupon = tOrders.stream().filter(order -> (order.getState().equals(OrderStateEnum.FINISH.getCode()) || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode())) |
| | | && Objects.nonNull(order.getCouponId()) && order.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); |
| | | tAgentResp.setUsedCoupon(usedCoupon.size()); |
| | | // 已使用优惠券金额求和,已使用优惠券id |
| | | List<Integer> usedCouponId = usedCoupon.stream().map(TOrder::getCouponId).collect(Collectors.toList()); |
| | | // 查询已使用优惠券金额求和 |
| | | List<TCoupon> tCoupons1 = tCouponMapper.selectList(new EntityWrapper<TCoupon>().in("id", usedCouponId)); |
| | | tCoupons1.stream().map(TCoupon::getCouponPreferentialAmount).reduce(BigDecimal::add).ifPresent(tAgentResp::setCouponPriceSum); |
| | | } |
| | | |
| | | if(!CollectionUtils.isEmpty(tCoupons)){ |
| | | // 过滤代理商发放的优惠券 |
| | | List<TCoupon> coupons = tCoupons.stream().filter(coupon -> coupon.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); |
| | | tAgentResp.setIssuedCoupon(coupons.size()); |
| | | } |
| | | |
| | | if(!CollectionUtils.isEmpty(tDrivers)){ |
| | | // 司机数 |
| | | List<TDriver> drivers = tDrivers.stream().filter(driver -> driver.getAgentId().equals(tAgent.getId())).collect(Collectors.toList()); |
| | | tAgentResp.setDriverCount(drivers.size()); |
| | | // 司机充值计算 |
| | | List<Integer> driverIds = drivers.stream().map(TDriver::getId).collect(Collectors.toList()); |
| | | List<TRechargeRecord> tRechargeRecords = tRechargeRecordMapper.selectList(new EntityWrapper<TRechargeRecord>().in("userId", driverIds) |
| | | .eq("type", UserTypeEnum.DRIVER.getCode()) |
| | | .eq("payStatus", PayStatusEnum.FINISH.getCode())); |
| | | tRechargeRecords.stream().map(TRechargeRecord::getAmount).reduce(BigDecimal::add).ifPresent(tAgentResp::setDriverRecharge); |
| | | } |
| | | |
| | | tAgentRespList.add(tAgentResp); |
| | | } |
| | | return tAgentRespList; |
| | | } |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.dao.TDriverMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | | * 司机表 服务实现类 |
| | | * 司机基础信息 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-04 |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @Service |
| | | public class TDriverServiceImpl extends ServiceImpl<TDriverMapper, TDriver> implements ITDriverService { |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getAuthDriverList(Page<Map<String, Object>> page, String beginTime, String endTime, String companyName, String phone, String account, Integer addType, Integer authState) { |
| | | return this.baseMapper.getAuthDriverList(page, beginTime, endTime, companyName, phone, account, addType, authState); |
| | | public EntityWrapper<TDriver> getPageList(String createTime, String phone, Integer status) { |
| | | EntityWrapper<TDriver> wrapper = new EntityWrapper<>(); |
| | | // 手机号 |
| | | if(StringUtils.hasLength(phone)){ |
| | | wrapper.like("phone",phone); |
| | | } |
| | | // 状态 |
| | | if(Objects.nonNull(status)){ |
| | | wrapper.eq("status",status); |
| | | } |
| | | // 开始,结束时间 |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | Date startTime = DateUtil.getDate_str4(split[0]); |
| | | Date endTime = DateUtil.getDate_str4(split[1]); |
| | | wrapper.between("createTime",startTime,endTime); |
| | | } |
| | | return wrapper; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getDriverById(Integer driverId) { |
| | | return this.baseMapper.getDriverById(driverId); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getDriverList(Page<Map<String, Object>> page, Integer roleType,Integer nowUserId,String beginTime, String endTime, String companyName, String phone, String name, Integer addType, Integer authState) { |
| | | return this.baseMapper.getDriverList(page,roleType,nowUserId, beginTime, endTime, companyName, phone, name, addType, authState); |
| | | } |
| | | |
| | | @Override |
| | | public String getUseCarIdStr(Integer carId) { |
| | | return this.baseMapper.getUseCarIdStr(carId); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCanSelectCarList(Page<Map<String, Object>> page, Integer roleType, Integer nowUserId, String carIdStr, String carLicensePlate, String brandName, String modelName, String color, String serverStr) { |
| | | return this.baseMapper.getCanSelectCarList(page, roleType, nowUserId, carIdStr, carLicensePlate, brandName, modelName, color, serverStr); |
| | | } |
| | | |
| | | @Override |
| | | public void updateCompanyDriverState(Integer authState, Integer companyId) { |
| | | this.baseMapper.updateCompanyDriverState(authState, companyId); |
| | | } |
| | | |
| | | @Override |
| | | public void updateFranchiseeDriverState(Integer authState, Integer franchiseeId) { |
| | | this.baseMapper.updateFranchiseeDriverState(authState, franchiseeId); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getDriverListNoPage(Integer roleType, Integer nowUserId) { |
| | | return this.baseMapper.getDriverListNoPage(roleType, nowUserId); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TRechargeRecord; |
| | | import com.stylefeng.guns.modular.system.dao.TRechargeRecordMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITRechargeRecordService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充值记录 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @Service |
| | | public class TRechargeRecordServiceImpl extends ServiceImpl<TRechargeRecordMapper, TRechargeRecord> implements ITRechargeRecordService { |
| | | |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.stylefeng.guns.modular.system.dao.TRegionMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 省市区三级联动 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-02 |
| | | * @author stylefeng |
| | | * @since 2023-02-20 |
| | | */ |
| | | @Service |
| | | public class TRegionServiceImpl extends ServiceImpl<TRegionMapper, TRegion> implements ITRegionService { |
| | | |
| | | @Autowired |
| | | private TRegionMapper tRegionMapper; |
| | | |
| | | @Override |
| | | public List<TRegion> getAreaList() { |
| | | // 查询所有区域 |
| | | List<TRegion> tRegions = tRegionMapper.selectList(new EntityWrapper<TRegion>()); |
| | | if (CollectionUtils.isEmpty(tRegions)){ |
| | | return Lists.newArrayList(); |
| | | } |
| | | // 过滤顶级 |
| | | List<TRegion> parent = tRegions.stream().filter(region -> region.getParentId().equals(0)).collect(Collectors.toList()); |
| | | // 再进行递归组装 |
| | | getChildren(tRegions, parent); |
| | | return parent; |
| | | } |
| | | |
| | | /** |
| | | * 递归封装层级 |
| | | * @param tRegions |
| | | * @param parentList |
| | | */ |
| | | private void getChildren(List<TRegion> tRegions, List<TRegion> parentList) { |
| | | parentList.stream().forEach(parent -> { |
| | | List<TRegion> children = tRegions.stream(). |
| | | filter(salesTierVO -> salesTierVO.getParentId().equals(parent.getId())) |
| | | .collect(Collectors.toList()); |
| | | parent.setChildren(children); |
| | | if (!CollectionUtils.isEmpty(children)) { |
| | | getChildren(tRegions, children); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | |
| | | Map<String, String> file = new HashMap<>(); |
| | | file.put("path", "/tmp"); |
| | | file.put("fileName", fileName); |
| | | file.put("url", tDriver.getHeadImgUrl()); |
| | | // file.put("url", tDriver.getHeadImgUrl()); |
| | | file.put("newFilePath", "/swapfiles"); |
| | | String result_ = HttpRequestUtil.postRequest(PushURL.ministry_of_transport_ftp + "/uploadAndMoveFile", file); |
| | | System.out.println("上传图片文件:" + result_); |
| | |
| | | Map<String, String> file1 = new HashMap<>(); |
| | | file1.put("path", "/tmp"); |
| | | file1.put("fileName", fileName1); |
| | | file1.put("url", tDriver.getDriveCardImgUrl()); |
| | | // file1.put("url", tDriver.getDriveCardImgUrl()); |
| | | file1.put("newFilePath", "/swapfiles"); |
| | | String result1_ = HttpRequestUtil.postRequest(PushURL.ministry_of_transport_ftp + "/uploadAndMoveFile", file1); |
| | | System.out.println("上传图片文件:" + result1_); |
| | |
| | | jsonObject.put("DriverName", tDriver.getName());//机动车驾驶员姓名 |
| | | jsonObject.put("DriverPhone", tDriver.getPhone());//驾驶员手机号 |
| | | jsonObject.put("DriverGender", (tDriver.getSex() == 1 ? "男" : "女"));//驾驶员性别 |
| | | jsonObject.put("DriverBirthday", tDriver.getBirthday());//出生日期YYYYMMDD |
| | | jsonObject.put("DriverNationality", tDriver.getDriverNationality());//国籍 |
| | | jsonObject.put("DriverNation", tDriver.getDriverNation());//驾驶员民族 |
| | | jsonObject.put("DriverMaritalStatus", (tDriver.getDriverMaritalStatus() == 1 ? "未婚" : tDriver.getDriverMaritalStatus() == 2 ? "已婚" : "离异"));//驾驶员婚姻状况(未婚,已婚,离异) |
| | | jsonObject.put("DriverLanguageLevel", tDriver.getDriverLanguageLevel());//驾驶员外语能力 |
| | | jsonObject.put("DriverEducation", tDriver.getDriverEducation());//驾驶员学历 |
| | | jsonObject.put("DriverCensus", tDriver.getDriverCensus());//户口登记机关名称 |
| | | jsonObject.put("DriverAddress", tDriver.getDriverAddress());//户口住址或长住地址 |
| | | jsonObject.put("DriverContactAddress", tDriver.getDriverContactAddress());//驾驶员通信地址 |
| | | jsonObject.put("PhotoId", fileName);//驾驶员照片文件编号 |
| | | jsonObject.put("LicenseId", tDriver.getDriveCard());//机动车驾驶证号 |
| | | jsonObject.put("LicensePhotoId", fileName1);//机动车驾驶证扫描件文件编号 |
| | | jsonObject.put("DriverType", tDriver.getDriverType());//准驾车型 |
| | | jsonObject.put("GetDriverLicenseDate", tDriver.getGetDriverLicenseDate());//初次领取驾驶证日期YYYYMMDD |
| | | jsonObject.put("DriverLicenseOn", tDriver.getDriverLicenseOn());//驾驶证有效期限起YYYYMMDD |
| | | jsonObject.put("DriverLicenseOff", tDriver.getDriverLicenseOff());//驾驶证有效期限止YYYYMMDD |
| | | jsonObject.put("TaxiDriver", tDriver.getTaxiDriver() == 0 ? 2 : 1);//是否巡游出租汽车驾驶员(1:是,2:否) |
| | | jsonObject.put("CertificateNo", tDriver.getTaxiAptitudeCard());//网络预约出租汽车驾驶员资格证号 |
| | | jsonObject.put("NetworkCarIssueOrganization", tDriver.getNetworkCarlssueOrganization());//网络预约出租汽车驾驶员证发证机构 |
| | | jsonObject.put("NetworkCarIssueDate", tDriver.getNetworkCarlssueDate());//资格证发证日期YYYYMMDD |
| | | jsonObject.put("GetNetworkCarProofDate", tDriver.getGetNetworkCarProofDate());//初次领取资格证日期YYYYMMDD |
| | | jsonObject.put("NetworkCarProofOn", tDriver.getNetworkCarProofOn());//资格证有效起始日期YYYYMMDD |
| | | jsonObject.put("NetworkCarProofOff", tDriver.getNetworkCarProofOff());//资格证有截止日期YYYYMMDD |
| | | jsonObject.put("RegisterDate", tDriver.getRegisterDate());//报备日期(驾驶员信息向服务所在地出租车行政主管部门报备日期) |
| | | jsonObject.put("FullTimeDriver", tDriver.getFullTimeDriver());//是否专职驾驶员(1:是,0:否) |
| | | jsonObject.put("InDriverBlacklist", tDriver.getInDriverBlacklist());//是否在驾驶员黑名单内(1:是,0:否) |
| | | jsonObject.put("CommercialType", tDriver.getCommercialType());//服务类型(1:网络预约出租汽车,2:巡游出租汽车,3:私人小客车合乘) |
| | | jsonObject.put("ContractCompany", tDriver.getContractCompany());//驾驶员合同签署公司 |
| | | jsonObject.put("ContractOn", tDriver.getContractOn());//合同有效期起YYYYMMDD |
| | | jsonObject.put("ContractOff", tDriver.getContractOff());//合同有效期止YYYYMMDD |
| | | jsonObject.put("EmergencyContact", tDriver.getEmergencyContact());//紧急情况联系人 |
| | | jsonObject.put("EmergencyContactPhone", tDriver.getEmergencyContactPhone());//紧急情况联系人电话 |
| | | jsonObject.put("EmergencyContactAddress", tDriver.getEmergencyContactAddress());//紧急情况联系人通信地址 |
| | | |
| | | jsonObject.put("State", tDriver.getAuthState() == 2 ? 0 : 1);//状态(0:有效,1:失效) |
| | | jsonObject.put("Flag", tDriver.getFlag());//操作标识(1:新增,2:更新,3:删除) |
| | | // jsonObject.put("DriverBirthday", tDriver.getBirthday());//出生日期YYYYMMDD |
| | | // jsonObject.put("DriverNationality", tDriver.getDriverNationality());//国籍 |
| | | // jsonObject.put("DriverNation", tDriver.getDriverNation());//驾驶员民族 |
| | | // jsonObject.put("DriverMaritalStatus", (tDriver.getDriverMaritalStatus() == 1 ? "未婚" : tDriver.getDriverMaritalStatus() == 2 ? "已婚" : "离异"));//驾驶员婚姻状况(未婚,已婚,离异) |
| | | // jsonObject.put("DriverLanguageLevel", tDriver.getDriverLanguageLevel());//驾驶员外语能力 |
| | | // jsonObject.put("DriverEducation", tDriver.getDriverEducation());//驾驶员学历 |
| | | // jsonObject.put("DriverCensus", tDriver.getDriverCensus());//户口登记机关名称 |
| | | // jsonObject.put("DriverAddress", tDriver.getDriverAddress());//户口住址或长住地址 |
| | | // jsonObject.put("DriverContactAddress", tDriver.getDriverContactAddress());//驾驶员通信地址 |
| | | // jsonObject.put("PhotoId", fileName);//驾驶员照片文件编号 |
| | | // jsonObject.put("LicenseId", tDriver.getDriveCard());//机动车驾驶证号 |
| | | // jsonObject.put("LicensePhotoId", fileName1);//机动车驾驶证扫描件文件编号 |
| | | // jsonObject.put("DriverType", tDriver.getDriverType());//准驾车型 |
| | | // jsonObject.put("GetDriverLicenseDate", tDriver.getGetDriverLicenseDate());//初次领取驾驶证日期YYYYMMDD |
| | | // jsonObject.put("DriverLicenseOn", tDriver.getDriverLicenseOn());//驾驶证有效期限起YYYYMMDD |
| | | // jsonObject.put("DriverLicenseOff", tDriver.getDriverLicenseOff());//驾驶证有效期限止YYYYMMDD |
| | | // jsonObject.put("TaxiDriver", tDriver.getTaxiDriver() == 0 ? 2 : 1);//是否巡游出租汽车驾驶员(1:是,2:否) |
| | | // jsonObject.put("CertificateNo", tDriver.getTaxiAptitudeCard());//网络预约出租汽车驾驶员资格证号 |
| | | // jsonObject.put("NetworkCarIssueOrganization", tDriver.getNetworkCarlssueOrganization());//网络预约出租汽车驾驶员证发证机构 |
| | | // jsonObject.put("NetworkCarIssueDate", tDriver.getNetworkCarlssueDate());//资格证发证日期YYYYMMDD |
| | | // jsonObject.put("GetNetworkCarProofDate", tDriver.getGetNetworkCarProofDate());//初次领取资格证日期YYYYMMDD |
| | | // jsonObject.put("NetworkCarProofOn", tDriver.getNetworkCarProofOn());//资格证有效起始日期YYYYMMDD |
| | | // jsonObject.put("NetworkCarProofOff", tDriver.getNetworkCarProofOff());//资格证有截止日期YYYYMMDD |
| | | // jsonObject.put("RegisterDate", tDriver.getRegisterDate());//报备日期(驾驶员信息向服务所在地出租车行政主管部门报备日期) |
| | | // jsonObject.put("FullTimeDriver", tDriver.getFullTimeDriver());//是否专职驾驶员(1:是,0:否) |
| | | // jsonObject.put("InDriverBlacklist", tDriver.getInDriverBlacklist());//是否在驾驶员黑名单内(1:是,0:否) |
| | | // jsonObject.put("CommercialType", tDriver.getCommercialType());//服务类型(1:网络预约出租汽车,2:巡游出租汽车,3:私人小客车合乘) |
| | | // jsonObject.put("ContractCompany", tDriver.getContractCompany());//驾驶员合同签署公司 |
| | | // jsonObject.put("ContractOn", tDriver.getContractOn());//合同有效期起YYYYMMDD |
| | | // jsonObject.put("ContractOff", tDriver.getContractOff());//合同有效期止YYYYMMDD |
| | | // jsonObject.put("EmergencyContact", tDriver.getEmergencyContact());//紧急情况联系人 |
| | | // jsonObject.put("EmergencyContactPhone", tDriver.getEmergencyContactPhone());//紧急情况联系人电话 |
| | | // jsonObject.put("EmergencyContactAddress", tDriver.getEmergencyContactAddress());//紧急情况联系人通信地址 |
| | | // |
| | | // jsonObject.put("State", tDriver.getAuthState() == 2 ? 0 : 1);//状态(0:有效,1:失效) |
| | | // jsonObject.put("Flag", tDriver.getFlag());//操作标识(1:新增,2:更新,3:删除) |
| | | jsonObject.put("UpdateTime", new Date()); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("baseInfoDriver", jsonObject.toJSONString()); |
| | |
| | | TDriver driver = driverService.selectById(driverTrain.getDriverId()); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("Address", 450204);//注册地行政区划代码 |
| | | jsonObject.put("LicenseId", driver.getDriveCard());//机动车驾驶证号 |
| | | // jsonObject.put("LicenseId", driver.getDriveCard());//机动车驾驶证号 |
| | | jsonObject.put("CourseName", driverTrain.getCourseName());//驾驶员培训课程名称 |
| | | jsonObject.put("CourseDate", driverTrain.getCourseDate());//培训课程日期YYYYMMDD |
| | | jsonObject.put("StartTime", driverTrain.getStartTime());//培训开始时间 |
| | |
| | | TVersionManagement type = versionManagementService.selectOne(new EntityWrapper<TVersionManagement>().eq("type", 2).orderBy("insertTime desc limit 0, 1")); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("Address", 450204);//注册地行政区划代码 |
| | | jsonObject.put("LicenseId", tDriver.getDriveCard());//机动车驾驶证号 |
| | | // jsonObject.put("LicenseId", tDriver.getDriveCard());//机动车驾驶证号 |
| | | jsonObject.put("DriverPhone", tDriver.getPhone());//驾驶员手机号 |
| | | jsonObject.put("NetType", phoneExp(tDriver.getPhone()));//手机运营商(1:中国联通,2:中国移动,3:中国电信,4:其他) |
| | | jsonObject.put("AppVersion", type.getVersion());//使用APP版本号 |
| | |
| | | ); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("Address", 450204);//注册地行政区划代码 |
| | | jsonObject.put("LicenseId", tDriver.getDriveCard());//机动车驾驶证号 |
| | | // jsonObject.put("LicenseId", tDriver.getDriveCard());//机动车驾驶证号 |
| | | jsonObject.put("Cycle", s.getTime());//统计周期(统计周期按月,内容填写统计月份YYYYMM) |
| | | jsonObject.put("OrderCount", i);//完成订单次数 |
| | | jsonObject.put("TrafficViolationCount", 0);//交通违章次数 |
| | |
| | | jsonObject.put("OrderTime", tOrderPrivateCar.getOrderNum());//订单时间YYYYMMDDhhmmss |
| | | jsonObject.put("CancelTime", query.getInsertTime());//订单撤销时间YYYYMMDDhhmmss |
| | | jsonObject.put("Operator", "3");//撤销发起方(1:乘客,2:驾驶员,3:平台公司) |
| | | jsonObject.put("CancelTypeCode", null != driver ? driver.getDriveCard() : "");//机动车驾驶证编号 |
| | | // jsonObject.put("CancelTypeCode", null != driver ? driver.getDriveCard() : "");//机动车驾驶证编号 |
| | | jsonObject.put("CancelReason", query.getReason());//撤销或违约原因 |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("orderCancel", jsonObject.toJSONString()); |
| | |
| | | DriverPunish driverPunish = driverPunishMapper.selectById(id); |
| | | TDriver driver = driverService.selectById(driverPunish.getDriverId()); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("LicenseId", driver.getDriveCard());//机动车驾驶证编号 |
| | | // jsonObject.put("LicenseId", driver.getDriveCard());//机动车驾驶证编号 |
| | | jsonObject.put("PunishTime", driverPunish.getPunishTime());//处罚时间YYYYMMDDhhmms |
| | | jsonObject.put("PunishReason", driverPunish.getPunishReason());//处罚原因 |
| | | jsonObject.put("PunishReault", driverPunish.getPunishReault());//处罚结果 |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="principal" name="姓名" /> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="principalPhone" name="联系电话" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="createTime" name="时间" /> |
| | | </div> |
| | | <!--<div class="col-sm-1"> |
| | | <select class="input-group" id="status" style="width: 80px;height: 33px" name="status"> |
| | | <option value="">状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="2">冻结</option> |
| | | <option value="3">已删除</option> |
| | | </select> |
| | | </div>--> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TAgent.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TAgent.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <button type="button" class="btn btn-primary " onclick="TAgent.export()" id="export"> |
| | | <i class="fa "></i> 导出 |
| | | </button> |
| | | @if(shiro.hasPermission("/tAgent/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TAgent.openAddTAgent()"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | <!--<div class="hidden-xs" id="TAgentTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tAgent/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TAgent.openAddTAgent()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tAgent/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TAgent.openTAgentDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tAgent/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TAgent.delete()" space="true"/> |
| | | @} |
| | | </div>--> |
| | | <#table id="TAgentTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAgent/tAgent.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12" style="height: 100px;"> |
| | | <div class="col-sm-6 control-label"> |
| | | <label class="col-sm-1" style="width: 20px;">省:</label> |
| | | <select class="input-group col-sm-2 " onclick="TAgent.areaProvince()" id="province" style="width: 200px;height: 33px" name="province"> |
| | | <option value="">请选择省</option> |
| | | @for(i in province){ |
| | | <option id="${i.id}" value="${i.name}">${i.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-6 control-label"> |
| | | <label class="col-sm-1" style="width: 20px;">市:</label> |
| | | <select class="input-group col-sm-2" id="city" style="width: 200px;height: 33px" name="city"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="margin-left:300px"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TAgentInfoDlg.close()" /> |
| | | <#button name="确定" icon="fa-plus" clickFun="TAgent.submitArea()"/> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAgent/tAgent.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAgent/tAgent_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">代理商资料</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >负责人姓名:</label> |
| | | <label>${principal}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">添加时间:</label> |
| | | <label>${createTime}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >邮箱:</label> |
| | | <label>${email}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">代理区域:</label> |
| | | <label>${area}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">基本信息</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >统计时间:</label> |
| | | <span>${startTimeToEndTime}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >累计订单量:</label> |
| | | <label>${orderSum}</label>单 |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">累计优惠券金额:</label> |
| | | <label>${couponPriceSum}</label>元 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >有效订单:</label> |
| | | <label>${validOrder}</label>单 |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">累计发放司机金额:</label> |
| | | <label>${driverRecharge}</label>元 |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >已发放优惠券:</label> |
| | | <label>${issuedCoupon}</label>张 |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">司机数量:</label> |
| | | <label>${driverCount}</label>人 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >已使用优惠券:</label> |
| | | <label>${usedCoupon}</label>张 |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAgent/tAgent.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <input hidden id="areaId" value="areaId"> |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">负责人姓名:</label> |
| | | <div class="col-sm-6"> |
| | | <input class="form-control" id="principal" name="principal" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">联系电话:</label> |
| | | <div class="col-sm-6"> |
| | | <input class="form-control" id="principalPhone" name="principalPhone" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">邮箱:</label> |
| | | <div class="col-sm-6"> |
| | | <input class="form-control" id="email" name="email" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | </div> |
| | | |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">代理区域:</label> |
| | | <div class="col-sm-6"> |
| | | <input class="form-control" id="area" onclick="TAgent.area()" name="area" type="text" placeholder="请选择"> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | </div> |
| | | |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">开户银行:</label> |
| | | <div class="col-sm-6"> |
| | | <input class="form-control" id="bankDeposit" name="bankDeposit" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | </div> |
| | | |
| | | <div class="col-sm-12"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">银行账户:</label> |
| | | <div class="col-sm-6"> |
| | | <input class="form-control" id="bankAccount" name="bankAccount" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10" style="text-align: center"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TAgentInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TAgentInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAgent/tAgent_info.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAgent/tAgent.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" value="${item.id}" underline="true"/> |
| | | <#input id="principal" name="负责人姓名" value="${item.principal}" underline="true"/> |
| | | <#input id="principalPhone" name="负责人电话" value="${item.principalPhone}" underline="true"/> |
| | | <#input id="email" name="邮箱" value="${item.email}" underline="true"/> |
| | | <#input id="provinceCode" name="代理区域省编号" value="${item.provinceCode}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="provinceName" name="代理区域省名称" value="${item.provinceName}" underline="true"/> |
| | | <#input id="cityCode" name="代理区域市编号" value="${item.cityCode}" underline="true"/> |
| | | <#input id="cityName" name="代理区域市名称" value="${item.cityName}" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> |
| | | <#input id="createTime" name="添加时间" value="${item.createTime}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TAgentInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TAgentInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAgent/tAgent_info.js"></script> |
| | | @} |
| | |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>司机审核列表管理</h5> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="insertTime" name="注册时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="companyName" name="所属分公司/加盟商" /> |
| | | <#TimeCon id="createTime" name="时间" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="手机号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="account" name="账号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="addType" name="司机来源" > |
| | | <option value="">全部</option> |
| | | <option value="1">司机注册</option> |
| | | <option value="2">平台添加</option> |
| | | <option value="3">分公司添加</option> |
| | | <option value="4">加盟商添加</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="authState" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">待审核</option> |
| | | <option value="4">已拒绝</option> |
| | | </#SelectCon> |
| | | <div class="col-sm-1"> |
| | | <select class="input-group" id="status" style="width: 80px;height: 33px" name="status"> |
| | | <option value="">状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="2">冻结</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TDriver.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TDriver.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <button type="button" class="btn btn-primary " onclick="TAgent.export()" id="audit"> |
| | | <i class="fa "></i> 立即审核 |
| | | </button> |
| | | <button type="button" class="btn btn-primary " onclick="TAgent.export()" id="export"> |
| | | <i class="fa "></i> 导出 |
| | | </button> |
| | | <button type="button" class="btn btn-primary " onclick="TAgent.export()" id="driverException"> |
| | | <i class="fa "></i> 异常 |
| | | </button> |
| | | <button type="button" class="btn btn-primary " onclick="TAgent.export()" id="recharge"> |
| | | <i class="fa "></i> 充值 |
| | | </button> |
| | | @if(shiro.hasPermission("/tAgent/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TDriver.openAddTDriver()"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TDriverTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tDriver/immediately")){ |
| | | <#button name="立即审核" icon="fa-plus" clickFun="TDriver.immediately()"/> |
| | | <!--<div class="hidden-xs" id="TDriverTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tDriver/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TDriver.openAddTDriver()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/look")){ |
| | | <#button name="查看详情" icon="fa-edit" clickFun="TDriver.look()" space="true"/> |
| | | @if(shiro.hasPermission("/tDriver/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TDriver.openTDriverDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TDriver.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | </div>--> |
| | | <#table id="TDriverTable"/> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver.js"></script> |
| | | <script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="yesDriverInfoForm"> |
| | | <input type="hidden" id="roleType" name="roleType" value="${roleType}"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-10"> |
| | | <#input id="name" name="司机姓名" /> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">所属机构:</label> |
| | | <div class="col-sm-9" style="display: flex;align-items: center;"> |
| | | @if(roleType == 1){ |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="companyType1" value="1" name="companyType" checked="" onclick="YesDriverInfoDlg.companyTypeClick(1)"> |
| | | <label for="companyType1"> 平台司机 </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="companyTyp2" value="2" name="companyType" onclick="YesDriverInfoDlg.companyTypeClick(2)"> |
| | | <label for="companyTyp2"> 加盟司机 </label> |
| | | </div> |
| | | <select class="form-control companyDiv" id="oneId" onchange="YesDriverInfoDlg.oneChange(this)" style="width: 200px;display: none;" > |
| | | <option value="">选择所属分公司</option> |
| | | @for(obj in companyList!){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | <select class="form-control companyDiv" id="twoId" style="width: 200px;margin-left: 30px;display: none;"> |
| | | <option value="">选择所属加盟商</option> |
| | | </select> |
| | | @}else if(roleType == 2){ |
| | | <span class="control-label">${objectName!}</span> |
| | | <select class="form-control" id="franchiseeId" style="width: 200px;margin-left: 30px;"> |
| | | <option value="">选择所属加盟商</option> |
| | | @for(obj in franchiseeList!){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | @}else if(roleType == 3){ |
| | | <span class="control-label">${objectName!}</span> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | <#avatar id="headImgUrl" name="头像:" /> |
| | | <#avatar id="faceImgUrl" name="人脸识别照片:" /> |
| | | <!--<#input id="phone" name="手机号" />--> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">性别:</label> |
| | | <div class="col-sm-9" style="display: flex;align-items: center;"> |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="sex1" value="1" name="sex" checked="" > |
| | | <label for="sex1"> 男 </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="sex2" value="2" name="sex" > |
| | | <label for="sex2"> 女 </label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <#input id="driveCard" name="驾驶证号码"/> |
| | | <#avatar id="driveCardImgUrl" name="驾驶证照片:" /> |
| | | <#input id="driverAge" name="驾龄" /> |
| | | <#input id="idCard" name="身份证号" /> |
| | | <#input id="driverAddress" name="居住地址" /> |
| | | <#input id="taxiAptitudeCard" name="出租车资格证号" /> |
| | | <#avatar id="networkCarlssueImg" name="网约车资格证照片:" /> |
| | | <#input id="jobNumber" name="工号(选填)" /> |
| | | <div class="form-group"> |
| | | <fieldset> |
| | | <label class="col-sm-3 control-label">经营业务:</label> |
| | | <div class="col-sm-9"> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox1" value="1"> |
| | | <label for="serverBox1"> 专车 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox2" value="2"> |
| | | <label for="serverBox2"> 出租车 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox3" value="3" onclick="YesDriverInfoDlg.checkBox()" > |
| | | <label for="serverBox3"> 跨城出行 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox4" value="4"> |
| | | <label for="serverBox4"> 小件物流-同城 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox5" value="5"> |
| | | <label for="serverBox5"> 小件物流-跨城 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox6" value="6"> |
| | | <label for="serverBox6"> 包车 </label> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <div id="lineDiv" style="display: none;"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">关联线路:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="selectLineId"> |
| | | <option value="">选择关联线路</option> |
| | | @for(obj in lineList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#button btnCss="info" name="添加" id="ensure" icon="fa-check" clickFun="YesDriverInfoDlg.addLine()"/> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">已添加线路</label> |
| | | <div class="col-sm-9"> |
| | | <div style="height: 200px; border: 1px solid #e5e6e7;overflow-y: auto;"> |
| | | <table class="table table-striped table-bordered table-hover table-condensed"> |
| | | <thead> |
| | | <tr> |
| | | <th style="width: 300px;text-align: center;">关联时间</th> |
| | | <th style="width: 300px;text-align: center;">线路名称</th> |
| | | <th style="width: 100px;text-align: center;">操作</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="line"> |
| | | |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" underline="true"/> |
| | | <#input id="code" name="编号" underline="true"/> |
| | | <#input id="name" name="姓名" underline="true"/> |
| | | <#input id="avatar" name="头像" underline="true"/> |
| | | <#input id="phone" name="手机号" underline="true"/> |
| | | <#input id="password" name="密码" underline="true"/> |
| | | <#input id="sex" name="性别(1=男,2=女)" underline="true"/> |
| | | <#input id="source" name="来源(1=)" underline="true"/> |
| | | <#input id="emergencyContact" name="紧急联系人" underline="true"/> |
| | | <#input id="emergencyPhone" name="紧急联系电话" underline="true"/> |
| | | <#input id="driverLicenseNumber" name="驾驶证号码" underline="true"/> |
| | | <#input id="driverLicense" name="驾驶证照片" underline="true"/> |
| | | <#input id="idcard" name="身份证号码" underline="true"/> |
| | | <#input id="idcardFront" name="身份证正面照"/> |
| | | </div> |
| | | |
| | | |
| | | <#input id="phone" name="登录账号【手机号】" /> |
| | | <#input id="password" name="密码" type="password"/> |
| | | <#input id="rePassword" name="确认密码" type="password"/> |
| | | |
| | | <#input id="driverNationality" name="国籍"/> |
| | | <#input id="driverNation" name="民族"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">婚姻状况:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="driverMaritalStatus"> |
| | | <option value="1">已婚</option> |
| | | <option value="2">未婚</option> |
| | | <option value="3">离异</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="driverLanguageLevel" name="外语能力"/> |
| | | <#input id="driverEducation" name="学历"/> |
| | | <#input id="driverCensus" name="户口登记机关名称"/> |
| | | <#input id="driverAddress" name="户口地址"/> |
| | | <#input id="driverContactAddress" name="通信地址"/> |
| | | <#input id="getDriverLicenseDate" name="初次领取驾驶证日期"/> |
| | | <#input id="driverLicenseOn" name="驾驶证有效期限起"/> |
| | | <#input id="driverLicenseOff" name="驾驶证有效期限止"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">是否巡游出租车驾驶员:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="taxiDriver"> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="networkCarlssueOrganization" name="网络预约出租车驾驶员证发证机构"/> |
| | | <#input id="networkCarlssueDate" name="资格证发证日期"/> |
| | | <#input id="getNetworkCarProofDate" name="初次认领资格证日期"/> |
| | | <#input id="networkCarProofOn" name="资格证有效起始日期"/> |
| | | <#input id="networkCarProofOff" name="资格证有效截至日期"/> |
| | | <#input id="registerDate" name="报备日期"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">是否是专职驾驶员:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="fullTimeDriver"> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">是否在驾驶员黑名单内:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="inDriverBlacklist"> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">服务类型:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="commercialType"> |
| | | <option value="1">网络预约出租汽车</option> |
| | | <option value="2">巡游出租汽车</option> |
| | | <option value="3">私人小客车合乘</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="contractCompany" name="驾驶员合同签署公司"/> |
| | | <#input id="contractOn" name="合同有效期起"/> |
| | | <#input id="contractOff" name="合同有效期止"/> |
| | | <#input id="emergencyContact" name="紧急联系人"/> |
| | | <#input id="emergencyContactPhone" name="紧急联系电话"/> |
| | | <#input id="emergencyContactAddress" name="紧急联系地址"/> |
| | | <div class="col-sm-6"> |
| | | <#input id="idcardBack" name="身份证背面照" underline="true"/> |
| | | <#input id="inviterType" name="邀约人类型(1=用户,2=司机)" underline="true"/> |
| | | <#input id="inviterId" name="邀约人id" underline="true"/> |
| | | <#input id="agentId" name="代理商id" underline="true"/> |
| | | <#input id="branchOfficeId" name="分公司id" underline="true"/> |
| | | <#input id="balance" name="账户余额" underline="true"/> |
| | | <#input id="approvalStatus" name="审核状态(1=待审核,2=已同意,3=已拒绝)" underline="true"/> |
| | | <#input id="approvalNotes" name="审核注释" underline="true"/> |
| | | <#input id="approvalUserId" name="审核用户id" underline="true"/> |
| | | <#input id="approvalTime" name="审核时间" underline="true"/> |
| | | <#input id="serverStatus" name="服务状态(1=空闲,2=服务中)" underline="true"/> |
| | | <#input id="integral" name="剩余积分" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" underline="true"/> |
| | | <#input id="createTime" name="添加时间" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="YesDriverInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="YesDriverInfoDlg.close()"/> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TDriverInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TDriverInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/yesDriver_info.js"></script> |
| | | |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#getDriverLicenseDate' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#driverLicenseOn' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#driverLicenseOff' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#networkCarlssueDate' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#getNetworkCarProofDate' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#networkCarProofOn' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#networkCarProofOff' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#contractOn' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#contractOff' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#registerDate' |
| | | }); |
| | | </script> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver_info.js"></script> |
| | | @} |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="yesDriverInfoForm"> |
| | | <input type="hidden" id="id" name="id" value="${item.id}"> |
| | | <input type="hidden" id="roleType" name="roleType" value="${roleType}"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-11"> |
| | | <#input id="name" name="司机姓名" value="${item.name}"/> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" value="${item.id}" underline="true"/> |
| | | <#input id="code" name="编号" value="${item.code}" underline="true"/> |
| | | <#input id="name" name="姓名" value="${item.name}" underline="true"/> |
| | | <#input id="avatar" name="头像" value="${item.avatar}" underline="true"/> |
| | | <#input id="phone" name="手机号" value="${item.phone}" underline="true"/> |
| | | <#input id="password" name="密码" value="${item.password}" underline="true"/> |
| | | <#input id="sex" name="性别(1=男,2=女)" value="${item.sex}" underline="true"/> |
| | | <#input id="source" name="来源(1=)" value="${item.source}" underline="true"/> |
| | | <#input id="emergencyContact" name="紧急联系人" value="${item.emergencyContact}" underline="true"/> |
| | | <#input id="emergencyPhone" name="紧急联系电话" value="${item.emergencyPhone}" underline="true"/> |
| | | <#input id="driverLicenseNumber" name="驾驶证号码" value="${item.driverLicenseNumber}" underline="true"/> |
| | | <#input id="driverLicense" name="驾驶证照片" value="${item.driverLicense}" underline="true"/> |
| | | <#input id="idcard" name="身份证号码" value="${item.idcard}" underline="true"/> |
| | | <#input id="idcardFront" name="身份证正面照" value="${item.idcardFront}" /> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">所属机构:</label> |
| | | <div class="col-sm-9" style="display: flex;align-items: center;"> |
| | | @if(roleType == 1){ |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="companyType1" value="1" name="companyType" ${1 == companyType ? 'checked=checked' : ''} onclick="YesDriverInfoDlg.companyTypeClick(1)"> |
| | | <label for="companyType1"> 平台司机 </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="companyTyp2" value="2" name="companyType" ${2 == companyType ? 'checked=checked' : ''} onclick="YesDriverInfoDlg.companyTypeClick(2)"> |
| | | <label for="companyTyp2"> 加盟司机 </label> |
| | | </div> |
| | | <select class="form-control companyDiv" id="oneId" onchange="YesDriverInfoDlg.oneChange(this)" style="width: 200px"> |
| | | <option value="">选择所属分公司</option> |
| | | @for(obj in companyList!){ |
| | | <option value="${obj.id}" ${obj.id == item.companyId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | <select class="form-control companyDiv" id="twoId" style="width: 200px;margin-left: 30px;"> |
| | | <option value="">选择所属加盟商</option> |
| | | @for(obj in franchiseeList!){ |
| | | <option value="${obj.id}" ${obj.id == item.franchiseeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | @}else if(roleType == 2){ |
| | | <span class="control-label">${objectName!}</span> |
| | | <select class="form-control" id="franchiseeId" style="width: 200px;margin-left: 30px;"> |
| | | <option value="">选择所属加盟商</option> |
| | | @for(obj in franchiseeList!){ |
| | | <option value="${obj.id}" ${obj.id == item.franchiseeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | @}else if(roleType == 3){ |
| | | <span class="control-label">${objectName!}</span> |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | <#avatar id="headImgUrl" name="头像:" avatarImg="${item.headImgUrl}"/> |
| | | <#avatar id="faceImgUrl" name="人脸识别照片:" avatarImg="${item.faceImgUrl}"/> |
| | | <!--<#input id="phone" name="手机号" value="${item.phone}"/>--> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">性别:</label> |
| | | <div class="col-sm-9" style="display: flex;align-items: center;"> |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="sex1" value="1" name="sex" ${1 == item.sex ? 'checked=checked' : ''} > |
| | | <label for="sex1"> 男 </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="sex2" value="2" name="sex" ${2 == item.sex ? 'checked=checked' : ''} > |
| | | <label for="sex2"> 女 </label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <#input id="driveCard" name="驾驶证号码" value="${item.driveCard}"/> |
| | | <#avatar id="driveCardImgUrl" name="驾驶证照片:" avatarImg="${item.driveCardImgUrl}"/> |
| | | <#input id="driverAge" name="驾龄" value="${item.driverAge}"/> |
| | | <#input id="idCard" name="身份证号" value="${item.idCard}"/> |
| | | <#input id="driverAddress" name="居住地址" value="${item.driverAddress}"/> |
| | | <#input id="taxiAptitudeCard" name="出租车资格证号" value="${item.taxiAptitudeCard}"/> |
| | | <#input id="jobNumber" name="工号(选填)" value="${item.jobNumber}"/> |
| | | <div class="form-group"> |
| | | <fieldset> |
| | | <label class="col-sm-3 control-label">经营业务:</label> |
| | | <div class="col-sm-9"> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox1" value="1" ${2 == one ? 'checked=checked' : ''}> |
| | | <label for="serverBox1"> 专车 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox2" value="2" ${2 == two ? 'checked=checked' : ''}> |
| | | <label for="serverBox2"> 出租车 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox3" value="3" ${2 == three ? 'checked=checked' : ''} onclick="YesDriverInfoDlg.checkBox()" > |
| | | <label for="serverBox3"> 跨城出行 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox4" value="4" ${2 == four ? 'checked=checked' : ''}> |
| | | <label for="serverBox4"> 小件物流-同城 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox5" value="5" ${2 == five ? 'checked=checked' : ''}> |
| | | <label for="serverBox5"> 小件物流-跨城 </label> |
| | | </div> |
| | | <div class="checkbox checkbox-success checkbox-inline"> |
| | | <input type="checkbox" name="serverBox" id="serverBox6" value="6" ${2 == six ? 'checked=checked' : ''}> |
| | | <label for="serverBox6"> 包车 </label> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | <div id="lineDiv" style="display: none;"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">关联线路:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="selectLineId"> |
| | | <option value="">选择关联线路</option> |
| | | @for(obj in lineList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#button btnCss="info" name="添加" id="ensure" icon="fa-check" clickFun="YesDriverInfoDlg.addLine()"/> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">已添加线路</label> |
| | | <div class="col-sm-9"> |
| | | <div style="height: 200px; border: 1px solid #e5e6e7;overflow-y: auto;"> |
| | | <table class="table table-striped table-bordered table-hover table-condensed"> |
| | | <thead> |
| | | <tr> |
| | | <th style="width: 300px;">关联时间</th> |
| | | <th style="width: 300px;">项目名称</th> |
| | | <th style="width: 100px;">操作</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="line"> |
| | | @for(line in driverLineList!){ |
| | | <tr class="lineClass"> |
| | | <td><input type="hidden" id="lineId" name="lineId" value="${line.lineId}"> |
| | | <input type="hidden" id="time" name="time" value="${line.addTime}">${line.addTime}</td> |
| | | <td>${line.lineName}</td> |
| | | <td><button onclick="deleteSub(this)">移除</button></td> |
| | | </tr> |
| | | @} |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <#input id="phone" name="登录账号【手机号】" value="${item.phone}"/> |
| | | <#input id="password" name="密码" type="password" /> |
| | | <#input id="rePassword" name="确认密码" type="password" /> |
| | | |
| | | <#input id="driverNationality" name="国籍" value="${item.driverNationality}"/> |
| | | <#input id="driverNation" name="民族" value="${item.driverNation}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">婚姻状况:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="driverMaritalStatus"> |
| | | <option value="1" ${item.driverMaritalStatus == 1 ? 'selected' : ''}>已婚</option> |
| | | <option value="2" ${item.driverMaritalStatus == 2 ? 'selected' : ''}>未婚</option> |
| | | <option value="3" ${item.driverMaritalStatus == 3 ? 'selected' : ''}>离异</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="driverLanguageLevel" name="外语能力" value="${item.driverLanguageLevel}"/> |
| | | <#input id="driverEducation" name="学历" value="${item.driverEducation}"/> |
| | | <#input id="driverCensus" name="户口登记机关名称" value="${item.driverCensus}"/> |
| | | <#input id="driverAddress" name="户口地址" value="${item.driverAddress}"/> |
| | | <#input id="driverContactAddress" name="通信地址" value="${item.driverContactAddress}"/> |
| | | <#input id="getDriverLicenseDate" name="初次领取驾驶证日期" value="${item.getDriverLicenseDate}"/> |
| | | <#input id="driverLicenseOn" name="驾驶证有效期限起" value="${item.driverLicenseOn}"/> |
| | | <#input id="driverLicenseOff" name="驾驶证有效期限止" value="${item.driverLicenseOff}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">是否巡游出租车驾驶员:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="taxiDriver"> |
| | | <option value="0" ${item.taxiDriver == 0 ? 'selected' : ''}>否</option> |
| | | <option value="1" ${item.taxiDriver == 1 ? 'selected' : ''}>是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="networkCarlssueOrganization" name="网络预约出租车驾驶员证发证机构" value="${item.networkCarlssueOrganization}"/> |
| | | <#input id="networkCarlssueDate" name="资格证发证日期" value="${item.networkCarlssueDate}"/> |
| | | <#input id="getNetworkCarProofDate" name="初次认领资格证日期" value="${item.getNetworkCarProofDate}"/> |
| | | <#input id="networkCarProofOn" name="资格证有效起始日期" value="${item.networkCarProofOn}"/> |
| | | <#input id="networkCarProofOff" name="资格证有效截至日期" value="${item.networkCarProofOff}"/> |
| | | <#input id="registerDate" name="报备日期" value="${item.registerDate}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">是否是专职驾驶员:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="fullTimeDriver"> |
| | | <option value="0" ${item.fullTimeDriver == 0 ? 'selected' : ''}>否</option> |
| | | <option value="1" ${item.fullTimeDriver == 1 ? 'selected' : ''}>是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">是否在驾驶员黑名单内:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="inDriverBlacklist"> |
| | | <option value="0" ${item.inDriverBlacklist == 0 ? 'selected' : ''}>否</option> |
| | | <option value="1" ${item.inDriverBlacklist == 1 ? 'selected' : ''}>是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">服务类型:</label> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="commercialType"> |
| | | <option value="1" ${item.commercialType == 1 ? 'selected' : ''}>网络预约出租汽车</option> |
| | | <option value="2" ${item.commercialType == 2 ? 'selected' : ''}>巡游出租汽车</option> |
| | | <option value="3" ${item.commercialType == 3 ? 'selected' : ''}>私人小客车合乘</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="contractCompany" name="驾驶员合同签署公司" value="${item.contractCompany}"/> |
| | | <#input id="contractOn" name="合同有效期起" value="${item.contractOn}"/> |
| | | <#input id="contractOff" name="合同有效期止" value="${item.contractOff}"/> |
| | | <#input id="emergencyContact" name="紧急联系人" value="${item.emergencyContact}"/> |
| | | <#input id="emergencyContactPhone" name="紧急联系电话" value="${item.emergencyContactPhone}"/> |
| | | <#input id="emergencyContactAddress" name="紧急联系地址" value="${item.emergencyContactAddress}"/> |
| | | |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="idcardBack" name="身份证背面照" value="${item.idcardBack}" underline="true"/> |
| | | <#input id="inviterType" name="邀约人类型(1=用户,2=司机)" value="${item.inviterType}" underline="true"/> |
| | | <#input id="inviterId" name="邀约人id" value="${item.inviterId}" underline="true"/> |
| | | <#input id="agentId" name="代理商id" value="${item.agentId}" underline="true"/> |
| | | <#input id="branchOfficeId" name="分公司id" value="${item.branchOfficeId}" underline="true"/> |
| | | <#input id="balance" name="账户余额" value="${item.balance}" underline="true"/> |
| | | <#input id="approvalStatus" name="审核状态(1=待审核,2=已同意,3=已拒绝)" value="${item.approvalStatus}" underline="true"/> |
| | | <#input id="approvalNotes" name="审核注释" value="${item.approvalNotes}" underline="true"/> |
| | | <#input id="approvalUserId" name="审核用户id" value="${item.approvalUserId}" underline="true"/> |
| | | <#input id="approvalTime" name="审核时间" value="${item.approvalTime}" underline="true"/> |
| | | <#input id="serverStatus" name="服务状态(1=空闲,2=服务中)" value="${item.serverStatus}" underline="true"/> |
| | | <#input id="integral" name="剩余积分" value="${item.integral}" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> |
| | | <#input id="createTime" name="添加时间" value="${item.createTime}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="YesDriverInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="YesDriverInfoDlg.close()"/> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TDriverInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TDriverInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/yesDriver_info.js"></script> |
| | | <script type="application/javascript"> |
| | | laydate.render({ |
| | | elem: '#getDriverLicenseDate' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#driverLicenseOn' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#driverLicenseOff' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#networkCarlssueDate' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#getNetworkCarProofDate' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#networkCarProofOn' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#networkCarProofOff' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#contractOn' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#contractOff' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#registerDate' |
| | | }); |
| | | |
| | | $(function() { |
| | | var serverBox3 = $('#serverBox3').prop('checked'); |
| | | if (serverBox3){ |
| | | $("#lineDiv").show(); |
| | | } else { |
| | | $("#lineDiv").hide(); |
| | | } |
| | | var companyType = $("input[name='companyType']:checked").val(); |
| | | if (1 == companyType){ |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == companyType){ |
| | | $(".companyDiv").show(); |
| | | } |
| | | }); |
| | | </script> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TRechargeRecord.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TRechargeRecordTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tRechargeRecord/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TRechargeRecord.openAddTRechargeRecord()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tRechargeRecord/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TRechargeRecord.openTRechargeRecordDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tRechargeRecord/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TRechargeRecord.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TRechargeRecordTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tRechargeRecord/tRechargeRecord.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" underline="true"/> |
| | | <#input id="type" name="数据类型(1=用户,2=司机)" underline="true"/> |
| | | <#input id="userId" name="用户id" underline="true"/> |
| | | <#input id="code" name="流水号" underline="true"/> |
| | | <#input id="amount" name="充值金额"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="payType" name="支付方式(1=微信)" underline="true"/> |
| | | <#input id="payTime" name="完成支付时间" underline="true"/> |
| | | <#input id="payStatus" name="支付状态(1=待支付,2=已完成)" underline="true"/> |
| | | <#input id="orderNumber" name="第三方流水号" underline="true"/> |
| | | <#input id="createTime" name="添加时间" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TRechargeRecordInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TRechargeRecordInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tRechargeRecord/tRechargeRecord_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" value="${item.id}" underline="true"/> |
| | | <#input id="type" name="数据类型(1=用户,2=司机)" value="${item.type}" underline="true"/> |
| | | <#input id="userId" name="用户id" value="${item.userId}" underline="true"/> |
| | | <#input id="code" name="流水号" value="${item.code}" underline="true"/> |
| | | <#input id="amount" name="充值金额" value="${item.amount}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="payType" name="支付方式(1=微信)" value="${item.payType}" underline="true"/> |
| | | <#input id="payTime" name="完成支付时间" value="${item.payTime}" underline="true"/> |
| | | <#input id="payStatus" name="支付状态(1=待支付,2=已完成)" value="${item.payStatus}" underline="true"/> |
| | | <#input id="orderNumber" name="第三方流水号" value="${item.orderNumber}" underline="true"/> |
| | | <#input id="createTime" name="添加时间" value="${item.createTime}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TRechargeRecordInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TRechargeRecordInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tRechargeRecord/tRechargeRecord_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TRegion.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TRegionTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tRegion/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TRegion.openAddTRegion()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tRegion/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TRegion.openTRegionDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tRegion/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TRegion.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TRegionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tRegion/tRegion.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键ID" underline="true"/> |
| | | <#input id="name" name="城市名称" underline="true"/> |
| | | <#input id="code" name=""/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="citycode" name="" underline="true"/> |
| | | <#input id="parentId" name="父级ID" underline="true"/> |
| | | <#input id="english" name="英文名称" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TRegionInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TRegionInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tRegion/tRegion_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键ID" value="${item.id}" underline="true"/> |
| | | <#input id="name" name="城市名称" value="${item.name}" underline="true"/> |
| | | <#input id="code" name="" value="${item.code}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="citycode" name="" value="${item.citycode}" underline="true"/> |
| | | <#input id="parentId" name="父级ID" value="${item.parentId}" underline="true"/> |
| | | <#input id="english" name="英文名称" value="${item.english}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TRegionInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TRegionInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tRegion/tRegion_info.js"></script> |
| | | @} |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TAgent = { |
| | | id: "TAgentTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TAgent.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '姓名', field: 'principal', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系电话', field: 'principalPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理区域', field: 'area', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单数量', field: 'orderSum', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '有效订单', field: 'validOrder', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '已发放优惠券', field: 'issuedCoupon', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '已使用优惠券', field: 'usedCoupon', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '累计优惠券金额', field: 'couponPriceSum', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '司机充值', field: 'driverRecharge', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '司机数', field: 'driverCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<span>正常</span>' |
| | | }else if (row.status === 2){ |
| | | return '<span>冻结</span>' |
| | | }else if (row.status === 3){ |
| | | return '<span>已删除</span>' |
| | | } |
| | | }}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<a href="#" onclick="TAgent.updateStatus('+row.id+','+row.status+')" style="color:red">停用</a>' +' ' + |
| | | '<a href="#" onclick="TAgent.searchTAgentDetail('+row.id+')" style="color:green">详情</a>' |
| | | }else if (row.status === 2){ |
| | | return '<a href="#" onclick="TAgent.updateStatus('+row.id+','+row.status+')" style="color:green">解冻</a>' +' ' + |
| | | '<a href="#" onclick="TAgent.searchTAgentDetail('+row.id+')" style="color:green">详情</a>' |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TAgent.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TAgent.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TAgent.openAddTAgent = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAgent/tAgent_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 提交启用冻结 |
| | | */ |
| | | TAgent.updateStatus = function (id,status) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgent/update-status?id="+id+'&status='+status, function (data) { |
| | | Feng.success("修改成功!"); |
| | | TAgent.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | // ajax.set("id",$("#id").val()); |
| | | // ajax.set("status",$("#status").val()); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情(使用中) |
| | | */ |
| | | TAgent.searchTAgentDetail = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAgent/agentDetail?agentId=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TAgent.openTAgentDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAgent/tAgent_update/' + TAgent.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开区域选择页面 |
| | | */ |
| | | TAgent.area = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '区域选择', |
| | | area: ['800px', '270px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAgent/areaDetail' |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | |
| | | /** |
| | | * 查询市区 |
| | | */ |
| | | TAgent.areaProvince = function () { |
| | | var province = document.getElementById('province'); |
| | | var index= province.selectedIndex ; |
| | | var id = province.options[index].id; |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgent/areaCity?parentId="+id, function (data) { |
| | | var opts=document.getElementById('city').options; |
| | | opts.length=0;// 这一句是清空原有列表项 |
| | | for(var i=0,n=data.length;i<n;i++){ |
| | | var data1=data[i]; |
| | | console.log(data1.name) |
| | | console.log(data1.id) |
| | | var opt=new Option(data1.name,data1.id,true,true); |
| | | opts.add(opt); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("查询失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | | * 选择省市 |
| | | */ |
| | | TAgent.submitArea = function () { |
| | | var province = document.getElementById('province'); |
| | | var provinceIndex= province.selectedIndex ; |
| | | var provinceName = province.options[provinceIndex].value; |
| | | var provinceId = province.options[provinceIndex].id; |
| | | var city = document.getElementById('city'); |
| | | var cityIndex= city.selectedIndex ; |
| | | var cityId = city.options[cityIndex].value; |
| | | var cityName = city.options[cityIndex].innerText; |
| | | parent.$("#area").val(provinceName+'/'+cityName) |
| | | parent.$("#areaId").val(provinceId+'/'+cityId) |
| | | TAgentInfoDlg.close(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TAgent.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgent/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TAgent.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tAgentId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 代理商信息导出 |
| | | */ |
| | | TAgent.export=function(){ |
| | | var principal=$("#principal").val(); |
| | | var principalPhone = $("#principalPhone").val(); |
| | | var createTime = $("#createTime").val(); |
| | | window.location.href=Feng.ctxPath + "/tAgent/export?principal="+principal |
| | | +"&principalPhone="+principalPhone |
| | | +"&createTime="+createTime |
| | | ; |
| | | } |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TAgent.search = function () { |
| | | var queryData = {}; |
| | | queryData['principal'] = $("#principal").val(); |
| | | queryData['principalPhone'] = $("#principalPhone").val(); |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | TAgent.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | TAgent.resetSearch = function (){ |
| | | $("#principal").val(''); |
| | | $("#principalPhone").val(''); |
| | | $("#createTime").val(''); |
| | | TAgent.search(); |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = TAgent.initColumn(); |
| | | var table = new BSTable(TAgent.id, "/tAgent/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TAgent.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TAgentInfoDlg = { |
| | | tAgentInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TAgentInfoDlg.clearData = function() { |
| | | this.tAgentInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TAgentInfoDlg.set = function(key, val) { |
| | | this.tAgentInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TAgentInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TAgentInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TAgent.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TAgentInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('principal') |
| | | .set('principalPhone') |
| | | .set('email') |
| | | .set('provinceCode') |
| | | .set('provinceName') |
| | | .set('cityCode') |
| | | .set('cityName') |
| | | .set('status') |
| | | .set('area') |
| | | .set('areaId') |
| | | .set('createTime'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TAgentInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgent/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TAgent.table.refresh(); |
| | | TAgentInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tAgentInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TAgentInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgent/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TAgent.table.refresh(); |
| | | TAgentInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tAgentInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |
| | |
| | | return '<span>正常</span>' |
| | | }else if (row.status === 2){ |
| | | return '<span>冻结</span>' |
| | | }else if (row.status === 3){ |
| | | return '<span>已删除</span>' |
| | | } |
| | | } |
| | | }, |
| | |
| | | */ |
| | | TAppUser.updateStatus = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAppUser/update-status", function (data) { |
| | | console.log(111111) |
| | | Feng.success("修改成功!"); |
| | | TAppUserInfoDlg.close(); |
| | | parent.TAppUser.table.refresh(); |
| | |
| | | /** |
| | | * 司机审核列表管理初始化 |
| | | * 管理初始化 |
| | | */ |
| | | var TDriver = { |
| | | id: "TDriverTable", //表格id |
| | |
| | | TDriver.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.insertTime != '' && row.insertTime != null) { |
| | | var time = row.insertTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insertTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '司机姓名', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.name != '' && row.name != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.name + '" onfocus="TUser.tooltip()">' + row.name + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '司机头像', field: 'headImgUrl', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | if (row.headImgUrl == null || row.headImgUrl == '') { |
| | | return '<a class = "view" href="javascript:void(0)"><img style="width: 50px;height:50px;" src="' + Feng.ctxPath + '/static/img/NoPIC.png" /></a>'; |
| | | } else { |
| | | return '<a class = "view" href="javascript:void(0)"><img style="width: 90px;height:50px;" src="' + row.headImgUrl + '" /></a>'; |
| | | } |
| | | }, |
| | | events: 'operateEvents' |
| | | }, |
| | | {title: '司机来源', field: 'addType', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.addType != '' && row.addType != null) { |
| | | if(row.addType == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="司机注册" onfocus="TUser.tooltip()">司机注册</p>'] |
| | | }else if (row.addType == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="平台添加" onfocus="TUser.tooltip()">平台添加</p>'] |
| | | }else if (row.addType == 3){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="分公司添加" onfocus="TUser.tooltip()">分公司添加</p>'] |
| | | }else if (row.addType == 4){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="加盟商添加" onfocus="TUser.tooltip()">加盟商添加</p>'] |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '手机号', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '性别', field: 'sex', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.sex === 1){ |
| | | return '<span>男</span>' |
| | | }else if (row.sex === 2){ |
| | | return '<span>女</span>' |
| | | }else { |
| | | return '<span>未知</span>' |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '企业id', field: 'companyId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所属分公司', field: 'companyName', visible: true, align: 'center', valign: 'middle', |
| | | }}, |
| | | {title: '驾驶证号码', field: 'driverLicenseNumber', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证号码', field: 'idcard', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证', field: 'source', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属代理商', field: 'agentId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属分公司', field: 'branchOfficeId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '钱包余额', field: 'balance', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '累计订单量', field: 'approvalStatus', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '当月订单量', field: 'approvalNotes', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '积分', field: 'integral', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '拒单次数', field: 'approvalUserId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.companyName != '' && row.companyName != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.companyName + '" onfocus="TUser.tooltip()">' + row.companyName + '</p>'] |
| | | }else{ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="-" onfocus="TUser.tooltip()">-</p>'] |
| | | /*if(row.approvalStatus === 1){ |
| | | return '<a href="#" onclick="TDriver.stop('+row.id+','+row.status+')" style="color:red">驳回</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | }else */if (row.status === 1){ |
| | | return '<a href="#" onclick="TDriver.stop('+row.id+','+row.status+')" style="color:red">停用</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | }else if (row.status === 2){ |
| | | return '<a href="#" onclick="TDriver.start('+row.id+','+row.status+')" style="color:green">启用</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '所属加盟商', field: 'franchiseeName', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.franchiseeName != '' && row.franchiseeName != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.franchiseeName + '" onfocus="TUser.tooltip()">' + row.franchiseeName + '</p>'] |
| | | }else{ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="-" onfocus="TUser.tooltip()">-</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '登录账号【手机号】', field: 'phone', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.phone != '' && row.phone != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.phone + '" onfocus="TUser.tooltip()">' + row.phone + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '性别', field: 'sex', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.sex != '' && row.sex != null) { |
| | | if (row.sex == 1) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="男" onfocus="TUser.tooltip()">男</p>'] |
| | | }else if (row.sex == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="女" onfocus="TUser.tooltip()">女</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '驾驶证号码', field: 'driveCard', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.driveCard != '' && row.driveCard != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.driveCard + '" onfocus="TUser.tooltip()">' + row.driveCard + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '驾龄', field: 'driverAge', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.driverAge != '' && row.driverAge != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.driverAge + '" onfocus="TUser.tooltip()">' + row.driverAge + '</p>'] |
| | | }else{ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="0" onfocus="TUser.tooltip()">0</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '身份证号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.idCard != '' && row.idCard != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.idCard + '" onfocus="TUser.tooltip()">' + row.idCard + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '服务模式', field: 'serverStr', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.serverStr != '' && row.serverStr != null) { |
| | | var labelStr = ""; |
| | | var labelStrs = ""; |
| | | var labelArray = row.serverStr.split(","); |
| | | for(var i=0;i<labelArray.length;i++){ |
| | | labelStr += labelArray[i] +"<br>"; |
| | | labelStrs += labelArray[i] + " "; |
| | | } |
| | | labelStr = labelStr.substring(0,labelStr.length-4); |
| | | labelStrs = labelStrs.substring(0,labelStrs.length-5); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + labelStrs + '" onfocus="TUser.tooltip()">' + labelStr + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | /*{title: '账号', field: 'phone', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.phone != '' && row.phone != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.phone + '" onfocus="TUser.tooltip()">' + row.phone + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | },*/ |
| | | /*{title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.remark != '' && row.remark != null){ |
| | | var str = row.remark; |
| | | if (row.remark.length > 10){ |
| | | str = row.remark.substring(0,10)+"..."; |
| | | } |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.remark + '" onfocus="TUser.tooltip()">' + str + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | },*/ |
| | | {title: '状态', field: 'authState', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.authState != '' && row.authState != null) { |
| | | if (row.authState == 1) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="待审核" onfocus="TUser.tooltip()">待审核</p>'] |
| | | }else if (row.authState == 4){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已拒绝" onfocus="TUser.tooltip()">已拒绝</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | } |
| | | ]; |
| | |
| | | }; |
| | | |
| | | /** |
| | | * 立即审核 |
| | | * 点击添加 |
| | | */ |
| | | TDriver.immediately = function(){ |
| | | if (this.check()) { |
| | | var authState = TDriver.seItem.authState; |
| | | if(authState != 1){ |
| | | swal("操作失败", "待审核状态下才能执行此操作!", "warning"); |
| | | return; |
| | | } |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '立即审核', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_immediately/' + TDriver.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | TDriver.openAddTDriver = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 查看详情 |
| | | * 打开查看详情 |
| | | */ |
| | | TDriver.look = function(){ |
| | | TDriver.openTDriverDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '查看详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_look/' + TDriver.seItem.id |
| | | content: Feng.ctxPath + '/tDriver/tDriver_update/' + TDriver.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除司机审核列表 |
| | | * 删除 |
| | | */ |
| | | TDriver.delete = function () { |
| | | if (this.check()) { |
| | | var nickname = TDriver.seItem.name; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该司机"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除" + nickname + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "删除", |
| | | closeOnConfirm: false |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/delete", function (data) { |
| | | swal("删除成功", "您已经删除了" + nickname + "。", "success"); |
| | | AppMachineInfo.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tDriverId", TDriver.seItem.id); |
| | | ajax.start(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TDriver.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tDriverId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询司机审核列表列表 |
| | | * 查询列表 |
| | | */ |
| | | TDriver.search = function () { |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['companyName'] = $("#companyName").val(); |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['account'] = $("#account").val(); |
| | | queryData['addType'] = $("#addType").val(); |
| | | queryData['authState'] = $("#authState").val(); |
| | | queryData['status'] = $("#status").val(); |
| | | TDriver.table.refresh({query: queryData}); |
| | | }; |
| | | TDriver.resetSearch = function () { |
| | | $("#insertTime").val(""); |
| | | $("#companyName").val(""); |
| | | $("#phone").val(""); |
| | | $("#account").val(""); |
| | | $("#addType").val(""); |
| | | $("#authState").val(""); |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | TDriver.resetSearch = function (){ |
| | | $("#createTime").val(''); |
| | | $("#phone").val(''); |
| | | $("#status").val(''); |
| | | TDriver.search(); |
| | | }; |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = TDriver.initColumn(); |
| | | var table = new BSTable(TDriver.id, "/tDriver/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | table.setPaginationType("client"); |
| | | TDriver.table = table.init(); |
| | | }); |
| | |
| | | /** |
| | | * 初始化司机审核列表详情对话框 |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TDriverInfoDlg = { |
| | | tDriverInfoData : {} |
| | |
| | | TDriverInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('account') |
| | | .set('jobNumber') |
| | | .set('code') |
| | | .set('name') |
| | | .set('avatar') |
| | | .set('phone') |
| | | .set('password') |
| | | .set('name') |
| | | .set('sex') |
| | | .set('idCard') |
| | | .set('companyId') |
| | | .set('headImgUrl') |
| | | .set('faceImgUrl') |
| | | .set('idCardImgUrl1') |
| | | .set('idCardImgUrl2') |
| | | .set('placeOfEmployment') |
| | | .set('birthday') |
| | | .set('bankCardNumber') |
| | | .set('driverNationality') |
| | | .set('driverNation') |
| | | .set('driverMaritalStatus') |
| | | .set('driverLanguageLevel') |
| | | .set('driverEducation') |
| | | .set('driverCensus') |
| | | .set('driverAddress') |
| | | .set('driverContactAddress') |
| | | .set('licenseCode') |
| | | .set('licenselImgUrl') |
| | | .set('driverAge') |
| | | .set('driveCard') |
| | | .set('driveCardImgUrl') |
| | | .set('driverType') |
| | | .set('getDriverLicenseDate') |
| | | .set('driverLicenseOn') |
| | | .set('driverLicenseOff') |
| | | .set('taxiDriver') |
| | | .set('taxiAptitudeCard') |
| | | .set('networkCarlssueImg') |
| | | .set('networkCarlssueOrganization') |
| | | .set('networkCarlssueDate') |
| | | .set('getNetworkCarProofDate') |
| | | .set('networkCarProofOn') |
| | | .set('networkCarProofOff') |
| | | .set('registerDate') |
| | | .set('fullTimeDriver') |
| | | .set('inDriverBlacklist') |
| | | .set('commercialType') |
| | | .set('contractCompany') |
| | | .set('contractOn') |
| | | .set('contractOff') |
| | | .set('source') |
| | | .set('emergencyContact') |
| | | .set('emergencyContactPhone') |
| | | .set('emergencyContactAddress') |
| | | .set('remark') |
| | | .set('isPlatCar') |
| | | .set('carId') |
| | | .set('authState') |
| | | .set('state') |
| | | .set('flag') |
| | | .set('insertTime') |
| | | .set('insertUser') |
| | | .set('updateTime') |
| | | .set('updateUser') |
| | | .set('addType'); |
| | | } |
| | | |
| | | /** |
| | | * 审核操作 |
| | | */ |
| | | TDriverInfoDlg.authOpt = function(){ |
| | | var authState = $("input[name='authState']:checked").val(); |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/authOpt", function(data){ |
| | | Feng.success("操作成功!"); |
| | | window.parent.TDriver.table.refresh(); |
| | | TDriverInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("操作失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("authState",authState); |
| | | ajax.start(); |
| | | .set('emergencyPhone') |
| | | .set('driverLicenseNumber') |
| | | .set('driverLicense') |
| | | .set('idcard') |
| | | .set('idcardFront') |
| | | .set('idcardBack') |
| | | .set('inviterType') |
| | | .set('inviterId') |
| | | .set('agentId') |
| | | .set('branchOfficeId') |
| | | .set('balance') |
| | | .set('approvalStatus') |
| | | .set('approvalNotes') |
| | | .set('approvalUserId') |
| | | .set('approvalTime') |
| | | .set('serverStatus') |
| | | .set('integral') |
| | | .set('status') |
| | | .set('createTime'); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TRechargeRecord = { |
| | | id: "TRechargeRecordTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TRechargeRecord.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '数据类型(1=用户,2=司机)', field: 'type', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户id', field: 'userId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '流水号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '充值金额', field: 'amount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付方式(1=微信)', field: 'payType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '完成支付时间', field: 'payTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付状态(1=待支付,2=已完成)', field: 'payStatus', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '第三方流水号', field: 'orderNumber', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TRechargeRecord.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TRechargeRecord.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TRechargeRecord.openAddTRechargeRecord = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tRechargeRecord/tRechargeRecord_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TRechargeRecord.openTRechargeRecordDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tRechargeRecord/tRechargeRecord_update/' + TRechargeRecord.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TRechargeRecord.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tRechargeRecord/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TRechargeRecord.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tRechargeRecordId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TRechargeRecord.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TRechargeRecord.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TRechargeRecord.initColumn(); |
| | | var table = new BSTable(TRechargeRecord.id, "/tRechargeRecord/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TRechargeRecord.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TRechargeRecordInfoDlg = { |
| | | tRechargeRecordInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TRechargeRecordInfoDlg.clearData = function() { |
| | | this.tRechargeRecordInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TRechargeRecordInfoDlg.set = function(key, val) { |
| | | this.tRechargeRecordInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TRechargeRecordInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TRechargeRecordInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TRechargeRecord.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TRechargeRecordInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('type') |
| | | .set('userId') |
| | | .set('code') |
| | | .set('amount') |
| | | .set('payType') |
| | | .set('payTime') |
| | | .set('payStatus') |
| | | .set('orderNumber') |
| | | .set('createTime'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TRechargeRecordInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tRechargeRecord/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TRechargeRecord.table.refresh(); |
| | | TRechargeRecordInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tRechargeRecordInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TRechargeRecordInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tRechargeRecord/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TRechargeRecord.table.refresh(); |
| | | TRechargeRecordInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tRechargeRecordInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TRegion = { |
| | | id: "TRegionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TRegion.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键ID', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '城市名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '', field: 'citycode', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '父级ID', field: 'parentId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '英文名称', field: 'english', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TRegion.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TRegion.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TRegion.openAddTRegion = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tRegion/tRegion_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TRegion.openTRegionDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tRegion/tRegion_update/' + TRegion.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TRegion.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tRegion/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TRegion.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tRegionId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TRegion.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TRegion.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TRegion.initColumn(); |
| | | var table = new BSTable(TRegion.id, "/tRegion/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TRegion.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TRegionInfoDlg = { |
| | | tRegionInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TRegionInfoDlg.clearData = function() { |
| | | this.tRegionInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TRegionInfoDlg.set = function(key, val) { |
| | | this.tRegionInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TRegionInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TRegionInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TRegion.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TRegionInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('name') |
| | | .set('code') |
| | | .set('citycode') |
| | | .set('parentId') |
| | | .set('english'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TRegionInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tRegion/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TRegion.table.refresh(); |
| | | TRegionInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tRegionInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TRegionInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tRegion/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TRegion.table.refresh(); |
| | | TRegionInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tRegionInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |