作者 xiaohu thinkpad

统计学时问题修复

@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="03b59864-5835-4588-bfae-54004809f199" name="Default" comment=""> 4 <list default="true" id="03b59864-5835-4588-bfae-54004809f199" name="Default" comment="">
5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> 5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
  6 + <change beforePath="$PROJECT_DIR$/app/user/controller/ProfileController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/user/controller/ProfileController.php" afterDir="false" />
6 <change beforePath="$PROJECT_DIR$/simplewind/cmf/common.php" beforeDir="false" afterPath="$PROJECT_DIR$/simplewind/cmf/common.php" afterDir="false" /> 7 <change beforePath="$PROJECT_DIR$/simplewind/cmf/common.php" beforeDir="false" afterPath="$PROJECT_DIR$/simplewind/cmf/common.php" afterDir="false" />
7 </list> 8 </list>
8 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 9 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -102,11 +103,11 @@ @@ -102,11 +103,11 @@
102 </provider> 103 </provider>
103 </entry> 104 </entry>
104 </file> 105 </file>
105 - <file leaf-file-name="ProfileController.php" pinned="false" current-in-tab="false"> 106 + <file leaf-file-name="ProfileController.php" pinned="false" current-in-tab="true">
106 <entry file="file://$PROJECT_DIR$/app/user/controller/ProfileController.php"> 107 <entry file="file://$PROJECT_DIR$/app/user/controller/ProfileController.php">
107 <provider selected="true" editor-type-id="text-editor"> 108 <provider selected="true" editor-type-id="text-editor">
108 - <state relative-caret-position="525">  
109 - <caret line="45" column="15" selection-start-line="45" selection-start-column="15" selection-end-line="47" selection-end-column="46" /> 109 + <state relative-caret-position="378">
  110 + <caret line="38" column="38" selection-start-line="38" selection-start-column="38" selection-end-line="38" selection-end-column="38" />
110 </state> 111 </state>
111 </provider> 112 </provider>
112 </entry> 113 </entry>
@@ -120,11 +121,11 @@ @@ -120,11 +121,11 @@
120 </provider> 121 </provider>
121 </entry> 122 </entry>
122 </file> 123 </file>
123 - <file leaf-file-name="common.php" pinned="false" current-in-tab="true"> 124 + <file leaf-file-name="common.php" pinned="false" current-in-tab="false">
124 <entry file="file://$PROJECT_DIR$/simplewind/cmf/common.php"> 125 <entry file="file://$PROJECT_DIR$/simplewind/cmf/common.php">
125 <provider selected="true" editor-type-id="text-editor"> 126 <provider selected="true" editor-type-id="text-editor">
126 - <state relative-caret-position="565">  
127 - <caret line="2092" column="19" lean-forward="true" selection-start-line="2092" selection-start-column="19" selection-end-line="2092" selection-end-column="19" /> 127 + <state relative-caret-position="775">
  128 + <caret line="2102" column="30" selection-start-line="2102" selection-start-column="30" selection-end-line="2102" selection-end-column="30" />
128 </state> 129 </state>
129 </provider> 130 </provider>
130 </entry> 131 </entry>
@@ -231,9 +232,9 @@ @@ -231,9 +232,9 @@
231 <option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/common.php" /> 232 <option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/common.php" />
232 <option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/ProfileController [4].php" /> 233 <option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/ProfileController [4].php" />
233 <option value="$USER_HOME$/Desktop/开发资料/temp/22.html" /> 234 <option value="$USER_HOME$/Desktop/开发资料/temp/22.html" />
234 - <option value="$PROJECT_DIR$/app/user/controller/ProfileController.php" />  
235 <option value="$PROJECT_DIR$/public/index.php" /> 235 <option value="$PROJECT_DIR$/public/index.php" />
236 <option value="$PROJECT_DIR$/simplewind/cmf/common.php" /> 236 <option value="$PROJECT_DIR$/simplewind/cmf/common.php" />
  237 + <option value="$PROJECT_DIR$/app/user/controller/ProfileController.php" />
237 </list> 238 </list>
238 </option> 239 </option>
239 </component> 240 </component>
@@ -376,21 +377,7 @@ @@ -376,21 +377,7 @@
376 <workItem from="1536326693570" duration="30018000" /> 377 <workItem from="1536326693570" duration="30018000" />
377 <workItem from="1536496471879" duration="16852000" /> 378 <workItem from="1536496471879" duration="16852000" />
378 <workItem from="1536677895835" duration="7811000" /> 379 <workItem from="1536677895835" duration="7811000" />
379 - <workItem from="1536940132237" duration="4396000" />  
380 - </task>  
381 - <task id="LOCAL-00020" summary="测试获取当前时段的老师">  
382 - <created>1535559508443</created>  
383 - <option name="number" value="00020" />  
384 - <option name="presentableId" value="LOCAL-00020" />  
385 - <option name="project" value="LOCAL" />  
386 - <updated>1535559508443</updated>  
387 - </task>  
388 - <task id="LOCAL-00021" summary="测试获取当前时段的老师">  
389 - <created>1535559794285</created>  
390 - <option name="number" value="00021" />  
391 - <option name="presentableId" value="LOCAL-00021" />  
392 - <option name="project" value="LOCAL" />  
393 - <updated>1535559794285</updated> 380 + <workItem from="1536940132237" duration="4988000" />
394 </task> 381 </task>
395 <task id="LOCAL-00022" summary="测试获取当前时段的老师"> 382 <task id="LOCAL-00022" summary="测试获取当前时段的老师">
396 <created>1535559978125</created> 383 <created>1535559978125</created>
@@ -721,11 +708,25 @@ @@ -721,11 +708,25 @@
721 <option name="project" value="LOCAL" /> 708 <option name="project" value="LOCAL" />
722 <updated>1536977777123</updated> 709 <updated>1536977777123</updated>
723 </task> 710 </task>
724 - <option name="localTasksCounter" value="69" /> 711 + <task id="LOCAL-00069" summary="统计学时问题修复">
  712 + <created>1536979269191</created>
  713 + <option name="number" value="00069" />
  714 + <option name="presentableId" value="LOCAL-00069" />
  715 + <option name="project" value="LOCAL" />
  716 + <updated>1536979269191</updated>
  717 + </task>
  718 + <task id="LOCAL-00070" summary="统计学时问题修复">
  719 + <created>1536979616129</created>
  720 + <option name="number" value="00070" />
  721 + <option name="presentableId" value="LOCAL-00070" />
  722 + <option name="project" value="LOCAL" />
  723 + <updated>1536979616129</updated>
  724 + </task>
  725 + <option name="localTasksCounter" value="71" />
725 <servers /> 726 <servers />
726 </component> 727 </component>
727 <component name="TimeTrackingManager"> 728 <component name="TimeTrackingManager">
728 - <option name="totallyTimeSpent" value="143978000" /> 729 + <option name="totallyTimeSpent" value="144570000" />
729 </component> 730 </component>
730 <component name="ToolWindowManager"> 731 <component name="ToolWindowManager">
731 <frame x="1912" y="-152" width="1936" height="1056" extended-state="6" /> 732 <frame x="1912" y="-152" width="1936" height="1056" extended-state="6" />
@@ -948,13 +949,6 @@ @@ -948,13 +949,6 @@
948 </state> 949 </state>
949 </provider> 950 </provider>
950 </entry> 951 </entry>
951 - <entry file="file://$PROJECT_DIR$/app/user/controller/ProfileController.php">  
952 - <provider selected="true" editor-type-id="text-editor">  
953 - <state relative-caret-position="525">  
954 - <caret line="45" column="15" selection-start-line="45" selection-start-column="15" selection-end-line="47" selection-end-column="46" />  
955 - </state>  
956 - </provider>  
957 - </entry>  
958 <entry file="file://$PROJECT_DIR$/public/index.php"> 952 <entry file="file://$PROJECT_DIR$/public/index.php">
959 <provider selected="true" editor-type-id="text-editor"> 953 <provider selected="true" editor-type-id="text-editor">
960 <state relative-caret-position="126"> 954 <state relative-caret-position="126">
@@ -964,8 +958,15 @@ @@ -964,8 +958,15 @@
964 </entry> 958 </entry>
965 <entry file="file://$PROJECT_DIR$/simplewind/cmf/common.php"> 959 <entry file="file://$PROJECT_DIR$/simplewind/cmf/common.php">
966 <provider selected="true" editor-type-id="text-editor"> 960 <provider selected="true" editor-type-id="text-editor">
967 - <state relative-caret-position="565">  
968 - <caret line="2092" column="19" lean-forward="true" selection-start-line="2092" selection-start-column="19" selection-end-line="2092" selection-end-column="19" /> 961 + <state relative-caret-position="775">
  962 + <caret line="2102" column="30" selection-start-line="2102" selection-start-column="30" selection-end-line="2102" selection-end-column="30" />
  963 + </state>
  964 + </provider>
  965 + </entry>
  966 + <entry file="file://$PROJECT_DIR$/app/user/controller/ProfileController.php">
  967 + <provider selected="true" editor-type-id="text-editor">
  968 + <state relative-caret-position="378">
  969 + <caret line="38" column="38" selection-start-line="38" selection-start-column="38" selection-end-line="38" selection-end-column="38" />
969 </state> 970 </state>
970 </provider> 971 </provider>
971 </entry> 972 </entry>
@@ -36,7 +36,7 @@ class ProfileController extends UserBaseController @@ -36,7 +36,7 @@ class ProfileController extends UserBaseController
36 $yyxs = Db::name('yuyue') 36 $yyxs = Db::name('yuyue')
37 ->where(['teach_id' => $uid, 'status' => 3]) 37 ->where(['teach_id' => $uid, 'status' => 3])
38 ->field(' SUM(yuyue_end - yuyue_begin) as yyxs ') 38 ->field(' SUM(yuyue_end - yuyue_begin) as yyxs ')
39 - ->select(); 39 + ->select()->toArray();
40 $yyxs = $yyxs ? $yyxs['yyxs'] : 0; 40 $yyxs = $yyxs ? $yyxs['yyxs'] : 0;
41 $this->assign("yyxs", $yyxs); 41 $this->assign("yyxs", $yyxs);
42 return $this->fetch('percenter_coach'); 42 return $this->fetch('percenter_coach');
@@ -44,7 +44,7 @@ class ProfileController extends UserBaseController @@ -44,7 +44,7 @@ class ProfileController extends UserBaseController
44 $yyxs = Db::name('yuyue') 44 $yyxs = Db::name('yuyue')
45 ->where(['uid' => $uid, 'status' => 3]) 45 ->where(['uid' => $uid, 'status' => 3])
46 ->field(' SUM(yuyue_end - yuyue_begin) as yyxs ') 46 ->field(' SUM(yuyue_end - yuyue_begin) as yyxs ')
47 - ->select(); 47 + ->select()->toArray();
48 $yyxs = $yyxs ? $yyxs['yyxs'] : 0; 48 $yyxs = $yyxs ? $yyxs['yyxs'] : 0;
49 $this->assign("yyxs", $yyxs); 49 $this->assign("yyxs", $yyxs);
50 return $this->fetch('percenter_stu'); 50 return $this->fetch('percenter_stu');
@@ -2090,9 +2090,9 @@ function id_xueshi($id){ @@ -2090,9 +2090,9 @@ function id_xueshi($id){
2090 $name = Db::name('yuyue') 2090 $name = Db::name('yuyue')
2091 ->where(['uid'=>$id,'status'=>'3']) 2091 ->where(['uid'=>$id,'status'=>'3'])
2092 ->field(' SUM(yuyue_end - yuyue_begin) as yyxs ') 2092 ->field(' SUM(yuyue_end - yuyue_begin) as yyxs ')
2093 - ->select(); 2093 + ->select()->toArray();
2094 // return Db::name('yuyue')->getLastSql(); 2094 // return Db::name('yuyue')->getLastSql();
2095 - return $name ; 2095 +// return $name ;
2096 $yyxs = $name ? $name['yyxs'] : 0; 2096 $yyxs = $name ? $name['yyxs'] : 0;
2097 return $yyxs; 2097 return $yyxs;
2098 } 2098 }
@@ -2100,7 +2100,7 @@ function tid_xueshi($id){ @@ -2100,7 +2100,7 @@ function tid_xueshi($id){
2100 $name = Db::name('yuyue') 2100 $name = Db::name('yuyue')
2101 ->where(['teach_id'=>$id,'status'=>'3']) 2101 ->where(['teach_id'=>$id,'status'=>'3'])
2102 ->field(' SUM(yuyue_end - yuyue_begin) as yyxs ') 2102 ->field(' SUM(yuyue_end - yuyue_begin) as yyxs ')
2103 - ->select(); 2103 + ->select()->toArray();
2104 $yyxs = $name ? $name['yyxs'] : 0; 2104 $yyxs = $name ? $name['yyxs'] : 0;
2105 return $yyxs; 2105 return $yyxs;
2106 } 2106 }