diff --git a/wms-admin/src/main/java/com/ruoyi/web/controller/business/TOngoodsshelfController.java b/wms-admin/src/main/java/com/ruoyi/web/controller/business/TOngoodsshelfController.java index e249b71..36e88d3 100644 --- a/wms-admin/src/main/java/com/ruoyi/web/controller/business/TOngoodsshelfController.java +++ b/wms-admin/src/main/java/com/ruoyi/web/controller/business/TOngoodsshelfController.java @@ -81,6 +81,9 @@ public class TOngoodsshelfController extends BaseController @Autowired private ITBaseProviderService tBaseProviderService; + @Autowired + private ITemperService temperService; + @RequiresPermissions("business:ongoodsshelf:view") @GetMapping() public String ongoodsshelf(ModelMap mmap) @@ -226,6 +229,19 @@ public class TOngoodsshelfController extends BaseController logger.error("没有正在入库的供应商,请开启后重试。"); return error("没有正在入库的供应商,请开启后重试。"); } + // 获取温度 + List temperList = temperService.list(new LambdaQueryWrapper() + .eq(Temper::getRkId, "1")); + if (temperList == null || temperList.isEmpty()) { + logger.error("获取温度错误。"); + return error("获取温度错误。"); + } else { + Temper currentTemper = temperList.get(0); + if (currentTemper.getRkDegree().compareTo(currentTemper.getMaxDegree()) >= 0) { + logger.error("入库温度过高。"); + return error("入库温度过高。"); + } + } // 入库id String lotId = OrderCodeFactory.getOrderCode("RK", ""); // 创建日期 @@ -238,8 +254,13 @@ public class TOngoodsshelfController extends BaseController } else { sysUser.setUserName(tOngoodsshelves.get(0).getUserName()); } + boolean providerValidation = true; for (TOngoodsshelf s: tOngoodsshelves) { + if (!Objects.equals(s.getProviderId(), currentInProvider.getProviderId())) { + providerValidation = false; + break; + } s.setAgvsts("0"); s.setTasktype("0"); s.setLotId(lotId); @@ -250,7 +271,10 @@ public class TOngoodsshelfController extends BaseController // 设置子库ID s.setWhseloc("121-108"); } - + if (!providerValidation) { + logger.error("不在入库状态的供应商不允许入库。"); + return error("不在入库状态的供应商不允许入库。"); + } // 开始对接ebs String ebsCongfirmResult = ebsConfirm(tOngoodsshelves); if (StringUtils.isNotEmpty(ebsCongfirmResult)) { @@ -365,6 +389,7 @@ public class TOngoodsshelfController extends BaseController TEbsOrder queryOrder = new TEbsOrder(); queryOrder.setPhaSegment1(poOrder);// 订单号 queryOrder.setItemId(itemId); +// queryOrder.setVendorId(tOngoodsshelve.getProviderId()); List ebsOrders = itEbsOrderService.selectTEbsOrderList(queryOrder); logger.info("查询到的本地缓存订单:{}", JSON.toJSONString(ebsOrders)); if (ebsOrders.size() > 0) {// 本地数据库中缓存过 diff --git a/wms-admin/src/main/resources/application-druid.yml b/wms-admin/src/main/resources/application-druid.yml index 005eb15..afc68c7 100644 --- a/wms-admin/src/main/resources/application-druid.yml +++ b/wms-admin/src/main/resources/application-druid.yml @@ -5,16 +5,16 @@ spring: driverClassName: com.mysql.cj.jdbc.Driver druid: # 主库数据源 -# master: -# url: jdbc:mysql://localhost:3306/wms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 -# username: root -## password: ntscc@2018 -# password: root - master: - url: jdbc:mysql://192.168.234.134:3306/wms_ntpp_n7?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: developer - password: developer + url: jdbc:mysql://localhost:3306/wms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root +# password: ntscc@2018 + password: root + +# master: +# url: jdbc:mysql://192.168.234.134:3306/wms_ntpp_n7?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: developer +# password: developer # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/wms-admin/target/classes/application-druid.yml b/wms-admin/target/classes/application-druid.yml index 005eb15..afc68c7 100644 --- a/wms-admin/target/classes/application-druid.yml +++ b/wms-admin/target/classes/application-druid.yml @@ -5,16 +5,16 @@ spring: driverClassName: com.mysql.cj.jdbc.Driver druid: # 主库数据源 -# master: -# url: jdbc:mysql://localhost:3306/wms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 -# username: root -## password: ntscc@2018 -# password: root - master: - url: jdbc:mysql://192.168.234.134:3306/wms_ntpp_n7?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: developer - password: developer + url: jdbc:mysql://localhost:3306/wms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root +# password: ntscc@2018 + password: root + +# master: +# url: jdbc:mysql://192.168.234.134:3306/wms_ntpp_n7?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: developer +# password: developer # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/wms-business/src/main/java/com/ruoyi/business/domain/Temper.java b/wms-business/src/main/java/com/ruoyi/business/domain/Temper.java index 57f93b1..2ae16cc 100644 --- a/wms-business/src/main/java/com/ruoyi/business/domain/Temper.java +++ b/wms-business/src/main/java/com/ruoyi/business/domain/Temper.java @@ -1,50 +1,43 @@ package com.ruoyi.business.domain; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + import java.math.BigDecimal; import java.util.Date; /** * T_base_temper 表 */ +@Data +@TableName(value = "T_base_temper", autoResultMap = true) public class Temper { /** * 仓库温度 */ + @TableField(value = "rkDegree") private BigDecimal rkDegree; + /** + * 最高温度 + */ + @TableField(value = "maxDegree") + private BigDecimal maxDegree; + /** * 仓库id */ + @TableId(value = "rkId") private Integer rkId; /** * 更新时间 */ + @TableField(value = "updateTime") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date updateTime; - - - public BigDecimal getRkDegree() { - return rkDegree; - } - - public void setRkDegree(BigDecimal rkDegree) { - this.rkDegree = rkDegree; - } - - public Integer getRkId() { - return rkId; - } - - public void setRkId(Integer rkId) { - this.rkId = rkId; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } } diff --git a/wms-business/target/classes/mapper/TEbsOrderMapper.xml b/wms-business/target/classes/mapper/TEbsOrderMapper.xml index e65026e..8b4666a 100644 --- a/wms-business/target/classes/mapper/TEbsOrderMapper.xml +++ b/wms-business/target/classes/mapper/TEbsOrderMapper.xml @@ -28,6 +28,8 @@ + + @@ -40,6 +42,7 @@ and phaSegment1 = #{phaSegment1} and itemId = #{itemId} + order by dueDate; @@ -70,6 +73,8 @@ receivingRoutingId, lotControl, checkPriority, + dueDate, + createDate, #{phaSegment1}, @@ -97,6 +102,8 @@ #{receivingRoutingId}, #{lotControl}, #{checkPriority}, + #{dueDate}, + #{createDate}, @@ -126,11 +133,12 @@ receivingRoutingId = #{receivingRoutingId}, lotControl = #{lotControl}, checkPriority = #{checkPriority}, + createDate = #{createDate}, - where phaSegment1 = #{phaSegment1} and itemId = #{itemId} + where phaSegment1 = #{phaSegment1} and itemId = #{itemId} and dueDate = #{dueDate} - delete from t_ebs_order where phaSegment1 = #{phaSegment1} and itemId = #{itemId} + delete from t_ebs_order where phaSegment1 = #{phaSegment1} and itemId = #{itemId} and dueDate = #{dueDate} \ No newline at end of file