Explorar o código

提交内容
1、代码提交;

Handy_Cao %!s(int64=4) %!d(string=hai) anos
pai
achega
c161168f86
Modificáronse 22 ficheiros con 50 adicións e 51 borrados
  1. 5 5
      MTP_iOS/MTP2_iOS/BusinessCore/Assets/Models/AssetsModels.swift
  2. 2 2
      MTP_iOS/MTP2_iOS/BusinessCore/Global/BaseManager.swift
  3. 3 3
      MTP_iOS/MTP2_iOS/BusinessCore/Goods/GoodsManager.swift
  4. 2 2
      MTP_iOS/MTP2_iOS/BusinessCore/Goods/Models/GoodsModels.swift
  5. 5 5
      MTP_iOS/MTP2_iOS/BusinessCore/Order/Models/OrderModels.swift
  6. 7 7
      MTP_iOS/MTP2_iOS/BusinessCore/Quote/Models/QuoteModels.swift
  7. 2 2
      MTP_iOS/MTP2_iOS/BusinessCore/Quote/QuoteAdapter.swift
  8. 1 1
      MTP_iOS/MTP2_iOS/BusinessCore/Quote/QuoteManager.swift
  9. 1 1
      MTP_iOS/MTP2_iOS/BusinessCore/Quote/QuoteSubscriptDelete.swift
  10. 2 2
      MTP_iOS/MTP2_iOS/BusinessCore/Quote/QuoteSubscriptManager.swift
  11. 2 2
      MTP_iOS/MTP2_iOS/BusinessCore/Resources/ProtocolBuffer/bidding.pb.swift
  12. 1 1
      MTP_iOS/MTP2_iOS/BusinessCore/Resources/ProtocolBuffer/settlement.pb.swift
  13. 1 1
      MTP_iOS/MTP2_iOS/Resource/ErrorCode.plist
  14. 1 1
      MTP_iOS/MTP2_iOS/Resource/Localizable/en.lproj/Localizable.strings
  15. 1 1
      MTP_iOS/MTP2_iOS/Resource/Localizable/zh-HK.lproj/Localizable.strings
  16. 1 1
      MTP_iOS/MTP2_iOS/Resource/Localizable/zh-Hans.lproj/Localizable.strings
  17. 2 3
      MTP_iOS/MTP2_iOS/UserInterface/Mine/MineViewController.swift
  18. 3 3
      MTP_iOS/MTP2_iOS/UserInterface/Mine/OutInMoney/InMoneyViewController.swift
  19. 1 1
      MTP_iOS/MTP2_iOS/UserInterface/Order/MyUnusedDetailViewController.swift
  20. 1 1
      MTP_iOS/MTP2_iOS/UserInterface/Order/PacketViewController.swift
  21. 5 5
      MTP_iOS/MTP2_iOS/UserInterface/Quote/GoodsDetailViewController.swift
  22. 1 1
      MTP_iOS/MTP2_iOS/UserInterface/Trade/TradeViewController.swift

+ 5 - 5
MTP_iOS/MTP2_iOS/BusinessCore/Assets/Models/AssetsModels.swift

@@ -24,7 +24,7 @@ class MoInnerOrderDetail: HandyJSON {
     var marketID = 0
     /// 商品ID
     var goodsID = 0
-    /// 商品代码
+    /// 商品编号
     var goodsCode = ""
     /// 商品名称
     var goodsName = ""
@@ -174,7 +174,7 @@ class MoInnerTradeDetail: HandyJSON {
     var accountID = 0
     /// 商品ID
     var goodsID = 0
-    /// 商品代码
+    /// 商品编号
     var goodsCode = ""
     /// 商品名称
     var goodsName = ""
@@ -247,7 +247,7 @@ class MoHisInnerTradeDetail: HandyJSON {
     var accountID = 0
     /// 商品ID
     var goodsID = 0
-    /// 商品代码
+    /// 商品编号
     var goodsCode = ""
     /// 商品名称
     var goodsName = ""
@@ -343,7 +343,7 @@ class MoInnerHolderDetail: HandyJSON {
     var marketID = 0
     /// 商品ID
     var goodsID = 0
-    /// 商品代码
+    /// 商品编号
     var goodsCode = ""
     /// 商品名称
     var goodsName = ""
@@ -396,7 +396,7 @@ class MoInnerHolderDetail: HandyJSON {
 
 /// 资管内部平仓明细
 class MoInnerCloseDetail: HandyJSON {
-    /// 商品代码
+    /// 商品编号
     var goodsCode = ""
     /// 商品名称
     var goodsName = ""

+ 2 - 2
MTP_iOS/MTP2_iOS/BusinessCore/Global/BaseManager.swift

@@ -24,8 +24,8 @@ class BaseManager {
     
     /// 获取所有商品
     ///
-    /// - Parameter goodsInfoCodes: 商品代码
-    /// - Returns: 所有商品代码
+    /// - Parameter goodsInfoCodes: 商品编号
+    /// - Returns: 所有商品编号
     func acquireGoods(goodsInfoCodes: [String]?) -> [String] {
         var goodsCodes = goodsInfoCodes
         if goodsCodes == nil {

+ 3 - 3
MTP_iOS/MTP2_iOS/BusinessCore/Goods/GoodsManager.swift

@@ -781,7 +781,7 @@ class GoodsManager: BaseManager {
     
     /// 添加用户藏品请求接口
     /// - Parameters:
-    ///   - goodsId: 商品代码
+    ///   - goodsId: 商品编号
     ///   - callback: 回调块
     func requestAddUserFavoriteGoods(_ goodsID: Int,
                                      callback: @escaping (_ isCompleted: Bool,
@@ -832,7 +832,7 @@ class GoodsManager: BaseManager {
     
     /// 移除用户商品收藏信息请求接口
     /// - Parameters:
-    ///   - goodsId: 商品代码
+    ///   - goodsId: 商品编号
     ///   - callback: 回调块
     func requestRemoveUserFavoriteGoods(_ goodsID: Int,
                                         callback: @escaping (_ isCompleted: Bool,
@@ -883,7 +883,7 @@ class GoodsManager: BaseManager {
         }
     }
     
-    /// 检索商品信息 说明:使用检索内容模糊匹配商品代码和商品名称
+    /// 检索商品信息 说明:使用检索内容模糊匹配商品编号和商品名称
     /// - Parameters:
     ///   - callback: 回调块
     ///   - string: 检索内容

+ 2 - 2
MTP_iOS/MTP2_iOS/BusinessCore/Goods/Models/GoodsModels.swift

@@ -73,7 +73,7 @@ class MoBaseMoGoods: HandyJSON {
     var currencysign = ""
     /// 报价小数位
     var decimalplace = 0
-    /// 商品代码(内部)
+    /// 商品编号(内部)
     var goodscode = ""
     /// 商品ID(自增ID SEQ_GOODS)
     var goodsid = 0
@@ -322,7 +322,7 @@ class MoMarketStatusChange: HandyJSON {
 
 /// 检索商品信息Mo类
 struct MoSearchGoods: HandyJSON {
-    /// 商品代码(内部)
+    /// 商品编号(内部)
     var goodscode: String = ""
     /// 商品ID(自增ID SEQ_GOODS)
     var goodsid: Int = 0

+ 5 - 5
MTP_iOS/MTP2_iOS/BusinessCore/Order/Models/OrderModels.swift

@@ -155,7 +155,7 @@ class MoPositionDetail: HandyJSON {
     var usedmargin = 0.0
     /// 商品名称
     var goodsname = ""
-    /// 商品代码
+    /// 商品编号
     var goodscode = ""
     /// 合约单位
     var agreeunit: Double = 0.0
@@ -402,7 +402,7 @@ class MoHisTaaccountLog: HandyJSON {
     var marketName = ""
     /// 商品
     var goodsName = ""
-    /// 商品代码
+    /// 商品编号
     var goodsCode = ""
     /// 操作类型名称,取数据库ENUMDICITEM表的值
     var operateTypeName = ""
@@ -428,7 +428,7 @@ class MoHsbyMyBuyOrderDetails: HandyJSON {
     var buyorsell: EOrderDirection = .ORDERDIRECTION_BUY
     /// 撤单数量
     var cancelqty = 0
-    /// 商品代码
+    /// 商品编号
     var goodscode = ""
     /// 货币符号
     var currencysign = ""
@@ -656,7 +656,7 @@ struct MoHsbyMyGoods: HandyJSON {
     var currencysign = ""
     /// 报价小数位
     var decimalplace = 0
-    /// 商品代码(内部)
+    /// 商品编号(内部)
     var goodscode = ""
     /// 商品Id
     var goodsid = 0
@@ -732,7 +732,7 @@ struct MoHsbyMyPackages: HandyJSON {
     var currencysign = ""
     /// 报价小数位
     var decimalplace = 0
-    /// 商品代码(内部)
+    /// 商品编号(内部)
     var goodscode = ""
     /// 商品ID
     var goodsid = 0

+ 7 - 7
MTP_iOS/MTP2_iOS/BusinessCore/Quote/Models/QuoteModels.swift

@@ -22,7 +22,7 @@ struct MoQuoteSubscriptGoodsInfo {
     var subState: UInt8 = 0
     /// 交易所代码, 目前2.0固定为250……
     var exchangeCode: UInt8 = UInt8(MTP2BusinessCore.exchangeCode)
-    /// 商品代码,64 Byte,不足位使用'\0'补齐
+    /// 商品编号,64 Byte,不足位使用'\0'补齐
     var goodsCode = ""
     
     init(goodsCode: String) {
@@ -31,13 +31,13 @@ struct MoQuoteSubscriptGoodsInfo {
     
     init(data: Data) throws {
         guard data.count == 66 else {
-            // 错误的数据长度
+            /// 错误的数据长度
             throw QuoteModelError.failDataLength
         }
         
         self.subState = data[0]
         self.exchangeCode = data[1]
-        // 商品代码,64 Byte
+        /// 商品编号,64 Byte
         self.goodsCode = (String(data: data.subdata(in: 2 ..< 66), encoding: String.Encoding.utf8) ?? "").replacingOccurrences(of: "\0", with: "")
     }
     
@@ -47,12 +47,12 @@ struct MoQuoteSubscriptGoodsInfo {
     func data() -> Data? {
         var data = Data()
         
-        // subState
+        /// subState
         data.append(self.subState)
-        // exchangeCode
+        /// exchangeCode
         data.append(self.exchangeCode)
-        // goodsCode
-        // 商品代码需要64 Byte,不足补'\0'
+        /// goodsCode
+        /// 商品编号需要64 Byte,不足补'\0'
         guard var goodsCodeData = self.goodsCode.data(using: String.Encoding.utf8) else { return nil }
         goodsCodeData.placeholder(length: 64)
         data.append(goodsCodeData)

+ 2 - 2
MTP_iOS/MTP2_iOS/BusinessCore/Quote/QuoteAdapter.swift

@@ -79,7 +79,7 @@ class QuoteAdapter: BaseAdapter {
     /// 构建盘面查询请求包的方法
     ///
     /// - Parameters:
-    ///   - goodsCodes: 目标商品代码数组
+    ///   - goodsCodes: 目标商品编号数组
     ///   - token: 登录令牌
     ///   - loginID: 账户编号
     /// - Returns: 盘面查询请求包
@@ -186,7 +186,7 @@ class QuoteAdapter: BaseAdapter {
             
             // 判断有效性
             if goodsQuoteTik["ExchangeCode"] == nil || goodsQuoteTik["GoodsCode"] == nil {
-                dPrint("[\(#function)] 收到行情无商品代码和交易所代码字段")
+                dPrint("[\(#function)] 收到行情无商品编号和交易所代码字段")
                 continue
             }
             

+ 1 - 1
MTP_iOS/MTP2_iOS/BusinessCore/Quote/QuoteManager.swift

@@ -396,7 +396,7 @@ class QuoteManager: BaseManager {
     /// 查询行情历史数据
     /// - Parameters:
     ///   - cycleType: 周期类型, 0-秒 1: 1分钟 2: 5分钟 3: 30分钟 4: 60分钟 120: 2小时 240: 4小时 11: 日线 10: Tik
-    ///   - goodsCode: 商品代码
+    ///   - goodsCode: 商品编号
     ///   - startTime: 开始时间,格式:yyyy-MM-dd HH:mm:ss
     ///   - endTime: 结束时间,格式:yyyy-MM-dd HH:mm:ss
     ///   - count: 条数

+ 1 - 1
MTP_iOS/MTP2_iOS/BusinessCore/Quote/QuoteSubscriptDelete.swift

@@ -11,7 +11,7 @@ import Foundation
 public protocol QuoteSubscriptDelete {
     /// 模块标识,保证 app生命周期内唯一
     var uuid: String { get set }
-    // 需要订阅的商品代码
+    // 需要订阅的商品编号
     var shouldSubscriptGoodsCodes: Set<String>? { get set }
     var visibleGoodsCodes: Set<String> { get }
 }

+ 2 - 2
MTP_iOS/MTP2_iOS/BusinessCore/Quote/QuoteSubscriptManager.swift

@@ -30,7 +30,7 @@ public class QuoteSubscriptManager {
     
     //MARK: 当前已经订阅的商品信息
     private var _quoteSubscriptGoodsInfos: [MoQuoteSubscriptGoodsInfo]?
-    //MARK: 可以请求的盘面商品代码(主要是这样可以不用等待订阅行情返回,要是有更好办法可以修改)
+    //MARK: 可以请求的盘面商品编号(主要是这样可以不用等待订阅行情返回,要是有更好办法可以修改)
     private var _canRequestUpdateQuoteGoodsCodes: Set<String>?
     
     // MARK: 需要订阅的行情集合 [key: UUID, value: [goodsCode]]
@@ -164,7 +164,7 @@ public class QuoteSubscriptManager {
     /// 更新盘面信息的方法
     ///
     /// - Parameters:
-    ///   - goodsCodes: 待更新商品代码数组, nil为更新当前所有商品
+    ///   - goodsCodes: 待更新商品编号数组, nil为更新当前所有商品
     ///   - callback: 回调块
     func requestUpdateQuote(goodsCodes: Set<String>? = nil, callback: ((_ isCompleted: Bool, _ error: ErrorInfo?, _ quoteGoodsInfos: [(goodsHqCode: String, exchHqCode: String)]?) -> Void)? = nil) {
         /// 状态检验

+ 2 - 2
MTP_iOS/MTP2_iOS/BusinessCore/Resources/ProtocolBuffer/bidding.pb.swift

@@ -865,7 +865,7 @@ struct AuctionGoodsStatusChangeNtf {
   /// Clears the value of `goodsID`. Subsequent reads from it will return its default value.
   mutating func clearGoodsID() {_storage._goodsID = nil}
 
-  /// string 商品代码
+  /// string 商品编号
   var goodsCode: String {
     get {return _storage._goodsCode ?? String()}
     set {_uniqueStorage()._goodsCode = newValue}
@@ -1273,7 +1273,7 @@ struct PreSaleOrderReq {
   /// Clears the value of `clientType`. Subsequent reads from it will return its default value.
   mutating func clearClientType() {_storage._clientType = nil}
 
-  /// 商品代码
+  /// 商品编号
   var goodsCode: String {
     get {return _storage._goodsCode ?? String()}
     set {_uniqueStorage()._goodsCode = newValue}

+ 1 - 1
MTP_iOS/MTP2_iOS/BusinessCore/Resources/ProtocolBuffer/settlement.pb.swift

@@ -438,7 +438,7 @@ struct DeliveryGoodsInfo {
   /// Clears the value of `deliveryGoodsID`. Subsequent reads from it will return its default value.
   mutating func clearDeliveryGoodsID() {self._deliveryGoodsID = nil}
 
-  /// 交割商品代码
+  /// 交割商品编号
   var deliveryGoodsCode: String {
     get {return _deliveryGoodsCode ?? String()}
     set {_deliveryGoodsCode = newValue}

+ 1 - 1
MTP_iOS/MTP2_iOS/Resource/ErrorCode.plist

@@ -281,7 +281,7 @@
 	<key>3045</key>
 	<string>需求下单商品不存在</string>
 	<key>3046</key>
-	<string>需求商品代码为空</string>
+	<string>需求商品编号为空</string>
 	<key>3047</key>
 	<string>需求下单商品不在开市状态</string>
 	<key>3048</key>

+ 1 - 1
MTP_iOS/MTP2_iOS/Resource/Localizable/en.lproj/Localizable.strings

@@ -97,7 +97,7 @@
 "人民币" = "RMB";
 "请输入开户人银行账号" = "Enter payee bank number";
 "使用率:" = "Rate:";
-"请选择商品代码" = "Select good code";
+"请选择商品编号" = "Select good no";
 "收款银行账号" = "Payee bank number";
 "收款银行开户行" = "Payee bank branch name";
 "提交" = "Submit";

+ 1 - 1
MTP_iOS/MTP2_iOS/Resource/Localizable/zh-HK.lproj/Localizable.strings

@@ -188,7 +188,7 @@
 "可用:" = "可用:";
 "公司概况" = "公司概況";
 "使用率:" = "使用率:";
-"请选择商品代码" = "請選擇商品代碼";
+"请选择商品编号" = "請選擇商品编号";
 "跌停价" = "跌停價";
 "期货下单" = "期貨下單";
 "权益:" = "權益:";

+ 1 - 1
MTP_iOS/MTP2_iOS/Resource/Localizable/zh-Hans.lproj/Localizable.strings

@@ -189,7 +189,7 @@
 "可用:" = "可用:";
 "公司概况" = "公司概况";
 "使用率:" = "使用率:";
-"请选择商品代码" = "请选择商品代码";
+"请选择商品编号" = "请选择商品编号";
 "跌停价" = "跌停价";
 "期货下单" = "期货下单";
 "权益:" = "权益:";

+ 2 - 3
MTP_iOS/MTP2_iOS/UserInterface/Mine/MineViewController.swift

@@ -520,8 +520,7 @@ extension MineViewController: SFSafariViewControllerDelegate {
 
 // MARK: - MyOrdersCell
 class MyOrdersCell: BaseTableViewCell<MoHsbyMyGoods> {
-    
-    /// 商品代码
+    /// 商品编号
     @IBOutlet weak var orderNo: UILabel!
     /// 商品图片
     @IBOutlet weak var goodsImage: UIImageView!
@@ -555,7 +554,7 @@ class MyOrdersCell: BaseTableViewCell<MoHsbyMyGoods> {
             qty.text = "×\(obj.buycurpositionqty)"
             /// 标题
             title.text = obj.goodsname
-            /// 商品代码
+            /// 商品编号
             orderNo.text = obj.goodscode
             /// 商品图片
             guard let url = StringUtils.getImageUrl(obj.picurls) else { return }

+ 3 - 3
MTP_iOS/MTP2_iOS/UserInterface/Mine/OutInMoney/InMoneyViewController.swift

@@ -464,14 +464,14 @@ class InMoneyViewController: BaseViewController {
             dict["mobile_tel"] = phoneNumberTextField.text
         }
         
-        //json 的可用性判断
+        /// json 的可用性判断
         if !JSONSerialization.isValidJSONObject(dict) {
             dPrint("不能转化")
             return ""
         }
-        //json 字符串转换为data
+        /// json 字符串转换为data
         guard let data = try? JSONSerialization.data(withJSONObject: dict, options: .prettyPrinted) else { return "" }
-        //data 转为字符串
+        /// data 转为字符串
         let jsonstr = String(data: data, encoding: .utf8)
         return jsonstr!
     }

+ 1 - 1
MTP_iOS/MTP2_iOS/UserInterface/Order/MyUnusedDetailViewController.swift

@@ -23,7 +23,7 @@ class MyUnusedDetailViewController: BaseViewController {
     @IBOutlet weak var goodsImage: UIImageView!
     /// 商品名称
     @IBOutlet weak var goodsName: UILabel!
-    /// 商品代码
+    /// 商品编号
     @IBOutlet weak var goodsCode: UILabel!
     /// 价格
     @IBOutlet weak var price: UILabel!

+ 1 - 1
MTP_iOS/MTP2_iOS/UserInterface/Order/PacketViewController.swift

@@ -251,7 +251,7 @@ class PacketCell: BaseTableViewCell<MoHsbyMyPackages> {
             company.text = obj.vendorname
             /// 标题
             title.text = obj.goodsname
-            /// 商品代码
+            /// 商品编号
             orderNo.text = obj.goodscode
             /// 价格
             price.text = "\(obj.currencysign) \(obj.averageprice.toDownString(reserve: obj.decimalplace))"

+ 5 - 5
MTP_iOS/MTP2_iOS/UserInterface/Quote/GoodsDetailViewController.swift

@@ -19,7 +19,7 @@ class GoodsDetailViewController: BaseViewController {
     // MARK: - 属性列表
     /// 商品名称
     @IBOutlet weak var goodsName: UILabel!
-    /// 商品代码
+    /// 商品编号
     @IBOutlet weak var goodsCode: UILabel!
     /// 媒体视图
     @IBOutlet weak var videoView: UIView!
@@ -257,8 +257,8 @@ class GoodsDetailViewController: BaseViewController {
         guard let obj = detail else { return }
         /// 商品名称
         goodsName.text = obj.goodsname
-        /// 商品代码
-        goodsCode.attributedText = ("商品代码     ".withTextColor(UIColorFromHex(rgbValue: 0x999999))+obj.goodscode.withTextColor(UIColorFromHex(rgbValue: 0x333333))).withFont(.font_13)
+        /// 商品编号
+        goodsCode.attributedText = ("商品编号     ".withTextColor(UIColorFromHex(rgbValue: 0x999999))+obj.goodscode.withTextColor(UIColorFromHex(rgbValue: 0x333333))).withFont(.font_13)
         /// 供应商
         vendorname.attributedText = ("供  应  商     ".withTextColor(UIColorFromHex(rgbValue: 0x999999)) + obj.vendorname.withTextColor(UIColorFromHex(rgbValue: 0x333333))).withFont(.font_13)
         /// 价格视图
@@ -461,7 +461,7 @@ class GoodsDetailViewController: BaseViewController {
     }
     
     /// 添加用户藏品数据信息请求接口
-    /// - Parameter goodsID: 商品代码
+    /// - Parameter goodsID: 商品编号
     fileprivate func AddUserFavoriteGoods(_ goodsID: Int) {
         /// 异常
         guard let goodsManager = MTP2BusinessCore.shared.goodsManager else { return }
@@ -475,7 +475,7 @@ class GoodsDetailViewController: BaseViewController {
     }
     
     /// 移出用户藏品数据信息请求接口
-    /// - Parameter goodsID: 商品代码
+    /// - Parameter goodsID: 商品编号
     fileprivate func removeUserFavoriteGoods(_ goodsID: Int) {
         /// 异常
         guard let goodsManager = MTP2BusinessCore.shared.goodsManager else { return }

+ 1 - 1
MTP_iOS/MTP2_iOS/UserInterface/Trade/TradeViewController.swift

@@ -153,7 +153,7 @@ class TradeViewController: BaseViewController {
         guard let accountManager = MTP2BusinessCore.shared.accountManager else { return }
         /// 商品名称
         self.goodsName.text = obj.goodsname
-        /// 商品代码
+        /// 商品编号
         self.orderNo.text = obj.goodscode
         /// 商品价格
         self.price.text = "\(obj.currencysign) \(obj.getLast() == 0.0 ? obj.last : obj.getLast())"