| | |
| | | * 司机控制器 |
| | | */ |
| | | @Api |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class DriverController { |
| | |
| | | * 版本管理 |
| | | */ |
| | | @Api |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class VersionManagementController { |
| | |
| | | withdrawal.setState(3); |
| | | this.updateById(withdrawal); |
| | | }else{ |
| | | //调用银行转账申请(客户要求提交申请就成功了,剩下的他们自己处理) |
| | | Map<String, String> map = payMoneyUtil.wxPayBank("用户提现", withdrawal.getMoney().toString(), withdrawal.getId().toString(), withdrawal.getCode(), withdrawal.getName(), ""); |
| | | if("SUCCESS".equals(map.get("return_code"))){ |
| | | withdrawal.setSerialNo(map.get("payment_no"));//交易序列号 |
| | | withdrawal.setState(2); |
| | | this.updateById(withdrawal); |
| | | }else{ |
| | | return ResultUtil.error(map.get("err_code_des")); |
| | | } |
| | | //调用银行转账申请(客户要求提交申请就成功了,剩下的他们自己处理) |
| | | // Map<String, String> map = payMoneyUtil.wxPayBank("用户提现", withdrawal.getMoney().toString(), withdrawal.getId().toString(), withdrawal.getCode(), withdrawal.getName(), ""); |
| | | // if("SUCCESS".equals(map.get("return_code"))){ |
| | | // withdrawal.setSerialNo(map.get("payment_no"));//交易序列号 |
| | | // withdrawal.setState(2); |
| | | // this.updateById(withdrawal); |
| | | // }else{ |
| | | // return ResultUtil.error(map.get("err_code_des")); |
| | | // } |
| | | |
| | | |
| | | // //调用银行转账申请(客户要求提交申请就成功了,剩下的他们自己处理) |
| | |
| | | driver.setLaveActivityMoney(new BigDecimal(driver.getLaveActivityMoney()).add(new BigDecimal(withdrawal.getMoney())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driverService.updateById(driver); |
| | | }else{ |
| | | //调用银行转账申请(客户要求提交申请就成功了,剩下的他们自己处理) |
| | | Map<String, String> map = payMoneyUtil.wxPayBank("司机提现", withdrawal.getMoney().toString(), withdrawal.getId().toString(), withdrawal.getCode(), withdrawal.getName(), ""); |
| | | if("SUCCESS".equals(map.get("return_code"))){ |
| | | withdrawal.setSerialNo(map.get("payment_no"));//交易序列号 |
| | | withdrawal.setState(2); |
| | | this.updateById(withdrawal); |
| | | }else{ |
| | | return ResultUtil.error(map.get("err_code_des")); |
| | | } |
| | | // //调用银行转账申请(客户要求提交申请就成功了,剩下的他们自己处理) |
| | | // Map<String, String> map = payMoneyUtil.wxPayBank("司机提现", withdrawal.getMoney().toString(), withdrawal.getId().toString(), withdrawal.getCode(), withdrawal.getName(), ""); |
| | | // if("SUCCESS".equals(map.get("return_code"))){ |
| | | // withdrawal.setSerialNo(map.get("payment_no"));//交易序列号 |
| | | // withdrawal.setState(2); |
| | | // this.updateById(withdrawal); |
| | | // }else{ |
| | | // return ResultUtil.error(map.get("err_code_des")); |
| | | // } |
| | | |
| | | // //调用银行转账申请(客户要求提交申请就成功了,剩下的他们自己处理) |
| | | // ResultUtil<String> transfer = icbcPayUtil.transfer(Double.valueOf(withdrawal.getMoney() * 100).longValue(), withdrawal.getCode(), withdrawal.getName()); |
| | |
| | | // 设置鉴权参数,初始化客户端 |
| | | private DefaultProfile profile = DefaultProfile.getProfile( |
| | | "cn-hangzhou",// 地域ID |
| | | "LTAI5tGCqU3g9NkFSnYPBFcU",// 您的AccessKey ID |
| | | "YgMJaG3GhsMGBIw2LjKi9ZofmRdEkX");// 您的AccessKey Secret |
| | | "LTAI5tGetqg3ThA7PaV29nL9",// 您的AccessKey ID |
| | | "zvBzTrmlLebkKjUwVjHcCkw6DkSwRx");// 您的AccessKey Secret |
| | | private IAcsClient client = new DefaultAcsClient(profile); |
| | | |
| | | private static void log_print(String functionName, Object result) { |
| | |
| | | */ |
| | | @RequestMapping("/tCar_add") |
| | | public String tCarAdd(Model model) { |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2).eq("state", 1).ne("flag", 3)); |
| | | 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())); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3) |
| | | .eq("superiorId",ShiroKit.getUser().getObjectId()).eq("state", 1).ne("flag", 3)); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else{ |
| | | model.addAttribute("franchiseeList",null); |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCarId) { |
| | | TCar tCar = tCarService.selectById(tCarId); |
| | | public Object delete(@RequestParam String tCarId) { |
| | | for (String s : tCarId.split(",")) { |
| | | TCar tCar = tCarService.selectById(s); |
| | | tCar.setState(2); |
| | | tCarService.updateById(tCar); |
| | | |
| | | //清除相对应的司机关联车辆ID |
| | | List<TDriver> list = tDriverService.selectList(new EntityWrapper<TDriver>().eq("carId", tCarId)); |
| | | List<TDriver> list = tDriverService.selectList(new EntityWrapper<TDriver>().eq("carId", s)); |
| | | for (TDriver obj : list){ |
| | | obj.setCarId(null); |
| | | tDriverService.updateById(obj); |
| | |
| | | } |
| | | } |
| | | }).start(); |
| | | } |
| | | |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping("/tDriver_add") |
| | | public String tDriverAdd(Model model) { |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2).eq("state", 1).ne("flag", 3)); |
| | | model.addAttribute("companyList",companyList); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>() |
| | | .eq("type", 3) |
| | | .eq("superiorId",ShiroKit.getUser().getObjectId()) |
| | | .notIn("state",1) |
| | | .notIn("flag",3)); |
| | | .eq("state",1) |
| | | .ne("flag",3)); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else{ |
| | | model.addAttribute("franchiseeList",null); |
| | |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tDriverId) { |
| | | TDriver driver = tDriverService.selectById(tDriverId); |
| | | public Object delete(@RequestParam String tDriverId) { |
| | | for (String s : tDriverId.split(",")) { |
| | | TDriver driver = tDriverService.selectById(s); |
| | | driver.setFlag("3"); |
| | | tDriverService.updateById(driver); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | /** |
| | |
| | | url: jdbc:mysql://127.0.0.1:3306/kytravel?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: Si8bnm5KPGSZkF3F |
| | | # url: jdbc:mysql://192.168.110.80:3306/kytravel?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | # username: root |
| | | # password: 123456 |
| | | db-name: oktravel #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <#input id="driveCard" name="驾驶证号码" value="${item.driveCard}"/> |
| | | <#avatar id="driveCardImgUrl" name="驾驶证照片:" avatarImg="${item.driveCardImgUrl}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">驾驶证照片:</label> |
| | | <div class="col-sm-9"> |
| | | <div class="form-group"> |
| | | <div class="col-sm-6"> |
| | | <div id="driveCardImgUrlPreId"> |
| | | <div> |
| | | @if(isEmpty(item.driveCardImgUrl)){ |
| | | <img onclick="lookBigImg('${ctxPath}/static/img/NoPIC.png')" src="${ctxPath}/static/img/NoPIC.png" style="max-width:150px;"> |
| | | @}else{ |
| | | <img onclick="lookBigImg('${item.driveCardImgUrl}')" src="${item.driveCardImgUrl}" style="max-width:250px;"> |
| | | @} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <input type="hidden" id="driveCardImgUrl" name="driveCardImgUrl" value="${item.driveCardImgUrl}"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <#input id="driverAge" name="驾龄" value="${item.driverAge}"/> |
| | | <#input id="idCard" name="身份证号" value="${item.idCard}"/> |
| | | <#input id="driverAddress" name="居住地址" value="${item.driverAddress}"/> |
| | |
| | | */ |
| | | TCar.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {field: 'selectItem', radio: false}, |
| | | {title: '添加时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCar.seItem = selected[0]; |
| | | TCar.seItem = selected; |
| | | return true; |
| | | } |
| | | }; |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCar/tCar_update/' + TCar.seItem.id |
| | | content: Feng.ctxPath + '/tCar/tCar_update/' + TCar.seItem[0].id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | */ |
| | | TCar.delete = function () { |
| | | if (this.check()) { |
| | | var nickname = TCar.seItem.carLicensePlate; |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该车辆"; |
| | | }else{ |
| | | nickname = "【"+nickname+"】"; |
| | | let ids = []; |
| | | for (let seItemKey in TCar.seItem) { |
| | | ids.push(TCar.seItem[seItemKey].id); |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除"+ nickname + "?", |
| | | title: "您是否确认删除车辆?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tCar/delete", function (data) { |
| | | swal("删除成功", "您已经成功删除了"+ nickname + "。", "success"); |
| | | swal("删除成功", "您已经成功删除了车辆。", "success"); |
| | | TCar.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message+"!", "warning"); |
| | | }); |
| | | ajax.set("tCarId",TCar.seItem.id); |
| | | ajax.set("tCarId", ids.toString()); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCar/carInsurance?carId=' + TCar.seItem.id |
| | | content: Feng.ctxPath + '/tCar/carInsurance?carId=' + TCar.seItem[0].id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | */ |
| | | TDriver.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {field: 'selectItem', radio: false}, |
| | | {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) { |
| | |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TDriver.seItem = selected[0]; |
| | | TDriver.seItem = selected; |
| | | return true; |
| | | } |
| | | }; |
| | |
| | | */ |
| | | TDriver.immediately = function(){ |
| | | if (this.check()) { |
| | | var authState = TDriver.seItem.authState; |
| | | var authState = TDriver.seItem[0].authState; |
| | | if(authState != 1){ |
| | | swal("操作失败", "待审核状态下才能执行此操作!", "warning"); |
| | | return; |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_immediately/' + TDriver.seItem.id |
| | | content: Feng.ctxPath + '/tDriver/tDriver_immediately/' + TDriver.seItem[0].id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_look/' + TDriver.seItem.id |
| | | content: Feng.ctxPath + '/tDriver/tDriver_look/' + TDriver.seItem[0].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 + "】"; |
| | | let ids = []; |
| | | for (let seItemKey in TDriver.seItem) { |
| | | ids.push(TDriver.seItem[seItemKey].id); |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除" + nickname + "?", |
| | | title: "您是否确认删除司机?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | |
| | | closeOnConfirm: false |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/delete", function (data) { |
| | | swal("删除成功", "您已经删除了" + nickname + "。", "success"); |
| | | swal("删除成功", "您已经删除了司机。", "success"); |
| | | AppMachineInfo.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tDriverId", TDriver.seItem.id); |
| | | ajax.set("tDriverId", ids.toString()); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | |
| | | */ |
| | | YesDriver.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {field: 'selectItem', radio: false}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'7%', |
| | | formatter: function (value, row) { |
| | |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | YesDriver.seItem = selected[0]; |
| | | YesDriver.seItem = selected; |
| | | return true; |
| | | } |
| | | }; |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_update/' + YesDriver.seItem.id |
| | | content: Feng.ctxPath + '/tDriver/tDriver_update/' + YesDriver.seItem[0].id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_changeCar/' + YesDriver.seItem.id |
| | | content: Feng.ctxPath + '/tDriver/tDriver_changeCar/' + YesDriver.seItem[0].id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | */ |
| | | YesDriver.freeze = function(){ |
| | | if (this.check()) { |
| | | var nickname = YesDriver.seItem.name; |
| | | if (YesDriver.seItem.authState == 3 ){ |
| | | var nickname = YesDriver.seItem[0].name; |
| | | if (YesDriver.seItem[0].authState == 3 ){ |
| | | swal("冻结失败", "【正常】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } |
| | |
| | | area: ['720px', '450px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_optDriver/' + YesDriver.seItem.id +"/"+2 |
| | | content: Feng.ctxPath + '/tDriver/tDriver_optDriver/' + YesDriver.seItem[0].id +"/"+2 |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | |
| | | */ |
| | | YesDriver.thaw = function(){ |
| | | if (this.check()) { |
| | | var nickname = YesDriver.seItem.name; |
| | | if (YesDriver.seItem.authState == 2 ){ |
| | | var nickname = YesDriver.seItem[0].name; |
| | | if (YesDriver.seItem[0].authState == 2 ){ |
| | | swal("解冻失败", "【冻结】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } |
| | |
| | | area: ['720px', '450px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_optDriver/' + YesDriver.seItem.id +"/"+1 |
| | | content: Feng.ctxPath + '/tDriver/tDriver_optDriver/' + YesDriver.seItem[0].id +"/"+1 |
| | | }); |
| | | this.layerIndex = index; |
| | | /*var nickname = YesDriver.seItem.name; |
| | |
| | | */ |
| | | YesDriver.deleteDriver = function(){ |
| | | if (this.check()) { |
| | | var nickname = YesDriver.seItem.name; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该司机"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | let ids = []; |
| | | for (let seItemKey in YesDriver.seItem) { |
| | | ids.push(YesDriver.seItem[seItemKey].id); |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除" + nickname + "?", |
| | | title: "您是否确认删除司机?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | |
| | | closeOnConfirm: false |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/delete", function (data) { |
| | | swal("删除成功", "您已经删除了" + nickname + "。", "success"); |
| | | swal("删除成功", "您已经删除了司机。", "success"); |
| | | YesDriver.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tDriverId", YesDriver.seItem.id); |
| | | ajax.set("tDriverId", ids.toString()); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/showTraining?id=' + YesDriver.seItem.id |
| | | content: Feng.ctxPath + '/tDriver/showTraining?id=' + YesDriver.seItem[0].id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/showPunish?id=' + YesDriver.seItem.id |
| | | content: Feng.ctxPath + '/tDriver/showPunish?id=' + YesDriver.seItem[0].id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | */ |
| | | YesDriverInfoDlg.companyTypeClick = function (e) { |
| | | if (1 == e){ |
| | | $("#companyDiv").hide(); |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == e){ |
| | | $("#companyDiv").show(); |
| | | $(".companyDiv").show(); |
| | | } |
| | | } |
| | | |
| | |
| | | // 设置鉴权参数,初始化客户端 |
| | | private DefaultProfile profile = DefaultProfile.getProfile( |
| | | "cn-hangzhou",// 地域ID |
| | | "LTAI5tGCqU3g9NkFSnYPBFcU",// 您的AccessKey ID |
| | | "YgMJaG3GhsMGBIw2LjKi9ZofmRdEkX");// 您的AccessKey Secret |
| | | "LTAI5tGetqg3ThA7PaV29nL9",// 您的AccessKey ID |
| | | "zvBzTrmlLebkKjUwVjHcCkw6DkSwRx");// 您的AccessKey Secret |
| | | private IAcsClient client = new DefaultAcsClient(profile); |
| | | |
| | | private static void log_print(String functionName, Object result) { |
| | |
| | | server: |
| | | port: 82 |
| | | port: 81 |
| | | spring: |
| | | application: |
| | | name: zuul-gateway #服务名称 |
| | | servlet: |
| | | multipart: |
| | | max-request-size: 100MB |
| | | max-file-size: 100MB |
| | | |
| | | eureka: |
| | | client: |