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

@ -899,6 +899,9 @@ public class PlcEventTask {
snPointMap.put("3","KW28"); snPointMap.put("3","KW28");
agvPoints.add("KW28"); agvPoints.add("KW28");
} }
}else if ("21".equals(taskType)){
snPointMap.put("3",taskPath);
agvPoints.add(taskPath);
} }
businDataTask.setPoints(JsonUtil.toJSONString(snPointMap)); 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); Map.putAll(weightMap);
String k = random(); String k = random();
return k; return k;

@ -109,7 +109,7 @@ public class AllocationTasksUtils<k, V extends Number> {
redisTemplate.opsForValue().set("Distributor"+"copyMap",copyMap); redisTemplate.opsForValue().set("Distributor"+"copyMap",copyMap);
if (copyMap.size()==0){ 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->{ collect.stream().forEach(e->{
map.put(String.valueOf(e),0D); map.put(String.valueOf(e),0D);
}); });
@ -151,7 +151,7 @@ public class AllocationTasksUtils<k, V extends Number> {
redisTemplate.opsForValue().set("Distributorout"+"copyMap",outcopyMap); redisTemplate.opsForValue().set("Distributorout"+"copyMap",outcopyMap);
if (outcopyMap.size()==0){ 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->{ collect.stream().forEach(e->{
outmap.put(String.valueOf(e),0D); outmap.put(String.valueOf(e),0D);
}); });

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

Loading…
Cancel
Save