feat: 稽查整改计划自动生成
This commit is contained in:
+176
@@ -0,0 +1,176 @@
|
||||
package com.jero.modules.laws.enterprise.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectRectifyPlan;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardInspectRectifyPlanService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 企标稽查执行计划
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-11-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="企标稽查执行计划")
|
||||
@RestController
|
||||
@RequestMapping("/laws.enterprise/enterpriseStandardInspectRectifyPlan")
|
||||
@Slf4j
|
||||
public class EnterpriseStandardInspectRectifyPlanController extends JeroController<EnterpriseStandardInspectRectifyPlan, EnterpriseStandardInspectRectifyPlanService> {
|
||||
@Autowired
|
||||
private EnterpriseStandardInspectRectifyPlanService enterpriseStandardInspectRectifyPlanService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企标稽查执行计划-分页列表查询")
|
||||
@ApiOperation(value="企标稽查执行计划-分页列表查询", notes="企标稽查执行计划-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<EnterpriseStandardInspectRectifyPlan>> queryPageList(EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<EnterpriseStandardInspectRectifyPlan> pageList = enterpriseStandardInspectRectifyPlanService.queryPage(enterpriseStandardInspectRectifyPlan, pageNo, pageSize, req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企标稽查执行计划-列表查询")
|
||||
@ApiOperation(value="企标稽查执行计划-列表查询", notes="企标稽查执行计划-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<EnterpriseStandardInspectRectifyPlan>> queryList(EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan, HttpServletRequest req) {
|
||||
List<EnterpriseStandardInspectRectifyPlan> list = enterpriseStandardInspectRectifyPlanService.queryList(enterpriseStandardInspectRectifyPlan, req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企标稽查执行计划-添加")
|
||||
@ApiOperation(value="企标稽查执行计划-添加", notes="企标稽查执行计划-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<T> add(@Validated @RequestBody EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan) {
|
||||
enterpriseStandardInspectRectifyPlanService.add(enterpriseStandardInspectRectifyPlan);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企标稽查执行计划-编辑")
|
||||
@ApiOperation(value="企标稽查执行计划-编辑", notes="企标稽查执行计划-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<T> edit(@Validated @RequestBody EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan) {
|
||||
enterpriseStandardInspectRectifyPlanService.editById(enterpriseStandardInspectRectifyPlan);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企标稽查执行计划-通过id删除")
|
||||
@ApiOperation(value="企标稽查执行计划-通过id删除", notes="企标稽查执行计划-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
enterpriseStandardInspectRectifyPlanService.deleteById(map.get("id"));
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企标稽查执行计划-批量删除")
|
||||
@ApiOperation(value="企标稽查执行计划-批量删除", notes="企标稽查执行计划-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
this.enterpriseStandardInspectRectifyPlanService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企标稽查执行计划-通过id查询")
|
||||
@ApiOperation(value="企标稽查执行计划-通过id查询", notes="企标稽查执行计划-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<EnterpriseStandardInspectRectifyPlan> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan = enterpriseStandardInspectRectifyPlanService.queryById(id);
|
||||
if(enterpriseStandardInspectRectifyPlan==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(enterpriseStandardInspectRectifyPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan) {
|
||||
return super.exportXls(request, enterpriseStandardInspectRectifyPlan, EnterpriseStandardInspectRectifyPlan.class, "企标稽查执行计划");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<EnterpriseStandardInspectRectifyPlan> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, EnterpriseStandardInspectRectifyPlan.class);
|
||||
}
|
||||
|
||||
}
|
||||
+63
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectRectifyPlan;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
* @description 针对表【laws_enterprise_standard_inspect_rectify_plan】的数据库操作Service
|
||||
@@ -19,4 +22,64 @@ public interface EnterpriseStandardInspectRectifyPlanService extends IService<En
|
||||
* @return
|
||||
*/
|
||||
IPage<EnterpriseStandardInspectRectifyPlan> getRectifyPlan(String inspectId, Integer pageNo, Integer pageSize);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
IPage<EnterpriseStandardInspectRectifyPlan> queryPage(EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<EnterpriseStandardInspectRectifyPlan> queryList(EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @return
|
||||
*/
|
||||
void add(EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @return
|
||||
*/
|
||||
void editById(EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
EnterpriseStandardInspectRectifyPlan queryById(String id);
|
||||
}
|
||||
|
||||
+93
@@ -1,10 +1,12 @@
|
||||
package com.jero.modules.laws.enterprise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectRectifyPlan;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardInspectVo;
|
||||
@@ -15,6 +17,8 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -41,6 +45,95 @@ public class EnterpriseStandardInspectRectifyPlanServiceImpl extends ServiceImpl
|
||||
esInspectRectifyPlanMapper.page(page, inspectId);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<EnterpriseStandardInspectRectifyPlan> queryPage(EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<EnterpriseStandardInspectRectifyPlan> queryWrapper = QueryGenerator.initQueryWrapper(enterpriseStandardInspectRectifyPlan, req.getParameterMap());
|
||||
Page<EnterpriseStandardInspectRectifyPlan> page = new Page<>(pageNo, pageSize);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<EnterpriseStandardInspectRectifyPlan> queryList(EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan, HttpServletRequest req) {
|
||||
return list(QueryGenerator.initQueryWrapper(enterpriseStandardInspectRectifyPlan, req.getParameterMap()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan) {
|
||||
Date now = new Date();
|
||||
enterpriseStandardInspectRectifyPlan.setCreateTime(now);
|
||||
enterpriseStandardInspectRectifyPlan.setUpdateTime(now);
|
||||
save(enterpriseStandardInspectRectifyPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param enterpriseStandardInspectRectifyPlan
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan) {
|
||||
Date now = new Date();
|
||||
enterpriseStandardInspectRectifyPlan.setUpdateTime(now);
|
||||
saveOrUpdate(enterpriseStandardInspectRectifyPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过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 EnterpriseStandardInspectRectifyPlan queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user