| @ -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())); | |||
| } | |||
| } | |||
| @ -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())); | |||
| } | |||
| } | |||
| @ -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; | |||
| } | |||
| } | |||
| @ -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; | |||
| } | |||
| } | |||
| @ -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> | |||
| { | |||
| } | |||
| @ -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> | |||
| { | |||
| } | |||
| @ -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); | |||
| } | |||
| @ -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); | |||
| } | |||
| @ -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); | |||
| } | |||
| } | |||
| @ -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); | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -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> | |||