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
248d43c9
Commit
248d43c9
authored
Sep 26, 2023
by
lenovo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加物料领用时间
parent
2c5e4212
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
6 deletions
+69
-6
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
...i/system/controller/ActSuppliesHistorydataController.java
+0
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesHistorydata.java
.../java/com/ruoyi/system/domain/ActSuppliesHistorydata.java
+13
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
...ystem/service/impl/ActSuppliesHistorydataServiceImpl.java
+20
-0
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
.../resources/mapper/system/ActSuppliesHistorydataMapper.xml
+5
-2
ruoyi-ui/src/views/system/supplies/index.vue
ruoyi-ui/src/views/system/supplies/index.vue
+31
-3
No files found.
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
View file @
248d43c9
...
...
@@ -106,7 +106,6 @@ public class ActSuppliesHistorydataController extends BaseController
* 添加 历史数据
*/
@PreAuthorize
(
"@ss.hasPermi('system:historydata:addInsert')"
)
@Log
(
title
=
" 历史数据"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/addInsert"
)
public
AjaxResult
addInsert
(
@RequestBody
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
)
{
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesHistorydata.java
View file @
248d43c9
...
...
@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
java.util.Date
;
/**
* 历史数据对象 act_supplies_historydata
*
...
...
@@ -60,6 +62,9 @@ public class ActSuppliesHistorydata extends BaseEntity
/** 是否清洗 */
private
Long
cleanStatus
;
/**时间*/
private
String
date
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
...
...
@@ -170,6 +175,14 @@ public class ActSuppliesHistorydata extends BaseEntity
this
.
cleanStatus
=
cleanStatus
;
}
public
String
getDate
()
{
return
date
;
}
public
void
setDate
(
String
date
)
{
this
.
date
=
date
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
View file @
248d43c9
package
com.ruoyi.system.service.impl
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
...
...
@@ -109,10 +112,25 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
ActSuppliesHistorydata
actSuppliesHistorydata1
=
new
ActSuppliesHistorydata
();
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++){
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
try
{
Date
parse
=
simpleDateFormat
.
parse
(
actSuppliesHistorydata
.
get
(
i
).
getDate
());
String
format
=
simpleDateFormat
.
format
(
parse
);
actSuppliesHistorydata
.
get
(
i
).
setDate
(
format
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
Long
s
=
actSuppliesHistorydataMapper
.
selectActSuppliesHistorydatauuid
(
actSuppliesHistorydata
.
get
(
0
).
getImportUuid
());
if
(
s
>
0
){
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++)
{
actSuppliesHistorydata
.
get
(
i
).
setCreateBy
(
user
.
getUserName
());
actSuppliesHistorydata
.
get
(
i
).
setCreateTime
(
DateUtils
.
getNowDate
());
actSuppliesHistorydataMapper
.
updateActSuppliesHistorydatas
(
actSuppliesHistorydata
.
get
(
i
));
...
...
@@ -128,6 +146,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
actSuppliesHistorydata1
.
setRoleId
(
actSuppliesHistorydata
.
get
(
i
).
getRoleId
());
actSuppliesHistorydata1
.
setStatus
(
1L
);
actSuppliesHistorydata1
.
setIdentifyingCode
(
0L
);
actSuppliesHistorydata1
.
setDate
(
actSuppliesHistorydata
.
get
(
i
).
getDate
());
actSuppliesHistorydataMapper
.
insertActSuppliesHistorydata
(
actSuppliesHistorydata1
);
}
...
...
@@ -138,6 +157,7 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
actSuppliesHistorydata1
.
setTemplateId
(
actSuppliesHistorydata
.
get
(
0
).
getTemplateId
());
actSuppliesHistorydata1
.
setStatus
(
1L
);
actSuppliesHistorydata1
.
setIdentifyingCode
(
1L
);
actSuppliesHistorydata1
.
setDate
(
actSuppliesHistorydata
.
get
(
0
).
getDate
());
actSuppliesHistorydataMapper
.
insertActSuppliesHistorydata
(
actSuppliesHistorydata1
);
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++){
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
View file @
248d43c9
...
...
@@ -61,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"date != null"
>
date,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"importUuid != null"
>
#{importUuid},
</if>
...
...
@@ -74,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"date != null"
>
#{date},
</if>
</trim>
</insert>
...
...
@@ -130,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"date != null"
>
date = #{date},
</if>
</trim>
<where>
import_uuid = #{importUuid}
...
...
ruoyi-ui/src/views/system/supplies/index.vue
View file @
248d43c9
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"68px"
>
<el-form
ref=
"queryForm"
size=
"small"
:inline=
"true"
:rules=
"rules"
label-width=
"68px"
>
<el-form-item
label=
"模板"
prop=
"name"
>
<el-select
v-model=
"selectedOption"
ref=
"mySelect"
size=
"mini"
@
change=
"handleOptionChange"
filterable
placeholder=
"请选择您要查看的模板"
>
<!--
<el-option
label=
"自设的模板名"
value=
"使用空白模板"
></el-option>
-->
...
...
@@ -9,13 +9,20 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"规则"
prop=
"r
ule
"
>
<el-form-item
label=
"规则"
prop=
"r
oleid
"
>
<el-select
v-model=
"selectedRule"
ref=
"mySelect"
size=
"mini"
@
change=
"handleRuleChange"
filterable
placeholder=
"请选择您要查看的规则"
>
<el-option
v-for=
"iem in luckyrule"
:key=
"iem.id"
:label=
"iem.roleName"
:value=
"iem.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"时间"
prop=
"date"
>
<el-date-picker
v-model=
"from.date"
type=
"month"
placeholder=
"选择月"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
...
...
@@ -43,7 +50,7 @@
:disabled=
"disableNextButton"
:show-file-list=
false
>
<el-button
plain
size=
"mini"
icon=
"el-icon-download"
type=
"primary"
:disabled=
"disableNextButton"
>
导入
</el-button>
<el-button
plain
size=
"mini"
icon=
"el-icon-download"
type=
"primary"
:disabled=
"disableNextButton"
@
click=
"rulesdate"
>
导入
</el-button>
</el-upload>
</el-col>
</el-row>
...
...
@@ -116,6 +123,7 @@ export default {
queryParams
:
{
status
:
0
},
};
},
created
()
{
...
...
@@ -128,6 +136,16 @@ export default {
fileName
=
"
新建XLSX工作表
"
;
},
methods
:{
/** 判断是否选择时间*/
rulesdate
(){
if
(
this
.
from
.
date
==
''
||
this
.
from
.
date
==
null
){
this
.
$message
.
error
(
'
请选择时间日期!
'
);
}
},
/** 页面刷新时展示的数据*/
getList
()
{
listSuppliesTemplate
(
this
.
queryParams
).
then
(
response
=>
{
...
...
@@ -301,6 +319,7 @@ export default {
},
/** 导入事件*/
async
handleFileChange
(
evt
)
{
debugger
if
(
modify
){
this
.
$confirm
(
'
再次导入将会清空表内数据,是否继续操作?
'
,
'
注意!!!
'
,
{
confirmButtonText
:
'
确定
'
,
...
...
@@ -1166,11 +1185,20 @@ export default {
this
.
dfrom
.
historyName
=
name
+
'
(导入文件)
'
;
this
.
dfrom
.
historyContent
=
str
;
this
.
dfrom
.
identifyingCode
=
0
;
let
date
=
new
Date
(
this
.
from
.
date
);
let
fullYear
=
date
.
getFullYear
();
let
month
=
(
"
0
"
+
(
date
.
getMonth
()
+
1
)).
slice
(
-
2
);
let
datastr
=
fullYear
+
"
-
"
+
month
;
let
date1
=
new
Date
(
datastr
);
this
.
dfrom
.
date
=
date1
this
.
from
.
status
=
this
.
dfrom
.
status
=
0
;
list
.
push
(
this
.
dfrom
);
this
.
from
.
historyName
=
fileName
+
'
(生成文件)
'
;
this
.
from
.
historyContent
=
strsheet
;
this
.
from
.
identifyingCode
=
1
;
this
.
from
.
date
=
date1
;
list
.
push
(
this
.
from
);
addInsert
(
list
).
then
(
response
=>
{
...
...
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