现场优化

main
Comair 1 year ago
parent af466f9d4f
commit f7360a57e6
  1. 1
      shkj-wms/src/main/java/com/shkj/wms/bo/AssingEmptyLocBo.java
  2. 9
      shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTask.java
  3. 8
      shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java
  4. 2
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java
  5. 5
      shkj-wms/src/main/java/com/shkj/wms/service/impl/PutInOutStorageServiceImpl.java

@ -23,6 +23,7 @@ public class AssingEmptyLocBo implements Serializable {
private String vehicheModel; private String vehicheModel;
private String batch; private String batch;
private String tunnel;
private List<BusinDataTaskGoodsVo> businDataTaskGoodsVos; private List<BusinDataTaskGoodsVo> businDataTaskGoodsVos;

@ -34,6 +34,7 @@ import com.shkj.wms.service.IBaseGoodsDataService;
import com.shkj.wms.service.IBusinDataTaskService; import com.shkj.wms.service.IBusinDataTaskService;
import com.shkj.wms.service.IPutInOutStorageService; import com.shkj.wms.service.IPutInOutStorageService;
import com.shkj.wms.utils.JsonUtil; import com.shkj.wms.utils.JsonUtil;
import io.lettuce.core.dynamic.domain.Timeout;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -384,7 +385,11 @@ public class PlcEventTask {
// containerCode=containerCode.substring(0,containerCode.length()-1); // containerCode=containerCode.substring(0,containerCode.length()-1);
log.info("治具编号" + containerCode + "first:" + firstBarcode + "second:" + secondBarcode + "third:" + thirdBarcode); log.info("治具编号" + containerCode + "first:" + firstBarcode + "second:" + secondBarcode + "third:" + thirdBarcode);
//连续读到相同治具编号时不生成新任务 //连续读到相同治具编号时不生成新任务
String redisContainerCode = redisTemplate.opsForValue().get("autoTask").toString(); Object autoTask = redisTemplate.opsForValue().get("autoTask");
String redisContainerCode="";
if (autoTask != null){
redisContainerCode = autoTask.toString();
}
if (redisContainerCode.equals(containerCode)) { if (redisContainerCode.equals(containerCode)) {
return; return;
} }
@ -426,7 +431,7 @@ public class PlcEventTask {
log.info("生成新任务:" + taskId + "治具编号:" + containerCode); log.info("生成新任务:" + taskId + "治具编号:" + containerCode);
scheduledTasks.inTask(taskId, one.getId()); scheduledTasks.inTask(taskId, one.getId());
if (ObjectUtils.isNotEmpty(taskId)) { if (ObjectUtils.isNotEmpty(taskId)) {
redisTemplate.opsForValue().set("autoTask", containerCode); redisTemplate.opsForValue().set("autoTask", containerCode,5,TimeUnit.MINUTES);
} }
} }
} }

@ -1100,7 +1100,13 @@ public class ScheduledTasks {
.eq(BaseLocation::getLocationColumn, locationColumn) .eq(BaseLocation::getLocationColumn, locationColumn)
.eq(BaseLocation::getLayer, layer)); .eq(BaseLocation::getLayer, layer));
if(one !=null){ if(one !=null){
BusinDataTaskVo businDataTaskIsnotDeep = businDataTaskVos.stream().filter(item -> item.getLocationId().equals(one.getId())).findFirst().orElse(null); // BusinDataTaskVo businDataTaskIsnotDeep = businDataTaskVos.stream().filter(item -> item.getLocationId().equals(one.getId())).findFirst().orElse(null);
BusinDataTask businDataTaskIsnotDeep = iBusinDataTaskService.getOne(
new LambdaQueryWrapper<BusinDataTask>()
.eq(BusinDataTask::getLocationId, one.getId())
.in(BusinDataTask::getTaskStatus, Arrays.asList("0", "-1"))
.last("limit 1")
);
if (businDataTaskIsnotDeep != null){ if (businDataTaskIsnotDeep != null){
log.info("查询到单深位的任务:"+taskVoid); log.info("查询到单深位的任务:"+taskVoid);
businDataTask=businDataTaskIsnotDeep; businDataTask=businDataTaskIsnotDeep;

@ -906,6 +906,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
BaseLocationQueryListBo bo = new BaseLocationQueryListBo(); BaseLocationQueryListBo bo = new BaseLocationQueryListBo();
bo.setGoodsNo(goodsNo); bo.setGoodsNo(goodsNo);
bo.setLocationStatus("0"); bo.setLocationStatus("0");
bo.setTunnel(assingEmptyLocBo.getTunnel());
log.info("保险杠分配货位查询条件:" + JsonUtil.toJSONString(bo)); log.info("保险杠分配货位查询条件:" + JsonUtil.toJSONString(bo));
List<BaseLocationVo> baseLocationVos = this.baseMapper.queryBaseLocationListByGoods(bo); List<BaseLocationVo> baseLocationVos = this.baseMapper.queryBaseLocationListByGoods(bo);
if (baseLocationVos.size() == 0) { if (baseLocationVos.size() == 0) {
@ -1340,6 +1341,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
assingEmptyLocBo.setBatch(DateUtils.getDate()); assingEmptyLocBo.setBatch(DateUtils.getDate());
assingEmptyLocBo.setGoodsNo(goodsNo); assingEmptyLocBo.setGoodsNo(goodsNo);
assingEmptyLocBo.setVehicheModel(baseGoodsData.getVehicheModel()); assingEmptyLocBo.setVehicheModel(baseGoodsData.getVehicheModel());
assingEmptyLocBo.setTunnel(baseLocation.getTunnel());
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo); Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo);
if (Result.isOk(locationVoResult)) { if (Result.isOk(locationVoResult)) {
BaseLocationVo baseLocationVo = locationVoResult.getData(); BaseLocationVo baseLocationVo = locationVoResult.getData();

@ -451,8 +451,9 @@ public class PutInOutStorageServiceImpl extends ServiceImpl<BasePointDeviceMappe
//防止进入保养后在进入入库 //防止进入保养后在进入入库
boolean stuats=true; boolean stuats=true;
//治具是否需要保养 //治具是否需要保养 下班模式不检查是否保养
BasePointDeviceVo pointDeviceVo = iBusinEnptyContainerServiceImpl.checkContailnerUpkeep(containerId); BasePointDeviceVo pointDeviceVo = null;
//iBusinEnptyContainerServiceImpl.checkContailnerUpkeep(containerId);
if (pointDeviceVo != null){ if (pointDeviceVo != null){
toPpoint = pointDeviceVo.getPointNo(); toPpoint = pointDeviceVo.getPointNo();

Loading…
Cancel
Save