batchshedule changes
This commit is contained in:
parent
23ac03705b
commit
df08f169fa
@ -315,7 +315,13 @@ class HallTickets_Controller extends REST_Controller {
|
||||
$branchId = $this->post('branchId');
|
||||
$Cdate = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
|
||||
$CreatedOn = $Cdate->format('Y-m-d H:i:s');
|
||||
foreach($courseArray as $CourseDatialArray)
|
||||
/////////check semcoursemapping////
|
||||
$data['subjectDetails'] = $this->Hallticket_model->getSubjectDetails($universityID,$tempCourseArray,$branchId);
|
||||
$data['subjectDetails'] = $this->Hallticket_model->getExistDetailsfileupload($university,$courseArray,$branchId);
|
||||
// print_r( $data['subjectDetails']);
|
||||
if($data['subjectDetails'] == 1 )
|
||||
{
|
||||
foreach($courseArray as $CourseDatialArray)
|
||||
{
|
||||
$course=$CourseDatialArray;
|
||||
$schedulemaster = array('UniversityID'=>$university,'CourseID'=>$course,'BranchCode'=>$branchId,'CreatedBy'=>$requestedBy,'CreatedOn'=>$CreatedOn);
|
||||
@ -344,7 +350,27 @@ class HallTickets_Controller extends REST_Controller {
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// else if($data['subjectDetails'] == 0)
|
||||
else
|
||||
{
|
||||
$this->response([
|
||||
'message' => 'Please Mapping the course supject!',
|
||||
'status' => 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);
|
||||
|
||||
// }
|
||||
/////////////////////
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -183,19 +183,11 @@ class Hallticket_model extends CI_Model
|
||||
$courseDetails = $this->db->get('T_CourseMaster');
|
||||
return $courseDetails->result();
|
||||
}
|
||||
|
||||
/*
|
||||
* check existing data,only batchschedule.
|
||||
* @params university id and CourseID
|
||||
* created by Bala
|
||||
* */
|
||||
|
||||
public function getExistDetails($universityID,$courseIDS,$branchId)
|
||||
public function getExistDetailsfileupload($universityID,$courseIDS,$branchId)
|
||||
{
|
||||
// echo $universityID;
|
||||
// //foreach()
|
||||
// print_r ($courseIDS);
|
||||
// die();
|
||||
|
||||
// print_r($courseIDS);
|
||||
// echo $universityID;
|
||||
$i=0;
|
||||
foreach($courseIDS as $c)
|
||||
{
|
||||
@ -203,9 +195,9 @@ class Hallticket_model extends CI_Model
|
||||
// $tempCourseArray= $c['CourseID'];
|
||||
|
||||
$this->db->select ('count(*) as count');
|
||||
$this->db->from('T_Batch_Schedule_Master');
|
||||
$this->db->from('T_SemSubMap_Master');
|
||||
$this->db->where('UniversityID',$universityID);
|
||||
$this->db->where('CourseID', $c);
|
||||
$this->db->where('CourseID',$c);
|
||||
$result = $this->db->get();
|
||||
$res = $result->result();
|
||||
|
||||
@ -221,18 +213,45 @@ class Hallticket_model extends CI_Model
|
||||
}
|
||||
else
|
||||
{
|
||||
////////////////////
|
||||
// $this->db->distinct();
|
||||
// $this->db->select('SubjectID,SubjectCode,SubjectName');
|
||||
// $this->db->from('T_SubjectMaster');
|
||||
// // //$this->db->join('T_SubjectMaster','T_CourseSubject_Details.SubjectID=T_SubjectMaster.SubjectID');
|
||||
// $this->db->where('T_SubjectMaster.IsActive','1');
|
||||
// // // $this->db->where('T_CourseSubject_Details.UniversityID',$universityID);
|
||||
// $this->db->where_in('T_SubjectMaster.BranchCode',$branchId);
|
||||
// $result = $this->db->get();
|
||||
// //echo $this->db->last_query();
|
||||
//return $result->result();
|
||||
/////////////////////////
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* check existing data,only batchschedule.
|
||||
* @params university id and CourseID
|
||||
* created by Bala
|
||||
* */
|
||||
|
||||
public function getExistDetails($universityID,$courseIDS,$branchId)
|
||||
{
|
||||
|
||||
$i=0;
|
||||
foreach($courseIDS as $c)
|
||||
{
|
||||
|
||||
// $tempCourseArray= $c['CourseID'];
|
||||
|
||||
$this->db->select ('count(*) as count');
|
||||
$this->db->from('T_Batch_Schedule_Master');
|
||||
$this->db->where('UniversityID',$universityID);
|
||||
$this->db->where('CourseID', $c);
|
||||
// $this->db->where('BranchCode',$branchId);
|
||||
$result = $this->db->get();
|
||||
$res = $result->result();
|
||||
|
||||
if($res[0]->count > 0 )
|
||||
{
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
if( $i > 0 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
foreach($courseIDS as $c)
|
||||
{
|
||||
$this->db->distinct();
|
||||
|
||||
@ -382,9 +382,15 @@ $scope.UploadFileData = function (FileDetails,myModel,courseDetails) {
|
||||
swal("", "Saved Successfully", "success");
|
||||
$state.go($state.current, {}, {reload: true});
|
||||
} else {
|
||||
swal("", "Failed", "error");
|
||||
swal("", "Please Mapping the course supject", "error");
|
||||
$state.go($state.current, {}, {reload: true});
|
||||
}
|
||||
});
|
||||
},function(error){
|
||||
$scope.semDropDownShowLoading = false;
|
||||
swal(error.data.message,'','error');
|
||||
$state.go($state.current, {}, {reload: true});
|
||||
|
||||
} );
|
||||
}
|
||||
// end
|
||||
|
||||
|
||||
@ -167,8 +167,9 @@
|
||||
<fieldset>
|
||||
<js-xls onread="readUploadBatchDetails" onerror="error"></js-xls>
|
||||
<br>
|
||||
<a href="https://www.w3schools.com/html/" target="_top">Sample Format</a>
|
||||
<button type="button" class="btn btn-success btn-o" style="float: right" ng-click="UploadFileData(extractFileDetails,myModel,selectedCourseNameC)"> Submit</button>
|
||||
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user