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
6bffe066
Commit
6bffe066
authored
Jul 21, 2023
by
xiangjiaojunxp
Browse files
Options
Browse Files
Download
Plain Diff
不可传
parents
576bb61d
6b1f26c8
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
266 additions
and
127 deletions
+266
-127
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesController.java
...va/com/ruoyi/system/controller/ActSuppliesController.java
+15
-2
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesRoleDetail.java
...n/java/com/ruoyi/system/domain/ActSuppliesRoleDetail.java
+12
-12
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleDetailServiceImpl.java
...system/service/impl/ActSuppliesRoleDetailServiceImpl.java
+21
-8
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
...n/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
+17
-16
ruoyi-ui/src/views/system/supplies/index_template.vue
ruoyi-ui/src/views/system/supplies/index_template.vue
+23
-20
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
+178
-69
No files found.
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesController.java
View file @
6bffe066
...
...
@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
...
...
@@ -115,7 +116,7 @@ public class ActSuppliesController extends BaseController
{
List
<
Integer
>
find
=
Stream
.
concat
(
actSuppliesService
.
findall
().
stream
(),
actSuppliesService
.
findAllId
().
stream
()).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
find
.
toString
());
for
(
long
num
:
ids
){
if
(
find
.
contains
((
int
)
num
)){
return
AjaxResult
.
success
(
"删除失败"
,
"操作失败"
);
...
...
@@ -143,9 +144,21 @@ public class ActSuppliesController extends BaseController
@GetMapping
(
"/disable/{id}"
)
public
AjaxResult
setDisable
(
@PathVariable
(
"id"
)
Long
id
)
{
BigDecimal
numBigDecimal
=
new
BigDecimal
(
id
);
Integer
numberInt
=
numBigDecimal
.
intValue
();
List
<
Integer
>
find
=
Stream
.
concat
(
actSuppliesService
.
findall
().
stream
(),
actSuppliesService
.
findAllId
().
stream
()).
collect
(
Collectors
.
toList
());
if
(
find
.
contains
(
numberInt
)){
return
AjaxResult
.
success
(
"删除失败"
,
"操作失败"
);
}
System
.
out
.
println
(
"开始处理【禁用物料总分类管理】的请求,参数:{}"
+
id
);
actSuppliesService
.
setDisable
(
id
);
return
AjaxResult
.
success
();
return
AjaxResult
.
success
(
"200"
,
"修改成功"
);
}
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesRoleDetail.java
View file @
6bffe066
...
...
@@ -26,10 +26,10 @@ public class ActSuppliesRoleDetail extends BaseEntity
private
String
detailName
;
/** 导入数据行列*/
private
String
detailMH
;
private
String
detailML
;
private
String
detailYH
;
private
String
detailYL
;
private
String
[]
detailMH
;
private
String
[]
detailML
;
private
String
[]
detailYH
;
private
String
[]
detailYL
;
private
String
detailYS
;
/**所属规则*/
@Excel
(
name
=
"所属规则"
)
...
...
@@ -81,35 +81,35 @@ public class ActSuppliesRoleDetail extends BaseEntity
this
.
convertStatus
=
convertStatus
;
}
public
String
getDetailMH
()
{
public
String
[]
getDetailMH
()
{
return
detailMH
;
}
public
void
setDetailMH
(
String
detailMH
)
{
public
void
setDetailMH
(
String
[]
detailMH
)
{
this
.
detailMH
=
detailMH
;
}
public
String
getDetailML
()
{
public
String
[]
getDetailML
()
{
return
detailML
;
}
public
void
setDetailML
(
String
detailML
)
{
public
void
setDetailML
(
String
[]
detailML
)
{
this
.
detailML
=
detailML
;
}
public
String
getDetailYH
()
{
public
String
[]
getDetailYH
()
{
return
detailYH
;
}
public
void
setDetailYH
(
String
detailYH
)
{
public
void
setDetailYH
(
String
[]
detailYH
)
{
this
.
detailYH
=
detailYH
;
}
public
String
getDetailYL
()
{
public
String
[]
getDetailYL
()
{
return
detailYL
;
}
public
void
setDetailYL
(
String
detailYL
)
{
public
void
setDetailYL
(
String
[]
detailYL
)
{
this
.
detailYL
=
detailYL
;
}
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleDetailServiceImpl.java
View file @
6bffe066
package
com.ruoyi.system.service.impl
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -59,13 +60,27 @@ public class ActSuppliesRoleDetailServiceImpl implements IActSuppliesRoleDetailS
public
int
insertActSuppliesRoleDetail
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
)
{
String
content
=
"导入表中第"
+
actSuppliesRoleDetail
.
getDetailYH
()+
"行:第"
+
actSuppliesRoleDetail
.
getDetailYL
()+
"列的数据=>"
+
"模板表中第"
+
actSuppliesRoleDetail
.
getDetailMH
()+
"行:第"
+
actSuppliesRoleDetail
.
getDetailML
()+
"列"
;
//re:导入表的行,ce:导入表的列,se:导入表的sheet;rt:模板表的行,ct:模板表的列,st:模板表的sheet;ys:运算符
//
String
content1
=
"[{\"se\":\"0\",\"re\":\""
+
actSuppliesRoleDetail
.
getDetailYH
()+
"\",\"ce\":\""
+
actSuppliesRoleDetail
.
getDetailYL
()+
"\",\"st\":\"0\",\"rt\":\""
+
actSuppliesRoleDetail
.
getDetailMH
()+
"\",\"ct\":\""
+
actSuppliesRoleDetail
.
getDetailML
()+
"\",\"ys\":\""
+
actSuppliesRoleDetail
.
getConvertStatus
()+
"\"}]"
;
List
<
String
>
filteredList
=
new
ArrayList
<>();
actSuppliesRoleDetail
.
setDetailName
(
content
);
actSuppliesRoleDetail
.
setDetailContent
(
content1
);
for
(
int
i
=
0
;
i
<
actSuppliesRoleDetail
.
getDetailMH
().
length
;
i
++){
filteredList
.
add
(
"{\"se\":\"0\",\"re\":\""
+(
Integer
.
parseInt
((
actSuppliesRoleDetail
.
getDetailYH
()[
i
]))-
1
)+
"\",\"ce\":\""
+(
Integer
.
parseInt
((
actSuppliesRoleDetail
.
getDetailYL
()[
i
]))-
1
)+
"\",\"st\":\"0\",\"rt\":\""
+(
Integer
.
parseInt
((
actSuppliesRoleDetail
.
getDetailMH
()[
i
]))-
1
)+
"\",\"ct\":\""
+(
Integer
.
parseInt
((
actSuppliesRoleDetail
.
getDetailML
()[
i
]))-
1
)+
"\",\"ys\":\""
+
actSuppliesRoleDetail
.
getConvertStatus
()+
"\"}"
)
;
}
String
content
=
String
.
join
(
","
,
filteredList
);
String
content2
=
"["
+
content
+
"]"
;
// String content1 = "[{\"se\":\"0\",\"re\":\""+actSuppliesRoleDetail.getDetailYH()+"\",\"ce\":\""+actSuppliesRoleDetail.getDetailYL()+"\",\"st\":\"0\",\"rt\":\""+actSuppliesRoleDetail.getDetailMH()+"\",\"ct\":\""+actSuppliesRoleDetail.getDetailML()+"\",\"ys\":\""+actSuppliesRoleDetail.getConvertStatus()+"\"}]" ;
actSuppliesRoleDetail
.
setDetailContent
(
content2
);
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
actSuppliesRoleDetail
.
setCreateBy
(
user
.
getUserName
());
actSuppliesRoleDetail
.
setCreateTime
(
DateUtils
.
getNowDate
());
...
...
@@ -83,12 +98,10 @@ public class ActSuppliesRoleDetailServiceImpl implements IActSuppliesRoleDetailS
public
int
updateActSuppliesRoleDetail
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
)
{
String
content12
=
"导入表中第"
+
actSuppliesRoleDetail
.
getDetailYH
()+
"行:第"
+
actSuppliesRoleDetail
.
getDetailYL
()+
"列的数据=>"
+
"模板表中第"
+
actSuppliesRoleDetail
.
getDetailMH
()+
"行:第"
+
actSuppliesRoleDetail
.
getDetailML
()+
"列"
;
//re:导入表的行,ce:导入表的列,se:导入表的sheet;rt:模板表的行,ct:模板表的列,st:模板表的sheet;ys:运算符
String
content1
=
"[{\"se\":\"0\",\"re\":\""
+
actSuppliesRoleDetail
.
getDetailYH
()+
"\",\"ce\":\""
+
actSuppliesRoleDetail
.
getDetailYL
()+
"\",\"st\":\"0\",\"rt\":\""
+
actSuppliesRoleDetail
.
getDetailMH
()+
"\",\"ct\":\""
+
actSuppliesRoleDetail
.
getDetailML
()+
"\",\"ys\":\""
+
actSuppliesRoleDetail
.
getConvertStatus
()+
"\"}]"
;
actSuppliesRoleDetail
.
setDetailName
(
content12
);
actSuppliesRoleDetail
.
setDetailContent
(
content1
);
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
actSuppliesRoleDetail
.
setUpdateBy
(
user
.
getUserName
());
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
View file @
6bffe066
...
...
@@ -8,11 +8,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"id"
column=
"id"
/>
<result
property=
"roleId"
column=
"role_id"
/>
<result
property=
"detailName"
column=
"detail_name"
/>
<result
property=
"detailMH"
column=
"detail_m_h"
/
>
<result
property=
"detailML"
column=
"detail_m_l"
/
>
<result
property=
"detailYH"
column=
"detail_y_h"
/
>
<result
property=
"detailYL"
column=
"detail_y_l"
/
>
<!-- <result property="detailMH" column="detail_m_h" />--
>
<!-- <result property="detailML" column="detail_m_l" />--
>
<!-- <result property="detailYH" column="detail_y_h" />--
>
<!-- <result property="detailYL" column="detail_y_l" />--
>
<result
property=
"detailContent"
column=
"detail_content"
/>
<result
property=
"detailYS"
column=
"detail_y_s"
/>
<result
property=
"convertStatus"
column=
"convert_status"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"createBy"
column=
"create_by"
/>
...
...
@@ -76,10 +77,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"roleId != null"
>
role_id,
</if>
<if
test=
"detailName != null"
>
detail_name,
</if>
<if
test=
"detailMH != null"
>
detail_m_h,
</if
>
<if
test=
"detailML != null"
>
detail_m_l,
</if
>
<if
test=
"detailYH != null"
>
detail_y_h,
</if
>
<if
test=
"detailYL != null"
>
detail_y_l,
</if
>
<!-- <if test="detailMH != null">detail_m_h,</if>--
>
<!-- <if test="detailML != null">detail_m_l,</if>--
>
<!-- <if test="detailYH != null">detail_y_h,</if>--
>
<!-- <if test="detailYL != null">detail_y_l,</if>--
>
<if
test=
"detailYS != null"
>
detail_y_s,
</if>
...
...
@@ -96,10 +97,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"roleId != null"
>
#{roleId},
</if>
<if
test=
"detailName != null"
>
#{detailName},
</if>
<if
test=
"detailMH != null"
>
#{detailMH},
</if
>
<if
test=
"detailML != null"
>
#{detailML},
</if
>
<if
test=
"detailYH != null"
>
#{detailYH},
</if
>
<if
test=
"detailYL != null"
>
#{detailYL},
</if
>
<!-- <if test="detailMH != null">#{detailMH},</if>--
>
<!-- <if test="detailML != null">#{detailML},</if>--
>
<!-- <if test="detailYH != null">#{detailYH},</if>--
>
<!-- <if test="detailYL != null">#{detailYL},</if>--
>
<if
test=
"detailYS != null"
>
#{detailYS},
</if>
...
...
@@ -122,10 +123,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"detailContent != null"
>
detail_content = #{detailContent},
</if>
<if
test=
"convertStatus != null"
>
convert_status = #{convertStatus},
</if>
<if
test=
"detailMH != null"
>
detail_m_h = #{detailMH},
</if
>
<if
test=
"detailML != null"
>
detail_m_l = #{detailML},
</if
>
<if
test=
"detailYH != null"
>
detail_y_h = #{detailYH},
</if
>
<if
test=
"detailYL != null"
>
detail_y_l = #{detailYL},
</if
>
<!-- <if test="detailMH != null">detail_m_h = #{detailMH},</if>--
>
<!-- <if test="detailML != null">detail_m_l = #{detailML},</if>--
>
<!-- <if test="detailYH != null">detail_y_h = #{detailYH},</if>--
>
<!-- <if test="detailYL != null">detail_y_l = #{detailYL},</if>--
>
<if
test=
"detailYS != null"
>
detail_y_s = #{detailYS},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
...
...
ruoyi-ui/src/views/system/supplies/index_template.vue
View file @
6bffe066
...
...
@@ -404,32 +404,36 @@ export default {
this
.
open
=
true
;
this
.
title
=
"
修改Excel模板
"
;
});
}
},
/** 提交按钮 */
submitForm
()
{
if
(
!
this
.
form
.
templateName
){
this
.
msgError
(
"
上传的文件不能为空!
"
)
}
else
{
this
.
fileListName
=
[];
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateSuppliesTemplate
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addSuppliesTemplate
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
this
.
fileListName
=
[];
if
(
!
this
.
form
.
templateName
)
{
this
.
msgError
(
"
上传文件为空!!!
"
)
}
else
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateSuppliesTemplate
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addSuppliesTemplate
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
}
}
},
/** 详情按钮操作 */
...
...
@@ -507,7 +511,6 @@ export default {
// this.download(response.msg);
// })
// }
}
};
</
script
>
...
...
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
View file @
6bffe066
This diff is collapsed.
Click to expand it.
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