opt: 托盘信息
This commit is contained in:
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleinfo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -52,4 +53,6 @@ public interface IMdPbStoragevehicleinfoService extends IService<MdPbStoragevehi
|
||||
* @return 实体类
|
||||
*/
|
||||
MdPbStoragevehicleinfo getByCode(String storagevehicle_code);
|
||||
|
||||
List<MdPbStoragevehicleinfo> getCanUseEmptyVehicle();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.nl.wms.basedata_manage.service.dao.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleinfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具信息表 Mapper 接口
|
||||
@@ -13,4 +15,5 @@ import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleinfo;
|
||||
*/
|
||||
public interface MdPbStoragevehicleinfoMapper extends BaseMapper<MdPbStoragevehicleinfo> {
|
||||
|
||||
List<MdPbStoragevehicleinfo> getCanUseEmptyVehicle();
|
||||
}
|
||||
|
||||
@@ -2,4 +2,13 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleinfoMapper">
|
||||
|
||||
<select id="getCanUseEmptyVehicle"
|
||||
resultType="org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleinfo">
|
||||
SELECT
|
||||
v.*
|
||||
FROM
|
||||
`md_pb_storagevehicleinfo` v
|
||||
WHERE v.storagevehicle_type = '10' AND v.is_used = '1' AND v.is_delete = '0'
|
||||
AND 0 = (SELECT COUNT(*) FROM md_pb_groupplate g WHERE g.storagevehicle_code = v.storagevehicle_code AND g.`status` <![CDATA[ <> ]]> '03')
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -136,4 +137,9 @@ public class MdPbStoragevehicleinfoServiceImpl extends ServiceImpl<MdPbStorageve
|
||||
}
|
||||
return one;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MdPbStoragevehicleinfo> getCanUseEmptyVehicle() {
|
||||
return this.baseMapper.getCanUseEmptyVehicle();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.Data;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
@@ -21,7 +20,6 @@ import org.nl.wms.sch_manage.service.util.AbstractTask;
|
||||
import org.nl.wms.sch_manage.service.util.TaskFactory;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.redisson.executor.TasksService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -116,4 +116,9 @@ public class PdaJBController {
|
||||
public ResponseEntity<Object> suppList(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaJBService.suppList(whereJson), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/vehicleList")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> vehicleList(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaJBService.vehicleList(whereJson), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,4 +62,6 @@ public interface PdaJBService {
|
||||
PdaResponse combination(JSONObject param);
|
||||
|
||||
PdaResponse suppList(JSONObject param);
|
||||
|
||||
PdaResponse vehicleList(JSONObject param);
|
||||
}
|
||||
|
||||
@@ -818,6 +818,16 @@ public class PdaJBServiceImpl implements PdaJBService {
|
||||
return PdaResponse.requestParamOk(collect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse vehicleList(JSONObject param) {
|
||||
List<MdPbStoragevehicleinfo> vehicles = storagevehicleinfoService.getCanUseEmptyVehicle();
|
||||
List<SelectItemVo> selectList = new ArrayList<>();
|
||||
vehicles.forEach(r ->
|
||||
selectList.add(SelectItemVo.builder().text(r.getStoragevehicle_code()).value(r.getStoragevehicle_code()).build())
|
||||
);
|
||||
return PdaResponse.requestParamOk(selectList);
|
||||
}
|
||||
|
||||
private Map<String, Object> buildTaskData(String pointCode, String workorderId, String invId) {
|
||||
Map<String, Object> jsonMst = new HashMap<>();
|
||||
// ru库点
|
||||
|
||||
Reference in New Issue
Block a user