Merge branch 'feature/bug-776' into develop
This commit is contained in:
commit
534451400f
|
|
@ -110,12 +110,12 @@ public class OutPurchaseController extends BaseController {
|
||||||
item.setWerks(request.getWerks());
|
item.setWerks(request.getWerks());
|
||||||
if (CollectionUtil.isNotEmpty(it.getQrCodes())) {
|
if (CollectionUtil.isNotEmpty(it.getQrCodes())) {
|
||||||
it.getQrCodes().forEach(qrCode -> {
|
it.getQrCodes().forEach(qrCode -> {
|
||||||
MaterialQRCodeContentDTO dto = NoUtil.getMaterialQRCodeContent(qrCode);
|
MaterialQRCodeContentDTO dto = NoUtil.getMaterialQRCodeContent(qrCode.getContent());
|
||||||
VUtil.trueThrowBusinessError(!StrUtil.equals(dto.getMaterialNo(), it.getMatnr()))
|
VUtil.trueThrowBusinessError(!StrUtil.equals(dto.getMaterialNo(), it.getMatnr()))
|
||||||
.throwMessage("物料" + it.getMatnr() + "与二维码不匹配");
|
.throwMessage("物料" + it.getMatnr() + "与二维码不匹配");
|
||||||
VUtil.trueThrowBusinessError(!check(dto, it.getCharg(), it.getSernrs()))
|
VUtil.trueThrowBusinessError(!check(dto, it.getCharg(), it.getSernrs()))
|
||||||
.throwMessage("物料" + it.getMatnr() + "包含不符合批次号和序列号的扫码记录");
|
.throwMessage("物料" + it.getMatnr() + "包含不符合批次号和序列号的扫码记录");
|
||||||
item.setNum(item.getNum().add(dto.getNum()));
|
item.setNum(item.getNum().add(qrCode.getNum()));
|
||||||
records.add(new OutMaterialScanRecord()
|
records.add(new OutMaterialScanRecord()
|
||||||
.setSource(6)
|
.setSource(6)
|
||||||
.setSourceId(order.getId())
|
.setSourceId(order.getId())
|
||||||
|
|
@ -123,7 +123,7 @@ public class OutPurchaseController extends BaseController {
|
||||||
.setTicketId(order.getId())
|
.setTicketId(order.getId())
|
||||||
.setTicketItemId(item.getId())
|
.setTicketItemId(item.getId())
|
||||||
.setMaterialNo(dto.getMaterialNo())
|
.setMaterialNo(dto.getMaterialNo())
|
||||||
.setContent(qrCode)
|
.setContent(qrCode.getContent())
|
||||||
.setBatchNo(dto.getBatchNo())
|
.setBatchNo(dto.getBatchNo())
|
||||||
.setSerialNo(dto.getSerialNo())
|
.setSerialNo(dto.getSerialNo())
|
||||||
.setUniqNo(dto.getUniqNo())
|
.setUniqNo(dto.getUniqNo())
|
||||||
|
|
@ -138,10 +138,10 @@ public class OutPurchaseController extends BaseController {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
VUtil.trueThrowBusinessError(it.getNum().compareTo(item.getTemng()) > 0)
|
// VUtil.trueThrowBusinessError(it.getNum().compareTo(item.getTemng()) > 0)
|
||||||
.throwMessage("物料" + it.getMatnr() + "的扫码数量大于退货数量");
|
// .throwMessage("物料" + it.getMatnr() + "的扫码数量大于退货数量");
|
||||||
VUtil.trueThrowBusinessError(item.getNum().compareTo(it.getNum()) != 0)
|
// VUtil.trueThrowBusinessError(item.getNum().compareTo(it.getNum()) != 0)
|
||||||
.throwMessage("物料" + it.getMatnr() + "的扫码数量不一致");
|
// .throwMessage("物料" + it.getMatnr() + "的扫码数量不一致");
|
||||||
items.add(item);
|
items.add(item);
|
||||||
if (item.getNum().compareTo(BigDecimal.ZERO) > 0) {
|
if (item.getNum().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
input1.add(new ZWM3A06Input1DTO()
|
input1.add(new ZWM3A06Input1DTO()
|
||||||
|
|
@ -149,7 +149,7 @@ public class OutPurchaseController extends BaseController {
|
||||||
.setRetpo(it.getRetpo())
|
.setRetpo(it.getRetpo())
|
||||||
.setMatnr(it.getMatnr())
|
.setMatnr(it.getMatnr())
|
||||||
.setMaktx(it.getMaktx())
|
.setMaktx(it.getMaktx())
|
||||||
.setErfmg(it.getNum())
|
.setErfmg(item.getNum())
|
||||||
.setMeins(it.getMeins())
|
.setMeins(it.getMeins())
|
||||||
.setCharg(it.getCharg())
|
.setCharg(it.getCharg())
|
||||||
.setWerks(item.getWerks())
|
.setWerks(item.getWerks())
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,14 @@
|
||||||
package com.nflg.wms.common.pojo.qo;
|
package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class QRCodeQO {
|
public class QRCodeQO extends QRCodeQO1 {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项id
|
* 项id
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
private Long itemId;
|
private Long itemId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 二维码内容
|
|
||||||
*/
|
|
||||||
@NotBlank
|
|
||||||
private String content;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数量
|
|
||||||
*/
|
|
||||||
@NotNull
|
|
||||||
private BigDecimal num;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class QRCodeQO1 {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二维码内容
|
||||||
|
*/
|
||||||
|
@NotBlank
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
private BigDecimal num;
|
||||||
|
}
|
||||||
|
|
@ -2,13 +2,13 @@ package com.nflg.wms.common.pojo.vo;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.nflg.wms.common.pojo.qo.QRCodeQO1;
|
||||||
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.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|
@ -89,17 +89,17 @@ public class ZWM3A05ItemVO {
|
||||||
*/
|
*/
|
||||||
private String binNos;
|
private String binNos;
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 实际退货数量(扫码后计算)
|
// * 实际退货数量(扫码后计算)
|
||||||
*/
|
// */
|
||||||
private BigDecimal num;
|
// private BigDecimal num;
|
||||||
|
//
|
||||||
public BigDecimal getNum() {
|
// public BigDecimal getNum() {
|
||||||
return Optional.ofNullable(num).orElse(BigDecimal.ZERO);
|
// return Optional.ofNullable(num).orElse(BigDecimal.ZERO);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 二维码列表
|
* 二维码列表
|
||||||
*/
|
*/
|
||||||
private List<String> qrCodes = new ArrayList<>();
|
private List<QRCodeQO1> qrCodes = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue