20240822服务器代码最新代码

main
daiweihong 1 year ago
parent 82f65b06c7
commit b6e5ce793b
  1. 12
      shkj-wms/src/main/java/com/shkj/wms/mapper/BaseLocationMapper.java
  2. 4
      shkj-wms/src/main/java/com/shkj/wms/mapper/SysStockDetailMapper.java
  3. 12
      shkj-wms/src/main/java/com/shkj/wms/outbound/SchedulingOutboundInfo.java
  4. 3
      shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTask.java
  5. 2
      shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTmpTask.java
  6. 4
      shkj-wms/src/main/java/com/shkj/wms/scheduled/AllocationTasksUtils.java
  7. 2
      shkj-wms/src/main/java/com/shkj/wms/service/IBasRuleDetailService.java
  8. 2
      shkj-wms/src/main/java/com/shkj/wms/service/IBaseGoodsDataService.java
  9. 8
      shkj-wms/src/main/java/com/shkj/wms/service/IBaseLocationService.java
  10. 8
      shkj-wms/src/main/java/com/shkj/wms/service/IBusinDataTaskDetailService.java
  11. 2
      shkj-wms/src/main/java/com/shkj/wms/service/IBusinEnptyContainerService.java
  12. 2
      shkj-wms/src/main/java/com/shkj/wms/service/IBusinPickupDtlService.java
  13. 6
      shkj-wms/src/main/java/com/shkj/wms/service/IPutInOutStorageService.java
  14. 10
      shkj-wms/src/main/java/com/shkj/wms/service/ISysStockDetailService.java
  15. 2
      shkj-wms/src/main/java/com/shkj/wms/service/ISysStockService.java
  16. 29
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseBarcodesInServiceImpl.java

@ -75,12 +75,12 @@ public interface BaseLocationMapper extends BaseMapper<BaseLocation> {
* @param bo
* @return
*/
List<BaseLocationVo> queryBaseLocationListByDerive( BaseLocationQueryListBo bo);
List<BaseLocationVo> queryBaseLocationListByDerive1( BaseLocationQueryListBo bo);
List<BaseLocationVo> queryBaseLocationListByDerive(BaseLocationQueryListBo bo);
List<BaseLocationVo> queryBaseLocationListByDerive1(BaseLocationQueryListBo bo);
List<BaseLocationVo> getLocationByAreaId( Long areaId);
List<BaseLocationVo> getLocationByAreaId(Long areaId);
List<BaseLocationVo> getLocationByAreaIdTunel( BaseLocationQueryBo bo);
List<BaseLocationVo> getLocationByAreaIdTunel(BaseLocationQueryBo bo);
/**
* 获取 异常冲孔出库货位数据
@ -89,7 +89,7 @@ public interface BaseLocationMapper extends BaseMapper<BaseLocation> {
* @param areaId
* @return java.util.List<com.shkj.wms.vo.BaseLocationVo>
*/
List<BaseLocationVo> getOutLocationByAreaId( Long areaId);
List<BaseLocationVo> getOutLocationByAreaId(Long areaId);
/**
*根据库位id查询巷道信息
* @param goodsNo
@ -99,7 +99,7 @@ public interface BaseLocationMapper extends BaseMapper<BaseLocation> {
List<BaseLocationVo> getEmptyContainerFromLocation(Long areaId);
List<BaseLocationVo> queryBaseLocationListByGoods( BaseLocationQueryListBo bo);
List<BaseLocationVo> queryBaseLocationListByGoods(BaseLocationQueryListBo bo);
List<BaseLocationVo> getBaseLocationForMap(BaseLocationQueryPageBo bo);

@ -34,13 +34,13 @@ public interface SysStockDetailMapper extends BaseMapper<SysStockDetail> {
* @param goodsNo
* @return
*/
Map<String,String> getInventoryInStockByGoods(List<String> goodsNoList,String goodsNo);
Map<String,String> getInventoryInStockByGoods(List<String> goodsNoList, String goodsNo);
int updateSysStockDetail(SysStockReduceBo bo);
List<SysStockDetail> getStockDetailByLocationId(String id);
List<SysStockDetail> selectsystock(@Param("GoodsNos")List<String> GoodsNos, @Param("locationid") Long locationid);
List<SysStockDetail> selectsystock(@Param("GoodsNos") List<String> GoodsNos, @Param("locationid") Long locationid);
void deleteBySysStockByLocationId(@Param("locationId") Long locationId);

@ -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);
});

@ -22,6 +22,6 @@ public interface IBasRuleDetailService extends IService<BasRuleDetail> {
/**
* 新增编码规则
*/
Boolean saveBatchRuleDetail (List<BasRuleDetail> bo);
Boolean saveBatchRuleDetail(List<BasRuleDetail> bo);
}

@ -81,6 +81,6 @@ public interface IBaseGoodsDataService extends IService<BaseGoodsData> {
List<BaseGoodsData> getbaseGooddata(BaseGoodsData goodsData);
List<BaseGoodsData> getBaseGoodDataInByDerice(BaseDerive baseDerive);
List<BaseGoodsData> getBaseGoodDatarear (BaseDerive baseDerive);
List<BaseGoodsData> getBaseGoodDatarear(BaseDerive baseDerive);
}

@ -97,7 +97,7 @@ public interface IBaseLocationService extends IService<BaseLocation> {
*/
List<BaseLocationVo> queryBaseLocationList(BaseLocationQueryPageBo bo);
BaseLocation queryBaseLocationByrcl(String locationRow,String locationCol,String layer,String tunnel);
BaseLocation queryBaseLocationByrcl(String locationRow, String locationCol, String layer, String tunnel);
/**
@ -145,7 +145,7 @@ public interface IBaseLocationService extends IService<BaseLocation> {
* @param vehicheModel
* @return
*/
Result<BaseLocationVo> assignEmptyLocation(String vehicheModel,String color ,String batch,List<BusinDataTaskGoodsVo> businDataTaskGoodsVos);
Result<BaseLocationVo> assignEmptyLocation(String vehicheModel, String color, String batch, List<BusinDataTaskGoodsVo> businDataTaskGoodsVos);
/**
* 根据产品查找库内库存数量最少的巷道
@ -154,10 +154,10 @@ public interface IBaseLocationService extends IService<BaseLocation> {
* @param businDataTaskGoodsVos
* @return
*/
Result<BaseLocationVo> assignEmptyLocationByStock( String goodsNo,String vehicheModel, String batch,List<BusinDataTaskGoodsVo> businDataTaskGoodsVos);
Result<BaseLocationVo> assignEmptyLocationByStock(String goodsNo, String vehicheModel, String batch, List<BusinDataTaskGoodsVo> businDataTaskGoodsVos);
Result<BaseLocationVo> assignEmptyLocationAll(AssingEmptyLocBo assingEmptyLocBo,String tunnel);
Result<BaseLocationVo> assignEmptyLocationAll(AssingEmptyLocBo assingEmptyLocBo, String tunnel);
/**
* 冲孔杠分配货位

@ -29,15 +29,15 @@ public interface IBusinDataTaskDetailService extends IService<BusinDataTaskDetai
public Result<Boolean> insertBusinTaskDetail(BusinDataTaskDetail businDataTaskDetail);
/**
*
*
* @author Comair
* @date 2023/7/30 15:07
* @param oldLocationId
* @param newLocation
* @param newLocation
* @return boolean
*/
public int updateInfoByLocationCode(Long oldLocationId,Long newLocation );
public int updateInfoByLocationCode(Long oldLocationId, Long newLocation);
public int updateOld(Long oldLocationId);
public int updateNew(Long newLocation );
public int updateNew(Long newLocation);
}

@ -21,7 +21,7 @@ public interface IBusinEnptyContainerService extends IService<BaseContainer> {
* @param containerCode 治具编号
* @return 结果
*/
public Result<Boolean> emptyContainerFlowDir(String fromPoint,Long containerCode,String taskCode,String agvtype);
public Result<Boolean> emptyContainerFlowDir(String fromPoint, Long containerCode, String taskCode, String agvtype);
/**
* 空治具出库流程

@ -20,5 +20,5 @@ public interface IBusinPickupDtlService extends IService<BusinPickupDtl> {
* @param dtlList
* @return 结果
*/
public Boolean saveBusinPickupDtl(List<BusinPickupDtl> dtlList );
public Boolean saveBusinPickupDtl(List<BusinPickupDtl> dtlList);
}

@ -19,7 +19,7 @@ import java.util.List;
public interface IPutInOutStorageService extends IService<BasePointDevice> {
/** 自动入库*/
public Result<Long > saveBusinBillTaskData(MachineHandAddBo bo,String type);
public Result<Long > saveBusinBillTaskData(MachineHandAddBo bo, String type);
/**
* 下挂生成相关任务
@ -41,7 +41,7 @@ public interface IPutInOutStorageService extends IService<BasePointDevice> {
* @param billTaskAddbo
* @return
*/
public Result<Boolean> saveBillTaskIn(BillTaskAddbo billTaskAddbo,String type);
public Result<Boolean> saveBillTaskIn(BillTaskAddbo billTaskAddbo, String type);
public Result<Boolean> queryderiveId(BillTaskAddbo billTaskAddbo);
@ -57,5 +57,5 @@ public interface IPutInOutStorageService extends IService<BasePointDevice> {
/**
* 部分取货减去库存
*/
public Result<Boolean> reduceInventory(Long taskId,List<String> goods);
public Result<Boolean> reduceInventory(Long taskId, List<String> goods);
}

@ -76,7 +76,7 @@ public interface ISysStockDetailService extends IService<SysStockDetail> {
* @param goods 入库产品信息
* @return
*/
Result<Boolean> productDepositDetail(Long locationId, Long containerId, String batch, String isPuch, List<Map<String, String>> goods,Long storageCode);
Result<Boolean> productDepositDetail(Long locationId, Long containerId, String batch, String isPuch, List<Map<String, String>> goods, Long storageCode);
/**
@ -88,7 +88,7 @@ public interface ISysStockDetailService extends IService<SysStockDetail> {
* @param goods
* @return
*/
Result<Boolean> reduceInventoryDetail(Long branchId, Long locationId, Long storageId,Long areaId, List<Map<String, String>> goods);
Result<Boolean> reduceInventoryDetail(Long branchId, Long locationId, Long storageId, Long areaId, List<Map<String, String>> goods);
/**
* 库存查询
@ -99,12 +99,12 @@ public interface ISysStockDetailService extends IService<SysStockDetail> {
/**
* 修改信息
*/
Result<Boolean> updateStock(BaseGoodsData goodsData,String id);
Result<Boolean> updateStock(BaseGoodsData goodsData, String id);
/**
* 库位调整
*/
Result<Boolean> removeLocation(String oldLocation, String newLoaction,String id,String newid);
Result<Boolean> removeLocation(String oldLocation, String newLoaction, String id, String newid);
/**
* 查询货位
@ -113,7 +113,7 @@ public interface ISysStockDetailService extends IService<SysStockDetail> {
List<SysStockDetailVo> getLocation(List<String> goodsnoList);
List<SysStockDetail> selectsystock(List<String> goods,Long locationid);
List<SysStockDetail> selectsystock(List<String> goods, Long locationid);
/**
* 扣减库存信息

@ -67,7 +67,7 @@ public interface ISysStockService extends IService<SysStock> {
* @param goods 入库产品信息
* @return
*/
Result<Boolean> productDeposit(Long locationId, Long containerId, String batch, String isPuch, List<Map<String, String>> goods,Long storageCode);
Result<Boolean> productDeposit(Long locationId, Long containerId, String batch, String isPuch, List<Map<String, String>> goods, Long storageCode);
/**

@ -166,20 +166,22 @@ public class BaseBarcodesInServiceImpl extends ServiceImpl<BaseBarcodesInMapper,
one = getOne(wrapper);
}
String color = bo.getColor();
String isPunching = "0";
String isSplit = "0";
String punchingResult = "0";
if (bo.getIsPunching() == true) {
isPunching = "1";
}
if (bo.getIsSplit() == true) {
isSplit = "1";
}
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());
String isPunching = "0";
String isSplit = "0";
String punchingResult = "0";
if (bo.getIsPunching() == true) {
isPunching = "1";
}
if (bo.getIsSplit() == true) {
isSplit = "1";
}
if (bo.getPunchingResult() == true) {
punchingResult = "1";
}
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