Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+143
-137
@@ -4,6 +4,7 @@ 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.OtaBaCxLsjl;
|
||||
@@ -13,6 +14,8 @@ 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.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -22,163 +25,166 @@ import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 车型备案-历史记录
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-17
|
||||
* @Date: 2023-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="车型备案-历史记录")
|
||||
@Api(tags = "车型备案-历史记录")
|
||||
@RestController
|
||||
@RequestMapping("/ota/otaBaCxLsjl")
|
||||
@Slf4j
|
||||
public class OtaBaCxLsjlController extends JeroController<OtaBaCxLsjl, IOtaBaCxLsjlService> {
|
||||
@Autowired
|
||||
private IOtaBaCxLsjlService otaBaCxLsjlService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param otaBaCxLsjl
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-历史记录-分页列表查询")
|
||||
@ApiOperation(value="车型备案-历史记录-分页列表查询", notes="车型备案-历史记录-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(OtaBaCxLsjl otaBaCxLsjl,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<OtaBaCxLsjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxLsjl, req.getParameterMap());
|
||||
Page<OtaBaCxLsjl> page = new Page<OtaBaCxLsjl>(pageNo, pageSize);
|
||||
IPage<OtaBaCxLsjl> pageList = otaBaCxLsjlService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
@Autowired
|
||||
private IOtaBaCxLsjlService otaBaCxLsjlService;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-历史记录-列表查询")
|
||||
@ApiOperation(value="车型备案-历史记录-列表查询", notes="车型备案-历史记录-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OtaBaCxLsjl>> queryList() {
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param otaBaCxLsjl
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-历史记录-分页列表查询")
|
||||
@ApiOperation(value = "车型备案-历史记录-分页列表查询", notes = "车型备案-历史记录-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(OtaBaCxLsjl otaBaCxLsjl,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<OtaBaCxLsjl> pageList = new Page<>();
|
||||
if (ObjectUtils.isNotEmpty(otaBaCxLsjl) && StringUtils.isNotEmpty(otaBaCxLsjl.getOtaId())) {
|
||||
QueryWrapper<OtaBaCxLsjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxLsjl, req.getParameterMap());
|
||||
Page<OtaBaCxLsjl> page = new Page<OtaBaCxLsjl>(pageNo, pageSize);
|
||||
pageList = otaBaCxLsjlService.page(page, queryWrapper);
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-历史记录-列表查询")
|
||||
@ApiOperation(value = "车型备案-历史记录-列表查询", notes = "车型备案-历史记录-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OtaBaCxLsjl>> queryList() {
|
||||
List<OtaBaCxLsjl> list = otaBaCxLsjlService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param otaBaCxLsjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-历史记录-添加")
|
||||
@ApiOperation(value="车型备案-历史记录-添加", notes="车型备案-历史记录-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OtaBaCxLsjl otaBaCxLsjl) {
|
||||
otaBaCxLsjlService.add(otaBaCxLsjl);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param otaBaCxLsjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-历史记录-编辑")
|
||||
@ApiOperation(value="车型备案-历史记录-编辑", notes="车型备案-历史记录-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody OtaBaCxLsjl otaBaCxLsjl) {
|
||||
otaBaCxLsjlService.editById(otaBaCxLsjl);
|
||||
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) {
|
||||
otaBaCxLsjlService.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.otaBaCxLsjlService.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) {
|
||||
OtaBaCxLsjl otaBaCxLsjl = otaBaCxLsjlService.queryById(id);
|
||||
if(otaBaCxLsjl==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(otaBaCxLsjl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过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<OtaBaCxLsjl> otaBaCxLsjlList = otaBaCxLsjlService.queryByOtaId(otaId);
|
||||
if(otaBaCxLsjlList==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(otaBaCxLsjlList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param otaBaCxLsjl
|
||||
*/
|
||||
* 添加
|
||||
*
|
||||
* @param otaBaCxLsjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-历史记录-添加")
|
||||
@ApiOperation(value = "车型备案-历史记录-添加", notes = "车型备案-历史记录-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OtaBaCxLsjl otaBaCxLsjl) {
|
||||
otaBaCxLsjlService.add(otaBaCxLsjl);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param otaBaCxLsjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-历史记录-编辑")
|
||||
@ApiOperation(value = "车型备案-历史记录-编辑", notes = "车型备案-历史记录-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody OtaBaCxLsjl otaBaCxLsjl) {
|
||||
otaBaCxLsjlService.editById(otaBaCxLsjl);
|
||||
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) {
|
||||
otaBaCxLsjlService.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.otaBaCxLsjlService.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) {
|
||||
OtaBaCxLsjl otaBaCxLsjl = otaBaCxLsjlService.queryById(id);
|
||||
if (otaBaCxLsjl == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(otaBaCxLsjl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过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<OtaBaCxLsjl> otaBaCxLsjlList = otaBaCxLsjlService.queryByOtaId(otaId);
|
||||
if (otaBaCxLsjlList == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(otaBaCxLsjlList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param otaBaCxLsjl
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxLsjl otaBaCxLsjl) {
|
||||
return super.exportXls(request, otaBaCxLsjl, OtaBaCxLsjl.class, "车型备案-历史记录");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, OtaBaCxLsjl.class);
|
||||
|
||||
+126
-120
@@ -4,6 +4,7 @@ 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.OtaBaSjLsjl;
|
||||
@@ -13,6 +14,8 @@ 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.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -22,146 +25,149 @@ import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 升级备案-历史记录
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-17
|
||||
* @Date: 2023-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="升级备案-历史记录")
|
||||
@Api(tags = "升级备案-历史记录")
|
||||
@RestController
|
||||
@RequestMapping("/ota/otaBaSjLsjl")
|
||||
@Slf4j
|
||||
public class OtaBaSjLsjlController extends JeroController<OtaBaSjLsjl, IOtaBaSjLsjlService> {
|
||||
@Autowired
|
||||
private IOtaBaSjLsjlService otaBaSjLsjlService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param otaBaSjLsjl
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "升级备案-历史记录-分页列表查询")
|
||||
@ApiOperation(value="升级备案-历史记录-分页列表查询", notes="升级备案-历史记录-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(OtaBaSjLsjl otaBaSjLsjl,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<OtaBaSjLsjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjLsjl, req.getParameterMap());
|
||||
Page<OtaBaSjLsjl> page = new Page<OtaBaSjLsjl>(pageNo, pageSize);
|
||||
IPage<OtaBaSjLsjl> pageList = otaBaSjLsjlService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
@Autowired
|
||||
private IOtaBaSjLsjlService otaBaSjLsjlService;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "升级备案-历史记录-列表查询")
|
||||
@ApiOperation(value="升级备案-历史记录-列表查询", notes="升级备案-历史记录-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OtaBaSjLsjl>> queryList() {
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param otaBaSjLsjl
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "升级备案-历史记录-分页列表查询")
|
||||
@ApiOperation(value = "升级备案-历史记录-分页列表查询", notes = "升级备案-历史记录-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(OtaBaSjLsjl otaBaSjLsjl,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<OtaBaSjLsjl> pageList = new Page<>();
|
||||
if (ObjectUtils.isNotEmpty(otaBaSjLsjl) && StringUtils.isNotEmpty(otaBaSjLsjl.getOtaId())) {
|
||||
QueryWrapper<OtaBaSjLsjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjLsjl, req.getParameterMap());
|
||||
Page<OtaBaSjLsjl> page = new Page<OtaBaSjLsjl>(pageNo, pageSize);
|
||||
pageList = otaBaSjLsjlService.page(page, queryWrapper);
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "升级备案-历史记录-列表查询")
|
||||
@ApiOperation(value = "升级备案-历史记录-列表查询", notes = "升级备案-历史记录-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OtaBaSjLsjl>> queryList() {
|
||||
List<OtaBaSjLsjl> list = otaBaSjLsjlService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param otaBaSjLsjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "升级备案-历史记录-添加")
|
||||
@ApiOperation(value="升级备案-历史记录-添加", notes="升级备案-历史记录-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OtaBaSjLsjl otaBaSjLsjl) {
|
||||
otaBaSjLsjlService.add(otaBaSjLsjl);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param otaBaSjLsjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "升级备案-历史记录-编辑")
|
||||
@ApiOperation(value="升级备案-历史记录-编辑", notes="升级备案-历史记录-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody OtaBaSjLsjl otaBaSjLsjl) {
|
||||
otaBaSjLsjlService.editById(otaBaSjLsjl);
|
||||
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) {
|
||||
otaBaSjLsjlService.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.otaBaSjLsjlService.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) {
|
||||
OtaBaSjLsjl otaBaSjLsjl = otaBaSjLsjlService.queryById(id);
|
||||
if(otaBaSjLsjl==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(otaBaSjLsjl);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param otaBaSjLsjl
|
||||
*/
|
||||
* 添加
|
||||
*
|
||||
* @param otaBaSjLsjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "升级备案-历史记录-添加")
|
||||
@ApiOperation(value = "升级备案-历史记录-添加", notes = "升级备案-历史记录-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OtaBaSjLsjl otaBaSjLsjl) {
|
||||
otaBaSjLsjlService.add(otaBaSjLsjl);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param otaBaSjLsjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "升级备案-历史记录-编辑")
|
||||
@ApiOperation(value = "升级备案-历史记录-编辑", notes = "升级备案-历史记录-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody OtaBaSjLsjl otaBaSjLsjl) {
|
||||
otaBaSjLsjlService.editById(otaBaSjLsjl);
|
||||
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) {
|
||||
otaBaSjLsjlService.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.otaBaSjLsjlService.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) {
|
||||
OtaBaSjLsjl otaBaSjLsjl = otaBaSjLsjlService.queryById(id);
|
||||
if (otaBaSjLsjl == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(otaBaSjLsjl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param otaBaSjLsjl
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjLsjl otaBaSjLsjl) {
|
||||
return super.exportXls(request, otaBaSjLsjl, OtaBaSjLsjl.class, "升级备案-历史记录");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, OtaBaSjLsjl.class);
|
||||
|
||||
+4
-5
@@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjxtbh;
|
||||
@@ -73,15 +75,12 @@ public class OtaBaSjSjxtbhController extends JeroController<OtaBaSjSjxtbh, IOtaB
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param otaBaSjSjxtbh
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "升级备案-本次升级的系统名称与参数变化-添加")
|
||||
@ApiOperation(value="升级备案-本次升级的系统名称与参数变化-添加", notes="升级备案-本次升级的系统名称与参数变化-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OtaBaSjSjxtbh otaBaSjSjxtbh) {
|
||||
otaBaSjSjxtbhService.add(otaBaSjSjxtbh);
|
||||
public Result<?> add(@RequestBody JSONObject json) {
|
||||
otaBaSjSjxtbhService.add(json);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
+13
@@ -6,6 +6,7 @@ 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.OtaBaSjSjmbcx;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjyxpg;
|
||||
import com.jero.modules.ota.service.IOtaBaSjSjyxpgService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -144,6 +145,18 @@ public class OtaBaSjSjyxpgController extends JeroController<OtaBaSjSjyxpg, IOtaB
|
||||
return Result.OK(otaBaSjSjyxpg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过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) {
|
||||
OtaBaSjSjyxpg otaBaSjSjyxpg = otaBaSjSjyxpgService.queryByOtaId(otaId, otaIdT);
|
||||
return Result.OK(otaBaSjSjyxpg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
|
||||
+1
@@ -114,6 +114,7 @@ public class OtaBaSjGgnrfs implements Serializable {
|
||||
/**告知用户方式(可多选)*/
|
||||
@Excel(name = "告知用户方式(可多选)", width = 15)
|
||||
@ApiModelProperty(value = "告知用户方式(可多选)")
|
||||
@Dict(dicCode = "user_notification_mode")
|
||||
private java.lang.String gzyhfs;
|
||||
|
||||
/**用户告知相关文件*/
|
||||
|
||||
@@ -69,6 +69,7 @@ public class OtaBaSjLsjl implements Serializable {
|
||||
/**数据状态*/
|
||||
@Excel(name = "数据状态", width = 15)
|
||||
@ApiModelProperty(value = "数据状态")
|
||||
@Dict(dicCode = "recordstatus")
|
||||
private java.lang.String sjzt;
|
||||
|
||||
}
|
||||
|
||||
+12
-8
@@ -69,56 +69,60 @@ public class OtaBaSjSjyxpg implements Serializable {
|
||||
/**升级目的*/
|
||||
@Excel(name = "升级目的", width = 15)
|
||||
@ApiModelProperty(value = "升级目的")
|
||||
@Dict(dicCode = "uipgrade_purpose")
|
||||
private java.lang.String sjmd;
|
||||
|
||||
/**是否变更对应车型的《公告》技术参数*/
|
||||
@Excel(name = "是否变更对应车型的《公告》技术参数", width = 15)
|
||||
@ApiModelProperty(value = "是否变更对应车型的《公告》技术参数")
|
||||
private java.lang.String sfbgcs;
|
||||
private java.lang.Integer sfbgcs;
|
||||
|
||||
/**是否涉及性能变化*/
|
||||
@Excel(name = "是否涉及性能变化", width = 15)
|
||||
@ApiModelProperty(value = "是否涉及性能变化")
|
||||
private java.lang.String sjxnbh;
|
||||
private java.lang.Integer sjxnbh;
|
||||
|
||||
/**是否符合国家法律、行政法规、规章规定,以及道路机动车辆公告管理相关国家技术标准及安全技术条件等*/
|
||||
@Excel(name = "是否符合国家法律、行政法规、规章规定,以及道路机动车辆公告管理相关国家技术标准及安全技术条件等", width = 15)
|
||||
@ApiModelProperty(value = "是否符合国家法律、行政法规、规章规定,以及道路机动车辆公告管理相关国家技术标准及安全技术条件等")
|
||||
private java.lang.String fhgd;
|
||||
private java.lang.Integer fhgd;
|
||||
|
||||
/**是否涉及汽车自动驾驶功能相关升级*/
|
||||
@Excel(name = "是否涉及汽车自动驾驶功能相关升级", width = 15)
|
||||
@ApiModelProperty(value = "是否涉及汽车自动驾驶功能相关升级")
|
||||
private java.lang.String zdjsxg;
|
||||
private java.lang.Integer zdjsxg;
|
||||
|
||||
/**兼容性评估相关*/
|
||||
@Excel(name = "兼容性评估相关", width = 15)
|
||||
@ApiModelProperty(value = "兼容性评估相关")
|
||||
private java.lang.String jrxxg;
|
||||
private java.lang.Integer jrxxg;
|
||||
|
||||
/**如何执行升级*/
|
||||
@Excel(name = "如何执行升级", width = 15)
|
||||
@ApiModelProperty(value = "如何执行升级")
|
||||
private java.lang.String zxsj;
|
||||
@Dict(dicCode = "conditions_upgrades")
|
||||
private java.lang.Integer zxsj;
|
||||
|
||||
/**升级失败或中断后,车辆采取的安全机制*/
|
||||
@Excel(name = "升级失败或中断后,车辆采取的安全机制", width = 15)
|
||||
@ApiModelProperty(value = "升级失败或中断后,车辆采取的安全机制")
|
||||
@Dict(dicCode = "upgrade_failed")
|
||||
private java.lang.String aqjz;
|
||||
|
||||
/**升级活动是否影响车辆安全*/
|
||||
@Excel(name = "升级活动是否影响车辆安全", width = 15)
|
||||
@ApiModelProperty(value = "升级活动是否影响车辆安全")
|
||||
private java.lang.String sfyxaq;
|
||||
private java.lang.Integer sfyxaq;
|
||||
|
||||
/**升级活动是否提供用户确认选项*/
|
||||
@Excel(name = "升级活动是否提供用户确认选项", width = 15)
|
||||
@ApiModelProperty(value = "升级活动是否提供用户确认选项")
|
||||
private java.lang.String yhqr;
|
||||
private java.lang.Integer yhqr;
|
||||
|
||||
/**升级包测试*/
|
||||
@Excel(name = "升级包测试", width = 15)
|
||||
@ApiModelProperty(value = "升级包测试")
|
||||
@Dict(dicCode = "package_test")
|
||||
private java.lang.String sjbcs;
|
||||
|
||||
/**是杏已验证确认在线升级活动的安全性和可靠性*/
|
||||
|
||||
+15
-7
@@ -2,13 +2,21 @@ package com.jero.modules.ota.enums;
|
||||
|
||||
public enum OtaModuleEnum {
|
||||
|
||||
CX_CXJBXX("车型基本信息", "1","1"),
|
||||
CX_ZXSJYQ("在线升级要求", "1","1"),
|
||||
CX_AQCS("安全措施", "1","1"),
|
||||
CX_KSJDXTMCYCS("可升级的系统名称与参数", "1","1"),
|
||||
CX_KZXSJDJSFZGNMCYCS("可在线升级的驾驶辅助功能名称与参数", "1","1"),
|
||||
CX_JSFZXTJCBACS("驾驶辅助系统基础备案参数", "1","1"),
|
||||
CX_QT("其他", "1","1");
|
||||
CX_CXJBXX("车型备案-车型基本信息", "1","1"),
|
||||
CX_ZXSJYQ("车型备案-车型在线升级要求", "1","1"),
|
||||
CX_AQCS("车型备案-车型安全措施", "1","1"),
|
||||
CX_KSJDXTMCYCS("车型备案-车型可升级的系统名称与参数", "1","1"),
|
||||
CX_KZXSJDJSFZGNMCYCS("车型备案-车型可在线升级的驾驶辅助功能名称与参数", "1","1"),
|
||||
CX_JSFZXTJCBACS("车型备案-车型驾驶辅助系统基础备案参数", "1","1"),
|
||||
CX_QT("车型备案-车型其他", "1","1"),
|
||||
|
||||
SJ_SJBMCX("升级备案-升级目标车型", "1","1"),
|
||||
SJ_BCSJDMBCL("升级备案-本次升级的目标车辆", "1","1"),
|
||||
SJ_SJYXPG("升级影响评估", "1","1"),
|
||||
SJ_XTMCHCS("本次升级的系统名称与参数变化", "1","1"),
|
||||
SJ_JSFZMCHCS("本次升级的驾驶辅助功能名称与参数变化", "1","1"),
|
||||
SJ_YHGZNRJFS("用户告知内容及方式", "1","1"),
|
||||
SJ_QT("其他升级任务信息", "1","1");
|
||||
|
||||
String name;
|
||||
String nameEN;
|
||||
|
||||
+5
-5
@@ -156,17 +156,17 @@ public enum OtaTitleEnum {
|
||||
SCRQKS("scrqks", "生产日期开始", "0"),
|
||||
SCRQJS("scrqjs", "生产日期结束", "0"),
|
||||
VIN_LIST("vinList", "VIN码清单", "0"),
|
||||
SJMD("sjmd", "升级目的", "0"),
|
||||
SJMD("sjmd", "升级目的", "uipgrade_purpose"),
|
||||
SFBGCS("sfbgcs", "是否变更对应车型的《公告》技术参数", "0"),
|
||||
JSXNBH("jsxnbh", "是否涉及性能变化", "0"),
|
||||
FHGD("fhgd", "是否符合国家法律、行政法规、规章规定,以及道路机动车辆公告管理相关国家技术标准及安全技术条件等", "0"),
|
||||
ZDJSXG("zdjsxg", "是否涉及汽车自动驾驶功能相关升级", "0"),
|
||||
JRXXG("jrxxg", "兼容性评估相关", "0"),
|
||||
ZXSJ("zxsj", "如何执行升级", "0"),
|
||||
AQJZ("aqjz", "升级失败或中断后,车辆采取的安全机制", "0"),
|
||||
ZXSJ("zxsj", "如何执行升级", "conditions_upgrades"),
|
||||
AQJZ("aqjz", "升级失败或中断后,车辆采取的安全机制", "upgrade_failed"),
|
||||
SFYXAQ("sfyxaq", "升级活动是否影响车辆安全", "0"),
|
||||
YHQR("yhqr", "升级活动是否提供用户确认选项", "0"),
|
||||
SJBCS("sjbcs", "升级包测试", "0"),
|
||||
SJBCS("sjbcs", "升级包测试", "package_test"),
|
||||
AQKKX("aqkkx", "是杏已验证确认在线升级活动的安全性和可靠性", "0"),
|
||||
BGFJ("bgfj", "提供变更或扩展后的《公告》批次及证明材料", "0"),
|
||||
CLFJ("clfj", "提供证明材料", "0"),
|
||||
@@ -195,7 +195,7 @@ public enum OtaTitleEnum {
|
||||
SJSFCG("sjsfcg", "告知用户升级成功或失败", "0"),
|
||||
GZBG("gzbg", "告知实施的变更", "0"),
|
||||
GZSCNR("gzscnr", "告知了对用户手册的全部更新内容", "0"),
|
||||
GZYHFS("gzyhfs", "告知用户方式(可多选)", "0"),
|
||||
GZYHFS("gzyhfs", "告知用户方式(可多选)", "user_notification_mode"),
|
||||
XGWJ("xgwj", "用户告知相关文件", "0"),
|
||||
RWMC("rwmc", "任务名称", "0"),
|
||||
SJFBSJ("sjfbsj", "升级发布时间", "0"),
|
||||
|
||||
+2
-3
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.ota.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjxtbh;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
@@ -15,10 +16,8 @@ public interface IOtaBaSjSjxtbhService extends IService<OtaBaSjSjxtbh> {
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaSjSjxtbh
|
||||
* @return
|
||||
*/
|
||||
void add(OtaBaSjSjxtbh otaBaSjSjxtbh);
|
||||
void add(JSONObject json);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
|
||||
+2
@@ -58,4 +58,6 @@ public interface IOtaBaSjSjyxpgService extends IService<OtaBaSjSjyxpg> {
|
||||
* @return
|
||||
*/
|
||||
List<OtaBaSjSjyxpg> queryList();
|
||||
|
||||
OtaBaSjSjyxpg queryByOtaId(String otaId, String otaIdT);
|
||||
}
|
||||
|
||||
+1
-1
@@ -78,9 +78,9 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
otaBaCxJsfzbacs.setOtaId(otaId);
|
||||
otaBaCxJsfzbacs.setCreateTime(now);
|
||||
otaBaCxJsfzbacs.setUpdateTime(now);
|
||||
saveOrUpdate(otaBaCxJsfzbacs);
|
||||
newList.add(otaBaCxJsfzbacs);
|
||||
}
|
||||
saveOrUpdateBatch(newList);
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KZXSJDJSFZGNMCYCS, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService);
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
|
||||
+21
-8
@@ -1,9 +1,15 @@
|
||||
package com.jero.modules.ota.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.modules.ota.entity.OtaBaCxKsjjsmccs;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjxtbh;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjSjxtbhMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaSjSjxtbhService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -19,16 +25,23 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaSjSjxtbh
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OtaBaSjSjxtbh otaBaSjSjxtbh) {
|
||||
Date now = new Date();
|
||||
otaBaSjSjxtbh.setCreateTime(now);
|
||||
otaBaSjSjxtbh.setUpdateTime(now);
|
||||
save(otaBaSjSjxtbh);
|
||||
public void add(JSONObject json) {
|
||||
Date now = new Date();
|
||||
String otaId = (String) json.get("otaId");
|
||||
List<OtaBaSjSjxtbh> newList = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(otaId)) {
|
||||
JSONArray list = json.getJSONArray("list");
|
||||
for (Object obj : list) {
|
||||
OtaBaSjSjxtbh bh = JSONObject.parseObject(obj.toString(),OtaBaSjSjxtbh.class);
|
||||
bh.setOtaId(otaId);
|
||||
bh.setCreateTime(now);
|
||||
bh.setUpdateTime(now);
|
||||
newList.add(bh);
|
||||
}
|
||||
}
|
||||
saveOrUpdateBatch(newList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+65
-44
@@ -1,88 +1,109 @@
|
||||
package com.jero.modules.ota.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjyxpg;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjSjyxpgMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaSjSjyxpgService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
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-17
|
||||
* @Date: 2023-03-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, OtaBaSjSjyxpg> implements IOtaBaSjSjyxpgService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaSjSjyxpg
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaSjSjyxpg
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OtaBaSjSjyxpg otaBaSjSjyxpg) {
|
||||
Date now = new Date();
|
||||
otaBaSjSjyxpg.setCreateTime(now);
|
||||
otaBaSjSjyxpg.setUpdateTime(now);
|
||||
save(otaBaSjSjyxpg);
|
||||
saveOrUpdate(otaBaSjSjyxpg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otaBaSjSjyxpg
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otaBaSjSjyxpg
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(OtaBaSjSjyxpg otaBaSjSjyxpg) {
|
||||
Date now = new Date();
|
||||
Date now = new Date();
|
||||
otaBaSjSjyxpg.setUpdateTime(now);
|
||||
saveOrUpdate(otaBaSjSjyxpg);
|
||||
saveOrUpdate(otaBaSjSjyxpg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OtaBaSjSjyxpg queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtaBaSjSjyxpg queryByOtaId(String otaId, String otaIdT) {
|
||||
//判断是否保存过,否则查询模版数据回显
|
||||
OtaBaSjSjyxpg res = getByOtaId(otaId);
|
||||
if (ObjectUtils.isEmpty(res)) {
|
||||
res = getByOtaId(otaIdT);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private OtaBaSjSjyxpg getByOtaId(String otaId) {
|
||||
LambdaQueryWrapper<OtaBaSjSjyxpg> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OtaBaSjSjyxpg::getOtaId, otaId);
|
||||
return this.getOne(queryWrapper, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OtaBaSjSjyxpg> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user