代码更新:
1.增加温度和供应商检测
This commit is contained in:
parent
be3a93b358
commit
8692fbf838
|
|
@ -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<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
|
||||
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<TEbsOrder> ebsOrders = itEbsOrderService.selectTEbsOrderList(queryOrder);
|
||||
logger.info("查询到的本地缓存订单:{}", JSON.toJSONString(ebsOrders));
|
||||
if (ebsOrders.size() > 0) {// 本地数据库中缓存过
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
# 从数据源开关/默认关闭
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
# 从数据源开关/默认关闭
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
<result property="receivingRoutingId" column="receivingRoutingId" />
|
||||
<result property="lotControl" column="lotControl" />
|
||||
<result property="checkPriority" column="checkPriority" />
|
||||
<result property="dueDate" column="dueDate" />
|
||||
<result property="createDate" column="createDate" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTEbsOrderALl">
|
||||
|
|
@ -40,6 +42,7 @@
|
|||
<if test="phaSegment1 != null and phaSegment1 != ''"> and phaSegment1 = #{phaSegment1}</if>
|
||||
<if test="itemId != null"> and itemId = #{itemId}</if>
|
||||
</where>
|
||||
order by dueDate;
|
||||
</select>
|
||||
|
||||
<insert id="insertTEbsOrder" parameterType="TEbsOrder">
|
||||
|
|
@ -70,6 +73,8 @@
|
|||
<if test="receivingRoutingId != null">receivingRoutingId,</if>
|
||||
<if test="lotControl != null">lotControl,</if>
|
||||
<if test="checkPriority != null">checkPriority,</if>
|
||||
<if test="dueDate != null">dueDate,</if>
|
||||
<if test="createDate != null">createDate,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="phaSegment1 != null">#{phaSegment1},</if>
|
||||
|
|
@ -97,6 +102,8 @@
|
|||
<if test="receivingRoutingId != null">#{receivingRoutingId},</if>
|
||||
<if test="lotControl != null">#{lotControl},</if>
|
||||
<if test="checkPriority != null">#{checkPriority},</if>
|
||||
<if test="dueDate != null">#{dueDate},</if>
|
||||
<if test="createDate != null">#{createDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -126,11 +133,12 @@
|
|||
<if test="receivingRoutingId != null">receivingRoutingId = #{receivingRoutingId},</if>
|
||||
<if test="lotControl != null">lotControl = #{lotControl},</if>
|
||||
<if test="checkPriority != null">checkPriority = #{checkPriority},</if>
|
||||
<if test="createDate != null">createDate = #{createDate},</if>
|
||||
</trim>
|
||||
where phaSegment1 = #{phaSegment1} and itemId = #{itemId}
|
||||
where phaSegment1 = #{phaSegment1} and itemId = #{itemId} and dueDate = #{dueDate}
|
||||
</update>
|
||||
|
||||
<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>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user