diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StepController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StepController.java new file mode 100644 index 0000000..46eafb6 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StepController.java @@ -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 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())); + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StepGroupController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StepGroupController.java new file mode 100644 index 0000000..8b4d0af --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StepGroupController.java @@ -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 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())); + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Step.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Step.java new file mode 100644 index 0000000..1f4f0ee --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Step.java @@ -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; + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StepGroup.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StepGroup.java new file mode 100644 index 0000000..43ed333 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StepGroup.java @@ -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; + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java index 774addb..c933c65 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java @@ -55,6 +55,9 @@ public class Template extends MpBaseEntity /** 显示的编号 */ private String showSn; + /** 步骤库ids */ + private String stepGroupIds; + /** 部门名称 */ @TableField(exist = false) private String deptName; @@ -173,6 +176,14 @@ public class Template extends MpBaseEntity this.showSn = showSn; } + public String getStepGroupIds() { + return stepGroupIds; + } + + public void setStepGroupIds(String stepGroupIds) { + this.stepGroupIds = stepGroupIds; + } + public String getDeptName() { return deptName; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StepGroupMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StepGroupMapper.java new file mode 100644 index 0000000..96bbf82 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StepGroupMapper.java @@ -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 +{ + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StepMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StepMapper.java new file mode 100644 index 0000000..85b37b1 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StepMapper.java @@ -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 +{ + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStepGroupService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStepGroupService.java new file mode 100644 index 0000000..f402e1d --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStepGroupService.java @@ -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 +{ + /** + * 查询步骤库列表 + * + * @param stepGroup 步骤库 + * @return 步骤库集合 + */ + public List queryList(StepGroup stepGroup); + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStepService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStepService.java new file mode 100644 index 0000000..1456997 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStepService.java @@ -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 +{ + /** + * 查询步骤列表 + * + * @param step 步骤 + * @return 步骤集合 + */ + public List queryList(Step step); + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StepGroupServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StepGroupServiceImpl.java new file mode 100644 index 0000000..be253de --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StepGroupServiceImpl.java @@ -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 implements IStepGroupService +{ + /** + * 查询步骤库列表 + * + * @param stepGroup 步骤库 + * @return 步骤库 + */ + @Override + public List queryList(StepGroup stepGroup) + { + QueryWrapper queryWrapper = Wrappers.query(); + return this.list(queryWrapper); + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StepServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StepServiceImpl.java new file mode 100644 index 0000000..a530ff0 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StepServiceImpl.java @@ -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 implements IStepService +{ + /** + * 查询步骤列表 + * + * @param step 步骤 + * @return 步骤 + */ + @Override + public List queryList(Step step) + { + QueryWrapper queryWrapper = Wrappers.query(); + return this.list(queryWrapper); + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StepGroupMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StepGroupMapper.xml new file mode 100644 index 0000000..f449f66 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StepGroupMapper.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StepMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StepMapper.xml new file mode 100644 index 0000000..9f0ed2e --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StepMapper.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file