This commit is contained in:
gayathri1990 2018-09-12 11:59:26 +05:30
commit 87f5d910c5
9 changed files with 378 additions and 33 deletions

View File

@ -30,20 +30,17 @@ group by Student_id,cid";
Public function getMobile($deleteNo=null,$mergeNo=null)
{
$sql = "call SP_MERGE_STUDENT_DATA('".$deleteNo."','".$mergeNo."',@countRow);
$sql = "call SP_MERGE_STUDENT_DATA('".$deleteNo."','".$mergeNo."',@re_message);
";
$a=$this->db->query($sql);
$sqlOut = " select @countRow as counts;";
$b=$this->db->query($sqlOut);
$batch = $b->result();
//echo $batch[0]->counts;
if ($batch[0]->counts > 0) {
$a=$this->db->query($sql);
$sp_res = $a->result();
if ($sp_res[0]->re_message = 1) {
$results['MergeStatus'] = true;
$results['after_Merge'] = $batch;
$results['message'] = 'Student details successfully merged';
$results['message'] = 'Student merged Successfully';
} else {
$results['MergeStatus'] = false;
$results['message'] = 'Can not Merge';
$results['message'] = 'Can not merge';
}
return $results;
}

View File

@ -860,7 +860,7 @@ class Receive_Enrolment_Fees_Univ_model extends CI_Model {
}
else{
$arrayResultStudent['message']="This enrolment either don't register in student course or set fees.please check to update details.";
$arrayResultStudent['message']="This enrollment either don't registered in student course or set fees.please check to update details.";
$arrayResultStudent['status']=false;
}
return $arrayResultStudent;
@ -1100,7 +1100,7 @@ $result['updatedraftStatus'] = false;
// kdk
public function getStudentUnivFormIdFeeDatailsList($reqBranchData, $searchDetails){
$this->db->select('FUD.*, concat(ST.FirstName," ", ST.Lastname) as app_StudentName, IF(concat(ST.FirstName," " , ST.Lastname) = FUD.Student_Name, "YES", "NO") as StudentNameStatus ,
$this->db->select('FUD.*, ST.MobileNumber, ST.StudentID, concat(ST.FirstName," ", ST.Lastname) as app_StudentName, IF(concat(ST.FirstName," " , ST.Lastname) = FUD.Student_Name, "YES", "NO") as StudentNameStatus ,
ST.Fathername as app_FatherName, IF(ST.Fathername = FUD.Father_Name, "YES", "NO") as FathernameStatus,
CM.CourseCode as app_CourseCode, IF(CM.CourseCode = FUD.CourseCode, "YES", "NO" ) as CourseCodeStatus,
IF(ENU.SemesterYear = FUD.Semester, "YES", "NO" ) as SemesterStatus');
@ -1171,7 +1171,7 @@ $result['updatedraftStatus'] = false;
// get formid status list for that particular record
// kdk
public function getFormIdDetailsStatusUpdateList($reqBranchData, $searchDetails){
$selectQuery = "SELECT * , concat(t3.Firstname, '', t3.Lastname) as CreatedByName
$selectQuery = "SELECT t1.* , concat(t3.Firstname, '', t3.Lastname) as CreatedByName
FROM T_FormId_FeeDetails_Received_From_University_StatusUpdate as t1
LEFT JOIN T_Login as t2 ON t1.CreatedBy = t2.ID
LEFT JOIN T_StaffDetails as t3 ON t2.StaffID = t3.StaffID
@ -1197,6 +1197,8 @@ $result['updatedraftStatus'] = false;
$newLeadDetails['FormIdDetailsID'] = $id;
$newLeadDetails['FormID'] = $formId;
$newLeadDetails['Status'] = $statusDetails['Status'];
$newLeadDetails['Comments'] = $statusDetails['Comments'];
$time = date('Y-m-d H:i:s');
$newLeadDetails['CreatedOn'] = $time;
$newLeadDetails['CreatedBy'] = $reqBranchData['localUserID'];
@ -1360,7 +1362,7 @@ $result['updatedraftStatus'] = false;
$this->db->join(FORMFEESRECEIVEDFROMUNIV.' as UNFR', 'UNFR.ID = UNCD.FormMapID','left');
$this->db->join(UNIVERSITYPAYMENT.' as UNP', 'UNP.PID = UNCD.PaymentMapID','left');
$this->db->join(ENROLMENTRECEIVEDFROMUNIV.' as ENU', 'ENU.FormID = UNFR.FormID','left');
$this->db->order_by('UNCD.ApprovedDate','DESC');
$this->db->order_by('UNCD.ApprovedDate','ASC');
$this->db->where('UNCD.UniversityCode',$search['UniversityCode']);
$this->db->order_by('UNCD.UniversityName',$search['UniversityName']);
$details = $this->db->get();

View File

@ -73,13 +73,31 @@ class Studentview_model extends CI_Model
$result['studentInfo'] = "";
}
}
// requestedFrom 4 for based on form get student details
else if ($requestFrom =='4'){
$this->db->select('ST.*');
$this->db->from( LOGIN . ' as LO');
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
$this->db->join( STUDENTCOURSE . ' as STC', 'STC.StudentID = ST.StudentID');
$this->db->where('ST.MobileNumber', $requestedBy);
$studentDetails = $this->db->get()->first_row();
if($studentDetails){
$result['studentStatus'] = true;
$result['studentDetails'] = $studentDetails;
// get student course details
$result['courseDetails'] = $this->getFormStudentCourse($studentDetails->StudentID,$requestFrom);
}
else{
$result['studentStatus'] = false;
$result['studentInfo'] = "";
}
}
return $result;
}
public function getStudentCourseStudentLogin($studentId=null,$requestFrom=null,$requestedBranch=null,$accessFrom=null){
// this sub query for avoid university duplicate id
$this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName');
$this->db->from( STUDENTCOURSE . ' as SCU');
@ -189,6 +207,53 @@ class Studentview_model extends CI_Model
return $studentCourseStatus;
}
/*
* get student course details
* created by kms
* */
public function getFormStudentCourse($studentId=null,$requestFrom=null){
$this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName');
$this->db->from( STUDENTCOURSE . ' as SCU');
$this->db->join( COURSE . ' as CU', 'CU.CourseID = SCU.CourseID');
$this->db->join( UNIVERSITY . ' as US', 'US.UniversityID = SCU.UniversityID AND SCU.BranchID=US.BranchCode');
$this->db->where('SCU.StudentID',$studentId);
$courseDetails = $this->db->get();
if($courseDetails->result()){
$studentCourseStatus['status'] = true;
foreach ($courseDetails->result() as $row){
$fetchData['CourseID']=$row->CourseID;
$fetchData['CourseName']=$row->CourseName;
$fetchData['UniversityID']=$row->UniversityID;
$fetchData['UniversityName']=$row->UniversityName;
$fetchData['UniveShortName'] = $row->UniversityShortName;
// $fetchData['SessionName']=$row->SessionName;
$fetchData['EnrollmentID']=$row->EnrollmentID;
// get student fees details
$fetchData['feesDetails']=$this->getStudentFeesDetails($studentId,$row->CourseID);
// get student boollet details
$fetchData['studyMaterialDetails']=$this->getStudentMaterialDetails($studentId,$row->CourseID);
// get application details
if($requestFrom!='2'){
$fetchData['applicationDetails']=$this->getStudentApplicationDetails($studentId,$row->CourseID);
$fetchData['answerbookletDetails']=$this->getStudentAnswerbookletDetails($studentId,$row->CourseID);
}
$fetchData['certificateDetails']=$this->getStudentCertificateDetails($studentId,$row->CourseID);
// get student Mark crad details
$fetchData['markCardDetails']=$this->getMarkcardDetails($studentId,$row->CourseID);
$CourseArray[]=$fetchData;
}
$studentCourseStatus['courseStatus'] = $CourseArray;
}
else{
$studentCourseStatus['status'] = false;
}
return $studentCourseStatus;
}
/*
* get student fees details

View File

@ -121,7 +121,7 @@
"formupload": {
"MAIN": "UNIVERSITY FORMS",
"ENROLLMENT": "Enrollment",
"STUDENTFEEDETAILCOMPARE": "Form Enrolment",
"STUDENTFEEDETAILCOMPARE": "Form Enrollment",
"STUDENTFROMIDFEEDETAILS": "Form Fees",
"UNIVERSITYFORMPAYMENT": "Payment"
},

View File

@ -726,3 +726,134 @@ $scope.exportDataTab3 = function () {
}
}]);
/*modal controller
* */
app.controller('studentModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope, $rootScope, $modal, $log,apiPoint,$http) {
//Tooltip for print button
$scope.dynamicTooltip = 'Student View';
// $scope.items = ['item1', 'item2', 'item3'];
$scope.open = function (studentDetails) {
// get student view details
var getcourse = {
method: 'POST',
url: apiPoint.url + 'getStudentBasicInfo/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy :studentDetails.MobileNumber,
requestedFrom: 4,
branchCode : JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getcourse).then(function (response) {
if (response.data.status == 200 && response.data.studentStatus== true) {
$scope.courseEditLoading = false;
// $scope.studentDetails = response.data.studentDetails;
$scope.studentDetails = response.data;
// $scope.courseDetails = response.data.courseDetails;
var modalInstance = $modal.open({
templateUrl: 'assets/views/student/studentDetailsModal.html',
controller: 'ModalInstanceCtrl',
// size: size,
resolve: {
items: function () {
return $scope.studentDetails;
}
}
});
modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
modalInstance.close();
});
} else {
swal("Failed!", "This student is not registerd", "warning");
$scope.courseEditLoading = false;
$scope.studentDetails = "";
$scope.courseDetails = "";
}
});
};
$scope.open1 = function (values,type) {
var modalInstance1 = $modal.open({
templateUrl: 'assets/views/student/studentPaymentModal.html',
controller: 'ModalInstanceCtrl1',
// size: size,
resolve: {
items1: function () {
var myvalues =
{
"values":values,
"type":type
};
return myvalues;
}
}
});
modalInstance1.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
modalInstance1.close();
});
};
$scope.printStudentDetails = function (details) {
$rootScope.pdfItems = details;
var printInstance = $modal.open({
templateUrl: 'assets/views/student/studentPdf.html',
controller: 'studentModalDemoCtrl',
});
};
// generate pdf for student view
$scope.export = function(getName) {
kendo.drawing.drawDOM($("#exportthis")).then(function(group) {
kendo.drawing.pdf.saveAs(group, getName+".pdf");
});
}
}]);
// Please note that $modalInstance represents a modal window (instance) dependency.
// It is not the same as the $modal service used above.
app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) {
$scope.items = items;
$scope.selected = {
item: $scope.items[0]
};
$scope.ok = function () {
$modalInstance.close($scope.selected.item);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);
app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1","WordsService", function ($scope, $modalInstance, items1,WordsService) {
$scope.items1 = items1.values;
$scope.selectedtype = items1.type;
$scope.ok = function () {
$modalInstance.close($scope.selected.item);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);

View File

@ -4,7 +4,7 @@
* Simple table with sorting and filtering on AngularJS
*/
app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert) {
app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', '$modal', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert, $modal) {
/**
* student university fee details compare
*/
@ -408,7 +408,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
$scope.semList=[];
$scope.studentInfo=[];
if(entryModel=='' || entryModel==null || entryModel==undefined){
swal("Warning","Please enter enrolment id", "error");
swal("Warning","Please enter enrollment id", "error");
}
else{
var getExistEnrol = {
@ -425,7 +425,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
$http(getExistEnrol).then(function (response) {
if (response.data.status == true) {
if(response.data.semDetails.length==0){
swal("Warning","Already form enrolment is created for all semester", "warning");
swal("Warning","In this enrollment have form id for all the semester", "warning");
}
else{
$scope.studentInfo=response.data.StudentInfo;
@ -457,7 +457,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
* */
$scope.manualEnrolmentSubmit = function (form) {
if($scope.manualEnModel.enrolmentNo=='' || $scope.manualEnModel.enrolmentNo==null || $scope.manualEnModel.enrolmentNo==undefined){
swal("Wraning","Please enter enrolment id", "warning");
swal("Wraning","Please enter enrollment id", "warning");
}
else if($scope.manualEnModel.sem=='' || $scope.manualEnModel.sem==null){
@ -499,4 +499,137 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
}
}]);
/*modal controller
* */
app.controller('studentModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope, $rootScope, $modal, $log,apiPoint,$http) {
//Tooltip for print button
$scope.dynamicTooltip = 'Student View';
// $scope.items = ['item1', 'item2', 'item3'];
$scope.open = function (studentDetails) {
// get student view details
var getcourse = {
method: 'POST',
url: apiPoint.url + 'getStudentBasicInfo/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy :studentDetails.MobileNumber,
requestedFrom: 4,
branchCode : JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getcourse).then(function (response) {
if (response.data.status == 200 && response.data.studentStatus== true) {
$scope.courseEditLoading = false;
// $scope.studentDetails = response.data.studentDetails;
$scope.studentDetails = response.data;
// $scope.courseDetails = response.data.courseDetails;
var modalInstance = $modal.open({
templateUrl: 'assets/views/student/studentDetailsModal.html',
controller: 'ModalInstanceCtrl',
// size: size,
resolve: {
items: function () {
return $scope.studentDetails;
}
}
});
modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
modalInstance.close();
});
} else {
swal("Failed!", "This student is not registerd", "warning");
$scope.courseEditLoading = false;
$scope.studentDetails = "";
$scope.courseDetails = "";
}
});
};
$scope.open1 = function (values,type) {
var modalInstance1 = $modal.open({
templateUrl: 'assets/views/student/studentPaymentModal.html',
controller: 'ModalInstanceCtrl1',
// size: size,
resolve: {
items1: function () {
var myvalues =
{
"values":values,
"type":type
};
return myvalues;
}
}
});
modalInstance1.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
modalInstance1.close();
});
};
$scope.printStudentDetails = function (details) {
$rootScope.pdfItems = details;
var printInstance = $modal.open({
templateUrl: 'assets/views/student/studentPdf.html',
controller: 'studentModalDemoCtrl',
});
};
// generate pdf for student view
$scope.export = function(getName) {
kendo.drawing.drawDOM($("#exportthis")).then(function(group) {
kendo.drawing.pdf.saveAs(group, getName+".pdf");
});
}
}]);
// Please note that $modalInstance represents a modal window (instance) dependency.
// It is not the same as the $modal service used above.
app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) {
$scope.items = items;
$scope.selected = {
item: $scope.items[0]
};
$scope.ok = function () {
$modalInstance.close($scope.selected.item);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);
app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1","WordsService", function ($scope, $modalInstance, items1,WordsService) {
$scope.items1 = items1.values;
$scope.selectedtype = items1.type;
$scope.ok = function () {
$modalInstance.close($scope.selected.item);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);

View File

@ -48,4 +48,22 @@ app.directive('disallowSpaces', function() {
});
}
};
});
app.filter('unique', function() {
return function(collection, primaryKey, secondaryKey) { //optional secondary key
var output = [],
keys = [];
angular.forEach(collection, function(item) {
var key;
secondaryKey === undefined ? key = item[primaryKey] : key = item[primaryKey][secondaryKey];
if(keys.indexOf(key) === -1) {
keys.push(key);
output.push(item);
}
});
return output;
};
});

View File

@ -43,7 +43,7 @@
<div class="row" ng-init="init()">
<tabset id="here" class="tabbable">
<tab tabindex="1" active="tabactive1" ng-click="tabActive('tabactive1')" heading="Matched Details" id="viewDetails">
<tab tabindex="1" active="tabactive1" ng-click="tabActive('tabactive1')" heading="View Matched" id="viewDetails">
<script>
$("#selectBranch").change(function () {
$("#searchIn").focus();
@ -52,7 +52,7 @@
});
</script>
<div class="col-md-12">
<button class="btn btn-sm btn-info" tabindex="2" style="float: right" ng-click="addManualEnrolemntDetails('1')">Add Enrollment Details</button>
<button class="btn btn-sm btn-info" tabindex="2" style="float: right" ng-click="addManualEnrolemntDetails('1')">Add Enrollment</button>
</div>
<div class="container" ng-show="enableEnrolment==true">
<form name="manualEnForm" id="manualEnForm" novalidate>
@ -214,11 +214,11 @@
<button class="btn btn-success btn-o" ng-click="exportData()" ng-if="studentData">Export to Excel</button>
</div>
<div class="table-responsive" ng-if="studentData">
<div class="table-responsive" ng-if="studentData" ng-controller="studentModalDemoCtrl">
<table class="table table-hover" >
<thead>
<tr>
<th> FormID
<th> Form ID
</th>
<th> Enrollment ID
</th>
@ -239,15 +239,13 @@
</thead>
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10| filter:query as results" pagination-id="matched">
<tr>
<td>
{{p.FormID}}
</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);"> {{p.FormID}}</a></td>
<td>{{p.EnrolmentNo}}</td>
<td>
{{p.FormType}}
</td>
<td>
<a class="text-dark">
<a tooltip="View Student" class="text-dark" ng-click="open(p);">
{{p.Firstname}} {{p.Lastname}}
</a>
<!--tooltip="View Student" ng-click="open(p);"-->
@ -295,7 +293,7 @@
</div>
</div>
</tab>
<tab tabindex="13" active="tabactive2" ng-click="tabActive('tabactive2')" heading="Un-Matched Details" id="unmatchedRecord">
<tab tabindex="13" active="tabactive2" ng-click="tabActive('tabactive2')" heading="View Unmatched" id="unmatchedRecord">
<div class="col-md-3 form-group">
<label for="form-field-select-2">
@ -356,7 +354,7 @@
<div ng-if="unMatchedRecordDetailsType == 'EnrolmentIDFile'">
<table class="table table-border table-hover" >
<thead>
<th>FormID</th>
<th>Form ID</th>
<th>Enrollment ID</th>
<th>SemesterYear</th>
<th>MobileNumber</th>
@ -377,7 +375,8 @@
</thead>
<tbody dir-paginate="p in unMatchedRecordDetails|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10| filter:query as results" pagination-id="unmatched">
<tr>
<td>{{p.FormID}}</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.FormID}}</a></td>
<td ng-if="p.EnromentStatus==true">{{p.EnrolmentNo}}</td>
<td ng-if="p.EnromentStatus==false"><span class="text-red"><b>{{p.EnrolmentNo}}</b></span></td>
<td ng-if="p.SemStatus==true">{{p.SemesterYear}}</td>

View File

@ -109,7 +109,7 @@
<button class="btn btn-success btn-o" ng-click="exportData()">Export to Excel</button>
</div>
<div class="table-responsive" ng-if="studentData">
<div class="table-responsive" ng-if="studentData" ng-controller="studentModalDemoCtrl">
<table class="table table-hover">
<thead>
<tr>
@ -174,7 +174,7 @@
<i class="ti-plus" ng-if="p.AddToAccountStatus != 1" tooltip="Add to Account State" ng-click="addToAccountState(p.ID);"></i>
</td>
<td>
{{p.FormID}}
<a tooltip="View Student" class="text-dark" ng-click="open(p);"> {{p.FormID}}</a>
</td>
<td>
{{p.FormType}}