!32 fix(flow): 修复配置前缀错误导致 props 为 null 及流程变量获取失败
* fix(flow): 修复配置前缀错误导致 props 为 null 及流程变量获取失败 * fix(flow): 修复 inspectImproveProps 字段初始化 NPE 问题 * feat(flow): 新增巡视整改流程党群领导审批表达式方法 * feat(dqinspecttask): 新增工作进展反馈子表独立Controller接口
This commit is contained in:
+166
@@ -0,0 +1,166 @@
|
||||
package org.jeecg.modules.demo.dqinspecttask.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectProgress;
|
||||
import org.jeecg.modules.demo.dqinspecttask.service.IDqInspectProgressService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
|
||||
/**
|
||||
* @Description: 工作进展反馈
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-05-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Tag(name="工作进展反馈")
|
||||
@RestController
|
||||
@RequestMapping("/dqinspecttask/dqInspectTask")
|
||||
@Slf4j
|
||||
public class DqInspectProgressController extends JeecgController<DqInspectProgress, IDqInspectProgressService> {
|
||||
@Autowired
|
||||
private IDqInspectProgressService dqInspectProgressService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param dqInspectProgress
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary="工作进展反馈-分页列表查询")
|
||||
@GetMapping(value = "/listDqInspectProgressByMainId")
|
||||
public Result<IPage<DqInspectProgress>> queryPageList(DqInspectProgress dqInspectProgress,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<DqInspectProgress> queryWrapper = QueryGenerator.initQueryWrapper(dqInspectProgress, req.getParameterMap());
|
||||
Page<DqInspectProgress> page = new Page<DqInspectProgress>(pageNo, pageSize);
|
||||
IPage<DqInspectProgress> pageList = dqInspectProgressService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param dqInspectProgress
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "工作进展反馈-添加")
|
||||
@Operation(summary="工作进展反馈-添加")
|
||||
@PostMapping(value = "/addDqInspectProgress")
|
||||
public Result<String> add(@RequestBody DqInspectProgress dqInspectProgress) {
|
||||
dqInspectProgressService.save(dqInspectProgress);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param dqInspectProgress
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "工作进展反馈-编辑")
|
||||
@Operation(summary="工作进展反馈-编辑")
|
||||
@PostMapping(value = "/editDqInspectProgress")
|
||||
public Result<String> edit(@RequestBody DqInspectProgress dqInspectProgress) {
|
||||
dqInspectProgressService.updateById(dqInspectProgress);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "工作进展反馈-通过id删除")
|
||||
@Operation(summary="工作进展反馈-通过id删除")
|
||||
@DeleteMapping(value = "/deleteDqInspectProgress")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
dqInspectProgressService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "工作进展反馈-批量删除")
|
||||
@Operation(summary="工作进展反馈-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatchDqInspectProgress")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.dqInspectProgressService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary="工作进展反馈-通过id查询")
|
||||
@GetMapping(value = "/queryDqInspectProgressById")
|
||||
public Result<DqInspectProgress> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
DqInspectProgress dqInspectProgress = dqInspectProgressService.getById(id);
|
||||
if(dqInspectProgress==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(dqInspectProgress);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param dqInspectProgress
|
||||
*/
|
||||
@RequestMapping(value = "/exportDqInspectProgress")
|
||||
public ModelAndView exportXls(HttpServletRequest request, DqInspectProgress dqInspectProgress) {
|
||||
return super.exportXls(request, dqInspectProgress, DqInspectProgress.class, "工作进展反馈");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importDqInspectProgress", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, DqInspectProgress.class);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user