Commit 70b87cb8f934d77d20cdb9f47348be9ab5e9ef2a

Authored by 肖超群
1 parent 192bb016

临时托盘问题

ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue
... ... @@ -287,6 +287,9 @@ export default {
287 287 methods: {
288 288 getStatusColor(status) {
289 289 const colors = {
  290 + '空闲': 'green',
  291 + '有货': 'purple',
  292 + '满盘': 'blue',
290 293 '良品': 'green',
291 294 '报废品': 'purple',
292 295 '待确认 ': 'grey',
... ...
ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue
... ... @@ -336,11 +336,16 @@ export default {
336 336 align: "center",
337 337 dataIndex: 'shipmentQty'
338 338 },
339   - {
340   - title: '库存总数',
341   - align: "center",
342   - dataIndex: 'inventoryQty'
343   - },
  339 + // {
  340 + // title: '本托盘库存数量',
  341 + // align: "center",
  342 + // dataIndex: 'containerInventoryQty'
  343 + // },
  344 + // {
  345 + // title: '库存总数',
  346 + // align: "center",
  347 + // dataIndex: 'inventoryQty'
  348 + // },
344 349 {
345 350 title: '批次',
346 351 align: "center",
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
... ... @@ -152,11 +152,11 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container
152 152  
153 153 @Override
154 154 public Container createLSContainer(String warehouseCode) {
155   - String code = MessageFormat.format("{0}{1}", "LS", String.format("%d", Calendar.getInstance().getTimeInMillis()));
  155 + String code = MessageFormat.format("{0}{1}", QuantityConstant.CONTAINER_TYPE_LS, String.format("%d", Calendar.getInstance().getTimeInMillis()));
156 156 Container container = new Container();
157 157 container.setCode(code);
158 158 container.setWarehouseCode(warehouseCode);
159   - container.setContainerTypeCode("LS");
  159 + container.setContainerTypeCode(QuantityConstant.CONTAINER_TYPE_LS);
160 160 container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY);
161 161 container.setFillStatus(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY);
162 162 if (!save(container)) {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
... ... @@ -521,6 +521,9 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl
521 521 if (container == null) {
522 522 return Result.error("完成上架失败,没有找到容器");
523 523 }
  524 + if (container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) {
  525 + return Result.error("完成上架失败,容器被锁定不能用于收货" + containerCode);
  526 + }
524 527 Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode);
525 528 if (toLocation == null) {
526 529 return Result.error("完成上架失败,没有找到目的库位");
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... ... @@ -998,7 +998,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
998 998 throw new JeecgBootException("完成平库出库,删除库存头失败");
999 999 }
1000 1000 String containerTypeCode = container.getContainerTypeCode();
1001   - if (containerTypeCode.equals("LS")) {
  1001 + if (containerTypeCode.equals(QuantityConstant.CONTAINER_TYPE_LS)) {
1002 1002 if (!containerService.removeById(container.getId())) {
1003 1003 throw new JeecgBootException("完成平库出库,删除容器失败");
1004 1004 }
... ... @@ -1160,11 +1160,20 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
1160 1160 if (!success) {
1161 1161 throw new JeecgBootException("完成平库出库失败,保存库存详情失败");
1162 1162 }
  1163 + Container container = containerService.getContainerByCode(containerCode, warehouseCode);
  1164 + if (container == null) {
  1165 + throw new JeecgBootException("完成平库出库失败,没有找到容器" + containerCode);
  1166 + }
1163 1167 List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByInventoryHeaderId(inventoryHeader.getId());
1164 1168 if (inventoryDetailList.size() == 0) {
1165   - success = inventoryHeaderService.removeById(inventoryHeader.getId());
1166   - if (!success) {
1167   - throw new JeecgBootException("完成平库出库失败,删除库存头失败");
  1169 + if (!inventoryHeaderService.removeById(inventoryHeader.getId())) {
  1170 + throw new JeecgBootException("完成平库出库,删除库存头失败");
  1171 + }
  1172 + String containerTypeCode = container.getContainerTypeCode();
  1173 + if (containerTypeCode.equals(QuantityConstant.CONTAINER_TYPE_LS)) {
  1174 + if (!containerService.removeById(container.getId())) {
  1175 + throw new JeecgBootException("完成平库出库,删除容器失败");
  1176 + }
1168 1177 }
1169 1178 }
1170 1179 shipmentContainerHeader.setStatus(QuantityConstant.SHIPMENT_CONTAINER_FINISHED);
... ...
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
... ... @@ -705,6 +705,9 @@ public class QuantityConstant {
705 705 public static final String WMS_DELETE_RECEIPT = "WMS删除";
706 706 public static final String WMS_COMPLETE_DELETE_RECEIPT = "单据完成删除";
707 707  
  708 + // 临时托盘类型
  709 + public static final String CONTAINER_TYPE_LS = "LS";
  710 +
708 711 /**
709 712 * 不受控
710 713 */
... ...