Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
stock_new
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
stock_new
Commits
c16957ce
Commit
c16957ce
authored
Jun 20, 2024
by
twj
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://rungit.jxdsy.cn:10000/sugar/stock_new
into dev
parents
9533edcf
93a0af97
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
552 additions
and
84 deletions
+552
-84
application/apicom/common.php
application/apicom/common.php
+1
-1
application/common.php
application/common.php
+25
-12
application/function.php
application/function.php
+53
-58
application/market/home/Index.php
application/market/home/Index.php
+1
-1
application/market/home/Trade.php
application/market/home/Trade.php
+388
-1
application/market/model/Position.php
application/market/model/Position.php
+76
-3
application/stock/admin/Operate.php
application/stock/admin/Operate.php
+8
-8
No files found.
application/apicom/common.php
View file @
c16957ce
...
@@ -479,7 +479,7 @@ if (!function_exists('yan_time')) {
...
@@ -479,7 +479,7 @@ if (!function_exists('yan_time')) {
/*
/*
* 验证交易时间
* 验证交易时间
*/
*/
function
yan_time
(
$last_time
=
14
.95
)
function
yan_time
(
$last_time
=
23
.95
)
{
{
$t
=
time
()
-
strtotime
(
date
(
"Y-m-d"
,
time
()));
$t
=
time
()
-
strtotime
(
date
(
"Y-m-d"
,
time
()));
$t2
=
3600
*
9.5
+
300
;
//早盘开盘时间
$t2
=
3600
*
9.5
+
300
;
//早盘开盘时间
...
...
application/common.php
View file @
c16957ce
...
@@ -1493,7 +1493,7 @@ if (!function_exists('yan_time')) {
...
@@ -1493,7 +1493,7 @@ if (!function_exists('yan_time')) {
/*
/*
* 验证交易时间
* 验证交易时间
*/
*/
function
yan_time
(
$last_time
=
14
.95
)
function
yan_time
(
$last_time
=
23
.95
)
{
{
$t
=
time
()
-
strtotime
(
date
(
"Y-m-d"
,
time
()));
$t
=
time
()
-
strtotime
(
date
(
"Y-m-d"
,
time
()));
$t2
=
3600
*
9.5
;
//早盘开盘时间
$t2
=
3600
*
9.5
;
//早盘开盘时间
...
@@ -2047,6 +2047,9 @@ function curl($url){
...
@@ -2047,6 +2047,9 @@ function curl($url){
*/
*/
if
(
!
function_exists
(
'toMarket'
)){
if
(
!
function_exists
(
'toMarket'
)){
function
toMarket
(
$code
){
function
toMarket
(
$code
){
if
(
strlen
(
$code
)
===
5
){
//如果不符合上述简单规则,可能需要更复杂的逻辑或数据查询
return
"HK"
;
}
else
if
(
strlen
(
$code
)
===
6
){
//A股暂时假设6位代码
if
(
$code
==
'000001'
){
if
(
$code
==
'000001'
){
return
'SZ'
;
return
'SZ'
;
}
}
...
@@ -2060,8 +2063,18 @@ if (!function_exists('toMarket')){
...
@@ -2060,8 +2063,18 @@ if (!function_exists('toMarket')){
return
'BJ'
;
return
'BJ'
;
}
}
}
}
}
}
}
//腾讯数据解析
if
(
!
function_exists
(
'jsonQuotation'
))
{
function
jsonQuotation
(
$item
)
{
$item
[
0
]
=
isset
(
$item
[
0
])
?
substr
(
str_replace
(
'v_'
,
''
,
$item
[
0
]),
0
,
2
)
:
''
;
//交易所代号
$item
[
80
]
=
isset
(
$item
[
30
])
?
strtotime
(
$item
[
30
])
:
time
();
return
$item
;
}
}
/******************************************************************************************/
/******************************************************************************************/
if
(
!
function_exists
(
'toPinyin'
))
{
if
(
!
function_exists
(
'toPinyin'
))
{
function
toPinyin
(
$zh
){
function
toPinyin
(
$zh
){
...
...
application/function.php
View file @
c16957ce
...
@@ -242,17 +242,10 @@ if (!function_exists('getEndDay')) {
...
@@ -242,17 +242,10 @@ if (!function_exists('getEndDay')) {
}
}
if
(
!
function_exists
(
'z_market'
))
{
if
(
!
function_exists
(
'z_market'
))
{
function
z_market
(
$code
,
$market
=
"
HK
"
)
function
z_market
(
$code
,
$market
=
""
)
{
{
$res
=
\think\Db
::
name
(
'admin_config'
)
->
where
(
array
(
'name'
=>
'market_data_in'
))
->
value
(
'value'
);
$res
=
\think\Db
::
name
(
'admin_config'
)
->
where
(
array
(
'name'
=>
'market_data_in'
))
->
value
(
'value'
);
//判断股票前缀
/*if(toMarket($code)){
$market = toMarket($code);
};*/
$code
=
strtolower
(
$market
)
.
$code
;
//判断股票是否
switch
(
$res
)
{
switch
(
$res
)
{
case
1
:
case
1
:
$res
=
qq_market
(
$code
);
$res
=
qq_market
(
$code
);
...
@@ -296,7 +289,6 @@ if (!function_exists('getEndDay')) {
...
@@ -296,7 +289,6 @@ if (!function_exists('getEndDay')) {
switch
(
$res
)
{
switch
(
$res
)
{
case
1
:
case
1
:
$res
=
explode
(
','
,
$code
);
$res
=
explode
(
','
,
$code
);
$count
=
count
(
$res
);
foreach
(
$res
as
$v
)
{
foreach
(
$res
as
$v
)
{
$d
.=
fenxi
(
$v
)
.
','
;
$d
.=
fenxi
(
$v
)
.
','
;
...
@@ -308,16 +300,9 @@ if (!function_exists('getEndDay')) {
...
@@ -308,16 +300,9 @@ if (!function_exists('getEndDay')) {
break
;
break
;
}
}
for
(
$i
=
0
;
$i
<
$count
;
$i
++
)
{
foreach
(
$tmd
as
$k
=>
$v
){
$k
=
$i
*
53
;
$data
[
$k
][
0
]
=
''
;
$data
[
$k
]
=
qq_to_api
(
$v
);
for
(
$n
=
1
;
$n
<=
53
;
$n
++
)
{
$num
=
$n
+
$k
;
$data
[
$i
][
$n
]
=
$tmd
[
$num
];
}
$data
[
$i
][
0
]
=
''
;
$data
[
$i
]
=
qq_to_api
(
$data
[
$i
]);
}
}
break
;
break
;
...
@@ -377,7 +362,6 @@ if (!function_exists('getEndDay')) {
...
@@ -377,7 +362,6 @@ if (!function_exists('getEndDay')) {
default
:
default
:
$res
=
explode
(
','
,
$code
);
$res
=
explode
(
','
,
$code
);
$count
=
count
(
$res
);
foreach
(
$res
as
$v
)
{
foreach
(
$res
as
$v
)
{
$d
.=
fenxi
(
$v
)
.
','
;
$d
.=
fenxi
(
$v
)
.
','
;
...
@@ -385,16 +369,9 @@ if (!function_exists('getEndDay')) {
...
@@ -385,16 +369,9 @@ if (!function_exists('getEndDay')) {
$tmd
=
qq_market_b
(
$d
);
$tmd
=
qq_market_b
(
$d
);
for
(
$i
=
0
;
$i
<
$count
;
$i
++
)
{
foreach
(
$tmd
as
$k
=>
$v
){
$k
=
$i
*
53
;
$data
[
$k
][
0
]
=
''
;
$data
[
$k
]
=
qq_to_api
(
$v
);
for
(
$n
=
1
;
$n
<=
53
;
$n
++
)
{
$num
=
$n
+
$k
;
$data
[
$i
][
$n
]
=
$tmd
[
$num
];
}
$data
[
$i
][
0
]
=
''
;
$data
[
$i
]
=
qq_to_api
(
$data
[
$i
]);
}
}
break
;
break
;
...
@@ -976,6 +953,12 @@ if (!function_exists('getEndDay')) {
...
@@ -976,6 +953,12 @@ if (!function_exists('getEndDay')) {
if
(
!
function_exists
(
''
))
{
if
(
!
function_exists
(
''
))
{
function
fenxi
(
$code
)
function
fenxi
(
$code
)
{
{
if
(
strlen
(
$code
)
===
5
){
//港股
$d
=
'hk'
.
$code
;
}
else
if
(
strlen
(
$code
)
===
6
){
//A股
switch
(
substr
(
$code
,
0
,
1
))
{
switch
(
substr
(
$code
,
0
,
1
))
{
case
'0'
:
case
'0'
:
$d
=
'sz'
.
$code
;
$d
=
'sz'
.
$code
;
...
@@ -1009,6 +992,8 @@ if (!function_exists('getEndDay')) {
...
@@ -1009,6 +992,8 @@ if (!function_exists('getEndDay')) {
$d
=
$code
;
$d
=
$code
;
break
;
break
;
}
}
}
return
$d
;
return
$d
;
}
}
...
@@ -1208,9 +1193,19 @@ if (!function_exists('getEndDay')) {
...
@@ -1208,9 +1193,19 @@ if (!function_exists('getEndDay')) {
curl_setopt
(
$ch
,
CURLOPT_HEADER
,
0
);
curl_setopt
(
$ch
,
CURLOPT_HEADER
,
0
);
$output
=
curl_exec
(
$ch
);
$output
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
curl_close
(
$ch
);
$t2
=
explode
(
'~'
,
mb_convert_encoding
(
$output
,
'utf-8'
,
'gbk'
));
$str
=
mb_convert_encoding
(
$output
,
'utf-8'
,
'gbk'
);
unset
(
$t2
[
0
]);
$str
=
str_replace
(
array
(
"
\r\n
"
,
"
\r
"
,
"
\n
"
),
""
,
$str
);
return
$t2
;
$t2
=
explode
(
'";'
,
$str
);
$json
=
[];
foreach
(
$t2
as
$key
=>
$val
)
{
$array
=
explode
(
"~"
,
$val
);
if
(
isset
(
$array
[
2
])
&&
isset
(
$array
[
3
])
&&
isset
(
$array
[
4
])){
$json
[]
=
jsonQuotation
(
explode
(
"~"
,
$val
));
}
else
{
continue
;
}
}
return
$json
;
}
}
}
}
...
...
application/market/home/Index.php
View file @
c16957ce
...
@@ -301,7 +301,7 @@ class Index extends Common
...
@@ -301,7 +301,7 @@ class Index extends Common
$uid
=
MID
;
$uid
=
MID
;
$req
=
request
();
$req
=
request
();
$code
=
intval
(
$req
::
instance
()
->
param
(
'code'
));
$code
=
intval
(
$req
::
instance
()
->
param
(
'code'
));
$market
=
intval
(
$req
::
instance
()
->
param
(
'market'
)
);
$market
=
$req
::
instance
()
->
param
(
'market'
);
if
(
$code
===
null
)
{
if
(
$code
===
null
)
{
return
json
([
'status'
=>
0
,
'message'
=>
'缺少参数code,操作失败'
]);
return
json
([
'status'
=>
0
,
'message'
=>
'缺少参数code,操作失败'
]);
}
else
{
}
else
{
...
...
application/market/home/Trade.php
View file @
c16957ce
This diff is collapsed.
Click to expand it.
application/market/model/Position.php
View file @
c16957ce
...
@@ -200,6 +200,24 @@ class Position extends Model{
...
@@ -200,6 +200,24 @@ class Position extends Model{
$res
[
'profit_rate'
]
=
round
(
$res
[
'ck_profit'
]
/
(
$res
[
'buy_average_price'
]
*
$res
[
'canbuy_count'
])
*
100
,
2
);
//盈亏比例
$res
[
'profit_rate'
]
=
round
(
$res
[
'ck_profit'
]
/
(
$res
[
'buy_average_price'
]
*
$res
[
'canbuy_count'
])
*
100
,
2
);
//盈亏比例
return
$res
;
return
$res
;
}
}
/*
* 返回子账号和股票代码对应的持仓
* $sub_id 子账号
* $code 股票代码
*/
public
static
function
getCodePosition
(
$sub_id
,
$code
){
$res
=
Db
::
name
(
'stock_position'
)
->
where
([
'sub_id'
=>
$sub_id
,
'gupiao_code'
=>
$code
])
->
where
([
'buying'
=>
0
])
->
find
();
if
(
empty
(
$res
)){
return
false
;}
$info
=
z_market
(
$code
);
$res
[
'now_price'
]
=
$info
[
"current_price"
];
$res
[
'market_value'
]
=
$info
[
"current_price"
]
*
$res
[
'canbuy_count'
];
//最新市值
$res
[
'ck_profit'
]
=
round
((
$info
[
"current_price"
]
-
$res
[
'buy_average_price'
])
*
$res
[
'canbuy_count'
],
2
);
//参考浮动盈亏
$res
[
'profit_rate'
]
=
round
(
$res
[
'ck_profit'
]
/
(
$res
[
'buy_average_price'
]
*
$res
[
'canbuy_count'
])
*
100
,
2
);
//盈亏比例
return
$res
;
}
/*
/*
* 返回子账号和股票代码对应持仓的可卖数量
* 返回子账号和股票代码对应持仓的可卖数量
* $sub_id 子账号
* $sub_id 子账号
...
@@ -316,9 +334,9 @@ class Position extends Model{
...
@@ -316,9 +334,9 @@ class Position extends Model{
* $user 证券账户
* $user 证券账户
* $soure 证券来源
* $soure 证券来源
*/
*/
public
function
add_m_position
(
$stockinfo
,
$count
,
$sub_id
,
$lid
,
$user
,
$soure
,
$ck_price
,
$model
,
$Trust_no
){
public
function
add_m_position
(
$stockinfo
,
$count
,
$sub_id
,
$lid
,
$user
,
$soure
,
$ck_price
,
$model
,
$Trust_no
=
0
){
$position_res
=
$this
->
get_code_p
osition
(
$sub_id
,
$stockinfo
[
"code"
]);
$position_res
=
self
::
getCodeP
osition
(
$sub_id
,
$stockinfo
[
"code"
]);
if
(
empty
(
$position_res
)){
if
(
empty
(
$position_res
)){
if
(
$model
==
2
){
if
(
$model
==
2
){
$data
=
array
();
$data
=
array
();
...
@@ -326,6 +344,7 @@ class Position extends Model{
...
@@ -326,6 +344,7 @@ class Position extends Model{
$data
[
0
][
'lid'
]
=
$lid
;
$data
[
0
][
'lid'
]
=
$lid
;
$data
[
0
][
'soruce'
]
=
$soure
;
$data
[
0
][
'soruce'
]
=
$soure
;
$data
[
0
][
'login_name'
]
=
$user
;
$data
[
0
][
'login_name'
]
=
$user
;
$data
[
0
][
'market'
]
=
toMarket
(
$stockinfo
[
"code"
]);
$data
[
0
][
'gupiao_code'
]
=
$stockinfo
[
"code"
];
$data
[
0
][
'gupiao_code'
]
=
$stockinfo
[
"code"
];
$data
[
0
][
'gupiao_name'
]
=
$stockinfo
[
"name"
];
$data
[
0
][
'gupiao_name'
]
=
$stockinfo
[
"name"
];
$data
[
0
][
'count'
]
=
$count
;
$data
[
0
][
'count'
]
=
$count
;
...
@@ -338,7 +357,7 @@ class Position extends Model{
...
@@ -338,7 +357,7 @@ class Position extends Model{
$data
[
0
][
'market_value'
]
=
$stockinfo
[
"current_price"
]
*
$count
;
//最新市值
$data
[
0
][
'market_value'
]
=
$stockinfo
[
"current_price"
]
*
$count
;
//最新市值
$data
[
0
][
'ck_profit'
]
=
round
((
$stockinfo
[
"current_price"
]
-
$ck_price
)
*
$count
,
3
);
//参考浮动盈亏
$data
[
0
][
'ck_profit'
]
=
round
((
$stockinfo
[
"current_price"
]
-
$ck_price
)
*
$count
,
3
);
//参考浮动盈亏
$data
[
0
][
'profit_rate'
]
=
round
(
$data
[
0
][
'ck_profit'
]
/
(
$ck_price
*
$count
)
*
100
,
2
);
//盈亏比例
$data
[
0
][
'profit_rate'
]
=
round
(
$data
[
0
][
'ck_profit'
]
/
(
$ck_price
*
$count
)
*
100
,
2
);
//盈亏比例
$data
[
0
][
'trust_no'
]
=
$Trust_no
;
//盈亏比例
//
$data[0]['trust_no'] = $Trust_no;//盈亏比例
$data
[
0
][
'buying'
]
=
0
;
//买入成功
$data
[
0
][
'buying'
]
=
0
;
//买入成功
$data
[
0
][
'selling'
]
=
0
;
//1、在途卖出
$data
[
0
][
'selling'
]
=
0
;
//1、在途卖出
$data
[
0
][
'gudong_code'
]
=
""
;
//股东代码 无法模拟暂时空
$data
[
0
][
'gudong_code'
]
=
""
;
//股东代码 无法模拟暂时空
...
@@ -391,6 +410,60 @@ class Position extends Model{
...
@@ -391,6 +410,60 @@ class Position extends Model{
return
$result
;
return
$result
;
}
}
/*
* 存储模拟持仓记录
* $data 持仓数据
* $sub_id 子账号
* $lid 安全模式id号
* $user 证券账户
* $soure 证券来源
*/
public
static
function
addPosition
(
$code
,
$market
,
$count
,
$sub_id
,
$lid
,
$user
,
$soure
,
$ck_price
,
$Trust_no
)
{
//if(!$count) return false;
//$canbuy = self::getCanbuyCount($sub_id,$code);
$position
=
self
::
getCodePosition
(
$sub_id
,
$code
);
$canbuy_count
=
$position
[
'canbuy_count'
]
+
$count
;
$stockinfo
=
z_market
(
$code
,
$market
);
$data
=
array
();
$data
[
0
][
'sub_id'
]
=
$sub_id
;
$data
[
0
][
'lid'
]
=
$lid
;
$data
[
0
][
'soruce'
]
=
$soure
;
$data
[
0
][
'login_name'
]
=
$user
;
$data
[
0
][
'gupiao_code'
]
=
$stockinfo
[
"code"
];
$data
[
0
][
'gupiao_name'
]
=
$stockinfo
[
"name"
];
$data
[
0
][
'count'
]
=
$count
;
$data
[
0
][
'stock_count'
]
=
$position
[
'stock_count'
]
+
$count
;
$data
[
0
][
'canbuy_count'
]
=
$position
[
'canbuy_count'
]
+
$count
;
$data
[
0
][
'ck_price'
]
=
self
::
calculate
(
$sub_id
,
$code
,
'price'
);
//参考成本价
dump
(
$data
[
0
][
'ck_price'
]);
die
;
$data
[
0
][
'buy_average_price'
]
=
self
::
calculate
(
$sub_id
,
$code
,
'average'
);
//买入均价
$data
[
0
][
'ck_profit_price'
]
=
''
;
//参考盈亏成本价
$data
[
0
][
'now_price'
]
=
$stockinfo
[
"current_price"
];
//'当前价'
$data
[
0
][
'market_value'
]
=
$stockinfo
[
"current_price"
]
*
$count
;
//最新市值
$data
[
0
][
'ck_profit'
]
=
$count
>
0
?
bcmul
(
strval
(
$stockinfo
[
"current_price"
]
-
$ck_price
),
strval
(
$count
),
2
)
:
0
;
//参考浮动盈亏
$data
[
0
][
'profit_rate'
]
=
$count
>
0
&&
$ck_price
>
0
?
bcdiv
(
strval
(
$data
[
0
][
'ck_profit'
]),
strval
(
$ck_price
*
$count
*
100
),
2
)
:
0
;
//盈亏比例
$data
[
0
][
'buying'
]
=
0
;
//买入成功
$data
[
0
][
'selling'
]
=
0
;
//1、在途卖出
$data
[
0
][
'gudong_code'
]
=
""
;
//股东代码 无法模拟暂时空
$data
[
0
][
'type'
]
=
$stockinfo
[
"exchange_code"
];
//帐号类别
$data
[
0
][
'market'
]
=
toMarket
(
$code
);
//股票类别
$data
[
0
][
'jigou_type'
]
=
1
;
$data
[
0
][
'jiyisuo'
]
=
toMarket
(
$code
)
==
"HK"
?
"港交所"
:
toMarket
(
$code
)
==
'SZ'
?
"深交所"
:
"上交所"
;
//交易所
$data
[
0
][
'info'
]
=
""
;
/***********************************************************************************/
if
(
TRUST_MODEL_TIME
===
1
){
// 交易模式为T+1时,不能立即更新可卖数量
unset
(
$data
[
0
][
'canbuy_count'
]);
}
/***********************************************************************************/
if
(
!
empty
(
$position
)){
$result
=
self
::
where
([
'id'
=>
$position
[
'id'
]])
->
update
(
$data
[
0
]);
}
else
{
$result
=
self
::
strict
(
false
)
->
insert
(
$data
[
0
],
true
);
}
return
$result
;
}
public
static
function
calculate
(
$sub_id
,
$code
,
$variable
)
public
static
function
calculate
(
$sub_id
,
$code
,
$variable
)
{
{
if
(
!
$sub_id
||
!
$code
||
!
$variable
)
return
0
;
if
(
!
$sub_id
||
!
$code
||
!
$variable
)
return
0
;
...
...
application/stock/admin/Operate.php
View file @
c16957ce
...
@@ -203,7 +203,7 @@ class Operate extends Admin{
...
@@ -203,7 +203,7 @@ class Operate extends Admin{
$model
=
new
SubMoneyRecord
();
$model
=
new
SubMoneyRecord
();
$xlsData
=
$model
->
get_record
(
$map
,
$order
,
$listRows
);
$xlsData
=
$model
->
get_record
(
$map
,
$order
,
$listRows
);
foreach
(
$xlsData
as
$key
=>
$value
){
foreach
(
$xlsData
as
$key
=>
$value
){
$xlsData
->
items
->
items
[
$key
][
'create_time'
]
=
date
(
'Y-m-d h:i'
,
$value
[
'create_time'
]);
$xlsData
->
items
[
$key
][
'create_time'
]
=
date
(
'Y-m-d h:i'
,
$value
[
'create_time'
]);
};
};
$title
=
"资金流水"
;
$title
=
"资金流水"
;
$arrHeader
=
array
(
'子账户ID'
,
'子账户'
,
'影响金额'
,
'账户余额'
,
'资金类型'
,
'详情'
,
'变动日期'
);
$arrHeader
=
array
(
'子账户ID'
,
'子账户'
,
'影响金额'
,
'账户余额'
,
'资金类型'
,
'详情'
,
'变动日期'
);
...
@@ -334,7 +334,7 @@ class Operate extends Admin{
...
@@ -334,7 +334,7 @@ class Operate extends Admin{
->
where
(
$map
)
->
where
(
$map
)
->
order
(
$order
)
->
paginate
(
$listRows
);
->
order
(
$order
)
->
paginate
(
$listRows
);
foreach
(
$xlsData
as
$key
=>
$value
){
foreach
(
$xlsData
as
$key
=>
$value
){
$xlsData
->
items
->
items
[
$key
][
'deal_date'
]
=
date
(
'Y-m-d'
,
$value
[
'deal_date'
]);
$xlsData
->
items
[
$key
][
'deal_date'
]
=
date
(
'Y-m-d'
,
$value
[
'deal_date'
]);
};
};
$title
=
"历史成交"
;
$title
=
"历史成交"
;
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'成交日期'
,
'成交时间'
,
'委托编号'
,
'委托价格'
,
'委托数量'
,
'成交编号'
,
'成交价格'
,
'成交数量'
,
'成交金额'
,
'买卖标志'
,
'状态说明'
);
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'成交日期'
,
'成交时间'
,
'委托编号'
,
'委托价格'
,
'委托数量'
,
'成交编号'
,
'成交价格'
,
'成交数量'
,
'成交金额'
,
'买卖标志'
,
'状态说明'
);
...
@@ -433,7 +433,7 @@ class Operate extends Admin{
...
@@ -433,7 +433,7 @@ class Operate extends Admin{
->
order
(
$order
)
->
order
(
$order
)
->
paginate
(
$listRows
);
->
paginate
(
$listRows
);
foreach
(
$xlsData
as
$key
=>
$value
){
foreach
(
$xlsData
as
$key
=>
$value
){
$xlsData
->
items
->
items
[
$key
][
'trust_date'
]
=
date
(
'Y-m-d'
,
$value
[
'trust_date'
]);
$xlsData
->
items
[
$key
][
'trust_date'
]
=
date
(
'Y-m-d'
,
$value
[
'trust_date'
]);
};
};
$title
=
"历史委托"
;
$title
=
"历史委托"
;
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'委托日期'
,
'委托时间'
,
'委托编号'
,
'委托价格'
,
'委托数量
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'委托日期'
,
'委托时间'
,
'委托编号'
,
'委托价格'
,
'委托数量
...
@@ -529,7 +529,7 @@ ume','amount','cancel_order_count','status');
...
@@ -529,7 +529,7 @@ ume','amount','cancel_order_count','status');
->
where
(
$map
)
->
where
(
$map
)
->
order
(
$order
)
->
paginate
(
$listRows
);
->
order
(
$order
)
->
paginate
(
$listRows
);
foreach
(
$xlsData
as
$key
=>
$value
){
foreach
(
$xlsData
as
$key
=>
$value
){
$xlsData
->
items
->
items
[
$key
][
'trust_date'
]
=
date
(
'Y-m-d'
,
$value
[
'trust_date'
]);
$xlsData
->
items
[
$key
][
'trust_date'
]
=
date
(
'Y-m-d'
,
$value
[
'trust_date'
]);
};
};
//$type_arr=['5'=>'免息配资','1'=>'按天配资','2'=>'按周配资','3'=>'按月配资','4'=>'免费体验','6'=>'模拟操盘'];
//$type_arr=['5'=>'免息配资','1'=>'按天配资','2'=>'按周配资','3'=>'按月配资','4'=>'免费体验','6'=>'模拟操盘'];
...
@@ -637,7 +637,7 @@ ume','amount','cancel_order_count','status');
...
@@ -637,7 +637,7 @@ ume','amount','cancel_order_count','status');
->
order
(
$order
)
->
order
(
$order
)
->
paginate
(
$listRows
);
->
paginate
(
$listRows
);
foreach
(
$xlsData
as
$key
=>
$value
){
foreach
(
$xlsData
as
$key
=>
$value
){
$xlsData
->
items
->
items
[
$key
][
'trust_date'
]
=
date
(
'Y-m-d'
,
$value
[
'trust_date'
]);
$xlsData
->
items
[
$key
][
'trust_date'
]
=
date
(
'Y-m-d'
,
$value
[
'trust_date'
]);
};
};
$title
=
"当日暂时未成交委托"
;
$title
=
"当日暂时未成交委托"
;
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'委托日期'
,
'委托时间'
,
'委托编号'
,
'委托价格'
,
'委托数量'
,
'成交数量'
,
'成交金额'
,
'撤单数量'
,
'状态说明'
);
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'委托日期'
,
'委托时间'
,
'委托编号'
,
'委托价格'
,
'委托数量'
,
'成交数量'
,
'成交金额'
,
'撤单数量'
,
'状态说明'
);
...
@@ -810,7 +810,7 @@ ume','amount','cancel_order_count','status');
...
@@ -810,7 +810,7 @@ ume','amount','cancel_order_count','status');
->
where
(
$map
)
->
where
(
$map
)
->
order
(
$order
)
->
paginate
(
$listRows
);
->
order
(
$order
)
->
paginate
(
$listRows
);
foreach
(
$xlsData
as
$key
=>
$value
){
foreach
(
$xlsData
as
$key
=>
$value
){
$xlsData
->
items
->
items
[
$key
][
'deal_date'
]
=
date
(
'Y-m-d'
,
$value
[
'deal_date'
]);
$xlsData
->
items
[
$key
][
'deal_date'
]
=
date
(
'Y-m-d'
,
$value
[
'deal_date'
]);
};
};
$title
=
"当日成交"
;
$title
=
"当日成交"
;
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'成交日期'
,
'成交时间'
,
'委托编号'
,
'委托价格'
,
'委托数量'
,
'成交编号'
,
'成交价格'
,
'成交数量'
,
'成交金额'
,
'买卖标志'
,
'状态说明'
);
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'成交日期'
,
'成交时间'
,
'委托编号'
,
'委托价格'
,
'委托数量'
,
'成交编号'
,
'成交价格'
,
'成交数量'
,
'成交金额'
,
'买卖标志'
,
'状态说明'
);
...
@@ -1032,7 +1032,7 @@ ume','amount','cancel_order_count','status');
...
@@ -1032,7 +1032,7 @@ ume','amount','cancel_order_count','status');
->
where
(
't.status'
,
'='
,
'已撤'
)
->
where
(
't.status'
,
'='
,
'已撤'
)
->
order
(
$order
)
->
paginate
(
$listRows
);
->
order
(
$order
)
->
paginate
(
$listRows
);
foreach
(
$xlsData
as
$key
=>
$value
){
foreach
(
$xlsData
as
$key
=>
$value
){
$xlsData
->
items
->
items
[
$key
][
'trust_date'
]
=
date
(
'Y-m-d'
,
$value
[
'trust_date'
]);
$xlsData
->
items
[
$key
][
'trust_date'
]
=
date
(
'Y-m-d'
,
$value
[
'trust_date'
]);
};
};
$title
=
"撤单查询"
;
$title
=
"撤单查询"
;
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'委托日期'
,
'委托时间'
,
'委托编号'
,
'委托价格'
,
'委托数量'
,
'成交数量'
,
'成交金额'
,
'撤单数量'
,
'状态说明'
);
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'委托日期'
,
'委托时间'
,
'委托编号'
,
'委托价格'
,
'委托数量'
,
'成交数量'
,
'成交金额'
,
'撤单数量'
,
'状态说明'
);
...
@@ -1135,7 +1135,7 @@ ume','amount','cancel_order_count','status');
...
@@ -1135,7 +1135,7 @@ ume','amount','cancel_order_count','status');
->
order
(
$order
)
->
order
(
$order
)
->
paginate
(
$listRows
);
->
paginate
(
$listRows
);
foreach
(
$xlsData
as
$key
=>
$value
){
foreach
(
$xlsData
as
$key
=>
$value
){
$xlsData
->
items
->
items
[
$key
][
'deal_date'
]
=
date
(
'Y-m-d'
,
$value
[
'deal_date'
]);
$xlsData
->
items
[
$key
][
'deal_date'
]
=
date
(
'Y-m-d'
,
$value
[
'deal_date'
]);
};
};
$title
=
"交割单"
;
$title
=
"交割单"
;
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'成交日期'
,
'业务名称'
,
'成交价格'
,
'成交数量'
,
'剩余数量'
,
'成交金额'
,
'清算金额'
,
'剩余金额'
,
'印花税'
,
'过户费'
,
'净佣金'
,
'委托编号'
,
'成交编号'
);
$arrHeader
=
array
(
'子账户ID'
,
'手机号'
,
'子账户'
,
'交易账户名'
,
'证券代码'
,
'证券名称'
,
'成交日期'
,
'业务名称'
,
'成交价格'
,
'成交数量'
,
'剩余数量'
,
'成交金额'
,
'清算金额'
,
'剩余金额'
,
'印花税'
,
'过户费'
,
'净佣金'
,
'委托编号'
,
'成交编号'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment