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
c8f28343
Commit
c8f28343
authored
Apr 24, 2024
by
施翔轲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二期新需求:供料汇总相关
parent
ca745f94
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
7 deletions
+86
-7
CbQuantitySummaryController.java
...com/dsk/cscec/controller/CbQuantitySummaryController.java
+8
-0
CbQuantitySummaryListBo.java
...java/com/dsk/cscec/domain/bo/CbQuantitySummaryListBo.java
+4
-0
CbQuantitySummaryListVo.java
...java/com/dsk/cscec/domain/vo/CbQuantitySummaryListVo.java
+9
-1
ICbQuantitySummaryService.java
...java/com/dsk/cscec/service/ICbQuantitySummaryService.java
+5
-0
CbQuantitySummaryServiceImpl.java
.../dsk/cscec/service/impl/CbQuantitySummaryServiceImpl.java
+60
-6
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/controller/CbQuantitySummaryController.java
View file @
c8f28343
...
@@ -83,5 +83,13 @@ public class CbQuantitySummaryController extends BaseController {
...
@@ -83,5 +83,13 @@ public class CbQuantitySummaryController extends BaseController {
return
R
.
ok
();
return
R
.
ok
();
}
}
/**
* 修改工程量
*/
@PostMapping
(
"/editEngineeringQuantity"
)
public
R
<
Void
>
editEngineeringQuantity
(
@RequestBody
CbQuantitySummaryActual
bo
)
{
return
toAjax
(
baseService
.
editEngineeringQuantity
(
bo
));
}
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/bo/CbQuantitySummaryListBo.java
View file @
c8f28343
...
@@ -17,4 +17,8 @@ public class CbQuantitySummaryListBo extends CbProjectBaseBo {
...
@@ -17,4 +17,8 @@ public class CbQuantitySummaryListBo extends CbProjectBaseBo {
* 记录月份
* 记录月份
*/
*/
private
String
recordDate
;
private
String
recordDate
;
/**
* 是否超出计划成本合价(不含税)
*/
private
Boolean
isOutPlanCostCombinedPrice
;
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/domain/vo/CbQuantitySummaryListVo.java
View file @
c8f28343
...
@@ -100,6 +100,14 @@ public class CbQuantitySummaryListVo {
...
@@ -100,6 +100,14 @@ public class CbQuantitySummaryListVo {
* 采购单价
* 采购单价
*/
*/
private
Double
purchaseUnitPrice
;
private
Double
purchaseUnitPrice
;
/**
* 实际成本合价(不含税)
*/
private
Double
actualCombinedPrice
=
0.0
;
/**
* 实际成本合价(不含税)成本是否超出计划成本当中合价(不含税)
*/
private
Boolean
isActualGreaterThanPlan
;
/**
/**
* 创建时间
* 创建时间
*/
*/
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/ICbQuantitySummaryService.java
View file @
c8f28343
...
@@ -32,5 +32,10 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> {
...
@@ -32,5 +32,10 @@ public interface ICbQuantitySummaryService extends IService<CbQuantitySummary> {
boolean
batchInsert
(
List
<
CbQuantitySummary
>
list
);
boolean
batchInsert
(
List
<
CbQuantitySummary
>
list
);
R
conversionNotice
(
CbQuantitySummaryListBo
bo
);
R
conversionNotice
(
CbQuantitySummaryListBo
bo
);
/**
* 修改工程量
*/
Boolean
editEngineeringQuantity
(
CbQuantitySummaryActual
bo
);
}
}
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/CbQuantitySummaryServiceImpl.java
View file @
c8f28343
...
@@ -70,16 +70,16 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
...
@@ -70,16 +70,16 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
List
<
Map
<
String
,
Object
>>
resList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
resList
=
new
ArrayList
<>();
resMap
.
put
(
"name"
,
"房建类成本科目"
);
resMap
.
put
(
"name"
,
"房建类成本科目"
);
resMap
.
put
(
"sort"
,
1
);
resMap
.
put
(
"sort"
,
1
);
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
List
<
Map
<
String
,
Object
>>>>>>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
List
<
Map
<
String
,
Object
>>>>>>
entry
:
map
.
entrySet
())
{
Map
<
String
,
Object
>
oneMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
oneMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
oneList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
oneList
=
new
ArrayList
<>();
oneMap
.
put
(
"name"
,
entry
.
getKey
());
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
,
Map
<
String
,
List
<
Map
<
String
,
Object
>>>>>
twoEntry
:
entry
.
getValue
().
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
List
<
Map
<
String
,
Object
>>>>>
twoEntry
:
entry
.
getValue
().
entrySet
())
{
Map
<
String
,
Object
>
twoMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
twoMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
twoList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
twoList
=
new
ArrayList
<>();
twoMap
.
put
(
"name"
,
twoEntry
.
getKey
());
twoMap
.
put
(
"name"
,
twoEntry
.
getKey
());
for
(
Map
.
Entry
<
String
,
Map
<
String
,
List
<
Map
<
String
,
Object
>>>>
threeEntry
:
twoEntry
.
getValue
().
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Map
<
String
,
List
<
Map
<
String
,
Object
>>>>
threeEntry
:
twoEntry
.
getValue
().
entrySet
())
{
Map
<
String
,
Object
>
threeMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
threeMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
threeList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
threeList
=
new
ArrayList
<>();
threeMap
.
put
(
"name"
,
threeEntry
.
getKey
());
threeMap
.
put
(
"name"
,
threeEntry
.
getKey
());
...
@@ -118,13 +118,52 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
...
@@ -118,13 +118,52 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
@Override
@Override
public
List
<
CbQuantitySummaryListVo
>
subjectList
(
CbQuantitySummaryListBo
bo
)
{
public
List
<
CbQuantitySummaryListVo
>
subjectList
(
CbQuantitySummaryListBo
bo
)
{
if
(
ObjectUtils
.
isEmpty
(
bo
.
getRecordDate
()))
{
if
(
ObjectUtils
.
isEmpty
(
bo
.
getRecordDate
()))
{
//默认当前月
//默认当前月
bo
.
setRecordDate
(
DatePattern
.
SIMPLE_MONTH_FORMAT
.
format
(
new
Date
()));
bo
.
setRecordDate
(
DatePattern
.
SIMPLE_MONTH_FORMAT
.
format
(
new
Date
()));
}
}
if
(
ObjectUtils
.
isEmpty
(
bo
.
getProjectId
()))
throw
new
BeanException
(
"项目id不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
bo
.
getProjectId
()))
throw
new
BeanException
(
"项目id不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
bo
.
getCbStage
()))
throw
new
BeanException
(
"成本阶段不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
bo
.
getCbStage
()))
throw
new
BeanException
(
"成本阶段不能为空!"
);
return
baseMapper
.
selectListBySubject
(
bo
);
List
<
CbQuantitySummaryListVo
>
listVo
=
baseMapper
.
selectListBySubject
(
bo
);
//超出计划成本合价(不含税)的集合
List
<
CbQuantitySummaryListVo
>
outList
=
new
ArrayList
<>();
//未超出计划成本合价(不含税)的集合
List
<
CbQuantitySummaryListVo
>
notOutList
=
new
ArrayList
<>();
listVo
.
forEach
(
vo
->
{
if
(
ObjectUtil
.
isNotNull
(
vo
.
getPushQuantities
()))
{
//实际成本合价(不含税)
vo
.
setActualCombinedPrice
(
vo
.
getQuantity
()
*
vo
.
getPushQuantities
());
}
else
{
//实际成本合价(不含税)
vo
.
setActualCombinedPrice
(
(
ObjectUtil
.
isNull
(
vo
.
getPurchaseUnitPrice
())
?
0.0
:
vo
.
getPurchaseUnitPrice
())
*
(
ObjectUtil
.
isNull
(
vo
.
getPushQuantities
())
?
0.0
:
vo
.
getPushQuantities
())
);
}
//如果实际成本合价(不含税)超出了计划成本合价(不含税),则设置标识,以便前端标红
Double
combinedPrice
=
ObjectUtil
.
isNull
(
vo
.
getCombinedPrice
())
?
0.0
:
vo
.
getCombinedPrice
();
if
(
vo
.
getActualCombinedPrice
().
compareTo
(
combinedPrice
)
>
0
)
{
//vo.setActualCombinedPrice(Double.parseDouble(StringUtils.markInRed(vo.getActualCombinedPrice().toString(), vo.getActualCombinedPrice().toString())));
vo
.
setIsActualGreaterThanPlan
(
true
);
outList
.
add
(
vo
);
}
else
{
vo
.
setIsActualGreaterThanPlan
(
false
);
notOutList
.
add
(
vo
);
}
});
//筛选是否超出计划成本合价(不含税)
Boolean
flag
=
bo
.
getIsOutPlanCostCombinedPrice
();
if
(
ObjectUtil
.
isNotNull
(
flag
))
{
if
(
flag
)
{
return
outList
;
}
else
{
return
notOutList
;
}
}
return
listVo
;
}
}
@Override
@Override
...
@@ -199,5 +238,20 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
...
@@ -199,5 +238,20 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
}
}
return
R
.
ok
();
return
R
.
ok
();
}
}
/**
* 修改工程量
*/
@Override
public
Boolean
editEngineeringQuantity
(
CbQuantitySummaryActual
bo
)
{
if
(
ObjectUtils
.
isEmpty
(
bo
.
getId
()))
throw
new
BeanException
(
"id不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
bo
.
getPushQuantities
()))
throw
new
BeanException
(
"修改后的工程量不能为空!"
);
boolean
update
=
baseActualService
.
updateById
(
bo
);
if
(!
update
)
{
log
.
error
(
"CbQuantitySummaryServiceImpl.editEngineeringQuantity() data update error! data:"
+
JSONUtil
.
toJsonStr
(
bo
));
throw
new
ServiceException
(
"数据更新错误!"
);
}
return
update
;
}
}
}
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