Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
d2d085e7
Commit
d2d085e7
authored
Aug 06, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未提交财务日报的门店
parent
5478019e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
31 deletions
+43
-31
CollectHouse.php
application/api_broker/controller/CollectHouse.php
+1
-4
ImageDepot.php
application/index/controller/ImageDepot.php
+2
-4
AStore.php
application/model/AStore.php
+15
-0
ODailyUncommittedModel.php
application/model/ODailyUncommittedModel.php
+0
-1
DailyUncommittedTask.php
application/task/controller/DailyUncommittedTask.php
+25
-22
No files found.
application/api_broker/controller/CollectHouse.php
View file @
d2d085e7
...
@@ -127,10 +127,7 @@ class CollectHouse extends Basic
...
@@ -127,10 +127,7 @@ class CollectHouse extends Basic
$get_params
[
'agents_id'
]
=
$params
[
"agents_id"
];
$get_params
[
'agents_id'
]
=
$params
[
"agents_id"
];
$get_params
[
'CollectUser.status'
]
=
1
;
$get_params
[
'CollectUser.status'
]
=
1
;
if
(
isset
(
$params
[
'site_name'
])
&&
$params
[
'site_name'
])
{
//城市筛选
$get_params
[
'Houses.city'
]
=
$params
[
'site_name'
];
}
$res
=
$this
->
aCollectHouse
->
getCollectList
(
$pageNo
,
$pageSize
,
$field
,
$get_params
);
$res
=
$this
->
aCollectHouse
->
getCollectList
(
$pageNo
,
$pageSize
,
$field
,
$get_params
);
$res_total
=
$this
->
aCollectHouse
->
getCollectListTotal
(
$field
,
$get_params
);
$res_total
=
$this
->
aCollectHouse
->
getCollectListTotal
(
$field
,
$get_params
);
...
...
application/index/controller/ImageDepot.php
View file @
d2d085e7
...
@@ -180,10 +180,8 @@ class ImageDepot extends Basic
...
@@ -180,10 +180,8 @@ class ImageDepot extends Basic
public
function
ceshi
()
public
function
ceshi
()
{
{
header
(
'Content-Type:text/json;charset=utf-8'
);
echo
json_encode
([
'name'
=>
'xiaom'
,
'name'
=>
'xiaom2'
]);
$header
=
$this
->
request
->
header
();
dump
(
$header
[
"x-forwarded-for"
]);
}
}
...
...
application/model/AStore.php
View file @
d2d085e7
...
@@ -481,4 +481,18 @@ class AStore extends BaseModel
...
@@ -481,4 +481,18 @@ class AStore extends BaseModel
// big_log($this->getLastSql());
// big_log($this->getLastSql());
return
$result
;
return
$result
;
}
}
public
function
getDailyUncommittedId
(
$time
)
{
$sql
=
"SELECT
*
FROM
( ( SELECT id AS store_id FROM a_store ) UNION ALL ( SELECT store_id FROM o_daily WHERE daily_date = '
{
$time
}
' ) ) c
GROUP BY
store_id
HAVING
count( store_id ) = 1 "
;
$result
=
Db
::
table
(
$this
->
table
)
->
query
(
$sql
);
return
$result
;
}
}
}
\ No newline at end of file
application/model/ODailyUncommittedModel.php
View file @
d2d085e7
...
@@ -84,7 +84,6 @@ class ODailyUncommittedModel extends Model
...
@@ -84,7 +84,6 @@ class ODailyUncommittedModel extends Model
$result
=
$this
->
db_
->
where
(
$where
)
->
update
(
$params
);
$result
=
$this
->
db_
->
where
(
$where
)
->
update
(
$params
);
//dump($this->getLastSql());
//dump($this->getLastSql());
return
$result
;
return
$result
;
}
}
}
}
application/task/controller/DailyUncommittedTask.php
View file @
d2d085e7
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
app\task\controller
;
namespace
app\task\controller
;
use
app\api_broker\service\PushMessageService
;
use
app\api_broker\service\PushMessageService
;
use
app\model\AStore
;
use
app\model\ODailyUncommittedModel
;
use
app\model\ODailyUncommittedModel
;
...
@@ -30,31 +31,20 @@ class DailyUncommittedTask
...
@@ -30,31 +31,20 @@ class DailyUncommittedTask
{
{
$time
=
date
(
"Y-m-d"
);
$time
=
date
(
"Y-m-d"
);
$s_push_msg
=
new
PushMessageService
();
$s_push_msg
=
new
PushMessageService
();
$m_store
=
new
AStore
();
//未提交日报门店集合
//未提交日报门店集合
$sql
=
"SELECT
$id_str
=
$this
->
getDailyUncommittedId
(
$time
);
`a`.`id`,
if
(
!
$id_str
){
`a`.`district_id`,
return
'无数据'
;
b.id AS agent_id,
}
`b`.`name`
$params_select
=
[];
FROM
$params_select
[
'a.id'
]
=
array
(
'in'
,
$id_str
);
`a_store` `a`
$store_result
=
$m_store
->
selectDailyUncommitted
(
'a.id,a.district_id,b.id as agent_id,b.name'
,
$params_select
);
LEFT JOIN `a_agents` `b` ON `a`.`id` = b.store_id
AND ( b.LEVEL = 20 OR b.LEVEL = 40 )
WHERE
`a`.`status` = 0
AND `a`.`id` IN (
SELECT
*
FROM
( ( SELECT id AS store_id FROM a_store ) UNION ALL ( SELECT store_id FROM o_daily WHERE daily_date = '
{
$time
}
' ) ) c
GROUP BY
store_id
HAVING
count( store_id ) = 1
)"
;
$store_result
=
$this
->
m_daily_uncommitted
->
query
(
$sql
);
if
(
!
$store_result
){
return
'无数据'
;
}
foreach
(
$store_result
as
$k
=>
$v
)
{
foreach
(
$store_result
as
$k
=>
$v
)
{
if
(
!
$v
[
'agent_id'
]){
if
(
!
$v
[
'agent_id'
]){
continue
;
continue
;
...
@@ -85,6 +75,19 @@ class DailyUncommittedTask
...
@@ -85,6 +75,19 @@ class DailyUncommittedTask
return
"成功"
;
return
"成功"
;
}
}
public
function
getDailyUncommittedId
(
$time
)
{
$m_store
=
new
AStore
();
$res
=
$m_store
->
getDailyUncommittedId
(
$time
);
$id_str
=
""
;
if
(
count
(
$res
)
>
0
)
{
foreach
(
$res
as
$k
=>
$v
)
{
$id_str
.=
$v
[
"store_id"
]
.
","
;
}
$id_str
=
rtrim
(
$id_str
,
","
);
}
return
$id_str
;
}
/**
/**
* 新增
* 新增
...
...
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