Merge branch 'master' into dev
This commit is contained in:
+40
-7
@@ -40,6 +40,7 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
/**
|
/**
|
||||||
* @Description: 党委会
|
* @Description: 党委会
|
||||||
@@ -53,6 +54,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class BgPartymatterController extends JeecgController<BgPartymatter, IBgPartymatterService> {
|
public class BgPartymatterController extends JeecgController<BgPartymatter, IBgPartymatterService> {
|
||||||
|
|
||||||
|
private static final String DEFAULT_MEETING_TYPE = "party";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBgPartymatterService bgPartymatterService;
|
private IBgPartymatterService bgPartymatterService;
|
||||||
|
|
||||||
@@ -101,12 +104,13 @@ public class BgPartymatterController extends JeecgController<BgPartymatter, IBgP
|
|||||||
*/
|
*/
|
||||||
@AutoLog(value = "党委会-添加")
|
@AutoLog(value = "党委会-添加")
|
||||||
@Operation(summary="党委会-添加")
|
@Operation(summary="党委会-添加")
|
||||||
@RequiresPermissions("bgpartymatter:bg_partymatter:add")
|
@RequiresPermissions(value = {"bgpartymatter:bg_partymatter:add", "bgofficematter:bg_officematter:add"}, logical = Logical.OR)
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody BgPartymatter bgPartymatter) {
|
public Result<String> add(@RequestBody BgPartymatter bgPartymatter) {
|
||||||
if (oConvertUtils.isEmpty(bgPartymatter.getDelFlag())) {
|
if (oConvertUtils.isEmpty(bgPartymatter.getDelFlag())) {
|
||||||
bgPartymatter.setDelFlag("0");
|
bgPartymatter.setDelFlag("0");
|
||||||
}
|
}
|
||||||
|
fillDefaultMeetingTypeForCreate(bgPartymatter);
|
||||||
fillGeneratedNumber(bgPartymatter);
|
fillGeneratedNumber(bgPartymatter);
|
||||||
bgPartymatterService.save(bgPartymatter);
|
bgPartymatterService.save(bgPartymatter);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
@@ -119,9 +123,10 @@ public class BgPartymatterController extends JeecgController<BgPartymatter, IBgP
|
|||||||
*/
|
*/
|
||||||
@AutoLog(value = "党委会-编辑")
|
@AutoLog(value = "党委会-编辑")
|
||||||
@Operation(summary="党委会-编辑")
|
@Operation(summary="党委会-编辑")
|
||||||
@RequiresPermissions("bgpartymatter:bg_partymatter:edit")
|
@RequiresPermissions(value = {"bgpartymatter:bg_partymatter:edit", "bgofficematter:bg_officematter:edit"}, logical = Logical.OR)
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
public Result<String> edit(@RequestBody BgPartymatter bgPartymatter) {
|
public Result<String> edit(@RequestBody BgPartymatter bgPartymatter) {
|
||||||
|
fillMeetingTypeForUpdate(bgPartymatter);
|
||||||
fillGeneratedNumber(bgPartymatter);
|
fillGeneratedNumber(bgPartymatter);
|
||||||
bgPartymatterService.updateById(bgPartymatter);
|
bgPartymatterService.updateById(bgPartymatter);
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
@@ -142,12 +147,39 @@ public class BgPartymatterController extends JeecgController<BgPartymatter, IBgP
|
|||||||
return Result.error("流程实例ID不能为空");
|
return Result.error("流程实例ID不能为空");
|
||||||
}
|
}
|
||||||
String varField = oConvertUtils.isEmpty(dto.getVarField()) ? "json_data" : dto.getVarField();
|
String varField = oConvertUtils.isEmpty(dto.getVarField()) ? "json_data" : dto.getVarField();
|
||||||
|
fillMeetingTypeForUpdate(dto.getFormData());
|
||||||
fillGeneratedNumber(dto.getFormData());
|
fillGeneratedNumber(dto.getFormData());
|
||||||
bgPartymatterService.updateById(dto.getFormData());
|
bgPartymatterService.updateById(dto.getFormData());
|
||||||
runtimeService.setVariable(dto.getProcessInstanceId(), varField, JSONObject.toJSONString(dto.getFormData()));
|
runtimeService.setVariable(dto.getProcessInstanceId(), varField, JSONObject.toJSONString(dto.getFormData()));
|
||||||
return Result.OK("保存成功");
|
return Result.OK("保存成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增入口没有会议类型时默认归入党委会,兼容旧页面和直接接口调用。
|
||||||
|
*/
|
||||||
|
private void fillDefaultMeetingTypeForCreate(BgPartymatter bgPartymatter) {
|
||||||
|
if (bgPartymatter != null && oConvertUtils.isEmpty(bgPartymatter.getMeetingType())) {
|
||||||
|
bgPartymatter.setMeetingType(DEFAULT_MEETING_TYPE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部分字段更新不传 meetingType 时沿用数据库原值,避免所务会被默认值覆盖为党委会。
|
||||||
|
*/
|
||||||
|
private void fillMeetingTypeForUpdate(BgPartymatter bgPartymatter) {
|
||||||
|
if (bgPartymatter == null || oConvertUtils.isNotEmpty(bgPartymatter.getMeetingType())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (oConvertUtils.isNotEmpty(bgPartymatter.getId())) {
|
||||||
|
BgPartymatter oldData = bgPartymatterService.getById(bgPartymatter.getId());
|
||||||
|
if (oldData != null && oConvertUtils.isNotEmpty(oldData.getMeetingType())) {
|
||||||
|
bgPartymatter.setMeetingType(oldData.getMeetingType());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bgPartymatter.setMeetingType(DEFAULT_MEETING_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据会议时间和议题序号生成业务序号,规则:yyyyMMdd-议题序号。
|
* 根据会议时间和议题序号生成业务序号,规则:yyyyMMdd-议题序号。
|
||||||
* 前端会即时回显,后端保存前再次生成,保证接口调用和流程保存数据一致。
|
* 前端会即时回显,后端保存前再次生成,保证接口调用和流程保存数据一致。
|
||||||
@@ -167,7 +199,7 @@ public class BgPartymatterController extends JeecgController<BgPartymatter, IBgP
|
|||||||
*/
|
*/
|
||||||
@AutoLog(value = "党委会-通过id删除")
|
@AutoLog(value = "党委会-通过id删除")
|
||||||
@Operation(summary="党委会-通过id删除")
|
@Operation(summary="党委会-通过id删除")
|
||||||
@RequiresPermissions("bgpartymatter:bg_partymatter:delete")
|
@RequiresPermissions(value = {"bgpartymatter:bg_partymatter:delete", "bgofficematter:bg_officematter:delete"}, logical = Logical.OR)
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
bgPartymatterService.delMain(id);
|
bgPartymatterService.delMain(id);
|
||||||
@@ -181,7 +213,7 @@ public class BgPartymatterController extends JeecgController<BgPartymatter, IBgP
|
|||||||
*/
|
*/
|
||||||
@AutoLog(value = "党委会-批量删除")
|
@AutoLog(value = "党委会-批量删除")
|
||||||
@Operation(summary="党委会-批量删除")
|
@Operation(summary="党委会-批量删除")
|
||||||
@RequiresPermissions("bgpartymatter:bg_partymatter:deleteBatch")
|
@RequiresPermissions(value = {"bgpartymatter:bg_partymatter:deleteBatch", "bgofficematter:bg_officematter:deleteBatch"}, logical = Logical.OR)
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
this.bgPartymatterService.delBatchMain(Arrays.asList(ids.split(",")));
|
this.bgPartymatterService.delBatchMain(Arrays.asList(ids.split(",")));
|
||||||
@@ -192,17 +224,18 @@ public class BgPartymatterController extends JeecgController<BgPartymatter, IBgP
|
|||||||
* 导出
|
* 导出
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("bgpartymatter:bg_partymatter:exportXls")
|
@RequiresPermissions(value = {"bgpartymatter:bg_partymatter:exportXls", "bgofficematter:bg_officematter:exportXls"}, logical = Logical.OR)
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, BgPartymatter bgPartymatter) {
|
public ModelAndView exportXls(HttpServletRequest request, BgPartymatter bgPartymatter) {
|
||||||
return super.exportXls(request, bgPartymatter, BgPartymatter.class, "党委会");
|
String exportName = "office".equals(bgPartymatter.getMeetingType()) ? "所务会" : "党委会";
|
||||||
|
return super.exportXls(request, bgPartymatter, BgPartymatter.class, exportName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入
|
* 导入
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("bgpartymatter:bg_partymatter:importExcel")
|
@RequiresPermissions(value = {"bgpartymatter:bg_partymatter:importExcel", "bgofficematter:bg_officematter:importExcel"}, logical = Logical.OR)
|
||||||
@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, BgPartymatter.class);
|
return super.importExcel(request, response, BgPartymatter.class);
|
||||||
|
|||||||
+4
@@ -57,6 +57,10 @@ public class BgPartymatter implements Serializable {
|
|||||||
@Excel(name = "年份", width = 15)
|
@Excel(name = "年份", width = 15)
|
||||||
@Schema(description = "年份")
|
@Schema(description = "年份")
|
||||||
private java.lang.String year;
|
private java.lang.String year;
|
||||||
|
/**会议类型*/
|
||||||
|
@Schema(description = "会议类型:party党委会,office所务会")
|
||||||
|
@TableField("meeting_type")
|
||||||
|
private java.lang.String meetingType;
|
||||||
/**密级*/
|
/**密级*/
|
||||||
@Excel(name = "密级", width = 15)
|
@Excel(name = "密级", width = 15)
|
||||||
@Dict(dicCode = "secret_level")
|
@Dict(dicCode = "secret_level")
|
||||||
|
|||||||
+21
@@ -193,6 +193,27 @@ public class DqInspectProblemController extends JeecgController<DqInspectProblem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据当前节点类型获取合法父级候选。
|
||||||
|
*
|
||||||
|
* @param nodeType 当前节点类型
|
||||||
|
* @return 父级候选树
|
||||||
|
*/
|
||||||
|
@Operation(summary="dq_inspect_problem-父级候选")
|
||||||
|
@GetMapping(value = "/parentOptions")
|
||||||
|
public Result<List<Map<String, Object>>> parentOptions(@RequestParam(name = "nodeType") String nodeType) {
|
||||||
|
return Result.OK(dqInspectProblemService.queryParentOptions(nodeType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务清单选择具体问题时使用,分类和面上问题仅用于分组展示,不可选择。
|
||||||
|
*/
|
||||||
|
@Operation(summary="dq_inspect_problem-具体问题候选")
|
||||||
|
@GetMapping(value = "/specificOptions")
|
||||||
|
public Result<List<Map<String, Object>>> specificOptions() {
|
||||||
|
return Result.OK(dqInspectProblemService.querySpecificOptions());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
|
|||||||
+22
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import org.jeecg.common.exception.JeecgBootException;
|
import org.jeecg.common.exception.JeecgBootException;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: dq_inspect_problem
|
* @Description: dq_inspect_problem
|
||||||
@@ -24,6 +25,12 @@ public interface IDqInspectProblemService extends IService<DqInspectProblem> {
|
|||||||
/**树节点无子节点状态值*/
|
/**树节点无子节点状态值*/
|
||||||
public static final String NOCHILD = "0";
|
public static final String NOCHILD = "0";
|
||||||
|
|
||||||
|
String NODE_TYPE_CATEGORY = "category";
|
||||||
|
|
||||||
|
String NODE_TYPE_SURFACE = "surface";
|
||||||
|
|
||||||
|
String NODE_TYPE_SPECIFIC = "specific";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增节点
|
* 新增节点
|
||||||
*
|
*
|
||||||
@@ -71,4 +78,19 @@ public interface IDqInspectProblemService extends IService<DqInspectProblem> {
|
|||||||
*/
|
*/
|
||||||
List<SelectTreeModel> queryListByPid(String pid);
|
List<SelectTreeModel> queryListByPid(String pid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据当前节点类型,返回合法的父级候选树。
|
||||||
|
*
|
||||||
|
* @param nodeType 当前节点类型
|
||||||
|
* @return 父级候选树
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> queryParentOptions(String nodeType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回任务清单可选择的具体问题树:问题分类 -> 面上问题 -> 具体问题。
|
||||||
|
*
|
||||||
|
* @return 具体问题候选树
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> querySpecificOptions();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+179
-1
@@ -12,7 +12,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
@@ -27,6 +29,7 @@ public class DqInspectProblemServiceImpl extends ServiceImpl<DqInspectProblemMap
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addDqInspectProblem(DqInspectProblem dqInspectProblem) {
|
public void addDqInspectProblem(DqInspectProblem dqInspectProblem) {
|
||||||
|
validateAndNormalizeNode(dqInspectProblem, false);
|
||||||
//新增时设置hasChild为0
|
//新增时设置hasChild为0
|
||||||
dqInspectProblem.setHasChild(IDqInspectProblemService.NOCHILD);
|
dqInspectProblem.setHasChild(IDqInspectProblemService.NOCHILD);
|
||||||
if(oConvertUtils.isEmpty(dqInspectProblem.getPid())){
|
if(oConvertUtils.isEmpty(dqInspectProblem.getPid())){
|
||||||
@@ -48,9 +51,12 @@ public class DqInspectProblemServiceImpl extends ServiceImpl<DqInspectProblemMap
|
|||||||
if(entity==null) {
|
if(entity==null) {
|
||||||
throw new JeecgBootException("未找到对应实体");
|
throw new JeecgBootException("未找到对应实体");
|
||||||
}
|
}
|
||||||
|
validateAndNormalizeNode(dqInspectProblem, true);
|
||||||
|
// hasChild 由树结构维护,忽略前端提交值,避免编辑时误改父子状态。
|
||||||
|
dqInspectProblem.setHasChild(entity.getHasChild());
|
||||||
String old_pid = entity.getPid();
|
String old_pid = entity.getPid();
|
||||||
String new_pid = dqInspectProblem.getPid();
|
String new_pid = dqInspectProblem.getPid();
|
||||||
if(!old_pid.equals(new_pid)) {
|
if(!trimToEmpty(old_pid).equals(trimToEmpty(new_pid))) {
|
||||||
updateOldParentNode(old_pid);
|
updateOldParentNode(old_pid);
|
||||||
if(oConvertUtils.isEmpty(new_pid)){
|
if(oConvertUtils.isEmpty(new_pid)){
|
||||||
dqInspectProblem.setPid(IDqInspectProblemService.ROOT_PID_VALUE);
|
dqInspectProblem.setPid(IDqInspectProblemService.ROOT_PID_VALUE);
|
||||||
@@ -139,6 +145,178 @@ public class DqInspectProblemServiceImpl extends ServiceImpl<DqInspectProblemMap
|
|||||||
return baseMapper.queryListByPid(pid, null);
|
return baseMapper.queryListByPid(pid, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> queryParentOptions(String nodeType) {
|
||||||
|
if (NODE_TYPE_SURFACE.equals(nodeType)) {
|
||||||
|
return queryParentNodesByType(NODE_TYPE_CATEGORY);
|
||||||
|
}
|
||||||
|
if (NODE_TYPE_SPECIFIC.equals(nodeType)) {
|
||||||
|
return querySurfaceParentTree();
|
||||||
|
}
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> querySpecificOptions() {
|
||||||
|
return querySpecificProblemTree();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题清单固定为三层:问题分类 -> 面上问题 -> 具体问题。
|
||||||
|
* 服务层兜底校验层级,避免绕过前端直接提交非法关系。
|
||||||
|
*/
|
||||||
|
private void validateAndNormalizeNode(DqInspectProblem dqInspectProblem, boolean update) {
|
||||||
|
if (dqInspectProblem == null) {
|
||||||
|
throw new JeecgBootException("表单数据不能为空");
|
||||||
|
}
|
||||||
|
String nodeType = trimToEmpty(dqInspectProblem.getNodeType());
|
||||||
|
if (!NODE_TYPE_CATEGORY.equals(nodeType) && !NODE_TYPE_SURFACE.equals(nodeType) && !NODE_TYPE_SPECIFIC.equals(nodeType)) {
|
||||||
|
throw new JeecgBootException("请选择正确的问题种类");
|
||||||
|
}
|
||||||
|
dqInspectProblem.setNodeType(nodeType);
|
||||||
|
|
||||||
|
if (NODE_TYPE_CATEGORY.equals(nodeType)) {
|
||||||
|
dqInspectProblem.setPid(ROOT_PID_VALUE);
|
||||||
|
clearSpecificFields(dqInspectProblem);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String pid = trimToEmpty(dqInspectProblem.getPid());
|
||||||
|
if (oConvertUtils.isEmpty(pid) || ROOT_PID_VALUE.equals(pid)) {
|
||||||
|
throw new JeecgBootException("请选择上一级问题");
|
||||||
|
}
|
||||||
|
if (update && pid.equals(dqInspectProblem.getId())) {
|
||||||
|
throw new JeecgBootException("上一级问题不能选择自身");
|
||||||
|
}
|
||||||
|
if (update && isDescendantOf(pid, dqInspectProblem.getId())) {
|
||||||
|
throw new JeecgBootException("上一级问题不能选择当前节点的下级节点");
|
||||||
|
}
|
||||||
|
|
||||||
|
DqInspectProblem parent = baseMapper.selectById(pid);
|
||||||
|
if (parent == null) {
|
||||||
|
throw new JeecgBootException("上一级问题不存在");
|
||||||
|
}
|
||||||
|
String expectedParentType = NODE_TYPE_SURFACE.equals(nodeType) ? NODE_TYPE_CATEGORY : NODE_TYPE_SURFACE;
|
||||||
|
if (!expectedParentType.equals(parent.getNodeType())) {
|
||||||
|
throw new JeecgBootException("上一级问题类型不正确");
|
||||||
|
}
|
||||||
|
dqInspectProblem.setPid(pid);
|
||||||
|
|
||||||
|
if (!NODE_TYPE_SPECIFIC.equals(nodeType)) {
|
||||||
|
clearSpecificFields(dqInspectProblem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void clearSpecificFields(DqInspectProblem dqInspectProblem) {
|
||||||
|
dqInspectProblem.setInspectAdvice(null);
|
||||||
|
dqInspectProblem.setQuestionResLeader(null);
|
||||||
|
dqInspectProblem.setQuestionResDept(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String trimToEmpty(String value) {
|
||||||
|
return value == null ? "" : value.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isDescendantOf(String possibleChildId, String parentId) {
|
||||||
|
if (oConvertUtils.isEmpty(possibleChildId) || oConvertUtils.isEmpty(parentId)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
DqInspectProblem node = baseMapper.selectById(possibleChildId);
|
||||||
|
while (node != null && !ROOT_PID_VALUE.equals(node.getPid())) {
|
||||||
|
if (parentId.equals(node.getPid())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
node = baseMapper.selectById(node.getPid());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Map<String, Object>> queryParentNodesByType(String nodeType) {
|
||||||
|
List<DqInspectProblem> nodes = baseMapper.selectList(
|
||||||
|
new QueryWrapper<DqInspectProblem>()
|
||||||
|
.eq("node_type", nodeType)
|
||||||
|
.orderByAsc("sort_no", "create_time")
|
||||||
|
);
|
||||||
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
|
for (DqInspectProblem node : nodes) {
|
||||||
|
result.add(toTreeOption(node, false));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Map<String, Object>> querySurfaceParentTree() {
|
||||||
|
List<DqInspectProblem> categories = baseMapper.selectList(
|
||||||
|
new QueryWrapper<DqInspectProblem>()
|
||||||
|
.eq("node_type", NODE_TYPE_CATEGORY)
|
||||||
|
.orderByAsc("sort_no", "create_time")
|
||||||
|
);
|
||||||
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
|
for (DqInspectProblem category : categories) {
|
||||||
|
Map<String, Object> categoryOption = toTreeOption(category, true);
|
||||||
|
List<DqInspectProblem> surfaces = baseMapper.selectList(
|
||||||
|
new QueryWrapper<DqInspectProblem>()
|
||||||
|
.eq("pid", category.getId())
|
||||||
|
.eq("node_type", NODE_TYPE_SURFACE)
|
||||||
|
.orderByAsc("sort_no", "create_time")
|
||||||
|
);
|
||||||
|
List<Map<String, Object>> children = new ArrayList<>();
|
||||||
|
for (DqInspectProblem surface : surfaces) {
|
||||||
|
children.add(toTreeOption(surface, false));
|
||||||
|
}
|
||||||
|
categoryOption.put("children", children);
|
||||||
|
result.add(categoryOption);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Map<String, Object>> querySpecificProblemTree() {
|
||||||
|
List<DqInspectProblem> categories = baseMapper.selectList(
|
||||||
|
new QueryWrapper<DqInspectProblem>()
|
||||||
|
.eq("node_type", NODE_TYPE_CATEGORY)
|
||||||
|
.orderByAsc("sort_no", "create_time")
|
||||||
|
);
|
||||||
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
|
for (DqInspectProblem category : categories) {
|
||||||
|
Map<String, Object> categoryOption = toTreeOption(category, true);
|
||||||
|
List<DqInspectProblem> surfaces = baseMapper.selectList(
|
||||||
|
new QueryWrapper<DqInspectProblem>()
|
||||||
|
.eq("pid", category.getId())
|
||||||
|
.eq("node_type", NODE_TYPE_SURFACE)
|
||||||
|
.orderByAsc("sort_no", "create_time")
|
||||||
|
);
|
||||||
|
List<Map<String, Object>> surfaceOptions = new ArrayList<>();
|
||||||
|
for (DqInspectProblem surface : surfaces) {
|
||||||
|
Map<String, Object> surfaceOption = toTreeOption(surface, true);
|
||||||
|
List<DqInspectProblem> specifics = baseMapper.selectList(
|
||||||
|
new QueryWrapper<DqInspectProblem>()
|
||||||
|
.eq("pid", surface.getId())
|
||||||
|
.eq("node_type", NODE_TYPE_SPECIFIC)
|
||||||
|
.orderByAsc("sort_no", "create_time")
|
||||||
|
);
|
||||||
|
List<Map<String, Object>> specificOptions = new ArrayList<>();
|
||||||
|
for (DqInspectProblem specific : specifics) {
|
||||||
|
specificOptions.add(toTreeOption(specific, false));
|
||||||
|
}
|
||||||
|
surfaceOption.put("children", specificOptions);
|
||||||
|
surfaceOptions.add(surfaceOption);
|
||||||
|
}
|
||||||
|
categoryOption.put("children", surfaceOptions);
|
||||||
|
result.add(categoryOption);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, Object> toTreeOption(DqInspectProblem node, boolean disabled) {
|
||||||
|
Map<String, Object> option = new HashMap<>();
|
||||||
|
option.put("key", node.getId());
|
||||||
|
option.put("value", node.getId());
|
||||||
|
option.put("title", node.getProblemName());
|
||||||
|
option.put("label", node.getProblemName());
|
||||||
|
option.put("nodeType", node.getNodeType());
|
||||||
|
option.put("disabled", disabled);
|
||||||
|
return option;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SelectTreeModel> queryListByPid(String pid) {
|
public List<SelectTreeModel> queryListByPid(String pid) {
|
||||||
if (oConvertUtils.isEmpty(pid)) {
|
if (oConvertUtils.isEmpty(pid)) {
|
||||||
|
|||||||
+293
@@ -0,0 +1,293 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.controller;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
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.vo.LoginUser;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectProgress;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectTask;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.vo.DqInspectTaskLedgerVo;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.vo.DqInspectTaskPage;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.service.IDqInspectTaskService;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.service.IDqInspectProgressService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
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 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;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: dq_inspect_task
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-05-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Tag(name="dq_inspect_task")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/dqinspecttask/dqInspectTask")
|
||||||
|
@Slf4j
|
||||||
|
public class DqInspectTaskController {
|
||||||
|
@Autowired
|
||||||
|
private IDqInspectTaskService dqInspectTaskService;
|
||||||
|
@Autowired
|
||||||
|
private IDqInspectProgressService dqInspectProgressService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param dqInspectTask
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "dq_inspect_task-分页列表查询")
|
||||||
|
@Operation(summary="dq_inspect_task-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<DqInspectTask>> queryPageList(DqInspectTask dqInspectTask,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<DqInspectTask> queryWrapper = QueryGenerator.initQueryWrapper(dqInspectTask, req.getParameterMap());
|
||||||
|
Page<DqInspectTask> page = new Page<DqInspectTask>(pageNo, pageSize);
|
||||||
|
IPage<DqInspectTask> pageList = dqInspectTaskService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改任务台账:一行一条整改任务,补齐问题分类、面上问题、具体问题。
|
||||||
|
*
|
||||||
|
* @param dqInspectTask
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Operation(summary="dq_inspect_task-台账分页列表查询")
|
||||||
|
@GetMapping(value = "/ledgerList")
|
||||||
|
public Result<IPage<DqInspectTaskLedgerVo>> queryLedgerList(DqInspectTask dqInspectTask,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||||
|
Page<DqInspectTaskLedgerVo> page = new Page<DqInspectTaskLedgerVo>(pageNo, pageSize);
|
||||||
|
IPage<DqInspectTaskLedgerVo> pageList = dqInspectTaskService.queryLedgerPage(page, dqInspectTask);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param dqInspectTaskPage
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "dq_inspect_task-添加")
|
||||||
|
@Operation(summary="dq_inspect_task-添加")
|
||||||
|
@RequiresPermissions("dqinspecttask:dq_inspect_task:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody DqInspectTaskPage dqInspectTaskPage) {
|
||||||
|
DqInspectTask dqInspectTask = new DqInspectTask();
|
||||||
|
BeanUtils.copyProperties(dqInspectTaskPage, dqInspectTask);
|
||||||
|
dqInspectTask.setBpmStatus("1");
|
||||||
|
if (oConvertUtils.isEmpty(dqInspectTask.getDelFlag())) {
|
||||||
|
dqInspectTask.setDelFlag("0");
|
||||||
|
}
|
||||||
|
dqInspectTaskService.saveMain(dqInspectTask, dqInspectTaskPage.getDqInspectProgressList());
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param dqInspectTaskPage
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "dq_inspect_task-编辑")
|
||||||
|
@Operation(summary="dq_inspect_task-编辑")
|
||||||
|
@RequiresPermissions("dqinspecttask:dq_inspect_task:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody DqInspectTaskPage dqInspectTaskPage) {
|
||||||
|
DqInspectTask dqInspectTask = new DqInspectTask();
|
||||||
|
BeanUtils.copyProperties(dqInspectTaskPage, dqInspectTask);
|
||||||
|
DqInspectTask dqInspectTaskEntity = dqInspectTaskService.getById(dqInspectTask.getId());
|
||||||
|
if(dqInspectTaskEntity==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
dqInspectTaskService.updateMain(dqInspectTask, dqInspectTaskPage.getDqInspectProgressList());
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "dq_inspect_task-通过id删除")
|
||||||
|
@Operation(summary="dq_inspect_task-通过id删除")
|
||||||
|
@RequiresPermissions("dqinspecttask:dq_inspect_task:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
dqInspectTaskService.delMain(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "dq_inspect_task-批量删除")
|
||||||
|
@Operation(summary="dq_inspect_task-批量删除")
|
||||||
|
@RequiresPermissions("dqinspecttask:dq_inspect_task:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.dqInspectTaskService.delBatchMain(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "dq_inspect_task-通过id查询")
|
||||||
|
@Operation(summary="dq_inspect_task-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<DqInspectTask> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
DqInspectTask dqInspectTask = dqInspectTaskService.getById(id);
|
||||||
|
if(dqInspectTask==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(dqInspectTask);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "工作进展反馈通过主表ID查询")
|
||||||
|
@Operation(summary="工作进展反馈主表ID查询")
|
||||||
|
@GetMapping(value = "/queryDqInspectProgressByMainId")
|
||||||
|
public Result<List<DqInspectProgress>> queryDqInspectProgressListByMainId(@RequestParam(name="id",required=true) String id) {
|
||||||
|
List<DqInspectProgress> dqInspectProgressList = dqInspectProgressService.selectByMainId(id);
|
||||||
|
return Result.OK(dqInspectProgressList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param dqInspectTask
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("dqinspecttask:dq_inspect_task:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, DqInspectTask dqInspectTask) {
|
||||||
|
|
||||||
|
// Step.1 组装查询条件查询数据
|
||||||
|
QueryWrapper<DqInspectTask> queryWrapper = QueryGenerator.initQueryWrapper(dqInspectTask, request.getParameterMap());
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
|
||||||
|
//配置选中数据查询条件
|
||||||
|
String selections = request.getParameter("selections");
|
||||||
|
if(oConvertUtils.isNotEmpty(selections)) {
|
||||||
|
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||||
|
queryWrapper.in("id",selectionList);
|
||||||
|
}
|
||||||
|
//Step.2 获取导出数据
|
||||||
|
List<DqInspectTask> dqInspectTaskList = dqInspectTaskService.list(queryWrapper);
|
||||||
|
|
||||||
|
// Step.3 组装pageList
|
||||||
|
List<DqInspectTaskPage> pageList = new ArrayList<DqInspectTaskPage>();
|
||||||
|
for (DqInspectTask main : dqInspectTaskList) {
|
||||||
|
DqInspectTaskPage vo = new DqInspectTaskPage();
|
||||||
|
BeanUtils.copyProperties(main, vo);
|
||||||
|
List<DqInspectProgress> dqInspectProgressList = dqInspectProgressService.selectByMainId(main.getId());
|
||||||
|
vo.setDqInspectProgressList(dqInspectProgressList);
|
||||||
|
pageList.add(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step.4 AutoPoi 导出Excel
|
||||||
|
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||||
|
mv.addObject(NormalExcelConstants.FILE_NAME, "dq_inspect_task列表");
|
||||||
|
mv.addObject(NormalExcelConstants.CLASS, DqInspectTaskPage.class);
|
||||||
|
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("dq_inspect_task数据", "导出人:"+sysUser.getRealname(), "dq_inspect_task"));
|
||||||
|
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||||
|
return mv;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("dqinspecttask:dq_inspect_task:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||||
|
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||||
|
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||||
|
// 获取上传文件对象
|
||||||
|
MultipartFile file = entity.getValue();
|
||||||
|
ImportParams params = new ImportParams();
|
||||||
|
params.setTitleRows(2);
|
||||||
|
params.setHeadRows(1);
|
||||||
|
params.setNeedSave(true);
|
||||||
|
try {
|
||||||
|
List<DqInspectTaskPage> list = ExcelImportUtil.importExcel(file.getInputStream(), DqInspectTaskPage.class, params);
|
||||||
|
for (DqInspectTaskPage page : list) {
|
||||||
|
DqInspectTask po = new DqInspectTask();
|
||||||
|
BeanUtils.copyProperties(page, po);
|
||||||
|
dqInspectTaskService.saveMain(po, page.getDqInspectProgressList());
|
||||||
|
}
|
||||||
|
return Result.OK("文件导入成功!数据行数:" + list.size());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
return Result.error("文件导入失败:"+e.getMessage());
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
file.getInputStream().close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Result.OK("文件导入失败!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+91
@@ -0,0 +1,91 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import org.jeecg.common.constant.ProvinceCityArea;
|
||||||
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import java.util.Date;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 工作进展反馈
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-05-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Schema(description="工作进展反馈")
|
||||||
|
@Data
|
||||||
|
@TableName("dq_inspect_progress")
|
||||||
|
public class DqInspectProgress implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**id*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@Schema(description = "id")
|
||||||
|
private java.lang.String id;
|
||||||
|
/**创建人*/
|
||||||
|
@Schema(description = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
@Schema(description = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
/**所属部门*/
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
/**反馈部门ID*/
|
||||||
|
@Excel(name = "反馈部门ID", width = 15)
|
||||||
|
@Schema(description = "反馈部门ID")
|
||||||
|
private java.lang.String feedbackDeptId;
|
||||||
|
/**反馈部门名称*/
|
||||||
|
@Excel(name = "反馈部门名称", width = 15)
|
||||||
|
@Schema(description = "反馈部门名称")
|
||||||
|
private java.lang.String feedbackDeptName;
|
||||||
|
/**反馈人ID*/
|
||||||
|
@Excel(name = "反馈人ID", width = 15)
|
||||||
|
@Schema(description = "反馈人ID")
|
||||||
|
private java.lang.String feedbackPersonId;
|
||||||
|
/**反馈人姓名*/
|
||||||
|
@Excel(name = "反馈人姓名", width = 15)
|
||||||
|
@Schema(description = "反馈人姓名")
|
||||||
|
private java.lang.String feedbackPersonName;
|
||||||
|
/**实际完成时间*/
|
||||||
|
@Excel(name = "实际完成时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "实际完成时间")
|
||||||
|
private java.util.Date actualTime;
|
||||||
|
/**工作进展*/
|
||||||
|
@Excel(name = "工作进展", width = 15)
|
||||||
|
@Schema(description = "工作进展")
|
||||||
|
private java.lang.String workProgress;
|
||||||
|
/**进展状态*/
|
||||||
|
@Excel(name = "进展状态", width = 15, dicCode = "feedback_status")
|
||||||
|
@Schema(description = "进展状态")
|
||||||
|
private java.lang.String bpmStatus;
|
||||||
|
/**删除标识*/
|
||||||
|
@Excel(name = "删除标识", width = 15)
|
||||||
|
@Schema(description = "删除标识")
|
||||||
|
@TableLogic
|
||||||
|
private java.lang.String delFlag;
|
||||||
|
/**整改措施任务ID*/
|
||||||
|
@Schema(description = "整改措施任务ID")
|
||||||
|
private java.lang.String mainId;
|
||||||
|
}
|
||||||
+145
@@ -0,0 +1,145 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import org.jeecg.common.constant.ProvinceCityArea;
|
||||||
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: dq_inspect_task
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-05-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Schema(description="dq_inspect_task")
|
||||||
|
@Data
|
||||||
|
@TableName("dq_inspect_task")
|
||||||
|
public class DqInspectTask implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**id*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@Schema(description = "id")
|
||||||
|
private java.lang.String id;
|
||||||
|
/**创建人*/
|
||||||
|
@Schema(description = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
@Schema(description = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
/**所属部门*/
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
/**具体问题ID*/
|
||||||
|
@Excel(name = "具体问题", width = 15, dictTable = "dq_inspect_problem", dicText = "problem_name", dicCode = "id")
|
||||||
|
@Dict(dictTable = "dq_inspect_problem", dicText = "problem_name", dicCode = "id")
|
||||||
|
@Schema(description = "具体问题ID")
|
||||||
|
private java.lang.String problemId;
|
||||||
|
/**密级*/
|
||||||
|
@Excel(name = "密级", width = 15, dicCode = "secret_level")
|
||||||
|
@Dict(dicCode = "secret_level")
|
||||||
|
@Schema(description = "密级")
|
||||||
|
private java.lang.String secretLevel;
|
||||||
|
/**整改措施*/
|
||||||
|
@Excel(name = "整改措施", width = 15)
|
||||||
|
@Schema(description = "整改措施")
|
||||||
|
private java.lang.String improveMeasure;
|
||||||
|
/**完成时限*/
|
||||||
|
@Excel(name = "完成时限", width = 15, format = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@Schema(description = "完成时限")
|
||||||
|
private java.util.Date deadline;
|
||||||
|
/**目标节点*/
|
||||||
|
@Excel(name = "目标节点", width = 15)
|
||||||
|
@Schema(description = "目标节点")
|
||||||
|
private java.lang.String targetNode;
|
||||||
|
/**措施责任领导*/
|
||||||
|
@Excel(name = "措施责任领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||||
|
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||||
|
@Schema(description = "措施责任领导")
|
||||||
|
private java.lang.String measureResLeader;
|
||||||
|
/**措施责任部门*/
|
||||||
|
@Excel(name = "措施责任部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
|
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
|
@Schema(description = "措施责任部门")
|
||||||
|
private java.lang.String measureResDept;
|
||||||
|
/**整改交付成果*/
|
||||||
|
@Excel(name = "整改交付成果", width = 15)
|
||||||
|
@Schema(description = "整改交付成果")
|
||||||
|
private java.lang.String rectificationEvidence;
|
||||||
|
/**成效评价标准*/
|
||||||
|
@Excel(name = "成效评价标准", width = 15)
|
||||||
|
@Schema(description = "成效评价标准")
|
||||||
|
private java.lang.String evaluationCriterion;
|
||||||
|
/**是否需要党群领导审批*/
|
||||||
|
@Excel(name = "是否需要党群领导审批", width = 15, dicCode = "yn")
|
||||||
|
@Dict(dicCode = "yn")
|
||||||
|
@Schema(description = "是否需要党群领导审批")
|
||||||
|
private java.lang.String isNeedAppro;
|
||||||
|
/**党群领导*/
|
||||||
|
@Excel(name = "党群领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||||
|
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||||
|
@Schema(description = "党群领导")
|
||||||
|
private java.lang.String supDeptleaderid;
|
||||||
|
/**检查情况*/
|
||||||
|
@Excel(name = "检查情况", width = 15)
|
||||||
|
@Schema(description = "检查情况")
|
||||||
|
private java.lang.String inspectionStatus;
|
||||||
|
/**监督意见*/
|
||||||
|
@Excel(name = "监督意见", width = 15)
|
||||||
|
@Schema(description = "监督意见")
|
||||||
|
private java.lang.String supervisoryOpinion;
|
||||||
|
/**措施数量*/
|
||||||
|
@Excel(name = "措施数量", width = 15)
|
||||||
|
@Schema(description = "措施数量")
|
||||||
|
private java.lang.Integer measureCount;
|
||||||
|
/**流程实例ID*/
|
||||||
|
@Excel(name = "流程实例ID", width = 15)
|
||||||
|
@Schema(description = "流程实例ID")
|
||||||
|
private java.lang.String bpmProcessId;
|
||||||
|
/**流程状态*/
|
||||||
|
@Excel(name = "流程状态", width = 15, dicCode = "super_status")
|
||||||
|
@Dict(dicCode = "super_status")
|
||||||
|
@Schema(description = "流程状态")
|
||||||
|
private java.lang.String bpmStatus;
|
||||||
|
/**整改状态*/
|
||||||
|
@Excel(name = "整改状态", width = 15)
|
||||||
|
@Schema(description = "整改状态")
|
||||||
|
private java.lang.String taskStatus;
|
||||||
|
/**督办次数*/
|
||||||
|
@Excel(name = "督办次数", width = 15)
|
||||||
|
@Schema(description = "督办次数")
|
||||||
|
private java.lang.String superviseCount;
|
||||||
|
/**排序*/
|
||||||
|
@Excel(name = "排序", width = 15)
|
||||||
|
@Schema(description = "排序")
|
||||||
|
private java.lang.Integer sortNo;
|
||||||
|
/**删除标识*/
|
||||||
|
@Excel(name = "删除标识", width = 15)
|
||||||
|
@Schema(description = "删除标识")
|
||||||
|
@TableLogic
|
||||||
|
private java.lang.String delFlag;
|
||||||
|
}
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectProgress;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 工作进展反馈
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-05-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface DqInspectProgressMapper extends BaseMapper<DqInspectProgress> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主表id删除子表数据
|
||||||
|
*
|
||||||
|
* @param mainId 主表id
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public boolean deleteByMainId(@Param("mainId") String mainId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主表id查询子表数据
|
||||||
|
*
|
||||||
|
* @param mainId 主表id
|
||||||
|
* @return List<DqInspectProgress>
|
||||||
|
*/
|
||||||
|
public List<DqInspectProgress> selectByMainId(@Param("mainId") String mainId);
|
||||||
|
}
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectTask;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.vo.DqInspectTaskLedgerVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: dq_inspect_task
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-05-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface DqInspectTaskMapper extends BaseMapper<DqInspectTask> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询整改任务台账,补齐问题分类、面上问题、具体问题信息。
|
||||||
|
*
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param task 查询条件
|
||||||
|
* @return 台账分页
|
||||||
|
*/
|
||||||
|
IPage<DqInspectTaskLedgerVo> queryLedgerPage(Page<DqInspectTaskLedgerVo> page, @Param("task") DqInspectTask task);
|
||||||
|
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.jeecg.modules.demo.dqinspecttask.mapper.DqInspectProgressMapper">
|
||||||
|
|
||||||
|
<delete id="deleteByMainId" parameterType="java.lang.String">
|
||||||
|
DELETE
|
||||||
|
FROM dq_inspect_progress
|
||||||
|
WHERE
|
||||||
|
main_id = #{mainId} </delete>
|
||||||
|
|
||||||
|
<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.demo.dqinspecttask.entity.DqInspectProgress">
|
||||||
|
SELECT *
|
||||||
|
FROM dq_inspect_progress
|
||||||
|
WHERE
|
||||||
|
main_id = #{mainId} </select>
|
||||||
|
</mapper>
|
||||||
+72
@@ -0,0 +1,72 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.jeecg.modules.demo.dqinspecttask.mapper.DqInspectTaskMapper">
|
||||||
|
|
||||||
|
<select id="queryLedgerPage" resultType="org.jeecg.modules.demo.dqinspecttask.vo.DqInspectTaskLedgerVo">
|
||||||
|
select
|
||||||
|
t.id,
|
||||||
|
p_category.id as categoryId,
|
||||||
|
p_category.problem_name as categoryName,
|
||||||
|
p_surface.id as surfaceId,
|
||||||
|
p_surface.problem_name as surfaceName,
|
||||||
|
p_specific.id as specificId,
|
||||||
|
p_specific.problem_name as specificName,
|
||||||
|
t.problem_id as problemId,
|
||||||
|
p_specific.inspect_advice as inspectAdvice,
|
||||||
|
t.secret_level as secretLevel,
|
||||||
|
t.improve_measure as improveMeasure,
|
||||||
|
t.deadline,
|
||||||
|
t.target_node as targetNode,
|
||||||
|
t.measure_res_leader as measureResLeader,
|
||||||
|
t.measure_res_dept as measureResDept,
|
||||||
|
t.rectification_evidence as rectificationEvidence,
|
||||||
|
t.evaluation_criterion as evaluationCriterion,
|
||||||
|
t.is_need_appro as isNeedAppro,
|
||||||
|
t.sup_deptleaderid as supDeptleaderid,
|
||||||
|
t.inspection_status as inspectionStatus,
|
||||||
|
t.supervisory_opinion as supervisoryOpinion,
|
||||||
|
t.measure_count as measureCount,
|
||||||
|
t.bpm_process_id as bpmProcessId,
|
||||||
|
t.bpm_status as bpmStatus,
|
||||||
|
t.task_status as taskStatus,
|
||||||
|
t.supervise_count as superviseCount,
|
||||||
|
t.sort_no as sortNo,
|
||||||
|
t.create_time as createTime
|
||||||
|
from dq_inspect_task t
|
||||||
|
inner join dq_inspect_problem p_specific
|
||||||
|
on t.problem_id = p_specific.id
|
||||||
|
and p_specific.node_type = 'specific'
|
||||||
|
and ifnull(p_specific.del_flag, '0') = '0'
|
||||||
|
left join dq_inspect_problem p_surface
|
||||||
|
on p_specific.pid = p_surface.id
|
||||||
|
and ifnull(p_surface.del_flag, '0') = '0'
|
||||||
|
left join dq_inspect_problem p_category
|
||||||
|
on p_surface.pid = p_category.id
|
||||||
|
and ifnull(p_category.del_flag, '0') = '0'
|
||||||
|
where ifnull(t.del_flag, '0') = '0'
|
||||||
|
<if test="task != null">
|
||||||
|
<if test="task.improveMeasure != null and task.improveMeasure != ''">
|
||||||
|
and t.improve_measure like concat('%', #{task.improveMeasure}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="task.measureResLeader != null and task.measureResLeader != ''">
|
||||||
|
and t.measure_res_leader = #{task.measureResLeader}
|
||||||
|
</if>
|
||||||
|
<if test="task.measureResDept != null and task.measureResDept != ''">
|
||||||
|
and t.measure_res_dept = #{task.measureResDept}
|
||||||
|
</if>
|
||||||
|
<if test="task.problemId != null and task.problemId != ''">
|
||||||
|
and t.problem_id = #{task.problemId}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
order by
|
||||||
|
p_category.sort_no asc,
|
||||||
|
p_category.create_time asc,
|
||||||
|
p_surface.sort_no asc,
|
||||||
|
p_surface.create_time asc,
|
||||||
|
p_specific.sort_no asc,
|
||||||
|
p_specific.create_time asc,
|
||||||
|
t.sort_no asc,
|
||||||
|
t.create_time asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectProgress;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 工作进展反馈
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-05-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IDqInspectProgressService extends IService<DqInspectProgress> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主表id查询子表数据
|
||||||
|
*
|
||||||
|
* @param mainId 主表id
|
||||||
|
* @return List<DqInspectProgress>
|
||||||
|
*/
|
||||||
|
public List<DqInspectProgress> selectByMainId(String mainId);
|
||||||
|
}
|
||||||
+60
@@ -0,0 +1,60 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectProgress;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectTask;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.vo.DqInspectTaskLedgerVo;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: dq_inspect_task
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-05-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IDqInspectTaskService extends IService<DqInspectTask> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加一对多
|
||||||
|
*
|
||||||
|
* @param dqInspectTask
|
||||||
|
* @param dqInspectProgressList
|
||||||
|
*/
|
||||||
|
public void saveMain(DqInspectTask dqInspectTask,List<DqInspectProgress> dqInspectProgressList) ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改一对多
|
||||||
|
*
|
||||||
|
* @param dqInspectTask
|
||||||
|
* @param dqInspectProgressList
|
||||||
|
*/
|
||||||
|
public void updateMain(DqInspectTask dqInspectTask,List<DqInspectProgress> dqInspectProgressList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除一对多
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void delMain (String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除一对多
|
||||||
|
*
|
||||||
|
* @param idList
|
||||||
|
*/
|
||||||
|
public void delBatchMain (Collection<? extends Serializable> idList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询整改任务台账。
|
||||||
|
*
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param dqInspectTask 查询条件
|
||||||
|
* @return 台账分页
|
||||||
|
*/
|
||||||
|
IPage<DqInspectTaskLedgerVo> queryLedgerPage(Page<DqInspectTaskLedgerVo> page, DqInspectTask dqInspectTask);
|
||||||
|
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectProgress;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.mapper.DqInspectProgressMapper;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.service.IDqInspectProgressService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.List;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 工作进展反馈
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-05-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DqInspectProgressServiceImpl extends ServiceImpl<DqInspectProgressMapper, DqInspectProgress> implements IDqInspectProgressService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DqInspectProgressMapper dqInspectProgressMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DqInspectProgress> selectByMainId(String mainId) {
|
||||||
|
return dqInspectProgressMapper.selectByMainId(mainId);
|
||||||
|
}
|
||||||
|
}
|
||||||
+109
@@ -0,0 +1,109 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.common.exception.JeecgBootException;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.demo.dqinspectproblem.entity.DqInspectProblem;
|
||||||
|
import org.jeecg.modules.demo.dqinspectproblem.service.IDqInspectProblemService;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectTask;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectProgress;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.mapper.DqInspectProgressMapper;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.mapper.DqInspectTaskMapper;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.service.IDqInspectTaskService;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.vo.DqInspectTaskLedgerVo;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: dq_inspect_task
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-05-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DqInspectTaskServiceImpl extends ServiceImpl<DqInspectTaskMapper, DqInspectTask> implements IDqInspectTaskService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DqInspectTaskMapper dqInspectTaskMapper;
|
||||||
|
@Autowired
|
||||||
|
private DqInspectProgressMapper dqInspectProgressMapper;
|
||||||
|
@Autowired
|
||||||
|
private IDqInspectProblemService dqInspectProblemService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void saveMain(DqInspectTask dqInspectTask, List<DqInspectProgress> dqInspectProgressList) {
|
||||||
|
validateProblemId(dqInspectTask);
|
||||||
|
dqInspectTaskMapper.insert(dqInspectTask);
|
||||||
|
if(dqInspectProgressList!=null && dqInspectProgressList.size()>0) {
|
||||||
|
for(DqInspectProgress entity:dqInspectProgressList) {
|
||||||
|
//外键设置
|
||||||
|
entity.setMainId(dqInspectTask.getId());
|
||||||
|
dqInspectProgressMapper.insert(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void updateMain(DqInspectTask dqInspectTask,List<DqInspectProgress> dqInspectProgressList) {
|
||||||
|
validateProblemId(dqInspectTask);
|
||||||
|
dqInspectTaskMapper.updateById(dqInspectTask);
|
||||||
|
|
||||||
|
//1.先删除子表数据
|
||||||
|
dqInspectProgressMapper.deleteByMainId(dqInspectTask.getId());
|
||||||
|
|
||||||
|
//2.子表数据重新插入
|
||||||
|
if(dqInspectProgressList!=null && dqInspectProgressList.size()>0) {
|
||||||
|
for(DqInspectProgress entity:dqInspectProgressList) {
|
||||||
|
//外键设置
|
||||||
|
entity.setMainId(dqInspectTask.getId());
|
||||||
|
dqInspectProgressMapper.insert(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void delMain(String id) {
|
||||||
|
dqInspectProgressMapper.deleteByMainId(id);
|
||||||
|
dqInspectTaskMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void delBatchMain(Collection<? extends Serializable> idList) {
|
||||||
|
for(Serializable id:idList) {
|
||||||
|
dqInspectProgressMapper.deleteByMainId(id.toString());
|
||||||
|
dqInspectTaskMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<DqInspectTaskLedgerVo> queryLedgerPage(Page<DqInspectTaskLedgerVo> page, DqInspectTask dqInspectTask) {
|
||||||
|
return dqInspectTaskMapper.queryLedgerPage(page, dqInspectTask);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改任务必须挂在问题清单的“具体问题”节点下,避免接口绕过前端产生非法层级数据。
|
||||||
|
*/
|
||||||
|
private void validateProblemId(DqInspectTask dqInspectTask) {
|
||||||
|
if (dqInspectTask == null || oConvertUtils.isEmpty(dqInspectTask.getProblemId())) {
|
||||||
|
throw new JeecgBootException("请选择具体问题");
|
||||||
|
}
|
||||||
|
DqInspectProblem problem = dqInspectProblemService.getById(dqInspectTask.getProblemId());
|
||||||
|
if (problem == null) {
|
||||||
|
throw new JeecgBootException("选择的具体问题不存在");
|
||||||
|
}
|
||||||
|
if (!IDqInspectProblemService.NODE_TYPE_SPECIFIC.equals(problem.getNodeType())) {
|
||||||
|
throw new JeecgBootException("整改任务只能挂在具体问题节点下");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+113
@@ -0,0 +1,113 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改任务台账行:一行对应一条整改任务,同时带出所属的问题层级信息。
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "整改任务台账")
|
||||||
|
public class DqInspectTaskLedgerVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "任务ID")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Schema(description = "问题分类ID")
|
||||||
|
private String categoryId;
|
||||||
|
|
||||||
|
@Schema(description = "问题分类")
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
|
@Schema(description = "面上问题ID")
|
||||||
|
private String surfaceId;
|
||||||
|
|
||||||
|
@Schema(description = "面上问题")
|
||||||
|
private String surfaceName;
|
||||||
|
|
||||||
|
@Schema(description = "具体问题ID")
|
||||||
|
private String specificId;
|
||||||
|
|
||||||
|
@Schema(description = "具体问题")
|
||||||
|
private String specificName;
|
||||||
|
|
||||||
|
@Schema(description = "具体问题ID")
|
||||||
|
private String problemId;
|
||||||
|
|
||||||
|
@Schema(description = "巡视建议")
|
||||||
|
private String inspectAdvice;
|
||||||
|
|
||||||
|
@Dict(dicCode = "secret_level")
|
||||||
|
@Schema(description = "密级")
|
||||||
|
private String secretLevel;
|
||||||
|
|
||||||
|
@Schema(description = "整改措施")
|
||||||
|
private String improveMeasure;
|
||||||
|
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Schema(description = "完成时限")
|
||||||
|
private Date deadline;
|
||||||
|
|
||||||
|
@Schema(description = "目标节点")
|
||||||
|
private String targetNode;
|
||||||
|
|
||||||
|
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||||
|
@Schema(description = "措施责任领导")
|
||||||
|
private String measureResLeader;
|
||||||
|
|
||||||
|
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
|
@Schema(description = "措施责任部门")
|
||||||
|
private String measureResDept;
|
||||||
|
|
||||||
|
@Schema(description = "整改交付成果")
|
||||||
|
private String rectificationEvidence;
|
||||||
|
|
||||||
|
@Schema(description = "成效评价标准")
|
||||||
|
private String evaluationCriterion;
|
||||||
|
|
||||||
|
@Dict(dicCode = "yn")
|
||||||
|
@Schema(description = "是否需要党群领导审批")
|
||||||
|
private String isNeedAppro;
|
||||||
|
|
||||||
|
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||||
|
@Schema(description = "党群领导")
|
||||||
|
private String supDeptleaderid;
|
||||||
|
|
||||||
|
@Schema(description = "检查情况")
|
||||||
|
private String inspectionStatus;
|
||||||
|
|
||||||
|
@Schema(description = "监督意见")
|
||||||
|
private String supervisoryOpinion;
|
||||||
|
|
||||||
|
@Schema(description = "措施数量")
|
||||||
|
private Integer measureCount;
|
||||||
|
|
||||||
|
@Schema(description = "流程实例ID")
|
||||||
|
private String bpmProcessId;
|
||||||
|
|
||||||
|
@Dict(dicCode = "super_status")
|
||||||
|
@Schema(description = "流程状态")
|
||||||
|
private String bpmStatus;
|
||||||
|
|
||||||
|
@Schema(description = "整改状态")
|
||||||
|
private String taskStatus;
|
||||||
|
|
||||||
|
@Schema(description = "督办次数")
|
||||||
|
private String superviseCount;
|
||||||
|
|
||||||
|
@Schema(description = "排序")
|
||||||
|
private Integer sortNo;
|
||||||
|
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
||||||
+145
@@ -0,0 +1,145 @@
|
|||||||
|
package org.jeecg.modules.demo.dqinspecttask.vo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectTask;
|
||||||
|
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectProgress;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.ExcelEntity;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import org.jeecg.common.constant.ProvinceCityArea;
|
||||||
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: dq_inspect_task
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2026-05-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description="dq_inspect_task")
|
||||||
|
public class DqInspectTaskPage {
|
||||||
|
|
||||||
|
/**id*/
|
||||||
|
@Schema(description = "id")
|
||||||
|
private java.lang.String id;
|
||||||
|
/**创建人*/
|
||||||
|
@Schema(description = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
@Schema(description = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Schema(description = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
/**所属部门*/
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
/**具体问题ID*/
|
||||||
|
@Excel(name = "具体问题", width = 15, dictTable = "dq_inspect_problem", dicText = "problem_name", dicCode = "id")
|
||||||
|
@Dict(dictTable = "dq_inspect_problem", dicText = "problem_name", dicCode = "id")
|
||||||
|
@Schema(description = "具体问题ID")
|
||||||
|
private java.lang.String problemId;
|
||||||
|
/**密级*/
|
||||||
|
@Excel(name = "密级", width = 15, dicCode = "secret_level")
|
||||||
|
@Dict(dicCode = "secret_level")
|
||||||
|
@Schema(description = "密级")
|
||||||
|
private java.lang.String secretLevel;
|
||||||
|
/**整改措施*/
|
||||||
|
@Excel(name = "整改措施", width = 15)
|
||||||
|
@Schema(description = "整改措施")
|
||||||
|
private java.lang.String improveMeasure;
|
||||||
|
/**完成时限*/
|
||||||
|
@Excel(name = "完成时限", width = 15, format = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@Schema(description = "完成时限")
|
||||||
|
private java.util.Date deadline;
|
||||||
|
/**目标节点*/
|
||||||
|
@Excel(name = "目标节点", width = 15)
|
||||||
|
@Schema(description = "目标节点")
|
||||||
|
private java.lang.String targetNode;
|
||||||
|
/**措施责任领导*/
|
||||||
|
@Excel(name = "措施责任领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||||
|
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||||
|
@Schema(description = "措施责任领导")
|
||||||
|
private java.lang.String measureResLeader;
|
||||||
|
/**措施责任部门*/
|
||||||
|
@Excel(name = "措施责任部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
|
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
|
@Schema(description = "措施责任部门")
|
||||||
|
private java.lang.String measureResDept;
|
||||||
|
/**整改交付成果*/
|
||||||
|
@Excel(name = "整改交付成果", width = 15)
|
||||||
|
@Schema(description = "整改交付成果")
|
||||||
|
private java.lang.String rectificationEvidence;
|
||||||
|
/**成效评价标准*/
|
||||||
|
@Excel(name = "成效评价标准", width = 15)
|
||||||
|
@Schema(description = "成效评价标准")
|
||||||
|
private java.lang.String evaluationCriterion;
|
||||||
|
/**是否需要党群领导审批*/
|
||||||
|
@Excel(name = "是否需要党群领导审批", width = 15, dicCode = "yn")
|
||||||
|
@Dict(dicCode = "yn")
|
||||||
|
@Schema(description = "是否需要党群领导审批")
|
||||||
|
private java.lang.String isNeedAppro;
|
||||||
|
/**党群领导*/
|
||||||
|
@Excel(name = "党群领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||||
|
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||||
|
@Schema(description = "党群领导")
|
||||||
|
private java.lang.String supDeptleaderid;
|
||||||
|
/**检查情况*/
|
||||||
|
@Excel(name = "检查情况", width = 15)
|
||||||
|
@Schema(description = "检查情况")
|
||||||
|
private java.lang.String inspectionStatus;
|
||||||
|
/**监督意见*/
|
||||||
|
@Excel(name = "监督意见", width = 15)
|
||||||
|
@Schema(description = "监督意见")
|
||||||
|
private java.lang.String supervisoryOpinion;
|
||||||
|
/**措施数量*/
|
||||||
|
@Excel(name = "措施数量", width = 15)
|
||||||
|
@Schema(description = "措施数量")
|
||||||
|
private java.lang.Integer measureCount;
|
||||||
|
/**流程实例ID*/
|
||||||
|
@Excel(name = "流程实例ID", width = 15)
|
||||||
|
@Schema(description = "流程实例ID")
|
||||||
|
private java.lang.String bpmProcessId;
|
||||||
|
/**流程状态*/
|
||||||
|
@Excel(name = "流程状态", width = 15, dicCode = "super_status")
|
||||||
|
@Dict(dicCode = "super_status")
|
||||||
|
@Schema(description = "流程状态")
|
||||||
|
private java.lang.String bpmStatus;
|
||||||
|
/**整改状态*/
|
||||||
|
@Excel(name = "整改状态", width = 15)
|
||||||
|
@Schema(description = "整改状态")
|
||||||
|
private java.lang.String taskStatus;
|
||||||
|
/**督办次数*/
|
||||||
|
@Excel(name = "督办次数", width = 15)
|
||||||
|
@Schema(description = "督办次数")
|
||||||
|
private java.lang.String superviseCount;
|
||||||
|
/**排序*/
|
||||||
|
@Excel(name = "排序", width = 15)
|
||||||
|
@Schema(description = "排序")
|
||||||
|
private java.lang.Integer sortNo;
|
||||||
|
/**删除标识*/
|
||||||
|
@Excel(name = "删除标识", width = 15)
|
||||||
|
@Schema(description = "删除标识")
|
||||||
|
private java.lang.String delFlag;
|
||||||
|
|
||||||
|
@ExcelCollection(name="工作进展反馈")
|
||||||
|
@Schema(description = "工作进展反馈")
|
||||||
|
private List<DqInspectProgress> dqInspectProgressList;
|
||||||
|
|
||||||
|
}
|
||||||
+6
-7
@@ -39,7 +39,6 @@ import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
@@ -198,12 +197,12 @@ public class TaskTaskController extends JeecgController<TaskTask, ITaskTaskServi
|
|||||||
//@AutoLog(value = "事项任务计划表(发起流程)-通过id查询")
|
//@AutoLog(value = "事项任务计划表(发起流程)-通过id查询")
|
||||||
@Operation(summary = "事项任务计划表(发起流程)-通过businessId查询")
|
@Operation(summary = "事项任务计划表(发起流程)-通过businessId查询")
|
||||||
@GetMapping(value = "/queryByBusinessId")
|
@GetMapping(value = "/queryByBusinessId")
|
||||||
public Result<List<TaskTask>> queryByBusinessId(@RequestParam(name = "businessId", required = true) String businessId) throws Exception {
|
public Result<IPage<TaskTask>> queryByBusinessId(@RequestParam(name = "businessId", required = true) String businessId,
|
||||||
List<TaskTask> taskTaskList = taskTaskService.getTaskTaskListByBusinessId(businessId);
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
if (CollectionUtils.isEmpty(taskTaskList)) {
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception {
|
||||||
return Result.error("未找到对应数据");
|
Page<TaskTask> page = new Page<>(pageNo, pageSize);
|
||||||
}
|
IPage<TaskTask> pageList = taskTaskService.getTaskTaskPageByBusinessId(page, businessId);
|
||||||
return Result.OK(taskTaskList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+3
-3
@@ -2,10 +2,10 @@ package org.jeecg.modules.tasktask.service;
|
|||||||
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.modules.tasktask.entity.TaskTask;
|
import org.jeecg.modules.tasktask.entity.TaskTask;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 事项任务计划表(发起流程)
|
* @Description: 事项任务计划表(发起流程)
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
@@ -16,7 +16,7 @@ public interface ITaskTaskService extends IService<TaskTask> {
|
|||||||
boolean singleFlowStart(TaskTask taskTask,String userName) throws Exception;
|
boolean singleFlowStart(TaskTask taskTask,String userName) throws Exception;
|
||||||
boolean multiFlowStart(TaskTask taskTask,String userName,Integer intervalType, Integer startCount) throws Exception;
|
boolean multiFlowStart(TaskTask taskTask,String userName,Integer intervalType, Integer startCount) throws Exception;
|
||||||
Result<?> handleFlowStart(TaskTask taskTask, String username, Integer intervalType, Integer startCount)throws Exception;
|
Result<?> handleFlowStart(TaskTask taskTask, String username, Integer intervalType, Integer startCount)throws Exception;
|
||||||
List<TaskTask> getTaskTaskListByBusinessId(String businessId) throws Exception;
|
IPage<TaskTask> getTaskTaskPageByBusinessId(Page<TaskTask> page, String businessId) throws Exception;
|
||||||
boolean updateDeptHandlerName(String processInstanceId, String deptHandlerName);
|
boolean updateDeptHandlerName(String processInstanceId, String deptHandlerName);
|
||||||
boolean deleteSingleProcess(String processInstId);
|
boolean deleteSingleProcess(String processInstId);
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-6
@@ -2,6 +2,8 @@ package org.jeecg.modules.tasktask.service.impl;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.util.Assert;
|
import org.apache.shiro.util.Assert;
|
||||||
@@ -50,7 +52,8 @@ public class TaskTaskServiceImpl extends ServiceImpl<TaskTaskMapper, TaskTask> i
|
|||||||
TaskTask newTask = new TaskTask();
|
TaskTask newTask = new TaskTask();
|
||||||
BeanUtils.copyProperties(taskTask, newTask);
|
BeanUtils.copyProperties(taskTask, newTask);
|
||||||
newTask.setId(null);
|
newTask.setId(null);
|
||||||
newTask.setStartTime(null);
|
// 立即发起流程以实际发起时刻为准,避免流程记录缺少开始时间。
|
||||||
|
newTask.setStartTime(new Date());
|
||||||
this.save(newTask);
|
this.save(newTask);
|
||||||
Result<String> res = bpmBaseExtApiImpl.startMutilProcess(taskTask.getFlowCode(), newTask.getId(), taskTask.getFormUrl(), taskTask.getFormUrl(), userName, jsonString);
|
Result<String> res = bpmBaseExtApiImpl.startMutilProcess(taskTask.getFlowCode(), newTask.getId(), taskTask.getFormUrl(), taskTask.getFormUrl(), userName, jsonString);
|
||||||
String procId = res.getResult();
|
String procId = res.getResult();
|
||||||
@@ -140,14 +143,17 @@ public class TaskTaskServiceImpl extends ServiceImpl<TaskTaskMapper, TaskTask> i
|
|||||||
|
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
public List<TaskTask> getTaskTaskListByBusinessId(String businessId) throws Exception{
|
@Override
|
||||||
|
public IPage<TaskTask> getTaskTaskPageByBusinessId(Page<TaskTask> page, String businessId) throws Exception{
|
||||||
if (StringUtils.isBlank(businessId)) {
|
if (StringUtils.isBlank(businessId)) {
|
||||||
return Collections.emptyList();
|
return page;
|
||||||
}
|
}
|
||||||
LambdaQueryWrapper<TaskTask> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<TaskTask> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(TaskTask::getBusinessId, businessId);
|
queryWrapper.eq(TaskTask::getBusinessId, businessId)
|
||||||
// 2. 查询不到数据 → MP 本身会返回空集合,不是 null
|
// Show the latest started or created process first for the current business.
|
||||||
return this.list(queryWrapper);
|
.orderByDesc(TaskTask::getStartTime)
|
||||||
|
.orderByDesc(TaskTask::getCreateTime);
|
||||||
|
return this.page(page, queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
-- 所务会台账:党委会和所务会共用 bg_partymatter,通过 meeting_type 隔离数据。
|
||||||
|
SET @add_meeting_type_sql = IF(
|
||||||
|
(SELECT COUNT(1)
|
||||||
|
FROM information_schema.columns
|
||||||
|
WHERE table_schema = DATABASE()
|
||||||
|
AND table_name = 'bg_partymatter'
|
||||||
|
AND column_name = 'meeting_type') = 0,
|
||||||
|
'ALTER TABLE `bg_partymatter` ADD COLUMN `meeting_type` varchar(20) DEFAULT ''party'' COMMENT ''会议类型:party党委会,office所务会''',
|
||||||
|
'SELECT 1'
|
||||||
|
);
|
||||||
|
PREPARE add_meeting_type_stmt FROM @add_meeting_type_sql;
|
||||||
|
EXECUTE add_meeting_type_stmt;
|
||||||
|
DEALLOCATE PREPARE add_meeting_type_stmt;
|
||||||
|
|
||||||
|
UPDATE `bg_partymatter`
|
||||||
|
SET `meeting_type` = 'party'
|
||||||
|
WHERE `meeting_type` IS NULL OR `meeting_type` = '';
|
||||||
|
|
||||||
|
-- 所务会菜单
|
||||||
|
INSERT IGNORE INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
||||||
|
VALUES ('2026052900010000000', NULL, '所务会', '/bg/bgpartymatter/bgOfficematterList', 'bg/bgpartymatter/BgOfficematterList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2026-05-29 00:00:00', NULL, NULL, 0);
|
||||||
|
|
||||||
|
-- 所务会权限控制
|
||||||
|
INSERT IGNORE INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2026052900010000001', '2026052900010000000', '添加所务会', NULL, NULL, 0, NULL, NULL, 2, 'bgofficematter:bg_officematter:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-05-29 00:00:00', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
|
INSERT IGNORE INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2026052900010000002', '2026052900010000000', '编辑所务会', NULL, NULL, 0, NULL, NULL, 2, 'bgofficematter:bg_officematter:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-05-29 00:00:00', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
|
INSERT IGNORE INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2026052900010000003', '2026052900010000000', '删除所务会', NULL, NULL, 0, NULL, NULL, 2, 'bgofficematter:bg_officematter:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-05-29 00:00:00', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
|
INSERT IGNORE INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2026052900010000004', '2026052900010000000', '批量删除所务会', NULL, NULL, 0, NULL, NULL, 2, 'bgofficematter:bg_officematter:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-05-29 00:00:00', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
|
INSERT IGNORE INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2026052900010000005', '2026052900010000000', '导出excel_所务会', NULL, NULL, 0, NULL, NULL, 2, 'bgofficematter:bg_officematter:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-05-29 00:00:00', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
|
INSERT IGNORE INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2026052900010000006', '2026052900010000000', '导入excel_所务会', NULL, NULL, 0, NULL, NULL, 2, 'bgofficematter:bg_officematter:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-05-29 00:00:00', NULL, NULL, 0, 0, '1', 0);
|
||||||
Reference in New Issue
Block a user