Преглед изворни кода

完成设备业务节点功能

oyq28 пре 4 година
родитељ
комит
3ccfc17133
17 измењених фајлова са 1221 додато и 0 уклоњено
  1. 23 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/dao/ResourceAutoCodeMapper.java
  2. 18 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/dao/ResourceBusinessMapper.java
  3. 38 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/ResourceAutoCodeService.java
  4. 35 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/ResourceBusinessService.java
  5. 48 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/ResourceAutoCodeServiceImpl.java
  6. 46 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/ResourceBusinessServiceImpl.java
  7. 53 0
      imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionResourceCenter/ResourceAutoCodeMapper.xml
  8. 77 0
      imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionResourceCenter/ResourceAutoCodeController.java
  9. 82 0
      imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionResourceCenter/ResourceBusinessController.java
  10. 93 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceAutoCodePageDTO.java
  11. 115 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceAutoCodeSaveDTO.java
  12. 111 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceAutoCodeUpdateDTO.java
  13. 68 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceBusinessPageDTO.java
  14. 66 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceBusinessSaveDTO.java
  15. 70 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceBusinessUpdateDTO.java
  16. 184 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/entity/ResourceAutoCode.java
  17. 94 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/entity/ResourceBusiness.java

+ 23 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/dao/ResourceAutoCodeMapper.java

@@ -0,0 +1,23 @@
+package com.github.zuihou.business.productionResourceCenter.dao;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.github.zuihou.base.mapper.SuperMapper;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceAutoCode;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceBusiness;
+import com.github.zuihou.business.productionResourceCenter.entity.ZZone;
+import com.github.zuihou.database.mybatis.auth.DataScope;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface ResourceAutoCodeMapper extends SuperMapper<ResourceAutoCode> {
+
+    List<ResourceAutoCode> getTree(@Param(Constants.WRAPPER) Wrapper<ResourceAutoCode> wrapper, DataScope dataScope);
+
+    Boolean delCode(Long id);
+}

+ 18 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/dao/ResourceBusinessMapper.java

@@ -0,0 +1,18 @@
+package com.github.zuihou.business.productionResourceCenter.dao;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.github.zuihou.base.mapper.SuperMapper;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceBusiness;
+import com.github.zuihou.business.productionResourceCenter.entity.ZZone;
+import com.github.zuihou.database.mybatis.auth.DataScope;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface ResourceBusinessMapper extends SuperMapper<ResourceBusiness> {
+
+    IPage<ResourceBusiness> findPage(IPage<ResourceBusiness> page, @Param(Constants.WRAPPER) Wrapper<ResourceBusiness> wrapper, DataScope dataScope);
+
+}

+ 38 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/ResourceAutoCodeService.java

@@ -0,0 +1,38 @@
+package com.github.zuihou.business.productionResourceCenter.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.zuihou.base.service.SuperService;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceAutoCodeSaveDTO;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceAutoCodeUpdateDTO;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceAutoCode;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceBusiness;
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+
+import java.util.List;
+
+public interface ResourceAutoCodeService extends SuperService<ResourceAutoCode> {
+
+    List<ResourceAutoCode> getTree(LbqWrapper<ResourceAutoCode> wrapper);
+    /**
+     * 保存
+     *
+     * @param data
+     * @return
+     */
+    ResourceAutoCode save(ResourceAutoCodeSaveDTO data);
+
+    /**
+     * 修改
+     */
+    ResourceAutoCode update(ResourceAutoCodeUpdateDTO data);
+
+
+    /**
+     * 删除
+     *
+     * @param
+     * @return
+     */
+    Boolean delCode(Long id);
+
+}

+ 35 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/ResourceBusinessService.java

@@ -0,0 +1,35 @@
+package com.github.zuihou.business.productionResourceCenter.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.zuihou.base.service.SuperService;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceBusinessSaveDTO;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceBusinessUpdateDTO;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceBusiness;
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+
+public interface ResourceBusinessService extends SuperService<ResourceBusiness> {
+
+    IPage<ResourceBusiness> pageList(IPage page, LbqWrapper<ResourceBusiness> wrapper);
+    /**
+     * 保存
+     *
+     * @param data
+     * @return
+     */
+    ResourceBusiness save(ResourceBusinessSaveDTO data);
+
+    /**
+     * 修改
+     */
+    ResourceBusiness update(ResourceBusinessUpdateDTO data);
+
+
+    /**
+     * 删除
+     *
+     * @param
+     * @return
+     */
+    Boolean delete(ResourceBusiness model);
+
+}

+ 48 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/ResourceAutoCodeServiceImpl.java

@@ -0,0 +1,48 @@
+package com.github.zuihou.business.productionResourceCenter.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.github.zuihou.base.service.SuperServiceImpl;
+import com.github.zuihou.business.productionResourceCenter.dao.ResourceAutoCodeMapper;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceAutoCodeSaveDTO;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceAutoCodeUpdateDTO;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceAutoCode;
+import com.github.zuihou.business.productionResourceCenter.service.ResourceAutoCodeService;
+import com.github.zuihou.database.mybatis.auth.DataScope;
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Slf4j
+@Service
+public class ResourceAutoCodeServiceImpl extends SuperServiceImpl<ResourceAutoCodeMapper, ResourceAutoCode> implements ResourceAutoCodeService {
+
+    @Override
+    public List<ResourceAutoCode> getTree(LbqWrapper<ResourceAutoCode> wrapper) {
+        return baseMapper.getTree(wrapper, new DataScope());
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public ResourceAutoCode save(ResourceAutoCodeSaveDTO data) {
+        ResourceAutoCode resourceBusiness = BeanUtil.toBean(data, ResourceAutoCode.class);
+        save(resourceBusiness);
+        return resourceBusiness;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public ResourceAutoCode update(ResourceAutoCodeUpdateDTO data) {
+        ResourceAutoCode resourceBusiness = BeanUtil.toBean(data, ResourceAutoCode.class);
+        updateById(resourceBusiness);
+        return resourceBusiness;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delCode(Long id) {
+        return baseMapper.delCode(id);
+    }
+}

+ 46 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/ResourceBusinessServiceImpl.java

@@ -0,0 +1,46 @@
+package com.github.zuihou.business.productionResourceCenter.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.zuihou.base.service.SuperServiceImpl;
+import com.github.zuihou.business.productionResourceCenter.dao.ResourceBusinessMapper;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceBusinessSaveDTO;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceBusinessUpdateDTO;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceBusiness;
+import com.github.zuihou.business.productionResourceCenter.service.ResourceBusinessService;
+import com.github.zuihou.database.mybatis.auth.DataScope;
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Slf4j
+@Service
+public class ResourceBusinessServiceImpl extends SuperServiceImpl<ResourceBusinessMapper, ResourceBusiness> implements ResourceBusinessService {
+    @Override
+    public IPage<ResourceBusiness> pageList(IPage page, LbqWrapper<ResourceBusiness> wrapper) {
+        return baseMapper.findPage(page, wrapper, new DataScope());
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public ResourceBusiness save(ResourceBusinessSaveDTO data) {
+        ResourceBusiness resourceBusiness = BeanUtil.toBean(data, ResourceBusiness.class);
+        save(resourceBusiness);
+        return resourceBusiness;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public ResourceBusiness update(ResourceBusinessUpdateDTO data) {
+        ResourceBusiness resourceBusiness = BeanUtil.toBean(data, ResourceBusiness.class);
+        updateById(resourceBusiness);
+        return resourceBusiness;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(ResourceBusiness model) {
+        return removeById(model.getId());
+    }
+}

+ 53 - 0
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionResourceCenter/ResourceAutoCodeMapper.xml

@@ -0,0 +1,53 @@
+<?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.github.zuihou.business.productionResourceCenter.dao.ResourceAutoCodeMapper">
+
+    <resultMap id="BaseResultMap" type="com.github.zuihou.business.productionResourceCenter.entity.ResourceAutoCode">
+        <result column="id" jdbcType="BIGINT" property="id"/>
+        <result column="type" jdbcType="VARCHAR" property="type"/>
+        <result column="status" jdbcType="VARCHAR" property="status"/>
+        <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="remark" jdbcType="VARCHAR" property="remark"/>
+        <result column="command" jdbcType="VARCHAR" property="command"/>
+        <result column="category" jdbcType="INTEGER" property="category"/>
+        <result column="parent_id" jdbcType="BIGINT" property="parentId"/>
+        <result column="business_id" jdbcType="BIGINT" property="businessId"/>
+        <result column="resource_id" jdbcType="BIGINT" property="resourceId"/>
+        <result column="start_id" jdbcType="BIGINT" property="startId"/>
+        <result column="target_id" jdbcType="BIGINT" property="targetId"/>
+        <result column="weight" jdbcType="INTEGER" property="weight"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="create_user" jdbcType="VARCHAR" property="createUser"/>
+        <result column="update_user" jdbcType="VARCHAR" property="updateUser"/>
+    </resultMap>
+
+    <resultMap id="NodeTreeResult" type="com.github.zuihou.business.productionResourceCenter.entity.ResourceAutoCode"
+               extends="BaseResultMap">
+        <collection property="children" column="id" ofType="com.github.zuihou.business.productionResourceCenter.entity.ResourceAutoCode"
+                    javaType="java.util.ArrayList" select="nextNoteTree">
+        </collection>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,`type`,`name`,status,remark,parent_id,business_id,resource_id, start_id, target_id,command,category,weight,create_time,create_user,update_time,update_user
+    </sql>
+
+    <select id="nextNoteTree" resultMap="NodeTreeResult">
+        select
+        <include refid="Base_Column_List"/>
+        from imcs_resource_autocode
+        where parent_id=#{id} order by weight asc
+    </select>
+    <select id="getTree" parameterType="String" resultMap="NodeTreeResult">
+        select
+        <include refid="Base_Column_List"/>
+        from imcs_resource_autocode s ${ew.customSqlSegment} order by weight asc
+    </select>
+
+    <delete id="delCode" parameterType="Long">
+        DELETE FROM imcs_resource_autocode
+        WHERE id = #{id} or parent_id = #{id}
+    </delete>
+
+</mapper>

+ 77 - 0
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionResourceCenter/ResourceAutoCodeController.java

@@ -0,0 +1,77 @@
+package com.github.zuihou.business.controller.productionResourceCenter;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.zuihou.base.R;
+import com.github.zuihou.base.controller.SuperController;
+import com.github.zuihou.base.request.PageParams;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceAutoCodePageDTO;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceAutoCodeSaveDTO;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceAutoCodeUpdateDTO;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceBusinessPageDTO;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceAutoCode;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceBusiness;
+import com.github.zuihou.business.productionResourceCenter.service.ResourceAutoCodeService;
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
+import com.github.zuihou.log.annotation.SysLog;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 前端控制器
+ * 设备业务节点管理
+ * </p>
+ *
+ * @author imcs
+ * @date 2021-11-24
+ */
+@Slf4j
+@Validated
+@RestController
+@RequestMapping("/resourceAutoCode")
+@Api(value = "ResourceAutoCode", tags = "设备节点管理")
+@SysLog(enabled = true)
+public class ResourceAutoCodeController extends SuperController<ResourceAutoCodeService, Long, ResourceAutoCode, ResourceAutoCodePageDTO,ResourceAutoCodeSaveDTO, ResourceAutoCodeUpdateDTO> {
+
+    @ApiOperation(value = "查询设备业务节点管理", notes = "查询设备业务节点管理")
+    @GetMapping("/all")
+    public R<List<ResourceAutoCode>> list(@RequestParam(name="businessId") String businessId) {
+        LbqWrapper<ResourceAutoCode> wrapper = new LbqWrapper<ResourceAutoCode>().eq(ResourceAutoCode::getBusinessId, businessId).eq(ResourceAutoCode::getParentId,0);
+        return success(baseService.getTree(wrapper));
+    }
+
+    @ApiOperation(value = "查询设备业务动作节点", notes = "查询设备业务动作节点")
+    @GetMapping("/getPid")
+    public R<List<ResourceAutoCode>> getPid(@RequestParam(name="businessId") String businessId) {
+        LbqWrapper<ResourceAutoCode> wrapper = new LbqWrapper<ResourceAutoCode>().eq(ResourceAutoCode::getBusinessId, businessId).eq(ResourceAutoCode::getParentId,0);
+        return success(baseService.list(wrapper));
+    }
+
+    @Override
+    public R<ResourceAutoCode> handlerSave(ResourceAutoCodeSaveDTO model) {
+        ResourceAutoCode resourceAutoCode = baseService.save(model);
+        return success(resourceAutoCode);
+    }
+
+    @ApiOperation(value = "删除设备业务节点管理", notes = "删除设备业务节点管理")
+    @PostMapping("/delete")
+    public R<Boolean> delete(@RequestBody ResourceAutoCode model) {
+        return success(baseService.delCode(model.getId()));
+    }
+
+    @ApiOperation(value = "修改设备业务节点管理", notes = "修改设备业务节点管理")
+    @PostMapping("/update")
+    public R<ResourceAutoCode> update(ResourceAutoCodeUpdateDTO model) {
+        ResourceAutoCode resourceAutoCode = baseService.update(model);
+        return success(resourceAutoCode);
+    }
+
+}

+ 82 - 0
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionResourceCenter/ResourceBusinessController.java

@@ -0,0 +1,82 @@
+package com.github.zuihou.business.controller.productionResourceCenter;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.zuihou.base.R;
+import com.github.zuihou.base.controller.SuperController;
+import com.github.zuihou.base.request.PageParams;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceBusinessPageDTO;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceBusinessSaveDTO;
+import com.github.zuihou.business.productionResourceCenter.dto.ResourceBusinessUpdateDTO;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceBusiness;
+import com.github.zuihou.business.productionResourceCenter.entity.ZZone;
+import com.github.zuihou.business.productionResourceCenter.service.ResourceBusinessService;
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
+import com.github.zuihou.log.annotation.SysLog;
+import com.github.zuihou.utils.BeanPlusUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>
+ * 前端控制器
+ * 设备业务管理
+ * </p>
+ *
+ * @author imcs
+ * @date 2021-11-24
+ */
+@Slf4j
+@Validated
+@RestController
+@RequestMapping("/resourceBusiness")
+@Api(value = "ResourceBusiness", tags = "设备业务管理")
+@SysLog(enabled = true)
+public class ResourceBusinessController extends SuperController<ResourceBusinessService, Long, ResourceBusiness, ResourceBusinessPageDTO, ResourceBusinessSaveDTO, ResourceBusinessUpdateDTO> {
+    @Override
+    public void query(PageParams<ResourceBusinessPageDTO> params, IPage<ResourceBusiness> page, Long defSize) {
+        ResourceBusinessPageDTO data = params.getModel();
+        QueryWrap<ResourceBusiness> wrap = handlerWrapper(null, params);
+        LbqWrapper<ResourceBusiness> wrapper = wrap.lambda();
+        ResourceBusiness resourceBusiness = BeanUtil.toBean(data, ResourceBusiness.class);
+
+        wrapper.eq(ResourceBusiness::getResourceId, resourceBusiness.getResourceId());
+        baseService.pageList(page, wrapper);
+    }
+
+
+    @ApiOperation(value = "查询设备业务管理", notes = "查询设备业务管理")
+    @GetMapping("/all")
+    public R<List<ResourceBusiness>> list(@RequestParam(name="resourceId") String resourceId) {
+        QueryWrap wrapper = new QueryWrap<ResourceBusiness>().eq("resource_id", resourceId);
+        return success(baseService.list(wrapper));
+    }
+
+    @Override
+    public R<ResourceBusiness> handlerSave(ResourceBusinessSaveDTO model) {
+        ResourceBusiness resourceBusiness = baseService.save(model);
+        return success(resourceBusiness);
+    }
+
+    @ApiOperation(value = "删除设备业务管理", notes = "删除设备业务管理")
+    @PostMapping("/delete")
+    public R<Boolean> delete(@RequestBody ResourceBusiness model) {
+        return success(baseService.delete(model));
+    }
+
+    @ApiOperation(value = "修改设备业务管理", notes = "修改设备业务管理")
+    @PostMapping("/update")
+    public R<ResourceBusiness> update(ResourceBusinessUpdateDTO model) {
+        ResourceBusiness resourceBusiness = baseService.update(model);
+        return success(resourceBusiness);
+    }
+
+}

+ 93 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceAutoCodePageDTO.java

@@ -0,0 +1,93 @@
+package com.github.zuihou.business.productionResourceCenter.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
+
+/**
+ * <p>
+ * 实体类
+ * 区域管理
+ * </p>
+ *
+ * @author imcs
+ * @since 2020-11-24
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = false)
+@Builder
+@ApiModel(value = "ResourceBusinessPageDTO", description = "区域管理")
+public class ResourceAutoCodePageDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 业务设备ID
+     */
+    @ApiModelProperty(value = "业务设备ID")
+    private Long resourceId;
+
+    /**
+     * 名称
+     */
+    @ApiModelProperty(value = "名称")
+    @Length(max = 256, message = "名称长度不能超过256")
+    private String name;
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    @Length(max = 512, message = "备注长度不能超过512")
+    private String remark;
+
+    /**
+     * 状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "状态(1-启用0-停用)")
+    @Length(max = 4, message = "状态(1-启用0-停用)长度不能超过4")
+    private String status;
+
+    /**
+     * 节点类型(0-动作节点 1-自动化节点)
+     */
+    @ApiModelProperty(value = "节点类型(0-动作节点 1-自动化节点)")
+    @Length(max = 4, message = "节点类型(0-动作节点 1-自动化节点)长度不能超过4")
+    private String type;
+
+
+    /**
+     * 操作设备类型(1-机械节点 2-AGV 3-机械手臂)
+     */
+    @ApiModelProperty(value = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
+    @Length(max = 4, message = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
+    private String category;
+
+
+    /**
+     * 动作指令
+     */
+    @ApiModelProperty(value = "动作指令")
+    private Integer command;
+
+
+    /**
+     * 权重
+     */
+    @ApiModelProperty(value = "权重")
+    @NotNull(message = "权重数值不能为空")
+    private Integer weight;
+
+}

+ 115 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceAutoCodeSaveDTO.java

@@ -0,0 +1,115 @@
+package com.github.zuihou.business.productionResourceCenter.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
+
+/**
+ * <p>
+ * 实体类
+ * 区域管理
+ * </p>
+ *
+ * @author imcs
+ * @since 2020-11-24
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = false)
+@Builder
+@ApiModel(value = "ResourceBusinessSaveDTO", description = "区域管理")
+public class ResourceAutoCodeSaveDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 名称
+     */
+    @ApiModelProperty(value = "名称")
+    @Length(max = 256, message = "名称长度不能超过256")
+    private String name;
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    @Length(max = 512, message = "备注长度不能超过512")
+    private String remark;
+
+    /**
+     * 状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "状态(1-启用0-停用)")
+    @Length(max = 4, message = "状态(1-启用0-停用)长度不能超过4")
+    private String status;
+
+    /**
+     * 节点类型(0-动作节点 1-自动化节点)
+     */
+    @ApiModelProperty(value = "节点类型(0-动作节点 1-自动化节点)")
+    @Length(max = 4, message = "节点类型(0-动作节点 1-自动化节点)长度不能超过4")
+    private String type;
+
+    /**
+     * 权重
+     */
+    @ApiModelProperty(value = "权重")
+    @NotNull(message="权重数值不能为空")
+    private Integer weight;
+
+    /**
+     * 操作设备类型(1-机械节点 2-AGV 3-机械手臂)
+     */
+    @ApiModelProperty(value = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
+    @Length(max = 4, message = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
+    private String category;
+
+    /**
+     * 动作指令
+     */
+    @ApiModelProperty(value = "动作指令")
+    private Integer command;
+
+    /**
+     * 业务ID
+     */
+    @ApiModelProperty(value = "业务ID")
+    @NotNull(message="业务ID不能为空")
+    private Long businessId;
+
+    /**
+     * 父节点ID
+     */
+    @ApiModelProperty(value = "父节点ID")
+    private Long parentId;
+
+    /**
+     * 操作设备ID
+     */
+    @ApiModelProperty(value = "操作设备ID")
+    private Long resourceId;
+
+    /**
+     * 起始设备ID
+     */
+    @ApiModelProperty(value = "起始设备ID")
+    private Long startId;
+
+    /**
+     * 目标设备ID
+     */
+    @ApiModelProperty(value = "目标设备ID")
+    private Long targetId;
+
+}

+ 111 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceAutoCodeUpdateDTO.java

@@ -0,0 +1,111 @@
+package com.github.zuihou.business.productionResourceCenter.dto;
+
+import com.github.zuihou.base.entity.SuperEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 实体类
+ * 区域管理
+ * </p>
+ *
+ * @author imcs
+ * @since 2020-11-24
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = false)
+@Builder
+@ApiModel(value = "ResourceAutoCodeUpdateDTO", description = "设备节点管理")
+public class ResourceAutoCodeUpdateDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "主键")
+    @NotNull(message = "id不能为空", groups = SuperEntity.Update.class)
+    private Long id;
+
+    /**
+     * 名称
+     */
+    @ApiModelProperty(value = "名称")
+    @Length(max = 256, message = "名称长度不能超过256")
+    private String name;
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    @Length(max = 512, message = "备注长度不能超过512")
+    private String remark;
+
+    /**
+     * 状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "状态(1-启用0-停用)")
+    @Length(max = 4, message = "状态(1-启用0-停用)长度不能超过4")
+    private String status;
+
+    /**
+     * 节点类型(0-动作节点 1-自动化节点)
+     */
+    @ApiModelProperty(value = "节点类型(0-动作节点 1-自动化节点)")
+    @Length(max = 4, message = "节点类型(0-动作节点 1-自动化节点)长度不能超过4")
+    private String type;
+
+    /**
+     * 权重
+     */
+    @ApiModelProperty(value = "权重")
+    @NotNull(message="权重数值不能为空")
+    private Integer weight;
+
+    /**
+     * 操作设备类型(1-机械节点 2-AGV 3-机械手臂)
+     */
+    @ApiModelProperty(value = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
+    @Length(max = 4, message = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
+    private String category;
+
+    /**
+     * 动作指令
+     */
+    @ApiModelProperty(value = "动作指令")
+    private Integer command;
+
+
+    /**
+     * 父节点ID
+     */
+    @ApiModelProperty(value = "父节点ID")
+    private Long parentId;
+
+    /**
+     * 操作设备ID
+     */
+    @ApiModelProperty(value = "操作设备ID")
+    private Long resourceId;
+
+    /**
+     * 起始设备ID
+     */
+    @ApiModelProperty(value = "起始设备ID")
+    private Long startId;
+
+    /**
+     * 目标设备ID
+     */
+    @ApiModelProperty(value = "目标设备ID")
+    private Long targetId;
+
+
+}

+ 68 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceBusinessPageDTO.java

@@ -0,0 +1,68 @@
+package com.github.zuihou.business.productionResourceCenter.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 实体类
+ * 区域管理
+ * </p>
+ *
+ * @author imcs
+ * @since 2020-11-24
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = false)
+@Builder
+@ApiModel(value = "ResourceBusinessPageDTO", description = "区域管理")
+public class ResourceBusinessPageDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 业务设备ID
+     */
+    @ApiModelProperty(value = "业务设备ID")
+    @Length(max = 20, message = "业务设备ID长度不能超过20")
+    @NotNull(message = "业务设备ID不能为空")
+    private Long resourceId;
+
+    /**
+     * 名称
+     */
+    @ApiModelProperty(value = "名称")
+    @Length(max = 256, message = "名称长度不能超过256")
+    private String name;
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    @Length(max = 512, message = "备注长度不能超过512")
+    private String remark;
+
+    /**
+     * 状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "状态(1-启用0-停用)")
+    @Length(max = 4, message = "状态(1-启用0-停用)长度不能超过4")
+    private String status;
+
+    /**
+     * 是否终结序(1-是0-否)
+     */
+    @ApiModelProperty(value = "是否终结序(1-是0-否)")
+    @Length(max = 4, message = "是否终结序(1-是0-否)长度不能超过4")
+    private String isFinal;
+
+}

+ 66 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceBusinessSaveDTO.java

@@ -0,0 +1,66 @@
+package com.github.zuihou.business.productionResourceCenter.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 实体类
+ * 区域管理
+ * </p>
+ *
+ * @author imcs
+ * @since 2020-11-24
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = false)
+@Builder
+@ApiModel(value = "ResourceBusinessSaveDTO", description = "设备业务管理")
+public class ResourceBusinessSaveDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 业务设备ID
+     */
+    @ApiModelProperty(value = "业务设备ID")
+    @NotNull(message = "业务设备ID不能为空")
+    private Long resourceId;
+    /**
+     * 名称
+     */
+    @ApiModelProperty(value = "名称")
+    @Length(max = 256, message = "名称长度不能超过256")
+    private String name;
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    @Length(max = 512, message = "备注长度不能超过512")
+    private String remark;
+
+    /**
+     * 状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "状态(1-启用0-停用)")
+    @Length(max = 4, message = "状态(1-启用0-停用)长度不能超过4")
+    private String status;
+
+    /**
+     * 是否终结序(1-是0-否)
+     */
+    @ApiModelProperty(value = "是否终结序(1-是0-否)")
+    @Length(max = 4, message = "是否终结序(1-是0-否)长度不能超过4")
+    private String isFinal;
+
+}

+ 70 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/dto/ResourceBusinessUpdateDTO.java

@@ -0,0 +1,70 @@
+package com.github.zuihou.business.productionResourceCenter.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.github.zuihou.base.entity.SuperEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.List;
+
+import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
+
+/**
+ * <p>
+ * 实体类
+ * 区域管理
+ * </p>
+ *
+ * @author imcs
+ * @since 2020-11-24
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = false)
+@Builder
+@ApiModel(value = "ResourceBusinessUpdateDTO", description = "设备业务管理")
+public class ResourceBusinessUpdateDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "主键")
+    @NotNull(message = "id不能为空", groups = SuperEntity.Update.class)
+    private Long id;
+
+    /**
+     * 名称
+     */
+    @ApiModelProperty(value = "名称")
+    @Length(max = 256, message = "名称长度不能超过256")
+    private String name;
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    @Length(max = 512, message = "备注长度不能超过512")
+    private String remark;
+
+    /**
+     * 状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "状态(1-启用0-停用)")
+    @Length(max = 4, message = "状态(1-启用0-停用)长度不能超过4")
+    private String status;
+
+    /**
+     * 是否终结序(1-是0-否)
+     */
+    @ApiModelProperty(value = "是否终结序(1-是0-否)")
+    @Length(max = 4, message = "是否终结序(1-是0-否)长度不能超过4")
+    private String isFinal;
+
+}

+ 184 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/entity/ResourceAutoCode.java

@@ -0,0 +1,184 @@
+package com.github.zuihou.business.productionResourceCenter.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.github.zuihou.base.entity.Entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+import java.time.LocalDateTime;
+import java.util.List;
+
+import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
+
+
+@Data
+@NoArgsConstructor
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("imcs_resource_autocode")
+@ApiModel(value = "ResourceAutoCode", description = "设备节点管理")
+@AllArgsConstructor
+public class ResourceAutoCode extends Entity<Long> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 设备业务名
+     */
+    @ApiModelProperty(value = "节点名称")
+    @Length(max = 256, message = "节点名称长度不能超过256")
+    @TableField(value = "name", condition = LIKE)
+    @Excel(name = "节点名称")
+    private String name;
+
+
+    /**
+     * 节点类型(0-动作节点 1-自动化节点)
+     */
+    @ApiModelProperty(value = "节点类型(0-动作节点 1-自动化节点)")
+    @Length(max = 4, message = "节点类型(0-动作节点 1-自动化节点)长度不能超过4")
+    @TableField(value = "type", condition = LIKE)
+    @Excel(name = "节点类型(0-动作节点 1-自动化节点)")
+    private String type;
+
+
+    /**
+     * 操作设备类型(1-机械节点 2-AGV 3-机械手臂)
+     */
+    @ApiModelProperty(value = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
+    @Length(max = 4, message = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
+    @TableField(value = "category", condition = LIKE)
+    @Excel(name = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
+    private String category;
+
+
+    /**
+     * 动作指令
+     */
+    @ApiModelProperty(value = "动作指令")
+    @TableField(value = "command", condition = LIKE)
+    @Excel(name = "动作指令")
+    private Integer command;
+
+
+    /**
+     * 权重
+     */
+    @ApiModelProperty(value = "权重")
+    @TableField(value = "weight", condition = LIKE)
+    @Excel(name = "权重")
+    @NotNull(message="权重数值不能为空")
+    private Integer weight;
+
+
+    /**
+     * 节点状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "节点状态(1-启用0-停用)")
+    @Length(max = 4, message = "节点状态(1-启用0-停用)长度不能超过4")
+    @TableField(value = "status", condition = LIKE)
+    @Excel(name = "节点状态(1-启用0-停用)")
+    private String status;
+
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    @Length(max = 512, message = "备注长度不能超过512")
+    @TableField(value = "remark", condition = LIKE)
+    @Excel(name = "备注")
+    private String remark;
+
+    /**
+     * 业务ID
+     */
+    @ApiModelProperty(value = "业务ID")
+    @TableField(value = "business_id", condition = LIKE)
+    @Excel(name = "业务ID")
+    @NotNull(message="业务ID不能为空")
+    private Long businessId;
+
+    /**
+     * 父节点ID
+     */
+    @ApiModelProperty(value = "父节点ID")
+    @TableField(value = "parent_id", condition = LIKE)
+    @Excel(name = "父节点ID")
+    private Long parentId;
+
+    /**
+     * 操作设备ID
+     */
+    @ApiModelProperty(value = "操作设备ID")
+    @TableField(value = "resource_id", condition = LIKE)
+    @Excel(name = "操作设备ID")
+    private Long resourceId;
+
+    /**
+     * 起始设备ID
+     */
+    @ApiModelProperty(value = "起始设备ID")
+    @TableField(value = "start_id", condition = LIKE)
+    @Excel(name = "起始设备ID")
+    private Long startId;
+
+    /**
+     * 目标设备ID
+     */
+    @ApiModelProperty(value = "目标设备ID")
+    @TableField(value = "target_id", condition = LIKE)
+    @Excel(name = "目标设备ID")
+    private Long targetId;
+
+
+    @TableField(exist=false)
+    private List<ResourceAutoCode> children;
+
+    /**
+     * 操作设备名
+     */
+    @TableField(exist=false)
+    private String resourceName;
+
+    /**
+     * 起始设备名
+     */
+    @TableField(exist=false)
+    private String startName;
+
+    /**
+     * 目标设备名
+     */
+    @TableField(exist=false)
+    private String targetName;
+
+    @Builder
+    public ResourceAutoCode(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, String name, String type, int command, Integer weight, String status, String remark, Long parentId, Long businessId, Long resourceId, Long startId, Long targetId, String resourceName, String startName, String targetName) {
+        super(id, createTime, createUser, updateTime, updateUser);
+        this.name = name;
+        this.type = type;
+        this.command = command;
+        this.weight = weight;
+        this.status = status;
+        this.remark = remark;
+        this.parentId = parentId;
+        this.businessId = businessId;
+        this.resourceId = resourceId;
+        this.startId = startId;
+        this.targetId = targetId;
+        this.resourceName = resourceName;
+        this.startName = startName;
+        this.targetName = targetName;
+        this.createTime = createTime;
+        this.createUser = createUser;
+        this.updateTime = updateTime;
+        this.updateUser = updateUser;
+    }
+}

+ 94 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/entity/ResourceBusiness.java

@@ -0,0 +1,94 @@
+package com.github.zuihou.business.productionResourceCenter.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.github.zuihou.base.entity.Entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+import java.time.LocalDateTime;
+
+import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
+
+@Data
+@NoArgsConstructor
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("imcs_resource_business")
+@ApiModel(value = "ResourceBusiness", description = "设备业务管理")
+@AllArgsConstructor
+public class ResourceBusiness extends Entity<Long> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 设备业务名
+     */
+    @ApiModelProperty(value = "设备业务名")
+    @Length(max = 256, message = "设备业务名长度不能超过256")
+    @TableField(value = "name", condition = LIKE)
+    @Excel(name = "设备业务名")
+    private String name;
+
+
+    /**
+     * 业务状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "业务状态(1-启用0-停用)")
+    @Length(max = 4, message = "业务状态(1-启用0-停用)长度不能超过4")
+    @TableField(value = "status", condition = LIKE)
+    @Excel(name = "业务状态(1-启用0-停用)")
+    private String status;
+
+
+    /**
+     * 是否终结序(1-是0-否)
+     */
+    @ApiModelProperty(value = "是否终结序(1-是0-否)")
+    @Length(max = 4, message = "是否终结序(1-是0-否)长度不能超过4")
+    @TableField(value = "is_final", condition = LIKE)
+    @Excel(name = "是否终结序(1-是0-否)")
+    private Boolean isFinal;
+
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    @Length(max = 512, message = "备注长度不能超过512")
+    @TableField(value = "remark", condition = LIKE)
+    @Excel(name = "备注")
+    private String remark;
+
+
+    /**
+     * 设备ID
+     */
+    @ApiModelProperty(value = "设备ID")
+    @TableField(value = "resource_id", condition = LIKE)
+    @Excel(name = "设备ID")
+    @NotNull(message = "设备ID不能为空")
+    private Long resourceId;
+
+    @TableField(exist=false)
+    private String productionResourceName;
+
+    @Builder
+    public ResourceBusiness(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, String name, String status, boolean isFinal, String remark, Long resourceCodeId,Long resourceId) {
+        super(id, createTime, createUser, updateTime, updateUser);
+        this.name = name;
+        this.status = status;
+        this.isFinal = isFinal;
+        this.remark = remark;
+        this.resourceId = resourceId;
+        this.createTime = createTime;
+        this.createUser = createUser;
+        this.updateTime = updateTime;
+        this.updateUser = updateUser;
+    }
+}