地图接口

main
judy 11 months ago
parent 49081454a9
commit a494b2cc7f
  1. 2
      shkj-wms/src/main/java/com/shkj/wms/bo/BaseLocationQueryPageBo.java
  2. 11
      shkj-wms/src/main/java/com/shkj/wms/controller/base/BaseLocationController.java
  3. 3
      shkj-wms/src/main/java/com/shkj/wms/mapper/BaseLocationMapper.java
  4. 4
      shkj-wms/src/main/java/com/shkj/wms/service/IBaseLocationService.java
  5. 11
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java
  6. 2
      shkj-wms/src/main/java/com/shkj/wms/service/impl/SysThirdExceptionRequestServiceImpl.java
  7. 67
      shkj-wms/src/main/java/com/shkj/wms/vo/BaseLocationMapListVo.java
  8. 26
      shkj-wms/src/main/resources/mapper/wms/BaseLocationMapper.xml

@ -56,4 +56,6 @@ public class BaseLocationQueryPageBo extends BaseEntity {
*/
private String isActivity;
private String layer;
}

@ -17,6 +17,7 @@ import com.shkj.wms.common.SwitchStatusEntity;
import com.shkj.wms.service.IBaseLocationService;
import com.shkj.wms.config.ValidList;
import com.shkj.wms.vo.BaseLocationExcelVo;
import com.shkj.wms.vo.BaseLocationMapListVo;
import com.shkj.wms.vo.ImportLocationVo;
import lombok.RequiredArgsConstructor;
import org.apache.commons.io.FilenameUtils;
@ -136,4 +137,14 @@ public class BaseLocationController extends BaseController {
}
return result;
}
/**
* 查询货位--map
*/
@GetMapping("/getBaseLocationForMap")
public TableDataInfo<BaseLocationMapListVo> getBaseLocationForMap(BaseLocationQueryPageBo bo) {
startPage();
List<BaseLocationMapListVo> list = iBaseLocationService.getBaseLocationForMap(bo);
return getDataTable(list);
}
}

@ -5,6 +5,7 @@ import com.shkj.wms.bo.BaseLocationQueryListBo;
import com.shkj.wms.domain.BaseLocation;
import com.shkj.wms.bo.BaseLocationQueryBo;
import com.shkj.wms.bo.BaseLocationQueryPageBo;
import com.shkj.wms.vo.BaseLocationMapListVo;
import com.shkj.wms.vo.BaseLocationRecommendVo;
import com.shkj.wms.vo.BaseLocationVo;
import org.apache.ibatis.annotations.Param;
@ -81,5 +82,7 @@ public interface BaseLocationMapper extends BaseMapper<BaseLocation> {
*/
List<BaseLocationVo> gettunnel(String locationId);
List<BaseLocationMapListVo> getBaseLocationForMap(BaseLocationQueryPageBo bo);
}

@ -6,6 +6,7 @@ import com.shkj.wms.bo.*;
import com.shkj.wms.domain.BaseLocation;
import com.shkj.wms.config.ValidList;
import com.shkj.wms.vo.BaseLocationExcelVo;
import com.shkj.wms.vo.BaseLocationMapListVo;
import com.shkj.wms.vo.BaseLocationVo;
import com.shkj.wms.vo.ImportLocationVo;
@ -169,4 +170,7 @@ public interface IBaseLocationService extends IService<BaseLocation> {
* @return {@code BaseLocation}
*/
BaseLocation getByLocationCode(String locationCode);
List<BaseLocationMapListVo> getBaseLocationForMap(BaseLocationQueryPageBo bo);
}

@ -25,10 +25,7 @@ import com.shkj.wms.mapper.BaseLocationMapper;
import com.shkj.wms.service.*;
import com.shkj.wms.utils.BeanMapperUtils;
import com.shkj.wms.utils.TunnelTaskUtil;
import com.shkj.wms.vo.BaseLocationExcelVo;
import com.shkj.wms.vo.BaseLocationVo;
import com.shkj.wms.vo.ImportLocationVo;
import com.shkj.wms.vo.SysStockDetailVo;
import com.shkj.wms.vo.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -670,9 +667,15 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
return getOne(new LambdaQueryWrapper<BaseLocation>().eq(BaseLocation::getLocationCode, locationCode));
}
@Override
public List<BaseLocationMapListVo> getBaseLocationForMap(BaseLocationQueryPageBo bo) {
return this.baseMapper.getBaseLocationForMap(bo);
}
public List<BaseLocationVo> getTunnel(String goodsId) {
return this.baseMapper.gettunnel(goodsId);
}
}

@ -193,7 +193,7 @@ public class SysThirdExceptionRequestServiceImpl extends ServiceImpl<SysThirdExc
* 做任务 定时任务
*/
@Override
@Scheduled(fixedDelay = 10000)
// @Scheduled(fixedDelay = 10000)
public void doTask() {
LambdaQueryWrapper<SysThirdExceptionRequest> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SysThirdExceptionRequest::getStatus, ThirdApiStatusEnum.fail.getValue());

@ -0,0 +1,67 @@
package com.shkj.wms.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 货位资料视图对象
*
* @author lch
* @date 2022-04-23
*/
@Data
public class BaseLocationMapListVo implements Serializable {
private static final long serialVersionUID = 1L;
private Integer w;
private Integer h;
private Integer x;
private Integer y;
private String i;
private String warehouse;
/**
* 禁用状态
*/
private String isDel;
/**
* 自增id
*/
private Long id;
/**
* 货位ID
*/
private String locationCode;
/**
* 货位名称
*/
private String locationName;
/**
* 巷道
*/
private String tunnel;
/**
* 货位状态
*/
private String locationStatus;
/**
* 货位类型
*/
private String type;
}

@ -383,4 +383,30 @@
</if>
</where>
</select>
<select id="getBaseLocationForMap" resultType="com.shkj.wms.vo.BaseLocationMapListVo"
parameterType="com.shkj.wms.bo.BaseLocationQueryPageBo">
select
1 as w,
1 as h,
loc.location_column as x,
loc.layer as y,
loc.location_code as i,
loc.tunnel as warehouse,
loc.*
from base_location loc
left join base_area area on loc.area_id=area.id
left join base_storage stor on stor.id =area.storage_id
<where>
<if test="layer != null and layer !='' ">
and loc.layer = #{layer}
</if>
<if test="locationMsg != null and locationMsg != ''">
and (loc.location_code like concat('%', #{locationMsg}, '%'))
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save