开发OTA备案工具
This commit is contained in:
-1
@@ -5703,7 +5703,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
}else{
|
}else{
|
||||||
throw new JeroBootException("Please upload a zip file or rar file");
|
throw new JeroBootException("Please upload a zip file or rar file");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
String path = uploadpath + File.separator + "modal" + File.separator + filenameorg + System.currentTimeMillis();
|
String path = uploadpath + File.separator + "modal" + File.separator + filenameorg + System.currentTimeMillis();
|
||||||
File saveDirectory = new File(path);
|
File saveDirectory = new File(path);
|
||||||
|
|||||||
+139
-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.OtaBaCxAqcs;
|
import com.jero.modules.ota.entity.OtaBaCxAqcs;
|
||||||
@@ -22,163 +23,164 @@ 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/otaBaCxAqcs")
|
@RequestMapping("/ota/otaBaCxAqcs")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaCxAqcsController extends JeroController<OtaBaCxAqcs, IOtaBaCxAqcsService> {
|
public class OtaBaCxAqcsController extends JeroController<OtaBaCxAqcs, IOtaBaCxAqcsService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaCxAqcsService otaBaCxAqcsService;
|
private IOtaBaCxAqcsService otaBaCxAqcsService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaCxAqcs
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-安全措施-分页列表查询")
|
|
||||||
@ApiOperation(value="车型备案-安全措施-分页列表查询", notes="车型备案-安全措施-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaCxAqcs otaBaCxAqcs,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaCxAqcs> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxAqcs, req.getParameterMap());
|
|
||||||
Page<OtaBaCxAqcs> page = new Page<OtaBaCxAqcs>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaCxAqcs> pageList = otaBaCxAqcsService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaCxAqcs
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "车型备案-安全措施-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="车型备案-安全措施-列表查询", notes="车型备案-安全措施-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaCxAqcs>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "车型备案-安全措施-分页列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-安全措施-分页列表查询", notes = "车型备案-安全措施-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaCxAqcs otaBaCxAqcs,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaCxAqcs> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxAqcs, req.getParameterMap());
|
||||||
|
Page<OtaBaCxAqcs> page = new Page<OtaBaCxAqcs>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaCxAqcs> pageList = otaBaCxAqcsService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-安全措施-列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-安全措施-列表查询", notes = "车型备案-安全措施-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaCxAqcs>> queryList() {
|
||||||
List<OtaBaCxAqcs> list = otaBaCxAqcsService.queryList();
|
List<OtaBaCxAqcs> list = otaBaCxAqcsService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaCxAqcs
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-安全措施-添加")
|
|
||||||
@ApiOperation(value="车型备案-安全措施-添加", notes="车型备案-安全措施-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaCxAqcs otaBaCxAqcs) {
|
|
||||||
otaBaCxAqcsService.add(otaBaCxAqcs);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaCxAqcs
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-安全措施-编辑")
|
|
||||||
@ApiOperation(value="车型备案-安全措施-编辑", notes="车型备案-安全措施-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaCxAqcs otaBaCxAqcs) {
|
|
||||||
otaBaCxAqcsService.editById(otaBaCxAqcs);
|
|
||||||
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) {
|
|
||||||
otaBaCxAqcsService.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.otaBaCxAqcsService.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) {
|
|
||||||
OtaBaCxAqcs otaBaCxAqcs = otaBaCxAqcsService.queryById(id);
|
|
||||||
if(otaBaCxAqcs==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxAqcs);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过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) {
|
|
||||||
OtaBaCxAqcs otaBaCxAqcs = otaBaCxAqcsService.queryByOtaId(otaId);
|
|
||||||
if(otaBaCxAqcs==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxAqcs);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @param otaBaCxAqcs
|
||||||
* @param otaBaCxAqcs
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@AutoLog(value = "车型备案-安全措施-添加")
|
||||||
|
@ApiOperation(value = "车型备案-安全措施-添加", notes = "车型备案-安全措施-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody OtaBaCxAqcs otaBaCxAqcs) {
|
||||||
|
otaBaCxAqcsService.add(otaBaCxAqcs);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaCxAqcs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-安全措施-编辑")
|
||||||
|
@ApiOperation(value = "车型备案-安全措施-编辑", notes = "车型备案-安全措施-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaCxAqcs otaBaCxAqcs) {
|
||||||
|
otaBaCxAqcsService.editById(otaBaCxAqcs);
|
||||||
|
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) {
|
||||||
|
otaBaCxAqcsService.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.otaBaCxAqcsService.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) {
|
||||||
|
OtaBaCxAqcs otaBaCxAqcs = otaBaCxAqcsService.queryById(id);
|
||||||
|
if (otaBaCxAqcs == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxAqcs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过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,
|
||||||
|
@RequestParam(name = "otaIdT", required = true) String otaIdT) {
|
||||||
|
OtaBaCxAqcs otaBaCxAqcs = otaBaCxAqcsService.queryByOtaId(otaId, otaIdT);
|
||||||
|
if (otaBaCxAqcs == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxAqcs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaCxAqcs
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxAqcs otaBaCxAqcs) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxAqcs otaBaCxAqcs) {
|
||||||
return super.exportXls(request, otaBaCxAqcs, OtaBaCxAqcs.class, "车型备案-安全措施");
|
return super.exportXls(request, otaBaCxAqcs, OtaBaCxAqcs.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, OtaBaCxAqcs.class);
|
return super.importExcel(request, response, OtaBaCxAqcs.class);
|
||||||
|
|||||||
+135
-135
@@ -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.OtaBaCxJbxx;
|
import com.jero.modules.ota.entity.OtaBaCxJbxx;
|
||||||
@@ -11,6 +12,7 @@ import com.jero.modules.ota.service.IOtaBaCxJbxxService;
|
|||||||
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 com.jero.modules.system.util.StringUtils;
|
||||||
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.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -22,161 +24,159 @@ 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/otaBaCxJbxx")
|
@RequestMapping("/ota/otaBaCxJbxx")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaCxJbxxController extends JeroController<OtaBaCxJbxx, IOtaBaCxJbxxService> {
|
public class OtaBaCxJbxxController extends JeroController<OtaBaCxJbxx, IOtaBaCxJbxxService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaCxJbxxService otaBaCxJbxxService;
|
private IOtaBaCxJbxxService otaBaCxJbxxService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaCxJbxx
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-车型基本信息-分页列表查询")
|
|
||||||
@ApiOperation(value="车型备案-车型基本信息-分页列表查询", notes="车型备案-车型基本信息-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaCxJbxx otaBaCxJbxx,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaCxJbxx> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxJbxx, req.getParameterMap());
|
|
||||||
Page<OtaBaCxJbxx> page = new Page<OtaBaCxJbxx>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaCxJbxx> pageList = otaBaCxJbxxService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaCxJbxx
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "车型备案-车型基本信息-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="车型备案-车型基本信息-列表查询", notes="车型备案-车型基本信息-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaCxJbxx>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "车型备案-车型基本信息-分页列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-车型基本信息-分页列表查询", notes = "车型备案-车型基本信息-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaCxJbxx otaBaCxJbxx,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaCxJbxx> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxJbxx, req.getParameterMap());
|
||||||
|
Page<OtaBaCxJbxx> page = new Page<OtaBaCxJbxx>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaCxJbxx> pageList = otaBaCxJbxxService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-车型基本信息-列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-车型基本信息-列表查询", notes = "车型备案-车型基本信息-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaCxJbxx>> queryList() {
|
||||||
List<OtaBaCxJbxx> list = otaBaCxJbxxService.queryList();
|
List<OtaBaCxJbxx> list = otaBaCxJbxxService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaCxJbxx
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-车型基本信息-添加")
|
|
||||||
@ApiOperation(value="车型备案-车型基本信息-添加", notes="车型备案-车型基本信息-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaCxJbxx otaBaCxJbxx) {
|
|
||||||
OtaBaCxJbxx res = otaBaCxJbxxService.add(otaBaCxJbxx);
|
|
||||||
return Result.OK(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaCxJbxx
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-车型基本信息-编辑")
|
|
||||||
@ApiOperation(value="车型备案-车型基本信息-编辑", notes="车型备案-车型基本信息-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaCxJbxx otaBaCxJbxx) {
|
|
||||||
otaBaCxJbxxService.editById(otaBaCxJbxx);
|
|
||||||
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) {
|
|
||||||
otaBaCxJbxxService.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.otaBaCxJbxxService.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) {
|
|
||||||
OtaBaCxJbxx otaBaCxJbxx = otaBaCxJbxxService.queryById(id);
|
|
||||||
if(otaBaCxJbxx==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxJbxx);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过OtaId查询
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-车型基本信息-通过otaId查询")
|
|
||||||
@ApiOperation(value="车型备案-车型基本信息-通过otaId查询", notes="车型备案-车型基本信息-通过otaId查询")
|
|
||||||
@GetMapping(value = "/queryByOtaId")
|
|
||||||
public Result<?> queryByOtaId(@RequestParam(name="otaId",required=true) String otaId) {
|
|
||||||
OtaBaCxJbxx otaBaCxJbxx = otaBaCxJbxxService.queryByOtaId(otaId);
|
|
||||||
if(otaBaCxJbxx==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxJbxx);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @param otaBaCxJbxx
|
||||||
* @param otaBaCxJbxx
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@AutoLog(value = "车型备案-车型基本信息-添加")
|
||||||
|
@ApiOperation(value = "车型备案-车型基本信息-添加", notes = "车型备案-车型基本信息-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody OtaBaCxJbxx otaBaCxJbxx) {
|
||||||
|
OtaBaCxJbxx res = otaBaCxJbxxService.add(otaBaCxJbxx);
|
||||||
|
return Result.OK(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaCxJbxx
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-车型基本信息-编辑")
|
||||||
|
@ApiOperation(value = "车型备案-车型基本信息-编辑", notes = "车型备案-车型基本信息-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaCxJbxx otaBaCxJbxx) {
|
||||||
|
otaBaCxJbxxService.editById(otaBaCxJbxx);
|
||||||
|
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) {
|
||||||
|
otaBaCxJbxxService.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.otaBaCxJbxxService.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) {
|
||||||
|
OtaBaCxJbxx otaBaCxJbxx = otaBaCxJbxxService.queryById(id);
|
||||||
|
if (otaBaCxJbxx == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxJbxx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过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) {
|
||||||
|
OtaBaCxJbxx otaBaCxJbxx = otaBaCxJbxxService.queryByOtaId(otaId, otaIdT);
|
||||||
|
otaBaCxJbxx = otaBaCxJbxxService.queryByOtaId(otaId, otaIdT);
|
||||||
|
return Result.OK(otaBaCxJbxx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaCxJbxx
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxJbxx otaBaCxJbxx) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxJbxx otaBaCxJbxx) {
|
||||||
return super.exportXls(request, otaBaCxJbxx, OtaBaCxJbxx.class, "车型备案-车型基本信息");
|
return super.exportXls(request, otaBaCxJbxx, OtaBaCxJbxx.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, OtaBaCxJbxx.class);
|
return super.importExcel(request, response, OtaBaCxJbxx.class);
|
||||||
|
|||||||
+135
-118
@@ -24,144 +24,161 @@ 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/otaBaCxJsfzbacs")
|
@RequestMapping("/ota/otaBaCxJsfzbacs")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaCxJsfzbacsController extends JeroController<OtaBaCxJsfzbacs, IOtaBaCxJsfzbacsService> {
|
public class OtaBaCxJsfzbacsController extends JeroController<OtaBaCxJsfzbacs, IOtaBaCxJsfzbacsService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaCxJsfzbacsService otaBaCxJsfzbacsService;
|
private IOtaBaCxJsfzbacsService otaBaCxJsfzbacsService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaCxJsfzbacs
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-驾驶辅助系统基础备案参数-分页列表查询")
|
|
||||||
@ApiOperation(value="车型备案-驾驶辅助系统基础备案参数-分页列表查询", notes="车型备案-驾驶辅助系统基础备案参数-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaCxJsfzbacs otaBaCxJsfzbacs,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaCxJsfzbacs> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxJsfzbacs, req.getParameterMap());
|
|
||||||
Page<OtaBaCxJsfzbacs> page = new Page<OtaBaCxJsfzbacs>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaCxJsfzbacs> pageList = otaBaCxJsfzbacsService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaCxJsfzbacs
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "车型备案-驾驶辅助系统基础备案参数-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="车型备案-驾驶辅助系统基础备案参数-列表查询", notes="车型备案-驾驶辅助系统基础备案参数-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaCxJsfzbacs>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "车型备案-驾驶辅助系统基础备案参数-分页列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-驾驶辅助系统基础备案参数-分页列表查询", notes = "车型备案-驾驶辅助系统基础备案参数-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaCxJsfzbacs otaBaCxJsfzbacs,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaCxJsfzbacs> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxJsfzbacs, req.getParameterMap());
|
||||||
|
Page<OtaBaCxJsfzbacs> page = new Page<OtaBaCxJsfzbacs>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaCxJsfzbacs> pageList = otaBaCxJsfzbacsService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-驾驶辅助系统基础备案参数-列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-驾驶辅助系统基础备案参数-列表查询", notes = "车型备案-驾驶辅助系统基础备案参数-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaCxJsfzbacs>> queryList() {
|
||||||
List<OtaBaCxJsfzbacs> list = otaBaCxJsfzbacsService.queryList();
|
List<OtaBaCxJsfzbacs> list = otaBaCxJsfzbacsService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-驾驶辅助系统基础备案参数-添加")
|
|
||||||
@ApiOperation(value="车型备案-驾驶辅助系统基础备案参数-添加", notes="车型备案-驾驶辅助系统基础备案参数-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@RequestBody JSONObject json) {
|
|
||||||
otaBaCxJsfzbacsService.add(json);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaCxJsfzbacs
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-驾驶辅助系统基础备案参数-编辑")
|
|
||||||
@ApiOperation(value="车型备案-驾驶辅助系统基础备案参数-编辑", notes="车型备案-驾驶辅助系统基础备案参数-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaCxJsfzbacs otaBaCxJsfzbacs) {
|
|
||||||
otaBaCxJsfzbacsService.editById(otaBaCxJsfzbacs);
|
|
||||||
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) {
|
|
||||||
otaBaCxJsfzbacsService.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.otaBaCxJsfzbacsService.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) {
|
|
||||||
OtaBaCxJsfzbacs otaBaCxJsfzbacs = otaBaCxJsfzbacsService.queryById(id);
|
|
||||||
if(otaBaCxJsfzbacs==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxJsfzbacs);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*/
|
||||||
* @param request
|
@AutoLog(value = "车型备案-驾驶辅助系统基础备案参数-添加")
|
||||||
* @param otaBaCxJsfzbacs
|
@ApiOperation(value = "车型备案-驾驶辅助系统基础备案参数-添加", notes = "车型备案-驾驶辅助系统基础备案参数-添加")
|
||||||
*/
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@RequestBody JSONObject json) {
|
||||||
|
otaBaCxJsfzbacsService.add(json);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaCxJsfzbacs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-驾驶辅助系统基础备案参数-编辑")
|
||||||
|
@ApiOperation(value = "车型备案-驾驶辅助系统基础备案参数-编辑", notes = "车型备案-驾驶辅助系统基础备案参数-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaCxJsfzbacs otaBaCxJsfzbacs) {
|
||||||
|
otaBaCxJsfzbacsService.editById(otaBaCxJsfzbacs);
|
||||||
|
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) {
|
||||||
|
otaBaCxJsfzbacsService.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.otaBaCxJsfzbacsService.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) {
|
||||||
|
OtaBaCxJsfzbacs otaBaCxJsfzbacs = otaBaCxJsfzbacsService.queryById(id);
|
||||||
|
if (otaBaCxJsfzbacs == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxJsfzbacs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过otaId查询
|
||||||
|
*
|
||||||
|
* @param otaId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-驾驶辅助系统基础备案参数-通过id查询")
|
||||||
|
@ApiOperation(value = "车型备案-驾驶辅助系统基础备案参数-通过id查询", notes = "车型备案-驾驶辅助系统基础备案参数-通过id查询")
|
||||||
|
@GetMapping(value = "/queryByOtaId")
|
||||||
|
public Result<?> queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId,
|
||||||
|
@RequestParam(name = "otaIdT", required = true) String otaIdT) {
|
||||||
|
JSONObject res = otaBaCxJsfzbacsService.queryByOtaId(otaId, otaIdT);
|
||||||
|
if (res == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaCxJsfzbacs
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxJsfzbacs otaBaCxJsfzbacs) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxJsfzbacs otaBaCxJsfzbacs) {
|
||||||
return super.exportXls(request, otaBaCxJsfzbacs, OtaBaCxJsfzbacs.class, "车型备案-驾驶辅助系统基础备案参数");
|
return super.exportXls(request, otaBaCxJsfzbacs, OtaBaCxJsfzbacs.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, OtaBaCxJsfzbacs.class);
|
return super.importExcel(request, response, OtaBaCxJsfzbacs.class);
|
||||||
|
|||||||
+139
-137
@@ -4,6 +4,8 @@ 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.alibaba.fastjson.JSONObject;
|
||||||
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.OtaBaCxKsjjsmccs;
|
import com.jero.modules.ota.entity.OtaBaCxKsjjsmccs;
|
||||||
@@ -22,163 +24,163 @@ 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/otaBaCxKsjjsmccs")
|
@RequestMapping("/ota/otaBaCxKsjjsmccs")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaCxKsjjsmccsController extends JeroController<OtaBaCxKsjjsmccs, IOtaBaCxKsjjsmccsService> {
|
public class OtaBaCxKsjjsmccsController extends JeroController<OtaBaCxKsjjsmccs, IOtaBaCxKsjjsmccsService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaCxKsjjsmccsService otaBaCxKsjjsmccsService;
|
private IOtaBaCxKsjjsmccsService otaBaCxKsjjsmccsService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaCxKsjjsmccs
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-分页列表查询")
|
|
||||||
@ApiOperation(value="车型备案-可在线升级的驾驶辅助功能名称与参数-分页列表查询", notes="车型备案-可在线升级的驾驶辅助功能名称与参数-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaCxKsjjsmccs otaBaCxKsjjsmccs,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaCxKsjjsmccs> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxKsjjsmccs, req.getParameterMap());
|
|
||||||
Page<OtaBaCxKsjjsmccs> page = new Page<OtaBaCxKsjjsmccs>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaCxKsjjsmccs> pageList = otaBaCxKsjjsmccsService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaCxKsjjsmccs
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="车型备案-可在线升级的驾驶辅助功能名称与参数-列表查询", notes="车型备案-可在线升级的驾驶辅助功能名称与参数-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaCxKsjjsmccs>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-分页列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-分页列表查询", notes = "车型备案-可在线升级的驾驶辅助功能名称与参数-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaCxKsjjsmccs otaBaCxKsjjsmccs,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaCxKsjjsmccs> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxKsjjsmccs, req.getParameterMap());
|
||||||
|
Page<OtaBaCxKsjjsmccs> page = new Page<OtaBaCxKsjjsmccs>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaCxKsjjsmccs> pageList = otaBaCxKsjjsmccsService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-列表查询", notes = "车型备案-可在线升级的驾驶辅助功能名称与参数-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaCxKsjjsmccs>> queryList() {
|
||||||
List<OtaBaCxKsjjsmccs> list = otaBaCxKsjjsmccsService.queryList();
|
List<OtaBaCxKsjjsmccs> list = otaBaCxKsjjsmccsService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaCxKsjjsmccs
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-添加")
|
|
||||||
@ApiOperation(value="车型备案-可在线升级的驾驶辅助功能名称与参数-添加", notes="车型备案-可在线升级的驾驶辅助功能名称与参数-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaCxKsjjsmccs otaBaCxKsjjsmccs) {
|
|
||||||
otaBaCxKsjjsmccsService.add(otaBaCxKsjjsmccs);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaCxKsjjsmccs
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-编辑")
|
|
||||||
@ApiOperation(value="车型备案-可在线升级的驾驶辅助功能名称与参数-编辑", notes="车型备案-可在线升级的驾驶辅助功能名称与参数-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaCxKsjjsmccs otaBaCxKsjjsmccs) {
|
|
||||||
otaBaCxKsjjsmccsService.editById(otaBaCxKsjjsmccs);
|
|
||||||
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) {
|
|
||||||
otaBaCxKsjjsmccsService.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.otaBaCxKsjjsmccsService.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) {
|
|
||||||
OtaBaCxKsjjsmccs otaBaCxKsjjsmccs = otaBaCxKsjjsmccsService.queryById(id);
|
|
||||||
if(otaBaCxKsjjsmccs==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxKsjjsmccs);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过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<OtaBaCxKsjjsmccs> otaBaCxKsjjsmccsList = otaBaCxKsjjsmccsService.queryByOtaId(otaId);
|
|
||||||
if(otaBaCxKsjjsmccsList==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxKsjjsmccsList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @return
|
||||||
* @param otaBaCxKsjjsmccs
|
*/
|
||||||
*/
|
@AutoLog(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-添加")
|
||||||
|
@ApiOperation(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-添加", notes = "车型备案-可在线升级的驾驶辅助功能名称与参数-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@RequestBody JSONObject json) {
|
||||||
|
otaBaCxKsjjsmccsService.add(json);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaCxKsjjsmccs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-编辑")
|
||||||
|
@ApiOperation(value = "车型备案-可在线升级的驾驶辅助功能名称与参数-编辑", notes = "车型备案-可在线升级的驾驶辅助功能名称与参数-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaCxKsjjsmccs otaBaCxKsjjsmccs) {
|
||||||
|
otaBaCxKsjjsmccsService.editById(otaBaCxKsjjsmccs);
|
||||||
|
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) {
|
||||||
|
otaBaCxKsjjsmccsService.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.otaBaCxKsjjsmccsService.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) {
|
||||||
|
OtaBaCxKsjjsmccs otaBaCxKsjjsmccs = otaBaCxKsjjsmccsService.queryById(id);
|
||||||
|
if (otaBaCxKsjjsmccs == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxKsjjsmccs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过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,
|
||||||
|
@RequestParam(name = "otaIdT", required = true) String otaIdT) {
|
||||||
|
List<OtaBaCxKsjjsmccs> otaBaCxKsjjsmccsList = otaBaCxKsjjsmccsService.queryByOtaId(otaId, otaIdT);
|
||||||
|
if (otaBaCxKsjjsmccsList == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxKsjjsmccsList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaCxKsjjsmccs
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxKsjjsmccs otaBaCxKsjjsmccs) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxKsjjsmccs otaBaCxKsjjsmccs) {
|
||||||
return super.exportXls(request, otaBaCxKsjjsmccs, OtaBaCxKsjjsmccs.class, "车型备案-可在线升级的驾驶辅助功能名称与参数");
|
return super.exportXls(request, otaBaCxKsjjsmccs, OtaBaCxKsjjsmccs.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, OtaBaCxKsjjsmccs.class);
|
return super.importExcel(request, response, OtaBaCxKsjjsmccs.class);
|
||||||
|
|||||||
+139
-137
@@ -4,6 +4,8 @@ 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.alibaba.fastjson.JSONObject;
|
||||||
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.OtaBaCxKsjxtmccs;
|
import com.jero.modules.ota.entity.OtaBaCxKsjxtmccs;
|
||||||
@@ -22,163 +24,163 @@ 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/otaBaCxKsjxtmccs")
|
@RequestMapping("/ota/otaBaCxKsjxtmccs")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaCxKsjxtmccsController extends JeroController<OtaBaCxKsjxtmccs, IOtaBaCxKsjxtmccsService> {
|
public class OtaBaCxKsjxtmccsController extends JeroController<OtaBaCxKsjxtmccs, IOtaBaCxKsjxtmccsService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaCxKsjxtmccsService otaBaCxKsjxtmccsService;
|
private IOtaBaCxKsjxtmccsService otaBaCxKsjxtmccsService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaCxKsjxtmccs
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-可升级的系统名称参数-分页列表查询")
|
|
||||||
@ApiOperation(value="车型备案-可升级的系统名称参数-分页列表查询", notes="车型备案-可升级的系统名称参数-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaCxKsjxtmccs otaBaCxKsjxtmccs,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaCxKsjxtmccs> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxKsjxtmccs, req.getParameterMap());
|
|
||||||
Page<OtaBaCxKsjxtmccs> page = new Page<OtaBaCxKsjxtmccs>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaCxKsjxtmccs> pageList = otaBaCxKsjxtmccsService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaCxKsjxtmccs
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "车型备案-可升级的系统名称参数-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="车型备案-可升级的系统名称参数-列表查询", notes="车型备案-可升级的系统名称参数-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaCxKsjxtmccs>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "车型备案-可升级的系统名称参数-分页列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-可升级的系统名称参数-分页列表查询", notes = "车型备案-可升级的系统名称参数-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaCxKsjxtmccs otaBaCxKsjxtmccs,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaCxKsjxtmccs> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxKsjxtmccs, req.getParameterMap());
|
||||||
|
Page<OtaBaCxKsjxtmccs> page = new Page<OtaBaCxKsjxtmccs>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaCxKsjxtmccs> pageList = otaBaCxKsjxtmccsService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-可升级的系统名称参数-列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-可升级的系统名称参数-列表查询", notes = "车型备案-可升级的系统名称参数-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaCxKsjxtmccs>> queryList() {
|
||||||
List<OtaBaCxKsjxtmccs> list = otaBaCxKsjxtmccsService.queryList();
|
List<OtaBaCxKsjxtmccs> list = otaBaCxKsjxtmccsService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaCxKsjxtmccs
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-可升级的系统名称参数-添加")
|
|
||||||
@ApiOperation(value="车型备案-可升级的系统名称参数-添加", notes="车型备案-可升级的系统名称参数-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaCxKsjxtmccs otaBaCxKsjxtmccs) {
|
|
||||||
otaBaCxKsjxtmccsService.add(otaBaCxKsjxtmccs);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaCxKsjxtmccs
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-可升级的系统名称参数-编辑")
|
|
||||||
@ApiOperation(value="车型备案-可升级的系统名称参数-编辑", notes="车型备案-可升级的系统名称参数-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaCxKsjxtmccs otaBaCxKsjxtmccs) {
|
|
||||||
otaBaCxKsjxtmccsService.editById(otaBaCxKsjxtmccs);
|
|
||||||
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) {
|
|
||||||
otaBaCxKsjxtmccsService.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.otaBaCxKsjxtmccsService.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) {
|
|
||||||
OtaBaCxKsjxtmccs otaBaCxKsjxtmccs = otaBaCxKsjxtmccsService.queryById(id);
|
|
||||||
if(otaBaCxKsjxtmccs==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxKsjxtmccs);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过otaId查询
|
|
||||||
*
|
|
||||||
* @param otaId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-可升级的系统名称参数-通过iotaId查询")
|
|
||||||
@ApiOperation(value="车型备案-可升级的系统名称参数-通过otaId查询", notes="车型备案-可升级的系统名称参数-通过otaId查询")
|
|
||||||
@GetMapping(value = "/queryByOtaId")
|
|
||||||
public Result<?> queryByOtaId(@RequestParam(name="otaId",required=true) String otaId) {
|
|
||||||
List<OtaBaCxKsjxtmccs> otaBaCxKsjxtmccsList = otaBaCxKsjxtmccsService.queryByOtaId(otaId);
|
|
||||||
if(otaBaCxKsjxtmccsList==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxKsjxtmccsList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @return
|
||||||
* @param otaBaCxKsjxtmccs
|
*/
|
||||||
*/
|
@AutoLog(value = "车型备案-可升级的系统名称参数-添加")
|
||||||
|
@ApiOperation(value = "车型备案-可升级的系统名称参数-添加", notes = "车型备案-可升级的系统名称参数-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@RequestBody JSONObject json) {
|
||||||
|
otaBaCxKsjxtmccsService.add(json);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaCxKsjxtmccs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-可升级的系统名称参数-编辑")
|
||||||
|
@ApiOperation(value = "车型备案-可升级的系统名称参数-编辑", notes = "车型备案-可升级的系统名称参数-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaCxKsjxtmccs otaBaCxKsjxtmccs) {
|
||||||
|
otaBaCxKsjxtmccsService.editById(otaBaCxKsjxtmccs);
|
||||||
|
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) {
|
||||||
|
otaBaCxKsjxtmccsService.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.otaBaCxKsjxtmccsService.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) {
|
||||||
|
OtaBaCxKsjxtmccs otaBaCxKsjxtmccs = otaBaCxKsjxtmccsService.queryById(id);
|
||||||
|
if (otaBaCxKsjxtmccs == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxKsjxtmccs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过otaId查询
|
||||||
|
*
|
||||||
|
* @param otaId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-可升级的系统名称参数-通过iotaId查询")
|
||||||
|
@ApiOperation(value = "车型备案-可升级的系统名称参数-通过otaId查询", notes = "车型备案-可升级的系统名称参数-通过otaId查询")
|
||||||
|
@GetMapping(value = "/queryByOtaId")
|
||||||
|
public Result<?> queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId,
|
||||||
|
@RequestParam(name = "otaIdT", required = true) String otaIdT) {
|
||||||
|
List<OtaBaCxKsjxtmccs> otaBaCxKsjxtmccsList = otaBaCxKsjxtmccsService.queryByOtaId(otaId, otaIdT);
|
||||||
|
if (otaBaCxKsjxtmccsList == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxKsjxtmccsList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaCxKsjxtmccs
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxKsjxtmccs otaBaCxKsjxtmccs) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxKsjxtmccs otaBaCxKsjxtmccs) {
|
||||||
return super.exportXls(request, otaBaCxKsjxtmccs, OtaBaCxKsjxtmccs.class, "车型备案-可升级的系统名称参数");
|
return super.exportXls(request, otaBaCxKsjxtmccs, OtaBaCxKsjxtmccs.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, OtaBaCxKsjxtmccs.class);
|
return super.importExcel(request, response, OtaBaCxKsjxtmccs.class);
|
||||||
|
|||||||
+169
-136
@@ -13,178 +13,211 @@ import com.jero.modules.ota.service.IOtaBaCxListService;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
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.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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/otaBaCxList")
|
@RequestMapping("/ota/otaBaCxList")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaCxListController extends JeroController<OtaBaCxList, IOtaBaCxListService> {
|
public class OtaBaCxListController extends JeroController<OtaBaCxList, IOtaBaCxListService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaCxListService otaBaCxListService;
|
private IOtaBaCxListService otaBaCxListService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaCxList
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型及功能备案列表-分页列表查询")
|
|
||||||
@ApiOperation(value="车型及功能备案列表-分页列表查询", notes="车型及功能备案列表-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaCxList otaBaCxList,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaCxList> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxList, req.getParameterMap());
|
|
||||||
Page<OtaBaCxList> page = new Page<OtaBaCxList>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaCxList> pageList = otaBaCxListService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaCxList
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "车型及功能备案列表-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="车型及功能备案列表-列表查询", notes="车型及功能备案列表-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaCxList>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "车型及功能备案列表-分页列表查询")
|
||||||
|
@ApiOperation(value = "车型及功能备案列表-分页列表查询", notes = "车型及功能备案列表-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaCxList otaBaCxList,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaCxList> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxList, req.getParameterMap());
|
||||||
|
Page<OtaBaCxList> page = new Page<OtaBaCxList>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaCxList> pageList = otaBaCxListService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型及功能备案列表-列表查询")
|
||||||
|
@ApiOperation(value = "车型及功能备案列表-列表查询", notes = "车型及功能备案列表-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaCxList>> queryList() {
|
||||||
List<OtaBaCxList> list = otaBaCxListService.queryList();
|
List<OtaBaCxList> list = otaBaCxListService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaCxList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型及功能备案列表-添加")
|
|
||||||
@ApiOperation(value="车型及功能备案列表-添加", notes="车型及功能备案列表-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaCxList otaBaCxList) {
|
|
||||||
otaBaCxListService.add(otaBaCxList);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaCxList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型及功能备案列表-编辑")
|
|
||||||
@ApiOperation(value="车型及功能备案列表-编辑", notes="车型及功能备案列表-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaCxList otaBaCxList) {
|
|
||||||
otaBaCxListService.editById(otaBaCxList);
|
|
||||||
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) {
|
|
||||||
otaBaCxListService.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.otaBaCxListService.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) {
|
|
||||||
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(id);
|
|
||||||
if(otaBaCxList==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @param otaBaCxList
|
||||||
* @param otaBaCxList
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@AutoLog(value = "车型及功能备案列表-添加")
|
||||||
|
@ApiOperation(value = "车型及功能备案列表-添加", notes = "车型及功能备案列表-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody OtaBaCxList otaBaCxList) {
|
||||||
|
otaBaCxListService.add(otaBaCxList);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaCxList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型及功能备案列表-编辑")
|
||||||
|
@ApiOperation(value = "车型及功能备案列表-编辑", notes = "车型及功能备案列表-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaCxList otaBaCxList) {
|
||||||
|
otaBaCxListService.editById(otaBaCxList);
|
||||||
|
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) {
|
||||||
|
otaBaCxListService.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.otaBaCxListService.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) {
|
||||||
|
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(id);
|
||||||
|
if (otaBaCxList == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaCxList
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxList otaBaCxList) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxList otaBaCxList) {
|
||||||
return super.exportXls(request, otaBaCxList, OtaBaCxList.class, "车型及功能备案列表");
|
return super.exportXls(request, otaBaCxList, OtaBaCxList.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, OtaBaCxList.class);
|
return super.importExcel(request, response, OtaBaCxList.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备案维护
|
* 备案维护
|
||||||
*
|
*/
|
||||||
*/
|
@AutoLog(value = "车型及功能备案列表-备案维护")
|
||||||
@AutoLog(value = "车型及功能备案列表-备案维护")
|
@ApiOperation(value = "车型及功能备案列表-备案维护", notes = "车型及功能备案列表-备案维护")
|
||||||
@ApiOperation(value = "车型及功能备案列表-备案维护", notes = "车型及功能备案列表-备案维护")
|
@PostMapping(value = "/batchRecord")
|
||||||
@PostMapping(value = "/batchRecord")
|
public Result<?> batchRecord(@RequestBody JSONObject json) {
|
||||||
public Result<?> batchRecord(@RequestBody JSONObject json) {
|
String ids = json.getString("ids");
|
||||||
String ids = json.getString("ids");
|
String bazt = json.getString("bazt");
|
||||||
String bazt = json.getString("bazt");
|
String batjsj = json.getString("batjsj");
|
||||||
String batjsj = json.getString("batjsj");
|
String bz = json.getString("bz");
|
||||||
String bz = json.getString("bz");
|
String cut = json.getString("cut");
|
||||||
String cut = json.getString("cut");
|
otaBaCxListService.batchRecord(ids, bazt, batjsj, bz, cut);
|
||||||
otaBaCxListService.batchRecord(ids, bazt, batjsj, bz, cut);
|
return Result.OK("备案维护成功!");
|
||||||
return Result.OK("备案维护成功!");
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
@AutoLog(value = "车型及功能备案列表-模板下载")
|
||||||
|
@ApiOperation(value = "车型及功能备案列表-模板下载")
|
||||||
|
@GetMapping(value = "/exportTemplate")
|
||||||
|
// @RequiresPermissions("otaBaCx:exportTemplate")
|
||||||
|
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||||
|
this.otaBaCxListService.exportTemplate(response, request);
|
||||||
|
}
|
||||||
|
|
||||||
|
@AutoLog(value = "车型及功能备案列表-数据导入")
|
||||||
|
@ApiOperation(value = "车型及功能备案列表-数据导入")
|
||||||
|
@PostMapping(value = "/importData")
|
||||||
|
// @RequiresPermissions("otaBaCx:importData")
|
||||||
|
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
|
||||||
|
@RequestParam(value = "cut", required = false) String cut) throws Exception {
|
||||||
|
try {
|
||||||
|
this.otaBaCxListService.importData(file, cut);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return Result.error(e.getMessage());
|
||||||
|
}
|
||||||
|
return Result.OK("导入成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@AutoLog(value = "车型及功能备案列表-数据导出")
|
||||||
|
@ApiOperation(value = "车型及功能备案列表-数据导出")
|
||||||
|
@GetMapping(value = "/exportData")
|
||||||
|
// @RequiresPermissions("otaBaCx:exportTemplate")
|
||||||
|
public void exportData(@RequestParam(value = "otaId", required = false) String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||||
|
this.otaBaCxListService.exportData(otaId, response, request);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
+136
-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.OtaBaCxQt;
|
import com.jero.modules.ota.entity.OtaBaCxQt;
|
||||||
@@ -22,163 +23,161 @@ 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/otaBaCxQt")
|
@RequestMapping("/ota/otaBaCxQt")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaCxQtController extends JeroController<OtaBaCxQt, IOtaBaCxQtService> {
|
public class OtaBaCxQtController extends JeroController<OtaBaCxQt, IOtaBaCxQtService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaCxQtService otaBaCxQtService;
|
private IOtaBaCxQtService otaBaCxQtService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaCxQt
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-其他升级信息-分页列表查询")
|
|
||||||
@ApiOperation(value="车型备案-其他升级信息-分页列表查询", notes="车型备案-其他升级信息-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaCxQt otaBaCxQt,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaCxQt> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxQt, req.getParameterMap());
|
|
||||||
Page<OtaBaCxQt> page = new Page<OtaBaCxQt>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaCxQt> pageList = otaBaCxQtService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaCxQt
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "车型备案-其他升级信息-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="车型备案-其他升级信息-列表查询", notes="车型备案-其他升级信息-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaCxQt>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "车型备案-其他升级信息-分页列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-其他升级信息-分页列表查询", notes = "车型备案-其他升级信息-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaCxQt otaBaCxQt,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaCxQt> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxQt, req.getParameterMap());
|
||||||
|
Page<OtaBaCxQt> page = new Page<OtaBaCxQt>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaCxQt> pageList = otaBaCxQtService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-其他升级信息-列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-其他升级信息-列表查询", notes = "车型备案-其他升级信息-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaCxQt>> queryList() {
|
||||||
List<OtaBaCxQt> list = otaBaCxQtService.queryList();
|
List<OtaBaCxQt> list = otaBaCxQtService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaCxQt
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-其他升级信息-添加")
|
|
||||||
@ApiOperation(value="车型备案-其他升级信息-添加", notes="车型备案-其他升级信息-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaCxQt otaBaCxQt) {
|
|
||||||
otaBaCxQtService.add(otaBaCxQt);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaCxQt
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-其他升级信息-编辑")
|
|
||||||
@ApiOperation(value="车型备案-其他升级信息-编辑", notes="车型备案-其他升级信息-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaCxQt otaBaCxQt) {
|
|
||||||
otaBaCxQtService.editById(otaBaCxQt);
|
|
||||||
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) {
|
|
||||||
otaBaCxQtService.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.otaBaCxQtService.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) {
|
|
||||||
OtaBaCxQt otaBaCxQt = otaBaCxQtService.queryById(id);
|
|
||||||
if(otaBaCxQt==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxQt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过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) {
|
|
||||||
OtaBaCxQt otaBaCxQt = otaBaCxQtService.queryByOtaId(otaId);
|
|
||||||
if(otaBaCxQt==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxQt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @param otaBaCxQt
|
||||||
* @param otaBaCxQt
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@AutoLog(value = "车型备案-其他升级信息-添加")
|
||||||
|
@ApiOperation(value = "车型备案-其他升级信息-添加", notes = "车型备案-其他升级信息-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody OtaBaCxQt otaBaCxQt) {
|
||||||
|
otaBaCxQtService.add(otaBaCxQt);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaCxQt
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-其他升级信息-编辑")
|
||||||
|
@ApiOperation(value = "车型备案-其他升级信息-编辑", notes = "车型备案-其他升级信息-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaCxQt otaBaCxQt) {
|
||||||
|
otaBaCxQtService.editById(otaBaCxQt);
|
||||||
|
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) {
|
||||||
|
otaBaCxQtService.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.otaBaCxQtService.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) {
|
||||||
|
OtaBaCxQt otaBaCxQt = otaBaCxQtService.queryById(id);
|
||||||
|
if (otaBaCxQt == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxQt);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过otaId查询
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-其他升级信息-通过otaId查询")
|
||||||
|
@ApiOperation(value = "车型备案-其他升级信息-通过otaId查询", notes = "车型备案-其他升级信息-通过otaId查询")
|
||||||
|
@GetMapping(value = "/queryByOtaId")
|
||||||
|
public Result<?> queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId,
|
||||||
|
@RequestParam(name = "otaIdT", required = true) String otaIdT) {
|
||||||
|
OtaBaCxQt otaBaCxQt = otaBaCxQtService.queryByOtaId(otaId, otaIdT);
|
||||||
|
if (otaBaCxQt == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxQt);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaCxQt
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxQt otaBaCxQt) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxQt otaBaCxQt) {
|
||||||
return super.exportXls(request, otaBaCxQt, OtaBaCxQt.class, "车型备案-其他升级信息");
|
return super.exportXls(request, otaBaCxQt, OtaBaCxQt.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, OtaBaCxQt.class);
|
return super.importExcel(request, response, OtaBaCxQt.class);
|
||||||
|
|||||||
+17
@@ -144,6 +144,23 @@ public class OtaBaCxTxjlController extends JeroController<OtaBaCxTxjl, IOtaBaCxT
|
|||||||
return Result.OK(otaBaCxTxjl);
|
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
|
* 导出excel
|
||||||
*
|
*
|
||||||
|
|||||||
+136
-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.OtaBaCxZxsjyq;
|
import com.jero.modules.ota.entity.OtaBaCxZxsjyq;
|
||||||
@@ -22,163 +23,161 @@ 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/otaBaCxZxsjyq")
|
@RequestMapping("/ota/otaBaCxZxsjyq")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaCxZxsjyqController extends JeroController<OtaBaCxZxsjyq, IOtaBaCxZxsjyqService> {
|
public class OtaBaCxZxsjyqController extends JeroController<OtaBaCxZxsjyq, IOtaBaCxZxsjyqService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaCxZxsjyqService otaBaCxZxsjyqService;
|
private IOtaBaCxZxsjyqService otaBaCxZxsjyqService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaCxZxsjyq
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-在线升级要求-分页列表查询")
|
|
||||||
@ApiOperation(value="车型备案-在线升级要求-分页列表查询", notes="车型备案-在线升级要求-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaCxZxsjyq otaBaCxZxsjyq,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaCxZxsjyq> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxZxsjyq, req.getParameterMap());
|
|
||||||
Page<OtaBaCxZxsjyq> page = new Page<OtaBaCxZxsjyq>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaCxZxsjyq> pageList = otaBaCxZxsjyqService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaCxZxsjyq
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "车型备案-在线升级要求-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="车型备案-在线升级要求-列表查询", notes="车型备案-在线升级要求-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaCxZxsjyq>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "车型备案-在线升级要求-分页列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-在线升级要求-分页列表查询", notes = "车型备案-在线升级要求-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaCxZxsjyq otaBaCxZxsjyq,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<OtaBaCxZxsjyq> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxZxsjyq, req.getParameterMap());
|
||||||
|
Page<OtaBaCxZxsjyq> page = new Page<OtaBaCxZxsjyq>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaCxZxsjyq> pageList = otaBaCxZxsjyqService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-在线升级要求-列表查询")
|
||||||
|
@ApiOperation(value = "车型备案-在线升级要求-列表查询", notes = "车型备案-在线升级要求-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaCxZxsjyq>> queryList() {
|
||||||
List<OtaBaCxZxsjyq> list = otaBaCxZxsjyqService.queryList();
|
List<OtaBaCxZxsjyq> list = otaBaCxZxsjyqService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaCxZxsjyq
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-在线升级要求-添加")
|
|
||||||
@ApiOperation(value="车型备案-在线升级要求-添加", notes="车型备案-在线升级要求-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaCxZxsjyq otaBaCxZxsjyq) {
|
|
||||||
otaBaCxZxsjyqService.add(otaBaCxZxsjyq);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaCxZxsjyq
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "车型备案-在线升级要求-编辑")
|
|
||||||
@ApiOperation(value="车型备案-在线升级要求-编辑", notes="车型备案-在线升级要求-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaCxZxsjyq otaBaCxZxsjyq) {
|
|
||||||
otaBaCxZxsjyqService.editById(otaBaCxZxsjyq);
|
|
||||||
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) {
|
|
||||||
otaBaCxZxsjyqService.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.otaBaCxZxsjyqService.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) {
|
|
||||||
OtaBaCxZxsjyq otaBaCxZxsjyq = otaBaCxZxsjyqService.queryById(id);
|
|
||||||
if(otaBaCxZxsjyq==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxZxsjyq);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过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) {
|
|
||||||
OtaBaCxZxsjyq otaBaCxZxsjyq = otaBaCxZxsjyqService.queryByOtaId(otaId);
|
|
||||||
if(otaBaCxZxsjyq==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaCxZxsjyq);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @param otaBaCxZxsjyq
|
||||||
* @param otaBaCxZxsjyq
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@AutoLog(value = "车型备案-在线升级要求-添加")
|
||||||
|
@ApiOperation(value = "车型备案-在线升级要求-添加", notes = "车型备案-在线升级要求-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody OtaBaCxZxsjyq otaBaCxZxsjyq) {
|
||||||
|
otaBaCxZxsjyqService.add(otaBaCxZxsjyq);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaCxZxsjyq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-在线升级要求-编辑")
|
||||||
|
@ApiOperation(value = "车型备案-在线升级要求-编辑", notes = "车型备案-在线升级要求-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaCxZxsjyq otaBaCxZxsjyq) {
|
||||||
|
otaBaCxZxsjyqService.editById(otaBaCxZxsjyq);
|
||||||
|
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) {
|
||||||
|
otaBaCxZxsjyqService.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.otaBaCxZxsjyqService.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) {
|
||||||
|
OtaBaCxZxsjyq otaBaCxZxsjyq = otaBaCxZxsjyqService.queryById(id);
|
||||||
|
if (otaBaCxZxsjyq == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxZxsjyq);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过OtaId查询
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "车型备案-在线升级要求-通过otaId查询")
|
||||||
|
@ApiOperation(value = "车型备案-在线升级要求-通过otaId查询", notes = "车型备案-在线升级要求-通过otaId查询")
|
||||||
|
@GetMapping(value = "/queryByOtaId")
|
||||||
|
public Result<?> queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId,
|
||||||
|
@RequestParam(name = "otaIdT", required = true) String otaIdT) {
|
||||||
|
OtaBaCxZxsjyq otaBaCxZxsjyq = otaBaCxZxsjyqService.queryByOtaId(otaId, otaIdT);
|
||||||
|
if (otaBaCxZxsjyq == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaCxZxsjyq);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaCxZxsjyq
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxZxsjyq otaBaCxZxsjyq) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxZxsjyq otaBaCxZxsjyq) {
|
||||||
return super.exportXls(request, otaBaCxZxsjyq, OtaBaCxZxsjyq.class, "车型备案-在线升级要求");
|
return super.exportXls(request, otaBaCxZxsjyq, OtaBaCxZxsjyq.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, OtaBaCxZxsjyq.class);
|
return super.importExcel(request, response, OtaBaCxZxsjyq.class);
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ public class OtaBaCxList implements Serializable {
|
|||||||
/**备案状态*/
|
/**备案状态*/
|
||||||
@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;
|
||||||
|
|
||||||
/**备案提交时间*/
|
/**备案提交时间*/
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ public class OtaBaCxLsjl implements Serializable {
|
|||||||
|
|
||||||
/**数据状态*/
|
/**数据状态*/
|
||||||
@Excel(name = "数据状态", width = 15)
|
@Excel(name = "数据状态", width = 15)
|
||||||
|
@Dict(dicCode = "recordstatus")
|
||||||
@ApiModelProperty(value = "数据状态")
|
@ApiModelProperty(value = "数据状态")
|
||||||
private java.lang.String sjzt;
|
private java.lang.String sjzt;
|
||||||
|
|
||||||
|
|||||||
+37
-36
@@ -2,62 +2,63 @@ package com.jero.modules.ota.service;
|
|||||||
|
|
||||||
import com.jero.modules.ota.entity.OtaBaCxAqcs;
|
import com.jero.modules.ota.entity.OtaBaCxAqcs;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
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
|
||||||
*/
|
*/
|
||||||
public interface IOtaBaCxAqcsService extends IService<OtaBaCxAqcs> {
|
public interface IOtaBaCxAqcsService extends IService<OtaBaCxAqcs> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxAqcs
|
* @param otaBaCxAqcs
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void add(OtaBaCxAqcs otaBaCxAqcs);
|
void add(OtaBaCxAqcs otaBaCxAqcs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxAqcs
|
* @param otaBaCxAqcs
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void editById(OtaBaCxAqcs otaBaCxAqcs);
|
void editById(OtaBaCxAqcs otaBaCxAqcs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteById(String id);
|
void deleteById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteByIds(List<String> ids);
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
OtaBaCxAqcs queryById(String id);
|
OtaBaCxAqcs queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaCxAqcs> queryList();
|
List<OtaBaCxAqcs> queryList();
|
||||||
|
|
||||||
OtaBaCxAqcs queryByOtaId(String otaId);
|
OtaBaCxAqcs queryByOtaId(String otaId, String otaIdT);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -59,5 +59,5 @@ public interface IOtaBaCxJbxxService extends IService<OtaBaCxJbxx> {
|
|||||||
*/
|
*/
|
||||||
List<OtaBaCxJbxx> queryList();
|
List<OtaBaCxJbxx> queryList();
|
||||||
|
|
||||||
OtaBaCxJbxx queryByOtaId(String otaId);
|
OtaBaCxJbxx queryByOtaId(String otaId, String otaIdT);
|
||||||
}
|
}
|
||||||
|
|||||||
+37
-34
@@ -3,59 +3,62 @@ package com.jero.modules.ota.service;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxJsfzbacs;
|
import com.jero.modules.ota.entity.OtaBaCxJsfzbacs;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
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
|
||||||
*/
|
*/
|
||||||
public interface IOtaBaCxJsfzbacsService extends IService<OtaBaCxJsfzbacs> {
|
public interface IOtaBaCxJsfzbacsService extends IService<OtaBaCxJsfzbacs> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void add(JSONObject json);
|
void add(JSONObject json);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxJsfzbacs
|
* @param otaBaCxJsfzbacs
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void editById(OtaBaCxJsfzbacs otaBaCxJsfzbacs);
|
void editById(OtaBaCxJsfzbacs otaBaCxJsfzbacs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteById(String id);
|
void deleteById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteByIds(List<String> ids);
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
OtaBaCxJsfzbacs queryById(String id);
|
OtaBaCxJsfzbacs queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaCxJsfzbacs> queryList();
|
List<OtaBaCxJsfzbacs> queryList();
|
||||||
|
|
||||||
|
JSONObject queryByOtaId(String otaId, String otaIdT);
|
||||||
}
|
}
|
||||||
|
|||||||
+38
-37
@@ -1,63 +1,64 @@
|
|||||||
package com.jero.modules.ota.service;
|
package com.jero.modules.ota.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxKsjjsmccs;
|
import com.jero.modules.ota.entity.OtaBaCxKsjjsmccs;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
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
|
||||||
*/
|
*/
|
||||||
public interface IOtaBaCxKsjjsmccsService extends IService<OtaBaCxKsjjsmccs> {
|
public interface IOtaBaCxKsjjsmccsService extends IService<OtaBaCxKsjjsmccs> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxKsjjsmccs
|
* @return
|
||||||
* @return
|
*/
|
||||||
*/
|
void add(JSONObject json);
|
||||||
void add(OtaBaCxKsjjsmccs otaBaCxKsjjsmccs);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxKsjjsmccs
|
* @param otaBaCxKsjjsmccs
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void editById(OtaBaCxKsjjsmccs otaBaCxKsjjsmccs);
|
void editById(OtaBaCxKsjjsmccs otaBaCxKsjjsmccs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteById(String id);
|
void deleteById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteByIds(List<String> ids);
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
OtaBaCxKsjjsmccs queryById(String id);
|
OtaBaCxKsjjsmccs queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaCxKsjjsmccs> queryList();
|
List<OtaBaCxKsjjsmccs> queryList();
|
||||||
|
|
||||||
List<OtaBaCxKsjjsmccs> queryByOtaId(String otaId);
|
List<OtaBaCxKsjjsmccs> queryByOtaId(String otaId, String otaIdT);
|
||||||
}
|
}
|
||||||
|
|||||||
+38
-37
@@ -1,63 +1,64 @@
|
|||||||
package com.jero.modules.ota.service;
|
package com.jero.modules.ota.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxKsjxtmccs;
|
import com.jero.modules.ota.entity.OtaBaCxKsjxtmccs;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
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
|
||||||
*/
|
*/
|
||||||
public interface IOtaBaCxKsjxtmccsService extends IService<OtaBaCxKsjxtmccs> {
|
public interface IOtaBaCxKsjxtmccsService extends IService<OtaBaCxKsjxtmccs> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxKsjxtmccs
|
* @return
|
||||||
* @return
|
*/
|
||||||
*/
|
void add(JSONObject json);
|
||||||
void add(OtaBaCxKsjxtmccs otaBaCxKsjxtmccs);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxKsjxtmccs
|
* @param otaBaCxKsjxtmccs
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void editById(OtaBaCxKsjxtmccs otaBaCxKsjxtmccs);
|
void editById(OtaBaCxKsjxtmccs otaBaCxKsjxtmccs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteById(String id);
|
void deleteById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteByIds(List<String> ids);
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
OtaBaCxKsjxtmccs queryById(String id);
|
OtaBaCxKsjxtmccs queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaCxKsjxtmccs> queryList();
|
List<OtaBaCxKsjxtmccs> queryList();
|
||||||
|
|
||||||
List<OtaBaCxKsjxtmccs> queryByOtaId(String otaId);
|
List<OtaBaCxKsjxtmccs> queryByOtaId(String otaId, String otaIdT);
|
||||||
}
|
}
|
||||||
|
|||||||
+9
@@ -2,7 +2,10 @@ package com.jero.modules.ota.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxList;
|
import com.jero.modules.ota.entity.OtaBaCxList;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -65,4 +68,10 @@ public interface IOtaBaCxListService extends IService<OtaBaCxList> {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void batchRecord(String ids, String bazt, String batjsj, String bz, String cut);
|
void batchRecord(String ids, String bazt, String batjsj, String bz, String cut);
|
||||||
|
|
||||||
|
void exportTemplate(HttpServletResponse response, HttpServletRequest request);
|
||||||
|
|
||||||
|
void importData(MultipartFile file, String cut);
|
||||||
|
|
||||||
|
void exportData(String otaId, HttpServletResponse response, HttpServletRequest request);
|
||||||
}
|
}
|
||||||
|
|||||||
+37
-36
@@ -2,62 +2,63 @@ package com.jero.modules.ota.service;
|
|||||||
|
|
||||||
import com.jero.modules.ota.entity.OtaBaCxQt;
|
import com.jero.modules.ota.entity.OtaBaCxQt;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
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
|
||||||
*/
|
*/
|
||||||
public interface IOtaBaCxQtService extends IService<OtaBaCxQt> {
|
public interface IOtaBaCxQtService extends IService<OtaBaCxQt> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxQt
|
* @param otaBaCxQt
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void add(OtaBaCxQt otaBaCxQt);
|
void add(OtaBaCxQt otaBaCxQt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxQt
|
* @param otaBaCxQt
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void editById(OtaBaCxQt otaBaCxQt);
|
void editById(OtaBaCxQt otaBaCxQt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteById(String id);
|
void deleteById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteByIds(List<String> ids);
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
OtaBaCxQt queryById(String id);
|
OtaBaCxQt queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaCxQt> queryList();
|
List<OtaBaCxQt> queryList();
|
||||||
|
|
||||||
OtaBaCxQt queryByOtaId(String otaId);
|
OtaBaCxQt queryByOtaId(String otaId, String otaIdT);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -58,4 +58,6 @@ public interface IOtaBaCxTxjlService extends IService<OtaBaCxTxjl> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaCxTxjl> queryList();
|
List<OtaBaCxTxjl> queryList();
|
||||||
|
|
||||||
|
List<OtaBaCxTxjl> queryByOtaId(String otaId);
|
||||||
}
|
}
|
||||||
|
|||||||
+37
-36
@@ -2,62 +2,63 @@ package com.jero.modules.ota.service;
|
|||||||
|
|
||||||
import com.jero.modules.ota.entity.OtaBaCxZxsjyq;
|
import com.jero.modules.ota.entity.OtaBaCxZxsjyq;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
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
|
||||||
*/
|
*/
|
||||||
public interface IOtaBaCxZxsjyqService extends IService<OtaBaCxZxsjyq> {
|
public interface IOtaBaCxZxsjyqService extends IService<OtaBaCxZxsjyq> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxZxsjyq
|
* @param otaBaCxZxsjyq
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void add(OtaBaCxZxsjyq otaBaCxZxsjyq);
|
void add(OtaBaCxZxsjyq otaBaCxZxsjyq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxZxsjyq
|
* @param otaBaCxZxsjyq
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void editById(OtaBaCxZxsjyq otaBaCxZxsjyq);
|
void editById(OtaBaCxZxsjyq otaBaCxZxsjyq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteById(String id);
|
void deleteById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void deleteByIds(List<String> ids);
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
OtaBaCxZxsjyq queryById(String id);
|
OtaBaCxZxsjyq queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OtaBaCxZxsjyq> queryList();
|
List<OtaBaCxZxsjyq> queryList();
|
||||||
|
|
||||||
OtaBaCxZxsjyq queryByOtaId(String otaId);
|
OtaBaCxZxsjyq queryByOtaId(String otaId, String otaIdT);
|
||||||
}
|
}
|
||||||
|
|||||||
+70
-53
@@ -5,95 +5,112 @@ import com.jero.modules.ota.entity.OtaBaCxAqcs;
|
|||||||
import com.jero.modules.ota.entity.OtaBaCxJbxx;
|
import com.jero.modules.ota.entity.OtaBaCxJbxx;
|
||||||
import com.jero.modules.ota.mapper.OtaBaCxAqcsMapper;
|
import com.jero.modules.ota.mapper.OtaBaCxAqcsMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxAqcsService;
|
import com.jero.modules.ota.service.IOtaBaCxAqcsService;
|
||||||
|
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 OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBaCxAqcs> implements IOtaBaCxAqcsService {
|
public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBaCxAqcs> implements IOtaBaCxAqcsService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxAqcs
|
* @param otaBaCxAqcs
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(OtaBaCxAqcs otaBaCxAqcs) {
|
public void add(OtaBaCxAqcs otaBaCxAqcs) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxAqcs.setCreateTime(now);
|
if (null != otaBaCxAqcs) {
|
||||||
otaBaCxAqcs.setUpdateTime(now);
|
OtaBaCxAqcs otaBaCxAqcsOld = this.getByOtaId(otaBaCxAqcs.getOtaId());
|
||||||
save(otaBaCxAqcs);
|
if (null != otaBaCxAqcsOld) {
|
||||||
|
otaBaCxAqcs.setId(otaBaCxAqcsOld.getId());
|
||||||
|
} else {
|
||||||
|
otaBaCxAqcs.setCreateTime(now);
|
||||||
|
}
|
||||||
|
otaBaCxAqcs.setUpdateTime(now);
|
||||||
|
saveOrUpdate(otaBaCxAqcs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxAqcs
|
* @param otaBaCxAqcs
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(OtaBaCxAqcs otaBaCxAqcs) {
|
public void editById(OtaBaCxAqcs otaBaCxAqcs) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxAqcs.setUpdateTime(now);
|
otaBaCxAqcs.setUpdateTime(now);
|
||||||
saveOrUpdate(otaBaCxAqcs);
|
saveOrUpdate(otaBaCxAqcs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过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 OtaBaCxAqcs queryById(String id) {
|
public OtaBaCxAqcs queryById(String id) {
|
||||||
return getById(id);
|
return getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OtaBaCxAqcs> queryList() {
|
public List<OtaBaCxAqcs> queryList() {
|
||||||
return list();
|
return list();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OtaBaCxAqcs queryByOtaId(String otaId) {
|
public OtaBaCxAqcs queryByOtaId(String otaId, String otaIdT) {
|
||||||
LambdaQueryWrapper<OtaBaCxAqcs> queryWrapper = new LambdaQueryWrapper<>();
|
OtaBaCxAqcs res = getByOtaId(otaId);
|
||||||
queryWrapper.eq(OtaBaCxAqcs::getOtaId, otaId);
|
if (ObjectUtils.isEmpty(res)) {
|
||||||
OtaBaCxAqcs res = this.getOne(queryWrapper);
|
res = getByOtaId(otaIdT);
|
||||||
return res;
|
}
|
||||||
}
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
private OtaBaCxAqcs getByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaCxAqcs> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaCxAqcs::getOtaId, otaId);
|
||||||
|
return this.getOne(queryWrapper, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-4
@@ -7,6 +7,7 @@ import com.jero.modules.ota.entity.OtaBaCxList;
|
|||||||
import com.jero.modules.ota.mapper.OtaBaCxJbxxMapper;
|
import com.jero.modules.ota.mapper.OtaBaCxJbxxMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxJbxxService;
|
import com.jero.modules.ota.service.IOtaBaCxJbxxService;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxListService;
|
import com.jero.modules.ota.service.IOtaBaCxListService;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -110,10 +111,18 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OtaBaCxJbxx queryByOtaId(String otaId){
|
public OtaBaCxJbxx queryByOtaId(String otaId, String otaIdT){
|
||||||
LambdaQueryWrapper<OtaBaCxJbxx> queryWrapper = new LambdaQueryWrapper<>();
|
//判断是否保存过,否则查询模版数据回显
|
||||||
queryWrapper.eq(OtaBaCxJbxx::getOtaId, otaId);
|
OtaBaCxJbxx res = getByOtaId(otaId);
|
||||||
OtaBaCxJbxx res = this.getOne(queryWrapper);
|
if(ObjectUtils.isEmpty(res)){
|
||||||
|
res = getByOtaId(otaIdT);
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private OtaBaCxJbxx getByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaCxJbxx> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaCxJbxx::getOtaId, otaId);
|
||||||
|
return this.getOne(queryWrapper,false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+118
-90
@@ -3,12 +3,16 @@ package com.jero.modules.ota.service.impl;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxJsfzbacs;
|
import com.jero.modules.ota.entity.OtaBaCxJsfzbacs;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaCxKsjxtmccs;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaCxLsjl;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxSjmk;
|
import com.jero.modules.ota.entity.OtaBaCxSjmk;
|
||||||
import com.jero.modules.ota.mapper.OtaBaCxJsfzbacsMapper;
|
import com.jero.modules.ota.mapper.OtaBaCxJsfzbacsMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxJsfzbacsService;
|
import com.jero.modules.ota.service.IOtaBaCxJsfzbacsService;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxLsjlService;
|
import com.jero.modules.ota.service.IOtaBaCxLsjlService;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxSjmkService;
|
import com.jero.modules.ota.service.IOtaBaCxSjmkService;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -46,7 +50,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
|||||||
//处理控制器列表,先删除,后添加
|
//处理控制器列表,先删除,后添加
|
||||||
OtaBaCxSjmkService.deleteByOtaId(otaId);
|
OtaBaCxSjmkService.deleteByOtaId(otaId);
|
||||||
JSONArray kzq = json.getJSONArray("kzq");
|
JSONArray kzq = json.getJSONArray("kzq");
|
||||||
List<OtaBaCxSjmk> sjmkList = parseKzqData(kzq,otaId);
|
List<OtaBaCxSjmk> sjmkList = parseKzqData(kzq, otaId);
|
||||||
OtaBaCxSjmkService.saveBatch(sjmkList);
|
OtaBaCxSjmkService.saveBatch(sjmkList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +58,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
|||||||
/**
|
/**
|
||||||
* 解析控制器数据
|
* 解析控制器数据
|
||||||
*/
|
*/
|
||||||
private List<OtaBaCxSjmk> parseKzqData(JSONArray kzq,String otaId) {
|
private List<OtaBaCxSjmk> parseKzqData(JSONArray kzq, String otaId) {
|
||||||
List<OtaBaCxSjmk> sjmkList = new ArrayList<>();
|
List<OtaBaCxSjmk> sjmkList = new ArrayList<>();
|
||||||
for (Object kzqJson : kzq) {
|
for (Object kzqJson : kzq) {
|
||||||
HashMap<String, Object> kzqMap = (HashMap<String, Object>) kzqJson;
|
HashMap<String, Object> kzqMap = (HashMap<String, Object>) kzqJson;
|
||||||
@@ -76,96 +80,120 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
|||||||
}
|
}
|
||||||
return sjmkList;
|
return sjmkList;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 解析部件数据
|
/**
|
||||||
*/
|
* 解析部件数据
|
||||||
private void parseBjData (JSONObject json, OtaBaCxJsfzbacs otaBaCxJsfzbacs){
|
*/
|
||||||
JSONObject bj = json.getJSONObject("bj");
|
private void parseBjData(JSONObject json, OtaBaCxJsfzbacs otaBaCxJsfzbacs) {
|
||||||
Map<String, Object> bjMap = bj.getInnerMap();
|
JSONObject bj = json.getJSONObject("bj");
|
||||||
Field[] fields = OtaBaCxJsfzbacs.class.getDeclaredFields();
|
Map<String, Object> bjMap = bj.getInnerMap();
|
||||||
for (Field field : fields) {
|
Field[] fields = OtaBaCxJsfzbacs.class.getDeclaredFields();
|
||||||
Object bjObj = bjMap.get(field.getName());
|
for (Field field : fields) {
|
||||||
if (null != bjObj) {
|
Object bjObj = bjMap.get(field.getName());
|
||||||
try {
|
if (null != bjObj) {
|
||||||
field.setAccessible(true);
|
try {
|
||||||
field.set(otaBaCxJsfzbacs, bjObj.toString());
|
field.setAccessible(true);
|
||||||
} catch (IllegalAccessException e) {
|
field.set(otaBaCxJsfzbacs, bjObj.toString());
|
||||||
e.printStackTrace();
|
} catch (IllegalAccessException e) {
|
||||||
}
|
e.printStackTrace();
|
||||||
}
|
|
||||||
}
|
|
||||||
JSONArray cs = json.getJSONArray("cs");
|
|
||||||
for (Object cdJson : cs) {
|
|
||||||
HashMap<String, Object> csMap = (HashMap<String, Object>) cdJson;
|
|
||||||
String csName = (String) csMap.get("key");
|
|
||||||
String csValue = (String) csMap.get("val");
|
|
||||||
if (null != csName) {
|
|
||||||
try {
|
|
||||||
Field field = OtaBaCxJsfzbacs.class.getDeclaredField(csName);
|
|
||||||
field.setAccessible(true);
|
|
||||||
field.set(otaBaCxJsfzbacs, csValue);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (NoSuchFieldException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
JSONArray cs = json.getJSONArray("cs");
|
||||||
/**
|
for (Object cdJson : cs) {
|
||||||
* 更新
|
HashMap<String, Object> csMap = (HashMap<String, Object>) cdJson;
|
||||||
*
|
String csName = (String) csMap.get("key");
|
||||||
* @param otaBaCxJsfzbacs
|
String csValue = (String) csMap.get("val");
|
||||||
* @return
|
if (null != csName) {
|
||||||
*/
|
try {
|
||||||
@Override
|
Field field = OtaBaCxJsfzbacs.class.getDeclaredField(csName);
|
||||||
public void editById (OtaBaCxJsfzbacs otaBaCxJsfzbacs){
|
field.setAccessible(true);
|
||||||
Date now = new Date();
|
field.set(otaBaCxJsfzbacs, csValue);
|
||||||
otaBaCxJsfzbacs.setUpdateTime(now);
|
} catch (IllegalAccessException e) {
|
||||||
saveOrUpdate(otaBaCxJsfzbacs);
|
e.printStackTrace();
|
||||||
}
|
} catch (NoSuchFieldException e) {
|
||||||
|
e.printStackTrace();
|
||||||
/**
|
}
|
||||||
* 通过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 OtaBaCxJsfzbacs queryById (String id){
|
|
||||||
return getById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表查询
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<OtaBaCxJsfzbacs> queryList () {
|
|
||||||
return list();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param otaBaCxJsfzbacs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(OtaBaCxJsfzbacs otaBaCxJsfzbacs) {
|
||||||
|
Date now = new Date();
|
||||||
|
otaBaCxJsfzbacs.setUpdateTime(now);
|
||||||
|
saveOrUpdate(otaBaCxJsfzbacs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过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 OtaBaCxJsfzbacs queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<OtaBaCxJsfzbacs> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject queryByOtaId(String otaId, String otaIdT) {
|
||||||
|
JSONObject res = new JSONObject();
|
||||||
|
res.put("otaId", otaId);
|
||||||
|
OtaBaCxJsfzbacs otaBaCxJsfzbacs = getByOtaId(otaId);
|
||||||
|
List<OtaBaCxSjmk> kzqList = OtaBaCxSjmkService.queryByOtaId(otaId);
|
||||||
|
if (ObjectUtils.isEmpty(otaBaCxJsfzbacs)) {
|
||||||
|
otaBaCxJsfzbacs = getByOtaId(otaIdT);
|
||||||
|
kzqList = OtaBaCxSjmkService.queryByOtaId(otaIdT);
|
||||||
|
}
|
||||||
|
res.put("bj", otaBaCxJsfzbacs);
|
||||||
|
res.put("kzq", kzqList);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
private OtaBaCxJsfzbacs getByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaCxJsfzbacs> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaCxJsfzbacs::getOtaId, otaId);
|
||||||
|
return this.getOne(queryWrapper, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
+54
-11
@@ -1,14 +1,20 @@
|
|||||||
package com.jero.modules.ota.service.impl;
|
package com.jero.modules.ota.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaCxJsfzbacs;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxKsjjsmccs;
|
import com.jero.modules.ota.entity.OtaBaCxKsjjsmccs;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxKsjxtmccs;
|
import com.jero.modules.ota.entity.OtaBaCxKsjxtmccs;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaCxSjmk;
|
||||||
import com.jero.modules.ota.mapper.OtaBaCxKsjjsmccsMapper;
|
import com.jero.modules.ota.mapper.OtaBaCxKsjjsmccsMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxKsjjsmccsService;
|
import com.jero.modules.ota.service.IOtaBaCxKsjjsmccsService;
|
||||||
|
import com.jero.modules.system.util.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.lang.reflect.Field;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
@@ -24,15 +30,36 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
|||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxKsjjsmccs
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(OtaBaCxKsjjsmccs otaBaCxKsjjsmccs) {
|
public void add(JSONObject json) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxKsjjsmccs.setCreateTime(now);
|
String otaId = (String) json.get("otaId");
|
||||||
otaBaCxKsjjsmccs.setUpdateTime(now);
|
if (StringUtils.isNotEmpty(otaId)) {
|
||||||
save(otaBaCxKsjjsmccs);
|
deleteByOtaId(otaId);
|
||||||
|
JSONArray list = json.getJSONArray("list");
|
||||||
|
for (Object obj : list) {
|
||||||
|
Map<String, Object> objMap = (HashMap) obj;
|
||||||
|
OtaBaCxKsjjsmccs otaBaCxJsfzbacs = new OtaBaCxKsjjsmccs();
|
||||||
|
Field[] fields = OtaBaCxKsjjsmccs.class.getDeclaredFields();
|
||||||
|
for (Field field : fields) {
|
||||||
|
Object bjObj = objMap.get(field.getName());
|
||||||
|
if (null != bjObj) {
|
||||||
|
try {
|
||||||
|
field.setAccessible(true);
|
||||||
|
field.set(otaBaCxJsfzbacs, bjObj.toString());
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
otaBaCxJsfzbacs.setOtaId(otaId);
|
||||||
|
otaBaCxJsfzbacs.setCreateTime(now);
|
||||||
|
otaBaCxJsfzbacs.setUpdateTime(now);
|
||||||
|
save(otaBaCxJsfzbacs);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -92,10 +119,26 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<OtaBaCxKsjjsmccs> queryByOtaId(String otaId) {
|
public List<OtaBaCxKsjjsmccs> queryByOtaId(String otaId, String otaIdT) {
|
||||||
LambdaQueryWrapper<OtaBaCxKsjjsmccs> queryWrapper = new LambdaQueryWrapper<>();
|
List<OtaBaCxKsjjsmccs> res = this.getByOtaId(otaId);
|
||||||
queryWrapper.eq(OtaBaCxKsjjsmccs::getOtaId, otaId);
|
if (ObjectUtil.isEmpty(res)) {
|
||||||
List<OtaBaCxKsjjsmccs> res = this.list(queryWrapper);
|
res = getByOtaId(otaIdT);
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<OtaBaCxKsjjsmccs> getByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaCxKsjjsmccs> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaCxKsjjsmccs::getOtaId, otaId);
|
||||||
|
return this.list(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteByOtaId(String otaId) {
|
||||||
|
List<OtaBaCxKsjjsmccs> list = this.getByOtaId(otaId);
|
||||||
|
List<String> ids = new ArrayList<>();
|
||||||
|
for (OtaBaCxKsjjsmccs mccs : list) {
|
||||||
|
ids.add(mccs.getId());
|
||||||
|
}
|
||||||
|
this.deleteByIds(ids);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+100
-56
@@ -1,99 +1,143 @@
|
|||||||
package com.jero.modules.ota.service.impl;
|
package com.jero.modules.ota.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxJbxx;
|
import com.jero.modules.ota.entity.OtaBaCxJbxx;
|
||||||
|
import com.jero.modules.ota.entity.OtaBaCxKsjjsmccs;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxKsjxtmccs;
|
import com.jero.modules.ota.entity.OtaBaCxKsjxtmccs;
|
||||||
import com.jero.modules.ota.mapper.OtaBaCxKsjxtmccsMapper;
|
import com.jero.modules.ota.mapper.OtaBaCxKsjxtmccsMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxKsjxtmccsService;
|
import com.jero.modules.ota.service.IOtaBaCxKsjxtmccsService;
|
||||||
|
import com.jero.modules.system.util.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Date;
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
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 OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMapper, OtaBaCxKsjxtmccs> implements IOtaBaCxKsjxtmccsService {
|
public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMapper, OtaBaCxKsjxtmccs> implements IOtaBaCxKsjxtmccsService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxKsjxtmccs
|
* @return
|
||||||
* @return
|
*/
|
||||||
*/
|
@Override
|
||||||
@Override
|
public void add(JSONObject json) {
|
||||||
public void add(OtaBaCxKsjxtmccs otaBaCxKsjxtmccs) {
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxKsjxtmccs.setCreateTime(now);
|
String otaId = (String) json.get("otaId");
|
||||||
otaBaCxKsjxtmccs.setUpdateTime(now);
|
if (StringUtils.isNotEmpty(otaId)) {
|
||||||
save(otaBaCxKsjxtmccs);
|
deleteByOtaId(otaId);
|
||||||
|
JSONArray list = json.getJSONArray("list");
|
||||||
|
for (Object obj : list) {
|
||||||
|
Map<String, Object> objMap = (HashMap) obj;
|
||||||
|
OtaBaCxKsjxtmccs otaBaCxKsjxtmccs = new OtaBaCxKsjxtmccs();
|
||||||
|
Field[] fields = OtaBaCxKsjxtmccs.class.getDeclaredFields();
|
||||||
|
for (Field field : fields) {
|
||||||
|
Object bjObj = objMap.get(field.getName());
|
||||||
|
if (null != bjObj) {
|
||||||
|
try {
|
||||||
|
field.setAccessible(true);
|
||||||
|
field.set(otaBaCxKsjxtmccs, bjObj.toString());
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
otaBaCxKsjxtmccs.setOtaId(otaId);
|
||||||
|
otaBaCxKsjxtmccs.setCreateTime(now);
|
||||||
|
otaBaCxKsjxtmccs.setUpdateTime(now);
|
||||||
|
save(otaBaCxKsjxtmccs);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxKsjxtmccs
|
* @param otaBaCxKsjxtmccs
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(OtaBaCxKsjxtmccs otaBaCxKsjxtmccs) {
|
public void editById(OtaBaCxKsjxtmccs otaBaCxKsjxtmccs) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxKsjxtmccs.setUpdateTime(now);
|
otaBaCxKsjxtmccs.setUpdateTime(now);
|
||||||
saveOrUpdate(otaBaCxKsjxtmccs);
|
saveOrUpdate(otaBaCxKsjxtmccs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过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 OtaBaCxKsjxtmccs queryById(String id) {
|
public OtaBaCxKsjxtmccs queryById(String id) {
|
||||||
return getById(id);
|
return getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OtaBaCxKsjxtmccs> queryList() {
|
public List<OtaBaCxKsjxtmccs> queryList() {
|
||||||
return list();
|
return list();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<OtaBaCxKsjxtmccs> queryByOtaId(String otaId) {
|
public List<OtaBaCxKsjxtmccs> queryByOtaId(String otaId, String otaIdT) {
|
||||||
LambdaQueryWrapper<OtaBaCxKsjxtmccs> queryWrapper = new LambdaQueryWrapper<>();
|
List<OtaBaCxKsjxtmccs> res = getByOtaId(otaId);
|
||||||
queryWrapper.eq(OtaBaCxKsjxtmccs::getOtaId, otaId);
|
if (ObjectUtil.isEmpty(res)) {
|
||||||
List<OtaBaCxKsjxtmccs> res = this.list(queryWrapper);
|
res = getByOtaId(otaIdT);
|
||||||
return res;
|
}
|
||||||
}
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<OtaBaCxKsjxtmccs> getByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaCxKsjxtmccs> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaCxKsjxtmccs::getOtaId, otaId);
|
||||||
|
return this.list(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteByOtaId(String otaId) {
|
||||||
|
List<OtaBaCxKsjxtmccs> list = this.getByOtaId(otaId);
|
||||||
|
List<String> ids = new ArrayList<>();
|
||||||
|
for (OtaBaCxKsjxtmccs mccs : list) {
|
||||||
|
ids.add(mccs.getId());
|
||||||
|
}
|
||||||
|
this.deleteByIds(ids);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+142
-1
@@ -1,17 +1,29 @@
|
|||||||
package com.jero.modules.ota.service.impl;
|
package com.jero.modules.ota.service.impl;
|
||||||
|
|
||||||
|
import com.aliyuncs.utils.IOUtils;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxList;
|
import com.jero.modules.ota.entity.OtaBaCxList;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxLsjl;
|
import com.jero.modules.ota.entity.OtaBaCxLsjl;
|
||||||
import com.jero.modules.ota.mapper.OtaBaCxListMapper;
|
import com.jero.modules.ota.mapper.OtaBaCxListMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxListService;
|
import com.jero.modules.ota.service.IOtaBaCxListService;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxLsjlService;
|
import com.jero.modules.ota.service.IOtaBaCxLsjlService;
|
||||||
|
import com.jero.modules.split.common.FileUnZip;
|
||||||
import com.jero.modules.system.util.StringUtils;
|
import com.jero.modules.system.util.StringUtils;
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
import org.apache.ibatis.logging.Log;
|
||||||
|
import org.apache.ibatis.logging.LogFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -24,11 +36,17 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBaCxList> implements IOtaBaCxListService {
|
public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBaCxList> implements IOtaBaCxListService {
|
||||||
|
|
||||||
|
protected Log log = LogFactory.getLog(this.getClass());
|
||||||
|
|
||||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaCxLsjlService otaBaCxLsjlService;
|
private IOtaBaCxLsjlService otaBaCxLsjlService;
|
||||||
|
|
||||||
|
|
||||||
|
@Value(value = "${jero.path.upload}")
|
||||||
|
private String uploadpath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -40,7 +58,7 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
|
|||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxList.setCreateTime(now);
|
otaBaCxList.setCreateTime(now);
|
||||||
otaBaCxList.setUpdateTime(now);
|
otaBaCxList.setUpdateTime(now);
|
||||||
save(otaBaCxList);
|
saveOrUpdate(otaBaCxList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -125,4 +143,127 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
|
|||||||
throw new JeroBootException(ex.getMessage());
|
throw new JeroBootException(ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) {
|
||||||
|
File template = new File("D://opt//ota//车型及功能备案.zip");
|
||||||
|
BufferedOutputStream os = null;
|
||||||
|
InputStream in = null;
|
||||||
|
try {
|
||||||
|
in = new FileInputStream(template);
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename=" + template.getName());
|
||||||
|
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||||
|
os = new BufferedOutputStream(response.getOutputStream());
|
||||||
|
int len;
|
||||||
|
while ((len = in.read()) != -1) {
|
||||||
|
os.write(len);
|
||||||
|
os.flush();
|
||||||
|
}
|
||||||
|
in.close();
|
||||||
|
os.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new JeroBootException("下载文件失败,请重试");
|
||||||
|
} finally {
|
||||||
|
IOUtils.closeQuietly(in);
|
||||||
|
IOUtils.closeQuietly(os);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void importData(MultipartFile file, String cut) {
|
||||||
|
try {
|
||||||
|
int pos = file.getOriginalFilename().lastIndexOf(".");
|
||||||
|
String str = file.getOriginalFilename().substring(pos + 1).toLowerCase();
|
||||||
|
String filenameorg = file.getOriginalFilename().substring(0, pos);
|
||||||
|
//判断上传文件必须是zip
|
||||||
|
if (!str.equals("zip") && !str.equals("rar")) {
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
throw new JeroBootException("请上传zip格式的文件或rar格式的文件");
|
||||||
|
} else {
|
||||||
|
throw new JeroBootException("Please upload a zip file or rar file");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String path = uploadpath + File.separator + "modal" + File.separator + filenameorg + System.currentTimeMillis();
|
||||||
|
File saveDirectory = new File(path);
|
||||||
|
if (!saveDirectory.isDirectory()) {
|
||||||
|
saveDirectory.mkdir();
|
||||||
|
}
|
||||||
|
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(path + File.separator + file.getOriginalFilename()));
|
||||||
|
|
||||||
|
//解压缩
|
||||||
|
String zipEntryName = "";
|
||||||
|
if (str.equals("zip")) {
|
||||||
|
zipEntryName = FileUnZip.unZipFiles(path + File.separator + file.getOriginalFilename(), path);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// zipEntryName = FileRarUtils.rarUnCompress(path + File.separator + file.getOriginalFilename(), path);
|
||||||
|
}
|
||||||
|
//判断压缩包下是否只有一个文件夹
|
||||||
|
File fileTemp = new File(path);
|
||||||
|
int length = fileTemp.listFiles().length;
|
||||||
|
if (length > 2) {
|
||||||
|
//删除原上传文件
|
||||||
|
FileUnZip.deleteDir(saveDirectory);
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
throw new JeroBootException("压缩包中必须有且仅有一个文件夹,请重新上传");
|
||||||
|
} else {
|
||||||
|
throw new JeroBootException("There must be only one folder in the compressed package Please upload it again");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
File fileNew = new File(zipEntryName);
|
||||||
|
List<File> fileList = new ArrayList<>();
|
||||||
|
for (File file1 : fileNew.listFiles()) {
|
||||||
|
log.error("压缩包中的文件:" + file1.getName());
|
||||||
|
if (file1.getName().contains(".xls") || file1.getName().contains(".xlsx")) {
|
||||||
|
fileList.add(file1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fileList.size() == 0) {
|
||||||
|
//删除原上传文件
|
||||||
|
FileUnZip.deleteDir(saveDirectory);
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
throw new JeroBootException("压缩包根目录下没有excel作为导入数据,请重新上传");
|
||||||
|
} else {
|
||||||
|
throw new JeroBootException("Excel does not exist in the root directory of the compressed package Please upload it again");
|
||||||
|
}
|
||||||
|
} else if (fileList.size() > 1) {
|
||||||
|
//删除原上传文件
|
||||||
|
FileUnZip.deleteDir(saveDirectory);
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
throw new JeroBootException("压缩包根目录下仅能存在一个excel为导入数据,请重新上传");
|
||||||
|
} else {
|
||||||
|
throw new JeroBootException("Only one Excel file can be imported in the compressed package root directory. Please upload data again");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) {
|
||||||
|
log.error("otaId:" + otaId);
|
||||||
|
File template = new File("D://opt//ota//车型及功能备案.zip");
|
||||||
|
BufferedOutputStream os = null;
|
||||||
|
InputStream in = null;
|
||||||
|
try {
|
||||||
|
in = new FileInputStream(template);
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename=" + template.getName());
|
||||||
|
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||||
|
os = new BufferedOutputStream(response.getOutputStream());
|
||||||
|
int len;
|
||||||
|
while ((len = in.read()) != -1) {
|
||||||
|
os.write(len);
|
||||||
|
os.flush();
|
||||||
|
}
|
||||||
|
in.close();
|
||||||
|
os.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new JeroBootException("下载文件失败,请重试");
|
||||||
|
} finally {
|
||||||
|
IOUtils.closeQuietly(in);
|
||||||
|
IOUtils.closeQuietly(os);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ public class OtaBaCxLsjlServiceImpl extends ServiceImpl<OtaBaCxLsjlMapper, OtaBa
|
|||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxLsjl.setCreateTime(now);
|
otaBaCxLsjl.setCreateTime(now);
|
||||||
otaBaCxLsjl.setUpdateTime(now);
|
otaBaCxLsjl.setUpdateTime(now);
|
||||||
save(otaBaCxLsjl);
|
saveOrUpdate(otaBaCxLsjl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+71
-52
@@ -5,94 +5,113 @@ import com.jero.modules.ota.entity.OtaBaCxAqcs;
|
|||||||
import com.jero.modules.ota.entity.OtaBaCxQt;
|
import com.jero.modules.ota.entity.OtaBaCxQt;
|
||||||
import com.jero.modules.ota.mapper.OtaBaCxQtMapper;
|
import com.jero.modules.ota.mapper.OtaBaCxQtMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxQtService;
|
import com.jero.modules.ota.service.IOtaBaCxQtService;
|
||||||
|
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 OtaBaCxQtServiceImpl extends ServiceImpl<OtaBaCxQtMapper, OtaBaCxQt> implements IOtaBaCxQtService {
|
public class OtaBaCxQtServiceImpl extends ServiceImpl<OtaBaCxQtMapper, OtaBaCxQt> implements IOtaBaCxQtService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxQt
|
* @param otaBaCxQt
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(OtaBaCxQt otaBaCxQt) {
|
public void add(OtaBaCxQt otaBaCxQt) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxQt.setCreateTime(now);
|
if (null != otaBaCxQt) {
|
||||||
otaBaCxQt.setUpdateTime(now);
|
OtaBaCxQt otaBaCxQtOld = this.getByOtaId(otaBaCxQt.getOtaId());
|
||||||
save(otaBaCxQt);
|
if (null != otaBaCxQtOld) {
|
||||||
|
otaBaCxQt.setId(otaBaCxQtOld.getId());
|
||||||
|
} else {
|
||||||
|
otaBaCxQt.setCreateTime(now);
|
||||||
|
}
|
||||||
|
otaBaCxQt.setUpdateTime(now);
|
||||||
|
saveOrUpdate(otaBaCxQt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxQt
|
* @param otaBaCxQt
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(OtaBaCxQt otaBaCxQt) {
|
public void editById(OtaBaCxQt otaBaCxQt) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxQt.setUpdateTime(now);
|
otaBaCxQt.setUpdateTime(now);
|
||||||
saveOrUpdate(otaBaCxQt);
|
saveOrUpdate(otaBaCxQt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过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 OtaBaCxQt queryById(String id) {
|
public OtaBaCxQt queryById(String id) {
|
||||||
return getById(id);
|
return getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OtaBaCxQt> queryList() {
|
public List<OtaBaCxQt> queryList() {
|
||||||
return list();
|
return list();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OtaBaCxQt queryByOtaId(String otaId) {
|
public OtaBaCxQt queryByOtaId(String otaId, String otaIdT) {
|
||||||
LambdaQueryWrapper<OtaBaCxQt> queryWrapper = new LambdaQueryWrapper<>();
|
OtaBaCxQt res = getByOtaId(otaId);
|
||||||
queryWrapper.eq(OtaBaCxQt::getOtaId, otaId);
|
if (ObjectUtils.isEmpty(res)) {
|
||||||
OtaBaCxQt res = this.getOne(queryWrapper);
|
res = getByOtaId(otaIdT);
|
||||||
return res; }
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OtaBaCxQt getByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaCxQt> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaCxQt::getOtaId, otaId);
|
||||||
|
return this.getOne(queryWrapper, false);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ public class OtaBaCxSjmkServiceImpl extends ServiceImpl<OtaBaCxSjmkMapper, OtaBa
|
|||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxSjmk.setCreateTime(now);
|
otaBaCxSjmk.setCreateTime(now);
|
||||||
otaBaCxSjmk.setUpdateTime(now);
|
otaBaCxSjmk.setUpdateTime(now);
|
||||||
save(otaBaCxSjmk);
|
saveOrUpdate(otaBaCxSjmk);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+56
-46
@@ -1,89 +1,99 @@
|
|||||||
package com.jero.modules.ota.service.impl;
|
package com.jero.modules.ota.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||||
import com.jero.modules.ota.mapper.OtaBaCxTxjlMapper;
|
import com.jero.modules.ota.mapper.OtaBaCxTxjlMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 车型备案-填写记录表
|
* @Description: 车型备案-填写记录表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2023-03-25
|
* @Date: 2023-03-25
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class OtaBaCxTxjlServiceImpl extends ServiceImpl<OtaBaCxTxjlMapper, OtaBaCxTxjl> implements IOtaBaCxTxjlService {
|
public class OtaBaCxTxjlServiceImpl extends ServiceImpl<OtaBaCxTxjlMapper, OtaBaCxTxjl> implements IOtaBaCxTxjlService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxTxjl
|
* @param otaBaCxTxjl
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(OtaBaCxTxjl otaBaCxTxjl) {
|
public void add(OtaBaCxTxjl otaBaCxTxjl) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxTxjl.setCreateTime(now);
|
otaBaCxTxjl.setCreateTime(now);
|
||||||
otaBaCxTxjl.setUpdateTime(now);
|
otaBaCxTxjl.setUpdateTime(now);
|
||||||
save(otaBaCxTxjl);
|
saveOrUpdate(otaBaCxTxjl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxTxjl
|
* @param otaBaCxTxjl
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(OtaBaCxTxjl otaBaCxTxjl) {
|
public void editById(OtaBaCxTxjl otaBaCxTxjl) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxTxjl.setUpdateTime(now);
|
otaBaCxTxjl.setUpdateTime(now);
|
||||||
saveOrUpdate(otaBaCxTxjl);
|
saveOrUpdate(otaBaCxTxjl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过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 OtaBaCxTxjl queryById(String id) {
|
public OtaBaCxTxjl queryById(String id) {
|
||||||
return getById(id);
|
return getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OtaBaCxTxjl> queryList() {
|
public List<OtaBaCxTxjl> queryList() {
|
||||||
return list();
|
return list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OtaBaCxTxjl> queryByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaCxTxjl> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaCxTxjl::getOtaId, otaId);
|
||||||
|
List<OtaBaCxTxjl> res = this.list(queryWrapper);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+70
-52
@@ -5,95 +5,113 @@ import com.jero.modules.ota.entity.OtaBaCxJbxx;
|
|||||||
import com.jero.modules.ota.entity.OtaBaCxZxsjyq;
|
import com.jero.modules.ota.entity.OtaBaCxZxsjyq;
|
||||||
import com.jero.modules.ota.mapper.OtaBaCxZxsjyqMapper;
|
import com.jero.modules.ota.mapper.OtaBaCxZxsjyqMapper;
|
||||||
import com.jero.modules.ota.service.IOtaBaCxZxsjyqService;
|
import com.jero.modules.ota.service.IOtaBaCxZxsjyqService;
|
||||||
|
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 OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, OtaBaCxZxsjyq> implements IOtaBaCxZxsjyqService {
|
public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, OtaBaCxZxsjyq> implements IOtaBaCxZxsjyqService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
* @param otaBaCxZxsjyq
|
* @param otaBaCxZxsjyq
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(OtaBaCxZxsjyq otaBaCxZxsjyq) {
|
public void add(OtaBaCxZxsjyq otaBaCxZxsjyq) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxZxsjyq.setCreateTime(now);
|
if (otaBaCxZxsjyq.getOtaId() != null) {
|
||||||
|
OtaBaCxZxsjyq otaBaCxZxsjyqOld = getByOtaId(otaBaCxZxsjyq.getOtaId());
|
||||||
|
if (otaBaCxZxsjyqOld != null) {
|
||||||
|
otaBaCxZxsjyq.setId(otaBaCxZxsjyqOld.getId());
|
||||||
|
} else {
|
||||||
|
otaBaCxZxsjyq.setCreateTime(now);
|
||||||
|
}
|
||||||
|
}
|
||||||
otaBaCxZxsjyq.setUpdateTime(now);
|
otaBaCxZxsjyq.setUpdateTime(now);
|
||||||
save(otaBaCxZxsjyq);
|
saveOrUpdate(otaBaCxZxsjyq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param otaBaCxZxsjyq
|
* @param otaBaCxZxsjyq
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(OtaBaCxZxsjyq otaBaCxZxsjyq) {
|
public void editById(OtaBaCxZxsjyq otaBaCxZxsjyq) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
otaBaCxZxsjyq.setUpdateTime(now);
|
otaBaCxZxsjyq.setUpdateTime(now);
|
||||||
saveOrUpdate(otaBaCxZxsjyq);
|
saveOrUpdate(otaBaCxZxsjyq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过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 OtaBaCxZxsjyq queryById(String id) {
|
public OtaBaCxZxsjyq queryById(String id) {
|
||||||
return getById(id);
|
return getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OtaBaCxZxsjyq> queryList() {
|
public List<OtaBaCxZxsjyq> queryList() {
|
||||||
return list();
|
return list();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OtaBaCxZxsjyq queryByOtaId(String otaId){
|
public OtaBaCxZxsjyq queryByOtaId(String otaId, String otaIdT) {
|
||||||
LambdaQueryWrapper<OtaBaCxZxsjyq> queryWrapper = new LambdaQueryWrapper<>();
|
//判断是否保存过,否则查询模版数据回显
|
||||||
queryWrapper.eq(OtaBaCxZxsjyq::getOtaId, otaId);
|
OtaBaCxZxsjyq res = getByOtaId(otaId);
|
||||||
OtaBaCxZxsjyq res = this.getOne(queryWrapper);
|
if (ObjectUtils.isEmpty(res)) {
|
||||||
return res;
|
res = getByOtaId(otaIdT);
|
||||||
}
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
private OtaBaCxZxsjyq getByOtaId(String otaId) {
|
||||||
|
LambdaQueryWrapper<OtaBaCxZxsjyq> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OtaBaCxZxsjyq::getOtaId, otaId);
|
||||||
|
return this.getOne(queryWrapper, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user