1
0
ソースを参照

Merge branch 'master' of http://git.ds-bay.com/project/wms

 Conflicts:
	wms-operate/src/main/resources/static/ui/views/outstock/boxed/outBoxed/main.html
zcb 4 年 前
コミット
3c0415e8b1
40 ファイル変更638 行追加268 行削除
  1. 2 1
      wms-common/src/main/java/com/lote/wms/common/model/enums/CreateWay.java
  2. 1 1
      wms-core-service/src/main/java/com/lote/wms/inventory/check/entity/enums/InventoryCheckStatusEnum.java
  3. 4 0
      wms-core-service/src/main/java/com/lote/wms/inventory/check/service/InventoryCheckService.java
  4. 118 37
      wms-core-service/src/main/java/com/lote/wms/inventory/check/service/impl/InventoryCheckServiceImpl.java
  5. 26 8
      wms-core-service/src/main/java/com/lote/wms/inventory/inventory/service/impl/InventoryServiceImpl.java
  6. 11 1
      wms-core-service/src/main/java/com/lote/wms/inventory/move/entity/dto/InventoryMvDto.java
  7. 6 0
      wms-core-service/src/main/java/com/lote/wms/inventory/move/service/impl/InventoryMvOperationServiceImpl.java
  8. 10 18
      wms-core-service/src/main/java/com/lote/wms/outstock/boxed/service/impl/OutBoxedServiceImpl.java
  9. 10 0
      wms-core-service/src/main/java/com/lote/wms/outstock/order/entity/queryvo/OutOrderQueryVo.java
  10. 2 1
      wms-core-service/src/main/java/com/lote/wms/outstock/order/service/OutOrderService.java
  11. 1 1
      wms-core-service/src/main/java/com/lote/wms/outstock/order/service/OutOrderServiceAllocate.java
  12. 7 1
      wms-core-service/src/main/java/com/lote/wms/outstock/order/service/impl/OutOrderExportServiceImpl.java
  13. 3 0
      wms-core-service/src/main/java/com/lote/wms/outstock/order/service/impl/OutOrderImportService2Impl.java
  14. 21 6
      wms-core-service/src/main/java/com/lote/wms/outstock/order/service/impl/OutOrderServiceImpl.java
  15. 1 1
      wms-core-service/src/main/java/com/lote/wms/outstock/outshelf/dao/OutInventoryAllocationMapper.java
  16. 1 2
      wms-core-service/src/main/java/com/lote/wms/outstock/outshelf/service/OutInventoryAllocationService.java
  17. 42 13
      wms-core-service/src/main/java/com/lote/wms/outstock/outshelf/service/impl/OutInventoryAllocationServiceImpl.java
  18. 88 46
      wms-core-service/src/main/java/com/lote/wms/outstock/outshelf/service/impl/OutShelfServiceImpl.java
  19. 7 2
      wms-core-service/src/main/java/com/lote/wms/outstock/wave/service/impl/OutWaveServiceImpl.java
  20. 1 1
      wms-core-service/src/main/resources/mybatis/mapper/inventory/inventory/InventoryMapper.xml
  21. 14 0
      wms-core-service/src/main/resources/mybatis/mapper/outstock/order/OutOrderMapper.xml
  22. 1 1
      wms-core-service/src/main/resources/mybatis/mapper/outstock/outshelf/OutInventoryAllocationMapper.xml
  23. 14 0
      wms-operate/src/main/java/com/lote/wms/controller/operate/inventory/check/InventoryCheckController.java
  24. 13 9
      wms-operate/src/main/java/com/lote/wms/controller/operate/outstock/order/OutOrderController.java
  25. 64 2
      wms-operate/src/main/resources/static/ui/js/inventory/check/check/list.js
  26. 1 0
      wms-operate/src/main/resources/static/ui/js/inventory/check/checkDetail/list.js
  27. 1 0
      wms-operate/src/main/resources/static/ui/js/inventory/move/random/list.js
  28. 9 2
      wms-operate/src/main/resources/static/ui/js/inventory/move/random/main.js
  29. 15 14
      wms-operate/src/main/resources/static/ui/js/outstock/boxed/outBoxed/main.js
  30. 20 14
      wms-operate/src/main/resources/static/ui/js/outstock/outshelf/outShelf/single.js
  31. 16 15
      wms-operate/src/main/resources/static/ui/js/outstock/outshelf/outShelf/wave.js
  32. 2 1
      wms-operate/src/main/resources/static/ui/views/instock/order/inOrder/list.html
  33. 3 1
      wms-operate/src/main/resources/static/ui/views/inventory/check/check/list.html
  34. 24 0
      wms-operate/src/main/resources/static/ui/views/inventory/check/checkDetail/updateCheckQty.html
  35. 8 1
      wms-operate/src/main/resources/static/ui/views/inventory/move/random/main.html
  36. 27 26
      wms-operate/src/main/resources/static/ui/views/outstock/boxed/outBoxed/main.html
  37. 16 16
      wms-operate/src/main/resources/static/ui/views/outstock/outshelf/outShelf/single.html
  38. 16 16
      wms-operate/src/main/resources/static/ui/views/outstock/outshelf/outShelf/wave.html
  39. 6 5
      wms-operate/src/main/resources/static/ui/views/outstock/wave/outWave/print/printWaveAndOrderNew.html
  40. 6 5
      wms-operate/src/main/resources/static/ui/views/outstock/wave/outWave/print/printWaveNew.html

+ 2 - 1
wms-common/src/main/java/com/lote/wms/common/model/enums/CreateWay.java

@@ -2,7 +2,8 @@ package com.lote.wms.common.model.enums;
 
 public enum CreateWay {
 
-	ADD("add", "单个创建"), EXCEL("excel", "Excel导入"), API("api", "API对接");
+	ADD("add", "单个创建"), EXCEL("excel", "Excel导入"),
+	API("api", "API对接"),INVENT("invent","虚拟上架");
 
 	private String code;
 

+ 1 - 1
wms-core-service/src/main/java/com/lote/wms/inventory/check/entity/enums/InventoryCheckStatusEnum.java

@@ -6,7 +6,7 @@ package com.lote.wms.inventory.check.entity.enums;
  */
 public enum InventoryCheckStatusEnum {
 
-	ING("1", "开始盘点", "待完成盘点"), COMPLATE("2", "完成盘点", "待确认差异"), CONFIRM("3", "确认差异", "待生效差异"), EFFECT("4", "生效并结束", "已完结");
+	ING("1", "开始盘点", "待完成盘点"), COMPLATE("2", "完成盘点", "待确认差异"), CONFIRM("3", "确认差异", "待生效差异"), EFFECT("4", "完结并结束", "已完结");
 
 	private String code;
 

+ 4 - 0
wms-core-service/src/main/java/com/lote/wms/inventory/check/service/InventoryCheckService.java

@@ -8,6 +8,8 @@ import com.lote.wms.inventory.check.entity.formvo.InventoryCheckVo;
 import com.lote.wms.inventory.check.entity.queryvo.InventoryCheckQueryVo;
 import com.lote.wms.user.user.entity.User;
 
+import java.util.Map;
+
 public interface InventoryCheckService {
 	InventoryCheck add(InventoryCheck record);
 
@@ -41,4 +43,6 @@ public interface InventoryCheckService {
 	Message confirm(String id, User user);
 
 	Message effect(String id, User user);
+
+    Message export(Map<String, Object> map);
 }

+ 118 - 37
wms-core-service/src/main/java/com/lote/wms/inventory/check/service/impl/InventoryCheckServiceImpl.java

@@ -1,11 +1,15 @@
 package com.lote.wms.inventory.check.service.impl;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
 
 import javax.annotation.Resource;
 
+import com.lote.wms.base.product.entity.ProductBarcode;
+import com.lote.wms.common.config.SystemConfig;
+import com.lote.wms.common.utils.*;
+import org.apache.poi.ss.usermodel.Sheet;
 import org.mybatis.plugin.model.Pager;
 import org.mybatis.plugin.util.PagerUtil;
 import org.slf4j.Logger;
@@ -21,10 +25,6 @@ import com.lote.wms.common.core.db.DataAccessHolder;
 import com.lote.wms.common.core.db.IdWorkerAide;
 import com.lote.wms.common.exception.ServiceException;
 import com.lote.wms.common.model.Message;
-import com.lote.wms.common.utils.BeanUtil;
-import com.lote.wms.common.utils.DateUtil;
-import com.lote.wms.common.utils.NumberUtil;
-import com.lote.wms.common.utils.StringUtil;
 import com.lote.wms.inventory.check.dao.InventoryCheckMapper;
 import com.lote.wms.inventory.check.entity.InventoryCheck;
 import com.lote.wms.inventory.check.entity.InventoryCheckCriteria;
@@ -70,6 +70,9 @@ public class InventoryCheckServiceImpl implements InventoryCheckService {
 	@Resource
 	private InventoryCheckDetailService inventoryCheckDetailService;
 
+	@Resource
+	private SystemConfig systemConfig;
+
 	private static final Logger logger = LoggerFactory.getLogger(InventoryCheckServiceImpl.class);
 
 	public InventoryCheck add(InventoryCheck record) {
@@ -559,11 +562,11 @@ public class InventoryCheckServiceImpl implements InventoryCheckService {
 			return message;
 		}
 		if (!StringUtil.isEquals(check.getStatusCode(), InventoryCheckStatusEnum.CONFIRM.getCode())) {
-			message.setMsg("只有确认差异状态的盘点单可以操作生效");
+			message.setMsg("只有确认差异状态的盘点单可以操作完结");
 			return message;
 		}
 		if (StringUtil.isEquals(check.getStatusCode(), InventoryCheckStatusEnum.EFFECT.getCode())) {
-			message.setMsg("该盘点单状态已确认生效");
+			message.setMsg("该盘点单状态已确认完结");
 			return message;
 		}
 
@@ -599,33 +602,33 @@ public class InventoryCheckServiceImpl implements InventoryCheckService {
 			}
 
 			// -----------------------------------开始更新库存
-			InventoryVo inventoryVo = new InventoryVo();
-			inventoryVo.setId(inventory.getId());
-			BeanUtil.copy(inventory, inventoryVo);
-			inventoryVo.setRefNo(check.getCode());
-			inventoryVo.setUserCode(user.getCode());
-			inventoryVo.setUserId(user.getId());
-			if (diffQty > 0) {
-				// 盘盈生效
-				inventoryVo.setChangeQty(diffQty);
-				inventoryVo.setOpType(InventoryOpTypeEnum.INVENTORY_CHECK_GAINS_EFFECT);
-				Message addQtyMessage = inventoryService.addQty(inventoryVo);
-				// 如添加库存失败,抛异常将上面的操作回滚
-				if (!addQtyMessage.isSuccess()) {
-					throw new ServiceException(addQtyMessage.getMsg());
-				}
-				gains++;
-
-			} else {
-				// 盘亏
-				inventoryVo.setChangeQty(-diffQty);
-				inventoryVo.setOpType(InventoryOpTypeEnum.INVENTORY_CHECK_LOSS_EFFECT);
-				Message cutInventoryMessage = inventoryService.cutQty(inventoryVo);
-				if (!cutInventoryMessage.isSuccess()) {
-					throw new ServiceException(cutInventoryMessage.getMsg());
-				}
-				loss++;
-			}
+//			InventoryVo inventoryVo = new InventoryVo();
+//			inventoryVo.setId(inventory.getId());
+//			BeanUtil.copy(inventory, inventoryVo);
+//			inventoryVo.setRefNo(check.getCode());
+//			inventoryVo.setUserCode(user.getCode());
+//			inventoryVo.setUserId(user.getId());
+//			if (diffQty > 0) {
+//				// 盘盈生效
+//				inventoryVo.setChangeQty(diffQty);
+//				inventoryVo.setOpType(InventoryOpTypeEnum.INVENTORY_CHECK_GAINS_EFFECT);
+//				Message addQtyMessage = inventoryService.addQty(inventoryVo);
+//				// 如添加库存失败,抛异常将上面的操作回滚
+//				if (!addQtyMessage.isSuccess()) {
+//					throw new ServiceException(addQtyMessage.getMsg());
+//				}
+//				gains++;
+//
+//			} else {
+//				// 盘亏
+//				inventoryVo.setChangeQty(-diffQty);
+//				inventoryVo.setOpType(InventoryOpTypeEnum.INVENTORY_CHECK_LOSS_EFFECT);
+//				Message cutInventoryMessage = inventoryService.cutQty(inventoryVo);
+//				if (!cutInventoryMessage.isSuccess()) {
+//					throw new ServiceException(cutInventoryMessage.getMsg());
+//				}
+//				loss++;
+//			}
 			// -----------------------------------结束更新库存
 
 			detail.setIsEffect(BaseConstant.Y);
@@ -643,9 +646,87 @@ public class InventoryCheckServiceImpl implements InventoryCheckService {
 
 		update(check);
 
-		message.setMsg("确认生效成功,盘盈记录数:" + gains + ",盘亏记录数:" + loss);
+//		message.setMsg("确认生效成功,盘盈记录数:" + gains + ",盘亏记录数:" + loss);
+		message.setMsg("确认完结成功。" );
 		message.setSuccess(true);
 		return message;
 	}
 
+	@Override
+	public Message export(Map<String, Object> map) {
+		String id = (String) map.get("id");
+		if (Objects.isNull(id) || "".equals(id)){
+			return Message.fail("请选择一条数据!");
+		}
+		InventoryCheck check = get(id);
+		if (check == null) {
+			return Message.fail("盘点单id不存在!");
+		}
+		if (!StringUtil.isEquals(check.getStatusCode(), InventoryCheckStatusEnum.EFFECT.getCode())) {
+			return Message.fail("盘点单状态已确认完结才可以导出");
+		}
+
+		String headCnStrList[] = new String[] { "序号", "货位", "货品编码", "UPC", "货品描述", "货主名称", "在库数量", "盘点数", "备注",
+				"库存状态" };
+		Sheet sheet = null;
+		List<String> headCnList = Arrays.asList(headCnStrList);
+		try {
+			sheet = POIExcelUtil.createSheet("盘点单明细", headCnList);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+
+		List<InventoryCheckDetail> inventoryCheckDetailList = inventoryCheckDetailService.listByCheckId(check.getId());
+		if (Objects.isNull(inventoryCheckDetailList) || inventoryCheckDetailList.size()==0){
+			return Message.fail("该盘点单无明细");
+		}
+
+		// 转换成行
+		List<String[]> row = parseRow(inventoryCheckDetailList, headCnList);
+		// 保存到excel中
+		POIExcelUtil.addRows(sheet, row);
+
+
+		// 保存到临时文件返回路径 TODO
+		try {
+			// 随机生成文件
+			String fileName = UUID.randomUUID().toString() + ".xlsx";
+			File tempFile = new File(systemConfig.getRuntimeFileDir() + "/inventory/");
+			if (!tempFile.exists()) {
+				tempFile.mkdirs();
+			}
+			String fileNameAndPath = systemConfig.getRuntimeFileDir() + "/inventory/" + fileName;
+			POIExcelUtil.saveToFile(sheet, fileNameAndPath);
+
+			// 上传文件服务器
+			String downUrl = FileServerClient.fileUpload(systemConfig.getFileServerUrl(), fileNameAndPath);
+			return Message.success(downUrl);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+
+		return Message.fail("系统异常,请稍后重试!");
+	}
+
+	private List<String[]> parseRow(List<InventoryCheckDetail> inventoryCheckDetailList, List<String> headCnList) {
+		List<String[]> rows = new ArrayList<>();
+		int number=1;
+		for (InventoryCheckDetail inventoryCheckDetail : inventoryCheckDetailList) {
+			String[] row = new String[headCnList.size()];
+			row[0] = String.valueOf(number++);
+			row[1] = inventoryCheckDetail.getLocationCode();
+			row[2] = inventoryCheckDetail.getSku();
+			row[3] = inventoryCheckDetail.getBarcode();
+			row[4] = inventoryCheckDetail.getProductName();
+			row[5] = inventoryCheckDetail.getCustomerCode();
+			row[6] = String.valueOf(inventoryCheckDetail.getSysQty());
+			row[7] = String.valueOf(inventoryCheckDetail.getCheckQty());
+			row[8] = inventoryCheckDetail.getRemark();
+			Inventory inventory = inventoryService.get(inventoryCheckDetail.getInventoryId());
+			row[9] = inventory.getStatusName();
+			rows.add(row);
+		}
+		return rows;
+	}
+
 }

+ 26 - 8
wms-core-service/src/main/java/com/lote/wms/inventory/inventory/service/impl/InventoryServiceImpl.java

@@ -232,9 +232,9 @@ public class InventoryServiceImpl implements InventoryService {
 		if (!StringUtil.isEmpty(warehouseCode)) {
 			cri.andWarehouseCodeEqualTo(warehouseCode);
 		}
-		if (DataAccessHolder.getWarehouseCodes() != null) {
-			cri.andWarehouseCodeIn(DataAccessHolder.getWarehouseCodes());
-		}
+//		if (DataAccessHolder.getWarehouseCodes() != null) {
+//			cri.andWarehouseCodeIn(DataAccessHolder.getWarehouseCodes());
+//		}
 		if (!StringUtil.isEmpty(zoneCode)) {
 			cri.andZoneCodeEqualTo(zoneCode);
 		}
@@ -308,9 +308,9 @@ public class InventoryServiceImpl implements InventoryService {
 		if (!StringUtil.isEmpty(warehouseCode)) {
 			cri.andWarehouseCodeEqualTo(warehouseCode);
 		}
-		if (DataAccessHolder.getWarehouseCodes() != null) {
-			cri.andWarehouseCodeIn(DataAccessHolder.getWarehouseCodes());
-		}
+//		if (DataAccessHolder.getWarehouseCodes() != null) {
+//			cri.andWarehouseCodeIn(DataAccessHolder.getWarehouseCodes());
+//		}
 		if (!StringUtil.isEmpty(zoneCode)) {
 			cri.andZoneCodeEqualTo(zoneCode);
 		}
@@ -1005,6 +1005,7 @@ public class InventoryServiceImpl implements InventoryService {
 		updateVo.setUpdateByUserId(vo.getUserId());
 		updateVo.setUpdateTime(new Date());
 		int count = this.inventoryMapper.updateQty(updateVo);// 只会更新updateVo不为空的字段
+//		int countByStatus = this.inventoryMapper.updateStatus(vo);
 		if (count != 1) {
 			message.setMsg("更新库存失败,执行数据库插入返回影响行数为" + count);
 			message.setSuccess(false);
@@ -1419,8 +1420,16 @@ public class InventoryServiceImpl implements InventoryService {
 			vo.setRefNo(refNo);
 			vo.setUserCode(user.getCode());
 			vo.setUserId(user.getId());
-
+			vo.setStatusCode(InventoryStatusEnum.LOCKED.getCode());
+			vo.setStatusName(InventoryStatusEnum.LOCKED.getName());
+			vo.setUpdateByUserCode(user.getCode());
+			vo.setUpdateByUserId(user.getId());
+			vo.setUpdateTime(new Date());
+
+			vo.setFreezeByUserCode(user.getCode());
+			vo.setFreezeTime(new Date());
 			Message cutMessage = updAvail(vo);
+			inventoryMapper.updateStatus(vo);
 			if (!cutMessage.isSuccess()) {
 				return cutMessage;
 			}
@@ -1434,8 +1443,17 @@ public class InventoryServiceImpl implements InventoryService {
 			vo.setRefNo(refNo);
 			vo.setUserCode(user.getCode());
 			vo.setUserId(user.getId());
-
+			vo.setStatusCode(InventoryStatusEnum.LOCKED.getCode());
+			vo.setStatusName(InventoryStatusEnum.LOCKED.getName());
+			vo.setUpdateByUserCode(user.getCode());
+			vo.setUpdateByUserId(user.getId());
+			vo.setUpdateTime(new Date());
+
+			vo.setFreezeByUserCode(user.getCode());
+			vo.setFreezeTime(new Date());
 			Message cutMessage = updAvail(vo);
+			vo.setDataVersion(vo.getDataVersion()+1);
+			inventoryMapper.updateStatus(vo);
 			if (!cutMessage.isSuccess()) {
 				return cutMessage;
 			}

+ 11 - 1
wms-core-service/src/main/java/com/lote/wms/inventory/move/entity/dto/InventoryMvDto.java

@@ -30,7 +30,17 @@ public class InventoryMvDto {
 	
 	//操作人
 	private User userOperation;
-	
+
+	private String transResult;
+
+	public String getTransResult() {
+		return transResult;
+	}
+
+	public void setTransResult(String transResult) {
+		this.transResult = transResult;
+	}
+
 	public String getOutShelfLocationCode() {
 		return outShelfLocationCode;
 	}

+ 6 - 0
wms-core-service/src/main/java/com/lote/wms/inventory/move/service/impl/InventoryMvOperationServiceImpl.java

@@ -170,6 +170,7 @@ public class InventoryMvOperationServiceImpl implements InventoryMvOperationServ
 		String warehouseCode = inventoryMvDto.getWarehouseCode();
 		String outLocationCode = inventoryMvDto.getOutShelfLocationCode();
 		String barcode = inventoryMvDto.getBarcode();
+		String transResult = inventoryMvDto.getTransResult();// 移库原因
 
 		String outshelfInventoryId = inventoryMvDto.getOutShelfInventoryId();// 原下架库存id
 		Integer qty = inventoryMvDto.getQty();// 操作数量
@@ -189,6 +190,9 @@ public class InventoryMvOperationServiceImpl implements InventoryMvOperationServ
 		if (StringUtil.isEmpty(outshelfInventoryId)) {
 			return Message.fail("原库存id不能为空!");
 		}
+//		if (StringUtil.isEmpty(transResult)) {
+//			return Message.fail("移库原因不能为空!");
+//		}
 		if (StringUtil.isEqual(onShelfLocationCode, outLocationCode)) {
 			return Message.fail("移库上架库位不能和下架库位相同!");
 		}
@@ -236,6 +240,7 @@ public class InventoryMvOperationServiceImpl implements InventoryMvOperationServ
 		mvout.setCreatedByUserId(user.getId());
 		mvout.setCreatedTime(new Date());
 		mvout.setId(IdWorkerAide.nextId());
+		mvout.setRemark(transResult);
 		inventoryMvOutService.add(mvout);
 
 		// i_inventory_mv_on
@@ -246,6 +251,7 @@ public class InventoryMvOperationServiceImpl implements InventoryMvOperationServ
 		mvOn.setQtyMvOn(qty);
 		mvOn.setInventoryMoveOutId(mvout.getId());
 		mvOn.setId(IdWorkerAide.nextId());
+		mvOn.setRemark(transResult);
 		inventoryMvOnService.add(mvOn);
 
 		// 查询移库记录 i_inventory_mv_out join i_inventory_mv_on

+ 10 - 18
wms-core-service/src/main/java/com/lote/wms/outstock/boxed/service/impl/OutBoxedServiceImpl.java

@@ -339,26 +339,18 @@ public class OutBoxedServiceImpl implements OutBoxedService {
 		if (isFinished) {
 			message.setMsg("出库单号:" + orderNo + ",完成称重,请操作下一单");
 			message.setExtend(isFinished);
-		}
 
-		// todo 判断是否为海关查验单,如果是就调用拦截,如果不是就发运
-		if (!StringUtil.isEmpty(order.getExtend1()) && "2".equals(order.getExtend1())) {
-			Message holdUp = outOrderService.holdUp(order.getId(), user);
-			if (holdUp.isSuccess()) {
-				message.setMsg(message.getMsg() + ",该订单为海关查验单,已自动拦截.");
-			} else {
-				message.setMsg(message.getMsg() + ","+holdUp.getMsg());
-			}
-		}
-		// 只有销售订单才自动发
-		if (!StringUtil.isEmpty(order.getExtend1()) && "0".equals(order.getExtend1()) && "1".equals(order.getTypeCode())) {
-			Message shipped = outOrderService.shipped(order.getOrderNo1(), user);
-			if (shipped.isSuccess()) {
-				message.setMsg(message.getMsg() + ",该订单已自动发运.");
-			} else {
-				message.setMsg(message.getMsg() + "," + shipped.getMsg());
-			}
+			// 只有销售订单才自动发
+//			if (!StringUtil.isEmpty(order.getExtend1()) && "0".equals(order.getExtend1()) && "1".equals(order.getTypeCode())) {
+				Message shipped = outOrderService.shipped(order.getOrderNo1(), user);
+				if (shipped.isSuccess()) {
+					message.setMsg(message.getMsg() + ",该订单已自动发运.");
+				} else {
+					message.setMsg(message.getMsg() + "," + shipped.getMsg());
+				}
+//			}
 		}
+
 		message.setSuccess(true);
 		return message;
 	}

+ 10 - 0
wms-core-service/src/main/java/com/lote/wms/outstock/order/entity/queryvo/OutOrderQueryVo.java

@@ -20,6 +20,8 @@ public class OutOrderQueryVo extends QueryParam implements Serializable {
 
 	private String orderExportFieldStr;
 
+	private String boxExportFieldStr;//箱号
+
 	private String receiverExportFieldStr;
 
 	private String senderExportFieldStr;
@@ -28,6 +30,14 @@ public class OutOrderQueryVo extends QueryParam implements Serializable {
 
 	private String apiTypeCode;
 
+	public String getBoxExportFieldStr() {
+		return boxExportFieldStr;
+	}
+
+	public void setBoxExportFieldStr(String boxExportFieldStr) {
+		this.boxExportFieldStr = boxExportFieldStr;
+	}
+
 	private String barcodeDigest;
 
 	private Date cancelTime;

+ 2 - 1
wms-core-service/src/main/java/com/lote/wms/outstock/order/service/OutOrderService.java

@@ -213,9 +213,10 @@ public interface OutOrderService {
 	 * 判断订单状态, 是否已经完成称重 等
 	 * 
 	 * @param orderNo
+	 * @param user
 	 * @return
 	 */
-	Message selectForWeigh(String orderNo);
+	Message selectForWeigh(String orderNo, User user);
 
 	/**
 	 * 按订单号或者按跟踪号查询 只返回一个订单

+ 1 - 1
wms-core-service/src/main/java/com/lote/wms/outstock/order/service/OutOrderServiceAllocate.java

@@ -31,7 +31,7 @@ public interface OutOrderServiceAllocate {
 	/**
 	 * 取消分配库存
 	 * 
-	 * @param allocateInventoryEnt
+	 * @param orderId
 	 * @param user
 	 * @return
 	 */

+ 7 - 1
wms-core-service/src/main/java/com/lote/wms/outstock/order/service/impl/OutOrderExportServiceImpl.java

@@ -120,6 +120,7 @@ public class OutOrderExportServiceImpl implements OutOrderExportService {
 		orderMap.put("shipped_ex_time", "发货时长(小时)");
 
 		orderMap.put("create_way", "创建方式");
+		orderMap.put("box_no", "箱号");
 
 		sendMap = new LinkedHashMap<>();
 		sendMap.put("name", "寄件人姓名");
@@ -203,8 +204,13 @@ public class OutOrderExportServiceImpl implements OutOrderExportService {
 
 		List<String> orderExportFieldList = outOrderQueryVo.getOrderExportFieldList();
 		List<String> orderFieldList = new ArrayList<>();
+		String boxExportFieldStr = null;
 		if (orderExportFieldList != null) {
 			for (String orderExportField : orderExportFieldList) {
+				if("box_no".equals(orderExportField)){
+					boxExportFieldStr="box."+orderExportField+" o_"+orderExportField;
+					break;
+				}
 				orderFieldList.add("o." + orderExportField + " o_" + orderExportField);
 			}
 		} else {
@@ -252,7 +258,7 @@ public class OutOrderExportServiceImpl implements OutOrderExportService {
 		outOrderQueryVo.setReceiverExportFieldStr(receiverExportFieldStr);
 		outOrderQueryVo.setSenderExportFieldStr(senderExportFieldStr);
 		outOrderQueryVo.setItemExportFieldStr(itemExportFieldStr);
-
+		outOrderQueryVo.setBoxExportFieldStr(boxExportFieldStr);
 		// 生成头map
 		Map<String, String> headMap = getHeadMap(orderExportFieldList, receiverExportFieldList, senderExportFieldList,
 				itemExportFieldList);

+ 3 - 0
wms-core-service/src/main/java/com/lote/wms/outstock/order/service/impl/OutOrderImportService2Impl.java

@@ -348,6 +348,9 @@ public class OutOrderImportService2Impl implements OutOrderImportService2 {
 
 			outOrderItem.setSku(outOrderImport.getSku());
 			outOrderItem.setQuantity(outOrderImport.getQuantity());
+			if (!StringUtil.isEmpty(outOrderImport.getBarcode())){
+				outOrderItem.setBarcode(outOrderImport.getBarcode());
+			}
 
 			Integer qualityCode = outOrderImport.getQualityCode();
 			if (qualityCode == null || qualityCode < 1) {

+ 21 - 6
wms-core-service/src/main/java/com/lote/wms/outstock/order/service/impl/OutOrderServiceImpl.java

@@ -8,6 +8,7 @@ import java.util.regex.Pattern;
 
 import javax.annotation.Resource;
 
+import com.lote.wms.outstock.order.dao.OutOrderMapper;
 import org.apache.http.client.ClientProtocolException;
 import org.mybatis.plugin.model.Pager;
 import org.mybatis.plugin.util.PagerUtil;
@@ -82,7 +83,6 @@ import com.lote.wms.outstock.boxed.entity.OutBoxed;
 import com.lote.wms.outstock.boxed.entity.OutBoxedItem;
 import com.lote.wms.outstock.boxed.service.OutBoxedItemService;
 import com.lote.wms.outstock.boxed.service.OutBoxedService;
-import com.lote.wms.outstock.order.dao.OutOrderMapper;
 import com.lote.wms.outstock.order.entity.OutOrder;
 import com.lote.wms.outstock.order.entity.OutOrderBusinessType;
 import com.lote.wms.outstock.order.entity.OutOrderCriteria;
@@ -147,6 +147,9 @@ public class OutOrderServiceImpl implements OutOrderService {
 	@Autowired
 	private OutOrderMapper outOrderMapper;
 
+	@Autowired
+	private OutOrderService outOrderService;
+
 	@Resource
 	private WarehouseService warehouseService;
 
@@ -890,9 +893,6 @@ public class OutOrderServiceImpl implements OutOrderService {
 	 * 处理从单号库获取单号
 	 * 
 	 * @param order
-	 * @param message
-	 * @param user
-	 * @param opType
 	 * @return
 	 */
 	private TrackingNo getTrackingNoFromDB(OutOrder order) {
@@ -1433,7 +1433,7 @@ public class OutOrderServiceImpl implements OutOrderService {
 	}
 
 	@Override
-	public Message selectForWeigh(String orderNo) {
+	public Message selectForWeigh(String orderNo, User user) {
 		Message message = new Message();
 		message.setSuccess(false);
 
@@ -1478,6 +1478,16 @@ public class OutOrderServiceImpl implements OutOrderService {
 			message.setMsg("该订单未完成下架,不能操作称重");
 			return message;
 		}
+		// todo 判断是否为海关查验单,如果是就调用拦截,如果不是就发运
+		if (StringUtil.isNotNull(order.getExtend1()) && "2".equals(order.getExtend1())) {
+			Message holdUp = outOrderService.holdUp(order.getId(), user);
+			if (holdUp.isSuccess()) {
+				message.setMsg("该订单为海关查验单,已自动拦截.");
+			} else {
+				message.setMsg(holdUp.getMsg());
+			}
+			return message;
+		}
 
 		int boxNum = outBoxedService.countByOutOrderId(order.getId());// 不会计算空的箱子
 		if (boxNum < 1) {// 订单从未装箱
@@ -1652,7 +1662,12 @@ public class OutOrderServiceImpl implements OutOrderService {
 			message.setMsg("出库单号不能为空");
 			return message;
 		}
-		OutOrder order = getByOrderNo(orderNo);
+		Message selectOrder = selectByNo(orderNo);
+		if (!selectOrder.isSuccess()) {
+			return selectOrder;
+		}
+
+		OutOrder order = (OutOrder) selectOrder.getExtend();
 		if (order == null) {
 			message.setMsg("出库单号不存在");
 			return message;

+ 1 - 1
wms-core-service/src/main/java/com/lote/wms/outstock/outshelf/dao/OutInventoryAllocationMapper.java

@@ -36,7 +36,7 @@ public interface OutInventoryAllocationMapper {
 			@Param("isFinished") String isFinished);
 
 	List<OutInventoryAllocation> listByWaveIdAndLocationCodeAndBarcode(@Param("outWaveId") String outWaveId,
-			@Param("locationCode") String locationCode, @Param("barcode") String barcode);
+			 @Param("barcode") String barcode);
 
 	Integer sumQty(InventoryQueryVo vo);
 

+ 1 - 2
wms-core-service/src/main/java/com/lote/wms/outstock/outshelf/service/OutInventoryAllocationService.java

@@ -65,11 +65,10 @@ public interface OutInventoryAllocationService {
 	 * 根据波次 货位号 条码查询
 	 * 
 	 * @param waveId
-	 * @param locationCode
 	 * @param barcode
 	 * @return
 	 */
-	List<OutInventoryAllocation> listForWaveOutShelf(String waveId, String locationCode, String barcode);
+	List<OutInventoryAllocation> listForWaveOutShelf(String waveId, String barcode);
 
 	List<OutInventoryAllocation> listByWaveId(String waveId);
 

+ 42 - 13
wms-core-service/src/main/java/com/lote/wms/outstock/outshelf/service/impl/OutInventoryAllocationServiceImpl.java

@@ -1,11 +1,14 @@
 package com.lote.wms.outstock.outshelf.service.impl;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
+import java.util.stream.Collectors;
 
 import javax.annotation.Resource;
 
+import com.lote.wms.base.warehouse.dao.LocationMapper;
+import com.lote.wms.base.warehouse.entity.queryvo.LocationQueryVo;
+import com.lote.wms.base.warehouse.entity.resultvo.LocationResultVo;
+import com.lote.wms.common.core.db.DataAccessHolder;
 import org.mybatis.plugin.model.Pager;
 import org.mybatis.plugin.util.PagerUtil;
 import org.slf4j.Logger;
@@ -46,6 +49,9 @@ public class OutInventoryAllocationServiceImpl implements OutInventoryAllocation
 	@Autowired
 	private OutInventoryAllocationMapper outInventoryAllocationMapper;
 
+	@Autowired
+	private LocationMapper locationMapper;
+
 	@Resource
 	private OutOrderService outOrderService;
 
@@ -64,6 +70,8 @@ public class OutInventoryAllocationServiceImpl implements OutInventoryAllocation
 	@Resource
 	private InventoryService inventoryService;
 
+
+
 	private static final Logger logger = LoggerFactory.getLogger(OutInventoryAllocationServiceImpl.class);
 
 	public OutInventoryAllocation add(OutInventoryAllocation record) {
@@ -156,10 +164,10 @@ public class OutInventoryAllocationServiceImpl implements OutInventoryAllocation
 			message.setMsg("出库单Id不能为空,请先提交出库单号");
 			return message;
 		}
-		if (StringUtil.isEmpty(vo.getLocationCode())) {
-			message.setMsg("库位号码不能为空");
-			return message;
-		}
+//		if (StringUtil.isEmpty(vo.getLocationCode())) {
+//			message.setMsg("库位号码不能为空");
+//			return message;
+//		}
 		if (StringUtil.isEmpty(vo.getBarcode())) {
 			message.setMsg("商品条码不能为空");
 			return message;
@@ -170,17 +178,38 @@ public class OutInventoryAllocationServiceImpl implements OutInventoryAllocation
 		Criteria cri = criteria.createCriteria();
 		cri.andOutOrderIdEqualTo(vo.getOutOrderId());
 		cri.andBarcodeEqualTo(vo.getBarcode().trim());
-		cri.andLocationCodeEqualTo(vo.getLocationCode().trim());
+//		cri.andLocationCodeEqualTo(vo.getLocationCode().trim());
 		List<OutInventoryAllocation> list = outInventoryAllocationMapper.selectByConditionList(criteria);
 		if (list.size() == 0) {
-			String msg = "该订单没有库位:" + vo.getLocationCode() + ",条码:" + vo.getBarcode() + "待下架";
+			String msg = "该订单没有条码:" + vo.getBarcode() + "待下架";
 			message.setMsg(msg);
 			return message;
 		}
-		List<OutInventoryAllocation> newList = new ArrayList<OutInventoryAllocation>();
+
+		for (OutInventoryAllocation allocation : list) {
+			String locationCode = allocation.getLocationCode(); // 当前商品的库位号
+			LocationQueryVo locationQueryVo = new LocationQueryVo();
+			locationQueryVo.setWarehouseCode(allocation.getWarehouseCode());
+			locationQueryVo.setCode(locationCode);
+			locationQueryVo.setZoneCode(allocation.getZoneCode());
+			List<LocationResultVo> locationResultVoList = locationMapper.selectByVoList(locationQueryVo);
+			if (Objects.nonNull(locationResultVoList) && locationResultVoList.size()==1){
+				allocation.setExtend5(locationResultVoList.get(0).getLineNumber().toString()); // 使用个临时字段存动线号
+			}
+		}
+
+		// 对list进行按动线号排序,越小越优先
+		Collections.sort(list, new Comparator<OutInventoryAllocation>() {
+			@Override
+			public int compare(OutInventoryAllocation o1, OutInventoryAllocation o2) {
+				return Integer.compare(Integer.valueOf(o2.getExtend5()==null?"0":o2.getExtend5()),Integer.valueOf(o1.getExtend5()==null?"0":o1.getExtend5()));
+			}
+		});
+
+		List<OutInventoryAllocation> newList = new ArrayList<>();
 		for (OutInventoryAllocation temp : list) {
 			if (temp.getOutQuantity() >= temp.getQuantity()) {
-				message.setMsg("该库位和条码已完成下架");
+				message.setMsg("该条码已完成下架");
 				continue;
 			}
 			newList.add(temp);
@@ -287,8 +316,8 @@ public class OutInventoryAllocationServiceImpl implements OutInventoryAllocation
 	}
 
 	@Override
-	public List<OutInventoryAllocation> listForWaveOutShelf(String waveId, String locationCode, String barcode) {
-		return outInventoryAllocationMapper.listByWaveIdAndLocationCodeAndBarcode(waveId, locationCode, barcode);
+	public List<OutInventoryAllocation> listForWaveOutShelf(String waveId, String barcode) {
+		return outInventoryAllocationMapper.listByWaveIdAndLocationCodeAndBarcode(waveId, barcode);
 	}
 
 	@Override

+ 88 - 46
wms-core-service/src/main/java/com/lote/wms/outstock/outshelf/service/impl/OutShelfServiceImpl.java

@@ -1,26 +1,11 @@
 package com.lote.wms.outstock.outshelf.service.impl;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import javax.annotation.Resource;
-
-import org.apache.poi.ss.usermodel.Sheet;
-import org.mybatis.plugin.model.Pager;
-import org.mybatis.plugin.util.PagerUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Service;
-
+import com.lote.wms.base.product.dao.ProductMapper;
+import com.lote.wms.base.product.entity.Product;
+import com.lote.wms.base.product.entity.queryvo.ProductQueryVo;
+import com.lote.wms.base.warehouse.dao.LocationMapper;
+import com.lote.wms.base.warehouse.entity.queryvo.LocationQueryVo;
+import com.lote.wms.base.warehouse.entity.resultvo.LocationResultVo;
 import com.lote.wms.common.config.SystemConfig;
 import com.lote.wms.common.constants.BaseConstant;
 import com.lote.wms.common.core.db.DataAccessHolder;
@@ -28,13 +13,7 @@ import com.lote.wms.common.core.db.IdWorkerAide;
 import com.lote.wms.common.exception.ServiceException;
 import com.lote.wms.common.model.Message;
 import com.lote.wms.common.service.ILockService;
-import com.lote.wms.common.utils.BeanUtil;
-import com.lote.wms.common.utils.DateUtil;
-import com.lote.wms.common.utils.FileServerClient;
-import com.lote.wms.common.utils.LockUtil;
-import com.lote.wms.common.utils.NumberUtil;
-import com.lote.wms.common.utils.POIExcelUtil;
-import com.lote.wms.common.utils.StringUtil;
+import com.lote.wms.common.utils.*;
 import com.lote.wms.inventory.inventory.entity.Inventory;
 import com.lote.wms.inventory.inventory.entity.enums.InventoryOpTypeEnum;
 import com.lote.wms.inventory.inventory.entity.expand.InventoryVo;
@@ -63,6 +42,19 @@ import com.lote.wms.outstock.wave.entity.enums.OutWaveStatusEnum;
 import com.lote.wms.outstock.wave.service.OutWaveItemService;
 import com.lote.wms.outstock.wave.service.OutWaveService;
 import com.lote.wms.user.user.entity.User;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.mybatis.plugin.model.Pager;
+import org.mybatis.plugin.util.PagerUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
 
 @Service("outShelfService")
 public class OutShelfServiceImpl implements OutShelfService {
@@ -70,6 +62,12 @@ public class OutShelfServiceImpl implements OutShelfService {
 	@Autowired
 	private OutShelfMapper outShelfMapper;
 
+	@Autowired
+	private ProductMapper productMapper;
+
+	@Autowired
+	private LocationMapper locationMapper;
+
 	@Resource
 	private OutInventoryAllocationService outInventoryAllocationService;
 
@@ -234,10 +232,10 @@ public class OutShelfServiceImpl implements OutShelfService {
 				message.setMsg("商品条码不能为空!");
 				return message;
 			}
-			if (StringUtil.isEmpty(vo.getLocationCode())) {
-				message.setMsg("实际库位不能为空!");
-				return message;
-			}
+//			if (StringUtil.isEmpty(vo.getLocationCode())) {
+//				message.setMsg("实际库位不能为空!");
+//				return message;
+//			}
 			if (vo.getQuantity() <= 0) {
 				message.setMsg("下架数量必须大于0!");
 				return message;
@@ -254,7 +252,7 @@ public class OutShelfServiceImpl implements OutShelfService {
 			// 预分配id
 			String allocationId = vo.getAllocationId();
 			String barcode = vo.getBarcode().trim();
-			String locationCode = vo.getLocationCode().trim();
+//			String locationCode = vo.getLocationCode().trim();
 			Integer quantity = vo.getQuantity();// 本次下架数量
 
 			OutOrder order = outOrderService.getForWms(outOrderId);
@@ -300,12 +298,12 @@ public class OutShelfServiceImpl implements OutShelfService {
 				message.setMsg("订单id和库存分配不匹配!请重新提交订单号");
 				return message;
 			}
-			if (!StringUtil.isEqualIgnoreCase(allocation.getLocationCode(), locationCode)) {
-				message.setMsg("请重新在库位输入框按回车提交库位");
-				outOrderLogService.addLog(order, user, typeEnum, null, message.getMsg(), false);
-				return message;
-			}
-			locationCode = allocation.getLocationCode();// 更正大小写
+//			if (!StringUtil.isEqualIgnoreCase(allocation.getLocationCode(), locationCode)) {
+//				message.setMsg("请重新在库位输入框按回车提交库位");
+//				outOrderLogService.addLog(order, user, typeEnum, null, message.getMsg(), false);
+//				return message;
+//			}
+//			locationCode = allocation.getLocationCode();// 更正大小写
 
 			if (!StringUtil.isEqualIgnoreCase(allocation.getBarcode(), barcode)) {
 				message.setMsg("请重新在商品条码输入框按回车提交条码");
@@ -404,10 +402,10 @@ public class OutShelfServiceImpl implements OutShelfService {
 			}
 
 			// 2019-03-20 - 给前端返回该库位是否还有商品条码未下架
-			boolean locationisFinished = outInventoryAllocationService.isFinished(outOrderId, locationCode);
+			boolean locationisFinished = outInventoryAllocationService.isFinished(outOrderId, allocation.getLocationCode());
 			if (locationisFinished) {
 				// 该库位完成下架
-				message.setMsg("该库位已下架完成,请到下一个库位");
+				message.setMsg("该条形码["+allocation.getBarcode()+"]的库位["+allocation.getLocationCode()+"]已下架完成,请到下一个库位");
 				message.setExtend("2");
 			} else {
 				// 代表该库位还有其他条码未完成下架
@@ -600,6 +598,16 @@ public class OutShelfServiceImpl implements OutShelfService {
 			return message;
 		}
 		List<OutShelfResultVo> list = outShelfMapper.selectForOutBox(orderId);
+		OutOrder outOrder = outOrderService.get(orderId);
+		if (Objects.nonNull(list) && list.size()>0){
+			for (OutShelfResultVo outShelfResultVo : list) {
+				ProductQueryVo productQueryVo = new ProductQueryVo();
+				productQueryVo.setCustomerId(outOrder.getCustomerId());
+				productQueryVo.setSku(outShelfResultVo.getSku());
+				Product product = productMapper.getByCustomerAndSku(productQueryVo);
+				outShelfResultVo.setProductName(product.getProductName());
+			}
+		}
 		message.setExtend(list);
 		message.setSuccess(true);
 		return message;
@@ -632,23 +640,54 @@ public class OutShelfServiceImpl implements OutShelfService {
 				return Message.fail("该波次被其他线程锁定!");
 			}
 			// 1.查询波次
+			boolean isExist = outWaveService.isExist(vo.getWaveNo());
+			if (!isExist) {
+				// 如果波次号不存在,判断运单是否存在
+				Message message = outOrderService.selectByNo(vo.getWaveNo());
+				if (!message.isSuccess()) {
+					return Message.fail("该波次单号或运单号不存在");
+				}
+				OutOrder order = (OutOrder) message.getExtend();
+				vo.setWaveNo(order.getWaveNo());
+			}
 			OutWave outWave = outWaveService.getByWaveNo(vo.getWaveNo());
 			if (outWave == null) {
-				return Message.fail("波次号码不存在!");
+				return Message.fail("波次号不存在");
 			}
 			if (StringUtil.isEqual(outWave.getStatusCode(), OutWaveStatusEnum.FINISH.getCode())) {
 				return Message.fail("该波次已经完成下架!");
 			}
 			// 2.根据波次, 货位号 商品条码查询预下架信息
-			String locationCode = vo.getLocationCode();
+//			String locationCode = vo.getLocationCode();
 			String barcode = vo.getBarcode();
 			String waveId = outWave.getId();
-			List<OutInventoryAllocation> list = outInventoryAllocationService.listForWaveOutShelf(waveId, locationCode,
+			List<OutInventoryAllocation> list = outInventoryAllocationService.listForWaveOutShelf(waveId,
 					barcode);
 			if (list.size() <= 0) {
-				return Message.fail("库位号或商品条码错误,请核对拣货单!");
+				return Message.fail("商品条码错误,请核对拣货单!");
 			}
 
+			// 把list按动线号排序
+			for (OutInventoryAllocation allocation : list) {
+				String locationCode = allocation.getLocationCode(); // 当前商品的库位号
+				LocationQueryVo locationQueryVo = new LocationQueryVo();
+				locationQueryVo.setWarehouseCode(allocation.getWarehouseCode());
+				locationQueryVo.setCode(locationCode);
+				locationQueryVo.setZoneCode(allocation.getZoneCode());
+				List<LocationResultVo> locationResultVoList = locationMapper.selectByVoList(locationQueryVo);
+				if (Objects.nonNull(locationResultVoList) && locationResultVoList.size()==1){
+					allocation.setExtend5(locationResultVoList.get(0).getLineNumber().toString()); // 使用个临时字段存动线号
+				}
+			}
+
+			// 对list进行按动线号排序,越小越优先
+			Collections.sort(list, new Comparator<OutInventoryAllocation>() {
+				@Override
+				public int compare(OutInventoryAllocation o1, OutInventoryAllocation o2) {
+					return Integer.compare(Integer.valueOf(o2.getExtend5()==null?"0":o2.getExtend5()),Integer.valueOf(o1.getExtend5()==null?"0":o1.getExtend5()));
+				}
+			});
+
 			// 验证波次内订单状态
 			for (OutInventoryAllocation allocation : list) {
 				String outOrderId = allocation.getOutOrderId();
@@ -696,10 +735,13 @@ public class OutShelfServiceImpl implements OutShelfService {
 			handleWaveStatusForOutShelf(outWave, user, isFinished);// 更新波次单状态
 
 			Message message = Message.success("下架成功");
+			HashMap<String,Object> map = new HashMap<>();
+			map.put("allocationList",list);
 			if (isFinished) {
 				message.setMsg("波次:" + outWave.getWaveNo() + ",已完成下架,请操作下一个波次");
-				message.setExtend("3"); // 1:该库位的该条码完成 ,2:该库位完成,3: 整个波次完成
+				map.put("flag","3");// 1:该库位的该条码完成 ,2:该库位完成,3: 整个波次完成
 			}
+			message.setExtend(map);
 			return message;
 		} finally {
 			waveLockService.unlock(vo.getWaveNo());

+ 7 - 2
wms-core-service/src/main/java/com/lote/wms/outstock/wave/service/impl/OutWaveServiceImpl.java

@@ -279,8 +279,13 @@ public class OutWaveServiceImpl implements OutWaveService {
 	public Message isAllowOutShelf(String waveNo) {
 		boolean isExist = isExist(waveNo);
 		if (!isExist) {
-			return Message.fail("该波次单号不存在");
-
+			// 如果波次号不存在,判断运单是否存在
+			Message message = outOrderService.selectByNo(waveNo);
+			if(!message.isSuccess()){
+				return Message.fail("该波次单号或运单号不存在");
+			}
+			OutOrder order = (OutOrder) message.getExtend();
+			waveNo = order.getWaveNo();
 		}
 		OutWave outWave = getByWaveNo(waveNo);
 		if (StringUtil.isEqual(outWave.getStatusCode(), OutWaveStatusEnum.FINISH.getCode())) {

+ 1 - 1
wms-core-service/src/main/resources/mybatis/mapper/inventory/inventory/InventoryMapper.xml

@@ -1012,7 +1012,7 @@
 				warehouse_code,
                 customer_id,
 				customer_code,
-                group_concat(barcode) as barcode,
+                barcode as barcode,
 
 				sku,
 				batch_no,

+ 14 - 0
wms-core-service/src/main/resources/mybatis/mapper/outstock/order/OutOrderMapper.xml

@@ -1708,6 +1708,9 @@
 			<if test="itemExportFieldStr !=null and itemExportFieldStr !='' ">
 				, ${itemExportFieldStr}
 			</if>
+            <if test="boxExportFieldStr !=null and boxExportFieldStr !='' ">
+              , ${boxExportFieldStr}
+            </if>
 		from out_order o
 			<if test="receiverExportFieldStr !=null and receiverExportFieldStr!= '' ">
 				left join `out_order_receiver` receiver on receiver.out_order_id=o.id
@@ -1718,6 +1721,17 @@
 			<if test="itemExportFieldStr !=null and itemExportFieldStr !='' ">
 				left join `out_order_item` item on item.out_order_id=o.id
 			</if>
+            <if test="boxExportFieldStr !=null and boxExportFieldStr !='' ">
+              left join (
+                SELECT
+                order_no1,
+                GROUP_CONCAT(b.box_no) box_no
+                FROM
+                out_order
+                LEFT JOIN out_boxed b ON out_order.order_no1 = b.out_order_no
+                GROUP BY b.out_order_no
+              ) box on o.order_no1=box.order_no1
+            </if>
 		where 1=1
 			<include refid="selectByVoListConditionSql"></include>
 		<choose>

+ 1 - 1
wms-core-service/src/main/resources/mybatis/mapper/outstock/outshelf/OutInventoryAllocationMapper.xml

@@ -538,7 +538,7 @@
     from out_inventory_allocation
 		where out_order_id in (
         	select out_order_id from out_wave_item  where out_wave_id=#{outWaveId}
-    	) and location_Code = #{locationCode} and barcode=#{barcode}
+    	)  and barcode=#{barcode}
   </select>
   
   <select id="countLocationCodeById" >

+ 14 - 0
wms-operate/src/main/java/com/lote/wms/controller/operate/inventory/check/InventoryCheckController.java

@@ -14,6 +14,7 @@ import com.lote.wms.inventory.check.entity.queryvo.InventoryCheckQueryVo;
 import com.lote.wms.inventory.check.entity.resultvo.InventoryCheckResultVo;
 import com.lote.wms.inventory.check.service.InventoryCheckDetailService;
 import com.lote.wms.inventory.check.service.InventoryCheckService;
+import com.lote.wms.inventory.move.entity.queryvo.InventoryMvQueryVo;
 import com.lote.wms.user.user.entity.User;
 import org.mybatis.plugin.model.Pager;
 import org.slf4j.Logger;
@@ -23,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 @RestController
 @RequestMapping("/inventory/inventoryCheck")
@@ -204,4 +206,16 @@ public class InventoryCheckController extends AbstractController {
 		Message message = inventoryCheckService.effect(id, getUser());
 		return MessageToResultAdapt.toResult(message);
 	}
+
+
+	/**
+	 * 盘点导出
+	 * @param map
+	 * @return
+	 */
+	@ResponseBody
+	@RequestMapping("export")
+	public Result export(@RequestBody Map<String,Object> map) {
+		return MessageToResultAdapt.toResult(inventoryCheckService.export(map));
+	}
 }

+ 13 - 9
wms-operate/src/main/java/com/lote/wms/controller/operate/outstock/order/OutOrderController.java

@@ -218,7 +218,8 @@ public class OutOrderController extends AbstractController {
 	/**
 	 * 设置仓库
 	 * 
-	 * @param ids
+	 * @param orderIds
+	 * @param warehouseCode
 	 * @return
 	 */
 	@ResponseBody
@@ -234,7 +235,8 @@ public class OutOrderController extends AbstractController {
 	 *
 	 * 只能设置单号为空的出库单
 	 * 
-	 * @param ids
+	 * @param orderIds
+	 * @param shipwayCode
 	 * @return
 	 */
 	@ResponseBody
@@ -267,7 +269,7 @@ public class OutOrderController extends AbstractController {
 	 * 
 	 * 批量容易死锁,难以控制重复申请和并发
 	 * 
-	 * @param ids
+	 * @param id
 	 * @return
 	 */
 	@ResponseBody
@@ -323,7 +325,8 @@ public class OutOrderController extends AbstractController {
 	/**
 	 * 更新打印拣货单状态
 	 * 
-	 * @param orderIdList
+	 * @param isUpdateStatus
+	 * @param orderIds
 	 * @return
 	 */
 	@RequestMapping("printOutShelfUpdate")
@@ -383,7 +386,7 @@ public class OutOrderController extends AbstractController {
 	@RequestMapping(value = "/selectForWeigh", method = RequestMethod.POST)
 	@ResponseBody
 	public Result selectForWeigh(String orderNo) {
-		return MessageToResultAdapt.toResult(outOrderService.selectForWeigh(orderNo));
+		return MessageToResultAdapt.toResult(outOrderService.selectForWeigh(orderNo, getUser()));
 	}
 
 	/**
@@ -452,7 +455,7 @@ public class OutOrderController extends AbstractController {
 	/**
 	 * 手工建波次
 	 * 
-	 * @param idList
+	 * @param orderIdList
 	 * @return
 	 */
 	@RequestMapping("createWaveByManual")
@@ -465,7 +468,7 @@ public class OutOrderController extends AbstractController {
 	/**
 	 * 退出波次
 	 * 
-	 * @param idList
+	 * @param orderIdList
 	 * @return
 	 */
 	@RequestMapping("exitWave")
@@ -508,7 +511,8 @@ public class OutOrderController extends AbstractController {
 	 * 设置备注
 	 *
 	 * 
-	 * @param ids
+	 * @param orderId
+	 * @param remark
 	 * @return
 	 */
 	@ResponseBody
@@ -577,7 +581,7 @@ public class OutOrderController extends AbstractController {
 	/**
 	 * 格式化前端输入的单号
 	 * 
-	 * @param ids
+	 * @param orderNos
 	 * @return
 	 */
 	@ResponseBody

+ 64 - 2
wms-operate/src/main/resources/static/ui/js/inventory/check/check/list.js

@@ -310,7 +310,7 @@ function effect(){
 		return false;
 	}
 	//确认?
-	var confirmMsg = '<span style="color:red;font-size:16px;">确认对选中的盘点单执行生效,更改库存数量吗?</span></br>注:确认生效后,库存正式更改为盘点数量(此操作不可逆!)';
+	var confirmMsg = '<span style="color:red;font-size:16px;">确认对选中的盘点单执行完结吗?</span></br>注:完结仅为修改状态标识,不会修改库存数量,如需修改库存数量,请使用库存管理的移库功能。';
 	$.iMessager.confirm('操作提示', confirmMsg,function(a) {
 		if (!a) {
 			isSubmitIng = false;
@@ -331,4 +331,66 @@ function effect(){
 			isSubmitIng = false;
 		});
 	});
-}
+}
+
+
+
+//导出
+$("#export").iMenubutton({
+	menu:'#exportSubMenu',
+	btnCls: 'topjui-btn',
+	// hasDownArrow:true,
+	iconCls:'fa fa-file',
+	method:'',
+	onClick:function(){
+		var rows = getCheckedRowsData(myGrid.type, myGrid.id);//获取勾选中的行
+		if(rows == null || rows.length == 0){
+			$.iMessager.alert('提示', '请先勾选要导出的盘点数据', 'messager-info');
+			return false;
+		}
+		if(rows == null || rows.length != 1){
+			$.iMessager.alert('提示', '只可以导出一行盘点数据', 'messager-info');
+			return false;
+		}
+		var id=rows[0].id;
+
+		var exportDataStr = JSON.stringify({id:id});
+		$.iMessager.progress({text: '正在导出中....'});
+		//执行下载
+		$.ajax({
+			method:"POST",
+			url: "/inventory/inventoryCheck/export",
+			data: exportDataStr,
+			dataType:"json",
+			contentType:"application/json",
+			success: function(result){
+				$.iMessager.progress('close');
+				if(result.code !=0 ){// 如果result不是成功
+					$.iMessager.alert('操作提示', result.msg, 'messager-info');
+					return;
+				}
+
+				$.iMessager.show({title: '温馨提示',msg:'正在下载文件:'+ result.msg,timeout:4000}); // 右下角提示信息
+				window.open(result.msg)
+			}
+		});
+
+	}
+});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 1 - 0
wms-operate/src/main/resources/static/ui/js/inventory/check/checkDetail/list.js

@@ -155,6 +155,7 @@ $("#edit").iMenubutton({
 			var row = getSelectedRowData(myGrid.type, myGrid.id);// 获取选中的行
 			console.log(row)
 			$("#checkQty").val(row.checkQty);
+			$("#sysQty").val(row.sysQty);
 			$("#checkId").val(row.id);
 		}
 	}

+ 1 - 0
wms-operate/src/main/resources/static/ui/js/inventory/move/random/list.js

@@ -20,6 +20,7 @@ $("#myGrid").iDatagrid({
     	 {field: 'qtyMvOn',width:'100px', title: '上架数量'},
     	 
     	 {field: 'onShelfDetail',width:'200px', title: '上架详情'},
+		{field: 'remark',width:'200px', title: '移库原因'},
     	 
     	 {field: 'createdTime',width:'150px', title: '创建时间',formatter:function(value, row, index){ 
     	     return fmtDateTime(row.createdTime);

+ 9 - 2
wms-operate/src/main/resources/static/ui/js/inventory/move/random/main.js

@@ -2,7 +2,7 @@ $(function() {
 	cleanAll();
 
 	listenEnterAndFocusNext("outShelfLocationCode","barcode");
-	
+	listenEnterAndFocusNext("transResult","onShelfLocationCode");
 	/**
 	 * 商品条码回车之后请求后台数据
 	 */
@@ -30,7 +30,7 @@ $(function() {
 			return
 		}
 		
-		$("#onShelfLocationCode").focus();
+		$("#transResult").focus();
 	})
 
 	/**
@@ -148,6 +148,7 @@ function submitInventoryMv() {
 	var barcode = $("#barcode").val();
 	var onShelfLocationCode = $("#onShelfLocationCode").val();
 	var qty = $("#qty").val();
+	var transResult = $("#transResult").val();
 
 	var msgBody = {};
 	msgBody.outShelfLocationCode = outShelfLocationCode;
@@ -155,6 +156,7 @@ function submitInventoryMv() {
 	msgBody.onShelfLocationCode = onShelfLocationCode;
 	msgBody.outShelfInventoryId = outShelfInventoryId;
 	msgBody.qty = qty;
+	msgBody.transResult = transResult;
 
 	//序列化成字符串
 	var msgBodyStr = JSON.stringify(msgBody)
@@ -174,6 +176,11 @@ function submitInventoryMv() {
 		isSubmintIng = false;
 		return;
 	}
+	if(transResult == null || transResult == '') {
+		$.iMessager.show({title: '温馨提示',msg:'请输入转移原因',timeout:2000}); //右下角提示信息
+		isSubmintIng = false;
+		return;
+	}
 	if(onShelfLocationCode == outShelfLocationCode) {
 		$.iMessager.show({title: '温馨提示',msg:'下架库位号跟上架库位号不能相同',timeout:2000}); //右下角提示信息
 		isSubmintIng = false;

+ 15 - 14
wms-operate/src/main/resources/static/ui/js/outstock/boxed/outBoxed/main.js

@@ -23,16 +23,16 @@ $(function(){
 	 	}  
 	});	
 	
-	//是否自动提交
-	$("#isAutoSubBox").click(function(){
-		if ($("#isAutoSubBox").is(":checked")) {
-			$("#productQty").attr("readonly","readonly");
-			$("#productQty").val("1");//扫描提交,固定为1
-		}else{
-			$("#productQty").removeAttr("readonly");
-			$("#productQty").val("");//清空数量,由人工输入
-		}
-	});
+	// //是否自动提交
+	// $("#isAutoSubBox").click(function(){
+	// 	if ($("#isAutoSubBox").is(":checked")) {
+	// 		// $("#productQty").attr("readonly","readonly");
+	// 		// $("#productQty").val("1");//扫描提交,固定为1
+	// 	}else{
+	// 		$("#productQty").removeAttr("readonly");
+	// 		$("#productQty").val("");//清空数量,由人工输入
+	// 	}
+	// });
 	
 	//提交出库单号
     $('#outOrderNo').keyup(function (event) {
@@ -259,11 +259,12 @@ function refreshItems(){
     			}
     			
     			var tr = "<tr style='height: 15px;' id='item_"+item.id+"'>";
-	    			tr += "<th><div style='width:160px;overflow: auto;'>"+item.sku+"</div></th>";
-	    			tr += "<th><div style='width:180px;overflow: auto;'>"+item.barcode+"</div></th>";
+	    			tr += "<th><div style='width:140px;overflow: auto;'>"+item.sku+"</div></th>";
+	    			tr += "<th><div style='width:140px;overflow: auto;'>"+item.barcode+"</div></th>";
+					tr += "<th><div style='width:140px;overflow: auto;'>"+item.productName+"</div></th>";
 	    			tr += "<th><div style='width:80px;overflow: hidden;'>"+item.totalQty+"</div></th>";
-	    			tr += "<th><div style='width:90px;overflow: hidden;'>"+item.boxedQty+"</div></th>";
-	    			tr += "<th><div style='width:90px;overflow: hidden;'>"+waitBoxQty+"</div></th>";
+	    			tr += "<th><div style='width:80px;overflow: hidden;'>"+item.boxedQty+"</div></th>";
+	    			tr += "<th><div style='width:80px;overflow: hidden;'>"+waitBoxQty+"</div></th>";
     			tr += "</tr>";
     			
     			$("#itemList").append(tr);

+ 20 - 14
wms-operate/src/main/resources/static/ui/js/outstock/outshelf/outShelf/single.js

@@ -31,13 +31,13 @@ $(function(){
         submitOutOrderNo();
     });
 	
-    //库位号回车
-    $('#locationCode').keyup(function (event) {
-    	if (event.keyCode != "13") {return false;}
-    	$("#locationCode").val(trimStr($("#locationCode").val()));
-    	
-    	$('#barcode').focus();
-    });
+    // //库位号回车
+    // $('#locationCode').keyup(function (event) {
+    // 	if (event.keyCode != "13") {return false;}
+    // 	$("#locationCode").val(trimStr($("#locationCode").val()));
+    //
+    // 	$('#barcode').focus();
+    // });
     
     //条码回车
     $('#barcode').keyup(function (event) {
@@ -85,8 +85,11 @@ function submitOutOrderNo(){
         	$("#statusName").css('color','black');
         	
         	//进入下架操作
-        	$("#locationCode").focus();
-        	
+        	// $("#barcode").focus();
+
+        	// 清空输入框
+			nextBarcode();
+
         	//刷新显示下架详情
         	refreshItems();
         },
@@ -101,13 +104,13 @@ function submitBarcode(){
 	var outOrderNo = $('#outOrderNo').val();
 	var outOrderId=$("#outOrderId").val();
 	var barcode= $('#barcode').val();
-	var locationCode=$('#locationCode').val();
+	// var locationCode=$('#locationCode').val();
 	
 	var jsonData={};
 	
 	jsonData.outOrderNo=outOrderNo;
 	jsonData.outOrderId=outOrderId;
-	jsonData.locationCode=locationCode;
+	// jsonData.locationCode=locationCode;
 	jsonData.barcode=barcode;
     //查询是否存在  会显示数量
 	$.ajax({
@@ -116,6 +119,7 @@ function submitBarcode(){
         data:JSON.stringify(jsonData),
         contentType:"application/json",
         success: function (result) {
+        	console.log(result)
         	if(result.code !=0){
     			$.iMessager.alert('注意', result.msg, 'messager-warning');
     			return;
@@ -153,7 +157,7 @@ function submitOutShelf(){
 	var outOrderId=$("#outOrderId").val();
 	var outOrderNo = $('#outOrderNo').val();
 	var allocationId=$('#allocationId').val();
-	var locationCode=$('#locationCode').val();
+	// var locationCode=$('#locationCode').val();
 	var barcode= $('#barcode').val();
 	var productQty=$("#productQty").val();
 	
@@ -162,7 +166,7 @@ function submitOutShelf(){
 	jsonData.outOrderNo=outOrderNo;
 	jsonData.quantity=productQty;
 	jsonData.allocationId=allocationId;
-	jsonData.locationCode=locationCode;
+	// jsonData.locationCode=locationCode;
 	
 	jsonData.barcode=barcode;
 	
@@ -174,6 +178,7 @@ function submitOutShelf(){
         data:JSON.stringify(jsonData),
         contentType:"application/json",
         success: function (result) {
+        	console.log(result)
         	isSubmintIng = false;
         	$.iMessager.progress('close');
         	
@@ -191,7 +196,7 @@ function submitOutShelf(){
         	
         	if(result.data=='2'){//下架成功
         		//下一个库位
-            	nextLocation();
+				nextBarcode();
             	refreshItems();
         		return;
         	}
@@ -255,6 +260,7 @@ function cleanAll(){
 	$("input").each(function(){
 		$(this).val("")
 	})
+	$("#itemList").empty();
 	$('#outOrderNo').focus();
 }
 

+ 16 - 15
wms-operate/src/main/resources/static/ui/js/outstock/outshelf/outShelf/wave.js

@@ -15,13 +15,13 @@ $("#waveNo").blur(function(){
 });
 
 // 库位号回车
-$('#locationCode').keyup(function(event) {
-	if (event.keyCode != "13") {
-		return false;
-	}
-	$("#locationCode").val(trimStr($("#locationCode").val()));
-	$('#barcode').focus();
-});
+// $('#locationCode').keyup(function(event) {
+// 	if (event.keyCode != "13") {
+// 		return false;
+// 	}
+// 	$("#locationCode").val(trimStr($("#locationCode").val()));
+// 	$('#barcode').focus();
+// });
 
 // 条码回车
 $('#barcode').keyup(function(event) {
@@ -72,7 +72,7 @@ function submitWaveNo(){
 			$("#customerCode").val(wave.customerCode);
 			$("#statusName").val(wave.statusName);
 			
-			$('#locationCode').focus();
+			$('#barcode').focus();
 		},
 		error : function() {
 			$.iMessager.progress('close');
@@ -129,6 +129,7 @@ function submitOutShelf() {
 		data : JSON.stringify(jsonData),
 		contentType : "application/json",
 		success : function(result) {
+			console.log(result)
 			isSubmintIng = false;
 			$.iMessager.progress('close');
 
@@ -142,14 +143,14 @@ function submitOutShelf() {
 			});
 
 			
-			refreshItems();
+			refreshItems(result.data.allocationList[0].locationCode);
 
-			if (result.data == '3') {// 订单完成下架
+			if (result.data.flag == '3') {// 订单完成下架
 				cleanAll();
 				return;
 			} else {
 				// 下一个库位  -- 拆分为下一个条码还是库位
-				nextLocationCode();
+				nextBarcode();
 			}
 		},
 		error : function() {
@@ -161,18 +162,18 @@ function submitOutShelf() {
 	});
 }
 
-function nextLocationCode() {
+function nextBarcode() {
 	// 下架完之后清空
 	$(".allowClear").each(function() {
 		$(this).val("")
 	})
-	$('#locationCode').focus();
+	$('#barcode').focus();
 }
 
 // 刷新显示已下架明细
-function refreshItems() {
+function refreshItems(locationCode) {
 	var waveNo = $("#waveNo").val();
-	var locationCode = $('#locationCode').val();
+	// var locationCode = $('#locationCode').val();
 	var barcode = $('#barcode').val();
 	var quantity = $("#productQty").val();
 

+ 2 - 1
wms-operate/src/main/resources/static/ui/views/instock/order/inOrder/list.html

@@ -54,7 +54,8 @@
                 	{'id':'','code':'','name':''},
                 	{'id':'add','code':'add','name':'单个创建'},
                 	{'id':'excel','code':'excel','name':'Excel导入'},
-                	{'id':'api','code':'api','name':'API对接'}
+                	{'id':'api','code':'api','name':'API对接'},
+                	{'id':'invent','code':'invent','name':'虚拟上架'}
                 ],
 				panelHeight:150"> 
 				

+ 3 - 1
wms-operate/src/main/resources/static/ui/views/inventory/check/check/list.html

@@ -60,7 +60,9 @@
 			
 			<a id="confirm" href="javascript:void(0)" style="width: 85px;">确认差异</a>
 			
-			<a id="effect" href="javascript:void(0)" style="width: 85px;">生效</a>
+			<a id="effect" href="javascript:void(0)" style="width: 85px;">完结</a>
+
+			<a id="export"  href="javascript:void(0)" style="width: 85px;">导出</a>
 		</div>		
 	</div>
     <!-- 表格工具栏结束 -->

+ 24 - 0
wms-operate/src/main/resources/static/ui/views/inventory/check/checkDetail/updateCheckQty.html

@@ -0,0 +1,24 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
+<form id="updateCheckQtyFormId" style="float: left">
+    <input type="hidden" id="checkId" name="checkId">
+    <table class="editTable">
+        <tr>
+            <td class="label">原系统数量</td>
+            <td>
+                <input type="text" data-toggle="topjui-numberspinner" id="sysQty" name="sysQty" data-options="width:450" readonly="readonly">
+            </td>
+        </tr>
+        <tr>
+            <td class="label">原盘点数量</td>
+            <td>
+                <input type="text" data-toggle="topjui-numberspinner" id="checkQty" name="checkQty" data-options="width:450" readonly="readonly">
+            </td>
+        </tr>
+        <tr>
+            <td class="label">新盘点数量</td>
+            <td>
+                <input type="text" data-toggle="topjui-numberspinner" id="newCheckQty" name="newCheckQty" data-options="required:true,width:450,prompt:'请填写数字'"></td>
+            </td>
+        </tr>
+    </table>
+</form>

+ 8 - 1
wms-operate/src/main/resources/static/ui/views/inventory/move/random/main.html

@@ -108,7 +108,14 @@
 	                <input type="number" class="form-control allowClear wd220" id="qty"  placeholder="输入后请按回车">
 	            </th>
 	        </tr>
-	
+			<tr>
+				<th class="wd120">
+					<span class="btn btn-default wd120">转移原因</span>
+				</th>
+				<th>
+					<input type="text" class="form-control allowClear wd220" id="transResult"  placeholder="输入后请按回车">
+				</th>
+			</tr>
 	        <tr>
 	            <th class="wd120">
 	                <span class="btn btn-default wd120">上架库位</span>

+ 27 - 26
wms-operate/src/main/resources/static/ui/views/outstock/boxed/outBoxed/main.html

@@ -112,27 +112,27 @@
 			</tr>
 		</table>
 
-<!--		<div class="pull-left badge badge-success" style="width:120px;font-weight: bold; color: white;background-color: #669533;">2扫描箱号</div>			-->
-<!--		<table class="table wd750" style="margin-top: 0px;padding-bottom: 0px;">-->
-<!--			<tr>-->
-<!--				<th class="wd120" style="padding-bottom: 0px;">-->
-<!--					<span class="btn btn-default wd120">箱子号码</span>-->
-<!--				</th>-->
-<!--				<th class="wd220" style="padding-bottom: 0px;">-->
-<!--					<input type="text" class="form-control wd220" id="boxNo" placeholder="输入后请按回车,建议编号1,2,3.." >-->
-<!--					<input type="text" class="form-control wd220" id="boxNo_hide" style="display: none;" >-->
-<!--					<input type="text" id="boxId" style="display: none;">-->
-<!--				</th>-->
-<!--				-->
-<!--				<th colspan="2" style="width:340px;">-->
-<!--					<div class="wd120" style="font-size: 5mm; font-family: Tahoma;display: inline-block;line-height: 30px;">-->
-<!--						<input class="mycheckbox" type="checkbox" style="" onchange="saveCheckBox('autoNextBox')" id="autoNextBox" checked>自动生成-->
-<!--					</div>					-->
-<!--				</th>				-->
-<!--			</tr>-->
-<!--		</table>-->
-
-		<div class="pull-left badge badge-success" style="width:120px;font-weight: bold; color: white;background-color: #669533;margin-top:-10px;">2扫描商品</div>
+		<div class="badge badge-success" style="width:120px;font-weight: bold; color: white;background-color: #669533;">2扫描箱号</div>
+		<table class="table wd750" style="margin-top: 0px;padding-bottom: 0px;">
+			<tr>
+				<th class="wd120" style="padding-bottom: 0px;">
+					<span class="btn btn-default wd120">箱子号码</span>
+				</th>
+				<th class="wd220" style="padding-bottom: 0px;">
+					<input type="text" class="form-control wd220" id="boxNo" placeholder="输入后请按回车,建议编号1,2,3.." >
+					<input type="text" class="form-control wd220" id="boxNo_hide" style="display: none;" >
+					<input type="text" id="boxId" style="display: none;">
+				</th>
+
+				<th colspan="2" style="width:340px;">
+					<div class="wd120" style="font-size: 5mm; font-family: Tahoma;display: inline-block;line-height: 30px;">
+						<input class="mycheckbox" type="checkbox" style="" onchange="saveCheckBox('autoNextBox')" id="autoNextBox" checked>自动生成
+					</div>
+				</th>
+			</tr>
+		</table>
+
+		<div class="badge badge-success" style="width:120px;font-weight: bold; color: white;background-color: #669533;margin-top:-10px;">3扫描商品</div>
 		<table class="table wd750" style="margin-top: 0px;padding-bottom: 0px;">
 			<tr>
 				<th  class="wd120" style="padding-bottom: 10px;">
@@ -170,11 +170,12 @@
 	 					<th colspan="5" style="color: red;font-weight: bold;font-size: 7pt;text-align: left;height:7px;line-height:7px">下架商品的复核装箱情况</th>
 	 				</tr>
 					<tr style="height: 8px;">
-		 				<th><div style="text-align: left;font-size: 8pt;width:150px;height: 8px;line-height: 8px">商品SKU</div></th>
-		 				<th><div style="text-align: left;font-size: 8pt;width: 150px;height: 8px;line-height: 8px">条码</div></th>
-		 				<th><div style="text-align: center;font-size: 8pt;width:100px;height: 8px;line-height: 8px">总数</div></th>
-		 				<th><div style="text-align: center;font-size: 8pt;width:100px;height: 8px;line-height: 8px">已装箱数</div></th>
-		 				<th><div style="text-align: center;font-size: 8pt;width:100px;height: 8px;line-height: 8px">待装箱数</div></th>
+		 				<th><div style="text-align: left;font-size: 8pt;width:140px;height: 8px;line-height: 8px">商品SKU</div></th>
+		 				<th><div style="text-align: left;font-size: 8pt;width: 140px;height: 8px;line-height: 8px">条码</div></th>
+						<th><div style="text-align: left;font-size: 8pt;width: 140px;height: 8px;line-height: 8px">商品名称</div></th>
+		 				<th><div style="text-align: center;font-size: 8pt;width:80px;height: 8px;line-height: 8px">总数</div></th>
+		 				<th><div style="text-align: center;font-size: 8pt;width:80px;height: 8px;line-height: 8px">已装箱数</div></th>
+		 				<th><div style="text-align: center;font-size: 8pt;width:80px;height: 8px;line-height: 8px">待装箱数</div></th>
 		 			</tr>
 	 			</thead>
 	 			<tbody id="itemList">

+ 16 - 16
wms-operate/src/main/resources/static/ui/views/outstock/outshelf/outShelf/single.html

@@ -68,7 +68,7 @@
 					<span class="btn btn-default wd120">出库单号</span>
 				</th>
 				<th class="wd220"  style="padding-top: 5px;padding-bottom: 2px;">
-					<input type="text" class="form-control wd220" id="outOrderNo" placeholder="输入请按回车">
+					<input type="text" class="form-control wd220" id="outOrderNo" placeholder="输入订单号或跟踪号(运单号),请按回车">
 					<input type="text" id="outOrderId" style="display: none;">
 				</th>
 
@@ -111,21 +111,21 @@
 			</tr>
 		</table>
 
-		<div class="pull-left badge badge-success" style="width:120px;font-weight: bold; color: white;background-color: #669533;">2扫描库位</div>			
-		<table class="table wd750" style="margin-top: 0px;padding-bottom: 0px;">
-			<tr>
-				<th class="wd120" style="padding-bottom: 0px;">
-					<span class="btn btn-default wd120">库位号码</span>
-				</th>
-				<th class="wd220" style="padding-bottom: 0px;">
-					<input type="text" class="form-control wd220 allowClear" id="locationCode" placeholder="输入后请按回车">
-				</th>
-				<th colspan="2">
-					&nbsp;
-				</th>
-				 	
-			</tr>
-		</table>
+<!--		<div class="pull-left badge badge-success" style="width:120px;font-weight: bold; color: white;background-color: #669533;">2扫描库位</div>			-->
+<!--		<table class="table wd750" style="margin-top: 0px;padding-bottom: 0px;">-->
+<!--			<tr>-->
+<!--				<th class="wd120" style="padding-bottom: 0px;">-->
+<!--					<span class="btn btn-default wd120">库位号码</span>-->
+<!--				</th>-->
+<!--				<th class="wd220" style="padding-bottom: 0px;">-->
+<!--					<input type="text" class="form-control wd220 allowClear" id="locationCode" placeholder="输入后请按回车">-->
+<!--				</th>-->
+<!--				<th colspan="2">-->
+<!--					&nbsp;-->
+<!--				</th>-->
+<!--				 	-->
+<!--			</tr>-->
+<!--		</table>-->
 							
 		<div class="pull-left badge badge-success" style="width:120px;font-weight: bold; color: white;background-color: #669533;">3扫描商品</div>			
 		<table class="table wd750" style="margin-top: 0px;padding-bottom: 0px;">

+ 16 - 16
wms-operate/src/main/resources/static/ui/views/outstock/outshelf/outShelf/wave.html

@@ -68,7 +68,7 @@
 					<span class="btn btn-default wd120">波次单号</span>
 				</th>
 				<th class="wd220">
-					<input type="text" class="form-control wd220" id="waveNo" placeholder="输入后请按回车">
+					<input type="text" class="form-control wd220" id="waveNo" placeholder="输入波次单号或运单号后请按回车">
 				</th>
 				<th colspan="2">
 					&nbsp;
@@ -111,21 +111,21 @@
 			</tr>								 
 		</table>
 
-		<div class="pull-left badge badge-success" style="width:120px;font-weight: bold; color: white;background-color: #669533;">2扫描库位</div>			
-		<table class="table wd750" style="margin-top: 0px;padding-bottom: 0px;">
-			<tr>
-				<th class="wd120" style="padding-bottom: 0px;">
-					<span class="btn btn-default wd120">库位号码</span>
-				</th>
-				<th class="wd220" style="padding-bottom: 0px;">
-					<input type="text" class="form-control wd220 allowClear" id="locationCode" placeholder="输入后请按回车">
-				</th>
-				<th colspan="2">
-					&nbsp;
-				</th>
-				 	
-			</tr>
-		</table>
+<!--		<div class="pull-left badge badge-success" style="width:120px;font-weight: bold; color: white;background-color: #669533;">2扫描库位</div>			-->
+<!--		<table class="table wd750" style="margin-top: 0px;padding-bottom: 0px;">-->
+<!--			<tr>-->
+<!--				<th class="wd120" style="padding-bottom: 0px;">-->
+<!--					<span class="btn btn-default wd120">库位号码</span>-->
+<!--				</th>-->
+<!--				<th class="wd220" style="padding-bottom: 0px;">-->
+<!--					<input type="text" class="form-control wd220 allowClear" id="locationCode" placeholder="输入后请按回车">-->
+<!--				</th>-->
+<!--				<th colspan="2">-->
+<!--					&nbsp;-->
+<!--				</th>-->
+<!--				 	-->
+<!--			</tr>-->
+<!--		</table>-->
 							
 		<div class="pull-left badge badge-success" style="width:120px;font-weight: bold; color: white;background-color: #669533;">3扫描商品</div>			
 		<table class="table wd750" style="margin-top: 0px;padding-bottom: 0px;">

+ 6 - 5
wms-operate/src/main/resources/static/ui/views/outstock/wave/outWave/print/printWaveAndOrderNew.html

@@ -209,27 +209,28 @@
 					</td>
 					<td style="width:36mm;text-align: center;overflow: ">
 						<div style="width:36mm;">
-							${outShelfed.productName}
+							<%=data[i].alreadyOutShelfList[j].productName%>
 						</div>
 					</td>
 					<td style="width:20mm;text-align: center;overflow: ">
 						<div style="width:20mm;">
-							${outShelfed.model}
+							<%=data[i].alreadyOutShelfList[j].model%>
 						</div>
 					</td>
 					<td style="width:36mm;font-size: 16px;text-align: center;">
 						<div style="width:36mm;">
-							<b>${outShelfed.locationCode}</b>
+							<b>
+								<%=data[i].alreadyOutShelfList[j].locationCode%></b>
 						</div>
 					</td>
 					<td style="width:15mm;text-align: center;">
 						<div style="width:15mm;">
-							${outShelfed.quantity}
+							<%=data[i].alreadyOutShelfList[j].quantity%>
 						</div>
 					</td>
 					<td style="width:25mm;text-align: center;overflow: ">
 						<div style="width:25mm;">
-							${outShelfed.extend4}
+							<%=data[i].alreadyOutShelfList[j].extend4%>
 						</div>
 					</td>
 				</tr>

+ 6 - 5
wms-operate/src/main/resources/static/ui/views/outstock/wave/outWave/print/printWaveNew.html

@@ -207,27 +207,28 @@
 							</td>
 							<td style="width:36mm;text-align: center;overflow: ">
 								<div style="width:36mm;">
-									${outShelfed.productName}
+									<%=data[i].alreadyOutShelfList[j].productName%>
 								</div>
 							</td>
 							<td style="width:20mm;text-align: center;overflow: ">
 								<div style="width:20mm;">
-									${outShelfed.model}
+									<%=data[i].alreadyOutShelfList[j].model%>
 								</div>
 							</td>
 							<td style="width:36mm;font-size: 16px;text-align: center;">
 								<div style="width:36mm;">
-									<b>${outShelfed.locationCode}</b>
+									<b>
+										<%=data[i].alreadyOutShelfList[j].locationCode%></b>
 								</div>
 							</td>
 							<td style="width:15mm;text-align: center;">
 								<div style="width:15mm;">
-									${outShelfed.quantity}
+									<%=data[i].alreadyOutShelfList[j].quantity%>
 								</div>
 							</td>
 							<td style="width:25mm;text-align: center;overflow: ">
 								<div style="width:25mm;">
-									${outShelfed.extend4}
+									<%=data[i].alreadyOutShelfList[j].extend4%>
 								</div>
 							</td>
 						</tr>