From f83ced0ddb3f1d5b67ba95c34a700b5cb2aadf7a Mon Sep 17 00:00:00 2001 From: zch Date: Thu, 7 May 2026 10:15:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=9F=BA=E7=A1=80=E6=95=B0=E6=8D=AE):=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=B7=AF=E5=BE=84=E6=98=8E=E7=BB=86=E5=85=B3?= =?UTF-8?q?=E8=81=94=E5=8F=8A=E6=93=8D=E4=BD=9C=E4=BA=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为路径信息添加明细列表关联功能,并在所有基础数据VO中增加创建人、更新人及相关名称字段 - 重构Mapper XML文件,优化SQL查询并统一排序规则 - 为所有Service实现类添加@Slave和@DSTransactional注解 --- .../org/dromara/wcs/domain/BasePathInfo.java | 6 + .../dromara/wcs/domain/bo/BasePathInfoBo.java | 5 + .../wcs/domain/vo/BaseDeviceHostVo.java | 23 ++++ .../wcs/domain/vo/BaseDeviceInfoVo.java | 29 +++++ .../wcs/domain/vo/BaseDeviceParamVo.java | 29 +++++ .../wcs/domain/vo/BaseLocationInfoVo.java | 35 ++++++ .../wcs/domain/vo/BaseMaterialInfoVo.java | 23 ++++ .../wcs/domain/vo/BasePathDetailsVo.java | 23 ++++ .../dromara/wcs/domain/vo/BasePathInfoVo.java | 31 ++++++ .../wcs/domain/vo/BaseStoreInfoVo.java | 23 ++++ .../impl/BaseDeviceHostServiceImpl.java | 20 ++-- .../impl/BaseDeviceInfoServiceImpl.java | 20 ++-- .../impl/BaseDeviceParamServiceImpl.java | 20 ++-- .../impl/BaseLocationInfoServiceImpl.java | 20 ++-- .../impl/BaseMaterialInfoServiceImpl.java | 20 ++-- .../impl/BasePathDetailsServiceImpl.java | 20 ++-- .../service/impl/BasePathInfoServiceImpl.java | 20 ++-- .../impl/BaseStoreInfoServiceImpl.java | 20 ++-- .../mapper/wcs/BaseDeviceHostMapper.xml | 60 +++++----- .../mapper/wcs/BaseDeviceInfoMapper.xml | 93 +++++++--------- .../mapper/wcs/BaseDeviceParamMapper.xml | 97 ++++++---------- .../mapper/wcs/BaseLocationInfoMapper.xml | 105 +++++++----------- .../mapper/wcs/BaseMaterialInfoMapper.xml | 93 ++++++---------- .../mapper/wcs/BasePathDetailsMapper.xml | 89 ++++++--------- .../mapper/wcs/BasePathInfoMapper.xml | 94 +++++++--------- .../mapper/wcs/BaseStoreInfoMapper.xml | 88 ++++++--------- 26 files changed, 569 insertions(+), 537 deletions(-) diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/BasePathInfo.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/BasePathInfo.java index bc63ee8..06ad72f 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/BasePathInfo.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/BasePathInfo.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; import java.io.Serial; import java.io.Serializable; +import java.util.List; /** * 路径信息对象 base_path_info @@ -78,5 +79,10 @@ public class BasePathInfo implements Serializable { @TableField(fill = FieldFill.INSERT_UPDATE) private Date updatedTime; + /** + * 路径明细列表 + */ + @TableField(exist = false) + private List details; } diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/bo/BasePathInfoBo.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/bo/BasePathInfoBo.java index f87266c..b06a81b 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/bo/BasePathInfoBo.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/bo/BasePathInfoBo.java @@ -9,6 +9,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import jakarta.validation.constraints.*; import java.util.Date; +import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; /** @@ -53,5 +54,9 @@ public class BasePathInfoBo extends BaseEntity { */ private Date createdTime; + /** + * 路径明细列表 + */ + private List details; } diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceHostVo.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceHostVo.java index c1cc54c..9aca8c5 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceHostVo.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceHostVo.java @@ -85,5 +85,28 @@ public class BaseDeviceHostVo implements Serializable { @ExcelProperty(value = "创建时间") private Date createdTime; + /** + * 创建人 + */ + @ExcelProperty(value = "创建人") + private Long createdBy; + + /** + * 更新人 + */ + @ExcelProperty(value = "更新人") + private Long updatedBy; + + /** + * 创建人名称 + */ + @ExcelProperty(value = "创建人名称") + private String createdByName; + + /** + * 更新人名称 + */ + @ExcelProperty(value = "更新人名称") + private String updatedByName; } diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceInfoVo.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceInfoVo.java index 7ef12e4..210fbdd 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceInfoVo.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceInfoVo.java @@ -84,5 +84,34 @@ public class BaseDeviceInfoVo implements Serializable { @ExcelProperty(value = "创建时间") private Date createdTime; + /** + * 所属主机名称 + */ + @ExcelProperty(value = "所属主机名称") + private String hostName; + + /** + * 创建人 + */ + @ExcelProperty(value = "创建人") + private Long createdBy; + + /** + * 更新人 + */ + @ExcelProperty(value = "更新人") + private Long updatedBy; + + /** + * 创建人名称 + */ + @ExcelProperty(value = "创建人名称") + private String createdByName; + + /** + * 更新人名称 + */ + @ExcelProperty(value = "更新人名称") + private String updatedByName; } diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceParamVo.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceParamVo.java index c544dbe..d3a8677 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceParamVo.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseDeviceParamVo.java @@ -97,5 +97,34 @@ public class BaseDeviceParamVo implements Serializable { @ExcelProperty(value = "创建时间") private Date createdTime; + /** + * 设备名称 + */ + @ExcelProperty(value = "设备名称") + private String deviceName; + + /** + * 创建人 + */ + @ExcelProperty(value = "创建人") + private Long createdBy; + + /** + * 更新人 + */ + @ExcelProperty(value = "更新人") + private Long updatedBy; + + /** + * 创建人名称 + */ + @ExcelProperty(value = "创建人名称") + private String createdByName; + + /** + * 更新人名称 + */ + @ExcelProperty(value = "更新人名称") + private String updatedByName; } diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseLocationInfoVo.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseLocationInfoVo.java index 69660e8..03d88f8 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseLocationInfoVo.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseLocationInfoVo.java @@ -128,5 +128,40 @@ public class BaseLocationInfoVo implements Serializable { @ExcelProperty(value = "创建时间") private Date createdTime; + /** + * 仓库名称 + */ + @ExcelProperty(value = "仓库名称") + private String storeName; + + /** + * 物料名称 + */ + @ExcelProperty(value = "物料名称") + private String materialName; + + /** + * 创建人 + */ + @ExcelProperty(value = "创建人") + private Long createdBy; + + /** + * 更新人 + */ + @ExcelProperty(value = "更新人") + private Long updatedBy; + + /** + * 创建人名称 + */ + @ExcelProperty(value = "创建人名称") + private String createdByName; + + /** + * 更新人名称 + */ + @ExcelProperty(value = "更新人名称") + private String updatedByName; } diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseMaterialInfoVo.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseMaterialInfoVo.java index 96d8d07..4ce9987 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseMaterialInfoVo.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseMaterialInfoVo.java @@ -91,5 +91,28 @@ public class BaseMaterialInfoVo implements Serializable { @ExcelProperty(value = "创建时间") private Date createdTime; + /** + * 创建人 + */ + @ExcelProperty(value = "创建人") + private Long createdBy; + + /** + * 更新人 + */ + @ExcelProperty(value = "更新人") + private Long updatedBy; + + /** + * 创建人名称 + */ + @ExcelProperty(value = "创建人名称") + private String createdByName; + + /** + * 更新人名称 + */ + @ExcelProperty(value = "更新人名称") + private String updatedByName; } diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BasePathDetailsVo.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BasePathDetailsVo.java index deb8cd5..63cb7d3 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BasePathDetailsVo.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BasePathDetailsVo.java @@ -73,5 +73,28 @@ public class BasePathDetailsVo implements Serializable { @ExcelProperty(value = "创建时间") private Date createdTime; + /** + * 创建人 + */ + @ExcelProperty(value = "创建人") + private Long createdBy; + + /** + * 更新人 + */ + @ExcelProperty(value = "更新人") + private Long updatedBy; + + /** + * 创建人名称 + */ + @ExcelProperty(value = "创建人名称") + private String createdByName; + + /** + * 更新人名称 + */ + @ExcelProperty(value = "更新人名称") + private String updatedByName; } diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BasePathInfoVo.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BasePathInfoVo.java index 9337370..4219f2b 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BasePathInfoVo.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BasePathInfoVo.java @@ -13,6 +13,8 @@ import lombok.Data; import java.io.Serial; import java.io.Serializable; import java.util.Date; +import java.util.List; +import org.dromara.wcs.domain.vo.BasePathDetailsVo; @@ -67,5 +69,34 @@ public class BasePathInfoVo implements Serializable { @ExcelProperty(value = "创建时间") private Date createdTime; + /** + * 路径明细列表 + */ + @ExcelProperty(value = "路径明细列表") + private List details; + + /** + * 创建人 + */ + @ExcelProperty(value = "创建人") + private Long createdBy; + + /** + * 更新人 + */ + @ExcelProperty(value = "更新人") + private Long updatedBy; + + /** + * 创建人名称 + */ + @ExcelProperty(value = "创建人名称") + private String createdByName; + + /** + * 更新人名称 + */ + @ExcelProperty(value = "更新人名称") + private String updatedByName; } diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseStoreInfoVo.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseStoreInfoVo.java index 06fea31..25c70b0 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseStoreInfoVo.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/domain/vo/BaseStoreInfoVo.java @@ -67,5 +67,28 @@ public class BaseStoreInfoVo implements Serializable { @ExcelProperty(value = "创建时间") private Date createdTime; + /** + * 创建人 + */ + @ExcelProperty(value = "创建人") + private Long createdBy; + + /** + * 更新人 + */ + @ExcelProperty(value = "更新人") + private Long updatedBy; + + /** + * 创建人名称 + */ + @ExcelProperty(value = "创建人名称") + private String createdByName; + + /** + * 更新人名称 + */ + @ExcelProperty(value = "更新人名称") + private String updatedByName; } diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceHostServiceImpl.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceHostServiceImpl.java index 22b65d4..17be166 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceHostServiceImpl.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceHostServiceImpl.java @@ -1,5 +1,7 @@ package org.dromara.wcs.service.impl; +import com.baomidou.dynamic.datasource.annotation.Slave; +import com.baomidou.dynamic.datasource.annotation.DSTransactional; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseDeviceHostMapper; import org.dromara.wcs.service.IBaseDeviceHostService; import java.util.List; -import java.util.Map; import java.util.Collection; /** @@ -26,6 +27,7 @@ import java.util.Collection; * @author zch * @date 2026-05-06 */ +@Slave @Slf4j @RequiredArgsConstructor @Service @@ -94,7 +96,7 @@ public class BaseDeviceHostServiceImpl implements IBaseDeviceHostService { */ @Override public Long queryCount(BaseDeviceHostBo bo) { - return baseMapper.countCustomBaseDeviceHost(buildQueryWrapper(bo, false)); + return baseMapper.countCustomBaseDeviceHost(buildQueryWrapper(bo)); } /** @@ -105,20 +107,11 @@ public class BaseDeviceHostServiceImpl implements IBaseDeviceHostService { */ @Override public Boolean queryExists(BaseDeviceHostBo bo) { - return baseMapper.countCustomBaseDeviceHost(buildQueryWrapper(bo, false)) > 0; + return baseMapper.countCustomBaseDeviceHost(buildQueryWrapper(bo)) > 0; } private QueryWrapper buildQueryWrapper(BaseDeviceHostBo bo) { - return buildQueryWrapper(bo, true); - } - - private QueryWrapper buildQueryWrapper(BaseDeviceHostBo bo, boolean appendDefaultOrder) { - Map params = bo.getParams(); QueryWrapper queryWrapper = Wrappers.query(); - if (appendDefaultOrder) { - // 默认把主表别名带上,后续就算扩展连表SQL,也尽量不因为同名字段导致排序歧义。 - queryWrapper.orderByAsc("t.obj_id"); - } queryWrapper.eq(StringUtils.isNotBlank(bo.getHostCode()), "t.host_code", bo.getHostCode()); queryWrapper.like(StringUtils.isNotBlank(bo.getHostName()), "t.host_name", bo.getHostName()); queryWrapper.eq(StringUtils.isNotBlank(bo.getHostIp()), "t.host_ip", bo.getHostIp()); @@ -136,6 +129,7 @@ public class BaseDeviceHostServiceImpl implements IBaseDeviceHostService { * @return 是否新增成功 */ @Override + @DSTransactional public Boolean insertByBo(BaseDeviceHostBo bo) { BaseDeviceHost add = MapstructUtils.convert(bo, BaseDeviceHost.class); validEntityBeforeSave(add); @@ -153,6 +147,7 @@ public class BaseDeviceHostServiceImpl implements IBaseDeviceHostService { * @return 是否修改成功 */ @Override + @DSTransactional public Boolean updateByBo(BaseDeviceHostBo bo) { BaseDeviceHost update = MapstructUtils.convert(bo, BaseDeviceHost.class); validEntityBeforeSave(update); @@ -174,6 +169,7 @@ public class BaseDeviceHostServiceImpl implements IBaseDeviceHostService { * @return 是否删除成功 */ @Override + @DSTransactional public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { if(isValid){ //TODO 做一些业务上的校验,判断是否需要校验 diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceInfoServiceImpl.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceInfoServiceImpl.java index e054108..39ee105 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceInfoServiceImpl.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceInfoServiceImpl.java @@ -1,5 +1,7 @@ package org.dromara.wcs.service.impl; +import com.baomidou.dynamic.datasource.annotation.Slave; +import com.baomidou.dynamic.datasource.annotation.DSTransactional; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseDeviceInfoMapper; import org.dromara.wcs.service.IBaseDeviceInfoService; import java.util.List; -import java.util.Map; import java.util.Collection; /** @@ -26,6 +27,7 @@ import java.util.Collection; * @author zch * @date 2026-05-06 */ +@Slave @Slf4j @RequiredArgsConstructor @Service @@ -94,7 +96,7 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService { */ @Override public Long queryCount(BaseDeviceInfoBo bo) { - return baseMapper.countCustomBaseDeviceInfo(buildQueryWrapper(bo, false)); + return baseMapper.countCustomBaseDeviceInfo(buildQueryWrapper(bo)); } /** @@ -105,20 +107,11 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService { */ @Override public Boolean queryExists(BaseDeviceInfoBo bo) { - return baseMapper.countCustomBaseDeviceInfo(buildQueryWrapper(bo, false)) > 0; + return baseMapper.countCustomBaseDeviceInfo(buildQueryWrapper(bo)) > 0; } private QueryWrapper buildQueryWrapper(BaseDeviceInfoBo bo) { - return buildQueryWrapper(bo, true); - } - - private QueryWrapper buildQueryWrapper(BaseDeviceInfoBo bo, boolean appendDefaultOrder) { - Map params = bo.getParams(); QueryWrapper queryWrapper = Wrappers.query(); - if (appendDefaultOrder) { - // 默认把主表别名带上,后续就算扩展连表SQL,也尽量不因为同名字段导致排序歧义。 - queryWrapper.orderByAsc("t.obj_id"); - } queryWrapper.eq(StringUtils.isNotBlank(bo.getDeviceCode()), "t.device_code", bo.getDeviceCode()); queryWrapper.like(StringUtils.isNotBlank(bo.getDeviceName()), "t.device_name", bo.getDeviceName()); queryWrapper.eq(StringUtils.isNotBlank(bo.getHostCode()), "t.host_code", bo.getHostCode()); @@ -136,6 +129,7 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService { * @return 是否新增成功 */ @Override + @DSTransactional public Boolean insertByBo(BaseDeviceInfoBo bo) { BaseDeviceInfo add = MapstructUtils.convert(bo, BaseDeviceInfo.class); validEntityBeforeSave(add); @@ -153,6 +147,7 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService { * @return 是否修改成功 */ @Override + @DSTransactional public Boolean updateByBo(BaseDeviceInfoBo bo) { BaseDeviceInfo update = MapstructUtils.convert(bo, BaseDeviceInfo.class); validEntityBeforeSave(update); @@ -174,6 +169,7 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService { * @return 是否删除成功 */ @Override + @DSTransactional public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { if(isValid){ //TODO 做一些业务上的校验,判断是否需要校验 diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceParamServiceImpl.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceParamServiceImpl.java index 9402b09..ce28a7d 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceParamServiceImpl.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseDeviceParamServiceImpl.java @@ -1,5 +1,7 @@ package org.dromara.wcs.service.impl; +import com.baomidou.dynamic.datasource.annotation.Slave; +import com.baomidou.dynamic.datasource.annotation.DSTransactional; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseDeviceParamMapper; import org.dromara.wcs.service.IBaseDeviceParamService; import java.util.List; -import java.util.Map; import java.util.Collection; /** @@ -26,6 +27,7 @@ import java.util.Collection; * @author zch * @date 2026-05-06 */ +@Slave @Slf4j @RequiredArgsConstructor @Service @@ -94,7 +96,7 @@ public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService { */ @Override public Long queryCount(BaseDeviceParamBo bo) { - return baseMapper.countCustomBaseDeviceParam(buildQueryWrapper(bo, false)); + return baseMapper.countCustomBaseDeviceParam(buildQueryWrapper(bo)); } /** @@ -105,20 +107,11 @@ public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService { */ @Override public Boolean queryExists(BaseDeviceParamBo bo) { - return baseMapper.countCustomBaseDeviceParam(buildQueryWrapper(bo, false)) > 0; + return baseMapper.countCustomBaseDeviceParam(buildQueryWrapper(bo)) > 0; } private QueryWrapper buildQueryWrapper(BaseDeviceParamBo bo) { - return buildQueryWrapper(bo, true); - } - - private QueryWrapper buildQueryWrapper(BaseDeviceParamBo bo, boolean appendDefaultOrder) { - Map params = bo.getParams(); QueryWrapper queryWrapper = Wrappers.query(); - if (appendDefaultOrder) { - // 默认把主表别名带上,后续就算扩展连表SQL,也尽量不因为同名字段导致排序歧义。 - queryWrapper.orderByAsc("t.obj_id"); - } queryWrapper.eq(StringUtils.isNotBlank(bo.getParamCode()), "t.param_code", bo.getParamCode()); queryWrapper.eq(StringUtils.isNotBlank(bo.getDeviceCode()), "t.device_code", bo.getDeviceCode()); queryWrapper.like(StringUtils.isNotBlank(bo.getParamName()), "t.param_name", bo.getParamName()); @@ -138,6 +131,7 @@ public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService { * @return 是否新增成功 */ @Override + @DSTransactional public Boolean insertByBo(BaseDeviceParamBo bo) { BaseDeviceParam add = MapstructUtils.convert(bo, BaseDeviceParam.class); validEntityBeforeSave(add); @@ -155,6 +149,7 @@ public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService { * @return 是否修改成功 */ @Override + @DSTransactional public Boolean updateByBo(BaseDeviceParamBo bo) { BaseDeviceParam update = MapstructUtils.convert(bo, BaseDeviceParam.class); validEntityBeforeSave(update); @@ -176,6 +171,7 @@ public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService { * @return 是否删除成功 */ @Override + @DSTransactional public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { if(isValid){ //TODO 做一些业务上的校验,判断是否需要校验 diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseLocationInfoServiceImpl.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseLocationInfoServiceImpl.java index 8914c0e..c2a0728 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseLocationInfoServiceImpl.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseLocationInfoServiceImpl.java @@ -1,5 +1,7 @@ package org.dromara.wcs.service.impl; +import com.baomidou.dynamic.datasource.annotation.Slave; +import com.baomidou.dynamic.datasource.annotation.DSTransactional; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseLocationInfoMapper; import org.dromara.wcs.service.IBaseLocationInfoService; import java.util.List; -import java.util.Map; import java.util.Collection; /** @@ -26,6 +27,7 @@ import java.util.Collection; * @author zch * @date 2026-05-06 */ +@Slave @Slf4j @RequiredArgsConstructor @Service @@ -94,7 +96,7 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService { */ @Override public Long queryCount(BaseLocationInfoBo bo) { - return baseMapper.countCustomBaseLocationInfo(buildQueryWrapper(bo, false)); + return baseMapper.countCustomBaseLocationInfo(buildQueryWrapper(bo)); } /** @@ -105,20 +107,11 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService { */ @Override public Boolean queryExists(BaseLocationInfoBo bo) { - return baseMapper.countCustomBaseLocationInfo(buildQueryWrapper(bo, false)) > 0; + return baseMapper.countCustomBaseLocationInfo(buildQueryWrapper(bo)) > 0; } private QueryWrapper buildQueryWrapper(BaseLocationInfoBo bo) { - return buildQueryWrapper(bo, true); - } - - private QueryWrapper buildQueryWrapper(BaseLocationInfoBo bo, boolean appendDefaultOrder) { - Map params = bo.getParams(); QueryWrapper queryWrapper = Wrappers.query(); - if (appendDefaultOrder) { - // 默认把主表别名带上,后续就算扩展连表SQL,也尽量不因为同名字段导致排序歧义。 - queryWrapper.orderByAsc("t.obj_id"); - } queryWrapper.eq(StringUtils.isNotBlank(bo.getLocationCode()), "t.location_code", bo.getLocationCode()); queryWrapper.like(StringUtils.isNotBlank(bo.getLocationName()), "t.location_name", bo.getLocationName()); queryWrapper.eq(StringUtils.isNotBlank(bo.getLocationArea()), "t.location_area", bo.getLocationArea()); @@ -143,6 +136,7 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService { * @return 是否新增成功 */ @Override + @DSTransactional public Boolean insertByBo(BaseLocationInfoBo bo) { BaseLocationInfo add = MapstructUtils.convert(bo, BaseLocationInfo.class); validEntityBeforeSave(add); @@ -160,6 +154,7 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService { * @return 是否修改成功 */ @Override + @DSTransactional public Boolean updateByBo(BaseLocationInfoBo bo) { BaseLocationInfo update = MapstructUtils.convert(bo, BaseLocationInfo.class); validEntityBeforeSave(update); @@ -181,6 +176,7 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService { * @return 是否删除成功 */ @Override + @DSTransactional public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { if(isValid){ //TODO 做一些业务上的校验,判断是否需要校验 diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseMaterialInfoServiceImpl.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseMaterialInfoServiceImpl.java index 05cd69b..2cdac69 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseMaterialInfoServiceImpl.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseMaterialInfoServiceImpl.java @@ -1,5 +1,7 @@ package org.dromara.wcs.service.impl; +import com.baomidou.dynamic.datasource.annotation.Slave; +import com.baomidou.dynamic.datasource.annotation.DSTransactional; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseMaterialInfoMapper; import org.dromara.wcs.service.IBaseMaterialInfoService; import java.util.List; -import java.util.Map; import java.util.Collection; /** @@ -26,6 +27,7 @@ import java.util.Collection; * @author zch * @date 2026-05-06 */ +@Slave @Slf4j @RequiredArgsConstructor @Service @@ -94,7 +96,7 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService { */ @Override public Long queryCount(BaseMaterialInfoBo bo) { - return baseMapper.countCustomBaseMaterialInfo(buildQueryWrapper(bo, false)); + return baseMapper.countCustomBaseMaterialInfo(buildQueryWrapper(bo)); } /** @@ -105,20 +107,11 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService { */ @Override public Boolean queryExists(BaseMaterialInfoBo bo) { - return baseMapper.countCustomBaseMaterialInfo(buildQueryWrapper(bo, false)) > 0; + return baseMapper.countCustomBaseMaterialInfo(buildQueryWrapper(bo)) > 0; } private QueryWrapper buildQueryWrapper(BaseMaterialInfoBo bo) { - return buildQueryWrapper(bo, true); - } - - private QueryWrapper buildQueryWrapper(BaseMaterialInfoBo bo, boolean appendDefaultOrder) { - Map params = bo.getParams(); QueryWrapper queryWrapper = Wrappers.query(); - if (appendDefaultOrder) { - // 默认把主表别名带上,后续就算扩展连表SQL,也尽量不因为同名字段导致排序歧义。 - queryWrapper.orderByAsc("t.obj_id"); - } queryWrapper.eq(StringUtils.isNotBlank(bo.getMaterialCode()), "t.material_code", bo.getMaterialCode()); queryWrapper.like(StringUtils.isNotBlank(bo.getMaterialName()), "t.material_name", bo.getMaterialName()); queryWrapper.eq(StringUtils.isNotBlank(bo.getMaterialType()), "t.material_type", bo.getMaterialType()); @@ -137,6 +130,7 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService { * @return 是否新增成功 */ @Override + @DSTransactional public Boolean insertByBo(BaseMaterialInfoBo bo) { BaseMaterialInfo add = MapstructUtils.convert(bo, BaseMaterialInfo.class); validEntityBeforeSave(add); @@ -154,6 +148,7 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService { * @return 是否修改成功 */ @Override + @DSTransactional public Boolean updateByBo(BaseMaterialInfoBo bo) { BaseMaterialInfo update = MapstructUtils.convert(bo, BaseMaterialInfo.class); validEntityBeforeSave(update); @@ -175,6 +170,7 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService { * @return 是否删除成功 */ @Override + @DSTransactional public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { if(isValid){ //TODO 做一些业务上的校验,判断是否需要校验 diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BasePathDetailsServiceImpl.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BasePathDetailsServiceImpl.java index f249595..b0d621f 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BasePathDetailsServiceImpl.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BasePathDetailsServiceImpl.java @@ -1,5 +1,7 @@ package org.dromara.wcs.service.impl; +import com.baomidou.dynamic.datasource.annotation.Slave; +import com.baomidou.dynamic.datasource.annotation.DSTransactional; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BasePathDetailsMapper; import org.dromara.wcs.service.IBasePathDetailsService; import java.util.List; -import java.util.Map; import java.util.Collection; /** @@ -26,6 +27,7 @@ import java.util.Collection; * @author zch * @date 2026-05-06 */ +@Slave @Slf4j @RequiredArgsConstructor @Service @@ -94,7 +96,7 @@ public class BasePathDetailsServiceImpl implements IBasePathDetailsService { */ @Override public Long queryCount(BasePathDetailsBo bo) { - return baseMapper.countCustomBasePathDetails(buildQueryWrapper(bo, false)); + return baseMapper.countCustomBasePathDetails(buildQueryWrapper(bo)); } /** @@ -105,20 +107,11 @@ public class BasePathDetailsServiceImpl implements IBasePathDetailsService { */ @Override public Boolean queryExists(BasePathDetailsBo bo) { - return baseMapper.countCustomBasePathDetails(buildQueryWrapper(bo, false)) > 0; + return baseMapper.countCustomBasePathDetails(buildQueryWrapper(bo)) > 0; } private QueryWrapper buildQueryWrapper(BasePathDetailsBo bo) { - return buildQueryWrapper(bo, true); - } - - private QueryWrapper buildQueryWrapper(BasePathDetailsBo bo, boolean appendDefaultOrder) { - Map params = bo.getParams(); QueryWrapper queryWrapper = Wrappers.query(); - if (appendDefaultOrder) { - // 默认把主表别名带上,后续就算扩展连表SQL,也尽量不因为同名字段导致排序歧义。 - queryWrapper.orderByAsc("t.obj_id"); - } queryWrapper.eq(StringUtils.isNotBlank(bo.getPathCode()), "t.path_code", bo.getPathCode()); queryWrapper.eq(StringUtils.isNotBlank(bo.getStartPoint()), "t.start_point", bo.getStartPoint()); queryWrapper.eq(StringUtils.isNotBlank(bo.getEndPoint()), "t.end_point", bo.getEndPoint()); @@ -134,6 +127,7 @@ public class BasePathDetailsServiceImpl implements IBasePathDetailsService { * @return 是否新增成功 */ @Override + @DSTransactional public Boolean insertByBo(BasePathDetailsBo bo) { BasePathDetails add = MapstructUtils.convert(bo, BasePathDetails.class); validEntityBeforeSave(add); @@ -151,6 +145,7 @@ public class BasePathDetailsServiceImpl implements IBasePathDetailsService { * @return 是否修改成功 */ @Override + @DSTransactional public Boolean updateByBo(BasePathDetailsBo bo) { BasePathDetails update = MapstructUtils.convert(bo, BasePathDetails.class); validEntityBeforeSave(update); @@ -172,6 +167,7 @@ public class BasePathDetailsServiceImpl implements IBasePathDetailsService { * @return 是否删除成功 */ @Override + @DSTransactional public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { if(isValid){ //TODO 做一些业务上的校验,判断是否需要校验 diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BasePathInfoServiceImpl.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BasePathInfoServiceImpl.java index 6997f49..900a3e6 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BasePathInfoServiceImpl.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BasePathInfoServiceImpl.java @@ -1,5 +1,7 @@ package org.dromara.wcs.service.impl; +import com.baomidou.dynamic.datasource.annotation.Slave; +import com.baomidou.dynamic.datasource.annotation.DSTransactional; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BasePathInfoMapper; import org.dromara.wcs.service.IBasePathInfoService; import java.util.List; -import java.util.Map; import java.util.Collection; /** @@ -26,6 +27,7 @@ import java.util.Collection; * @author zch * @date 2026-05-06 */ +@Slave @Slf4j @RequiredArgsConstructor @Service @@ -94,7 +96,7 @@ public class BasePathInfoServiceImpl implements IBasePathInfoService { */ @Override public Long queryCount(BasePathInfoBo bo) { - return baseMapper.countCustomBasePathInfo(buildQueryWrapper(bo, false)); + return baseMapper.countCustomBasePathInfo(buildQueryWrapper(bo)); } /** @@ -105,20 +107,11 @@ public class BasePathInfoServiceImpl implements IBasePathInfoService { */ @Override public Boolean queryExists(BasePathInfoBo bo) { - return baseMapper.countCustomBasePathInfo(buildQueryWrapper(bo, false)) > 0; + return baseMapper.countCustomBasePathInfo(buildQueryWrapper(bo)) > 0; } private QueryWrapper buildQueryWrapper(BasePathInfoBo bo) { - return buildQueryWrapper(bo, true); - } - - private QueryWrapper buildQueryWrapper(BasePathInfoBo bo, boolean appendDefaultOrder) { - Map params = bo.getParams(); QueryWrapper queryWrapper = Wrappers.query(); - if (appendDefaultOrder) { - // 默认把主表别名带上,后续就算扩展连表SQL,也尽量不因为同名字段导致排序歧义。 - queryWrapper.orderByAsc("t.obj_id"); - } queryWrapper.eq(StringUtils.isNotBlank(bo.getPathCode()), "t.path_code", bo.getPathCode()); queryWrapper.like(StringUtils.isNotBlank(bo.getPathName()), "t.path_name", bo.getPathName()); queryWrapper.eq(bo.getIsFlag() != null, "t.is_flag", bo.getIsFlag()); @@ -133,6 +126,7 @@ public class BasePathInfoServiceImpl implements IBasePathInfoService { * @return 是否新增成功 */ @Override + @DSTransactional public Boolean insertByBo(BasePathInfoBo bo) { BasePathInfo add = MapstructUtils.convert(bo, BasePathInfo.class); validEntityBeforeSave(add); @@ -150,6 +144,7 @@ public class BasePathInfoServiceImpl implements IBasePathInfoService { * @return 是否修改成功 */ @Override + @DSTransactional public Boolean updateByBo(BasePathInfoBo bo) { BasePathInfo update = MapstructUtils.convert(bo, BasePathInfo.class); validEntityBeforeSave(update); @@ -171,6 +166,7 @@ public class BasePathInfoServiceImpl implements IBasePathInfoService { * @return 是否删除成功 */ @Override + @DSTransactional public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { if(isValid){ //TODO 做一些业务上的校验,判断是否需要校验 diff --git a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseStoreInfoServiceImpl.java b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseStoreInfoServiceImpl.java index 65757d9..4af4f3a 100644 --- a/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseStoreInfoServiceImpl.java +++ b/ruoyi-modules/hw-wcs/src/main/java/org/dromara/wcs/service/impl/BaseStoreInfoServiceImpl.java @@ -1,5 +1,7 @@ package org.dromara.wcs.service.impl; +import com.baomidou.dynamic.datasource.annotation.Slave; +import com.baomidou.dynamic.datasource.annotation.DSTransactional; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseStoreInfoMapper; import org.dromara.wcs.service.IBaseStoreInfoService; import java.util.List; -import java.util.Map; import java.util.Collection; /** @@ -26,6 +27,7 @@ import java.util.Collection; * @author zch * @date 2026-05-06 */ +@Slave @Slf4j @RequiredArgsConstructor @Service @@ -94,7 +96,7 @@ public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService { */ @Override public Long queryCount(BaseStoreInfoBo bo) { - return baseMapper.countCustomBaseStoreInfo(buildQueryWrapper(bo, false)); + return baseMapper.countCustomBaseStoreInfo(buildQueryWrapper(bo)); } /** @@ -105,20 +107,11 @@ public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService { */ @Override public Boolean queryExists(BaseStoreInfoBo bo) { - return baseMapper.countCustomBaseStoreInfo(buildQueryWrapper(bo, false)) > 0; + return baseMapper.countCustomBaseStoreInfo(buildQueryWrapper(bo)) > 0; } private QueryWrapper buildQueryWrapper(BaseStoreInfoBo bo) { - return buildQueryWrapper(bo, true); - } - - private QueryWrapper buildQueryWrapper(BaseStoreInfoBo bo, boolean appendDefaultOrder) { - Map params = bo.getParams(); QueryWrapper queryWrapper = Wrappers.query(); - if (appendDefaultOrder) { - // 默认把主表别名带上,后续就算扩展连表SQL,也尽量不因为同名字段导致排序歧义。 - queryWrapper.orderByAsc("t.obj_id"); - } queryWrapper.eq(StringUtils.isNotBlank(bo.getStoreCode()), "t.store_code", bo.getStoreCode()); queryWrapper.like(StringUtils.isNotBlank(bo.getStoreName()), "t.store_name", bo.getStoreName()); queryWrapper.eq(bo.getIsFlag() != null, "t.is_flag", bo.getIsFlag()); @@ -133,6 +126,7 @@ public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService { * @return 是否新增成功 */ @Override + @DSTransactional public Boolean insertByBo(BaseStoreInfoBo bo) { BaseStoreInfo add = MapstructUtils.convert(bo, BaseStoreInfo.class); validEntityBeforeSave(add); @@ -150,6 +144,7 @@ public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService { * @return 是否修改成功 */ @Override + @DSTransactional public Boolean updateByBo(BaseStoreInfoBo bo) { BaseStoreInfo update = MapstructUtils.convert(bo, BaseStoreInfo.class); validEntityBeforeSave(update); @@ -171,6 +166,7 @@ public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService { * @return 是否删除成功 */ @Override + @DSTransactional public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { if(isValid){ //TODO 做一些业务上的校验,判断是否需要校验 diff --git a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceHostMapper.xml b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceHostMapper.xml index 50fec73..6411c47 100644 --- a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceHostMapper.xml +++ b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceHostMapper.xml @@ -14,9 +14,13 @@ + + + + - + select t.obj_id, t.host_code, @@ -30,52 +34,42 @@ t.created_time, t.create_dept, t.updated_by, - t.updated_time + t.updated_time, + cu.user_name as created_by_name, + uu.user_name as updated_by_name from base_device_host t + left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id + left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id - - - - - - - ${ew.sqlSegment} - - - - - ${ew.sqlSegment} - - + - + - - - - - select count(1) from base_device_host t - + + + ${ew.sqlSegment} + + diff --git a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceInfoMapper.xml b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceInfoMapper.xml index ca85399..e406ff7 100644 --- a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceInfoMapper.xml +++ b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceInfoMapper.xml @@ -1,7 +1,5 @@ - + @@ -9,82 +7,67 @@ + + + + + - + select - t.obj_id, - t.device_code, - t.device_name, - t.host_code, - t.device_type, - t.device_status, - t.is_flag, - t.remark, - t.created_by, - t.created_time, - t.create_dept, - t.updated_by, - t.updated_time + t.obj_id, t.device_code, t.device_name, t.host_code, + h.host_name, + t.device_type, t.device_status, t.is_flag, t.remark, + t.created_by, t.created_time, t.create_dept, + t.updated_by, t.updated_time, + cu.user_name as created_by_name, + uu.user_name as updated_by_name from base_device_info t + left join base_device_host h on t.host_code = h.host_code + left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id + left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id - - - - - - - ${ew.sqlSegment} - - - - - ${ew.sqlSegment} - - + + - - + order by t.obj_id desc - - - - - diff --git a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceParamMapper.xml b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceParamMapper.xml index 88eb9bf..240204a 100644 --- a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceParamMapper.xml +++ b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseDeviceParamMapper.xml @@ -1,13 +1,11 @@ - + - + @@ -16,79 +14,56 @@ + + + + - - - select - t.obj_id, - t.param_code, - t.device_code, - t.param_name, - t.param_address, - t.param_type, - t.operation_type, - t.operation_frequency, - t.is_flag, - t.remark, - t.created_by, - t.created_time, - t.create_dept, - t.updated_by, - t.updated_time + + select t.obj_id, t.param_code, t.device_code, d.device_name, + t.param_name, t.param_address, t.param_type, + t.operation_type, t.operation_frequency, t.is_flag, t.remark, + t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time, + cu.user_name as created_by_name, uu.user_name as updated_by_name from base_device_param t + left join base_device_info d on t.device_code = d.device_code + left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id + left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id - - - - - - - - ${ew.sqlSegment} - - - - - ${ew.sqlSegment} - - + + - - + order by t.obj_id desc - - - - - diff --git a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseLocationInfoMapper.xml b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseLocationInfoMapper.xml index ccba2cf..62e9793 100644 --- a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseLocationInfoMapper.xml +++ b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseLocationInfoMapper.xml @@ -1,104 +1,77 @@ - + - + + + + + + - - - select - t.obj_id, - t.location_code, - t.location_name, - t.location_area, - t.store_code, - t.location_rows, - t.location_columns, - t.location_layers, - t.agv_position, - t.material_code, - t.pallet_barcode, - t.stack_count, - t.location_status, - t.is_flag, - t.remark, - t.created_by, - t.created_time, - t.create_dept, - t.updated_by, - t.updated_time + + select t.obj_id, t.location_code, t.location_name, t.location_area, t.store_code, + s.store_name, t.location_rows, t.location_columns, t.location_layers, + t.agv_position, t.material_code, m.material_name, + t.pallet_barcode, t.stack_count, t.location_status, t.is_flag, t.remark, + t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time, + cu.user_name as created_by_name, uu.user_name as updated_by_name from base_location_info t + left join base_store_info s on t.store_code = s.store_code + left join base_material_info m on t.material_code = m.material_code + left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id + left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id - - - - - - - - ${ew.sqlSegment} - - - - - ${ew.sqlSegment} - - + + - - + order by t.obj_id desc - - - - - diff --git a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseMaterialInfoMapper.xml b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseMaterialInfoMapper.xml index f15b41d..790f4d1 100644 --- a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseMaterialInfoMapper.xml +++ b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseMaterialInfoMapper.xml @@ -1,9 +1,6 @@ - + - @@ -15,78 +12,54 @@ + + + + - - - select - t.obj_id, - t.material_code, - t.material_name, - t.material_type, - t.material_barcode, - t.min_storage_cycle, - t.max_storage_cycle, - t.is_flag, - t.remark, - t.created_by, - t.created_time, - t.create_dept, - t.updated_by, - t.updated_time + + select t.obj_id, t.material_code, t.material_name, t.material_type, t.material_barcode, + t.min_storage_cycle, t.max_storage_cycle, t.is_flag, t.remark, + t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time, + cu.user_name as created_by_name, uu.user_name as updated_by_name from base_material_info t + left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id + left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id - - - - - - - - ${ew.sqlSegment} - - - - - ${ew.sqlSegment} - - + + - - + order by t.obj_id desc - - - - - diff --git a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BasePathDetailsMapper.xml b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BasePathDetailsMapper.xml index f77aa79..f13fc31 100644 --- a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BasePathDetailsMapper.xml +++ b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BasePathDetailsMapper.xml @@ -1,9 +1,6 @@ - + - @@ -12,75 +9,53 @@ + + + + - - - select - t.obj_id, - t.path_code, - t.start_point, - t.end_point, - t.is_flag, - t.remark, - t.created_by, - t.created_time, - t.create_dept, - t.updated_by, - t.updated_time + + select t.obj_id, t.path_code, t.start_point, t.end_point, t.is_flag, t.remark, + t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time, + cu.user_name as created_by_name, uu.user_name as updated_by_name from base_path_details t + left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id + left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id - - - - - - - - ${ew.sqlSegment} - - - - - ${ew.sqlSegment} - - + + - - + order by t.obj_id desc - - - - - diff --git a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BasePathInfoMapper.xml b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BasePathInfoMapper.xml index 52eb533..b0a018c 100644 --- a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BasePathInfoMapper.xml +++ b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BasePathInfoMapper.xml @@ -1,9 +1,6 @@ - + - @@ -11,74 +8,61 @@ + + + + + - - select - t.obj_id, - t.path_code, - t.path_name, - t.is_flag, - t.remark, - t.created_by, - t.created_time, - t.create_dept, - t.updated_by, - t.updated_time + + + + select t.obj_id, t.path_code, t.path_name, t.is_flag, t.remark, + t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time, + cu.user_name as created_by_name, uu.user_name as updated_by_name from base_path_info t + left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id + left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id - - - - - - - - ${ew.sqlSegment} - - - - - ${ew.sqlSegment} - - + + - - + order by t.obj_id desc - - - - - diff --git a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseStoreInfoMapper.xml b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseStoreInfoMapper.xml index 1dc5e3b..bd7ee33 100644 --- a/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseStoreInfoMapper.xml +++ b/ruoyi-modules/hw-wcs/src/main/resources/mapper/wcs/BaseStoreInfoMapper.xml @@ -1,9 +1,6 @@ - + - @@ -11,74 +8,53 @@ + + + + - - - select - t.obj_id, - t.store_code, - t.store_name, - t.is_flag, - t.remark, - t.created_by, - t.created_time, - t.create_dept, - t.updated_by, - t.updated_time + + select t.obj_id, t.store_code, t.store_name, t.is_flag, t.remark, + t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time, + cu.user_name as created_by_name, uu.user_name as updated_by_name from base_store_info t + left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id + left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id - - - - - - - - ${ew.sqlSegment} - - - - - ${ew.sqlSegment} - - + + - - + order by t.obj_id desc - - - - -