瀏覽代碼

修改task项目跟出入库的代码

zcb 4 年之前
父節點
當前提交
04001326ce
共有 40 個文件被更改,包括 1475 次插入217 次删除
  1. 4 4
      wms-common/src/main/java/com/lote/wms/common/utils/MapBeanUtil.java
  2. 15 6
      wms-core-service/src/main/java/com/lote/wms/api/standard/entity/outstock/OutOrderDto.java
  3. 133 1
      wms-core-service/src/main/java/com/lote/wms/callback/standard/service/impl/StandardCallbackOutstockServiceImpl.java
  4. 22 1
      wms-core-service/src/main/java/com/lote/wms/common/mq/consumer/SyncCustomer.java
  5. 7 7
      wms-core-service/src/main/java/com/lote/wms/instock/order/service/impl/InOrderServiceImpl.java
  6. 10 1
      wms-core-service/src/main/java/com/lote/wms/instock/receipt/entity/queryvo/InReceiptQueryVo.java
  7. 7 4
      wms-core-service/src/main/java/com/lote/wms/instock/receipt/service/impl/InReceiptServiceImpl.java
  8. 10 1
      wms-core-service/src/main/java/com/lote/wms/instock/shelf/entity/queryvo/InShelfQueryVo.java
  9. 6 3
      wms-core-service/src/main/java/com/lote/wms/instock/shelf/service/impl/InShelfServiceImpl.java
  10. 20 1
      wms-core-service/src/main/java/com/lote/wms/user/customer/service/impl/CustomerServiceImpl.java
  11. 35 32
      wms-core-service/src/main/resources/mybatis/mapper/instock/receipt/InReceiptMapper.xml
  12. 62 57
      wms-core-service/src/main/resources/mybatis/mapper/inventory/inventory/InventoryMapper.xml
  13. 3 3
      wms-operate/src/main/java/com/lote/wms/controller/operate/config/db/DataSourceConfiguration.java
  14. 13 13
      wms-operate/src/main/java/com/lote/wms/controller/operate/instock/receipt/InReceiptController.java
  15. 77 0
      wms-operate/src/main/java/com/lote/wms/test/StadardProductTest.java
  16. 157 0
      wms-operate/src/main/java/com/lote/wms/test/StardInstockTest.java
  17. 93 0
      wms-operate/src/main/java/com/lote/wms/test/StardOutStockTest.java
  18. 23 0
      wms-operate/src/main/java/com/lote/wms/test/Test.java
  19. 16 15
      wms-operate/src/main/resources/static/ui/js/inventory/inventory/inventory/listGpBySku.js
  20. 11 10
      wms-operate/src/main/resources/static/ui/views/instock/order/inOrder/listStatus50.html
  21. 7 7
      wms-operate/src/main/resources/static/ui/views/instock/order/inOrderDeleted/list.html
  22. 6 5
      wms-operate/src/main/resources/static/ui/views/instock/receipt/inReceipt/list.html
  23. 6 5
      wms-operate/src/main/resources/static/ui/views/instock/receipt/inReceipt/listReceiptAndShelf.html
  24. 9 8
      wms-operate/src/main/resources/static/ui/views/instock/shelf/shelf/list.html
  25. 15 14
      wms-operate/src/main/resources/static/ui/views/inventory/inventory/inventory/listGpBySku.html
  26. 2 2
      wms-task/build.gradle
  27. 13 2
      wms-task/src/main/java/com/lote/wms/task/controller/JobController.java
  28. 10 10
      wms-task/src/main/java/com/lote/wms/task/job/outstock/SendOutOrderStatusJob.java
  29. 51 0
      wms-task/src/main/resources/spring/config-context.xml
  30. 70 0
      wms-task/src/main/resources/spring/spring-activemq.xml
  31. 54 0
      wms-task/src/main/resources/spring/spring-context.xml
  32. 45 0
      wms-task/src/main/resources/spring/spring-servlet.xml
  33. 二進制
      wms-task/src/main/webapp/WEB-INF/lib/jaxrpc.jar
  34. 二進制
      wms-task/src/main/webapp/WEB-INF/lib/saaj.jar
  35. 二進制
      wms-task/src/main/webapp/WEB-INF/lib/wsdl4j.jar
  36. 361 0
      wms-task/src/main/webapp/WEB-INF/tld/c.tld
  37. 27 0
      wms-task/src/main/webapp/WEB-INF/tld/fmt.tld
  38. 70 0
      wms-task/src/main/webapp/WEB-INF/web.xml
  39. 0 0
      wms-task/src/main/webapp/index.jsp
  40. 5 5
      wms-task/src/main/webapp/views/list.jsp

+ 4 - 4
wms-common/src/main/java/com/lote/wms/common/utils/MapBeanUtil.java

@@ -45,7 +45,7 @@ public class MapBeanUtil {
 	 * @return
 	 */
 	@SuppressWarnings("unchecked")
-	public static Map<String, Object> fromObject(Object obj) {
+	public static Map fromObject(Object obj) {
 		if (obj == null)
 			return null;
 		return new BeanMap(obj);
@@ -54,7 +54,7 @@ public class MapBeanUtil {
 	// ---------- 使用Introspector进行转换 ----------
 	/**
 	 * map 转 bean by Introspector
-	 * 
+	 *
 	 * @param map
 	 * @param beanClass
 	 * @return
@@ -80,7 +80,7 @@ public class MapBeanUtil {
 
 	/**
 	 * bean 转 map by Introspector
-	 * 
+	 *
 	 * @param obj
 	 * @return
 	 * @throws Exception
@@ -138,7 +138,7 @@ public class MapBeanUtil {
 
 	/**
 	 * bean 转 map by Reflect
-	 * 
+	 *
 	 * @param obj
 	 * @return
 	 * @throws Exception

+ 15 - 6
wms-core-service/src/main/java/com/lote/wms/api/standard/entity/outstock/OutOrderDto.java

@@ -37,11 +37,11 @@ public class OutOrderDto implements Serializable {
 	private String statusName;
 
 	private String statusGuide;
-	
+
 	private Double weight;
-	
+
 	private Double volumeWeight;
-	
+
 	private String weighTime;
 
 	private String isCancel;
@@ -144,6 +144,8 @@ public class OutOrderDto implements Serializable {
 
 	private String extend10;
 
+	private String shippingStatus;
+
 	private static final long serialVersionUID = 1L;
 
 	public OutOrderDto() {
@@ -345,8 +347,8 @@ public class OutOrderDto implements Serializable {
 	public String getTrackingNo3() {
 		return trackingNo3;
 	}
-	
-	
+
+
 
 	public Double getWeight() {
 		return weight;
@@ -716,4 +718,11 @@ public class OutOrderDto implements Serializable {
 		this.materialList = materialList;
 	}
 
-}
+	public String getShippingStatus() {
+		return shippingStatus;
+	}
+
+	public void setShippingStatus(String shippingStatus) {
+		this.shippingStatus = shippingStatus;
+	}
+}

+ 133 - 1
wms-core-service/src/main/java/com/lote/wms/callback/standard/service/impl/StandardCallbackOutstockServiceImpl.java

@@ -51,6 +51,15 @@ public class StandardCallbackOutstockServiceImpl implements StandardCallbackOuts
 			return callBackTrackingNo(outOrder, user);
 		}
 
+		if (outOrderOpTypeEnum == OutOrderOpTypeEnum.OUT_SHELVES) {
+
+			return callOutShelves(outOrder, user);
+		}
+		if (outOrderOpTypeEnum == OutOrderOpTypeEnum.OUT_BOXED) {
+
+			return callOutBoxed(outOrder, user);
+		}
+
 		if (outOrderOpTypeEnum == OutOrderOpTypeEnum.OUT_WEIGH_WAVE
 				|| outOrderOpTypeEnum == OutOrderOpTypeEnum.OUT_WEIGH) {
 
@@ -65,6 +74,128 @@ public class StandardCallbackOutstockServiceImpl implements StandardCallbackOuts
 		return Message.fail("不支持的操作节点");
 	}
 
+	private Message callOutBoxed(OutOrder outOrder, User user) {
+		OutOrderDto dto = new OutOrderDto();
+		dto.setOrderNo(outOrder.getOrderNo1());
+		dto.setWarehouseCode(outOrder.getWarehouseCode());
+		dto.setShipwayCode(outOrder.getShipwayCode());
+		dto.setTrackingNo1(outOrder.getTrackingNo1());
+		dto.setTrackingNo2(outOrder.getTrackingNo2());
+		dto.setShippingStatus("600");
+		// url
+		ApiConfig apiConfig = apiConfigService.getByCustomerId(outOrder.getCustomerId());
+		if (apiConfig == null) {
+			return Message.fail("客户未配置回调URL,回传失败!");
+		}
+		String url = apiConfig.getToCUrl();
+		if (StringUtil.isEmpty(url)) {
+			return Message.fail("客户未配置回调URL,回传失败!");
+		}
+		String token = apiConfig.getToCToken();
+		String toCSecretKey = apiConfig.getToCSecretKey();
+		String timestamp = DateUtil.getSystemDate();
+		String content = JacksonUtil.toJSON(dto);
+
+		String dataDigest = null;
+		try {
+			String md5str = EnCodeUtil.md5_32bit((content + toCSecretKey));
+			dataDigest = EnCodeUtil.base64Encode(md5str);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		// 回传类型
+		String type = "callbackOutStockProcess";//
+		logger.info("回传出库单状态节点url:" + url + " ,type:" + type);
+		logger.info("回传出库单状态节点token:" + token + " ,content:" + content + " dataDigest:" + dataDigest);
+
+		Map<String, String> reqMap = new HashMap<>();
+		reqMap.put("type", type);
+		reqMap.put("token", token);
+		reqMap.put("sign", dataDigest);
+		reqMap.put("content", content);
+		reqMap.put("version", "1.0");
+		reqMap.put("timestamp", timestamp);
+		try {
+			String resStr = HttpUtil.post(url, reqMap);
+			if (resStr == null) {
+				return Message.fail("response为空");
+			}
+
+			logger.info("回传出库单状态节点返回resStr:" + resStr);
+			Result result = JacksonUtil.fromJSON(resStr, Result.class);
+			if (result == null) {
+				return Message.fail("response格式错误");
+			}
+			if (!result.isSuccess()) {
+				return Message.fail("推送返回失败,消息:" + result.getMsg());
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return Message.success("推送成功");
+	}
+
+	private Message callOutShelves(OutOrder outOrder, User user) {
+		OutOrderDto dto = new OutOrderDto();
+		dto.setOrderNo(outOrder.getOrderNo1());
+		dto.setWarehouseCode(outOrder.getWarehouseCode());
+		dto.setShipwayCode(outOrder.getShipwayCode());
+		dto.setTrackingNo1(outOrder.getTrackingNo1());
+		dto.setTrackingNo2(outOrder.getTrackingNo2());
+		dto.setShippingStatus("400");
+		// url
+		ApiConfig apiConfig = apiConfigService.getByCustomerId(outOrder.getCustomerId());
+		if (apiConfig == null) {
+			return Message.fail("客户未配置回调URL,回传失败!");
+		}
+		String url = apiConfig.getToCUrl();
+		if (StringUtil.isEmpty(url)) {
+			return Message.fail("客户未配置回调URL,回传失败!");
+		}
+		String token = apiConfig.getToCToken();
+		String toCSecretKey = apiConfig.getToCSecretKey();
+		String timestamp = DateUtil.getSystemDate();
+		String content = JacksonUtil.toJSON(dto);
+
+		String dataDigest = null;
+		try {
+			String md5str = EnCodeUtil.md5_32bit((content + toCSecretKey));
+			dataDigest = EnCodeUtil.base64Encode(md5str);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		// 回传类型
+		String type = "callbackOutStockProcess";//
+		logger.info("回传出库单状态节点url:" + url + " ,type:" + type);
+		logger.info("回传出库单状态节点token:" + token + " ,content:" + content + " dataDigest:" + dataDigest);
+
+		Map<String, String> reqMap = new HashMap<>();
+		reqMap.put("type", type);
+		reqMap.put("token", token);
+		reqMap.put("sign", dataDigest);
+		reqMap.put("content", content);
+		reqMap.put("version", "1.0");
+		reqMap.put("timestamp", timestamp);
+		try {
+			String resStr = HttpUtil.post(url, reqMap);
+			if (resStr == null) {
+				return Message.fail("response为空");
+			}
+
+			logger.info("回传出库单状态节点返回resStr:" + resStr);
+			Result result = JacksonUtil.fromJSON(resStr, Result.class);
+			if (result == null) {
+				return Message.fail("response格式错误");
+			}
+			if (!result.isSuccess()) {
+				return Message.fail("推送返回失败,消息:" + result.getMsg());
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return Message.success("推送成功");
+	}
+
 	@Override
 	public Message callBackTrackingNo(OutOrder outOrder, User user) {
 		OutOrderDto dto = new OutOrderDto();
@@ -135,6 +266,7 @@ public class StandardCallbackOutstockServiceImpl implements StandardCallbackOuts
 		dto.setTrackingNo1(outOrder.getTrackingNo1());
 		dto.setTrackingNo2(outOrder.getTrackingNo2());
 		dto.setWeight(outOrder.getOutWeight());
+		dto.setShippingStatus("700");
 		if (outOrder.getOutWeightTime() != null) {
 			dto.setWeighTime(DateUtil.dateConvertString(outOrder.getOutWeightTime(), DateUtil.yyyy_MM_ddHHmmss));
 		}
@@ -201,7 +333,7 @@ public class StandardCallbackOutstockServiceImpl implements StandardCallbackOuts
 		dto.setTrackingNo1(outOrder.getTrackingNo1());
 		dto.setTrackingNo2(outOrder.getTrackingNo2());
 		dto.setWeight(outOrder.getOutWeight());
-
+		dto.setShippingStatus("900");
 		if (outOrder.getOutWeightTime() != null) {
 			dto.setWeighTime(DateUtil.dateConvertString(outOrder.getOutWeightTime(), DateUtil.yyyy_MM_ddHHmmss));
 		}

+ 22 - 1
wms-core-service/src/main/java/com/lote/wms/common/mq/consumer/SyncCustomer.java

@@ -4,8 +4,13 @@ import javax.annotation.Resource;
 import javax.jms.JMSException;
 import javax.jms.Session;
 
+import com.lote.wms.api.api.entity.ApiConfig;
+import com.lote.wms.api.api.entity.enums.ApiTypeEnum;
+import com.lote.wms.api.api.service.ApiConfigService;
+import com.lote.wms.common.core.db.IdWorkerAide;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jms.annotation.JmsListener;
 import org.springframework.jms.listener.adapter.MessageListenerAdapter;
 import org.springframework.jms.support.converter.MessageConversionException;
@@ -18,9 +23,11 @@ import com.lote.wms.user.customer.dao.CustomerMapper;
 import com.lote.wms.user.customer.entity.Customer;
 import com.lote.wms.user.customer.entity.CustomerCriteria;
 
+import java.util.Date;
+
 /**
  * 消息消费者
- * 
+ *
  * @author yechao
  *
  */
@@ -31,6 +38,8 @@ public class SyncCustomer extends MessageListenerAdapter {
 
 	@Resource
 	private CustomerMapper customerMapper;
+	@Autowired
+	private ApiConfigService apiConfigService;
 
 	@JmsListener(destination = QueueDefination.SYNC_CUSTOMER)
 	public void handleMessage(JmsMessage jmsMessage) throws JMSException {
@@ -45,6 +54,18 @@ public class SyncCustomer extends MessageListenerAdapter {
 				this.customerMapper.updateByPrimaryKeySelective(customer); // 更新
 			} else {
 				this.customerMapper.insertSelective(customer);// 插入
+
+				// 自动往apiConfig表中插入一条数据
+				ApiConfig apiConfig = new ApiConfig();
+				apiConfig.setId(IdWorkerAide.nextId());
+				apiConfig.setApiTypeCode(ApiTypeEnum.Standard.getCode());
+				apiConfig.setCustomerId(customer.getId());
+				apiConfig.setCustomerCode(customer.getCode());
+				apiConfig.setToUsToken(customer.getCode());
+				apiConfig.setToUsSecretKey("123456");
+				apiConfig.setCreatedTime(new Date());
+				apiConfigService.add(apiConfig);
+
 			}
 		} catch (MessageConversionException e) {
 			e.printStackTrace();

+ 7 - 7
wms-core-service/src/main/java/com/lote/wms/instock/order/service/impl/InOrderServiceImpl.java

@@ -175,7 +175,7 @@ public class InOrderServiceImpl implements InOrderService {
 
 	/**
 	 * 合并商品明细
-	 * 
+	 *
 	 * @param list
 	 * @return
 	 */
@@ -498,7 +498,7 @@ public class InOrderServiceImpl implements InOrderService {
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * com.lote.wms.instock.order.service.InOrderService#selectForReceiptNoOrder
 	 * (com. lote.wms.instock.order.entity.queryvo. InOrderQueryVo)
@@ -531,7 +531,7 @@ public class InOrderServiceImpl implements InOrderService {
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * com.lote.wms.instock.order.service.InOrderService#selectForReceipt(com.
 	 * lote.wms.instock.order.entity.queryvo. InOrderQueryVo)
@@ -602,7 +602,7 @@ public class InOrderServiceImpl implements InOrderService {
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * com.lote.wms.instock.order.service.InOrderService#selectForInShelf(com.
 	 * lote.wms.instock.order.entity.queryvo. InOrderQueryVo)
@@ -659,7 +659,7 @@ public class InOrderServiceImpl implements InOrderService {
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see
 	 * com.lote.wms.instock.order.service.InOrderService#isReceiptFinished(java.
 	 * lang.String)
@@ -1030,7 +1030,7 @@ public class InOrderServiceImpl implements InOrderService {
 
 	/**
 	 * 入库单取消 只有在未收货情况下才能够取消
-	 * 
+	 *
 	 * @param id
 	 * @return
 	 */
@@ -1104,7 +1104,7 @@ public class InOrderServiceImpl implements InOrderService {
 		Criteria cri = criteria.createCriteria();
 		cri.andIsCallbackSuccessEqualTo(BaseConstant.N);
 		cri.andStatusCodeEqualTo(InOrderStatusEnum.S60.getCode());
-		cri.andCreateWayNotEqualTo(CreateWay.API.getCode());
+		cri.andCreateWayEqualTo(CreateWay.API.getCode());
 		// 根据上次推送时间从早到晚排序. 每次只查10条
 		// 查出来后,无论推送成功失败都要更新推送时间, 否则可能积压,超过10条,导致后面的订单都无法被查询到
 		criteria.setLimit(10);

+ 10 - 1
wms-core-service/src/main/java/com/lote/wms/instock/receipt/entity/queryvo/InReceiptQueryVo.java

@@ -7,7 +7,7 @@ import org.mybatis.plugin.model.QueryParam;
 public class InReceiptQueryVo extends QueryParam {
 
 	/**
-	 * 
+	 *
 	 */
 	private static final long serialVersionUID = 4926141244657899039L;
 	private String orderNo;
@@ -37,6 +37,8 @@ public class InReceiptQueryVo extends QueryParam {
 
 	private Integer qualityCode;
 
+	private String batchNo;
+
 	private String createdTimeBegin;
 
 	private String createdTimeEnd;
@@ -191,4 +193,11 @@ public class InReceiptQueryVo extends QueryParam {
 		this.qualityCode = qualityCode;
 	}
 
+	public String getBatchNo() {
+		return batchNo;
+	}
+
+	public void setBatchNo(String batchNo) {
+		this.batchNo = batchNo;
+	}
 }

+ 7 - 4
wms-core-service/src/main/java/com/lote/wms/instock/receipt/service/impl/InReceiptServiceImpl.java

@@ -166,6 +166,9 @@ public class InReceiptServiceImpl implements InReceiptService {
 		if (!StringUtil.isEmpty(vo.getBarcode())) {
 			cri.andBarcodeEqualTo(vo.getBarcode());
 		}
+		if(!StringUtil.isEmpty(vo.getBatchNo())) {
+			cri.andBatchNoEqualTo(vo.getBatchNo());
+		}
 		Date date = DateUtil.stringConvertDate(vo.getCreatedTimeBegin(), DateUtil.yyyy_MM_ddHHmmss);
 		if (date != null) {
 			cri.andCreatedTimeGreaterThan(date);
@@ -331,7 +334,7 @@ public class InReceiptServiceImpl implements InReceiptService {
 
 	/**
 	 * 处理生产日期,保质期
-	 * 
+	 *
 	 * @param dateType
 	 * @param dateStr
 	 * @param shelfLifeDays
@@ -367,7 +370,7 @@ public class InReceiptServiceImpl implements InReceiptService {
 
 	/**
 	 * 收货方法专用 处理入库单状态更新
-	 * 
+	 *
 	 * @param order
 	 */
 	private void handleStatusForReceipt(InOrder order, User user) {
@@ -738,7 +741,7 @@ public class InReceiptServiceImpl implements InReceiptService {
 
 	/**
 	 * 取消收货方法专用 处理入库单状态更新
-	 * 
+	 *
 	 * @param order
 	 */
 	private void handleStatusForRollback(InOrder order, User user) {
@@ -873,4 +876,4 @@ public class InReceiptServiceImpl implements InReceiptService {
 		return recommendLocationCode;
 	}
 
-}
+}

+ 10 - 1
wms-core-service/src/main/java/com/lote/wms/instock/shelf/entity/queryvo/InShelfQueryVo.java

@@ -7,7 +7,7 @@ import org.mybatis.plugin.model.QueryParam;
 public class InShelfQueryVo extends QueryParam {
 
 	/**
-	 * 
+	 *
 	 */
 	private static final long serialVersionUID = 3636914677183885565L;
 	private String orderNo;
@@ -40,6 +40,8 @@ public class InShelfQueryVo extends QueryParam {
 
 	private String barcode;
 
+	private String batchNo;
+
 	private String createdTimeBegin;
 
 	private String createdTimeEnd;
@@ -224,4 +226,11 @@ public class InShelfQueryVo extends QueryParam {
 		this.userCode = userCode;
 	}
 
+	public String getBatchNo() {
+		return batchNo;
+	}
+
+	public void setBatchNo(String batchNo) {
+		this.batchNo = batchNo;
+	}
 }

+ 6 - 3
wms-core-service/src/main/java/com/lote/wms/instock/shelf/service/impl/InShelfServiceImpl.java

@@ -157,6 +157,9 @@ public class InShelfServiceImpl implements InShelfService {
 		if (!StringUtil.isEmpty(vo.getLocationCode())) {
 			cri.andLocationCodeEqualTo(vo.getLocationCode());
 		}
+		if (!StringUtil.isEmpty(vo.getBatchNo())) {
+			cri.andBatchNoEqualTo(vo.getBatchNo());
+		}
 		Date date = DateUtil.stringConvertDate(vo.getCreatedTimeBegin(), DateUtil.yyyy_MM_ddHHmmss);
 		if (date != null) {
 			cri.andCreatedTimeGreaterThan(date);
@@ -427,7 +430,7 @@ public class InShelfServiceImpl implements InShelfService {
 
 	/**
 	 * 上架专用 处理入库单状态更新
-	 * 
+	 *
 	 * @param order
 	 */
 	private void handleStatusForInShelf(InOrder order, User user, boolean isFinished) {
@@ -556,7 +559,7 @@ public class InShelfServiceImpl implements InShelfService {
 
 	/**
 	 * 取消上架方法专用 处理入库单状态更新
-	 * 
+	 *
 	 * @param order
 	 */
 	private void handleStatusForRollback(InOrder order, User user) {
@@ -674,4 +677,4 @@ public class InShelfServiceImpl implements InShelfService {
 		return sum;
 	}
 
-}
+}

+ 20 - 1
wms-core-service/src/main/java/com/lote/wms/user/customer/service/impl/CustomerServiceImpl.java

@@ -6,10 +6,15 @@ import java.util.List;
 
 import javax.annotation.Resource;
 
+import com.lote.wms.api.api.dao.ApiConfigMapper;
+import com.lote.wms.api.api.entity.ApiConfig;
+import com.lote.wms.api.api.entity.enums.ApiTypeEnum;
+import com.lote.wms.api.api.service.ApiConfigService;
 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.stereotype.Service;
 
 import com.lote.wms.common.constants.QueueDefination;
@@ -39,6 +44,8 @@ public class CustomerServiceImpl implements CustomerService {
 	private CustomerMapper customerMapper;
 	@Resource
 	private CustomerStatusMapper customerStatusMapper;
+	@Autowired
+	private ApiConfigService apiConfigService;
 	@Resource
 	private TopicProducer topicProducer;
 	private static final Logger logger = LoggerFactory.getLogger(CustomerServiceImpl.class);
@@ -63,6 +70,18 @@ public class CustomerServiceImpl implements CustomerService {
 		if (this.customerMapper.insertSelective(record) == 1) {
 			return record;
 		}
+
+		// 自动往apiConfig表中插入一条数据
+		ApiConfig apiConfig = new ApiConfig();
+		apiConfig.setId(IdWorkerAide.nextId());
+		apiConfig.setApiTypeCode(ApiTypeEnum.Standard.getCode());
+		apiConfig.setCustomerId(record.getId());
+		apiConfig.setCustomerCode(record.getCode());
+		apiConfig.setToUsToken(record.getCode());
+		apiConfig.setToUsSecretKey("123456");
+		apiConfig.setCreatedTime(new Date());
+		apiConfigService.add(apiConfig);
+
 		return null;
 	}
 
@@ -256,4 +275,4 @@ public class CustomerServiceImpl implements CustomerService {
 		return Message.success("密码修改成功");
 	}
 
-}
+}

+ 35 - 32
wms-core-service/src/main/resources/mybatis/mapper/instock/receipt/InReceiptMapper.xml

@@ -85,13 +85,13 @@
     </where>
   </sql>
   <sql id="Base_Column_List" >
-    id, customer_id, customer_code, warehouse_id, warehouse_code, in_order_id, in_order_item_id, 
-    order_no1, shipway_code, shipway_name, tracking_no1, tally_id, tally_no, car_no, 
-    packet_no, box_type_code, box_type_name, box_no, sku, barcode, product_no, quality_code, 
-    quality_name, quantity, production_date, shelf_life_days, expiry_date, expiry_code, 
-    supplier_code, batch_no, batch_rule_code, batch_rule_name, length, width, height, 
-    remark, recommend_location_code, recommend_rule_code, created_time, created_by_user_id, 
-    created_by_user_code, update_time, update_by_user_id, update_by_user_code, extend1, 
+    id, customer_id, customer_code, warehouse_id, warehouse_code, in_order_id, in_order_item_id,
+    order_no1, shipway_code, shipway_name, tracking_no1, tally_id, tally_no, car_no,
+    packet_no, box_type_code, box_type_name, box_no, sku, barcode, product_no, quality_code,
+    quality_name, quantity, production_date, shelf_life_days, expiry_date, expiry_code,
+    supplier_code, batch_no, batch_rule_code, batch_rule_name, length, width, height,
+    remark, recommend_location_code, recommend_rule_code, created_time, created_by_user_id,
+    created_by_user_code, update_time, update_by_user_id, update_by_user_code, extend1,
     extend2, extend3, extend4, extend5, volume_m, volume, product_name
   </sql>
   <select id="selectByConditionList" resultMap="BaseResultMap" parameterType="com.lote.wms.instock.receipt.entity.InReceiptCriteria" >
@@ -112,7 +112,7 @@
     </if>
   </select>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
-    select 
+    select
     <include refid="Base_Column_List" />
     from in_receipt
     where id = #{id,jdbcType=VARCHAR}
@@ -615,11 +615,11 @@
     select count(*) from in_receipt where in_order_id = #{inOrderId,jdbcType=VARCHAR}
   </select>
   <select id="selectByInOrderIdAndBarcode" resultMap="BaseResultMap" parameterType="com.lote.wms.instock.receipt.entity.queryvo.InReceiptQueryVo">
-    select 
+    select
     <include refid="Base_Column_List" />
     from in_receipt where
 	in_order_id = #{inOrderId,jdbcType=VARCHAR} and barcode = #{barcode,jdbcType=VARCHAR}
-  </select>   
+  </select>
   <select id="selectForInShelf" resultType="com.lote.wms.instock.receipt.entity.resultvo.InReceiptResultVo" parameterType="com.lote.wms.instock.receipt.entity.queryvo.InReceiptQueryVo">
     select
 	    a.id as id,
@@ -637,7 +637,7 @@
 		a.tally_no as tallyNo,
 		a.car_no as carNo,
 		a.packet_no as packetNo,
-		a.box_type_code as boxTypeCode, 
+		a.box_type_code as boxTypeCode,
 		a.box_type_name as boxTypeName,
 		a.box_no as boxNo,
 		a.sku as sku,
@@ -658,7 +658,7 @@
 		a.height as height,
 		a.remark as remark,
     	a.recommend_location_code as recommendLocationCode,
-    	a.recommend_rule_code as recommendRuleCode,		
+    	a.recommend_rule_code as recommendRuleCode,
 		a.created_time as createdTime,
 		a.created_by_user_id as createdByUserId,
 		a.created_by_user_code as createdByUserCode,
@@ -669,29 +669,29 @@
 		a.extend2 as extend2,
 		a.extend3 as extend3,
 		a.extend4 as extend4,
-		a.extend5 as extend5, 
+		a.extend5 as extend5,
 		a.volume_m as volumeM,
-		a.volume as volume, 
+		a.volume as volume,
 		a.product_name as productName,
 		sum(ifnull(b.quantity,0)) as inshelfQty
-    from in_receipt a 
+    from in_receipt a
 		LEFT JOIN in_shelf b on a.id = b.in_receipt_id
-	where 
-		a.in_order_id = #{inOrderId,jdbcType=VARCHAR} 
-	and  
+	where
+		a.in_order_id = #{inOrderId,jdbcType=VARCHAR}
+	and
 		a.barcode = #{barcode,jdbcType=VARCHAR}
 	GROUP BY a.id
   </select>
   <select id="countUnFinishedInShelf" parameterType="java.lang.String"  resultType="java.lang.Integer" >
-	select count(*) from 
+	select count(*) from
 	(
-		select 
+		select
 			a.quantity, sum(IFNULL(b.quantity,0)) as inShelfQty
-		from in_receipt a 
+		from in_receipt a
 			LEFT JOIN in_shelf b on a.in_order_id = b.in_order_id and a.id = b.in_receipt_id
 		where a.in_order_id  = #{inOrderId,jdbcType=VARCHAR}
 		GROUP BY a.id
-	
+
 	) temp where temp.quantity > temp.inShelfQty
   </select>
   <select id="selectReceiptAndShelfByVoList" resultType="com.lote.wms.instock.receipt.entity.resultvo.InReceiptResultVo" parameterType="com.lote.wms.instock.receipt.entity.queryvo.InReceiptQueryVo">
@@ -711,7 +711,7 @@
 		a.tally_no as tallyNo,
 		a.car_no as carNo,
 		a.packet_no as packetNo,
-		a.box_type_code as boxTypeCode, 
+		a.box_type_code as boxTypeCode,
 		a.box_type_name as boxTypeName,
 		a.box_no as boxNo,
 		a.sku as sku,
@@ -733,7 +733,7 @@
 		a.height as height,
 		a.remark as remark,
     	a.recommend_location_code as recommendLocationCode,
-    	a.recommend_rule_code as recommendRuleCode,		
+    	a.recommend_rule_code as recommendRuleCode,
 		a.created_time as createdTime,
 		a.created_by_user_id as createdByUserId,
 		a.created_by_user_code as createdByUserCode,
@@ -744,12 +744,12 @@
 		a.extend2 as extend2,
 		a.extend3 as extend3,
 		a.extend4 as extend4,
-		a.extend5 as extend5, 
+		a.extend5 as extend5,
 		a.volume_m as volumeM,
-		a.volume as volume, 
-		a.product_name as productName,		
+		a.volume as volume,
+		a.product_name as productName,
 		sum(ifnull(b.quantity,0)) as inshelfQty
-    from in_receipt a 
+    from in_receipt a
 		LEFT JOIN in_shelf b on a.id = b.in_receipt_id
 	where 1=1
       <if test="customerCode != null and customerCode != ''" >
@@ -764,7 +764,7 @@
 			open="(" close=")">
 			#{temp}
 		</foreach>
-	  </if>	       
+	  </if>
       <if test="orderNo1 != null and orderNo1 != ''" >
         and a.order_no1 = #{orderNo1,jdbcType=VARCHAR}
       </if>
@@ -777,6 +777,9 @@
       <if test="barcode != null and barcode != ''" >
         and a.barcode = #{barcode,jdbcType=VARCHAR}
       </if>
+    <if test="batchNo != null and batchNo != ''" >
+      and a.batch_no = #{batchNo,jdbcType=VARCHAR}
+    </if>
       <if test="createdTimeBegin != null and createdTimeBegin != ''" >
         and a.created_time &gt;= #{createdTimeBegin,jdbcType=TIMESTAMP}
       </if>
@@ -788,7 +791,7 @@
 		<foreach collection="idList" item="receiptId" separator="," open="(" close=")" >
 			#{receiptId}
 		</foreach>
-	 </if>            
+	 </if>
 	GROUP BY a.id order by a.created_time desc
-  </select>  
-</mapper>
+  </select>
+</mapper>

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

@@ -89,13 +89,13 @@
     </where>
   </sql>
   <sql id="Base_Column_List" >
-    id, customer_id, customer_code, warehouse_id, warehouse_code, status_code, status_name, 
-    in_order_id, in_order_no1, supplier_code, sku, barcode, batch_no, production_date, 
-    shelf_life_days, expiry_date, expiry_code, quality_code, quality_name, product_name, 
-    model, qty_total, qty_sale, qty_avail_sale, qty_avail, qty_lock1, qty_lock2, qty_lock3, 
-    qty_lock4, is_lock, data_version, zone_type_code, zone_code, location_code, remark_by_user_code, 
-    remark, created_time, created_by_user_id, created_by_user_code, update_time, update_by_user_id, 
-    update_by_user_code, freeze_time, freeze_by_user_code, unfreeze_time, unfreeze_by_user_code, 
+    id, customer_id, customer_code, warehouse_id, warehouse_code, status_code, status_name,
+    in_order_id, in_order_no1, supplier_code, sku, barcode, batch_no, production_date,
+    shelf_life_days, expiry_date, expiry_code, quality_code, quality_name, product_name,
+    model, qty_total, qty_sale, qty_avail_sale, qty_avail, qty_lock1, qty_lock2, qty_lock3,
+    qty_lock4, is_lock, data_version, zone_type_code, zone_code, location_code, remark_by_user_code,
+    remark, created_time, created_by_user_id, created_by_user_code, update_time, update_by_user_id,
+    update_by_user_code, freeze_time, freeze_by_user_code, unfreeze_time, unfreeze_by_user_code,
     extend1, extend2, main_pic, packet_no, box_no, volume_m, volume, length, width, height
   </sql>
 	<sql id="Base_Column_List_Sum_Qty">
@@ -104,7 +104,7 @@
 		status_code, status_name,
 		in_order_id, in_order_no1,
 		supplier_code, sku, barcode, batch_no, production_date,
-		shelf_life_days, expiry_date, expiry_code, quality_code, 
+		shelf_life_days, expiry_date, expiry_code, quality_code,
 		quality_name,product_name, model,
 		sum(qty_total) as qty_total,
 		sum(qty_sale) as qty_sale,
@@ -124,7 +124,7 @@
 		unfreeze_time,freeze_time, unfreeze_by_user_code, freeze_by_user_code, extend1, extend2,
 		main_pic, packet_no, box_no, volume_m, volume, length, width, height
 	</sql>
-  
+
   <select id="selectByConditionList" resultMap="BaseResultMap" parameterType="com.lote.wms.inventory.inventory.entity.InventoryCriteria" >
     select
     <if test="distinct" >
@@ -143,7 +143,7 @@
     </if>
   </select>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
-    select 
+    select
     <include refid="Base_Column_List" />
     from i_inventory
     where id = #{id,jdbcType=VARCHAR}
@@ -682,8 +682,8 @@
 	<!-- 根据库区号查询库位 -->
 	<select id="selectLocationByZoneCode" resultType="string">
 		SELECT
-		location_code FROM i_inventory 
-		WHERE 
+		location_code FROM i_inventory
+		WHERE
 			warehouse_code = #{warehouseCode} and
 			zone_code=#{zoneCode}
 	</select>
@@ -691,10 +691,10 @@
 	<!-- 根据库区号查询数量大于0的库位 -->
 	<select id="selectNotEmptyLocationByZoneCode" resultType="string">
 		SELECT
-			location_code FROM i_inventory 
+			location_code FROM i_inventory
 		WHERE qty_total> 0 and
 			warehouse_code = #{warehouseCode} and
-			zone_code=#{zoneCode} 
+			zone_code=#{zoneCode}
 	</select>
 
 	<!-- 更新库存数量,调用者需要自己计算好更改为多少数量 -->
@@ -755,25 +755,25 @@
 			<if test="updateByUserCode != null">
 				update_by_user_code = #{updateByUserCode,jdbcType=VARCHAR},
 			</if>
-			
+
 			<if test="freezeByUserCode != null">
 				freeze_by_user_code  = #{freezeByUserCode ,jdbcType=VARCHAR},
 			</if>
 			<if test="freezeTime != null">
 				freeze_time = #{freezeTime,jdbcType=TIMESTAMP},
 			</if>
-						
+
 			<if test="unfreezeByUserCode != null">
 				unfreeze_by_user_code  = #{unfreezeByUserCode ,jdbcType=VARCHAR},
 			</if>
 			<if test="unfreezeTime != null">
 				unfreeze_time = #{unfreezeTime,jdbcType=TIMESTAMP},
 			</if>
-			
+
 		</set>
 		where id = #{id,jdbcType=VARCHAR} and data_version = #{dataVersion,jdbcType=INTEGER}
 	</update>
-	
+
 	<!-- 更新备注 -->
 	<update id="updateRemark" parameterType="com.lote.wms.inventory.inventory.entity.expand.InventoryVo">
 		update i_inventory
@@ -795,7 +795,7 @@
 			</if>
 		</set>
 		where id = #{id,jdbcType=VARCHAR} and data_version = #{dataVersion,jdbcType=INTEGER}
-	</update>	
+	</update>
 
 	<!-- 更新锁定 盘点功能专用-->
 	<update id="updateIsLock" parameterType="com.lote.wms.inventory.inventory.entity.expand.InventoryVo">
@@ -805,7 +805,7 @@
 		</set>
 		where id = #{id,jdbcType=VARCHAR} and data_version = #{dataVersion,jdbcType=INTEGER}
 	</update>
-	
+
 	<!-- 出库订单分配库存查询 -->
 	<select id="selectForAllocate" resultMap="BaseResultMap">
 		SELECT
@@ -818,13 +818,13 @@
 			and is_lock = 0
 		</where>
 		<choose>
-			<when test="orderByClause != null and orderByClause !='' ">	
+			<when test="orderByClause != null and orderByClause !='' ">
 				ORDER BY ${orderByClause}
 			</when>
-			<otherwise>	
+			<otherwise>
 				ORDER BY qty_avail asc
 			</otherwise>
-		</choose>	    		
+		</choose>
 	</select>
 	<!-- vo 查询条件语句 -->
 	<sql id="selectForVo">
@@ -851,7 +851,7 @@
 				open="(" close=")">
 				#{temp}
 			</foreach>
-		</if>			
+		</if>
 		<if test="customerId !=null and customerId!='' ">
 			and customer_id =#{customerId}
 		</if>
@@ -863,7 +863,7 @@
 		</if>
 		<if test="inOrderNo1 !=null  and  inOrderNo1!='' ">
 			and in_order_no1 =#{inOrderNo1}
-		</if>		
+		</if>
 		<if test="batchNo != null  and batchNo !='' ">
 			and batch_no =#{batchNo}
 		</if>
@@ -884,7 +884,7 @@
 		</if>
 		<if test="productName !=null  and productName !='' ">
 			and product_name like "%"#{productName}"%"
-		</if>		
+		</if>
 		<if test="qualityCode !=null  and qualityCode !='' ">
 			and quality_code=#{qualityCode}
 		</if>
@@ -892,7 +892,7 @@
 			and status_code=#{statusCode}
 		</if>
 		<if test="idList !=null and idList.size>0">
-		  	and id in 
+		  	and id in
 		  	<foreach collection="idList" item="id" open="(" close=")" separator=",">
 		  		#{id}
 		  	</foreach>
@@ -971,7 +971,7 @@
 			and update_time &lt;= #{updateTimeEnd,jdbcType=VARCHAR}
 		</if>
 	</sql>
-	 
+
 	<!-- 库存列表查询 -->
 	<select id="selectByVoList" flushCache="true" resultMap="BaseResultMap">
 		select
@@ -982,13 +982,14 @@
 		</where>
 		order by created_time desc
 	</select>
-	
+
 	<!-- SKU库存查询 -->
 	<select id="selectByVoGpBySkuList" resultMap="BaseResultMap">
-		select 
+		select
 			a.id,
 			a.warehouse_code,
 			a.customer_code,
+			a.barcode,
 			a.sku,
 			a.batch_no,
 			a.product_name,
@@ -1001,13 +1002,16 @@
 			a.qty_lock2,
 			a.qty_lock3,
 			a.qty_lock4 ,
-			a.main_pic
-		from 
+			a.main_pic,
+			a.location_code
+		from
 		(
-			select 
+			select
 				id,
 				warehouse_code,
 				customer_code,
+                group_concat(barcode) as barcode,
+
 				sku,
 				batch_no,
 				product_name,
@@ -1020,21 +1024,22 @@
 				sum(qty_lock2) as qty_lock2,
 				sum(qty_lock3) as qty_lock3,
 				sum(qty_lock4) as qty_lock4,
-				main_pic
-			from i_inventory 
+				main_pic,
+				group_concat(location_code) as location_code
+			from i_inventory
 				GROUP BY warehouse_code,customer_code,sku
 		) a LEFT JOIN
 		(
-			select 
+			select
 				a.warehouse_code,
 				a.customer_code,
 				b.sku,
 				sum(b.quantity) as qty_sale
-			from out_order a 
+			from out_order a
 				LEFT JOIN out_order_item b on a.id = b.out_order_id
-			where a.status_code = '10'  and a.id is not null and a.is_cancel = 'N'	
+			where a.status_code = '10'  and a.id is not null and a.is_cancel = 'N'
 				GROUP BY a.warehouse_code,a.customer_code,b.sku
-		) b 
+		) b
 		on a.warehouse_code = b.warehouse_code and a.customer_code = b.customer_code and a.sku = b.sku
 		<where>
 			1=1
@@ -1047,7 +1052,7 @@
 					open="(" close=")">
 					#{temp}
 				</foreach>
-			</if>				
+			</if>
 			<if test="customerCode !=null and customerCode!='' ">
 				and a.customer_code =#{customerCode}
 			</if>
@@ -1059,7 +1064,7 @@
 			</if>
 			<if test="locationCode !=null and  locationCode!='' ">
 				and a.location_code =#{locationCode}
-			</if>					
+			</if>
 			<if test="sku !=null  and sku !='' ">
 				and a.sku=#{sku}
 			</if>
@@ -1071,18 +1076,18 @@
 			</if>
 		</where>
 	</select>
-	
+
 	<!-- 查询SKU的批次明细 -->
 	<select id="selectBatchsBySku" resultMap="BaseResultMap">
 		select
 		<include refid="Base_Column_List_Sum_Qty" />
-		from i_inventory 
+		from i_inventory
 		<where>
 			<include refid="selectForVo" />
 		</where>
 		GROUP BY sku,batch_no,expiry_date
-	</select>  
-	
+	</select>
+
 	<!-- 按条码分组库存查询 -->
 	<select id="selectByVoGpByBarcodeList" resultMap="BaseResultMap">
 		select
@@ -1091,10 +1096,10 @@
 		<where>
 			<include refid="selectForVo" />
 		</where>
-		GROUP BY warehouse_code,customer_code,sku,barcode	
+		GROUP BY warehouse_code,customer_code,sku,barcode
 		order by created_time desc
-	</select>  
-	
+	</select>
+
 	<!-- 按条码+批次分组库存查询 -->
 	<select id="selectByVoGpByBarcodeBatchNoList" resultMap="BaseResultMap">
 		select
@@ -1103,10 +1108,10 @@
 		<where>
 			<include refid="selectForVo" />
 		</where>
-		GROUP BY warehouse_code,customer_code,sku,barcode,batch_no	
+		GROUP BY warehouse_code,customer_code,sku,barcode,batch_no
 		order by created_time desc
-	</select>  	
- 
+	</select>
+
 	<!-- 按供应商分组库存查询 -->
 	<select id="selectByVoGpBySupplierList" resultMap="BaseResultMap">
 		select
@@ -1117,8 +1122,8 @@
 		</where>
 		group by warehouse_code,customer_code,supplier_code
 		order by created_time desc
-	</select>  
-	
+	</select>
+
 	<!-- 统计查询 -->
 	<select id="countDistinctByVo" resultType="int">
 		select
@@ -1132,12 +1137,12 @@
 	<!-- 按货主,SKU统计触及安全库存的SKU数 -->
 	<select id="countUnSafety" resultType="int">
 		select count(1)
-		from i_inventory_safety_stock a 
+		from i_inventory_safety_stock a
 		LEFT JOIN (
 			select customer_code ,sku,sum(qty_total) as qty from i_inventory
 			GROUP BY customer_code,sku
 		) b on a.customer_code = b.customer_code and a.sku =  b.sku
 		where a.safety_qty > b.qty;
-	</select>	
-	    
-</mapper>
+	</select>
+
+</mapper>

+ 3 - 3
wms-operate/src/main/java/com/lote/wms/controller/operate/config/db/DataSourceConfiguration.java

@@ -255,7 +255,7 @@ public class DataSourceConfiguration {
         // 事务隔离
         requiredTx.setIsolationLevel(TRANSACTION_READ_COMMITTED);
         // 事务超时
-        requiredTx.setTimeout(5);
+//        requiredTx.setTimeout(5);
         return requiredTx;
     }
 
@@ -273,7 +273,7 @@ public class DataSourceConfiguration {
         // 事务隔离
         readOnlyTx.setIsolationLevel(TRANSACTION_READ_COMMITTED);
         // 事务超时
-        readOnlyTx.setTimeout(5);
+//        readOnlyTx.setTimeout(5);
         return readOnlyTx;
     }
 
@@ -292,7 +292,7 @@ public class DataSourceConfiguration {
         // 事务隔离
         othersTx.setIsolationLevel(TRANSACTION_READ_COMMITTED);
         // 事务超时
-        othersTx.setTimeout(5);
+//        othersTx.setTimeout(5);
         return othersTx;
     }
 

+ 13 - 13
wms-operate/src/main/java/com/lote/wms/controller/operate/instock/receipt/InReceiptController.java

@@ -28,7 +28,7 @@ import java.util.List;
 
 /**
  * 收货
- * 
+ *
  * @author yechao
  *
  */
@@ -71,7 +71,7 @@ public class InReceiptController extends AbstractController {
 
 	/**
 	 * 新增收货记录
-	 * 
+	 *
 	 * @param inreceipt
 	 * @return
 	 */
@@ -97,7 +97,7 @@ public class InReceiptController extends AbstractController {
 
 	/**
 	 * 标准收货方法
-	 * 
+	 *
 	 * @param vo
 	 * @return
 	 */
@@ -139,13 +139,13 @@ public class InReceiptController extends AbstractController {
 
 	/**
 	 * 无预报收货
-	 * 
+	 *
 	 * @param vo
 	 * @return
 	 */
 	@RequestMapping(value = "/noOrderReceipt", method = RequestMethod.POST)
 	public Result noOrderReceipt(@RequestBody InReceiptFormVo vo) {
-		
+
 		if (StringUtil.isEmpty(vo.getOrderNo())) {
 			return Result.error("入库单号不能为空!");
 		}
@@ -175,7 +175,7 @@ public class InReceiptController extends AbstractController {
 
 	/**
 	 * 收货记录列表查询
-	 * 
+	 *
 	 * @param vo
 	 * @return
 	 */
@@ -188,8 +188,8 @@ public class InReceiptController extends AbstractController {
 
 	/**
 	 * 执行导出 ,生成文件,传至文件服务器,并返回文件服务器地址
-	 * 
-	 * @param outOrderQueryVo
+	 *
+	 * @param vo
 	 * @return
 	 */
 	@RequestMapping("export")
@@ -201,7 +201,7 @@ public class InReceiptController extends AbstractController {
 
 	/**
 	 * 上架页面专用查询
-	 * 
+	 *
 	 * @param vo
 	 * @return
 	 */
@@ -213,7 +213,7 @@ public class InReceiptController extends AbstractController {
 
 	/**
 	 * 上架时获取推荐库位
-	 * 
+	 *
 	 * @param vo
 	 * @return
 	 */
@@ -225,7 +225,7 @@ public class InReceiptController extends AbstractController {
 
 	/**
 	 * 收货上架对比
-	 * 
+	 *
 	 * @param vo
 	 * @return
 	 */
@@ -237,7 +237,7 @@ public class InReceiptController extends AbstractController {
 
 	/**
 	 * 执行导出 ,生成文件,传至文件服务器,并返回文件服务器地址
-	 * 
+	 *
 	 * @param outOrderQueryVo
 	 * @return
 	 */
@@ -250,7 +250,7 @@ public class InReceiptController extends AbstractController {
 
 	/**
 	 * 取消收货
-	 * 
+	 *
 	 * @param ids
 	 * @return
 	 */

+ 77 - 0
wms-operate/src/main/java/com/lote/wms/test/StadardProductTest.java

@@ -0,0 +1,77 @@
+package com.lote.wms.test;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.lote.wms.api.standard.entity.product.ProductDto;
+import com.lote.wms.common.utils.HttpUtil;
+import com.lote.wms.common.utils.JacksonUtil;
+
+public class StadardProductTest {
+
+	public static void main(String[] args) {
+		ProductDto product = new ProductDto();
+
+		// product.setCustomerId("1");
+		// product.setCustomerCode("zhangsan");
+
+		product.setSku("sku123");
+		product.setProductName("产品名");
+		product.setProductNameEn("test product name");
+		product.setCustomsName("报关品名");// 报关品名
+		product.setModel("规格型号");
+		product.setStatus(1);
+		product.setBatchRuleCode("EXP");
+		product.setShelfLifeDays(365);
+
+		product.setBrandClass("品类种类分类");
+		product.setBrandCode("品牌代码");
+
+		product.setCurrency("CNY");
+
+		product.setTaxCode("123456");
+		product.setHsCode("123211");
+
+		product.setNationalRecordNumber("国检备案号一般都没有");
+
+		product.setFirstUnit("第一计量单位");
+		product.setSecondUnit("第二计量单位");
+
+		product.setOriginLetterCode("US");
+		product.setOriginNumberCode(111);
+
+		product.setUnit("个");
+		product.setUnitNumberCode("110");
+
+		product.setUnitValue("100.1");
+		product.setGrossWeight("0.1111");
+		product.setUnitWeight("0.1222");
+
+		product.setHeight("100");
+		product.setWidth("100");
+		product.setLength("100");
+		product.setVolume("1000000");
+
+		product.setProductBarcode("1235424352,456781,123123123");
+
+		String content = JacksonUtil.toJSON(product);
+		System.out.println(content);
+
+		String url = "http://127.0.0.1:81/api/standard/main.json";
+
+		Map<String, String> parames = new HashMap<String, String>();
+		parames.put("type", "productSync");
+		parames.put("token", "123456");
+		parames.put("sign", "xx");
+		parames.put("content", content);
+		parames.put("version", "1.0");
+
+		try {
+			String resStr = HttpUtil.post(url, parames);
+			System.out.println(resStr);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+}

+ 157 - 0
wms-operate/src/main/java/com/lote/wms/test/StardInstockTest.java

@@ -0,0 +1,157 @@
+package com.lote.wms.test;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+import com.lote.wms.api.standard.entity.instock.InOrderDto;
+import com.lote.wms.api.standard.entity.instock.InOrderItemDto;
+import com.lote.wms.common.utils.HttpUtil;
+import com.lote.wms.common.utils.JacksonUtil;
+
+public class StardInstockTest {
+	public static void main(String[] args) {
+		InOrderDto order = new InOrderDto();
+
+		order.setTypeCode("1");
+		order.setOrderNo("qq12312312");
+		order.setWarehouseCode("SZ01");
+		order.setShipwayCode("SF");
+		order.setShipwayName("顺丰");
+		order.setTrackingNo1("t12312312");
+
+		List<InOrderItemDto> itemList = new ArrayList<InOrderItemDto>();
+		order.setItemList(itemList);
+
+		InOrderItemDto item = new InOrderItemDto();
+		itemList.add(item);
+		item.setQuantity(1001);
+		item.setSku("sku123");
+		item.setBarcode("12x3");
+		item.setProductName("产品名");
+		item.setShelfLifeDays(365);
+
+		item.setBrandClass("品类种类分类");
+		item.setBrandCode("品牌代码");
+
+		item.setCurrency("CNY");
+
+		item.setTaxCode("123456");
+		item.setHsCode("123211");
+
+		item.setNationalRecordNumber("国检备案号一般都没有");
+
+		item.setFirstUnit("第一计量单位");
+		item.setSecondUnit("第二计量单位");
+
+		item.setOriginLetterCode("US");
+		item.setOriginNumberCode(111);
+
+		item.setUnit("个");
+		item.setUnitNumberCode("110");
+
+		item.setUnitValue("100.1");
+		item.setGrossWeight("0.1111");
+		item.setUnitWeight("0.1222");
+
+		item.setHeight("100");
+		item.setWidth("100");
+		item.setLength("100");
+		item.setVolume("1000000");
+
+		String content = JacksonUtil.toJSON(order);
+		System.out.println(content);
+
+		String url = "http://127.0.0.1:81/api/standard/main.json";
+
+		Map<String, String> parames = new HashMap<String, String>();
+		parames.put("type", "createInStockOrder");
+		parames.put("token", "123456");
+		parames.put("sign", "xx");
+		parames.put("content", content);
+		parames.put("version", "1.0");
+
+		try {
+			String resStr = HttpUtil.post(url, parames);
+			System.out.println(resStr);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+	public void testQueryInOrder() {
+		InOrderDto order = new InOrderDto();
+		order.setOrderNo("201807180011");
+
+		String content = JacksonUtil.toJSON(order);
+		System.out.println(content);
+
+		String url = "http://127.0.0.1:81/api/standard/main.json";
+
+		Map<String, String> parames = new HashMap<String, String>();
+		parames.put("type", "queryInStockOrder");
+		parames.put("token", "123456");
+		parames.put("sign", "xx");
+		parames.put("content", content);
+		parames.put("version", "1.0");
+
+		try {
+			String resStr = HttpUtil.post(url, parames);
+			System.out.println(resStr);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+	public void testQueryInOrderStatus() {
+		InOrderDto order = new InOrderDto();
+		order.setOrderNo("201805210001");
+
+		String content = JacksonUtil.toJSON(order);
+		System.out.println(content);
+
+		String url = "http://127.0.0.1:81/api/standard/main.json";
+
+		Map<String, String> parames = new HashMap<String, String>();
+		parames.put("type", "queryInStockStatus");
+		parames.put("token", "123456");
+		parames.put("sign", "xx");
+		parames.put("content", content);
+		parames.put("version", "1.0");
+
+		try {
+			String resStr = HttpUtil.post(url, parames);
+			System.out.println(resStr);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+//	@Test
+	public void testQueryInStockInventory() {
+		InOrderDto order = new InOrderDto();
+		order.setOrderNo("201805210001");
+
+		String content = JacksonUtil.toJSON(order);
+		System.out.println(content);
+
+		String url = "http://127.0.0.1:81/api/standard/main.json";
+
+		Map<String, String> parames = new HashMap<String, String>();
+		parames.put("type", "queryInStockInventory");
+		parames.put("token", "123456");
+		parames.put("sign", "xx");
+		parames.put("content", content);
+		parames.put("version", "1.0");
+
+		try {
+			String resStr = HttpUtil.post(url, parames);
+			System.out.println(resStr);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+}

+ 93 - 0
wms-operate/src/main/java/com/lote/wms/test/StardOutStockTest.java

@@ -0,0 +1,93 @@
+package com.lote.wms.test;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.lote.wms.api.standard.entity.outstock.OutOrderDto;
+import com.lote.wms.api.standard.entity.outstock.OutOrderItemDto;
+import com.lote.wms.api.standard.entity.outstock.OutOrderReceiverDto;
+import com.lote.wms.api.standard.entity.outstock.OutOrderSenderDto;
+import com.lote.wms.common.utils.HttpUtil;
+import com.lote.wms.common.utils.JacksonUtil;
+
+public class StardOutStockTest {
+
+	public static void main(String[] args) {
+		OutOrderDto order = new OutOrderDto();
+
+		order.setTypeCode("1");
+		order.setOrderNo("qq123123121");
+		order.setWarehouseCode("SZ01");
+		order.setShipwayCode("ZTO");
+//		order.setTrackingNo1("t12312312");
+
+		List<OutOrderItemDto> itemList = new ArrayList<OutOrderItemDto>();
+		order.setItemList(itemList);
+
+		OutOrderItemDto item = new OutOrderItemDto();
+		itemList.add(item);
+		item.setQuantity("1001");
+		item.setSku("STP03lms00102");
+		item.setBarcode("12x3");
+		item.setQualityCode("1");
+		item.setProductName("产品名");
+		item.setBrandClass("品类种类分类");
+		item.setBrandCode("品牌代码");
+		item.setCurrency("CNY");
+		item.setTaxCode("123456");
+		item.setHsCode("123211");
+		item.setFirstUnit("第一计量单位");
+		item.setSecondUnit("第二计量单位");
+		item.setOriginLetterCode("US");
+		item.setUnit("个");
+		item.setUnitNumberCode("110");
+		item.setUnitValue("100.1");
+		item.setGrossWeight("0.1111");
+		item.setUnitWeight("0.1222");
+		item.setHeight("100");
+		item.setWidth("100");
+		item.setLength("100");
+		item.setVolume("1000000");
+
+		OutOrderSenderDto senderDto = new OutOrderSenderDto();
+		senderDto.setName("张三");
+		senderDto.setMobileNumber("1008611");
+		order.setSender(senderDto);
+
+		OutOrderReceiverDto receiverDto = new OutOrderReceiverDto();
+		receiverDto.setName("李四");
+		receiverDto.setAddressLine1("后瑞街道1010栋");
+		receiverDto.setAddressLine2("xx");
+		receiverDto.setCounty("宝安区");
+		receiverDto.setCity("深圳市");
+		receiverDto.setProvince("广东省");
+		receiverDto.setCountryCode("CN");
+		receiverDto.setCountryName("中国大陆");
+		receiverDto.setPostalCode("518100");
+		receiverDto.setMobileNumber("157141101000");
+		order.setReceiver(receiverDto);
+		
+
+		String content = JacksonUtil.toJSON(order);
+		System.out.println(content);
+
+		String url = "http://127.0.0.1:81/api/standard/main.json";
+
+		Map<String, String> parames = new HashMap<String, String>();
+		parames.put("type", "createOutStockOrder");
+		parames.put("token", "123456");
+		parames.put("sign", "xx");
+		parames.put("content", content);
+		parames.put("version", "1.0");
+
+		try {
+			String resStr = HttpUtil.post(url, parames);
+			System.out.println(resStr);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+}

+ 23 - 0
wms-operate/src/main/java/com/lote/wms/test/Test.java

@@ -0,0 +1,23 @@
+package com.lote.wms.test;
+
+import javax.annotation.Resource;
+
+import com.lote.wms.inventory.inventory.entity.queryvo.InventoryQueryVo;
+import com.lote.wms.inventory.inventory.service.InventoryService;
+
+public class Test {
+
+	@Resource
+	private InventoryService inventoryService;
+	
+//	@org.junit.Test
+	public void test(){
+		//测试idea提交代码 测试idea002 测试idea003
+		InventoryQueryVo inventoryQueryVo = new InventoryQueryVo();
+		inventoryQueryVo.setDistinctBy("barcode");
+		inventoryQueryVo.setWarehouseCode("SZ01");
+		int a = inventoryService.countDistinctByVo(inventoryQueryVo);
+		
+		System.out.println(a);
+	}
+}

+ 16 - 15
wms-operate/src/main/resources/static/ui/js/inventory/inventory/inventory/listGpBySku.js

@@ -1,21 +1,22 @@
 var myGrid = {type: 'datagrid',id: 'myGrid'};
-	
+
 $("#myGrid").iDatagrid({
     id: 'myGrid',
     url: '/inventory/inventory/listGpBySku',
 	frozenColumns:[[
 	   	 {field: 'id',checkbox:true},
-	   	 {field: 'sku',width:'140px', title: '商品SKU'}, 	 	   	 
-		 {field: 'pictures',width:'30px', title: '主图',formatter:function(value, row, index){ 
+	   	 {field: 'sku',width:'140px', title: '商品SKU'},
+		{field: 'barcode',width:'140px', title: '商品条形码'},
+		{field: 'pictures',width:'30px', title: '主图',formatter:function(value, row, index){
 			 if(row.mainPic != null && row.mainPic != ''){
 				 var img = "<img src='"+row.mainPic+"' height='29px' width='29px'/>";
-	    		 return img;	 
+	    		 return img;
 			 }
-		 }},        	 
-	]],       
+		 }},
+	]],
     columns: [[
 		 {field: 'warehouseCode', width:'100px',title: '仓库代码'},
-		 {field: 'customerCode',width:'100px', title: '货主代码'},    	
+		 {field: 'customerCode',width:'100px', title: '货主代码'},
     	 {field: 'productName',width:'160px', title: '商品名称'},
     	 {field: 'model',width:'80px', title: '商品规格'},
 
@@ -28,10 +29,10 @@ $("#myGrid").iDatagrid({
           	var text = '点击查看';
           	return  "<a href=javascript:listLocations('" + row.id + "')>"+text+"</a>";
   		 }},
-  		 
+		{field: 'locationCode',width:'80px', title: '库位显示'},
     	 {field: 'qtyTotal',width:'80px', title: '总数量'},
     	 {field: 'qtyLock1', width:'80px',title: '- 入库锁定'},
-    	 {field: 'qtyLock4', width:'80px',title: '- 出库锁定'},    	 
+    	 {field: 'qtyLock4', width:'80px',title: '- 出库锁定'},
     	 {field: 'qtyLock2', width:'80px',title: '- 盘点锁定'},
     	 {field: 'qtyLock3', width:'80px',title: '- 其他锁定'},
     	 {field: 'qtyAvail', width:'80px',title: '= 可用数量'},
@@ -127,7 +128,7 @@ $("#exportByQuery").iMenubutton({
 				   $.iMessager.alert('操作提示', result.msg, 'messager-info');
 				   return;
 			   }
-				   
+
 			   $.iMessager.show({title: '温馨提示',msg:'正在下载文件:'+ result.msg,timeout:4000}); // 右下角提示信息
 		       window.open(result.msg)
 		   }
@@ -151,7 +152,7 @@ $("#exportBySelect").iMenubutton({
 	  	for (var i = 0; i < rows.length; i++) {
 	  		skuList.push(rows[i].sku)
 	  	}
-	  	
+
 	   	var exportDataStr = JSON.stringify({skuList:skuList});
 	   	$.iMessager.progress({text: '正在导出中....'});
 	   	//执行下载
@@ -167,7 +168,7 @@ $("#exportBySelect").iMenubutton({
 				   $.iMessager.alert('操作提示', result.msg, 'messager-info');
 				   return;
 			   }
-			   
+
 			   $.iMessager.show({title: '温馨提示',msg:'正在下载文件:'+ result.msg,timeout:4000}); // 右下角提示信息
 	  	       window.open(result.msg)
 		   }
@@ -181,7 +182,7 @@ var listBatchs_sku_id = null;//因为后台需要仓库代码,货主代码,SKU.
 function listBatchs(id){
 	listBatchs_sku_id = id;
 	console.info(id);
-	
+
 	$('#listBatchs').iDialog({
 		width:'700',
 	    height:'400',
@@ -195,7 +196,7 @@ function listBatchs(id){
 	        btnCls: 'topjui-btn-danger  l-btn-small',
 	        handler: function () {
 	        	 $("#listBatchs").iDialog('close');
-	        	 $('#listBatchs').iDialog('clear', true);  
+	        	 $('#listBatchs').iDialog('clear', true);
 	        }
 	    }]
 	});
@@ -218,7 +219,7 @@ function listLocations(id){//因为后台需要仓库代码,货主代码,SKU. 
 	        btnCls: 'topjui-btn-danger  l-btn-small',
 	        handler: function () {
 	        	 $("#listLocations").iDialog('close');
-	        	 $('#listLocations').iDialog('clear', true);  
+	        	 $('#listLocations').iDialog('clear', true);
 	        }
 	    }]
 	});

+ 11 - 10
wms-operate/src/main/resources/static/ui/views/instock/order/inOrder/listStatus50.html

@@ -28,31 +28,32 @@
 </head>
 <body>
 	<table id="myGrid"></table>
-	
+
 	<div id="myGrid-toolbar" class="topjui-toolbar" data-options="grid:{type:'datagrid',id:'myGrid'}" >
 	    <form id="queryForm" class="search-box toolbar-right">
+            <input type="text" name="sku" style="width: 130px;" data-toggle="topjui-textbox" data-options="id:'sku',prompt:'包含商品SKU'">
 			<input type="text" name="warehouseCode" style="width: 130px;" data-toggle="topjui-combotree" data-options="valueField: 'code',textField: 'name',url:'/base/warehouse/listAll',panelWidth:300,panelHeight:450,prompt:'仓库'">
 	        <input type="text" name="customerCode" style="width: 130px;" id="customerCode" data-toggle="topjui-textbox" data-options="id:'customerCode',prompt:'货主代码',panelWidth:300,panelHeight:450,required:false">
 			<span class="textbox" style="width: 128px; height: 28px;color: black;">
-				<input id="orderNos" name="orderNos" type="text" onfocus="focusOrderNos()" onblur="unFocusOrderNos()"  
-					class="textbox-text textbox-prompt"  placeholder="入库单号,逗号分隔" 
+				<input id="orderNos" name="orderNos" type="text" onfocus="focusOrderNos()" onblur="unFocusOrderNos()"
+					class="textbox-text textbox-prompt"  placeholder="入库单号,逗号分隔"
 					style="margin: 0px; padding-top: 0px; padding-bottom: 0px; height: 28px; line-height: 28px; width: 120px;color: black;"">
-			</span>	
-						
+			</span>
+
 	    	<!-- 隐藏状态条件,勿删 -->
-	    	<input type="text" name="statusCode" value="50" style="display: none;">         
+	    	<input type="text" name="statusCode" value="50" style="display: none;">
 	        <a id="queryBtn" href="javascript:void(0)" style="width: 85px;">查询</a>
 	        <a id="resetBtn" href="javascript:void(0)" style="width: 85px;">清空</a>
 		</form>
-		
+
 	<!-- 当按钮和输入框过多的时候,使用toolbar-left 和 toolbar-right分别包起来,可以解决样式问题 -->
 	    <div class="toolbar-left">
 			<a id="confirmEnd" href="javascript:void(0)" style="width: 85px;">确认完结</a>
-		</div>    
+		</div>
 	     <!-- 表格工具栏结束 -->
-	     		
+
 	</div>
-    
+
     <!-- 本页的js -->
     <script type="text/javascript">var initParams = {statusCode:'50'};</script>
     <script type="text/javascript" src="/ui/static/public/js/jquery.form.min.js?v=001"></script>

+ 7 - 7
wms-operate/src/main/resources/static/ui/views/instock/order/inOrderDeleted/list.html

@@ -28,28 +28,28 @@
 </head>
 <body>
 	<table id="myGrid"></table>
-	
+
 	<div id="myGrid-toolbar" class="topjui-toolbar" data-options="grid:{type:'datagrid',id:'myGrid'}">
 	    <form id="queryForm" class="search-box toolbar-right">
 			<input type="text" name="warehouseCode" style="width: 130px;" data-toggle="topjui-combotree" data-options="valueField: 'code',textField: 'name',url:'/base/warehouse/listAll',panelWidth:300,panelHeight:450,prompt:'仓库'">
 	        <input type="text" name="customerCode" style="width: 130px;" id="customerCode" data-toggle="topjui-textbox" data-options="id:'customerCode',prompt:'货主代码',panelWidth:300,panelHeight:450,required:false">
-		        
+
 	        <!-- 普通输入框 -->
 			<input type="text" name="orderNo" style="width: 130px;" data-toggle="topjui-textbox" data-options="id:'orderNo',prompt:'入库单号'">
 			<input type="text" name="trackingNo" style="width: 130px;" data-toggle="topjui-textbox" data-options="id:'trackingNo1',prompt:'跟踪单号'">
-			
+
 	      	<input type="text" name="createdTimeBegin" style="width: 160px;"  data-toggle="topjui-datetimebox" data-options="id:'createdTimeBegin',prompt:'删除时间开始'">
-	    	<input type="text" name="createdTimeEnd"  style="width: 160px;" data-toggle="topjui-datetimebox" data-options="id:'createdTimeEnd',prompt:'删除时间截止'">        
+	    	<input type="text" name="createdTimeEnd"  style="width: 160px;" data-toggle="topjui-datetimebox" data-options="id:'createdTimeEnd',prompt:'删除时间截止'">
 	        <a id="queryBtn" href="javascript:void(0)" style="width: 85px;">查询</a>
 	        <a id="resetBtn" href="javascript:void(0)" style="width: 85px;">清空</a>
 		</form>
-		
+
 	    <div class="toolbar-left">
 		    <a id="recovery" href="javascript:void(0)" style="width: 85px;">还原</a>
-		</div>    
+		</div>
 	     <!-- 表格工具栏结束 -->
 	</div>
-     
+
     <!-- 本页的js -->
     <script type="text/javascript" src="/ui/static/public/js/jquery.form.min.js?v=001"></script>
     <script type="text/javascript" src="/ui/js/instock/order/inOrderDeleted/list.js?v=003"></script>

+ 6 - 5
wms-operate/src/main/resources/static/ui/views/instock/receipt/inReceipt/list.html

@@ -40,9 +40,10 @@
 			<input type="text" name="trackingNo" data-toggle="topjui-textbox" data-options="id:'trackingNo',prompt:'跟踪单号'">
 			<input type="text" name="sku" data-toggle="topjui-textbox" data-options="id:'sku',prompt:'商品SKU'">
 			<input type="text" name="barcode" data-toggle="topjui-textbox" data-options="id:'barcode',prompt:'商品条码'">
-			
+			<input type="text" name="batchNo" data-toggle="topjui-textbox" data-options="id:'batchNo',prompt:'批次号码'">
+
 	      	<input type="text" name="createdTimeBegin" style="width: 160px;"  data-toggle="topjui-datetimebox" data-options="id:'createdTimeBegin',prompt:'收货时间开始'">
-	    	<input type="text" name="createdTimeEnd"  style="width: 160px;" data-toggle="topjui-datetimebox" data-options="id:'createdTimeEnd',prompt:'收货时间截止'">        
+	    	<input type="text" name="createdTimeEnd"  style="width: 160px;" data-toggle="topjui-datetimebox" data-options="id:'createdTimeEnd',prompt:'收货时间截止'">
 	        <a id="queryBtn" href="javascript:void(0)" style="width: 85px;">查询</a>
 	        <a id="resetBtn" href="javascript:void(0)" style="width: 85px;">清空</a>
 		</form>
@@ -51,12 +52,12 @@
 	       	<div id="exportSubMenu" class="topjui-toolbar" style="width:120px;">
                <div id="exportByQuery">按条件导出</div>
                <div id="exportBySelect">导出选中项</div>
-			</div>	    	
-	    	<a id="rollback" href="javascript:void(0)" style="width: 85px;">取消收货</a>			
+			</div>
+	    	<a id="rollback" href="javascript:void(0)" style="width: 85px;">取消收货</a>
 		</div>
 	</div>
     <!-- 表格工具栏结束 -->
-    
+
     <!-- 本页的js -->
     <script type="text/javascript" src="/ui/static/public/js/jquery.form.min.js?v=001"></script>
     <script type="text/javascript" src="/ui/js/instock/receipt/inReceipt/list.js?v=003"></script>

+ 6 - 5
wms-operate/src/main/resources/static/ui/views/instock/receipt/inReceipt/listReceiptAndShelf.html

@@ -41,23 +41,24 @@
 			<input type="text" name="trackingNo" data-toggle="topjui-textbox" data-options="id:'trackingNo',prompt:'跟踪单号'">
 			<input type="text" name="sku" data-toggle="topjui-textbox" data-options="id:'sku',prompt:'商品SKU'">
 			<input type="text" name="barcode" data-toggle="topjui-textbox" data-options="id:'barcode',prompt:'商品条码'">
-			
+			<input type="text" name="batchNo" data-toggle="topjui-textbox" data-options="id:'batchNo',prompt:'批次号码'">
+
 	      	<input type="text" name="createdTimeBegin" style="width: 160px;"  data-toggle="topjui-datetimebox" data-options="id:'createdTimeBegin',prompt:'收货时间开始'">
-	    	<input type="text" name="createdTimeEnd"  style="width: 160px;" data-toggle="topjui-datetimebox" data-options="id:'createdTimeEnd',prompt:'收货时间截止'">        
+	    	<input type="text" name="createdTimeEnd"  style="width: 160px;" data-toggle="topjui-datetimebox" data-options="id:'createdTimeEnd',prompt:'收货时间截止'">
 	        <a id="queryBtn" href="javascript:void(0)" style="width: 85px;">查询</a>
 	        <a id="resetBtn" href="javascript:void(0)" style="width: 85px;">清空</a>
 		</form>
-		
+
 		<div class="toolbar-left">
 	        <a id="export"  href="javascript:void(0)" style="width: 85px;">导出</a>
 	       	<div id="exportSubMenu" class="topjui-toolbar" style="width:120px;">
                <div id="exportByQuery">按条件导出</div>
                <div id="exportBySelect">导出选中项</div>
-			</div>    	
+			</div>
 		</div>
 	</div>
     <!-- 表格工具栏结束 -->
-    
+
     <!-- 本页的js -->
     <script type="text/javascript" src="/ui/static/public/js/jquery.form.min.js?v=001"></script>
     <script type="text/javascript" src="/ui/js/instock/receipt/inReceipt/listReceiptAndShelf.js?v=003"></script>

+ 9 - 8
wms-operate/src/main/resources/static/ui/views/instock/shelf/shelf/list.html

@@ -31,27 +31,28 @@
 	<table id="myGrid"></table>
 	<!-- 表格工具栏开始 -->
 	<div id="myGrid-toolbar" class="topjui-toolbar" data-options="grid:{type:'datagrid',id:'myGrid'}">
-		    	
+
 	    <form id="queryForm" class="search-box toolbar-right">
 	    	<!-- 下拉 -->
 	    	<input type="text" name="warehouseCode" data-toggle="topjui-combotree" data-options="valueField: 'code',textField: 'name',url:'/base/warehouse/listAll',panelWidth:300,panelHeight:450,prompt:'仓库'">
 	    	<!-- 自动完成 -->
 	        <input type="text" name="customerCode" id="customerCode" data-toggle="topjui-textbox" data-options="id:'customerCode',prompt:'货主代码',panelWidth:300,panelHeight:450,required:false">
-	        
+
 	        <input type="text" data-toggle="topjui-combotree" name="isConfirm"  style="width: 130px;" data-options="prompt:'是否确认库存',panelWidth:200,
                 valueField: 'code',textField: 'name',
                 data:[{'id':'','code':'','name':''},{'id':'Y','code':'Y','name':'已确认库存'},{'id':'N','code':'N','name':'未确认库存'}],
 				panelHeight:100">
-						        
+
 	        <!-- 普通输入框 -->
 			<input type="text" name="orderNo1" data-toggle="topjui-textbox" data-options="id:'orderNo1',prompt:'入库单号'">
 			<input type="text" name="trackingNo" data-toggle="topjui-textbox" data-options="id:'trackingNo',prompt:'跟踪单号'">
 			<input type="text" name="sku" data-toggle="topjui-textbox" data-options="id:'sku',prompt:'商品SKU'">
 			<input type="text" name="barcode" data-toggle="topjui-textbox" data-options="id:'barcode',prompt:'商品条码'">
+			<input type="text" name="batchNo" data-toggle="topjui-textbox" data-options="id:'batchNo',prompt:'批次号码'">
 			<input type="text" name="locationCode" data-toggle="topjui-textbox" data-options="id:'locationCode',prompt:'库位号码'">
-			
+
 	      	<input type="text" name="createdTimeBegin" style="width: 160px;"  data-toggle="topjui-datetimebox" data-options="id:'createdTimeBegin',prompt:'上架时间开始'">
-	    	<input type="text" name="createdTimeEnd"  style="width: 160px;" data-toggle="topjui-datetimebox" data-options="id:'createdTimeEnd',prompt:'上架时间截止'">        
+	    	<input type="text" name="createdTimeEnd"  style="width: 160px;" data-toggle="topjui-datetimebox" data-options="id:'createdTimeEnd',prompt:'上架时间截止'">
 	        <a id="queryBtn" href="javascript:void(0)" style="width: 85px;">查询</a>
 	        <a id="resetBtn" href="javascript:void(0)" style="width: 85px;">清空</a>
 		</form>
@@ -62,11 +63,11 @@
 	       	<div id="exportSubMenu" class="topjui-toolbar" style="width:120px;">
                <div id="exportByQuery">按条件导出</div>
                <div id="exportBySelect">导出选中项</div>
-			</div>   	
-		</div>		
+			</div>
+		</div>
 	</div>
     <!-- 表格工具栏结束 -->
-    
+
     <!-- 本页的js -->
     <script type="text/javascript" src="/ui/static/public/js/jquery.form.min.js?v=001"></script>
     <script type="text/javascript" src="/ui/js/instock/shelf/shelf/list.js?v=003"></script>

+ 15 - 14
wms-operate/src/main/resources/static/ui/views/inventory/inventory/inventory/listGpBySku.html

@@ -26,18 +26,18 @@
     <!-- layui框架js -->
     <script src="/ui/static/plugins/layui/layui.js" charset="utf-8"></script>
     <style type="text/css">
-            div img{  
-                cursor: pointer;  
-                transition: all 0.6s;  
-            }  
-            div img:hover{  
-                transform: scale(1.5);  
-            }  
-    </style>    
+            div img{
+                cursor: pointer;
+                transition: all 0.6s;
+            }
+            div img:hover{
+                transform: scale(1.5);
+            }
+    </style>
 </head>
 <body>
 	<table id="myGrid"></table>
-	
+
 	<div id="myGrid-toolbar" class="topjui-toolbar" data-options="grid:{type:'datagrid',id:'myGrid'}">
 		<!-- 当按钮和输入框过多的时候,使用toolbar-left 和 toolbar-right分别包起来,可以解决样式问题 -->
 	    <form id="queryForm" class="search-box toolbar-right" >
@@ -46,10 +46,11 @@
 	    	<!-- 自动完成 -->
 	        <input type="text" name="customerCode" id="customerCode" data-toggle="topjui-textbox" data-options="id:'customerCode',prompt:'货主代码',panelWidth:300,panelHeight:450,required:false">
 	        <!-- 普通输入框 -->
+			<input type="text" name="locationCode" data-toggle="topjui-textbox" data-options="id:'locationCode',prompt:'库位号'">
 			<input type="text" name="sku" data-toggle="topjui-textbox" data-options="id:'sku',prompt:'商品SKU'">
-			<input type="text" name="productName" data-toggle="topjui-textbox" data-options="id:'productName',prompt:'商品名称'">			
+			<input type="text" name="productName" data-toggle="topjui-textbox" data-options="id:'productName',prompt:'商品名称'">
 			<input type="text" name="inOrderNo1" data-toggle="topjui-textbox" data-options="id:'inOrderNo1',prompt:'入库单号'">
-			
+
 			<input type="text" name="statusCode" data-toggle="topjui-combotree" data-options="valueField: 'code',textField: 'name',url:'/inventory/inventoryStatus/listAll',panelHeight:250,prompt:'状态'">
 	        <input type="text" name="qualityCode" data-toggle="topjui-combotree" data-options="valueField: 'code',textField: 'name',url:'/inventory/qualityLevel/listAll',panelHeight:250,prompt:'品质'">
 	        <a id="queryBtn" href="javascript:void(0)" style="width: 85px;">查询</a>
@@ -60,11 +61,11 @@
 	       	<div id="exportSubMenu" class="topjui-toolbar" style="width:120px;">
 	               <div id="exportByQuery">按条件导出</div>
 	               <div id="exportBySelect">导出选中项</div>
-			</div>	    
-		</div>		
+			</div>
+		</div>
 	</div>
     <!-- 表格工具栏结束 -->
-    
+
     <!-- 本页的js -->
     <script type="text/javascript" src="/ui/static/public/js/jquery.form.min.js?v=001"></script>
     <script type="text/javascript" src="/ui/js/inventory/inventory/inventory/listGpBySku.js?v=003"></script>

+ 2 - 2
wms-task/build.gradle

@@ -82,13 +82,13 @@ dependencies {
     implementation "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:${jsp_jstl_api}"
     implementation "javax.servlet.jsp:jsp-api:${jsp_api}"
     // Spring Boot for jsp
-    implementation "org.apache.tomcat.embed:tomcat-embed-jasper:${tomcat_embed_jasper}"
+//    implementation "org.apache.tomcat.embed:tomcat-embed-jasper:${tomcat_embed_jasper}"
 
 
     // ali druid
     implementation "com.alibaba:druid:${druid}"
 
-    implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatis_spring_boot}"
+//    implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatis_spring_boot}"
     implementation "org.mybatis:mybatis:${mybatis}"
     implementation "org.mybatis:mybatis-spring:${mybatis_spring}"
     implementation "org.mybatis.caches:mybatis-ehcache:${mybatis_ehcache}"

+ 13 - 2
wms-task/src/main/java/com/lote/wms/task/controller/JobController.java

@@ -3,6 +3,7 @@ package com.lote.wms.task.controller;
 import com.lote.wms.common.core.web.model.Result;
 import com.lote.wms.common.core.web.model.ResultCodeEnum;
 import com.lote.wms.task.entity.ScheduleJob;
+import com.lote.wms.task.job.instock.SendInOrderStatusJob;
 import com.lote.wms.task.service.IJobService;
 import com.lote.wms.task.support.SpringUtils;
 import org.apache.commons.lang.StringUtils;
@@ -10,6 +11,7 @@ import org.quartz.CronScheduleBuilder;
 import org.quartz.SchedulerException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
@@ -20,7 +22,7 @@ import java.lang.reflect.Method;
 import java.util.List;
 
 /**
- * 
+ *
  * @ClassName: TaskController
  * @author yechao
  * @date 2017年7月6日 下午2:06:20
@@ -32,6 +34,15 @@ public class JobController {
 
 	private static final Logger logger = LoggerFactory.getLogger(JobController.class);
 
+
+	@Autowired
+	private SendInOrderStatusJob sendOutOrderStatusJob ;
+
+	@RequestMapping("/sendInOrder")
+	public void sendInOrder(){
+		sendOutOrderStatusJob.run(null);
+	}
+
 	@Resource
 	private IJobService jobService;
 
@@ -44,7 +55,7 @@ public class JobController {
 
 	/**
 	 * 添加定时任务
-	 * 
+	 *
 	 * @param request
 	 * @param scheduleJob
 	 * @return

+ 10 - 10
wms-task/src/main/java/com/lote/wms/task/job/outstock/SendOutOrderStatusJob.java

@@ -20,7 +20,7 @@ import org.springframework.stereotype.Component;
 import java.util.List;
 
 /**
- * 
+ *
  * @author yechao
  * @date 2018年7月4日下午4:20:16
  * @TODO 推送出库订单节点任务类
@@ -129,15 +129,15 @@ public class SendOutOrderStatusJob extends AbstractJob {
 				String customerId = outOrder.getCustomerId();
 				OutOrderOpTypeEnum typeEnum = OutOrderOpTypeEnum.valueOf(sendOutOrderStatus.getOpTypeCode());
 
-				boolean allowCallback = apiConfigService.isAllowCallbackForOutOrder(customerId, typeEnum);
-				if (!allowCallback) {
-					// 不允许推送
-					System.out.println("订单号:" + sendOutOrderStatus.getOutOrderNo() + ",API配置不允许回调");
-					
-					sendOutOrderStatusService.fail(sendOutOrderStatus,true);
-					continue;
-				}
-				
+//				boolean allowCallback = apiConfigService.isAllowCallbackForOutOrder(customerId, typeEnum);
+//				if (!allowCallback) {
+//					// 不允许推送
+//					System.out.println("订单号:" + sendOutOrderStatus.getOutOrderNo() + ",API配置不允许回调");
+//
+//					sendOutOrderStatusService.fail(sendOutOrderStatus,true);
+//					continue;
+//				}
+
 				User user = new User();
 				user.setCode(sendOutOrderStatus.getOpByUserCode());
 				user.setId(sendOutOrderStatus.getOpByUserId());

+ 51 - 0
wms-task/src/main/resources/spring/config-context.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
+	xsi:schemaLocation="
+		   http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-4.0.xsd">
+
+	<context:property-placeholder
+		location="classpath*:operate/redis.properties,classpath*:operate/system.properties"
+		ignore-unresolvable="true" />
+
+	<!-- redis 配置 -->
+	<bean id="redisConfig" class="com.lote.wms.common.core.cache.redis.RedisConfig">
+		<property name="host">
+			<value>${redis.host}</value>
+		</property>
+		<property name="port">
+			<value>${redis.port}</value>
+		</property>
+		<property name="auth">
+			<value>${redis.auth}</value>
+		</property>
+		<property name="maxTotal">
+			<value>${redis.max_total}</value>
+		</property>
+		<property name="maxIdle">
+			<value>${redis.max_idle}</value>
+		</property>
+		<property name="maxWait">
+			<value>${redis.max_wait}</value>
+		</property>
+		<property name="timeout">
+			<value>${redis.timeout}</value>
+		</property>
+	</bean>
+
+	<!-- 系统配置 -->
+	<bean id="systemConfig" class="com.lote.wms.common.config.SystemConfig">
+		<property name="sessionIdName">
+			<value>${system.sessionIdName}</value>
+		</property>
+		<property name="runtimeFileDir">
+			<value>${system.runtimeFileDir}</value>
+		</property>
+		<property name="fileServerUrl">
+			<value>${system.fileServerUrl}</value>
+		</property>
+	</bean>
+</beans>

+ 70 - 0
wms-task/src/main/resources/spring/spring-activemq.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+	xmlns:jms="http://www.springframework.org/schema/jms" xmlns:amq="http://activemq.apache.org/schema/core"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:aop="http://www.springframework.org/schema/aop"
+
+	xsi:schemaLocation="http://www.springframework.org/schema/beans 
+       http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
+       
+       http://www.springframework.org/schema/context 
+       http://www.springframework.org/schema/context/spring-context-4.2.xsd
+       
+	   http://www.springframework.org/schema/jms
+       http://www.springframework.org/schema/jms/spring-jms-4.2.xsd
+       
+       http://activemq.apache.org/schema/core
+       http://activemq.apache.org/schema/core/activemq-core-5.8.0.xsd">
+
+	<!-- 引入properties配置文件 -->
+	<context:property-placeholder location="classpath*:activemq.properties"
+		ignore-unresolvable="true" />
+
+	<!-- 监听注解支持 -->
+	<jms:annotation-driven />
+
+	<!-- 连接 activemq -->
+	<amq:connectionFactory id="jmsConnectionFactory"
+		brokerURL="tcp://${activemq.ip}:${activemq.port}" userName="${activemq.username}"
+		password="${activemq.password}" />
+
+	<!-- 这里可以采用连接池的方式连接PooledConnectionFactoryBean -->
+	<bean id="jmsConnectionFactoryExtend"
+		class="org.springframework.jms.connection.CachingConnectionFactory">
+		<constructor-arg ref="jmsConnectionFactory" />
+		<!-- 会话的最大连接数 -->
+		<property name="sessionCacheSize" value="100" />
+	</bean>
+
+	<!-- 消息处理器 -->
+	<bean id="jmsMessageConverter"
+		class="org.springframework.jms.support.converter.SimpleMessageConverter" />
+
+	<!-- Spring JmsTemplate 的消息生产者 start -->
+	<!-- 定义JmsTemplate的Queue类型 -->
+	<bean id="jmsQueueTemplate" class="org.springframework.jms.core.JmsTemplate">
+		<constructor-arg ref="jmsConnectionFactoryExtend" />
+		<!-- 非pub/sub模型,即队列模式 -->
+		<property name="pubSubDomain" value="false" />
+		<property name="messageConverter" ref="jmsMessageConverter"></property>
+	</bean>
+
+	<!-- 定义JmsTemplate的Topic类型 -->
+	<bean id="jmsTopicTemplate" class="org.springframework.jms.core.JmsTemplate">
+		<constructor-arg ref="jmsConnectionFactoryExtend" />
+		<!-- pub/sub模型(发布/订阅) -->
+		<property name="pubSubDomain" value="true" />
+		<property name="messageConverter" ref="jmsMessageConverter"></property>
+	</bean>
+	<bean class="com.lote.wms.common.core.mq.QueueProducer" />
+	<bean class="com.lote.wms.common.core.mq.TopicProducer" />
+	<!--Spring JmsTemplate 的消息生产者 end -->
+
+
+	<bean id="jmsListenerContainerFactory"
+		class="org.springframework.jms.config.DefaultJmsListenerContainerFactory">
+		<property name="connectionFactory" ref="jmsConnectionFactoryExtend" />
+	</bean>
+
+</beans>            

+ 54 - 0
wms-task/src/main/resources/spring/spring-context.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:task="http://www.springframework.org/schema/task"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans 
+       http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
+       http://www.springframework.org/schema/context 
+       http://www.springframework.org/schema/context/spring-context-4.2.xsd
+       http://www.springframework.org/schema/aop
+       http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
+         http://www.springframework.org/schema/task
+        http://www.springframework.org/schema/task/spring-task-4.2.xsd
+       "
+	default-autowire="byName" default-lazy-init="true">
+
+	<!-- 启动spring注解扫描 -->
+	<context:annotation-config />
+
+	<!-- 引入properties配置文件 -->
+	<context:property-placeholder location="classpath*:operate/quartz.properties"
+		ignore-unresolvable="true" />
+
+	<!--基于JDK动态代理 ,可以将@注解放置在接口和具体类上。 基于CGLIB类代理,只能将@注解放置在具体类上。 -->
+	<!-- CGLIB动态代理 -->
+	<aop:aspectj-autoproxy proxy-target-class="true" />
+
+	<!-- 扫描类包,将标注Spring注解的类自动转化Bean,同时完成Bean的注入 -->
+	<context:component-scan base-package="com.lote.wms.*" />
+
+	<!-- mybatis -->
+	<import resource="classpath:spring/spring-mybatis.xml" />
+	<!-- activemq -->
+	<import resource="classpath:spring/spring-activemq.xml" />
+	<!-- 其他配置 -->
+	<import resource="classpath:spring/config-context.xml" />
+	<!-- quartz -->
+	<import resource="classpath:spring/spring-quartz.xml" />
+	<!-- aop -->
+
+	<!-- 异常处理 -->
+	<!-- <bean class="com.lote.wms.common.aspect.ExceptionAspect" /> -->
+	<!-- 主从数据源切换 -->
+	<!-- <bean class="com.lote.wms.common.aspect.DataSourceAspect" /> -->
+	<!-- 日志 -->
+	<bean class="com.lote.wms.common.aspect.LogAspect" />
+
+	<!-- spring上下文工具类 -->
+	<bean id="springContextUtil" class="com.lote.wms.common.core.spring.SpringContextUtil"  lazy-init="false"/>
+
+	<bean id="springUtils" class="com.lote.wms.task.support.SpringUtils" />
+
+	<bean id="schedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" />
+</beans>

+ 45 - 0
wms-task/src/main/resources/spring/spring-servlet.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:p="http://www.springframework.org/schema/p"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:aop="http://www.springframework.org/schema/aop"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+	http://www.springframework.org/schema/beans/spring-beans.xsd
+	http://www.springframework.org/schema/mvc
+ 	http://www.springframework.org/schema/mvc/spring-mvc.xsd
+ 	http://www.springframework.org/schema/context
+	http://www.springframework.org/schema/context/spring-context.xsd
+    http://www.springframework.org/schema/aop
+    http://www.springframework.org/schema/aop/spring-aop-4.2.xsd">
+
+	<!-- MVC转换 -->
+	<mvc:annotation-driven />
+	<mvc:default-servlet-handler />
+	<!-- 自动扫描bean,把作了注解的Controller转换为bean 注意不能扫描全包,否则跟spring上下文冲突,会导致上下文工具类失效-->
+	<context:component-scan base-package="com.lote.wms.task.controller" />
+
+	<!-- CGLIB动态代理 -->
+	<aop:aspectj-autoproxy proxy-target-class="true" />
+
+	<!-- 模型视图名称添加前后缀 -->
+	<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/views/" p:suffix=".jsp" />
+
+	<!-- 启动Spring MVC的注解功能,完成请求和注解POJO的映射 -->
+<!--	<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />-->
+	<!-- 文件上传 -->
+	<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" p:defaultEncoding="utf-8" />
+	<!-- 字符串处理 -->
+	<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter" p:ignoreDefaultModelOnRedirect="true">
+		<property name="messageConverters">
+			<list>
+				<bean
+					class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
+			</list>
+		</property>
+	</bean>
+
+	<!-- spring mvc 4.0+的跨域配置 -->
+	<mvc:cors>
+        <mvc:mapping path="/**" allowed-origins="*" allow-credentials="true" max-age="1800" allowed-methods="GET,POST,OPTIONS"/>
+    </mvc:cors>
+</beans>

二進制
wms-task/src/main/webapp/WEB-INF/lib/jaxrpc.jar


二進制
wms-task/src/main/webapp/WEB-INF/lib/saaj.jar


二進制
wms-task/src/main/webapp/WEB-INF/lib/wsdl4j.jar


+ 361 - 0
wms-task/src/main/webapp/WEB-INF/tld/c.tld

@@ -0,0 +1,361 @@
+<?xml version="1.0" encoding="utf-8"?>
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" version="2.0">
+    <description>JSTL 1.1 core library</description>
+    <display-name>JSTL core</display-name>
+    <tlib-version>1.1</tlib-version>
+    <short-name>c</short-name>
+    <uri>http://java.sun.com/jsp/jstl/core</uri>
+    <validator>
+        <description>Provides core validation features for JSTL tags.</description>
+        <validator-class>org.apache.taglibs.standard.tlv.JstlCoreTLV</validator-class>
+    </validator>
+    <tag>
+        <description>Catches any Throwable that occurs in its body and optionally exposes it.</description>
+        <name>catch</name>
+        <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>Name of the exported scoped variable for the exception thrown from a nested action. The type of the scoped variable is the type of the exception thrown.</description>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>Simple conditional tag that establishes a context for mutually exclusive conditional operations, marked by &lt;when&gt; and &lt;otherwise&gt;</description>
+        <name>choose</name>
+        <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+        <body-content>JSP</body-content>
+    </tag>
+    <tag>
+        <description>Simple conditional tag, which evalutes its body if the supplied condition is true and optionally exposes a Boolean scripting variable representing the evaluation of this condition</description>
+        <name>if</name>
+        <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>The test condition that determines whether or not the body content should be processed.</description>
+            <name>test</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>boolean</type>
+        </attribute>
+        <attribute>
+            <description>Name of the exported scoped variable for the resulting value of the test condition. The type of the scoped variable is Boolean.</description>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Scope for var.</description>
+            <name>scope</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>Retrieves an absolute or relative URL and exposes its contents to either the page, a String in 'var', or a Reader in 'varReader'.</description>
+        <name>import</name>
+        <tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>
+        <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>The URL of the resource to import.</description>
+            <name>url</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Name of the exported scoped variable for the resource's content. The type of the scoped variable is String.</description>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Scope for var.</description>
+            <name>scope</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Name of the exported scoped variable for the resource's content. The type of the scoped variable is Reader.</description>
+            <name>varReader</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Name of the context when accessing a relative URL resource that belongs to a foreign context.</description>
+            <name>context</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Character encoding of the content at the input resource.</description>
+            <name>charEncoding</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>The basic iteration tag, accepting many different collection types and supporting subsetting and other functionality</description>
+        <name>forEach</name>
+        <tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>
+        <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>Collection of items to iterate over.</description>
+            <name>items</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>java.lang.Object</type>
+        </attribute>
+        <attribute>
+            <description>If items specified: Iteration begins at the item located at the specified index. First item of the collection has index 0. If items not specified: Iteration begins with index set at the value specified.</description>
+            <name>begin</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>int</type>
+        </attribute>
+        <attribute>
+            <description>If items specified: Iteration ends at the item located at the specified index (inclusive). If items not specified: Iteration ends when index reaches the value specified.</description>
+            <name>end</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>int</type>
+        </attribute>
+        <attribute>
+            <description>Iteration will only process every step items of the collection, starting with the first one.</description>
+            <name>step</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>int</type>
+        </attribute>
+        <attribute>
+            <description>Name of the exported scoped variable for the current item of the iteration. This scoped variable has nested visibility. Its type depends on the object of the underlying collection.</description>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Name of the exported scoped variable for the status of the iteration. Object exported is of type javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility.</description>
+            <name>varStatus</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>Iterates over tokens, separated by the supplied delimeters</description>
+        <name>forTokens</name>
+        <tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>String of tokens to iterate over.</description>
+            <name>items</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <description>The set of delimiters (the characters that separate the tokens in the string).</description>
+            <name>delims</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>java.lang.String</type>
+        </attribute>
+        <attribute>
+            <description>Iteration begins at the token located at the specified index. First token has index 0.</description>
+            <name>begin</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>int</type>
+        </attribute>
+        <attribute>
+            <description>Iteration ends at the token located at the specified index (inclusive).</description>
+            <name>end</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>int</type>
+        </attribute>
+        <attribute>
+            <description>Iteration will only process every step tokens of the string, starting with the first one.</description>
+            <name>step</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>int</type>
+        </attribute>
+        <attribute>
+            <description>Name of the exported scoped variable for the current item of the iteration. This scoped variable has nested visibility.</description>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Name of the exported scoped variable for the status of the iteration. Object exported is of type javax.servlet.jsp.jstl.core.LoopTag Status. This scoped variable has nested visibility.</description>
+            <name>varStatus</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>Like &lt;%= ... &gt;, but for expressions.</description>
+        <name>out</name>
+        <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>Expression to be evaluated.</description>
+            <name>value</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Default value if the resulting value is null.</description>
+            <name>default</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Determines whether characters &lt;,&gt;,&amp;,'," in the resulting string should be converted to their corresponding character entity codes. Default value is true.</description>
+            <name>escapeXml</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>Subtag of &lt;choose&gt; that follows &lt;when&gt; tags and runs only if all of the prior conditions evaluated to 'false'</description>
+        <name>otherwise</name>
+        <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+        <body-content>JSP</body-content>
+    </tag>
+    <tag>
+        <description>Adds a parameter to a containing 'import' tag's URL.</description>
+        <name>param</name>
+        <tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>Name of the query string parameter.</description>
+            <name>name</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Value of the parameter.</description>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>Redirects to a new URL.</description>
+        <name>redirect</name>
+        <tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>The URL of the resource to redirect to.</description>
+            <name>url</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Name of the context when redirecting to a relative URL resource that belongs to a foreign context.</description>
+            <name>context</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>Removes a scoped variable (from a particular scope, if specified).</description>
+        <name>remove</name>
+        <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
+        <body-content>empty</body-content>
+        <attribute>
+            <description>Name of the scoped variable to be removed.</description>
+            <name>var</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Scope for var.</description>
+            <name>scope</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>Sets the result of an expression evaluation in a 'scope'</description>
+        <name>set</name>
+        <tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>Name of the exported scoped variable to hold the value specified in the action. The type of the scoped variable is whatever type the value expression evaluates to.</description>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Expression to be evaluated.</description>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Target object whose property will be set. Must evaluate to a JavaBeans object with setter property property, or to a java.util.Map object.</description>
+            <name>target</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Name of the property to be set in the target object.</description>
+            <name>property</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Scope for var.</description>
+            <name>scope</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>Creates a URL with optional query parameters.</description>
+        <name>url</name>
+        <tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>Name of the exported scoped variable for the processed url. The type of the scoped variable is String.</description>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Scope for var.</description>
+            <name>scope</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>URL to be processed.</description>
+            <name>value</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Name of the context when specifying a relative URL resource that belongs to a foreign context.</description>
+            <name>context</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+    <tag>
+        <description>Subtag of &lt;choose&gt; that includes its body if its condition evalutes to 'true'</description>
+        <name>when</name>
+        <tag-class>org.apache.taglibs.standard.tag.rt.core.WhenTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>The test condition that determines whether or not the body content should be processed.</description>
+            <name>test</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <type>boolean</type>
+        </attribute>
+    </tag>
+</taglib>

+ 27 - 0
wms-task/src/main/webapp/WEB-INF/tld/fmt.tld

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+	version="2.1">
+
+	<description>国际化自定义标签</description>
+	<display-name>languagejstl</display-name>
+	<tlib-version>1.0</tlib-version>
+	<short-name>fmt</short-name>
+	<uri>http://language.fmt.com</uri>
+
+	<tag>
+		<description></description>
+		<name>lang</name>
+		<tag-class>com.lote.wms.common.core.web.lang.LanguageTag</tag-class>
+		<body-content>scriptless</body-content>
+		<attribute>
+			<description></description>
+			<name>key</name>
+			<required>true</required>
+			<rtexprvalue>false</rtexprvalue>
+			<type>java.lang.String</type>
+		</attribute>
+	</tag>
+
+</taglib>

+ 70 - 0
wms-task/src/main/webapp/WEB-INF/web.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+	id="WebApp_ID" version="3.0">
+	<display-name>Archetype Created Web Application</display-name>
+
+
+	<!-- spring listener -->
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>classpath*:spring/spring-context.xml</param-value>
+	</context-param>
+	<listener>
+		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+	</listener>
+
+	<!-- spring mvc -->
+	<servlet>
+		<servlet-name>spring</servlet-name>
+		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+		<init-param>
+			<param-name>contextConfigLocation</param-name>
+			<param-value>classpath*:spring/spring-servlet.xml</param-value>
+		</init-param>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>spring</servlet-name>
+		<url-pattern>/</url-pattern>
+	</servlet-mapping>
+
+	<!-- 静态资源 用default servlet 处理 -->
+	<servlet-mapping>
+		<servlet-name>default</servlet-name>
+
+		<url-pattern>/fonts/*</url-pattern>
+		<url-pattern>*.css</url-pattern>
+		<url-pattern>*.js</url-pattern>
+		<url-pattern>*.html</url-pattern>
+ 		<!--<url-pattern>*.jsp</url-pattern>-->
+		<url-pattern>*.png</url-pattern>
+		<url-pattern>*.gif</url-pattern>
+		<url-pattern>*.jpg</url-pattern>
+		<url-pattern>*.jpeg</url-pattern>
+		<url-pattern>/assets/*</url-pattern>
+	</servlet-mapping>
+
+	<!-- 编码过滤器 -->
+	<filter>
+		<filter-name>encodingFilter</filter-name>
+		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
+		<init-param>
+			<param-name>encoding</param-name>
+			<param-value>UTF-8</param-value>
+		</init-param>
+		<init-param>
+			<param-name>forceEncoding</param-name>
+			<param-value>true</param-value>
+		</init-param>
+	</filter>
+	<filter-mapping>
+		<filter-name>encodingFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+
+	<welcome-file-list>
+		<welcome-file>/index.jsp</welcome-file>
+	</welcome-file-list>
+</web-app>

+ 0 - 0
wms-task/src/main/webapp/WEB-INF/jsp/index.jsp → wms-task/src/main/webapp/index.jsp


+ 5 - 5
wms-task/src/main/webapp/WEB-INF/jsp/views/list.jsp → wms-task/src/main/webapp/views/list.jsp

@@ -46,7 +46,7 @@
 					async : true,
 					dataType : "JSON",
 					cache : false,
-					url : "${ctx}job/add",
+					url : "${ctx}job/add.json",
 					data : $("#addForm").serialize(),//对表单进行序列化
 					success : function(data) {
 						if (data.code == 0) {
@@ -106,7 +106,7 @@
 				async : true,
 				dataType : "JSON",
 				cache : false,
-				url : "${ctx}job/del",
+				url : "${ctx}job/del.json",
 				data : {
 					jobId : jobId
 				},
@@ -161,7 +161,7 @@
 	};
 
 	function initTable(){
-	    var url = "${ctx}job/list";
+	    var url = "${ctx}job/list.json";
 	    $('#table').bootstrapTable({
 	        method:'POST',
 	        dataType:'json',
@@ -254,7 +254,7 @@
 					async : true,
 					dataType : "JSON",
 					cache : false,
-					url : "${ctx}job/updateCron",
+					url : "${ctx}job/updateCron.json",
 					data : {
 						jobId : jobId,
 						cron : v
@@ -278,7 +278,7 @@
 			async : true,
 			dataType : "JSON",
 			cache : false,
-			url : "${ctx}job/changeJobStatus",
+			url : "${ctx}job/changeJobStatus.json",
 			data : {
 				jobId : jobId,
 				cmd : cmd