Browse Source

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

shenjj 7 years ago
parent
commit
458acd0005

+ 1 - 1
src/main/java/com/uas/platform/b2c/common/message/service/InternalMessageService.java

@@ -25,7 +25,7 @@ public interface InternalMessageService {
      * @param status 状态
      * @return 消息数量
      */
-    Integer getCount(Long recuu, Long recEnuu, String recType, String status);
+    Integer  getCount(Long recuu, Long recEnuu, String recType, String status);
 
     /**
      * 分页获取消息 (用户)

+ 25 - 0
src/main/java/com/uas/platform/b2c/external/erp/order/api/OrderController.java

@@ -441,4 +441,29 @@ public class OrderController {
 		return orderService.findUserVenderByCode(orderid);
 	}
 
+	/**
+	 * 统计个人的订单金额(只包含520-405)
+	 * @param useruu 个人uu
+	 * @param enuu 企业uu
+	 * @param starttime 开始时间
+	 * @param endtime 结束时间
+	 * @return  ResultMap
+	 */
+	@RequestMapping(value = "/trading/volume/personal", method = RequestMethod.GET)
+	public ResultMap statisticsPersonTradingVolume(Long useruu, Long enuu, Long starttime, Long endtime) {
+		return orderService.statisticsPersonTradingVolume(useruu, enuu, starttime, endtime);
+	}
+
+	/**
+	 * 统计企业的订单金额总计 (只包含520-405)
+	 * @param enuu
+	 * @param starttime
+	 * @param endtime
+	 * @return ResultMap
+	 */
+	@RequestMapping(value = "/trading/volume", method = RequestMethod.GET)
+	public ResultMap statisticsEnterpriseTradingVolume(Long enuu, Long starttime, Long endtime) {
+		return orderService.statisticsEnterpriseTradingVolume(enuu, starttime, endtime);
+	}
+
 }

+ 3 - 0
src/main/java/com/uas/platform/b2c/logistics/service/impl/InvoiceServiceImpl.java

@@ -653,6 +653,9 @@ public class InvoiceServiceImpl implements InvoiceService {
             if (invoice == null) {
                 throw new IllegalOperatorException("没有传入有效的订单信息");
             }
+            if (invoice.getStatus().intValue() != Status.INBOUND.value()) {
+                return ResultMap.success("");
+            }
             User user = SystemSession.getUser();
             Long useruu = null;
             if (user == null) {

+ 1 - 3
src/main/java/com/uas/platform/b2c/prod/commodity/model/InOutboundDetail.java

@@ -3,8 +3,6 @@ package com.uas.platform.b2c.prod.commodity.model;
 import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.uas.platform.b2c.logistics.model.InvoiceDetail;
-import com.uas.platform.b2c.logistics.model.InvoiceFOrderDetail;
-import com.uas.platform.b2c.logistics.model.InvoiceFPurchaseDetail;
 import com.uas.platform.b2c.trade.order.model.PurchaseDetail;
 
 import javax.persistence.*;
@@ -286,7 +284,7 @@ public class InOutboundDetail implements Serializable {
         this.cmpuuid = detail.getUuid();
         this.spec = detail.getSpec();
         this.qty = detail.getQty();
-        this.price = detail.getPrice();
+        this.price = detail.getTaxUnitprice();
         this.productId = detail.getProductid();
         this.sourceid = detail.getId();
         this.currency = detail.getCurrency();

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

@@ -4030,21 +4030,9 @@ public class GoodsServiceImpl implements GoodsService {
                 goods.setMinPackQty(product.getMinPackQty());
                 goods.setPackaging(product.getPackaging());
                 goods.setMinBuyQty();
+                goods.setPerQty();
                 goods.adjustFragmentPrice();
-                if (goods.getAutoPublish() == null) {
-                    goods.setAutoPublish(Boolean.TRUE);
-                }
-                if (goods.getAutoPublish()) {
-                    if (StringUtils.isEmpty(goods.getPackaging()) || StringUtils.isEmpty(goods.getProduceDate()) || (goods.getMinBuyQty() == null) || (goods.getMinPackQty() == null) || (goods.getB2cMaxDelivery() == null) || (goods.getB2cMinDelivery() == null) || StringUtils.isEmpty(goods.getQtyPrice())) {
-                        //做未上架处理
-                        goods.setStatus(Status.NO_SHELVE.value());
-                    } else {
-                        //如果信息填写全,默认上架
-                        goods.setStatus((NumberUtil.compare(goods.getReserve(), goods.getMinBuyQty()) > -1) ? Status.AVAILABLE.value() : Status.UNAVAILABLE.value());
-                    }
-                } else {
-                    goods.setStatus(Status.NO_SHELVE.value());
-                }
+                goods.setStatus();
                 GoodsHistory history = goodsHistoryService.converTGoodsHist(goods, GoodsHistory.OperateType.Update.getPhrase(), false);
                 list.add(history);
             }

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

@@ -2219,9 +2219,9 @@ public class ProductServiceImpl implements ProductService {
         if (fromDate == null || toDate == null) {
             //统计所有的未审核的品牌信息
             Map<String, Integer> map = new HashedMap();
-            Integer productAmout = jdbcTemplate.queryForInt("select count(1) from products p left join product$private pp on p.pr_id = pp.pr_id  where pp.pr_b2cenabled = 1;");
+            Integer productAmout = jdbcTemplate.queryForInt("select count(1) from products p join product$private pp on p.pr_id = pp.pr_id  where pp.pr_b2cenabled = 1;");
             map.put("productAmout", productAmout);
-            Integer productUserAmout = jdbcTemplate.queryForInt("select count(DISTINCT pr_enuu) from products p left join product$private pp on p.pr_id = pp.pr_id  where pp.pr_b2cenabled = 1;");
+            Integer productUserAmout = jdbcTemplate.queryForInt("select count(DISTINCT pr_enuu) from products p join product$private pp on p.pr_id = pp.pr_id  where pp.pr_b2cenabled = 1;");
             map.put("productUserAmout", productUserAmout);
             return ResultMap.success(map);
         } else {
@@ -2229,9 +2229,9 @@ public class ProductServiceImpl implements ProductService {
             Date toT = new Date(toDate);
             SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
             Map<String, Integer> map = new HashedMap();
-            Integer productAmout = jdbcTemplate.queryForInt("select count(1) from products p left join product$private pp on p.pr_id = pp.pr_id  where pr_create_time < '" + dateFormat.format(toT) + "' and pr_create_time > '" + dateFormat.format(fromT) + "' and pp.pr_b2cenabled = 1;");
+            Integer productAmout = jdbcTemplate.queryForInt("select count(1) from products p join product$private pp on p.pr_id = pp.pr_id  where pr_create_time < '" + dateFormat.format(toT) + "' and pr_create_time > '" + dateFormat.format(fromT) + "' and pp.pr_b2cenabled = 1;");
             map.put("productAmout", productAmout);
-            Integer productUserAmout = jdbcTemplate.queryForInt("select count(DISTINCT pr_enuu) from products p left join product$private pp on p.pr_id = pp.pr_id  where pr_create_time < '" + dateFormat.format(toT) + "' and pr_create_time > '" + dateFormat.format(fromT) + "' and pp.pr_b2cenabled = 1;");
+            Integer productUserAmout = jdbcTemplate.queryForInt("select count(DISTINCT pr_enuu) from products p join product$private pp on p.pr_id = pp.pr_id  where pr_create_time < '" + dateFormat.format(toT) + "' and pr_create_time > '" + dateFormat.format(fromT) + "' and pp.pr_b2cenabled = 1;");
             map.put("productUserAmout", productUserAmout);
             return ResultMap.success(map);
         }

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

@@ -2020,6 +2020,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
                     proNums.add(prodNum);
                     productsfromRelease.add(releaseProductByBatch);
 				} else {
+					prodNum = releaseProductByBatch.getCode();
 					//对于已经存在于物料库的信息,如果规格信息已存在,则做更新
 					prIds.add(releaseProductByBatch.getProductid());
 				}

+ 0 - 25
src/main/java/com/uas/platform/b2c/trade/order/controller/OrderController.java

@@ -984,29 +984,4 @@ public class OrderController {
 	public ResultMap findInvoiceByIdAndInvoiceId(Long id, String invoiceid) {
 		return orderService.findInvoiceByIdAndInvoiceId(id, invoiceid);
 	}
-
-	/**
-	 * 统计个人的订单金额(只包含520-405)
-	 * @param useruu 个人uu
-	 * @param enuu 企业uu
-	 * @param starttime 开始时间
-	 * @param endtime 结束时间
-	 * @return  ResultMap
-	 */
-	@RequestMapping(value = "/trading/volume/personal", method = RequestMethod.GET)
-	public ResultMap statisticsPersonTradingVolume(Long useruu, Long enuu, Long starttime, Long endtime) {
-		return orderService.statisticsPersonTradingVolume(useruu, enuu, starttime, endtime);
-	}
-
-	/**
-	 * 统计企业的订单金额总计 (只包含520-405)
-	 * @param enuu
-	 * @param starttime
-	 * @param endtime
-	 * @return ResultMap
-	 */
-	@RequestMapping(value = "/trading/volume", method = RequestMethod.GET)
-	public ResultMap statisticsEnterpriseTradingVolume(Long enuu, Long starttime, Long endtime) {
-		return orderService.statisticsEnterpriseTradingVolume(enuu, starttime, endtime);
-	}
 }

+ 1 - 1
src/main/resources/dev/sys.properties

@@ -57,4 +57,4 @@ b2b=http://218.17.158.219/b2b_test
 b2bDomain=218.17.158.219:9000/b2b_test
 
 #lottery
-lottery=http://10.1.51.79:20000
+lottery=http://192.168.253.3:26789/

+ 1 - 1
src/main/resources/prod/sys.properties

@@ -60,4 +60,4 @@ b2bDomain=uas.ubtob.com
 b2bInner=http://10.10.100.103:8080
 
 #lottery
-lottery=http://10.1.51.79:20000
+lottery=http://192.168.253.3:26789

+ 1 - 1
src/main/resources/test/sys.properties

@@ -58,4 +58,4 @@ b2b=http://218.17.158.219/b2b_test
 b2bDomain=218.17.158.219:9000/b2b_test
 
 #lottery
-lottery=http://10.1.51.79:20000
+lottery=http://192.168.253.3:26789/

+ 1 - 0
src/main/webapp/WEB-INF/spring/webmvc.xml

@@ -105,6 +105,7 @@
 			<mvc:exclude-mapping path="/store/**" />
 			<mvc:exclude-mapping path="/providers/**" />
 			<mvc:exclude-mapping path="/api/**" />
+			<mvc:exclude-mapping path="/api/trade/trading/**" />
 			<mvc:exclude-mapping path="/search/**" />
 			<mvc:exclude-mapping path="/commonSearch/**" />
 			<mvc:exclude-mapping path="/help" />

+ 11 - 4
src/main/webapp/resources/js/usercenter/controllers/forstore/bomListDetailCtrl.js

@@ -24,8 +24,8 @@ define(['app/app'], function(app) {
             })
         }
         loadData();
-        var initIndex = function () {
-            angular.forEach($scope.bomData.seekPurchaseByBatchs, function (item, index) {
+        var initIndex = function (list) {
+            angular.forEach(list, function (item, index) {
                 item.$index = index;
             });
         }
@@ -241,9 +241,9 @@ define(['app/app'], function(app) {
                 isInBrandList: false,
                 amount: 0
             });
-            initIndex();
-            $scope.tmpEditBom = angular.copy($scope.bomData);
+            initIndex($scope.bomData.seekPurchaseByBatchs);
             $scope.setAllCheck(true);
+            $scope.tmpEditBom = angular.copy($scope.bomData);
         };
 
         // 打开日期选择框
@@ -501,5 +501,12 @@ define(['app/app'], function(app) {
             item.brand = brand;
             $scope.setShowSimilarList(item, 'showSimilarBrandList', false);
         }
+        $scope.deleteDetail = function ($index) {
+            $scope.bomData.seekPurchaseByBatchs.splice($index, 1);
+            $scope.tmpEditBom.seekPurchaseByBatchs.splice($index, 1);
+            initIndex($scope.bomData.seekPurchaseByBatchs);
+            initIndex($scope.tmpEditBom.seekPurchaseByBatchs);
+        }
+
     }]);
 });

+ 30 - 28
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_storageCtrl.js

@@ -90,8 +90,8 @@ define([ 'app/app' ], function(app) {
             $scope.type = $scope.storage_tab === 'inBound'? 'INBOUND' : 'OUTBOUND'
             $scope.selfSupport = $scope.storage_tab === 'inBound'? $scope.boundType.INBOUND : $scope.boundType.OUTBOUND;
             var currentTime = _getClearDay(new Date());
-            var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
-            $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
+            var endDate = currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000;
+            $scope.startDate = currentTime - 30 * 24 * 60 * 60 * 1000;
             $scope.endDate = endDate;
         };
         clearRecordParams();
@@ -126,7 +126,7 @@ define([ 'app/app' ], function(app) {
                 })
             } else {
                 for (var i = 0; i< $scope.countData; i++) {
-                    $scope.otherData.push({qty: '', id: '', price: '', key: '', show: false, newId: true})
+                    $scope.otherData.push({qty: '', id: '', price: '', key: '', erpReserve: '', show: false, newId: true})
                 }
             }
         }
@@ -163,15 +163,15 @@ define([ 'app/app' ], function(app) {
             if (type === 'dateArea') {
                 // 时间筛选
                 var currentTime = _getClearDay(new Date());
-                var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+                var endDate = currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000;
                 if (val === 'oneMonth') {
-                    $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
+                    $scope.startDate = currentTime - 30 * 24 * 60 * 60 * 1000;
                     $scope.endDate = endDate;
                 } else if (val === 'threeMonth') {
-                    $scope.startDate = new Date(currentTime - 3 * 30 * 24 * 60 * 60 * 1000);
+                    $scope.startDate = currentTime - 3 * 30 * 24 * 60 * 60 * 1000;
                     $scope.endDate = endDate;
                 } else if (val === 'sixMonth') {
-                    $scope.startDate = new Date(currentTime - 6 * 30 * 24 * 60 * 60 * 1000);
+                    $scope.startDate = currentTime - 6 * 30 * 24 * 60 * 60 * 1000;
                     $scope.endDate = endDate;
                 } else {
                     $scope.startDate = null;
@@ -203,21 +203,21 @@ define([ 'app/app' ], function(app) {
         };
 
         // 日期选择框选择时间显示
-        $scope.onDateCondition = function (bool) {
-          var startTime = $scope.startDate ? $scope.startDate.getTime() : null;
-          var endTime = $scope.endDate ? $scope.endDate.getTime() : null;
-          if (startTime && endTime && startTime > endTime) {
-              if (bool === 1) {
-                  toaster.pop('info', '起始时间不能大于结束时间')
-                  $scope.startDate = null;
-              } else {
-                  toaster.pop('info', '结束时间不能小于起始时间');
-                  $scope.endDate = null;
-              }
-          }
-          if ($scope.endDate && bool === 2) {
-              $scope.endDate = new Date($scope.endDate.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
-          }
+        $scope.onDateCondition = function (bool, autoStartDate, autoEndDate) {
+            $scope.startDate = autoStartDate ? autoStartDate.getTime() : null;
+            $scope.endDate = autoEndDate ? autoEndDate.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000 : null;
+            if ($scope.startDate && $scope.endDate && $scope.startDate > $scope.endDate) {
+                if (bool === 1) {
+                    toaster.pop('info', '起始时间不能大于结束时间')
+                    $scope.startDate = null;
+                } else {
+                    toaster.pop('info', '结束时间不能小于起始时间');
+                    $scope.endDate = null;
+                }
+            }
+            /*   if ($scope.endDate && bool === 2) {
+             $scope.endDate = $scope.endDate + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000;
+             }*/
             getLoadStorageData();
         };
 
@@ -250,11 +250,11 @@ define([ 'app/app' ], function(app) {
                     if($scope.storage_tab === 'outBound' && $scope.handleItem === 2) {
                         param.sorting = {"createtime":"DESC"};
                         param.status = '502-406';
-                        param.startMils = $scope.startDate ? $scope.startDate.getTime() : null;
-                        param.endMils = $scope.endDate ? $scope.endDate.getTime() : null;
+                        param.startMils = $scope.startDate;
+                        param.endMils = $scope.endDate;
                     } else {
-                        param.fromDate = $scope.startDate ? $scope.startDate.getTime() : null;
-                        param.toDate = $scope.endDate ? $scope.endDate.getTime() : null;
+                        param.fromDate = $scope.startDate;
+                        param.toDate = $scope.endDate;
                     }
                     if ($scope.handleItem !== 1) {
                         Goods[getUrl()](param, function(data) {
@@ -296,6 +296,7 @@ define([ 'app/app' ], function(app) {
                     val.spec = '';
                     val.qty = '';
                     val.price = '';
+                    val.erpReserve = '';
                 }
             })
         }
@@ -324,6 +325,7 @@ define([ 'app/app' ], function(app) {
                     type.spec = '';
                     type.qty = '';
                     type.price = '';
+                    type.erpReserve = '',
                     $scope.listData = [];
                     type.show = false;
                 } else {
@@ -353,10 +355,10 @@ define([ 'app/app' ], function(app) {
             if(type === 'clear') {
                 initOtherData()
             } else if(type === 'one') {
-                $scope.otherData.push({qty: '', id: '', price: '', key: '', show: false, newId: true});
+                $scope.otherData.push({qty: '', id: '', price: '', key: '', erpReserve: '', show: false, newId: true});
             } else if(type === 'ten') {
                 for (var i = 0; i< 10; i++) {
-                    $scope.otherData.push({qty: '', id: '', price: '', key: '', show: false, newId: true})
+                    $scope.otherData.push({qty: '', id: '', price: '', key: '', erpReserve: '', show: false, newId: true})
                 }
             }
         };

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

@@ -360,7 +360,7 @@
                     </div>
                 </td>
                 <td class="base-info pcs-line" style="position:relative;">
-                    <div class="content-clear" ng-if="!detail.id" ng-click="tmpEditBom.seekPurchaseByBatchs.splice(detail.$index, 1);bomData.seekPurchaseByBatchs.splice(detail.$index, 1)">
+                    <div class="content-clear" ng-if="!detail.id" ng-click="deleteDetail($index)">
                         <i class="fa fa-close"></i>
                     </div>
                     <div class="content-line">

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

@@ -1196,7 +1196,7 @@
                                current-text="今天" clear-text="清除" close-text="关闭"
                                datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
                                ng-click="openDatePicker($event, condition, 0,1)"
-                               ng-change="onDateCondition(1)"/>
+                               ng-change="onDateCondition(1, startDate, endDate)"/>
                         <button class="open" ng-click="openDatePicker($event, condition, 0)"></button>
                     </div>
 
@@ -1209,7 +1209,7 @@
                                current-text="今天" clear-text="清除" close-text="关闭"
                                datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
                                ng-click="openDatePicker($event, condition, 1, 2)"
-                               ng-change="onDateCondition(2)"/>
+                               ng-change="onDateCondition(2, startDate, endDate)"/>
                         <button class="open" ng-click="openDatePicker($event, condition, 1)"></button>
                     </div>
                 </div>