Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
位宇华
klck
Commits
89e13894
Commit
89e13894
authored
Aug 29, 2023
by
lenovo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规则详情修改,物料转换修改
parent
6f9872d4
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
98 additions
and
37 deletions
+98
-37
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesConvertController.java
...ruoyi/system/controller/ActSuppliesConvertController.java
+3
-19
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesRoleDetailController.java
...yi/system/controller/ActSuppliesRoleDetailController.java
+15
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActOperation.java
...s/src/main/java/com/ruoyi/system/domain/ActOperation.java
+23
-5
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleDetailMapper.java
.../com/ruoyi/system/mapper/ActSuppliesRoleDetailMapper.java
+2
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesConvertService.java
.../com/ruoyi/system/service/IActSuppliesConvertService.java
+1
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesRoleDetailService.java
...m/ruoyi/system/service/IActSuppliesRoleDetailService.java
+3
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesConvertServiceImpl.java
...yi/system/service/impl/ActSuppliesConvertServiceImpl.java
+23
-2
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleDetailServiceImpl.java
...system/service/impl/ActSuppliesRoleDetailServiceImpl.java
+5
-0
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesConverMapper.xml
.../main/resources/mapper/system/ActSuppliesConverMapper.xml
+4
-1
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
...n/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
+4
-1
ruoyi-ui/src/api/system/suppliesroledetail.js
ruoyi-ui/src/api/system/suppliesroledetail.js
+7
-1
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
+8
-6
No files found.
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesConvertController.java
View file @
89e13894
...
@@ -93,27 +93,11 @@ public class ActSuppliesConvertController extends BaseController{
...
@@ -93,27 +93,11 @@ public class ActSuppliesConvertController extends BaseController{
@PostMapping
(
"/converSupplies"
)
@PostMapping
(
"/converSupplies"
)
public
TableDataInfo
convertSupplies
(
@RequestBody
String
[]
names
){
public
TableDataInfo
convertSupplies
(
@RequestBody
String
[]
names
){
List
<
String
>
name
=
Arrays
.
asList
(
names
);
List
<
ActOperation
>
list
=
actSuppliesConvertService
.
converSupplies
(
name
);
name
=
name
.
stream
()
.
map
(
str
->
{
if
(
str
==
null
)
{
return
null
;
// 保留原始的null值
}
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
if
(
str
.
equals
(
list
.
get
(
i
).
getDetaliesName
()))
{
return
list
.
get
(
i
).
getSuppliesName
();
}
}
return
str
;
})
.
collect
(
Collectors
.
toList
());
return
getDataTable
(
name
);
}
List
<
String
>
list
=
actSuppliesConvertService
.
converSupplies
(
names
);
return
getDataTable
(
list
);
}
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesRoleDetailController.java
View file @
89e13894
...
@@ -32,7 +32,7 @@ public class ActSuppliesRoleDetailController extends BaseController
...
@@ -32,7 +32,7 @@ public class ActSuppliesRoleDetailController extends BaseController
/**
/**
* 查询上级分类
* 查询上级分类
(所有)
* */
* */
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:savesid')"
)
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:savesid')"
)
@GetMapping
(
"/savesid"
)
@GetMapping
(
"/savesid"
)
...
@@ -45,6 +45,20 @@ public class ActSuppliesRoleDetailController extends BaseController
...
@@ -45,6 +45,20 @@ public class ActSuppliesRoleDetailController extends BaseController
}
}
/**
* 查询上级分类(未发布)
* */
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:savesidsta')"
)
@GetMapping
(
"/savesidsta"
)
@ResponseBody
public
TableDataInfo
saveSidsta
(){
List
<
ActSuppliesRole
>
options
=
actSuppliesRoleDetailService
.
saveSidsta
();
return
getDataTable
(
options
);
}
// /**
// /**
// * 查询运算方法
// * 查询运算方法
// * */
// * */
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActOperation.java
View file @
89e13894
...
@@ -9,7 +9,9 @@ public class ActOperation extends BaseEntity {
...
@@ -9,7 +9,9 @@ public class ActOperation extends BaseEntity {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
Integer
id
;
private
Integer
id
;
private
String
encoding
;
private
String
oneLevel
;
private
String
twoLevel
;
private
String
threeLevel
;
private
String
suppliesName
;
private
String
suppliesName
;
private
String
detaliesName
;
private
String
detaliesName
;
...
@@ -21,12 +23,28 @@ public class ActOperation extends BaseEntity {
...
@@ -21,12 +23,28 @@ public class ActOperation extends BaseEntity {
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
get
Encoding
()
{
public
String
get
OneLevel
()
{
return
encoding
;
return
oneLevel
;
}
}
public
void
setEncoding
(
String
encoding
)
{
public
void
setOneLevel
(
String
oneLevel
)
{
this
.
encoding
=
encoding
;
this
.
oneLevel
=
oneLevel
;
}
public
String
getTwoLevel
()
{
return
twoLevel
;
}
public
void
setTwoLevel
(
String
twoLevel
)
{
this
.
twoLevel
=
twoLevel
;
}
public
String
getThreeLevel
()
{
return
threeLevel
;
}
public
void
setThreeLevel
(
String
threeLevel
)
{
this
.
threeLevel
=
threeLevel
;
}
}
public
String
getSuppliesName
()
{
public
String
getSuppliesName
()
{
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleDetailMapper.java
View file @
89e13894
...
@@ -68,5 +68,7 @@ public interface ActSuppliesRoleDetailMapper
...
@@ -68,5 +68,7 @@ public interface ActSuppliesRoleDetailMapper
void
updateRoleDetailStatus
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
);
void
updateRoleDetailStatus
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
);
List
<
ActSuppliesRole
>
saveSidsta
();
// List<ActOperation> saveOperation();
// List<ActOperation> saveOperation();
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesConvertService.java
View file @
89e13894
...
@@ -16,5 +16,5 @@ public interface IActSuppliesConvertService {
...
@@ -16,5 +16,5 @@ public interface IActSuppliesConvertService {
ActSupplies
selectSuppliesname
(
String
name
);
ActSupplies
selectSuppliesname
(
String
name
);
List
<
ActOperation
>
converSupplies
(
List
<
String
>
name
);
List
<
String
>
converSupplies
(
String
[]
name
);
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesRoleDetailService.java
View file @
89e13894
...
@@ -82,4 +82,7 @@ public interface IActSuppliesRoleDetailService
...
@@ -82,4 +82,7 @@ public interface IActSuppliesRoleDetailService
* @param id 尝试禁用物料细分类管理的id
* @param id 尝试禁用物料细分类管理的id
*/
*/
void
setDisable
(
Long
id
);
void
setDisable
(
Long
id
);
List
<
ActSuppliesRole
>
saveSidsta
();
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesConvertServiceImpl.java
View file @
89e13894
...
@@ -7,7 +7,9 @@ import com.ruoyi.system.service.IActSuppliesConvertService;
...
@@ -7,7 +7,9 @@ import com.ruoyi.system.service.IActSuppliesConvertService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Service
@Service
public
class
ActSuppliesConvertServiceImpl
implements
IActSuppliesConvertService
{
public
class
ActSuppliesConvertServiceImpl
implements
IActSuppliesConvertService
{
...
@@ -41,7 +43,26 @@ public class ActSuppliesConvertServiceImpl implements IActSuppliesConvertService
...
@@ -41,7 +43,26 @@ public class ActSuppliesConvertServiceImpl implements IActSuppliesConvertService
}
}
@Override
@Override
public
List
<
ActOperation
>
converSupplies
(
List
<
String
>
name
)
{
public
List
<
String
>
converSupplies
(
String
[]
names
)
{
return
actSuppliesConverMapper
.
converSupplies
(
name
);
List
<
String
>
name
=
Arrays
.
asList
(
names
);
List
<
ActOperation
>
list
=
actSuppliesConverMapper
.
converSupplies
(
name
);
name
=
name
.
stream
()
.
map
(
str
->
{
if
(
str
==
null
)
{
return
null
;
// 保留原始的null值
}
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
if
(
str
.
equals
(
list
.
get
(
i
).
getDetaliesName
()))
{
return
list
.
get
(
i
).
getSuppliesName
();
}
}
return
str
;
})
.
collect
(
Collectors
.
toList
());
return
name
;
}
}
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleDetailServiceImpl.java
View file @
89e13894
...
@@ -167,6 +167,11 @@ public class ActSuppliesRoleDetailServiceImpl implements IActSuppliesRoleDetailS
...
@@ -167,6 +167,11 @@ public class ActSuppliesRoleDetailServiceImpl implements IActSuppliesRoleDetailS
updateStatusById
(
id
,
1
);
updateStatusById
(
id
,
1
);
}
}
@Override
public
List
<
ActSuppliesRole
>
saveSidsta
()
{
return
actSuppliesRoleDetailMapper
.
saveSidsta
();
}
private
void
updateStatusById
(
Long
id
,
Integer
status
){
private
void
updateStatusById
(
Long
id
,
Integer
status
){
String
[]
statusText
={
"禁用"
,
"启用"
};
String
[]
statusText
={
"禁用"
,
"启用"
};
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesConverMapper.xml
View file @
89e13894
...
@@ -63,6 +63,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -63,6 +63,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"com.ruoyi.system.domain.ActOperation"
id=
"ActOperationResult"
>
<resultMap
type=
"com.ruoyi.system.domain.ActOperation"
id=
"ActOperationResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"oneLevel"
column=
"one_level"
/>
<result
property=
"twoLevel"
column=
"two_level"
/>
<result
property=
"threeLevel"
column=
"three_level"
/>
<result
property=
"suppliesName"
column=
"supplies_name"
/>
<result
property=
"suppliesName"
column=
"supplies_name"
/>
<result
property=
"detaliesName"
column=
"details_name"
/>
<result
property=
"detaliesName"
column=
"details_name"
/>
</resultMap>
</resultMap>
...
@@ -89,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -89,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"converSupplies"
parameterType=
"java.util.List"
resultMap=
"ActOperationResult"
>
<select
id=
"converSupplies"
parameterType=
"java.util.List"
resultMap=
"ActOperationResult"
>
select
id ,
supplies_name, b.details_name from act_supplies a ,(
select
a.id ,a.one_level,a.two_level,a.three_level, a.
supplies_name, b.details_name from act_supplies a ,(
SELECT sid ,details_name
SELECT sid ,details_name
FROM act_supplies_details
FROM act_supplies_details
WHERE details_name IN
WHERE details_name IN
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
View file @
89e13894
...
@@ -47,9 +47,12 @@
...
@@ -47,9 +47,12 @@
</sql>
</sql>
<select
id=
"saveSid"
parameterType=
"com.ruoyi.system.domain.ActSuppliesRole"
resultMap=
"ActSuppliesRoleResult"
>
<select
id=
"saveSid"
parameterType=
"com.ruoyi.system.domain.ActSuppliesRole"
resultMap=
"ActSuppliesRoleResult"
>
select id, temp_id, role_name from act_supplies_role
where status = 1
select id, temp_id, role_name from act_supplies_role
</select>
</select>
<select
id=
"saveSidsta"
parameterType=
"com.ruoyi.system.domain.ActSuppliesRole"
resultMap=
"ActSuppliesRoleResult"
>
select id, temp_id, role_name from act_supplies_role where status = 1;
</select>
<!-- <select id="saveOperation" parameterType="ActOperation" resultMap="ActOperationResult">-->
<!-- <select id="saveOperation" parameterType="ActOperation" resultMap="ActOperationResult">-->
<!-- select id, operation_name, status from act_operation_role where status = 0-->
<!-- select id, operation_name, status from act_operation_role where status = 0-->
<!-- </select>-->
<!-- </select>-->
...
...
ruoyi-ui/src/api/system/suppliesroledetail.js
View file @
89e13894
...
@@ -16,7 +16,13 @@ export function saveSid() {
...
@@ -16,7 +16,13 @@ export function saveSid() {
method
:
'
get
'
method
:
'
get
'
})
})
}
}
//查询上级ID
export
function
saveSidsta
()
{
return
request
({
url
:
'
/system/suppliesroledetail/savesidsta
'
,
method
:
'
get
'
})
}
export
function
saveOperation
(){
export
function
saveOperation
(){
return
request
({
return
request
({
...
...
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
View file @
89e13894
...
@@ -187,7 +187,7 @@
...
@@ -187,7 +187,7 @@
<el-form-item
label=
"上级规则"
prop=
"roleId"
>
<el-form-item
label=
"上级规则"
prop=
"roleId"
>
<el-select
v-model=
"form.roleId"
filterable
placeholder=
"请选择关联项"
>
<el-select
v-model=
"form.roleId"
filterable
placeholder=
"请选择关联项"
>
<el-option
<el-option
v-for=
"option in options
1
"
v-for=
"option in options
3
"
:key=
"option.roleName"
:key=
"option.roleName"
:label=
"option.roleName"
:label=
"option.roleName"
:value=
"option.id"
:value=
"option.id"
...
@@ -279,6 +279,7 @@ import {
...
@@ -279,6 +279,7 @@ import {
toggleEnable
,
toggleEnable
,
toggleDisable
,
toggleDisable
,
saveOperation
,
saveOperation
,
saveSidsta
,
}
from
"
@/api/system/suppliesroledetail
"
;
}
from
"
@/api/system/suppliesroledetail
"
;
import
Editor
from
'
@/components/Editor
'
;
import
Editor
from
'
@/components/Editor
'
;
...
@@ -424,11 +425,6 @@ export default {
...
@@ -424,11 +425,6 @@ export default {
saveSid
().
then
(
response
=>
{
saveSid
().
then
(
response
=>
{
this
.
options1
=
response
.
rows
;
this
.
options1
=
response
.
rows
;
})
})
// //运算规则
// saveOperation().then(response =>{
// this.options2 = response.rows;
// console.log(this.options2)
// })
},
},
...
@@ -483,6 +479,12 @@ export default {
...
@@ -483,6 +479,12 @@ export default {
},
},
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
//上级规则
saveSidsta
().
then
(
response
=>
{
this
.
options3
=
response
.
rows
;
})
this
.
instea
=
0
;
this
.
instea
=
0
;
this
.
getnameid
();
this
.
getnameid
();
this
.
reset
();
this
.
reset
();
...
...
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