Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
-1
@@ -155,7 +155,6 @@ public class OtaBaCxJbxxController extends JeroController<OtaBaCxJbxx, IOtaBaCxJ
|
|||||||
public Result<?> queryByOtaId(@RequestParam(name = "otaId") String otaId,
|
public Result<?> queryByOtaId(@RequestParam(name = "otaId") String otaId,
|
||||||
@RequestParam(name = "otaIdT") String otaIdT) {
|
@RequestParam(name = "otaIdT") String otaIdT) {
|
||||||
OtaBaCxJbxx otaBaCxJbxx = otaBaCxJbxxService.queryByOtaId(otaId, otaIdT);
|
OtaBaCxJbxx otaBaCxJbxx = otaBaCxJbxxService.queryByOtaId(otaId, otaIdT);
|
||||||
otaBaCxJbxx = otaBaCxJbxxService.queryByOtaId(otaId, otaIdT);
|
|
||||||
return Result.OK(otaBaCxJbxx);
|
return Result.OK(otaBaCxJbxx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+143
-137
@@ -4,6 +4,7 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||||
@@ -13,6 +14,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -22,163 +25,166 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 车型备案-填写记录表
|
* @Description: 车型备案-填写记录表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2023-03-25
|
* @Date: 2023-03-25
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="车型备案-填写记录表")
|
@Api(tags = "车型备案-填写记录表")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/ota/otaBaCxTxjl")
|
@RequestMapping("/ota/otaBaCxTxjl")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaCxTxjlController extends JeroController<OtaBaCxTxjl, IOtaBaCxTxjlService> {
|
public class OtaBaCxTxjlController extends JeroController<OtaBaCxTxjl, IOtaBaCxTxjlService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaCxTxjlService otaBaCxTxjlService;
|
private IOtaBaCxTxjlService otaBaCxTxjlService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaCxTxjl
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-填写记录表-分页列表查询")
|
|
||||||
@ApiOperation(value="车型备案-填写记录表-分页列表查询", notes="车型备案-填写记录表-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaCxTxjl otaBaCxTxjl,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaCxTxjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxTxjl, req.getParameterMap());
|
|
||||||
Page<OtaBaCxTxjl> page = new Page<OtaBaCxTxjl>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaCxTxjl> pageList = otaBaCxTxjlService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaCxTxjl
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "车型备案-填写记录表-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="车型备案-填写记录表-列表查询", notes="车型备案-填写记录表-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaCxTxjl>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "车型备案-填写记录表-分页列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-填写记录表-分页列表查询", notes = "车型备案-填写记录表-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaCxTxjl otaBaCxTxjl,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
IPage<OtaBaCxTxjl> pageList = new Page<>();
|
||||||
|
if (ObjectUtils.isNotEmpty(otaBaCxTxjl) && StringUtils.isNotEmpty(otaBaCxTxjl.getOtaId())) {
|
||||||
|
QueryWrapper<OtaBaCxTxjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxTxjl, req.getParameterMap());
|
||||||
|
Page<OtaBaCxTxjl> page = new Page<OtaBaCxTxjl>(pageNo, pageSize);
|
||||||
|
pageList = otaBaCxTxjlService.page(page, queryWrapper);
|
||||||
|
}
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-填写记录表-列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-填写记录表-列表查询", notes = "车型备案-填写记录表-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaCxTxjl>> queryList() {
|
||||||
List<OtaBaCxTxjl> list = otaBaCxTxjlService.queryList();
|
List<OtaBaCxTxjl> list = otaBaCxTxjlService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaCxTxjl
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-填写记录表-添加")
|
|
||||||
@ApiOperation(value="车型备案-填写记录表-添加", notes="车型备案-填写记录表-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaCxTxjl otaBaCxTxjl) {
|
|
||||||
otaBaCxTxjlService.add(otaBaCxTxjl);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaCxTxjl
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-填写记录表-编辑")
|
|
||||||
@ApiOperation(value="车型备案-填写记录表-编辑", notes="车型备案-填写记录表-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaCxTxjl otaBaCxTxjl) {
|
|
||||||
otaBaCxTxjlService.editById(otaBaCxTxjl);
|
|
||||||
return Result.OK("编辑成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id删除
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-填写记录表-通过id删除")
|
|
||||||
@ApiOperation(value="车型备案-填写记录表-通过id删除", notes="车型备案-填写记录表-通过id删除")
|
|
||||||
@DeleteMapping(value = "/delete")
|
|
||||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
|
||||||
otaBaCxTxjlService.deleteById(id);
|
|
||||||
return Result.OK("删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-填写记录表-批量删除")
|
|
||||||
@ApiOperation(value="车型备案-填写记录表-批量删除", notes="车型备案-填写记录表-批量删除")
|
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
|
||||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
||||||
this.otaBaCxTxjlService.deleteByIds(Arrays.asList(ids.split(",")));
|
|
||||||
return Result.OK("批量删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id查询
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-填写记录表-通过id查询")
|
|
||||||
@ApiOperation(value="车型备案-填写记录表-通过id查询", notes="车型备案-填写记录表-通过id查询")
|
|
||||||
@GetMapping(value = "/queryById")
|
|
||||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
|
||||||
OtaBaCxTxjl otaBaCxTxjl = otaBaCxTxjlService.queryById(id);
|
|
||||||
if(otaBaCxTxjl==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxTxjl);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过otaId查询
|
|
||||||
*
|
|
||||||
* @param otaId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-填写记录表-通过otaId查询")
|
|
||||||
@ApiOperation(value="车型备案-填写记录表-通过otaId查询", notes="车型备案-填写记录表-通过otaId查询")
|
|
||||||
@GetMapping(value = "/queryByOtaId")
|
|
||||||
public Result<?> queryByOtaId(@RequestParam(name="otaId",required=true) String otaId) {
|
|
||||||
List<OtaBaCxTxjl> otaBaCxTxjlList = otaBaCxTxjlService.queryByOtaId(otaId);
|
|
||||||
if(otaBaCxTxjlList==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxTxjlList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @param otaBaCxTxjl
|
||||||
* @param otaBaCxTxjl
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@AutoLog(value = "车型备案-填写记录表-添加")
|
||||||
|
@ApiOperation(value = "车型备案-填写记录表-添加", notes = "车型备案-填写记录表-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody OtaBaCxTxjl otaBaCxTxjl) {
|
||||||
|
otaBaCxTxjlService.add(otaBaCxTxjl);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaCxTxjl
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-填写记录表-编辑")
|
||||||
|
@ApiOperation(value = "车型备案-填写记录表-编辑", notes = "车型备案-填写记录表-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaCxTxjl otaBaCxTxjl) {
|
||||||
|
otaBaCxTxjlService.editById(otaBaCxTxjl);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-填写记录表-通过id删除")
|
||||||
|
@ApiOperation(value = "车型备案-填写记录表-通过id删除", notes = "车型备案-填写记录表-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
otaBaCxTxjlService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-填写记录表-批量删除")
|
||||||
|
@ApiOperation(value = "车型备案-填写记录表-批量删除", notes = "车型备案-填写记录表-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
|
this.otaBaCxTxjlService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-填写记录表-通过id查询")
|
||||||
|
@ApiOperation(value = "车型备案-填写记录表-通过id查询", notes = "车型备案-填写记录表-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
OtaBaCxTxjl otaBaCxTxjl = otaBaCxTxjlService.queryById(id);
|
||||||
|
if (otaBaCxTxjl == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxTxjl);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过otaId查询
|
||||||
|
*
|
||||||
|
* @param otaId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-填写记录表-通过otaId查询")
|
||||||
|
@ApiOperation(value = "车型备案-填写记录表-通过otaId查询", notes = "车型备案-填写记录表-通过otaId查询")
|
||||||
|
@GetMapping(value = "/queryByOtaId")
|
||||||
|
public Result<?> queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId) {
|
||||||
|
List<OtaBaCxTxjl> otaBaCxTxjlList = otaBaCxTxjlService.queryByOtaId(otaId);
|
||||||
|
if (otaBaCxTxjlList == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxTxjlList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaCxTxjl
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxTxjl otaBaCxTxjl) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxTxjl otaBaCxTxjl) {
|
||||||
return super.exportXls(request, otaBaCxTxjl, OtaBaCxTxjl.class, "车型备案-填写记录表");
|
return super.exportXls(request, otaBaCxTxjl, OtaBaCxTxjl.class, "车型备案-填写记录表");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过excel导入数据
|
* 通过excel导入数据
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param response
|
* @param response
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
return super.importExcel(request, response, OtaBaCxTxjl.class);
|
return super.importExcel(request, response, OtaBaCxTxjl.class);
|
||||||
|
|||||||
+170
@@ -0,0 +1,170 @@
|
|||||||
|
package com.jero.modules.ota.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaSjGnxtwh;
|
||||||
|
import com.jero.modules.ota.service.IOtaBaSjGnxtwhService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 车型备案-功能系统维护
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-03-26
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="车型备案-功能系统维护")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ota/otaBaSjGnxtwh")
|
||||||
|
@Slf4j
|
||||||
|
public class OtaBaSjGnxtwhController extends JeroController<OtaBaSjGnxtwh, IOtaBaSjGnxtwhService> {
|
||||||
|
@Autowired
|
||||||
|
private IOtaBaSjGnxtwhService otaBaSjGnxtwhService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param otaBaSjGnxtwh
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-功能系统维护-分页列表查询")
|
||||||
|
@ApiOperation(value="车型备案-功能系统维护-分页列表查询", notes="车型备案-功能系统维护-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaSjGnxtwh otaBaSjGnxtwh,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaSjGnxtwh> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjGnxtwh, req.getParameterMap());
|
||||||
|
Page<OtaBaSjGnxtwh> page = new Page<OtaBaSjGnxtwh>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaSjGnxtwh> pageList = otaBaSjGnxtwhService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-功能系统维护-列表查询")
|
||||||
|
@ApiOperation(value="车型备案-功能系统维护-列表查询", notes="车型备案-功能系统维护-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaSjGnxtwh>> queryList() {
|
||||||
|
List<OtaBaSjGnxtwh> list = otaBaSjGnxtwhService.queryList();
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param otaBaSjGnxtwh
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-功能系统维护-添加")
|
||||||
|
@ApiOperation(value="车型备案-功能系统维护-添加", notes="车型备案-功能系统维护-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody OtaBaSjGnxtwh otaBaSjGnxtwh) {
|
||||||
|
otaBaSjGnxtwhService.add(otaBaSjGnxtwh);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaSjGnxtwh
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-功能系统维护-编辑")
|
||||||
|
@ApiOperation(value="车型备案-功能系统维护-编辑", notes="车型备案-功能系统维护-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaSjGnxtwh otaBaSjGnxtwh) {
|
||||||
|
otaBaSjGnxtwhService.editById(otaBaSjGnxtwh);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-功能系统维护-通过id删除")
|
||||||
|
@ApiOperation(value="车型备案-功能系统维护-通过id删除", notes="车型备案-功能系统维护-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
otaBaSjGnxtwhService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-功能系统维护-批量删除")
|
||||||
|
@ApiOperation(value="车型备案-功能系统维护-批量删除", notes="车型备案-功能系统维护-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.otaBaSjGnxtwhService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-功能系统维护-通过id查询")
|
||||||
|
@ApiOperation(value="车型备案-功能系统维护-通过id查询", notes="车型备案-功能系统维护-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
OtaBaSjGnxtwh otaBaSjGnxtwh = otaBaSjGnxtwhService.queryById(id);
|
||||||
|
if(otaBaSjGnxtwh==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaSjGnxtwh);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaSjGnxtwh
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjGnxtwh otaBaSjGnxtwh) {
|
||||||
|
return super.exportXls(request, otaBaSjGnxtwh, OtaBaSjGnxtwh.class, "车型备案-功能系统维护");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, OtaBaSjGnxtwh.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+7
-5
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.modules.ota.controller;
|
package com.jero.modules.ota.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -175,11 +176,12 @@ public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjL
|
|||||||
@AutoLog(value = "升级备案-备案维护")
|
@AutoLog(value = "升级备案-备案维护")
|
||||||
@ApiOperation(value = "升级备案-备案维护", notes = "升级备案-备案维护")
|
@ApiOperation(value = "升级备案-备案维护", notes = "升级备案-备案维护")
|
||||||
@PostMapping(value = "/batchRecord")
|
@PostMapping(value = "/batchRecord")
|
||||||
public Result<?> batchRecord(@RequestParam(name = "ids", required = true) String ids,
|
public Result<?> batchRecord(@RequestBody JSONObject json) {
|
||||||
@RequestParam(name = "bazt", required = true) String bazt,
|
String ids = json.getString("ids");
|
||||||
@RequestParam(name = "batjsj", required = true) String batjsj,
|
String bazt = json.getString("bazt");
|
||||||
@RequestParam(name = "bz", required = true) String bz,
|
String batjsj = json.getString("batjsj");
|
||||||
@RequestParam(name = "cut") String cut) {
|
String bz = json.getString("bz");
|
||||||
|
String cut = json.getString("cut");
|
||||||
otaBaSjListService.batchRecord(ids, bazt, batjsj, bz, cut);
|
otaBaSjListService.batchRecord(ids, bazt, batjsj, bz, cut);
|
||||||
return Result.OK("备案维护成功!");
|
return Result.OK("备案维护成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+145
-132
@@ -1,167 +1,180 @@
|
|||||||
package com.jero.modules.ota.controller;
|
package com.jero.modules.ota.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import com.jero.common.api.vo.Result;
|
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
|
||||||
import com.jero.modules.ota.entity.OtaBaSjSjmbcl;
|
|
||||||
import com.jero.modules.ota.service.IOtaBaSjSjmbclService;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaSjSjmbcl;
|
||||||
|
import com.jero.modules.ota.service.IOtaBaSjSjmbclService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 升级备案-升级目标车辆
|
* @Description: 升级备案-升级目标车辆
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2023-03-17
|
* @Date: 2023-03-17
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="升级备案-升级目标车辆")
|
@Api(tags = "升级备案-升级目标车辆")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/ota/otaBaSjSjmbcl")
|
@RequestMapping("/ota/otaBaSjSjmbcl")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaSjSjmbclController extends JeroController<OtaBaSjSjmbcl, IOtaBaSjSjmbclService> {
|
public class OtaBaSjSjmbclController extends JeroController<OtaBaSjSjmbcl, IOtaBaSjSjmbclService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaSjSjmbclService otaBaSjSjmbclService;
|
private IOtaBaSjSjmbclService otaBaSjSjmbclService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaSjSjmbcl
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车辆-分页列表查询")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车辆-分页列表查询", notes="升级备案-升级目标车辆-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaSjSjmbcl otaBaSjSjmbcl,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaSjSjmbcl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjmbcl, req.getParameterMap());
|
|
||||||
Page<OtaBaSjSjmbcl> page = new Page<OtaBaSjSjmbcl>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaSjSjmbcl> pageList = otaBaSjSjmbclService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaSjSjmbcl
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "升级备案-升级目标车辆-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="升级备案-升级目标车辆-列表查询", notes="升级备案-升级目标车辆-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaSjSjmbcl>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车辆-分页列表查询")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车辆-分页列表查询", notes = "升级备案-升级目标车辆-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaSjSjmbcl otaBaSjSjmbcl,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaSjSjmbcl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjmbcl, req.getParameterMap());
|
||||||
|
Page<OtaBaSjSjmbcl> page = new Page<OtaBaSjSjmbcl>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaSjSjmbcl> pageList = otaBaSjSjmbclService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车辆-列表查询")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车辆-列表查询", notes = "升级备案-升级目标车辆-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaSjSjmbcl>> queryList() {
|
||||||
List<OtaBaSjSjmbcl> list = otaBaSjSjmbclService.queryList();
|
List<OtaBaSjSjmbcl> list = otaBaSjSjmbclService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaSjSjmbcl
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车辆-添加")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车辆-添加", notes="升级备案-升级目标车辆-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
|
||||||
otaBaSjSjmbclService.add(otaBaSjSjmbcl);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaSjSjmbcl
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车辆-编辑")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车辆-编辑", notes="升级备案-升级目标车辆-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
|
||||||
otaBaSjSjmbclService.editById(otaBaSjSjmbcl);
|
|
||||||
return Result.OK("编辑成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id删除
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车辆-通过id删除")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车辆-通过id删除", notes="升级备案-升级目标车辆-通过id删除")
|
|
||||||
@DeleteMapping(value = "/delete")
|
|
||||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
|
||||||
otaBaSjSjmbclService.deleteById(id);
|
|
||||||
return Result.OK("删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车辆-批量删除")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车辆-批量删除", notes="升级备案-升级目标车辆-批量删除")
|
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
|
||||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
||||||
this.otaBaSjSjmbclService.deleteByIds(Arrays.asList(ids.split(",")));
|
|
||||||
return Result.OK("批量删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id查询
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车辆-通过id查询")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车辆-通过id查询", notes="升级备案-升级目标车辆-通过id查询")
|
|
||||||
@GetMapping(value = "/queryById")
|
|
||||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
|
||||||
OtaBaSjSjmbcl otaBaSjSjmbcl = otaBaSjSjmbclService.queryById(id);
|
|
||||||
if(otaBaSjSjmbcl==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaSjSjmbcl);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @param otaBaSjSjmbcl
|
||||||
* @param otaBaSjSjmbcl
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车辆-添加")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车辆-添加", notes = "升级备案-升级目标车辆-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
||||||
|
otaBaSjSjmbclService.add(otaBaSjSjmbcl);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaSjSjmbcl
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车辆-编辑")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车辆-编辑", notes = "升级备案-升级目标车辆-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
||||||
|
otaBaSjSjmbclService.editById(otaBaSjSjmbcl);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车辆-通过id删除")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车辆-通过id删除", notes = "升级备案-升级目标车辆-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
otaBaSjSjmbclService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车辆-批量删除")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车辆-批量删除", notes = "升级备案-升级目标车辆-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
|
this.otaBaSjSjmbclService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车辆-通过id查询")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车辆-通过id查询", notes = "升级备案-升级目标车辆-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
OtaBaSjSjmbcl otaBaSjSjmbcl = otaBaSjSjmbclService.queryById(id);
|
||||||
|
if (otaBaSjSjmbcl == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaSjSjmbcl);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过OtaId查询
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车辆-通过otaId查询")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车辆-通过otaId查询", notes = "升级备案-升级目标车辆-通过otaId查询")
|
||||||
|
@GetMapping(value = "/queryByOtaId")
|
||||||
|
public Result<?> queryByOtaId(@RequestParam(name = "otaId") String otaId,
|
||||||
|
@RequestParam(name = "otaIdT") String otaIdT) {
|
||||||
|
OtaBaSjSjmbcl otaBaSjSjmbcl = otaBaSjSjmbclService.queryByOtaId(otaId, otaIdT);
|
||||||
|
return Result.OK(otaBaSjSjmbcl);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaSjSjmbcl
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
||||||
return super.exportXls(request, otaBaSjSjmbcl, OtaBaSjSjmbcl.class, "升级备案-升级目标车辆");
|
return super.exportXls(request, otaBaSjSjmbcl, OtaBaSjSjmbcl.class, "升级备案-升级目标车辆");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过excel导入数据
|
* 通过excel导入数据
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param response
|
* @param response
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
return super.importExcel(request, response, OtaBaSjSjmbcl.class);
|
return super.importExcel(request, response, OtaBaSjSjmbcl.class);
|
||||||
|
|||||||
+135
-120
@@ -4,8 +4,10 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaCxJbxx;
|
||||||
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
|
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
|
||||||
import com.jero.modules.ota.service.IOtaBaSjSjmbcxService;
|
import com.jero.modules.ota.service.IOtaBaSjSjmbcxService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -22,149 +24,162 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 升级备案-升级目标车型
|
* @Description: 升级备案-升级目标车型
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2023-03-17
|
* @Date: 2023-03-17
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="升级备案-升级目标车型")
|
@Api(tags = "升级备案-升级目标车型")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/ota/otaBaSjSjmbcx")
|
@RequestMapping("/ota/otaBaSjSjmbcx")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaSjSjmbcxController extends JeroController<OtaBaSjSjmbcx, IOtaBaSjSjmbcxService> {
|
public class OtaBaSjSjmbcxController extends JeroController<OtaBaSjSjmbcx, IOtaBaSjSjmbcxService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaSjSjmbcxService otaBaSjSjmbcxService;
|
private IOtaBaSjSjmbcxService otaBaSjSjmbcxService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaSjSjmbcx
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车型-分页列表查询")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车型-分页列表查询", notes="升级备案-升级目标车型-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaSjSjmbcx otaBaSjSjmbcx,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaSjSjmbcx> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjmbcx, req.getParameterMap());
|
|
||||||
Page<OtaBaSjSjmbcx> page = new Page<OtaBaSjSjmbcx>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaSjSjmbcx> pageList = otaBaSjSjmbcxService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaSjSjmbcx
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "升级备案-升级目标车型-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="升级备案-升级目标车型-列表查询", notes="升级备案-升级目标车型-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaSjSjmbcx>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车型-分页列表查询")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车型-分页列表查询", notes = "升级备案-升级目标车型-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaSjSjmbcx otaBaSjSjmbcx,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaSjSjmbcx> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjmbcx, req.getParameterMap());
|
||||||
|
Page<OtaBaSjSjmbcx> page = new Page<OtaBaSjSjmbcx>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaSjSjmbcx> pageList = otaBaSjSjmbcxService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车型-列表查询")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车型-列表查询", notes = "升级备案-升级目标车型-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaSjSjmbcx>> queryList() {
|
||||||
List<OtaBaSjSjmbcx> list = otaBaSjSjmbcxService.queryList();
|
List<OtaBaSjSjmbcx> list = otaBaSjSjmbcxService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaSjSjmbcx
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车型-添加")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车型-添加", notes="升级备案-升级目标车型-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaSjSjmbcx otaBaSjSjmbcx) {
|
|
||||||
otaBaSjSjmbcxService.add(otaBaSjSjmbcx);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaSjSjmbcx
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车型-编辑")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车型-编辑", notes="升级备案-升级目标车型-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaSjSjmbcx otaBaSjSjmbcx) {
|
|
||||||
otaBaSjSjmbcxService.editById(otaBaSjSjmbcx);
|
|
||||||
return Result.OK("编辑成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id删除
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车型-通过id删除")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车型-通过id删除", notes="升级备案-升级目标车型-通过id删除")
|
|
||||||
@DeleteMapping(value = "/delete")
|
|
||||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
|
||||||
otaBaSjSjmbcxService.deleteById(id);
|
|
||||||
return Result.OK("删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车型-批量删除")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车型-批量删除", notes="升级备案-升级目标车型-批量删除")
|
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
|
||||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
||||||
this.otaBaSjSjmbcxService.deleteByIds(Arrays.asList(ids.split(",")));
|
|
||||||
return Result.OK("批量删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id查询
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-升级目标车型-通过id查询")
|
|
||||||
@ApiOperation(value="升级备案-升级目标车型-通过id查询", notes="升级备案-升级目标车型-通过id查询")
|
|
||||||
@GetMapping(value = "/queryById")
|
|
||||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
|
||||||
OtaBaSjSjmbcx otaBaSjSjmbcx = otaBaSjSjmbcxService.queryById(id);
|
|
||||||
if(otaBaSjSjmbcx==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaSjSjmbcx);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @param otaBaSjSjmbcx
|
||||||
* @param otaBaSjSjmbcx
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车型-添加")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车型-添加", notes = "升级备案-升级目标车型-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody OtaBaSjSjmbcx otaBaSjSjmbcx) {
|
||||||
|
OtaBaSjSjmbcx res = otaBaSjSjmbcxService.add(otaBaSjSjmbcx);
|
||||||
|
return Result.OK(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaSjSjmbcx
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车型-编辑")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车型-编辑", notes = "升级备案-升级目标车型-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaSjSjmbcx otaBaSjSjmbcx) {
|
||||||
|
otaBaSjSjmbcxService.editById(otaBaSjSjmbcx);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车型-通过id删除")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车型-通过id删除", notes = "升级备案-升级目标车型-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
otaBaSjSjmbcxService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车型-批量删除")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车型-批量删除", notes = "升级备案-升级目标车型-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
|
this.otaBaSjSjmbcxService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车型-通过id查询")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车型-通过id查询", notes = "升级备案-升级目标车型-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
OtaBaSjSjmbcx otaBaSjSjmbcx = otaBaSjSjmbcxService.queryById(id);
|
||||||
|
if (otaBaSjSjmbcx == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaSjSjmbcx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过OtaId查询
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-升级目标车型-通过otaId查询")
|
||||||
|
@ApiOperation(value = "升级备案-升级目标车型-通过otaId查询", notes = "升级备案-升级目标车型-通过otaId查询")
|
||||||
|
@GetMapping(value = "/queryByOtaId")
|
||||||
|
public Result<?> queryByOtaId(@RequestParam(name = "otaId") String otaId,
|
||||||
|
@RequestParam(name = "otaIdT") String otaIdT) {
|
||||||
|
OtaBaSjSjmbcx otaBaSjSjmbcx = otaBaSjSjmbcxService.queryByOtaId(otaId, otaIdT);
|
||||||
|
return Result.OK(otaBaSjSjmbcx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaSjSjmbcx
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjSjmbcx otaBaSjSjmbcx) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjSjmbcx otaBaSjSjmbcx) {
|
||||||
return super.exportXls(request, otaBaSjSjmbcx, OtaBaSjSjmbcx.class, "升级备案-升级目标车型");
|
return super.exportXls(request, otaBaSjSjmbcx, OtaBaSjSjmbcx.class, "升级备案-升级目标车型");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过excel导入数据
|
* 通过excel导入数据
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param response
|
* @param response
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
return super.importExcel(request, response, OtaBaSjSjmbcx.class);
|
return super.importExcel(request, response, OtaBaSjSjmbcx.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+74
@@ -0,0 +1,74 @@
|
|||||||
|
package com.jero.modules.ota.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 车型备案-功能系统维护
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-03-26
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ota_ba_sj_gnxtwh")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="ota_ba_sj_gnxtwh对象", description="车型备案-功能系统维护")
|
||||||
|
public class OtaBaSjGnxtwh implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private String sysOrgCode;
|
||||||
|
|
||||||
|
/**功能系统*/
|
||||||
|
@Excel(name = "功能系统", width = 15)
|
||||||
|
@ApiModelProperty(value = "功能系统")
|
||||||
|
private String gnxt;
|
||||||
|
|
||||||
|
/**对应控制器*/
|
||||||
|
@Excel(name = "对应控制器", width = 15)
|
||||||
|
@ApiModelProperty(value = "对应控制器")
|
||||||
|
private String dykzq;
|
||||||
|
|
||||||
|
}
|
||||||
+78
-37
@@ -3,6 +3,7 @@ package com.jero.modules.ota.entity;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
@@ -21,98 +22,138 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|||||||
/**
|
/**
|
||||||
* @Description: 升级备案-升级活动备案列表
|
* @Description: 升级备案-升级活动备案列表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2023-03-17
|
* @Date: 2023-03-17
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("ota_ba_sj_list")
|
@TableName("ota_ba_sj_list")
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ApiModel(value="ota_ba_sj_list对象", description="升级备案-升级活动备案列表")
|
@ApiModel(value = "ota_ba_sj_list对象", description = "升级备案-升级活动备案列表")
|
||||||
public class OtaBaSjList implements Serializable {
|
public class OtaBaSjList implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**主键*/
|
/**
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@ApiModelProperty(value = "主键")
|
@ApiModelProperty(value = "主键")
|
||||||
private java.lang.String id;
|
private java.lang.String id;
|
||||||
|
|
||||||
/**创建人*/
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "创建人")
|
@ApiModelProperty(value = "创建人")
|
||||||
private java.lang.String createBy;
|
private java.lang.String createBy;
|
||||||
|
|
||||||
/**创建日期*/
|
/**
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
* 创建日期
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "创建日期")
|
@ApiModelProperty(value = "创建日期")
|
||||||
private java.util.Date createTime;
|
private java.util.Date createTime;
|
||||||
|
|
||||||
/**更新人*/
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "更新人")
|
@ApiModelProperty(value = "更新人")
|
||||||
private java.lang.String updateBy;
|
private java.lang.String updateBy;
|
||||||
|
|
||||||
/**更新日期*/
|
/**
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
* 更新日期
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "更新日期")
|
@ApiModelProperty(value = "更新日期")
|
||||||
private java.util.Date updateTime;
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
/**所属部门*/
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "所属部门")
|
@ApiModelProperty(value = "所属部门")
|
||||||
private java.lang.String sysOrgCode;
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
/**otaId*/
|
/**
|
||||||
@Excel(name = "otaId", width = 15)
|
* otaId
|
||||||
|
*/
|
||||||
|
@Excel(name = "otaId", width = 15)
|
||||||
@ApiModelProperty(value = "otaId")
|
@ApiModelProperty(value = "otaId")
|
||||||
private java.lang.String otaId;
|
private java.lang.String otaId;
|
||||||
|
|
||||||
/**产品登记编号*/
|
/**
|
||||||
@Excel(name = "产品登记编号", width = 15)
|
* 产品登记编号
|
||||||
|
*/
|
||||||
|
@Excel(name = "产品登记编号", width = 15)
|
||||||
@ApiModelProperty(value = "产品登记编号")
|
@ApiModelProperty(value = "产品登记编号")
|
||||||
private java.lang.String cpdjbh;
|
private java.lang.String cpdjbh;
|
||||||
|
|
||||||
/**公告批次*/
|
/**
|
||||||
@Excel(name = "公告批次", width = 15)
|
* 公告批次
|
||||||
|
*/
|
||||||
|
@Excel(name = "公告批次", width = 15)
|
||||||
@ApiModelProperty(value = "公告批次")
|
@ApiModelProperty(value = "公告批次")
|
||||||
private java.lang.String ggpc;
|
private java.lang.String ggpc;
|
||||||
|
|
||||||
/**产品商标*/
|
/**
|
||||||
@Excel(name = "产品商标", width = 15)
|
* 产品商标
|
||||||
|
*/
|
||||||
|
@Excel(name = "产品商标", width = 15)
|
||||||
@ApiModelProperty(value = "产品商标")
|
@ApiModelProperty(value = "产品商标")
|
||||||
private java.lang.String cpsb;
|
private java.lang.String cpsb;
|
||||||
|
|
||||||
/**产品名称*/
|
/**
|
||||||
@Excel(name = "产品名称", width = 15)
|
* 产品名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "产品名称", width = 15)
|
||||||
@ApiModelProperty(value = "产品名称")
|
@ApiModelProperty(value = "产品名称")
|
||||||
private java.lang.String cpmc;
|
private java.lang.String cpmc;
|
||||||
|
|
||||||
/**产品型号*/
|
/**
|
||||||
@Excel(name = "产品型号", width = 15)
|
* 产品型号
|
||||||
|
*/
|
||||||
|
@Excel(name = "产品型号", width = 15)
|
||||||
@ApiModelProperty(value = "产品型号")
|
@ApiModelProperty(value = "产品型号")
|
||||||
private java.lang.String cpxh;
|
private java.lang.String cpxh;
|
||||||
|
|
||||||
/**备案状态*/
|
/**
|
||||||
@Excel(name = "备案状态", width = 15)
|
* 备案状态
|
||||||
|
*/
|
||||||
|
@Excel(name = "备案状态", width = 15)
|
||||||
@ApiModelProperty(value = "备案状态")
|
@ApiModelProperty(value = "备案状态")
|
||||||
|
@Dict(dicCode = "recordstatus")
|
||||||
private java.lang.String bazt;
|
private java.lang.String bazt;
|
||||||
|
|
||||||
/**备案提交时间*/
|
/**
|
||||||
@Excel(name = "备案提交时间", width = 15, format = "yyyy-MM-dd")
|
* 备案提交时间
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
*/
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@Excel(name = "备案提交时间", width = 15, format = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "备案提交时间")
|
@ApiModelProperty(value = "备案提交时间")
|
||||||
private java.util.Date batjsj;
|
private java.util.Date batjsj;
|
||||||
|
|
||||||
/**创建时间*/
|
/**
|
||||||
@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd")
|
* 创建时间
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
*/
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
private java.util.Date cjsj;
|
private java.util.Date cjsj;
|
||||||
|
|
||||||
/**备注*/
|
/**
|
||||||
@Excel(name = "备注", width = 15)
|
* 备注
|
||||||
|
*/
|
||||||
|
@Excel(name = "备注", width = 15)
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private java.lang.String bz;
|
private java.lang.String bz;
|
||||||
|
|
||||||
|
public void updateData(OtaBaSjSjmbcx otaBaSjSjmbcx) {
|
||||||
|
this.cpdjbh = otaBaSjSjmbcx.getBabh();
|
||||||
|
this.ggpc = otaBaSjSjmbcx.getBapc();
|
||||||
|
this.cpsb = otaBaSjSjmbcx.getCpsb();
|
||||||
|
this.cpmc = otaBaSjSjmbcx.getCpmc();
|
||||||
|
this.cpxh = otaBaSjSjmbcx.getCpxh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.ota.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaSjGnxtwh;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 车型备案-功能系统维护
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-03-26
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface OtaBaSjGnxtwhMapper extends BaseMapper<OtaBaSjGnxtwh> {
|
||||||
|
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
<?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.jero.modules.ota.mapper.OtaBaSjGnxtwhMapper">
|
||||||
|
<resultMap id="OtaBaSjGnxtwhResultMap" type="com.jero.modules.ota.entity.OtaBaSjGnxtwh">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
<result column="gnxt" property="gnxt" />
|
||||||
|
<result column="dykzq" property="dykzq" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
package com.jero.modules.ota.service;
|
||||||
|
|
||||||
|
import com.jero.modules.ota.entity.OtaBaSjGnxtwh;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 车型备案-功能系统维护
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-03-26
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IOtaBaSjGnxtwhService extends IService<OtaBaSjGnxtwh> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param otaBaSjGnxtwh
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(OtaBaSjGnxtwh otaBaSjGnxtwh);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param otaBaSjGnxtwh
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(OtaBaSjGnxtwh otaBaSjGnxtwh);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
OtaBaSjGnxtwh queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<OtaBaSjGnxtwh> queryList();
|
||||||
|
}
|
||||||
+2
@@ -58,4 +58,6 @@ public interface IOtaBaSjSjmbclService extends IService<OtaBaSjSjmbcl> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaSjSjmbcl> queryList();
|
List<OtaBaSjSjmbcl> queryList();
|
||||||
|
|
||||||
|
OtaBaSjSjmbcl queryByOtaId(String otaId, String otaIdT);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -18,7 +18,7 @@ public interface IOtaBaSjSjmbcxService extends IService<OtaBaSjSjmbcx> {
|
|||||||
* @param otaBaSjSjmbcx
|
* @param otaBaSjSjmbcx
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void add(OtaBaSjSjmbcx otaBaSjSjmbcx);
|
OtaBaSjSjmbcx add(OtaBaSjSjmbcx otaBaSjSjmbcx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
@@ -58,4 +58,6 @@ public interface IOtaBaSjSjmbcxService extends IService<OtaBaSjSjmbcx> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaSjSjmbcx> queryList();
|
List<OtaBaSjSjmbcx> queryList();
|
||||||
|
|
||||||
|
OtaBaSjSjmbcx queryByOtaId(String otaId, String otaIdT);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -129,7 +129,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
|||||||
for (Object cdJson : cs) {
|
for (Object cdJson : cs) {
|
||||||
HashMap<String, Object> csMap = (HashMap<String, Object>) cdJson;
|
HashMap<String, Object> csMap = (HashMap<String, Object>) cdJson;
|
||||||
String csName = (String) csMap.get("key");
|
String csName = (String) csMap.get("key");
|
||||||
String csValue = (String) csMap.get("val");
|
String csValue = csMap.get("val").toString();
|
||||||
if (null != csName) {
|
if (null != csName) {
|
||||||
try {
|
try {
|
||||||
Field field = OtaBaCxJsfzbacs.class.getDeclaredField(csName);
|
Field field = OtaBaCxJsfzbacs.class.getDeclaredField(csName);
|
||||||
|
|||||||
+89
@@ -0,0 +1,89 @@
|
|||||||
|
package com.jero.modules.ota.service.impl;
|
||||||
|
|
||||||
|
import com.jero.modules.ota.entity.OtaBaSjGnxtwh;
|
||||||
|
import com.jero.modules.ota.mapper.OtaBaSjGnxtwhMapper;
|
||||||
|
import com.jero.modules.ota.service.IOtaBaSjGnxtwhService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 车型备案-功能系统维护
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-03-26
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OtaBaSjGnxtwhServiceImpl extends ServiceImpl<OtaBaSjGnxtwhMapper, OtaBaSjGnxtwh> implements IOtaBaSjGnxtwhService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param otaBaSjGnxtwh
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(OtaBaSjGnxtwh otaBaSjGnxtwh) {
|
||||||
|
Date now = new Date();
|
||||||
|
otaBaSjGnxtwh.setCreateTime(now);
|
||||||
|
otaBaSjGnxtwh.setUpdateTime(now);
|
||||||
|
save(otaBaSjGnxtwh);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param otaBaSjGnxtwh
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(OtaBaSjGnxtwh otaBaSjGnxtwh) {
|
||||||
|
Date now = new Date();
|
||||||
|
otaBaSjGnxtwh.setUpdateTime(now);
|
||||||
|
saveOrUpdate(otaBaSjGnxtwh);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public OtaBaSjGnxtwh queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<OtaBaSjGnxtwh> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -40,7 +40,7 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
|||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaSjList.setCreateTime(now);
|
otaBaSjList.setCreateTime(now);
|
||||||
otaBaSjList.setUpdateTime(now);
|
otaBaSjList.setUpdateTime(now);
|
||||||
save(otaBaSjList);
|
saveOrUpdate(otaBaSjList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+65
-44
@@ -1,88 +1,109 @@
|
|||||||
package com.jero.modules.ota.service.impl;
|
package com.jero.modules.ota.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.jero.modules.ota.entity.OtaBaSjSjmbcl;
|
import com.jero.modules.ota.entity.OtaBaSjSjmbcl;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
|
||||||
import com.jero.modules.ota.mapper.OtaBaSjSjmbclMapper;
|
import com.jero.modules.ota.mapper.OtaBaSjSjmbclMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaSjSjmbclService;
|
import com.jero.modules.ota.service.IOtaBaSjSjmbclService;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 升级备案-升级目标车辆
|
* @Description: 升级备案-升级目标车辆
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2023-03-17
|
* @Date: 2023-03-17
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, OtaBaSjSjmbcl> implements IOtaBaSjSjmbclService {
|
public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, OtaBaSjSjmbcl> implements IOtaBaSjSjmbclService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaSjSjmbcl
|
* @param otaBaSjSjmbcl
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
public void add(OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaSjSjmbcl.setCreateTime(now);
|
otaBaSjSjmbcl.setCreateTime(now);
|
||||||
otaBaSjSjmbcl.setUpdateTime(now);
|
otaBaSjSjmbcl.setUpdateTime(now);
|
||||||
save(otaBaSjSjmbcl);
|
saveOrUpdate(otaBaSjSjmbcl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaSjSjmbcl
|
* @param otaBaSjSjmbcl
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
public void editById(OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaSjSjmbcl.setUpdateTime(now);
|
otaBaSjSjmbcl.setUpdateTime(now);
|
||||||
saveOrUpdate(otaBaSjSjmbcl);
|
saveOrUpdate(otaBaSjSjmbcl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteById(String id) {
|
public void deleteById(String id) {
|
||||||
removeById(id);
|
removeById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteByIds(List<String> ids) {
|
public void deleteByIds(List<String> ids) {
|
||||||
removeByIds(ids);
|
removeByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OtaBaSjSjmbcl queryById(String id) {
|
public OtaBaSjSjmbcl queryById(String id) {
|
||||||
return getById(id);
|
return getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OtaBaSjSjmbcl queryByOtaId(String otaId, String otaIdT) {
|
||||||
|
//判断是否保存过,否则查询模版数据回显
|
||||||
|
OtaBaSjSjmbcl res = getByOtaId(otaId);
|
||||||
|
if (ObjectUtils.isEmpty(res)) {
|
||||||
|
res = getByOtaId(otaIdT);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
private OtaBaSjSjmbcl getByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaSjSjmbcl> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaSjSjmbcl::getOtaId, otaId);
|
||||||
|
return this.getOne(queryWrapper, false);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OtaBaSjSjmbcl> queryList() {
|
public List<OtaBaSjSjmbcl> queryList() {
|
||||||
return list();
|
return list();
|
||||||
}
|
}
|
||||||
|
|||||||
+44
-4
@@ -1,11 +1,20 @@
|
|||||||
package com.jero.modules.ota.service.impl;
|
package com.jero.modules.ota.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaCxJbxx;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaSjList;
|
||||||
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
|
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
|
||||||
import com.jero.modules.ota.mapper.OtaBaSjSjmbcxMapper;
|
import com.jero.modules.ota.mapper.OtaBaSjSjmbcxMapper;
|
||||||
|
import com.jero.modules.ota.service.IOtaBaSjListService;
|
||||||
import com.jero.modules.ota.service.IOtaBaSjSjmbcxService;
|
import com.jero.modules.ota.service.IOtaBaSjSjmbcxService;
|
||||||
|
import com.jero.modules.system.util.StringUtils;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,6 +26,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
@Service
|
@Service
|
||||||
public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, OtaBaSjSjmbcx> implements IOtaBaSjSjmbcxService {
|
public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, OtaBaSjSjmbcx> implements IOtaBaSjSjmbcxService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IOtaBaSjListService otaBaSjListService;
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -24,11 +35,24 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(OtaBaSjSjmbcx otaBaSjSjmbcx) {
|
public OtaBaSjSjmbcx add(OtaBaSjSjmbcx otaBaSjSjmbcx) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaSjSjmbcx.setCreateTime(now);
|
OtaBaSjList otaBaSjList = new OtaBaSjList();
|
||||||
|
if (StringUtils.isEmpty(otaBaSjSjmbcx.getOtaId())) {
|
||||||
|
//在保存的时候设置一个id 并返回前端 下次保存的时候判断是否为更新
|
||||||
|
otaBaSjList.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||||
|
otaBaSjList.updateData(otaBaSjSjmbcx);
|
||||||
|
otaBaSjListService.add(otaBaSjList);
|
||||||
|
otaBaSjSjmbcx.setOtaId(otaBaSjList.getId());
|
||||||
|
otaBaSjSjmbcx.setCreateTime(now);
|
||||||
|
} else {
|
||||||
|
otaBaSjList = otaBaSjListService.queryById(otaBaSjSjmbcx.getOtaId());
|
||||||
|
otaBaSjList.updateData(otaBaSjSjmbcx);
|
||||||
|
otaBaSjListService.editById(otaBaSjList);
|
||||||
|
}
|
||||||
otaBaSjSjmbcx.setUpdateTime(now);
|
otaBaSjSjmbcx.setUpdateTime(now);
|
||||||
save(otaBaSjSjmbcx);
|
saveOrUpdate(otaBaSjSjmbcx);
|
||||||
|
return otaBaSjSjmbcx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,4 +110,20 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
|
|||||||
public List<OtaBaSjSjmbcx> queryList() {
|
public List<OtaBaSjSjmbcx> queryList() {
|
||||||
return list();
|
return list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OtaBaSjSjmbcx queryByOtaId(String otaId, String otaIdT) {
|
||||||
|
//判断是否保存过,否则查询模版数据回显
|
||||||
|
OtaBaSjSjmbcx res = getByOtaId(otaId);
|
||||||
|
if (ObjectUtils.isEmpty(res)) {
|
||||||
|
res = getByOtaId(otaIdT);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
private OtaBaSjSjmbcx getByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaSjSjmbcx> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaSjSjmbcx::getOtaId, otaId);
|
||||||
|
return this.getOne(queryWrapper, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user