Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
62ed476d
Commit
62ed476d
authored
Apr 27, 2021
by
季圣华
Browse files
增加用户分配功能和用户分配按钮功能
parent
1882d8cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/controller/DepotController.java
View file @
62ed476d
...
...
@@ -67,7 +67,7 @@ public class DepotController {
* @param request
* @return
*/
@
Pos
tMapping
(
value
=
"/findUserDepot"
)
@
Ge
tMapping
(
value
=
"/findUserDepot"
)
public
JSONArray
findUserDepot
(
@RequestParam
(
"UBType"
)
String
type
,
@RequestParam
(
"UBKeyId"
)
String
keyId
,
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
...
...
@@ -75,16 +75,21 @@ public class DepotController {
List
<
Depot
>
dataList
=
depotService
.
findUserDepot
();
//开始拼接json数据
JSONObject
outer
=
new
JSONObject
();
outer
.
put
(
"id"
,
1
);
outer
.
put
(
"text"
,
"仓库列表"
);
outer
.
put
(
"state"
,
"open"
);
outer
.
put
(
"id"
,
0
);
outer
.
put
(
"key"
,
0
);
outer
.
put
(
"value"
,
0
);
outer
.
put
(
"title"
,
"仓库列表"
);
outer
.
put
(
"attributes"
,
"仓库列表"
);
//存放数据json数组
JSONArray
dataArray
=
new
JSONArray
();
if
(
null
!=
dataList
)
{
for
(
Depot
depot
:
dataList
)
{
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"id"
,
depot
.
getId
());
item
.
put
(
"text"
,
depot
.
getName
());
item
.
put
(
"key"
,
depot
.
getId
());
item
.
put
(
"value"
,
depot
.
getId
());
item
.
put
(
"title"
,
depot
.
getName
());
item
.
put
(
"attributes"
,
depot
.
getName
());
//勾选判断1
Boolean
flag
=
false
;
try
{
...
...
jshERP-boot/src/main/java/com/jsh/erp/controller/FunctionController.java
View file @
62ed476d
...
...
@@ -203,10 +203,9 @@ public class FunctionController {
if
(
null
!=
dataList
)
{
for
(
Function
function
:
dataList
)
{
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"Id"
,
function
.
getId
());
item
.
put
(
"Name"
,
function
.
getName
());
item
.
put
(
"PushBtn"
,
function
.
getPushBtn
());
item
.
put
(
"op"
,
1
);
item
.
put
(
"id"
,
function
.
getId
());
item
.
put
(
"name"
,
function
.
getName
());
item
.
put
(
"pushBtn"
,
function
.
getPushBtn
());
dataArray
.
add
(
item
);
}
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/controller/SupplierController.java
View file @
62ed476d
...
...
@@ -246,7 +246,7 @@ public class SupplierController {
* @param request
* @return
*/
@
Pos
tMapping
(
value
=
"/findUserCustomer"
)
@
Ge
tMapping
(
value
=
"/findUserCustomer"
)
public
JSONArray
findUserCustomer
(
@RequestParam
(
"UBType"
)
String
type
,
@RequestParam
(
"UBKeyId"
)
String
keyId
,
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
...
...
@@ -254,16 +254,21 @@ public class SupplierController {
List
<
Supplier
>
dataList
=
supplierService
.
findUserCustomer
();
//开始拼接json数据
JSONObject
outer
=
new
JSONObject
();
outer
.
put
(
"id"
,
1
);
outer
.
put
(
"text"
,
"客户列表"
);
outer
.
put
(
"state"
,
"open"
);
outer
.
put
(
"id"
,
0
);
outer
.
put
(
"key"
,
0
);
outer
.
put
(
"value"
,
0
);
outer
.
put
(
"title"
,
"客户列表"
);
outer
.
put
(
"attributes"
,
"客户列表"
);
//存放数据json数组
JSONArray
dataArray
=
new
JSONArray
();
if
(
null
!=
dataList
)
{
for
(
Supplier
supplier
:
dataList
)
{
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"id"
,
supplier
.
getId
());
item
.
put
(
"text"
,
supplier
.
getSupplier
());
item
.
put
(
"key"
,
supplier
.
getId
());
item
.
put
(
"value"
,
supplier
.
getId
());
item
.
put
(
"title"
,
supplier
.
getSupplier
());
item
.
put
(
"attributes"
,
supplier
.
getSupplier
());
//勾选判断1
Boolean
flag
=
false
;
try
{
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/functions/FunctionService.java
View file @
62ed476d
...
...
@@ -195,7 +195,7 @@ public class FunctionService {
public
List
<
Function
>
findByIds
(
String
functionsIds
)
throws
Exception
{
List
<
Long
>
idList
=
StringUtil
.
strToLongList
(
functionsIds
);
FunctionExample
example
=
new
FunctionExample
();
example
.
createCriteria
().
andEnabledEqualTo
(
true
).
andIdIn
(
idList
)
example
.
createCriteria
().
andEnabledEqualTo
(
true
).
andIdIn
(
idList
)
.
andPushBtnIsNotNull
().
andPushBtnNotEqualTo
(
""
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"Sort asc"
);
List
<
Function
>
list
=
null
;
...
...
Write
Preview
Supports
Markdown
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