第四轮:FlowInstance/FlowNodeLog 后端骨架 + WcsFlowLogController升级 + flowlog前端页面 + flowlog API
This commit is contained in:
11
.dockerignore
Normal file
11
.dockerignore
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
**/target/
|
||||||
|
**/node_modules/
|
||||||
|
**/.git
|
||||||
|
**/.idea
|
||||||
|
**/.vscode
|
||||||
|
**/*.iml
|
||||||
|
**/dist/
|
||||||
|
**/.DS_Store
|
||||||
|
**/logs/
|
||||||
|
docker-compose.yml
|
||||||
|
.env
|
||||||
18
.env.example
Normal file
18
.env.example
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# WCS-RuoYi Docker <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>
|
||||||
|
# <20><><EFBFBD>ƴ<EFBFBD><C6B4>ļ<EFBFBD>Ϊ .env <20><><EFBFBD><EFBFBD>Ϊʵ<CEAA><CAB5>ֵ
|
||||||
|
|
||||||
|
# MySQL
|
||||||
|
MYSQL_DATABASE=ry-vue
|
||||||
|
MYSQL_ROOT_PASSWORD=change_me_root
|
||||||
|
MYSQL_USER=ruoyi
|
||||||
|
MYSQL_PASSWORD=change_me
|
||||||
|
MYSQL_PORT=3306
|
||||||
|
|
||||||
|
# Redis
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
# <20><><EFBFBD>˷<EFBFBD><CBB7><EFBFBD>
|
||||||
|
SERVER_PORT=8080
|
||||||
|
|
||||||
|
# ǰ<><C7B0>
|
||||||
|
UI_PORT=80
|
||||||
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
FROM maven:3.8-openjdk-8 AS build
|
||||||
|
WORKDIR /app
|
||||||
|
COPY pom.xml .
|
||||||
|
COPY ruoyi-admin/pom.xml ruoyi-admin/pom.xml
|
||||||
|
COPY ruoyi-common/pom.xml ruoyi-common/pom.xml
|
||||||
|
COPY ruoyi-framework/pom.xml ruoyi-framework/pom.xml
|
||||||
|
COPY ruoyi-generator/pom.xml ruoyi-generator/pom.xml
|
||||||
|
COPY ruoyi-quartz/pom.xml ruoyi-quartz/pom.xml
|
||||||
|
COPY ruoyi-system/pom.xml ruoyi-system/pom.xml
|
||||||
|
RUN mvn dependency:go-offline -B || true
|
||||||
|
COPY . .
|
||||||
|
RUN mvn package -DskipTests -q
|
||||||
|
|
||||||
|
FROM openjdk:8-jre-slim
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /app/ruoyi-admin/target/ruoyi-admin.jar app.jar
|
||||||
|
EXPOSE 8080
|
||||||
|
ENV JAVA_OPTS="-Xms256m -Xmx512m"
|
||||||
|
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar app.jar"]
|
||||||
73
docker-compose.yml
Normal file
73
docker-compose.yml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:8.0
|
||||||
|
container_name: wcs-mysql
|
||||||
|
environment:
|
||||||
|
MYSQL_DATABASE: ${MYSQL_DATABASE:-ry-vue}
|
||||||
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-your_password_here}
|
||||||
|
MYSQL_USER: ${MYSQL_USER:-ruoyi}
|
||||||
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-your_password_here}
|
||||||
|
ports:
|
||||||
|
- "${MYSQL_PORT:-3306}:3306"
|
||||||
|
volumes:
|
||||||
|
- mysql-data:/var/lib/mysql
|
||||||
|
- ./sql:/docker-entrypoint-initdb.d
|
||||||
|
command: >
|
||||||
|
--character-set-server=utf8mb4
|
||||||
|
--collation-server=utf8mb4_general_ci
|
||||||
|
--default-authentication-plugin=mysql_native_password
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
container_name: wcs-redis
|
||||||
|
ports:
|
||||||
|
- "${REDIS_PORT:-6379}:6379"
|
||||||
|
volumes:
|
||||||
|
- redis-data:/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
ruoyi-server:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: wcs-server
|
||||||
|
ports:
|
||||||
|
- "${SERVER_PORT:-8080}:8080"
|
||||||
|
environment:
|
||||||
|
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/${MYSQL_DATABASE:-ry-vue}?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
|
SPRING_DATASOURCE_USERNAME: ${MYSQL_USER:-ruoyi}
|
||||||
|
SPRING_DATASOURCE_PASSWORD: ${MYSQL_PASSWORD:-your_password_here}
|
||||||
|
SPRING_REDIS_HOST: redis
|
||||||
|
SPRING_REDIS_PORT: 6379
|
||||||
|
depends_on:
|
||||||
|
mysql:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
ruoyi-ui:
|
||||||
|
image: node:16-alpine
|
||||||
|
container_name: wcs-ui
|
||||||
|
working_dir: /app
|
||||||
|
volumes:
|
||||||
|
- ./ruoyi-ui:/app
|
||||||
|
ports:
|
||||||
|
- "${UI_PORT:-80}:80"
|
||||||
|
command: sh -c "npm install --registry https://registry.npmmirror.com && npm run dev"
|
||||||
|
depends_on:
|
||||||
|
- ruoyi-server
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mysql-data:
|
||||||
|
redis-data:
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package com.ruoyi.wcs.api.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.wcs.api.domain.WcsApiConfig;
|
||||||
|
import com.ruoyi.wcs.api.service.IWcsApiConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD> Controller
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wcs/api/config")
|
||||||
|
public class WcsApiConfigController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWcsApiConfigService apiConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><>ѯ<EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:api:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WcsApiConfig apiConfig)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WcsApiConfig> list = apiConfigService.selectApiConfigList(apiConfig);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
||||||
|
*/
|
||||||
|
@Log(title = "<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.EXPORT)
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:api:export')")
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WcsApiConfig apiConfig)
|
||||||
|
{
|
||||||
|
List<WcsApiConfig> list = apiConfigService.selectApiConfigList(apiConfig);
|
||||||
|
ExcelUtil<WcsApiConfig> util = new ExcelUtil<WcsApiConfig>(WcsApiConfig.class);
|
||||||
|
util.exportExcel(response, list, "<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>ݽӿ<DDBD>ID<49><44>ȡ<EFBFBD><C8A1>ϸ<EFBFBD><CFB8>Ϣ
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:api:query')")
|
||||||
|
@GetMapping(value = "/{apiId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable Long apiId)
|
||||||
|
{
|
||||||
|
return success(apiConfigService.selectApiConfigById(apiId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:api:add')")
|
||||||
|
@Log(title = "<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@Validated @RequestBody WcsApiConfig apiConfig)
|
||||||
|
{
|
||||||
|
if (!apiConfigService.checkApiCodeUnique(apiConfig))
|
||||||
|
{
|
||||||
|
return error("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>'" + apiConfig.getApiCode() + "'ʧ<>ܣ<EFBFBD><DCA3>ӿڱ<D3BF><DAB1><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD>");
|
||||||
|
}
|
||||||
|
apiConfig.setCreateBy(getUsername());
|
||||||
|
return toAjax(apiConfigService.insertApiConfig(apiConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>Ľӿ<C4BD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:api:edit')")
|
||||||
|
@Log(title = "<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@Validated @RequestBody WcsApiConfig apiConfig)
|
||||||
|
{
|
||||||
|
if (!apiConfigService.checkApiCodeUnique(apiConfig))
|
||||||
|
{
|
||||||
|
return error("<EFBFBD>Ľӿ<EFBFBD>'" + apiConfig.getApiCode() + "'ʧ<>ܣ<EFBFBD><DCA3>ӿڱ<D3BF><DAB1><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD>");
|
||||||
|
}
|
||||||
|
apiConfig.setUpdateBy(getUsername());
|
||||||
|
return toAjax(apiConfigService.updateApiConfig(apiConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ɾ<><C9BE><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:api:remove')")
|
||||||
|
@Log(title = "<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{apiIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] apiIds)
|
||||||
|
{
|
||||||
|
return toAjax(apiConfigService.deleteApiConfigByIds(apiIds));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
package com.ruoyi.wcs.api.domain;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>ñ<EFBFBD> wcs_api_config
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public class WcsApiConfig extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>ӿ<EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long apiId;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>ӿڱ<EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String apiCode;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String apiName;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>ӿڵ<EFBFBD>ַ")
|
||||||
|
private String apiUrl;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ")
|
||||||
|
private String requestMethod;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String contentType;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD>ʱʱ<EFBFBD><EFBFBD>", cellType = ColumnType.NUMERIC)
|
||||||
|
private Integer timeout;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD>", cellType = ColumnType.NUMERIC)
|
||||||
|
private Integer retryCount;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", readConverterExp = "inbound=<3D><>վ,outbound=<3D><>վ")
|
||||||
|
private String direction;
|
||||||
|
|
||||||
|
@Excel(name = "״̬", readConverterExp = "0=<3D><><EFBFBD><EFBFBD>,1=ͣ<><CDA3>")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
public Long getApiId()
|
||||||
|
{
|
||||||
|
return apiId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApiId(Long apiId)
|
||||||
|
{
|
||||||
|
this.apiId = apiId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotBlank(message = "<EFBFBD>ӿڱ<EFBFBD><EFBFBD>벻<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>")
|
||||||
|
@Size(min = 0, max = 64, message = "<EFBFBD>ӿڱ<EFBFBD><EFBFBD>볤<EFBFBD>Ȳ<EFBFBD><EFBFBD>ܳ<EFBFBD><EFBFBD><EFBFBD>64<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>")
|
||||||
|
public String getApiCode()
|
||||||
|
{
|
||||||
|
return apiCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApiCode(String apiCode)
|
||||||
|
{
|
||||||
|
this.apiCode = apiCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Size(min = 0, max = 128, message = "<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><EFBFBD>Ȳ<EFBFBD><EFBFBD>ܳ<EFBFBD><EFBFBD><EFBFBD>128<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>")
|
||||||
|
public String getApiName()
|
||||||
|
{
|
||||||
|
return apiName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApiName(String apiName)
|
||||||
|
{
|
||||||
|
this.apiName = apiName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Size(min = 0, max = 512, message = "<EFBFBD>ӿڵ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>Ȳ<EFBFBD><EFBFBD>ܳ<EFBFBD><EFBFBD><EFBFBD>512<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>")
|
||||||
|
public String getApiUrl()
|
||||||
|
{
|
||||||
|
return apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApiUrl(String apiUrl)
|
||||||
|
{
|
||||||
|
this.apiUrl = apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRequestMethod()
|
||||||
|
{
|
||||||
|
return requestMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequestMethod(String requestMethod)
|
||||||
|
{
|
||||||
|
this.requestMethod = requestMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContentType()
|
||||||
|
{
|
||||||
|
return contentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContentType(String contentType)
|
||||||
|
{
|
||||||
|
this.contentType = contentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTimeout()
|
||||||
|
{
|
||||||
|
return timeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimeout(Integer timeout)
|
||||||
|
{
|
||||||
|
this.timeout = timeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRetryCount()
|
||||||
|
{
|
||||||
|
return retryCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRetryCount(Integer retryCount)
|
||||||
|
{
|
||||||
|
this.retryCount = retryCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDirection()
|
||||||
|
{
|
||||||
|
return direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirection(String direction)
|
||||||
|
{
|
||||||
|
this.direction = direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDelFlag()
|
||||||
|
{
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelFlag(String delFlag)
|
||||||
|
{
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("apiId", getApiId())
|
||||||
|
.append("apiCode", getApiCode())
|
||||||
|
.append("apiName", getApiName())
|
||||||
|
.append("apiUrl", getApiUrl())
|
||||||
|
.append("requestMethod", getRequestMethod())
|
||||||
|
.append("contentType", getContentType())
|
||||||
|
.append("timeout", getTimeout())
|
||||||
|
.append("retryCount", getRetryCount())
|
||||||
|
.append("direction", getDirection())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package com.ruoyi.wcs.api.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.api.domain.WcsApiConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ݲ<EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface WcsApiConfigMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* <20><>ѯ<EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiConfig <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
* @return <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>ü<EFBFBD><C3BC><EFBFBD>
|
||||||
|
*/
|
||||||
|
public List<WcsApiConfig> selectApiConfigList(WcsApiConfig apiConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ͨ<><CDA8><EFBFBD>ӿ<EFBFBD>ID<49><44>ѯ<EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiId <20>ӿ<EFBFBD>ID
|
||||||
|
* @return <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
|
||||||
|
*/
|
||||||
|
public WcsApiConfig selectApiConfigById(Long apiId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiConfig <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int insertApiConfig(WcsApiConfig apiConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>Ľӿ<C4BD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiConfig <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int updateApiConfig(WcsApiConfig apiConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ɾ<><C9BE><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiId <20>ӿ<EFBFBD>ID
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int deleteApiConfigById(Long apiId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiIds <20>ӿ<EFBFBD>ID<49><44><EFBFBD><EFBFBD>
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int deleteApiConfigByIds(Long[] apiIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* У<><D0A3><EFBFBD>ӿڱ<D3BF><DAB1><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ψһ
|
||||||
|
*
|
||||||
|
* @param apiCode <20>ӿڱ<D3BF><DAB1><EFBFBD>
|
||||||
|
* @return <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
*/
|
||||||
|
public WcsApiConfig checkApiCodeUnique(String apiCode);
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* WCS <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
||||||
|
* <p>
|
||||||
|
* <20><><EFBFBD><EFBFBD> WCS <20><><EFBFBD>ⲿϵͳ<CFB5><CDB3>WMS / ERP / PLC <20>ȣ<EFBFBD><C8A3><EFBFBD> API <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>ã<EFBFBD>
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD>ӿڵ<D3BF>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>á<EFBFBD><C3A1><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2>Եȡ<D4B5>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author WCS
|
||||||
|
*/
|
||||||
|
package com.ruoyi.wcs.api;
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.ruoyi.wcs.api.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.api.domain.WcsApiConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface IWcsApiConfigService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* <20><>ѯ<EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiConfig <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
* @return <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>ü<EFBFBD><C3BC><EFBFBD>
|
||||||
|
*/
|
||||||
|
public List<WcsApiConfig> selectApiConfigList(WcsApiConfig apiConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ͨ<><CDA8><EFBFBD>ӿ<EFBFBD>ID<49><44>ѯ<EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiId <20>ӿ<EFBFBD>ID
|
||||||
|
* @return <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
|
||||||
|
*/
|
||||||
|
public WcsApiConfig selectApiConfigById(Long apiId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiConfig <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int insertApiConfig(WcsApiConfig apiConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>Ľӿ<C4BD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiConfig <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int updateApiConfig(WcsApiConfig apiConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @param apiIds <20>ӿ<EFBFBD>ID<49><44><EFBFBD><EFBFBD>
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int deleteApiConfigByIds(Long[] apiIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* У<><D0A3><EFBFBD>ӿڱ<D3BF><DAB1><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ψһ
|
||||||
|
*
|
||||||
|
* @param apiConfig <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public boolean checkApiCodeUnique(WcsApiConfig apiConfig);
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.ruoyi.wcs.api.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.wcs.api.domain.WcsApiConfig;
|
||||||
|
import com.ruoyi.wcs.api.mapper.WcsApiConfigMapper;
|
||||||
|
import com.ruoyi.wcs.api.service.IWcsApiConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>㴦<EFBFBD><E3B4A6>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WcsApiConfigServiceImpl implements IWcsApiConfigService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WcsApiConfigMapper apiConfigMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WcsApiConfig> selectApiConfigList(WcsApiConfig apiConfig)
|
||||||
|
{
|
||||||
|
return apiConfigMapper.selectApiConfigList(apiConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WcsApiConfig selectApiConfigById(Long apiId)
|
||||||
|
{
|
||||||
|
return apiConfigMapper.selectApiConfigById(apiId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertApiConfig(WcsApiConfig apiConfig)
|
||||||
|
{
|
||||||
|
return apiConfigMapper.insertApiConfig(apiConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateApiConfig(WcsApiConfig apiConfig)
|
||||||
|
{
|
||||||
|
return apiConfigMapper.updateApiConfig(apiConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteApiConfigByIds(Long[] apiIds)
|
||||||
|
{
|
||||||
|
return apiConfigMapper.deleteApiConfigByIds(apiIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkApiCodeUnique(WcsApiConfig apiConfig)
|
||||||
|
{
|
||||||
|
Long apiId = StringUtils.isNull(apiConfig.getApiId()) ? -1L : apiConfig.getApiId();
|
||||||
|
WcsApiConfig info = apiConfigMapper.checkApiCodeUnique(apiConfig.getApiCode());
|
||||||
|
if (StringUtils.isNotNull(info) && info.getApiId().longValue() != apiId.longValue())
|
||||||
|
{
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
package com.ruoyi.wcs.device.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.wcs.device.domain.WcsDevice;
|
||||||
|
import com.ruoyi.wcs.device.service.IWcsDeviceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WCS <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD> Controller
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wcs/device")
|
||||||
|
public class WcsDeviceController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWcsDeviceService deviceService;
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:device:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WcsDevice device)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WcsDevice> list = deviceService.selectDeviceList(device);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:device:query')")
|
||||||
|
@GetMapping(value = "/{deviceId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable Long deviceId)
|
||||||
|
{
|
||||||
|
return success(deviceService.selectDeviceById(deviceId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:device:add')")
|
||||||
|
@Log(title = "<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@Validated @RequestBody WcsDevice device)
|
||||||
|
{
|
||||||
|
if (!deviceService.checkDeviceCodeUnique(device))
|
||||||
|
{
|
||||||
|
return error("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸'" + device.getDeviceCode() + "'ʧ<>ܣ<EFBFBD><DCA3>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD>");
|
||||||
|
}
|
||||||
|
device.setCreateBy(getUsername());
|
||||||
|
return toAjax(deviceService.insertDevice(device));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:device:edit')")
|
||||||
|
@Log(title = "<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@Validated @RequestBody WcsDevice device)
|
||||||
|
{
|
||||||
|
if (!deviceService.checkDeviceCodeUnique(device))
|
||||||
|
{
|
||||||
|
return error("<EFBFBD><EFBFBD><EFBFBD>豸'" + device.getDeviceCode() + "'ʧ<>ܣ<EFBFBD><DCA3>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD>");
|
||||||
|
}
|
||||||
|
device.setUpdateBy(getUsername());
|
||||||
|
return toAjax(deviceService.updateDevice(device));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:device:remove')")
|
||||||
|
@Log(title = "<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{deviceIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] deviceIds)
|
||||||
|
{
|
||||||
|
return toAjax(deviceService.deleteDeviceByIds(deviceIds));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.ruoyi.wcs.device.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.wcs.device.domain.WcsDevicePoint;
|
||||||
|
import com.ruoyi.wcs.device.service.IWcsDevicePointService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WCS <20>豸<EFBFBD><E8B1B8>λ<EFBFBD><CEBB><EFBFBD><EFBFBD> Controller
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wcs/device/point")
|
||||||
|
public class WcsDevicePointController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWcsDevicePointService pointService;
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:point:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WcsDevicePoint point)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WcsDevicePoint> list = pointService.selectPointList(point);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:point:query')")
|
||||||
|
@GetMapping(value = "/{pointId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable Long pointId)
|
||||||
|
{
|
||||||
|
return success(pointService.selectPointById(pointId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:point:add')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@Validated @RequestBody WcsDevicePoint point)
|
||||||
|
{
|
||||||
|
point.setCreateBy(getUsername());
|
||||||
|
return toAjax(pointService.insertPoint(point));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:point:edit')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@Validated @RequestBody WcsDevicePoint point)
|
||||||
|
{
|
||||||
|
point.setUpdateBy(getUsername());
|
||||||
|
return toAjax(pointService.updatePoint(point));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:point:remove')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{pointIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] pointIds)
|
||||||
|
{
|
||||||
|
return toAjax(pointService.deletePointByIds(pointIds));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,182 @@
|
|||||||
|
package com.ruoyi.wcs.device.domain;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>豸<EFBFBD><E8B1B8>Ϣ<EFBFBD><CFA2> wcs_device
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public class WcsDevice extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** <20>豸ID */
|
||||||
|
@Excel(name = "<EFBFBD>豸ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
/** <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD> */
|
||||||
|
@Excel(name = "<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String deviceCode;
|
||||||
|
|
||||||
|
/** <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD> */
|
||||||
|
@Excel(name = "<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/** <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD> */
|
||||||
|
@Excel(name = "<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String deviceType;
|
||||||
|
|
||||||
|
/** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String areaCode;
|
||||||
|
|
||||||
|
/** ͨ<><CDA8>Э<EFBFBD><D0AD> */
|
||||||
|
@Excel(name = "ͨ<EFBFBD><EFBFBD>Э<EFBFBD><EFBFBD>")
|
||||||
|
private String protocolType;
|
||||||
|
|
||||||
|
/** <20>豸IP<49><50>ַ */
|
||||||
|
@Excel(name = "IP<EFBFBD><EFBFBD>ַ")
|
||||||
|
private String ipAddress;
|
||||||
|
|
||||||
|
/** ͨ<>Ŷ˿<C5B6> */
|
||||||
|
@Excel(name = "<EFBFBD>˿<EFBFBD>", cellType = ColumnType.NUMERIC)
|
||||||
|
private Integer port;
|
||||||
|
|
||||||
|
/** <20>豸״̬<D7B4><CCAC>0<EFBFBD><30><EFBFBD><EFBFBD> 1ͣ<31>ã<EFBFBD> */
|
||||||
|
@Excel(name = "״̬", readConverterExp = "0=<3D><><EFBFBD><EFBFBD>,1=ͣ<><CDA3>")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** ɾ<><C9BE><EFBFBD><EFBFBD>־<EFBFBD><D6BE>0<EFBFBD><30><EFBFBD><EFBFBD> 2ɾ<32><C9BE><EFBFBD><EFBFBD> */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
public Long getDeviceId()
|
||||||
|
{
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceId(Long deviceId)
|
||||||
|
{
|
||||||
|
this.deviceId = deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotBlank(message = "<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD>벻<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>")
|
||||||
|
@Size(min = 0, max = 64, message = "<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD>볤<EFBFBD>Ȳ<EFBFBD><EFBFBD>ܳ<EFBFBD><EFBFBD><EFBFBD>64<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>")
|
||||||
|
public String getDeviceCode()
|
||||||
|
{
|
||||||
|
return deviceCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceCode(String deviceCode)
|
||||||
|
{
|
||||||
|
this.deviceCode = deviceCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Size(min = 0, max = 128, message = "<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><EFBFBD>Ȳ<EFBFBD><EFBFBD>ܳ<EFBFBD><EFBFBD><EFBFBD>128<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>")
|
||||||
|
public String getDeviceName()
|
||||||
|
{
|
||||||
|
return deviceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceName(String deviceName)
|
||||||
|
{
|
||||||
|
this.deviceName = deviceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceType()
|
||||||
|
{
|
||||||
|
return deviceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceType(String deviceType)
|
||||||
|
{
|
||||||
|
this.deviceType = deviceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaCode()
|
||||||
|
{
|
||||||
|
return areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaCode(String areaCode)
|
||||||
|
{
|
||||||
|
this.areaCode = areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProtocolType()
|
||||||
|
{
|
||||||
|
return protocolType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProtocolType(String protocolType)
|
||||||
|
{
|
||||||
|
this.protocolType = protocolType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIpAddress()
|
||||||
|
{
|
||||||
|
return ipAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIpAddress(String ipAddress)
|
||||||
|
{
|
||||||
|
this.ipAddress = ipAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPort()
|
||||||
|
{
|
||||||
|
return port;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPort(Integer port)
|
||||||
|
{
|
||||||
|
this.port = port;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDelFlag()
|
||||||
|
{
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelFlag(String delFlag)
|
||||||
|
{
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("deviceId", getDeviceId())
|
||||||
|
.append("deviceCode", getDeviceCode())
|
||||||
|
.append("deviceName", getDeviceName())
|
||||||
|
.append("deviceType", getDeviceType())
|
||||||
|
.append("areaCode", getAreaCode())
|
||||||
|
.append("protocolType", getProtocolType())
|
||||||
|
.append("ipAddress", getIpAddress())
|
||||||
|
.append("port", getPort())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,197 @@
|
|||||||
|
package com.ruoyi.wcs.device.domain;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>豸<EFBFBD><E8B1B8>λ<EFBFBD><CEBB> wcs_device_point
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public class WcsDevicePoint extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** <20><>λID */
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD>λID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
/** <20><><EFBFBD><EFBFBD><EFBFBD>豸ID */
|
||||||
|
@Excel(name = "<EFBFBD>豸ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
/** <20><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD> */
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String pointCode;
|
||||||
|
|
||||||
|
/** <20><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD> */
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String pointName;
|
||||||
|
|
||||||
|
/** <20><>λ<EFBFBD><CEBB><EFBFBD>ͣ<EFBFBD>read/write/read_write<74><65> */
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String pointType;
|
||||||
|
|
||||||
|
/** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>int/float/bool/string<6E><67> */
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
/** <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ַ/OPC<50>ڵ<EFBFBD> */
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD>ַ")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/** <20><>λ */
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD>λ")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/** ״̬<D7B4><CCAC>0<EFBFBD><30><EFBFBD><EFBFBD> 1ͣ<31>ã<EFBFBD> */
|
||||||
|
@Excel(name = "״̬", readConverterExp = "0=<3D><><EFBFBD><EFBFBD>,1=ͣ<><CDA3>")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** ɾ<><C9BE><EFBFBD><EFBFBD>־<EFBFBD><D6BE>0<EFBFBD><30><EFBFBD><EFBFBD> 2ɾ<32><C9BE><EFBFBD><EFBFBD> */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
/** <20><><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD>ƣ<EFBFBD><C6A3>dz־û<D6BE><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>չʾ<D5B9><CABE> */
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
public Long getPointId()
|
||||||
|
{
|
||||||
|
return pointId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPointId(Long pointId)
|
||||||
|
{
|
||||||
|
this.pointId = pointId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull(message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>")
|
||||||
|
public Long getDeviceId()
|
||||||
|
{
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceId(Long deviceId)
|
||||||
|
{
|
||||||
|
this.deviceId = deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotBlank(message = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>벻<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>")
|
||||||
|
@Size(min = 0, max = 64, message = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>볤<EFBFBD>Ȳ<EFBFBD><EFBFBD>ܳ<EFBFBD><EFBFBD><EFBFBD>64<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>")
|
||||||
|
public String getPointCode()
|
||||||
|
{
|
||||||
|
return pointCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPointCode(String pointCode)
|
||||||
|
{
|
||||||
|
this.pointCode = pointCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Size(min = 0, max = 128, message = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><EFBFBD>Ȳ<EFBFBD><EFBFBD>ܳ<EFBFBD><EFBFBD><EFBFBD>128<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>")
|
||||||
|
public String getPointName()
|
||||||
|
{
|
||||||
|
return pointName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPointName(String pointName)
|
||||||
|
{
|
||||||
|
this.pointName = pointName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPointType()
|
||||||
|
{
|
||||||
|
return pointType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPointType(String pointType)
|
||||||
|
{
|
||||||
|
this.pointType = pointType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataType()
|
||||||
|
{
|
||||||
|
return dataType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataType(String dataType)
|
||||||
|
{
|
||||||
|
this.dataType = dataType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress()
|
||||||
|
{
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address)
|
||||||
|
{
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnit()
|
||||||
|
{
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(String unit)
|
||||||
|
{
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDelFlag()
|
||||||
|
{
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelFlag(String delFlag)
|
||||||
|
{
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceName()
|
||||||
|
{
|
||||||
|
return deviceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceName(String deviceName)
|
||||||
|
{
|
||||||
|
this.deviceName = deviceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("pointId", getPointId())
|
||||||
|
.append("deviceId", getDeviceId())
|
||||||
|
.append("pointCode", getPointCode())
|
||||||
|
.append("pointName", getPointName())
|
||||||
|
.append("pointType", getPointType())
|
||||||
|
.append("dataType", getDataType())
|
||||||
|
.append("address", getAddress())
|
||||||
|
.append("unit", getUnit())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package com.ruoyi.wcs.device.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.device.domain.WcsDevice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>豸<EFBFBD><E8B1B8>Ϣ <20><><EFBFBD>ݲ<EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface WcsDeviceMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* <20><>ѯ<EFBFBD>豸<EFBFBD>б<EFBFBD>
|
||||||
|
*
|
||||||
|
* @param device <20>豸<EFBFBD><E8B1B8>Ϣ
|
||||||
|
* @return <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public List<WcsDevice> selectDeviceList(WcsDevice device);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ͨ<><CDA8><EFBFBD>豸ID<49><44>ѯ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||||
|
*
|
||||||
|
* @param deviceId <20>豸ID
|
||||||
|
* @return <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public WcsDevice selectDeviceById(Long deviceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD>豸
|
||||||
|
*
|
||||||
|
* @param device <20>豸<EFBFBD><E8B1B8>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int insertDevice(WcsDevice device);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><EFBFBD><DEB8>豸
|
||||||
|
*
|
||||||
|
* @param device <20>豸<EFBFBD><E8B1B8>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int updateDevice(WcsDevice device);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ɾ<><C9BE><EFBFBD>豸
|
||||||
|
*
|
||||||
|
* @param deviceId <20>豸ID
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int deleteDeviceById(Long deviceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>豸
|
||||||
|
*
|
||||||
|
* @param deviceIds <20>豸ID<49><44><EFBFBD><EFBFBD>
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int deleteDeviceByIds(Long[] deviceIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* У<><D0A3><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ψһ
|
||||||
|
*
|
||||||
|
* @param deviceCode <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
||||||
|
* @return <20>豸<EFBFBD><E8B1B8>Ϣ
|
||||||
|
*/
|
||||||
|
public WcsDevice checkDeviceCodeUnique(String deviceCode);
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.ruoyi.wcs.device.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.device.domain.WcsDevicePoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>豸<EFBFBD><E8B1B8>λ <20><><EFBFBD>ݲ<EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface WcsDevicePointMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* <20><>ѯ<EFBFBD><D1AF>λ<EFBFBD>б<EFBFBD>
|
||||||
|
*
|
||||||
|
* @param point <20><>λ<EFBFBD><CEBB>Ϣ
|
||||||
|
* @return <20><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public List<WcsDevicePoint> selectPointList(WcsDevicePoint point);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ͨ<><CDA8><EFBFBD><EFBFBD>λID<49><44>ѯ<EFBFBD><D1AF>λ<EFBFBD><CEBB>Ϣ
|
||||||
|
*
|
||||||
|
* @param pointId <20><>λID
|
||||||
|
* @return <20><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public WcsDevicePoint selectPointById(Long pointId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
|
||||||
|
*
|
||||||
|
* @param point <20><>λ<EFBFBD><CEBB>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int insertPoint(WcsDevicePoint point);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>ĵ<DEB8>λ
|
||||||
|
*
|
||||||
|
* @param point <20><>λ<EFBFBD><CEBB>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int updatePoint(WcsDevicePoint point);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ɾ<><C9BE><EFBFBD><EFBFBD>λ
|
||||||
|
*
|
||||||
|
* @param pointId <20><>λID
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int deletePointById(Long pointId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>λ
|
||||||
|
*
|
||||||
|
* @param pointIds <20><>λID<49><44><EFBFBD><EFBFBD>
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int deletePointByIds(Long[] pointIds);
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* WCS <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
||||||
|
* <p>
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8>λ<EFBFBD><CEBB><EFBFBD>á<EFBFBD><C3A1><EFBFBD>λֵ<CEBB><D6B5>д<EFBFBD>ȹ<EFBFBD><C8B9>ܡ<EFBFBD>
|
||||||
|
* <20><><EFBFBD><EFBFBD> Controller / Service / Mapper / Domain <20>ȷֲ<C8B7><D6B2>ṹ<EFBFBD><E1B9B9>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author WCS
|
||||||
|
*/
|
||||||
|
package com.ruoyi.wcs.device;
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.ruoyi.wcs.device.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.device.domain.WcsDevicePoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>豸<EFBFBD><E8B1B8>λ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface IWcsDevicePointService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* <20><>ѯ<EFBFBD><D1AF>λ<EFBFBD>б<EFBFBD>
|
||||||
|
*
|
||||||
|
* @param point <20><>λ<EFBFBD><CEBB>Ϣ
|
||||||
|
* @return <20><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public List<WcsDevicePoint> selectPointList(WcsDevicePoint point);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ͨ<><CDA8><EFBFBD><EFBFBD>λID<49><44>ѯ<EFBFBD><D1AF>λ<EFBFBD><CEBB>Ϣ
|
||||||
|
*
|
||||||
|
* @param pointId <20><>λID
|
||||||
|
* @return <20><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public WcsDevicePoint selectPointById(Long pointId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
|
||||||
|
*
|
||||||
|
* @param point <20><>λ<EFBFBD><CEBB>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int insertPoint(WcsDevicePoint point);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>ĵ<DEB8>λ
|
||||||
|
*
|
||||||
|
* @param point <20><>λ<EFBFBD><CEBB>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int updatePoint(WcsDevicePoint point);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>λ
|
||||||
|
*
|
||||||
|
* @param pointIds <20><>λID<49><44><EFBFBD><EFBFBD>
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int deletePointByIds(Long[] pointIds);
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.ruoyi.wcs.device.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.device.domain.WcsDevice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>豸<EFBFBD><E8B1B8>Ϣ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface IWcsDeviceService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* <20><>ѯ<EFBFBD>豸<EFBFBD>б<EFBFBD>
|
||||||
|
*
|
||||||
|
* @param device <20>豸<EFBFBD><E8B1B8>Ϣ
|
||||||
|
* @return <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public List<WcsDevice> selectDeviceList(WcsDevice device);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ͨ<><CDA8><EFBFBD>豸ID<49><44>ѯ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||||
|
*
|
||||||
|
* @param deviceId <20>豸ID
|
||||||
|
* @return <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public WcsDevice selectDeviceById(Long deviceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD>豸
|
||||||
|
*
|
||||||
|
* @param device <20>豸<EFBFBD><E8B1B8>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int insertDevice(WcsDevice device);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><EFBFBD><DEB8>豸
|
||||||
|
*
|
||||||
|
* @param device <20>豸<EFBFBD><E8B1B8>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int updateDevice(WcsDevice device);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>豸
|
||||||
|
*
|
||||||
|
* @param deviceIds <20>豸ID<49><44><EFBFBD><EFBFBD>
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public int deleteDeviceByIds(Long[] deviceIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* У<><D0A3><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ψһ
|
||||||
|
*
|
||||||
|
* @param device <20>豸<EFBFBD><E8B1B8>Ϣ
|
||||||
|
* @return <20><><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
public boolean checkDeviceCodeUnique(WcsDevice device);
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.ruoyi.wcs.device.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.wcs.device.domain.WcsDevicePoint;
|
||||||
|
import com.ruoyi.wcs.device.mapper.WcsDevicePointMapper;
|
||||||
|
import com.ruoyi.wcs.device.service.IWcsDevicePointService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>豸<EFBFBD><E8B1B8>λ <20><><EFBFBD><EFBFBD><EFBFBD>㴦<EFBFBD><E3B4A6>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WcsDevicePointServiceImpl implements IWcsDevicePointService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WcsDevicePointMapper pointMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WcsDevicePoint> selectPointList(WcsDevicePoint point)
|
||||||
|
{
|
||||||
|
return pointMapper.selectPointList(point);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WcsDevicePoint selectPointById(Long pointId)
|
||||||
|
{
|
||||||
|
return pointMapper.selectPointById(pointId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertPoint(WcsDevicePoint point)
|
||||||
|
{
|
||||||
|
return pointMapper.insertPoint(point);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updatePoint(WcsDevicePoint point)
|
||||||
|
{
|
||||||
|
return pointMapper.updatePoint(point);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deletePointByIds(Long[] pointIds)
|
||||||
|
{
|
||||||
|
return pointMapper.deletePointByIds(pointIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.ruoyi.wcs.device.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.wcs.device.domain.WcsDevice;
|
||||||
|
import com.ruoyi.wcs.device.mapper.WcsDeviceMapper;
|
||||||
|
import com.ruoyi.wcs.device.service.IWcsDeviceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20>豸<EFBFBD><E8B1B8>Ϣ <20><><EFBFBD><EFBFBD><EFBFBD>㴦<EFBFBD><E3B4A6>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WcsDeviceServiceImpl implements IWcsDeviceService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WcsDeviceMapper deviceMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WcsDevice> selectDeviceList(WcsDevice device)
|
||||||
|
{
|
||||||
|
return deviceMapper.selectDeviceList(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WcsDevice selectDeviceById(Long deviceId)
|
||||||
|
{
|
||||||
|
return deviceMapper.selectDeviceById(deviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertDevice(WcsDevice device)
|
||||||
|
{
|
||||||
|
return deviceMapper.insertDevice(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateDevice(WcsDevice device)
|
||||||
|
{
|
||||||
|
return deviceMapper.updateDevice(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteDeviceByIds(Long[] deviceIds)
|
||||||
|
{
|
||||||
|
return deviceMapper.deleteDeviceByIds(deviceIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkDeviceCodeUnique(WcsDevice device)
|
||||||
|
{
|
||||||
|
Long deviceId = StringUtils.isNull(device.getDeviceId()) ? -1L : device.getDeviceId();
|
||||||
|
WcsDevice info = deviceMapper.checkDeviceCodeUnique(device.getDeviceCode());
|
||||||
|
if (StringUtils.isNotNull(info) && info.getDeviceId().longValue() != deviceId.longValue())
|
||||||
|
{
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package com.ruoyi.wcs.flow.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowDef;
|
||||||
|
import com.ruoyi.wcs.flow.service.IWcsFlowDefService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD> Controller
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wcs/flow/def")
|
||||||
|
public class WcsFlowDefController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWcsFlowDefService flowDefService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><>ѯ<EFBFBD><D1AF><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD>б<EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WcsFlowDef flowDef)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WcsFlowDef> list = flowDefService.selectFlowDefList(flowDef);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD>б<EFBFBD>
|
||||||
|
*/
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.EXPORT)
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:export')")
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WcsFlowDef flowDef)
|
||||||
|
{
|
||||||
|
List<WcsFlowDef> list = flowDefService.selectFlowDefList(flowDef);
|
||||||
|
ExcelUtil<WcsFlowDef> util = new ExcelUtil<WcsFlowDef>(WcsFlowDef.class);
|
||||||
|
util.exportExcel(response, list, "<EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<49><44>ȡ<EFBFBD><C8A1>ϸ<EFBFBD><CFB8>Ϣ
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:query')")
|
||||||
|
@GetMapping(value = "/{flowId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable Long flowId)
|
||||||
|
{
|
||||||
|
return success(flowDefService.selectFlowDefById(flowId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:add')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@Validated @RequestBody WcsFlowDef flowDef)
|
||||||
|
{
|
||||||
|
if (!flowDefService.checkFlowCodeUnique(flowDef))
|
||||||
|
{
|
||||||
|
return error("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'" + flowDef.getFlowCode() + "'ʧ<>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD>̱<EFBFBD><CCB1><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD>");
|
||||||
|
}
|
||||||
|
flowDef.setCreateBy(getUsername());
|
||||||
|
return toAjax(flowDefService.insertFlowDef(flowDef));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><EFBFBD><DEB8><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:edit')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@Validated @RequestBody WcsFlowDef flowDef)
|
||||||
|
{
|
||||||
|
if (!flowDefService.checkFlowCodeUnique(flowDef))
|
||||||
|
{
|
||||||
|
return error("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'" + flowDef.getFlowCode() + "'ʧ<>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD>̱<EFBFBD><CCB1><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD>");
|
||||||
|
}
|
||||||
|
flowDef.setUpdateBy(getUsername());
|
||||||
|
return toAjax(flowDefService.updateFlowDef(flowDef));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:remove')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{flowIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] flowIds)
|
||||||
|
{
|
||||||
|
return toAjax(flowDefService.deleteFlowDefByIds(flowIds));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.ruoyi.wcs.flow.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WCS <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5> Controller<65><72><EFBFBD>Ǽ<EFBFBD>ռλ<D5BC><CEBB>
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wcs/flow/instance")
|
||||||
|
public class WcsFlowInstanceController
|
||||||
|
{
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list()
|
||||||
|
{
|
||||||
|
return AjaxResult.success("WCS <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>ģ<EFBFBD><C4A3> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.ruoyi.wcs.flow.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowLine;
|
||||||
|
import com.ruoyi.wcs.flow.service.IWcsFlowLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Controller
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wcs/flow/line")
|
||||||
|
public class WcsFlowLineController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWcsFlowLineService flowLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><>ѯָ<D1AF><D6B8><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:query')")
|
||||||
|
@GetMapping("/list/{flowId}")
|
||||||
|
public AjaxResult list(@PathVariable Long flowId)
|
||||||
|
{
|
||||||
|
List<WcsFlowLine> list = flowLineService.selectFlowLineListByFlowId(flowId);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
||||||
|
*/
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.EXPORT)
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:export')")
|
||||||
|
@PostMapping("/export/{flowId}")
|
||||||
|
public void export(HttpServletResponse response, @PathVariable Long flowId)
|
||||||
|
{
|
||||||
|
List<WcsFlowLine> list = flowLineService.selectFlowLineListByFlowId(flowId);
|
||||||
|
ExcelUtil<WcsFlowLine> util = new ExcelUtil<WcsFlowLine>(WcsFlowLine.class);
|
||||||
|
util.exportExcel(response, list, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:edit')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody WcsFlowLine flowLine)
|
||||||
|
{
|
||||||
|
return toAjax(flowLineService.insertFlowLine(flowLine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:edit')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{lineId}")
|
||||||
|
public AjaxResult remove(@PathVariable Long lineId)
|
||||||
|
{
|
||||||
|
return toAjax(flowLineService.deleteFlowLineById(lineId));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.ruoyi.wcs.flow.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowNodeLog;
|
||||||
|
import com.ruoyi.wcs.flow.service.IWcsFlowNodeLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程节点执行日志 Controller
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wcs/flow/log")
|
||||||
|
public class WcsFlowLogController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWcsFlowNodeLogService wcsFlowNodeLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流程节点日志列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flowlog:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WcsFlowNodeLog wcsFlowNodeLog)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WcsFlowNodeLog> list = wcsFlowNodeLogService.selectFlowNodeLogList(wcsFlowNodeLog);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出流程节点日志列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flowlog:export')")
|
||||||
|
@Log(title = "流程节点日志", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WcsFlowNodeLog wcsFlowNodeLog)
|
||||||
|
{
|
||||||
|
List<WcsFlowNodeLog> list = wcsFlowNodeLogService.selectFlowNodeLogList(wcsFlowNodeLog);
|
||||||
|
ExcelUtil<WcsFlowNodeLog> util = new ExcelUtil<WcsFlowNodeLog>(WcsFlowNodeLog.class);
|
||||||
|
util.exportExcel(response, list, "流程节点日志数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流程节点日志详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flowlog:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(wcsFlowNodeLogService.selectFlowNodeLogById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流程节点日志
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flowlog:remove')")
|
||||||
|
@Log(title = "流程节点日志", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(wcsFlowNodeLogService.deleteFlowNodeLogByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
package com.ruoyi.wcs.flow.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowNode;
|
||||||
|
import com.ruoyi.wcs.flow.service.IWcsFlowNodeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̽ڵ<CCBD> Controller
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wcs/flow/node")
|
||||||
|
public class WcsFlowNodeController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWcsFlowNodeService flowNodeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><>ѯָ<D1AF><D6B8><EFBFBD><EFBFBD><EFBFBD>̵Ľڵ<C4BD><DAB5>б<EFBFBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:query')")
|
||||||
|
@GetMapping("/list/{flowId}")
|
||||||
|
public AjaxResult list(@PathVariable Long flowId)
|
||||||
|
{
|
||||||
|
List<WcsFlowNode> list = flowNodeService.selectFlowNodeListByFlowId(flowId);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD>̵Ľڵ<C4BD><DAB5>б<EFBFBD>
|
||||||
|
*/
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD>̽ڵ<EFBFBD>", businessType = BusinessType.EXPORT)
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:export')")
|
||||||
|
@PostMapping("/export/{flowId}")
|
||||||
|
public void export(HttpServletResponse response, @PathVariable Long flowId)
|
||||||
|
{
|
||||||
|
List<WcsFlowNode> list = flowNodeService.selectFlowNodeListByFlowId(flowId);
|
||||||
|
ExcelUtil<WcsFlowNode> util = new ExcelUtil<WcsFlowNode>(WcsFlowNode.class);
|
||||||
|
util.exportExcel(response, list, "<EFBFBD><EFBFBD><EFBFBD>̽ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>ݽڵ<DDBD>ID<49><44>ȡ<EFBFBD><C8A1>ϸ<EFBFBD><CFB8>Ϣ
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:query')")
|
||||||
|
@GetMapping(value = "/{nodeId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable Long nodeId)
|
||||||
|
{
|
||||||
|
return success(flowNodeService.selectFlowNodeById(nodeId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̽ڵ<CCBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:edit')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD>̽ڵ<EFBFBD>", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody WcsFlowNode flowNode)
|
||||||
|
{
|
||||||
|
return toAjax(flowNodeService.insertFlowNode(flowNode));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><EFBFBD><DEB8><EFBFBD><EFBFBD>̽ڵ<CCBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:edit')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD>̽ڵ<EFBFBD>", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody WcsFlowNode flowNode)
|
||||||
|
{
|
||||||
|
return toAjax(flowNodeService.updateFlowNode(flowNode));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD>̽ڵ<CCBD>
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wcs:flow:edit')")
|
||||||
|
@Log(title = "<EFBFBD><EFBFBD><EFBFBD>̽ڵ<EFBFBD>", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{nodeId}")
|
||||||
|
public AjaxResult remove(@PathVariable Long nodeId)
|
||||||
|
{
|
||||||
|
return toAjax(flowNodeService.deleteFlowNodeById(nodeId));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
package com.ruoyi.wcs.flow.domain;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD> wcs_flow_def
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public class WcsFlowDef extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long flowId;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD>̱<EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String flowCode;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String flowName;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String flowType;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>汾<EFBFBD><EFBFBD>", cellType = ColumnType.NUMERIC)
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
private String flowJson;
|
||||||
|
|
||||||
|
@Excel(name = "״̬", readConverterExp = "0=<3D>ݸ<EFBFBD>,1=<3D>ѷ<EFBFBD><D1B7><EFBFBD>,2=<3D><>ͣ<EFBFBD><CDA3>")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
public Long getFlowId()
|
||||||
|
{
|
||||||
|
return flowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowId(Long flowId)
|
||||||
|
{
|
||||||
|
this.flowId = flowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotBlank(message = "<EFBFBD><EFBFBD><EFBFBD>̱<EFBFBD><EFBFBD>벻<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>")
|
||||||
|
@Size(min = 0, max = 64, message = "<EFBFBD><EFBFBD><EFBFBD>̱<EFBFBD><EFBFBD>볤<EFBFBD>Ȳ<EFBFBD><EFBFBD>ܳ<EFBFBD><EFBFBD><EFBFBD>64<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>")
|
||||||
|
public String getFlowCode()
|
||||||
|
{
|
||||||
|
return flowCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowCode(String flowCode)
|
||||||
|
{
|
||||||
|
this.flowCode = flowCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Size(min = 0, max = 128, message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><EFBFBD>Ȳ<EFBFBD><EFBFBD>ܳ<EFBFBD><EFBFBD><EFBFBD>128<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>")
|
||||||
|
public String getFlowName()
|
||||||
|
{
|
||||||
|
return flowName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowName(String flowName)
|
||||||
|
{
|
||||||
|
this.flowName = flowName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlowType()
|
||||||
|
{
|
||||||
|
return flowType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowType(String flowType)
|
||||||
|
{
|
||||||
|
this.flowType = flowType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVersion()
|
||||||
|
{
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(Integer version)
|
||||||
|
{
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlowJson()
|
||||||
|
{
|
||||||
|
return flowJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowJson(String flowJson)
|
||||||
|
{
|
||||||
|
this.flowJson = flowJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDelFlag()
|
||||||
|
{
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelFlag(String delFlag)
|
||||||
|
{
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("flowId", getFlowId())
|
||||||
|
.append("flowCode", getFlowCode())
|
||||||
|
.append("flowName", getFlowName())
|
||||||
|
.append("flowType", getFlowType())
|
||||||
|
.append("version", getVersion())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
package com.ruoyi.wcs.flow.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD> wcs_flow_instance
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public class WcsFlowInstance extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Excel(name = "ʵ<EFBFBD><EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long flowDefId;
|
||||||
|
|
||||||
|
@Excel(name = "״̬", readConverterExp = "0=<3D><>ִ<EFBFBD><D6B4>,1=ִ<><D6B4><EFBFBD><EFBFBD>,2=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,3=<3D>쳣<EFBFBD><ECB3A3>ֹ")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD>ʼʱ<EFBFBD><EFBFBD>", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFlowDefId()
|
||||||
|
{
|
||||||
|
return flowDefId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowDefId(Long flowDefId)
|
||||||
|
{
|
||||||
|
this.flowDefId = flowDefId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStartTime()
|
||||||
|
{
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(Date startTime)
|
||||||
|
{
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEndTime()
|
||||||
|
{
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(Date endTime)
|
||||||
|
{
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("flowDefId", getFlowDefId())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("startTime", getStartTime())
|
||||||
|
.append("endTime", getEndTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
package com.ruoyi.wcs.flow.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD> wcs_flow_line
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public class WcsFlowLine
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long flowId;
|
||||||
|
|
||||||
|
@Excel(name = "Դ<EFBFBD>ڵ<EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long sourceNodeId;
|
||||||
|
|
||||||
|
@Excel(name = "Ŀ<EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long targetNodeId;
|
||||||
|
|
||||||
|
private String conditionExpr;
|
||||||
|
|
||||||
|
private String lineLabel;
|
||||||
|
|
||||||
|
private Integer sortOrder;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
public Long getLineId()
|
||||||
|
{
|
||||||
|
return lineId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLineId(Long lineId)
|
||||||
|
{
|
||||||
|
this.lineId = lineId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFlowId()
|
||||||
|
{
|
||||||
|
return flowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowId(Long flowId)
|
||||||
|
{
|
||||||
|
this.flowId = flowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSourceNodeId()
|
||||||
|
{
|
||||||
|
return sourceNodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceNodeId(Long sourceNodeId)
|
||||||
|
{
|
||||||
|
this.sourceNodeId = sourceNodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTargetNodeId()
|
||||||
|
{
|
||||||
|
return targetNodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTargetNodeId(Long targetNodeId)
|
||||||
|
{
|
||||||
|
this.targetNodeId = targetNodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConditionExpr()
|
||||||
|
{
|
||||||
|
return conditionExpr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConditionExpr(String conditionExpr)
|
||||||
|
{
|
||||||
|
this.conditionExpr = conditionExpr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLineLabel()
|
||||||
|
{
|
||||||
|
return lineLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLineLabel(String lineLabel)
|
||||||
|
{
|
||||||
|
this.lineLabel = lineLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSortOrder()
|
||||||
|
{
|
||||||
|
return sortOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSortOrder(Integer sortOrder)
|
||||||
|
{
|
||||||
|
this.sortOrder = sortOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime()
|
||||||
|
{
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime)
|
||||||
|
{
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("lineId", getLineId())
|
||||||
|
.append("flowId", getFlowId())
|
||||||
|
.append("sourceNodeId", getSourceNodeId())
|
||||||
|
.append("targetNodeId", getTargetNodeId())
|
||||||
|
.append("conditionExpr", getConditionExpr())
|
||||||
|
.append("lineLabel", getLineLabel())
|
||||||
|
.append("sortOrder", getSortOrder())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
package com.ruoyi.wcs.flow.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̽ڵ<CCBD><DAB5><EFBFBD> wcs_flow_node
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public class WcsFlowNode
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>ڵ<EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long nodeId;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long flowId;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String nodeCode;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String nodeType;
|
||||||
|
|
||||||
|
private String handlerClass;
|
||||||
|
|
||||||
|
private String configJson;
|
||||||
|
|
||||||
|
private Integer posX;
|
||||||
|
|
||||||
|
private Integer posY;
|
||||||
|
|
||||||
|
private Integer sortOrder;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
public Long getNodeId()
|
||||||
|
{
|
||||||
|
return nodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeId(Long nodeId)
|
||||||
|
{
|
||||||
|
this.nodeId = nodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFlowId()
|
||||||
|
{
|
||||||
|
return flowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowId(Long flowId)
|
||||||
|
{
|
||||||
|
this.flowId = flowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNodeCode()
|
||||||
|
{
|
||||||
|
return nodeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeCode(String nodeCode)
|
||||||
|
{
|
||||||
|
this.nodeCode = nodeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNodeName()
|
||||||
|
{
|
||||||
|
return nodeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeName(String nodeName)
|
||||||
|
{
|
||||||
|
this.nodeName = nodeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNodeType()
|
||||||
|
{
|
||||||
|
return nodeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeType(String nodeType)
|
||||||
|
{
|
||||||
|
this.nodeType = nodeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHandlerClass()
|
||||||
|
{
|
||||||
|
return handlerClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHandlerClass(String handlerClass)
|
||||||
|
{
|
||||||
|
this.handlerClass = handlerClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfigJson()
|
||||||
|
{
|
||||||
|
return configJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigJson(String configJson)
|
||||||
|
{
|
||||||
|
this.configJson = configJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPosX()
|
||||||
|
{
|
||||||
|
return posX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPosX(Integer posX)
|
||||||
|
{
|
||||||
|
this.posX = posX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPosY()
|
||||||
|
{
|
||||||
|
return posY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPosY(Integer posY)
|
||||||
|
{
|
||||||
|
this.posY = posY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSortOrder()
|
||||||
|
{
|
||||||
|
return sortOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSortOrder(Integer sortOrder)
|
||||||
|
{
|
||||||
|
this.sortOrder = sortOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime()
|
||||||
|
{
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime)
|
||||||
|
{
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime()
|
||||||
|
{
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime)
|
||||||
|
{
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("nodeId", getNodeId())
|
||||||
|
.append("flowId", getFlowId())
|
||||||
|
.append("nodeCode", getNodeCode())
|
||||||
|
.append("nodeName", getNodeName())
|
||||||
|
.append("nodeType", getNodeType())
|
||||||
|
.append("handlerClass", getHandlerClass())
|
||||||
|
.append("posX", getPosX())
|
||||||
|
.append("posY", getPosY())
|
||||||
|
.append("sortOrder", getSortOrder())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
package com.ruoyi.wcs.flow.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̽ڵ<CCBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>־<EFBFBD><D6BE> wcs_flow_node_log
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public class WcsFlowNodeLog extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD>־ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Excel(name = "ʵ<EFBFBD><EFBFBD>ID", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long instanceId;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>ڵ<EFBFBD>ID")
|
||||||
|
private String nodeId;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
||||||
|
private String nodeType;
|
||||||
|
|
||||||
|
@Excel(name = "״̬", readConverterExp = "0=<3D><>ִ<EFBFBD><D6B4>,1=ִ<><D6B4><EFBFBD><EFBFBD>,2=<3D>ɹ<EFBFBD>,3=ʧ<><CAA7>,4=<3D><><EFBFBD><EFBFBD>")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
private String input;
|
||||||
|
|
||||||
|
private String output;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ")
|
||||||
|
private String errorMsg;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD>ʼʱ<EFBFBD><EFBFBD>", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
@Excel(name = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getInstanceId()
|
||||||
|
{
|
||||||
|
return instanceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInstanceId(Long instanceId)
|
||||||
|
{
|
||||||
|
this.instanceId = instanceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNodeId()
|
||||||
|
{
|
||||||
|
return nodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeId(String nodeId)
|
||||||
|
{
|
||||||
|
this.nodeId = nodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNodeType()
|
||||||
|
{
|
||||||
|
return nodeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeType(String nodeType)
|
||||||
|
{
|
||||||
|
this.nodeType = nodeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInput()
|
||||||
|
{
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInput(String input)
|
||||||
|
{
|
||||||
|
this.input = input;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOutput()
|
||||||
|
{
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOutput(String output)
|
||||||
|
{
|
||||||
|
this.output = output;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getErrorMsg()
|
||||||
|
{
|
||||||
|
return errorMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setErrorMsg(String errorMsg)
|
||||||
|
{
|
||||||
|
this.errorMsg = errorMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStartTime()
|
||||||
|
{
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(Date startTime)
|
||||||
|
{
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEndTime()
|
||||||
|
{
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(Date endTime)
|
||||||
|
{
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("instanceId", getInstanceId())
|
||||||
|
.append("nodeId", getNodeId())
|
||||||
|
.append("nodeType", getNodeType())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("input", getInput())
|
||||||
|
.append("output", getOutput())
|
||||||
|
.append("errorMsg", getErrorMsg())
|
||||||
|
.append("startTime", getStartTime())
|
||||||
|
.append("endTime", getEndTime())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.ruoyi.wcs.flow.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD> <20><><EFBFBD>ݲ<EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface WcsFlowDefMapper
|
||||||
|
{
|
||||||
|
public List<WcsFlowDef> selectFlowDefList(WcsFlowDef flowDef);
|
||||||
|
|
||||||
|
public WcsFlowDef selectFlowDefById(Long flowId);
|
||||||
|
|
||||||
|
public int insertFlowDef(WcsFlowDef flowDef);
|
||||||
|
|
||||||
|
public int updateFlowDef(WcsFlowDef flowDef);
|
||||||
|
|
||||||
|
public int deleteFlowDefById(Long flowId);
|
||||||
|
|
||||||
|
public int deleteFlowDefByIds(Long[] flowIds);
|
||||||
|
|
||||||
|
public WcsFlowDef checkFlowCodeUnique(String flowCode);
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.ruoyi.wcs.flow.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowInstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5> <20><><EFBFBD>ݲ<EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface WcsFlowInstanceMapper
|
||||||
|
{
|
||||||
|
public List<WcsFlowInstance> selectFlowInstanceList(WcsFlowInstance flowInstance);
|
||||||
|
|
||||||
|
public WcsFlowInstance selectFlowInstanceById(Long id);
|
||||||
|
|
||||||
|
public int insertFlowInstance(WcsFlowInstance flowInstance);
|
||||||
|
|
||||||
|
public int updateFlowInstance(WcsFlowInstance flowInstance);
|
||||||
|
|
||||||
|
public int deleteFlowInstanceById(Long id);
|
||||||
|
|
||||||
|
public int deleteFlowInstanceByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.ruoyi.wcs.flow.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ݲ<EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface WcsFlowLineMapper
|
||||||
|
{
|
||||||
|
public List<WcsFlowLine> selectFlowLineListByFlowId(Long flowId);
|
||||||
|
|
||||||
|
public WcsFlowLine selectFlowLineById(Long lineId);
|
||||||
|
|
||||||
|
public int insertFlowLine(WcsFlowLine flowLine);
|
||||||
|
|
||||||
|
public int deleteFlowLineById(Long lineId);
|
||||||
|
|
||||||
|
public int deleteFlowLineByFlowId(Long flowId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.ruoyi.wcs.flow.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowNodeLog;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̽ڵ<CCBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>־ <20><><EFBFBD>ݲ<EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface WcsFlowNodeLogMapper
|
||||||
|
{
|
||||||
|
public List<WcsFlowNodeLog> selectFlowNodeLogList(WcsFlowNodeLog flowNodeLog);
|
||||||
|
|
||||||
|
public WcsFlowNodeLog selectFlowNodeLogById(Long id);
|
||||||
|
|
||||||
|
public List<WcsFlowNodeLog> selectFlowNodeLogByInstanceId(Long instanceId);
|
||||||
|
|
||||||
|
public int insertFlowNodeLog(WcsFlowNodeLog flowNodeLog);
|
||||||
|
|
||||||
|
public int updateFlowNodeLog(WcsFlowNodeLog flowNodeLog);
|
||||||
|
|
||||||
|
public int deleteFlowNodeLogById(Long id);
|
||||||
|
|
||||||
|
public int deleteFlowNodeLogByIds(Long[] ids);
|
||||||
|
|
||||||
|
public int deleteFlowNodeLogByInstanceId(Long instanceId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.ruoyi.wcs.flow.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowNode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̽ڵ<CCBD> <20><><EFBFBD>ݲ<EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface WcsFlowNodeMapper
|
||||||
|
{
|
||||||
|
public List<WcsFlowNode> selectFlowNodeListByFlowId(Long flowId);
|
||||||
|
|
||||||
|
public WcsFlowNode selectFlowNodeById(Long nodeId);
|
||||||
|
|
||||||
|
public int insertFlowNode(WcsFlowNode flowNode);
|
||||||
|
|
||||||
|
public int updateFlowNode(WcsFlowNode flowNode);
|
||||||
|
|
||||||
|
public int deleteFlowNodeById(Long nodeId);
|
||||||
|
|
||||||
|
public int deleteFlowNodeByFlowId(Long flowId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* WCS <20><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ģ<EFBFBD><C4A3>
|
||||||
|
* <p>
|
||||||
|
* <20>ṩ<EFBFBD><E1B9A9><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD><EFBFBD>̱<EFBFBD><CCB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6>塢<EFBFBD>ڵ㶨<DAB5>塢<EFBFBD><E5A1A2><EFBFBD>߶<EFBFBD><DFB6>塢
|
||||||
|
* <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ڵ<EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>־<EFBFBD>ȹ<EFBFBD><C8B9>ܡ<EFBFBD>
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>棬<EFBFBD><E6A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><D0B7><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author WCS
|
||||||
|
*/
|
||||||
|
package com.ruoyi.wcs.flow;
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.ruoyi.wcs.flow.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowDef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface IWcsFlowDefService
|
||||||
|
{
|
||||||
|
public List<WcsFlowDef> selectFlowDefList(WcsFlowDef flowDef);
|
||||||
|
|
||||||
|
public WcsFlowDef selectFlowDefById(Long flowId);
|
||||||
|
|
||||||
|
public int insertFlowDef(WcsFlowDef flowDef);
|
||||||
|
|
||||||
|
public int updateFlowDef(WcsFlowDef flowDef);
|
||||||
|
|
||||||
|
public int deleteFlowDefByIds(Long[] flowIds);
|
||||||
|
|
||||||
|
public boolean checkFlowCodeUnique(WcsFlowDef flowDef);
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.ruoyi.wcs.flow.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowInstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface IWcsFlowInstanceService
|
||||||
|
{
|
||||||
|
public List<WcsFlowInstance> selectFlowInstanceList(WcsFlowInstance flowInstance);
|
||||||
|
|
||||||
|
public WcsFlowInstance selectFlowInstanceById(Long id);
|
||||||
|
|
||||||
|
public int insertFlowInstance(WcsFlowInstance flowInstance);
|
||||||
|
|
||||||
|
public int updateFlowInstance(WcsFlowInstance flowInstance);
|
||||||
|
|
||||||
|
public int deleteFlowInstanceByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.ruoyi.wcs.flow.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface IWcsFlowLineService
|
||||||
|
{
|
||||||
|
public List<WcsFlowLine> selectFlowLineListByFlowId(Long flowId);
|
||||||
|
|
||||||
|
public int insertFlowLine(WcsFlowLine flowLine);
|
||||||
|
|
||||||
|
public int deleteFlowLineById(Long lineId);
|
||||||
|
|
||||||
|
public int deleteFlowLineByFlowId(Long flowId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.ruoyi.wcs.flow.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowNodeLog;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̽ڵ<CCBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>־ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface IWcsFlowNodeLogService
|
||||||
|
{
|
||||||
|
public List<WcsFlowNodeLog> selectFlowNodeLogList(WcsFlowNodeLog flowNodeLog);
|
||||||
|
|
||||||
|
public WcsFlowNodeLog selectFlowNodeLogById(Long id);
|
||||||
|
|
||||||
|
public List<WcsFlowNodeLog> selectFlowNodeLogByInstanceId(Long instanceId);
|
||||||
|
|
||||||
|
public int insertFlowNodeLog(WcsFlowNodeLog flowNodeLog);
|
||||||
|
|
||||||
|
public int updateFlowNodeLog(WcsFlowNodeLog flowNodeLog);
|
||||||
|
|
||||||
|
public int deleteFlowNodeLogByIds(Long[] ids);
|
||||||
|
|
||||||
|
public int deleteFlowNodeLogByInstanceId(Long instanceId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.ruoyi.wcs.flow.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowNode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̽ڵ<CCBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
public interface IWcsFlowNodeService
|
||||||
|
{
|
||||||
|
public List<WcsFlowNode> selectFlowNodeListByFlowId(Long flowId);
|
||||||
|
|
||||||
|
public WcsFlowNode selectFlowNodeById(Long nodeId);
|
||||||
|
|
||||||
|
public int insertFlowNode(WcsFlowNode flowNode);
|
||||||
|
|
||||||
|
public int updateFlowNode(WcsFlowNode flowNode);
|
||||||
|
|
||||||
|
public int deleteFlowNodeById(Long nodeId);
|
||||||
|
|
||||||
|
public int deleteFlowNodeByFlowId(Long flowId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.ruoyi.wcs.flow.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowDef;
|
||||||
|
import com.ruoyi.wcs.flow.mapper.WcsFlowDefMapper;
|
||||||
|
import com.ruoyi.wcs.flow.service.IWcsFlowDefService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>㴦<EFBFBD><E3B4A6>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WcsFlowDefServiceImpl implements IWcsFlowDefService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WcsFlowDefMapper flowDefMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WcsFlowDef> selectFlowDefList(WcsFlowDef flowDef)
|
||||||
|
{
|
||||||
|
return flowDefMapper.selectFlowDefList(flowDef);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WcsFlowDef selectFlowDefById(Long flowId)
|
||||||
|
{
|
||||||
|
return flowDefMapper.selectFlowDefById(flowId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertFlowDef(WcsFlowDef flowDef)
|
||||||
|
{
|
||||||
|
return flowDefMapper.insertFlowDef(flowDef);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateFlowDef(WcsFlowDef flowDef)
|
||||||
|
{
|
||||||
|
return flowDefMapper.updateFlowDef(flowDef);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteFlowDefByIds(Long[] flowIds)
|
||||||
|
{
|
||||||
|
return flowDefMapper.deleteFlowDefByIds(flowIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkFlowCodeUnique(WcsFlowDef flowDef)
|
||||||
|
{
|
||||||
|
Long flowId = StringUtils.isNull(flowDef.getFlowId()) ? -1L : flowDef.getFlowId();
|
||||||
|
WcsFlowDef info = flowDefMapper.checkFlowCodeUnique(flowDef.getFlowCode());
|
||||||
|
if (StringUtils.isNotNull(info) && info.getFlowId().longValue() != flowId.longValue())
|
||||||
|
{
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.ruoyi.wcs.flow.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowInstance;
|
||||||
|
import com.ruoyi.wcs.flow.mapper.WcsFlowInstanceMapper;
|
||||||
|
import com.ruoyi.wcs.flow.service.IWcsFlowInstanceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5> <20><><EFBFBD><EFBFBD><EFBFBD>㴦<EFBFBD><E3B4A6>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WcsFlowInstanceServiceImpl implements IWcsFlowInstanceService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WcsFlowInstanceMapper flowInstanceMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WcsFlowInstance> selectFlowInstanceList(WcsFlowInstance flowInstance)
|
||||||
|
{
|
||||||
|
return flowInstanceMapper.selectFlowInstanceList(flowInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WcsFlowInstance selectFlowInstanceById(Long id)
|
||||||
|
{
|
||||||
|
return flowInstanceMapper.selectFlowInstanceById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertFlowInstance(WcsFlowInstance flowInstance)
|
||||||
|
{
|
||||||
|
return flowInstanceMapper.insertFlowInstance(flowInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateFlowInstance(WcsFlowInstance flowInstance)
|
||||||
|
{
|
||||||
|
return flowInstanceMapper.updateFlowInstance(flowInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteFlowInstanceByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return flowInstanceMapper.deleteFlowInstanceByIds(ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.ruoyi.wcs.flow.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowLine;
|
||||||
|
import com.ruoyi.wcs.flow.mapper.WcsFlowLineMapper;
|
||||||
|
import com.ruoyi.wcs.flow.service.IWcsFlowLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>㴦<EFBFBD><E3B4A6>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WcsFlowLineServiceImpl implements IWcsFlowLineService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WcsFlowLineMapper flowLineMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WcsFlowLine> selectFlowLineListByFlowId(Long flowId)
|
||||||
|
{
|
||||||
|
return flowLineMapper.selectFlowLineListByFlowId(flowId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertFlowLine(WcsFlowLine flowLine)
|
||||||
|
{
|
||||||
|
return flowLineMapper.insertFlowLine(flowLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteFlowLineById(Long lineId)
|
||||||
|
{
|
||||||
|
return flowLineMapper.deleteFlowLineById(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteFlowLineByFlowId(Long flowId)
|
||||||
|
{
|
||||||
|
return flowLineMapper.deleteFlowLineByFlowId(flowId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.ruoyi.wcs.flow.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowNodeLog;
|
||||||
|
import com.ruoyi.wcs.flow.mapper.WcsFlowNodeLogMapper;
|
||||||
|
import com.ruoyi.wcs.flow.service.IWcsFlowNodeLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̽ڵ<CCBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>־ <20><><EFBFBD><EFBFBD><EFBFBD>㴦<EFBFBD><E3B4A6>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WcsFlowNodeLogServiceImpl implements IWcsFlowNodeLogService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WcsFlowNodeLogMapper flowNodeLogMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WcsFlowNodeLog> selectFlowNodeLogList(WcsFlowNodeLog flowNodeLog)
|
||||||
|
{
|
||||||
|
return flowNodeLogMapper.selectFlowNodeLogList(flowNodeLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WcsFlowNodeLog selectFlowNodeLogById(Long id)
|
||||||
|
{
|
||||||
|
return flowNodeLogMapper.selectFlowNodeLogById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WcsFlowNodeLog> selectFlowNodeLogByInstanceId(Long instanceId)
|
||||||
|
{
|
||||||
|
return flowNodeLogMapper.selectFlowNodeLogByInstanceId(instanceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertFlowNodeLog(WcsFlowNodeLog flowNodeLog)
|
||||||
|
{
|
||||||
|
return flowNodeLogMapper.insertFlowNodeLog(flowNodeLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateFlowNodeLog(WcsFlowNodeLog flowNodeLog)
|
||||||
|
{
|
||||||
|
return flowNodeLogMapper.updateFlowNodeLog(flowNodeLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteFlowNodeLogByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return flowNodeLogMapper.deleteFlowNodeLogByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteFlowNodeLogByInstanceId(Long instanceId)
|
||||||
|
{
|
||||||
|
return flowNodeLogMapper.deleteFlowNodeLogByInstanceId(instanceId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.ruoyi.wcs.flow.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.wcs.flow.domain.WcsFlowNode;
|
||||||
|
import com.ruoyi.wcs.flow.mapper.WcsFlowNodeMapper;
|
||||||
|
import com.ruoyi.wcs.flow.service.IWcsFlowNodeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <20><><EFBFBD>̽ڵ<CCBD> <20><><EFBFBD><EFBFBD><EFBFBD>㴦<EFBFBD><E3B4A6>
|
||||||
|
*
|
||||||
|
* @author wcs
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WcsFlowNodeServiceImpl implements IWcsFlowNodeService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WcsFlowNodeMapper flowNodeMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WcsFlowNode> selectFlowNodeListByFlowId(Long flowId)
|
||||||
|
{
|
||||||
|
return flowNodeMapper.selectFlowNodeListByFlowId(flowId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WcsFlowNode selectFlowNodeById(Long nodeId)
|
||||||
|
{
|
||||||
|
return flowNodeMapper.selectFlowNodeById(nodeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertFlowNode(WcsFlowNode flowNode)
|
||||||
|
{
|
||||||
|
return flowNodeMapper.insertFlowNode(flowNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateFlowNode(WcsFlowNode flowNode)
|
||||||
|
{
|
||||||
|
return flowNodeMapper.updateFlowNode(flowNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteFlowNodeById(Long nodeId)
|
||||||
|
{
|
||||||
|
return flowNodeMapper.deleteFlowNodeById(nodeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteFlowNodeByFlowId(Long flowId)
|
||||||
|
{
|
||||||
|
return flowNodeMapper.deleteFlowNodeByFlowId(flowId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* WCS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
||||||
|
* <p>
|
||||||
|
* <20><><EFBFBD><EFBFBD> WCS <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD>١<EFBFBD><D9A1>쳣<EFBFBD><ECB3A3><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD>
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Quartz ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>á<EFBFBD>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author WCS
|
||||||
|
*/
|
||||||
|
package com.ruoyi.wcs.job;
|
||||||
20
ruoyi-admin/src/main/java/com/ruoyi/wcs/package-info.java
Normal file
20
ruoyi-admin/src/main/java/com/ruoyi/wcs/package-info.java
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* WCS (Warehouse Control System) <20>ֿ<EFBFBD><D6BF><EFBFBD><EFBFBD><EFBFBD>ϵͳģ<CDB3><C4A3>
|
||||||
|
* <p>
|
||||||
|
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RuoYi-Vue 3.9.1 (SpringBoot 2.5) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> WCS ҵ<><D2B5>ģ<EFBFBD>顣
|
||||||
|
* <p>
|
||||||
|
* ģ<><C4A3><EFBFBD>ṹ:
|
||||||
|
* <ul>
|
||||||
|
* <li>device - <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD>á<EFBFBD><C3A1><EFBFBD>λֵ<CEBB><D6B5></li>
|
||||||
|
* <li>api - <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>ã<EFBFBD>WMS/ERP <20><><EFBFBD>ⲿϵͳ<CFB5>Խӣ<D4BD></li>
|
||||||
|
* <li>flow - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>棨<EFBFBD><E6A3A8><EFBFBD>̶<EFBFBD><CCB6>塢<EFBFBD>ڵ㡢<DAB5><E3A1A2><EFBFBD>ߡ<EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE></li>
|
||||||
|
* <li>job - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD>٣<EFBFBD></li>
|
||||||
|
* <li>plc - PLC ͨ<>ţ<EFBFBD>Modbus TCP / OPC UA / S7 Э<><D0AD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0></li>
|
||||||
|
* <li>schedule - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>棨·<E6A3A8><C2B7><EFBFBD>滮<EFBFBD><E6BBAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䡢<EFBFBD><E4A1A2>ͻ<EFBFBD><CDBB><EFBFBD>⣩</li>
|
||||||
|
* </ul>
|
||||||
|
* <p>
|
||||||
|
* <20><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>ű<EFBFBD>: sql/wcs_init_mysql.sql
|
||||||
|
*
|
||||||
|
* @author WCS
|
||||||
|
*/
|
||||||
|
package com.ruoyi.wcs;
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* WCS PLC ͨ<><CDA8>ģ<EFBFBD><C4A3>
|
||||||
|
* <p>
|
||||||
|
* <20><>װ<EFBFBD><D7B0> PLC <20>豸<EFBFBD><E8B1B8>ͨ<EFBFBD><CDA8>Э<EFBFBD>飨<EFBFBD><E9A3A8> Modbus TCP / OPC UA / S7 <20>ȣ<EFBFBD><C8A3><EFBFBD>
|
||||||
|
* <20>ṩͳһ<CDB3>Ķ<EFBFBD>д<EFBFBD>ӿں<D3BF><DABA><EFBFBD><EFBFBD>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author WCS
|
||||||
|
*/
|
||||||
|
package com.ruoyi.wcs.plc;
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* WCS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
||||||
|
* <p>
|
||||||
|
* <20><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><DFBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸·<E8B1B8><C2B7><EFBFBD>滮<EFBFBD><E6BBAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䡢<EFBFBD><E4A1A2>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD>
|
||||||
|
* <20><> flow / device / plc ģ<><C4A3>Эͬ<D0AD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author WCS
|
||||||
|
*/
|
||||||
|
package com.ruoyi.wcs.schedule;
|
||||||
@@ -4,7 +4,9 @@ spring:
|
|||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源(MySQL)
|
||||||
|
# WCS 项目使用 MySQL,请根据实际环境修改连接参数
|
||||||
|
# 建议数据库名: ry-wcs 或 ry-vue,需先执行 sql/ry_20250522.sql 和 sql/wcs_init_mysql.sql
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
|
|||||||
@@ -133,4 +133,4 @@ xss:
|
|||||||
# 排除链接(多个用逗号分隔)
|
# 排除链接(多个用逗号分隔)
|
||||||
excludes: /system/notice
|
excludes: /system/notice
|
||||||
# 匹配链接
|
# 匹配链接
|
||||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
urlPatterns: /system/*,/monitor/*,/tool/*,/wcs/*
|
||||||
|
|||||||
125
ruoyi-admin/src/main/resources/mapper/wcs/WcsApiConfigMapper.xml
Normal file
125
ruoyi-admin/src/main/resources/mapper/wcs/WcsApiConfigMapper.xml
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
<?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.ruoyi.wcs.api.mapper.WcsApiConfigMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.wcs.api.domain.WcsApiConfig" id="WcsApiConfigResult">
|
||||||
|
<id property="apiId" column="api_id" />
|
||||||
|
<result property="apiCode" column="api_code" />
|
||||||
|
<result property="apiName" column="api_name" />
|
||||||
|
<result property="apiUrl" column="api_url" />
|
||||||
|
<result property="requestMethod" column="request_method" />
|
||||||
|
<result property="contentType" column="content_type" />
|
||||||
|
<result property="timeout" column="timeout" />
|
||||||
|
<result property="retryCount" column="retry_count" />
|
||||||
|
<result property="direction" column="direction" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectApiConfigVo">
|
||||||
|
select api_id, api_code, api_name, api_url, request_method, content_type,
|
||||||
|
timeout, retry_count, direction, status, del_flag,
|
||||||
|
create_by, create_time, update_by, update_time, remark
|
||||||
|
from wcs_api_config
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectApiConfigList" parameterType="com.ruoyi.wcs.api.domain.WcsApiConfig" resultMap="WcsApiConfigResult">
|
||||||
|
<include refid="selectApiConfigVo"/>
|
||||||
|
<where>
|
||||||
|
del_flag = '0'
|
||||||
|
<if test="apiCode != null and apiCode != ''">
|
||||||
|
AND api_code like concat('%', #{apiCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="apiName != null and apiName != ''">
|
||||||
|
AND api_name like concat('%', #{apiName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="requestMethod != null and requestMethod != ''">
|
||||||
|
AND request_method = #{requestMethod}
|
||||||
|
</if>
|
||||||
|
<if test="direction != null and direction != ''">
|
||||||
|
AND direction = #{direction}
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectApiConfigById" parameterType="Long" resultMap="WcsApiConfigResult">
|
||||||
|
<include refid="selectApiConfigVo"/>
|
||||||
|
where api_id = #{apiId} and del_flag = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="checkApiCodeUnique" parameterType="String" resultMap="WcsApiConfigResult">
|
||||||
|
<include refid="selectApiConfigVo"/>
|
||||||
|
where api_code = #{apiCode} and del_flag = '0' limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertApiConfig" parameterType="com.ruoyi.wcs.api.domain.WcsApiConfig" useGeneratedKeys="true" keyProperty="apiId">
|
||||||
|
insert into wcs_api_config(
|
||||||
|
<if test="apiCode != null and apiCode != ''">api_code,</if>
|
||||||
|
<if test="apiName != null and apiName != ''">api_name,</if>
|
||||||
|
<if test="apiUrl != null and apiUrl != ''">api_url,</if>
|
||||||
|
<if test="requestMethod != null and requestMethod != ''">request_method,</if>
|
||||||
|
<if test="contentType != null and contentType != ''">content_type,</if>
|
||||||
|
<if test="timeout != null">timeout,</if>
|
||||||
|
<if test="retryCount != null">retry_count,</if>
|
||||||
|
<if test="direction != null and direction != ''">direction,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="apiCode != null and apiCode != ''">#{apiCode},</if>
|
||||||
|
<if test="apiName != null and apiName != ''">#{apiName},</if>
|
||||||
|
<if test="apiUrl != null and apiUrl != ''">#{apiUrl},</if>
|
||||||
|
<if test="requestMethod != null and requestMethod != ''">#{requestMethod},</if>
|
||||||
|
<if test="contentType != null and contentType != ''">#{contentType},</if>
|
||||||
|
<if test="timeout != null">#{timeout},</if>
|
||||||
|
<if test="retryCount != null">#{retryCount},</if>
|
||||||
|
<if test="direction != null and direction != ''">#{direction},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateApiConfig" parameterType="com.ruoyi.wcs.api.domain.WcsApiConfig">
|
||||||
|
update wcs_api_config
|
||||||
|
<set>
|
||||||
|
<if test="apiCode != null and apiCode != ''">api_code = #{apiCode},</if>
|
||||||
|
<if test="apiName != null">api_name = #{apiName},</if>
|
||||||
|
<if test="apiUrl != null">api_url = #{apiUrl},</if>
|
||||||
|
<if test="requestMethod != null">request_method = #{requestMethod},</if>
|
||||||
|
<if test="contentType != null">content_type = #{contentType},</if>
|
||||||
|
<if test="timeout != null">timeout = #{timeout},</if>
|
||||||
|
<if test="retryCount != null">retry_count = #{retryCount},</if>
|
||||||
|
<if test="direction != null">direction = #{direction},</if>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
update_time = sysdate()
|
||||||
|
</set>
|
||||||
|
where api_id = #{apiId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteApiConfigById" parameterType="Long">
|
||||||
|
update wcs_api_config set del_flag = '2' where api_id = #{apiId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteApiConfigByIds" parameterType="Long">
|
||||||
|
update wcs_api_config set del_flag = '2' where api_id in
|
||||||
|
<foreach collection="array" item="apiId" open="(" separator="," close=")">
|
||||||
|
#{apiId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
121
ruoyi-admin/src/main/resources/mapper/wcs/WcsDeviceMapper.xml
Normal file
121
ruoyi-admin/src/main/resources/mapper/wcs/WcsDeviceMapper.xml
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
<?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.ruoyi.wcs.device.mapper.WcsDeviceMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.wcs.device.domain.WcsDevice" id="WcsDeviceResult">
|
||||||
|
<id property="deviceId" column="device_id" />
|
||||||
|
<result property="deviceCode" column="device_code" />
|
||||||
|
<result property="deviceName" column="device_name" />
|
||||||
|
<result property="deviceType" column="device_type" />
|
||||||
|
<result property="areaCode" column="area_code" />
|
||||||
|
<result property="protocolType" column="protocol_type" />
|
||||||
|
<result property="ipAddress" column="ip_address" />
|
||||||
|
<result property="port" column="port" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectDeviceVo">
|
||||||
|
select device_id, device_code, device_name, device_type, area_code,
|
||||||
|
protocol_type, ip_address, port, status, del_flag,
|
||||||
|
create_by, create_time, update_by, update_time, remark
|
||||||
|
from wcs_device
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectDeviceList" parameterType="com.ruoyi.wcs.device.domain.WcsDevice" resultMap="WcsDeviceResult">
|
||||||
|
<include refid="selectDeviceVo"/>
|
||||||
|
<where>
|
||||||
|
del_flag = '0'
|
||||||
|
<if test="deviceCode != null and deviceCode != ''">
|
||||||
|
AND device_code like concat('%', #{deviceCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="deviceName != null and deviceName != ''">
|
||||||
|
AND device_name like concat('%', #{deviceName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="deviceType != null and deviceType != ''">
|
||||||
|
AND device_type = #{deviceType}
|
||||||
|
</if>
|
||||||
|
<if test="areaCode != null and areaCode != ''">
|
||||||
|
AND area_code = #{areaCode}
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDeviceById" parameterType="Long" resultMap="WcsDeviceResult">
|
||||||
|
<include refid="selectDeviceVo"/>
|
||||||
|
where device_id = #{deviceId} and del_flag = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="checkDeviceCodeUnique" parameterType="String" resultMap="WcsDeviceResult">
|
||||||
|
<include refid="selectDeviceVo"/>
|
||||||
|
where device_code = #{deviceCode} and del_flag = '0' limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertDevice" parameterType="com.ruoyi.wcs.device.domain.WcsDevice" useGeneratedKeys="true" keyProperty="deviceId">
|
||||||
|
insert into wcs_device(
|
||||||
|
<if test="deviceCode != null and deviceCode != ''">device_code,</if>
|
||||||
|
<if test="deviceName != null and deviceName != ''">device_name,</if>
|
||||||
|
<if test="deviceType != null and deviceType != ''">device_type,</if>
|
||||||
|
<if test="areaCode != null and areaCode != ''">area_code,</if>
|
||||||
|
<if test="protocolType != null and protocolType != ''">protocol_type,</if>
|
||||||
|
<if test="ipAddress != null and ipAddress != ''">ip_address,</if>
|
||||||
|
<if test="port != null">port,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if>
|
||||||
|
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||||
|
<if test="deviceType != null and deviceType != ''">#{deviceType},</if>
|
||||||
|
<if test="areaCode != null and areaCode != ''">#{areaCode},</if>
|
||||||
|
<if test="protocolType != null and protocolType != ''">#{protocolType},</if>
|
||||||
|
<if test="ipAddress != null and ipAddress != ''">#{ipAddress},</if>
|
||||||
|
<if test="port != null">#{port},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateDevice" parameterType="com.ruoyi.wcs.device.domain.WcsDevice">
|
||||||
|
update wcs_device
|
||||||
|
<set>
|
||||||
|
<if test="deviceCode != null and deviceCode != ''">device_code = #{deviceCode},</if>
|
||||||
|
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||||
|
<if test="deviceType != null">device_type = #{deviceType},</if>
|
||||||
|
<if test="areaCode != null">area_code = #{areaCode},</if>
|
||||||
|
<if test="protocolType != null">protocol_type = #{protocolType},</if>
|
||||||
|
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
|
||||||
|
<if test="port != null">port = #{port},</if>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
update_time = sysdate()
|
||||||
|
</set>
|
||||||
|
where device_id = #{deviceId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteDeviceById" parameterType="Long">
|
||||||
|
update wcs_device set del_flag = '2' where device_id = #{deviceId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteDeviceByIds" parameterType="Long">
|
||||||
|
update wcs_device set del_flag = '2' where device_id in
|
||||||
|
<foreach collection="array" item="deviceId" open="(" separator="," close=")">
|
||||||
|
#{deviceId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
<?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.ruoyi.wcs.device.mapper.WcsDevicePointMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.wcs.device.domain.WcsDevicePoint" id="WcsDevicePointResult">
|
||||||
|
<id property="pointId" column="point_id" />
|
||||||
|
<result property="deviceId" column="device_id" />
|
||||||
|
<result property="pointCode" column="point_code" />
|
||||||
|
<result property="pointName" column="point_name" />
|
||||||
|
<result property="pointType" column="point_type" />
|
||||||
|
<result property="dataType" column="data_type" />
|
||||||
|
<result property="address" column="address" />
|
||||||
|
<result property="unit" column="unit" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="deviceName" column="device_name" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectPointVo">
|
||||||
|
select p.point_id, p.device_id, p.point_code, p.point_name, p.point_type,
|
||||||
|
p.data_type, p.address, p.unit, p.status, p.del_flag,
|
||||||
|
p.create_by, p.create_time, p.update_by, p.update_time, p.remark,
|
||||||
|
d.device_name
|
||||||
|
from wcs_device_point p
|
||||||
|
left join wcs_device d on d.device_id = p.device_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectPointList" parameterType="com.ruoyi.wcs.device.domain.WcsDevicePoint" resultMap="WcsDevicePointResult">
|
||||||
|
<include refid="selectPointVo"/>
|
||||||
|
<where>
|
||||||
|
p.del_flag = '0'
|
||||||
|
<if test="deviceId != null">
|
||||||
|
AND p.device_id = #{deviceId}
|
||||||
|
</if>
|
||||||
|
<if test="pointCode != null and pointCode != ''">
|
||||||
|
AND p.point_code like concat('%', #{pointCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="pointName != null and pointName != ''">
|
||||||
|
AND p.point_name like concat('%', #{pointName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="pointType != null and pointType != ''">
|
||||||
|
AND p.point_type = #{pointType}
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
AND p.status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPointById" parameterType="Long" resultMap="WcsDevicePointResult">
|
||||||
|
<include refid="selectPointVo"/>
|
||||||
|
where p.point_id = #{pointId} and p.del_flag = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertPoint" parameterType="com.ruoyi.wcs.device.domain.WcsDevicePoint" useGeneratedKeys="true" keyProperty="pointId">
|
||||||
|
insert into wcs_device_point(
|
||||||
|
<if test="deviceId != null">device_id,</if>
|
||||||
|
<if test="pointCode != null and pointCode != ''">point_code,</if>
|
||||||
|
<if test="pointName != null and pointName != ''">point_name,</if>
|
||||||
|
<if test="pointType != null and pointType != ''">point_type,</if>
|
||||||
|
<if test="dataType != null and dataType != ''">data_type,</if>
|
||||||
|
<if test="address != null and address != ''">address,</if>
|
||||||
|
<if test="unit != null and unit != ''">unit,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="deviceId != null">#{deviceId},</if>
|
||||||
|
<if test="pointCode != null and pointCode != ''">#{pointCode},</if>
|
||||||
|
<if test="pointName != null and pointName != ''">#{pointName},</if>
|
||||||
|
<if test="pointType != null and pointType != ''">#{pointType},</if>
|
||||||
|
<if test="dataType != null and dataType != ''">#{dataType},</if>
|
||||||
|
<if test="address != null and address != ''">#{address},</if>
|
||||||
|
<if test="unit != null and unit != ''">#{unit},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updatePoint" parameterType="com.ruoyi.wcs.device.domain.WcsDevicePoint">
|
||||||
|
update wcs_device_point
|
||||||
|
<set>
|
||||||
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||||
|
<if test="pointCode != null and pointCode != ''">point_code = #{pointCode},</if>
|
||||||
|
<if test="pointName != null">point_name = #{pointName},</if>
|
||||||
|
<if test="pointType != null">point_type = #{pointType},</if>
|
||||||
|
<if test="dataType != null">data_type = #{dataType},</if>
|
||||||
|
<if test="address != null">address = #{address},</if>
|
||||||
|
<if test="unit != null">unit = #{unit},</if>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
update_time = sysdate()
|
||||||
|
</set>
|
||||||
|
where point_id = #{pointId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deletePointById" parameterType="Long">
|
||||||
|
update wcs_device_point set del_flag = '2' where point_id = #{pointId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deletePointByIds" parameterType="Long">
|
||||||
|
update wcs_device_point set del_flag = '2' where point_id in
|
||||||
|
<foreach collection="array" item="pointId" open="(" separator="," close=")">
|
||||||
|
#{pointId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
110
ruoyi-admin/src/main/resources/mapper/wcs/WcsFlowDefMapper.xml
Normal file
110
ruoyi-admin/src/main/resources/mapper/wcs/WcsFlowDefMapper.xml
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
<?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.ruoyi.wcs.flow.mapper.WcsFlowDefMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.wcs.flow.domain.WcsFlowDef" id="WcsFlowDefResult">
|
||||||
|
<id property="flowId" column="flow_id" />
|
||||||
|
<result property="flowCode" column="flow_code" />
|
||||||
|
<result property="flowName" column="flow_name" />
|
||||||
|
<result property="flowType" column="flow_type" />
|
||||||
|
<result property="version" column="version" />
|
||||||
|
<result property="flowJson" column="flow_json" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectFlowDefVo">
|
||||||
|
select flow_id, flow_code, flow_name, flow_type, version, flow_json,
|
||||||
|
status, del_flag, create_by, create_time, update_by, update_time, remark
|
||||||
|
from wcs_flow_def
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectFlowDefList" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowDef" resultMap="WcsFlowDefResult">
|
||||||
|
<include refid="selectFlowDefVo"/>
|
||||||
|
<where>
|
||||||
|
del_flag = '0'
|
||||||
|
<if test="flowCode != null and flowCode != ''">
|
||||||
|
AND flow_code like concat('%', #{flowCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="flowName != null and flowName != ''">
|
||||||
|
AND flow_name like concat('%', #{flowName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="flowType != null and flowType != ''">
|
||||||
|
AND flow_type = #{flowType}
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by flow_id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFlowDefById" parameterType="Long" resultMap="WcsFlowDefResult">
|
||||||
|
<include refid="selectFlowDefVo"/>
|
||||||
|
where flow_id = #{flowId} and del_flag = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="checkFlowCodeUnique" parameterType="String" resultMap="WcsFlowDefResult">
|
||||||
|
<include refid="selectFlowDefVo"/>
|
||||||
|
where flow_code = #{flowCode} and del_flag = '0' limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertFlowDef" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowDef" useGeneratedKeys="true" keyProperty="flowId">
|
||||||
|
insert into wcs_flow_def(
|
||||||
|
<if test="flowCode != null and flowCode != ''">flow_code,</if>
|
||||||
|
<if test="flowName != null and flowName != ''">flow_name,</if>
|
||||||
|
<if test="flowType != null and flowType != ''">flow_type,</if>
|
||||||
|
<if test="version != null">version,</if>
|
||||||
|
<if test="flowJson != null and flowJson != ''">flow_json,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="flowCode != null and flowCode != ''">#{flowCode},</if>
|
||||||
|
<if test="flowName != null and flowName != ''">#{flowName},</if>
|
||||||
|
<if test="flowType != null and flowType != ''">#{flowType},</if>
|
||||||
|
<if test="version != null">#{version},</if>
|
||||||
|
<if test="flowJson != null and flowJson != ''">#{flowJson},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateFlowDef" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowDef">
|
||||||
|
update wcs_flow_def
|
||||||
|
<set>
|
||||||
|
<if test="flowCode != null and flowCode != ''">flow_code = #{flowCode},</if>
|
||||||
|
<if test="flowName != null">flow_name = #{flowName},</if>
|
||||||
|
<if test="flowType != null">flow_type = #{flowType},</if>
|
||||||
|
<if test="version != null">version = #{version},</if>
|
||||||
|
<if test="flowJson != null">flow_json = #{flowJson},</if>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
update_time = sysdate()
|
||||||
|
</set>
|
||||||
|
where flow_id = #{flowId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteFlowDefById" parameterType="Long">
|
||||||
|
update wcs_flow_def set del_flag = '2' where flow_id = #{flowId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteFlowDefByIds" parameterType="Long">
|
||||||
|
update wcs_flow_def set del_flag = '2' where flow_id in
|
||||||
|
<foreach collection="array" item="flowId" open="(" separator="," close=")">
|
||||||
|
#{flowId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
<?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.ruoyi.wcs.flow.mapper.WcsFlowInstanceMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.wcs.flow.domain.WcsFlowInstance" id="WcsFlowInstanceResult">
|
||||||
|
<id property="id" column="id" />
|
||||||
|
<result property="flowDefId" column="flow_def_id" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="startTime" column="start_time" />
|
||||||
|
<result property="endTime" column="end_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectFlowInstanceVo">
|
||||||
|
select id, flow_def_id, status, start_time, end_time, remark,
|
||||||
|
create_by, create_time, update_by, update_time
|
||||||
|
from wcs_flow_instance
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectFlowInstanceList" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowInstance" resultMap="WcsFlowInstanceResult">
|
||||||
|
<include refid="selectFlowInstanceVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="flowDefId != null">
|
||||||
|
AND flow_def_id = #{flowDefId}
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
<if test="params.beginStartTime != null and params.beginStartTime != ''">
|
||||||
|
AND start_time >= #{params.beginStartTime}
|
||||||
|
</if>
|
||||||
|
<if test="params.endStartTime != null and params.endStartTime != ''">
|
||||||
|
AND start_time <= #{params.endStartTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFlowInstanceById" parameterType="Long" resultMap="WcsFlowInstanceResult">
|
||||||
|
<include refid="selectFlowInstanceVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertFlowInstance" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowInstance" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into wcs_flow_instance(
|
||||||
|
<if test="flowDefId != null">flow_def_id,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="startTime != null">start_time,</if>
|
||||||
|
<if test="endTime != null">end_time,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="flowDefId != null">#{flowDefId},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="startTime != null">#{startTime},</if>
|
||||||
|
<if test="endTime != null">#{endTime},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateFlowInstance" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowInstance">
|
||||||
|
update wcs_flow_instance
|
||||||
|
<set>
|
||||||
|
<if test="flowDefId != null">flow_def_id = #{flowDefId},</if>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="startTime != null">start_time = #{startTime},</if>
|
||||||
|
<if test="endTime != null">end_time = #{endTime},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
update_time = sysdate()
|
||||||
|
</set>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteFlowInstanceById" parameterType="Long">
|
||||||
|
delete from wcs_flow_instance where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteFlowInstanceByIds" parameterType="Long">
|
||||||
|
delete from wcs_flow_instance where id in
|
||||||
|
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?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.ruoyi.wcs.flow.mapper.WcsFlowLineMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.wcs.flow.domain.WcsFlowLine" id="WcsFlowLineResult">
|
||||||
|
<id property="lineId" column="line_id" />
|
||||||
|
<result property="flowId" column="flow_id" />
|
||||||
|
<result property="sourceNodeId" column="source_node_id" />
|
||||||
|
<result property="targetNodeId" column="target_node_id" />
|
||||||
|
<result property="conditionExpr" column="condition_expr" />
|
||||||
|
<result property="lineLabel" column="line_label" />
|
||||||
|
<result property="sortOrder" column="sort_order" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectFlowLineVo">
|
||||||
|
select line_id, flow_id, source_node_id, target_node_id, condition_expr,
|
||||||
|
line_label, sort_order, create_time
|
||||||
|
from wcs_flow_line
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectFlowLineListByFlowId" parameterType="Long" resultMap="WcsFlowLineResult">
|
||||||
|
<include refid="selectFlowLineVo"/>
|
||||||
|
where flow_id = #{flowId}
|
||||||
|
order by sort_order
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFlowLineById" parameterType="Long" resultMap="WcsFlowLineResult">
|
||||||
|
<include refid="selectFlowLineVo"/>
|
||||||
|
where line_id = #{lineId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertFlowLine" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||||
|
insert into wcs_flow_line(
|
||||||
|
<if test="flowId != null">flow_id,</if>
|
||||||
|
<if test="sourceNodeId != null">source_node_id,</if>
|
||||||
|
<if test="targetNodeId != null">target_node_id,</if>
|
||||||
|
<if test="conditionExpr != null and conditionExpr != ''">condition_expr,</if>
|
||||||
|
<if test="lineLabel != null and lineLabel != ''">line_label,</if>
|
||||||
|
<if test="sortOrder != null">sort_order,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="flowId != null">#{flowId},</if>
|
||||||
|
<if test="sourceNodeId != null">#{sourceNodeId},</if>
|
||||||
|
<if test="targetNodeId != null">#{targetNodeId},</if>
|
||||||
|
<if test="conditionExpr != null and conditionExpr != ''">#{conditionExpr},</if>
|
||||||
|
<if test="lineLabel != null and lineLabel != ''">#{lineLabel},</if>
|
||||||
|
<if test="sortOrder != null">#{sortOrder},</if>
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="deleteFlowLineById" parameterType="Long">
|
||||||
|
delete from wcs_flow_line where line_id = #{lineId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteFlowLineByFlowId" parameterType="Long">
|
||||||
|
delete from wcs_flow_line where flow_id = #{flowId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
<?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.ruoyi.wcs.flow.mapper.WcsFlowNodeLogMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.wcs.flow.domain.WcsFlowNodeLog" id="WcsFlowNodeLogResult">
|
||||||
|
<id property="id" column="id" />
|
||||||
|
<result property="instanceId" column="instance_id" />
|
||||||
|
<result property="nodeId" column="node_id" />
|
||||||
|
<result property="nodeType" column="node_type" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="input" column="input" />
|
||||||
|
<result property="output" column="output" />
|
||||||
|
<result property="errorMsg" column="error_msg" />
|
||||||
|
<result property="startTime" column="start_time" />
|
||||||
|
<result property="endTime" column="end_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectFlowNodeLogVo">
|
||||||
|
select id, instance_id, node_id, node_type, status, input, output,
|
||||||
|
error_msg, start_time, end_time, create_by, create_time
|
||||||
|
from wcs_flow_node_log
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectFlowNodeLogList" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowNodeLog" resultMap="WcsFlowNodeLogResult">
|
||||||
|
<include refid="selectFlowNodeLogVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="instanceId != null">
|
||||||
|
AND instance_id = #{instanceId}
|
||||||
|
</if>
|
||||||
|
<if test="nodeId != null and nodeId != ''">
|
||||||
|
AND node_id = #{nodeId}
|
||||||
|
</if>
|
||||||
|
<if test="nodeType != null and nodeType != ''">
|
||||||
|
AND node_type = #{nodeType}
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by id asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFlowNodeLogById" parameterType="Long" resultMap="WcsFlowNodeLogResult">
|
||||||
|
<include refid="selectFlowNodeLogVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFlowNodeLogByInstanceId" parameterType="Long" resultMap="WcsFlowNodeLogResult">
|
||||||
|
<include refid="selectFlowNodeLogVo"/>
|
||||||
|
where instance_id = #{instanceId}
|
||||||
|
order by id asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertFlowNodeLog" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowNodeLog" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into wcs_flow_node_log(
|
||||||
|
<if test="instanceId != null">instance_id,</if>
|
||||||
|
<if test="nodeId != null and nodeId != ''">node_id,</if>
|
||||||
|
<if test="nodeType != null and nodeType != ''">node_type,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="input != null and input != ''">input,</if>
|
||||||
|
<if test="output != null and output != ''">output,</if>
|
||||||
|
<if test="errorMsg != null and errorMsg != ''">error_msg,</if>
|
||||||
|
<if test="startTime != null">start_time,</if>
|
||||||
|
<if test="endTime != null">end_time,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="instanceId != null">#{instanceId},</if>
|
||||||
|
<if test="nodeId != null and nodeId != ''">#{nodeId},</if>
|
||||||
|
<if test="nodeType != null and nodeType != ''">#{nodeType},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="input != null and input != ''">#{input},</if>
|
||||||
|
<if test="output != null and output != ''">#{output},</if>
|
||||||
|
<if test="errorMsg != null and errorMsg != ''">#{errorMsg},</if>
|
||||||
|
<if test="startTime != null">#{startTime},</if>
|
||||||
|
<if test="endTime != null">#{endTime},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateFlowNodeLog" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowNodeLog">
|
||||||
|
update wcs_flow_node_log
|
||||||
|
<set>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="input != null">input = #{input},</if>
|
||||||
|
<if test="output != null">output = #{output},</if>
|
||||||
|
<if test="errorMsg != null">error_msg = #{errorMsg},</if>
|
||||||
|
<if test="startTime != null">start_time = #{startTime},</if>
|
||||||
|
<if test="endTime != null">end_time = #{endTime},</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteFlowNodeLogById" parameterType="Long">
|
||||||
|
delete from wcs_flow_node_log where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteFlowNodeLogByIds" parameterType="Long">
|
||||||
|
delete from wcs_flow_node_log where id in
|
||||||
|
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteFlowNodeLogByInstanceId" parameterType="Long">
|
||||||
|
delete from wcs_flow_node_log where instance_id = #{instanceId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
<?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.ruoyi.wcs.flow.mapper.WcsFlowNodeMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.wcs.flow.domain.WcsFlowNode" id="WcsFlowNodeResult">
|
||||||
|
<id property="nodeId" column="node_id" />
|
||||||
|
<result property="flowId" column="flow_id" />
|
||||||
|
<result property="nodeCode" column="node_code" />
|
||||||
|
<result property="nodeName" column="node_name" />
|
||||||
|
<result property="nodeType" column="node_type" />
|
||||||
|
<result property="handlerClass" column="handler_class" />
|
||||||
|
<result property="configJson" column="config_json" />
|
||||||
|
<result property="posX" column="pos_x" />
|
||||||
|
<result property="posY" column="pos_y" />
|
||||||
|
<result property="sortOrder" column="sort_order" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectFlowNodeVo">
|
||||||
|
select node_id, flow_id, node_code, node_name, node_type, handler_class,
|
||||||
|
config_json, pos_x, pos_y, sort_order, create_time, update_time
|
||||||
|
from wcs_flow_node
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectFlowNodeListByFlowId" parameterType="Long" resultMap="WcsFlowNodeResult">
|
||||||
|
<include refid="selectFlowNodeVo"/>
|
||||||
|
where flow_id = #{flowId}
|
||||||
|
order by sort_order
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFlowNodeById" parameterType="Long" resultMap="WcsFlowNodeResult">
|
||||||
|
<include refid="selectFlowNodeVo"/>
|
||||||
|
where node_id = #{nodeId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertFlowNode" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowNode" useGeneratedKeys="true" keyProperty="nodeId">
|
||||||
|
insert into wcs_flow_node(
|
||||||
|
<if test="flowId != null">flow_id,</if>
|
||||||
|
<if test="nodeCode != null and nodeCode != ''">node_code,</if>
|
||||||
|
<if test="nodeName != null and nodeName != ''">node_name,</if>
|
||||||
|
<if test="nodeType != null and nodeType != ''">node_type,</if>
|
||||||
|
<if test="handlerClass != null and handlerClass != ''">handler_class,</if>
|
||||||
|
<if test="configJson != null and configJson != ''">config_json,</if>
|
||||||
|
<if test="posX != null">pos_x,</if>
|
||||||
|
<if test="posY != null">pos_y,</if>
|
||||||
|
<if test="sortOrder != null">sort_order,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="flowId != null">#{flowId},</if>
|
||||||
|
<if test="nodeCode != null and nodeCode != ''">#{nodeCode},</if>
|
||||||
|
<if test="nodeName != null and nodeName != ''">#{nodeName},</if>
|
||||||
|
<if test="nodeType != null and nodeType != ''">#{nodeType},</if>
|
||||||
|
<if test="handlerClass != null and handlerClass != ''">#{handlerClass},</if>
|
||||||
|
<if test="configJson != null and configJson != ''">#{configJson},</if>
|
||||||
|
<if test="posX != null">#{posX},</if>
|
||||||
|
<if test="posY != null">#{posY},</if>
|
||||||
|
<if test="sortOrder != null">#{sortOrder},</if>
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateFlowNode" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowNode">
|
||||||
|
update wcs_flow_node
|
||||||
|
<set>
|
||||||
|
<if test="nodeCode != null and nodeCode != ''">node_code = #{nodeCode},</if>
|
||||||
|
<if test="nodeName != null">node_name = #{nodeName},</if>
|
||||||
|
<if test="nodeType != null">node_type = #{nodeType},</if>
|
||||||
|
<if test="handlerClass != null">handler_class = #{handlerClass},</if>
|
||||||
|
<if test="configJson != null">config_json = #{configJson},</if>
|
||||||
|
<if test="posX != null">pos_x = #{posX},</if>
|
||||||
|
<if test="posY != null">pos_y = #{posY},</if>
|
||||||
|
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
|
||||||
|
update_time = sysdate()
|
||||||
|
</set>
|
||||||
|
where node_id = #{nodeId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteFlowNodeById" parameterType="Long">
|
||||||
|
delete from wcs_flow_node where node_id = #{nodeId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteFlowNodeByFlowId" parameterType="Long">
|
||||||
|
delete from wcs_flow_node where flow_id = #{flowId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
39
ruoyi-ui/src/api/wcs/apiconfig.js
Normal file
39
ruoyi-ui/src/api/wcs/apiconfig.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function listApiConfig(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/api/config/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getApiConfig(apiId) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/api/config/' + apiId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addApiConfig(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/api/config',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateApiConfig(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/api/config',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delApiConfig(apiId) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/api/config/' + apiId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
39
ruoyi-ui/src/api/wcs/device.js
Normal file
39
ruoyi-ui/src/api/wcs/device.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function listDevice(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/device/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDevice(deviceId) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/device/' + deviceId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addDevice(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/device',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateDevice(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/device',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delDevice(deviceId) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/device/' + deviceId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
55
ruoyi-ui/src/api/wcs/flow.js
Normal file
55
ruoyi-ui/src/api/wcs/flow.js
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function listFlowDef(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/flow/def/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getFlowDef(flowId) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/flow/def/' + flowId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addFlowDef(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/flow/def',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateFlowDef(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/flow/def',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delFlowDef(flowId) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/flow/def/' + flowId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listFlowInstance(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/flow/instance/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listFlowLog(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/flow/log/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
26
ruoyi-ui/src/api/wcs/flowlog.js
Normal file
26
ruoyi-ui/src/api/wcs/flowlog.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询流程节点日志列表
|
||||||
|
export function listFlowLog(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/flow/log/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询流程节点日志详细
|
||||||
|
export function getFlowLog(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/flow/log/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除流程节点日志
|
||||||
|
export function delFlowLog(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/flow/log/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
39
ruoyi-ui/src/api/wcs/point.js
Normal file
39
ruoyi-ui/src/api/wcs/point.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function listPoint(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/device/point/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPoint(pointId) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/device/point/' + pointId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addPoint(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/device/point',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updatePoint(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/device/point',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delPoint(pointId) {
|
||||||
|
return request({
|
||||||
|
url: '/wcs/device/point/' + pointId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
400
ruoyi-ui/src/views/wcs/apiconfig/index.vue
Normal file
400
ruoyi-ui/src/views/wcs/apiconfig/index.vue
Normal file
@@ -0,0 +1,400 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||||
|
<el-form-item label="<22>ӿڱ<D3BF><DAB1><EFBFBD>" prop="apiCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.apiCode"
|
||||||
|
placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿڱ<D3BF><DAB1><EFBFBD>"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="<22>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>" prop="apiName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.apiName"
|
||||||
|
placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ" prop="requestMethod">
|
||||||
|
<el-select v-model="queryParams.requestMethod" placeholder="<22><>ѡ<EFBFBD><D1A1>" clearable>
|
||||||
|
<el-option label="GET" value="GET" />
|
||||||
|
<el-option label="POST" value="POST" />
|
||||||
|
<el-option label="PUT" value="PUT" />
|
||||||
|
<el-option label="DELETE" value="DELETE" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="<22><><EFBFBD><EFBFBD>" prop="direction">
|
||||||
|
<el-select v-model="queryParams.direction" placeholder="<22><>ѡ<EFBFBD><D1A1>" clearable>
|
||||||
|
<el-option label="<22><>վ" value="inbound" />
|
||||||
|
<el-option label="<22><>վ" value="outbound" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="״̬" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="<22>ӿ<EFBFBD>״̬" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['wcs:api:add']"
|
||||||
|
><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['wcs:api:edit']"
|
||||||
|
><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['wcs:api:remove']"
|
||||||
|
>ɾ<EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['wcs:api:export']"
|
||||||
|
><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="apiList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="<22>ӿ<EFBFBD>ID" align="center" prop="apiId" width="70" />
|
||||||
|
<el-table-column label="<22>ӿڱ<D3BF><DAB1><EFBFBD>" align="center" prop="apiCode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="<22>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>" align="center" prop="apiName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="<22>ӿڵ<D3BF>ַ" align="center" prop="apiUrl" :show-overflow-tooltip="true" min-width="180" />
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ" align="center" prop="requestMethod" width="90">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="methodTagType(scope.row.requestMethod)" size="small">{{ scope.row.requestMethod }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD>" align="center" prop="direction" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.direction === 'inbound'"><EFBFBD><EFBFBD>վ</span>
|
||||||
|
<span v-else-if="scope.row.direction === 'outbound'"><EFBFBD><EFBFBD>վ</span>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><>ʱ(ms)" align="center" prop="timeout" width="90" />
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD>" align="center" prop="retryCount" width="60" />
|
||||||
|
<el-table-column label="״̬" align="center" prop="status" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>" align="center" prop="createTime" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD>" align="center" class-name="small-padding fixed-width" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['wcs:api:edit']"
|
||||||
|
><EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['wcs:api:remove']"
|
||||||
|
>ɾ<EFBFBD><EFBFBD></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- <EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><EFBFBD>Ľӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>öԻ<EFBFBD><EFBFBD><EFBFBD> -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22>ӿڱ<D3BF><DAB1><EFBFBD>" prop="apiCode">
|
||||||
|
<el-input v-model="form.apiCode" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿڱ<D3BF><DAB1><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>" prop="apiName">
|
||||||
|
<el-input v-model="form.apiName" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="<22>ӿڵ<D3BF>ַ" prop="apiUrl">
|
||||||
|
<el-input v-model="form.apiUrl" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿڵ<D3BF>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD> http://wms-server/api/task" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ" prop="requestMethod">
|
||||||
|
<el-select v-model="form.requestMethod" placeholder="<22><>ѡ<EFBFBD><D1A1>">
|
||||||
|
<el-option label="GET" value="GET" />
|
||||||
|
<el-option label="POST" value="POST" />
|
||||||
|
<el-option label="PUT" value="PUT" />
|
||||||
|
<el-option label="DELETE" value="DELETE" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" prop="contentType">
|
||||||
|
<el-select v-model="form.contentType" placeholder="<22><>ѡ<EFBFBD><D1A1>">
|
||||||
|
<el-option label="application/json" value="application/json" />
|
||||||
|
<el-option label="application/xml" value="application/xml" />
|
||||||
|
<el-option label="application/x-www-form-urlencoded" value="application/x-www-form-urlencoded" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="<22><><EFBFBD><EFBFBD>" prop="direction">
|
||||||
|
<el-select v-model="form.direction" placeholder="<22><>ѡ<EFBFBD><D1A1>">
|
||||||
|
<el-option label="<22><>վ" value="inbound" />
|
||||||
|
<el-option label="<22><>վ" value="outbound" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="<22><>ʱ(ms)" prop="timeout">
|
||||||
|
<el-input-number v-model="form.timeout" controls-position="right" :min="1000" :max="300000" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="<22><><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD>" prop="retryCount">
|
||||||
|
<el-input-number v-model="form.retryCount" controls-position="right" :min="0" :max="10" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="״̬" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="<22><>ע" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">ȷ <EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button @click="cancel">ȡ <EFBFBD><EFBFBD></el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listApiConfig, getApiConfig, addApiConfig, updateApiConfig, delApiConfig } from "@/api/wcs/apiconfig"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WcsApiConfig",
|
||||||
|
dicts: ['sys_normal_disable'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// <20><><EFBFBD>ֲ<EFBFBD>
|
||||||
|
loading: true,
|
||||||
|
// ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
ids: [],
|
||||||
|
// <20>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
single: true,
|
||||||
|
// <20>Ƕ<EFBFBD><C7B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
multiple: true,
|
||||||
|
// <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
showSearch: true,
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
total: 0,
|
||||||
|
// <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
apiList: [],
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
title: "",
|
||||||
|
// <20>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
open: false,
|
||||||
|
// <20><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
apiCode: undefined,
|
||||||
|
apiName: undefined,
|
||||||
|
requestMethod: undefined,
|
||||||
|
direction: undefined,
|
||||||
|
status: undefined
|
||||||
|
},
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
form: {},
|
||||||
|
// <20><><EFBFBD><EFBFBD>У<EFBFBD><D0A3>
|
||||||
|
rules: {
|
||||||
|
apiCode: [
|
||||||
|
{ required: true, message: "<22>ӿڱ<D3BF><DAB1>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>", trigger: "blur" }
|
||||||
|
],
|
||||||
|
apiName: [
|
||||||
|
{ required: true, message: "<22>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>", trigger: "blur" }
|
||||||
|
],
|
||||||
|
apiUrl: [
|
||||||
|
{ required: true, message: "<22>ӿڵ<D3BF>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>", trigger: "blur" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** <20><>ѯ<EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD> */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listApiConfig(this.queryParams).then(response => {
|
||||||
|
this.apiList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>ǩ<EFBFBD><C7A9>ɫ
|
||||||
|
methodTagType(method) {
|
||||||
|
const map = { GET: '', POST: 'success', PUT: 'warning', DELETE: 'danger' }
|
||||||
|
return map[method] || 'info'
|
||||||
|
},
|
||||||
|
// ȡ<><C8A1><EFBFBD><EFBFBD>ť
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
apiId: undefined,
|
||||||
|
apiCode: undefined,
|
||||||
|
apiName: undefined,
|
||||||
|
apiUrl: undefined,
|
||||||
|
requestMethod: "POST",
|
||||||
|
contentType: "application/json",
|
||||||
|
timeout: 30000,
|
||||||
|
retryCount: 0,
|
||||||
|
direction: undefined,
|
||||||
|
status: "0",
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
this.resetForm("form")
|
||||||
|
},
|
||||||
|
/** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD><C5A5><EFBFBD><EFBFBD> */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** <20><><EFBFBD>ð<EFBFBD>ť<EFBFBD><C5A5><EFBFBD><EFBFBD> */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm")
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
// <20><>ѡ<EFBFBD><D1A1>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.apiId)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD><C5A5><EFBFBD><EFBFBD> */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset()
|
||||||
|
this.open = true
|
||||||
|
this.title = "<22><><EFBFBD>ӽӿ<D3BD><D3BF><EFBFBD><EFBFBD><EFBFBD>"
|
||||||
|
},
|
||||||
|
/** <20>İ<DEB8>ť<EFBFBD><C5A5><EFBFBD><EFBFBD> */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset()
|
||||||
|
const apiId = row.apiId || this.ids
|
||||||
|
getApiConfig(apiId).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true
|
||||||
|
this.title = "<22>Ľӿ<C4BD><D3BF><EFBFBD><EFBFBD><EFBFBD>"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** <20>ύ<EFBFBD><E1BDBB>ť */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.apiId != undefined) {
|
||||||
|
updateApiConfig(this.form).then(() => {
|
||||||
|
this.$modal.msgSuccess("<22>ijɹ<C4B3>")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addApiConfig(this.form).then(() => {
|
||||||
|
this.$modal.msgSuccess("<22><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** ɾ<><C9BE><EFBFBD><EFBFBD>ť<EFBFBD><C5A5><EFBFBD><EFBFBD> */
|
||||||
|
handleDelete(row) {
|
||||||
|
const apiIds = row.apiId || this.ids
|
||||||
|
this.$modal.confirm('<27>Ƿ<EFBFBD>ȷ<EFBFBD><C8B7>ɾ<EFBFBD><C9BE><EFBFBD>ӿڱ<D3BF><DAB1><EFBFBD>Ϊ"' + apiIds + '"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').then(function() {
|
||||||
|
return delApiConfig(apiIds)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("ɾ<><C9BE><EFBFBD>ɹ<EFBFBD>")
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
/** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť<EFBFBD><C5A5><EFBFBD><EFBFBD> */
|
||||||
|
handleExport() {
|
||||||
|
this.download('wcs/api/config/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `apiconfig_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
330
ruoyi-ui/src/views/wcs/device/index.vue
Normal file
330
ruoyi-ui/src/views/wcs/device/index.vue
Normal file
@@ -0,0 +1,330 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||||
|
<el-form-item label="<22>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" prop="deviceCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.deviceCode"
|
||||||
|
placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="<22>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" prop="deviceName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.deviceName"
|
||||||
|
placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="<22>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" prop="deviceType">
|
||||||
|
<el-select v-model="queryParams.deviceType" placeholder="<22><>ѡ<EFBFBD><D1A1><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" clearable>
|
||||||
|
<el-option label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" value="conveyor" />
|
||||||
|
<el-option label="AGV" value="agv" />
|
||||||
|
<el-option label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" value="elevator" />
|
||||||
|
<el-option label="<22>Ѷ<EFBFBD><D1B6><EFBFBD>" value="stacker" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="״̬" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="<22>豸״̬" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['wcs:device:add']"
|
||||||
|
><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['wcs:device:edit']"
|
||||||
|
><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['wcs:device:remove']"
|
||||||
|
>ɾ<EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="<22>豸ID" align="center" prop="deviceId" width="80" />
|
||||||
|
<el-table-column label="<22>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" align="center" prop="deviceCode" />
|
||||||
|
<el-table-column label="<22>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" align="center" prop="deviceName" />
|
||||||
|
<el-table-column label="<22>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" align="center" prop="deviceType" />
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" align="center" prop="areaCode" />
|
||||||
|
<el-table-column label="ͨ<><CDA8>Э<EFBFBD><D0AD>" align="center" prop="protocolType" />
|
||||||
|
<el-table-column label="IP<49><50>ַ" align="center" prop="ipAddress" />
|
||||||
|
<el-table-column label="<22>˿<EFBFBD>" align="center" prop="port" width="80" />
|
||||||
|
<el-table-column label="״̬" align="center" prop="status" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>" align="center" prop="createTime" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD>" align="center" class-name="small-padding fixed-width" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['wcs:device:edit']"
|
||||||
|
><EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['wcs:device:remove']"
|
||||||
|
>ɾ<EFBFBD><EFBFBD></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- <EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD> -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" prop="deviceCode">
|
||||||
|
<el-input v-model="form.deviceCode" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" prop="deviceName">
|
||||||
|
<el-input v-model="form.deviceName" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>" prop="deviceType">
|
||||||
|
<el-select v-model="form.deviceType" placeholder="<22><>ѡ<EFBFBD><D1A1><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>">
|
||||||
|
<el-option label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" value="conveyor" />
|
||||||
|
<el-option label="AGV" value="agv" />
|
||||||
|
<el-option label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" value="elevator" />
|
||||||
|
<el-option label="<22>Ѷ<EFBFBD><D1B6><EFBFBD>" value="stacker" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" prop="areaCode">
|
||||||
|
<el-input v-model="form.areaCode" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="ͨ<><CDA8>Э<EFBFBD><D0AD>" prop="protocolType">
|
||||||
|
<el-select v-model="form.protocolType" placeholder="<22><>ѡ<EFBFBD><D1A1>ͨ<EFBFBD><CDA8>Э<EFBFBD><D0AD>">
|
||||||
|
<el-option label="Modbus TCP" value="modbus_tcp" />
|
||||||
|
<el-option label="OPC UA" value="opc_ua" />
|
||||||
|
<el-option label="S7" value="s7" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="״̬" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="IP<49><50>ַ" prop="ipAddress">
|
||||||
|
<el-input v-model="form.ipAddress" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IP<49><50>ַ" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22>˿<EFBFBD>" prop="port">
|
||||||
|
<el-input-number v-model="form.port" controls-position="right" :min="1" :max="65535" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="<22><>ע" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">ȷ <EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button @click="cancel">ȡ <EFBFBD><EFBFBD></el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listDevice, getDevice, addDevice, updateDevice, delDevice } from "@/api/wcs/device"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WcsDevice",
|
||||||
|
dicts: ['sys_normal_disable'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
ids: [],
|
||||||
|
single: true,
|
||||||
|
multiple: true,
|
||||||
|
showSearch: true,
|
||||||
|
total: 0,
|
||||||
|
deviceList: [],
|
||||||
|
title: "",
|
||||||
|
open: false,
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
deviceCode: undefined,
|
||||||
|
deviceName: undefined,
|
||||||
|
deviceType: undefined,
|
||||||
|
status: undefined
|
||||||
|
},
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
deviceCode: [
|
||||||
|
{ required: true, message: "<22>豸<EFBFBD><E8B1B8><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>", trigger: "blur" }
|
||||||
|
],
|
||||||
|
deviceName: [
|
||||||
|
{ required: true, message: "<22>豸<EFBFBD><E8B1B8><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>", trigger: "blur" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listDevice(this.queryParams).then(response => {
|
||||||
|
this.deviceList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
deviceId: undefined,
|
||||||
|
deviceCode: undefined,
|
||||||
|
deviceName: undefined,
|
||||||
|
deviceType: undefined,
|
||||||
|
areaCode: undefined,
|
||||||
|
protocolType: undefined,
|
||||||
|
ipAddress: undefined,
|
||||||
|
port: undefined,
|
||||||
|
status: "0",
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
this.resetForm("form")
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm")
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.deviceId)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.reset()
|
||||||
|
this.open = true
|
||||||
|
this.title = "<22><><EFBFBD><EFBFBD><EFBFBD>豸"
|
||||||
|
},
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset()
|
||||||
|
const deviceId = row.deviceId || this.ids
|
||||||
|
getDevice(deviceId).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true
|
||||||
|
this.title = "<22><EFBFBD><DEB8>豸"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.deviceId != undefined) {
|
||||||
|
updateDevice(this.form).then(() => {
|
||||||
|
this.$modal.msgSuccess("<22>ijɹ<C4B3>")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addDevice(this.form).then(() => {
|
||||||
|
this.$modal.msgSuccess("<22><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleDelete(row) {
|
||||||
|
const deviceIds = row.deviceId || this.ids
|
||||||
|
this.$modal.confirm('<27>Ƿ<EFBFBD>ȷ<EFBFBD><C8B7>ɾ<EFBFBD><C9BE><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>Ϊ"' + deviceIds + '"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').then(function() {
|
||||||
|
return delDevice(deviceIds)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("ɾ<><C9BE><EFBFBD>ɹ<EFBFBD>")
|
||||||
|
}).catch(() => {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
353
ruoyi-ui/src/views/wcs/flowdef/index.vue
Normal file
353
ruoyi-ui/src/views/wcs/flowdef/index.vue
Normal file
@@ -0,0 +1,353 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||||
|
<el-form-item label="流程编码" prop="flowCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.flowCode"
|
||||||
|
placeholder="请输入流程编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="流程名称" prop="flowName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.flowName"
|
||||||
|
placeholder="请输入流程名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="流程类型" prop="flowType">
|
||||||
|
<el-select v-model="queryParams.flowType" placeholder="请选择流程类型" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.wcs_flow_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.wcs_flow_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['wcs:flow:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['wcs:flow:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['wcs:flow:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['wcs:flow:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="flowList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="流程ID" align="center" prop="flowId" width="70" />
|
||||||
|
<el-table-column label="流程编码" align="center" prop="flowCode" />
|
||||||
|
<el-table-column label="流程名称" align="center" prop="flowName" />
|
||||||
|
<el-table-column label="流程类型" align="center" prop="flowType" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wcs_flow_type" :value="scope.row.flowType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="版本" align="center" prop="version" width="70" />
|
||||||
|
<el-table-column label="状态" align="center" prop="status" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wcs_flow_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['wcs:flow:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['wcs:flow:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改流程定义对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="流程编码" prop="flowCode">
|
||||||
|
<el-input v-model="form.flowCode" placeholder="请输入流程编码" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="流程名称" prop="flowName">
|
||||||
|
<el-input v-model="form.flowName" placeholder="请输入流程名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="流程类型" prop="flowType">
|
||||||
|
<el-select v-model="form.flowType" placeholder="请选择流程类型">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.wcs_flow_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="版本" prop="version">
|
||||||
|
<el-input-number v-model="form.version" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.wcs_flow_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listFlowDef, getFlowDef, addFlowDef, updateFlowDef, delFlowDef } from "@/api/wcs/flow"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WcsFlowDef",
|
||||||
|
dicts: ['wcs_flow_type', 'wcs_flow_status'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 流程定义表格数据
|
||||||
|
flowList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
flowCode: undefined,
|
||||||
|
flowName: undefined,
|
||||||
|
flowType: undefined,
|
||||||
|
status: undefined
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
flowCode: [
|
||||||
|
{ required: true, message: "流程编码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
flowName: [
|
||||||
|
{ required: true, message: "流程名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
flowType: [
|
||||||
|
{ required: true, message: "流程类型不能为空", trigger: "change" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询流程定义列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listFlowDef(this.queryParams).then(response => {
|
||||||
|
this.flowList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
flowId: undefined,
|
||||||
|
flowCode: undefined,
|
||||||
|
flowName: undefined,
|
||||||
|
flowType: undefined,
|
||||||
|
version: 1,
|
||||||
|
status: "0",
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
this.resetForm("form")
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm")
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.flowId)
|
||||||
|
this.single = selection.length != 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset()
|
||||||
|
this.open = true
|
||||||
|
this.title = "添加流程定义"
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset()
|
||||||
|
const flowId = row.flowId || this.ids
|
||||||
|
getFlowDef(flowId).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true
|
||||||
|
this.title = "修改流程定义"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.flowId != undefined) {
|
||||||
|
updateFlowDef(this.form).then(() => {
|
||||||
|
this.$modal.msgSuccess("修改成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addFlowDef(this.form).then(() => {
|
||||||
|
this.$modal.msgSuccess("新增成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const flowIds = row.flowId || this.ids
|
||||||
|
this.$modal.confirm('是否确认删除流程定义编号为"' + flowIds + '"的数据项?').then(function() {
|
||||||
|
return delFlowDef(flowIds)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("删除成功")
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('wcs/flow/def/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `flowdef_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
304
ruoyi-ui/src/views/wcs/flowinstance/index.vue
Normal file
304
ruoyi-ui/src/views/wcs/flowinstance/index.vue
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
|
<el-form-item label="<22><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" prop="processDefName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.processDefName"
|
||||||
|
placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="״̬" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="ʵ<><CAB5>״̬" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['wcs:flowinstance:add']"
|
||||||
|
><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['wcs:flowinstance:edit']"
|
||||||
|
><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['wcs:flowinstance:remove']"
|
||||||
|
>ɾ<EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['wcs:flowinstance:export']"
|
||||||
|
><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="instanceList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="ʵ<><CAB5>ID" align="center" prop="instanceId" />
|
||||||
|
<el-table-column label="<22><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" align="center" prop="processDefName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="״̬" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="statusTagType(scope.row.status)">{{ statusLabel(scope.row.status) }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><>ʼʱ<CABC><CAB1>" align="center" prop="startTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.startTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>" align="center" prop="endTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.endTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><>ע" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD>" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['wcs:flowinstance:edit']"
|
||||||
|
><EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['wcs:flowinstance:remove']"
|
||||||
|
>ɾ<EFBFBD><EFBFBD></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- <EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><EFBFBD><EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD> -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="550px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||||
|
<el-form-item label="<22><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" prop="processDefName">
|
||||||
|
<el-input v-model="form.processDefName" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="״̬" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="<22><>ѡ<EFBFBD><D1A1>״̬">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="<22><>ʼʱ<CABC><CAB1>" prop="startTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.startTime"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="ѡ<><D1A1><EFBFBD><EFBFBD>ʼʱ<CABC><CAB1>"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="<22><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>" prop="endTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.endTime"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="<22><>ע" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">ȷ <EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button @click="cancel">ȡ <EFBFBD><EFBFBD></el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listFlowInstance, getFlowInstance, delFlowInstance, addFlowInstance, updateFlowInstance } from "@/api/wcs/flowinstance"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WcsFlowInstance",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
ids: [],
|
||||||
|
single: true,
|
||||||
|
multiple: true,
|
||||||
|
showSearch: true,
|
||||||
|
total: 0,
|
||||||
|
instanceList: [],
|
||||||
|
title: "",
|
||||||
|
open: false,
|
||||||
|
statusOptions: [
|
||||||
|
{ value: "0", label: "<22><>ִ<EFBFBD><D6B4>" },
|
||||||
|
{ value: "1", label: "ִ<><D6B4><EFBFBD><EFBFBD>" },
|
||||||
|
{ value: "2", label: "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" },
|
||||||
|
{ value: "3", label: "<22>쳣<EFBFBD><ECB3A3>ֹ" }
|
||||||
|
],
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
processDefName: undefined,
|
||||||
|
status: undefined
|
||||||
|
},
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
processDefName: [
|
||||||
|
{ required: true, message: "<22><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>", trigger: "blur" }
|
||||||
|
],
|
||||||
|
status: [
|
||||||
|
{ required: true, message: "״̬<D7B4><CCAC><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>", trigger: "change" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listFlowInstance(this.queryParams).then(response => {
|
||||||
|
this.instanceList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
statusLabel(status) {
|
||||||
|
const map = { "0": "<22><>ִ<EFBFBD><D6B4>", "1": "ִ<><D6B4><EFBFBD><EFBFBD>", "2": "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "3": "<22>쳣<EFBFBD><ECB3A3>ֹ" }
|
||||||
|
return map[status] || "δ֪"
|
||||||
|
},
|
||||||
|
statusTagType(status) {
|
||||||
|
const map = { "0": "info", "1": "", "2": "success", "3": "danger" }
|
||||||
|
return map[status] || "info"
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
instanceId: undefined,
|
||||||
|
processDefName: undefined,
|
||||||
|
status: "0",
|
||||||
|
startTime: undefined,
|
||||||
|
endTime: undefined,
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
this.resetForm("form")
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm")
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.instanceId)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.reset()
|
||||||
|
this.open = true
|
||||||
|
this.title = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>"
|
||||||
|
},
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset()
|
||||||
|
const instanceId = row.instanceId || this.ids
|
||||||
|
getFlowInstance(instanceId).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true
|
||||||
|
this.title = "<22><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.instanceId != undefined) {
|
||||||
|
updateFlowInstance(this.form).then(() => {
|
||||||
|
this.$modal.msgSuccess("<22>ijɹ<C4B3>")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addFlowInstance(this.form).then(() => {
|
||||||
|
this.$modal.msgSuccess("<22><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleDelete(row) {
|
||||||
|
const instanceIds = row.instanceId || this.ids
|
||||||
|
this.$modal.confirm('<27>Ƿ<EFBFBD>ȷ<EFBFBD><C8B7>ɾ<EFBFBD><C9BE>ʵ<EFBFBD><CAB5>IDΪ"' + instanceIds + '"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').then(function() {
|
||||||
|
return delFlowInstance(instanceIds)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("ɾ<><C9BE><EFBFBD>ɹ<EFBFBD>")
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
this.download('wcs/flowinstance/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `flowinstance_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
263
ruoyi-ui/src/views/wcs/flowlog/index.vue
Normal file
263
ruoyi-ui/src/views/wcs/flowlog/index.vue
Normal file
@@ -0,0 +1,263 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
|
<el-form-item label="实例ID" prop="instanceId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.instanceId"
|
||||||
|
placeholder="请输入实例ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="节点类型" prop="nodeType">
|
||||||
|
<el-select v-model="queryParams.nodeType" placeholder="请选择" clearable>
|
||||||
|
<el-option label="开始" value="start" />
|
||||||
|
<el-option label="API调用" value="api" />
|
||||||
|
<el-option label="PLC读写" value="plc" />
|
||||||
|
<el-option label="条件判断" value="condition" />
|
||||||
|
<el-option label="等待" value="wait" />
|
||||||
|
<el-option label="结束" value="end" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择" clearable>
|
||||||
|
<el-option label="待执行" value="0" />
|
||||||
|
<el-option label="执行中" value="1" />
|
||||||
|
<el-option label="成功" value="2" />
|
||||||
|
<el-option label="失败" value="3" />
|
||||||
|
<el-option label="跳过" value="4" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['wcs:flowlog:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['wcs:flowlog:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="日志ID" align="center" prop="id" width="70" />
|
||||||
|
<el-table-column label="实例ID" align="center" prop="instanceId" width="80" />
|
||||||
|
<el-table-column label="节点ID" align="center" prop="nodeId" width="100" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="节点类型" align="center" prop="nodeType" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="nodeTypeTag(scope.row.nodeType)" size="small">{{ nodeTypeLabel(scope.row.nodeType) }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" align="center" prop="status" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="statusTagType(scope.row.status)" size="small">{{ statusLabel(scope.row.status) }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="开始时间" align="center" prop="startTime" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.startTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="结束时间" align="center" prop="endTime" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.endTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="错误信息" align="center" prop="errorMsg" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
>详情</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['wcs:flowlog:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 日志详情对话框 -->
|
||||||
|
<el-dialog title="日志详情" :visible.sync="openView" width="700px" append-to-body>
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="日志ID">{{ viewForm.id }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实例ID">{{ viewForm.instanceId }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="节点ID">{{ viewForm.nodeId }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="节点类型">{{ nodeTypeLabel(viewForm.nodeType) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="状态">{{ statusLabel(viewForm.status) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="开始时间">{{ parseTime(viewForm.startTime) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="结束时间">{{ parseTime(viewForm.endTime) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建时间">{{ parseTime(viewForm.createTime) }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-divider content-position="left">输入参数</el-divider>
|
||||||
|
<pre class="log-content">{{ viewForm.input || '无' }}</pre>
|
||||||
|
<el-divider content-position="left">输出结果</el-divider>
|
||||||
|
<pre class="log-content">{{ viewForm.output || '无' }}</pre>
|
||||||
|
<el-divider content-position="left" v-if="viewForm.errorMsg">错误信息</el-divider>
|
||||||
|
<pre class="log-content log-error" v-if="viewForm.errorMsg">{{ viewForm.errorMsg }}</pre>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="openView = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listFlowLog, getFlowLog, delFlowLog } from "@/api/wcs/flowlog"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WcsFlowLog",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 日志表格数据
|
||||||
|
logList: [],
|
||||||
|
// 详情弹出层
|
||||||
|
openView: false,
|
||||||
|
// 详情表单
|
||||||
|
viewForm: {},
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
instanceId: undefined,
|
||||||
|
nodeType: undefined,
|
||||||
|
status: undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询日志列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listFlowLog(this.queryParams).then(response => {
|
||||||
|
this.logList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 节点类型标签 */
|
||||||
|
nodeTypeLabel(type) {
|
||||||
|
const map = { start: '开始', api: 'API调用', plc: 'PLC读写', condition: '条件判断', wait: '等待', end: '结束' }
|
||||||
|
return map[type] || type || '-'
|
||||||
|
},
|
||||||
|
/** 节点类型标签颜色 */
|
||||||
|
nodeTypeTag(type) {
|
||||||
|
const map = { start: '', api: 'success', plc: 'warning', condition: 'info', wait: '', end: 'info' }
|
||||||
|
return map[type] || ''
|
||||||
|
},
|
||||||
|
/** 状态标签 */
|
||||||
|
statusLabel(status) {
|
||||||
|
const map = { '0': '待执行', '1': '执行中', '2': '成功', '3': '失败', '4': '跳过' }
|
||||||
|
return map[status] || '未知'
|
||||||
|
},
|
||||||
|
/** 状态标签颜色 */
|
||||||
|
statusTagType(status) {
|
||||||
|
const map = { '0': 'info', '1': '', '2': 'success', '3': 'danger', '4': 'warning' }
|
||||||
|
return map[status] || 'info'
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm")
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 查看详情 */
|
||||||
|
handleView(row) {
|
||||||
|
getFlowLog(row.id).then(response => {
|
||||||
|
this.viewForm = response.data
|
||||||
|
this.openView = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const logIds = row.id || this.ids
|
||||||
|
this.$modal.confirm('是否确认删除日志ID为"' + logIds + '"的数据项?').then(function() {
|
||||||
|
return delFlowLog(logIds)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("删除成功")
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('wcs/flow/log/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `flowlog_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.log-content {
|
||||||
|
background: #f5f7fa;
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 13px;
|
||||||
|
max-height: 200px;
|
||||||
|
overflow: auto;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
.log-error {
|
||||||
|
background: #fef0f0;
|
||||||
|
color: #f56c6c;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
347
ruoyi-ui/src/views/wcs/point/index.vue
Normal file
347
ruoyi-ui/src/views/wcs/point/index.vue
Normal file
@@ -0,0 +1,347 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||||
|
<el-form-item label="<22><><EFBFBD><EFBFBD><EFBFBD>豸" prop="deviceId">
|
||||||
|
<el-select v-model="queryParams.deviceId" placeholder="<22><>ѡ<EFBFBD><D1A1><EFBFBD>豸" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in deviceOptions"
|
||||||
|
:key="item.deviceId"
|
||||||
|
:label="item.deviceName"
|
||||||
|
:value="item.deviceId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="<22><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>" prop="pointCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.pointCode"
|
||||||
|
placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="<22><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>" prop="pointName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.pointName"
|
||||||
|
placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="״̬" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="<22><>λ״̬" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['wcs:point:add']"
|
||||||
|
><EFBFBD><EFBFBD><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['wcs:point:edit']"
|
||||||
|
><EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['wcs:point:remove']"
|
||||||
|
>ɾ<EFBFBD><EFBFBD></el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="pointList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="<22><>λID" align="center" prop="pointId" width="80" />
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD><EFBFBD>豸" align="center" prop="deviceName" />
|
||||||
|
<el-table-column label="<22><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>" align="center" prop="pointCode" />
|
||||||
|
<el-table-column label="<22><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>" align="center" prop="pointName" />
|
||||||
|
<el-table-column label="<22><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>" align="center" prop="pointType" />
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" align="center" prop="dataType" />
|
||||||
|
<el-table-column label="<22><>ַ" align="center" prop="address" />
|
||||||
|
<el-table-column label="<22><>λ" align="center" prop="unit" width="80" />
|
||||||
|
<el-table-column label="״̬" align="center" prop="status" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>" align="center" prop="createTime" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="<22><><EFBFBD><EFBFBD>" align="center" class-name="small-padding fixed-width" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['wcs:point:edit']"
|
||||||
|
><EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['wcs:point:remove']"
|
||||||
|
>ɾ<EFBFBD><EFBFBD></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- <EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><EFBFBD>ĵ<EFBFBD>λ<EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD> -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22><><EFBFBD><EFBFBD><EFBFBD>豸" prop="deviceId">
|
||||||
|
<el-select v-model="form.deviceId" placeholder="<22><>ѡ<EFBFBD><D1A1><EFBFBD>豸">
|
||||||
|
<el-option
|
||||||
|
v-for="item in deviceOptions"
|
||||||
|
:key="item.deviceId"
|
||||||
|
:label="item.deviceName"
|
||||||
|
:value="item.deviceId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>" prop="pointCode">
|
||||||
|
<el-input v-model="form.pointCode" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>" prop="pointName">
|
||||||
|
<el-input v-model="form.pointName" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>" prop="pointType">
|
||||||
|
<el-select v-model="form.pointType" placeholder="<22><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>">
|
||||||
|
<el-option label="ֻ<><D6BB>" value="read" />
|
||||||
|
<el-option label="ֻд" value="write" />
|
||||||
|
<el-option label="<22><>д" value="read_write" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" prop="dataType">
|
||||||
|
<el-select v-model="form.dataType" placeholder="<22><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>">
|
||||||
|
<el-option label="<22><><EFBFBD><EFBFBD>" value="int" />
|
||||||
|
<el-option label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" value="float" />
|
||||||
|
<el-option label="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" value="bool" />
|
||||||
|
<el-option label="<22>ַ<EFBFBD><D6B7><EFBFBD>" value="string" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22><>ַ" prop="address">
|
||||||
|
<el-input v-model="form.address" placeholder="<22>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ַ/OPC<50>ڵ<EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="<22><>λ" prop="unit">
|
||||||
|
<el-input v-model="form.unit" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD>뵥λ" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="״̬" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="<22><>ע" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">ȷ <EFBFBD><EFBFBD></el-button>
|
||||||
|
<el-button @click="cancel">ȡ <EFBFBD><EFBFBD></el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listPoint, getPoint, addPoint, updatePoint, delPoint } from "@/api/wcs/point"
|
||||||
|
import { listDevice } from "@/api/wcs/device"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WcsPoint",
|
||||||
|
dicts: ['sys_normal_disable'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
ids: [],
|
||||||
|
single: true,
|
||||||
|
multiple: true,
|
||||||
|
showSearch: true,
|
||||||
|
total: 0,
|
||||||
|
pointList: [],
|
||||||
|
deviceOptions: [],
|
||||||
|
title: "",
|
||||||
|
open: false,
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
deviceId: undefined,
|
||||||
|
pointCode: undefined,
|
||||||
|
pointName: undefined,
|
||||||
|
status: undefined
|
||||||
|
},
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
deviceId: [
|
||||||
|
{ required: true, message: "<22><><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>", trigger: "change" }
|
||||||
|
],
|
||||||
|
pointCode: [
|
||||||
|
{ required: true, message: "<22><>λ<EFBFBD><CEBB><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>", trigger: "blur" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
this.getDeviceOptions()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listPoint(this.queryParams).then(response => {
|
||||||
|
this.pointList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDeviceOptions() {
|
||||||
|
listDevice({ pageNum: 1, pageSize: 1000 }).then(response => {
|
||||||
|
this.deviceOptions = response.rows || []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
pointId: undefined,
|
||||||
|
deviceId: undefined,
|
||||||
|
pointCode: undefined,
|
||||||
|
pointName: undefined,
|
||||||
|
pointType: undefined,
|
||||||
|
dataType: undefined,
|
||||||
|
address: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
status: "0",
|
||||||
|
remark: undefined
|
||||||
|
}
|
||||||
|
this.resetForm("form")
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm")
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.pointId)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.reset()
|
||||||
|
this.open = true
|
||||||
|
this.title = "<22><><EFBFBD>ӵ<EFBFBD>λ"
|
||||||
|
},
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset()
|
||||||
|
const pointId = row.pointId || this.ids
|
||||||
|
getPoint(pointId).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true
|
||||||
|
this.title = "<22>ĵ<DEB8>λ"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.pointId != undefined) {
|
||||||
|
updatePoint(this.form).then(() => {
|
||||||
|
this.$modal.msgSuccess("<22>ijɹ<C4B3>")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addPoint(this.form).then(() => {
|
||||||
|
this.$modal.msgSuccess("<22><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleDelete(row) {
|
||||||
|
const pointIds = row.pointId || this.ids
|
||||||
|
this.$modal.confirm('<27>Ƿ<EFBFBD>ȷ<EFBFBD><C8B7>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>Ϊ"' + pointIds + '"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').then(function() {
|
||||||
|
return delPoint(pointIds)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("ɾ<><C9BE><EFBFBD>ɹ<EFBFBD>")
|
||||||
|
}).catch(() => {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
238
sql/wcs_init_mysql.sql
Normal file
238
sql/wcs_init_mysql.sql
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
-- =============================================
|
||||||
|
-- WCS <20>ֿ<EFBFBD><D6BF><EFBFBD><EFBFBD><EFBFBD>ϵͳ - MySQL <20><>ʼ<EFBFBD><CABC><EFBFBD>ű<EFBFBD>
|
||||||
|
-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>: MySQL 5.7+ / 8.0+
|
||||||
|
-- <20>ַ<EFBFBD><D6B7><EFBFBD>: utf8mb4
|
||||||
|
-- ˵<><CBB5>: <20>Ǽܽ<DCBD><D7B6><EFBFBD>С<EFBFBD>ֶμ<D6B6><CEBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ
|
||||||
|
-- =============================================
|
||||||
|
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 1. <20>豸<EFBFBD><E8B1B8>Ϣ<EFBFBD><CFA2>
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `wcs_device`;
|
||||||
|
CREATE TABLE `wcs_device` (
|
||||||
|
`device_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD>豸ID',
|
||||||
|
`device_code` varchar(64) NOT NULL COMMENT '<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`device_name` varchar(128) DEFAULT NULL COMMENT '<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`device_type` varchar(32) DEFAULT NULL COMMENT '<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>conveyor/agv/elevator/stacker<65>ȣ<EFBFBD>',
|
||||||
|
`area_code` varchar(64) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`protocol_type` varchar(32) DEFAULT NULL COMMENT 'ͨ<EFBFBD><EFBFBD>Э<EFBFBD>飨modbus_tcp/opc_ua/s7<73>ȣ<EFBFBD>',
|
||||||
|
`ip_address` varchar(64) DEFAULT NULL COMMENT '<EFBFBD>豸IP<EFBFBD><EFBFBD>ַ',
|
||||||
|
`port` int(11) DEFAULT NULL COMMENT 'ͨ<EFBFBD>Ŷ˿<EFBFBD>',
|
||||||
|
`status` char(1) DEFAULT '0' COMMENT '<EFBFBD>豸״̬<EFBFBD><EFBFBD>0<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1ͣ<31>ã<EFBFBD>',
|
||||||
|
`del_flag` char(1) DEFAULT '0' COMMENT 'ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>0<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2ɾ<32><C9BE><EFBFBD><EFBFBD>',
|
||||||
|
`create_by` varchar(64) DEFAULT '' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`update_by` varchar(64) DEFAULT '' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`remark` varchar(500) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ע',
|
||||||
|
PRIMARY KEY (`device_id`),
|
||||||
|
UNIQUE KEY `uk_device_code` (`device_code`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='WCS <20>豸<EFBFBD><E8B1B8>Ϣ<EFBFBD><CFA2>';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 2. <20>豸<EFBFBD><E8B1B8>λ<EFBFBD><CEBB>
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `wcs_device_point`;
|
||||||
|
CREATE TABLE `wcs_device_point` (
|
||||||
|
`point_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD><EFBFBD>λID',
|
||||||
|
`device_id` bigint(20) NOT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸ID',
|
||||||
|
`point_code` varchar(64) NOT NULL COMMENT '<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`point_name` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`point_type` varchar(32) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>read/write/read_write<74><65>',
|
||||||
|
`data_type` varchar(32) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>int/float/bool/string<6E><67>',
|
||||||
|
`address` varchar(128) DEFAULT NULL COMMENT '<EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ/OPC<50>ڵ<EFBFBD>',
|
||||||
|
`unit` varchar(32) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>λ',
|
||||||
|
`status` char(1) DEFAULT '0' COMMENT '״̬<EFBFBD><EFBFBD>0<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1ͣ<31>ã<EFBFBD>',
|
||||||
|
`del_flag` char(1) DEFAULT '0' COMMENT 'ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>0<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2ɾ<32><C9BE><EFBFBD><EFBFBD>',
|
||||||
|
`create_by` varchar(64) DEFAULT '' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`update_by` varchar(64) DEFAULT '' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`remark` varchar(500) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ע',
|
||||||
|
PRIMARY KEY (`point_id`),
|
||||||
|
KEY `idx_device_id` (`device_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='WCS <20>豸<EFBFBD><E8B1B8>λ<EFBFBD><CEBB>';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 3. <20>豸<EFBFBD><E8B1B8>λֵ<CEBB><D6B5>¼<EFBFBD><C2BC>
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `wcs_device_point_value`;
|
||||||
|
CREATE TABLE `wcs_device_point_value` (
|
||||||
|
`value_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD><EFBFBD>¼ID',
|
||||||
|
`point_id` bigint(20) NOT NULL COMMENT '<EFBFBD><EFBFBD>λID',
|
||||||
|
`device_id` bigint(20) NOT NULL COMMENT '<EFBFBD>豸ID',
|
||||||
|
`point_value` varchar(256) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>λֵ',
|
||||||
|
`quality` varchar(16) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>good/bad/uncertain<69><6E>',
|
||||||
|
`collect_time` datetime DEFAULT NULL COMMENT '<EFBFBD>ɼ<EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>¼ʱ<EFBFBD><EFBFBD>',
|
||||||
|
PRIMARY KEY (`value_id`),
|
||||||
|
KEY `idx_point_id` (`point_id`),
|
||||||
|
KEY `idx_collect_time` (`collect_time`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='WCS <20>豸<EFBFBD><E8B1B8>λֵ<CEBB><D6B5>¼<EFBFBD><C2BC>';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 4. <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>ñ<EFBFBD>
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `wcs_api_config`;
|
||||||
|
CREATE TABLE `wcs_api_config` (
|
||||||
|
`api_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD>ӿ<EFBFBD>ID',
|
||||||
|
`api_code` varchar(64) NOT NULL COMMENT '<EFBFBD>ӿڱ<EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`api_name` varchar(128) DEFAULT NULL COMMENT '<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`api_url` varchar(512) DEFAULT NULL COMMENT '<EFBFBD>ӿڵ<EFBFBD>ַ',
|
||||||
|
`request_method` varchar(16) DEFAULT 'POST' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>GET/POST/PUT/DELETE<54><45>',
|
||||||
|
`content_type` varchar(64) DEFAULT 'application/json' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`timeout` int(11) DEFAULT 30000 COMMENT '<EFBFBD><EFBFBD>ʱʱ<EFBFBD>䣨<EFBFBD><EFBFBD><EFBFBD>룩',
|
||||||
|
`retry_count` int(11) DEFAULT 0 COMMENT '<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`direction` varchar(16) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>inbound/outbound<6E><64>',
|
||||||
|
`status` char(1) DEFAULT '0' COMMENT '״̬<EFBFBD><EFBFBD>0<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1ͣ<31>ã<EFBFBD>',
|
||||||
|
`del_flag` char(1) DEFAULT '0' COMMENT 'ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>0<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2ɾ<32><C9BE><EFBFBD><EFBFBD>',
|
||||||
|
`create_by` varchar(64) DEFAULT '' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`update_by` varchar(64) DEFAULT '' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`remark` varchar(500) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ע',
|
||||||
|
PRIMARY KEY (`api_id`),
|
||||||
|
UNIQUE KEY `uk_api_code` (`api_code`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='WCS <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD>ñ<EFBFBD>';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 5. <20><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `wcs_flow_def`;
|
||||||
|
CREATE TABLE `wcs_flow_def` (
|
||||||
|
`flow_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID',
|
||||||
|
`flow_code` varchar(64) NOT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD>̱<EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`flow_name` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`flow_type` varchar(32) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`version` int(11) DEFAULT 1 COMMENT '<EFBFBD>汾<EFBFBD><EFBFBD>',
|
||||||
|
`flow_json` text COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>JSON<EFBFBD><EFBFBD><EFBFBD>壨<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>',
|
||||||
|
`status` char(1) DEFAULT '0' COMMENT '״̬<EFBFBD><EFBFBD>0<EFBFBD>ݸ<EFBFBD> 1<>ѷ<EFBFBD><D1B7><EFBFBD> 2<><32>ͣ<EFBFBD>ã<EFBFBD>',
|
||||||
|
`del_flag` char(1) DEFAULT '0' COMMENT 'ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>0<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2ɾ<32><C9BE><EFBFBD><EFBFBD>',
|
||||||
|
`create_by` varchar(64) DEFAULT '' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`update_by` varchar(64) DEFAULT '' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`remark` varchar(500) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ע',
|
||||||
|
PRIMARY KEY (`flow_id`),
|
||||||
|
UNIQUE KEY `uk_flow_code_version` (`flow_code`, `version`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='WCS <20><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD>';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 6. <20><><EFBFBD>̽ڵ<CCBD><DAB5><EFBFBD>
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `wcs_flow_node`;
|
||||||
|
CREATE TABLE `wcs_flow_node` (
|
||||||
|
`node_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD>ڵ<EFBFBD>ID',
|
||||||
|
`flow_id` bigint(20) NOT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID',
|
||||||
|
`node_code` varchar(64) NOT NULL COMMENT '<EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`node_name` varchar(128) DEFAULT NULL COMMENT '<EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`node_type` varchar(32) DEFAULT NULL COMMENT '<EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>start/end/task/condition/parallel<65>ȣ<EFBFBD>',
|
||||||
|
`handler_class` varchar(256) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`config_json` text COMMENT '<EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>JSON',
|
||||||
|
`pos_x` int(11) DEFAULT 0 COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`pos_y` int(11) DEFAULT 0 COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Y<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`sort_order` int(11) DEFAULT 0 COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
PRIMARY KEY (`node_id`),
|
||||||
|
KEY `idx_flow_id` (`flow_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='WCS <20><><EFBFBD>̽ڵ<CCBD><DAB5><EFBFBD>';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 7. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD>
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `wcs_flow_line`;
|
||||||
|
CREATE TABLE `wcs_flow_line` (
|
||||||
|
`line_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID',
|
||||||
|
`flow_id` bigint(20) NOT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID',
|
||||||
|
`source_node_id` bigint(20) NOT NULL COMMENT 'Դ<EFBFBD>ڵ<EFBFBD>ID',
|
||||||
|
`target_node_id` bigint(20) NOT NULL COMMENT 'Ŀ<EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>ID',
|
||||||
|
`condition_expr` varchar(512) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',
|
||||||
|
`line_label` varchar(128) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD>ǩ',
|
||||||
|
`sort_order` int(11) DEFAULT 0 COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
PRIMARY KEY (`line_id`),
|
||||||
|
KEY `idx_flow_id` (`flow_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='WCS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD>';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 8. <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD>
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `wcs_flow_instance`;
|
||||||
|
CREATE TABLE `wcs_flow_instance` (
|
||||||
|
`instance_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ʵ<EFBFBD><EFBFBD>ID',
|
||||||
|
`flow_id` bigint(20) NOT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD>ID',
|
||||||
|
`instance_code` varchar(64) DEFAULT NULL COMMENT 'ʵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`trigger_source` varchar(64) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ',
|
||||||
|
`current_node_id` bigint(20) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ǰ<EFBFBD>ڵ<EFBFBD>ID',
|
||||||
|
`instance_status` varchar(16) DEFAULT 'running' COMMENT 'ʵ<EFBFBD><EFBFBD>״̬<EFBFBD><EFBFBD>running/completed/failed/cancelled<65><64>',
|
||||||
|
`context_json` text COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>JSON',
|
||||||
|
`start_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ʼʱ<EFBFBD><EFBFBD>',
|
||||||
|
`end_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`error_msg` varchar(2000) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ',
|
||||||
|
`create_by` varchar(64) DEFAULT '' COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
PRIMARY KEY (`instance_id`),
|
||||||
|
KEY `idx_flow_id` (`flow_id`),
|
||||||
|
KEY `idx_instance_status` (`instance_status`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='WCS <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD>';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 9. <20><><EFBFBD>̽ڵ<CCBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>־<EFBFBD><D6BE>
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `wcs_flow_node_log`;
|
||||||
|
CREATE TABLE `wcs_flow_node_log` (
|
||||||
|
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD><EFBFBD>־ID',
|
||||||
|
`instance_id` bigint(20) NOT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><EFBFBD>ID',
|
||||||
|
`node_id` bigint(20) NOT NULL COMMENT '<EFBFBD>ڵ<EFBFBD>ID',
|
||||||
|
`node_name` varchar(128) DEFAULT NULL COMMENT '<EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||||
|
`execute_status` varchar(16) DEFAULT NULL COMMENT 'ִ<EFBFBD><EFBFBD>״̬<EFBFBD><EFBFBD>success/fail/skip<69><70>',
|
||||||
|
`input_data` text COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>JSON',
|
||||||
|
`output_data` text COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>JSON',
|
||||||
|
`error_msg` varchar(2000) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ',
|
||||||
|
`start_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD>ʼʱ<EFBFBD><EFBFBD>',
|
||||||
|
`end_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
`duration` bigint(20) DEFAULT NULL COMMENT 'ִ<EFBFBD>к<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룩',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>',
|
||||||
|
PRIMARY KEY (`log_id`),
|
||||||
|
KEY `idx_instance_id` (`instance_id`),
|
||||||
|
KEY `idx_node_id` (`node_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='WCS <20><><EFBFBD>̽ڵ<CCBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>־<EFBFBD><D6BE>';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- WCS <20>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>ݳ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
-- <20>˵<EFBFBD>ID <20><> 2000 <20>𣬱<EFBFBD><F0A3ACB1><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5>˵<EFBFBD><CBB5><EFBFBD>ͻ
|
||||||
|
-- ----------------------------
|
||||||
|
|
||||||
|
-- WCS һ<><D2BB><EFBFBD>˵<EFBFBD>
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
VALUES (2000, 'WCS<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ', 0, 5, 'wcs', NULL, '', '', 1, 0, 'M', '0', '0', '', 'server', 'admin', sysdate(), '', NULL, 'WCS<EFBFBD>ֿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ');
|
||||||
|
|
||||||
|
-- <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
VALUES (2001, '<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 2000, 1, 'device', 'wcs/device/index', '', '', 1, 0, 'C', '0', '0', 'wcs:device:list', 'component', 'admin', sysdate(), '', NULL, 'WCS<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||||||
|
|
||||||
|
-- <20><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
VALUES (2002, '<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 2000, 2, 'point', 'wcs/point/index', '', '', 1, 0, 'C', '0', '0', 'wcs:point:list', 'edit', 'admin', sysdate(), '', NULL, 'WCS<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||||||
|
|
||||||
|
-- <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
VALUES (2003, '<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 2000, 3, 'apiconfig', 'wcs/apiconfig/index', '', '', 1, 0, 'C', '0', '0', 'wcs:api:list', 'link', 'admin', sysdate(), '', NULL, 'WCS<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||||||
|
|
||||||
|
-- <20><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD>
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
VALUES (2004, '<EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD>', 2000, 4, 'flowdef', 'wcs/flowdef/index', '', '', 1, 0, 'C', '0', '0', 'wcs:flow:list', 'cascader', 'admin', sysdate(), '', NULL, 'WCS<EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD>');
|
||||||
|
|
||||||
|
-- <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
VALUES (2005, '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><EFBFBD>', 2000, 5, 'flowinstance', 'wcs/flowinstance/index', '', '', 1, 0, 'C', '0', '0', 'wcs:instance:list', 'list', 'admin', sysdate(), '', NULL, 'WCS<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><EFBFBD>');
|
||||||
|
|
||||||
|
-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
VALUES (2006, '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־', 2000, 6, 'flowlog', 'wcs/flowlog/index', '', '', 1, 0, 'C', '0', '0', 'wcs:log:list', 'log', 'admin', sysdate(), '', NULL, 'WCS<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־');
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
Reference in New Issue
Block a user