Commit f76576e6 authored by chew's avatar chew

修改箱码结构1对多 追溯应该是1对1,测试数据有问题导致1对多

parent dc144818
Pipeline #828 failed with stages
......@@ -63,7 +63,7 @@ public class OutboundController {
* @return
*/
@PostMapping("/box/info")
public Result<BoxInfoVo> getBoxInfo(@RequestBody @Valid BoxInfoReq req,
public Result<List<BoxInfoVo>> getBoxInfo(@RequestBody @Valid BoxInfoReq req,
@RequestAttribute("userId") String userId) {
log.info("userid:"+userId+"-----------查询箱码信息:"+req.toString());
return Result.success(outboundOrderService.getBoxInfo(req.getTraceId()));
......@@ -94,7 +94,7 @@ public class OutboundController {
Map<String, Object> map =new HashMap<>();
String type=outboundOrderService.getIdType(req.getCode());
if (StringUtils.isNotEmpty(type)&&"BOX".equals(type)) {
BoxInfoVo data = outboundOrderService.getBoxInfo(req.getCode());
List<BoxInfoVo> data = outboundOrderService.getBoxInfo(req.getCode());
map.put("data",data);
map.put("type","box");
if (data != null){
......
......@@ -7,8 +7,10 @@ import com.ekingwin.tms_app.module.cargo.outbound.vo.BoxInfoVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface OutboundBoxMapper extends BaseMapper<OutboundBox> {
BoxInfoVo selectBoxInfoWithDetails(@Param("traceId") String traceId);
List<BoxInfoVo> selectBoxInfoWithDetails(@Param("traceId") String traceId);
@Select("SELECT PAK_OUTBOUND_SCAN.F_DETECT_SCAN_TYPE(#{id}) FROM DUAL")
String selectIdType(@Param("id") String ID);
......
......@@ -20,7 +20,7 @@ public interface OutboundOrderService {
public List<OutboundOrderDetail> listOrderDetails(String orderNo);
public BoxInfoVo getBoxInfo(String traceId);
public List<BoxInfoVo> getBoxInfo(String traceId);
public String getIdType(String traceId);
public OutboundTracecode getTracecodeInfo(String traceCode);
......
......@@ -73,8 +73,8 @@ public class OutboundOrderServiceImpl implements OutboundOrderService {
// 3. 查询箱信息(含箱内物料)
@Override
public BoxInfoVo getBoxInfo(String traceId) {
BoxInfoVo info = boxMapper.selectBoxInfoWithDetails(traceId);
public List<BoxInfoVo> getBoxInfo(String traceId) {
List<BoxInfoVo> info = boxMapper.selectBoxInfoWithDetails(traceId);
if (info == null) {
throw new RuntimeException("箱号不存在");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment