Browse Source

Merge remote-tracking branch 'origin/release-201831-wangcz' into release-201831-wangcz

shenjj 7 years ago
parent
commit
67c9e89b63

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

@@ -1739,7 +1739,7 @@ public class ProductServiceImpl implements ProductService {
                     return new ResultMap(CodeType.NOT_EXiST, "数据库找不到对应的信息,请重新操作");
                 }
                 Product persistProduct = productDao.findOne(id);
-                if (productPrivate.getB2cEnabled() != IntegerConstant.YES_SHORT) {
+                if (IntegerConstant.NO_SHORT.equals(productPrivate.getB2cEnabled())) {
                     return new ResultMap(CodeType.NOT_PERMIT, "该物料商城未启用,不能操作");
                 }
                 persistProduct.setMinPackQty(product.getMinPackQty());
@@ -2447,7 +2447,7 @@ public class ProductServiceImpl implements ProductService {
             productInfo = productInfo.setByPrivate(existProducts.get(0));
             // 用户填写库存量是需要做对应的出入库。如果新填写的库存数大于原库存数,做入库。否则做出库。
             inOutbound = recordInventory(product, existProducts.get(0));
-            BeanUtils.copyProperties(product, productInfo, "id");
+            BeanUtils.copyProperties(product, productInfo, "id,standard");
         } else {
             // 物料不存在,新增操作
             productInfo = product;
@@ -2680,7 +2680,7 @@ public class ProductServiceImpl implements ProductService {
     private void bindToPerson(Product productInfo, Long userUU, Long enUU) {
         List<ProductPerson> productPersonList = productPersonDao.findByProductIdAndUserUU(productInfo.getId(), userUU);
         if (CollectionUtils.isEmpty(productPersonList)) {
-            ProductPerson productPerson = new ProductPerson(userUU, enUU, productInfo.getId());
+            ProductPerson productPerson = new ProductPerson(enUU, userUU, productInfo.getId());
             productPerson = productPersonDao.save(productPerson);
             logger.info("个人物料", "新增个人物料", "通过卖家中心单个物料上传绑定个人物料", productInfo.getProdNum(), productPerson.getId());
         }
@@ -2722,19 +2722,19 @@ public class ProductServiceImpl implements ProductService {
                 throw new IllegalOperatorException("第 " + errMsg.toString() + " 行价格未填写");
             }
         }
-        if (!StringUtils.isEmpty(goods.getQtyPrice())) {
+        if (!StringUtils.isEmpty(qtyPrices)) {
             if (CollectionUtils.isNotEmpty(goods.getOriginalPrices())) {
-                goods.getOriginalPrices().forEach(subPrice -> {
+                qtyPrices.forEach(qtyPrice -> {
                     // 分段数量不能超过最大数量
-                    Double endQty = NumberUtil.compare(subPrice.getEnd(), DoubleConstant.maxReserve) == 1 ? DoubleConstant.maxReserve : subPrice.getEnd();
-                    subPrice.setEnd(endQty);
-
-                    // 起始数量不能大于最小订购数
-                    Double startQty = NumberUtil.compare(minBuyQty, subPrice.getStart()) == 1 ? subPrice.getStart() : minBuyQty;
-                    subPrice.setStart(startQty);
+                    Double endQty = NumberUtil.compare(qtyPrice.getEnd(), DoubleConstant.maxReserve) == 1 ? DoubleConstant.maxReserve : qtyPrice.getEnd();
+                    qtyPrice.setEnd(endQty);
                 });
+
+                // 起始数量不能大于最小订购数
+                Double startQty = NumberUtil.compare(minBuyQty, qtyPrices.get(0).getStart()) == 1 ? qtyPrices.get(0).getStart() : minBuyQty;
+                qtyPrices.get(0).setStart(startQty);
             }
-            goods.setQtyPrice(JSON.toJSONString(goods.getOriginalPrices()));
+            goods.setQtyPrice(JSON.toJSONString(qtyPrices));
         }
         goodsService.setGoodsDefault(goods);
         boolean autoPublish = goods.getAutoPublish() == null ? true : goods.getAutoPublish();

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

@@ -2026,7 +2026,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		List<ProductPrivate> productPrivates = new ArrayList<>();
 		Set<Long> prIds = new HashSet<>();
 		//需要更新的规格、最小包数量、包装方式
-		Set<ReleaseProductByBatch> updateProducts = new HashSet<>();
 		Map<String, List<PCBPropertyValue>> propertyMap = new HashedMap();
 
         String importNum = createNumberService.getTimeNumber("trade$product_import_num", 8, releaseProductByBatchList.size());
@@ -2090,7 +2089,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		}
 		//保存新生成的物料私有字段
 		if (CollectionUtils.isNotEmpty(productPrivates)) {
-            commonDao.save(productPrivates, ProductPrivate.class);
+			commonDao.save(productPrivates, ProductPrivate.class);
+			productPrivateService.saveProductPrivates(productPrivates);
 		}
 		//将本次临时表中的数据更新到物料表中
 		productService.updateProductsByReleaseProductByBatch(prIds, releaseProductByBatchList, ignoreImport, newInOutboundDetail);

+ 1 - 1
src/main/webapp/resources/view/common/footer.html

@@ -130,7 +130,7 @@ a:hover {
 		<a href="http://www.fantem.com" target="_blank" title="丰唐物联技术(深圳)">丰唐物联技术(深圳)</a>|
 		<a href="http://www.hiways.com" target="_blank" title="深圳市海威思科技">深圳市海威思科技</a>|
 		<a href="http://www.huashangweitai.com" target="_blank" title="深圳市华商维泰显示科技">深圳市华商维泰显示科技</a>|
-		<a href="http://www.ufct.com.cn/" target="_blank" title="联合创泰科技">联合创泰科技</a>
+		<a href="http://www.ufct.com.cn/" target="_blank" title="联合创泰科技">联合创泰科技</a>|
 		<a href="http://www.hi-mantech.com/" target="_blank" title="怡海能达">怡海能达</a>
 	</div>
 	<ul class="list-unstyled footer-bottom">

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

@@ -907,7 +907,7 @@
     <div class="tab_top" style="margin-bottom: 16px;">
         <ul>
             <li ng-class="{active: tab == 'b2c'}" ng-click="setTab('b2c')"><a href="javascript:void(0)">商城角色</a></li>
-            <li ng-class="{active: tab == 'b2b'}" ng-click="setTab('b2b')"><a href="javascript:void(0)">b2b角色</a></li>
+            <li ng-class="{active: tab == 'b2b'}" ng-click="setTab('b2b')"><a href="javascript:void(0)">B2B角色</a></li>
         </ul>
     </div>
     <!--安全设置-->

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

@@ -1010,12 +1010,12 @@
                         <td class="edit-btn-area">
                             <!--<a class="operator-trigger" href="javascript:void(0);"><i class="fa fa-pencil fa-lg" ng-show="(userInfo.sys && enterprise.enAdminuu != user.userUU) || users.length == 1"></i></a>-->
                             <div ng-if="user.userUU != userInfo.userUU">  <!--&& enterprise.enAdminuu != user.userUU-->
-                                <span ng-click="addVendor(user)" title="客户分配">b2b客户分配</span>
+                                <span ng-click="addVendor(user)" title="客户分配">B2B客户分配</span>
                                 <span ng-click="editUserRole(user)" title="角色分配"><i></i>角色分配</span>
                                 <span ng-click="setShowDelUserFlag(true, user)" title="删除"><i></i>删除</span>
                             </div>
                             <div ng-if="user.userUU == userInfo.userUU">
-                                <span disabled="false" title="客户分配" style="color: #606168; cursor: not-allowed;"><i></i>b2b客户分配</span>
+                                <span disabled="false" title="客户分配" style="color: #606168; cursor: not-allowed;"><i></i>B2B客户分配</span>
                                 <span disabled="false" title="角色分配" style="color: #606168; cursor: not-allowed;"><i></i>角色分配</span>
                                 <span disabled="false" title="删除" style="color: #606168; cursor: not-allowed;"><i></i>删除</span>
                             </div>

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

@@ -1062,7 +1062,7 @@
 				<!--<li ng-class="{'active': tab == 'storage'}"><a ui-sref="vendor_storage">出入库</a></li>-->
 				<!--<li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架记录</a></li>-->
 				<!--<li ng-if="isPcbStore"><a ui-sref="vendor_upload">产品导入</a></li>-->
-				<!--<li ng-class="{'active': tab == 'B2b'}"><a ui-sref="sale_badOut">B2b客户出入库</a></li>-->
+				<!--<li ng-class="{'active': tab == 'B2b'}"><a ui-sref="sale_badOut">B2B客户出入库</a></li>-->
 			</ul>
 		</div>
 		<div class="com_tab com_tab2" ng-if="!isPcbStore" style="margin-bottom: 0px">

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

@@ -165,7 +165,7 @@
         <li ng-class="{'active': tab == 'storage'}"><a ui-sref="vendor_storage">出入库</a></li>
         <li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架记录</a></li>
         <li class="active"><a ui-sref="vendor_upload">产品导入</a></li>
-        <li ng-class="{'active': tab == 'B2b'}"><a ui-sref="sale_badOut">B2b客户出入库</a></li>
+        <li ng-class="{'active': tab == 'B2b'}"><a ui-sref="sale_badOut">B2B客户出入库</a></li>
       </ul>
     </div>
   </div>

+ 1 - 1
src/main/webapp/resources/view/vendor/modal/edit_user_role.html

@@ -179,7 +179,7 @@
 <div class="user-role-manage">
     <div class="user-role-header">
         <span ng-class="{active: tab == 'b2c'}" ng-click="switchTab('b2c')">商城角色</span>
-        <span ng-class="{active: tab == 'b2b'}" ng-click="switchTab('b2b')">b2b角色</span>
+        <span ng-class="{active: tab == 'b2b'}" ng-click="switchTab('b2b')">B2B角色</span>
         <button style=" padding-right:9px; " type="button" class="close" data-dismiss="alert" ng-click="cancelModal()" aria-label="Close">
             <span aria-hidden="true">×</span>
         </button>