常熟吴彦祖 3 weeks ago
parent
commit
2781655067
  1. 9
      src/main/java/com/gaotao/modules/check/service/impl/PhysicalInventoryServiceImpl.java

9
src/main/java/com/gaotao/modules/check/service/impl/PhysicalInventoryServiceImpl.java

@ -108,6 +108,10 @@ public class PhysicalInventoryServiceImpl extends ServiceImpl<PhysicalInventoryM
if (!StringUtils.hasText(query.getSite())) { if (!StringUtils.hasText(query.getSite())) {
throw new RuntimeException("工厂编码不能为空"); throw new RuntimeException("工厂编码不能为空");
} }
String nowStatus=baseMapper.getSysIfCount(query.getSite());
if("N".equals(nowStatus)){
throw new RuntimeException("当前不在盘点模式,无法创建盘点单");
}
if (query.getCountPercent() == null || query.getCountPercent() < 0 || query.getCountPercent() > 50) { if (query.getCountPercent() == null || query.getCountPercent() < 0 || query.getCountPercent() > 50) {
throw new RuntimeException("盘点百分比必须在0-50之间"); throw new RuntimeException("盘点百分比必须在0-50之间");
} }
@ -373,7 +377,10 @@ public class PhysicalInventoryServiceImpl extends ServiceImpl<PhysicalInventoryM
if (!StringUtils.hasText(query.getSite())) { if (!StringUtils.hasText(query.getSite())) {
throw new RuntimeException("工厂编码不能为空"); throw new RuntimeException("工厂编码不能为空");
} }
String nowStatus=baseMapper.getSysIfCount(query.getSite());
if("N".equals(nowStatus)){
throw new RuntimeException("当前不在盘点模式,无法创建盘点单");
}
// 2. 校验是否存在活动状态的盘点单同一时间只能运行一个盘点单- rqrq // 2. 校验是否存在活动状态的盘点单同一时间只能运行一个盘点单- rqrq
CountHeaderData activeCount = baseMapper.checkActiveCountExists(query.getSite()); CountHeaderData activeCount = baseMapper.checkActiveCountExists(query.getSite());
if (activeCount != null) { if (activeCount != null) {

Loading…
Cancel
Save