Merge remote-tracking branch 'origin/feature/NoScanning' into feature/NoScanning
This commit is contained in:
commit
b6ab5205f7
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.nflg.wms.admin.pojo.request;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class NoScanningItemDataRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
private BigDecimal num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
private String batchNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 序列号
|
||||||
|
*/
|
||||||
|
private String serialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库位
|
||||||
|
*/
|
||||||
|
private String binNo;
|
||||||
|
}
|
||||||
|
|
@ -1,31 +1,33 @@
|
||||||
package com.nflg.wms.admin.pojo.request;
|
package com.nflg.wms.admin.pojo.request;
|
||||||
|
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class NoScanningItemRequest {
|
public class NoScanningItemRequest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数量
|
* 订单项ID
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
private BigDecimal num;
|
private Long orderItemId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批次号
|
* 物料编号
|
||||||
*/
|
*/
|
||||||
private String batchNo;
|
@NotBlank
|
||||||
|
private String materialNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 序列号
|
* 明细列表
|
||||||
*/
|
*/
|
||||||
private String serialNo;
|
@Valid
|
||||||
|
@NotEmpty
|
||||||
/**
|
private List<NoScanningItemDataRequest> datas;
|
||||||
* 库位
|
|
||||||
*/
|
|
||||||
private String binNo;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,20 +12,17 @@ import java.util.List;
|
||||||
public class NoScanningRequest {
|
public class NoScanningRequest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单项ID
|
* 订单id
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
private Long orderItemId;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料编号
|
* 库存地点编号
|
||||||
*/
|
*/
|
||||||
@NotBlank
|
@NotBlank
|
||||||
private String materialNo;
|
private String warehouseNo;
|
||||||
|
|
||||||
/**
|
|
||||||
* 明细列表
|
|
||||||
*/
|
|
||||||
@Valid
|
@Valid
|
||||||
@NotEmpty
|
@NotEmpty
|
||||||
private List<NoScanningItemRequest> items;
|
private List<NoScanningItemRequest> items;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public class NoScanningBaseControllerService {
|
||||||
* @param materialNo 物料编号
|
* @param materialNo 物料编号
|
||||||
* @return 是否生成过二维码
|
* @return 是否生成过二维码
|
||||||
*/
|
*/
|
||||||
protected boolean existsQrCode(String materialNo) {
|
public boolean existsQrCode(String materialNo) {
|
||||||
return qrCodeMasterService.lambdaQuery()
|
return qrCodeMasterService.lambdaQuery()
|
||||||
.eq(WmsQrCodeMaster::getMaterialCode, materialNo)
|
.eq(WmsQrCodeMaster::getMaterialCode, materialNo)
|
||||||
.exists();
|
.exists();
|
||||||
|
|
@ -37,7 +37,7 @@ public class NoScanningBaseControllerService {
|
||||||
* @param warehouseNo 仓库编号
|
* @param warehouseNo 仓库编号
|
||||||
* @return 数量是否一致
|
* @return 数量是否一致
|
||||||
*/
|
*/
|
||||||
protected boolean quantityConsistencyCheck(String materialNo, String factoryNo, String warehouseNo) {
|
public boolean quantityConsistencyCheck(String materialNo, String factoryNo, String warehouseNo) {
|
||||||
BigDecimal quantityQr = qrCodeMasterService.lambdaQuery()
|
BigDecimal quantityQr = qrCodeMasterService.lambdaQuery()
|
||||||
.select(WmsQrCodeMaster::getQuantity)
|
.select(WmsQrCodeMaster::getQuantity)
|
||||||
.eq(WmsQrCodeMaster::getMaterialCode, materialNo)
|
.eq(WmsQrCodeMaster::getMaterialCode, materialNo)
|
||||||
|
|
@ -66,7 +66,7 @@ public class NoScanningBaseControllerService {
|
||||||
* @param factoryNo 工厂编号
|
* @param factoryNo 工厂编号
|
||||||
* @param warehouseNo 仓库编号
|
* @param warehouseNo 仓库编号
|
||||||
*/
|
*/
|
||||||
protected void qrCodeCreateTask(String materialNo,String factoryNo, String warehouseNo){
|
public void qrCodeCreateTask(String materialNo,String factoryNo, String warehouseNo){
|
||||||
if (!quantityConsistencyCheck(materialNo, factoryNo, warehouseNo)) {
|
if (!quantityConsistencyCheck(materialNo, factoryNo, warehouseNo)) {
|
||||||
//TODO 给仓库负责人创建补码的待办任务
|
//TODO 给仓库负责人创建补码的待办任务
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue