入库修改
This commit is contained in:
@@ -29,6 +29,8 @@ public class ConsInOutStockBodyParam implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@NotNull(message = "耗材id不能为空", groups = DefaultGroup.class)
|
@NotNull(message = "耗材id不能为空", groups = DefaultGroup.class)
|
||||||
private String conId;
|
private String conId;
|
||||||
|
|
||||||
|
private String failReason;
|
||||||
/**
|
/**
|
||||||
* 耗材名称
|
* 耗材名称
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -99,8 +99,14 @@
|
|||||||
ConsInfo consInfo;
|
ConsInfo consInfo;
|
||||||
if (StrUtil.isBlank(entity.getConId())) {
|
if (StrUtil.isBlank(entity.getConId())) {
|
||||||
consInfo = consInfoMapper.selectOneByQuery(new QueryWrapper().like(ConsInfo::getConName, entity.getConName())
|
consInfo = consInfoMapper.selectOneByQuery(new QueryWrapper().like(ConsInfo::getConName, entity.getConName())
|
||||||
.eq(ConsInfo::getConUnit, entity.getUnitName())
|
|
||||||
.eq(ConsInfo::getShopId, shopId).limit(1));
|
.eq(ConsInfo::getShopId, shopId).limit(1));
|
||||||
|
if (consInfo == null) {
|
||||||
|
entity.setFailReason("耗材不存在");
|
||||||
|
}else if (!consInfo.getConUnit().equals(entity.getUnitName())) {
|
||||||
|
entity.setFailReason("耗材单位不匹配");
|
||||||
|
consInfo = null;
|
||||||
|
}
|
||||||
|
|
||||||
entity.setConId(consInfo == null ? null : consInfo.getId().toString());
|
entity.setConId(consInfo == null ? null : consInfo.getId().toString());
|
||||||
consStockFlow.setConId(consInfo == null ? null : consInfo.getId());
|
consStockFlow.setConId(consInfo == null ? null : consInfo.getId());
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
Reference in New Issue
Block a user