救援集成进度1/5
This commit is contained in:
parent
2b0327792b
commit
86eb948f7c
@ -0,0 +1,105 @@
|
|||||||
|
package cn.iocoder.yudao.module.rescue.controller.admin;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.controller.BaseController;
|
||||||
|
import cn.iocoder.yudao.module.rescue.domain.RescueCarInfo;
|
||||||
|
import cn.iocoder.yudao.module.rescue.service.IRescueCarInfoService;
|
||||||
|
import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||||
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 救援车辆信息Controller
|
||||||
|
*
|
||||||
|
* @author zcy
|
||||||
|
* @date 2023-09-12
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/rescueCar")
|
||||||
|
public class RescueCarInfoController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private IRescueCarInfoService rescueCarInfoService;
|
||||||
|
@Autowired
|
||||||
|
private AdminUserApi adminUserApi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询救援车辆信息列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public CommonResult<IPage<?>> list(RescueCarInfo rescueCarInfo,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
//获取当前登录用户
|
||||||
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
|
//所在顶级机构
|
||||||
|
AdminUserRespDTO user = adminUserApi.getUser(userId);
|
||||||
|
rescueCarInfo.setDeptId(user.getDeptId());
|
||||||
|
Page<RescueCarInfo> page = new Page<>(pageNo, pageSize);
|
||||||
|
return success(rescueCarInfoService.selectRescueCarInfoList(rescueCarInfo, page));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询救援车辆信息列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/warnList")
|
||||||
|
public CommonResult warnList(RescueCarInfo rescueCarInfo) {
|
||||||
|
List<String> list = rescueCarInfoService.warnList(rescueCarInfo);
|
||||||
|
return CommonResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出救援车辆信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:rescueCar:list')")
|
||||||
|
// @Log(title = "救援车辆信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, RescueCarInfo rescueCarInfo) {
|
||||||
|
List<RescueCarInfo> list = rescueCarInfoService.list();
|
||||||
|
ExcelUtil<RescueCarInfo> util = new ExcelUtil<RescueCarInfo>(RescueCarInfo.class);
|
||||||
|
util.exportExcel(response, list, "救援车辆信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取救援车辆信息详细信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public CommonResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return success(rescueCarInfoService.selectRescueCarInfoById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增救援车辆信息
|
||||||
|
*/
|
||||||
|
// @Log(title = "救援车辆信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public CommonResult add(@RequestBody RescueCarInfo rescueCarInfo) {
|
||||||
|
return toAjax(rescueCarInfoService.insertRescueCarInfo(rescueCarInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改救援车辆信息
|
||||||
|
*/
|
||||||
|
// @Log(title = "救援车辆信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public CommonResult edit(@RequestBody RescueCarInfo rescueCarInfo) {
|
||||||
|
return toAjax(rescueCarInfoService.updateRescueCarInfo(rescueCarInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除救援车辆信息
|
||||||
|
*/
|
||||||
|
// @Log(title = "救援车辆信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public CommonResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(rescueCarInfoService.deleteRescueCarInfoByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,89 @@
|
|||||||
|
package cn.iocoder.yudao.module.rescue.controller.admin;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.controller.BaseController;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.page.TableDataInfo;
|
||||||
|
import cn.iocoder.yudao.module.rescue.domain.RescueCarSpend;
|
||||||
|
import cn.iocoder.yudao.module.rescue.service.IRescueCarSpendService;
|
||||||
|
import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆消费管理Controller
|
||||||
|
*
|
||||||
|
* @author zcy
|
||||||
|
* @date 2023-11-30
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/rescue/rescueCarSpend")
|
||||||
|
public class RescueCarSpendController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private IRescueCarSpendService rescueCarSpendService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆消费管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(RescueCarSpend rescueCarSpend) {
|
||||||
|
startPage();
|
||||||
|
List<RescueCarSpend> list = rescueCarSpendService.selectRescueCarSpendList(rescueCarSpend);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出车辆消费管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:export')")
|
||||||
|
// @Log(title = "车辆消费管理", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, RescueCarSpend rescueCarSpend) {
|
||||||
|
List<RescueCarSpend> list = rescueCarSpendService.selectRescueCarSpendList(rescueCarSpend);
|
||||||
|
ExcelUtil<RescueCarSpend> util = new ExcelUtil<RescueCarSpend>(RescueCarSpend.class);
|
||||||
|
util.exportExcel(response, list, "车辆消费管理数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取车辆消费管理详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public CommonResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return success(rescueCarSpendService.selectRescueCarSpendById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增车辆消费管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:add')")
|
||||||
|
// @Log(title = "车辆消费管理", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public CommonResult add(@RequestBody RescueCarSpend rescueCarSpend) {
|
||||||
|
return toAjax(rescueCarSpendService.insertRescueCarSpend(rescueCarSpend));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改车辆消费管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:edit')")
|
||||||
|
// @Log(title = "车辆消费管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public CommonResult edit(@RequestBody RescueCarSpend rescueCarSpend) {
|
||||||
|
return toAjax(rescueCarSpendService.updateRescueCarSpend(rescueCarSpend));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除车辆消费管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('rescue:rescueCarSpend:remove')")
|
||||||
|
// @Log(title = "车辆消费管理", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public CommonResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(rescueCarSpendService.deleteRescueCarSpendByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,92 @@
|
|||||||
|
package cn.iocoder.yudao.module.rescue.controller.admin;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.controller.BaseController;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.page.TableDataInfo;
|
||||||
|
import cn.iocoder.yudao.module.rescue.domain.RescueConfig;
|
||||||
|
import cn.iocoder.yudao.module.rescue.service.IRescueConfigService;
|
||||||
|
import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||||
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 救援司机提成配置Controller
|
||||||
|
*
|
||||||
|
* @author zcy
|
||||||
|
* @date 2023-12-01
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/rescue/rescueConfig")
|
||||||
|
public class RescueConfigController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private IRescueConfigService rescueConfigService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AdminUserApi adminUserApi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询救援司机提成配置列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescue:rescueConfig:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(RescueConfig rescueConfig) {
|
||||||
|
startPage();
|
||||||
|
List<RescueConfig> list = rescueConfigService.selectRescueConfigList(rescueConfig);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出救援司机提成配置列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescue:rescueConfig:export')")
|
||||||
|
// @Log(title = "救援司机提成配置", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, RescueConfig rescueConfig) {
|
||||||
|
List<RescueConfig> list = rescueConfigService.selectRescueConfigList(rescueConfig);
|
||||||
|
ExcelUtil<RescueConfig> util = new ExcelUtil<RescueConfig>(RescueConfig.class);
|
||||||
|
util.exportExcel(response, list, "救援司机提成配置数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取救援司机提成配置详细信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getInfo")
|
||||||
|
public CommonResult getInfo() {
|
||||||
|
return success(rescueConfigService.selectRescueConfigByDeptId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增救援司机提成配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescue:rescueConfig:add')")
|
||||||
|
// @Log(title = "救援司机提成配置", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public CommonResult add(@RequestBody RescueConfig rescueConfig) {
|
||||||
|
return toAjax(rescueConfigService.insertRescueConfig(rescueConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改救援司机提成配置
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermission('rescue:rescueConfig:edit')")
|
||||||
|
// @Log(title = "救援司机提成配置", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public CommonResult edit(@RequestBody RescueConfig rescueConfig) {
|
||||||
|
return toAjax(rescueConfigService.updateRescueConfig(rescueConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除救援司机提成配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescue:rescueConfig:remove')")
|
||||||
|
// @Log(title = "救援司机提成配置", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public CommonResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(rescueConfigService.deleteRescueConfigByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package cn.iocoder.yudao.module.rescue.controller.admin;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.controller.BaseController;
|
||||||
|
import cn.iocoder.yudao.module.rescue.domain.RescueCustomerInfo;
|
||||||
|
import cn.iocoder.yudao.module.rescue.service.IRescueCustomerInfoService;
|
||||||
|
import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 救援的客户信息Controller
|
||||||
|
*
|
||||||
|
* @author zcy
|
||||||
|
* @date 2023-09-14
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/rescueCustomer/rescueCustomer")
|
||||||
|
public class RescueCustomerInfoController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private IRescueCustomerInfoService rescueCustomerInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询救援的客户信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescueCustomer:rescueCustomer:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public CommonResult<IPage<?>> list(RescueCustomerInfo rescueCustomerInfo,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<RescueCustomerInfo> page = new Page<>(pageNo, pageSize);
|
||||||
|
IPage<RescueCustomerInfo> list = rescueCustomerInfoService.selectRescueCustomerInfoList(rescueCustomerInfo, page);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出救援的客户信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescueCustomer:rescueCustomer:list')")
|
||||||
|
// @Log(title = "救援的客户信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, RescueCustomerInfo rescueCustomerInfo) {
|
||||||
|
List<RescueCustomerInfo> list = rescueCustomerInfoService.list();
|
||||||
|
ExcelUtil<RescueCustomerInfo> util = new ExcelUtil<RescueCustomerInfo>(RescueCustomerInfo.class);
|
||||||
|
util.exportExcel(response, list, "救援的客户信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取救援的客户信息详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescueCustomer:rescueCustomer:list')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public CommonResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return success(rescueCustomerInfoService.selectRescueCustomerInfoById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增救援的客户信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescueCustomer:rescueCustomer:list')")
|
||||||
|
// @Log(title = "救援的客户信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public CommonResult add(@RequestBody RescueCustomerInfo rescueCustomerInfo) {
|
||||||
|
return toAjax(rescueCustomerInfoService.insertRescueCustomerInfo(rescueCustomerInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改救援的客户信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescueCustomer:rescueCustomer:list')")
|
||||||
|
// @Log(title = "救援的客户信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public CommonResult edit(@RequestBody RescueCustomerInfo rescueCustomerInfo) {
|
||||||
|
return toAjax(rescueCustomerInfoService.updateRescueCustomerInfo(rescueCustomerInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除救援的客户信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescueCustomer:rescueCustomer:list')")
|
||||||
|
// @Log(title = "救援的客户信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public CommonResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(rescueCustomerInfoService.deleteRescueCustomerInfoByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,86 @@
|
|||||||
|
package cn.iocoder.yudao.module.rescue.controller.admin;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.controller.BaseController;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.page.TableDataInfo;
|
||||||
|
import cn.iocoder.yudao.module.rescue.domain.RescueDeptDriver;
|
||||||
|
import cn.iocoder.yudao.module.rescue.service.IRescueDeptDriverService;
|
||||||
|
import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 救援客户司机分配Controller
|
||||||
|
*
|
||||||
|
* @author zcy
|
||||||
|
* @date 2023-09-21
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/dept_driver/dept_driver")
|
||||||
|
public class RescueDeptDriverController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IRescueDeptDriverService rescueDeptDriverService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询救援客户司机分配列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(RescueDeptDriver rescueDeptDriver) {
|
||||||
|
startPage();
|
||||||
|
List<RescueDeptDriver> list = rescueDeptDriverService.selectRescueDeptDriverList(rescueDeptDriver);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出救援客户司机分配列表
|
||||||
|
*/
|
||||||
|
// @Log(title = "救援客户司机分配", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, RescueDeptDriver rescueDeptDriver) {
|
||||||
|
List<RescueDeptDriver> list = rescueDeptDriverService.selectRescueDeptDriverList(rescueDeptDriver);
|
||||||
|
ExcelUtil<RescueDeptDriver> util = new ExcelUtil<RescueDeptDriver>(RescueDeptDriver.class);
|
||||||
|
util.exportExcel(response, list, "救援客户司机分配数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取救援客户司机分配详细信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public CommonResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return success(rescueDeptDriverService.selectRescueDeptDriverById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增救援客户司机分配
|
||||||
|
*/
|
||||||
|
// @Log(title = "救援客户司机分配", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public CommonResult add(@RequestBody RescueDeptDriver rescueDeptDriver) {
|
||||||
|
return toAjax(rescueDeptDriverService.insertRescueDeptDriver(rescueDeptDriver));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改救援客户司机分配
|
||||||
|
*/
|
||||||
|
// @Log(title = "救援客户司机分配", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public CommonResult edit(@RequestBody RescueDeptDriver rescueDeptDriver) {
|
||||||
|
return toAjax(rescueDeptDriverService.updateRescueDeptDriver(rescueDeptDriver));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除救援客户司机分配
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('dept_driver:dept_driver:remove')")
|
||||||
|
// @Log(title = "救援客户司机分配", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public CommonResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(rescueDeptDriverService.deleteRescueDeptDriverByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,97 @@
|
|||||||
|
package cn.iocoder.yudao.module.rescue.controller.admin;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.controller.BaseController;
|
||||||
|
import cn.iocoder.yudao.module.rescue.core.page.TableDataInfo;
|
||||||
|
import cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord;
|
||||||
|
import cn.iocoder.yudao.module.rescue.service.IRescueRefuelRecordService;
|
||||||
|
import cn.iocoder.yudao.module.rescue.utils.ExcelUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加油记录Controller
|
||||||
|
*
|
||||||
|
* @author zcy
|
||||||
|
* @date 2023-09-26
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/rescue/refuelRecord")
|
||||||
|
public class RescueRefuelRecordController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IRescueRefuelRecordService rescueRefuelRecordService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询加油记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(RescueRefuelRecord rescueRefuelRecord)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<RescueRefuelRecord> list = rescueRefuelRecordService.selectRescueRefuelRecordList(rescueRefuelRecord);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出加油记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:export')")
|
||||||
|
// @Log(title = "加油记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, RescueRefuelRecord rescueRefuelRecord)
|
||||||
|
{
|
||||||
|
List<RescueRefuelRecord> list = rescueRefuelRecordService.selectRescueRefuelRecordList(rescueRefuelRecord);
|
||||||
|
ExcelUtil<RescueRefuelRecord> util = new ExcelUtil<RescueRefuelRecord>(RescueRefuelRecord.class);
|
||||||
|
util.exportExcel(response, list, "加油记录数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取加油记录详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public CommonResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(rescueRefuelRecordService.selectRescueRefuelRecordById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增加油记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:add')")
|
||||||
|
// @Log(title = "加油记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public CommonResult add(@RequestBody RescueRefuelRecord rescueRefuelRecord)
|
||||||
|
{
|
||||||
|
return toAjax(rescueRefuelRecordService.insertRescueRefuelRecord(rescueRefuelRecord));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改加油记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:edit')")
|
||||||
|
// @Log(title = "加油记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public CommonResult edit(@RequestBody RescueRefuelRecord rescueRefuelRecord)
|
||||||
|
{
|
||||||
|
return toAjax(rescueRefuelRecordService.updateRescueRefuelRecord(rescueRefuelRecord));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除加油记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermission('rescue:refuelRecord:remove')")
|
||||||
|
// @Log(title = "加油记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public CommonResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(rescueRefuelRecordService.deleteRescueRefuelRecordByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -17,56 +17,77 @@ import java.util.Date;
|
|||||||
* @date 2023-09-13
|
* @date 2023-09-13
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class RescueCarInfo extends TenantBaseDO
|
public class RescueCarInfo extends TenantBaseDO {
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 主键 */
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 车辆类型 */
|
/**
|
||||||
|
* 车辆类型
|
||||||
|
*/
|
||||||
@Excel(name = "车辆类型")
|
@Excel(name = "车辆类型")
|
||||||
private String rescueCarType;
|
private String rescueCarType;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String rescueCarTypeStr;
|
private String rescueCarTypeStr;
|
||||||
|
|
||||||
/** 车牌号 */
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
@Excel(name = "车牌号")
|
@Excel(name = "车牌号")
|
||||||
private String rescueCarNum;
|
private String rescueCarNum;
|
||||||
|
|
||||||
/** 品牌型号 */
|
/**
|
||||||
|
* 品牌型号
|
||||||
|
*/
|
||||||
@Excel(name = "品牌型号")
|
@Excel(name = "品牌型号")
|
||||||
private String rescueCarBrand;
|
private String rescueCarBrand;
|
||||||
|
|
||||||
/** 所属 */
|
/**
|
||||||
|
* 所属
|
||||||
|
*/
|
||||||
@Excel(name = "所属")
|
@Excel(name = "所属")
|
||||||
private String carOwn;
|
private String carOwn;
|
||||||
|
|
||||||
/** 车辆图片 */
|
/**
|
||||||
|
* 车辆图片
|
||||||
|
*/
|
||||||
@Excel(name = "车辆图片")
|
@Excel(name = "车辆图片")
|
||||||
private String carImage;
|
private String carImage;
|
||||||
|
|
||||||
/** 行驶证照片 */
|
/**
|
||||||
|
* 行驶证照片
|
||||||
|
*/
|
||||||
@Excel(name = "行驶证照片")
|
@Excel(name = "行驶证照片")
|
||||||
private String driveLicenseImage;
|
private String driveLicenseImage;
|
||||||
|
|
||||||
/** 车辆购买时间 */
|
/**
|
||||||
|
* 车辆购买时间
|
||||||
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "车辆购买时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "车辆购买时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date carBuyTime;
|
private Date carBuyTime;
|
||||||
|
|
||||||
/** 拍照颜色 */
|
/**
|
||||||
|
* 拍照颜色
|
||||||
|
*/
|
||||||
@Excel(name = "拍照颜色")
|
@Excel(name = "拍照颜色")
|
||||||
private String carLicenseColor;
|
private String carLicenseColor;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String carLicenseColorStr;
|
private String carLicenseColorStr;
|
||||||
|
|
||||||
/** 车辆使用性质 */
|
/**
|
||||||
|
* 车辆使用性质
|
||||||
|
*/
|
||||||
@Excel(name = "车辆使用性质")
|
@Excel(name = "车辆使用性质")
|
||||||
private String carUseNature;
|
private String carUseNature;
|
||||||
|
|
||||||
/** 车架号 */
|
/**
|
||||||
|
* 车架号
|
||||||
|
*/
|
||||||
@Excel(name = "车架号")
|
@Excel(name = "车架号")
|
||||||
private String frameNumber;
|
private String frameNumber;
|
||||||
//车辆保养时间
|
//车辆保养时间
|
||||||
@ -79,11 +100,15 @@ public class RescueCarInfo extends TenantBaseDO
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date carCheckTime;
|
private Date carCheckTime;
|
||||||
|
|
||||||
/** 拥有者主键 */
|
/**
|
||||||
|
* 拥有者主键
|
||||||
|
*/
|
||||||
@Excel(name = "拥有者主键")
|
@Excel(name = "拥有者主键")
|
||||||
private Long possessorId;
|
private Long possessorId;
|
||||||
|
|
||||||
/** 部门id */
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.rescue.domain;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.annotation.Excel;
|
import cn.iocoder.yudao.annotation.Excel;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
@ -11,6 +12,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||||||
* @author zcy
|
* @author zcy
|
||||||
* @date 2023-12-01
|
* @date 2023-12-01
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class RescueConfig extends TenantBaseDO
|
public class RescueConfig extends TenantBaseDO
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -18,7 +20,9 @@ public class RescueConfig extends TenantBaseDO
|
|||||||
/** */
|
/** */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/** 顶级机构 */
|
||||||
|
@Excel(name = "顶级机构")
|
||||||
|
private Long topDeptId;
|
||||||
|
|
||||||
/** 救援大拖车提成比例 */
|
/** 救援大拖车提成比例 */
|
||||||
@Excel(name = "救援大拖车提成比例")
|
@Excel(name = "救援大拖车提成比例")
|
||||||
@ -31,51 +35,4 @@ public class RescueConfig extends TenantBaseDO
|
|||||||
/** 救援小拖车提成比例 */
|
/** 救援小拖车提成比例 */
|
||||||
@Excel(name = "救援小拖车提成比例")
|
@Excel(name = "救援小拖车提成比例")
|
||||||
private Double rescueTcSmall;
|
private Double rescueTcSmall;
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setRescueTcBig(Double rescueTcBig)
|
|
||||||
{
|
|
||||||
this.rescueTcBig = rescueTcBig;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Double getRescueTcBig()
|
|
||||||
{
|
|
||||||
return rescueTcBig;
|
|
||||||
}
|
|
||||||
public void setRescueTcMid(Double rescueTcMid)
|
|
||||||
{
|
|
||||||
this.rescueTcMid = rescueTcMid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Double getRescueTcMid()
|
|
||||||
{
|
|
||||||
return rescueTcMid;
|
|
||||||
}
|
|
||||||
public void setRescueTcSmall(Double rescueTcSmall)
|
|
||||||
{
|
|
||||||
this.rescueTcSmall = rescueTcSmall;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Double getRescueTcSmall()
|
|
||||||
{
|
|
||||||
return rescueTcSmall;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("rescueTcBig", getRescueTcBig())
|
|
||||||
.append("rescueTcMid", getRescueTcMid())
|
|
||||||
.append("rescueTcSmall", getRescueTcSmall())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.rescue.mapper;
|
|||||||
import cn.iocoder.yudao.module.rescue.domain.RescueCarInfo;
|
import cn.iocoder.yudao.module.rescue.domain.RescueCarInfo;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@ -31,7 +33,7 @@ public interface RescueCarInfoMapper extends BaseMapper<RescueCarInfo>
|
|||||||
* @param rescueCarInfo 救援车辆信息
|
* @param rescueCarInfo 救援车辆信息
|
||||||
* @return 救援车辆信息集合
|
* @return 救援车辆信息集合
|
||||||
*/
|
*/
|
||||||
public List<RescueCarInfo> selectRescueCarInfoList(RescueCarInfo rescueCarInfo);
|
IPage<RescueCarInfo> selectRescueCarInfoList(@Param("map") RescueCarInfo rescueCarInfo, Page<RescueCarInfo> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增救援车辆信息
|
* 新增救援车辆信息
|
||||||
|
@ -2,7 +2,10 @@ package cn.iocoder.yudao.module.rescue.mapper;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.module.rescue.domain.RescueCustomerInfo;
|
import cn.iocoder.yudao.module.rescue.domain.RescueCustomerInfo;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -29,7 +32,7 @@ public interface RescueCustomerInfoMapper extends BaseMapper<RescueCustomerInfo
|
|||||||
* @param rescueCustomerInfo 救援的客户信息
|
* @param rescueCustomerInfo 救援的客户信息
|
||||||
* @return 救援的客户信息集合
|
* @return 救援的客户信息集合
|
||||||
*/
|
*/
|
||||||
public List<RescueCustomerInfo> selectRescueCustomerInfoList(RescueCustomerInfo rescueCustomerInfo);
|
IPage<RescueCustomerInfo> selectRescueCustomerInfoList(@Param("map") RescueCustomerInfo rescueCustomerInfo, Page<RescueCustomerInfo> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增救援的客户信息
|
* 新增救援的客户信息
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package cn.iocoder.yudao.module.rescue.service;
|
package cn.iocoder.yudao.module.rescue.service;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.rescue.domain.RescueCarInfo;
|
import cn.iocoder.yudao.module.rescue.domain.RescueCarInfo;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -23,7 +25,7 @@ public interface IRescueCarInfoService extends IService<RescueCarInfo>
|
|||||||
/**
|
/**
|
||||||
* 查询救援车辆信息
|
* 查询救援车辆信息
|
||||||
*
|
*
|
||||||
* @param id 救援车辆信息主键
|
* @param carNum 救援车辆信息主键
|
||||||
* @return 救援车辆信息
|
* @return 救援车辆信息
|
||||||
*/
|
*/
|
||||||
public RescueCarInfo selectRescueCarInfoByNum(String carNum);
|
public RescueCarInfo selectRescueCarInfoByNum(String carNum);
|
||||||
@ -34,7 +36,7 @@ public interface IRescueCarInfoService extends IService<RescueCarInfo>
|
|||||||
* @param rescueCarInfo 救援车辆信息
|
* @param rescueCarInfo 救援车辆信息
|
||||||
* @return 救援车辆信息集合
|
* @return 救援车辆信息集合
|
||||||
*/
|
*/
|
||||||
public List<RescueCarInfo> selectRescueCarInfoList(RescueCarInfo rescueCarInfo);
|
IPage<RescueCarInfo> selectRescueCarInfoList(RescueCarInfo rescueCarInfo, Page<RescueCarInfo> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增救援车辆信息
|
* 新增救援车辆信息
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package cn.iocoder.yudao.module.rescue.service;
|
package cn.iocoder.yudao.module.rescue.service;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.rescue.domain.RescueCustomerInfo;
|
import cn.iocoder.yudao.module.rescue.domain.RescueCustomerInfo;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
|
||||||
@ -28,7 +30,7 @@ public interface IRescueCustomerInfoService extends IService<RescueCustomerInfo>
|
|||||||
* @param rescueCustomerInfo 救援的客户信息
|
* @param rescueCustomerInfo 救援的客户信息
|
||||||
* @return 救援的客户信息集合
|
* @return 救援的客户信息集合
|
||||||
*/
|
*/
|
||||||
public List<RescueCustomerInfo> selectRescueCustomerInfoList(RescueCustomerInfo rescueCustomerInfo);
|
IPage<RescueCustomerInfo> selectRescueCustomerInfoList(RescueCustomerInfo rescueCustomerInfo, Page<RescueCustomerInfo> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增救援的客户信息
|
* 新增救援的客户信息
|
||||||
|
@ -8,12 +8,15 @@ import cn.iocoder.yudao.module.rescue.mapper.RescueCarInfoMapper;
|
|||||||
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
||||||
import cn.iocoder.yudao.module.rescue.service.IRescueCarInfoService;
|
import cn.iocoder.yudao.module.rescue.service.IRescueCarInfoService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
|
||||||
@ -25,8 +28,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti
|
|||||||
* @date 2023-09-12
|
* @date 2023-09-12
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class RescueCarInfoServiceImpl extends ServiceImpl<RescueCarInfoMapper, RescueCarInfo> implements IRescueCarInfoService
|
public class RescueCarInfoServiceImpl extends ServiceImpl<RescueCarInfoMapper, RescueCarInfo> implements IRescueCarInfoService {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DictDataApi dictDataService;
|
private DictDataApi dictDataService;
|
||||||
|
|
||||||
@ -37,8 +39,7 @@ public class RescueCarInfoServiceImpl extends ServiceImpl<RescueCarInfoMapper, R
|
|||||||
* @return 救援车辆信息
|
* @return 救援车辆信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RescueCarInfo selectRescueCarInfoById(Long id)
|
public RescueCarInfo selectRescueCarInfoById(Long id) {
|
||||||
{
|
|
||||||
RescueCarInfo carInfo = baseMapper.selectRescueCarInfoById(id);
|
RescueCarInfo carInfo = baseMapper.selectRescueCarInfoById(id);
|
||||||
try {
|
try {
|
||||||
String temp = dictDataService.getDictDataLabel("jyc_type", carInfo.getRescueCarType());
|
String temp = dictDataService.getDictDataLabel("jyc_type", carInfo.getRescueCarType());
|
||||||
@ -50,6 +51,7 @@ public class RescueCarInfoServiceImpl extends ServiceImpl<RescueCarInfoMapper, R
|
|||||||
}
|
}
|
||||||
return carInfo;
|
return carInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RescueCarInfo selectRescueCarInfoByNum(String carNum) {
|
public RescueCarInfo selectRescueCarInfoByNum(String carNum) {
|
||||||
LambdaQueryWrapper<RescueCarInfo> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<RescueCarInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
@ -65,17 +67,15 @@ public class RescueCarInfoServiceImpl extends ServiceImpl<RescueCarInfoMapper, R
|
|||||||
* @return 救援车辆信息
|
* @return 救援车辆信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<RescueCarInfo> selectRescueCarInfoList(RescueCarInfo rescueCarInfo)
|
public IPage<RescueCarInfo> selectRescueCarInfoList(RescueCarInfo rescueCarInfo, Page<RescueCarInfo> page) {
|
||||||
{
|
IPage<RescueCarInfo> rescueCarInfos = baseMapper.selectRescueCarInfoList(rescueCarInfo, page);
|
||||||
List<RescueCarInfo> rescueCarInfos = baseMapper.selectRescueCarInfoList(rescueCarInfo);
|
for (RescueCarInfo carInfo : rescueCarInfos.getRecords()) {
|
||||||
for (RescueCarInfo carInfo : rescueCarInfos) {
|
|
||||||
try {
|
try {
|
||||||
String temp = dictDataService.getDictDataLabel("jyc_type", carInfo.getRescueCarType());
|
String temp = dictDataService.getDictDataLabel("jyc_type", carInfo.getRescueCarType());
|
||||||
carInfo.setRescueCarTypeStr(temp);
|
carInfo.setRescueCarTypeStr(temp);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return rescueCarInfos;
|
return rescueCarInfos;
|
||||||
}
|
}
|
||||||
@ -87,11 +87,10 @@ public class RescueCarInfoServiceImpl extends ServiceImpl<RescueCarInfoMapper, R
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertRescueCarInfo(RescueCarInfo rescueCarInfo)
|
public int insertRescueCarInfo(RescueCarInfo rescueCarInfo) {
|
||||||
{
|
|
||||||
//获取当前登录用户
|
//获取当前登录用户
|
||||||
LoginUser loginUser = getLoginUser();
|
LoginUser loginUser = getLoginUser();
|
||||||
return baseMapper.insertRescueCarInfo(rescueCarInfo);
|
return baseMapper.insert(rescueCarInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,8 +100,7 @@ public class RescueCarInfoServiceImpl extends ServiceImpl<RescueCarInfoMapper, R
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateRescueCarInfo(RescueCarInfo rescueCarInfo)
|
public int updateRescueCarInfo(RescueCarInfo rescueCarInfo) {
|
||||||
{
|
|
||||||
return baseMapper.updateRescueCarInfo(rescueCarInfo);
|
return baseMapper.updateRescueCarInfo(rescueCarInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,9 +111,9 @@ public class RescueCarInfoServiceImpl extends ServiceImpl<RescueCarInfoMapper, R
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteRescueCarInfoByIds(Long[] ids)
|
public int deleteRescueCarInfoByIds(Long[] ids) {
|
||||||
{
|
List<Long> longs = Arrays.asList(ids);
|
||||||
return baseMapper.deleteRescueCarInfoByIds(ids);
|
return baseMapper.deleteByIds(longs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -125,8 +123,7 @@ public class RescueCarInfoServiceImpl extends ServiceImpl<RescueCarInfoMapper, R
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteRescueCarInfoById(Long id)
|
public int deleteRescueCarInfoById(Long id) {
|
||||||
{
|
|
||||||
return baseMapper.deleteRescueCarInfoById(id);
|
return baseMapper.deleteRescueCarInfoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,11 +4,14 @@ import cn.iocoder.yudao.module.rescue.domain.RescueCustomerInfo;
|
|||||||
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||||
import cn.iocoder.yudao.module.rescue.service.IRescueCustomerInfoService;
|
import cn.iocoder.yudao.module.rescue.service.IRescueCustomerInfoService;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import cn.iocoder.yudao.module.rescue.mapper.RescueCustomerInfoMapper;
|
import cn.iocoder.yudao.module.rescue.mapper.RescueCustomerInfoMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,10 +21,10 @@ import java.util.List;
|
|||||||
* @date 2023-09-14
|
* @date 2023-09-14
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class RescueCustomerInfoServiceImpl extends ServiceImpl<RescueCustomerInfoMapper, RescueCustomerInfo> implements IRescueCustomerInfoService
|
public class RescueCustomerInfoServiceImpl extends ServiceImpl<RescueCustomerInfoMapper, RescueCustomerInfo> implements IRescueCustomerInfoService {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DeptApi deptService;
|
private DeptApi deptService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询救援的客户信息
|
* 查询救援的客户信息
|
||||||
*
|
*
|
||||||
@ -29,8 +32,7 @@ public class RescueCustomerInfoServiceImpl extends ServiceImpl<RescueCustomerInf
|
|||||||
* @return 救援的客户信息
|
* @return 救援的客户信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RescueCustomerInfo selectRescueCustomerInfoById(Long id)
|
public RescueCustomerInfo selectRescueCustomerInfoById(Long id) {
|
||||||
{
|
|
||||||
RescueCustomerInfo rescueCustomerInfo = baseMapper.selectRescueCustomerInfoById(id);
|
RescueCustomerInfo rescueCustomerInfo = baseMapper.selectRescueCustomerInfoById(id);
|
||||||
DeptRespDTO sysDept = deptService.getDept(rescueCustomerInfo.getCustomerDeptId());
|
DeptRespDTO sysDept = deptService.getDept(rescueCustomerInfo.getCustomerDeptId());
|
||||||
rescueCustomerInfo.setDeptName(sysDept.getName());
|
rescueCustomerInfo.setDeptName(sysDept.getName());
|
||||||
@ -44,9 +46,8 @@ public class RescueCustomerInfoServiceImpl extends ServiceImpl<RescueCustomerInf
|
|||||||
* @return 救援的客户信息
|
* @return 救援的客户信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<RescueCustomerInfo> selectRescueCustomerInfoList(RescueCustomerInfo rescueCustomerInfo)
|
public IPage<RescueCustomerInfo> selectRescueCustomerInfoList(RescueCustomerInfo rescueCustomerInfo, Page<RescueCustomerInfo> page) {
|
||||||
{
|
return baseMapper.selectRescueCustomerInfoList(rescueCustomerInfo, page);
|
||||||
return baseMapper.selectRescueCustomerInfoList(rescueCustomerInfo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,8 +57,7 @@ public class RescueCustomerInfoServiceImpl extends ServiceImpl<RescueCustomerInf
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertRescueCustomerInfo(RescueCustomerInfo rescueCustomerInfo)
|
public int insertRescueCustomerInfo(RescueCustomerInfo rescueCustomerInfo) {
|
||||||
{
|
|
||||||
return baseMapper.insertRescueCustomerInfo(rescueCustomerInfo);
|
return baseMapper.insertRescueCustomerInfo(rescueCustomerInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,8 +68,7 @@ public class RescueCustomerInfoServiceImpl extends ServiceImpl<RescueCustomerInf
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateRescueCustomerInfo(RescueCustomerInfo rescueCustomerInfo)
|
public int updateRescueCustomerInfo(RescueCustomerInfo rescueCustomerInfo) {
|
||||||
{
|
|
||||||
return baseMapper.updateRescueCustomerInfo(rescueCustomerInfo);
|
return baseMapper.updateRescueCustomerInfo(rescueCustomerInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,9 +79,9 @@ public class RescueCustomerInfoServiceImpl extends ServiceImpl<RescueCustomerInf
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteRescueCustomerInfoByIds(Long[] ids)
|
public int deleteRescueCustomerInfoByIds(Long[] ids) {
|
||||||
{
|
List<Long> longs = Arrays.asList(ids);
|
||||||
return baseMapper.deleteRescueCustomerInfoByIds(ids);
|
return baseMapper.deleteByIds(longs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -92,8 +91,7 @@ public class RescueCustomerInfoServiceImpl extends ServiceImpl<RescueCustomerInf
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteRescueCustomerInfoById(Long id)
|
public int deleteRescueCustomerInfoById(Long id) {
|
||||||
{
|
return baseMapper.deleteById(id);
|
||||||
return baseMapper.deleteRescueCustomerInfoById(id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,40 +28,60 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectRescueCarInfoVo">
|
<sql id="selectRescueCarInfoVo">
|
||||||
select rci.id, rci.rescue_car_type, rci.rescue_car_num, rci.rescue_car_brand, rci.car_own, rci.car_image, rci.drive_license_image,
|
SELECT rci.id,
|
||||||
rci.car_buy_time, rci.car_license_color, rci.car_use_nature,
|
rci.rescue_car_type,
|
||||||
rci.frame_number,rci.car_keep_time,rci.car_insurance_time,rci.car_check_time,rci.possessor_id, rci.dept_id, rci.creator, rci.create_time, rci.updater, rci.update_time
|
rci.rescue_car_num,
|
||||||
from rescue_car_info rci
|
rci.rescue_car_brand,
|
||||||
|
rci.car_own,
|
||||||
|
rci.car_image,
|
||||||
|
rci.drive_license_image,
|
||||||
|
rci.car_buy_time,
|
||||||
|
rci.car_license_color,
|
||||||
|
rci.car_use_nature,
|
||||||
|
rci.frame_number,
|
||||||
|
rci.car_keep_time,
|
||||||
|
rci.car_insurance_time,
|
||||||
|
rci.car_check_time,
|
||||||
|
rci.possessor_id
|
||||||
|
FROM rescue_car_info rci
|
||||||
|
where rci.deleted = '0'
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectRescueCarInfoList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
<select id="selectRescueCarInfoList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo"
|
||||||
|
resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
||||||
<include refid="selectRescueCarInfoVo"/>
|
<include refid="selectRescueCarInfoVo"/>
|
||||||
<where>
|
<if test="map.rescueCarType != null and map.rescueCarType != ''">and rci.rescue_car_type =
|
||||||
<if test="rescueCarType != null and rescueCarType != ''"> and rci.rescue_car_type = #{rescueCarType}</if>
|
#{map.rescueCarType}
|
||||||
<if test="rescueCarNum != null and rescueCarNum != ''"> and rci.rescue_car_num = #{rescueCarNum}</if>
|
</if>
|
||||||
<if test="rescueCarBrand != null and rescueCarBrand != ''"> and rci.rescue_car_brand = #{rescueCarBrand}</if>
|
<if test="map.rescueCarNum != null and map.rescueCarNum != ''">and rci.rescue_car_num = #{map.rescueCarNum}
|
||||||
<if test="carOwn != null and carOwn != ''"> and rci.car_own = #{carOwn}</if>
|
</if>
|
||||||
<if test="carImage != null and carImage != ''"> and rci.car_image = #{carImage}</if>
|
<if test="map.rescueCarBrand != null and map.rescueCarBrand != ''">and rci.rescue_car_brand =
|
||||||
<if test="driveLicenseImage != null and driveLicenseImage != ''"> and rci.drive_license_image = #{driveLicenseImage}</if>
|
#{map.rescueCarBrand}
|
||||||
<if test="carBuyTime != null "> and rci.car_buy_time = #{carBuyTime}</if>
|
</if>
|
||||||
<if test="carLicenseColor != null and carLicenseColor != ''"> and rci.car_license_color = #{carLicenseColor}</if>
|
<if test="map.carOwn != null and map.carOwn != ''">and rci.car_own = #{map.carOwn}</if>
|
||||||
<if test="carUseNature != null and carUseNature != ''"> and rci.car_use_nature = #{carUseNature}</if>
|
<if test="map.carImage != null and map.carImage != ''">and rci.car_image = #{map.carImage}</if>
|
||||||
<if test="frameNumber != null and frameNumber != ''"> and rci.frame_number = #{frameNumber}</if>
|
<if test="map.driveLicenseImage != null and map.driveLicenseImage != ''">and rci.drive_license_image =
|
||||||
<if test="possessorId != null "> and rci.possessor_id = #{possessorId}</if>
|
#{map.driveLicenseImage}
|
||||||
<if test="deptId != null "> and rci.dept_id = #{deptId}</if>
|
</if>
|
||||||
|
<if test="map.carBuyTime != null ">and rci.car_buy_time = #{map.carBuyTime}</if>
|
||||||
</where>
|
<if test="map.carLicenseColor != null and map.carLicenseColor != ''">and rci.car_license_color =
|
||||||
|
#{map.carLicenseColor}
|
||||||
|
</if>
|
||||||
|
<if test="map.carUseNature != null and map.carUseNature != ''">and rci.car_use_nature = #{map.carUseNature}
|
||||||
|
</if>
|
||||||
|
<if test="map.frameNumber != null and map.frameNumber != ''">and rci.frame_number = #{map.frameNumber}</if>
|
||||||
|
<if test="map.possessorId != null ">and rci.possessor_id = #{map.possessorId}</if>
|
||||||
order by rci.create_time desc
|
order by rci.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectRescueCarInfoById" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
<select id="selectRescueCarInfoById" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
||||||
<include refid="selectRescueCarInfoVo"/>
|
<include refid="selectRescueCarInfoVo"/>
|
||||||
where id = #{id}
|
AND id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertRescueCarInfo" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertRescueCarInfo" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo"
|
||||||
|
useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into rescue_car_info
|
insert into rescue_car_info
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="rescueCarType != null">rescue_car_type,</if>
|
<if test="rescueCarType != null">rescue_car_type,</if>
|
||||||
@ -79,10 +99,6 @@
|
|||||||
<if test="carCheckTime != null">car_check_time,</if>
|
<if test="carCheckTime != null">car_check_time,</if>
|
||||||
<if test="possessorId != null">possessor_id,</if>
|
<if test="possessorId != null">possessor_id,</if>
|
||||||
<if test="deptId != null">dept_id,</if>
|
<if test="deptId != null">dept_id,</if>
|
||||||
<if test="createBy != null">creator,</if>
|
|
||||||
<if test="createTime != null">create_time,</if>
|
|
||||||
<if test="updateBy != null">updater,</if>
|
|
||||||
<if test="updateTime != null">update_time,</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="rescueCarType != null">#{rescueCarType},</if>
|
<if test="rescueCarType != null">#{rescueCarType},</if>
|
||||||
@ -100,10 +116,6 @@
|
|||||||
<if test="carCheckTime != null">#{carCheckTime},</if>
|
<if test="carCheckTime != null">#{carCheckTime},</if>
|
||||||
<if test="possessorId != null">#{possessorId},</if>
|
<if test="possessorId != null">#{possessorId},</if>
|
||||||
<if test="deptId != null">#{deptId},</if>
|
<if test="deptId != null">#{deptId},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
|
||||||
<if test="createTime != null">#{createTime},</if>
|
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -125,16 +137,14 @@
|
|||||||
<if test="carCheckTime != null">car_check_time = #{carCheckTime},</if>
|
<if test="carCheckTime != null">car_check_time = #{carCheckTime},</if>
|
||||||
<if test="possessorId != null">possessor_id = #{possessorId},</if>
|
<if test="possessorId != null">possessor_id = #{possessorId},</if>
|
||||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
<if test="createBy != null">creator = #{createBy},</if>
|
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
|
||||||
<if test="updateBy != null">updater = #{updateBy},</if>
|
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteRescueCarInfoById">
|
<delete id="deleteRescueCarInfoById">
|
||||||
delete from rescue_car_info where id = #{id}
|
delete
|
||||||
|
from rescue_car_info
|
||||||
|
where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteRescueCarInfoByIds">
|
<delete id="deleteRescueCarInfoByIds">
|
||||||
@ -146,27 +156,23 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="warnListBy" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
<select id="warnListBy" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
||||||
SELECT
|
SELECT *
|
||||||
*
|
FROM `rescue_car_info`
|
||||||
FROM
|
|
||||||
`rescue_car_info`
|
|
||||||
where car_keep_time <![CDATA[<]]> #{warnTime}
|
where car_keep_time <![CDATA[<]]> #{warnTime}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="warnListBx" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
<select id="warnListBx" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
||||||
SELECT
|
SELECT *
|
||||||
*
|
FROM `rescue_car_info`
|
||||||
FROM
|
where car_insurance_time <![CDATA[<]]> #{warnTime}
|
||||||
`rescue_car_info`
|
and dept_id = #{deptId}
|
||||||
where car_insurance_time <![CDATA[<]]> #{warnTime} and dept_id = #{deptId}
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="warnListNj" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
<select id="warnListNj" resultType="cn.iocoder.yudao.module.rescue.domain.RescueCarInfo">
|
||||||
SELECT
|
SELECT *
|
||||||
*
|
FROM `rescue_car_info`
|
||||||
FROM
|
where car_check_time <![CDATA[<]]> #{warnTime}
|
||||||
`rescue_car_info`
|
and dept_id = #{deptId}
|
||||||
where car_check_time <![CDATA[<]]> #{warnTime} and dept_id = #{deptId}
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -14,30 +14,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="orderPrefix" column="order_prefix"/>
|
<result property="orderPrefix" column="order_prefix"/>
|
||||||
<result property="defaultRescueType" column="default_rescue_type"/>
|
<result property="defaultRescueType" column="default_rescue_type"/>
|
||||||
<result property="deptId" column="dept_id"/>
|
<result property="deptId" column="dept_id"/>
|
||||||
<result property="creator" column="creator" />
|
<result property="deptName" column="dept_name"/>
|
||||||
<result property="createTime" column="create_time" />
|
|
||||||
<result property="updater" column="updater" />
|
|
||||||
<result property="updateTime" column="update_time" />
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectRescueCustomerInfoList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueCustomerInfo" resultMap="RescueCustomerInfoResult">
|
<select id="selectRescueCustomerInfoList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueCustomerInfo"
|
||||||
select rsi.*,d.dept_name from rescue_customer_info rsi
|
resultMap="RescueCustomerInfoResult">
|
||||||
left join sys_dept d on d.dept_id = rsi.customer_dept_id
|
select rsi.*,d.name as dept_name from rescue_customer_info rsi
|
||||||
<where>
|
left join system_dept d on d.id = rsi.customer_dept_id where rsi.deleted = '0'
|
||||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
<if test="map.customerName != null and map.customerName != ''">and customer_name like concat('%',
|
||||||
<if test="customerPhone != null and customerPhone != ''"> and customer_phone like concat('%', #{customerPhone}, '%')</if>
|
#{map.customerName}, '%')
|
||||||
<if test="customerDeptId != null "> and customer_dept_id = #{customerDeptId}</if>
|
</if>
|
||||||
<if test="signStartDate != null "> and sign_start_date >= #{signStartDate}</if>
|
<if test="map.customerPhone != null and map.customerPhone != ''">and customer_phone like concat('%',
|
||||||
<if test="signEndDate != null "> and sign_end_date <= #{signEndDate}</if>
|
#{map.customerPhone}, '%')
|
||||||
<if test="defaultRescueType != null and defaultRescueType != ''"> and default_rescue_type = #{defaultRescueType}</if>
|
</if>
|
||||||
${params.dataScope}
|
<if test="map.customerDeptId != null ">and customer_dept_id = #{map.customerDeptId}</if>
|
||||||
</where>
|
<if test="map.signStartDate != null ">and sign_start_date >= #{map.signStartDate}</if>
|
||||||
|
<if test="map.signEndDate != null ">and sign_end_date <= #{map.signEndDate}</if>
|
||||||
|
<if test="map.defaultRescueType != null and map.defaultRescueType != ''">and default_rescue_type =
|
||||||
|
#{map.defaultRescueType}
|
||||||
|
</if>
|
||||||
order by rsi.create_time desc
|
order by rsi.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectRescueCustomerInfoById" parameterType="java.lang.Long" resultMap="RescueCustomerInfoResult">
|
<select id="selectRescueCustomerInfoById" parameterType="java.lang.Long" resultMap="RescueCustomerInfoResult">
|
||||||
select * from rescue_customer_info
|
select *
|
||||||
|
from rescue_customer_info
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -53,10 +55,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="orderPrefix != null">order_prefix,</if>
|
<if test="orderPrefix != null">order_prefix,</if>
|
||||||
<if test="defaultRescueType != null">default_rescue_type,</if>
|
<if test="defaultRescueType != null">default_rescue_type,</if>
|
||||||
<if test="deptId != null">dept_id,</if>
|
<if test="deptId != null">dept_id,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
|
||||||
<if test="createBy != null">creator,</if>
|
|
||||||
<if test="updateTime != null">update_time,</if>
|
|
||||||
<if test="updateBy != null">updater,</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">#{id},</if>
|
<if test="id != null">#{id},</if>
|
||||||
@ -68,10 +66,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="orderPrefix != null">#{orderPrefix},</if>
|
<if test="orderPrefix != null">#{orderPrefix},</if>
|
||||||
<if test="defaultRescueType != null">#{defaultRescueType},</if>
|
<if test="defaultRescueType != null">#{defaultRescueType},</if>
|
||||||
<if test="deptId != null">#{deptId},</if>
|
<if test="deptId != null">#{deptId},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
|
||||||
<if test="createBy != null">#{createBy},</if>
|
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -86,16 +80,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="orderPrefix != null">order_prefix = #{orderPrefix},</if>
|
<if test="orderPrefix != null">order_prefix = #{orderPrefix},</if>
|
||||||
<if test="defaultRescueType != null">default_rescue_type = #{defaultRescueType},</if>
|
<if test="defaultRescueType != null">default_rescue_type = #{defaultRescueType},</if>
|
||||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
|
||||||
<if test="createBy != null">creator = #{createBy},</if>
|
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
||||||
<if test="updateBy != null">updater = #{updateBy},</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteRescueCustomerInfoById" parameterType="java.lang.Long">
|
<delete id="deleteRescueCustomerInfoById" parameterType="java.lang.Long">
|
||||||
delete from rescue_customer_info where id = #{id}
|
delete
|
||||||
|
from rescue_customer_info
|
||||||
|
where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteRescueCustomerInfoByIds" parameterType="java.lang.String">
|
<delete id="deleteRescueCustomerInfoByIds" parameterType="java.lang.String">
|
||||||
|
Loading…
Reference in New Issue
Block a user