切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
d1a0a5c99bbef159981145f5e875b2cb28c20599
1 个父辈
62d25e9b
1 个管道 的构建
通过
耗费 2 秒
api更新
变更
2
构建
2
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
48 行增加
和
25 行删除
application/api/controller/v2/User.php
public/api.html
application/api/controller/v2/User.php
查看文件 @
d1a0a5c
...
...
@@ -2,7 +2,6 @@
namespace
app\api\controller\v2
;
use
app\admin\controller\Factory
;
use
app\common\controller\Api
;
use
app\common\library\Ems
;
use
app\common\library\Sms
;
...
...
@@ -16,6 +15,8 @@ use addons\third\model\Third;
use
app\api\model\Realname
;
use
app\api\model\UserKeyword
;
use
app\api\model\WorkLog
;
use
app\api\model\Factory
;
use
app\api\model\FactoryUser
;
use
app\common\controller\Wechat
;
/**
...
...
@@ -24,7 +25,7 @@ use app\common\controller\Wechat;
*/
class
User
extends
Api
{
protected
$noNeedLogin
=
[
'login'
,
'mobilelogin'
,
'register'
,
'resetpwd'
,
'changeemail'
,
'changemobile'
,
'third'
,
'get_session_key'
,
'authority'
,
'getPhoneNumber'
,
'workSubsidyContent'
,
'recruitSubsidyContent'
];
protected
$noNeedLogin
=
[
'login'
,
'mobilelogin'
,
'register'
,
'resetpwd'
,
'changeemail'
,
'changemobile'
,
'third'
,
'get_session_key'
,
'authority'
,
'getPhoneNumber'
,
'workSubsidyContent'
,
'recruitSubsidyContent'
,
'factoryList'
];
protected
$noNeedRight
=
'*'
;
// 用户列表
...
...
@@ -71,7 +72,7 @@ class User extends Api
}
/**
* @ApiWeigh (9
9
)
* @ApiWeigh (9
7
)
* @ApiTitle (劳务管理-个人信息-工资)
* @ApiSummary (劳务管理-个人信息-工资)
* @ApiMethod (POST)
...
...
@@ -242,7 +243,7 @@ class User extends Api
}
/**
* @ApiWeigh (9
7
)
* @ApiWeigh (9
5
)
* @ApiTitle (编辑资料)
* @ApiSummary (编辑资料)
* @ApiMethod (POST)
...
...
@@ -430,7 +431,29 @@ class User extends Api
}
/**
* @ApiWeigh (95)
* @ApiWeigh (94)
* @ApiTitle (工厂列表)
* @ApiSummary (工厂列表)
* @ApiMethod (POST)
* @ApiReturn ({
"code": 1,
"msg": "入职成功后,驻厂将会为您服务",
"time": "1612233294",
"data": [{
"id": 1, //工厂ID
"factory_name": "新美亚电子(深圳)有限公司", //工厂名称
"factory_shortname": "" //工厂简称
}]
})
*/
public
function
factoryList
()
{
$list
=
Factory
::
field
(
'id,factory_name,factory_shortname'
)
->
select
();
$this
->
success
(
'入职成功后,驻厂将会为您服务'
,
$list
);
}
/**
* @ApiWeigh (93)
* @ApiTitle (确认入职)
* @ApiSummary (确认入职)
* @ApiMethod (POST)
...
...
@@ -465,7 +488,7 @@ class User extends Api
}
/**
* @ApiWeigh (9
5
)
* @ApiWeigh (9
1
)
* @ApiTitle (办理离职)
* @ApiSummary (办理离职)
* @ApiMethod (POST)
...
...
@@ -518,7 +541,7 @@ class User extends Api
}
/**
* @ApiWeigh (
95
)
* @ApiWeigh (
89
)
* @ApiTitle (实名认证)
* @ApiSummary (实名认证)
* @ApiMethod (POST)
...
...
@@ -555,7 +578,7 @@ class User extends Api
}
/**
* @ApiWeigh (
95
)
* @ApiWeigh (
87
)
* @ApiTitle (实名认证信息)
* @ApiSummary (实名认证信息)
* @ApiMethod (POST)
...
...
@@ -577,7 +600,7 @@ class User extends Api
}
/**
* @ApiWeigh (
93
)
* @ApiWeigh (
85
)
* @ApiTitle (code获取session_key和openid)
* @ApiSummary (code获取session_key和openid)
* @ApiMethod (POST)
...
...
@@ -625,7 +648,7 @@ class User extends Api
}
/**
* @ApiWeigh (
91
)
* @ApiWeigh (
83
)
* @ApiTitle (用户授权登录)
* @ApiSummary (用户授权登录)
* @ApiMethod (POST)
...
...
@@ -749,7 +772,7 @@ class User extends Api
}
/**
* @ApiWeigh (8
9
)
* @ApiWeigh (8
1
)
* @ApiTitle (用户授权获取手机号)
* @ApiSummary (用户授权获取手机号)
* @ApiMethod (POST)
...
...
@@ -803,7 +826,7 @@ class User extends Api
}
/**
* @ApiWeigh (
87
)
* @ApiWeigh (
79
)
* @ApiTitle (工时补贴介绍)
* @ApiSummary (工时补贴介绍)
* @ApiMethod (POST)
...
...
@@ -820,7 +843,7 @@ class User extends Api
}
/**
* @ApiWeigh (
85
)
* @ApiWeigh (
77
)
* @ApiTitle (招聘补贴介绍)
* @ApiSummary (招聘补贴介绍)
* @ApiMethod (POST)
...
...
@@ -837,7 +860,7 @@ class User extends Api
}
/**
* @ApiWeigh (
8
5)
* @ApiWeigh (
7
5)
* @ApiTitle (记一笔工时)
* @ApiSummary (记一笔工时)
* @ApiMethod (POST)
...
...
@@ -854,7 +877,9 @@ class User extends Api
})
*/
public
function
logWork
(){
$user
=
$this
->
auth
->
getUser
();
$post
=
$this
->
request
->
param
();
$user
[
'is_work'
]
!=
'1'
&&
$this
->
error
(
'未入职,无法记录工时'
);
empty
(
$post
[
'work_date'
])
&&
$this
->
error
(
'请选择工作日期'
);
empty
(
$post
[
'work_type'
])
&&
$this
->
error
(
'请选择班次'
);
$work_salary
=
0
;
...
...
@@ -863,8 +888,6 @@ class User extends Api
empty
(
$post
[
'work_price'
])
&&
$this
->
error
(
'请填写工价'
);
$work_salary
=
round
(
$post
[
'work_hours'
]
*
$post
[
'work_price'
],
2
);
}
$user
=
$this
->
auth
->
getUser
();
$user
[
'is_work'
]
!=
'1'
&&
$this
->
error
(
'未入职,无法记录工时'
);
$post
[
'work_date'
]
=
strtotime
(
$post
[
'work_date'
]);
//日期转时间戳
$log
=
WorkLog
::
where
(
'user_id'
,
$this
->
auth
->
id
)
->
where
(
'work_date'
,
$post
[
'work_date'
])
->
find
();
if
(
!
$log
){
...
...
@@ -916,7 +939,7 @@ class User extends Api
}
/**
* @ApiWeigh (
85
)
* @ApiWeigh (
73
)
* @ApiTitle (工时详情)
* @ApiSummary (工时详情)
* @ApiMethod (POST)
...
...
@@ -937,7 +960,7 @@ class User extends Api
}
/**
* @ApiWeigh (
85
)
* @ApiWeigh (
71
)
* @ApiTitle (工时统计图)
* @ApiSummary (工时统计图)
* @ApiMethod (POST)
...
...
@@ -964,7 +987,7 @@ class User extends Api
}
/**
* @ApiWeigh (
85
)
* @ApiWeigh (
69
)
* @ApiTitle (借支-打卡天数)
* @ApiSummary (借支-打卡天数)
* @ApiMethod (POST)
...
...
@@ -992,7 +1015,7 @@ class User extends Api
}
/**
* @ApiWeigh (
85
)
* @ApiWeigh (
67
)
* @ApiTitle (借支)
* @ApiSummary (借支)
* @ApiMethod (POST)
...
...
@@ -1024,7 +1047,7 @@ class User extends Api
}
/**
* @ApiWeigh (
8
5)
* @ApiWeigh (
6
5)
* @ApiTitle (分享)
* @ApiSummary (分享)
* @ApiMethod (POST)
...
...
@@ -1090,7 +1113,7 @@ class User extends Api
}
/**
* @ApiWeigh (
8
3)
* @ApiWeigh (
6
3)
* @ApiTitle (下级)
* @ApiSummary (下级)
* @ApiMethod (POST)
...
...
@@ -1170,7 +1193,7 @@ class User extends Api
}
/**
* @ApiWeigh (
8
1)
* @ApiWeigh (
6
1)
* @ApiTitle (搜索历史)
* @ApiSummary (搜索历史)
* @ApiMethod (POST)
...
...
@@ -1196,7 +1219,7 @@ class User extends Api
}
/**
* @ApiWeigh (
7
9)
* @ApiWeigh (
5
9)
* @ApiTitle (搜索历史-清空)
* @ApiSummary (搜索历史-清空)
* @ApiMethod (POST)
...
...
@@ -1217,7 +1240,7 @@ class User extends Api
}
/**
* @ApiWeigh (
7
7)
* @ApiWeigh (
5
7)
* @ApiTitle (下级的下级)
* @ApiSummary (下级的下级)
* @ApiMethod (POST)
...
...
public/api.html
查看文件 @
d1a0a5c
此 diff 太大无法显示。
请
注册
或
登录
后发表评论