batchschdule changes
This commit is contained in:
parent
525232c197
commit
bdafbe2108
@ -320,12 +320,26 @@ class HallTickets_Controller extends REST_Controller {
|
|||||||
$branchId = $this->post('branchId');
|
$branchId = $this->post('branchId');
|
||||||
$Cdate = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
|
$Cdate = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
|
||||||
$CreatedOn = $Cdate->format('Y-m-d H:i:s');
|
$CreatedOn = $Cdate->format('Y-m-d H:i:s');
|
||||||
/////////check semcoursemapping////
|
$fileArray = array();
|
||||||
// $data['subjectDetails'] = $this->Hallticket_model->getSubjectDetails($universityID,$tempCourseArray,$branchId);
|
foreach($filedetails as $filedetailsarray)
|
||||||
|
{
|
||||||
|
$fileArray[]=$filedetailsarray['SubjectID'];
|
||||||
|
}
|
||||||
|
|
||||||
$data['subjectDetails'] = $this->Hallticket_model->getExistDetailsfileupload($university,$courseArray,$branchId);
|
$data['subjectDetails'] = $this->Hallticket_model->getExistDetailsfileupload($university,$courseArray,$branchId);
|
||||||
// print_r( $data['subjectDetails']);
|
// print_r( $data['subjectDetails']);
|
||||||
if($data['subjectDetails'] == 1 )
|
if($data['subjectDetails'] == 1 )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$data['SubjectMappingDetails'] = $this->Hallticket_model->getSubjectMappingDetails($university,$courseArray,$branchId);
|
||||||
|
$maparray=array();
|
||||||
|
foreach ( $data['SubjectMappingDetails'] as $object)
|
||||||
|
{
|
||||||
|
$maparray[]=$object->SubjectCode;
|
||||||
|
}
|
||||||
|
if ($fileArray == $maparray)
|
||||||
|
{
|
||||||
|
|
||||||
foreach($courseArray as $CourseDatialArray)
|
foreach($courseArray as $CourseDatialArray)
|
||||||
{
|
{
|
||||||
$course=$CourseDatialArray;
|
$course=$CourseDatialArray;
|
||||||
@ -355,6 +369,14 @@ class HallTickets_Controller extends REST_Controller {
|
|||||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||||
], REST_Controller::HTTP_NOT_FOUND);
|
], REST_Controller::HTTP_NOT_FOUND);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->response([
|
||||||
|
'message' => 'Records Do Not Match With Mapped Subjects!',
|
||||||
|
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||||
|
], REST_Controller::HTTP_NOT_FOUND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,19 +384,18 @@ class HallTickets_Controller extends REST_Controller {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->response([
|
$this->response([
|
||||||
'message' => 'Please Mapping the course supject!',
|
'message' => ' Course Mapping for the Subject Not Found !',
|
||||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||||
], REST_Controller::HTTP_NOT_FOUND);
|
], REST_Controller::HTTP_NOT_FOUND);
|
||||||
}
|
}
|
||||||
// else{
|
|
||||||
|
|
||||||
// $this->response([
|
|
||||||
// 'message' => 'No records found!',
|
|
||||||
// 'status' => REST_Controller::HTTP_NOT_FOUND
|
|
||||||
// ], REST_Controller::HTTP_NOT_FOUND);
|
|
||||||
|
|
||||||
// }
|
|
||||||
/////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,8 +135,8 @@ group by semchild.SubjectID,semchild.MapID";
|
|||||||
$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');
|
||||||
$this->db->from('T_Batch_Schedule_Master SCM');
|
$this->db->from('T_Batch_Schedule_Master SCM');
|
||||||
$this->db->join('T_Batch_Schedule_Child','T_Batch_Schedule_Child.SchId = SCM.SchId');
|
$this->db->join('T_Batch_Schedule_Child','T_Batch_Schedule_Child.SchId = SCM.SchId');
|
||||||
//$this->db->where('SCM.BranchCode',$branchcode);
|
$this->db->where('SCM.BranchCode',$branchcode);
|
||||||
// $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);
|
//print_r($existsheduledetails);
|
||||||
@ -200,16 +200,16 @@ group by semchild.SubjectID,semchild.MapID";
|
|||||||
public function getExistDetailsfileupload($universityID,$courseIDS,$branchId)
|
public function getExistDetailsfileupload($universityID,$courseIDS,$branchId)
|
||||||
{
|
{
|
||||||
|
|
||||||
// print_r($courseIDS);
|
|
||||||
// echo $universityID;
|
|
||||||
$i=0;
|
$i=0;
|
||||||
foreach($courseIDS as $c)
|
foreach($courseIDS as $c)
|
||||||
{
|
{
|
||||||
|
|
||||||
// $tempCourseArray= $c['CourseID'];
|
// $tempCourseArray= $c['CourseID'];
|
||||||
|
|
||||||
$this->db->select ('count(*) as count');
|
$this->db->select ('count(*) as count,T_SemSubMap_Child.SubjectID');
|
||||||
$this->db->from('T_SemSubMap_Master');
|
$this->db->from('T_SemSubMap_Master');
|
||||||
|
$this->db->join('T_SemSubMap_Child','T_SemSubMap_Child.MapID=T_SemSubMap_Master.MapID');
|
||||||
$this->db->where('UniversityID',$universityID);
|
$this->db->where('UniversityID',$universityID);
|
||||||
$this->db->where('CourseID',$c);
|
$this->db->where('CourseID',$c);
|
||||||
$result = $this->db->get();
|
$result = $this->db->get();
|
||||||
@ -235,6 +235,35 @@ public function getExistDetailsfileupload($universityID,$courseIDS,$branchId)
|
|||||||
* @params university id and CourseID
|
* @params university id and CourseID
|
||||||
* created by Bala
|
* created by Bala
|
||||||
* */
|
* */
|
||||||
|
public function getSubjectMappingDetails($universityID,$courseIDS,$branchId)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
foreach($courseIDS as $c)
|
||||||
|
{
|
||||||
|
|
||||||
|
// $tempCourseArray= $c['CourseID'];
|
||||||
|
|
||||||
|
$this->db->select ('T_SubjectMaster.SubjectCode');
|
||||||
|
$this->db->from('T_SemSubMap_Master');
|
||||||
|
$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->where('T_SemSubMap_Master.UniversityID',$universityID);
|
||||||
|
$this->db->where('T_SemSubMap_Master.CourseID',$c);
|
||||||
|
$this->db->where('T_SubjectMaster.BranchCode',$branchId);
|
||||||
|
$result = $this->db->get();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return $result->result();
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* check existing data,only batchschedule.
|
||||||
|
* @params university id and CourseID
|
||||||
|
* created by Bala
|
||||||
|
* */
|
||||||
|
|
||||||
public function getExistDetails($universityID,$courseIDS,$branchId)
|
public function getExistDetails($universityID,$courseIDS,$branchId)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -384,7 +384,7 @@ $scope.UploadFileData = function (FileDetails,myModel,courseDetails) {
|
|||||||
swal("", "Saved Successfully", "success");
|
swal("", "Saved Successfully", "success");
|
||||||
$state.go($state.current, {}, {reload: true});
|
$state.go($state.current, {}, {reload: true});
|
||||||
} else {
|
} else {
|
||||||
swal("", "Please Mapping the course supject", "error");
|
swal("",response.data.message, "error");
|
||||||
$state.go($state.current, {}, {reload: true});
|
$state.go($state.current, {}, {reload: true});
|
||||||
}
|
}
|
||||||
},function(error){
|
},function(error){
|
||||||
|
|||||||
@ -167,7 +167,8 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<js-xls onread="readUploadBatchDetails" onerror="error"></js-xls>
|
<js-xls onread="readUploadBatchDetails" onerror="error"></js-xls>
|
||||||
<br>
|
<br>
|
||||||
<a href="https://www.w3schools.com/html/" target="_top">Sample Format</a>
|
|
||||||
|
<a target="_blank" href="C:\xampp\htdocs\apollodec\Apollo\images\Batchschedule.xlsx">Sample Format</a>
|
||||||
<button type="button" class="btn btn-success btn-o" style="float: right" ng-click="UploadFileData(extractFileDetails,myModel,selectedCourseNameC)"> Submit</button>
|
<button type="button" class="btn btn-success btn-o" style="float: right" ng-click="UploadFileData(extractFileDetails,myModel,selectedCourseNameC)"> Submit</button>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
BIN
Apollo/images/Batchschedule.xlsx
Normal file
BIN
Apollo/images/Batchschedule.xlsx
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user