|
|
@ -83,7 +83,7 @@ public class PdaLabelController extends AbstractController { |
|
|
log.warn("标签不存在: site={}, labelCode={}", site, labelCode); |
|
|
log.warn("标签不存在: site={}, labelCode={}", site, labelCode); |
|
|
return R.error("标签不存在"); |
|
|
return R.error("标签不存在"); |
|
|
} |
|
|
} |
|
|
if(!"Y".equals(handlingUnit.getInStockFlag())){ |
|
|
|
|
|
|
|
|
if(!"Y".equals(handlingUnit.getInStockFlag()) && !"X".equals(handlingUnit.getInStockFlag())){ |
|
|
return R.error("标签库存已经被消耗!"); |
|
|
return R.error("标签库存已经被消耗!"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -197,7 +197,7 @@ public class PdaLabelController extends AbstractController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 3. 验证库存状态 |
|
|
// 3. 验证库存状态 |
|
|
if (!"Y".equals(originalUnit.getInStockFlag())) { |
|
|
|
|
|
|
|
|
if (!"Y".equals(originalUnit.getInStockFlag()) && !"X".equals(originalUnit.getInStockFlag())) { |
|
|
throw new XJException("该标签库存已被消耗,不能拆分"); |
|
|
throw new XJException("该标签库存已被消耗,不能拆分"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -217,7 +217,7 @@ public class PdaLabelController extends AbstractController { |
|
|
newUnit.setUnitId(newUnitId); |
|
|
newUnit.setUnitId(newUnitId); |
|
|
newUnit.setQty(splitQty); // 新标签数量 |
|
|
newUnit.setQty(splitQty); // 新标签数量 |
|
|
newUnit.setSourceType("SPLIT"); // 来源类型:拆分 |
|
|
newUnit.setSourceType("SPLIT"); // 来源类型:拆分 |
|
|
newUnit.setSourceRef(unitId); // 原标签编码 |
|
|
|
|
|
|
|
|
newUnit.setParentUnitId(unitId); // 原标签编码 |
|
|
newUnit.setCreatedDate(new Date()); |
|
|
newUnit.setCreatedDate(new Date()); |
|
|
newUnit.setCreatedBy(operatorName); |
|
|
newUnit.setCreatedBy(operatorName); |
|
|
newUnit.setModifiedDate(new Date()); |
|
|
newUnit.setModifiedDate(new Date()); |
|
|
|