本文整理汇总了PHP中lukisongroup\hrd\models\Employe类的典型用法代码示例。如果您正苦于以下问题:PHP Employe类的具体用法?PHP Employe怎么用?PHP Employe使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Employe类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
/**
* ACTION INDEX
*/
public function actionIndex()
{
/*CNT Active Employe*/
$cntAktifEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <> 3 AND EMP_STS<>3";
$cntAktifEmp = Employe::findBySql($cntAktifEmploye)->one();
/*CNT Probation Employe*/
$cntProbationEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS=0";
$cntProbaEmp = Employe::findBySql($cntProbationEmploye)->one();
/*CNT Kontrak Employe*/
$cntContrakEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS=2";
$cntContrak = Employe::findBySql($cntContrakEmploye)->one();
/*CNT Tetap Employe*/
$cntTetapEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS=1";
$cntTetapEmp = Employe::findBySql($cntTetapEmploye)->one();
/*CNT Support Employe*/
$cntSupportEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS<>3 AND SEQ_ID=1";
$cntSptEmp = Employe::findBySql($cntSupportEmploye)->one();
/*CNT Bisnis Employe*/
$cntBisnisEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS<>3 AND SEQ_ID=2";
$cntBisnisEmp = Employe::findBySql($cntBisnisEmploye)->one();
/*CNT GenderM Employe*/
$cntGenderMEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS<>3 AND EMP_GENDER='Male'";
$cntGenderMEmp = Employe::findBySql($cntGenderMEmploye)->one();
/*CNT GenderF Employe*/
$cntGenderFmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE STATUS <>3 AND EMP_STS<>3 AND EMP_GENDER='Female'";
$cntGenderFEmp = Employe::findBySql($cntGenderFmploye)->one();
/*CNT Resign Employe*/
$cntResignEmploye = "SELECT COUNT(EMP_ID) as EMP_ID FROM a0001 WHERE EMP_STS=3";
$cntResignEmp = Employe::findBySql($cntResignEmploye)->one();
return $this->render('index', ['cntAktifEmp' => $cntAktifEmp->EMP_ID, 'cntProbaEmp' => $cntProbaEmp->EMP_ID, 'cntContrak' => $cntContrak->EMP_ID, 'cntTetapEmp' => $cntTetapEmp->EMP_ID, 'cntSptEmp' => $cntSptEmp->EMP_ID, 'cntBisnisEmp' => $cntBisnisEmp->EMP_ID, 'cntGenderMEmp' => $cntGenderMEmp->EMP_ID, 'cntGenderFEmp' => $cntGenderFEmp->EMP_ID, 'cntResignEmp' => $cntResignEmp->EMP_ID]);
}
示例2: getEmpid
/**
* Finds record by EMP_ID
* @return EMP_ID|null
* Also can use | $model = Employe::find()->where(['EMP_ID' => Yii::$app->user->identity->EMP_ID])->one();
* @author ptrnov <piter@lukison.com>
* @since 1.1
*/
public function getEmpid()
{
if ($this->_empid === false) {
$this->_empid = Employe::find()->where(['EMP_ID' => Yii::$app->user->identity->EMP_ID])->one();
}
return $this->_empid;
}
示例3: findModel
/**
* CLASS TABLE FIND PrimaryKey
* Example: Employe::find()
*/
protected function findModel($id)
{
if (($model = Employe::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
示例4: get_aryPerson
/**
*array employe
**/
public function get_aryPerson()
{
$emp = \lukisongroup\hrd\models\Employe::find()->where('STATUS<>3')->all();
// $sql = 'SELECT EMP_NM,EMP_NM_BLK FROM dbm002.`a0001`
// WHERE NOT EXISTS
// (SELECT PERSON_NAME FROM m0003 WHERE PERSON_NAME = EMP_NM);';
// $exec = Yii::$app->db_widget->createCommand($sql)->queryAll();
return $dropemploy = ArrayHelper::map($emp, 'EMP_NM', function ($emp, $defaultValue) {
return $emp['EMP_NM'] . ' ' . $emp['EMP_NM_BLK'];
});
}
示例5: getEmpid
/**
* Finds record by EMP_ID
* @return EMP_ID|null
* Also can use | $model = Employe::find()->where(['EMP_ID' => Yii::$app->user->identity->EMP_ID])->one();
* @author ptrnov <piter@lukison.com>
* @since 1.1
*/
public function getEmpid($empIdIdentity)
{
if ($this->_empid === false) {
$this->_empid = Employe::find()->where(['EMP_ID' => $empIdIdentity])->one();
}
return $this->_empid;
}
示例6: getPermission
use kartik\grid\GridView;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\bootstrap\Modal;
use kartik\form\ActiveForm;
use kartik\tabs\TabsX;
/* namespace models */
use lukisongroup\master\models\Suplier;
use lukisongroup\hrd\models\Employe;
use lukisongroup\hrd\models\Corp;
/* array*/
$selectCorp = ArrayHelper::map(Corp::find()->where('CORP_STS<>3')->all(), 'CORP_ID', 'CORP_NM');
$poParentArray = [['ID' => 'POA', 'DESCRIP' => 'PO Plus'], ['ID' => 'POB', 'DESCRIP' => 'PO General'], ['ID' => 'POC', 'DESCRIP' => 'PO Product']];
$poParent = ArrayHelper::map($poParentArray, 'ID', 'DESCRIP');
$idEmp = Yii::$app->user->identity->EMP_ID;
$emp = Employe::find()->where(['EMP_ID' => $idEmp])->one();
$kr = $emp->DEP_SUB_ID;
$this->title = 'Purchaseorder';
$this->params['breadcrumbs'][] = $this->title;
?>
<?php
/*
* Declaration Componen User Permission
* Function getPermission
* Modul Name[3=PO]
*/
function getPermission()
{
if (Yii::$app->getUserOpt->Modul_akses('3')) {
return Yii::$app->getUserOpt->Modul_akses('3');
示例7: getEmployee
public function getEmployee()
{
return $this->hasOne(Employe::className(), ['EMP_ID' => 'CREATED_BY']);
}
示例8: actionCreate
/**
* Creates a new Berita model.
*if save successful,then save on bt0001notify
* If creation is successful, the browser will be redirected to the 'detail-berita' page.
* @return mixed
*/
public function actionCreate()
{
$model = new Berita();
/* image berita*/
$beritaimage = new BeritaImage();
/* data departement using select 2 */
$datadep = ArrayHelper::map(Dept::find()->where('DEP_STS <>3')->asArray()->all(), 'DEP_ID', 'DEP_NM');
/* data Employe using select 2 */
$dataemploye = ArrayHelper::map(Employe::find()->where('EMP_STS <>3')->asArray()->all(), 'EMP_ID', 'EMP_NM');
/* componen user */
$profile = Yii::$app->getUserOpt->profile_user()->emp;
$emp_img = $profile->EMP_IMG;
$emp_img_base64 = $profile->IMG_BASE64;
/* foto profile */
if ($emp_img_base64 == '') {
$foto_profile = Html::img(Yii::getAlias('@web') . '/upload/hrd/Employee/default.jpg', ['width' => '130', 'height' => '130', 'align' => 'center', 'class' => 'img-thumbnail']);
} else {
$foto_profile = Html::img('data:image/jpg;base64,' . $emp_img_base64, ['width' => '130', 'height' => '130', 'align' => 'center', 'class' => 'img-thumbnail']);
}
/* proses save */
if ($model->load(Yii::$app->request->post())) {
/* not usage
*checkbox using filter author : wawan
*if checkbox equal 1 then kd_dep result 0
*/
// $post = Yii::$app->request->post();
// $checkbox = $post['Berita']['alluser'];
// if($checkbox == 1)
// {
// $model->KD_DEP = '0';
// }
/* generate kode berita*/
$GneratekodeBerita = \Yii::$app->ambilkonci->getBeritaCode();
$model->KD_BERITA = $GneratekodeBerita;
//componen
$model->KD_CORP = Yii::$app->getUserOpt->Profile_user()->emp->EMP_CORP_ID;
$model->CREATED_BY = Yii::$app->user->identity->EMP_ID;
$model->CREATED_ATCREATED_BY = date('Y-m-d H:i:s');
if ($model->save()) {
$update_image_upload = BeritaImage::updateAll(['KD_BERITA' => $model->KD_BERITA], 'ID_USER="' . $profile->EMP_ID . '"AND KD_BERITA = ""');
/* connection db widget */
$connection = Yii::$app->db_widget;
/* date for field CREATED_AT */
$date = date('Y-m-d');
/* search employee */
$search_depemploye = Employe::find()->where(['DEP_ID' => $model->KD_DEP])->asArray()->all();
/* batch insert for many value*/
foreach ($search_depemploye as $key => $value) {
# code...
$connection->createCommand()->batchInsert('bt0001notify', ['KD_BERITA', 'ID_USER', 'CREATED_BY', 'CREATED_AT'], [[$model->KD_BERITA, $value['EMP_ID'], $profile->EMP_ID, $date]])->execute();
}
/*explode string to array using function explode php*/
$emp_id = explode(",", $model->USER_CC);
/* foreach array using save Bt001notify */
foreach ($emp_id as $value) {
$notifusercc = new BeritaNotify();
# code...
$notifusercc->KD_BERITA = $model->KD_BERITA;
$notifusercc->ID_USER = $value;
$notifusercc->CREATED_BY = $profile->EMP_ID;
$notifusercc->CREATED_AT = $date;
$notifusercc->save();
}
}
return $this->redirect(['detail-berita', 'KD_BERITA' => $model->KD_BERITA]);
} else {
/* delete image if KD_BERITA equal null */
$deleteupload = BeritaImage::deleteAll(['KD_BERITA' => '', 'ID_USER' => $profile->EMP_ID]);
return $this->renderAjax('create', ['model' => $model, 'datadep' => $datadep, 'beritaimage' => $beritaimage, 'emp_img' => $emp_img, 'foto_profile' => $foto_profile, 'dataemploye' => $dataemploye]);
}
}
示例9:
echo Html::a('<i class="fa fa-check"></i> Konfirmasi', ['confirmdir', 'kdpo' => $model->KD_PO], ['class' => 'btn btn-success btn-xs']);
?>
<!-- button class="btn btn-danger btn-xs"><i class="fa fa-times"></i> Tolak</button -->
<?php
//} }
//}
?>
</td>
</tr>
<tr>
<td>
<?php
$crte = Employe::find()->where(['EMP_ID' => $model->CREATE_BY])->one();
?>
<b><u><?php
echo $crte->EMP_NM . ' ' . $crte->EMP_NM_BLK;
?>
</u></b><br/>
Purchaser
</td>
<td>
<b><u>
<?php
/* if($model->APPROVE_BY == ''){
echo "***************";
} else {
$apprv = Employe::find()->where(['EMP_ID'=>$model->APPROVE_BY])->one();
示例10: function
<?php
use yii\helpers\Html;
use kartik\form\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\widgets\Select2;
use kartik\widgets\FileInput;
use kartik\widgets\DepDrop;
use yii\helpers\Url;
use lukisongroup\hrd\models\Employe;
#$aryEmployee = ArrayHelper::map(Employe::find()->all(),'EMP_ID','EMP_NM');
$aryEmployee = ArrayHelper::map(Employe::find()->all(), 'EMP_ID', function ($model, $defaultValue) {
return $model->EMP_NM . '-' . $model->EMP_NM_BLK;
});
/* @var $this yii\web\View */
/* @var $model lukisongroup\hrd\models\Kar_finger */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="kar-finger-form">
<?php
$form = ActiveForm::begin(['id' => 'finger-employe', 'enableClientValidation' => true, 'method' => 'post', 'action' => ['/hrd/absen-maintain/finger-emp-save']]);
?>
<?php
echo $form->field($model, 'TerminalID')->hiddenInput(['value' => $modelView->TerminalID, 'maxlength' => true])->label(false);
?>
<?php
echo $form->field($model, 'mesinNm')->textInput(['value' => $modelView->Machine_nm, 'maxlength' => true, 'readonly' => true])->label('Machine ID');
示例11: SIGN_1
function SIGN_1($acara)
{
$data = Employe::find()->where(['EMP_ID' => $acara[0]->SIG1_ID])->one();
return $data->SIGSVGBASE64;
}
示例12: getApprove
public function getApprove()
{
return $this->hasOne(Employe::className(), ['EMP_ID' => 'APPROVE_DIR']);
}
示例13: actionIndex
/**
* Lists all Scheduleheader models.
* @return mixed
*/
public function actionIndex()
{
$aryDataProviderRptScdl = new ArrayDataProvider(['key' => 'ID', 'allModels' => Yii::$app->db_esm->createCommand("CALL ERP_CUSTOMER_VISIT_SchaduleReport('2016-06-30')")->queryAll(), 'pagination' => ['pageSize' => 50]]);
$attributeField = $aryDataProviderRptScdl->allModels[0];
//get label Array 0
$searchModel = new ScheduleheadertempSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$searchModel1 = new ScheduleheadertempSearch();
$dataProvider1 = $searchModel->searchid(Yii::$app->request->queryParams);
$searchModelUser = new UserloginSearch();
$dataProviderUser = $searchModelUser->searchCustGroup(Yii::$app->request->queryParams);
$model = new Scheduleheader();
// data select2 for SCDL_GROUP
$query = Schedulegroup::find()->all();
$datagroup = ArrayHelper::map($query, 'ID', 'SCDL_GROUP_NM');
// data select2 for SCDL_GROUP_NM
$query = Schedulegroup::find()->all();
$datagroup_nm = ArrayHelper::map($query, 'SCDL_GROUP_NM', 'SCDL_GROUP_NM');
// data select2 for USER_ID where CRM and STATUS 10(active)
$query1 = Userlogin::find()->where('POSITION_SITE = "CRM" AND STATUS = 10')->all();
$datauser = ArrayHelper::map($query1, 'id', 'username');
//componen user option
$profile = Yii::$app->getUserOpt->Profile_user()->emp;
$id = $profile->EMP_ID;
$user_profile = Employe::find()->where(['EMP_ID' => $id])->one();
return $this->render('index', ['dataProviderUser' => $dataProviderUser, 'searchModelUser' => $searchModelUser, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'searchModel1' => $searchModel1, 'dataProvider1' => $dataProvider1, 'model' => $model, 'datagroup' => $datagroup, 'datauser' => $datauser, 'aryDataProviderRptScdl' => $aryDataProviderRptScdl, 'attributeField' => $attributeField, 'user_profile' => $user_profile, 'datagroup_nm' => $datagroup_nm]);
}
示例14: getAgendaTbl2
public function getAgendaTbl2()
{
return $this->hasOne(Employe::className(), ['EMP_ID' => 'PIC']);
}
示例15:
} else {
$apprv = Employe::find()->where(['EMP_ID' => $model->APPROVE_BY])->one();
echo $apprv->EMP_NM . ' ' . $apprv->EMP_NM_BLK;
}
?>
</u></b><br/>
F & A
</td>
<td>
<b><u>
<?php
if ($model->APPROVE_DIR == '') {
echo "***************";
} else {
$apprv = Employe::find()->where(['EMP_ID' => $model->APPROVE_DIR])->one();
echo $apprv->EMP_NM . ' ' . $apprv->EMP_NM_BLK;
}
?>
</u></b><br/>
Director
</td>
</tr>
</table>
</div>
<div class="col-xs-4 col-sm-2 col-md-2" >