Commit 897f8d99fdc3cd500dda04069ac15cb0964f0b95
1 parent
5369618b
优化入库组盘代码
Showing
1 changed file
with
5 additions
and
2 deletions
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
... | ... | @@ -144,6 +144,9 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl |
144 | 144 | if (receiveList == null || receiveList.size() == 0) { |
145 | 145 | return Result.error("入库组盘,收货信息为空"); |
146 | 146 | } |
147 | + if (StringUtils.isEmpty(warehouseCode)) { | |
148 | + return Result.error("入库组盘,仓库编码为空"); | |
149 | + } | |
147 | 150 | String containerCode = receiveList.get(0).getContainerCode(); |
148 | 151 | if (StringUtils.isEmpty(containerCode)) { |
149 | 152 | return Result.error("入库组盘,容器编码为空"); |
... | ... | @@ -162,7 +165,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl |
162 | 165 | if (StringUtils.isNotEmpty(value)) { |
163 | 166 | int shipmentTaskRule = Integer.parseInt(value); |
164 | 167 | if (shipmentTaskRule == QuantityConstant.RULE_TASK_WHOLE) { |
165 | - throw new JeecgBootException("入库组盘," + containerCode + "不允许有补充入库"); | |
168 | + return Result.error("入库组盘," + containerCode + "不允许有补充入库"); | |
166 | 169 | } |
167 | 170 | } |
168 | 171 | } |
... | ... | @@ -192,7 +195,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl |
192 | 195 | } |
193 | 196 | ShipmentContainerHeader shipmentContainerHeader = shipmentContainerHeaderService.getUnCompleteShipmentContainerByCode(containerCode, warehouseCode); |
194 | 197 | if (shipmentContainerHeader != null) { |
195 | - throw new JeecgBootException("入库组盘,容器" + containerCode + "不能有出库配盘"); | |
198 | + return Result.error("入库组盘,容器" + containerCode + "不能有出库配盘"); | |
196 | 199 | } |
197 | 200 | int taskType = QuantityConstant.TASK_TYPE_WHOLERECEIPT; |
198 | 201 | if (StringUtils.isNotEmpty(fromLocationCode)) { |
... | ... |