Browse Source

2024/07/02

master
qiezi 1 year ago
parent
commit
f3980edd2e
  1. 7
      src/main/java/com/spring/modules/shipment/service/impl/ShipmentRollServiceImpl.java

7
src/main/java/com/spring/modules/shipment/service/impl/ShipmentRollServiceImpl.java

@ -20,6 +20,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.PatternMatchUtils;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
@ -283,8 +284,12 @@ public class ShipmentRollServiceImpl extends ServiceImpl<ShipmentRollMapper, Shi
// 查询 缓存表数据
return baseMapper.queryShipmentRollVoList(shipmentVo);
}
// String reg = "^\\d+$";
return baseMapper.queryTransDetailsub(shipmentVo).stream().map(item->{
if (!item.getBoxNoStr().contains("-")){
// if (!PatternMatchUtils.simpleMatch(reg, item.getBoxNoStr())){
// item.setBoxNoStr(shipmentVo.getShipmentId() + "-" + String.format("%03d", Integer.parseInt(item.getBoxNoStr())));
// }
if (!item.getBoxNoStr().contains("-")){// 如果有误使用正则表达式
item.setBoxNoStr(shipmentVo.getShipmentId() + "-" + String.format("%03d", Integer.parseInt(item.getBoxNoStr())));
}
return item;

Loading…
Cancel
Save