Forráskód Böngészése

Merge branch 'feature-201815-liusw' into dev

Administrator 7 éve
szülő
commit
ddc51b3d53

+ 1 - 0
src/main/java/com/uas/platform/b2c/external/erp/prod/service/impl/ProdServiceImpl.java

@@ -117,6 +117,7 @@ public class ProdServiceImpl implements ProdService {
             if (null == productPrivate) {
                 productPrivate = new ProductPrivate();
                 productPrivate.setPrId(prod.getPr_id());
+                productPrivate.setBatchCount(IntegerConstant.NO_SHORT);
             }
             productPrivate.setB2cEnabled(IntegerConstant.YES_SHORT);
             // 统计现在有多少在售信息

+ 15 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/model/V_ProductPrivate.java

@@ -290,6 +290,12 @@ public class V_ProductPrivate implements Serializable {
     @Column(name = "pr_erpdown")
     private String erpDown;
 
+    /**
+     * 规格书
+     */
+    @Column(name = "pr_attach")
+    private String attach;
+
     @Transient
     private ProductAttachSubmit productAttachSubmit;
 
@@ -638,4 +644,13 @@ public class V_ProductPrivate implements Serializable {
         this.productAttachSubmit = productAttachSubmit;
         return this;
     }
+
+    public String getAttach() {
+        return attach;
+    }
+
+    public V_ProductPrivate setAttach(String attach) {
+        this.attach = attach;
+        return this;
+    }
 }

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

@@ -1353,6 +1353,7 @@ public class GoodsServiceImpl implements GoodsService {
      * @TODO 各种检查
      * @MustBeDoneBefore 2016年4月25日11:54:00
      */
+    @Transactional
     @Override
     public ResultMap updateGoods(Goods goods) {
         Goods resultGoods = null;
@@ -1376,7 +1377,7 @@ public class GoodsServiceImpl implements GoodsService {
         }
         ResultMap resultMap = compareGoodsIfModifyProductInfo(goods, nowGoods);
         if (resultMap.getCode() == CodeType.OK.code()) {
-            em.refresh(nowGoods);
+            nowGoods = goodsDao.findByBatchCode(nowGoods.getBatchCode());
         } else if (resultMap.getCode() != CodeType.OK.code()) {
             return resultMap;
         }
@@ -1415,7 +1416,7 @@ public class GoodsServiceImpl implements GoodsService {
                 Product product = new Product();
                 product.setPbranden(goodsFromFore.getBrandNameEn());
                 product.setPcmpcode(goodsFromFore.getCode());
-                product.setId(goodsFromFore.getId());
+                product.setId(goodsFromFore.getProductid());
                 product.setKind(goodsFromFore.getKindNameCn());
                 product.setSpec(goodsFromFore.getSpec());
                 ResultMap resultMap = productService.updateProduct(FlexJsonUtils.toJson(product), null);
@@ -1863,7 +1864,7 @@ public class GoodsServiceImpl implements GoodsService {
 			uuids.add(nowGoods.getBatchCode());
 			recommendProductService.deleteProductsWhenSellerUpdateReserve(storeuuid, uuids);
 		} else {
-            recommendProductService.updateRecommendProductInfo(nowGoods);
+            // recommendProductService.updateRecommendProductInfo(nowGoods);
         }
 		return nowGoods;
 	}

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

@@ -279,7 +279,7 @@ public class ProductAttachServiceImpl implements ProductAttachService {
                     return ResultMap.success(auditSubmit(exsitedSubmit));
                     // 标准物料有规格书,返回两规格书
                 } else {
-                    return ResultMap.success(componentAttachNotNull(exsitedSubmit, component.getAttach()));
+                    return new ResultMap(CodeType.SAVED.code(), "匹配的标准物料已存在规格书", componentAttachNotNull(exsitedSubmit, component.getAttach()));
                 }
                 // 非标型号
             } else {
@@ -291,7 +291,7 @@ public class ProductAttachServiceImpl implements ProductAttachService {
                     productAttachSubmitDao.save(exsitedSubmit);
 
                     if (component.getAttach() != null) {
-                        return ResultMap.success(componentAttachNotNull(exsitedSubmit, component.getAttach()));
+                        return new ResultMap(CodeType.SAVED.code(), "匹配的标准物料已存在规格书", componentAttachNotNull(exsitedSubmit, component.getAttach()));
                     } else {
                         component = addComponent(exsitedSubmit, component.getId());
                         return ResultMap.success(auditSubmit(exsitedSubmit));
@@ -359,7 +359,7 @@ public class ProductAttachServiceImpl implements ProductAttachService {
      * @param attach
      * @return
      */
-    private Map<String, String> componentAttachNotNull(ProductAttachSubmit submit, String attach) {
+    private Object componentAttachNotNull(ProductAttachSubmit submit, String attach) {
         submit.setMallAttach(attach);
         productAttachSubmitDao.save(submit);
 

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

@@ -1976,6 +1976,7 @@ public class ProductServiceImpl implements ProductService {
                         } else {
                             //直接保存
                             Product product1 = productDao.save(persistProduct);
+                            goodsService.updateGoodsByProduct(product1);
                             return ResultMap.success(product1);
                         }
                     }
@@ -2101,6 +2102,7 @@ public class ProductServiceImpl implements ProductService {
         product.setCmpCode(component.getCode());
         product.setCmpImg(component.getImg());
         product.setCmpUuId(component.getUuid());
+        product.setStandard(IntegerConstant.YES_SHORT);
         if (!StringUtils.isEmpty(component.getAttach())) {
             List<ProductPrivate> privates = productPrivateDao.findByPrId(product.getId());
             if (CollectionUtils.isNotEmpty(privates)) {
@@ -2111,6 +2113,8 @@ public class ProductServiceImpl implements ProductService {
                 ProductPrivate productPrivate = new ProductPrivate();
                 productPrivate.setAttach(component.getAttach());
                 productPrivate.setPrId(product.getId());
+                productPrivate.setB2cEnabled(IntegerConstant.YES_SHORT);
+                productPrivate.setBatchCount(IntegerConstant.NO_SHORT);
                 productPrivateDao.save(productPrivate);
             }
         }
@@ -2146,6 +2150,8 @@ public class ProductServiceImpl implements ProductService {
                             ProductPrivate productPrivate = new ProductPrivate();
                             productPrivate.setAttach(component.getAttach());
                             productPrivate.setPrId(product.getId());
+                            productPrivate.setB2cEnabled(IntegerConstant.YES_SHORT);
+                            productPrivate.setBatchCount(IntegerConstant.NO_SHORT);
                             productPrivatelist.add(productPrivate);
                         }
                     }

+ 1 - 1
src/main/webapp/resources/js/admin/controllers/AuditRegulpicListCtrl.js

@@ -97,7 +97,7 @@ define([ 'app/app' ], function(app) {
     function passAudit(data, item) {
       console.log(data)
       // 是否需要打开规格书选择项
-      if (data.code === 1) {
+      if (data.code === 4) {
         openRegulChooseModal(data, item).then(function (data) {
           if (data.success) {
             toaster.pop('success', '操作成功')

+ 1 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_onSaleCtrl.js

@@ -1571,7 +1571,7 @@ define([ 'app/app' ], function(app) {
           });
           modalInstance.result.then(function (Regulpic) {
             if(Regulpic) {
-              commodity.Regulpic = Regulpic;
+              commodity.attach = Regulpic;
             }
           }, function() {
 

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

@@ -47,7 +47,7 @@
 		<li ng-class="{'active' : active == 'sso_security'}"><span ui-sref="ssoSecurity">安全设置</span></li>
 		<li ng-if="personage" ng-class="{'active' : active == 'sso_management'}"><span ui-sref="ssoManagement">员工管理</span></li>
 		<li ng-if="personage" ng-class="{'active' : active == 'sso_permission'}"><span ui-sref="ssoPermission">角色权限</span></li>
-		<li ng-if="isAdmin" ng-class="{'active' : active == 'sso_apply'}"><span ui-sref="ssoApplyBind">申请绑定</span></li>
+		<li ng-if="isAdmin" ng-class="{'active' : active == 'sso_apply'}"><span ui-sref="ssoApplyBind">绑定审核</span></li>
 		<li ng-class="{'active' : active == 'sso_address'}"><span ui-sref="ssoAddress">收货地址</span></li>
 		<!--<li ng-class="{'active' : active == 'vendor_logistics'}">-->
 			<!--<span  ui-sref="vendor_logistics" ng-hide="store && (!store.status || store.status === 'OPENED')">物流管理</span>-->

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

@@ -905,7 +905,7 @@
 <!--右侧主体部分-->
 <div class="count user_right fr" ng-click="hideList()">
       <!--申请绑定-->
-    <div class="rt_menu"><span>申请绑定</span></div>
+    <div class="rt_menu"><span>绑定审核</span></div>
     <div class="clearfix bind-en">
           <div class="rt_menu">
               <span class="pull-right"><input type="text" ng-model="searchParams.keyword" class="form-control" placeholder="用户名/UU账号/手机号"/><button class="btn" ng-click="searchApply()">搜索</button> </span></span>

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

@@ -2105,7 +2105,7 @@
 								<a href="{{material.productAttachSubmit.uploadAttach}}" target="_blank" ng-if="material.productAttachSubmit" class="Regulpica">
 									<span style="cursor: pointer;">
 										<img style="width:24px;height:26px;border: 0px" src="static/img/vendor/images/pdf.png"/>
-										<div style="position: relative;display: inline-block" class="ToforAdminLook">
+										<div style="position: relative;display: inline-block" class="ToforAdminLook" ng-if="">
 											<img src="static/img/vendor/images/fireinfo_icon.png" width="18" height="18" style="width:18px;height:18px;border: 0px;margin-left:5px;"/>
 											<div class="forAdminLook">待审核</div>
 										</div>

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

@@ -1920,7 +1920,7 @@
 								<a href="{{material.productAttachSubmit.uploadAttach}}" target="_blank" ng-if="material.productAttachSubmit" class="Regulpica">
 									<span style="cursor: pointer;">
 										<img style="width:24px;height:26px;border: 0px" src="static/img/vendor/images/pdf.png"/>
-										<div style="position: relative;display: inline-block" class="ToforAdminLook">
+										<div style="position: relative;display: inline-block" class="ToforAdminLook" ng-if="">
 											<img src="static/img/vendor/images/fireinfo_icon.png" width="18" height="18" style="width:18px;height:18px;border: 0px;margin-left:5px;"/>
 											<div class="forAdminLook">待审核</div>
 										</div>