20240822服务器代码最新代码

main
daiweihong 1 year ago
parent 82f65b06c7
commit b6e5ce793b
  1. 12
      shkj-wms/src/main/java/com/shkj/wms/outbound/SchedulingOutboundInfo.java
  2. 3
      shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTask.java
  3. 2
      shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTmpTask.java
  4. 4
      shkj-wms/src/main/java/com/shkj/wms/scheduled/AllocationTasksUtils.java
  5. 9
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseBarcodesInServiceImpl.java

@ -106,14 +106,16 @@ public class SchedulingOutboundInfo {
BaseBarcodesOutQueryBo baseBarcodesOutQueryBo = new BaseBarcodesOutQueryBo();
baseBarcodesOutQueryBo.setTraverseDate(startBarcodesOut.getTraverseDate());
baseBarcodesOutQueryBo.setEndTraverseDate(endBarcodesOut.getTraverseDate());
baseBarcodesOutQueryBo.setColor(startBarcodesOut.getColor());
baseBarcodesOutQueryBo.setBumperType(startBarcodesOut.getBumperType());
baseBarcodesOutQueryBo.setVehicleCode(startBarcodesOut.getVehicleCode());
// baseBarcodesOutQueryBo.setColor(startBarcodesOut.getColor());
// baseBarcodesOutQueryBo.setBumperType(startBarcodesOut.getBumperType());
// baseBarcodesOutQueryBo.setVehicleCode(startBarcodesOut.getVehicleCode());
BaseBarcodesOutAddBo barcodesOut = iBaseBarcodesOutService.selectVinOutboundListOne(baseBarcodesOutQueryBo);
// 判断是否有任务,如果没有任务则返回
barcodesOutList.add(barcodesOut);
if (ObjectUtils.isEmpty(barcodesOutList)) {
if (ObjectUtils.isEmpty(barcodesOut)) {
log.info("暂无任务");
redisTemplate.delete(RedisConstant.startTaskVin);
redisTemplate.delete(RedisConstant.endTaskVin);
return;
}
// 获取小组装任务最大等待数
@ -138,7 +140,7 @@ public class SchedulingOutboundInfo {
// 如果没执行到该停止任务,这不需要理会
if(ObjectUtils.isNotEmpty(redisTemplate.opsForValue().get(RedisConstant.endTaskVin))){
String endTaskVin = redisTemplate.opsForValue().get(RedisConstant.endTaskVin).toString();
if(endTaskVin.equals(barcodesOut.getVin())){
if(ObjectUtils.isNotEmpty(barcodesOut.getVin()) && endTaskVin.equals(barcodesOut.getVin())){
redisTemplate.delete(RedisConstant.startTaskVin);
redisTemplate.delete(RedisConstant.endTaskVin);
}

@ -899,6 +899,9 @@ public class PlcEventTask {
snPointMap.put("3","KW28");
agvPoints.add("KW28");
}
}else if ("21".equals(taskType)){
snPointMap.put("3",taskPath);
agvPoints.add(taskPath);
}
businDataTask.setPoints(JsonUtil.toJSONString(snPointMap));

@ -427,7 +427,7 @@ class WeightRandomStrategy<k, V extends Number> {
}
}
public java.lang.String randome(){
public String randome(){
Map.putAll(weightMap);
String k = random();
return k;

@ -109,7 +109,7 @@ public class AllocationTasksUtils<k, V extends Number> {
redisTemplate.opsForValue().set("Distributor"+"copyMap",copyMap);
if (copyMap.size()==0){
List collect = map.entrySet().stream().map(java.util.Map.Entry::getKey).collect(Collectors.toList());
List collect = map.entrySet().stream().map(Map.Entry::getKey).collect(Collectors.toList());
collect.stream().forEach(e->{
map.put(String.valueOf(e),0D);
});
@ -151,7 +151,7 @@ public class AllocationTasksUtils<k, V extends Number> {
redisTemplate.opsForValue().set("Distributorout"+"copyMap",outcopyMap);
if (outcopyMap.size()==0){
List collect = outmap.entrySet().stream().map(java.util.Map.Entry::getKey).collect(Collectors.toList());
List collect = outmap.entrySet().stream().map(Map.Entry::getKey).collect(Collectors.toList());
collect.stream().forEach(e->{
outmap.put(String.valueOf(e),0D);
});

@ -166,8 +166,6 @@ public class BaseBarcodesInServiceImpl extends ServiceImpl<BaseBarcodesInMapper,
one = getOne(wrapper);
}
String color = bo.getColor();
if (one == null) {
qrCodeList.add(bo.getQrCode());
String isPunching = "0";
String isSplit = "0";
String punchingResult = "0";
@ -180,6 +178,10 @@ public class BaseBarcodesInServiceImpl extends ServiceImpl<BaseBarcodesInMapper,
if (bo.getPunchingResult() == true) {
punchingResult = "1";
}
goodsNo = color + bo.getVehicheModel() + bo.getLocation() +isSplit + isPunching + bo.getOrientation()+bo.getLocationCode();
if (one == null) {
qrCodeList.add(bo.getQrCode());
baseBarcodesIn = BeanUtil.toBean(bo, BaseBarcodesIn.class);
baseBarcodesIn.setIsPunching(isPunching);
@ -190,7 +192,7 @@ public class BaseBarcodesInServiceImpl extends ServiceImpl<BaseBarcodesInMapper,
baseBarcodesIn.setBranchId(branchId);
baseBarcodesIn.setIsRepair("0");
goodsNo = color + bo.getVehicheModel() + bo.getLocation() +isSplit + isPunching + bo.getOrientation()+bo.getLocationCode();
if (!goodnoList.contains(goodsNo)) {
BaseGoodsAddBo baseGoodsAddBo = new BaseGoodsAddBo();
goodnoList.add(goodsNo);
@ -214,6 +216,7 @@ public class BaseBarcodesInServiceImpl extends ServiceImpl<BaseBarcodesInMapper,
String colorOld = one.getColor();
if (!color.equals(colorOld)){
one.setColor(color);
one.setGoodsNo(goodsNo);
inList.add(one);
}
qrCodeList.add(bo.getQrCode());

Loading…
Cancel
Save