|
|
@ -16,9 +16,11 @@ import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
import java.text.SimpleDateFormat; |
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 标签查询服务实现 |
|
|
* 标签查询服务实现 |
|
|
@ -50,8 +52,31 @@ public class LabelQueryServiceImpl implements LabelQueryService { |
|
|
public PageUtils getHandlingUnitLabelListLocation(HandlingUnitDto dto) { |
|
|
public PageUtils getHandlingUnitLabelListLocation(HandlingUnitDto dto) { |
|
|
IPage<HandlingUnitDto> page = labelQueryMapper.getHandlingUnitLabelListLocation( |
|
|
IPage<HandlingUnitDto> page = labelQueryMapper.getHandlingUnitLabelListLocation( |
|
|
new Page<HandlingUnitDto>(dto.getPage(), dto.getSize()), dto); |
|
|
new Page<HandlingUnitDto>(dto.getPage(), dto.getSize()), dto); |
|
|
|
|
|
fillAsrsFloor(page.getRecords()); |
|
|
return new PageUtils(page); |
|
|
return new PageUtils(page); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @Description 根据wcsLocation生成独立立库楼层字段 - rqrq |
|
|
|
|
|
* @param records 查询结果 |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
private void fillAsrsFloor(List<HandlingUnitDto> records) { |
|
|
|
|
|
if (records == null || records.isEmpty()) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
for (HandlingUnitDto item : records) { |
|
|
|
|
|
if (item == null || !StringUtils.hasText(item.getWcsLocation())) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
// rqrq - 按需求只截取wcs_location第1个字符作为立库楼层 |
|
|
|
|
|
String floor = item.getWcsLocation().substring(0, 1); |
|
|
|
|
|
if (!StringUtils.hasText(floor)) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
item.setAsrsFloor( floor ); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
@Override |
|
|
@Override |
|
|
public PageUtils getHandlingUnitLabelAll(HandlingUnitDto dto) { |
|
|
public PageUtils getHandlingUnitLabelAll(HandlingUnitDto dto) { |
|
|
IPage<HandlingUnitDto> page = labelQueryMapper.getHandlingUnitLabelAll( |
|
|
IPage<HandlingUnitDto> page = labelQueryMapper.getHandlingUnitLabelAll( |
|
|
|