Browse Source

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

yangc 7 years ago
parent
commit
9df1ac5269

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

@@ -75,7 +75,6 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import static com.uas.platform.b2c.core.utils.NumberUtil.fractionNumCeil;
-import static com.uas.platform.b2c.external.erp.commodity.util.ModelConverter.dateFormat;
 
 @Service
 public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchService {
@@ -342,11 +341,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
             }
 		}
 		if (!isAPerson && !isPcb) {
-			logger.info(String.format("%s 批次上架测试代码", dateFormat.format(new Date())));
-            System.err.println("批次上架测试代码");
 			String publish = publishByBatch(batch, isPcb);
 			modelMap.put("publish", publish);
-			System.err.println("批次上架测试代码");
 		}
 		modelMap.put("total", total);
 		modelMap.put("success", success);
@@ -1714,7 +1710,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	@Transactional
 	@Override
 	public String publishByBatch(String batch, boolean isPcb) {
-        System.err.println("测试信息的0" + "---------------------");
         if (StringUtils.isEmpty(batch)) {
             return "0";
         }
@@ -1723,7 +1718,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		if (CollectionUtils.isEmpty(releaseProductByBatchList)) {
 			return String.valueOf(IntegerConstant.NO_SHORT);
 		}
-		System.err.println("测试信息的1-1" + "---------------------");
 		Map<String, Object> map = convertProduct(releaseProductByBatchList, false, isPcb);
 		if (map == null || map.size() == 0) {
 			return "0";
@@ -1733,15 +1727,12 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			savePcbInfo(idSet, map);
 		}
 		Integer num = releaseToGoods(releaseProductByBatchList);
-		System.err.println("测试信息的1" + "---------------------");
 		String updateReleaseSql = "/*#mycat:db_type=master*/ update trade$releasebybatch set rel_releasecode = 101,rel_releasestatus = '已发布' where (rel_releasecode = 112 OR rel_releasecode = 113) and rel_batchid = '%s';";
 		final String updateRelease = String.format(updateReleaseSql, new Object[]{batch});
 		jdbcTemplate.execute(updateRelease);
-		System.err.println("测试信息的2" + "---------------------");
 		ArrayList<Long> list = new ArrayList<>();
 		list.addAll((Set<Long>)map.get("prIds"));
 		afterPublishToGoodsDo(list, (Set<Long>)map.get("reIds"), batch);
-		System.err.println("测试信息的3" + "---------------------");
 		return StringUtilB2C.getStr(num);
 	}
 
@@ -1840,7 +1831,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	}
 
 	private  Map<String, Object> convertProduct (List<ReleaseProductByBatch> releaseProductByBatchList, boolean isAPerson , boolean isPcb) {
-		System.err.println("测试信息的convertProduct1" + "---------------------");
 		if (CollectionUtils.isEmpty(releaseProductByBatchList)) {
 			return null;
 		}
@@ -1910,13 +1900,10 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				}
             }
 		}
-		System.err.println("测试信息的convertProduct 2" + "---------------------");
 		List<ReleaseProductByBatch> reList = new ArrayList<>();
 		if (productsfromRelease.size() != 0) {
-			System.err.println("需要插入的新的物料的信息" + productsfromRelease.size());
             productService.saveByJdbcTemplate(productsfromRelease);
 			List<Product> productes = productService.findProductIdAndProdnumsByProdNums(proNums);
-			System.err.println("获取到的新插入的信息" + productes.size());
 			for (Product producte : productes) {
 				ProductPrivate productPrivate = new ProductPrivate();
 				productPrivate.setB2cEnabled(IntegerConstant.YES_SHORT);
@@ -1934,15 +1921,12 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				}
 			}
 		}
-		System.err.println("测试信息的convertProduct 3" + "---------------------");
 		if (CollectionUtils.isNotEmpty(reList)) {
             udpatePridAndRrodnum(reList);
 		}
-		System.err.println("测试信息的convertProduct 4" + "---------------------");
 		if (CollectionUtils.isNotEmpty(productPrivates)) {
             commonDao.save(productPrivates, ProductPrivate.class);
 		}
-		System.err.println("测试信息的convertProduct 5" + "---------------------");
 		if (reIds.size() > 0) {
 			map.put("reIds", reIds);
 		}

+ 13 - 0
src/main/webapp/resources/js/common/directives/onFinishRender.js

@@ -0,0 +1,13 @@
+var app = angular.module('on.finish.render',[])
+app.directive('onFinishRender', function ($timeout) {
+  return {
+    restrict: 'A',
+    link: function (scope) {
+      if (scope.$last === true) {
+        $timeout(function () {
+          scope.$emit('ngRepeatFinished');
+        });
+      }
+    }
+  }
+})

+ 2 - 13
src/main/webapp/resources/js/vendor/app.js

@@ -1,4 +1,4 @@
-define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'common/query/brand', 'common/query/kind', 'common/query/component', 'common/query/goods', 'common/query/rate','common/query/cart', 'common/query/order', 'common/query/address', 'common/query/invoice', 'common/query/property', 'common/query/kindAdvice', 'common/query/propertyAdvice', 'common/query/return' , 'common/query/change', 'common/query/logistics', 'ui.router', 'ui-bootstrap', 'ui-form', 'ui-jquery','angular-toaster', 'ngDraggable', 'angular-sanitize', 'ngTable', 'dynamicInput', 'jquery-imagezoom', 'file-upload', 'file-upload-shim', 'common/query/urlencryption' , 'common/query/purchase', 'common/query/vendor', 'common/query/goods', 'common/query/bankTransfer', 'common/query/enterprise', 'common/query/bill', 'common/query/receipt', 'common/query/collection', 'common/query/express', 'common/query/bankInfo','common/query/charge', 'common/query/statistics', 'common/query/currency', 'jquery-chart', 'common/query/responseLogistics', 'common/query/goodsPrice', 'common/query/address' , 'common/query/search', 'common/query/urlencryption', 'common/query/releaseProInfo', 'common/query/makerDemand', 'common/query/afterSale', 'common/query/messageBoard', 'common/query/logistics', 'common/query/storeInfo', 'common/query/recommendation', 'common/query/user', 'common/query/logisticsPort', 'common/query/cms', 'common/query/material', 'common/query/storeCms', 'common/query/productImport', 'common/query/stockInOut', 'common/module/store_recommend_product', 'common/module/chat_web_module', 'common/query/standardPutOnAdmin', 'common/query/storeViolations', 'common/query/internalMessage', 'common/query/installments','common/query/product','common/query/seekPurchase','common/query/UASBatchPutOnProperty', 'common/query/authority', 'common/query/attendtion'], function(angularAMD) {
+define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'common/query/brand', 'common/query/kind', 'common/query/component', 'common/query/goods', 'common/query/rate','common/query/cart', 'common/query/order', 'common/query/address', 'common/query/invoice', 'common/query/property', 'common/query/kindAdvice', 'common/query/propertyAdvice', 'common/query/return' , 'common/query/change', 'common/query/logistics', 'ui.router', 'ui-bootstrap', 'ui-form', 'ui-jquery','angular-toaster', 'ngDraggable', 'angular-sanitize', 'ngTable', 'dynamicInput', 'jquery-imagezoom', 'file-upload', 'file-upload-shim', 'common/query/urlencryption' , 'common/query/purchase', 'common/query/vendor', 'common/query/goods', 'common/query/bankTransfer', 'common/query/enterprise', 'common/query/bill', 'common/query/receipt', 'common/query/collection', 'common/query/express', 'common/query/bankInfo','common/query/charge', 'common/query/statistics', 'common/query/currency', 'jquery-chart', 'common/query/responseLogistics', 'common/query/goodsPrice', 'common/query/address' , 'common/query/search', 'common/query/urlencryption', 'common/query/releaseProInfo', 'common/query/makerDemand', 'common/query/afterSale', 'common/query/messageBoard', 'common/query/logistics', 'common/query/storeInfo', 'common/query/recommendation', 'common/query/user', 'common/query/logisticsPort', 'common/query/cms', 'common/query/material', 'common/query/storeCms', 'common/query/productImport', 'common/query/stockInOut', 'common/module/store_recommend_product', 'common/module/chat_web_module', 'common/query/standardPutOnAdmin', 'common/query/storeViolations', 'common/query/internalMessage', 'common/query/installments','common/query/product','common/query/seekPurchase','common/query/UASBatchPutOnProperty', 'common/query/authority', 'common/query/attendtion', 'onFinishRender'], function(angularAMD) {
 	'use strict';
 	/**
 	 * 自定义Array对象的属性last 方法
@@ -9,18 +9,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 	};
 
 	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ng.local', 'ui.form', 'ui.jquery', 'toaster', 'ngDraggable', 'tool.directives', 'ngSanitize', 'common.query.kind', 'common.services', 'brandServices', 'componentServices', 'goodsServices',  'rateServices','cartServices', 'orderServices', 'addressServices', 'invoiceServices', 'common.query.propertyAdvice', 'propertyServices', 'returnServices' , 'changeServices',  'logisticsServices', 'common.query.kindAdvice', 'ngTable', 'ngDynamicInput', 'common.directives', 'angularFileUpload', 'urlencryptionServices', 'purchaseServices', 'vendorServices', 'goodsServices', 'bankTransfer', 'common.query.enterprise', 'billServices', 'receiptServices', 'collection', 'expressServices', 'bankInfo','Charge', 'statisticsServices', 'currencyService', 'responseLogisticsService', 'PriceServices', 'addressServices', 'searchService', 'urlencryptionServices', 'ReleaseProductByBatchService', 'makerDemand', 'afterSaleService', 'messageBoardServices', 'logisticsServices', 'table.directives', 'storeInfoServices', 'recommendation', 'common.query.user', 'logisticsPortService', 'cmsService', 'materialServices', 'StoreCmsServices', 'productImportModule', 'stockInOutModule', 'StoreCmsModule', 'WebChatModule', 'StandardPutOnAdminModule', 'StoreViolationsServices', 'internalMessageServices', 'installmentServices','common.query.product', 'ui.tour', 'seekPurchaseServices', 'UASBatchPutOnPropertyModule', 'authorityServices', 'AttendtionServices'])
-  app.directive('onFinishRender', function ($timeout) {
-    return {
-      restrict: 'A',
-      link: function (scope) {
-        if (scope.$last === true) {
-          $timeout(function () {
-            scope.$emit('ngRepeatFinished');
-          });
-        }
-      }
-    }
-  })
+
 	//初始化,启动时载入app
 	app.init = function() {
 		angularAMD.bootstrap(app);

+ 4 - 2
src/main/webapp/resources/js/vendor/main.js

@@ -28,7 +28,8 @@ require.config({
 		'file-upload-shim': 'lib/angular/angular-file-upload-shim.min',
 		'showdown' : 'lib/showdown/showdown.min',
 		'calendar': 'lib/calendar/calendar',
-		'big': 'lib/decimal/big.min'
+		'big': 'lib/decimal/big.min',
+    'onFinishRender' : 'js/common/directives/onFinishRender'
 	},
 	shim : {
 		'angular' : {
@@ -65,7 +66,8 @@ require.config({
 		},
 		'file-upload': ['angular', 'file-upload-shim'],
 		'calendar': ['jquery'],
-		'big' : ['jquery']
+		'big' : ['jquery'],
+		'onFinishRender': ['angular']
 	}
 });
 require([ 'app/app', 'common/controllers/commonCtrls' ], function(app) {