diff --git a/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/dal/mysql/mold/MoldMapper.java b/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/dal/mysql/mold/MoldMapper.java index 0399cbb27..10a2335a4 100644 --- a/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/dal/mysql/mold/MoldMapper.java +++ b/yudao-module-common/yudao-module-common-biz/src/main/java/cn/iocoder/yudao/module/common/dal/mysql/mold/MoldMapper.java @@ -37,7 +37,7 @@ public interface MoldMapper extends BaseMapperX { .eqIfPresent(MoldDO::getIsEnable, reqVO.getIsEnable()) .betweenIfPresent(MoldDO::getCreateTime, reqVO.getCreateTime()) .eqIfPresent(MoldDO::getBrandId, reqVO.getBrandId()) - .likeIfPresent(MoldDO::getFileUrl, reqVO.getFileUrl()) + .eqIfPresent(MoldDO::getStatus, reqVO.getStatus()) .orderByDesc(MoldDO::getId); if (StringUtils.isNotBlank(reqVO.getIds())) { diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/vo/in/ErpStockInSaveReqVO.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/vo/in/ErpStockInSaveReqVO.java index 94746e10b..a7bfeb0e1 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/vo/in/ErpStockInSaveReqVO.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/stock/vo/in/ErpStockInSaveReqVO.java @@ -39,6 +39,11 @@ public class ErpStockInSaveReqVO { @Valid private List items; + + @Schema(description = "仓库编号", example = "3113") + private Long warehouseId; + + @Data public static class Item { diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/stock/ErpStockInServiceImpl.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/stock/ErpStockInServiceImpl.java index 60a5e9663..36fb28975 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/stock/ErpStockInServiceImpl.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/stock/ErpStockInServiceImpl.java @@ -4,9 +4,9 @@ import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.MoneyUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.common.controller.admin.mold.vo.MoldSaveReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in.ErpStockInSaveReqVO; -import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out.ErpStockOutSaveReqVO; import cn.iocoder.yudao.module.common.dal.dataobject.mold.MoldDO; import cn.iocoder.yudao.module.erp.dal.dataobject.product.ErpProductDO; import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockInDO; @@ -83,6 +83,11 @@ public class ErpStockInServiceImpl implements ErpStockInService { // 2.2 插入入库单项 stockInItems.forEach(o -> o.setInId(stockIn.getId())); stockInItemMapper.insertBatch(stockInItems); + for (ErpStockInItemDO item : stockInItems) { + MoldDO moldDO = moldService.getMold(item.getProductId()); + moldDO.setStatus(ErpAuditStatus.PROCESS.getStatus()); // 未审核 + moldService.updateMold(BeanUtils.toBean(moldDO, MoldSaveReqVO.class)); + } return stockIn.getId(); } @@ -144,6 +149,17 @@ public class ErpStockInServiceImpl implements ErpStockInService { bizType, stockInItem.getInId(), stockInItem.getId(), stockIn.getNo(), stockIn.getInTime())); } }); + // 更改状态 + if (Objects.equals(stockIn.getInType(), "模具入库")) { + for (ErpStockInItemDO item : stockInItems) { + if (item.getProductId() != null) { + MoldDO moldDO = moldService.getMold(item.getProductId()); + moldDO.setStatus(1); // 在库 + moldService.updateMold(BeanUtils.toBean(moldDO, MoldSaveReqVO.class)); + } + + } + } } private List validateStockInItems(List list,String outType) { diff --git a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/stock/ErpStockOutServiceImpl.java b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/stock/ErpStockOutServiceImpl.java index d053aac85..4b5daa402 100644 --- a/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/stock/ErpStockOutServiceImpl.java +++ b/yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/service/stock/ErpStockOutServiceImpl.java @@ -4,10 +4,12 @@ import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.number.MoneyUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.common.controller.admin.mold.vo.MoldSaveReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out.ErpStockOutPageReqVO; import cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out.ErpStockOutSaveReqVO; import cn.iocoder.yudao.module.common.dal.dataobject.mold.MoldDO; import cn.iocoder.yudao.module.erp.dal.dataobject.product.ErpProductDO; +import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockInItemDO; import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockOutDO; import cn.iocoder.yudao.module.erp.dal.dataobject.stock.ErpStockOutItemDO; import cn.iocoder.yudao.module.erp.dal.mysql.stock.ErpStockOutItemMapper; @@ -87,6 +89,11 @@ public class ErpStockOutServiceImpl implements ErpStockOutService { // 2.2 插入出库单项 stockOutItems.forEach(o -> o.setOutId(stockOut.getId())); stockOutItemMapper.insertBatch(stockOutItems); + for (ErpStockOutItemDO item : stockOutItems) { + MoldDO moldDO = moldService.getMold(item.getProductId()); + moldDO.setStatus(ErpAuditStatus.PROCESS.getStatus()); // 未审核 + moldService.updateMold(BeanUtils.toBean(moldDO, MoldSaveReqVO.class)); + } return stockOut.getId(); } @@ -149,7 +156,17 @@ public class ErpStockOutServiceImpl implements ErpStockOutService { bizType, stockOutItem.getOutId(), stockOutItem.getId(), stockOut.getNo(),stockOut.getOutTime())); } - }); + }); + // 更改状态 + if (Objects.equals(stockOut.getOutType(), "模具出库")) { + for (ErpStockOutItemDO item : stockOutItems) { + if (item.getProductId() != null) { + MoldDO moldDO = moldService.getMold(item.getProductId()); + moldDO.setStatus(3); // 在途 + moldService.updateMold(BeanUtils.toBean(moldDO, MoldSaveReqVO.class)); + } + } + } } private List validateStockOutItems(List list,String outType) { diff --git a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/organization/vo/OrganizationRespVO.java b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/organization/vo/OrganizationRespVO.java index a5d415d69..e6a1fa5cb 100644 --- a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/organization/vo/OrganizationRespVO.java +++ b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/organization/vo/OrganizationRespVO.java @@ -79,4 +79,11 @@ import java.time.LocalDateTime; @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED) private String deviceName; + @Schema(description = "关联采集设备id") + private Long dvId; + + @Schema(description = "关联采集设备") + @ExcelProperty("关联采集设备") + private Long dvName; + } \ No newline at end of file diff --git a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/organization/vo/OrganizationSaveReqVO.java b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/organization/vo/OrganizationSaveReqVO.java index 6d0b3404e..2bd27bd99 100644 --- a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/organization/vo/OrganizationSaveReqVO.java +++ b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/organization/vo/OrganizationSaveReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.mes.controller.admin.organization.vo; +import com.alibaba.excel.annotation.ExcelProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -50,4 +51,10 @@ public class OrganizationSaveReqVO { @Schema(description = "组织类型") private String orgType; + @Schema(description = "关联采集设备id") + private Long dvId; + + @Schema(description = "关联采集设备") + private Long dvName; + } \ No newline at end of file diff --git a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/organization/OrganizationDO.java b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/organization/OrganizationDO.java index 87219f005..5ef06281f 100644 --- a/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/organization/OrganizationDO.java +++ b/yudao-module-mes/yudao-module-mes-biz/src/main/java/cn/iocoder/yudao/module/mes/dal/dataobject/organization/OrganizationDO.java @@ -88,4 +88,9 @@ public class OrganizationDO extends BaseDO { */ private String deviceName; + /** + * 关联采集设备id + */ + private Long dvId; + } \ No newline at end of file diff --git a/yudao-server/src/main/resources/application-dev.yaml b/yudao-server/src/main/resources/application-dev.yaml index 9cbb68f46..16718eb41 100644 --- a/yudao-server/src/main/resources/application-dev.yaml +++ b/yudao-server/src/main/resources/application-dev.yaml @@ -77,11 +77,11 @@ spring: # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: - host: ngsk.tech # 地址 - port: 26379 # 端口 + host: 47.106.185.127 # 地址 + port: 6379 # 端口 database: 0 # 数据库索引 #password: bkcaydy8ydhZZnS2 # 密码,建议生产环境开启 - password: ngsk0809 + password: BstPwd258 --- #################### 定时任务相关配置 ####################