控制堆垛机并发及出库查询模具优化

main
judy 11 months ago
parent 807a0615cc
commit 8828ff7318
  1. 4
      shkj-common/src/main/java/com/shkj/common/constant/RedisConstant.java
  2. 5
      shkj-wms/src/main/java/com/shkj/wms/enums/LocationStausEnum.java
  3. 15
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinOutInPlanServiceImpl.java
  4. 12
      shkj-wms/src/main/resources/mapper/wms/BaseMoldMapper.xml
  5. 2
      shkj-wms/src/main/resources/mapper/wms/SysStockDetailMapper.xml

@ -30,9 +30,9 @@ public class RedisConstant {
//任务下发时间
public static String redisTaskTime ="redisTaskTime:";
public static String redisTaskOut ="redisTaskOut";
public static String redisTaskOut ="redisTaskOut:";
public static String redisTaskIn ="redisTaskIn";
public static String redisTaskIn ="redisTaskIn:";

@ -19,11 +19,12 @@ public enum LocationStausEnum {
*/
FREE("0", "空闲"),
STOCK("1", "库存"),
/**
* 1满位
*/
FULL("1", "满位"),
NO_FULL("2", "半满位"),
/* FULL("1", "满位"),
NO_FULL("2", "半满位"),*/
CALL("3", "空托出库中"),

@ -1349,12 +1349,12 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper,
//空托盘
locationStatus=LocationStausEnum.EMPTY.getValue();
}else {
locationStatus=LocationStausEnum.FREE.getValue();
if (locationMoldQty==0){
locationStatus=LocationStausEnum.FULL.getValue();
}else if (locationMoldQty !=6 || locationMoldQty !=3){
locationStatus = LocationStausEnum.NO_FULL.getValue();
}
locationStatus=LocationStausEnum.STOCK.getValue();
// if (locationMoldQty==0){
// locationStatus=LocationStausEnum.FULL.getValue();
// }else if (locationMoldQty !=6 || locationMoldQty !=3){
// locationStatus = LocationStausEnum.NO_FULL.getValue();
// }
}
BaseLocation baseLocation = baseLocationService.getById(locationId);
@ -1425,6 +1425,7 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper,
//取消入库时,如果已给堆垛机下发任务,则删除redis信息
// redisCache.deleteObject(RedisConstant.redisReqWare + orderNo);
if (planStatus.equals(PlanStatusEnum.CANCEL.getValue())){
redisTemplate.delete(RedisConstant.redisContainer+orderNo);
//堆垛机非自动完成状态后,把redis中的ID删除,代表此任务已经完成
Object taskInId = redisTemplate.opsForValue().get(RedisConstant.redisTaskIn);
@ -1432,7 +1433,7 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper,
log.info("手动处理入库时判断redis中的数据是否还存在,存在则删除,删除redis中的出库任务状态记录:",orderNo);
redisTemplate.delete(RedisConstant.redisTaskIn);
}
}
list.forEach(x -> x.setPlanStatus(planStatus));
this.updateBatchById(list);
return Result.ok();

@ -74,11 +74,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
c.container_name
FROM
base_mold m
INNER JOIN sys_stock_detail s ON m.id = s.mold_id AND s.qty - s.out_qty > 0
INNER JOIN sys_stock_detail s ON m.id = s.mold_id
INNER JOIN base_container c on c.id =s.container_id
WHERE
m.is_activity = 1
AND m.is_del = 0
m.is_activity = 1 AND m.is_del = 0 AND s.qty - s.out_qty > 0
<if test="moldBarcode != null and moldBarcode != ''">
and m.bar_code like CONCAT('%', #{moldBarcode},'%')
</if>
@ -128,14 +127,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
c.container_name
FROM
base_mold m
INNER JOIN sys_stock_detail s ON m.id = s.mold_id AND s.qty - s.out_qty > 0
INNER JOIN sys_stock_detail s ON m.id = s.mold_id
INNER JOIN base_container c on c.id =s.container_id
LEFT JOIN ( SELECT plan.mold_id FROM busin_out_in_plan plan WHERE plan_status NOT IN ( '2', '3' ) AND plan.type = 'out' ) AS planout ON planout.mold_id = m.id
WHERE
planout.mold_id IS NULL
AND m.is_activity = 1
m.is_activity = 1 and s.qty - s.out_qty > 0
AND m.is_del = 0
<if test="moldBarcode != null and moldBarcode != ''">
and m.bar_code like CONCAT('%', #{moldBarcode},'%')
</if>

@ -379,7 +379,7 @@
select mold.*,detail.in_time from sys_stock_detail detail
inner join base_mold mold on detail.mold_id=mold.id
inner join base_location location on detail.location_id=location.id
where location_name = #{locationCode}
where location.location_code = #{locationCode}
</select>
<select id="getInvWeightManagement" resultType="com.shkj.wms.vo.SysStockWeightByAreaVo">

Loading…
Cancel
Save