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 { ...@@ -63,7 +63,7 @@ public class OutboundController {
* @return * @return
*/ */
@PostMapping("/box/info") @PostMapping("/box/info")
public Result<BoxInfoVo> getBoxInfo(@RequestBody @Valid BoxInfoReq req, public Result<List<BoxInfoVo>> getBoxInfo(@RequestBody @Valid BoxInfoReq req,
@RequestAttribute("userId") String userId) { @RequestAttribute("userId") String userId) {
log.info("userid:"+userId+"-----------查询箱码信息:"+req.toString()); log.info("userid:"+userId+"-----------查询箱码信息:"+req.toString());
return Result.success(outboundOrderService.getBoxInfo(req.getTraceId())); return Result.success(outboundOrderService.getBoxInfo(req.getTraceId()));
...@@ -94,7 +94,7 @@ public class OutboundController { ...@@ -94,7 +94,7 @@ public class OutboundController {
Map<String, Object> map =new HashMap<>(); Map<String, Object> map =new HashMap<>();
String type=outboundOrderService.getIdType(req.getCode()); String type=outboundOrderService.getIdType(req.getCode());
if (StringUtils.isNotEmpty(type)&&"BOX".equals(type)) { 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("data",data);
map.put("type","box"); map.put("type","box");
if (data != null){ if (data != null){
......
...@@ -7,8 +7,10 @@ import com.ekingwin.tms_app.module.cargo.outbound.vo.BoxInfoVo; ...@@ -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.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface OutboundBoxMapper extends BaseMapper<OutboundBox> { 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") @Select("SELECT PAK_OUTBOUND_SCAN.F_DETECT_SCAN_TYPE(#{id}) FROM DUAL")
String selectIdType(@Param("id") String ID); String selectIdType(@Param("id") String ID);
......
...@@ -20,7 +20,7 @@ public interface OutboundOrderService { ...@@ -20,7 +20,7 @@ public interface OutboundOrderService {
public List<OutboundOrderDetail> listOrderDetails(String orderNo); public List<OutboundOrderDetail> listOrderDetails(String orderNo);
public BoxInfoVo getBoxInfo(String traceId); public List<BoxInfoVo> getBoxInfo(String traceId);
public String getIdType(String traceId); public String getIdType(String traceId);
public OutboundTracecode getTracecodeInfo(String traceCode); public OutboundTracecode getTracecodeInfo(String traceCode);
......
...@@ -73,8 +73,8 @@ public class OutboundOrderServiceImpl implements OutboundOrderService { ...@@ -73,8 +73,8 @@ public class OutboundOrderServiceImpl implements OutboundOrderService {
// 3. 查询箱信息(含箱内物料) // 3. 查询箱信息(含箱内物料)
@Override @Override
public BoxInfoVo getBoxInfo(String traceId) { public List<BoxInfoVo> getBoxInfo(String traceId) {
BoxInfoVo info = boxMapper.selectBoxInfoWithDetails(traceId); List<BoxInfoVo> info = boxMapper.selectBoxInfoWithDetails(traceId);
if (info == null) { if (info == null) {
throw new RuntimeException("箱号不存在"); 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