Merge branch 'dev_2nd_LCYH' of http://git.hzwlsoft.com/laws-nio/laws-weilai into dev_2nd_LCYH
This commit is contained in:
+11
-5
@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.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.*;
|
||||||
@@ -53,11 +54,16 @@ public class OtaBaCxLsjlController extends JeroController<OtaBaCxLsjl, IOtaBaCxL
|
|||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
QueryWrapper<OtaBaCxLsjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxLsjl, req.getParameterMap());
|
Object obj = req.getParameterMap().get("otaId");
|
||||||
queryWrapper.orderByDesc("create_time");
|
if(ObjectUtils.isNotEmpty(obj)){
|
||||||
Page<OtaBaCxLsjl> page = new Page<OtaBaCxLsjl>(pageNo, pageSize);
|
QueryWrapper<OtaBaCxLsjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxLsjl, req.getParameterMap());
|
||||||
IPage<OtaBaCxLsjl> pageList = otaBaCxLsjlService.page(page, queryWrapper);
|
queryWrapper.orderByDesc("create_time");
|
||||||
return Result.OK(pageList);
|
Page<OtaBaCxLsjl> page = new Page<OtaBaCxLsjl>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaCxLsjl> pageList = otaBaCxLsjlService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}else{
|
||||||
|
return Result.OK();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+128
-121
@@ -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.OtaBaSjLsjl;
|
import com.jero.modules.ota.entity.OtaBaSjLsjl;
|
||||||
@@ -13,6 +14,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -22,147 +24,152 @@ 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/otaBaSjLsjl")
|
@RequestMapping("/ota/otaBaSjLsjl")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OtaBaSjLsjlController extends JeroController<OtaBaSjLsjl, IOtaBaSjLsjlService> {
|
public class OtaBaSjLsjlController extends JeroController<OtaBaSjLsjl, IOtaBaSjLsjlService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOtaBaSjLsjlService otaBaSjLsjlService;
|
private IOtaBaSjLsjlService otaBaSjLsjlService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param otaBaSjLsjl
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-历史记录-分页列表查询")
|
|
||||||
@ApiOperation(value="升级备案-历史记录-分页列表查询", notes="升级备案-历史记录-分页列表查询")
|
|
||||||
@GetMapping(value = "/page")
|
|
||||||
public Result<?> queryPageList(OtaBaSjLsjl otaBaSjLsjl,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<OtaBaSjLsjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjLsjl, req.getParameterMap());
|
|
||||||
queryWrapper.orderByDesc("create_time");
|
|
||||||
Page<OtaBaSjLsjl> page = new Page<OtaBaSjLsjl>(pageNo, pageSize);
|
|
||||||
IPage<OtaBaSjLsjl> pageList = otaBaSjLsjlService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @param otaBaSjLsjl
|
||||||
*/
|
* @param pageNo
|
||||||
@AutoLog(value = "升级备案-历史记录-列表查询")
|
* @param pageSize
|
||||||
@ApiOperation(value="升级备案-历史记录-列表查询", notes="升级备案-历史记录-列表查询")
|
* @param req
|
||||||
@GetMapping(value = "/list")
|
* @return
|
||||||
public Result<List<OtaBaSjLsjl>> queryList() {
|
*/
|
||||||
|
@AutoLog(value = "升级备案-历史记录-分页列表查询")
|
||||||
|
@ApiOperation(value = "升级备案-历史记录-分页列表查询", notes = "升级备案-历史记录-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(OtaBaSjLsjl otaBaSjLsjl,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
Object obj = req.getParameterMap().get("otaId");
|
||||||
|
if (ObjectUtils.isNotEmpty(obj)) {
|
||||||
|
QueryWrapper<OtaBaSjLsjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjLsjl, req.getParameterMap());
|
||||||
|
queryWrapper.orderByDesc("create_time");
|
||||||
|
Page<OtaBaSjLsjl> page = new Page<OtaBaSjLsjl>(pageNo, pageSize);
|
||||||
|
IPage<OtaBaSjLsjl> pageList = otaBaSjLsjlService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
} else {
|
||||||
|
return Result.OK();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-历史记录-列表查询")
|
||||||
|
@ApiOperation(value = "升级备案-历史记录-列表查询", notes = "升级备案-历史记录-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<OtaBaSjLsjl>> queryList(@RequestBody OtaBaSjLsjl OtaBaSjLsjl) {
|
||||||
List<OtaBaSjLsjl> list = otaBaSjLsjlService.queryList();
|
List<OtaBaSjLsjl> list = otaBaSjLsjlService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param otaBaSjLsjl
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-历史记录-添加")
|
|
||||||
@ApiOperation(value="升级备案-历史记录-添加", notes="升级备案-历史记录-添加")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<?> add(@Validated @RequestBody OtaBaSjLsjl otaBaSjLsjl) {
|
|
||||||
otaBaSjLsjlService.add(otaBaSjLsjl);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param otaBaSjLsjl
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-历史记录-编辑")
|
|
||||||
@ApiOperation(value="升级备案-历史记录-编辑", notes="升级备案-历史记录-编辑")
|
|
||||||
@PutMapping(value = "/edit")
|
|
||||||
public Result<?> edit(@Validated @RequestBody OtaBaSjLsjl otaBaSjLsjl) {
|
|
||||||
otaBaSjLsjlService.editById(otaBaSjLsjl);
|
|
||||||
return Result.OK("编辑成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id删除
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-历史记录-通过id删除")
|
|
||||||
@ApiOperation(value="升级备案-历史记录-通过id删除", notes="升级备案-历史记录-通过id删除")
|
|
||||||
@DeleteMapping(value = "/delete")
|
|
||||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
|
||||||
otaBaSjLsjlService.deleteById(id);
|
|
||||||
return Result.OK("删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-历史记录-批量删除")
|
|
||||||
@ApiOperation(value="升级备案-历史记录-批量删除", notes="升级备案-历史记录-批量删除")
|
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
|
||||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
||||||
this.otaBaSjLsjlService.deleteByIds(Arrays.asList(ids.split(",")));
|
|
||||||
return Result.OK("批量删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id查询
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "升级备案-历史记录-通过id查询")
|
|
||||||
@ApiOperation(value="升级备案-历史记录-通过id查询", notes="升级备案-历史记录-通过id查询")
|
|
||||||
@GetMapping(value = "/queryById")
|
|
||||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
|
||||||
OtaBaSjLsjl otaBaSjLsjl = otaBaSjLsjlService.queryById(id);
|
|
||||||
if(otaBaSjLsjl==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(otaBaSjLsjl);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 添加
|
||||||
*
|
*
|
||||||
* @param request
|
* @param otaBaSjLsjl
|
||||||
* @param otaBaSjLsjl
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@AutoLog(value = "升级备案-历史记录-添加")
|
||||||
|
@ApiOperation(value = "升级备案-历史记录-添加", notes = "升级备案-历史记录-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody OtaBaSjLsjl otaBaSjLsjl) {
|
||||||
|
otaBaSjLsjlService.add(otaBaSjLsjl);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param otaBaSjLsjl
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-历史记录-编辑")
|
||||||
|
@ApiOperation(value = "升级备案-历史记录-编辑", notes = "升级备案-历史记录-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody OtaBaSjLsjl otaBaSjLsjl) {
|
||||||
|
otaBaSjLsjlService.editById(otaBaSjLsjl);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-历史记录-通过id删除")
|
||||||
|
@ApiOperation(value = "升级备案-历史记录-通过id删除", notes = "升级备案-历史记录-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
otaBaSjLsjlService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-历史记录-批量删除")
|
||||||
|
@ApiOperation(value = "升级备案-历史记录-批量删除", notes = "升级备案-历史记录-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
|
this.otaBaSjLsjlService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "升级备案-历史记录-通过id查询")
|
||||||
|
@ApiOperation(value = "升级备案-历史记录-通过id查询", notes = "升级备案-历史记录-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
OtaBaSjLsjl otaBaSjLsjl = otaBaSjLsjlService.queryById(id);
|
||||||
|
if (otaBaSjLsjl == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(otaBaSjLsjl);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param otaBaSjLsjl
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjLsjl otaBaSjLsjl) {
|
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjLsjl otaBaSjLsjl) {
|
||||||
return super.exportXls(request, otaBaSjLsjl, OtaBaSjLsjl.class, "升级备案-历史记录");
|
return super.exportXls(request, otaBaSjLsjl, OtaBaSjLsjl.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, OtaBaSjLsjl.class);
|
return super.importExcel(request, response, OtaBaSjLsjl.class);
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ public class OtaBaSjLsjl implements Serializable {
|
|||||||
/**数据状态*/
|
/**数据状态*/
|
||||||
@Excel(name = "数据状态", width = 15)
|
@Excel(name = "数据状态", width = 15)
|
||||||
@ApiModelProperty(value = "数据状态")
|
@ApiModelProperty(value = "数据状态")
|
||||||
|
@Dict(dicCode = "recordstatus")
|
||||||
private java.lang.String sjzt;
|
private java.lang.String sjzt;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user