Parcourir la source

线下付款调整

hulh il y a 8 ans
Parent
commit
14a459d402

+ 29 - 0
src/main/java/com/uas/platform/b2c/fa/payment/dao/BankInfoDao.java

@@ -30,6 +30,15 @@ public interface BankInfoDao extends CrudRepository<BankInfo, Long>, JpaSpecific
 	@Query(value = "select b from BankInfo b where b.enuu =:enuu and b.type =:type and b.status =:status and b.opraterUserType=:opraterUserType order by num")
 	List<BankInfo> findByEnuuAndTypeAndStatusAndOpraterUserTypeOrderByNumAsc(@Param("enuu") Long enuu, @Param("type") Short type, @Param("status") Integer status, @Param("opraterUserType") Integer opraterUserType);
 
+	/**
+	 * 返回账户信息,兼容type版本
+	 * @param enuu
+	 * @param status
+	 * @param opraterUserType
+	 * @return
+	 */
+	List<BankInfo> findByEnuuAndStatusAndOpraterUserTypeOrderByNumAsc(Long enuu, Integer status, Integer opraterUserType);
+
 	/**
 	 * 根据下面参数获取企业账户信息
 	 * @param enuu 企业的enuu
@@ -52,6 +61,16 @@ public interface BankInfoDao extends CrudRepository<BankInfo, Long>, JpaSpecific
 	 */
 	List<BankInfo> findByUseruuAndEnuuAndTypeAndOpraterUserTypeAndStatusOrderByNumAsc(Long useruu, Long enuu, Short type, Integer opraterUserType, Integer Status);
 
+	/**
+	 * 返回账户信息,兼容原来type版本
+	 * @param useruu
+	 * @param enuu
+	 * @param opraterUserType
+	 * @param Status
+	 * @return
+	 */
+	List<BankInfo> findByUseruuAndEnuuAndOpraterUserTypeAndStatusOrderByNumAsc(Long useruu, Long enuu, Integer opraterUserType, Integer Status);
+
 	/**
 	 * 根据下面参数获取企业账户信息
 	 *
@@ -65,6 +84,16 @@ public interface BankInfoDao extends CrudRepository<BankInfo, Long>, JpaSpecific
 //	@Query("select b from BankInfo b  where b.useruu=:useruu and b.dissociative=:dissociative and b.type=:type and b.opraterUserType=:opraterUserType and b.status=:status")
 	List<BankInfo> findByUseruuAndDissociativeAndTypeAndOpraterUserTypeAndStatusOrderByNumAsc(Long useruu, Integer dissociative, Short type, Integer opraterUserType, Integer Status);
 
+	/**
+	 * 返回买家账户信息,兼容有type版本
+	 * @param useruu
+	 * @param dissociative
+	 * @param opraterUserType
+	 * @param Status
+	 * @return
+	 */
+	List<BankInfo> findByUseruuAndDissociativeAndOpraterUserTypeAndStatusOrderByNumAsc(Long useruu, Integer dissociative, Integer opraterUserType, Integer Status);
+
 	/**
 	 * 获取当前的个人账户数
 	 *

+ 4 - 3
src/main/java/com/uas/platform/b2c/fa/payment/service/impl/BankInfoServiceImpl.java

@@ -147,12 +147,13 @@ public class BankInfoServiceImpl implements BankInfoService {
 		}
 		if(operatorUserType == Type.BUYER.value()) {
 			if (enuu != null) {
-				return bankInfoDao.findByUseruuAndEnuuAndTypeAndOpraterUserTypeAndStatusOrderByNumAsc(SystemSession.getUser().getUserUU(), enuu, (short)2, operatorUserType, status);
+				return bankInfoDao.findByUseruuAndEnuuAndOpraterUserTypeAndStatusOrderByNumAsc(SystemSession.getUser().getUserUU(), enuu, operatorUserType, status);
+
 			} else {
-				return bankInfoDao.findByUseruuAndDissociativeAndTypeAndOpraterUserTypeAndStatusOrderByNumAsc(SystemSession.getUser().getUserUU(), Type.PERSONAL.value(), (short)2, operatorUserType, status);
+				return bankInfoDao.findByUseruuAndDissociativeAndOpraterUserTypeAndStatusOrderByNumAsc(SystemSession.getUser().getUserUU(), Type.PERSONAL.value(), operatorUserType, status);
 			}
 		}else {
-			return bankInfoDao.findByEnuuAndTypeAndStatusAndOpraterUserTypeOrderByNumAsc(enuu, (short)2, status, operatorUserType);
+			return bankInfoDao.findByEnuuAndStatusAndOpraterUserTypeOrderByNumAsc(enuu, status, operatorUserType);
 		}
 
 	}

+ 1 - 0
src/main/java/com/uas/platform/b2c/fa/payment/service/impl/BankTransferServiceImpl.java

@@ -267,6 +267,7 @@ public class BankTransferServiceImpl implements BankTransferService {
 		bankTransfer.setCollectenuu(sysConf.getEnUU()); // 收款方设置为B2C的uu
 		bankTransfer.setBanktranssn(EncodingRulesConstant.BANKTRANSFER.replace("_TIMESTAP_NUMBER", createNumberService.getTimeNumber("trade$bank_transfer", 8)));
 		bankTransfer.setTranferCreateTime(new Date());
+		bankTransfer.setTransferTime(new Date());
 		bankTransfer.setOperateType(Type.MALL.value());
 
 		BankTransfer saveBankTransfer = bankTransferDao.save(bankTransfer);

+ 60 - 60
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_transfer_ctrl.js

@@ -22,8 +22,6 @@ define([ 'app/app' ], function(app) {
 			$state.go('buyer_order');
 		}
 
-		$scope.purKind = $rootScope.userInfo.enterprises ? false : true;//应付账户的类别, 默认是企业
-		$scope.saleKind = false;//应收账户的类别,默认是企业
 		var ids=SessionService.get("ids");
 		
 		var page = Number(SessionService.get("page")) || 1;
@@ -169,27 +167,28 @@ define([ 'app/app' ], function(app) {
 		
 		//根据单选框的状态,提取不同的数据
 		var getBuyAccount = function() {
-			if(!$scope.purKind) {
-				bankInfoService.getBuyEnterpriseBank('', function(data) {
-					$scope.buyAccountInfos = resolveData(data);
-					angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
-						buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
-					});
-					$scope.buyAccount = getOriginalData($scope.buyAccountInfos);
-				}, function(error) {
-					toaster.pop('error', '错误', '提取企业账户信息失败');
-				});
-			}else {
-				bankInfoService.getBuyPersonalBank('', function(data) {
-					$scope.buyAccountInfos = resolveData(data);
-					angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
-						buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
-					});
-					$scope.buyAccount = getOriginalData($scope.buyAccountInfos);
-				}, function(error) {
-					toaster.pop('error', '错误', '提取个人账户信息失败');
+			bankInfoService.getBuyEnterpriseBank('', function(data) {
+				$scope.buyAccountInfos = resolveData(data);
+				angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
+					buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
 				});
-			}
+				$scope.buyAccount = getOriginalData($scope.buyAccountInfos);
+			}, function(error) {
+				toaster.pop('error', '错误', '提取企业账户信息失败');
+			});
+			// if(!$scope.purKind) {
+
+			// }else {
+			// 	bankInfoService.getBuyPersonalBank('', function(data) {
+			// 		$scope.buyAccountInfos = resolveData(data);
+			// 		angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
+			// 			buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
+			// 		});
+			// 		$scope.buyAccount = getOriginalData($scope.buyAccountInfos);
+			// 	}, function(error) {
+			// 		toaster.pop('error', '错误', '提取个人账户信息失败');
+			// 	});
+			// }
 		};
 		
 		//开始时,就获取账户信息
@@ -197,45 +196,46 @@ define([ 'app/app' ], function(app) {
 		
 		//获取管理平台账户信息
 		var getSellerAccount = function() {
-			if(!$scope.saleKind) {
-				bankInfoService.getAdminEnterAccount('', function(data) {
-					$scope.saleAccountInfos = resolveData(data);
-					angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
-						saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
-					});
-					$scope.saleAccount = getOriginalData($scope.saleAccountInfos);
-				}, function(res) {
-					toaster.pop('error', '错误', '获取卖家企业账户信息失败');
-				});
-			}else {
-				bankInfoService.getAdminPersAccount('', function(data) {
-					$scope.saleAccountInfos = resolveData(data);
-					angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
-						saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
-					});
-					$scope.saleAccount = getOriginalData($scope.saleAccountInfos);
-				}, function(res) {
-					toaster.pop('error', '错误', '获取卖家个人账户信息失败');
+			bankInfoService.getAdminEnterAccount('', function(data) {
+				$scope.saleAccountInfos = resolveData(data);
+				angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
+					saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
 				});
-			}
+				$scope.saleAccount = getOriginalData($scope.saleAccountInfos);
+			}, function(res) {
+				toaster.pop('error', '错误', '获取卖家企业账户信息失败');
+			});
+			// if(!$scope.saleKind) {
+
+			// }else {
+			// 	bankInfoService.getAdminPersAccount('', function(data) {
+			// 		$scope.saleAccountInfos = resolveData(data);
+			// 		angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
+			// 			saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
+			// 		});
+			// 		$scope.saleAccount = getOriginalData($scope.saleAccountInfos);
+			// 	}, function(res) {
+			// 		toaster.pop('error', '错误', '获取卖家个人账户信息失败');
+			// 	});
+			// }
 		}
 		
 		getSellerAccount();
 
-		$scope.set = function(data, isBuy) {
-			if(isBuy) {
-				if(!angular.equals($scope.purKind, data)) {
-					$scope.purKind = data;
-					getBuyAccount();
-				}
-			}else {
-				if(!angular.equals($scope.saleKind, data)) {
-					$scope.saleKind = data;
-					getSellerAccount();
-				}
-			}
-
-		};
+		// $scope.set = function(data, isBuy) {
+		// 	if(isBuy) {
+		// 		if(!angular.equals($scope.purKind, data)) {
+		// 			$scope.purKind = data;
+		// 			getBuyAccount();
+		// 		}
+		// 	}else {
+		// 		if(!angular.equals($scope.saleKind, data)) {
+		// 			$scope.saleKind = data;
+		// 			getSellerAccount();
+		// 		}
+		// 	}
+        //
+		// };
 		
 		// 搜索框内容转换成大写
 		var t;
@@ -393,10 +393,10 @@ define([ 'app/app' ], function(app) {
 				toaster.pop('info', '提示', '请选择卖家账户');
 				return ;
 			}
-			if(!$scope.transferTime) {
-				toaster.pop('info', '提示', '请选择付款日期');
-				return ;
-			}
+			// if(!$scope.transferTime) {
+			// 	toaster.pop('info', '提示', '请选择付款日期');
+			// 	return ;
+			// }
 			if(!$scope.imageUrl){
                 toaster.pop('info', '提示', '请选择付款截图');
                 return ;

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

@@ -740,7 +740,6 @@
 								<a href="user#/order/detail/{{order.orderid | EncryptionFilter}}" class="oder_d action-link" style="display: block;" target="_blank">订单详情</a>
 								<a class="action-link" href="user#/buyerQueryLogistics/{{order.orderid | EncryptionFilter}}" ng-if="order.status == 404 || order.status == 520 || order.status == 405 || order.status == 521" style="display: block;" target="_blank">查看物流</a>
 
-								<a class="action-link" href="user#/buyerQueryLogistics/{{order.orderid | EncryptionFilter}}" ng-if="order.status == 404" style="display: block;" target="_blank">查看物流</a>
 								<a ng-if="order.isEachRate && (order.rateStatus == 523 || order.rateStatus == 522)" class="oder_d action-link" target="_blank" href="user#/rate/showRate/{{order.orderid | EncryptionFilter}}" style="display: block;">
                                   双方已评
                               	</a>