Compare commits

...

2 Commits

  1. 3
      shkj-wms/src/main/java/com/shkj/wms/bo/BaseBarcodesOutQueryBo.java
  2. 2
      shkj-wms/src/main/java/com/shkj/wms/controller/business/BaseBarcodesController.java
  3. 2
      shkj-wms/src/main/java/com/shkj/wms/mapper/BaseBarcodesOutMapper.java
  4. 35
      shkj-wms/src/main/java/com/shkj/wms/outbound/SchedulingOutboundInfo.java
  5. 2
      shkj-wms/src/main/java/com/shkj/wms/plc/PlcInit.java
  6. 4
      shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java
  7. 1
      shkj-wms/src/main/java/com/shkj/wms/service/IBaseLocationService.java
  8. 59
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseBarcodesOutServiceImpl.java
  9. 75
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java
  10. 4
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java
  11. 7
      shkj-wms/src/main/java/com/shkj/wms/third/dps/DpsCallUtil.java
  12. 25
      shkj-wms/src/main/java/com/shkj/wms/third/rcs/RCSUtil.java
  13. 23
      shkj-wms/src/main/resources/mapper/wms/BaseBarcodesOutMapper.xml

@ -45,6 +45,9 @@ public class BaseBarcodesOutQueryBo implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date traverseDate; private Date traverseDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endTraverseDate;
/** /**
* 派生 * 派生
*/ */

@ -127,7 +127,7 @@ public class BaseBarcodesController extends BaseController {
* @return * @return
*/ */
@GetMapping("/getBarcodesOutDataTaskInfoDetail") @GetMapping("/getBarcodesOutDataTaskInfoDetail")
@RepeatSubmit //@RepeatSubmit
public TableDataInfo<BaseBarcodesOutVo> getBarcodesOutDataTaskInfoDetail(BaseBarcodesOutQueryBo bo){ public TableDataInfo<BaseBarcodesOutVo> getBarcodesOutDataTaskInfoDetail(BaseBarcodesOutQueryBo bo){
startPage(); startPage();
List<BaseBarcodesOutVo> outVoList = iBaseBarcodesOutService.getBarcodesOutDataTaskInfoDetail(bo); List<BaseBarcodesOutVo> outVoList = iBaseBarcodesOutService.getBarcodesOutDataTaskInfoDetail(bo);

@ -56,7 +56,7 @@ public interface BaseBarcodesOutMapper extends BaseMapper<BaseBarcodesOut> {
* @param traverseDate * @param traverseDate
* @return int * @return int
*/ */
@Update("update base_barcodes_out set out_status = '-1' where traverse_date < #{traverseDate} and out_status = '0'") @Update("update base_barcodes_out set out_status = '-1' where traverse_date < #{traverseDate} and out_status = '0' and IFNULL(bumper_type,'')!='' ")
int updateBeforeBytraverseDate(String traverseDate); int updateBeforeBytraverseDate(String traverseDate);
/** /**

@ -79,29 +79,36 @@ public class SchedulingOutboundInfo {
public void outboundInfoTaskByVin(){ public void outboundInfoTaskByVin(){
// 判断从 redis 中获取的手动下发任务的开始任务是否有值 // 判断从 redis 中获取的手动下发任务的开始任务是否有值
// 有值的话就进行逻辑处理;如果没有就直接跳过 // 有值的话就进行逻辑处理;如果没有就直接跳过
if(ObjectUtils.isEmpty(redisTemplate.opsForValue().get(RedisConstant.startTaskVin))){ if(ObjectUtils.isEmpty(redisTemplate.opsForValue().get(RedisConstant.startTaskVin)) && ObjectUtils.isEmpty(redisTemplate.opsForValue().get(RedisConstant.endTaskVin))){
// log.info("暂未设置生成任务的开始任务"); // log.info("暂未设置生成任务的开始任务");
return; return;
} }
// 将redis 中的值转成字符串 // 将redis 中的值转成字符串
String vin = redisTemplate.opsForValue().get(RedisConstant.startTaskVin).toString(); String startVin = redisTemplate.opsForValue().get(RedisConstant.startTaskVin).toString();
log.info("出库VIN号:"+vin); String endVin = redisTemplate.opsForValue().get(RedisConstant.endTaskVin).toString();
log.info("出库VIN号:"+startVin+" "+endVin);
// 初始化生产任务集合 // 初始化生产任务集合
List<BaseBarcodesOutAddBo> barcodesOutList = new ArrayList<>(); List<BaseBarcodesOutAddBo> barcodesOutList = new ArrayList<>();
// 根据vin获取对应的出库任务数据——主要是过点时间 // 根据vin获取对应的出库任务数据——主要是过点时间
BaseBarcodesOutQueryBo baseBarcodesOutQueryBo = new BaseBarcodesOutQueryBo();
baseBarcodesOutQueryBo.setVin(vin); BaseBarcodesOut startBarcodesOut = iBaseBarcodesOutService.getOne(
BaseBarcodesOut baseBarcodesOut = iBaseBarcodesOutService.getOne( new LambdaQueryWrapper<BaseBarcodesOut>().eq(BaseBarcodesOut::getVin,startVin)
new LambdaQueryWrapper<BaseBarcodesOut>().eq(BaseBarcodesOut::getVin,vin)
.isNull(BaseBarcodesOut::getIs_cancel).last("limit 1")) .isNull(BaseBarcodesOut::getIs_cancel).last("limit 1"))
; ;
if (baseBarcodesOut == null){
log.info("vin已出庫"); BaseBarcodesOut endBarcodesOut = iBaseBarcodesOutService.getOne(
return; new LambdaQueryWrapper<BaseBarcodesOut>().eq(BaseBarcodesOut::getVin,endVin)
} .isNull(BaseBarcodesOut::getIs_cancel).last("limit 1"))
// 通过过点时间获取等于该时间或者大于过点时间的任务数据 只获取一条数据 ;
baseBarcodesOutQueryBo = new BaseBarcodesOutQueryBo();
baseBarcodesOutQueryBo.setTraverseDate(baseBarcodesOut.getTraverseDate());
// 通过两个vin过点时间之间的数据, 只获取手动已下发的数据
BaseBarcodesOutQueryBo baseBarcodesOutQueryBo = new BaseBarcodesOutQueryBo();
baseBarcodesOutQueryBo.setTraverseDate(startBarcodesOut.getTraverseDate());
baseBarcodesOutQueryBo.setEndTraverseDate(endBarcodesOut.getTraverseDate());
baseBarcodesOutQueryBo.setColor(startBarcodesOut.getColor());
baseBarcodesOutQueryBo.setBumperType(startBarcodesOut.getBumperType());
baseBarcodesOutQueryBo.setVehicleCode(startBarcodesOut.getVehicleCode());
BaseBarcodesOutAddBo barcodesOut = iBaseBarcodesOutService.selectVinOutboundListOne(baseBarcodesOutQueryBo); BaseBarcodesOutAddBo barcodesOut = iBaseBarcodesOutService.selectVinOutboundListOne(baseBarcodesOutQueryBo);
// 判断是否有任务,如果没有任务则返回 // 判断是否有任务,如果没有任务则返回
barcodesOutList.add(barcodesOut); barcodesOutList.add(barcodesOut);

@ -42,7 +42,7 @@ public class PlcInit {
RedisTemplate redisTemplate; RedisTemplate redisTemplate;
private ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1); private ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1);
// @PostConstruct @PostConstruct
public void init(){ public void init(){
log.info("初始化连接对象"); log.info("初始化连接对象");
executorService.scheduleWithFixedDelay( executorService.scheduleWithFixedDelay(

@ -263,7 +263,7 @@ public class ScheduledTasks {
//按照优先级降序排序,优先级高的优先执行 //按照优先级降序排序,优先级高的优先执行
businDataTaskVos = businDataTaskVos.stream().sorted(Comparator.comparing(BusinDataTaskVo::getIsTop, Comparator.reverseOrder()).thenComparing(BusinDataTaskVo::getCreateTime)).collect(Collectors.toList()); businDataTaskVos = businDataTaskVos.stream().sorted(Comparator.comparing(BusinDataTaskVo::getIsTop, Comparator.reverseOrder()).thenComparing(BusinDataTaskVo::getCreateTime)).collect(Collectors.toList());
for (BusinDataTaskVo businDataTaskVo : businDataTaskVos) { for (BusinDataTaskVo businDataTaskVo : businDataTaskVos) {
// doTask(businDataTaskVos,businDataTaskVo); // doTask(businDataTaskVos,businDataTaskVo);
doTask(inVehicheModel, waitIssueEmpTaskNum, businDataTaskVo,businDataTaskVos); doTask(inVehicheModel, waitIssueEmpTaskNum, businDataTaskVo,businDataTaskVos);
} }
@ -1137,7 +1137,7 @@ 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( BusinDataTask businDataTaskIsnotDeep = iBusinDataTaskService.getOne(
new LambdaQueryWrapper<BusinDataTask>() new LambdaQueryWrapper<BusinDataTask>()
.eq(BusinDataTask::getLocationId, one.getId()) .eq(BusinDataTask::getLocationId, one.getId())

@ -166,6 +166,7 @@ public interface IBaseLocationService extends IService<BaseLocation> {
*/ */
Result<BaseLocationVo> assignEmptyLocatioPunching(AssingEmptyLocBo assingEmptyLocBo); Result<BaseLocationVo> assignEmptyLocatioPunching(AssingEmptyLocBo assingEmptyLocBo);
/** /**
* 检查货位是否有对应双深位 * 检查货位是否有对应双深位
* *

@ -282,24 +282,71 @@ public class BaseBarcodesOutServiceImpl extends ServiceImpl<BaseBarcodesOutMappe
} }
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Result<Boolean> handOutboundInfoTask(String vin,String status){ public Result<Boolean> handOutboundInfoTask(String vin,String status){
// 添加手动下发任务的开始任务 并且从该任务起定时生成任务 // 添加手动下发任务的开始任务 并且从该任务起定时生成任务
if("start".equals(status)){ if("start".equals(status)){
Object endVin = redisTemplate.opsForValue().get(RedisConstant.endTaskVin);
if(ObjectUtils.isEmpty(endVin)){
return Result.err().msg("请先设定停止的VIN码");
}
if (ObjectUtils.isEmpty(redisTemplate.opsForValue().get(RedisConstant.startTaskVin))) { if (ObjectUtils.isEmpty(redisTemplate.opsForValue().get(RedisConstant.startTaskVin))) {
redisTemplate.opsForValue().set(RedisConstant.startTaskVin,vin); redisTemplate.opsForValue().set(RedisConstant.startTaskVin,vin);
BaseBarcodesOutQueryBo baseBarcodesOutQueryBo = new BaseBarcodesOutQueryBo();
baseBarcodesOutQueryBo.setVin(vin); BaseBarcodesOut startBarcodesOut = iBaseBarcodesOutService.getOne(new LambdaQueryWrapper<BaseBarcodesOut>().eq(BaseBarcodesOut::getVin,vin));
BaseBarcodesOut baseBarcodesOut = iBaseBarcodesOutService.getOne(new LambdaQueryWrapper<BaseBarcodesOut>().eq(BaseBarcodesOut::getVin,vin)); String startBumperType = startBarcodesOut.getBumperType();
String startDerive = startBarcodesOut.getDerive();
String startColor = startBarcodesOut.getColor();
String startVehicleCode = startBarcodesOut.getVehicleCode();
BaseBarcodesOut endBarcodesOut = iBaseBarcodesOutService.getOne(new LambdaQueryWrapper<BaseBarcodesOut>().eq(BaseBarcodesOut::getVin,endVin.toString()));
String endBumperType = endBarcodesOut.getBumperType();
String endDerive = endBarcodesOut.getDerive();
String endColor = endBarcodesOut.getColor();
String endVehicleCode = endBarcodesOut.getVehicleCode();
//根据过点时间获取要出库的vin,并判断车型是否一样
if (!endBumperType.equals(startBumperType)&& !endDerive.equals(startDerive) && !endColor.equals(startColor) && !endVehicleCode.equals(startVehicleCode)){
return Result.err().msg("设定的开始VIN码与停止的VIN码车型-派生-颜色-车型一致:"+"开始VIN:"+startBumperType+"-"+startDerive+"-"+startColor+"-"+startVehicleCode
+" 停止VIN:"+endBumperType+"-"+endDerive+"-"+endColor+"-"+endVehicleCode);
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String temp = sdf.format(baseBarcodesOut.getTraverseDate()); LambdaQueryWrapper<BaseBarcodesOut> outWrapper = new LambdaQueryWrapper<>();
this.baseBarcodesOutMapper.updateBeforeBytraverseDate(temp); List<BaseBarcodesOut> baseBarcodesOutList = iBaseBarcodesOutService.list(outWrapper
.and((wrapper) ->{
wrapper.le(BaseBarcodesOut::getTraverseDate, endBarcodesOut.getTraverseDate()).ge(BaseBarcodesOut::getTraverseDate,startBarcodesOut.getTraverseDate());
})
.eq(BaseBarcodesOut::getBumperType, endBarcodesOut.getBumperType())
.eq(BaseBarcodesOut::getDerive, endBarcodesOut.getDerive())
.eq(BaseBarcodesOut::getColor, endBarcodesOut.getColor())
.eq(BaseBarcodesOut::getVehicleCode, endBarcodesOut.getVehicleCode())
.eq(BaseBarcodesOut::getOutStatus, "0")
);
for (BaseBarcodesOut barcodesOut : baseBarcodesOutList) {
//手动已下发
barcodesOut.setOutStatus("4");
}
boolean b = this.updateBatchById(baseBarcodesOutList);
if (b){
return Result.ok().msg("共出库保险杠:"+baseBarcodesOutList.size()+"套");
}else {
return Result.ok().msg("手动下发任务失败");
}
// this.baseBarcodesOutMapper.updateBeforeBytraverseDate(temp);
//TODO 出库一个任务的时候启用。其余情况都注释掉 //TODO 出库一个任务的时候启用。其余情况都注释掉
// redisTemplate.opsForValue().set(RedisConstant.endTaskVin,vin); // redisTemplate.opsForValue().set(RedisConstant.endTaskVin,vin);
}else{
return Result.err().msg("上次设定的出库未完成出库,不可下发任务");
} }
}else if("end".equals(status)){ }else if("end".equals(status)){
redisTemplate.opsForValue().set(RedisConstant.endTaskVin,vin); redisTemplate.opsForValue().set(RedisConstant.endTaskVin,vin);
return Result.ok().msg("设置停止VIN成功");
}else {
return Result.err().msg("无匹配的类型");
} }
return Result.ok();
} }
/** /**
* 手动下发出库任务 -暂停 * 手动下发出库任务 -暂停

@ -178,7 +178,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
} }
LambdaQueryWrapper<BaseLocation> wrapper = new LambdaQueryWrapper<BaseLocation>().in(BaseLocation::getId, ids) LambdaQueryWrapper<BaseLocation> wrapper = new LambdaQueryWrapper<BaseLocation>().in(BaseLocation::getId, ids)
.eq(BaseLocation::getBranchId, SecurityUtils.getCurrentBranchId()); .eq(BaseLocation::getBranchId, SecurityUtils.getCurrentBranchId());
return this.update(del, wrapper)==true ?Result.ok().msg("启用/禁用货位成功"):Result.err().msg("启用/禁用货位失败"); return this.update(del, wrapper) == true ? Result.ok().msg("启用/禁用货位成功") : Result.err().msg("启用/禁用货位失败");
} }
@ -815,7 +815,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
@Override @Override
public synchronized Result<BaseLocationVo> assignEmptyLocationAll(AssingEmptyLocBo assingEmptyLocBo,String lcoatinTunnel) { public synchronized Result<BaseLocationVo> assignEmptyLocationAll(AssingEmptyLocBo assingEmptyLocBo, String lcoatinTunnel) {
BaseLocationVo locationVo = null; BaseLocationVo locationVo = null;
//bo等于空时,是空治具分配货位,否则是保险杠分配货位 //bo等于空时,是空治具分配货位,否则是保险杠分配货位
if (assingEmptyLocBo == null) { if (assingEmptyLocBo == null) {
@ -912,7 +912,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
bo.setTunnel(assingEmptyLocBo.getTunnel()); 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 (StringUtils.isEmpty(assingEmptyLocBo.getTunnel())){ if (StringUtils.isEmpty(assingEmptyLocBo.getTunnel())) {
if (baseLocationVos.size() == 0) { if (baseLocationVos.size() == 0) {
//查看缓冲区是否还有货位 //查看缓冲区是否还有货位
Long bufferArea = Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.buffer_area)); Long bufferArea = Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.buffer_area));
@ -1313,9 +1313,11 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
if ("01".equals(tunnel) || "06".equals(tunnel)) { if ("01".equals(tunnel) || "06".equals(tunnel)) {
//如果是单深位,验证下双深位的是否有库存,如果有在判断车型颜色是否一致 //如果是单深位,验证下双深位的是否有库存,如果有在判断车型颜色是否一致
String locationRow = baseLocation.getLocationRow(); String locationRow = baseLocation.getLocationRow();
String locationColumn = baseLocation.getLocationColumn();
String layer = baseLocation.getLayer();
if ("2".equals(locationRow) || "3".equals(locationRow) || "14".equals(locationRow)) { if ("2".equals(locationRow) || "3".equals(locationRow) || "14".equals(locationRow)) {
String locationColumn = baseLocation.getLocationColumn();
String layer = baseLocation.getLayer();
if (locationRow.equals("2")) { if (locationRow.equals("2")) {
locationRow = "1"; locationRow = "1";
} else if (locationRow.equals("3")) { } else if (locationRow.equals("3")) {
@ -1335,7 +1337,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
baseLocation = doubleLocation; baseLocation = doubleLocation;
} else { } else {
//双深位有库存,当前任务是保险杠时,判断保险杠是否一样 //双深位有库存,当前任务是保险杠时,判断保险杠是否一样
if (businDataTaskGoodsVos != null && businDataTaskGoodsVos.size()>0) { if (businDataTaskGoodsVos != null && businDataTaskGoodsVos.size() > 0) {
//判断与双深位的保险杠是否一样 //判断与双深位的保险杠是否一样
long count = sysStockDetailVoList.stream().filter(val -> businDataTaskGoodsVos.stream().anyMatch(o -> Objects.equals(val.getGoodsNo(), o.getGoodsNo()))).count(); long count = sysStockDetailVoList.stream().filter(val -> businDataTaskGoodsVos.stream().anyMatch(o -> Objects.equals(val.getGoodsNo(), o.getGoodsNo()))).count();
if (count == 0) { if (count == 0) {
@ -1348,7 +1350,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
assingEmptyLocBo.setGoodsNo(goodsNo); assingEmptyLocBo.setGoodsNo(goodsNo);
assingEmptyLocBo.setVehicheModel(baseGoodsData.getVehicheModel()); assingEmptyLocBo.setVehicheModel(baseGoodsData.getVehicheModel());
assingEmptyLocBo.setTunnel(baseLocation.getTunnel()); assingEmptyLocBo.setTunnel(baseLocation.getTunnel());
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo,null); Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo, null);
if (Result.isOk(locationVoResult)) { if (Result.isOk(locationVoResult)) {
BaseLocationVo baseLocationVo = locationVoResult.getData(); BaseLocationVo baseLocationVo = locationVoResult.getData();
baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class); baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class);
@ -1359,7 +1361,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
String goodsNo = sysStockDetailVoList.get(0).getGoodsNo(); String goodsNo = sysStockDetailVoList.get(0).getGoodsNo();
if (goodsNo != null) { if (goodsNo != null) {
AssingEmptyLocBo assingEmptyLocBo = null; AssingEmptyLocBo assingEmptyLocBo = null;
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo,businDataTask.getTunnel()); Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo, businDataTask.getTunnel());
if (Result.isOk(locationVoResult)) { if (Result.isOk(locationVoResult)) {
BaseLocationVo baseLocationVo = locationVoResult.getData(); BaseLocationVo baseLocationVo = locationVoResult.getData();
baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class); baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class);
@ -1367,11 +1369,60 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
} }
} }
} }
} } else if ("1".equals(locationRow) || "4".equals(locationRow) || "15".equals(locationRow)) {
else if (tunnel.equals("06") && locationRow.equals("13")){ //检查单深位是否有货
if (locationRow.equals("1")) {
locationRow = "2";
} else if (locationRow.equals("4")) {
locationRow = "3";
} else if (locationRow.equals("15")) {
locationRow = "14";
}
BaseLocation oneLocation = this.getOne(new LambdaQueryWrapper<BaseLocation>()
.eq(BaseLocation::getLocationRow, locationRow)
.eq(BaseLocation::getLocationColumn, locationColumn)
.eq(BaseLocation::getLayer, layer));
String oneLocationStatus = oneLocation.getLocationStatus();
Boolean checkLoc = false;
if (oneLocationStatus.equals("1") || oneLocationStatus.equals("2") || oneLocationStatus.equals("5")) {
//入库货位是双深位,单深位有货,重新分配货位
checkLoc = true;
}
if (locationStatus.equals("1") || locationStatus.equals("2") || locationStatus.equals("5")) {
//入库是双深位时,此货位有货,重新分配货位
checkLoc = true;
}
if (checkLoc) {
if (businDataTaskGoodsVos != null && businDataTaskGoodsVos.size() > 0) {
String goodsNo = businDataTaskGoodsVos.get(0).getGoodsNo();
BaseGoodsData baseGoodsData = iBaseGoodsDataService.getBaseGoodsByBarcodes(goodsNo);
AssingEmptyLocBo assingEmptyLocBo = new AssingEmptyLocBo();
assingEmptyLocBo.setBusinDataTaskGoodsVos(businDataTaskGoodsVos);
assingEmptyLocBo.setBatch(DateUtils.getDate());
assingEmptyLocBo.setGoodsNo(goodsNo);
assingEmptyLocBo.setVehicheModel(baseGoodsData.getVehicheModel());
assingEmptyLocBo.setTunnel(baseLocation.getTunnel());
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo, null);
if (Result.isOk(locationVoResult)) {
BaseLocationVo baseLocationVo = locationVoResult.getData();
baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class);
}
} else {
//无数据是空托,重新分配货位
AssingEmptyLocBo assingEmptyLocBo = null;
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo, businDataTask.getTunnel());
if (Result.isOk(locationVoResult)) {
BaseLocationVo baseLocationVo = locationVoResult.getData();
baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class);
}
}
}
} else if (tunnel.equals("06") && locationRow.equals("13")) {
if ("1".equals(locationStatus) || "2".equals(locationStatus) || "5".equals(locationStatus)) { if ("1".equals(locationStatus) || "2".equals(locationStatus) || "5".equals(locationStatus)) {
AssingEmptyLocBo assingEmptyLocBo = null; AssingEmptyLocBo assingEmptyLocBo = null;
if (businDataTaskGoodsVos != null && businDataTaskGoodsVos.size()>0) { if (businDataTaskGoodsVos != null && businDataTaskGoodsVos.size() > 0) {
String goodsNo = businDataTaskGoodsVos.get(0).getGoodsNo(); String goodsNo = businDataTaskGoodsVos.get(0).getGoodsNo();
BaseGoodsData baseGoodsData = iBaseGoodsDataService.getBaseGoodsByBarcodes(goodsNo); BaseGoodsData baseGoodsData = iBaseGoodsDataService.getBaseGoodsByBarcodes(goodsNo);
assingEmptyLocBo = new AssingEmptyLocBo(); assingEmptyLocBo = new AssingEmptyLocBo();
@ -1381,7 +1432,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
assingEmptyLocBo.setVehicheModel(baseGoodsData.getVehicheModel()); assingEmptyLocBo.setVehicheModel(baseGoodsData.getVehicheModel());
assingEmptyLocBo.setTunnel(baseLocation.getTunnel()); assingEmptyLocBo.setTunnel(baseLocation.getTunnel());
} }
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo,businDataTask.getTunnel()); Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo, businDataTask.getTunnel());
if (Result.isOk(locationVoResult)) { if (Result.isOk(locationVoResult)) {
BaseLocationVo baseLocationVo = locationVoResult.getData(); BaseLocationVo baseLocationVo = locationVoResult.getData();
baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class); baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class);

@ -287,7 +287,6 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B
String urgencyBefore = null; String urgencyBefore = null;
String urgencyAfter = null; String urgencyAfter = null;
for (String str : dbTableColumnNames) { for (String str : dbTableColumnNames) {
// TODO 中科 测试 需要还原
if (str.equals(ParameterConstants.ParameterSystem.assemble_point_after)) { if (str.equals(ParameterConstants.ParameterSystem.assemble_point_after)) {
urgencyAfter = str; urgencyAfter = str;
} }
@ -295,13 +294,10 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B
if (str.equals(ParameterConstants.ParameterSystem.assemble_point_before)) { if (str.equals(ParameterConstants.ParameterSystem.assemble_point_before)) {
urgencyBefore = str; urgencyBefore = str;
} }
// TODO 中科 测试 需要还原
// TODO 中科 测试 需要删除
// if (str.equals(ParameterConstants.ParameterSystem.assemble_point_before)) { // if (str.equals(ParameterConstants.ParameterSystem.assemble_point_before)) {
// urgencyBefore = str; // urgencyBefore = str;
// urgencyAfter = str; // urgencyAfter = str;
// } // }
// TODO 中科 测试 需要删除
} }
int assemblePointTypeBefore = int assemblePointTypeBefore =

@ -125,15 +125,15 @@ public class DpsCallUtil {
} }
if ("KW22".equals(bo.getStation())){ if ("KW22".equals(bo.getStation())){
writeMap.put("Boolean","false"); writeMap.put("Boolean","false");
allHbMap.put("DB320.2.8", writeMap); allHbMap.put("DB320.3.0", writeMap);
} }
if ("KW24".equals(bo.getStation())){ if ("KW24".equals(bo.getStation())){
writeMap.put("Boolean","false"); writeMap.put("Boolean","false");
allHbMap.put("DB320.2.10", writeMap); allHbMap.put("DB320.3.2", writeMap);
} }
if ("KW26".equals(bo.getStation())){ if ("KW26".equals(bo.getStation())){
writeMap.put("Boolean","false"); writeMap.put("Boolean","false");
allHbMap.put("DB320.2.12", writeMap); allHbMap.put("DB320.3.4", writeMap);
} }
String writePoint = JSON.toJSONString(allHbMap); String writePoint = JSON.toJSONString(allHbMap);
@ -174,7 +174,6 @@ public class DpsCallUtil {
public Result<DpsStatesBo> getDpsStatusTemp(){ public Result<DpsStatesBo> getDpsStatusTemp(){
Result<BaseConsignor> result = iBaseGoodsDataService.getErpConsignorId(); Result<BaseConsignor> result = iBaseGoodsDataService.getErpConsignorId();

@ -853,15 +853,15 @@ public class RCSUtil {
} }
if ("KW22".equals(businDataTask.getTaskPath())) { if ("KW22".equals(businDataTask.getTaskPath())) {
write1.put("Boolean" , "true"); write1.put("Boolean" , "true");
allHbMap.put("DB320.2.8" , write1); allHbMap.put("DB320.3.0" , write1);
} }
if ("KW24".equals(businDataTask.getTaskPath())) { if ("KW24".equals(businDataTask.getTaskPath())) {
write1.put("Boolean" , "true"); write1.put("Boolean" , "true");
allHbMap.put("DB320.2.10" , write1); allHbMap.put("DB320.3.2" , write1);
} }
if ("KW26".equals(businDataTask.getTaskPath())) { if ("KW26".equals(businDataTask.getTaskPath())) {
write1.put("Boolean" , "true"); write1.put("Boolean" , "true");
allHbMap.put("DB320.2.12" , write1); allHbMap.put("DB320.3.4" , write1);
} }
String writePoint = JSON.toJSONString(allHbMap); String writePoint = JSON.toJSONString(allHbMap);
PlcOperate plcOperateWrite = plcInit.getPlcOperateByIp(conn1.getPlcIp()); PlcOperate plcOperateWrite = plcInit.getPlcOperateByIp(conn1.getPlcIp());
@ -1336,15 +1336,15 @@ public class RCSUtil {
} }
if ("KW23".equals(s1)) { if ("KW23".equals(s1)) {
writeMap1.put("Boolean" , "false"); writeMap1.put("Boolean" , "false");
allHbMap.put("DB320.2.9" , writeMap1); allHbMap.put("DB320.3.1" , writeMap1);
} }
if ("KW25".equals(s1)) { if ("KW25".equals(s1)) {
writeMap1.put("Boolean" , "false"); writeMap1.put("Boolean" , "false");
allHbMap.put("DB320.2.11" , writeMap1); allHbMap.put("DB320.3.3" , writeMap1);
} }
if ("KW27".equals(s1)) { if ("KW27".equals(s1)) {
writeMap1.put("Boolean" , "false"); writeMap1.put("Boolean" , "false");
allHbMap.put("DB320.2.13" , writeMap1); allHbMap.put("DB320.3.5" , writeMap1);
} }
} }
if ("2".equals(bo.getSn()) && "completed".equals(bo.getStatus())) { if ("2".equals(bo.getSn()) && "completed".equals(bo.getStatus())) {
@ -1361,17 +1361,17 @@ public class RCSUtil {
writeMap1.put("Boolean" , "true"); writeMap1.put("Boolean" , "true");
allHbMap.put("DB320.2.6" , writeMap1); allHbMap.put("DB320.2.6" , writeMap1);
} }
if ("LY244".equals(s1)) { if ("LY244".equals(s2)) {
writeMap1.put("Boolean" , "true"); writeMap1.put("Boolean" , "true");
allHbMap.put("DB320.2.9" , writeMap1); allHbMap.put("DB320.3.1" , writeMap1);
} }
if ("LY247".equals(s1)) { if ("LY247".equals(s2)) {
writeMap1.put("Boolean" , "true"); writeMap1.put("Boolean" , "true");
allHbMap.put("DB320.2.11" , writeMap1); allHbMap.put("DB320.3.3" , writeMap1);
} }
if ("LY250".equals(s1)) { if ("LY250".equals(s2)) {
writeMap1.put("Boolean" , "true"); writeMap1.put("Boolean" , "true");
allHbMap.put("DB320.2.13" , writeMap1); allHbMap.put("DB320.3.5" , writeMap1);
} }
} }
String writePoint = JSON.toJSONString(allHbMap); String writePoint = JSON.toJSONString(allHbMap);
@ -1386,6 +1386,7 @@ public class RCSUtil {
} }
/** /**
* 呼叫AGV * 呼叫AGV
* *

@ -42,19 +42,32 @@
<select id="selectVinOutboundListOne" resultType="com.shkj.wms.bo.BaseBarcodesOutAddBo" parameterType="com.shkj.wms.bo.BaseBarcodesOutQueryBo"> <select id="selectVinOutboundListOne" resultType="com.shkj.wms.bo.BaseBarcodesOutAddBo" parameterType="com.shkj.wms.bo.BaseBarcodesOutQueryBo">
select id,vin, derive, traverse_date, color, bumper_type, vehicle_code, out_status ,'0' as isUrgent from base_barcodes_out select id,vin, derive, traverse_date, color, bumper_type, vehicle_code, out_status ,'0' as isUrgent from base_barcodes_out
where out_status="0" where out_status="4"
<if test="traverseDate !=null"> <if test="traverseDate !=null">
and traverse_date >= #{traverseDate} and traverse_date >= #{traverseDate}
</if> </if>
<if test="vin !=null and vin !='' "> <if test="endTraverseDate !=null">
and vin=#{vin} and traverse_date &lt;= #{endTraverseDate}
</if> </if>
order by traverse_date asc <if test="bumperType !=null">
limit 1 and bumper_type = #{bumperType}
</if>
<if test="color !=null">
and color = #{color}
</if>
<if test="vehicleCode !=null">
and vehicle_code = #{vehicleCode}
</if>
<if test="vin !=null and vin !='' ">
and vin=#{vin}
</if>
order by traverse_date asc limit 1
</select> </select>
<select id="getBarcodesOutData" resultType="com.shkj.wms.vo.BaseBarcodesOutVo"> <select id="getBarcodesOutData" resultType="com.shkj.wms.vo.BaseBarcodesOutVo">

Loading…
Cancel
Save