Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
H
hzsomms
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
ZTGK
hzsomms
Commits
2523344a
Commit
2523344a
authored
Jan 17, 2024
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.分析批次修改
parent
3747ab4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
WorkBatchServiceImpl.java
...es/maintenanceWork/service/impl/WorkBatchServiceImpl.java
+23
-2
No files found.
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/service/impl/WorkBatchServiceImpl.java
View file @
2523344a
...
@@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.shiro.SecurityUtils
;
import
org.jeecg.common.exception.JeecgBootException
;
import
org.jeecg.common.exception.JeecgBootException
;
import
org.jeecg.common.system.vo.LoginUser
;
import
org.jeecg.common.util.UUIDGenerator
;
import
org.jeecg.common.util.UUIDGenerator
;
import
org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchUnitDeviceDTO
;
import
org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchUnitDeviceDTO
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice
;
...
@@ -111,6 +113,9 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -111,6 +113,9 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
delWrapper
.
eq
(
WorkBatchDetail:
:
getWorkBatchId
,
dto
.
getId
());
delWrapper
.
eq
(
WorkBatchDetail:
:
getWorkBatchId
,
dto
.
getId
());
workBatchDetailMapper
.
delete
(
delWrapper
);
workBatchDetailMapper
.
delete
(
delWrapper
);
List
<
WorkBatchSaveOrUpdateDetailDTO
>
transfiniteList
=
dto
.
getDetailList
();
List
<
WorkBatchSaveOrUpdateDetailDTO
>
transfiniteList
=
dto
.
getDetailList
();
//获取当前登录人信息
LoginUser
user
=
(
LoginUser
)
SecurityUtils
.
getSubject
().
getPrincipal
();
String
realname
=
user
.
getRealname
();
for
(
WorkBatchSaveOrUpdateDetailDTO
detailDTO
:
transfiniteList
)
{
for
(
WorkBatchSaveOrUpdateDetailDTO
detailDTO
:
transfiniteList
)
{
WorkBatchDetail
workBatchDetail
=
new
WorkBatchDetail
();
WorkBatchDetail
workBatchDetail
=
new
WorkBatchDetail
();
workBatchDetail
.
setId
(
UUIDGenerator
.
generate
());
workBatchDetail
.
setId
(
UUIDGenerator
.
generate
());
...
@@ -129,6 +134,8 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -129,6 +134,8 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatchDetail
.
setRemark
(
detailDTO
.
getRemark
());
workBatchDetail
.
setRemark
(
detailDTO
.
getRemark
());
workBatchDetail
.
setUpdateTime
(
new
Date
());
workBatchDetail
.
setUpdateTime
(
new
Date
());
workBatchDetail
.
setCreateTime
(
new
Date
());
workBatchDetail
.
setCreateTime
(
new
Date
());
workBatchDetail
.
setCreateBy
(
realname
);
workBatchDetail
.
setUpdateBy
(
realname
);
workBatchDetail
.
setWorkStatus
(
0
);
workBatchDetail
.
setWorkStatus
(
0
);
workBatchDetailMapper
.
insert
(
workBatchDetail
);
workBatchDetailMapper
.
insert
(
workBatchDetail
);
}
}
...
@@ -158,6 +165,9 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -158,6 +165,9 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
this
.
save
(
workBatch
);
this
.
save
(
workBatch
);
// 保存明细
// 保存明细
//获取当前登录人信息
LoginUser
user
=
(
LoginUser
)
SecurityUtils
.
getSubject
().
getPrincipal
();
String
realname
=
user
.
getRealname
();
List
<
DispatchDTO
>
transfiniteList
=
dto
.
getDetailList
();
List
<
DispatchDTO
>
transfiniteList
=
dto
.
getDetailList
();
List
<
WorkBatchDetail
>
workBatchDetailList
=
new
ArrayList
<>();
List
<
WorkBatchDetail
>
workBatchDetailList
=
new
ArrayList
<>();
for
(
DispatchDTO
transfiniteDTO
:
transfiniteList
)
{
for
(
DispatchDTO
transfiniteDTO
:
transfiniteList
)
{
...
@@ -180,7 +190,10 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -180,7 +190,10 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatchDetail
.
setUnitScoreLevel
(
Integer
.
valueOf
(
transfiniteDTO
.
getUnitScoreLevel
()));
workBatchDetail
.
setUnitScoreLevel
(
Integer
.
valueOf
(
transfiniteDTO
.
getUnitScoreLevel
()));
workBatchDetail
.
setUnitScoreLevelStr
(
transfiniteDTO
.
getUnitScoreLevelStr
());
workBatchDetail
.
setUnitScoreLevelStr
(
transfiniteDTO
.
getUnitScoreLevelStr
());
workBatchDetail
.
setWorkStatus
(
0
);
workBatchDetail
.
setWorkStatus
(
0
);
workBatchDetail
.
setUpdateTime
(
new
Date
());
workBatchDetail
.
setCreateTime
(
new
Date
());
workBatchDetail
.
setCreateBy
(
realname
);
workBatchDetail
.
setUpdateBy
(
realname
);
workBatchDetailList
.
add
(
workBatchDetail
);
workBatchDetailList
.
add
(
workBatchDetail
);
...
@@ -202,7 +215,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -202,7 +215,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
// 1.构建工单主信息
// 1.构建工单主信息
WorkBatch
workBatch
=
BeanUtil
.
copyProperties
(
dto
,
WorkBatch
.
class
);
WorkBatch
workBatch
=
BeanUtil
.
copyProperties
(
dto
,
WorkBatch
.
class
);
workBatch
.
setId
(
UUIDGenerator
.
generate
());
workBatch
.
setId
(
UUIDGenerator
.
generate
());
workBatch
.
setWorkStatus
(
0
);
//
9
-已作业
workBatch
.
setWorkStatus
(
0
);
//
0
-已作业
workBatch
.
setSource
(
2
);
// 超限页面
workBatch
.
setSource
(
2
);
// 超限页面
...
@@ -234,6 +247,9 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -234,6 +247,9 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
throw
JeecgBootException
.
error
(
"创建失败,没有对应的超限数据"
);
throw
JeecgBootException
.
error
(
"创建失败,没有对应的超限数据"
);
}
}
// 2.3 循环构建保存对象
// 2.3 循环构建保存对象
//获取当前登录人信息
LoginUser
user
=
(
LoginUser
)
SecurityUtils
.
getSubject
().
getPrincipal
();
String
realname
=
user
.
getRealname
();
List
<
WorkBatchDetail
>
workBatchDetailList
=
new
ArrayList
<>();
List
<
WorkBatchDetail
>
workBatchDetailList
=
new
ArrayList
<>();
for
(
AnalysisBatchUnitDeviceVO
transfinite
:
transfiniteList
)
{
for
(
AnalysisBatchUnitDeviceVO
transfinite
:
transfiniteList
)
{
WorkBatchDetail
workBatchDetail
=
new
WorkBatchDetail
();
WorkBatchDetail
workBatchDetail
=
new
WorkBatchDetail
();
...
@@ -254,6 +270,11 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -254,6 +270,11 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatchDetail
.
setUnitScore
(
Convert
.
toBigDecimal
(
transfinite
.
getUnitScore
()));
workBatchDetail
.
setUnitScore
(
Convert
.
toBigDecimal
(
transfinite
.
getUnitScore
()));
workBatchDetail
.
setUnitScoreLevel
(
transfinite
.
getUnitScoreLevel
());
workBatchDetail
.
setUnitScoreLevel
(
transfinite
.
getUnitScoreLevel
());
workBatchDetail
.
setUnitScoreLevelStr
(
transfinite
.
getUnitScoreLevelStr
());
workBatchDetail
.
setUnitScoreLevelStr
(
transfinite
.
getUnitScoreLevelStr
());
workBatchDetail
.
setUpdateTime
(
new
Date
());
workBatchDetail
.
setCreateTime
(
new
Date
());
workBatchDetail
.
setCreateBy
(
realname
);
workBatchDetail
.
setUpdateBy
(
realname
);
workBatchDetail
.
setWorkStatus
(
0
);
workBatchDetailList
.
add
(
workBatchDetail
);
workBatchDetailList
.
add
(
workBatchDetail
);
}
}
...
...
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