checkin by bala

This commit is contained in:
venbatechnologies@gmail.com 2018-09-08 16:19:16 +05:30
parent c645fdd1a8
commit 84c0f1fc62
5 changed files with 3317 additions and 3296 deletions

View File

@ -67,11 +67,16 @@ class HallTickets_Controller extends REST_Controller {
public function getSheduleDetails_post() public function getSheduleDetails_post()
{ {
$courseDetails =$this->post('courseDetails');
//print_r($courseDetails);
$CourseID = $courseDetails['CourseID'];
$universityID= $courseDetails['UniversityID'];
//print_r($courseDetails);
$mapid = $this->post('mapid'); $mapid = $this->post('mapid');
$subid = $this->post('subid'); $subid = $this->post('subid');
$branchcode = $this->post('branchcode'); $branchcode = $this->post('branchcode');
//$getSheduleData = $this->Hallticket_model->getShedules($mapid); //$getSheduleData = $this->Hallticket_model->getShedules($mapid);
$get_unShedules = $this->Hallticket_model->get_unShedules($mapid,$subid,$branchcode); $get_unShedules = $this->Hallticket_model->get_unShedules($mapid,$subid,$branchcode,$CourseID,$universityID);
//print_r($get_unShedules); //print_r($get_unShedules);
if ($get_unShedules) if ($get_unShedules)
{ {

36
Apollo/api/application/models/Hallticket_model.php Executable file → Normal file
View File

@ -103,19 +103,33 @@ class Hallticket_model extends CI_Model
* for edit/view shedule * for edit/view shedule
* created by TamilBala * created by TamilBala
* */ * */
public function get_unShedules($mapid,$subid,$branchcode) ////////////
{ // $this->db->join('T_Batch_Schedule_Child','T_Batch_Schedule_Child.SchId = SCM.SchId');
// $this->db->join('T_SemSubMap_Master','T_SemSubMap_Master.UniversityID=SCM.UniversityID and T_SemSubMap_Master.CourseID=SCM.CourseID');
// $this->db->join('T_SemSubMap_Child','T_SemSubMap_Child.MapID=T_SemSubMap_Master.MapID');
// $this->db->join('T_SubjectMaster','T_SubjectMaster.SubjectID=T_SemSubMap_Child.SubjectID');
$this->db->select('SM.SubjectName,SM.SubjectID'); // $this->db->where('T_SemSubMap_Master.UniversityID',$universityID);
$this->db->from('T_SubjectMaster SM'); // $this->db->where('T_SemSubMap_Master.CourseID',$CourseID);
$this->db->join('T_Batch_Schedule_Child','T_Batch_Schedule_Child.SubjectID=SM.SubjectID'); ////////////
$this->db->where('SM.BranchCode',$branchcode); public function get_unShedules($mapid,$subid,$branchcode,$CourseID,$universityID)
$this->db->where('T_Batch_Schedule_Child.SchId',$mapid); {
$result = $this->db->get(); //echo $mapid;
if($result->result()){ $sql="SELECT semchild.SubjectID,semchild.MapID,bsc.ScheduleDate,bsc.FromTime,bsc.ToTime,sm.SubjectName
FROM T_SemSubMap_Child semchild
LEFT JOIN T_SemSubMap_Master semmaster ON semmaster.MapID = semchild.MapID
LEFT JOIN T_Batch_Schedule_Master bsm ON bsm.UniversityID = semmaster.UniversityID
and bsm.CourseID=semmaster.CourseID
LEFT JOIN T_Batch_Schedule_Child bsc ON bsc.SchId = bsm.SchId and bsc.SubjectID=semchild.SubjectID
LEFT JOIN T_SubjectMaster sm ON sm.SubjectID=semchild.SubjectID
WHERE semchild.isActive = '1' and bsm.SchId='".$mapid."'
group by semchild.SubjectID,semchild.MapID";
$b=$this->db->query($sql);
//print_r($b);
if($b->result()){
$resultShedule['status']=true; $resultShedule['status']=true;
$mastScheduleID=""; $mastScheduleID="";
foreach($result->result() as $row) foreach($b->result() as $row)
{ {
$this->db->select('T_Batch_Schedule_Child.SchId,T_Batch_Schedule_Child.SubjectID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime,T_Batch_Schedule_Child.SchChildId,T_Batch_Schedule_Child.SchId'); $this->db->select('T_Batch_Schedule_Child.SchId,T_Batch_Schedule_Child.SubjectID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime,T_Batch_Schedule_Child.SchChildId,T_Batch_Schedule_Child.SchId');
@ -125,7 +139,7 @@ class Hallticket_model extends CI_Model
// $this->db->where('T_Batch_Schedule_Child.SchId',$mapid); // $this->db->where('T_Batch_Schedule_Child.SchId',$mapid);
$this->db->where('T_Batch_Schedule_Child.SubjectID',$row->SubjectID); $this->db->where('T_Batch_Schedule_Child.SubjectID',$row->SubjectID);
$existsheduledetails = $this->db->get(); $existsheduledetails = $this->db->get();
//print_r($existsheduledetails);
if($existData=$existsheduledetails->result()) if($existData=$existsheduledetails->result())
{ {

4
Apollo/assets/js/controllers/schCtrl.js Executable file → Normal file
View File

@ -51,6 +51,8 @@ app.controller('schCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableP
$scope.editId = pid; $scope.editId = pid;
$scope.courseCode = cid; $scope.courseCode = cid;
$scope.mappingid = schid; $scope.mappingid = schid;
//$scope.sample=subid;
$scope.sample1=c;
//alert(mappingid+'n'); //alert(mappingid+'n');
var getsheduledetails = { var getsheduledetails = {
method: 'POST', method: 'POST',
@ -63,7 +65,7 @@ app.controller('schCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableP
mapid:$scope.mappingid, mapid:$scope.mappingid,
subid:subid, subid:subid,
branchcode:branchid, branchcode:branchid,
courseDetails:$scope.sample1
} }
}; };

0
Apollo/assets/views/hallticket/batchshedule.html Executable file → Normal file
View File

0
Apollo/assets/views/hallticket/editShedule.html Executable file → Normal file
View File