代码更新:
1.增加温度和供应商检测
This commit is contained in:
parent
be3a93b358
commit
8692fbf838
|
|
@ -81,6 +81,9 @@ public class TOngoodsshelfController extends BaseController
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITBaseProviderService tBaseProviderService;
|
private ITBaseProviderService tBaseProviderService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITemperService temperService;
|
||||||
|
|
||||||
@RequiresPermissions("business:ongoodsshelf:view")
|
@RequiresPermissions("business:ongoodsshelf:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String ongoodsshelf(ModelMap mmap)
|
public String ongoodsshelf(ModelMap mmap)
|
||||||
|
|
@ -226,6 +229,19 @@ public class TOngoodsshelfController extends BaseController
|
||||||
logger.error("没有正在入库的供应商,请开启后重试。");
|
logger.error("没有正在入库的供应商,请开启后重试。");
|
||||||
return error("没有正在入库的供应商,请开启后重试。");
|
return error("没有正在入库的供应商,请开启后重试。");
|
||||||
}
|
}
|
||||||
|
// 获取温度
|
||||||
|
List<Temper> temperList = temperService.list(new LambdaQueryWrapper<Temper>()
|
||||||
|
.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
|
// 入库id
|
||||||
String lotId = OrderCodeFactory.getOrderCode("RK", "");
|
String lotId = OrderCodeFactory.getOrderCode("RK", "");
|
||||||
// 创建日期
|
// 创建日期
|
||||||
|
|
@ -238,8 +254,13 @@ public class TOngoodsshelfController extends BaseController
|
||||||
} else {
|
} else {
|
||||||
sysUser.setUserName(tOngoodsshelves.get(0).getUserName());
|
sysUser.setUserName(tOngoodsshelves.get(0).getUserName());
|
||||||
}
|
}
|
||||||
|
boolean providerValidation = true;
|
||||||
for (TOngoodsshelf s:
|
for (TOngoodsshelf s:
|
||||||
tOngoodsshelves) {
|
tOngoodsshelves) {
|
||||||
|
if (!Objects.equals(s.getProviderId(), currentInProvider.getProviderId())) {
|
||||||
|
providerValidation = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
s.setAgvsts("0");
|
s.setAgvsts("0");
|
||||||
s.setTasktype("0");
|
s.setTasktype("0");
|
||||||
s.setLotId(lotId);
|
s.setLotId(lotId);
|
||||||
|
|
@ -250,7 +271,10 @@ public class TOngoodsshelfController extends BaseController
|
||||||
// 设置子库ID
|
// 设置子库ID
|
||||||
s.setWhseloc("121-108");
|
s.setWhseloc("121-108");
|
||||||
}
|
}
|
||||||
|
if (!providerValidation) {
|
||||||
|
logger.error("不在入库状态的供应商不允许入库。");
|
||||||
|
return error("不在入库状态的供应商不允许入库。");
|
||||||
|
}
|
||||||
// 开始对接ebs
|
// 开始对接ebs
|
||||||
String ebsCongfirmResult = ebsConfirm(tOngoodsshelves);
|
String ebsCongfirmResult = ebsConfirm(tOngoodsshelves);
|
||||||
if (StringUtils.isNotEmpty(ebsCongfirmResult)) {
|
if (StringUtils.isNotEmpty(ebsCongfirmResult)) {
|
||||||
|
|
@ -365,6 +389,7 @@ public class TOngoodsshelfController extends BaseController
|
||||||
TEbsOrder queryOrder = new TEbsOrder();
|
TEbsOrder queryOrder = new TEbsOrder();
|
||||||
queryOrder.setPhaSegment1(poOrder);// 订单号
|
queryOrder.setPhaSegment1(poOrder);// 订单号
|
||||||
queryOrder.setItemId(itemId);
|
queryOrder.setItemId(itemId);
|
||||||
|
// queryOrder.setVendorId(tOngoodsshelve.getProviderId());
|
||||||
List<TEbsOrder> ebsOrders = itEbsOrderService.selectTEbsOrderList(queryOrder);
|
List<TEbsOrder> ebsOrders = itEbsOrderService.selectTEbsOrderList(queryOrder);
|
||||||
logger.info("查询到的本地缓存订单:{}", JSON.toJSONString(ebsOrders));
|
logger.info("查询到的本地缓存订单:{}", JSON.toJSONString(ebsOrders));
|
||||||
if (ebsOrders.size() > 0) {// 本地数据库中缓存过
|
if (ebsOrders.size() > 0) {// 本地数据库中缓存过
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,16 @@ spring:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
druid:
|
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:
|
master:
|
||||||
url: jdbc:mysql://192.168.234.134:3306/wms_ntpp_n7?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/wms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: developer
|
username: root
|
||||||
password: developer
|
# 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:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,16 @@ spring:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
druid:
|
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:
|
master:
|
||||||
url: jdbc:mysql://192.168.234.134:3306/wms_ntpp_n7?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/wms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: developer
|
username: root
|
||||||
password: developer
|
# 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:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,43 @@
|
||||||
package com.ruoyi.business.domain;
|
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.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* T_base_temper 表
|
* T_base_temper 表
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "T_base_temper", autoResultMap = true)
|
||||||
public class Temper {
|
public class Temper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仓库温度
|
* 仓库温度
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "rkDegree")
|
||||||
private BigDecimal rkDegree;
|
private BigDecimal rkDegree;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最高温度
|
||||||
|
*/
|
||||||
|
@TableField(value = "maxDegree")
|
||||||
|
private BigDecimal maxDegree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仓库id
|
* 仓库id
|
||||||
*/
|
*/
|
||||||
|
@TableId(value = "rkId")
|
||||||
private Integer rkId;
|
private Integer rkId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "updateTime")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
<result property="receivingRoutingId" column="receivingRoutingId" />
|
<result property="receivingRoutingId" column="receivingRoutingId" />
|
||||||
<result property="lotControl" column="lotControl" />
|
<result property="lotControl" column="lotControl" />
|
||||||
<result property="checkPriority" column="checkPriority" />
|
<result property="checkPriority" column="checkPriority" />
|
||||||
|
<result property="dueDate" column="dueDate" />
|
||||||
|
<result property="createDate" column="createDate" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectTEbsOrderALl">
|
<sql id="selectTEbsOrderALl">
|
||||||
|
|
@ -40,6 +42,7 @@
|
||||||
<if test="phaSegment1 != null and phaSegment1 != ''"> and phaSegment1 = #{phaSegment1}</if>
|
<if test="phaSegment1 != null and phaSegment1 != ''"> and phaSegment1 = #{phaSegment1}</if>
|
||||||
<if test="itemId != null"> and itemId = #{itemId}</if>
|
<if test="itemId != null"> and itemId = #{itemId}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by dueDate;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertTEbsOrder" parameterType="TEbsOrder">
|
<insert id="insertTEbsOrder" parameterType="TEbsOrder">
|
||||||
|
|
@ -70,6 +73,8 @@
|
||||||
<if test="receivingRoutingId != null">receivingRoutingId,</if>
|
<if test="receivingRoutingId != null">receivingRoutingId,</if>
|
||||||
<if test="lotControl != null">lotControl,</if>
|
<if test="lotControl != null">lotControl,</if>
|
||||||
<if test="checkPriority != null">checkPriority,</if>
|
<if test="checkPriority != null">checkPriority,</if>
|
||||||
|
<if test="dueDate != null">dueDate,</if>
|
||||||
|
<if test="createDate != null">createDate,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="phaSegment1 != null">#{phaSegment1},</if>
|
<if test="phaSegment1 != null">#{phaSegment1},</if>
|
||||||
|
|
@ -97,6 +102,8 @@
|
||||||
<if test="receivingRoutingId != null">#{receivingRoutingId},</if>
|
<if test="receivingRoutingId != null">#{receivingRoutingId},</if>
|
||||||
<if test="lotControl != null">#{lotControl},</if>
|
<if test="lotControl != null">#{lotControl},</if>
|
||||||
<if test="checkPriority != null">#{checkPriority},</if>
|
<if test="checkPriority != null">#{checkPriority},</if>
|
||||||
|
<if test="dueDate != null">#{dueDate},</if>
|
||||||
|
<if test="createDate != null">#{createDate},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -126,11 +133,12 @@
|
||||||
<if test="receivingRoutingId != null">receivingRoutingId = #{receivingRoutingId},</if>
|
<if test="receivingRoutingId != null">receivingRoutingId = #{receivingRoutingId},</if>
|
||||||
<if test="lotControl != null">lotControl = #{lotControl},</if>
|
<if test="lotControl != null">lotControl = #{lotControl},</if>
|
||||||
<if test="checkPriority != null">checkPriority = #{checkPriority},</if>
|
<if test="checkPriority != null">checkPriority = #{checkPriority},</if>
|
||||||
|
<if test="createDate != null">createDate = #{createDate},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where phaSegment1 = #{phaSegment1} and itemId = #{itemId}
|
where phaSegment1 = #{phaSegment1} and itemId = #{itemId} and dueDate = #{dueDate}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteTEbsOrder" parameterType="TEbsOrder">
|
<delete id="deleteTEbsOrder" parameterType="TEbsOrder">
|
||||||
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}
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user