Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
e843445c
Commit
e843445c
authored
Feb 26, 2024
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段添加
parent
5165b094
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
CbQuantitySummaryActual.java
...in/java/com/dsk/cscec/domain/CbQuantitySummaryActual.java
+13
-4
CbQuantitySummaryServiceImpl.java
.../dsk/cscec/service/impl/CbQuantitySummaryServiceImpl.java
+4
-1
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/CbQuantitySummaryActual.java
View file @
e843445c
...
...
@@ -48,10 +48,7 @@ public class CbQuantitySummaryActual implements Serializable {
* 采购单价
*/
private
Double
purchaseUnitPrice
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 推送时间
*/
...
...
@@ -76,6 +73,18 @@ public class CbQuantitySummaryActual implements Serializable {
* IPM作业编码
*/
private
String
ipmBizCode
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新人id
*/
private
Long
updateId
;
/**
* 更新时间
*/
private
Date
updateTime
;
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/CbQuantitySummaryServiceImpl.java
View file @
e843445c
...
...
@@ -5,6 +5,7 @@ import cn.hutool.json.JSONUtil;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.cscec.domain.CbQuantitySummary
;
import
com.dsk.cscec.domain.CbQuantitySummaryActual
;
import
com.dsk.cscec.domain.CbSubject
;
...
...
@@ -62,7 +63,7 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
Map
<
String
,
Object
>
oneMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
oneList
=
new
ArrayList
<>();
oneMap
.
put
(
"name"
,
entry
.
getKey
());
oneMap
.
put
(
"sort"
,
cbSubjectMapper
.
selectOne
(
Wrappers
.<
CbSubject
>
lambdaQuery
().
eq
(
CbSubject:
:
getCbSubjectName
,
entry
.
getKey
())).
getSort
());
oneMap
.
put
(
"sort"
,
cbSubjectMapper
.
selectOne
(
Wrappers
.<
CbSubject
>
lambdaQuery
().
eq
(
CbSubject:
:
getCbSubjectName
,
entry
.
getKey
())).
getSort
());
for
(
Map
.
Entry
<
String
,
Map
<
String
,
List
<
Map
<
String
,
Object
>>>>
twoEntry
:
entry
.
getValue
().
entrySet
())
{
Map
<
String
,
Object
>
twoMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
twoList
=
new
ArrayList
<>();
...
...
@@ -106,11 +107,13 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateActual
(
List
<
CbQuantitySummaryActual
>
list
)
{
if
(
ObjectUtils
.
isEmpty
(
list
))
throw
new
BeanException
(
"数据不能为空"
);
Long
userId
=
LoginHelper
.
getUserId
();
for
(
CbQuantitySummaryActual
actual
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
actual
.
getCbQuantitySummaryId
()))
throw
new
BeanException
(
"基础数据id不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
actual
.
getQuantities
()))
throw
new
BeanException
(
"工程量(本月用料)不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
actual
.
getRecordDate
()))
throw
new
BeanException
(
"填写月份不能为空!"
);
actual
.
setId
(
ObjectUtils
.
isEmpty
(
actual
.
getId
())
?
SecureUtil
.
md5
(
actual
.
getCbQuantitySummaryId
()
+
actual
.
getRecordDate
())
:
actual
.
getId
());
actual
.
setUpdateId
(
userId
);
boolean
b
=
baseActualService
.
saveOrUpdate
(
actual
);
if
(!
b
)
{
log
.
error
(
"CbQuantitySummaryServiceImpl.updateActual() data insert error! data:"
+
JSONUtil
.
toJsonStr
(
actual
));
...
...
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