瀏覽代碼

Merge branch 'feature-201846-wangcz' into dev

wangcz 7 年之前
父節點
當前提交
c605d8e302

+ 10 - 10
src/main/java/com/uas/platform/b2c/common/account/controller/UserController.java

@@ -29,7 +29,12 @@ import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.ui.ModelMap;
 import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
@@ -728,7 +733,7 @@ public class UserController {
 		} else {
 			HttpHeaders headers = new HttpHeaders();
 			headers.add("Content-Type", "application/text; charset=utf-8");
-			return new ResponseEntity<Boolean>(userService.isTelUseable(tel.replaceAll("\\s*", "")), headers,
+			return new ResponseEntity<>(userService.isTelUseable(tel.replaceAll("\\s*", "")), headers,
 					HttpStatus.OK);
 		}
 	}
@@ -741,14 +746,9 @@ public class UserController {
 	 */
 	@RequestMapping(value = "/emailEnable", method = RequestMethod.GET)
 	public ResponseEntity<Boolean> emailEnable(final String email) {
-		if (email == null) {
-			throw new IllegalOperatorException("邮箱不能为空");
-		} else {
-			HttpHeaders headers = new HttpHeaders();
-			headers.add("Content-Type", "application/text; charset=utf-8");
-			return new ResponseEntity<Boolean>(userService.isEmailUseable(email.replaceAll("\\s*", "")), headers,
-					HttpStatus.OK);
-		}
+		HttpHeaders headers = new HttpHeaders();
+		headers.add("Content-Type", "application/text; charset=utf-8");
+		return new ResponseEntity<>(Boolean.TRUE, headers, HttpStatus.OK);
 	}
 
 	/**

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

@@ -1,8 +1,19 @@
 package com.uas.platform.b2c.common.account.service.impl;
 
 import com.uas.message.mail.service.MailService;
-import com.uas.platform.b2c.common.account.dao.*;
-import com.uas.platform.b2c.common.account.model.*;
+import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
+import com.uas.platform.b2c.common.account.dao.ResourceItemDao;
+import com.uas.platform.b2c.common.account.dao.RoleDao;
+import com.uas.platform.b2c.common.account.dao.UserCacheEnterpriseDao;
+import com.uas.platform.b2c.common.account.dao.UserDao;
+import com.uas.platform.b2c.common.account.dao.UserLoginTimeDao;
+import com.uas.platform.b2c.common.account.model.Enterprise;
+import com.uas.platform.b2c.common.account.model.ResourceItem;
+import com.uas.platform.b2c.common.account.model.Role;
+import com.uas.platform.b2c.common.account.model.User;
+import com.uas.platform.b2c.common.account.model.UserCacheEnterprise;
+import com.uas.platform.b2c.common.account.model.UserInfo;
+import com.uas.platform.b2c.common.account.model.UserLoginTime;
 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;
@@ -30,7 +41,14 @@ import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 import javax.servlet.http.HttpServletRequest;
 import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
@@ -393,10 +411,6 @@ public class UserServiceImpl implements UserService {
 		if (users.size() > 0) {
 			throw new IllegalOperatorException("电话号码重复,建议输入您自己的手机号");
 		}
-		List<User> users2 = userDao.findUserByUserEmail(user.getUserEmail().trim());
-		if (users2.size() > 0) {
-			throw new IllegalOperatorException("邮箱地址重复,建议输入您自己的电子邮箱地址");
-		}
 		UserView userView = new UserView();
 		userView.setVipName(user.getUserName());
 		userView.setSex(user.getUserSex());

+ 0 - 3
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -2247,10 +2247,7 @@ public class ProductServiceImpl implements ProductService {
                             ps.setObject(23, t.getAttach());
                         }
                     });
-        } else {
-
         }
-
     }
 
     /**

+ 6 - 5
src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseProductServiceImpl.java

@@ -180,7 +180,7 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
             Integer assignNumber = 0;
             // 去重后的数据
             List<ReleaseProductByBatch> uniqueBatchList = releaseProductByBatchDao.findByRelbatchidAndReleaseCodeNot(userUU, batch, failCode);
-            System.out.println("处理后数据大小: " + uniqueBatchList.size());
+             LOGGER.info("处理后数据大小: " + uniqueBatchList.size());
             if (!CollectionUtils.isEmpty(uniqueBatchList)) {
                 assignNumber = assignBatch(uniqueBatchList);
             }
@@ -340,7 +340,7 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
      */
     private Integer assignBatch(List<ReleaseProductByBatch> uniqueBatchList) {
         Set<Long> idSet = getProductIdSet(uniqueBatchList);
-        System.out.println("获取的物料id数量: " + idSet.size());
+         LOGGER.info("获取的物料id数量: " + idSet.size());
         if (CollectionUtils.isNotEmpty(idSet)) {
             HashMap<String, Object> params = new HashMap<>(5);
             ModelMap data = new ModelMap();
@@ -370,11 +370,11 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
         List<String> productCodeList = new ArrayList<>();
         Set<Long> idSet = new HashSet<>();
         List<ReleaseProductByBatch> batchList = new ArrayList<>();
-        String importNum = createNumberService.getTimeNumber("products", 8, uniqueBatchList.size());
+        String importNum = createNumberService.getTimeNumber("trade$product_import_num", 8, uniqueBatchList.size());
         if (StringUtils.isEmpty(importNum)) {
             throw new IllegalOperatorException("生成批次号失败");
         }
-        String time = importNum.substring(IntegerConstant.NO_SHORT, (IntegerConstant.TIME_LENGTH));
+        String time = importNum.substring(IntegerConstant.NO_SHORT, IntegerConstant.TIME_LENGTH);
         final Integer[] num = {Integer.valueOf(importNum.substring(IntegerConstant.TIME_LENGTH))};
         uniqueBatchList.forEach(batch -> {
             if (null != batch.getProductid()) {
@@ -388,10 +388,11 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
                 batchList.add(batch);
             }
         });
+        LOGGER.info("新增物料数: " + batchList.size());
         // 新增到物料库
         productService.saveByJdbcTemplate(batchList);
         List<com.uas.platform.b2c.prod.commodity.model.Product> productList = productService.findProductIdAndProdnumsByProdNums(productCodeList);
-        System.out.println("根据编号查询物料: " + productList.size());
+        LOGGER.info("根据编号查询物料: " + productList.size());
         List<ProductPrivate> privateList = new ArrayList<>();
         productList.forEach(product -> {
             ProductPrivate productPrivate = new ProductPrivate(product.getId());

+ 16 - 0
src/main/webapp/resources/js/usercenter/controllers/b2b/fa/arCheck.js

@@ -341,6 +341,14 @@
                                   }
                               })
                               list.thisMonthDoneCount = _MonthDoneCountArr
+
+                              var _apCheckAmounts = []
+                              list.apCheckAmounts && list.apCheckAmounts.forEach(function(item) {
+                                  if (item.amount > 0) {
+                                      _apCheckAmounts.push(item)
+                                  }
+                              })
+                              list.apCheckAmounts = _apCheckAmounts
                           })
                           if (page) {
                               params.total(page.totalElement);
@@ -629,6 +637,14 @@
                           })
                           data.thisMonthDoneCount = _MonthDoneCountArr
 
+                          var _apCheckAmounts = []
+                          data.apCheckAmounts && data.apCheckAmounts.forEach(function(item) {
+                              if (item.amount > 0) {
+                                  _apCheckAmounts.push(item)
+                              }
+                          })
+                          data.apCheckAmounts = _apCheckAmounts
+
                           $scope.dataInfo = data
                           $scope.data = data.details;
                           $scope.checkboxes.checked = true;

+ 17 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/apCheck.js

@@ -129,6 +129,14 @@ define(['app/app'], function (app) {
                               }
                           })
                           list.thisMonthDoneCount = _MonthDoneCountArr
+
+                          var _apCheckAmounts = []
+                          list.apCheckAmounts && list.apCheckAmounts.forEach(function(item) {
+                              if (item.amount > 0) {
+                                  _apCheckAmounts.push(item)
+                              }
+                          })
+                          list.apCheckAmounts = _apCheckAmounts
                       })
                       if (page) {
                           params.total(page.totalElement);
@@ -426,6 +434,15 @@ define(['app/app'], function (app) {
                       })
                       data.thisMonthDoneCount = _MonthDoneCountArr
 
+
+                      var _apCheckAmounts = []
+                      data.apCheckAmounts && data.apCheckAmounts.forEach(function(item) {
+                          if (item.amount > 0) {
+                              _apCheckAmounts.push(item)
+                          }
+                      })
+                      data.apCheckAmounts = _apCheckAmounts
+
                       $scope.dataInfo = data
                       $scope.data = data.details;
                       $scope.checkboxes.checked = true;

+ 6 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/seek_purchase_ctrl.js

@@ -433,7 +433,8 @@ define(['app/app'], function (app) {
 
 
           $scope.onLeadtimeInput = function () {
-            var time = $scope.inquiryItem.leadtime.toString();
+            $scope.inquiryItem.leadtime= $scope.inquiryItem.leadtime.replace(/[^\d]*/g, '');
+            var time = $scope.inquiryItem.leadtime;
             if (time.length > 3) {
               $scope.inquiryItem.leadtime = Number(time.substring(0, 3));
             }
@@ -450,7 +451,8 @@ define(['app/app'], function (app) {
           };
 
           $scope.onTaxrateInput = function () {
-              var time = $scope.inquiryItem.taxrate.replace(/[^\-?\d.]/g, '');
+              $scope.inquiryItem.taxrate = $scope.inquiryItem.taxrate.replace(/[^\d]*/g, '');
+              var time = $scope.inquiryItem.taxrate;
               if (time.length > 2) {
                   $scope.inquiryItem.taxrate = Number(time.substring(0, 2));
               }
@@ -511,6 +513,7 @@ define(['app/app'], function (app) {
             }
           }
           $scope.onReplyLapQtyInput = function (index) {
+              $scope.inquiryItem.replies[index].lapQty = $scope.inquiryItem.replies[index].lapQty.replace(/[^\d]*/g, '')
             var lapQty =  $scope.inquiryItem.replies[index].lapQty.toString();
             if (lapQty.length >= 10) {
               $scope.inquiryItem.replies[index].lapQty = Number(lapQty.substring(0, 9));
@@ -530,6 +533,7 @@ define(['app/app'], function (app) {
           }
 
           $scope.onReplyPriceInput = function (index) {
+              $scope.inquiryItem.replies[index].price = $scope.inquiryItem.replies[index].price.replace(/[^\d.]*/g, '')
             var price = $scope.inquiryItem.replies[index].price.toString();
             if (price >= 10000) {
               $scope.inquiryItem.replies[index].price = Number(price.substring(0, 4));

+ 3 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_apply_ctrl.js

@@ -70,6 +70,9 @@ define(['app/app', 'jquery-uploadify'], function (app) {
 							if (result.qualifications) {
 								angular.forEach(result.qualifications, function (qualification) {
 									$scope.qualifications[qualification.type] = qualification;
+									if (isPdf(qualification.resourceUrl)) {
+                                        $scope.qualifications[qualification.type].isPdf = true
+									}
 								});
 							}else {
 								Enterprise.getEnterpriseDetailInfo({ enuu : enterprise.uu},{},function (enterpriseDetail) {

+ 0 - 1
src/main/webapp/resources/view/sso/staffManagement.html

@@ -973,7 +973,6 @@
                         </td>
                         <td ng-class="{'has-error': userEmailError, 'has-success': userEmailSuccess}">
                             <input ng-model="newUser.userEmail" ng-pattern="/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/"
-                                   ng-blur="emailValid(newUser.userEmail)" required
                                    name="newUserEmail" type="text"
                                    placeholder="邮箱">
                         </td>

+ 33 - 11
src/main/webapp/resources/view/usercenter/b2b/fa/arCheck.html

@@ -733,11 +733,12 @@
 
         <thead ng-show="active === 'all'">
         <tr class="header">
-          <th width="200">应付供应商名称</th>
-          <th width="170">本月应付</th>
-          <th width="170">本月未对</th>
-          <th width="170">本月已对</th>
-          <th width="170">应付总额</th>
+          <th width="180">应付供应商名称</th>
+          <th width="140">本月应付</th>
+          <th width="140">本月未对</th>
+          <th width="140">本月已对</th>
+          <!--<th width="140">本月已付</th>-->
+          <th width="140">应付总额</th>
           <th width="80">操作</th>
         </tr>
         </thead>
@@ -765,6 +766,13 @@
           </td>
           <td ng-if="check.thisMonthDoneCount.length === 0">-</td>
 
+          <!--<td ng-if="check.apCheckAmounts.length > 0">-->
+            <!--<div ng-repeat="count in check.apCheckAmounts">-->
+              <!--<span ng-if="count.amount > 0">{{count.currency}}:{{count.amount | number:2}}</span>-->
+            <!--</div>-->
+          <!--</td>-->
+          <!--<td ng-if="check.apCheckAmounts.length === 0">-</td>-->
+
           <td ng-if="check.totalCount.length > 0">
             <div ng-repeat="count in check.totalCount">
               <span ng-if="count.amount > 0">{{count.currency}}:{{count.amount | number:2}}</span>
@@ -836,28 +844,42 @@
           </div>
 
           <div style="text-align: left;margin-top: 20px">
-            <label>本期间对总额:</label>
+            <label>本期间对总额:</label>
             <label style="text-align:left;vertical-align: top;">
-              <div ng-if="dataInfo.thisMonthDoneCount.length > 0" ng-repeat="count in dataInfo.thisMonthDoneCount">
+              <div ng-if="dataInfo.thisMonthTodoCount.length > 0" ng-repeat="count in dataInfo.thisMonthTodoCount">
                 <span>{{count.currency}}:{{count.amount | number:2}}</span>
               </div>
-              <div ng-if="dataInfo.thisMonthDoneCount.length === 0">
+              <div ng-if="dataInfo.thisMonthTodoCount.length === 0">
                 0
               </div>
             </label>
           </div>
+
           <div style="text-align: left;margin-top: 20px">
-            <label>本期间对总额:</label>
+            <label>本期间对总额:</label>
             <label style="text-align:left;vertical-align: top;">
-              <div ng-if="dataInfo.thisMonthTodoCount.length > 0" ng-repeat="count in dataInfo.thisMonthTodoCount">
+              <div ng-if="dataInfo.thisMonthDoneCount.length > 0" ng-repeat="count in dataInfo.thisMonthDoneCount">
                 <span>{{count.currency}}:{{count.amount | number:2}}</span>
               </div>
-              <div ng-if="dataInfo.thisMonthTodoCount.length === 0">
+              <div ng-if="dataInfo.thisMonthDoneCount.length === 0">
                 0
               </div>
             </label>
           </div>
 
+          <!--<div style="text-align: left;margin-top: 20px">-->
+            <!--<label>本期间已付总额:</label>-->
+            <!--<label style="text-align:left;vertical-align: top;">-->
+              <!--<div ng-if="dataInfo.thisMonthDoneCount.length > 0" ng-repeat="count in dataInfo.thisMonthDoneCount">-->
+                <!--<span>{{count.currency}}:{{count.amount | number:2}}</span>-->
+              <!--</div>-->
+              <!--<div ng-if="dataInfo.thisMonthDoneCount.length === 0">-->
+                <!--0-->
+              <!--</div>-->
+            <!--</label>-->
+          <!--</div>-->
+
+
           <div style="text-align: left;margin-top: 20px">
             <label>应付总额:</label>
             <label style="text-align:left;vertical-align: top;">

+ 31 - 12
src/main/webapp/resources/view/vendor/b2b/apCheck.html

@@ -732,12 +732,13 @@
 
         <thead ng-show="active === 'all'">
           <tr class="header">
-            <th width="200">客户名称</th>
-              <th width="170">本月应收</th>
-              <th width="170">本月未对</th>
-              <th width="170">本月已对</th>
-              <th width="170">应收总额</th>
-            <th width="80">操作</th>
+              <th width="180">客户名称</th>
+              <th width="140">本月应收</th>
+              <th width="140">本月未对</th>
+              <th width="140">本月已对</th>
+              <!--<th width="140">本月已收</th>-->
+              <th width="140">应收总额</th>
+              <th width="80">操作</th>
           </tr>
         </thead>
         <tbody ng-show="active === 'all'" ng-repeat="check in ALLList">
@@ -764,6 +765,13 @@
               </td>
               <td ng-if="check.thisMonthDoneCount.length === 0">-</td>
 
+              <!--<td ng-if="check.apCheckAmounts.length > 0">-->
+                  <!--<div ng-repeat="count in check.apCheckAmounts">-->
+                      <!--<span ng-if="count.amount > 0">{{count.currency}}:{{count.amount | number:2}}</span>-->
+                  <!--</div>-->
+              <!--</td>-->
+              <!--<td ng-if="check.apCheckAmounts.length === 0">-</td>-->
+
               <td ng-if="check.totalCount.length > 0">
                   <div ng-repeat="count in check.totalCount">
                       <span ng-if="count.amount > 0">{{count.currency}}:{{count.amount | number:2}}</span>
@@ -834,28 +842,39 @@
             </label>
         </div>
             <div style="text-align: left;margin-top: 20px">
-                <label>本期间对总额:</label>
+                <label>本期间对总额:</label>
                 <label style="text-align:left;vertical-align: top;">
-                    <div ng-if="dataInfo.thisMonthDoneCount.length > 0" ng-repeat="count in dataInfo.thisMonthDoneCount">
+                    <div ng-if="dataInfo.thisMonthTodoCount.length > 0" ng-repeat="count in dataInfo.thisMonthTodoCount">
                         <span>{{count.currency}}:{{count.amount | number:2}}</span>
                     </div>
-                    <div ng-if="dataInfo.thisMonthDoneCount.length === 0">
+                    <div ng-if="dataInfo.thisMonthTodoCount.length === 0">
                         0
                     </div>
                 </label>
             </div>
             <div style="text-align: left;margin-top: 20px">
-                <label>本期间对总额:</label>
+                <label>本期间对总额:</label>
                 <label style="text-align:left;vertical-align: top;">
-                    <div ng-if="dataInfo.thisMonthTodoCount.length > 0" ng-repeat="count in dataInfo.thisMonthTodoCount">
+                    <div ng-if="dataInfo.thisMonthDoneCount.length > 0" ng-repeat="count in dataInfo.thisMonthDoneCount">
                         <span>{{count.currency}}:{{count.amount | number:2}}</span>
                     </div>
-                    <div ng-if="dataInfo.thisMonthTodoCount.length === 0">
+                    <div ng-if="dataInfo.thisMonthDoneCount.length === 0">
                         0
                     </div>
                 </label>
             </div>
 
+            <!--<div style="text-align: left;margin-top: 20px">-->
+                <!--<label>本期间已收总额:</label>-->
+                <!--<label style="text-align:left;vertical-align: top;">-->
+                    <!--<div ng-if="dataInfo.thisMonthDoneCount.length > 0" ng-repeat="count in dataInfo.thisMonthDoneCount">-->
+                        <!--<span>{{count.currency}}:{{count.amount | number:2}}</span>-->
+                    <!--</div>-->
+                    <!--<div ng-if="dataInfo.thisMonthDoneCount.length === 0">-->
+                        <!--0-->
+                    <!--</div>-->
+                <!--</label>-->
+            <!--</div>-->
         <div style="text-align: left;margin-top: 20px">
             <label>应收总额:</label>
             <label style="text-align:left;vertical-align: top;">