Browse Source

feat: [步骤库] 步骤库管理

master
memorylkf 2 months ago
parent
commit
ba5e67f6c8
13 changed files with 398 additions and 0 deletions
  1. +71
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StepController.java
  2. +70
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StepGroupController.java
  3. +45
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Step.java
  4. +45
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StepGroup.java
  5. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java
  6. +14
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StepGroupMapper.java
  7. +14
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StepMapper.java
  8. +23
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStepGroupService.java
  9. +23
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStepService.java
  10. +35
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StepGroupServiceImpl.java
  11. +35
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StepServiceImpl.java
  12. +6
    -0
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StepGroupMapper.xml
  13. +6
    -0
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StepMapper.xml

+ 71
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StepController.java View File

@ -0,0 +1,71 @@
package com.hxhq.business.controller;
import java.util.Arrays;
import java.util.List;
import com.hxhq.common.security.annotation.Logical;
import com.hxhq.common.security.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.hxhq.business.domain.Step;
import com.hxhq.business.service.IStepService;
import com.hxhq.common.core.web.controller.BaseController;
import com.hxhq.common.core.web.domain.AjaxResult;
import com.hxhq.common.core.web.page.TableDataInfo;
/**
* 步骤Controller
*
* @author hxhq
* @date 2026-01-27
*/
@RestController
@RequestMapping("/business/step")
public class StepController extends BaseController
{
@Autowired
private IStepService stepService;
/**
* 查询步骤列表
*/
@GetMapping("/list")
@RequiresPermissions(value = {"business:step:list","business:stepGroup:list"},logical = Logical.OR)
public TableDataInfo list(Step step)
{
startPage();
List<Step> list = stepService.queryList(step);
return getDataTable(list);
}
/**
* 获取步骤详细信息
*/
@GetMapping(value = "/info")
@RequiresPermissions("business:step:list")
public AjaxResult getInfo(Long id)
{
return AjaxResult.success(stepService.getById(id));
}
/**
* 新增步骤信息
*/
@PostMapping("/save")
@RequiresPermissions("business:step:list")
public AjaxResult save(@RequestBody Step step)
{
return toAjax(stepService.saveOrUpdate(step));
}
/**
* 删除步骤信息
*/
@PostMapping("/delete")
@RequiresPermissions("business:step:list")
public AjaxResult delete(@RequestBody Step step)
{
return toAjax(stepService.removeById(step.getId()));
}
}

+ 70
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StepGroupController.java View File

@ -0,0 +1,70 @@
package com.hxhq.business.controller;
import java.util.Arrays;
import java.util.List;
import com.hxhq.common.security.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.hxhq.business.domain.StepGroup;
import com.hxhq.business.service.IStepGroupService;
import com.hxhq.common.core.web.controller.BaseController;
import com.hxhq.common.core.web.domain.AjaxResult;
import com.hxhq.common.core.web.page.TableDataInfo;
/**
* 步骤库Controller
*
* @author hxhq
* @date 2026-01-27
*/
@RestController
@RequestMapping("/business/stepGroup")
public class StepGroupController extends BaseController
{
@Autowired
private IStepGroupService stepGroupService;
/**
* 查询步骤库列表
*/
@GetMapping("/list")
@RequiresPermissions("business:stepGroup:list")
public TableDataInfo list(StepGroup stepGroup)
{
startPage();
List<StepGroup> list = stepGroupService.queryList(stepGroup);
return getDataTable(list);
}
/**
* 获取步骤库详细信息
*/
@GetMapping(value = "/info")
@RequiresPermissions("business:stepGroup:list")
public AjaxResult getInfo(Long id)
{
return AjaxResult.success(stepGroupService.getById(id));
}
/**
* 新增步骤库信息
*/
@PostMapping("/save")
@RequiresPermissions("business:stepGroup:list")
public AjaxResult save(@RequestBody StepGroup stepGroup)
{
return toAjax(stepGroupService.saveOrUpdate(stepGroup));
}
/**
* 删除步骤库信息
*/
@PostMapping("/delete")
@RequiresPermissions("business:stepGroup:list")
public AjaxResult delete(@RequestBody StepGroup stepGroup)
{
return toAjax(stepGroupService.removeById(stepGroup.getId()));
}
}

+ 45
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Step.java View File

@ -0,0 +1,45 @@
package com.hxhq.business.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hxhq.common.core.domain.MpBaseEntity;
/**
* 步骤对象 t_step
*
* @author hxhq
* @date 2026-01-27
*/
@TableName("t_step")
public class Step extends MpBaseEntity
{
private static final long serialVersionUID = 1L;
/** 编号 */
private String sn;
/** 名称 */
private String name;
public void setSn(String sn)
{
this.sn = sn;
}
public String getSn()
{
return sn;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
}

+ 45
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StepGroup.java View File

@ -0,0 +1,45 @@
package com.hxhq.business.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hxhq.common.core.domain.MpBaseEntity;
/**
* 步骤库对象 t_step_group
*
* @author hxhq
* @date 2026-01-27
*/
@TableName("t_step_group")
public class StepGroup extends MpBaseEntity
{
private static final long serialVersionUID = 1L;
/** 名称 */
private String name;
/** 步骤ids */
private String stepIds;
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setStepIds(String stepIds)
{
this.stepIds = stepIds;
}
public String getStepIds()
{
return stepIds;
}
}

+ 11
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java View File

@ -55,6 +55,9 @@ public class Template extends MpBaseEntity
/** 显示的编号 */ /** 显示的编号 */
private String showSn; private String showSn;
/** 步骤库ids */
private String stepGroupIds;
/** 部门名称 */ /** 部门名称 */
@TableField(exist = false) @TableField(exist = false)
private String deptName; private String deptName;
@ -173,6 +176,14 @@ public class Template extends MpBaseEntity
this.showSn = showSn; this.showSn = showSn;
} }
public String getStepGroupIds() {
return stepGroupIds;
}
public void setStepGroupIds(String stepGroupIds) {
this.stepGroupIds = stepGroupIds;
}
public String getDeptName() { public String getDeptName() {
return deptName; return deptName;
} }

+ 14
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StepGroupMapper.java View File

@ -0,0 +1,14 @@
package com.hxhq.business.mapper;
import com.hxhq.business.domain.StepGroup;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 步骤库Mapper接口
*
* @author hxhq
* @date 2026-01-27
*/
public interface StepGroupMapper extends BaseMapper<StepGroup>
{
}

+ 14
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StepMapper.java View File

@ -0,0 +1,14 @@
package com.hxhq.business.mapper;
import com.hxhq.business.domain.Step;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 步骤Mapper接口
*
* @author hxhq
* @date 2026-01-27
*/
public interface StepMapper extends BaseMapper<Step>
{
}

+ 23
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStepGroupService.java View File

@ -0,0 +1,23 @@
package com.hxhq.business.service;
import java.util.List;
import com.hxhq.business.domain.StepGroup;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 步骤库Service接口
*
* @author hxhq
* @date 2026-01-27
*/
public interface IStepGroupService extends IService<StepGroup>
{
/**
* 查询步骤库列表
*
* @param stepGroup 步骤库
* @return 步骤库集合
*/
public List<StepGroup> queryList(StepGroup stepGroup);
}

+ 23
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStepService.java View File

@ -0,0 +1,23 @@
package com.hxhq.business.service;
import java.util.List;
import com.hxhq.business.domain.Step;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 步骤Service接口
*
* @author hxhq
* @date 2026-01-27
*/
public interface IStepService extends IService<Step>
{
/**
* 查询步骤列表
*
* @param step 步骤
* @return 步骤集合
*/
public List<Step> queryList(Step step);
}

+ 35
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StepGroupServiceImpl.java View File

@ -0,0 +1,35 @@
package com.hxhq.business.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hxhq.common.core.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.hxhq.business.mapper.StepGroupMapper;
import com.hxhq.business.domain.StepGroup;
import com.hxhq.business.service.IStepGroupService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 步骤库Service业务层处理
*
* @author hxhq
* @date 2026-01-27
*/
@Service
public class StepGroupServiceImpl extends ServiceImpl<StepGroupMapper, StepGroup> implements IStepGroupService
{
/**
* 查询步骤库列表
*
* @param stepGroup 步骤库
* @return 步骤库
*/
@Override
public List<StepGroup> queryList(StepGroup stepGroup)
{
QueryWrapper<StepGroup> queryWrapper = Wrappers.query();
return this.list(queryWrapper);
}
}

+ 35
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StepServiceImpl.java View File

@ -0,0 +1,35 @@
package com.hxhq.business.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hxhq.common.core.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.hxhq.business.mapper.StepMapper;
import com.hxhq.business.domain.Step;
import com.hxhq.business.service.IStepService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 步骤Service业务层处理
*
* @author hxhq
* @date 2026-01-27
*/
@Service
public class StepServiceImpl extends ServiceImpl<StepMapper, Step> implements IStepService
{
/**
* 查询步骤列表
*
* @param step 步骤
* @return 步骤
*/
@Override
public List<Step> queryList(Step step)
{
QueryWrapper<Step> queryWrapper = Wrappers.query();
return this.list(queryWrapper);
}
}

+ 6
- 0
hxhq-modules/hxhq-system/src/main/resources/mapper/business/StepGroupMapper.xml View File

@ -0,0 +1,6 @@
<?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="com.hxhq.business.mapper.StepGroupMapper">
</mapper>

+ 6
- 0
hxhq-modules/hxhq-system/src/main/resources/mapper/business/StepMapper.xml View File

@ -0,0 +1,6 @@
<?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="com.hxhq.business.mapper.StepMapper">
</mapper>

Loading…
Cancel
Save