Sfoglia il codice sorgente

Merge branch 'release-201818-wangcz'

yangc 7 anni fa
parent
commit
053f3b22ad
30 ha cambiato i file con 736 aggiunte e 300 eliminazioni
  1. 14 3
      pom.xml
  2. 42 15
      src/main/java/com/uas/platform/b2c/common/account/service/impl/UserServiceImpl.java
  3. 2 0
      src/main/java/com/uas/platform/b2c/core/utils/ThreadUtils.java
  4. 71 1
      src/main/java/com/uas/platform/b2c/fa/settlement/model/BillSubmit.java
  5. 153 40
      src/main/java/com/uas/platform/b2c/fa/settlement/service/impl/BillSubmitServiceImpl.java
  6. 16 0
      src/main/java/com/uas/platform/b2c/prod/commodity/model/GoodsHistory.java
  7. 5 1
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java
  8. 21 52
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java
  9. 7 8
      src/main/java/com/uas/platform/b2c/trade/order/controller/OrderController.java
  10. 53 24
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java
  11. 27 0
      src/main/resources/dev/redisson.yaml
  12. 27 0
      src/main/resources/prod/redisson.yaml
  13. 3 2
      src/main/resources/spring/context.xml
  14. 26 0
      src/main/resources/spring/hibernate-redis.properties
  15. 27 0
      src/main/resources/test/redisson.yaml
  16. 28 0
      src/main/webapp/resources/css/pay.css
  17. 3 3
      src/main/webapp/resources/js/common/directives.js
  18. 13 0
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_invoice_ctrl.js
  19. 106 94
      src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js
  20. 5 5
      src/main/webapp/resources/js/vendor/app.js
  21. 2 2
      src/main/webapp/resources/view/usercenter/forstore/buyer_invoice.html
  22. 25 18
      src/main/webapp/resources/view/usercenter/forstore/buyer_invoice_record.html
  23. 2 2
      src/main/webapp/resources/view/usercenter/forstore/buyer_no_invoice.html
  24. 5 1
      src/main/webapp/resources/view/usercenter/forstore/buyer_order.html
  25. 8 1
      src/main/webapp/resources/view/usercenter/forstore/buyer_transfer.html
  26. 28 21
      src/main/webapp/resources/view/vendor/forstore/vendor-invoice.html
  27. 1 1
      src/main/webapp/resources/view/vendor/forstore/vendor_delivery.html
  28. 5 2
      src/main/webapp/resources/view/vendor/forstore/vendor_undercarriage.html
  29. 6 4
      src/main/webapp/resources/view/vendor/modal/invoice_look_modal.html
  30. 5 0
      src/test/java/com/uas/platform/b2c/DesTest.java

+ 14 - 3
pom.xml

@@ -217,6 +217,14 @@
 			<groupId>org.hibernate</groupId>
 			<artifactId>hibernate-ehcache</artifactId>
 		</dependency>
+
+
+		<dependency>
+			<groupId>com.github.debop</groupId>
+			<artifactId>hibernate-redis</artifactId>
+			<version>2.3.1</version>
+		</dependency>
+
 		<!-- jdbc -->
 		<dependency>
 			<groupId>com.oracle</groupId>
@@ -273,14 +281,17 @@
 		<dependency>
 			<groupId>com.fasterxml.jackson.core</groupId>
 			<artifactId>jackson-core</artifactId>
+			<version>2.9.6</version>
 		</dependency>
 		<dependency>
 			<groupId>com.fasterxml.jackson.core</groupId>
 			<artifactId>jackson-databind</artifactId>
+			<version>2.9.6</version>
 		</dependency>
 		<dependency>
 			<groupId>com.fasterxml.jackson.core</groupId>
 			<artifactId>jackson-annotations</artifactId>
+			<version>2.9.6</version>
 		</dependency>
 		<dependency>
 			<groupId>com.alibaba</groupId>
@@ -532,8 +543,8 @@
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-compiler-plugin</artifactId>
 				<configuration>
-					<source>1.7</source>
-					<target>1.7</target>
+					<source>1.8</source>
+					<target>1.8</target>
 				</configuration>
 			</plugin>
 			<plugin>
@@ -652,7 +663,7 @@
 				<version>2.2</version>
 				<configuration>
 					<port>8080</port>
-					<path>/platform-b2c</path>
+					<path>/</path>
 					<uriEncoding>utf-8</uriEncoding>
 				</configuration>
 			</plugin>

+ 42 - 15
src/main/java/com/uas/platform/b2c/common/account/service/impl/UserServiceImpl.java

@@ -6,9 +6,7 @@ import com.uas.platform.b2c.common.account.model.*;
 import com.uas.platform.b2c.common.account.service.UserService;
 import com.uas.platform.b2c.core.config.MessageConf;
 import com.uas.platform.b2c.core.support.SystemSession;
-import com.uas.platform.b2c.core.utils.ThreadUtils;
 import com.uas.platform.b2c.trade.util.BoundedExecutor;
-import com.uas.platform.core.concurrent.IRunnable;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.exception.SystemException;
 import com.uas.platform.core.model.PageInfo;
@@ -16,6 +14,7 @@ import com.uas.platform.core.model.PageParams;
 import com.uas.platform.core.util.AgentUtils;
 import com.uas.platform.core.util.encry.Md5Utils;
 import com.uas.sso.entity.UserView;
+import com.uas.sso.util.AccountUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.jpa.domain.Specification;
@@ -24,7 +23,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.ui.ModelMap;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
-import com.uas.sso.util.AccountUtils;
+
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
@@ -77,6 +76,13 @@ public class UserServiceImpl implements UserService {
 	@Autowired
 	private UserLoginTimeDao userLoginTimeDao;
 
+	private BoundedExecutor executor;
+
+	{
+		ExecutorService executorService = Executors.newCachedThreadPool();
+		executor = new BoundedExecutor(executorService, 1000);
+	}
+
 	@Override
 	public User findUserByUserUU(Long uu) {
 		List<User> users = userDao.findUserByUserUU(uu);
@@ -201,10 +207,17 @@ public class UserServiceImpl implements UserService {
 			enterpriseDao.callInitProcedure(SystemSession.getUser().getEnterprise().getUu());
 		}
 		userDao.save(user);
+		Enterprise enterprise = SystemSession.getUser().getEnterprise();
+
+		//判断是否个人用户
+		if(enterprise == null){
+			throw new RuntimeException("个人账户不能新增企业用户");
+		}
+		// 同步账户中心
 		try {
-			postToAccountCenter(user);
+			postToAccountCenter(user, enterprise);
 		} catch (Exception e) {
-			throw new SystemException(e.getMessage());
+			e.printStackTrace();
 		}
 	}
 	@Override
@@ -278,8 +291,16 @@ public class UserServiceImpl implements UserService {
 			userOld.setUserEmail(user.getUserEmail());
 			userOld.setUserTel(user.getUserTel());
 			userOld.setUserName(user.getUserName());
+
+			Enterprise enterprise = SystemSession.getUser().getEnterprise();
+
+			//判断是否个人用户
+			if(enterprise == null){
+				throw new RuntimeException("个人账户不能新增企业用户");
+			}
+
 			try {
-				postToAccountCenter(userOld);
+				postToAccountCenter(userOld, enterprise);
 			} catch (Exception e) {
 //				throw new RuntimeException(e.getMessage());
 			}
@@ -415,12 +436,21 @@ public class UserServiceImpl implements UserService {
 		return user;
 	}
 
-	public void postToAccountCenter(User user) throws Exception {
-		//判断是否个人用户
-		if(SystemSession.getUser().getEnterprise()==null){
-			throw new RuntimeException("个人账户不能新增企业用户");
-		}else{
-			AccountUtils.addUser(user.getUserUU(),SystemSession.getUser().getEnterprise().getUu());
+	public void postToAccountCenter(final User user, final Enterprise enterprise) throws Exception {
+		// 同步账户中心
+		try {
+			executor.submitTask(new Runnable() {
+				@Override
+				public void run() {
+					try {
+						AccountUtils.addUser(user.getUserUU(),enterprise.getUu());
+					} catch (Exception e) {
+						e.printStackTrace();
+					}
+				}
+			});
+		} catch (Exception e) {
+			throw new SystemException(e.getMessage());
 		}
 	}
 	@Override
@@ -432,9 +462,6 @@ public class UserServiceImpl implements UserService {
 			userDao.flush();
 			final Long enUU = SystemSession.getUser().getEnterprise().getUu();
 			// 同步账户中心
-			ExecutorService executorService = Executors.newCachedThreadPool();
-			BoundedExecutor executor = new BoundedExecutor(executorService, 1000);
-
 			try {
 				executor.submitTask(new Runnable() {
 					@Override

+ 2 - 0
src/main/java/com/uas/platform/b2c/core/utils/ThreadUtils.java

@@ -58,6 +58,8 @@ public class ThreadUtils {
 		}
 
 		public void run() {
+			// shutdown()后,不能再提交新的任务进去;但是awaitTermination()后,可以继续提交。
+			// awaitTermination()是阻塞的,返回结果是线程池是否已停止(true/false);shutdown()不阻塞。
 			threadPool.shutdown();
 			try {
 				threadPool.awaitTermination(timeout, TimeUnit.SECONDS);

+ 71 - 1
src/main/java/com/uas/platform/b2c/fa/settlement/model/BillSubmit.java

@@ -2,6 +2,9 @@ package com.uas.platform.b2c.fa.settlement.model;
 
 import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.common.account.model.UserBaseInfo;
+import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.core.utils.FastjsonUtils;
+import com.uas.platform.core.model.Status;
 
 import javax.persistence.*;
 import java.io.Serializable;
@@ -14,7 +17,7 @@ import java.util.Date;
  */
 @Entity
 @Table(name = "trade$bill_submit")
-public class BillSubmit implements Serializable{
+public class BillSubmit implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
@@ -147,6 +150,24 @@ public class BillSubmit implements Serializable{
     @Column(name = "bs_store_name")
     private String storeName;
 
+    /**
+     * 销售单号,以“,”拼接
+     */
+    @Column(name = "bs_purchaseids")
+    private String purchaseids;
+
+    /**
+     *
+     */
+    @Column(name = "bs_currency")
+    private String currency;
+
+    /**
+     * 是否个人用户
+     */
+    @Column(name = "bs_dissociative")
+    private Integer dissociative;
+
     public Long getId() {
         return id;
     }
@@ -317,4 +338,53 @@ public class BillSubmit implements Serializable{
         this.storeName = storeName;
         return this;
     }
+
+    public String getPurchaseids() {
+        return purchaseids;
+    }
+
+    public BillSubmit setPurchaseids(String purchaseids) {
+        this.purchaseids = purchaseids;
+        return this;
+    }
+
+    /**
+     * 设置bill信息
+     * @param bill
+     */
+    public void setBillInfo(Bill bill) {
+        if (bill == null) {
+            return ;
+        }
+        this.setInvoicetitle(bill.getHead());
+        this.setInvoiceid(bill.getId());
+        this.setInvoiceAddress(bill.getArea() + "," + bill.getDetailAddress());
+        this.setInvoicetype(bill.getKind());
+        this.setCreateTime(new Date());
+        this.setReceiverName(bill.getName());
+        this.setRecTel(bill.getTelephone());
+        this.setStatus(Status.SUBMITTED.value());
+        this.setSubmituu(SystemSession.getUser().getUserUU());
+        this.setBillInfo(FastjsonUtils.toJson(bill));
+        if (SystemSession.getUser().getEnterprise() != null)
+            this.setSubmitEnuu(SystemSession.getUser().getEnterprise().getUu());
+    }
+
+    public String getCurrency() {
+        return currency;
+    }
+
+    public BillSubmit setCurrency(String currency) {
+        this.currency = currency;
+        return this;
+    }
+
+    public Integer getDissociative() {
+        return dissociative;
+    }
+
+    public BillSubmit setDissociative(Integer dissociative) {
+        this.dissociative = dissociative;
+        return this;
+    }
 }

+ 153 - 40
src/main/java/com/uas/platform/b2c/fa/settlement/service/impl/BillSubmitServiceImpl.java

@@ -1,15 +1,19 @@
 package com.uas.platform.b2c.fa.settlement.service.impl;
 
+import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.constant.SplitChar;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
+import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.fa.settlement.dao.BillDao;
 import com.uas.platform.b2c.fa.settlement.dao.BillSubmitDao;
 import com.uas.platform.b2c.fa.settlement.model.Bill;
 import com.uas.platform.b2c.fa.settlement.model.BillSubmit;
 import com.uas.platform.b2c.fa.settlement.service.BillSubmitService;
 import com.uas.platform.b2c.trade.order.dao.OrderDao;
+import com.uas.platform.b2c.trade.order.dao.PurchaseDao;
 import com.uas.platform.b2c.trade.order.model.Order;
+import com.uas.platform.b2c.trade.order.model.Purchase;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.Status;
@@ -19,6 +23,7 @@ import com.uas.platform.core.persistence.criteria.LogicalExpression;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.platform.core.persistence.criteria.SimpleExpression;
 import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.map.HashedMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.jpa.domain.Specification;
@@ -45,11 +50,17 @@ public class BillSubmitServiceImpl implements BillSubmitService {
 
     private final BillSubmitDao billSubmitDao;
 
+    private final PurchaseDao purchaseDao;
+
+    private final SysConf sysConf;
+
     @Autowired
-    public BillSubmitServiceImpl (OrderDao orderDao, BillDao billDao, BillSubmitDao billSubmitDao) {
+    public BillSubmitServiceImpl(OrderDao orderDao, BillDao billDao, BillSubmitDao billSubmitDao, PurchaseDao purchaseDao, SysConf sysConf) {
         this.orderDao = orderDao;
         this.billDao = billDao;
         this.billSubmitDao = billSubmitDao;
+        this.purchaseDao = purchaseDao;
+        this.sysConf = sysConf;
     }
 
     @Override
@@ -97,12 +108,17 @@ public class BillSubmitServiceImpl implements BillSubmitService {
             } else {
                 map.get(order.getSellerenuu()).add(order);
             }
-
         }
         List<BillSubmit> billSubmits = new ArrayList<BillSubmit>();
         for (Long sellerenuu : map.keySet()) {
-            BillSubmit billSubmit = createBillSubmit(bill, map.get(sellerenuu), buyerEnuu);
-            billSubmits.add(billSubmit);
+            List<BillSubmit> billSubmitList = new ArrayList<>();
+            billSubmitList.add(createBillSubmit(bill, map.get(sellerenuu), buyerEnuu));
+            if (sellerenuu.longValue() == sysConf.getEnUU().longValue()) {
+                billSubmitList.addAll(createBillSubmitByPurchase(map.get(sellerenuu)));
+            }
+            if (billSubmitList != null) {
+                billSubmits.addAll(billSubmitList);
+            }
         }
 
         return billSubmitDao.save(billSubmits);
@@ -113,52 +129,133 @@ public class BillSubmitServiceImpl implements BillSubmitService {
         Long buyeruu = SystemSession.getUser().getUserUU();
         // 发票基本信息
         BillSubmit billSubmit = new BillSubmit();
-        billSubmit.setInvoicetitle(bill.getHead());
-        billSubmit.setInvoiceid(bill.getId());
-        billSubmit.setInvoiceAddress(bill.getArea() + "," + bill.getDetailAddress());
-        billSubmit.setInvoicetype(bill.getKind());
-        billSubmit.setCreateTime(new Date());
-        billSubmit.setReceiverName(bill.getName());
-        billSubmit.setRecTel(bill.getTelephone());
-        billSubmit.setStatus(Status.SUBMITTED.value());
-        billSubmit.setSubmituu(SystemSession.getUser().getUserUU());
-        billSubmit.setBillInfo(FastjsonUtils.toJson(bill));
-        if (SystemSession.getUser().getEnterprise() != null)
-            billSubmit.setSubmitEnuu(SystemSession.getUser().getEnterprise().getUu());
+        billSubmit.setBillInfo(bill);
 
         String orderIds = "";
+        String purchaseIds = "";
         Double price = 0d;
         for (int i = 0; i < orders.size(); i++) {
-            if (buyerEnuu != null) {
                 Order order = orders.get(i);
-                if (buyerEnuu.equals(order.getBuyerenuu()) && buyeruu.equals(order.getBuyeruu())) {
-                    billSubmit.setSellername(order.getSellername());
-                    billSubmit.setSellerenuu(order.getSellerenuu());
-                    billSubmit.setStoreid(order.getStoreid());
+                if ((buyerEnuu == null && order.getBuyerenuu() == null)|| (buyerEnuu != null && buyerEnuu.equals(order.getBuyerenuu())) && buyeruu.equals(order.getBuyeruu())) {
                     order.setInvoicetype(bill.getKind());
-                    order.setInvoiceAddress(bill.getArea() + "," + bill.getDetailAddress());
+                    order.setInvoiceAddress(FastjsonUtils.toJson(bill));
                     order.setInvoiceid(bill.getId());
                     order.setInvoicetitle(bill.getHead());
                     order.setVatBillStatus(Status.TOBEMAKE_BILL.value());
                     orderDao.save(order);
-                    price += order.getPrice();
+
+                    price = NumberUtil.add(order.getPrice(), price);
+
+                    List<Purchase> purchases = purchaseDao.findByOrderid(order.getOrderid());
+                    for (Purchase purchase : purchases) {
+                        if (order.getSellerenuu().longValue() != sysConf.getEnUU().longValue()) {
+                            //自营店订单
+                            purchase.setInvoicetitle(bill.getHead());
+                            purchase.setInvoicetype(bill.getKind());
+                            purchase.setInvoiceAddress(FastjsonUtils.toJson(bill));
+                            purchase.setInvoicetitle(bill.getHead());
+                            purchase.setVatBillStatus(Status.TOBEMAKE_BILL.value());
+                            purchaseDao.save(purchase);
+                        }
+                        purchaseIds += ("," + purchase.getPurchaseid());
+                    }
                     orderIds += order.getOrderid();
                     if (i < orders.size() - 1)
                         orderIds += SplitChar.COMMA;
                 } else {
                     throw new IllegalOperatorException("订单号: " + order.getOrderid() + " ,不属于您的订单,请重新确认订单号");
                 }
-            } else {
-
-            }
         }
-
+        billSubmit.setCurrency(orders.get(0).getCurrency());
+        billSubmit.setSellername(orders.get(0).getSellername());
+        billSubmit.setSellerenuu(orders.get(0).getSellerenuu());
+        billSubmit.setStoreid(orders.get(0).getStoreid());
+        billSubmit.setDissociative(orders.get(0).getDissociative());
         billSubmit.setPrice(price);
         billSubmit.setOrderids(orderIds);
+        if (StringUtils.isEmpty(purchaseIds)){
+            billSubmit.setPurchaseids(purchaseIds);
+        } else {
+            billSubmit.setPurchaseids(purchaseIds.substring(1));
+        }
+
 
         return billSubmit;
     }
 
+    // 初始化发票申请(用户发起用)
+    public List<BillSubmit> createBillSubmitByPurchase(List<Order> orders) {
+        if (CollectionUtils.isEmpty(orders)) {
+            return Collections.emptyList();
+        }
+        List<Bill> billOne = billDao.getBillByUseruuAndEnuuAndKind(sysConf.getAdminUU(), sysConf.getEnUU(),Type.Bill_Deduct.value());
+        if (CollectionUtils.isEmpty(billOne)) {
+            throw new IllegalOperatorException("商城专票信息被删除,请联系商城管理员添加");
+        }
+        // 发票基本信息
+        List<Purchase> purchaseList = new ArrayList<>();
+        for (Order order : orders) {
+            List<Purchase> purchases = purchaseDao.findByOrderid(order.getOrderid());
+            purchaseList.addAll(purchases);
+        }
+        Map<Long, List<Purchase>> map = new HashedMap();
+        for (Purchase purchase : purchaseList) {
+            //同一个卖家的汇总
+            List<Purchase> purchaseList1 = map.get(purchase.getSellerenuu());
+            if (purchaseList1 == null) {
+                purchaseList1 = new ArrayList<>();
+            }
+            purchaseList1.add(purchase);
+            map.put(purchase.getSellerenuu(), purchaseList1);
+        }
+        List<BillSubmit> list = new ArrayList<>();
+        Set<Long> longSet = map.keySet();
+        Double price = 0d;
+        String orderIds = "";
+        String purchaseIds = "";
+        for (Long enuu : longSet) {
+            List<Purchase> purchases = map.get(enuu);
+            BillSubmit billSubmit = new BillSubmit();
+            Bill bill = billOne.get(0);
+            billSubmit.setBillInfo(bill);
+            price = 0d;
+            orderIds = "";
+            purchaseIds = "";
+            for (Purchase purchase : purchases) {
+                purchase.setInvoicetitle(bill.getHead());
+                purchase.setInvoicetype(bill.getKind());
+                purchase.setInvoiceAddress(FastjsonUtils.toJson(bill));
+                purchase.setInvoicetitle(bill.getHead());
+                purchase.setVatBillStatus(Status.TOBEMAKE_BILL.value());
+                orderIds += ("," + purchase.getOrderid());
+                purchaseIds += ("," + purchase.getPurchaseid());
+                NumberUtil.add(purchase.getPrice(), price);
+            }
+            billSubmit.setCurrency(purchases.get(0).getCurrency());
+            billSubmit.setSubmituu(sysConf.getAdminUU());
+            billSubmit.setSubmitEnuu(sysConf.getEnUU());
+            billSubmit.setSellername(purchases.get(0).getSellername());
+            billSubmit.setSellerenuu(purchases.get(0).getSellerenuu());
+            billSubmit.setStoreid(purchases.get(0).getStoreid());
+            billSubmit.setDissociative(Type.ENTERPRISING.value());
+            billSubmit.setPrice(price);
+            if (StringUtils.isEmpty(orderIds)) {
+                billSubmit.setOrderids(orderIds);
+            } else {
+                billSubmit.setOrderids(orderIds.substring(1));
+            }
+            if (StringUtils.isEmpty(purchaseIds)) {
+                billSubmit.setPurchaseids(purchaseIds);
+            } else {
+                billSubmit.setPurchaseids(purchaseIds.substring(1));
+            }
+
+            list.add(billSubmit);
+
+        }
+        return list;
+    }
+
     @Override
     public BillSubmit saveByAdmin(Order order) {
         Bill bill = billDao.findOne(order.getInvoiceid());
@@ -167,20 +264,13 @@ public class BillSubmitServiceImpl implements BillSubmitService {
         }
 
         // 发票基本信息
+        List<BillSubmit> list = new ArrayList<>();
         BillSubmit billSubmit = new BillSubmit();
-        billSubmit.setBillInfo(FastjsonUtils.toJson(bill));
-        billSubmit.setInvoicetitle(bill.getHead());
-        billSubmit.setInvoiceid(bill.getId());
-        billSubmit.setInvoiceAddress(bill.getArea() + "," + bill.getDetailAddress());
-        billSubmit.setInvoicetype(bill.getKind());
-        billSubmit.setCreateTime(new Date());
-        billSubmit.setReceiverName(bill.getName());
-        billSubmit.setRecTel(bill.getTelephone());
-        billSubmit.setStatus(Status.SUBMITTED.value());
+        billSubmit.setBillInfo(bill);
         billSubmit.setSubmituu(order.getBuyeruu());
         if (order.getBuyerenuu() != null)
             billSubmit.setSubmitEnuu(order.getBuyerenuu());
-
+        billSubmit.setCurrency(order.getCurrency());
         billSubmit.setSellername(order.getSellername());
         billSubmit.setSellerenuu(order.getSellerenuu());
         billSubmit.setStoreid(order.getStoreid());
@@ -191,19 +281,42 @@ public class BillSubmitServiceImpl implements BillSubmitService {
         order.setInvoicetitle(bill.getHead());
         order.setVatBillStatus(Status.TOBEMAKE_BILL.value());
         orderDao.save(order);
-
+        String purchaseIds = "";
+        List<Purchase> purchases = purchaseDao.findByOrderid(order.getOrderid());
+        for (Purchase purchase : purchases) {
+            purchaseIds += purchase.getPurchaseid();
+            purchase.setInvoicetitle(bill.getHead());
+            purchase.setInvoicetype(bill.getKind());
+            purchase.setInvoiceAddress(FastjsonUtils.toJson(bill));
+            purchase.setInvoicetitle(bill.getHead());
+            purchase.setVatBillStatus(Status.TOBEMAKE_BILL.value());
+        }
+        purchaseDao.save(purchases);
+        if (order.getSellerenuu().longValue() == sysConf.getEnUU().longValue()) {
+            List<Order> orderList = new ArrayList<>();
+            orderList.add(order);
+            list.addAll(createBillSubmitByPurchase(orderList));
+        }
+        billSubmit.setPurchaseids(purchaseIds);
         billSubmit.setPrice(order.getPrice());
         billSubmit.setOrderids(order.getOrderid());
+        billSubmit.setDissociative(order.getDissociative());
+        BillSubmit submit = billSubmitDao.save(billSubmit);
+        billSubmitDao.save(list);
 
-        return billSubmitDao.save(billSubmit);
+        return submit;
     }
 
     @Override
     public Page<BillSubmit> getAll(final PageInfo pageInfo, String keyword, String invoicetype , String status, String role) {
         if (Type.BUYER.name().equals(role)) {
             pageInfo.expression(PredicateUtils.eq("submituu", SystemSession.getUser().getUserUU(), false));
-            if (SystemSession.getUser().getEnterprise() != null)
+            if (SystemSession.getUser().getEnterprise() != null) {
                 pageInfo.expression(PredicateUtils.eq("submitEnuu", SystemSession.getUser().getEnterprise().getUu(), false));
+            } else {
+                pageInfo.expression(PredicateUtils.eq("dissociative", Type.PERSONAL.value(), false));
+            }
+
         }
 
         if (Type.SELLER.name().equals(role)) {

+ 16 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/model/GoodsHistory.java

@@ -434,6 +434,12 @@ public class GoodsHistory {
 	@JoinColumn(name = "log_operateuu", insertable = false, updatable = false)
 	private UserBaseInfo operater;
 
+    /**
+     * goodid
+     */
+	@Column(name = "go_goid")
+	private Long goid;
+
 	@Transient
 	private String enterpriseName;
 
@@ -1068,6 +1074,7 @@ public class GoodsHistory {
 		this.tag = goods.getTag();
 		this.prodNum = goods.getProdNum();
 		this.spec = goods.getSpec();
+		this.goid  = goods.getId();
     }
 
 	public Short getSelfDeliveryDemMinTime() {
@@ -1201,4 +1208,13 @@ public class GoodsHistory {
 		this.attach = attach;
 		return this;
 	}
+
+	public Long getGoid() {
+		return goid;
+	}
+
+	public GoodsHistory setGoid(Long goid) {
+		this.goid = goid;
+		return this;
+	}
 }

+ 5 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java

@@ -3630,7 +3630,11 @@ public class GoodsServiceImpl implements GoodsService {
                 histories.add(goodsHistoryRemoved);
             }
             //删除库存信息
-            goods.setStatus(Status.GOODS_DELETE.value());
+            goods.setStatus(Status.REMOVED.value());
+            GoodsHistory goodsHistoryDown = goodsHistoryService.converTGoodsHist(goods, OperateType.Down.getPhrase(),false);
+            histories.add(goodsHistoryDown);
+            //删除库存信息
+            goods.setStatus(Status.DELETED.value());
             GoodsHistory goodsHistoryDelete = goodsHistoryService.converTGoodsHist(goods, OperateType.DELETE.getPhrase(),false);
             histories.add(goodsHistoryDelete);
             goodses1.add(goods);

+ 21 - 52
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -1,7 +1,5 @@
 package com.uas.platform.b2c.prod.commodity.service.impl;
 
-import static com.uas.platform.b2c.core.utils.NumberUtil.fractionNumCeil;
-
 import com.alibaba.fastjson.JSON;
 import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.common.account.service.EnterpriseService;
@@ -14,28 +12,9 @@ import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.core.utils.RegexConstant;
 import com.uas.platform.b2c.core.utils.StringUtilB2C;
-import com.uas.platform.b2c.prod.commodity.constant.DoubleConstant;
-import com.uas.platform.b2c.prod.commodity.constant.ErrorInfoConstant;
-import com.uas.platform.b2c.prod.commodity.constant.ModifyConstant;
-import com.uas.platform.b2c.prod.commodity.constant.ShortConstant;
-import com.uas.platform.b2c.prod.commodity.constant.UploadConstant;
-import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
-import com.uas.platform.b2c.prod.commodity.dao.PCBDao;
-import com.uas.platform.b2c.prod.commodity.dao.PcbPropertyvalueDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductPersonDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductPrivateDao;
-import com.uas.platform.b2c.prod.commodity.dao.ReleaseProductByBatchDao;
-import com.uas.platform.b2c.prod.commodity.dao.V_ProductPrivateDao;
-import com.uas.platform.b2c.prod.commodity.model.Goods;
-import com.uas.platform.b2c.prod.commodity.model.GoodsQtyPrice;
-import com.uas.platform.b2c.prod.commodity.model.PCB;
-import com.uas.platform.b2c.prod.commodity.model.PCBPropertyValue;
-import com.uas.platform.b2c.prod.commodity.model.Product;
-import com.uas.platform.b2c.prod.commodity.model.ProductPerson;
-import com.uas.platform.b2c.prod.commodity.model.ProductPrivate;
-import com.uas.platform.b2c.prod.commodity.model.ReleaseProductByBatch;
-import com.uas.platform.b2c.prod.commodity.model.V_ProductPrivate;
+import com.uas.platform.b2c.prod.commodity.constant.*;
+import com.uas.platform.b2c.prod.commodity.dao.*;
+import com.uas.platform.b2c.prod.commodity.model.*;
 import com.uas.platform.b2c.prod.commodity.service.GoodsService;
 import com.uas.platform.b2c.prod.commodity.service.ReleaseProductByBatchService;
 import com.uas.platform.b2c.prod.commodity.util.GoodsUtil;
@@ -56,37 +35,11 @@ import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.persistence.criteria.CriterionExpression;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.platform.core.persistence.criteria.SimpleExpression;
-import java.math.BigDecimal;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.map.HashedMap;
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.DateUtil;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.usermodel.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.dao.DataAccessException;
@@ -99,6 +52,22 @@ import org.springframework.ui.ModelMap;
 import org.springframework.util.StringUtils;
 import org.springframework.web.client.RestTemplate;
 
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.math.BigDecimal;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static com.uas.platform.b2c.core.utils.NumberUtil.fractionNumCeil;
+
 @Service
 public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchService {
 
@@ -1395,7 +1364,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 					String str = cell.getStringCellValue().trim();
 //					Object data = getCellData(cell);
 //					String str = data == null ? "" : data.toString();
-					if(str.indexOf("\u00A0")>0){
+					if(str.indexOf("\u00A0") > -1){
 						  str= str.replaceAll("\u00A0", "");
 					}
 					str = StringUtilB2C.replaceTabAndLineBreak(str);

+ 7 - 8
src/main/java/com/uas/platform/b2c/trade/order/controller/OrderController.java

@@ -6,13 +6,13 @@ import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.account.service.VendorService;
 import com.uas.platform.b2c.core.constant.SplitChar;
+import com.uas.platform.b2c.core.constant.Type;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
 import com.uas.platform.b2c.core.support.view.JxlsExcelView;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
 import com.uas.platform.b2c.core.utils.StringUtilB2C;
 import com.uas.platform.b2c.fa.payment.model.BankTransfer;
-import com.uas.platform.b2c.prod.commodity.model.ProductStandardPutOnInfo;
 import com.uas.platform.b2c.trade.inquiry.model.TradeCharge;
 import com.uas.platform.b2c.trade.order.model.Order;
 import com.uas.platform.b2c.trade.order.model.OrderDetail;
@@ -37,12 +37,7 @@ import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
 import javax.management.OperationsException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import static com.uas.platform.b2c.core.utils.StringUtilB2C.decodeValue;
 
@@ -694,8 +689,12 @@ public class OrderController {
 	public Page<Order> getBillByStatusByPersonal(PageParams params, String keyword, int status) {
 		PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("buyeruu", SystemSession.getUser().getUserUU());
-		if (SystemSession.getUser().getEnterprise() != null)
+		if (SystemSession.getUser().getEnterprise() != null) {
 			pageInfo.filter("buyerenuu", SystemSession.getUser().getEnterprise().getUu());
+		} else {
+			pageInfo.filter("dissociative", Type.PERSONAL.value());
+		}
+
 		assert logger != null;
 		logger.log("买家订单管理", "买家获取买家订单信息", "获取待开发票的订单");
 		return orderService.getBillByStatus(pageInfo, keyword, status);

+ 53 - 24
src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java

@@ -17,6 +17,7 @@ import com.uas.platform.b2c.common.message.type.SMSType;
 import com.uas.platform.b2c.common.psmessage.service.MessageService;
 import com.uas.platform.b2c.common.search.rpc.service.OrderSearchService;
 import com.uas.platform.b2c.core.config.SysConf;
+import com.uas.platform.b2c.core.constant.ShortConstant;
 import com.uas.platform.b2c.core.constant.SplitChar;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.support.log.TradeBufferedLogger;
@@ -60,7 +61,8 @@ import com.uas.platform.b2c.trade.deprecated.model.OrderRelationInfo;
 import com.uas.platform.b2c.trade.deprecated.model.UserInfoForOrder;
 import com.uas.platform.b2c.trade.inquiry.dao.TradeChargeDao;
 import com.uas.platform.b2c.trade.inquiry.model.TradeCharge;
-import com.uas.platform.b2c.trade.order.StringConstant.StringFormat;
+import com.uas.platform.b2c.trade.order.StringConstant.*;
+import com.uas.platform.b2c.trade.order.StringConstant.Currency;
 import com.uas.platform.b2c.trade.order.dao.OrderDao;
 import com.uas.platform.b2c.trade.order.dao.OrderDetailDao;
 import com.uas.platform.b2c.trade.order.dao.OrderIndexDetailDao;
@@ -76,6 +78,7 @@ import com.uas.platform.b2c.trade.presale.dao.TradeBasicPropertiesDao;
 import com.uas.platform.b2c.trade.seek.service.SeekPurchaseService;
 import com.uas.platform.b2c.trade.support.CodeType;
 import com.uas.platform.b2c.trade.support.ResultMap;
+import com.uas.platform.b2c.trade.util.BoundedExecutor;
 import com.uas.platform.b2c.trade.util.Preconditions;
 import com.uas.platform.b2c.trade.util.StatusChangeUtil;
 import com.uas.platform.b2c.trade.util.TradeLogUtil;
@@ -114,6 +117,8 @@ import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 import static com.uas.platform.b2c.trade.aftersale.model.AfterSaleStatus.*;
 import static com.uas.platform.b2c.trade.util.Preconditions.checkNotNull;
@@ -136,8 +141,7 @@ public class OrderServiceImpl implements OrderService {
     private static final long billNoNeed = -1L;
     private static final TradeBufferedLogger logger = BufferedLoggerManager
             .getLogger(TradeBufferedLogger.class);
-    @Autowired
-    private OrderDao orderDao;
+    private final OrderDao orderDao;
     @Autowired
     private OrderDetailDao orderDetailDao;
     @Autowired
@@ -215,6 +219,15 @@ public class OrderServiceImpl implements OrderService {
     @Autowired
     private MessageNotifyPersonalManagementService messageNotifyPersonalManagementService;
 
+    private final BoundedExecutor executor;
+
+    @Autowired
+    public OrderServiceImpl(OrderDao orderDao) {
+        this.orderDao = orderDao;
+        ExecutorService executorService = Executors.newCachedThreadPool();
+        executor = new BoundedExecutor(executorService, 1600);
+    }
+
     /**
      * 保存订单信息
      *
@@ -1459,21 +1472,20 @@ public class OrderServiceImpl implements OrderService {
                 purchase.setSendstatus(Status.NOT_UPLOAD.value());
                 purchaseDao.save(purchase);
 
-                // 如果买家需要开发票,则生成发票申请
-                if (Type.Bill_No.value() != newOrder.getInvoicetype().intValue()) {
-                    billSubmitService.saveByAdmin(newOrder);
-                }
-
                 //发送短信,异常不作处理
                 try {
                     sendMessage(purchase);
-                }catch (RuntimeException e){}
+                } catch (RuntimeException e){}
             } else if ((purchase.getStatus().intValue() != Status.UNAVAILABLE_DISAGREE.value())
                     && (purchase.getStatus().intValue() != Status.UNAVAILABLE_PERSONAL.value())) { // 采购单不在用户取消状态
                 throw new IllegalOperatorException("采购单" + purchase.getPurchaseid() + ", 状态是"
                         + Status.valueOf(purchase.getStatus()).getPhrase() + ",是异常状态");
             }
         }
+        // 如果买家需要开发票,则生成发票申请
+        if (Type.Bill_No.value() != newOrder.getInvoicetype().intValue()) {
+            billSubmitService.saveByAdmin(newOrder);
+        }
         return newOrder;
     }
 
@@ -1484,15 +1496,14 @@ public class OrderServiceImpl implements OrderService {
      * @throws RuntimeException the runtime exception
      */
 	@Override
-	public void sendMessage(Purchase purchase) throws RuntimeException{
+	public void sendMessage(final Purchase purchase) throws RuntimeException {
         if (purchase == null) {
             return;
         }
         /*-------------发送短信给卖方企业----------------*/
-        int sum = 0;
         try {
             //获取502,406状态下的该卖家采购单总量
-            sum = purchaseDao.getCountBySellerenuuAndStatus(purchase.getSellerenuu(), Status.CONFIRMED.value()) +
+            final int sum = purchaseDao.getCountBySellerenuuAndStatus(purchase.getSellerenuu(), Status.CONFIRMED.value()) +
                     purchaseDao.getCountBySellerenuuAndStatus(purchase.getSellerenuu(), Status.TOBESHIPPED.value());
 
 		/*   暂时取企业管理员的电话信息,这是商品上架人的信息
@@ -1509,15 +1520,27 @@ public class OrderServiceImpl implements OrderService {
             if (en.getEnAdminuu() == null) {
                 return;
             }
-            User admin = userDao.findOne(en.getEnAdminuu());
+            List<User> userList = userDao.findUserByUserUU(en.getEnAdminuu());
+            if (CollectionUtils.isEmpty(userList)) {
+                return ;
+            }
+            final User admin = userList.get(0);
             if (admin == null || admin.getUserTel() == null || purchase.getSellername() == null) {
                 return;
             }
-            sendMessageService.sendMessageForOrderSucess(purchase.getSellername(), sum,
-                    admin.getUserTel(), MessageType.orderpay);
+            executor.submitTask(new Runnable() {
+                @Override
+                public void run() {
+                    sendMessageService.sendMessageForOrderSucess(purchase.getSellername(), sum,
+                            admin.getUserTel(), MessageType.orderpay);
+                }
+            });
+
 		/*--------------------------------------------*/
-        }catch (RuntimeException e){
+        }catch (RuntimeException e) {
             throw e;
+        }catch (InterruptedException e) {
+            e.printStackTrace();
         }
     }
 
@@ -1696,15 +1719,19 @@ public class OrderServiceImpl implements OrderService {
                     orderDetail.setWeight(component.getWeight());
                 }
             } else {
-                GoodsHistory goodsHistory = goodsHisDao.findByBatchCode(orderDetail.getBatchCode()).get(0);
-                orderDetail.setReserve(goodsHistory.getReserve());
-                Component component = null;
-                if (goodsHistory.getUuid() != null){
-                    component = componentService.findByUuid(goodsHistory.getUuid());
-                }
-                if (component != null){
-                    orderDetail.setWeight(component.getWeight());
+                List<GoodsHistory> goodsHistories = goodsHisDao.findByBatchCode(orderDetail.getBatchCode());
+                if (!CollectionUtils.isEmpty(goodsHistories)) {
+                    GoodsHistory goodsHistory = goodsHistories.get(0);
+                    orderDetail.setReserve(goodsHistory.getReserve());
+                    Component component = null;
+                    if (goodsHistory.getUuid() != null){
+                        component = componentService.findByUuid(goodsHistory.getUuid());
+                    }
+                    if (component != null){
+                        orderDetail.setWeight(component.getWeight());
+                    }
                 }
+
             }
 
         }
@@ -2540,6 +2567,8 @@ public class OrderServiceImpl implements OrderService {
         page.expression(PredicateUtils.eq("status", status, false));
         page.expression(PredicateUtils.isNull("invoiceid"));
         page.expression(PredicateUtils.eq("invoicetype", Type.Bill_No.value(), false));
+        page.expression(PredicateUtils.eq("currency", Currency.RMB, true));
+        page.expression(PredicateUtils.eq("used", ShortConstant.YES_SHORT, true));
 
         if (StringUtils.hasText(keyword)) {
             SimpleExpression sellername = new SimpleExpression("sellername", keyword , Operator.LIKE);

+ 27 - 0
src/main/resources/dev/redisson.yaml

@@ -0,0 +1,27 @@
+# redisson configuration for redis servers
+# see : https://github.com/mrniko/redisson/wiki/2.-Configuration
+
+singleServerConfig:
+  idleConnectionTimeout: 10000
+  pingTimeout: 1000
+  connectTimeout: 1000
+  timeout: 1000
+  retryAttempts: 3
+  retryInterval: 1000
+  reconnectionTimeout: 3000
+  failedAttempts: 3
+  password: null
+  subscriptionsPerConnection: 5
+  clientName: null
+  address: ["redis://192.168.253.6:6379"]
+  subscriptionConnectionMinimumIdleSize: 1
+  subscriptionConnectionPoolSize: 25
+  connectionMinimumIdleSize: 5
+  connectionPoolSize: 100
+  database: 0
+  dnsMonitoring: false
+  dnsMonitoringInterval: 5000
+threads: 0
+codec: !<org.redisson.codec.SnappyCodec> {}
+useLinuxNativeEpoll: false
+eventLoopGroup: null

+ 27 - 0
src/main/resources/prod/redisson.yaml

@@ -0,0 +1,27 @@
+# redisson configuration for redis servers
+# see : https://github.com/mrniko/redisson/wiki/2.-Configuration
+
+singleServerConfig:
+  idleConnectionTimeout: 10000
+  pingTimeout: 1000
+  connectTimeout: 1000
+  timeout: 1000
+  retryAttempts: 3
+  retryInterval: 1000
+  reconnectionTimeout: 3000
+  failedAttempts: 3
+  password: null
+  subscriptionsPerConnection: 5
+  clientName: null
+  address: ["redis://10.10.0.200:6379"]
+  subscriptionConnectionMinimumIdleSize: 1
+  subscriptionConnectionPoolSize: 25
+  connectionMinimumIdleSize: 5
+  connectionPoolSize: 100
+  database: 0
+  dnsMonitoring: false
+  dnsMonitoringInterval: 5000
+threads: 0
+codec: !<org.redisson.codec.SnappyCodec> {}
+useLinuxNativeEpoll: false
+eventLoopGroup: null

+ 3 - 2
src/main/resources/spring/context.xml

@@ -128,9 +128,10 @@
 		</property>
 		<property name="jpaProperties">
 			<props>
-				<prop key="hibernate.cache.provider_configuration_file_resource_path">classpath:spring/ehcache.xml</prop>
-				<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory
+				<prop key="hibernate.cache.provider_configuration_file_resource_path">classpath:spring/hibernate-redis.properties</prop>
+				<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.redis.hibernate4.SingletonRedisRegionFactory
 				</prop>
+                <prop key="hibernate.cache.region_prefix">hibernate</prop>
 				<prop key="hibernate.cache.use_query_cache">true</prop>
 				<prop key="hibernate.cache.use_second_level_cache">true</prop>
 				<prop key="hibernate.generate_statistics">true</prop>

+ 26 - 0
src/main/resources/spring/hibernate-redis.properties

@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2017. Sunghyouk Bae <sunghyouk.bae@gmail.com>
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+redisson-config=classpath:${profile}/redisson.yaml
+#
+# Cache Expiry settings
+# 'hibernate' is second cache prefix
+# 'common', 'account' is actual region name
+#
+# default = 120 seconds (2 minutes) (see RedisCacheUtil.DEFAULT_EXPIRY_IN_SECONDS)
+#
+redis.expiryInSeconds.default=120
+redis.expiryInSeconds.hibernate.common=0
+redis.expiryInSeconds.hibernate.com.uas.platform.b2c.model.User=10

+ 27 - 0
src/main/resources/test/redisson.yaml

@@ -0,0 +1,27 @@
+# redisson configuration for redis servers
+# see : https://github.com/mrniko/redisson/wiki/2.-Configuration
+
+singleServerConfig:
+  idleConnectionTimeout: 10000
+  pingTimeout: 1000
+  connectTimeout: 1000
+  timeout: 1000
+  retryAttempts: 3
+  retryInterval: 1000
+  reconnectionTimeout: 3000
+  failedAttempts: 3
+  password: null
+  subscriptionsPerConnection: 5
+  clientName: null
+  address: ["redis://192.168.253.6:6379"]
+  subscriptionConnectionMinimumIdleSize: 1
+  subscriptionConnectionPoolSize: 25
+  connectionMinimumIdleSize: 5
+  connectionPoolSize: 100
+  database: 0
+  dnsMonitoring: false
+  dnsMonitoringInterval: 5000
+threads: 0
+codec: !<org.redisson.codec.SnappyCodec> {}
+useLinuxNativeEpoll: false
+eventLoopGroup: null

+ 28 - 0
src/main/webapp/resources/css/pay.css

@@ -167,6 +167,34 @@
     margin: 0 auto;
     display: inline-block;
     padding-right: 14px;
+    position:relative;
+}
+.down-payment .pay-price .aside_info{
+    position:absolute;
+    bottom:-50px;
+    left:20px;
+    width:600px;
+}
+.down-payment .pay-price .aside_info p{
+    font-size: 16px;
+    color:#1da902;
+    line-height: 26px;
+    margin-bottom:10px;
+}
+.down-payment .pay-price .aside_info p a{
+    background: #5078cb;
+    color: #fff;
+    width: 70px;
+    height: 30px;
+    display: inline-block;
+    text-align: center;
+    line-height: 30px;
+    font-size: 14px;
+    margin: 0 5px;
+}
+.down-payment .pay-price .aside_info p small{
+    color:#666;
+    margin-left:20px;
 }
 .down-payment .pay-price div.row{
     font-size: 16px;

+ 3 - 3
src/main/webapp/resources/js/common/directives.js

@@ -793,8 +793,8 @@ define(['angular', 'showdown', 'angular-toaster'], function(angular) {
 				if (config.maxSize === 3145728) {
           alert('上传图片的大小不能超过3M')
         } else {
-          alert('上传pdf的大小不能超过20M')
-				}
+				alert('上传pdf的大小不能超过20M')
+			}
 				//toaster.pop('error', '上传图片的大小不能超过3M');
 				return;
 			}
@@ -864,7 +864,7 @@ define(['angular', 'showdown', 'angular-toaster'], function(angular) {
           element.append('<input type=file class=uploadImage style=display:none; accept=image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf />');
 				} else {
           element.append("<input type='file' class='uploadImage' style='display:none;' accept='.pdf' />");
-        }
+			}
 				var uploadImage = $(element).find('.uploadImage');
 
 				uploadImage.change(function () {

+ 13 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_invoice_ctrl.js

@@ -237,8 +237,21 @@ define(['app/app'], function(app) {
             this.form.$setPristine();
             this.form.$setUntouched();
         }
+        function _deepCopy(target) {
+            if (typeof target !== 'object') return
+            // 判断目标类型,来创建返回值
+            var newObj = target instanceof Array ? [] : {}
+            for (var item in target) {
+                // 只复制元素自身的属性,不复制原型链上的
+                if (target.hasOwnProperty(item)) {
+                    newObj[item] = typeof target[item] === 'object' ? _deepCopy(target[item]) : target[item]
+                }
+            }
+            return newObj
+        }
         //修改发票
         $scope.modifyInvoice = function (invoice) {
+            invoice = _deepCopy(invoice)
             $scope.changeBillStatusFlag = true;
             $scope.isAdd = false;
             $scope.billType = invoice.kind

+ 106 - 94
src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js

@@ -3,7 +3,7 @@
  *  订单付款的界面
  */
 define(['app/app'], function(app) {
-	app.register.controller('orderPayCtrl', ['$scope', '$rootScope', '$stateParams', '$modal', '$state', 'Bill', 'toaster', 'Order', '$filter', 'ShippingAddress', 'Ysepay', '$q', 'NumberService', 'Cart', '$timeout', 'DistributionRule', 'TakeSelf', 'StoreInfo', function($scope, $rootScope, $stateParams, $modal, $state, Bill, toaster, Order, $filter, ShippingAddress, Ysepay, $q, NumberService, Cart, $timeout, DistributionRule, TakeSelf, StoreInfo) {
+	app.register.controller('orderPayCtrl', ['$scope', '$rootScope', '$stateParams', '$modal', '$state', 'Bill', 'toaster', 'Order', '$filter', 'ShippingAddress', 'Ysepay', '$q', 'NumberService', 'Cart', '$timeout', 'DistributionRule', 'TakeSelf', 'StoreInfo', 'AuthenticationService', function($scope, $rootScope, $stateParams, $modal, $state, Bill, toaster, Order, $filter, ShippingAddress, Ysepay, $q, NumberService, Cart, $timeout, DistributionRule, TakeSelf, StoreInfo, AuthenticationService) {
         $scope.userInfo = $rootScope.userInfo;
 		document.title = '结算页-优软商城';
 		$rootScope.active = 'buyer_cart';
@@ -599,100 +599,112 @@ define(['app/app'], function(app) {
 
 		//确认付款
 		$scope.imperfect = false;//暂不完善
+		var doComfirmPay = function () {
+			// 安全级别
+			if (!$scope.userInfo.pwdEnable || !$scope.userInfo.haveUserQuestion||!$scope.userInfo.emailValidCode || $scope.userInfo.emailValidCode != 2) {
+				$scope.openHomeCenterModel();
+			} else {
+				if($scope.order.status == 502 || $scope.order.status == 503) {
+					var arr = [];
+					if($scope.order.orderids) {
+						arr = $scope.order.orderids.split(",");
+					}else {
+						arr.push($scope.order.orderid);
+					}
+					if ($scope.order.currency == 'RMB' && $scope.order.paytype == '1102') {
+						paymentEnsure(arr);
+					} else if($scope.order.paytype == '1103') {
+						$state.go('order_transfer', {orderid : enIdFilter(arr.join("-"))});
+					}else {
+						toaster.pop('info', '美元请线下付款');
+					}
+					return ;
+				}
+				var validRule = checkRule();
+				if (!validRule){
+					toaster.pop("info", "当前地址部分卖家无法配送,请重新选择地址或与卖家协商处理");
+					return ;
+				}
+				var validTakeSelf = checkTakeSelf();
+				if (!validTakeSelf){
+					toaster.pop("info", "请选择一个自提点");
+					return ;
+				}
+				var orderInfos = [], orderInfo;
+				orderInfo = generateOrderInfo();
+				if(orderInfo == null) {
+					return ;
+				}
+				orderInfos.push(orderInfo);
+				if(!$scope.imperfect){
+					var validBill = checkBill();
+					if (!validBill){
+						// toaster.pop('info', '请完善专票信息');
+						$scope.showBillFrame = true;
+						return ;
+					}
+				}
+
+				Order.ensure({orderid: enIdFilter($scope.order.orderid)}, orderInfos, function(data){
+					if(data.code == 1) {
+						if (data.data && data.data[0]) {
+							var arr = [];
+							var batchCodes = [];
+							for(var i = 0; i < data.data.length; i++) {
+								arr.push(data.data[i].orderid);
+								for(var j = 0; j < data.data[i].orderDetails.length; j++) {
+									batchCodes.push(data.data[i].orderDetails[j].batchCode);
+								}
+							}
+							if(!$scope.order.buyNow) {
+								Cart.deleteByBatchCode({}, batchCodes, function(data) {
+								}, function(response) {
+								});
+							}
+							if ($scope.order.currency == 'RMB' && $scope.order.paytype == '1102') {
+								paymentEnsure(arr);
+							} else if($scope.order.paytype == '1103') {
+								console.log(arr.length)
+								if(arr.length != 1){
+									$state.go('downPayment', {orderid : enIdFilter(arr.join('-'))});
+								}else {
+									$state.go('order_transfer', {orderid : enIdFilter(arr.join('-'))});
+								}
+							}else {
+								toaster.pop('info', '美元请线下付款');
+								$state.go('buyer_order');
+							}
+
+						}
+					}else {
+						if(data.code == 6) { //产品信息有更新
+							toaster.pop('warning', data.message + ",请刷新界面之后重新操作");
+						}else if(data.code == 7){
+							toaster.pop('warning', data.message + ",将为您跳转到购物车界面");
+							$timeout(function () {
+								$state.go('buyer_cart');
+							}, 1000);
+						}else {
+							toaster.pop('warning', data.message);
+						}
+					}
+
+				}, function(response) {
+					toaster.pop('error', '确认订单失败,' + response.data);
+				});
+			}
+		}
 		$scope.confirmPay = function() {
-            // 安全级别
-            if (!$scope.userInfo.pwdEnable || !$scope.userInfo.haveUserQuestion||!$scope.userInfo.emailValidCode || $scope.userInfo.emailValidCode != 2) {
-                $scope.openHomeCenterModel();
-            } else {
-                if($scope.order.status == 502 || $scope.order.status == 503) {
-                    var arr = [];
-                    if($scope.order.orderids) {
-                        arr = $scope.order.orderids.split(",");
-                    }else {
-                        arr.push($scope.order.orderid);
-                    }
-                    if ($scope.order.currency == 'RMB' && $scope.order.paytype == '1102') {
-                        paymentEnsure(arr);
-                    } else if($scope.order.paytype == '1103') {
-                        $state.go('order_transfer', {orderid : enIdFilter(arr.join("-"))});
-                    }else {
-                        toaster.pop('info', '美元请线下付款');
-                    }
-                    return ;
-                }
-                var validRule = checkRule();
-                if (!validRule){
-                    toaster.pop("info", "当前地址部分卖家无法配送,请重新选择地址或与卖家协商处理");
-                    return ;
-                }
-                var validTakeSelf = checkTakeSelf();
-                if (!validTakeSelf){
-                    toaster.pop("info", "请选择一个自提点");
-                    return ;
-                }
-                var orderInfos = [], orderInfo;
-                orderInfo = generateOrderInfo();
-                if(orderInfo == null) {
-                    return ;
-                }
-                orderInfos.push(orderInfo);
-                if(!$scope.imperfect){
-                    var validBill = checkBill();
-                    if (!validBill){
-                        // toaster.pop('info', '请完善专票信息');
-                        $scope.showBillFrame = true;
-                        return ;
-                    }
-                }
-
-                Order.ensure({orderid: enIdFilter($scope.order.orderid)}, orderInfos, function(data){
-                    if(data.code == 1) {
-                        if (data.data && data.data[0]) {
-                            var arr = [];
-                            var batchCodes = [];
-                            for(var i = 0; i < data.data.length; i++) {
-                                arr.push(data.data[i].orderid);
-                                for(var j = 0; j < data.data[i].orderDetails.length; j++) {
-                                    batchCodes.push(data.data[i].orderDetails[j].batchCode);
-                                }
-                            }
-                            if(!$scope.order.buyNow) {
-                                Cart.deleteByBatchCode({}, batchCodes, function(data) {
-                                }, function(response) {
-                                });
-                            }
-                            if ($scope.order.currency == 'RMB' && $scope.order.paytype == '1102') {
-                                paymentEnsure(arr);
-                            } else if($scope.order.paytype == '1103') {
-                                console.log(arr.length)
-                                if(arr.length != 1){
-                                    $state.go('downPayment', {orderid : enIdFilter(arr.join('-'))});
-                                }else {
-                                    $state.go('order_transfer', {orderid : enIdFilter(arr.join('-'))});
-                                }
-                            }else {
-                                toaster.pop('info', '美元请线下付款');
-                                $state.go('buyer_order');
-                            }
-
-                        }
-                    }else {
-                        if(data.code == 6) { //产品信息有更新
-                            toaster.pop('warning', data.message + ",请刷新界面之后重新操作");
-                        }else if(data.code == 7){
-                            toaster.pop('warning', data.message + ",将为您跳转到购物车界面");
-                            $timeout(function () {
-                                $state.go('buyer_cart');
-                            }, 1000);
-                        }else {
-                            toaster.pop('warning', data.message);
-                        }
-                    }
-
-                }, function(response) {
-                    toaster.pop('error', '确认订单失败,' + response.data);
-                });
-            }
+			if ($scope.userInfo) {
+				doComfirmPay();
+			} else {
+				AuthenticationService.getAuthentication().success(function (data) {
+					$scope.userInfo = data;
+					doComfirmPay();
+				}).error(function (err) {
+					toaster.pop('error', err || '获取登录信息失败,请刷新页面后重试');
+				})
+			}
 		};
 
 		// 跳银盛支付页面

+ 5 - 5
src/main/webapp/resources/js/vendor/app.js

@@ -703,11 +703,11 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 				});
 				$rootScope.userInfo = data;
 				if ($location.$$path === '/index') {
-					if ($rootScope.applyStatus === 'NONE') {
-						$state.go('vendor_store_apply');
-					} else if ($rootScope.applyStatus === 'PASS') {
-						$state.go('vendor_store_maintain');
-					}
+					// if ($rootScope.applyStatus === 'NONE') {
+					// 	$state.go('vendor_store_apply');
+					// } else if ($rootScope.applyStatus === 'PASS') {
+						$state.go('vendorSeekPurchase');
+					// }
 				}
                 // 是否pcb
                 StoreInfo.isPcb({enuu: $rootScope.userInfo.enterprise.uu}, function (res) {

+ 2 - 2
src/main/webapp/resources/view/usercenter/forstore/buyer_invoice.html

@@ -502,8 +502,8 @@
     <div class="ticket_record oder">
         <div class="oder01">
             <ul ng-class="{'active': changeBillStatusFlag}">
-                <li ng-class="{'active': tab == 'buyer_invoice' && !changeBillStatusFlag}"><a ng-click="changeBillStatusFlag = false" ui-sref="buyer_invoice">票信息</a></li>
-                <li ng-class="{'active': tab == 'buyer_no_invoice'}"><a ui-sref="buyer_no_invoice">未开票</a></li>
+                <li ng-class="{'active': tab == 'buyer_invoice' && !changeBillStatusFlag}"><a ng-click="changeBillStatusFlag = false" ui-sref="buyer_invoice">票信息</a></li>
+                <li ng-class="{'active': tab == 'buyer_no_invoice'}"><a ui-sref="buyer_no_invoice">待开票订单</a></li>
                 <li ng-class="{'active': tab == 'buyer_invoice-record'}"><a ui-sref="buyer_invoice-record">开票记录</a></li>
             </ul>
         </div>

+ 25 - 18
src/main/webapp/resources/view/usercenter/forstore/buyer_invoice_record.html

@@ -17,6 +17,7 @@
         border: #dae5fd 1px solid;
         border-bottom: none;
         margin-bottom: 0!important;
+        table-layout: fixed;
     }
     .invoice-com-tab thead{
         height: 40px;
@@ -42,6 +43,9 @@
         height: 50px;
         vertical-align: middle;
         text-align: center;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
     }
     .invoice-com-tab tbody>tr>td a.invoice-detail{
         display: block;
@@ -169,8 +173,8 @@
     <div class="ticket_record oder">
         <div class="oder01">
             <ul>
-                <li ng-class="{'active': tab == 'buyer_invoice'}"><a ui-sref="buyer_invoice">票信息</a></li>
-                <li ng-class="{'active': tab == 'buyer_no_invoice'}"><a ui-sref="buyer_no_invoice">未开票</a></li>
+                <li ng-class="{'active': tab == 'buyer_invoice'}"><a ui-sref="buyer_invoice">票信息</a></li>
+                <li ng-class="{'active': tab == 'buyer_no_invoice'}"><a ui-sref="buyer_no_invoice">待开票订单</a></li>
                 <li ng-class="{'active': tab == 'buyer_invoice-record'}"><a ui-sref="buyer_invoice-record">开票记录</a></li>
             </ul>
         </div>
@@ -186,21 +190,21 @@
                 <table class="invoice-com-tab table" ng-table="billRecordTableParam">
                     <thead>
                         <tr>
-                            <th width="88">申请时间</th>
-                            <th width="130">商家名称</th>
-                            <th width="80">订单号</th>
-                            <th width="105">可开票金额(¥)</th>
-                            <th width="55" class="select-line">
+                            <th width="100">申请时间</th>
+                            <th width="140">商家名称</th>
+                            <th width="190">订单号</th>
+                            <th width="120">可开票金额(¥)</th>
+                            <th width="60" class="select-line">
                                 <select class="select-adder form-control" ng-model="invoiceType" ng-change="changeInvoiceType(invoiceType)">
                                     <option value="">类型</option>
                                     <option value="1206">普票</option>
                                     <option value="1205">专票</option>
                                 </select>
                             </th>
-                            <th width="100">发票抬头</th>
-                            <th width="50">收票人</th>
-                            <th width="55">联系电话</th>
-                            <th width="55">
+                            <th width="115">发票抬头</th>
+                            <th width="65">收票人</th>
+                            <th width="120">联系电话</th>
+                            <th width="90">
                                 <select class="select-adder form-control" style="width: 60px;" ng-model="status" ng-change="changeStatus(status)">
                                     <option value="">状态</option>
                                     <option value="101">待开票</option>
@@ -211,19 +215,22 @@
                     </thead>
                     <tbody>
                         <tr ng-repeat="item in billData">
-                            <td ng-bind="item.createTime | date : 'yyyy-MM-dd'"></td>
-                            <td><a ng-href="{{'store/' + item.storeid}}" ng-bind="item.sellername" target="_blank"></a></td>
+                            <td ng-bind="item.createTime | date : 'yyyy-MM-dd'" title="{{item.createTime | date : 'yyyy-MM-dd'}}"></td>
+                            <td><a ng-href="{{'store/' + item.storeid}}" ng-bind="item.sellername" target="_blank" title="{{item.sellername}}"></a></td>
                             <td>
-                                <a ng-href="user#/order/detail/{{orderid | EncryptionFilter}}" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid" target="_blank" class="invoice-detail"></a>
+                                <a ng-href="user#/order/detail/{{orderid | EncryptionFilter}}"
+                                   ng-repeat="orderid in item.orderids.split(',')"
+                                   ng-bind="orderid"
+                                   title='{{orderid}}' target="_blank" class="invoice-detail"></a>
                             </td>
-                            <td ng-bind="item.price"></td>
+                            <td ng-bind="item.price" title="{{item.price}}"></td>
                             <td style="padding: 0;">
                                 <span ng-bind="item.invoicetype==1206?'普票':'专票'"></span>
                                 <b ng-click="lookInvoiceInfo(item)" class="invoice-info">开票信息</b>
                             </td>
-                            <td ng-bind="item.invoicetitle"></td>
-                            <td ng-bind="item.receiverName"></td>
-                            <td ng-bind="item.recTel"></td>
+                            <td ng-bind="item.invoicetitle" title="{{item.invoicetitle}}"></td>
+                            <td ng-bind="item.receiverName" title="{{item.receiverName}}"></td>
+                            <td ng-bind="item.recTel" title="{{item.recTel}}"></td>
                             <td>
                                 <span ng-bind="item.status==101?'待开票':'已开票'" ng-class="{'blue':item.status==101}"></span>
                             </td>

+ 2 - 2
src/main/webapp/resources/view/usercenter/forstore/buyer_no_invoice.html

@@ -215,8 +215,8 @@ body div.ng-table-pager a.page-a {
     <div class="ticket_record oder">
         <div class="oder01">
             <ul>
-                <li ng-class="{'active': tab == 'buyer_invoice'}"><a ui-sref="buyer_invoice">票信息</a></li>
-                <li ng-class="{'active': tab == 'buyer_no_invoice'}"><a ui-sref="buyer_no_invoice">未开票</a></li>
+                <li ng-class="{'active': tab == 'buyer_invoice'}"><a ui-sref="buyer_invoice">票信息</a></li>
+                <li ng-class="{'active': tab == 'buyer_no_invoice'}"><a ui-sref="buyer_no_invoice">待开票订单</a></li>
                 <li ng-class="{'active': tab == 'buyer_invoice-record'}"><a ui-sref="buyer_invoice-record">开票记录</a></li>
             </ul>
         </div>

+ 5 - 1
src/main/webapp/resources/view/usercenter/forstore/buyer_order.html

@@ -15,6 +15,9 @@
 
 	.oder .oder_list dl span.wd03{
 		width: 12%;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
 	}
 	.oder .oder_list dl span{
 		width: 16%;
@@ -912,7 +915,8 @@
 									类目:<a href="product/kind/{{::detail.kindUuid}}" target="_blank" ng-if="detail.uuid"><em ng-bind="::detail.kiName || '-'" title="{{::detail.kiName}}"></em></a><br ng-if="detail.uuid"/>
 									<a class="unstand" ng-if="!detail.uuid"><em ng-bind="detail.kiName || '-'" title="{{::detail.kiName}}"></em></a><br ng-if="!detail.uuid"/>
 									型号:<a href="store/productDetail/{{::detail.batchCode}}" target="_blank"><em ng-bind="::detail.cmpCode || '-'" title="{{::detail.cmpCode}}"></em></a>
-									<a  class="unstand" ng-if="!detail.uuid"><em ng-bind="detail.brName || '-'" title="{{::detail.brName}}"></em></a><br/>
+									<br/>
+									<!--<a  class="unstand" ng-if="!detail.uuid"><em ng-bind="detail.brName || '-'" title="{{::detail.brName}}"></em></a><br/>-->
 									规格:<a><em ng-bind="::detail.spec || '-'" title="{{::detail.spec}}"></em></a><br/>
 								</p>
 							</div>

+ 8 - 1
src/main/webapp/resources/view/usercenter/forstore/buyer_transfer.html

@@ -75,7 +75,7 @@
 					</li>
 				</ul>
 			</div>
-			<div class="common-title margin-top-8">水单扫描件</div>
+			<div class="common-title margin-top-8">付款水单扫描件</div>
 			<div class="payment-upload-list" ng-if="type == 'PAIDTOVENDOR' && yesPayinstallmentDetails.length > 0">
 				<div class="item" ng-repeat="installmentImg in yesPayinstallmentDetails">
 					<div class="img-list">
@@ -174,6 +174,13 @@
 					<a ng-click="loadPage()" class="off">取消</a>
 				</div>
 			</div>
+			<div class="aside_info">
+				<p>
+					<img src="static/img/user/bulb.png">
+					若需卖家调整价格,请先和卖家联系后请点击<a href="user#/order">待改价</a>按钮。
+				</p>
+				<p><small>(卖家调整价格完成后,您可以在【买家中心-采购订单】继续完成订单付款)</small></p>
+			</div>
 		</div>
 	</div>
 </div>

+ 28 - 21
src/main/webapp/resources/view/vendor/forstore/vendor-invoice.html

@@ -61,11 +61,11 @@
         text-align: center;
     }
     .invoice-com-tab tbody>tr>td a.link-order{
-        cursor: default;
         display: block;
+        cursor: pointer;
     }
     .invoice-com-tab tbody>tr>td:hover a.link-order{
-        color: #666;
+        color: #5078cb;
     }
     .invoice-com-tab tbody>tr:hover>td b.invoice-info{
         display: block;
@@ -77,6 +77,11 @@
         color: #5078cb;
         cursor: pointer;
     }
+    .invoice-com tbody>tr>td{
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
     /*无记录与记录条数*/
     .table>tbody>tr.record-num td{
         padding: 0;
@@ -304,7 +309,7 @@
     <div class="count_center">
         <div class="com_tab">
             <ul class="fl">
-                <li ng-class="{'active': active == 'apply_invoice'}" ng-click="toggleTab('apply_invoice')"><a>开票申请</a></li>
+                <li ng-class="{'active': active == 'apply_invoice'}" ng-click="toggleTab('apply_invoice')"><a>买家开票申请</a></li>
                 <li ng-class="{'active': active == 'apply_record'}" ng-click="toggleTab('apply_record')"><a>开票记录</a></li>
             </ul>
         </div>
@@ -359,8 +364,9 @@
                         </td>
                         <td ng-bind="item.createTime | date : 'yyyy-MM-dd'"></td>
                         <td>
-                            <!--<a ng-href="vendor#/purchase/detail/{{orderid | EncryptionFilter}}" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid"></a>-->
-                            <a ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid" class="link-order"></a>
+                             <span ng-repeat="(col, orderid) in item.orderids.split(',')">
+                            <a ng-href="vendor#/purchase/detail/{{item.purchaseids.split(',')[col] | EncryptionFilter}}" ng-bind="orderid" target="_blank" class="link-order"></a>
+                        </span>
                         </td>
                         <td ng-bind="item.price"></td>
                         <td style="padding: 0;">
@@ -401,43 +407,44 @@
             </div>
         </div>
         <div class="vendor-invoice-content">
-            <table class="invoice-com-tab table" ng-table="billRecordTableParam">
+            <table class="invoice-com-tab table invoice-com" ng-table="billRecordTableParam" style="table-layout: fixed;">
                 <thead>
                 <tr>
-                    <th width="70">申请时间</th>
-                    <th width="90">订单号</th>
-                    <th width="90">开票金额(¥)</th>
-                    <th width="55" class="select-line">
+                    <th width="90">申请时间</th>
+                    <th width="185">订单号</th>
+                    <th width="110">开票金额(¥)</th>
+                    <th width="60" class="select-line">
                         <select class="select-adder form-control" style="position: relative;left: 6px;" ng-change="billTypeSearch(billType)" ng-model="billType">
                             <option value="1">类型</option>
                             <option value="2">普票</option>
                             <option value="3">专票</option>
                         </select>
                     </th>
-                    <th width="120">发票抬头</th>
-                    <th width="50">收票人</th>
-                    <th width="160">收票地址</th>
-                    <th width="50">联系电话</th>
+                    <th width="145">发票抬头</th>
+                    <th width="70">收票人</th>
+                    <th width="205">收票地址</th>
+                    <th width="125">联系电话</th>
                 </tr>
                 </thead>
                 <tbody>
                 <tr ng-repeat="item in billData track by $index">
-                    <td ng-bind="item.createTime | date : 'yyyy-MM-dd'"></td>
+                    <td ng-bind="item.createTime | date : 'yyyy-MM-dd'" title="{{item.createTime | date : 'yyyy-MM-dd'}}"></td>
                     <td>
-                        <!--<a ng-href="vendor#/purchase/detail/{{orderid | EncryptionFilter}}" ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid" target="_blank"></a>-->
-                        <a ng-repeat="orderid in item.orderids.split(',')" ng-bind="orderid" class="link-order"></a>
+                        <span ng-repeat="(col, orderid) in item.orderids.split(',')">
+                            <a ng-href="vendor#/purchase/detail/{{item.purchaseids.split(',')[col] | EncryptionFilter}}" ng-bind="orderid" title="{{orderid}}" target="_blank" class="link-order"></a>
+                        </span>
                     </td>
-                    <td ng-bind="item.price"></td>
+                    <td ng-bind="item.price" title="{{item.price}}"></td>
                     <td style="padding: 0;">
                         <span ng-bind="item.invoicetype==1206?'普票':'专票'"></span>
                         <b ng-click="lookInvoiceInfo(item)" class="invoice-info">开票信息</b></td>
-                    <td ng-bind="item.invoicetitle"></td>
-                    <td ng-bind="item.receiverName"></td>
+                    <td ng-bind="item.invoicetitle" title="{{item.invoicetitle}}"></td>
+                    <td ng-bind="item.receiverName" title="{{item.receiverName}}"></td>
                     <td class="address" title="{{item.area+'&#10;'+item.detailAddr}}">
                         <p ng-bind="item.area"></p>
                         <p ng-bind="item.detailAddr"></p>
                     </td>
-                    <td ng-bind="item.recTel">13135015772</td>
+                    <td ng-bind="item.recTel" title="{{item.recTel}}">13135015772</td>
                 </tr>
                 <tr class="record-num" ng-if="billData && billData.length>0">
                     <td colspan="9">

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_delivery.html

@@ -312,7 +312,7 @@
         color: #e64040;
     }
     .oder_xq_list dl span.total-price strong {
-        width: 70px;
+        width: 86px;
         display: inline-block;
         float: left;
     }

+ 5 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_undercarriage.html

@@ -540,6 +540,9 @@
     .text-more-80 span.text-more{
         width: 50px;
     }
+    .text-more-80 span.text-more.text-over{
+        width: 40px;
+    }
     /*分页鼠标悬停效果*/
     .device .wanted_list01 a:hover {
         border-bottom: 1px solid #ddd!important;
@@ -714,11 +717,11 @@
                         <td>
                             <div class="text-more-80">
                                 <span>最小起订量:</span>
-                                <span ng-bind="commodity.minBuyQty" title="{{commodity.minBuyQty}}" class="text-more"></span>
+                                <span ng-bind="commodity.minBuyQty" title="{{commodity.minBuyQty}}" class="text-more text-over"></span>
                             </div>
                             <div class="text-more-80">
                                 <span>最小包装数:</span>
-                                <span ng-bind="commodity.minPackQty" title="{{commodity.minPackQty}}" class="text-more" style="width: 40px;"></span>
+                                <span ng-bind="commodity.minPackQty" title="{{commodity.minPackQty}}" class="text-more text-over"></span>
                             </div>
                             <div>
                                 <span ng-bind="((storeInfo.uuid != 'undefind')&&(commodity.storeid == storeInfo.uuid)&&(storeInfo.storeName.indexOf('优软测试二') < 0)&&(storeInfo.storeName.indexOf('优软商城') < 0)) ? '自营' : '寄售'">自营</span>

+ 6 - 4
src/main/webapp/resources/view/vendor/modal/invoice_look_modal.html

@@ -59,9 +59,9 @@
   .modal-body .item-list:first-child a:hover {
     color: #5078cb;
   }
-  .modal-body .item-list:first-child a.noOrder:hover{
-    color: #333;
-  }
+  /*.modal-body .item-list:first-child a.noOrder:hover{*/
+    /*color: #333;*/
+  /*}*/
   .modal-body .item-list:first-child a:nth-child(odd){
     margin-right: 22px;
   }
@@ -110,7 +110,9 @@
     <span>订单号:</span>
     <span>
       <a ng-if="isUserCenter" ng-href="user#/order/detail/{{orderid | EncryptionFilter}}" ng-repeat="orderid in chooseInvoice.orderids.split(',')" ng-bind="orderid || '-'" target="_blank">965666768973953454654</a>
-      <a ng-if="!isUserCenter" ng-repeat="orderid in chooseInvoice.orderids.split(',')" ng-bind="orderid || '-'" style="cursor: default;" class="noOrder">965666768973953454654</a>
+       <span  ng-if="!isUserCenter" ng-repeat="(col, orderid) in chooseInvoice.orderids.split(',')">
+         <a ng-href="vendor#/purchase/detail/{{chooseInvoice.purchaseids.split(',')[col] | EncryptionFilter}}" ng-bind="orderid" target="_blank" class="link-order"></a>
+       </span>
     </span>
   </div>
   <div class="item-list">

+ 5 - 0
src/test/java/com/uas/platform/b2c/DesTest.java

@@ -20,6 +20,11 @@ public class DesTest {
         prindHexString("jdbc:mysql://10.10.100.18:3306/mall_prod?characterEncoding=UTF-8");
         prindHexString("root");
         prindHexString("select");
+
+        // 预部署
+        prindHexString("jdbc:mysql://10.10.100.200:3306/mall_prod?characterEncoding=UTF-8&allowMultiQueries=true&rewriteBatchedStatements=true");
+        prindHexString("root");
+        prindHexString("select123***");
     }
 
     /**