作者 xiaohu thinkpad

统计学时问题修复

... ... @@ -3,6 +3,7 @@
<component name="ChangeListManager">
<list default="true" id="03b59864-5835-4588-bfae-54004809f199" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/user/controller/ProfileController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/user/controller/ProfileController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/simplewind/cmf/common.php" beforeDir="false" afterPath="$PROJECT_DIR$/simplewind/cmf/common.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
... ... @@ -102,11 +103,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="ProfileController.php" pinned="false" current-in-tab="false">
<file leaf-file-name="ProfileController.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/user/controller/ProfileController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="45" column="15" selection-start-line="45" selection-start-column="15" selection-end-line="47" selection-end-column="46" />
<state relative-caret-position="378">
<caret line="38" column="38" selection-start-line="38" selection-start-column="38" selection-end-line="38" selection-end-column="38" />
</state>
</provider>
</entry>
... ... @@ -120,11 +121,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="common.php" pinned="false" current-in-tab="true">
<file leaf-file-name="common.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/simplewind/cmf/common.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="565">
<caret line="2092" column="19" lean-forward="true" selection-start-line="2092" selection-start-column="19" selection-end-line="2092" selection-end-column="19" />
<state relative-caret-position="775">
<caret line="2102" column="30" selection-start-line="2102" selection-start-column="30" selection-end-line="2102" selection-end-column="30" />
</state>
</provider>
</entry>
... ... @@ -231,9 +232,9 @@
<option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/common.php" />
<option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/ProfileController [4].php" />
<option value="$USER_HOME$/Desktop/开发资料/temp/22.html" />
<option value="$PROJECT_DIR$/app/user/controller/ProfileController.php" />
<option value="$PROJECT_DIR$/public/index.php" />
<option value="$PROJECT_DIR$/simplewind/cmf/common.php" />
<option value="$PROJECT_DIR$/app/user/controller/ProfileController.php" />
</list>
</option>
</component>
... ... @@ -376,21 +377,7 @@
<workItem from="1536326693570" duration="30018000" />
<workItem from="1536496471879" duration="16852000" />
<workItem from="1536677895835" duration="7811000" />
<workItem from="1536940132237" duration="4396000" />
</task>
<task id="LOCAL-00020" summary="测试获取当前时段的老师">
<created>1535559508443</created>
<option name="number" value="00020" />
<option name="presentableId" value="LOCAL-00020" />
<option name="project" value="LOCAL" />
<updated>1535559508443</updated>
</task>
<task id="LOCAL-00021" summary="测试获取当前时段的老师">
<created>1535559794285</created>
<option name="number" value="00021" />
<option name="presentableId" value="LOCAL-00021" />
<option name="project" value="LOCAL" />
<updated>1535559794285</updated>
<workItem from="1536940132237" duration="4988000" />
</task>
<task id="LOCAL-00022" summary="测试获取当前时段的老师">
<created>1535559978125</created>
... ... @@ -721,11 +708,25 @@
<option name="project" value="LOCAL" />
<updated>1536977777123</updated>
</task>
<option name="localTasksCounter" value="69" />
<task id="LOCAL-00069" summary="统计学时问题修复">
<created>1536979269191</created>
<option name="number" value="00069" />
<option name="presentableId" value="LOCAL-00069" />
<option name="project" value="LOCAL" />
<updated>1536979269191</updated>
</task>
<task id="LOCAL-00070" summary="统计学时问题修复">
<created>1536979616129</created>
<option name="number" value="00070" />
<option name="presentableId" value="LOCAL-00070" />
<option name="project" value="LOCAL" />
<updated>1536979616129</updated>
</task>
<option name="localTasksCounter" value="71" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="143978000" />
<option name="totallyTimeSpent" value="144570000" />
</component>
<component name="ToolWindowManager">
<frame x="1912" y="-152" width="1936" height="1056" extended-state="6" />
... ... @@ -948,13 +949,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/user/controller/ProfileController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="45" column="15" selection-start-line="45" selection-start-column="15" selection-end-line="47" selection-end-column="46" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="126">
... ... @@ -964,8 +958,15 @@
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/cmf/common.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="565">
<caret line="2092" column="19" lean-forward="true" selection-start-line="2092" selection-start-column="19" selection-end-line="2092" selection-end-column="19" />
<state relative-caret-position="775">
<caret line="2102" column="30" selection-start-line="2102" selection-start-column="30" selection-end-line="2102" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/user/controller/ProfileController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="378">
<caret line="38" column="38" selection-start-line="38" selection-start-column="38" selection-end-line="38" selection-end-column="38" />
</state>
</provider>
</entry>
... ...
... ... @@ -36,7 +36,7 @@ class ProfileController extends UserBaseController
$yyxs = Db::name('yuyue')
->where(['teach_id' => $uid, 'status' => 3])
->field(' SUM(yuyue_end - yuyue_begin) as yyxs ')
->select();
->select()->toArray();
$yyxs = $yyxs ? $yyxs['yyxs'] : 0;
$this->assign("yyxs", $yyxs);
return $this->fetch('percenter_coach');
... ... @@ -44,7 +44,7 @@ class ProfileController extends UserBaseController
$yyxs = Db::name('yuyue')
->where(['uid' => $uid, 'status' => 3])
->field(' SUM(yuyue_end - yuyue_begin) as yyxs ')
->select();
->select()->toArray();
$yyxs = $yyxs ? $yyxs['yyxs'] : 0;
$this->assign("yyxs", $yyxs);
return $this->fetch('percenter_stu');
... ...
... ... @@ -2090,9 +2090,9 @@ function id_xueshi($id){
$name = Db::name('yuyue')
->where(['uid'=>$id,'status'=>'3'])
->field(' SUM(yuyue_end - yuyue_begin) as yyxs ')
->select();
->select()->toArray();
// return Db::name('yuyue')->getLastSql();
return $name ;
// return $name ;
$yyxs = $name ? $name['yyxs'] : 0;
return $yyxs;
}
... ... @@ -2100,7 +2100,7 @@ function tid_xueshi($id){
$name = Db::name('yuyue')
->where(['teach_id'=>$id,'status'=>'3'])
->field(' SUM(yuyue_end - yuyue_begin) as yyxs ')
->select();
->select()->toArray();
$yyxs = $name ? $name['yyxs'] : 0;
return $yyxs;
}
\ No newline at end of file
... ...