第四轮:FlowInstance/FlowNodeLog 后端骨架 + WcsFlowLogController升级 + flowlog前端页面 + flowlog API

This commit is contained in:
root
2026-03-17 22:51:34 +08:00
parent 912944c0b2
commit 3de2294ead
73 changed files with 6494 additions and 2 deletions

View File

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

View File

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

View File

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

View File

@@ -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;

View File

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

View File

@@ -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;
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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;

View File

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

View File

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

View File

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

View File

@@ -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;
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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;
}
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -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;

View 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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -4,7 +4,9 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
# 主库数据源(MySQL)
# WCS 项目使用 MySQL,请根据实际环境修改连接参数
# 建议数据库名: ry-wcs 或 ry-vue,需先执行 sql/ry_20250522.sql 和 sql/wcs_init_mysql.sql
master:
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root

View File

@@ -133,4 +133,4 @@ xss:
# 排除链接(多个用逗号分隔)
excludes: /system/notice
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
urlPatterns: /system/*,/monitor/*,/tool/*,/wcs/*

View 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>

View 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>

View File

@@ -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>

View 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>

View File

@@ -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 &gt;= #{params.beginStartTime}
</if>
<if test="params.endStartTime != null and params.endStartTime != ''">
AND start_time &lt;= #{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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>