Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-micro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
without authentication
meibuyu-micro
Commits
2c6a8b77
Commit
2c6a8b77
authored
Nov 16, 2020
by
fuyunnan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature-batch-order
parents
a2aa335f
a9cebe61
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
135 additions
and
15 deletions
+135
-15
MaterialCategory.php
src/Constants/MaterialCategory.php
+5
-2
DingUserServiceInterface.php
src/Service/Interfaces/DingTalk/DingUserServiceInterface.php
+2
-7
MessageServiceInterface.php
src/Service/Interfaces/MessageServiceInterface.php
+3
-4
StoreMaterialServiceInterface.php
...ervice/Interfaces/Store/StoreMaterialServiceInterface.php
+98
-2
functions.php
src/functions.php
+27
-0
No files found.
src/Constants/MaterialCategory.php
View file @
2c6a8b77
...
...
@@ -16,6 +16,9 @@ class MaterialCategory
const
LI_BU
=
3
;
// 里布
const
HAO_CAI
=
4
;
// 耗材
const
FU_LIAO_WAREHOUSE
=
33
;
const
MIAN_LIAO_WAREHOUSE
=
36
;
/**
* 通过原料类型获取对应仓库id
* @param $categoryId
...
...
@@ -27,10 +30,10 @@ class MaterialCategory
switch
(
$categoryId
)
{
case
self
::
FU_LIAO
:
case
self
::
HAO_CAI
:
return
33
;
return
self
::
FU_LIAO_WAREHOUSE
;
case
self
::
MIAN_LIAO
:
case
self
::
LI_BU
:
return
36
;
return
self
::
MIAN_LIAO_WAREHOUSE
;
default
:
throw
new
\Exception
(
"原料类型不存在"
);
}
...
...
src/Service/Interfaces/DingTalk/DingUserServiceInterface.php
View file @
2c6a8b77
...
...
@@ -17,15 +17,10 @@ interface DingUserServiceInterface
public
function
getByDingUserId
(
$ding_user_id
)
:
array
;
/**
* 通过部门id获取部门分页用户列表
* @param string $departmentId 部门id
* @param int $offset
* @param int $size
* @param string|null $order
* @param string|null $lang
* 获取部门用户列表
* @return array
*/
public
function
getD
epartmentUsers
(
string
$departmentId
,
int
$offset
,
int
$size
,
string
$order
=
null
,
string
$lang
=
null
)
:
array
;
public
function
getD
ingUserLists
(
)
:
array
;
/**
* 通过临时授权码获取用户信息
...
...
src/Service/Interfaces/MessageServiceInterface.php
View file @
2c6a8b77
...
...
@@ -52,11 +52,10 @@ interface MessageServiceInterface
/**
* 发送短信
* @param array $phone 电话号码 示例['175523181**','18621137***']
* @param array $sign 签名 示例['花无缺OA系统',"花无缺OA系统"]
* @param string $phone 电话号码 示例'175523181**'
* @param string $templateCode 模板code 1.取消订单通知 'SMS_205395200' 2.派单提醒 'SMS_205390191' 3.返工提醒 'SMS_205390196' 4.通知类型 'SMS_205134732'
* @param array $params 模板中替换的变量 示例传入格式:[
['product'=>'AE1222'],['product'=>'Ab23232']
]
* @param array $params 模板中替换的变量 示例传入格式:[
'product'=>'AE1222'
]
* @return bool
*/
public
function
sendSms
(
array
$phone
,
array
$sign
,
string
$templateCode
,
array
$params
)
:
bool
;
public
function
sendSms
(
string
$phone
,
string
$templateCode
,
array
$params
)
:
bool
;
}
src/Service/Interfaces/Store/StoreMaterialServiceInterface.php
View file @
2c6a8b77
...
...
@@ -36,4 +36,100 @@ interface StoreMaterialServiceInterface
* Date: 2020/7/6
*/
public
function
createMaterialWarehousing
(
array
$attributes
)
:
array
;
/**
* description:批量创建入库单
* author: fuyunnan
* @param
* @return array
* @throws
* Date: 2020/10/31
*/
public
function
createBatchMaterialWarehousing
(
$attributes
)
:
array
;
/**
* description:批量创建出库单
* author: fuyunnan
* @param
* @return array
* @throws
* Date: 2020/10/31
*/
public
function
createBatchExMaterialWarehouse
(
$attributes
)
:
array
;
/**
* description:批量修改入库单
* author: fuyunnan
* @param
* @return array
* @throws
* Date: 2020/10/31
*/
public
function
updateBatchMaterialWarehousing
(
$attributes
)
:
array
;
/**
* description:批量修改出库单
* author: fuyunnan
* @param
* @return array
* @throws
* Date: 2020/10/31
*/
public
function
updateBatchExMaterialWarehouse
(
$attributes
)
:
array
;
/**
* description:通过原料id数组获取库存列表 给订单系统查询的接口 返回当前原料分组后的库存
* author: fuyunnan
* @param array $ids 原料ids 数组
* @param array $wareIds 仓库数组id
* @return array
* @throws
* Date: 2020/7/27
*/
public
function
getGroupMaterialStock
(
$ids
,
$wareIds
=
[])
:
array
;
/**
* description:批量查看入库单信息
* author: fuyunnan
* @param array $ids 入库单ids数组
* @param array $relations 关联关系 ['material_warehousing_order_materials']
* @return array
* @throws
* Date: 2020/10/31
*/
public
function
showBatchWarehousing
(
$ids
,
$relations
=
[])
:
array
;
/**
* description:批量查看出库单信息
* author: fuyunnan
* @param array $ids 出库单ids数组
* @param array $relations 关联关系 ['material_ex_warehouse_order_materials']
* @return array
* @throws
* Date: 2020/10/31
*/
public
function
showBatchExeWarehouse
(
$ids
,
$relations
=
[])
:
array
;
/**
* description:批量调拨库存方法
* author: fuyunnan
* @param array $data 表单
* @return array
* @throws
* Date: 2020/11/3
*/
public
function
transferToStock
(
$data
)
:
array
;
/**
* description:整合 先出库 然后 再入库数量 失败回滚
* author: fuyunnan
* @param array $outData 出库数组
* @param array $inData 出库数组
* @return array
* @throws
* Date: 2020/11/5
*/
public
function
transferUpdateOutAfterIn
(
$outData
,
$inData
)
:
array
;
}
src/functions.php
View file @
2c6a8b77
...
...
@@ -787,3 +787,30 @@ if (!function_exists('str_replace_first')) {
return
$subject
;
}
}
if
(
!
function_exists
(
'create_file_dir'
))
{
/**
* 检查当前目录是否存在 不存在就创建一个目录
* @param mixed $dir 文件目录
* @return bool
* @author zero
*/
function
create_file_dir
(
$dir
)
{
return
!
is_dir
(
$dir
)
&&
mkdir
(
$dir
,
0777
,
true
);
}
}
if
(
!
function_exists
(
'get_images_url'
))
{
/**
* 富文本获取图片信息
* @param $str
* @return mixed
*/
function
get_images_url
(
$str
)
{
preg_match
(
'/<img.+src=\"?(.+\.(jpg|gif|bmp|bnp|png))\"?.+>/i'
,
$str
,
$match
);
return
$match
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment