| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | |
| | | import com.stylefeng.guns.modular.system.util.ExcelExportUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取保险列表 |
| | | * @param carId |
| | |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCar tCar,@RequestParam String serverBox,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId,String zcModel,String kcModel) { |
| | | public Object add(TCar tCar,@RequestParam String serverBox,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId,String zcModel,String kcModel,String bindDriverId) { |
| | | if (1 == roleType){ //平台 |
| | | if (2 == companyType.intValue()){ |
| | | if (SinataUtil.isNotEmpty(oneId)){ |
| | |
| | | } |
| | | tCar.setInsertTime(new Date()); |
| | | tCar.setState(1); |
| | | tCar.setBindDriverId(bindDriverId); |
| | | tCarService.insert(tCar); |
| | | |
| | | //添加经营业务 |
| | |
| | | }).start(); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/selectDriverFromCompanyId", method = RequestMethod.POST) |
| | | public Object selectDriverFromCompanyId(Integer companyId){ |
| | | Wrapper<TDriver> companyId1 = new EntityWrapper<TDriver>().eq("companyId", companyId).eq("authState", 2).ne("flag", 3); |
| | | List<TDriver> tDrivers = tDriverService.selectList(companyId1); |
| | | ArrayList<Map<String, Object>> list = new ArrayList<>(); |
| | | for (TDriver tDriver : tDrivers){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("id", tDriver.getId()); |
| | | map.put("name", tDriver.getName()); |
| | | list.add(map); |
| | | } |
| | | return list; |
| | | } |
| | | /** |
| | | * 修改车辆管理 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCar tCar,@RequestParam String serverBox,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId,String zcModel,String kcModel) { |
| | | public Object update(TCar tCar,@RequestParam String serverBox,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId,String zcModel,String kcModel,String bindDriverId) { |
| | | if (1 == roleType){ //平台 |
| | | if (2 == companyType.intValue()){ |
| | | if (SinataUtil.isNotEmpty(oneId)){ |
| | |
| | | obj.setGPSModel(tCar.getGPSModel()); |
| | | obj.setRegisterDate(tCar.getRegisterDate()); |
| | | obj.setCommercialType(tCar.getCommercialType()); |
| | | if(bindDriverId==null){ |
| | | bindDriverId=""; |
| | | } |
| | | obj.setBindDriverId(bindDriverId); |
| | | tCarService.updateAllColumnById(obj); |
| | | new Thread(new Runnable() { |
| | | @Override |