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
8a431344
Commit
8a431344
authored
Mar 07, 2024
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
66510cec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
22 deletions
+26
-22
CbQuantitySummaryServiceImpl.java
.../dsk/cscec/service/impl/CbQuantitySummaryServiceImpl.java
+6
-0
CbQuantitySummaryMapper.xml
...c/main/resources/mapper/cscec/CbQuantitySummaryMapper.xml
+20
-22
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/service/impl/CbQuantitySummaryServiceImpl.java
View file @
8a431344
...
...
@@ -108,6 +108,12 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
@Override
public
List
<
CbQuantitySummaryListVo
>
subjectList
(
CbQuantitySummaryListBo
bo
)
{
if
(
ObjectUtils
.
isEmpty
(
bo
.
getRecordDate
())){
//默认当前月
bo
.
setRecordDate
(
DatePattern
.
SIMPLE_MONTH_FORMAT
.
format
(
new
Date
()));
}
if
(
ObjectUtils
.
isEmpty
(
bo
.
getProjectId
()))
throw
new
BeanException
(
"项目id不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
bo
.
getCbStage
()))
throw
new
BeanException
(
"成本阶段不能为空!"
);
return
baseMapper
.
selectListBySubject
(
bo
);
}
...
...
dsk-module/dsk-biz-api/src/main/resources/mapper/cscec/CbQuantitySummaryMapper.xml
View file @
8a431344
...
...
@@ -52,28 +52,26 @@
</select>
<select
id=
"selectListBySubject"
resultType=
"com.dsk.cscec.domain.vo.CbQuantitySummaryListVo"
>
select a.*, ifnull(sum(a.quantities),0) totalQuantities from (
select
cqs.id, cqs.cb_subject_name, cqs.company_no, cqs.org_no, cqs.cb_name, cqs.job_content, cqs.calculation_rule,
cqs.unit, cqs.material_description, cqs.guide_price, cqs.bid_unit_price, cqs.unit_price_difference, cqs.quantity,
cqs.combined_price, cqs.combined_price_tax, cqs.brand_name, cqs.bid_source, cqs.remark, cqs.`number`, cqsa.quantities,
cqsa.quantities_unit, cqsa.conversion_quantities, cqsa.conversion_unit, cqsa.purchase_unit_price, cqsa.create_time,
cqsa.id actualId, cqsa.ipm_project_code, cqsa.ipm_contract_code, cqsa.ipm_biz_code, cqsa.push_quantities
cqsa.id actualId, cqsa.ipm_project_code, cqsa.ipm_contract_code, cqsa.ipm_biz_code, cqsa.push_quantities,
ifnull(sum(cqsa1.quantities),0) totalQuantities
from cb_quantity_summary cqs
left join cb_quantity_summary_actual cqsa on cqs.id = cqsa.cb_quantity_summary_id
left join cb_quantity_summary_actual cqsa on (cqs.id = cqsa.cb_quantity_summary_id and cqsa.record_date = #{recordDate} )
left join cb_quantity_summary_actual cqsa1 on (cqs.id = cqsa1.cb_quantity_summary_id and cqsa1.record_date
<
= #{recordDate} )
left join cb_subject cs1 on cqs.cb_subject_name = cs1.cb_subject_name
where cqs.del_falg = 0 and cqs.project_id = #{projectId} and cqs.cb_stage = #{cbStage}
<if
test=
"recordDate != null and recordDate != ''"
>
and cqsa.record_date
<
= #{recordDate}
</if>
<if
test=
"cbSubjectName != null and cbSubjectName !=''"
>
<choose>
<when
test=
"cbSubjectName == '未归类项目'"
>
and cs1.id is null
</when>
<otherwise>
and cqs.cb_subject_name = #{cbSubjectName}
</otherwise>
<otherwise>
and cs1.id is not null
and cqs.cb_subject_name = #{cbSubjectName}
</otherwise>
</choose>
</if>
order by cqsa.record_date desc
) a
group by a.id
order by a.`number` asc
group by cqs.id
order by cs1.sort asc, cs1.cb_subject_no asc, cqs.`number` asc
</select>
<select
id=
"unconvertedList"
resultType=
"com.dsk.cscec.domain.vo.CbQuantitySummaryListVo"
>
...
...
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