Compare commits
No commits in common. "a4f3dff2e1e5ff7bb218cc7c9ae6407a7ef1da92" and "9788e08fcff1cd81dc6e52332f7cea32ca32717f" have entirely different histories.
a4f3dff2e1
...
9788e08fcf
|
|
@ -287,40 +287,4 @@ public class QrCodeMasterController extends BaseController {
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 物料出入库统一扫码接口
|
|
||||||
*
|
|
||||||
* @param request
|
|
||||||
* @return
|
|
||||||
* @author
|
|
||||||
* */
|
|
||||||
@PostMapping("pda/scan")
|
|
||||||
@ApiMark(moduleName = "扫码", apiName = "扫码获取扫码信息")
|
|
||||||
public ApiResult<QrCodeVO> scan(@Valid @RequestBody QRCodeSearchQO request) {
|
|
||||||
WmsQrCodeMaster qrCodeMaster = qrCodeMasterService.lambdaQuery()
|
|
||||||
.eq(WmsQrCodeMaster::getBarcodeCode, request.getPackageCode())
|
|
||||||
.eq(WmsQrCodeMaster::getProcessStage, request.getProcessStage())
|
|
||||||
.one();
|
|
||||||
//判断是否为有效码
|
|
||||||
VUtil.trueThrowBusinessError(ObjectUtil.isNull(qrCodeMaster)).throwMessage("无效码");
|
|
||||||
QrCodeVO qrCodeVO = Convert.convert(QrCodeVO.class, qrCodeMaster);
|
|
||||||
if (qrCodeMaster.getPackagingType() == 1) {
|
|
||||||
// 查询子条形码并累加其数量
|
|
||||||
List<WmsQrCodeMaster> qrCodeMasters = qrCodeMasterService.lambdaQuery()
|
|
||||||
.eq(WmsQrCodeMaster::getParentBarcodeId, qrCodeMaster.getId())
|
|
||||||
.eq(WmsQrCodeMaster::getProcessStage, request.getProcessStage())
|
|
||||||
.list();
|
|
||||||
VUtil.trueThrowBusinessError(ObjectUtil.isNull(qrCodeMasters))
|
|
||||||
.throwMessage("此箱[" + request.getPackageCode() + "]为空箱");
|
|
||||||
|
|
||||||
|
|
||||||
BigDecimal quantity = qrCodeMasters.stream().map(WmsQrCodeMaster::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
||||||
qrCodeVO.setQuantity(quantity);
|
|
||||||
List<QrCodeVO> qrCodeVOS = Convert.toList(QrCodeVO.class, qrCodeMasters);
|
|
||||||
qrCodeVO.setChildrenCode(qrCodeVOS);
|
|
||||||
}
|
|
||||||
return ApiResult.success(qrCodeVO);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
package com.nflg.wms.common.pojo.qo;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Accessors(chain = true)
|
|
||||||
public class QRCodeSearchQO {
|
|
||||||
/**
|
|
||||||
* 包装编号
|
|
||||||
*/
|
|
||||||
@NotNull
|
|
||||||
@NotBlank
|
|
||||||
private String packageCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unpackaged((short) 0, "未装箱"),
|
|
||||||
* Packaged((short) 1, "已装箱"),
|
|
||||||
* UnLoaded((short) 2, "未打包"),
|
|
||||||
* Loaded((short) 3, "已打包"),
|
|
||||||
* Received ((short) 4, "已收货"),
|
|
||||||
* Checking((short) 5, "质检中"),
|
|
||||||
* InBound((short) 6, "已入库"),
|
|
||||||
* OutBound((short) 7, "已出库"), //已被使用,只有退库的时候才会被重新激活
|
|
||||||
* Hold((short) 8, "已挂起");// 用于仓库转储,出库之后此二维码还需要继续使用,用一个特殊的状态标记
|
|
||||||
*/
|
|
||||||
private Short processStage;
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue